/* ============================================================================
   Mr File Site | Premium GSM Support & Firmware Portal
   Next-Gen Obsidian Dark Theme with Electric Blue Accents & Light Mode
   ============================================================================ */

:root {
  --ahr-bg: #050811;
  --ahr-bg-elevated: #0a101f;
  --ahr-surface: #0f172a;
  --ahr-surface-2: #15213a;
  --ahr-border: rgba(148, 163, 184, 0.14);
  --ahr-border-glow: rgba(56, 189, 248, 0.34);
  --ahr-text: #dbeafe;
  --ahr-text-muted: #94a3b8;
  --ahr-heading: #ffffff;
  --ahr-primary: #2563eb;
  --ahr-primary-hover: #1d4ed8;
  --ahr-accent: #38bdf8;
  --ahr-success: #10b981;
  --ahr-warning: #f59e0b;
  --ahr-danger: #ef4444;
  --ahr-shadow: 0 16px 40px rgba(2, 6, 23, 0.55);
  --ahr-radius: 16px;
}

[data-theme="light"] {
  --ahr-bg: #f1f5f9;
  --ahr-bg-elevated: #ffffff;
  --ahr-surface: #ffffff;
  --ahr-surface-2: #f8fafc;
  --ahr-border: rgba(15, 23, 42, 0.1);
  --ahr-border-glow: rgba(37, 99, 235, 0.35);
  --ahr-text: #1e293b;
  --ahr-text-muted: #64748b;
  --ahr-heading: #0f172a;
  --ahr-primary: #2563eb;
  --ahr-primary-hover: #1d4ed8;
  --ahr-accent: #0284c7;
  --ahr-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--ahr-bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -15%, rgba(37, 99, 235, 0.14), transparent 70%);
  color: var(--ahr-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
  transition: background-color 0.25s ease, color 0.25s ease;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--ahr-heading);
  font-weight: 800;
  letter-spacing: -0.025em;
}

a {
  color: var(--ahr-accent);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}
a:hover {
  color: #60a5fa;
}

.text-muted-ahr {
  color: var(--ahr-text-muted) !important;
}

[data-theme="light"] .text-white {
  color: var(--ahr-heading) !important;
}

/* Top Utility Bar */
.ahr-topbar {
  background: linear-gradient(90deg, #060b18 0%, #0d1830 50%, #060b18 100%);
  border-bottom: 1px solid var(--ahr-border);
  font-size: 0.78rem;
  color: #cbd5e1;
  padding: 0.45rem 0;
}

/* Glassmorphic Navbar */
.ahr-navbar {
  background: rgba(7, 11, 22, 0.85);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--ahr-border);
  padding: 0.72rem 0;
  z-index: 1030;
}
[data-theme="light"] .ahr-navbar {
  background: rgba(255, 255, 255, 0.92);
}

.ahr-navbar .nav-link {
  color: var(--ahr-text);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.48rem 0.85rem;
  border-radius: 10px;
  transition: all 0.2s ease;
}
.ahr-navbar .nav-link:hover,
.ahr-navbar .nav-link.active {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.28), rgba(6, 182, 212, 0.18));
  box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.25);
}
[data-theme="light"] .ahr-navbar .nav-link:hover,
[data-theme="light"] .ahr-navbar .nav-link.active {
  color: var(--ahr-primary);
  background: rgba(37, 99, 235, 0.08);
}

/* Brand Logo Interactive & Running Glow Effects */
.navbar-brand img,
.ahr-footer img,
.ahr-card img[alt*="Mr File Site"] {
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), filter 0.28s ease;
  filter: drop-shadow(0 2px 8px rgba(0, 212, 255, 0.22));
}
.navbar-brand:hover img {
  transform: translateY(-1.5px) scale(1.02);
  filter: drop-shadow(0 4px 16px rgba(0, 212, 255, 0.5));
}

/* Hero Section with Tech Grid */
.ahr-hero {
  position: relative;
  padding: 4.5rem 0 3.75rem;
  background:
    linear-gradient(to right, rgba(148, 163, 184, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148, 163, 184, 0.04) 1px, transparent 1px),
    radial-gradient(circle at 20% 20%, rgba(37, 99, 235, 0.28), transparent 46%),
    radial-gradient(circle at 82% 18%, rgba(6, 182, 212, 0.2), transparent 44%),
    linear-gradient(180deg, var(--ahr-bg-elevated) 0%, var(--ahr-bg) 100%);
  background-size: 38px 38px, 38px 38px, 100% 100%, 100% 100%, 100% 100%;
  border-bottom: 1px solid var(--ahr-border);
  overflow: hidden;
}

.ahr-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 1.05rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  background: rgba(37, 99, 235, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: var(--ahr-accent);
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.18);
}

.ahr-gradient-text {
  background: linear-gradient(135deg, #60a5fa 0%, #38bdf8 55%, #22d3ee 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Search Bar */
.ahr-search-wrap {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}
.ahr-search-box {
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(56, 189, 248, 0.38);
  border-radius: 16px;
  padding: 0.45rem;
  box-shadow: 0 20px 45px rgba(2, 6, 23, 0.55), 0 0 0 4px rgba(37, 99, 235, 0.1);
  display: flex;
  gap: 0.5rem;
  align-items: center;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
[data-theme="light"] .ahr-search-box {
  background: #ffffff;
}
.ahr-search-box:focus-within {
  border-color: var(--ahr-accent);
  box-shadow: 0 20px 45px rgba(2, 6, 23, 0.6), 0 0 0 4px rgba(56, 189, 248, 0.2);
}
.ahr-search-box input {
  background: transparent;
  border: none;
  color: var(--ahr-heading);
  font-size: 0.98rem;
  padding: 0.65rem 1rem;
  width: 100%;
  outline: none;
}
.ahr-search-box input::placeholder {
  color: var(--ahr-text-muted);
}

.ahr-live-results {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  background: var(--ahr-surface);
  border: 1px solid var(--ahr-border-glow);
  border-radius: 16px;
  box-shadow: var(--ahr-shadow);
  z-index: 1050;
  max-height: 400px;
  overflow-y: auto;
  display: none;
}
.ahr-live-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid var(--ahr-border);
  color: var(--ahr-text);
}
.ahr-live-item:last-child {
  border-bottom: none;
}
.ahr-live-item:hover {
  background: rgba(37, 99, 235, 0.14);
  color: var(--ahr-heading);
}

/* Premium Cards & Surfaces */
.ahr-card {
  background: linear-gradient(180deg, var(--ahr-surface) 0%, var(--ahr-bg-elevated) 100%);
  border: 1px solid var(--ahr-border);
  border-radius: var(--ahr-radius);
  box-shadow: var(--ahr-shadow);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
[data-theme="light"] .ahr-card {
  background: var(--ahr-surface);
}
.ahr-card-hover:hover {
  transform: translateY(-4px);
  border-color: var(--ahr-border-glow);
  box-shadow: 0 20px 44px rgba(37, 99, 235, 0.18);
}

/* Brand Grid Cards + Logos */
.ahr-brand-card {
  background: linear-gradient(180deg, rgba(21, 33, 58, 0.72) 0%, var(--ahr-surface) 100%);
  border: 1px solid var(--ahr-border);
  border-radius: 16px;
  padding: 1.2rem 0.85rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  color: var(--ahr-heading);
  transition: all 0.24s cubic-bezier(0.2, 0.8, 0.2, 1);
  height: 100%;
  position: relative;
}
[data-theme="light"] .ahr-brand-card {
  background: #ffffff;
}
.ahr-brand-card:hover {
  transform: translateY(-5px);
  border-color: var(--ahr-accent);
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.2), var(--ahr-surface));
  box-shadow: 0 14px 32px rgba(37, 99, 235, 0.22);
  color: var(--ahr-heading);
}
.ahr-brand-icon {
  width: 54px;
  height: 54px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  background: rgba(15, 23, 42, 0.85);
  color: var(--ahr-accent);
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}
.ahr-brand-logo-img {
  display: block;
  object-fit: contain;
  border-radius: 10px;
}

.ahr-brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  background: var(--ahr-surface);
  border: 1px solid var(--ahr-border);
  color: var(--ahr-text);
  transition: all 0.18s ease;
}
.ahr-brand-pill:hover,
.ahr-brand-pill.active {
  border-color: var(--ahr-accent);
  background: rgba(37, 99, 235, 0.2);
  color: #ffffff;
}
[data-theme="light"] .ahr-brand-pill.active {
  color: var(--ahr-primary);
}

/* Buttons & Forms */
.btn-ahr {
  background: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
  border: 1px solid rgba(125, 211, 252, 0.25);
  color: #ffffff;
  font-weight: 700;
  border-radius: 10px;
  padding: 0.6rem 1.2rem;
  transition: all 0.2s ease;
}
.btn-ahr:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #0284c7 100%);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.4);
}

.btn-ahr-outline {
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid var(--ahr-border);
  color: var(--ahr-text);
  font-weight: 600;
  border-radius: 10px;
  padding: 0.56rem 1.15rem;
}
[data-theme="light"] .btn-ahr-outline {
  background: #ffffff;
}
.btn-ahr-outline:hover {
  border-color: var(--ahr-accent);
  color: var(--ahr-accent);
  background: rgba(56, 189, 248, 0.1);
}

.form-control, .form-select {
  background-color: var(--ahr-bg-elevated);
  border: 1px solid var(--ahr-border);
  color: var(--ahr-heading);
  border-radius: 10px;
  padding: 0.62rem 0.9rem;
}
.form-control:focus, .form-select:focus {
  background-color: var(--ahr-bg-elevated);
  color: var(--ahr-heading);
  border-color: var(--ahr-accent);
  box-shadow: 0 0 0 0.22rem rgba(37, 99, 235, 0.24);
}
.form-control::placeholder {
  color: var(--ahr-text-muted);
}

/* Badges */
.badge-free {
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.32);
}
.badge-premium {
  background: rgba(37, 99, 235, 0.22);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.38);
}
.badge-credit {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.38);
}
.badge-dump {
  background: rgba(168, 85, 247, 0.22);
  color: #d8b4fe;
  border: 1px solid rgba(192, 132, 252, 0.45);
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.2);
}
.badge-solution {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  border: 1px solid rgba(52, 211, 153, 0.4);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.2);
}
.badge-mdm {
  background: rgba(245, 158, 11, 0.2);
  color: #fcd34d;
  border: 1px solid rgba(251, 191, 36, 0.45);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.2);
}
.badge-schematic {
  background: rgba(20, 184, 166, 0.2);
  color: #5eead4;
  border: 1px solid rgba(45, 212, 191, 0.4);
}
.badge-eng {
  background: rgba(168, 85, 247, 0.2);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.38);
}
.badge-flash {
  background: rgba(6, 182, 212, 0.18);
  color: #22d3ee;
  border: 1px solid rgba(6, 182, 212, 0.35);
}
.badge-tool {
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.35);
}
.badge-frp {
  background: rgba(244, 63, 94, 0.18);
  color: #fda4af;
  border: 1px solid rgba(244, 63, 94, 0.35);
}
.badge-fw {
  background: rgba(148, 163, 184, 0.16);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.28);
}

/* Tables */
.table-ahr {
  --bs-table-bg: transparent;
  --bs-table-color: var(--ahr-text);
  --bs-table-border-color: var(--ahr-border);
  --bs-table-hover-bg: rgba(37, 99, 235, 0.08);
  margin-bottom: 0;
}
.table-ahr th {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ahr-text-muted);
  font-weight: 700;
  border-bottom-width: 1px;
  padding: 0.9rem 1rem;
  white-space: nowrap;
  background: rgba(15, 23, 42, 0.35);
}
[data-theme="light"] .table-ahr th {
  background: #f8fafc;
}
.table-ahr td {
  padding: 0.9rem 1rem;
  vertical-align: middle;
}

/* Pagination */
.pagination .page-link {
  background: var(--ahr-surface);
  border-color: var(--ahr-border);
  color: var(--ahr-text);
}
.pagination .page-item.active .page-link {
  background: var(--ahr-primary);
  border-color: var(--ahr-primary);
  color: #ffffff;
}

/* Pricing Featured */
.ahr-pricing-featured {
  border: 2px solid var(--ahr-primary);
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.16) 0%, var(--ahr-surface) 60%);
  position: relative;
}

/* Footer */
.ahr-footer {
  margin-top: auto;
  background: var(--ahr-bg-elevated);
  border-top: 1px solid var(--ahr-border);
  padding: 3.5rem 0 1.75rem;
}

/* Toast Container */
#ahr-toast-container {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 1090;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-width: 380px;
  width: calc(100% - 2.5rem);
}

.ahr-toast {
  background: var(--ahr-surface);
  border: 1px solid var(--ahr-border);
  border-left-width: 4px;
  border-radius: 12px;
  padding: 0.9rem 1rem;
  box-shadow: var(--ahr-shadow);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  animation: ahrSlideIn 0.25s ease-out;
}
.ahr-toast-success { border-left-color: var(--ahr-success); }
.ahr-toast-danger  { border-left-color: var(--ahr-danger); }
.ahr-toast-warning { border-left-color: var(--ahr-warning); }
.ahr-toast-info    { border-left-color: var(--ahr-accent); }

@keyframes ahrSlideIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

.btn-loading {
  pointer-events: none;
  opacity: 0.8;
}
