/* ═══════════════════════════════════════════════════════════════
   CreditOS Platform — Complete Design System v3
   Navy / Red / Blue — Inter font — Mobile-first responsive
   ═══════════════════════════════════════════════════════════════ */

/* ── 1. CSS Variables ────────────────────────────────────────── */
:root {
  --navy:          #0a1640;
  --navy-mid:      #15224d;
  --navy-light:    #28407a;
  --gold:          #d4af37;
  --gold-dark:     #b8860b;
  --gold-light:    #fcf8e3;
  --teal:          #1d3557;
  --teal-dark:     #0b1d3a;
  --teal-light:    #e6eaf0;
  --white:         #ffffff;
  --gray-50:       #fcfbf8;
  --gray-100:      #f5f3eb;
  --gray-200:      #e8e4d5;
  --gray-300:      #cbd5e1;
  --gray-400:      #94a3b8;
  --gray-500:      #64748b;
  --gray-600:      #475569;
  --gray-700:      #334155;
  --gray-800:      #1e293b;
  --gray-900:      #0f172a;
  --green:         #22c55e;
  --green-dark:    #15803d;
  --green-light:   #dcfce7;
  --red:           #ef4444;
  --red-dark:      #b91c1c;
  --red-light:     #fee2e2;
  --amber:         #f59e0b;
  --amber-light:   #fef3c7;
  --text:          #1e293b;
  --text-muted:    #94a3b8;
  --surface:       #ffffff;
  --border:        #e2e8f0;
  /* Always-on aliases (kept constant across themes so brand surfaces/text
     that intentionally sit on dark or colored backgrounds never invert) */
  --on-dark:       #ffffff;   /* white text that must stay white (buttons, hero) */
  --brand-navy:    #0a1640;   /* dark brand surfaces: sidebar, nav header cells */
  --sidebar-w:     260px;
  --sidebar-collapsed-w: 64px;
  --font:          'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:     'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  --shadow-sm:     0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:     0 4px 12px rgba(0,0,0,.10), 0 2px 6px rgba(0,0,0,.05);
  --shadow-lg:     0 10px 30px rgba(0,0,0,.12), 0 4px 12px rgba(0,0,0,.06);
  --shadow-xl:     0 20px 48px rgba(0,0,0,.16), 0 8px 20px rgba(0,0,0,.08);
  --shadow-gold:   0 4px 20px rgba(212,175,55,.35);
  --shadow-teal:   0 4px 20px rgba(29,53,87,.30);
  --radius-sm:     6px;
  --radius-md:     10px;
  --radius-lg:     14px;
  --radius-xl:     20px;
  --radius-full:   9999px;
  --transition:    .18s ease;
  --transition-md: .28s cubic-bezier(.4,0,.2,1);
  color-scheme: light;
}

/* ── 1b. Dark theme ──────────────────────────────────────────────
   Activated by data-theme="dark" on <html>. Only remaps neutral/surface
   tokens — brand accents (red/blue/green) stay vivid, and the always-on
   aliases (--on-dark, --brand-navy) keep colored/dark surfaces correct.
   Light mode is unaffected: every rule below is scoped to [data-theme=dark]. */
[data-theme="dark"] {
  color-scheme: dark;
  /* surfaces & text */
  --white:      #141b30;   /* cards, inputs, topbar, dropdowns, modals */
  --surface:    #141b30;
  --brand-navy: #0b1226;   /* sidebar / table headers — a touch darker for depth */
  --navy:       #e7ecf7;   /* primary text + headings */
  --text:       #e7ecf7;
  --text-muted: #8793b5;
  --border:     #29334f;
  /* inverted neutral ramp (dark → light) */
  --gray-50:  #10172b;
  --gray-100: #1b243d;
  --gray-200: #29334f;
  --gray-300: #3b476a;
  --gray-400: #7c88ab;
  --gray-500: #9aa5c6;
  --gray-600: #b4bde0;
  --gray-700: #cad2ee;
  --gray-800: #dde3f6;
  --gray-900: #eff2fb;
  /* softer accent tints so status chips glow instead of glare on dark cards */
  --gold-light:  rgba(212,175,55,.16);
  --teal-light:  rgba(29,53,87,.18);
  --green-light: rgba(34,197,94,.16);
  --red-light:   rgba(239,68,68,.16);
  --amber-light: rgba(245,158,11,.16);
  /* deeper, more legible shadows on dark */
  --shadow-sm: 0 1px 3px rgba(0,0,0,.4);
  --shadow-md: 0 4px 12px rgba(0,0,0,.45);
  --shadow-lg: 0 10px 30px rgba(0,0,0,.5);
  --shadow-xl: 0 20px 48px rgba(0,0,0,.55);
}
/* Chips use light-tinted backgrounds with *-dark text; on dark cards the
   text needs to lighten to stay legible against the translucent tint. */
[data-theme="dark"] .badge-in-progress, [data-theme="dark"] .status-in-progress,
[data-theme="dark"] .badge-gold, [data-theme="dark"] .badge-company_admin { color: #ff8b95; }
[data-theme="dark"] .badge-active, [data-theme="dark"] .status-active,
[data-theme="dark"] .badge-teal, [data-theme="dark"] .badge-agent { color: #7fa6ff; }
[data-theme="dark"] .badge-completed, [data-theme="dark"] .status-completed,
[data-theme="dark"] .badge-green { color: #64e39b; }
[data-theme="dark"] .badge-red { color: #ff9a9a; }
[data-theme="dark"] .badge-on-hold, [data-theme="dark"] .status-on-hold { color: #f4c66b; }
[data-theme="dark"] .flash-success { color: #78e6a6; }
[data-theme="dark"] .flash-error, [data-theme="dark"] .flash-danger { color: #ff9a9a; }
[data-theme="dark"] .flash-warning { color: #f4c66b; }
[data-theme="dark"] .flash-info { color: #7fa6ff; }
/* image feature cards already have their own light SVGs — keep a hairline */
[data-theme="dark"] .dash-feature-card,
[data-theme="dark"] .card,
[data-theme="dark"] .stat-card { border-color: var(--border); }

/* ── 2. Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--gray-50);
  color: var(--navy);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--teal); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--teal-dark); }
img { max-width: 100%; display: block; }
h1,h2,h3,h4,h5,h6 { font-weight: 700; line-height: 1.25; color: var(--navy); }
p { color: var(--gray-600); }
ul { list-style: none; }
button { cursor: pointer; font-family: var(--font); border: none; background: none; }
input, select, textarea {
  font-family: var(--font);
  font-size: .9rem;
  color: var(--navy);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 9px 13px;
  width: 100%;
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(29,53,87,.12);
}
input::placeholder, textarea::placeholder { color: var(--gray-400); }
textarea { resize: vertical; line-height: 1.6; }
select {
  appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 14px;
  padding-right: 34px;
}

/* ── 3. App Layout ───────────────────────────────────────────── */
.app-container { display: flex; min-height: 100vh; }

/* ── 4. Sidebar ──────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  height: 100vh;
  position: sticky; top: 0;
  flex-shrink: 0;
  background: var(--brand-navy);
  display: flex; flex-direction: column;
  overflow: hidden;
  transition: width var(--transition-md);
  z-index: 200;
}
.sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.55); z-index: 190;
  backdrop-filter: blur(2px);
}
.sidebar-overlay.active { display: block; }

/* Sidebar header */
.sidebar-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 16px 14px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  min-height: 96px;
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; overflow: hidden; }
.sidebar-brand-mark { font-size: 1.1rem; color: var(--gold); flex-shrink: 0; }
.sidebar-brand-name { font-size: .9rem; font-weight: 800; color: var(--on-dark); letter-spacing: .02em; white-space: nowrap; }
.sidebar-brand-name span { display: block; font-size: .65rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); line-height: 1.2; }
.sidebar-header-btns { display: flex; gap: 4px; flex-shrink: 0; }
.sidebar-collapse-btn, .sidebar-close-btn {
  width: 28px; height: 28px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.5); transition: background var(--transition), color var(--transition);
  font-size: .8rem;
}
.sidebar-collapse-btn:hover, .sidebar-close-btn:hover { background: rgba(255,255,255,.1); color: var(--on-dark); }
.sidebar-close-btn { display: none; }

/* Sidebar user */
.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  overflow: hidden;
}
.sidebar-user-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: var(--navy); font-weight: 800; font-size: .85rem;
  display: flex; align-items: center; justify-content: center;
}
.sidebar-user-info { overflow: hidden; min-width: 0; }
.sidebar-user-name { font-size: .82rem; font-weight: 600; color: var(--on-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-role { font-size: .7rem; color: rgba(255,255,255,.45); white-space: nowrap; }
.sidebar-logo-img { border-radius: 8px; }

/* Nav links */
.nav-links {
  flex: 1; overflow-y: auto; padding: 10px 8px;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.1) transparent;
}
.nav-links::-webkit-scrollbar { width: 4px; }
.nav-links::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 2px; }
.nav-section-label {
  font-size: .62rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(255,255,255,.3); padding: 18px 10px 6px; white-space: nowrap;
  overflow: hidden; transition: opacity var(--transition);
}
.nav-links li a, .sidebar-logout {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: var(--radius-md);
  color: rgba(255,255,255,.62); font-size: .85rem; font-weight: 500;
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
  white-space: nowrap; overflow: hidden;
}
.nav-links li a:hover, .sidebar-logout:hover { background: rgba(255,255,255,.08); color: var(--on-dark); }
.nav-links li a.active { background: rgba(212,175,55,.18); color: var(--gold); font-weight: 600; }
.nav-links li a.active .nav-icon { color: var(--gold); }
.nav-icon { display: flex; align-items: center; flex-shrink: 0; opacity: .85; }
.nav-label { overflow: hidden; text-overflow: ellipsis; transition: opacity var(--transition-md), max-width var(--transition-md); }

/* Sidebar footer */
.sidebar-footer { border-top: 1px solid rgba(255,255,255,.08); padding: 8px; }
.sidebar-logout { color: rgba(255,255,255,.45); }
.sidebar-logout:hover { background: rgba(239,68,68,.15); color: #fca5a5; }

/* Collapsed sidebar */
.sidebar-collapsed .sidebar { width: var(--sidebar-collapsed-w); }
.sidebar-collapsed .nav-label,
.sidebar-collapsed .sidebar-user-info,
.sidebar-collapsed .sidebar-brand-name,
.sidebar-collapsed .nav-section-label { opacity: 0; max-width: 0; overflow: hidden; }
.sidebar-collapsed .sidebar-collapse-btn { transform: rotate(180deg); }

/* ── 5. Main Wrapper ─────────────────────────────────────────── */
.main-wrapper { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }

/* ── 6. Topbar ───────────────────────────────────────────────── */
.topbar {
  height: 60px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px;
  position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow-sm);
}
.topbar-left { display: flex; align-items: center; gap: 12px; }
.topbar-right { display: flex; align-items: center; gap: 6px; }
.topbar-page { font-size: .9rem; font-weight: 600; color: var(--navy); }
.topbar-page a { color: var(--gray-400); font-weight: 500; }
.topbar-page a:hover { color: var(--navy); }

.hamburger-btn {
  display: none; flex-direction: column; justify-content: center; gap: 4px;
  width: 36px; height: 36px; border-radius: var(--radius-sm); padding: 8px;
  background: none; border: none; cursor: pointer; transition: background var(--transition);
}
.hamburger-btn:hover { background: var(--gray-100); }
.hamburger-line { display: block; height: 2px; background: var(--navy); border-radius: 2px; }

.topbar-icon-btn {
  width: 36px; height: 36px; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  color: var(--gray-500); background: none; border: none; cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.topbar-icon-btn:hover { background: var(--gray-100); color: var(--navy); }
/* Theme toggle: show one icon per active theme */
#themeToggleBtn .theme-icon-moon { display: none; }
#themeToggleBtn .theme-icon-sun  { display: block; }
[data-theme="dark"] #themeToggleBtn .theme-icon-moon { display: block; }
[data-theme="dark"] #themeToggleBtn .theme-icon-sun  { display: none; }

/* User dropdown */
.topbar-user-wrap { position: relative; }
.topbar-user-btn {
  display: flex; align-items: center; gap: 8px; padding: 5px 10px;
  border-radius: var(--radius-md); background: none;
  border: 1px solid transparent; cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}
.topbar-user-btn:hover { background: var(--gray-100); border-color: var(--border); }
.topbar-avatar {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--navy); font-weight: 800; font-size: .78rem;
  display: flex; align-items: center; justify-content: center;
}
.topbar-user-info { display: flex; flex-direction: column; align-items: flex-start; }
.topbar-name    { font-size: .8rem; font-weight: 600; color: var(--navy); line-height: 1.2; }
.topbar-company { font-size: .68rem; color: var(--gray-400); line-height: 1.2; }
.topbar-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0; width: 220px;
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none;
  transform: translateY(-6px); transition: opacity var(--transition), transform var(--transition);
  z-index: 300; overflow: hidden;
}
.topbar-dropdown.dropdown-open { opacity: 1; pointer-events: auto; transform: translateY(0); }
.topbar-dropdown-header { padding: 12px 14px; border-bottom: 1px solid var(--border); background: var(--gray-50); }
.topbar-dropdown-header strong { font-size: .85rem; color: var(--navy); }
.topbar-dropdown-header span { font-size: .75rem; color: var(--gray-400); display: block; margin-top: 2px; }
.topbar-dropdown-item, .topbar-dropdown-danger {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px;
  font-size: .83rem; color: var(--navy); text-decoration: none;
  transition: background var(--transition); cursor: pointer;
}
.topbar-dropdown-item:hover { background: var(--gray-50); color: var(--navy); }
.topbar-dropdown-danger { color: var(--red-dark); }
.topbar-dropdown-danger:hover { background: var(--red-light); color: var(--red-dark); }

/* ── 7. Main Content ─────────────────────────────────────────── */
.main-content { flex: 1; padding: 24px; }

/* ── 8. Flash Messages ───────────────────────────────────────── */
.flash-container { margin-bottom: 16px; display: flex; flex-direction: column; gap: 8px; }
.flash-message {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-radius: var(--radius-md);
  font-size: .85rem; font-weight: 500;
  border-left: 4px solid; box-shadow: var(--shadow-sm);
  animation: slideInFlash .25s ease;
}
@keyframes slideInFlash { from { opacity:0; transform:translateY(-8px); } to { opacity:1; transform:translateY(0); } }
.flash-success  { background: var(--green-light); color: var(--green-dark); border-color: var(--green); }
.flash-error    { background: var(--red-light);   color: var(--red-dark);   border-color: var(--red); }
.flash-danger   { background: var(--red-light);   color: var(--red-dark);   border-color: var(--red); }
.flash-warning  { background: var(--amber-light); color: #92400e;           border-color: var(--amber); }
.flash-info     { background: var(--teal-light);  color: var(--teal-dark);  border-color: var(--teal); }
.flash-close {
  width: 24px; height: 24px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; color: inherit; opacity: .6;
  cursor: pointer; flex-shrink: 0; transition: opacity var(--transition);
}
.flash-close:hover { opacity: 1; }

/* ── 9. Page Header ─────────────────────────────────────────── */
.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; margin-bottom: 24px; flex-wrap: wrap;
}
.page-header-left h2 { font-size: 1.55rem; font-weight: 800; color: var(--navy); margin-bottom: 4px; }
.page-description { font-size: .85rem; color: var(--gray-500); margin-top: 3px; line-height: 1.5; }
.page-header-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex-shrink: 0; }

/* ── 10. Section Header ─────────────────────────────────────── */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 14px; flex-wrap: wrap;
}
.section-title { font-size: .95rem; font-weight: 700; color: var(--navy); display: flex; align-items: center; gap: 7px; }

/* ── 11. Cards ──────────────────────────────────────────────── */
.card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); }
.card-header {
  padding: 16px 20px; border-bottom: 1px solid var(--gray-100);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.card-title { font-size: .9rem; font-weight: 700; color: var(--navy); display: flex; align-items: center; gap: 7px; }
.card-body { padding: 20px; }
.card-footer {
  padding: 12px 20px; border-top: 1px solid var(--gray-100);
  background: var(--gray-50); border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* ── 12. Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 20px; border-radius: var(--radius-md);
  font-size: .875rem; font-weight: 600;
  border: 1.5px solid transparent; cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap; line-height: 1;
  font-family: var(--font); vertical-align: middle;
}
.btn:focus { outline: none; }

.btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: var(--brand-navy); border-color: var(--gold-dark);
  box-shadow: 0 2px 8px rgba(212,175,55,.3);
}
.btn-primary:hover { background: linear-gradient(135deg, #e8c766 0%, var(--gold) 100%); box-shadow: var(--shadow-gold); transform: translateY(-1px); color: var(--brand-navy); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary { background: var(--white); color: var(--navy); border-color: var(--border); box-shadow: var(--shadow-sm); }
.btn-secondary:hover { background: var(--gray-50); border-color: var(--gray-300); box-shadow: var(--shadow-md); color: var(--navy); transform: translateY(-1px); }
.btn-secondary:active { transform: translateY(0); }

.btn-accent {
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-dark) 100%);
  color: var(--on-dark); border-color: var(--teal-dark);
  box-shadow: 0 2px 8px rgba(29,53,87,.25);
}
.btn-accent:hover { background: linear-gradient(135deg, #3b70f0 0%, var(--teal) 100%); box-shadow: var(--shadow-teal); transform: translateY(-1px); color: var(--on-dark); }

.btn-danger { background: var(--red-light); color: var(--red-dark); border-color: #fca5a5; }
.btn-danger:hover { background: var(--red); color: var(--on-dark); border-color: var(--red); transform: translateY(-1px); }

.btn-navy { background: var(--brand-navy); color: var(--on-dark); border-color: var(--brand-navy); }
.btn-navy:hover { background: var(--navy-mid); color: var(--on-dark); transform: translateY(-1px); }

.btn-small { padding: 7px 14px; font-size: .8rem; border-radius: var(--radius-sm); }
.btn-large { padding: 13px 28px; font-size: .95rem; border-radius: var(--radius-md); }
.btn-xs    { padding: 4px 10px; font-size: .75rem; border-radius: var(--radius-sm); }
.btn-block { width: 100%; justify-content: center; }
.btn-full  { width: 100%; justify-content: center; }

/* ── 13. Badges ─────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: var(--radius-full);
  font-size: .72rem; font-weight: 700; letter-spacing: .02em; white-space: nowrap;
}
.badge-lead        { background: var(--gray-100);  color: var(--gray-600); }
.badge-active      { background: var(--teal-light); color: var(--teal-dark); }
.badge-in-progress { background: var(--gold-light); color: var(--gold-dark); }
.badge-completed   { background: var(--green-light); color: var(--green-dark); }
.badge-on-hold     { background: var(--amber-light); color: #92400e; }
.badge-teal        { background: var(--teal-light); color: var(--teal-dark); }
.badge-navy        { background: rgba(15,23,42,.1); color: var(--navy); }
.badge-gold        { background: var(--gold-light); color: var(--gold-dark); }
.badge-green       { background: var(--green-light); color: var(--green-dark); }
.badge-red         { background: var(--red-light); color: var(--red-dark); }
/* Role badges */
.badge-company_admin { background: var(--gold-light); color: var(--gold-dark); }
.badge-agent         { background: var(--teal-light); color: var(--teal-dark); }
.badge-super_admin   { background: rgba(15,23,42,.1); color: var(--navy); }
/* CRM status badges */
.client-status-badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: var(--radius-full); font-size: .72rem; font-weight: 700; }
.status-lead        { background: var(--gray-100);  color: var(--gray-600); }
.status-active      { background: var(--teal-light); color: var(--teal-dark); }
.status-in-progress { background: var(--gold-light); color: var(--gold-dark); }
.status-completed   { background: var(--green-light); color: var(--green-dark); }
.status-on-hold     { background: var(--amber-light); color: #92400e; }

/* ── 14. Stats Grid ─────────────────────────────────────────── */
.stats-grid { display: grid; gap: 14px; margin-bottom: 24px; }
.stats-grid-2 { grid-template-columns: repeat(2, 1fr); }
.stats-grid-3 { grid-template-columns: repeat(3, 1fr); }
.stats-grid-4 { grid-template-columns: repeat(4, 1fr); }
.stats-grid-6 { grid-template-columns: repeat(6, 1fr); }

.stat-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 16px 18px;
  display: flex; align-items: center; gap: 14px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat-card-active { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212,175,55,.12); }

.stat-icon { width: 44px; height: 44px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.stat-content { flex: 1; min-width: 0; }
.stat-label  { font-size: .73rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--gray-400); display: block; margin-bottom: 2px; }
.stat-value  { font-size: 1.65rem; font-weight: 800; color: var(--navy); display: block; line-height: 1.1; }
.stat-detail { font-size: .74rem; color: var(--gray-400); display: block; margin-top: 2px; }
.stat-link   { display: block; text-decoration: none; }
.stat-link:hover .stat-value { color: var(--teal); }
.stat-gold    { color: var(--gold-dark); }
.stat-teal    { color: var(--teal-dark); }
.stat-good    { color: var(--green-dark); }
.stat-warning { color: #92400e; }
.stat-danger  { color: var(--red-dark); }
.stat-muted   { color: var(--gray-400); }
.stat-neutral { color: var(--navy); }

/* ── 15. Data Table ─────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.data-table th {
  text-align: left; padding: 11px 14px;
  font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--gray-400); background: var(--gray-50);
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
.data-table td { padding: 12px 14px; border-bottom: 1px solid var(--gray-100); color: var(--gray-700); vertical-align: middle; }
.data-table tbody tr:hover { background: var(--gray-50); }
.data-table tbody tr:last-child td { border-bottom: none; }
.sortable-col a { color: var(--gray-400); text-decoration: none; display: flex; align-items: center; gap: 4px; }
.sortable-col a:hover { color: var(--navy); }
.sort-arrow { font-size: .7rem; color: var(--gold); }
.table-container { overflow-x: auto; }
.crm-table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.col-check { width: 40px; }

/* ── 16. Pagination ─────────────────────────────────────────── */
.pagination-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 14px 16px;
  border-top: 1px solid var(--border); background: var(--gray-50);
  flex-wrap: wrap;
}
.pagination-info     { font-size: .8rem; color: var(--gray-400); }
.pagination-links    { display: flex; gap: 5px; flex-wrap: wrap; }
.pagination-ellipsis { padding: 6px 10px; color: var(--gray-400); font-size: .82rem; }

/* ── 17. Filter Bar ─────────────────────────────────────────── */
.filter-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.filter-input         { width: auto; min-width: 180px; height: 36px; padding: 0 12px; font-size: .83rem; }
.filter-input-wide    { min-width: 240px; }
.filter-input-narrow  { min-width: 100px; width: 110px; }
.filter-input-date    { min-width: 140px; width: auto; }
.filter-select        { width: auto; height: 36px; padding: 0 30px 0 12px; font-size: .83rem; min-width: 140px; }
.filter-select-sm     { height: 32px; font-size: .8rem; }

/* ── 18. Forms ──────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-group label { font-size: .8rem; font-weight: 600; color: var(--navy); }
.form-hint  { font-size: .75rem; color: var(--gray-400); }
.form-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.form-row .form-group { margin-bottom: 0; }
.form-actions { display: flex; align-items: center; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.mono-input { font-family: var(--font-mono); letter-spacing: .12em; }
.form-control { width: 100%; }

/* Checkbox */
.checkbox-label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: .85rem; }
.checkbox-label input[type="checkbox"] { width: auto; accent-color: var(--teal); }

/* ── 19. Empty State ────────────────────────────────────────── */
.empty-state { text-align: center; padding: 56px 24px; color: var(--gray-400); }
.empty-state p { font-size: .88rem; margin-top: 8px; color: var(--gray-400); }

/* ── 20. Spinner ────────────────────────────────────────────── */
.spinner {
  display: inline-block; width: 16px; height: 16px;
  border: 2.5px solid rgba(15,23,42,.15); border-top-color: var(--navy);
  border-radius: 50%; animation: spin .7s linear infinite; flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }
.scan-spinner { width: 40px; height: 40px; border-width: 4px; border-top-color: var(--teal); }

/* ── 21. Text Utilities ─────────────────────────────────────── */
.text-muted { color: var(--gray-400); }
.text-sm    { font-size: .8rem; }
.text-xs    { font-size: .72rem; }
.text-gold  { color: var(--gold-dark); }
.text-teal  { color: var(--teal-dark); }
.text-green { color: var(--green-dark); }
.text-red   { color: var(--red-dark); }

/* ── 22. Score Pills ────────────────────────────────────────── */
.score-pill { display: inline-flex; align-items: center; justify-content: center; padding: 3px 10px; border-radius: var(--radius-full); font-size: .8rem; font-weight: 800; }
.score-good    { background: var(--green-light); color: var(--green-dark); }
.score-warning { background: var(--amber-light); color: #92400e; }
.score-danger  { background: var(--red-light);   color: var(--red-dark); }

/* ── 23. Modal ──────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.55);
  z-index: 400; display: flex; align-items: center; justify-content: center;
  padding: 20px; backdrop-filter: blur(4px);
}
.modal-card {
  background: var(--white); border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl); width: 100%; max-width: 520px;
  max-height: 90vh; overflow-y: auto;
  animation: modalIn .22s ease;
}
@keyframes modalIn { from { opacity:0; transform:scale(.95) translateY(12px); } to { opacity:1; transform:scale(1) translateY(0); } }
.quick-add-modal { max-width: 480px; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.modal-title  { font-size: 1rem; font-weight: 700; color: var(--navy); }
.modal-close  { width: 28px; height: 28px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; color: var(--gray-400); font-size: .9rem; transition: background var(--transition), color var(--transition); }
.modal-close:hover { background: var(--gray-100); color: var(--navy); }
.modal-body   { padding: 20px; }
.modal-footer { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; background: var(--gray-50); border-radius: 0 0 var(--radius-xl) var(--radius-xl); }

/* ── 24. Dashboard Hero ─────────────────────────────────────── */
.dash-hero {
  position: relative; border-radius: var(--radius-xl); overflow: hidden;
  background: url('/static/images/hero-bg.png') center/cover no-repeat, linear-gradient(135deg, var(--navy) 0%, #0c2040 100%);
  margin-bottom: 20px; min-height: 180px;
}
.dash-hero-video {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%; object-fit: cover; object-position: center;
  display: block;
}
.dash-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(15,23,42,.88) 0%, rgba(15,23,42,.65) 60%, rgba(29,53,87,.12) 100%);
}
.dash-hero-content {
  position: relative; z-index: 2; padding: 28px 32px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.dash-hero-date { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); margin-bottom: 6px; display: block; }
.dash-hero-text h1 { font-size: 1.7rem; font-weight: 800; color: var(--on-dark); margin-bottom: 4px; }
.dash-hero-name { color: var(--gold); }
.dash-hero-sub  { font-size: .83rem; color: rgba(255,255,255,.6); }
.dash-hero-quote {
  max-width: 340px; background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1); border-radius: var(--radius-md); padding: 14px 18px;
}
.dash-hero-quote-mark { font-size: 1.8rem; color: var(--gold); line-height: 1; display: block; margin-bottom: 4px; }
.dash-hero-quote p    { font-size: .8rem; color: rgba(255,255,255,.75); line-height: 1.6; font-style: italic; }

/* ── 25. Quick Actions Bar ──────────────────────────────────── */
.dash-quick-actions-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.dash-qa-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px;
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md);
  font-size: .82rem; font-weight: 600; color: var(--navy); text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}
.dash-qa-btn:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); border-color: var(--gray-300); color: var(--navy); }
.dash-qa-icon { width: 24px; height: 24px; border-radius: 6px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.dash-qa-icon.teal   { background: var(--teal-light);  color: var(--teal-dark); }
.dash-qa-icon.gold   { background: var(--gold-light);  color: var(--gold-dark); }
.dash-qa-icon.green  { background: var(--green-light); color: var(--green-dark); }
.dash-qa-icon.blue   { background: #eff6ff; color: #2563eb; }
.dash-qa-icon.navy   { background: rgba(15,23,42,.08); color: var(--navy); }

/* ── 26. Dashboard Main Grid ────────────────────────────────── */
.dash-main-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 28px; }
.dash-pipeline-card   { grid-column: 1; }
.dash-score-wins-card { grid-column: 2; }
.dash-activity-card   { grid-column: 1; }
.dash-scans-card      { grid-column: 2; }

/* Pipeline funnel */
.pipeline-funnel { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.pipeline-row { display: flex; align-items: center; gap: 10px; }
.pipeline-status-badge { width: 96px; flex-shrink: 0; text-align: center; font-size: .72rem; }
.pipeline-bar-wrap { flex: 1; background: var(--gray-100); border-radius: var(--radius-full); height: 8px; overflow: hidden; }
.pipeline-bar { height: 100%; border-radius: var(--radius-full); transition: width .6s ease; min-width: 4px; }
.pipeline-count { font-size: .82rem; font-weight: 700; color: var(--navy); min-width: 24px; text-align: right; }
.pipeline-chart-wrap { max-width: 200px; margin: 0 auto; }

/* Score wins */
.score-wins-list { display: flex; flex-direction: column; gap: 10px; }
.score-win-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--gray-50); border-radius: var(--radius-md); border: 1px solid var(--gray-100); }
.score-win-avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--gold), var(--gold-dark)); color: var(--navy); font-weight: 800; font-size: .88rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.score-win-info { flex: 1; min-width: 0; }
.score-win-name { font-size: .85rem; font-weight: 700; color: var(--navy); display: block; }
.score-win-name:hover { color: var(--teal); }
.score-win-current { font-size: .74rem; color: var(--gray-400); display: block; margin-top: 2px; }
.score-win-gain { font-size: .84rem; font-weight: 800; color: var(--green-dark); background: var(--green-light); padding: 3px 10px; border-radius: var(--radius-full); white-space: nowrap; flex-shrink: 0; }

/* Activity feed */
.activity-feed { display: flex; flex-direction: column; }
.activity-item { display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--gray-100); }
.activity-item:last-child { border-bottom: none; }
.activity-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; background: var(--gray-300); }
.activity-dot-auth    { background: #6366f1; }
.activity-dot-dispute { background: var(--teal); }
.activity-dot-client  { background: var(--gold); }
.activity-dot-scan    { background: var(--green); }
.activity-dot-bureau  { background: var(--navy-light); }
.activity-dot-user    { background: var(--amber); }
.activity-dot-company { background: #ec4899; }
.activity-body { flex: 1; min-width: 0; }
.activity-text { font-size: .81rem; color: var(--gray-700); line-height: 1.5; margin: 0 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity-action { color: var(--teal-dark); font-style: italic; }
.activity-detail { color: var(--gray-400); }
.activity-time { font-size: .71rem; color: var(--gray-400); }

/* Recent scans */
.recent-scans-list { display: flex; flex-direction: column; gap: 10px; }
.recent-scan-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--gray-50); border-radius: var(--radius-md); border: 1px solid var(--gray-100); }
.recent-scan-icon { width: 32px; height: 32px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.scan-icon-red   { background: var(--red-light);   color: var(--red-dark); }
.scan-icon-amber { background: var(--amber-light);  color: #92400e; }
.scan-icon-green { background: var(--green-light);  color: var(--green-dark); }
.recent-scan-info { flex: 1; min-width: 0; }
.recent-scan-client { font-size: .84rem; font-weight: 600; color: var(--navy); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-scan-meta   { font-size: .73rem; color: var(--gray-400); display: block; margin-top: 2px; }
.recent-scan-badges { display: flex; gap: 4px; flex-shrink: 0; }
.sev-badge { padding: 2px 6px; border-radius: var(--radius-full); font-size: .68rem; font-weight: 700; }
.sev-high  { background: var(--red-light);   color: var(--red-dark); }
.sev-med   { background: var(--amber-light);  color: #92400e; }
.sev-low   { background: var(--green-light);  color: var(--green-dark); }

/* Dashboard empty */
.dash-empty-state { text-align: center; padding: 36px 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.dash-empty-state span { font-size: 2rem; }
.dash-empty-state p { font-size: .82rem; color: var(--gray-400); margin: 0; line-height: 1.6; }
.dash-empty-state a { color: var(--teal); font-weight: 600; }

/* ── 27. Scan Page ──────────────────────────────────────────── */
.scan-layout { display: grid; grid-template-columns: 1fr 320px; gap: 20px; align-items: start; }
.scan-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.scan-hint { font-size: .78rem; color: var(--gray-400); margin-top: 4px; line-height: 1.5; }
.scan-powered-badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, rgba(212,175,55,.10), rgba(29,53,87,.08));
  border: 1px solid rgba(212,175,55,.20);
  font-size: .7rem; font-weight: 600; color: var(--gold-dark); white-space: nowrap; flex-shrink: 0;
}
.scan-textarea { min-height: 220px; font-size: .85rem; line-height: 1.7; background: var(--gray-50); resize: vertical; }
.scan-submit-row { display: flex; align-items: center; gap: 14px; margin-top: 4px; flex-wrap: wrap; }
.scan-time-hint { font-size: .75rem; color: var(--gray-400); }
.scan-loading-state { padding: 32px 0; }
.scan-loading-inner { display: flex; align-items: center; gap: 20px; }
.scan-loading-msg { font-size: .95rem; font-weight: 600; color: var(--navy); margin-bottom: 4px; }
.scan-loading-sub { font-size: .78rem; color: var(--gray-400); }
.scan-categories { display: flex; flex-direction: column; gap: 10px; }
.scan-category-item { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--gray-100); }
.scan-category-item:last-child { border-bottom: none; }
.scan-category-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }
.scan-category-name { font-size: .82rem; font-weight: 600; color: var(--navy); }
.scan-category-desc { font-size: .74rem; color: var(--gray-400); margin-top: 1px; line-height: 1.4; }
/* Scan results */
.scan-results { margin-top: 24px; }
.scan-results-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.scan-results-title { font-size: 1.05rem; font-weight: 700; color: var(--navy); }
.scan-summary-bar { display: flex; gap: 10px; flex-wrap: wrap; }
.scan-errors-list { display: flex; flex-direction: column; gap: 12px; }
.error-card { border: 1px solid var(--border); border-radius: var(--radius-md); padding: 14px 16px; display: flex; gap: 12px; align-items: flex-start; background: var(--white); transition: box-shadow var(--transition); }
.error-card:hover { box-shadow: var(--shadow-md); }
.error-card.high   { border-left: 4px solid var(--red); }
.error-card.medium { border-left: 4px solid var(--amber); }
.error-card.low    { border-left: 4px solid var(--green); }
.error-sev-badge { padding: 2px 8px; border-radius: var(--radius-full); font-size: .68rem; font-weight: 800; white-space: nowrap; flex-shrink: 0; }
.error-sev-badge.high   { background: var(--red-light);   color: var(--red-dark); }
.error-sev-badge.medium { background: var(--amber-light);  color: #92400e; }
.error-sev-badge.low    { background: var(--green-light);  color: var(--green-dark); }
.severity-high   { background: var(--red-light);   color: var(--red-dark); }
.severity-medium { background: var(--amber-light);  color: #92400e; }
.severity-low    { background: var(--green-light);  color: var(--green-dark); }
.error-body { flex: 1; min-width: 0; }
.error-type { font-size: .85rem; font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.error-desc { font-size: .8rem; color: var(--gray-500); line-height: 1.5; }

/* ── 28. Dispute Page ───────────────────────────────────────── */
.dispute-builder-layout { display: grid; grid-template-columns: 1fr 300px; gap: 24px; align-items: start; }
.dispute-form-section { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.dispute-form-section-head, .dispute-section-divider { display: flex; align-items: flex-start; gap: 14px; padding: 18px 20px; border-bottom: 1px solid var(--gray-100); }
.dispute-section-divider { border-top: 1px solid var(--gray-100); margin-top: 8px; border-bottom: none; }
.dispute-step-badge { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, var(--gold), var(--gold-dark)); color: var(--navy); font-weight: 800; font-size: .82rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.dispute-step-desc { font-size: .78rem; color: var(--gray-400); margin-top: 2px; }
.dispute-form { padding: 20px; }
.letter-output { margin-bottom: 24px; }
.letter-output-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.letter-output-header h3 { font-size: 1rem; font-weight: 700; color: var(--navy); }
.letter-output-sub { font-size: .78rem; color: var(--gray-400); margin-top: 2px; }
.letter-output-actions { display: flex; gap: 8px; }
.letter-content { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow-sm); }
.letter-content pre { white-space: pre-wrap; font-family: var(--font-mono); font-size: .82rem; line-height: 1.8; color: var(--navy); }
.dispute-info-icon { width: 44px; height: 44px; border-radius: var(--radius-md); background: linear-gradient(135deg, var(--navy), var(--navy-mid)); color: var(--gold); display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.dispute-info-card h4 { font-size: .88rem; font-weight: 700; margin-bottom: 6px; }
.dispute-info-card p  { font-size: .78rem; color: var(--gray-500); line-height: 1.55; }
.dispute-tips-list { display: flex; flex-direction: column; gap: 8px; }
.dispute-tips-list li { font-size: .8rem; color: var(--gray-600); display: flex; gap: 8px; align-items: flex-start; line-height: 1.4; }
.dispute-tips-list li::before { content: '✓'; color: var(--green-dark); font-weight: 800; flex-shrink: 0; }
.dispute-bureau-list { display: flex; flex-direction: column; gap: 10px; }
.dispute-bureau-item { padding: 8px 0; border-bottom: 1px solid var(--gray-100); }
.dispute-bureau-item:last-child { border-bottom: none; }
.dispute-bureau-item strong { font-size: .82rem; display: block; margin-bottom: 2px; }
.dispute-bureau-item span { font-size: .75rem; color: var(--gray-400); line-height: 1.4; }
.dispute-history { margin-top: 28px; }
.dispute-history h3 { font-size: 1rem; font-weight: 700; margin-bottom: 14px; }
.bureau-chip { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: var(--radius-full); font-size: .72rem; font-weight: 700; background: var(--gray-100); color: var(--gray-600); }
.bureau-chip-equifax    { background: #fee2e2; color: #b91c1c; }
.bureau-chip-experian   { background: #dbeafe; color: #1d4ed8; }
.bureau-chip-transunion { background: var(--green-light); color: var(--green-dark); }
.bureau-chip-innovis    { background: var(--amber-light); color: #92400e; }
.td-date     { white-space: nowrap; }
.td-truncate { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── 29. CRM Page ───────────────────────────────────────────── */
.crm-stats-bar { margin-bottom: 16px; }
.crm-filter-bar .filter-input { min-width: 200px; }
.client-name-link { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.client-name-link:hover .client-name-text { color: var(--teal); }
.client-avatar-sm { width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; background: linear-gradient(135deg, var(--navy-mid), var(--navy-light)); color: var(--on-dark); font-weight: 800; font-size: .82rem; display: flex; align-items: center; justify-content: center; }
.client-name-text { font-size: .86rem; font-weight: 700; color: var(--navy); }
.client-sub-text  { font-size: .74rem; color: var(--gray-400); margin-top: 1px; }
.bulk-action-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 12px; background: var(--teal-light); border: 1px solid rgba(29,53,87,.25); border-radius: var(--radius-md); }
.bulk-count { font-size: .82rem; font-weight: 700; color: var(--teal-dark); }
.bulk-group { display: flex; align-items: center; gap: 6px; }

/* ── 30. Client Detail ──────────────────────────────────────── */
.client-detail-page { max-width: 1100px; }
.client-detail-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 24px; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 24px; box-shadow: var(--shadow-sm); flex-wrap: wrap; }
.client-detail-header-left { display: flex; align-items: flex-start; gap: 16px; flex: 1; min-width: 0; }
.client-avatar-lg { width: 64px; height: 64px; border-radius: 50%; flex-shrink: 0; background: linear-gradient(135deg, var(--gold), var(--gold-dark)); color: var(--brand-navy); font-weight: 800; font-size: 1.6rem; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(212,175,55,.3); }
.client-detail-info h2 { font-size: 1.35rem; font-weight: 800; margin-bottom: 8px; }
.client-detail-badges { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.credit-score-badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 12px; border-radius: var(--radius-full); font-size: .88rem; font-weight: 800; }
.score-change { font-size: .78rem; font-weight: 700; padding: 2px 8px; border-radius: var(--radius-full); }
.score-change-up   { background: var(--green-light); color: var(--green-dark); }
.score-change-down { background: var(--red-light);   color: var(--red-dark); }
.trend-arrow { font-size: .7rem; }
.trend-up    { color: var(--green-dark); }
.trend-down  { color: var(--red-dark); }
.client-detail-contact { display: flex; flex-wrap: wrap; gap: 6px; }
.contact-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: var(--radius-full); font-size: .75rem; background: var(--gray-100); color: var(--gray-600); }
.contact-chip.muted { background: transparent; color: var(--gray-400); }
.client-detail-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; }

/* Tabs */
.tab-nav { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 16px; border-bottom: 2px solid var(--border); padding-bottom: 0; }
.tab-btn { display: flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: var(--radius-sm) var(--radius-sm) 0 0; font-size: .82rem; font-weight: 600; color: var(--gray-500); background: none; border: none; border-bottom: 2px solid transparent; margin-bottom: -2px; cursor: pointer; transition: color var(--transition), border-color var(--transition), background var(--transition); }
.tab-btn:hover { color: var(--navy); background: var(--gray-50); }
.tab-btn.active { color: var(--teal-dark); border-bottom-color: var(--teal); background: var(--teal-light); }
.tab-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--radius-full); background: var(--gray-200); font-size: .65rem; font-weight: 800; color: var(--gray-600); }
.tab-btn.active .tab-badge { background: var(--teal-light); color: var(--teal-dark); }

/* Overview grid */
.overview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.chart-card { grid-column: 1 / -1; }
.status-buttons { display: flex; gap: 6px; flex-wrap: wrap; padding: 16px 20px; }
.client-edit-form { padding: 20px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--gray-50); margin-top: 16px; }

/* Timeline */
.timeline { display: flex; flex-direction: column; }
.timeline-entry { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--gray-100); }
.timeline-entry:last-child { border-bottom: none; }
.timeline-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--gray-300); margin-top: 6px; flex-shrink: 0; }
.timeline-dot.note   { background: var(--teal); }
.timeline-dot.status { background: var(--gold); }
.timeline-dot.system { background: var(--green); }
.timeline-body { flex: 1; }
.timeline-text { font-size: .85rem; color: var(--navy); line-height: 1.5; margin-bottom: 3px; }
.timeline-meta { font-size: .73rem; color: var(--gray-400); }
.note-form { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.note-form textarea { min-height: 60px; }
.note-form .btn { align-self: flex-end; flex-shrink: 0; }
.score-input-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.score-input-row input { width: 100px; }
.documents-list { display: flex; flex-direction: column; gap: 10px; }
.document-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--gray-50); border: 1px solid var(--gray-100); border-radius: var(--radius-md); }
.doc-icon { width: 36px; height: 36px; border-radius: var(--radius-sm); background: var(--teal-light); color: var(--teal-dark); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.doc-info { flex: 1; min-width: 0; }
.doc-name { font-size: .84rem; font-weight: 600; color: var(--navy); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-meta { font-size: .73rem; color: var(--gray-400); display: block; margin-top: 2px; }

/* ── 31. Tradelines Page ────────────────────────────────────── */
.util-dashboard { margin-bottom: 24px; }
.util-gauge-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 12px; }
.util-gauge-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px 18px; box-shadow: var(--shadow-sm); }
.util-total-card { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.util-gauge-label { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--gray-400); margin-bottom: 10px; display: block; }
.util-gauge-bar-wrap { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.util-gauge-bar { flex: 1; height: 8px; background: var(--gray-100); border-radius: var(--radius-full); overflow: hidden; }
.util-gauge-fill { height: 100%; border-radius: var(--radius-full); transition: width .8s cubic-bezier(.4,0,.2,1); min-width: 4px; }
.fill-good    { background: linear-gradient(90deg, var(--green), #4ade80); }
.fill-warning { background: linear-gradient(90deg, var(--amber), #fbbf24); }
.fill-danger  { background: linear-gradient(90deg, var(--red), #f87171); }
.util-gauge-pct { font-size: 1rem; font-weight: 800; flex-shrink: 0; }
.util-gauge-sub { font-size: .73rem; color: var(--gray-400); margin-top: 4px; }
.util-total-count { font-size: 2.2rem; font-weight: 900; color: var(--navy); line-height: 1; margin: 6px 0; }
.util-tips-panel { display: flex; align-items: flex-start; gap: 12px; padding: 12px 16px; background: rgba(29,53,87,.07); border: 1px solid rgba(29,53,87,.2); border-radius: var(--radius-md); font-size: .82rem; color: var(--gray-600); line-height: 1.55; }
.util-tips-icon { font-size: 1.2rem; flex-shrink: 0; }
.tradeline-section { margin-bottom: 28px; }
.tradeline-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.tradeline-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px 18px; box-shadow: var(--shadow-sm); transition: box-shadow var(--transition), transform var(--transition); }
.tradeline-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.tradeline-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.tradeline-name { font-size: .9rem; font-weight: 700; color: var(--navy); }
.tradeline-creditor { font-size: .73rem; color: var(--gray-400); margin-top: 2px; }
.tradeline-util-bar { height: 6px; background: var(--gray-100); border-radius: var(--radius-full); overflow: hidden; margin: 8px 0; }
.tradeline-util-fill { height: 100%; border-radius: var(--radius-full); transition: width .6s ease; }
.tradeline-meta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.tradeline-meta-item { font-size: .74rem; color: var(--gray-500); }
.tradeline-actions { display: flex; gap: 6px; margin-top: 12px; border-top: 1px solid var(--gray-100); padding-top: 10px; }
.payment-history-row { display: flex; gap: 3px; flex-wrap: wrap; margin-top: 8px; }
.ph-bubble { width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .55rem; font-weight: 800; }
.ph-on-time { background: var(--green-light); color: var(--green-dark); }
.ph-late    { background: var(--red-light);   color: var(--red-dark); }
.ph-unknown { background: var(--gray-100);    color: var(--gray-400); }

/* ── 32. Supply Page ────────────────────────────────────────── */
.supply-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin-bottom: 24px; }
.supply-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px; box-shadow: var(--shadow-sm); transition: box-shadow var(--transition), transform var(--transition); }
.supply-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.supply-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.supply-card-title { font-size: .9rem; font-weight: 800; color: var(--navy); }
.supply-card-creditor { font-size: .75rem; color: var(--gray-400); margin-top: 2px; }
.supply-card-price { font-size: 1.3rem; font-weight: 900; color: var(--gold-dark); }
.supply-card-price-sub { font-size: .7rem; color: var(--gray-400); }
.supply-spots { display: flex; gap: 4px; margin-top: 10px; flex-wrap: wrap; }
.supply-spot { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .65rem; font-weight: 700; }
.supply-spot-open   { background: var(--green-light); color: var(--green-dark); border: 1px solid #86efac; }
.supply-spot-filled { background: var(--gray-100);    color: var(--gray-400);   border: 1px solid var(--gray-200); }
.supply-bureaus { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 8px; }
.bureau-dot { display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px; border-radius: var(--radius-full); font-size: .68rem; font-weight: 700; }
.bureau-dot-eq { background: #fee2e2; color: #b91c1c; }
.bureau-dot-ex { background: #dbeafe; color: #1d4ed8; }
.bureau-dot-tu { background: var(--green-light); color: var(--green-dark); }

/* ── 33. Standards Page ─────────────────────────────────────── */
.standards-layout { display: grid; grid-template-columns: 320px 1fr; gap: 24px; align-items: start; }
.standards-form-head { display: flex; align-items: flex-start; gap: 12px; }
.standards-form-icon { width: 38px; height: 38px; border-radius: var(--radius-md); background: linear-gradient(135deg, var(--gold), var(--gold-dark)); color: var(--navy); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.standards-form-sub { font-size: .75rem; color: var(--gray-400); margin-top: 2px; }
.standards-quote-card { margin-top: 16px; background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%); border-radius: var(--radius-lg); padding: 20px; }
.standards-quote-mark { font-size: 2rem; color: var(--gold); line-height: 1; display: block; margin-bottom: 6px; }
.standards-quote-card p { font-size: .83rem; color: rgba(255,255,255,.8); font-style: italic; line-height: 1.7; }
.standards-cards { display: flex; flex-direction: column; gap: 12px; }
.standard-card-full { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px 20px; box-shadow: var(--shadow-sm); transition: box-shadow var(--transition), transform var(--transition); }
.standard-card-full:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.standard-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.standard-area-wrap { display: flex; align-items: center; gap: 8px; }
.standard-area-icon { font-size: 1.1rem; }
.focus-badge { font-size: .72rem; font-weight: 700; padding: 3px 10px; background: var(--gold-light); color: var(--gold-dark); border-radius: var(--radius-full); }
.date-badge { font-size: .71rem; color: var(--gray-400); display: flex; align-items: center; gap: 4px; }
.standard-text { font-size: .87rem; color: var(--navy); line-height: 1.6; margin-bottom: 12px; font-style: italic; }
.standard-actions { border-top: 1px solid var(--gray-100); padding-top: 10px; }
.standards-empty { text-align: center; padding: 56px 24px; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: var(--shadow-sm); }
.standards-empty-icon { font-size: 2.8rem; margin-bottom: 14px; }
.standards-empty h4 { font-size: .95rem; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.standards-empty p  { font-size: .82rem; color: var(--gray-400); line-height: 1.6; }

/* ── 34. Systems Page ───────────────────────────────────────── */
.systems-layout { display: grid; grid-template-columns: 320px 1fr; gap: 24px; align-items: start; }
.systems-form-head { display: flex; align-items: flex-start; gap: 12px; }
.systems-form-icon { width: 38px; height: 38px; border-radius: var(--radius-md); background: linear-gradient(135deg, var(--teal), var(--teal-dark)); color: var(--on-dark); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.systems-form-sub { font-size: .75rem; color: var(--gray-400); margin-top: 2px; }
.systems-tip-card { margin-top: 16px; display: flex; align-items: flex-start; gap: 12px; background: var(--teal-light); border: 1px solid rgba(29,53,87,.2); border-radius: var(--radius-lg); padding: 16px 18px; }
.systems-tip-icon { font-size: 1.3rem; flex-shrink: 0; }
.systems-tip-card p { font-size: .8rem; color: var(--teal-dark); line-height: 1.5; }
.systems-section { margin-bottom: 24px; }
.systems-section-icon { width: 20px; height: 20px; border-radius: 5px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.systems-section-icon.teal { background: var(--teal-light); color: var(--teal-dark); }
.systems-section-icon.gold { background: var(--gold-light); color: var(--gold-dark); }
.systems-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.system-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px 20px; box-shadow: var(--shadow-sm); transition: box-shadow var(--transition), transform var(--transition); }
.system-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.system-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.system-name { font-size: .9rem; font-weight: 700; color: var(--navy); }
.system-frequency-badge { font-size: .68rem; font-weight: 700; padding: 3px 8px; border-radius: var(--radius-full); white-space: nowrap; flex-shrink: 0; background: var(--teal-light); color: var(--teal-dark); }
.system-steps-list { display: flex; flex-direction: column; gap: 5px; }
.system-step { display: flex; align-items: flex-start; gap: 8px; font-size: .79rem; color: var(--gray-600); line-height: 1.4; }
.system-step-num { width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0; background: var(--gray-100); color: var(--gray-500); display: flex; align-items: center; justify-content: center; font-size: .62rem; font-weight: 800; }
.system-card-footer { border-top: 1px solid var(--gray-100); padding-top: 10px; margin-top: 12px; display: flex; gap: 6px; }

/* ── 35. Reports Hub ────────────────────────────────────────── */
.reports-hub-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.report-hub-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: var(--shadow-sm); padding: 24px; display: flex; flex-direction: column; gap: 16px; transition: box-shadow var(--transition), transform var(--transition); }
.report-hub-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.report-hub-icon { width: 52px; height: 52px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.report-hub-body h3 { font-size: 1.05rem; font-weight: 800; margin: 0 0 8px; }
.report-hub-body p  { font-size: .83rem; color: var(--gray-500); line-height: 1.6; margin: 0 0 12px; }
.report-hub-meta { display: flex; gap: 10px; flex-wrap: wrap; }
.report-hub-meta span { font-size: .75rem; color: var(--gray-400); }
.report-hub-actions { display: flex; gap: 8px; }
.reports-summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.report-bar-row   { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.report-bar-label { font-size: .82rem; font-weight: 600; color: var(--navy); min-width: 100px; }
.report-bar-track { flex: 1; height: 8px; background: var(--gray-100); border-radius: var(--radius-full); overflow: hidden; }
.report-bar-fill  { height: 100%; border-radius: var(--radius-full); transition: width .6s ease; min-width: 4px; }
.report-bar-count { font-size: .82rem; font-weight: 700; color: var(--navy); min-width: 28px; text-align: right; }
.score-delta       { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: var(--radius-full); font-size: .78rem; font-weight: 700; }
.score-delta-up    { background: var(--green-light); color: var(--green-dark); }
.score-delta-down  { background: var(--red-light);   color: var(--red-dark); }
.score-delta-flat  { background: var(--gray-100);    color: var(--gray-500); }
.status-filter-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-full); font-size: .8rem; cursor: pointer; text-decoration: none; transition: border-color var(--transition), box-shadow var(--transition); }
.status-filter-chip:hover { border-color: var(--gray-300); box-shadow: var(--shadow-sm); }
.status-filter-chip.active { border-color: var(--teal); box-shadow: 0 0 0 2px rgba(29,53,87,.15); }
.status-filter-count { font-weight: 700; color: var(--gray-600); }
.clear-chip { color: var(--gray-400); font-size: .78rem; }
.result-header { margin-bottom: 12px; }
.result-count  { font-size: .84rem; color: var(--gray-500); }
.report-filter-form .filter-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.report-filter-form .filter-select,
.report-filter-form .filter-input { height: 36px; font-size: .83rem; }

/* ── 36. Settings ───────────────────────────────────────────── */
.settings-layout { display: grid; grid-template-columns: 220px 1fr; gap: 24px; align-items: start; }
.settings-nav { display: flex; flex-direction: column; gap: 2px; }
.settings-nav-btn { display: flex; align-items: center; gap: 9px; padding: 9px 12px; border-radius: var(--radius-md); font-size: .84rem; font-weight: 500; color: var(--gray-600); background: none; border: none; cursor: pointer; text-align: left; transition: background var(--transition), color var(--transition); width: 100%; }
.settings-nav-btn:hover { background: var(--gray-100); color: var(--navy); }
.settings-nav-btn.active { background: var(--teal-light); color: var(--teal-dark); font-weight: 600; }
.settings-panel { display: none; }
.settings-panel.active { display: block; }
.logo-upload-area { border: 2px dashed var(--border); border-radius: var(--radius-lg); padding: 28px; text-align: center; cursor: pointer; transition: border-color var(--transition), background var(--transition); }
.logo-upload-area:hover { border-color: var(--teal); background: var(--teal-light); }
.logo-preview { max-height: 80px; max-width: 200px; margin: 0 auto 12px; border-radius: var(--radius-md); }

/* ── 37. Help / Tooltip ─────────────────────────────────────── */
.help-tip-btn { }
.help-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.help-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-sm); transition: box-shadow var(--transition), transform var(--transition); cursor: pointer; text-decoration: none; display: block; color: inherit; }
.help-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); color: inherit; }
.help-card-icon { font-size: 1.8rem; margin-bottom: 10px; }
.help-card h3 { font-size: .9rem; font-weight: 700; margin-bottom: 6px; }
.help-card p  { font-size: .78rem; color: var(--gray-400); line-height: 1.5; }

/* ── 38. Bureau Delivery ────────────────────────────────────── */
.delivery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; margin-bottom: 24px; }
.delivery-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px 20px; box-shadow: var(--shadow-sm); transition: box-shadow var(--transition); }
.delivery-card:hover { box-shadow: var(--shadow-md); }
.delivery-card-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.delivery-bureau-name { font-size: .95rem; font-weight: 700; color: var(--navy); }
.delivery-method { font-size: .74rem; color: var(--gray-400); margin-top: 2px; }

/* ── 39. Onboarding Stepper ─────────────────────────────────── */
.onboard-stepper { display: flex; gap: 0; margin-bottom: 28px; }
.onboard-step { flex: 1; position: relative; text-align: center; padding: 0 10px 16px; }
.onboard-step::after { content: ''; position: absolute; top: 14px; left: calc(50% + 14px); right: calc(-50% + 14px); height: 2px; background: var(--border); }
.onboard-step:last-child::after { display: none; }
.onboard-step-num { width: 28px; height: 28px; border-radius: 50%; background: var(--gray-200); color: var(--gray-500); display: flex; align-items: center; justify-content: center; margin: 0 auto 6px; font-size: .78rem; font-weight: 800; position: relative; z-index: 1; }
.onboard-step.active .onboard-step-num { background: var(--gold); color: var(--navy); }
.onboard-step.done .onboard-step-num   { background: var(--green); color: var(--on-dark); }
.onboard-step-label { font-size: .72rem; font-weight: 600; color: var(--gray-400); }
.onboard-step.active .onboard-step-label { color: var(--gold-dark); }

/* ── 40. Auth Pages ─────────────────────────────────────────── */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: linear-gradient(135deg, var(--navy) 0%, #1e3a5f 50%, var(--navy-mid) 100%); }
.auth-card { width: 100%; max-width: 420px; background: var(--white); border-radius: var(--radius-xl); box-shadow: var(--shadow-xl); overflow: hidden; }
.auth-header { padding: 28px 28px 0; text-align: center; }
.auth-logo { font-size: 1.1rem; font-weight: 900; color: var(--navy); letter-spacing: .02em; margin-bottom: 4px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.auth-logo-mark { color: var(--gold); }
.auth-header h2 { font-size: 1.25rem; font-weight: 800; color: var(--navy); margin-bottom: 4px; }
.auth-header p  { font-size: .82rem; color: var(--gray-400); }
.auth-body { padding: 24px 28px 28px; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 16px 0; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.auth-divider span { font-size: .73rem; color: var(--gray-400); white-space: nowrap; }
.auth-link { font-size: .82rem; color: var(--gray-400); text-align: center; margin-top: 16px; display: block; }
.auth-link a { color: var(--teal); font-weight: 600; }

/* Standalone auth pages using the container pattern (register + error pages) */
.auth-container { width: 100%; max-width: 420px; }
.auth-container .auth-card { padding: 32px 28px; }
.auth-container .auth-logo { margin-bottom: 18px; }
.auth-container .auth-logo-mark { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; background: var(--gold); color: var(--navy); font-weight: 800; font-size: .9rem; }
.auth-logo-text { font-weight: 800; color: var(--navy); font-size: 1.05rem; }
.auth-title { font-size: 1.35rem; font-weight: 800; color: var(--navy); text-align: center; margin-bottom: 6px; }
.auth-subtitle { font-size: .85rem; color: var(--gray-400); text-align: center; margin-bottom: 22px; line-height: 1.55; }
.auth-form .form-group { margin-bottom: 16px; }
.auth-footer-text { font-size: .82rem; color: var(--gray-400); text-align: center; margin-top: 18px; }
.auth-footer-text a { color: var(--teal); font-weight: 600; }

/* Auth pages — mobile refinements */
@media (max-width: 480px) {
  .auth-page { padding: 14px; }
  .auth-container .auth-card { padding: 24px 18px; }
  .auth-header { padding: 22px 20px 0; }
  .auth-body { padding: 20px 20px 22px; }
  .auth-title { font-size: 1.2rem; }
}

/* ── 41. Credit Building ────────────────────────────────────── */
.credit-building-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.pay-cal-cell { aspect-ratio: 1; border-radius: var(--radius-sm); background: var(--gray-100); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: .7rem; font-weight: 600; }
.pay-cal-cell.paid     { background: var(--green-light); color: var(--green-dark); border-color: #86efac; }
.pay-cal-cell.missed   { background: var(--red-light);   color: var(--red-dark);   border-color: #fca5a5; }
.pay-cal-cell.upcoming { background: var(--gold-light);  color: var(--gold-dark);  border-color: #fde68a; }

/* ── 42. Scan History ───────────────────────────────────────── */
.scan-history-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.scan-history-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px 18px; box-shadow: var(--shadow-sm); transition: box-shadow var(--transition), transform var(--transition); }
.scan-history-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

/* ── 43. Dispute Detail ─────────────────────────────────────── */
.dispute-detail-grid { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }

/* ── 44. Portal ─────────────────────────────────────────────── */
.portal-shell { display: flex; flex-direction: column; min-height: 100vh; background: var(--gray-50); }
.portal-topbar { height: 80px; background: var(--brand-navy); display: flex; align-items: center; padding: 0 24px; gap: 12px; }
.portal-brand { font-size: .9rem; font-weight: 800; color: var(--on-dark); display: flex; align-items: center; gap: 8px; }
.portal-brand-mark { color: var(--gold); }
.portal-main { flex: 1; max-width: 860px; margin: 0 auto; padding: 28px 20px; width: 100%; }
.portal-footer { text-align: center; padding: 20px; font-size: .75rem; color: var(--gray-400); border-top: 1px solid var(--border); }

/* Portal progress steps */
.portal-steps { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; }
.portal-step { display: flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 600; color: var(--gray-400); }
.portal-step.active { color: var(--teal-dark); }
.portal-step.done   { color: var(--green-dark); }
.portal-step-num { width: 22px; height: 22px; border-radius: 50%; background: var(--gray-200); color: var(--gray-500); display: flex; align-items: center; justify-content: center; font-size: .65rem; font-weight: 800; }
.portal-step.active .portal-step-num { background: var(--teal); color: var(--on-dark); }
.portal-step.done .portal-step-num   { background: var(--green); color: var(--on-dark); }

/* ── 45. Utilities ──────────────────────────────────────────── */
.page-content  { }
.container     { max-width: 960px; margin: 0 auto; }
.divider       { border: none; border-top: 1px solid var(--border); margin: 20px 0; }
.d-none        { display: none !important; }
.d-flex        { display: flex !important; }
.gap-8         { gap: 8px; }
.gap-12        { gap: 12px; }
.mt-12         { margin-top: 12px; }
.mb-16         { margin-bottom: 16px; }
.fw-600        { font-weight: 600; }
.fw-700        { font-weight: 700; }

/* ── 46. Responsive ─────────────────────────────────────────── */
@media (max-width: 1200px) {
  .stats-grid-6 { grid-template-columns: repeat(3, 1fr); }
  .util-gauge-grid { grid-template-columns: repeat(2, 1fr); }
  .dispute-builder-layout { grid-template-columns: 1fr; }
  .dispute-builder-sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .scan-layout { grid-template-columns: 1fr; }
  .scan-sidebar { order: -1; }
  .scan-categories { display: grid; grid-template-columns: 1fr 1fr; }
  .overview-grid { grid-template-columns: 1fr; }
  .chart-card { grid-column: auto; }
  .settings-layout { grid-template-columns: 180px 1fr; }
  .reports-summary-grid { grid-template-columns: 1fr; }
}

@media (max-width: 960px) {
  .dash-main-grid { grid-template-columns: 1fr; }
  .dash-pipeline-card, .dash-score-wins-card, .dash-activity-card, .dash-scans-card { grid-column: 1; }
  .reports-hub-grid { grid-template-columns: 1fr; }
  .standards-layout { grid-template-columns: 1fr; }
  .systems-layout { grid-template-columns: 1fr; }
  .stats-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .client-detail-header { flex-direction: column; }
  .client-detail-actions { width: 100%; justify-content: flex-start; }
  .credit-building-layout { grid-template-columns: 1fr; }
  .dispute-detail-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  :root { --sidebar-w: 260px; }
  .sidebar { position: fixed; top: 0; left: 0; height: 100vh; transform: translateX(-100%); transition: transform var(--transition-md); z-index: 200; width: var(--sidebar-w) !important; }
  .sidebar.mobile-open { transform: translateX(0); box-shadow: var(--shadow-xl); }
  .sidebar-collapsed .sidebar { transform: translateX(-100%); }
  .sidebar-close-btn { display: flex; }
  .sidebar-collapse-btn { display: none; }
  /* Always show labels on mobile */
  .sidebar-collapsed .nav-label,
  .sidebar-collapsed .sidebar-user-info,
  .sidebar-collapsed .sidebar-brand-name,
  .sidebar-collapsed .nav-section-label { opacity: 1; max-width: none; }
  .hamburger-btn { display: flex; }
  .main-content { padding: 16px; }
  .stats-grid-6 { grid-template-columns: repeat(2, 1fr); }
  .stats-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .stats-grid-3 { grid-template-columns: 1fr 1fr; }
  .util-gauge-grid { grid-template-columns: 1fr 1fr; }
  .topbar { padding: 0 14px; }
  .topbar-user-info { display: none; }
  .page-header { flex-direction: column; align-items: flex-start; }
  .page-header-actions { width: 100%; }
  .dash-hero-content { flex-direction: column; }
  .dash-hero-quote { max-width: 100%; }
  .dash-hero-text h1 { font-size: 1.35rem; }
  .dash-quick-actions-bar { gap: 7px; }
  .dash-qa-btn { padding: 8px 12px; font-size: .78rem; }
  /* Keep real table layout (aligned columns); horizontal scroll lives on the
     wrapper (.table-scroll is auto-injected around unwrapped tables). */
  .data-table { font-size: .78rem; min-width: 560px; }
  .crm-table  { min-width: 640px; }
  .data-table th, .data-table td { padding: 9px 10px; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-input, .filter-select { width: 100%; min-width: auto; }
  .scan-categories { grid-template-columns: 1fr; }
  .dispute-builder-sidebar { grid-template-columns: 1fr; }
  .settings-layout { grid-template-columns: 1fr; }
  .settings-nav { flex-direction: row; flex-wrap: wrap; }
  .settings-nav-btn { flex: 1; min-width: 120px; }
  .letter-content { padding: 16px; }
  .letter-content pre { font-size: .75rem; }
  .report-hub-actions { flex-direction: column; }
  .tab-nav { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; scrollbar-width: none; }
  .tab-nav::-webkit-scrollbar { display: none; }
  .tab-btn { flex-shrink: 0; font-size: .76rem; padding: 8px 10px; }
  .modal-card { border-radius: var(--radius-lg); }
}

@media (max-width: 480px) {
  .stats-grid-4, .stats-grid-3 { grid-template-columns: 1fr; }
  .stats-grid-6 { grid-template-columns: 1fr 1fr; }
  .util-gauge-grid { grid-template-columns: 1fr; }
  .main-content { padding: 12px; }
  .card-body { padding: 14px; }
  .tradeline-grid, .supply-grid, .systems-grid, .help-grid { grid-template-columns: 1fr; }
  .btn-large { padding: 11px 20px; font-size: .88rem; }
}

/* Inline fixed grids → responsive collapse (overrides inline styles, which lack !important) */
@media (max-width: 768px) {
  [style*="grid-template-columns:repeat(3"],
  [style*="grid-template-columns:repeat(4"] { grid-template-columns: repeat(2, 1fr) !important; }
  [style*="grid-template-columns:1fr 1fr"],
  [style*="grid-template-columns:1fr 340px"] { grid-template-columns: 1fr !important; }
}
@media (max-width: 480px) {
  [style*="grid-template-columns:repeat(3"],
  [style*="grid-template-columns:repeat(4"] { grid-template-columns: 1fr !important; }
}

/* ── Module How-To Guide Modal ──────────────────────────────── */
.topbar-help-btn svg { color: var(--teal); }
.guide-modal { max-width: 520px; }
.guide-modal .modal-title { display: flex; align-items: center; gap: 8px; }
.guide-modal-icon { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: var(--radius-sm); background: var(--teal); color: #fff; flex-shrink: 0; }
.guide-modal-body { max-height: 70vh; overflow-y: auto; }
.guide-intro { font-size: .9rem; color: var(--gray-500, #475569); line-height: 1.55; margin-bottom: 18px; }
.guide-steps { list-style: none; counter-reset: guide; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.guide-steps li { counter-increment: guide; position: relative; padding-left: 38px; font-size: .88rem; color: var(--navy); line-height: 1.5; }
.guide-steps li::before { content: counter(guide); position: absolute; left: 0; top: -2px; width: 26px; height: 26px; border-radius: 50%; background: var(--gold); color: var(--navy); font-weight: 800; font-size: .8rem; display: flex; align-items: center; justify-content: center; }
.guide-tips { margin-top: 20px; padding: 14px 16px; border-radius: var(--radius-lg); background: var(--gold-light, #fef9ec); border: 1px solid var(--gold, #d4a843); }
.guide-tips-head { display: flex; align-items: center; gap: 7px; font-weight: 700; font-size: .82rem; color: var(--gold-dark, #9a7a1f); margin-bottom: 8px; }
.guide-tips ul { margin: 0; padding-left: 18px; }
.guide-tips li { font-size: .83rem; color: var(--navy); line-height: 1.5; margin-bottom: 5px; }
.guide-tips li:last-child { margin-bottom: 0; }

/* ── 47. Print ──────────────────────────────────────────────── */
@media print {
  .sidebar, .topbar, .flash-container, .page-header-actions { display: none !important; }
  .main-wrapper { margin: 0; }
  .card { box-shadow: none; border: 1px solid #ccc; }
  .letter-content { border: none; padding: 0; }
}

/* ══ SUPPLEMENTARY STYLES ═══════════════════════════════════════════════ */

/* ── Stats grid 5-column ─────────────────────────────────────────────── */
.stats-grid-5 { grid-template-columns: repeat(5, 1fr); }

/* ── Supply page layout ──────────────────────────────────────────────── */
.supply-page {}
.supply-stats { margin-bottom: 20px; }
.supply-layout { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; }
.supply-main { min-width: 0; }
.supply-sidebar { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 20px; }

/* ── Supply card view ────────────────────────────────────────────────── */
.supply-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.supply-sold-out { opacity: .65; }
.supply-on-hold { border-color: var(--gold) !important; }

/* ── Supply status badges ────────────────────────────────────────────── */
.supply-status-badge { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: var(--radius-full); font-size: .72rem; font-weight: 700; letter-spacing: .02em; }
.supply-status-badge.status-available { background: var(--green-light); color: var(--green-dark); }
.supply-status-badge.status-on-hold   { background: var(--gold-light);  color: var(--gold-dark); }
.supply-status-badge.status-sold-out  { background: var(--gray-100);    color: var(--gray-500); }

/* ── Supply card internals ───────────────────────────────────────────── */
.supply-badges { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 5px; }
.supply-price { text-align: right; flex-shrink: 0; }
.price-tag { display: block; font-size: 1.4rem; font-weight: 900; color: var(--gold-dark); line-height: 1.1; }
.price-label { font-size: .7rem; color: var(--gray-400); }
.supply-detail-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.detail-item { display: flex; flex-direction: column; gap: 2px; }
.detail-label { font-size: .68rem; font-weight: 600; color: var(--gray-400); text-transform: uppercase; letter-spacing: .04em; }
.detail-value { font-size: .84rem; font-weight: 700; color: var(--navy); }
.supply-notes { font-size: .78rem; color: var(--gray-500); font-style: italic; margin: 8px 0 12px; padding: 8px 10px; background: var(--gray-50); border-radius: var(--radius-sm); border-left: 3px solid var(--border); }
.supply-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 12px; border-top: 1px solid var(--gray-100); flex-wrap: wrap; }
.supply-actions-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.date-added { font-size: .72rem; color: var(--gray-400); white-space: nowrap; }

/* ── Bureau badge ────────────────────────────────────────────────────── */
.bureau-badge { display: inline-flex; align-items: center; justify-content: center; padding: 2px 7px; background: #eff6ff; color: #1d4ed8; border-radius: var(--radius-sm); font-size: .68rem; font-weight: 700; letter-spacing: .03em; border: 1px solid #bfdbfe; }

/* ── Badge count (inline heading pill) ───────────────────────────────── */
.badge-count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px; background: var(--gray-100); color: var(--gray-600); border-radius: var(--radius-full); font-size: .72rem; font-weight: 700; margin-left: 6px; vertical-align: middle; }

/* ── AJAX spot controls ──────────────────────────────────────────────── */
.ajax-spots-row { display: flex; align-items: center; gap: 6px; }
.inline-label { font-size: .78rem; color: var(--gray-500); font-weight: 600; }
.inline-input { width: 60px; padding: 5px 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: .83rem; font-family: inherit; background: var(--white); color: var(--navy); }
.inline-input:focus { outline: none; border-color: var(--teal); }
.inline-select { padding: 5px 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: .78rem; font-family: inherit; background: var(--white); color: var(--navy); cursor: pointer; }
.inline-select:focus { outline: none; border-color: var(--teal); }
.inline-form { display: inline-flex; align-items: center; gap: 6px; }
.ajax-feedback { font-size: .75rem; font-weight: 600; color: var(--green-dark); min-width: 30px; }
.ajax-feedback.error { color: var(--red); }

/* ── Supply sidebar widgets ──────────────────────────────────────────── */
.widget-title { display: flex; align-items: center; gap: 8px; font-size: .9rem; font-weight: 800; color: var(--navy); margin: 0 0 6px; }
.widget-desc { font-size: .78rem; color: var(--gray-500); margin: 6px 0; line-height: 1.5; }

/* ── Price calculator result ─────────────────────────────────────────── */
.price-result-box { margin-top: 14px; padding: 14px; background: linear-gradient(135deg, rgba(212,175,55,.07), rgba(29,53,87,.05)); border: 1px solid var(--gold-light); border-radius: var(--radius-md); }
.price-result-box.hidden { display: none; }
.price-result-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.price-result-label { font-size: .75rem; font-weight: 600; color: var(--gray-500); }
.price-result-val { font-size: 1.35rem; font-weight: 900; color: var(--gold-dark); }
.price-result-range { font-size: .75rem; color: var(--gray-500); margin-bottom: 8px; }
.price-result-note { font-size: .72rem; color: var(--gray-400); font-style: italic; line-height: 1.45; margin: 0; }

/* ── Form sections (supply add form) ─────────────────────────────────── */
.form-section { background: var(--gray-50); border: 1px solid var(--gray-100); border-radius: var(--radius-md); padding: 16px; margin-bottom: 16px; }
.form-section-title { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--gray-400); margin: 0 0 12px; }
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.full-width { grid-column: 1 / -1; }

/* ── Checkbox group ──────────────────────────────────────────────────── */
.checkbox-group { display: flex; flex-wrap: wrap; gap: 10px; padding: 10px 0 2px; }

/* ── Supply listings section ─────────────────────────────────────────── */
.supply-listings { margin-top: 20px; }
.supply-listings-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 10px; }

/* ── Utility ─────────────────────────────────────────────────────────── */
.hidden { display: none !important; }
.empty-hint { font-size: .78rem; color: var(--gray-400); margin-top: 4px; }
.section-title { font-size: 1rem; font-weight: 800; color: var(--navy); margin: 0 0 16px; }

/* ── Supply page responsive ──────────────────────────────────────────── */
@media (max-width: 1100px) {
  .supply-layout { grid-template-columns: 1fr; }
  .supply-sidebar { position: static; }
  .stats-grid-5 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .supply-cards { grid-template-columns: 1fr; }
  .supply-detail-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid-5 { grid-template-columns: repeat(2, 1fr); }
  .supply-card-footer { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
  .stats-grid-5 { grid-template-columns: 1fr 1fr; }
}

/* ══ FINAL SUPPLEMENTARY STYLES ═══════════════════════════════════════ */

/* ── Page wrappers (namespace classes) ───────────────────────────────── */
.crm-page {}
.dispute-page {}
.standards-page {}

/* ── CRM table ───────────────────────────────────────────────────────── */
.crm-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.crm-table thead th { background: var(--brand-navy); color: var(--on-dark); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 11px 14px; white-space: nowrap; }
.crm-table tbody tr { border-bottom: 1px solid var(--border); transition: background var(--transition); }
.crm-table tbody tr:hover { background: var(--gray-50); }
.crm-table tbody tr:last-child { border-bottom: none; }
.crm-table tbody td { padding: 12px 14px; vertical-align: middle; }
.client-row {}

/* ── Scan page columns ───────────────────────────────────────────────── */
.scan-main {}
.scan-sidebar { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 20px; }

/* ── Dispute status badge ─────────────────────────────────────────────── */
.dispute-status-badge { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: var(--radius-full); font-size: .72rem; font-weight: 700; background: var(--gray-100); color: var(--gray-600); }

/* ── Client detail tabs shell ─────────────────────────────────────────── */
.client-tabs-shell { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: var(--shadow-sm); overflow: hidden; }

/* ── Activity timeline ────────────────────────────────────────────────── */
.activity-timeline { display: flex; flex-direction: column; padding: 16px 20px; }

/* ── Document list items ──────────────────────────────────────────────── */
.document-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--gray-100); }
.document-item:last-child { border-bottom: none; }
.doc-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.document-upload-card { border: 2px dashed var(--border); border-radius: var(--radius-lg); padding: 28px 20px; text-align: center; background: var(--gray-50); transition: border-color var(--transition), background var(--transition); cursor: pointer; }
.document-upload-card:hover { border-color: var(--teal); background: var(--teal-light); }
.document-upload-card p { font-size: .82rem; color: var(--gray-500); margin: 8px 0 14px; line-height: 1.5; }

/* ── Standards columns ────────────────────────────────────────────────── */
.standards-list-col {}
.standards-form-col {}
.standard-form { display: flex; flex-direction: column; gap: 12px; }

/* ── Frequency badge (standalone, not system-specific) ───────────────── */
.frequency-badge { font-size: .68rem; font-weight: 700; padding: 3px 8px; border-radius: var(--radius-full); white-space: nowrap; background: var(--teal-light); color: var(--teal-dark); }

/* ══════════════════════════════════════════════════════════════════
   LANDING PAGE STYLES  (lp-*)
   Patriotic aesthetic: clean white, deep navy hero, red & blue accents
   ══════════════════════════════════════════════════════════════════ */

/* ── Reset / base ─────────────────────────────────────────────────── */
.landing-body {
  margin: 0; padding: 0;
  font-family: 'Inter', sans-serif;
  background: #fff;
  color: #1e293b;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
.landing-body *, .landing-body *::before, .landing-body *::after { box-sizing: border-box; }

/* ── Header / Nav ─────────────────────────────────────────────────── */
.lp-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(15,23,42,.08);
  transition: box-shadow .25s ease;
}
.lp-header.scrolled { box-shadow: 0 2px 20px rgba(15,23,42,.12); }
.lp-header-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 32px;
  height: 104px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.lp-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.lp-logo-mark {
  font-size: 1.4rem; color: #d4af37; line-height: 1;
  text-shadow: 0 0 20px rgba(212,175,55,.4);
}
.lp-logo-text {
  font-size: 1.25rem; font-weight: 800; color: #0f172a; letter-spacing: -.02em;
}
.lp-nav {
  display: flex; align-items: center; gap: 6px;
}
.lp-nav-link {
  text-decoration: none; color: #475569; font-size: .88rem; font-weight: 500;
  padding: 8px 14px; border-radius: 8px;
  transition: color .18s, background .18s;
}
.lp-nav-link:hover { color: #0f172a; background: #f1f5f9; }
.lp-nav-cta {
  text-decoration: none;
  background: linear-gradient(135deg, #d4af37, #b8860b);
  color: #0a1640; font-size: .88rem; font-weight: 700;
  padding: 9px 20px; border-radius: 8px;
  transition: box-shadow .2s, transform .18s;
  box-shadow: 0 2px 8px rgba(212,175,55,.35);
  margin-left: 8px;
}
.lp-nav-cta:hover { box-shadow: 0 4px 16px rgba(212,175,55,.5); transform: translateY(-1px); }

/* ── Hamburger ───────────────────────────────────────────────────── */
.lp-hamburger {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 38px; height: 38px; padding: 6px;
  background: none; border: none; cursor: pointer; border-radius: 8px;
}
.lp-hamburger span {
  display: block; height: 2px; background: #0f172a; border-radius: 2px;
  transition: transform .25s, opacity .2s, width .2s;
}
.lp-hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.lp-hamburger.active span:nth-child(2) { opacity: 0; }
.lp-hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Hero ────────────────────────────────────────────────────────── */
.lp-hero {
  min-height: 100vh;
  display: flex; align-items: center;
  position: relative; overflow: hidden;
  background: #0a1640;
  padding-top: 104px;
}
.lp-hero::before {
  content: '';
  position: absolute; top: 0; right: -10%; width: 65%; height: 120%;
  background: linear-gradient(135deg, #14275e 0%, #0a1640 50%);
  clip-path: polygon(15% 0, 100% 0, 100% 100%, 0% 100%);
  z-index: 0;
}
.lp-hero::after {
  content: '';
  position: absolute; top: -20%; right: 5%; width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(212,175,55,.18) 0%, transparent 70%);
  z-index: 0; pointer-events: none;
}
/* video bg */
.lp-hero-video-wrap {
  position: absolute; inset: 0; z-index: 0; overflow: hidden;
  background: #0a1640 url('images/hero-bg.png') center center / cover no-repeat;
}
.lp-hero-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover; object-position: center; z-index: 0;
  display: block;
}
.lp-hero-gradient {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(135deg, rgba(10,22,64,.85) 0%, rgba(10,22,64,.62) 100%);
}
.lp-hero-content {
  position: relative; z-index: 2;
  max-width: 1200px; margin: 0 auto; padding: 80px 32px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center;
}
.lp-hero-badge {
  display: inline-block;
  background: rgba(212,175,55,.15); border: 1px solid rgba(212,175,55,.4);
  color: #e8c766; font-size: .75rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  padding: 5px 14px; border-radius: 100px; margin-bottom: 20px;
}
.lp-hero-headline {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 900; color: #fff; line-height: 1.1;
  letter-spacing: -.03em; margin: 0 0 20px;
}
.lp-gold { color: #e8c766; }
.lp-hero-sub {
  font-size: 1.05rem; color: rgba(255,255,255,.72); line-height: 1.7;
  margin: 0 0 32px; max-width: 540px;
}
.lp-hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 36px; }
.lp-btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, #d4af37, #b8860b);
  color: #0a1640; font-weight: 700; font-size: .95rem;
  padding: 14px 28px; border-radius: 10px; text-decoration: none;
  box-shadow: 0 4px 18px rgba(212,175,55,.4);
  transition: transform .2s, box-shadow .2s;
}
.lp-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(212,175,55,.55); }
.lp-btn-primary.lp-btn-large { font-size: 1.05rem; padding: 16px 36px; }
.lp-btn-outline {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1.5px solid rgba(255,255,255,.35); color: rgba(255,255,255,.85);
  font-weight: 600; font-size: .95rem;
  padding: 14px 28px; border-radius: 10px; text-decoration: none;
  transition: border-color .2s, color .2s, background .2s;
}
.lp-btn-outline:hover { border-color: #4d7fff; color: #4d7fff; }
.lp-hero-trust {
  display: flex; flex-wrap: wrap; gap: 16px;
}
.lp-trust-item {
  font-size: .78rem; font-weight: 600; color: rgba(255,255,255,.6);
  display: flex; align-items: center; gap: 6px;
}
.lp-trust-item::before { content: '✓'; color: #4ade80; font-weight: 800; }

/* hero right side — visual card */
.lp-hero-visual {
  display: flex; flex-direction: column; gap: 16px; align-items: flex-end;
}
.lp-hero-card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px; padding: 20px 24px; width: 100%;
  backdrop-filter: blur(10px);
}
.lp-hero-card-title {
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: #e8c766; margin-bottom: 12px;
}
.lp-metric-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.07);
}
.lp-metric-row:last-child { border-bottom: none; }
.lp-metric-label { font-size: .8rem; color: rgba(255,255,255,.65); }
.lp-metric-val { font-size: .92rem; font-weight: 700; color: #fff; }
.lp-metric-val.good { color: #4ade80; }
.lp-metric-val.warn { color: #fbbf24; }
.lp-metric-val.gold { color: #e8c766; }

/* scroll hint */
.lp-hero-scroll-hint {
  position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%); z-index: 2;
}
.lp-scroll-dot {
  width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.4);
  animation: scrollBounce 1.8s ease-in-out infinite;
}
@keyframes scrollBounce { 0%,100%{transform:translateY(0);opacity:.4} 50%{transform:translateY(8px);opacity:.9} }

/* ── Stats strip ─────────────────────────────────────────────────── */
.lp-stats-strip {
  background: #fff; border-bottom: 1px solid #e2e8f0;
  padding: 28px 0;
}
.lp-stats-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 32px;
  display: flex; align-items: center; justify-content: space-around;
  flex-wrap: wrap; gap: 20px;
}
.lp-stat { text-align: center; }
.lp-stat-num {
  display: block; font-size: 2rem; font-weight: 900;
  color: #0f172a; letter-spacing: -.03em; line-height: 1;
}
.lp-stat-label {
  display: block; font-size: .75rem; font-weight: 600;
  color: #64748b; text-transform: uppercase; letter-spacing: .06em; margin-top: 4px;
}
.lp-stat-divider {
  width: 1px; height: 40px; background: #e2e8f0;
}

/* ── Section shared ──────────────────────────────────────────────── */
.lp-section-inner { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.lp-section-label {
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: #d4af37; margin-bottom: 10px; display: block;
}
.lp-label-light { color: rgba(212,175,55,.9); }
.lp-section-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 900;
  color: #0f172a; letter-spacing: -.03em; margin: 0 0 14px; line-height: 1.15;
}
.lp-title-light { color: #fff; }
.lp-section-sub {
  font-size: 1.05rem; color: #64748b; line-height: 1.65;
  max-width: 600px; margin: 0 0 48px;
}
.lp-section-sub.centered { text-align: center; margin-left: auto; margin-right: auto; }

/* ── Features section ────────────────────────────────────────────── */
.lp-features {
  padding: 96px 0;
  background: #f8fafc;
}
.lp-features .lp-section-inner > .lp-section-label,
.lp-features .lp-section-inner > .lp-section-title,
.lp-features .lp-section-inner > .lp-section-sub { text-align: center; margin-left: auto; margin-right: auto; }

.lp-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.lp-feature-card {
  background: #fff; border: 1px solid #e2e8f0;
  border-radius: 16px; padding: 32px 28px;
  transition: box-shadow .25s, transform .22s, border-color .22s;
  position: relative; overflow: hidden;
}
.lp-feature-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #d4af37, #1d3557);
  opacity: 0; transition: opacity .22s;
}
.lp-feature-card:hover { box-shadow: 0 12px 40px rgba(15,23,42,.1); transform: translateY(-4px); border-color: transparent; }
.lp-feature-card:hover::before { opacity: 1; }
.lp-feature-highlight {
  background: linear-gradient(135deg, #0a1640 0%, #14275e 100%);
  border-color: transparent;
  grid-row: span 1;
}
.lp-feature-highlight h3 { color: #fff; }
.lp-feature-highlight p { color: rgba(255,255,255,.7); }
.lp-feature-highlight .lp-feature-list li { color: rgba(255,255,255,.65); }
.lp-feature-highlight .lp-feature-list li::before { color: #e8c766; }
.lp-feature-highlight::before { opacity: 1; }
.lp-feature-icon {
  width: 52px; height: 52px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.lp-feature-icon svg { width: 24px; height: 24px; }
.lp-icon-ai       { background: rgba(29,53,87,.12); color: #1d3557; }
.lp-icon-dispute  { background: rgba(212,175,55,.12); color: #d4af37; }
.lp-icon-metro    { background: rgba(34,197,94,.12); color: #16a34a; }
.lp-icon-crm      { background: rgba(139,92,246,.12); color: #7c3aed; }
.lp-icon-tradeline{ background: rgba(29,53,87,.1); color: #1d3557; }
.lp-icon-rbac     { background: rgba(212,175,55,.08); color: #d4af37; }
.lp-feature-highlight .lp-feature-icon { background: rgba(212,175,55,.2); color: #e8c766; }
.lp-feature-card h3 {
  font-size: 1.05rem; font-weight: 800; color: #0f172a;
  margin: 0 0 10px; letter-spacing: -.01em;
}
.lp-feature-card p {
  font-size: .85rem; color: #64748b; line-height: 1.65; margin: 0 0 16px;
}
.lp-feature-list { margin: 0; padding: 0; list-style: none; }
.lp-feature-list li {
  font-size: .8rem; color: #475569; padding: 4px 0;
  display: flex; align-items: center; gap: 8px;
}
.lp-feature-list li::before { content: '→'; color: #1d3557; font-weight: 800; flex-shrink: 0; }

/* ── Industries ──────────────────────────────────────────────────── */
.lp-industries { padding: 96px 0; background: #fff; }
.lp-industries .lp-section-inner > .lp-section-label,
.lp-industries .lp-section-inner > .lp-section-title { text-align: center; }
.lp-industry-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 48px;
}
.lp-industry-card {
  padding: 28px 24px; border: 1px solid #e2e8f0; border-radius: 14px;
  background: #fff; transition: box-shadow .22s, transform .2s, border-color .2s;
  text-align: center;
}
.lp-industry-card:hover { box-shadow: 0 8px 30px rgba(15,23,42,.08); transform: translateY(-3px); border-color: #d4af37; }
.lp-industry-icon { font-size: 2.2rem; margin-bottom: 14px; display: block; }
.lp-industry-card h4 { font-size: .97rem; font-weight: 800; color: #0f172a; margin: 0 0 8px; }
.lp-industry-card p { font-size: .82rem; color: #64748b; line-height: 1.6; margin: 0; }

/* ── CROA Compliance section ─────────────────────────────────────── */
.lp-croa {
  padding: 96px 0;
  background: #0a1640;
  position: relative; overflow: hidden;
}
.lp-croa::before {
  content: '';
  position: absolute; top: 0; right: 0; width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(212,175,55,.1) 0%, transparent 65%);
  pointer-events: none;
}
.lp-croa-inner {
  display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start;
}
.lp-croa-left {}
.lp-croa-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(239,68,68,.15); border: 1px solid rgba(239,68,68,.35);
  color: #fca5a5; font-size: .72rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  padding: 5px 14px; border-radius: 100px; margin-bottom: 20px;
}
.lp-croa h2 {
  font-size: clamp(1.6rem, 2.5vw, 2.1rem); font-weight: 900;
  color: #fff; letter-spacing: -.03em; line-height: 1.2;
  margin: 0 0 16px;
}
.lp-croa-sub {
  font-size: .92rem; color: rgba(255,255,255,.6); line-height: 1.7; margin-bottom: 32px;
}
.lp-croa-rights {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px; padding: 24px;
}
.lp-croa-rights h4 {
  font-size: .78rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: #e8c766; margin: 0 0 16px;
}
.lp-croa-right-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.06);
}
.lp-croa-right-item:last-child { border-bottom: none; }
.lp-croa-bullet {
  width: 20px; height: 20px; border-radius: 50%;
  background: rgba(212,175,55,.2); color: #e8c766;
  font-size: .68rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 1px;
}
.lp-croa-right-item strong { font-size: .84rem; color: #fff; display: block; margin-bottom: 3px; }
.lp-croa-right-item span { font-size: .78rem; color: rgba(255,255,255,.55); line-height: 1.5; }

.lp-croa-cards { display: flex; flex-direction: column; gap: 16px; }
.lp-croa-card {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px; padding: 22px 24px;
  transition: background .2s, border-color .2s;
}
.lp-croa-card:hover { background: rgba(255,255,255,.09); border-color: rgba(212,175,55,.3); }
.lp-croa-card-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
}
.lp-croa-card h4 { font-size: .9rem; font-weight: 800; color: #fff; margin: 0 0 6px; }
.lp-croa-card p { font-size: .8rem; color: rgba(255,255,255,.6); line-height: 1.6; margin: 0; }
.croa-icon-cancel  { background: rgba(239,68,68,.2); color: #f87171; }
.croa-icon-contract{ background: rgba(212,175,55,.2); color: #e8c766; }
.croa-icon-nocharge{ background: rgba(34,197,94,.15); color: #4ade80; }
.croa-icon-rights  { background: rgba(29,53,87,.15); color: #6b9fff; }

/* ── Compliance / FCRA section ───────────────────────────────────── */
.lp-compliance { padding: 96px 0; background: #f8fafc; }
.lp-compliance-inner {
  display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center;
}
.lp-compliance-desc {
  font-size: .9rem; color: #475569; line-height: 1.7; margin: 0 0 28px;
}
.lp-compliance-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 14px; }
.lp-compliance-list li {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 14px 16px; background: #fff; border-radius: 10px;
  border: 1px solid #e2e8f0; transition: border-color .2s;
}
.lp-compliance-list li:hover { border-color: #d4af37; }
.lp-check {
  width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #d4af37, #b8860b); color: #0a1640;
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 900;
}
.lp-compliance-list li > div strong { font-size: .84rem; color: #0f172a; display: block; margin-bottom: 2px; }
.lp-compliance-list li > div span  { font-size: .78rem; color: #64748b; line-height: 1.5; }

/* compliance visual (letter mock-up) */
.lp-compliance-visual {
  display: flex; align-items: center; justify-content: center;
}
.lp-compliance-card {
  width: 100%; max-width: 360px;
  background: #fff; border-radius: 16px; overflow: hidden;
  box-shadow: 0 20px 60px rgba(15,23,42,.15);
  border: 1px solid #e2e8f0;
}
.lp-cc-header {
  background: #0a1640; color: #e8c766;
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; padding: 12px 20px;
}
.lp-cc-body { padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.lp-cc-line { height: 8px; background: #e2e8f0; border-radius: 4px; }
.lp-cc-line-sm { height: 6px; }
.lp-cc-short { width: 60%; }
.lp-cc-spacer { height: 6px; }
.lp-cc-highlight {
  background: rgba(212,175,55,.08); border: 1px solid rgba(212,175,55,.25);
  border-radius: 8px; padding: 10px 12px;
  font-size: .73rem; color: #b8860b; font-weight: 600; line-height: 1.5;
}
.lp-cc-line-gold { background: rgba(212,175,55,.3); }
.lp-cc-badge {
  margin: 0 20px 20px;
  background: rgba(34,197,94,.1); border: 1px solid rgba(34,197,94,.3);
  color: #15803d; font-size: .72rem; font-weight: 700;
  padding: 6px 12px; border-radius: 100px; display: inline-block;
}

/* ── Testimonials ────────────────────────────────────────────────── */
.lp-testimonials { padding: 96px 0; background: #fff; }
.lp-testimonials .lp-section-inner > .lp-section-label,
.lp-testimonials .lp-section-inner > .lp-section-title { text-align: center; }
.lp-testimonial-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 24px; margin-top: 48px;
}
.lp-testimonial-card {
  background: #f8fafc; border: 1px solid #e2e8f0;
  border-radius: 16px; padding: 28px 24px;
  transition: box-shadow .22s, transform .2s;
}
.lp-testimonial-card:hover { box-shadow: 0 10px 32px rgba(15,23,42,.08); transform: translateY(-3px); }
.lp-stars { color: #d4af37; font-size: 1.05rem; letter-spacing: 2px; margin-bottom: 14px; }
.lp-testimonial-text {
  font-size: .88rem; color: #334155; line-height: 1.7;
  margin: 0 0 20px; font-style: italic;
}
.lp-testimonial-author { display: flex; align-items: center; gap: 12px; }
.lp-author-avatar {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #0a1640, #14275e);
  color: #e8c766; font-weight: 800; font-size: .88rem;
  display: flex; align-items: center; justify-content: center;
}
.lp-testimonial-author strong { font-size: .84rem; color: #0f172a; display: block; }
.lp-testimonial-author span { font-size: .75rem; color: #64748b; }

/* ── CTA banner ──────────────────────────────────────────────────── */
.lp-cta { padding: 80px 0; background: #0a1640; }
.lp-cta-inner { text-align: center; }
.lp-cta-title {
  font-size: clamp(1.7rem, 3vw, 2.5rem); font-weight: 900;
  color: #fff; letter-spacing: -.03em; margin: 0 0 14px; line-height: 1.15;
}
.lp-cta-sub {
  font-size: 1rem; color: rgba(255,255,255,.65); margin: 0 auto 32px;
  max-width: 560px; line-height: 1.65;
}

/* ── Footer ──────────────────────────────────────────────────────── */
.lp-footer { background: #07112e; padding: 56px 0 0; }
.lp-footer-inner { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.lp-footer-top {
  display: grid; grid-template-columns: 260px 1fr; gap: 48px;
  padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,.08);
}
.lp-footer-brand .lp-logo-text { color: #fff; }
.lp-footer-tagline { font-size: .78rem; color: rgba(255,255,255,.4); margin: 6px 0 0; }
.lp-footer-links { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.lp-footer-col h5 {
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: rgba(255,255,255,.5); margin: 0 0 14px;
}
.lp-footer-col a {
  display: block; text-decoration: none; font-size: .83rem;
  color: rgba(255,255,255,.55); margin-bottom: 8px; transition: color .18s;
}
.lp-footer-col a:hover { color: #e8c766; }
.lp-footer-bottom { padding: 24px 0; }
.lp-footer-disclaimer {
  font-size: .72rem; color: rgba(255,255,255,.35); line-height: 1.7;
  margin: 0 0 10px; padding: 16px; background: rgba(255,255,255,.03);
  border-radius: 8px; border: 1px solid rgba(255,255,255,.06);
}
.lp-footer-copy { font-size: .74rem; color: rgba(255,255,255,.3); margin: 0; }

/* ── Landing responsive ──────────────────────────────────────────── */
@media (max-width: 960px) {
  .lp-hero-content { grid-template-columns: 1fr; gap: 40px; padding: 60px 24px; }
  .lp-hero-visual { align-items: stretch; }
  .lp-feature-grid { grid-template-columns: 1fr 1fr; }
  .lp-compliance-inner, .lp-croa-inner { grid-template-columns: 1fr; gap: 40px; }
  .lp-compliance-visual { order: -1; }
  .lp-testimonial-grid { grid-template-columns: 1fr 1fr; }
  .lp-footer-top { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 768px) {
  .lp-header-inner { padding: 0 20px; }
  .lp-nav { display: none; flex-direction: column; position: absolute; top: 104px; left: 0; right: 0; background: #fff; border-bottom: 1px solid #e2e8f0; padding: 16px 20px; gap: 4px; box-shadow: 0 8px 20px rgba(15,23,42,.12); }
  .lp-nav.lp-nav-open { display: flex; }
  .lp-hamburger { display: flex; }
  .lp-hero { min-height: 70vh; }
  .lp-hero-video-wrap { background: #0a1640; top: 104px; }
  .lp-hero-video { display: block; object-fit: contain; object-position: top center; }
  .lp-hero-content { padding: 48px 20px; }
  .lp-feature-grid { grid-template-columns: 1fr; }
  .lp-industry-grid { grid-template-columns: 1fr 1fr; }
  .lp-testimonial-grid { grid-template-columns: 1fr; }
  .lp-section-inner { padding: 0 20px; }
  .lp-features, .lp-industries, .lp-compliance, .lp-croa, .lp-testimonials, .lp-cta { padding: 64px 0; }
  .lp-footer-links { grid-template-columns: 1fr 1fr; }
  .lp-stats-inner { gap: 12px; }
  .lp-stat-num { font-size: 1.5rem; }
  .lp-croa-cards { gap: 12px; }
}
@media (max-width: 480px) {
  .lp-industry-grid { grid-template-columns: 1fr; }
  .lp-footer-links { grid-template-columns: 1fr; }
  .lp-hero-headline { font-size: 1.8rem; }
}

/* ── Dashboard Snapshot Bar ──────────────────────────────────── */
.dash-snapshot-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.dash-snapshot-item {
  display: flex; flex-direction: column; gap: 4px;
  padding: 14px 16px; border-radius: 12px;
  border: 1px solid transparent; position: relative;
}
.dash-snapshot-item.snap-ok     { background: #f0fdf4; border-color: #bbf7d0; }
.dash-snapshot-item.snap-warn   { background: #fffbeb; border-color: #fde68a; }
.dash-snapshot-item.snap-danger { background: #fff1f2; border-color: #fecdd3; }
.dash-snapshot-item.snap-info   { background: #f0f9ff; border-color: #bae6fd; }
.snap-icon { font-size: 1.2rem; line-height: 1; margin-bottom: 2px; }
.snap-body { display: flex; flex-direction: column; gap: 2px; }
.snap-val  { font-size: 1.4rem; font-weight: 900; color: var(--navy); line-height: 1; }
.snap-label{ font-size: .72rem; font-weight: 600; color: var(--gray-500); text-transform: uppercase; letter-spacing: .04em; }
.dash-snapshot-item.snap-danger .snap-val { color: var(--red-dark); }
.dash-snapshot-item.snap-warn .snap-val   { color: #92400e; }
.snap-detail {
  font-size: .75rem; color: var(--gray-500); line-height: 1.4;
  margin-top: 4px;
}
.snap-detail a { color: var(--navy); font-weight: 600; text-decoration: none; }
.snap-detail a:hover { text-decoration: underline; }
.snap-date { color: var(--gray-400); font-size: .72rem; }

/* ── Admin stats colors ──────────────────────────────────────── */
.stat-green { color: #16a34a !important; }
.stat-red   { color: #dc2626 !important; }

/* ── Invoice status badges ───────────────────────────────────── */
.badge-paid      { background: #dcfce7; color: #15803d; }
.badge-sent      { background: #eff6ff; color: #1d4ed8; }
.badge-overdue   { background: #fee2e2; color: #b91c1c; }
.badge-cancelled { background: #f1f5f9; color: #64748b; }
.badge-danger    { background: #fee2e2; color: #b91c1c; }
.badge-warning   { background: #fef3c7; color: #92400e; }
.badge-success   { background: #dcfce7; color: #15803d; }
.badge-info      { background: #e0f2fe; color: #0b1d3a; }

/* ── Page title ──────────────────────────────────────────────── */
.page-title { font-size: 1.55rem; font-weight: 800; color: var(--navy); margin-bottom: 4px; line-height: 1.25; }

/* ── Stats row (horizontal flex stat strip) ──────────────────── */
.stats-row {
  display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 20px;
}
.stats-row .stat-card {
  flex: 1; min-width: 140px;
  display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 16px 12px;
}
.stats-row .stat-value { font-size: 1.5rem; font-weight: 800; color: var(--navy); display: block; line-height: 1.1; }
.stats-row .stat-label { font-size: .72rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--gray-400); display: block; margin-top: 4px; }

/* ── Empty icon ──────────────────────────────────────────────── */
.empty-icon { font-size: 2.5rem; margin-bottom: 12px; display: flex; align-items: center; justify-content: center; color: var(--gray-300); }

/* ── btn-sm (alias for btn-small) ───────────────────────────── */
.btn-sm { padding: 7px 14px; font-size: .8rem; border-radius: var(--radius-sm); }

/* ── Feature cards (dashboard) ───────────────────────────────── */
.dash-feature-section { margin-bottom: 24px; }
.dash-feature-section-title { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--gray-400); margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.dash-feature-section-title::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.dash-feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.dash-feature-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-md), transform var(--transition-md), border-color var(--transition-md);
  text-decoration: none; display: flex; flex-direction: column;
}
.dash-feature-card:hover {
  box-shadow: var(--shadow-lg); transform: translateY(-3px); border-color: transparent;
  color: inherit;
}
.dash-feature-img-wrap {
  position: relative; overflow: hidden; height: 120px;
}
.dash-feature-img-wrap img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .4s ease;
}
.dash-feature-card:hover .dash-feature-img-wrap img { transform: scale(1.05); }
.dash-feature-img-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(15,23,42,.6) 100%);
}
.dash-feature-body { padding: 14px 16px; flex: 1; display: flex; flex-direction: column; }
.dash-feature-title { font-size: .88rem; font-weight: 700; color: var(--navy); margin-bottom: 5px; }
.dash-feature-desc { font-size: .77rem; color: var(--gray-500); line-height: 1.55; flex: 1; }
.dash-feature-link {
  display: inline-flex; align-items: center; gap: 4px;
  margin-top: 10px; font-size: .78rem; font-weight: 600;
  color: var(--teal-dark); text-decoration: none;
}
.dash-feature-link svg { transition: transform var(--transition); }
.dash-feature-card:hover .dash-feature-link svg { transform: translateX(3px); }

/* ── Responsive: feature grid ───────────────────────────────── */
@media (max-width: 1100px) {
  .dash-feature-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .dash-feature-grid { grid-template-columns: 1fr; }
  .stats-row .stat-card { min-width: 120px; }
}

/* ── Hardcoded accent overrides for landing page (CSD red) ────── */
.lp-gold, .lp-logo-mark, .lp-section-label, .lp-label-light { color: #d4af37; }
.lp-nav-cta,
.lp-btn-primary,
.lp-feature-card::before { background: linear-gradient(135deg, #d4af37, #b8860b); }
.lp-nav-cta { box-shadow: 0 2px 8px rgba(212,175,55,.35); }
.lp-btn-primary { box-shadow: 0 4px 18px rgba(212,175,55,.35); }
.lp-nav-cta:hover { box-shadow: 0 4px 16px rgba(212,175,55,.5); }
.lp-btn-primary:hover { box-shadow: 0 8px 28px rgba(212,175,55,.5); }
.lp-hero-badge { background: rgba(212,175,55,.15); border-color: rgba(212,175,55,.4); color: #d4af37; }
.lp-hero::after { background: radial-gradient(circle, rgba(212,175,55,.15) 0%, transparent 70%); }
.lp-hero-card-title { color: #d4af37; }
.lp-metric-val.gold { color: #d4af37; }
.scan-powered-badge {
  background: linear-gradient(135deg, rgba(212,175,55,.10), rgba(29,53,87,.08));
  border-color: rgba(212,175,55,.25);
  color: var(--gold-dark);
}
.price-result-box { border-color: var(--gold-light); background: linear-gradient(135deg, rgba(212,175,55,.07), rgba(29,53,87,.05)); }

/* ── Invoice tab (client detail) ─────────────────────────────── */
.badge-draft { background: var(--gray-100); color: var(--gray-600); }

.invoice-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.invoice-stat { padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.invoice-stat-label { font-size: .7rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--gray-400); }
.invoice-stat-value { font-size: 1.4rem; font-weight: 800; color: var(--navy); line-height: 1.1; }

.invoice-create-card { margin-bottom: 20px; }
.croa-note {
  display: flex; align-items: flex-start; gap: 9px;
  margin: 0 0 16px; padding: 11px 14px;
  background: rgba(29,53,87,.07); border: 1px solid rgba(29,53,87,.2);
  border-radius: var(--radius-md); font-size: .8rem; color: var(--gray-600); line-height: 1.5;
}
.croa-note svg { color: var(--teal-dark); flex-shrink: 0; margin-top: 1px; }

.table-scroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.invoice-row-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }

.text-xs { font-size: .7rem; }

@media (max-width: 768px) {
  .invoice-stats { grid-template-columns: 1fr; }
  .invoice-row-actions { justify-content: flex-start; }
}

/* ═══ Myuwe-style landing refinements — vivid red / white / blue ═══ */
.lp-topbar {
  background: linear-gradient(90deg, #0b1d3a 0%, #1d3557 100%);
  color: #fff; overflow: hidden;
  transition: max-height .3s ease, opacity .3s ease;
  max-height: 60px;
}
.lp-topbar-inner {
  max-width: 1200px; margin: 0 auto; padding: 7px 32px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.lp-topbar-tags { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lp-topbar-tag { font-size: .72rem; font-weight: 600; letter-spacing: .03em; color: rgba(255,255,255,.92); }
.lp-topbar-dot { color: rgba(255,255,255,.45); font-size: .7rem; }
.lp-topbar-right { display: flex; align-items: center; gap: 16px; }
.lp-topbar-link { font-size: .74rem; font-weight: 600; color: rgba(255,255,255,.9); text-decoration: none; transition: color .15s; }
.lp-topbar-link:hover { color: #fff; }
.lp-topbar-signin { background: rgba(255,255,255,.16); padding: 4px 13px; border-radius: 6px; }
.lp-topbar-signin:hover { background: rgba(255,255,255,.28); }
.lp-header.scrolled .lp-topbar { max-height: 0; opacity: 0; }

.lp-hero { padding-top: 108px; }
.lp-hero-kicker {
  display: inline-block; font-size: .8rem; font-weight: 800;
  letter-spacing: .16em; text-transform: uppercase; color: var(--gold);
  margin-bottom: 18px;
}
.lp-hero-headline {
  text-transform: uppercase;
  font-size: clamp(2.3rem, 4.8vw, 3.8rem);
  line-height: 1.04; letter-spacing: -.02em;
}
.lp-nav-cta { text-transform: uppercase; letter-spacing: .04em; font-size: .8rem; }

@media (max-width: 768px) {
  .lp-topbar { display: none; }
  .lp-hero { padding-top: 104px; }
  .lp-hero-headline { font-size: 2rem; }
}

/* ===== Client detail — at-a-glance dashboard ===== */
.client-kpi-row { margin-bottom: 18px; }

.client-dash-cols {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 16px;
  margin-bottom: 22px;
}

.dash-report-card .report-severity-row {
  display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 12px;
}
.sev-chip {
  font-size: .72rem; font-weight: 700; padding: 4px 10px;
  border-radius: var(--radius-full); letter-spacing: .02em;
}
.sev-chip.sev-high { background: var(--red-light);   color: var(--red-dark); }
.sev-chip.sev-med  { background: var(--amber-light); color: #92400e; }
.sev-chip.sev-low  { background: var(--gray-100);    color: var(--gray-600); }

.report-assessment {
  font-size: .85rem; color: var(--gray-600); line-height: 1.5;
  margin: 0 0 14px;
}

.report-error-list { display: flex; flex-direction: column; gap: 10px; }
.report-error-item { display: flex; gap: 10px; align-items: flex-start; }
.sev-dot {
  width: 9px; height: 9px; border-radius: 50%; margin-top: 6px; flex-shrink: 0;
  background: var(--gray-300);
}
.sev-dot.sev-high { background: var(--red); }
.sev-dot.sev-medium { background: var(--amber); }
.sev-dot.sev-low { background: var(--gray-400); }
.report-error-body { flex: 1; min-width: 0; }
.report-error-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.report-error-head strong { font-size: .86rem; color: var(--navy); }
.report-error-type {
  font-size: .7rem; font-weight: 600; color: var(--gray-500);
  background: var(--gray-100); padding: 2px 7px; border-radius: var(--radius-sm);
}
.report-error-desc { font-size: .78rem; color: var(--gray-500); margin: 3px 0 0; line-height: 1.45; }

.dash-card-actions { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }

.deadline-list { display: flex; flex-direction: column; gap: 10px; }
.deadline-item {
  display: flex; gap: 12px; align-items: center;
  padding: 10px 12px; border: 1px solid var(--border);
  border-radius: var(--radius-md); background: var(--gray-50);
}
.deadline-flag {
  font-size: .7rem; font-weight: 700; padding: 4px 9px;
  border-radius: var(--radius-full); white-space: nowrap; flex-shrink: 0;
}
.deadline-flag.flag-overdue { background: var(--red-light);   color: var(--red-dark); }
.deadline-flag.flag-soon    { background: var(--amber-light); color: #92400e; }
.deadline-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.deadline-body strong { font-size: .84rem; color: var(--navy); }

@media (max-width: 900px) {
  .client-dash-cols { grid-template-columns: 1fr; }
}

/* ════════════════════════════════════════════════════════════════
   PORTAL TOOLS (consumer self-service)
   ════════════════════════════════════════════════════════════════ */
.ptool-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 760px) { .ptool-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .ptool-grid { grid-template-columns: 1fr; } }
.ptool-tile {
    display: flex; flex-direction: column; gap: 10px;
    background: var(--white); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 18px; text-decoration: none;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.ptool-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--gold); }
.ptool-icon {
    width: 42px; height: 42px; border-radius: 11px;
    background: var(--gold-light); color: var(--gold-dark);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.ptool-icon svg { width: 21px; height: 21px; }
.ptool-title { font-weight: 700; color: var(--navy); font-size: .95rem; display: flex; align-items: center; gap: 8px; }
.ptool-sub { font-size: .8rem; color: var(--gray-500); line-height: 1.5; }
.ptool-badge {
    font-size: .58rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark)); color: var(--brand-navy);
    padding: 2px 7px; border-radius: 999px;
}
.ptool-badge.is-soft { background: var(--gray-100); color: var(--gray-600); }

/* Tool page headers */
.ptool-page-head { margin-bottom: 20px; }
.ptool-page-head h2 { font-size: 1.4rem; color: var(--navy); margin: 0 0 6px; }
.ptool-page-head p { color: var(--gray-500); font-size: .9rem; margin: 0; max-width: 640px; }
.ptool-back {
    display: inline-flex; align-items: center; gap: 5px; font-size: .78rem; font-weight: 600;
    color: var(--gray-500); text-decoration: none; margin-bottom: 10px;
}
.ptool-back:hover { color: var(--gold-dark); }

/* Consent + privacy notice */
.ptool-consent {
    display: flex; align-items: flex-start; gap: 9px; margin: 14px 0 18px;
    font-size: .8rem; color: var(--gray-600); line-height: 1.5; cursor: pointer;
}
.ptool-consent input { margin-top: 3px; accent-color: var(--gold); width: 16px; height: 16px; flex-shrink: 0; }
.ptool-notice {
    display: flex; gap: 10px; align-items: flex-start; background: var(--gray-50);
    border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 14px 16px;
    font-size: .8rem; color: var(--gray-600); line-height: 1.55; margin-bottom: 18px;
}
.ptool-notice svg { width: 18px; height: 18px; color: var(--gold-dark); flex-shrink: 0; margin-top: 1px; }

/* Upload drop zone (AI scanner file upload) */
.form-optional { color: var(--gray-400); font-weight: 400; font-size: .78rem; }
.ptool-upload {
    border: 2px dashed var(--border); border-radius: var(--radius-lg); padding: 26px 18px;
    text-align: center; cursor: pointer; background: var(--gray-50); transition: border-color .15s, background .15s;
}
.ptool-upload:hover, .ptool-upload.dragover { border-color: var(--gold); background: var(--gold-light); }
.ptool-upload svg { width: 30px; height: 30px; color: var(--gold-dark); opacity: .7; margin-bottom: 8px; }
.ptool-upload-title { font-size: .9rem; font-weight: 600; color: var(--navy); margin-bottom: 3px; word-break: break-word; }
.ptool-upload-sub { font-size: .72rem; color: var(--gray-400); }
.ptool-or {
    display: flex; align-items: center; text-align: center; gap: 12px;
    color: var(--gray-400); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; margin: 18px 0;
}
.ptool-or::before, .ptool-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* Severity summary stat cards on portal results */
.ptool-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 22px; }
@media (max-width: 560px) { .ptool-stats { grid-template-columns: 1fr 1fr; } }
.ptool-stat { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; text-align: center; }
.ptool-stat-num { font-size: 1.9rem; font-weight: 800; color: var(--navy); line-height: 1; }
.ptool-stat-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: var(--gray-500); margin-top: 6px; }

/* Result error / finding cards */
.ptool-finding { border: 1px solid var(--border); border-left-width: 4px; border-radius: var(--radius-lg); padding: 14px 16px; margin-bottom: 12px; background: var(--white); }
.ptool-finding.sev-high { border-left-color: var(--red); }
.ptool-finding.sev-medium { border-left-color: var(--amber); }
.ptool-finding.sev-low { border-left-color: var(--green, #16a34a); }
.ptool-finding-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.ptool-finding-title { font-weight: 700; color: var(--navy); font-size: .92rem; }
.ptool-finding-sub { font-size: .76rem; color: var(--gray-400); margin-top: 2px; }
.ptool-finding-desc { font-size: .83rem; color: var(--gray-600); line-height: 1.6; margin: 10px 0 0; }
.ptool-chip { display: inline-block; font-size: .68rem; font-weight: 600; padding: 2px 8px; border-radius: 5px; margin: 8px 6px 0 0; background: var(--gray-100); color: var(--gray-600); }
.bureau-eq { background: #dbeafe; color: #1d4ed8; }
.bureau-ex { background: #f3e8ff; color: #7c3aed; }
.bureau-tu { background: #dcfce7; color: #15803d; }

/* Supply listing cards */
.psupply-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (max-width: 640px) { .psupply-grid { grid-template-columns: 1fr; } }
.psupply-card { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px; background: var(--white); }
.psupply-card h4 { margin: 0 0 2px; color: var(--navy); font-size: 1rem; }
.psupply-creditor { font-size: .78rem; color: var(--gray-400); margin-bottom: 12px; }
.psupply-limit { font-size: 1.6rem; font-weight: 800; color: var(--gold-dark); line-height: 1; }
.psupply-rows { margin-top: 12px; }
.psupply-row { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: .8rem; }
.psupply-row:last-child { border-bottom: none; }
.psupply-row .lbl { color: var(--gray-500); }
.psupply-row .val { color: var(--navy); font-weight: 600; }

/* Tradelines utilization calculator */
.putil-meter { height: 14px; border-radius: 999px; background: var(--gray-100); overflow: hidden; margin: 6px 0; }
.putil-meter-fill { height: 100%; border-radius: 999px; transition: width .4s ease, background .3s ease; }
.putil-big { font-size: 2.4rem; font-weight: 800; line-height: 1; }

/* ══════════════════════════════════════════════════════════════════
   Motion & polish — entrance animations, frosted topbar, easing,
   typographic refinement. All motion respects prefers-reduced-motion.
   ══════════════════════════════════════════════════════════════════ */

/* Entrance: gentle fade-up applied to primary content surfaces */
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.stat-card,
.dash-feature-card,
.dash-snapshot-item,
.dash-main-grid > .card,
.lp-feature-card { animation: fadeUp .5s cubic-bezier(.4,0,.2,1) both; }

/* Stagger the dashboard grids so cards cascade in */
.stats-grid .stat-card:nth-child(1),
.dash-feature-grid .dash-feature-card:nth-child(1) { animation-delay: .02s; }
.stats-grid .stat-card:nth-child(2),
.dash-feature-grid .dash-feature-card:nth-child(2) { animation-delay: .08s; }
.stats-grid .stat-card:nth-child(3),
.dash-feature-grid .dash-feature-card:nth-child(3) { animation-delay: .14s; }
.stats-grid .stat-card:nth-child(4),
.dash-feature-grid .dash-feature-card:nth-child(4) { animation-delay: .20s; }

/* Springier lift on interactive surfaces */
.stat-card { transition: box-shadow var(--transition-md), transform var(--transition-md), border-color var(--transition-md); }
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

/* Frosted, translucent sticky topbar */
.topbar {
  background: rgba(255,255,255,.82);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
}
[data-theme="dark"] .topbar { background: rgba(17,23,41,.82); }

/* Typographic refinement */
h1, h2, .page-header-left h2, .dash-hero-text h1 { letter-spacing: -.015em; }
.stat-value { font-variant-numeric: tabular-nums; letter-spacing: -.02em; }

/* Focus ring for keyboard users on the theme toggle & icon buttons
   (full focus-visible pass lands in Tier 3) */
.topbar-icon-btn:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

/* Honour reduced-motion: kill entrance/scroll motion, keep instant states */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ══════════════════════════════════════════════════════════════════
   Tier 2 — ease of use: loading states, inline validation, tables
   ══════════════════════════════════════════════════════════════════ */

/* Button loading state (applied by the global submit helper) */
.btn.is-loading { position: relative; pointer-events: none; opacity: .85; }
.btn-spinner {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  display: inline-block; animation: spin .6s linear infinite; flex-shrink: 0;
}

/* Required-field marker (injected next to labels of [required] controls) */
.req-mark { color: var(--red); font-weight: 700; margin-left: 2px; }

/* Inline validation feedback — only after the user has interacted
   (:user-invalid), so nothing is red on first load. */
input:user-invalid, select:user-invalid, textarea:user-invalid {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(239,68,68,.14);
}
input:user-valid, select:user-valid, textarea:user-valid {
  border-color: var(--green);
}
.field-error {
  display: flex; align-items: center; gap: 5px;
  font-size: .74rem; color: var(--red-dark); margin-top: 5px;
}
[data-theme="dark"] .field-error { color: #ff9a9a; }

/* Horizontal-scroll wrapper for wide tables on narrow screens */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-container, .crm-table-wrap { -webkit-overflow-scrolling: touch; }
/* subtle right-edge fade to hint that a table scrolls */
.table-scroll.is-scrollable { position: relative; }
.table-scroll.is-scrollable::after {
  content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 24px;
  pointer-events: none;
  background: linear-gradient(to right, transparent, rgba(0,0,0,.06));
}
[data-theme="dark"] .table-scroll.is-scrollable::after {
  background: linear-gradient(to right, transparent, rgba(0,0,0,.35));
}

/* ══════════════════════════════════════════════════════════════════
   Tier 3 — accessibility & consistency
   ══════════════════════════════════════════════════════════════════ */

/* Visible keyboard focus everywhere (mouse focus stays clean via :focus-visible).
   Fixes the old `.btn:focus { outline:none }` that hid focus from keyboard users. */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.nav-links a:focus-visible,
.sidebar-logout:focus-visible,
.topbar-icon-btn:focus-visible,
.topbar-user-btn:focus-visible,
.tab-btn:focus-visible,
[role="button"]:focus-visible,
[tabindex]:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
/* On the dark sidebar, use a light ring for contrast */
.sidebar a:focus-visible,
.sidebar button:focus-visible,
.sidebar-logout:focus-visible { outline-color: #7fa6ff; }

/* Inputs already show a box-shadow focus ring; add outline only for keyboard */
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid transparent;   /* box-shadow ring is the visible indicator */
}

/* Skip-to-content link for keyboard/screen-reader users */
.skip-link {
  position: fixed; top: -60px; left: 12px; z-index: 2000;
  background: var(--brand-navy); color: var(--on-dark);
  padding: 10px 16px; border-radius: var(--radius-md);
  font-size: .85rem; font-weight: 600; box-shadow: var(--shadow-lg);
  transition: top var(--transition);
}
.skip-link:focus { top: 12px; color: var(--on-dark); }

/* Contrast: muted helper text was gray-400 (~2.8:1 on white → fails AA).
   gray-500 (#64748b) clears AA for small text. */
.text-muted { color: var(--gray-500); }

/* ══════════════════════════════════════════════════════════════════
   LANDING — How It Works funnel, Trust cards, Pricing, FAQ (lp-*)
   ══════════════════════════════════════════════════════════════════ */

/* ── How It Works — step funnel ─────────────────────────────────── */
.lp-steps { padding: 96px 0; background: #fff; }
.lp-steps .lp-section-inner > .lp-section-label,
.lp-steps .lp-section-inner > .lp-section-title,
.lp-steps .lp-section-inner > .lp-section-sub { text-align: center; margin-left: auto; margin-right: auto; }
.lp-steps-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
  counter-reset: lp-step;
}
.lp-step-card {
  position: relative;
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 16px;
  padding: 26px 22px;
  transition: box-shadow .22s, transform .2s, border-color .2s;
}
.lp-step-card:hover { box-shadow: 0 10px 32px rgba(15,23,42,.08); transform: translateY(-3px); border-color: #d4af37; }
.lp-step-num {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, #0a1640, #14275e); color: #fff;
  font-size: .95rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
  box-shadow: 0 4px 12px rgba(10,22,64,.25);
}
.lp-step-card:hover .lp-step-num { background: linear-gradient(135deg, #d4af37, #b8860b); }
.lp-step-card h4 { font-size: .97rem; font-weight: 800; color: #0f172a; margin: 0 0 8px; }
.lp-step-card p { font-size: .82rem; color: #64748b; line-height: 1.6; margin: 0; }

/* ── Trust & compliance cards ───────────────────────────────────── */
.lp-trust { padding: 96px 0; background: #f8fafc; }
.lp-trust .lp-section-inner > .lp-section-label,
.lp-trust .lp-section-inner > .lp-section-title,
.lp-trust .lp-section-inner > .lp-section-sub { text-align: center; margin-left: auto; margin-right: auto; }
.lp-trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.lp-trust-card {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 16px;
  padding: 28px 24px;
  transition: box-shadow .22s, transform .2s, border-color .2s;
}
.lp-trust-card:hover { box-shadow: 0 10px 32px rgba(15,23,42,.08); transform: translateY(-3px); border-color: #0a1640; }
.lp-trust-icon {
  width: 46px; height: 46px; border-radius: 12px;
  background: rgba(10,22,64,.07); color: #0a1640;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.lp-trust-icon svg { width: 22px; height: 22px; }
.lp-trust-card h4 { font-size: .95rem; font-weight: 800; color: #0f172a; margin: 0 0 8px; }
.lp-trust-card p { font-size: .82rem; color: #64748b; line-height: 1.6; margin: 0; }

/* ── Pricing ────────────────────────────────────────────────────── */
.lp-pricing { padding: 96px 0; background: #fff; }
.lp-pricing .lp-section-inner > .lp-section-label,
.lp-pricing .lp-section-inner > .lp-section-title,
.lp-pricing .lp-section-inner > .lp-section-sub { text-align: center; margin-left: auto; margin-right: auto; }
.lp-pricing-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; align-items: stretch; }
.lp-price-card {
  position: relative; display: flex; flex-direction: column;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 16px;
  padding: 30px 26px;
  transition: box-shadow .22s, transform .2s, border-color .2s;
}
.lp-price-card:hover { box-shadow: 0 12px 40px rgba(15,23,42,.1); transform: translateY(-4px); }
.lp-price-featured {
  border-color: #d4af37;
  box-shadow: 0 12px 40px rgba(212,175,55,.12);
}
.lp-price-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, #d4af37, #b8860b); color: #0a1640;
  font-size: .66rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  padding: 4px 14px; border-radius: 100px; white-space: nowrap;
}
.lp-price-tier {
  font-size: 1.5rem; font-weight: 800; color: #0f172a;
  letter-spacing: -.02em; margin-bottom: 6px;
  padding-bottom: 12px; position: relative;
}
.lp-price-tier::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 34px; height: 3px; border-radius: 2px; background: #d4af37;
}
.lp-price-desc { font-size: .82rem; color: #64748b; line-height: 1.6; margin: 0 0 18px; }
.lp-price-list { margin: 0 0 24px; padding: 0; list-style: none; flex: 1; }
.lp-price-list li {
  font-size: .82rem; color: #475569; padding: 6px 0;
  display: flex; align-items: center; gap: 8px;
  border-bottom: 1px solid #f1f5f9;
}
.lp-price-list li:last-child { border-bottom: none; }
.lp-price-list li::before { content: '✓'; color: #16a34a; font-weight: 800; flex-shrink: 0; }
.lp-btn-outline-dark {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1.5px solid #cbd5e1; color: #0f172a;
  font-weight: 700; font-size: .88rem;
  padding: 12px 24px; border-radius: 10px; text-decoration: none;
  transition: border-color .2s, color .2s, background .2s;
}
.lp-btn-outline-dark:hover { border-color: #d4af37; color: #d4af37; background: rgba(212,175,55,.04); }

/* ── FAQ accordion ──────────────────────────────────────────────── */
.lp-faq { padding: 96px 0; background: #f8fafc; }
.lp-faq .lp-section-inner > .lp-section-label,
.lp-faq .lp-section-inner > .lp-section-title { text-align: center; }
.lp-faq-list { max-width: 760px; margin: 40px auto 0; display: flex; flex-direction: column; gap: 12px; }
.lp-faq-item {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 12px;
  overflow: hidden; transition: border-color .2s, box-shadow .2s;
}
.lp-faq-item:hover { border-color: #cbd5e1; }
.lp-faq-item[open] { border-color: #d4af37; box-shadow: 0 6px 24px rgba(15,23,42,.06); }
.lp-faq-item summary {
  cursor: pointer; list-style: none;
  padding: 18px 22px;
  font-size: .95rem; font-weight: 700; color: #0f172a;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
.lp-faq-item summary::-webkit-details-marker { display: none; }
.lp-faq-item summary::after {
  content: '+'; font-size: 1.3rem; font-weight: 500; color: #94a3b8;
  transition: transform .2s, color .2s; line-height: 1; flex-shrink: 0;
}
.lp-faq-item[open] summary::after { transform: rotate(45deg); color: #d4af37; }
.lp-faq-item p {
  margin: 0; padding: 0 22px 18px;
  font-size: .86rem; color: #64748b; line-height: 1.7;
}

/* ── Responsive for new landing sections ────────────────────────── */
@media (max-width: 1024px) {
  .lp-steps-grid { grid-template-columns: repeat(2, 1fr); }
  .lp-pricing-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 960px) {
  .lp-trust-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .lp-steps, .lp-trust, .lp-pricing, .lp-faq { padding: 64px 0; }
}
@media (max-width: 640px) {
  .lp-steps-grid, .lp-trust-grid, .lp-pricing-grid { grid-template-columns: 1fr; }
}
