/* ============================================================================
   TRADE SPHERE FX — PREMIUM DESIGN SYSTEM v2.0
   Fonts: Outfit (display) + Plus Jakarta Sans (body/UI)
   ============================================================================ */

/* ── RESET ────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  letter-spacing: -0.01em;
  min-height: 100vh;
  min-height: 100dvh;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }
::selection { background: rgba(var(--primary-rgb), 0.28); color: #fff; }

/* ── DESIGN TOKENS ────────────────────────────────────────────────────── */
:root {
  /* Backgrounds — layered near-black with cool undertone */
  --bg-base: #07080B;
  --bg-surface: #0D0F14;
  --bg-elevated: #131620;
  --bg-card: #10131A;
  --bg-input: #0B0D12;
  --bg-overlay: rgba(6,7,10,0.82);

  /* Primary — refined emerald/mint (brand, CTAs, growth) */
  --primary: #00E5A8;
  --primary-rgb: 0,229,168;
  --primary-dark: #00A87D;
  --primary-light: #5CFFCE;
  --primary-glow: rgba(0,229,168,0.35);

  /* Gold — premium/VIP secondary accent */
  --gold: #C9A961;
  --gold-rgb: 201,169,97;
  --gold-soft: #E4D19C;
  --gold-deep: #96793D;

  /* Semantic */
  --success: #22C55E;
  --success-rgb: 34,197,94;
  --danger: #F1495E;
  --danger-rgb: 241,73,94;
  --warning: #F5A524;
  --warning-rgb: 245,165,36;
  --info: #4CA6FF;
  --info-rgb: 76,166,255;
  --purple: #A78BFA;
  --purple-rgb: 167,139,250;

  /* Text */
  --text-primary: #F5F6F8;
  --text-secondary: #C4C8D2;
  --text-muted: #7D8290;

  /* Borders */
  --border-subtle: rgba(255,255,255,0.05);
  --border-default: rgba(255,255,255,0.08);
  --border-medium: rgba(255,255,255,0.13);
  --border-strong: rgba(255,255,255,0.20);

  /* Glass */
  --glass-bg: rgba(16,19,26,0.55);
  --glass-border: rgba(255,255,255,0.08);
  --glass-blur: 20px;

  /* Radius */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --radius-full: 999px;

  /* Spacing */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px;
  --sp-6: 24px; --sp-8: 32px; --sp-10: 40px; --sp-12: 48px; --sp-16: 64px; --sp-20: 80px;

  /* Type scale */
  --text-micro: 0.6875rem;
  --text-caption: 0.75rem;
  --text-small: 0.8125rem;
  --text-body: 0.9375rem;
  --text-title: 1.125rem;
  --text-headline: 1.5rem;
  --text-display: 2.25rem;

  --leading-tight: 1.15;
  --leading-snug: 1.35;
  --leading-normal: 1.55;
  --leading-relaxed: 1.75;

  --tracking-tight: -0.02em;
  --tracking-normal: 0;
  --tracking-wide: 0.04em;
  --tracking-wider: 0.14em;

  /* Fonts */
  --font-display: 'Outfit', system-ui, sans-serif;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  /* Numbers/amounts use the clean sans font (NOT monospace) with tabular figures for alignment */
  --font-mono: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Shadows — tied to primary glow */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.35);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.4);
  --shadow-xl: 0 28px 80px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 0 1px rgba(var(--primary-rgb),0.15), 0 20px 60px rgba(var(--primary-rgb),0.15);
  --shadow-glow-gold: 0 0 0 1px rgba(var(--gold-rgb),0.18), 0 20px 60px rgba(var(--gold-rgb),0.14);

  /* Motion */
  --ease-out: cubic-bezier(.22,.61,.36,1);
  --ease-spring: cubic-bezier(.34,1.56,.64,1);
  --duration-fast: 0.18s;
  --duration-base: 0.28s;
  --duration-slow: 0.5s;

  /* Layout */
  --topnav-h: 68px;
  --bottomnav-h: 72px;
  --sidebar-w: 260px;

  /* Z-index */
  --z-dropdown: 200; --z-sticky: 300; --z-overlay: 400;
  --z-modal: 500; --z-toast: 700; --z-tooltip: 800;
}

/* Light theme override */
[data-theme="light"] {
  --bg-base: #F4F5F7;
  --bg-surface: #FFFFFF;
  --bg-elevated: #FFFFFF;
  --bg-card: #FBFBFC;
  --bg-input: #F0F1F3;
  --text-primary: #14161B;
  --text-secondary: #4B4F5A;
  --text-muted: #8A8E99;
  --border-subtle: rgba(0,0,0,0.05);
  --border-default: rgba(0,0,0,0.09);
  --border-medium: rgba(0,0,0,0.14);
  --border-strong: rgba(0,0,0,0.22);
  --glass-bg: rgba(255,255,255,0.65);
  --glass-border: rgba(0,0,0,0.06);
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.08);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.1);
  --shadow-xl: 0 28px 80px rgba(0,0,0,0.12);
}

/* ── AMBIENT BACKDROP + GRAIN ─────────────────────────────────────────── */
.bg-field {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(900px 500px at 82% -6%, rgba(var(--primary-rgb),0.07), transparent 60%),
    radial-gradient(700px 500px at 6% 12%, rgba(var(--gold-rgb),0.045), transparent 55%),
    var(--bg-base);
}
.grain {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.35; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}
[data-theme="light"] .grain { opacity: 0.12; }

/* ── TYPOGRAPHY ───────────────────────────────────────────────────────── */
.display, h1, h2, h3, .text-display, .text-headline, .text-title {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
}
.text-display { font-size: var(--text-display); font-weight: 800; line-height: var(--leading-tight); }
.text-headline { font-size: var(--text-headline); font-weight: 700; line-height: var(--leading-tight); }
.text-title { font-size: var(--text-title); font-weight: 700; }
.text-body { font-size: var(--text-body); }
.text-small { font-size: var(--text-small); }
.text-caption { font-size: var(--text-caption); }
.text-micro { font-size: var(--text-micro); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.text-money { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 600; letter-spacing: -0.01em; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.text-gradient {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 55%, var(--primary-dark) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.text-gradient-gold {
  background: linear-gradient(135deg, var(--gold-soft) 0%, var(--gold) 55%, var(--gold-deep) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.text-gradient-white {
  background: linear-gradient(180deg, #ffffff, #c9cdd6);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

/* ── LAYOUT UTILITIES ─────────────────────────────────────────────────── */
.container { width: 92%; max-width: 1180px; margin-inline: auto; }
.page-content { padding-top: calc(var(--topnav-h) + var(--sp-6)); padding-bottom: var(--sp-16); min-height: 100vh; }
.grid { display: grid; gap: var(--sp-4); }
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: var(--sp-1); } .gap-2 { gap: var(--sp-2); } .gap-3 { gap: var(--sp-3); }
.gap-4 { gap: var(--sp-4); } .gap-6 { gap: var(--sp-6); }
.mb-1{margin-bottom:var(--sp-1);} .mb-2{margin-bottom:var(--sp-2);} .mb-3{margin-bottom:var(--sp-3);}
.mb-4{margin-bottom:var(--sp-4);} .mb-5{margin-bottom:var(--sp-5);} .mb-6{margin-bottom:var(--sp-6);}
.mb-8{margin-bottom:var(--sp-8);} .mb-10{margin-bottom:var(--sp-10);}
.mt-1{margin-top:var(--sp-1);} .mt-2{margin-top:var(--sp-2);}
.mt-3{margin-top:var(--sp-3);} .mt-4{margin-top:var(--sp-4);} .mt-6{margin-top:var(--sp-6);} .mt-8{margin-top:var(--sp-8);} .mt-10{margin-top:var(--sp-10);}
.gap-5{gap:var(--sp-5);} .gap-8{gap:var(--sp-8);}
.p-4{padding:var(--sp-4);} .p-5{padding:var(--sp-5);} .p-6{padding:var(--sp-6);} .p-8{padding:var(--sp-8);}
.hide-mobile { display: initial; }
.hide-desktop, .show-mobile { display: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
body.no-scroll { overflow: hidden; }
@media (max-width: 767px) {
  .hide-mobile { display: none !important; }
  .hide-desktop, .show-mobile { display: initial !important; }
}
@media (min-width: 768px) { .table-responsive-cards td[data-label] { display: table-cell; } }

/* ── EYEBROW / EYEBROW LABEL ──────────────────────────────────────────── */
.section-eyebrow, .eyebrow {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  font-family: var(--font-display); font-size: var(--text-caption); font-weight: 600;
  letter-spacing: var(--tracking-wider); text-transform: uppercase; color: var(--gold);
  margin-bottom: var(--sp-3); text-align: center; width: 100%; justify-content: center;
}
.section-eyebrow::before { content:''; width: 22px; height: 1px; background: linear-gradient(90deg, var(--gold), transparent); }
.section-title {
  font-family: var(--font-display); font-weight: 800; letter-spacing: var(--tracking-tight);
  font-size: clamp(1.75rem, 4vw, 2.5rem); text-align: center; line-height: var(--leading-tight);
}
.section-subtitle { text-align: center; color: var(--text-secondary); font-size: var(--text-body); max-width: 560px; margin: var(--sp-3) auto 0; line-height: var(--leading-relaxed); }

/* ── BADGES / CHIPS / LIVE DOT ────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px; font-size: var(--text-micro); font-weight: 700;
  padding: 4px 10px; border-radius: var(--radius-full); letter-spacing: 0.02em; white-space: nowrap;
}
.badge-primary { background: rgba(var(--primary-rgb),0.12); color: var(--primary); }
.badge-success { background: rgba(var(--success-rgb),0.12); color: var(--success); }
.badge-danger { background: rgba(var(--danger-rgb),0.12); color: var(--danger); }
.badge-warning { background: rgba(var(--warning-rgb),0.12); color: var(--warning); }
.badge-info { background: rgba(var(--info-rgb),0.12); color: var(--info); }
.badge-neutral { background: var(--bg-elevated); color: var(--text-muted); border: 1px solid var(--border-default); }
.badge-gold { background: rgba(var(--gold-rgb),0.14); color: var(--gold); }
.badge-dot::before { content:''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }

.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); display: inline-block; box-shadow: 0 0 10px 2px var(--primary-glow); animation: pulseDot 2.4s var(--ease-out) infinite; }
.live-dot-sm { width: 6px; height: 6px; }
@keyframes pulseDot { 0%,100%{opacity:1;transform:scale(1);} 50%{opacity:.4;transform:scale(.75);} }
@keyframes pulse { 0%,100%{transform:scale(1);opacity:1;} 50%{transform:scale(1.08);opacity:.75;} }

.chip {
  display: inline-flex; align-items: center; font-family: var(--font-display); font-size: var(--text-micro);
  font-weight: 600; letter-spacing: var(--tracking-wide); text-transform: uppercase; color: var(--gold-soft);
  padding: 7px 14px; border-radius: var(--radius-full); border: 1px solid rgba(var(--gold-rgb),0.32);
  background: rgba(var(--gold-rgb),0.05);
}

/* ── BUTTONS ──────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--font-display); font-weight: 600; font-size: var(--text-small);
  letter-spacing: 0.01em; padding: 12px 22px; border-radius: var(--radius-full);
  border: 1px solid transparent; cursor: pointer; position: relative; overflow: hidden;
  transition: transform var(--duration-base) var(--ease-out), box-shadow var(--duration-slow) var(--ease-out),
              border-color var(--duration-base) var(--ease-out), background var(--duration-base) var(--ease-out),
              color var(--duration-base) var(--ease-out);
  white-space: nowrap; text-decoration: none;
}
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn:active { transform: scale(0.97); }

.btn-primary {
  color: #06120E; background: var(--primary);
  border-color: rgba(255,255,255,0.25);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.15), 0 12px 36px rgba(var(--primary-rgb),0.28), 0 1px 0 rgba(255,255,255,0.35) inset;
}
.btn-primary::after {
  content:''; position: absolute; top:0; left:-130%; width: 60%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.55), transparent); transform: skewX(-18deg);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(0,0,0,0.15), 0 20px 54px rgba(var(--primary-rgb),0.4), 0 1px 0 rgba(255,255,255,0.4) inset; }
.btn-primary:hover::after { animation: sheen 1.1s var(--ease-out); }
@keyframes sheen { from{left:-130%;} to{left:160%;} }

.btn-accent { color: #1A1305; background: var(--gold); border-color: rgba(255,238,200,0.4); box-shadow: var(--shadow-glow-gold); }
.btn-accent:hover { transform: translateY(-2px); }

.btn-ghost { color: var(--text-secondary); background: rgba(255,255,255,0.02); border-color: var(--border-default); }
.btn-ghost:hover { transform: translateY(-1px); color: var(--text-primary); background: rgba(255,255,255,0.05); border-color: var(--border-medium); }

.btn-outline { color: var(--text-primary); background: transparent; border-color: var(--border-medium); }
.btn-outline:hover { border-color: rgba(var(--primary-rgb),0.4); background: rgba(var(--primary-rgb),0.04); }

.btn-danger { color: #fff; background: var(--danger); border-color: rgba(255,255,255,0.15); box-shadow: 0 10px 30px rgba(var(--danger-rgb),0.25); }
.btn-danger:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(var(--danger-rgb),0.35); }

.btn-sm { padding: 8px 16px; font-size: var(--text-caption); gap: 6px; }
.btn-lg { padding: 16px 30px; font-size: var(--text-body); }
.btn-block { width: 100%; }
.btn-icon {
  width: 40px; height: 40px; padding: 0; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.03); border: 1px solid var(--border-default);
  color: var(--text-secondary); cursor: pointer; text-decoration: none;
  transition: all var(--duration-base) var(--ease-out);
}
.btn-icon:hover { color: var(--text-primary); background: rgba(255,255,255,0.06); border-color: var(--border-medium); }
.btn-icon svg { width: 18px; height: 18px; }
.btn:disabled { opacity: 0.5; pointer-events: none; }

/* ── GLASS CARDS ──────────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-default); border-radius: var(--radius-lg);
  padding: var(--sp-5); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.card-sm { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: var(--sp-4); }
.card-interactive { cursor: pointer; transition: all var(--duration-base) var(--ease-out); }
.card-interactive:hover { transform: translateY(-3px); border-color: var(--border-medium); box-shadow: var(--shadow-lg); }

.card-glass {
  position: relative; background: var(--bg-card);
  border: 1px solid var(--border-default); border-radius: var(--radius-xl); padding: var(--sp-6);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); overflow: hidden;
  transition: transform var(--duration-slow) var(--ease-out), border-color var(--duration-slow) var(--ease-out), box-shadow var(--duration-slow) var(--ease-out);
}
.card-glass::before {
  content:''; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: linear-gradient(180deg, rgba(255,255,255,0.08), transparent 45%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none;
}
.card-glass:hover { transform: translateY(-4px); border-color: rgba(var(--primary-rgb),0.22); box-shadow: 0 30px 70px rgba(0,0,0,0.5), 0 0 60px rgba(var(--primary-rgb),0.06); }

.card-glow { background: var(--bg-card); border: 1px solid rgba(var(--primary-rgb),0.16); border-radius: var(--radius-xl); backdrop-filter: blur(18px); box-shadow: var(--shadow-glow); }

.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-4); }
.card-title { font-family: var(--font-display); font-weight: 700; font-size: var(--text-title); }

/* ── FORMS ────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: var(--sp-4); }
.form-label { display: block; font-size: var(--text-caption); font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; }
.form-hint { font-size: var(--text-micro); color: var(--text-muted); margin-top: 6px; }
.input, textarea.input, select.input {
  width: 100%; background: var(--bg-input); border: 1px solid var(--border-default); border-radius: var(--radius-md);
  padding: 13px 16px; font-family: var(--font-sans); font-size: var(--text-body); color: var(--text-primary);
  transition: border-color var(--duration-base), box-shadow var(--duration-base); outline: none;
}
.input::placeholder { color: var(--text-muted); }
.input:focus { border-color: rgba(var(--primary-rgb),0.5); box-shadow: 0 0 0 3px rgba(var(--primary-rgb),0.12); }
textarea.input { resize: vertical; min-height: 90px; }
.input-group { position: relative; }
.input-group .input { padding-left: 44px; }
.input-icon { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--text-muted); width: 18px; height: 18px; display: flex; }
.input-money { font-family: var(--font-mono); font-weight: 600; }
.toggle { display: flex; align-items: center; gap: var(--sp-3); cursor: pointer; }
.toggle input { position: absolute; opacity: 0; }
.toggle-track { width: 42px; height: 24px; border-radius: var(--radius-full); background: var(--bg-elevated); border: 1px solid var(--border-default); position: relative; transition: all var(--duration-base); flex-shrink: 0; }
.toggle-track::after { content:''; position: absolute; width: 18px; height: 18px; border-radius: 50%; background: var(--text-muted); top: 2px; left: 2px; transition: all var(--duration-base) var(--ease-spring); }
.toggle input:checked + .toggle-track { background: rgba(var(--primary-rgb),0.25); border-color: rgba(var(--primary-rgb),0.4); }
.toggle input:checked + .toggle-track::after { transform: translateX(18px); background: var(--primary); box-shadow: 0 0 8px var(--primary-glow); }

/* Password strength */
.password-strength { margin-top: 10px; }
.password-strength-bar { display: flex; gap: 4px; margin-bottom: 6px; }
.password-strength-bar span { height: 3px; flex: 1; border-radius: 2px; background: var(--bg-elevated); transition: background var(--duration-base); }
.password-strength-label { font-size: var(--text-micro); color: var(--text-muted); font-weight: 600; }
.password-strength[data-strength="1"] .password-strength-bar span:nth-child(1) { background: var(--danger); }
.password-strength[data-strength="1"] .password-strength-label { color: var(--danger); }
.password-strength[data-strength="2"] .password-strength-bar span:nth-child(-n+2) { background: var(--warning); }
.password-strength[data-strength="2"] .password-strength-label { color: var(--warning); }
.password-strength[data-strength="3"] .password-strength-bar span:nth-child(-n+3) { background: var(--info); }
.password-strength[data-strength="3"] .password-strength-label { color: var(--info); }
.password-strength[data-strength="4"] .password-strength-bar span { background: var(--success); }
.password-strength[data-strength="4"] .password-strength-label { color: var(--success); }

.password-requirements { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; margin-top: 10px; }
.password-req { display: flex; align-items: center; gap: 6px; font-size: var(--text-micro); color: var(--text-muted); transition: color var(--duration-base); }
.password-req svg { width: 14px; height: 14px; flex-shrink: 0; stroke: currentColor; fill: none; transition: all var(--duration-base); }
.password-req.met { color: var(--success); }
.password-req.met svg { stroke: var(--success); fill: rgba(var(--success-rgb),0.12); }

/* ── ALERTS ───────────────────────────────────────────────────────────── */
.alert { display: flex; gap: var(--sp-3); align-items: flex-start; padding: var(--sp-4); border-radius: var(--radius-md); border: 1px solid; }
.alert-icon { width: 20px; height: 20px; flex-shrink: 0; margin-top: 1px; }
.alert-content { font-size: var(--text-small); line-height: var(--leading-snug); }
.alert-title { font-weight: 700; margin-bottom: 2px; }
.alert-success { background: rgba(var(--success-rgb),0.08); border-color: rgba(var(--success-rgb),0.2); color: #86EFAC; }
.alert-error { background: rgba(var(--danger-rgb),0.08); border-color: rgba(var(--danger-rgb),0.2); color: #FCA5B0; }
.alert-warning { background: rgba(var(--warning-rgb),0.08); border-color: rgba(var(--warning-rgb),0.2); color: #FCD34D; }
.alert-info { background: rgba(var(--info-rgb),0.08); border-color: rgba(var(--info-rgb),0.2); color: #93C5FD; }

/* ── STAT CARDS ───────────────────────────────────────────────────────── */
.stat-card { background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: var(--radius-lg); padding: var(--sp-5); position: relative; overflow: hidden; transition: all var(--duration-base) var(--ease-out); }
.stat-card:hover { border-color: var(--border-medium); transform: translateY(-2px); }
.stat-card-icon { width: 42px; height: 42px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; margin-bottom: var(--sp-3); }
.stat-card-icon svg { width: 20px; height: 20px; }
.stat-card-icon.green { background: rgba(var(--success-rgb),0.1); color: var(--success); }
.stat-card-icon.red { background: rgba(var(--danger-rgb),0.1); color: var(--danger); }
.stat-card-icon.teal { background: rgba(var(--primary-rgb),0.1); color: var(--primary); }
.stat-card-icon.blue { background: rgba(var(--info-rgb),0.1); color: var(--info); }
.stat-card-icon.gold { background: rgba(var(--gold-rgb),0.12); color: var(--gold); }
.stat-card-icon.purple { background: rgba(var(--purple-rgb),0.1); color: var(--purple); }
.stat-card-value { font-family: var(--font-mono); font-size: var(--text-headline); font-weight: 700; letter-spacing: -0.02em; }
.stat-card-label { font-size: var(--text-caption); color: var(--text-muted); margin-top: 4px; font-weight: 500; }
.stat-card-trend { font-size: var(--text-micro); font-weight: 600; margin-top: 6px; display: inline-block; }
.stat-card-trend.up { color: var(--success); }
.stat-card-trend.down { color: var(--danger); }
.stat-card.green { border-color: rgba(var(--success-rgb),0.15); }
.stat-card.red { border-color: rgba(var(--danger-rgb),0.15); }
.stat-card.teal { border-color: rgba(var(--primary-rgb),0.15); }
.stat-card.blue { border-color: rgba(var(--info-rgb),0.15); }

/* ── TABLES ───────────────────────────────────────────────────────────── */
.table-wrap { border: 1px solid var(--border-default); border-radius: var(--radius-md); overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: var(--text-small); }
.table th { text-align: left; padding: 14px 18px; font-size: var(--text-micro); font-weight: 700; text-transform: uppercase; letter-spacing: var(--tracking-wide); color: var(--text-muted); background: var(--bg-elevated); border-bottom: 1px solid var(--border-default); white-space: nowrap; }
.table td { padding: 14px 18px; border-bottom: 1px solid var(--border-subtle); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: rgba(255,255,255,0.015); }
@media (max-width: 767px) {
  .table-responsive-cards thead { display: none; }
  .table-responsive-cards, .table-responsive-cards tbody, .table-responsive-cards tr, .table-responsive-cards td { display: block; width: 100%; }
  .table-responsive-cards tr { border-bottom: 1px solid var(--border-default); padding: var(--sp-3) 0; }
  .table-responsive-cards td { display: flex; justify-content: space-between; padding: 6px 4px; border: none; }
  .table-responsive-cards td::before { content: attr(data-label); font-weight: 600; color: var(--text-muted); font-size: var(--text-micro); text-transform: uppercase; }
}

/* ── TRANSACTION FEED ─────────────────────────────────────────────────── */
.tx-feed { display: flex; flex-direction: column; }
.tx-item { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3) 0; border-bottom: 1px solid var(--border-subtle); }
.tx-item:last-child { border-bottom: none; }
.tx-icon { width: 38px; height: 38px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tx-icon svg { width: 17px; height: 17px; }
.tx-icon.deposit { background: rgba(var(--success-rgb),0.1); color: var(--success); }
.tx-icon.withdrawal { background: rgba(var(--danger-rgb),0.1); color: var(--danger); }
.tx-icon.roi { background: rgba(var(--primary-rgb),0.1); color: var(--primary); }
.tx-icon.investment { background: rgba(var(--info-rgb),0.1); color: var(--info); }
.tx-icon.referral { background: rgba(var(--purple-rgb),0.1); color: var(--purple); }
.tx-details { flex: 1; min-width: 0; }
.tx-label { font-size: var(--text-small); font-weight: 600; color: var(--text-primary); }
.tx-time { font-size: var(--text-micro); color: var(--text-muted); margin-top: 2px; }
.tx-amount { font-family: var(--font-mono); font-weight: 700; font-size: var(--text-small); text-align: right; }
.tx-amount.positive { color: var(--success); }
.tx-amount.negative { color: var(--danger); }
.tx-status { text-align: right; margin-top: 3px; }

/* ── PROGRESS / COVERAGE BARS ─────────────────────────────────────────── */
.progress { height: 6px; border-radius: var(--radius-full); background: var(--bg-elevated); overflow: hidden; }
.progress-sm { height: 4px; }
.progress-fill { height: 100%; border-radius: var(--radius-full); background: var(--primary); transition: width var(--duration-slow) var(--ease-out); }
.progress-fill.animated { background-size: 200% 100%; animation: progressShimmer 2s linear infinite; }
.progress-fill-warning { background: var(--warning); }
@keyframes progressShimmer { 0%{background-position:200% 0;} 100%{background-position:-200% 0;} }

.coverage-bar { height: 26px; border-radius: var(--radius-full); background: var(--bg-elevated); overflow: hidden; position: relative; border: 1px solid var(--border-default); }
.coverage-fill { height: 100%; display: flex; align-items: center; justify-content: flex-end; padding-right: 10px; font-size: var(--text-micro); font-weight: 700; color: #06120E; transition: width var(--duration-slow) var(--ease-out); }
.coverage-fill.healthy { background: var(--primary); }
.coverage-fill.caution { background: var(--warning); color: #2A1B00; }
.coverage-fill.critical { background: var(--danger); color: #fff; }

/* ── CHART CONTAINER FIX (prevents Chart.js endless growth) ──────────── */
.chart-box { position: relative; width: 100%; height: 280px; }
.chart-box canvas { position: absolute !important; top: 0; left: 0; width: 100% !important; height: 100% !important; }
.chart-box-sm { height: 180px; }
.chart-box-lg { height: 360px; }

/* ── BADGES: STATUS PILLS FOR ADMIN NAV ETC ───────────────────────────── */
.system-status { display: inline-flex; align-items: center; gap: 8px; font-size: var(--text-small); font-weight: 600; padding: 8px 16px; border-radius: var(--radius-full); border: 1px solid; }
.system-status.operational { background: rgba(var(--success-rgb),0.1); border-color: rgba(var(--success-rgb),0.25); color: var(--success); }
.system-status.degraded { background: rgba(var(--warning-rgb),0.1); border-color: rgba(var(--warning-rgb),0.25); color: var(--warning); }
.system-status.maintenance { background: rgba(var(--danger-rgb),0.1); border-color: rgba(var(--danger-rgb),0.25); color: var(--danger); }
.system-status-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; animation: pulseDot 2.4s infinite; }

/* ── AVATARS ──────────────────────────────────────────────────────────── */
.avatar { border-radius: 50%; display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; font-family: var(--font-display); font-weight: 700; border: 1px solid var(--border-default); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-sm { width: 32px; height: 32px; font-size: 11px; }
.avatar-md { width: 44px; height: 44px; font-size: 14px; }
.avatar-xl { width: 88px; height: 88px; font-size: 26px; }
.avatar-stack { display: flex; }
.avatar-stack .avatar { margin-left: -10px; border: 2px solid var(--bg-base); }
.avatar-stack .avatar:first-child { margin-left: 0; }

/* ── EMPTY STATES ─────────────────────────────────────────────────────── */
.empty-state { text-align: center; padding: var(--sp-12) var(--sp-6); }
.empty-state-icon { width: 56px; height: 56px; margin: 0 auto var(--sp-4); border-radius: 50%; background: var(--bg-elevated); display: flex; align-items: center; justify-content: center; color: var(--text-muted); }
.empty-state-icon svg { width: 26px; height: 26px; }
.empty-state-title { font-family: var(--font-display); font-weight: 700; font-size: var(--text-title); margin-bottom: var(--sp-1); }
.empty-state-desc { font-size: var(--text-small); color: var(--text-muted); max-width: 320px; margin: 0 auto var(--sp-5); line-height: var(--leading-relaxed); }

/* ── SKELETONS ────────────────────────────────────────────────────────── */
.skeleton { background: linear-gradient(90deg, var(--bg-elevated) 25%, var(--bg-card) 37%, var(--bg-elevated) 63%); background-size: 400% 100%; animation: skeletonWave 1.4s ease infinite; border-radius: var(--radius-sm); }
@keyframes skeletonWave { 0%{background-position:100% 50%;} 100%{background-position:0 50%;} }

/* ── DROPDOWN / MODAL / TOAST ─────────────────────────────────────────── */
.dropdown-menu { position: absolute; top: calc(100% + 8px); right: 0; min-width: 190px; background: var(--bg-elevated); border: 1px solid var(--border-medium); border-radius: var(--radius-md); box-shadow: var(--shadow-xl); padding: 6px; z-index: var(--z-dropdown); opacity: 0; visibility: hidden; transform: translateY(-6px); transition: all var(--duration-fast) var(--ease-out); }
.dropdown-menu.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-item { display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: var(--radius-sm); font-size: var(--text-small); color: var(--text-secondary); background: transparent; border: none; }
.dropdown-item:hover { background: var(--bg-card); color: var(--text-primary); }
.dropdown-divider { height: 1px; background: var(--border-subtle); margin: 6px 4px; }

.modal-overlay { position: fixed; inset: 0; background: var(--bg-overlay); backdrop-filter: blur(6px); z-index: var(--z-modal); display: flex; align-items: center; justify-content: center; padding: var(--sp-4); opacity: 0; visibility: hidden; transition: all var(--duration-base); }
.modal-overlay.is-open { opacity: 1; visibility: visible; }
.modal-content { background: var(--bg-elevated); border: 1px solid var(--border-medium); border-radius: var(--radius-xl); width: 100%; max-width: 460px; max-height: 88vh; overflow-y: auto; box-shadow: var(--shadow-xl); transform: scale(0.94) translateY(10px); transition: transform var(--duration-base) var(--ease-spring); }
.modal-overlay.is-open .modal-content { transform: scale(1) translateY(0); }
.modal-content.modal-sm { max-width: 380px; }
.modal-content.modal-lg { max-width: 680px; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: var(--sp-5) var(--sp-5) var(--sp-4); border-bottom: 1px solid var(--border-subtle); }
.modal-title { font-family: var(--font-display); font-weight: 700; font-size: var(--text-title); }
.modal-close { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--text-muted); background: var(--bg-card); border: none; }
.modal-close:hover { color: var(--text-primary); }
.modal-body { padding: var(--sp-5); }
.modal-footer { display: flex; gap: var(--sp-3); padding: var(--sp-4) var(--sp-5) var(--sp-5); justify-content: flex-end; }

.toast-container { position: fixed; bottom: calc(var(--bottomnav-h) + var(--sp-4)); left: 50%; transform: translateX(-50%); z-index: var(--z-toast); display: flex; flex-direction: column; gap: 8px; width: 92%; max-width: 380px; }
@media (min-width: 768px) { .toast-container { bottom: var(--sp-6); } }
.toast { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-radius: var(--radius-md); background: var(--bg-elevated); border: 1px solid var(--border-medium); box-shadow: var(--shadow-lg); font-size: var(--text-small); animation: toastIn var(--duration-base) var(--ease-spring); }
@keyframes toastIn { from{opacity:0;transform:translateY(12px);} to{opacity:1;transform:translateY(0);} }
.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--danger); }
.toast.info { border-left: 3px solid var(--info); }

/* ── TABS / PILLS ─────────────────────────────────────────────────────── */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border-default); overflow-x: auto; }
.tabs .tab { padding: 12px 18px; font-size: var(--text-small); font-weight: 600; color: var(--text-muted); border-bottom: 2px solid transparent; white-space: nowrap; background: none; border-top: none; border-left: none; border-right: none; }
.tabs .tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.tabs-pills { display: flex; gap: 8px; overflow-x: auto; }
.tabs-pills .tab { padding: 9px 16px; border-radius: var(--radius-full); font-size: var(--text-small); font-weight: 600; color: var(--text-muted); background: var(--bg-card); border: 1px solid var(--border-default); white-space: nowrap; }
.tabs-pills .tab.active { color: #06120E; background: var(--primary); border-color: var(--primary); }

/* ── PAGINATION ───────────────────────────────────────────────────────── */
.pagination { display: flex; gap: 6px; justify-content: center; align-items: center; flex-wrap: wrap; }
.pagination-btn { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); font-size: var(--text-small); font-weight: 600; color: var(--text-secondary); background: var(--bg-card); border: 1px solid var(--border-default); }
.pagination-btn.active { background: var(--primary); color: #06120E; border-color: var(--primary); }
.pagination-btn:hover:not(.active) { border-color: var(--border-medium); color: var(--text-primary); }

/* ── ACCORDION (FAQ) ──────────────────────────────────────────────────── */
.accordion-single { display: flex; flex-direction: column; gap: 8px; }
.accordion-item { background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: var(--radius-md); overflow: hidden; }
.accordion-header { display: flex; align-items: center; justify-content: space-between; padding: var(--sp-4); cursor: pointer; font-weight: 600; }
.accordion-icon { width: 16px; height: 16px; transition: transform var(--duration-base); flex-shrink: 0; }
.accordion-item.is-open .accordion-icon { transform: rotate(180deg); }
.accordion-body { max-height: 0; overflow: hidden; transition: max-height var(--duration-slow) var(--ease-out); }
.accordion-item.is-open .accordion-body { max-height: 400px; }
.accordion-content { padding: 0 var(--sp-4) var(--sp-4); font-size: var(--text-small); color: var(--text-muted); line-height: var(--leading-relaxed); }

/* ── PAYMENT METHOD CARDS ─────────────────────────────────────────────── */
.payment-methods-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px,1fr)); gap: var(--sp-2); }
.payment-method-card { padding: var(--sp-3); border-radius: var(--radius-md); border: 1px solid var(--border-default); background: var(--bg-card); text-align: center; cursor: pointer; transition: all var(--duration-base); }
.payment-method-card.selected { border-color: var(--primary); background: rgba(var(--primary-rgb),0.06); box-shadow: 0 0 0 1px var(--primary); }
.payment-method-card-icon { width: 30px; height: 30px; margin: 0 auto 6px; color: var(--primary); }
.payment-method-card-name { font-size: var(--text-caption); font-weight: 600; }
.payment-method-card-info { font-size: 10px; color: var(--text-muted); margin-top: 2px; }
.amount-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.amount-pill { padding: 8px 14px; border-radius: var(--radius-full); background: var(--bg-card); border: 1px solid var(--border-default); font-size: var(--text-caption); font-family: var(--font-mono); font-weight: 600; color: var(--text-secondary); }
.amount-pill.selected, .amount-pill:hover { border-color: var(--primary); color: var(--primary); background: rgba(var(--primary-rgb),0.06); }

/* ── MARQUEE ──────────────────────────────────────────────────────────── */
.marquee { overflow: hidden; position: relative; -webkit-mask: linear-gradient(90deg,transparent,#000 10%,#000 90%,transparent); mask: linear-gradient(90deg,transparent,#000 10%,#000 90%,transparent); }
.marquee-track { display: flex; gap: var(--sp-10); width: max-content; animation: marqueeScroll 32s linear infinite; }
@keyframes marqueeScroll { from{transform:translateX(0);} to{transform:translateX(-50%);} }

/* ── ANIMATIONS ───────────────────────────────────────────────────────── */
.animate-fade-in-up { animation: fadeInUp 0.6s var(--ease-out) both; }
@keyframes fadeInUp { from{opacity:0;transform:translateY(20px);} to{opacity:1;transform:translateY(0);} }
.stagger > * { animation: fadeInUp 0.5s var(--ease-out) both; }
.stagger > *:nth-child(1){animation-delay:.03s;} .stagger > *:nth-child(2){animation-delay:.08s;}
.stagger > *:nth-child(3){animation-delay:.13s;} .stagger > *:nth-child(4){animation-delay:.18s;}
.stagger > *:nth-child(5){animation-delay:.23s;} .stagger > *:nth-child(6){animation-delay:.28s;}
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { *{animation:none!important;scroll-behavior:auto!important;} }

/* ── TOP NAVIGATION ───────────────────────────────────────────────────── */
.topnav { position: fixed; top: 0; left: 0; right: 0; z-index: var(--z-sticky); height: var(--topnav-h); background: rgba(9,10,13,0.72); backdrop-filter: blur(20px) saturate(140%); -webkit-backdrop-filter: blur(20px) saturate(140%); border-bottom: 1px solid var(--border-subtle); display: flex; align-items: center; }
.topnav-brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: 15px; letter-spacing: 0.02em; }
.topnav-brand img { width: 32px; height: 32px; border-radius: var(--radius-sm); object-fit: cover; }
.topnav-balance { display: flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: var(--text-small); font-weight: 700; color: var(--primary); background: rgba(var(--primary-rgb),0.08); border: 1px solid rgba(var(--primary-rgb),0.18); padding: 8px 14px; border-radius: var(--radius-full); }
.topnav-balance .bal-label { color: var(--text-muted); font-weight: 500; font-family: var(--font-sans); }

.theme-toggle { width: 38px; height: 38px; border-radius: 50%; background: var(--bg-card); border: 1px solid var(--border-default); display: flex; align-items: center; justify-content: center; color: var(--text-secondary); }
.theme-toggle svg { width: 17px; height: 17px; }
.theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: block; }

.notif-trigger { position: relative; width: 38px; height: 38px; border-radius: 50%; background: var(--bg-card); border: 1px solid var(--border-default); display: flex; align-items: center; justify-content: center; color: var(--text-secondary); }
.notif-trigger svg { width: 18px; height: 18px; }
.notif-badge { position: absolute; top: -3px; right: -3px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: var(--radius-full); background: var(--danger); color: #fff; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; border: 2px solid var(--bg-base); }
.notif-dropdown { position: absolute; top: calc(100% + 12px); right: 0; width: 330px; max-width: 90vw; background: var(--bg-elevated); border: 1px solid var(--border-medium); border-radius: var(--radius-lg); box-shadow: var(--shadow-xl); z-index: var(--z-dropdown); opacity: 0; visibility: hidden; transform: translateY(-8px); transition: all var(--duration-fast); }
.dropdown:hover .notif-dropdown, .notif-trigger:focus + .notif-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.notif-dropdown-header { display: flex; justify-content: space-between; align-items: center; padding: var(--sp-4); border-bottom: 1px solid var(--border-subtle); font-weight: 700; font-size: var(--text-small); }
.notif-dropdown-list { max-height: 320px; overflow-y: auto; }
.notif-item { padding: 12px var(--sp-4); border-bottom: 1px solid var(--border-subtle); }
.notif-item.unread { background: rgba(var(--primary-rgb),0.03); }
.notif-item-text { font-size: var(--text-small); font-weight: 600; }
.notif-item-time { font-size: var(--text-micro); color: var(--text-muted); margin-top: 2px; }
.notif-dropdown-footer { padding: 12px; text-align: center; border-top: 1px solid var(--border-subtle); }
.notif-dropdown-footer a { font-size: var(--text-small); font-weight: 600; color: var(--primary); }

/* ── SCROLLBAR ────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-medium); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }

/* ── ADMIN LAYOUT ─────────────────────────────────────────────────────── */
.admin-layout { display: flex; padding-top: var(--topnav-h); min-height: 100vh; }
.admin-content { flex: 1; min-width: 0; padding: var(--sp-6); max-width: 100%; }
@media (min-width: 1024px) { .admin-content { margin-left: var(--sidebar-w); } }

/* ── DIVIDER ──────────────────────────────────────────────────────────── */
.divider { height: 1px; background: var(--border-subtle); border: none; }

/* ── PRINT ────────────────────────────────────────────────────────────── */
@media print { .topnav, .premium-bottom-nav, .menu-sheet-overlay { display: none !important; } }

/* Smooth theme switch (JS adds .theme-transitioning briefly on toggle) */
body.theme-transitioning,
body.theme-transitioning * { transition: background-color 0.35s var(--ease-out), border-color 0.35s var(--ease-out), color 0.35s var(--ease-out) !important; }

/* ============================================================================
   LIGHT THEME — comprehensive component overrides (sleek, readable)
   [data-theme="light"] selectors outrank base .class rules via specificity,
   so these correctly override components in premium.css / landing.css too.
   ============================================================================ */
[data-theme="light"] {
  --bg-base: #F5F6F8;
  --bg-surface: #FFFFFF;
  --bg-elevated: #FFFFFF;
  --bg-card: #FFFFFF;
  --bg-input: #F1F3F6;
  --bg-overlay: rgba(20,22,28,0.45);
  --text-primary: #16181D;
  --text-secondary: #545965;
  --text-muted: #8A8F9C;
  --border-subtle: rgba(15,18,26,0.06);
  --border-default: rgba(15,18,26,0.10);
  --border-medium: rgba(15,18,26,0.15);
  --border-strong: rgba(15,18,26,0.24);
  --primary-dark: #00A87D;
  --glass-bg: rgba(255,255,255,0.72);
  --glass-border: rgba(15,18,26,0.08);
  --shadow-xs: 0 1px 2px rgba(16,24,40,0.05);
  --shadow-md: 0 4px 16px rgba(16,24,40,0.08);
  --shadow-lg: 0 12px 32px rgba(16,24,40,0.10);
  --shadow-xl: 0 24px 56px rgba(16,24,40,0.14);
  --shadow-glow: 0 0 0 1px rgba(var(--primary-rgb),0.15), 0 16px 40px rgba(var(--primary-rgb),0.14);
}

/* Ambient backdrop softened for light */
[data-theme="light"] .bg-field {
  background:
    radial-gradient(900px 500px at 82% -6%, rgba(var(--primary-rgb),0.10), transparent 60%),
    radial-gradient(700px 500px at 6% 12%, rgba(var(--gold-rgb),0.07), transparent 55%),
    var(--bg-base);
}
[data-theme="light"] .grain { opacity: 0.04; }

/* ── Cards ─────────────────────────────────────────────────────────── */
[data-theme="light"] .card,
[data-theme="light"] .card-glass,
[data-theme="light"] .card-glow,
[data-theme="light"] .section-card,
[data-theme="light"] .stat-card,
[data-theme="light"] .card-sm {
  background: #FFFFFF;
  border-color: var(--border-default);
  box-shadow: var(--shadow-md);
  backdrop-filter: none;
}
[data-theme="light"] .card-glass::before,
[data-theme="light"] .feature-card::before { background: linear-gradient(180deg, rgba(15,18,26,0.04), transparent 45%); }
[data-theme="light"] .card-glow { border-color: rgba(var(--primary-rgb),0.22); box-shadow: 0 0 0 1px rgba(var(--primary-rgb),0.10), var(--shadow-lg); }
[data-theme="light"] .card-interactive:hover,
[data-theme="light"] .card-glass:hover,
[data-theme="light"] .section-card:hover { box-shadow: var(--shadow-lg); border-color: var(--border-medium); }

/* ── Navigation ────────────────────────────────────────────────────── */
[data-theme="light"] .topnav { background: rgba(255,255,255,0.85); border-bottom-color: var(--border-subtle); }
[data-theme="light"] .landing-nav-inner { background: rgba(255,255,255,0.75); border-color: var(--border-default); box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset, 0 8px 32px rgba(16,24,40,0.08); }
[data-theme="light"] .landing-nav.scrolled .landing-nav-inner { background: rgba(255,255,255,0.94); }
[data-theme="light"] .sidebar { background: rgba(255,255,255,0.94); border-right-color: var(--border-subtle); }
[data-theme="light"] .sidebar-link:hover { background: rgba(15,18,26,0.04); }
[data-theme="light"] .sidebar-link.active { background: rgba(var(--primary-rgb),0.10); }
[data-theme="light"] .theme-toggle,
[data-theme="light"] .notif-trigger,
[data-theme="light"] .btn-icon { background: #FFFFFF; border-color: var(--border-default); }
[data-theme="light"] .notif-badge,
[data-theme="light"] .sidebar-badge { border-color: #fff; }

/* ── Premium components ────────────────────────────────────────────── */
[data-theme="light"] .mini-stat,
[data-theme="light"] .menu-sheet,
[data-theme="light"] .premium-bottom-nav,
[data-theme="light"] .package-card,
[data-theme="light"] .profile-hero,
[data-theme="light"] .trade-card,
[data-theme="light"] .testimonial-card,
[data-theme="light"] .feature-card,
[data-theme="light"] .stats-ticker-inner,
[data-theme="light"] .hero-visual-card,
[data-theme="light"] .cta-panel {
  background: #FFFFFF;
  border-color: var(--border-default);
  box-shadow: var(--shadow-md);
  backdrop-filter: none;
}
[data-theme="light"] .premium-bottom-nav { box-shadow: 0 -4px 24px rgba(16,24,40,0.08); }
[data-theme="light"] .package-card-specs,
[data-theme="light"] .amount-pill,
[data-theme="light"] .tabs-pills .tab { background: var(--bg-input); }
[data-theme="light"] .section-card-header { border-bottom-color: var(--border-subtle); }
[data-theme="light"] .menu-sheet-item,
[data-theme="light"] .menu-sheet-link { background: var(--bg-input); }

/* Wallet hero stays a rich emerald card so it anchors the page in light mode too */
[data-theme="light"] .wallet-hero-card {
  background: #0A2A22;
  border-color: rgba(var(--primary-rgb),0.28);
  box-shadow: 0 20px 48px rgba(0,80,60,0.22);
}

/* ── Auth ──────────────────────────────────────────────────────────── */
[data-theme="light"] .auth-card { background: #FFFFFF; box-shadow: var(--shadow-xl); }

/* ── Forms ─────────────────────────────────────────────────────────── */
[data-theme="light"] .input,
[data-theme="light"] textarea.input,
[data-theme="light"] select.input { background: var(--bg-input); border-color: var(--border-default); }
[data-theme="light"] .input:focus { background: #fff; border-color: rgba(var(--primary-rgb),0.5); }
[data-theme="light"] .toggle-track { background: #E2E5EA; border-color: var(--border-default); }

/* ── Tables ────────────────────────────────────────────────────────── */
[data-theme="light"] .table th { background: var(--bg-input); color: var(--text-muted); border-bottom-color: var(--border-default); }
[data-theme="light"] .table tbody tr:hover { background: rgba(15,18,26,0.02); }
[data-theme="light"] .table-wrap { border-color: var(--border-default); }

/* ── Modals / dropdowns / toasts ───────────────────────────────────── */
[data-theme="light"] .modal-content,
[data-theme="light"] .dropdown-menu,
[data-theme="light"] .notif-dropdown,
[data-theme="light"] .toast { background: #FFFFFF; border-color: var(--border-medium); box-shadow: var(--shadow-xl); }
[data-theme="light"] .dropdown-item:hover { background: var(--bg-input); }

/* ── Progress / misc surfaces ──────────────────────────────────────── */
[data-theme="light"] .progress,
[data-theme="light"] .coverage-bar,
[data-theme="light"] .skeleton,
[data-theme="light"] .empty-state-icon { background: #E9ECF1; }
[data-theme="light"] .market-ticker { background: #FFFFFF; border-color: var(--border-subtle); }
[data-theme="light"] .chip { background: rgba(var(--gold-rgb),0.08); }
[data-theme="light"] .badge-neutral { background: var(--bg-input); border-color: var(--border-default); }

/* Selection */
[data-theme="light"] ::selection { background: rgba(var(--primary-rgb),0.22); color: #06120E; }

/* Scrollbar */
[data-theme="light"] ::-webkit-scrollbar-thumb { background: rgba(15,18,26,0.18); }
[data-theme="light"] ::-webkit-scrollbar-thumb:hover { background: rgba(15,18,26,0.28); }

/* ========================================================================
   LIGHT MODE — legibility pass
   The mint --primary (#00E5A8) and pale --gold-soft read as washed-out on
   white when used as TEXT. We introduce darker accent variables for light
   mode and apply them to the specific spots that use accents for text.
   Backgrounds/borders keep the bright colour; only text darkens.
   ======================================================================== */
[data-theme="light"] {
  --primary-ink: #047857;      /* readable green for text/links on white */
  --gold-ink:    #8A6D1F;      /* readable gold for eyebrows/labels */
  --text-primary: #111318;     /* a touch darker for crisp headings */
  --text-secondary: #3F4451;
  --text-muted: #6B7280;       /* was too light at #8A8F9C */
  --border-default: rgba(15,18,26,0.12);
  --border-medium: rgba(15,18,26,0.18);
}

/* Eyebrow / section labels used gold-soft (invisible on white) */
[data-theme="light"] .section-eyebrow,
[data-theme="light"] .eyebrow { color: var(--gold-ink) !important; }

/* Accent TEXT → darker green (backgrounds/borders stay bright) */
[data-theme="light"] .badge-primary { color: var(--primary-ink); background: rgba(var(--primary-rgb),0.14); }
[data-theme="light"] .tabs .tab.active { color: var(--primary-ink); border-bottom-color: var(--primary-ink); }
[data-theme="light"] .amount-pill.selected,
[data-theme="light"] .amount-pill:hover,
[data-theme="light"] .notif-dropdown-footer a,
[data-theme="light"] .section-card-action,
[data-theme="light"] .text-accent,
[data-theme="light"] a.vfy-link,
[data-theme="light"] .topnav-balance { color: var(--primary-ink) !important; }
[data-theme="light"] .topnav-balance { background: rgba(var(--primary-rgb),0.10); border-color: rgba(var(--primary-rgb),0.28); }

/* Money figures: bright mint is hard to read on white → darker green,
   but keep semantic red/green for +/- amounts */
[data-theme="light"] .text-money { color: var(--text-primary); }
[data-theme="light"] .wallet-bal-amount { color: #fff; } /* stays on dark hero */
[data-theme="light"] .tx-amount.positive { color: #067647; }
[data-theme="light"] .tx-amount.negative { color: #C41E3A; }

/* Solid primary buttons: ensure the label on mint is dark, not white */
[data-theme="light"] .btn-primary { color: #06231B; }

/* Links in body copy */
[data-theme="light"] a:not(.btn):not(.nav-link):not(.topnav-brand) { color: var(--primary-ink); }

/* Inputs: clearer field edges and placeholder contrast */
[data-theme="light"] .input,
[data-theme="light"] .form-control,
[data-theme="light"] select.input,
[data-theme="light"] textarea.input {
  background: #FFFFFF;
  border-color: rgba(15,18,26,0.16);
  color: var(--text-primary);
}
[data-theme="light"] .input:focus { border-color: var(--primary-ink); box-shadow: 0 0 0 3px rgba(var(--primary-rgb),0.15); }
[data-theme="light"] .input::placeholder { color: #9AA0AD; }

/* Badges: darken text so tinted pills stay readable on white */
[data-theme="light"] .badge-success { color: #067647; }
[data-theme="light"] .badge-warning { color: #96610A; }
[data-theme="light"] .badge-danger  { color: #C41E3A; }
[data-theme="light"] .badge-info    { color: #1D4ED8; }
[data-theme="light"] .badge-neutral { color: #4B5563; }

/* Muted helper text was too faint */
[data-theme="light"] .text-muted,
[data-theme="light"] .text-micro,
[data-theme="light"] .form-hint { color: #6B7280; }

/* Dividers a touch more visible */
[data-theme="light"] .divider { background: rgba(15,18,26,0.10); }
