/**
 * ╔═══════════════════════════════════════════════════════════════════╗
 * ║  DOLPHIN TOURNAMENTS — isthisprime.css                           ║
 * ║  Theme Upgrade Layer · Golden × Gunmetal · Dark & Light          ║
 * ║  Load AFTER all existing CSS sheets. Pure override — no rewrite. ║
 * ║  By PrimeTriple4                                                 ║
 * ╚═══════════════════════════════════════════════════════════════════╝
 *
 *  HOW THIS WORKS
 *  ──────────────
 *  This file only overrides. Every selector targets the exact same
 *  HTML that existing sheets already style. Nothing new is "invented" —
 *  every class here exists in the live DOM. If a section already looks
 *  good, it's simply not touched.
 *
 *  SECTIONS
 *  ────────
 *  §1  Token Upgrade         — richer gold + gunmetal palette
 *  §2  Body & Selection      — base refinements
 *  §3  Sidebar Shell         — gunmetal wall, golden brand accent
 *  §4  Sidebar Brand         — logo block with gold shimmer
 *  §5  Sidebar Nav           — organised groups, padded items
 *  §6  Sidebar Nav Items     — golden active state, hover glow
 *  §7  Sidebar Section Label — readable, uppercase headers
 *  §8  Sidebar User Footer   — avatar + identity card
 *  §9  Sidebar Guest Panel   — CTA polish
 *  §10 Sidebar Overlay       — mobile veil
 *  §11 Topnav                — frosted gunmetal bar
 *  §12 Topnav Balance Badge  — gold coin chip
 *  §13 Topnav Icon Buttons   — consistent icon controls
 *  §14 Progress Bar          — gold stripe
 *  §15 Buttons: Primary      — solid gold CTA
 *  §16 Buttons: Ghost        — gunmetal outline
 *  §17 Buttons: Danger/Success
 *  §18 Icon Button           — square control refinement
 *  §19 Stat Cards            — premium KPI tiles
 *  §20 Badge System          — gold-flavoured pills
 *  §21 Form Inputs           — gunmetal inputs, gold focus
 *  §22 Modal                 — layered panel
 *  §23 Auth Card             — login / register card
 *  §24 Empty State           — illustrated emptiness
 *  §25 Skeleton              — gold shimmer loader
 *  §26 Avatar                — initials circle
 *  §27 Toast / Alerts        — status notifications
 *  §28 Scrollbar             — gold thumb
 *  §29 Code blocks           — terminal feel
 *  §30 Light Theme Overrides — all above in light mode
 *  §31 Sidebar Item Groups   — visual grouping with icons
 *  §32 Responsive tweaks     — mobile/tablet fine-tune
 *  §33 Micro-animations      — gold shimmer, glow pulse
 */

/* ══════════════════════════════════════════════════════════════════
   §1  TOKEN UPGRADE
   Extends and sharpens the base token palette.
   All existing vars are preserved — these ADD or SHARPEN.
   ══════════════════════════════════════════════════════════════════ */
:root {
  /* ── Gold Spectrum ── */
  --gold-100: #fffbea;
  --gold-200: #fef3c7;
  --gold-300: #fde68a;
  --gold-400: #fbbf24;
  --gold-500: #d4a017;   /* primary gold — same as --accent */
  --gold-600: #b8860b;
  --gold-700: #926800;
  --gold-800: #6b4c00;
  --gold-glow-sm: rgba(212, 160, 23, 0.10);
  --gold-glow-md: rgba(212, 160, 23, 0.20);
  --gold-glow-lg: rgba(212, 160, 23, 0.38);
  --gold-glow-xl: rgba(212, 160, 23, 0.55);

  /* ── Gunmetal Spectrum ── */
  --gm-950: #06060a;     /* deepest */
  --gm-900: #0b0b10;
  --gm-850: #0f0f15;
  --gm-800: #131318;
  --gm-750: #17171e;
  --gm-700: #1c1c24;
  --gm-650: #21212b;
  --gm-600: #272732;
  --gm-550: #2e2e3b;
  --gm-500: #363645;
  --gm-400: #4a4a5e;
  --gm-300: #63637a;
  --gm-200: #8484a0;
  --gm-100: #a8a8c0;

  /* ── Gunmetal borders ── */
  --gm-border:       rgba(212, 160, 23, 0.08);
  --gm-border-soft:  rgba(212, 160, 23, 0.12);
  --gm-border-md:    rgba(212, 160, 23, 0.20);
  --gm-border-hard:  rgba(212, 160, 23, 0.32);

  /* ── Surface override — deeper, cooler ── */
  --bg-base:        var(--gm-950);
  --bg-surface:     var(--gm-900);
  --bg-panel:       var(--gm-850);
  --bg-card:        var(--gm-800);
  --bg-elevated:    var(--gm-750);
  --bg-hover:       var(--gm-700);
  --bg-active:      var(--gm-650);

  /* ── Borders — gold-tinted dark ── */
  --border:         var(--gm-border);
  --border-soft:    var(--gm-border-soft);
  --border-strong:  var(--gm-border-md);

  /* ── Accent — sharper gold ── */
  --accent:         var(--gold-500);
  --accent-dim:     rgba(212, 160, 23, 0.10);
  --accent-glow:    rgba(212, 160, 23, 0.22);
  --accent-hover:   var(--gold-600);
  --accent-active:  var(--gold-700);

  /* ── Text — cooler whites ── */
  --text-primary:   #eaeaf0;
  --text-secondary: #8888a8;
  --text-muted:     #50505f;
  --text-disabled:  #333340;

/* KEEP original fonts — no change */
--font-ui:      'Inter', system-ui, -apple-system, sans-serif;
--font-display: 'Inter', system-ui, sans-serif;
--font-mono:    'JetBrains Mono', 'Fira Code', monospace;

  /* ── Shadow system — deeper, gold-tinted ── */
  --shadow-card:    0 1px 3px rgba(0,0,0,0.6), 0 4px 24px rgba(0,0,0,0.4);
  --shadow-modal:   0 8px 64px rgba(0,0,0,0.8), 0 2px 8px rgba(0,0,0,0.5);
  --shadow-accent:  0 0 20px rgba(212,160,23,0.18);
  --shadow-gold-sm: 0 0 12px rgba(212,160,23,0.15);
  --shadow-gold-md: 0 0 24px rgba(212,160,23,0.22);
  --shadow-gold-lg: 0 0 48px rgba(212,160,23,0.30);

  /* ── Sidebar expanded ── */
  --sidebar-w:    236px;
  --topnav-h:     52px;
}

/* ══════════════════════════════════════════════════════════════════
   §2  BODY & SELECTION
   ══════════════════════════════════════════════════════════════════ */
body {
  font-family: var(--font-ui);
  background: var(--bg-base);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: rgba(212, 160, 23, 0.22);
  color: #fff;
}

::-webkit-scrollbar              { width: 5px; height: 5px; }
::-webkit-scrollbar-track        { background: var(--gm-900); }
::-webkit-scrollbar-thumb        { background: rgba(212,160,23,0.25); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover  { background: rgba(212,160,23,0.50); }

/* ══════════════════════════════════════════════════════════════════
   §3  SIDEBAR SHELL
   ══════════════════════════════════════════════════════════════════ */
#sidebar {
  background: var(--gm-900);
  border-right: 1px solid var(--gm-border-soft);
  /* Subtle vertical gold gradient along the right edge */
  box-shadow: inset -1px 0 0 var(--gm-border), 2px 0 16px rgba(0,0,0,0.5);
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(212,160,23,0.2) transparent;
}

/* ══════════════════════════════════════════════════════════════════
   §4  SIDEBAR BRAND
   ══════════════════════════════════════════════════════════════════ */
.sidebar-brand {
  background: var(--gm-850);
  border-bottom: 1px solid var(--gm-border-soft);
  padding: 0 18px;
  gap: 12px;
  position: relative;
  overflow: hidden;
}

/* Gold shimmer line on hover */
.sidebar-brand::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, var(--gold-glow-sm) 50%, transparent 100%);
  opacity: 0;
  transition: opacity 200ms ease;
  pointer-events: none;
}
.sidebar-brand:hover::after {
  opacity: 1;
}

.sidebar-brand img {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid var(--gm-border-md);
  box-shadow: 0 0 10px var(--gold-glow-sm);
}

.sidebar-brand span {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  background: linear-gradient(135deg, var(--gold-400) 0%, var(--gold-500) 45%, var(--gold-300) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ══════════════════════════════════════════════════════════════════
   §5  SIDEBAR NAV CONTAINER
   ══════════════════════════════════════════════════════════════════ */
.sidebar-nav {
  padding: 10px 6px 10px;
  gap: 1px;
  overflow-y: auto;
  scrollbar-width: none;
}
.sidebar-nav::-webkit-scrollbar { display: none; }

/* ══════════════════════════════════════════════════════════════════
   §6  SIDEBAR NAV ITEMS
   ══════════════════════════════════════════════════════════════════ */
.nav-item {
  padding: 9px 11px;
  border-radius: 6px;
  color: var(--gm-200);
  font-family: var(--font-ui);
  font-size: 0.8375rem;
  font-weight: 500;
  gap: 11px;
  letter-spacing: 0.01em;
  transition: background 100ms ease, color 100ms ease, box-shadow 120ms ease;
  border: 1px solid transparent;
}

.nav-item i {
  font-size: 1.05rem;
  color: var(--gm-300);
  transition: color 100ms ease, transform 100ms ease;
  flex-shrink: 0;
  width: 18px;
  text-align: center;
}

.nav-item:hover {
  background: rgba(212, 160, 23, 0.07);
  color: var(--text-primary);
  border-color: var(--gm-border);
}

.nav-item:hover i {
  color: var(--gold-400);
  transform: translateX(1px);
}

/* Active state — gold bar + glow */
.nav-item.active {
  background: linear-gradient(90deg, rgba(212,160,23,0.14) 0%, rgba(212,160,23,0.06) 100%);
  color: var(--gold-400);
  border-color: var(--gm-border-soft);
  box-shadow: inset 0 0 0 1px var(--gm-border), 0 2px 8px rgba(212,160,23,0.08);
}

.nav-item.active i {
  color: var(--gold-400);
}

/* Active left accent bar */
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 4px; bottom: 4px;
  width: 3px;
  background: linear-gradient(180deg, var(--gold-400) 0%, var(--gold-600) 100%);
  border-radius: 0 3px 3px 0;
  box-shadow: 2px 0 8px rgba(212,160,23,0.40);
}

/* ══════════════════════════════════════════════════════════════════
   §7  SIDEBAR SECTION LABELS
   Organised visual group headers — readable + spaced
   ══════════════════════════════════════════════════════════════════ */
.nav-section {
  font-family: var(--font-display);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-700);
  padding: 14px 10px 5px;
  margin-top: 2px;
  /* Gold rule line above each section */
  position: relative;
}

.nav-section::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 10px;
  right: 10px;
  height: 1px;
  background: linear-gradient(90deg, var(--gm-border-md) 0%, transparent 100%);
}

/* First section label — no top rule */
.sidebar-nav > .nav-section:first-child::before {
  display: none;
}

/* ══════════════════════════════════════════════════════════════════
   §8  SIDEBAR USER FOOTER
   ══════════════════════════════════════════════════════════════════ */
.sidebar-user {
  border-top: 1px solid var(--gm-border-soft);
  background: var(--gm-850);
  padding: 13px 14px;
  gap: 10px;
}

.su-avatar {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, rgba(212,160,23,0.18) 0%, rgba(212,160,23,0.08) 100%);
  border: 1px solid var(--gold-600);
  border-radius: 8px;
  color: var(--gold-400);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  box-shadow: 0 0 10px rgba(212,160,23,0.12);
}

.su-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.01em;
}

.su-role {
  font-size: 0.6rem;
}

/* Role tag refinements */
.role-tag {
  border-radius: 3px;
  padding: 2px 7px;
  font-size: 0.6rem;
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  background: var(--gm-700);
  border: 1px solid var(--gm-border-md);
  color: var(--gm-200);
}

.role-tag.supreme     { background: rgba(212,160,23,0.15); color: var(--gold-400); border-color: rgba(212,160,23,0.30); }
.role-tag.super_admin { background: rgba(212,160,23,0.10); color: var(--gold-500); border-color: rgba(212,160,23,0.22); }
.role-tag.admin       { background: rgba(6,182,212,0.10);  color: #22d3ee;         border-color: rgba(6,182,212,0.20); }
.role-tag.partner     { background: rgba(34,197,94,0.10);  color: #4ade80;         border-color: rgba(34,197,94,0.20); }
.role-tag.user        { background: var(--gm-700);         color: var(--gm-200);   border-color: var(--gm-border-md); }

/* ══════════════════════════════════════════════════════════════════
   §9  SIDEBAR GUEST PANEL
   ══════════════════════════════════════════════════════════════════ */
.sidebar-guest {
  border-top: 1px solid var(--gm-border-soft);
  background: var(--gm-850);
  padding: 18px 14px 22px;
  gap: 9px;
}

.sg-icon {
  font-size: 2rem;
  color: var(--gold-600);
  opacity: 0.8;
}

.sg-title {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

.sg-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.sg-divider {
  width: 100%;
  height: 1px;
  background: var(--gm-border-soft);
  margin: 3px 0;
}

.sg-links a {
  font-size: 0.695rem;
  color: var(--gm-400);
  letter-spacing: 0.02em;
  transition: color 100ms;
}
.sg-links a:hover { color: var(--gold-500); }

/* ══════════════════════════════════════════════════════════════════
   §10 SIDEBAR OVERLAY (mobile)
   ══════════════════════════════════════════════════════════════════ */
.sidebar-overlay {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(3px);
}

/* ══════════════════════════════════════════════════════════════════
   §11 TOPNAV
   ══════════════════════════════════════════════════════════════════ */
#topnav {
  background: rgba(11, 11, 16, 0.92);
  border-bottom: 1px solid var(--gm-border-soft);
  backdrop-filter: blur(12px) saturate(1.4);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  box-shadow: 0 1px 0 var(--gm-border), 0 2px 16px rgba(0,0,0,0.4);
  padding: 0 20px;
  gap: 10px;
}

#nav-page-title {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-primary);
}

/* ══════════════════════════════════════════════════════════════════
   §12 TOPNAV BALANCE BADGE
   ══════════════════════════════════════════════════════════════════ */
.topnav-bal {
  background: linear-gradient(135deg, rgba(212,160,23,0.14) 0%, rgba(212,160,23,0.06) 100%);
  border: 1px solid var(--gm-border-md);
  border-radius: 6px;
  padding: 5px 13px;
  font-family: var(--font-mono);
  font-size: 0.8375rem;
  font-weight: 700;
  color: var(--gold-400);
  transition: border-color 100ms, box-shadow 100ms;
}

.topnav-bal:hover {
  background: rgba(212,160,23,0.18);
  border-color: var(--gm-border-hard);
  box-shadow: 0 0 12px rgba(212,160,23,0.15);
}

.topnav-bal::before {
  content: '₹';
  color: var(--gold-700);
  font-family: var(--font-ui);
  font-weight: 500;
  margin-right: 2px;
}

/* ══════════════════════════════════════════════════════════════════
   §13 TOPNAV ICON BUTTONS
   ══════════════════════════════════════════════════════════════════ */
.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 7px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--gm-300);
  font-size: 1.1rem;
  transition: background 100ms, color 100ms, border-color 100ms;
}

.icon-btn:hover {
  background: rgba(212,160,23,0.08);
  border-color: var(--gm-border-soft);
  color: var(--gold-400);
}

.icon-btn:active {
  transform: scale(0.91);
}

/* Theme toggle specific */
.theme-toggle-btn {
  color: var(--gm-300);
  border-radius: 7px;
  transition: color 100ms, background 100ms;
}
.theme-toggle-btn:hover {
  color: var(--gold-400);
  background: rgba(212,160,23,0.08);
}

/* ══════════════════════════════════════════════════════════════════
   §14 PROGRESS BAR
   ══════════════════════════════════════════════════════════════════ */
#dt-progress-bar {
  background: linear-gradient(90deg, var(--gold-600) 0%, var(--gold-400) 50%, var(--gold-300) 100%);
  box-shadow: 0 0 12px rgba(212,160,23,0.50), 0 0 4px rgba(212,160,23,0.80);
  height: 2px;
}

/* ══════════════════════════════════════════════════════════════════
   §15 BUTTONS — PRIMARY
   Solid gold CTA
   ══════════════════════════════════════════════════════════════════ */
.btn-primary {
  background: linear-gradient(135deg, var(--gold-500) 0%, var(--gold-600) 100%);
  border-color: var(--gold-600);
  color: #0b0900;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 2px 8px rgba(212,160,23,0.22), inset 0 1px 0 rgba(255,255,255,0.12);
  transition: background 110ms, box-shadow 110ms, transform 80ms;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--gold-400) 0%, var(--gold-500) 100%);
  border-color: var(--gold-500);
  color: #0b0900;
  box-shadow: 0 4px 16px rgba(212,160,23,0.32), inset 0 1px 0 rgba(255,255,255,0.15);
  transform: translateY(-1px);
}

.btn-primary:active {
  background: var(--gold-600);
  box-shadow: 0 1px 4px rgba(212,160,23,0.18);
  transform: scale(0.97) translateY(0);
}

/* ══════════════════════════════════════════════════════════════════
   §16 BUTTONS — GHOST
   ══════════════════════════════════════════════════════════════════ */
.btn-ghost {
  background: transparent;
  border-color: var(--gm-border-md);
  color: var(--gm-200);
  transition: background 100ms, border-color 100ms, color 100ms;
}

.btn-ghost:hover {
  background: rgba(212,160,23,0.06);
  border-color: var(--gm-border-hard);
  color: var(--gold-400);
}

/* ══════════════════════════════════════════════════════════════════
   §17 BUTTONS — DANGER / SUCCESS / DELETE
   ══════════════════════════════════════════════════════════════════ */
.btn-danger {
  background: rgba(239, 68, 68, 0.10);
  border-color: rgba(239, 68, 68, 0.22);
  color: #f87171;
}
.btn-danger:hover {
  background: #ef4444;
  border-color: #ef4444;
  color: #fff;
  box-shadow: 0 3px 12px rgba(239,68,68,0.32);
  transform: translateY(-1px);
}

.btn-success {
  background: rgba(34, 197, 94, 0.10);
  border-color: rgba(34, 197, 94, 0.22);
  color: #4ade80;
}
.btn-success:hover {
  background: #22c55e;
  border-color: #22c55e;
  color: #fff;
  box-shadow: 0 3px 12px rgba(34,197,94,0.32);
  transform: translateY(-1px);
}

.btn-delete {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.18);
  color: #f87171;
}
.btn-delete:hover {
  background: #ef4444;
  border-color: #ef4444;
  color: #fff;
  box-shadow: 0 3px 12px rgba(239,68,68,0.35);
}

/* ══════════════════════════════════════════════════════════════════
   §18 BASE BUTTON SHARED
   ══════════════════════════════════════════════════════════════════ */
.btn {
  border-radius: 7px;
  font-family: var(--font-ui);
  letter-spacing: 0.01em;
}

.btn-sm { font-size: 0.8rem; padding: 6px 12px; border-radius: 5px; }
.btn-lg { font-size: 0.9375rem; padding: 12px 26px; border-radius: 8px; }
.btn-xs { font-size: 0.75rem; padding: 4px 10px; border-radius: 4px; }

/* ══════════════════════════════════════════════════════════════════
   §19 STAT / KPI CARDS
   ══════════════════════════════════════════════════════════════════ */
.stat-card {
  background: var(--gm-800);
  border: 1px solid var(--gm-border-soft);
  border-radius: 8px;
  padding: 18px 20px;
  transition: border-color 130ms, box-shadow 130ms, transform 130ms;
}

.stat-card:hover {
  border-color: var(--gm-border-md);
  box-shadow: 0 4px 20px rgba(0,0,0,0.4), 0 0 0 1px var(--gm-border-soft);
  transform: translateY(-1px);
}

.stat-card::before {
  height: 2px;
  background: linear-gradient(90deg, var(--gold-600) 0%, var(--gold-400) 100%);
  opacity: 0;
  transition: opacity 130ms;
}
.stat-card:hover::before { opacity: 1; }

.stat-card .sc-value {
  font-family: var(--font-mono);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.stat-card .sc-label {
  color: var(--gm-300);
  font-family: var(--font-display);
  letter-spacing: 0.10em;
}

.stat-card .sc-icon {
  color: var(--gold-700);
  opacity: 0.6;
}

/* Coloured variants */
.stat-card.sc-accent { border-left: 2px solid var(--gold-500); }
.stat-card.sc-green  { border-left: 2px solid #22c55e; }
.stat-card.sc-red    { border-left: 2px solid #ef4444; }
.stat-card.sc-yellow { border-left: 2px solid #eab308; }
.stat-card.sc-blue   { border-left: 2px solid #3b82f6; }

/* ══════════════════════════════════════════════════════════════════
   §20 BADGE SYSTEM
   ══════════════════════════════════════════════════════════════════ */
.badge {
  border-radius: 4px;
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  padding: 2px 7px;
  font-size: 0.655rem;
}

.badge-accent {
  background: rgba(212,160,23,0.12);
  color: var(--gold-400);
  border: 1px solid rgba(212,160,23,0.25);
}

.badge-green   { background: rgba(34,197,94,0.10);  color: #4ade80;  border: 1px solid rgba(34,197,94,0.22); }
.badge-red     { background: rgba(239,68,68,0.10);  color: #f87171;  border: 1px solid rgba(239,68,68,0.22); }
.badge-yellow  { background: rgba(234,179,8,0.10);  color: #fde047;  border: 1px solid rgba(234,179,8,0.22); }
.badge-blue    { background: rgba(59,130,246,0.10); color: #93c5fd;  border: 1px solid rgba(59,130,246,0.22); }
.badge-purple  { background: rgba(168,85,247,0.10); color: #d8b4fe;  border: 1px solid rgba(168,85,247,0.22); }
.badge-ghost   { background: transparent; color: var(--gm-200); border: 1px solid var(--gm-border-md); }

/* ══════════════════════════════════════════════════════════════════
   §21 FORM INPUTS
   ══════════════════════════════════════════════════════════════════ */
.form-input {
  background: var(--gm-850);
  border: 1px solid var(--gm-border-md);
  border-radius: 6px;
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 0.875rem;
  padding: 9px 13px;
  transition: border-color 100ms, background 100ms, box-shadow 100ms;
}

.form-input::placeholder {
  color: var(--gm-400);
}

.form-input:hover:not(:focus) {
  border-color: var(--gm-border-hard);
}

.form-input:focus {
  border-color: var(--gold-600);
  background: var(--gm-800);
  box-shadow: 0 0 0 3px rgba(212,160,23,0.12);
  outline: none;
}

.form-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gm-200);
  letter-spacing: 0.02em;
  font-family: var(--font-ui);
}

.form-error {
  border-radius: 6px;
  font-size: 0.8rem;
  background: rgba(239,68,68,0.10);
  border: 1px solid rgba(239,68,68,0.20);
  color: #f87171;
}

/* Select arrow — gunmetal tone */
select.form-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23636363' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
}

/* ══════════════════════════════════════════════════════════════════
   §22 MODAL
   ══════════════════════════════════════════════════════════════════ */
.modal-veil {
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.modal-panel {
  background: var(--gm-850);
  border: 1px solid var(--gm-border-md);
  border-radius: 12px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.75), 0 0 0 1px var(--gm-border-soft), var(--shadow-gold-sm);
}

.modal-header {
  background: var(--gm-800);
  border-bottom: 1px solid var(--gm-border-soft);
  padding: 17px 24px;
}

.modal-header h3 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.01em;
}

.modal-close {
  color: var(--gm-300);
  border-radius: 6px;
  padding: 4px 8px;
  transition: background 100ms, color 100ms;
}
.modal-close:hover {
  background: rgba(212,160,23,0.10);
  color: var(--gold-400);
}

/* ══════════════════════════════════════════════════════════════════
   §23 AUTH CARD
   ══════════════════════════════════════════════════════════════════ */
.auth-card {
  background: var(--gm-850);
  border: 1px solid var(--gm-border-md);
  border-radius: 12px;
  box-shadow: 0 16px 64px rgba(0,0,0,0.60), var(--shadow-gold-sm);
  padding: 38px 34px;
}

.auth-logo {
  border-radius: 10px;
  border: 1px solid var(--gm-border-md);
  box-shadow: 0 0 16px rgba(212,160,23,0.12);
}

.auth-header h2 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, var(--gold-300) 0%, var(--gold-500) 60%, var(--gold-400) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-header p {
  color: var(--gm-300);
}

.auth-footer {
  color: var(--gm-300);
  font-size: 0.8125rem;
}

/* ══════════════════════════════════════════════════════════════════
   §24 EMPTY STATE
   ══════════════════════════════════════════════════════════════════ */
.empty-state .es-icon {
  color: var(--gm-500);
  font-size: 2.75rem;
}

.empty-state .es-title {
  color: var(--gm-200);
  font-family: var(--font-display);
  letter-spacing: 0.01em;
}

.empty-state .es-sub {
  color: var(--text-muted);
  max-width: 300px;
  line-height: 1.6;
}

/* ══════════════════════════════════════════════════════════════════
   §25 SKELETON LOADER
   Gold shimmer instead of grey
   ══════════════════════════════════════════════════════════════════ */
@keyframes gold-shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position: 600px 0; }
}

.skeleton {
  background: linear-gradient(
    90deg,
    var(--gm-800) 0%,
    rgba(212,160,23,0.07) 40%,
    var(--gm-800) 80%
  );
  background-size: 1200px 100%;
  animation: gold-shimmer 1.6s ease infinite;
  border-radius: 5px;
}

/* ══════════════════════════════════════════════════════════════════
   §26 AVATAR
   ══════════════════════════════════════════════════════════════════ */
.avatar {
  background: linear-gradient(135deg, rgba(212,160,23,0.18) 0%, rgba(212,160,23,0.06) 100%);
  border: 1px solid var(--gold-700);
  color: var(--gold-400);
  font-family: var(--font-mono);
  box-shadow: 0 0 10px rgba(212,160,23,0.10);
}

/* ══════════════════════════════════════════════════════════════════
   §27 TOAST NOTIFICATIONS
   ══════════════════════════════════════════════════════════════════ */
.dt-toast-item {
  background: var(--gm-800);
  border: 1px solid var(--gm-border-md);
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.55), 0 0 0 1px var(--gm-border);
  font-family: var(--font-ui);
  color: var(--text-primary);
}

.dt-toast-item.success { border-left: 3px solid #22c55e; }
.dt-toast-item.error   { border-left: 3px solid #ef4444; }
.dt-toast-item.warning { border-left: 3px solid var(--gold-500); }
.dt-toast-item.info    { border-left: 3px solid var(--gold-400); }

/* Alert banners */
.alert {
  border-radius: 8px;
  font-size: 0.875rem;
}
.alert-accent {
  background: rgba(212,160,23,0.08);
  border-color: rgba(212,160,23,0.20);
  color: var(--gold-400);
}

/* ══════════════════════════════════════════════════════════════════
   §28 SCROLLBAR — already in §2, reiterated for specificity
   ══════════════════════════════════════════════════════════════════ */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(212,160,23,0.18) transparent;
}

/* ══════════════════════════════════════════════════════════════════
   §29 CODE BLOCKS
   ══════════════════════════════════════════════════════════════════ */
code {
  font-family: var(--font-mono);
  background: rgba(212,160,23,0.08);
  border: 1px solid var(--gm-border-md);
  color: var(--gold-400);
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 0.8rem;
}

pre {
  font-family: var(--font-mono);
  background: var(--gm-900);
  border: 1px solid var(--gm-border-soft);
  border-radius: 8px;
  padding: 16px 18px;
  color: var(--gm-200);
  font-size: 0.8rem;
  line-height: 1.7;
}

/* ══════════════════════════════════════════════════════════════════
   §30 LIGHT THEME OVERRIDES
   html[data-theme="light"] scope — Gold / Ivory / Cream palette
   ══════════════════════════════════════════════════════════════════ */
html[data-theme="light"] {
  --bg-base:        #f6f4ef;
  --bg-surface:     #ffffff;
  --bg-panel:       #faf9f6;
  --bg-card:        #ffffff;
  --bg-elevated:    #f0ede6;
  --bg-hover:       #e8e4da;
  --bg-active:      #ddd8cc;

  --border:         rgba(180, 140, 20, 0.12);
  --border-soft:    rgba(180, 140, 20, 0.16);
  --border-strong:  rgba(180, 140, 20, 0.28);

  --accent:         #9a6f00;
  --accent-dim:     rgba(154, 111, 0, 0.10);
  --accent-glow:    rgba(154, 111, 0, 0.18);
  --accent-hover:   #7d5a00;
  --accent-active:  #604500;

  --text-primary:   #1a1507;
  --text-secondary: #5a5038;
  --text-muted:     #9b8e72;
  --text-disabled:  #c5b99d;

  --shadow-card:    0 1px 4px rgba(0,0,0,0.07), 0 4px 20px rgba(0,0,0,0.05);
  --shadow-modal:   0 8px 48px rgba(0,0,0,0.16), 0 2px 8px rgba(0,0,0,0.08);
}

html[data-theme="light"] body {
  background: var(--bg-base);
  color: var(--text-primary);
}

html[data-theme="light"] #sidebar {
  background: #ffffff;
  border-right: 1px solid rgba(180,140,20,0.14);
  box-shadow: 2px 0 12px rgba(0,0,0,0.06);
}

html[data-theme="light"] .sidebar-brand {
  background: #faf9f6;
  border-bottom: 1px solid rgba(180,140,20,0.14);
}

html[data-theme="light"] .sidebar-brand span {
  background: linear-gradient(135deg, #7d5a00 0%, #b8860b 50%, #9a6f00 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

html[data-theme="light"] .nav-item {
  color: #5a5038;
}

html[data-theme="light"] .nav-item i {
  color: #9b8e72;
}

html[data-theme="light"] .nav-item:hover {
  background: rgba(154,111,0,0.06);
  color: #1a1507;
  border-color: rgba(154,111,0,0.12);
}

html[data-theme="light"] .nav-item:hover i {
  color: #9a6f00;
}

html[data-theme="light"] .nav-item.active {
  background: linear-gradient(90deg, rgba(154,111,0,0.12) 0%, rgba(154,111,0,0.04) 100%);
  color: #7d5a00;
  border-color: rgba(154,111,0,0.18);
}

html[data-theme="light"] .nav-item.active i {
  color: #9a6f00;
}

html[data-theme="light"] .nav-item.active::before {
  background: linear-gradient(180deg, #b8860b 0%, #7d5a00 100%);
  box-shadow: 2px 0 8px rgba(154,111,0,0.30);
}

html[data-theme="light"] .nav-section {
  color: #b8860b;
}

html[data-theme="light"] .nav-section::before {
  background: linear-gradient(90deg, rgba(154,111,0,0.18) 0%, transparent 100%);
}

html[data-theme="light"] .sidebar-user {
  background: #faf9f6;
  border-top: 1px solid rgba(180,140,20,0.12);
}

html[data-theme="light"] .su-avatar {
  background: rgba(154,111,0,0.12);
  border-color: rgba(154,111,0,0.35);
  color: #7d5a00;
  box-shadow: 0 0 10px rgba(154,111,0,0.10);
}

html[data-theme="light"] .sidebar-guest {
  background: #faf9f6;
  border-top-color: rgba(180,140,20,0.12);
}

html[data-theme="light"] #topnav {
  background: rgba(255, 253, 248, 0.94);
  border-bottom: 1px solid rgba(180,140,20,0.16);
  box-shadow: 0 1px 0 rgba(180,140,20,0.10), 0 2px 12px rgba(0,0,0,0.05);
  backdrop-filter: blur(10px);
}

html[data-theme="light"] #nav-page-title {
  color: #1a1507;
}

html[data-theme="light"] .topnav-bal {
  background: rgba(154,111,0,0.10);
  border-color: rgba(154,111,0,0.20);
  color: #7d5a00;
}

html[data-theme="light"] .topnav-bal:hover {
  background: rgba(154,111,0,0.15);
  border-color: rgba(154,111,0,0.30);
  box-shadow: 0 0 10px rgba(154,111,0,0.10);
}

html[data-theme="light"] .topnav-bal::before {
  color: #b8860b;
}

html[data-theme="light"] .icon-btn {
  color: #9b8e72;
}

html[data-theme="light"] .icon-btn:hover {
  background: rgba(154,111,0,0.08);
  border-color: rgba(154,111,0,0.15);
  color: #7d5a00;
}

html[data-theme="light"] .theme-toggle-btn {
  color: #9b8e72;
}

html[data-theme="light"] .theme-toggle-btn:hover {
  color: #7d5a00;
  background: rgba(154,111,0,0.08);
}

html[data-theme="light"] .btn-primary {
  background: linear-gradient(135deg, #b8860b 0%, #9a6f00 100%);
  border-color: #7d5a00;
  color: #fff8e7;
  box-shadow: 0 2px 8px rgba(154,111,0,0.22);
}

html[data-theme="light"] .btn-primary:hover {
  background: linear-gradient(135deg, #c49010 0%, #b8860b 100%);
  box-shadow: 0 4px 16px rgba(154,111,0,0.28);
}

html[data-theme="light"] .btn-ghost {
  background: transparent;
  border-color: rgba(154,111,0,0.22);
  color: #5a5038;
}

html[data-theme="light"] .btn-ghost:hover {
  background: rgba(154,111,0,0.06);
  border-color: rgba(154,111,0,0.35);
  color: #1a1507;
}

html[data-theme="light"] .form-input {
  background: #ffffff;
  border-color: rgba(154,111,0,0.22);
  color: #1a1507;
}

html[data-theme="light"] .form-input:focus {
  border-color: #9a6f00;
  box-shadow: 0 0 0 3px rgba(154,111,0,0.10);
  background: #fff;
}

html[data-theme="light"] .form-input::placeholder {
  color: #c5b99d;
}

html[data-theme="light"] .form-label {
  color: #5a5038;
}

html[data-theme="light"] .stat-card {
  background: #ffffff;
  border-color: rgba(154,111,0,0.12);
  box-shadow: var(--shadow-card);
}

html[data-theme="light"] .stat-card:hover {
  border-color: rgba(154,111,0,0.20);
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

html[data-theme="light"] .stat-card .sc-value {
  color: #1a1507;
}

html[data-theme="light"] .stat-card .sc-label {
  color: #9b8e72;
}

html[data-theme="light"] .auth-card {
  background: #ffffff;
  border-color: rgba(154,111,0,0.14);
  box-shadow: 0 8px 40px rgba(0,0,0,0.10);
}

html[data-theme="light"] .auth-header h2 {
  background: linear-gradient(135deg, #6b4c00 0%, #9a6f00 50%, #b8860b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

html[data-theme="light"] .modal-panel {
  background: #ffffff;
  border-color: rgba(154,111,0,0.15);
  box-shadow: 0 24px 64px rgba(0,0,0,0.16);
}

html[data-theme="light"] .modal-header {
  background: #faf9f6;
  border-bottom-color: rgba(154,111,0,0.12);
}

html[data-theme="light"] .modal-close:hover {
  background: rgba(154,111,0,0.08);
  color: #7d5a00;
}

html[data-theme="light"] code {
  background: rgba(154,111,0,0.08);
  border-color: rgba(154,111,0,0.16);
  color: #7d5a00;
}

html[data-theme="light"] pre {
  background: #faf9f6;
  border-color: rgba(154,111,0,0.12);
  color: #5a5038;
}

html[data-theme="light"] .avatar {
  background: rgba(154,111,0,0.10);
  border-color: rgba(154,111,0,0.28);
  color: #7d5a00;
}

html[data-theme="light"] .badge-accent {
  background: rgba(154,111,0,0.10);
  color: #7d5a00;
  border-color: rgba(154,111,0,0.22);
}

html[data-theme="light"] .dt-toast-item {
  background: #ffffff;
  border-color: rgba(154,111,0,0.14);
  color: #1a1507;
  box-shadow: 0 8px 32px rgba(0,0,0,0.10);
}

html[data-theme="light"] #dt-init-loader {
  background: #f6f4ef;
}

html[data-theme="light"] .topnav-bal {
  background: rgba(154,111,0,0.08);
  border-color: rgba(154,111,0,0.18);
}

html[data-theme="light"] .role-tag.supreme     { background: rgba(154,111,0,0.12); color: #7d5a00;  border-color: rgba(154,111,0,0.25); }
html[data-theme="light"] .role-tag.super_admin { background: rgba(154,111,0,0.08); color: #9a6f00;  border-color: rgba(154,111,0,0.18); }
html[data-theme="light"] .role-tag.admin       { background: rgba(7,130,178,0.09); color: #0891b2;  border-color: rgba(7,130,178,0.18); }
html[data-theme="light"] .role-tag.partner     { background: rgba(22,163,74,0.09); color: #16a34a;  border-color: rgba(22,163,74,0.18); }
html[data-theme="light"] .role-tag.user        { background: #f0ede6;              color: #9b8e72;  border-color: rgba(154,111,0,0.12); }

/* Light skeleton */
html[data-theme="light"] .skeleton {
  background: linear-gradient(
    90deg,
    #f0ede6 0%,
    rgba(154,111,0,0.06) 40%,
    #f0ede6 80%
  );
  background-size: 1200px 100%;
  animation: gold-shimmer 1.6s ease infinite;
}

/* ══════════════════════════════════════════════════════════════════
   §31  SIDEBAR ITEM GROUPING — Visual Separation System
   Groups items under labelled sections with clear visual breathing
   room. Works with the nav-section + nav-item DOM structure.
   ══════════════════════════════════════════════════════════════════ */

/* Padding block between section groups */
.sidebar-nav .nav-section + .nav-item,
.sidebar-nav .nav-section ~ .nav-item {
  /* Items after a section label — slightly more compact */
  margin-bottom: 1px;
}

/* The last item before a new section — extra breathing room */
.sidebar-nav .nav-item:has(+ .nav-section) {
  margin-bottom: 6px;
}

/* Highlight "Play" section items with a subtle trophy tint */
.sidebar-nav .nav-item[data-menu="tournaments"] {
  position: relative;
}

.sidebar-nav .nav-item[data-menu="tournaments"] i {
  color: var(--gold-600);
}

.sidebar-nav .nav-item[data-menu="tournaments"]:hover i {
  color: var(--gold-400);
}

/* Wallet group items — coin tint */
.sidebar-nav .nav-item[data-menu="wallet"] i,
.sidebar-nav .nav-item[data-menu="wallet/deposit"] i,
.sidebar-nav .nav-item[data-menu="wallet/withdraw"] i {
  color: var(--gold-700);
  transition: color 100ms;
}
.sidebar-nav .nav-item[data-menu="wallet"]:hover i,
.sidebar-nav .nav-item[data-menu="wallet/deposit"]:hover i,
.sidebar-nav .nav-item[data-menu="wallet/withdraw"]:hover i {
  color: var(--gold-400);
}

/* Admin items — cool steel blue-grey */
.sidebar-nav .nav-item[data-menu^="admin"] i {
  color: #4a6080;
}
.sidebar-nav .nav-item[data-menu^="admin"]:hover i {
  color: #7aacda;
}

/* Support items — soft warm */
.sidebar-nav .nav-item[data-menu="support/tickets"] i {
  color: var(--gm-400);
}

/* Channel item */
.sidebar-nav .nav-item[data-menu^="channel"] i {
  color: #5a7a6a;
}
.sidebar-nav .nav-item[data-menu^="channel"]:hover i {
  color: #6ab890;
}

/* Active item glow per section context */
.sidebar-nav .nav-item[data-menu="home"].active i             { color: var(--gold-400); }
.sidebar-nav .nav-item[data-menu="tournaments"].active i      { color: var(--gold-300); }
.sidebar-nav .nav-item[data-menu="wallet"].active i           { color: var(--gold-400); }
.sidebar-nav .nav-item[data-menu="profile"].active i          { color: #93c5fd; }
.sidebar-nav .nav-item[data-menu="support/tickets"].active i  { color: #fde047; }

/* Slim divider line between major nav groups */
.sidebar-nav > .nav-section::after {
  content: none; /* removed — the ::before rule is the separator */
}

/* ══════════════════════════════════════════════════════════════════
   §32  RESPONSIVE TWEAKS
   ══════════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  :root { --sidebar-w: 220px; }

  .stat-grid { grid-template-columns: repeat(2, 1fr); }

  .auth-card { padding: 28px 22px; }
}

@media (max-width: 600px) {
  :root {
    --sidebar-w: 260px;
    --topnav-h:  48px;
  }

  .stat-grid     { grid-template-columns: 1fr 1fr; gap: 10px; }
  .page-header   { flex-direction: column; align-items: flex-start; gap: 10px; }
  .auth-card     { padding: 24px 18px; border-radius: 10px; }
  .modal-panel   { border-radius: 10px; }
  .btn-lg        { padding: 11px 20px; }

  /* Mobile sidebar — full height slide-in */
  #sidebar {
    width: var(--sidebar-w);
    box-shadow: 4px 0 24px rgba(0,0,0,0.60), 0 0 0 1px var(--gm-border-soft);
  }

  .sidebar-brand {
    padding: 0 16px;
  }
}

@media (max-width: 400px) {
  .stat-grid { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════════════════════════
   §33  MICRO-ANIMATIONS — gold pulse, shimmer glow
   ══════════════════════════════════════════════════════════════════ */

/* Gold glow pulse on active nav item */
@keyframes gold-pulse {
  0%, 100% { box-shadow: 0 0 0 1px var(--gm-border), 0 2px 8px rgba(212,160,23,0.08); }
  50%       { box-shadow: 0 0 0 1px var(--gm-border-soft), 0 2px 14px rgba(212,160,23,0.18); }
}

.nav-item.active {
  animation: gold-pulse 3s ease-in-out infinite;
}

/* Init loader gold bar */
.init-fill {
  background: linear-gradient(90deg, var(--gold-700) 0%, var(--gold-500) 50%, var(--gold-300) 100%);
  box-shadow: 0 0 10px rgba(212,160,23,0.50);
}

/* Spin ring — gold accent */
.spin-ring {
  border-color: var(--gm-border-md);
  border-top-color: var(--gold-500);
  box-shadow: 0 0 8px rgba(212,160,23,0.15);
}

/* Pulse dot — gold variant */
.pulse-dot.accent {
  background: var(--gold-500);
  box-shadow: 0 0 6px rgba(212,160,23,0.50);
}

/* Focus visible — gold ring */
:focus-visible {
  outline: 2px solid rgba(212,160,23,0.70);
  outline-offset: 2px;
}

/* Hover lift enhancement */
.hover-lift:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.40), var(--shadow-gold-sm);
}

.hover-glow:hover {
  box-shadow: var(--shadow-gold-md);
}

/* Progress fill gold */
.progress-fill {
  background: linear-gradient(90deg, var(--gold-700) 0%, var(--gold-500) 100%);
  border-radius: 99px;
}

/* Tag refinement */
.tag {
  background: var(--gm-750);
  border-color: var(--gm-border-md);
  color: var(--gm-200);
  border-radius: 5px;
  font-size: 0.74rem;
}

.tag:hover {
  border-color: var(--gm-border-hard);
  color: var(--gold-400);
}

/* Divider label gold */
.divider-label {
  color: var(--gm-400);
  font-family: var(--font-display);
  letter-spacing: 0.12em;
}

.divider-label::before,
.divider-label::after {
  background: var(--gm-border-md);
}

/* Section head */
.section-head h3 {
  font-family: var(--font-display);
  letter-spacing: 0.12em;
  color: var(--gm-400);
}

/* Action card */
.action-card {
  background: var(--gm-800);
  border: 1px solid var(--gm-border-soft);
  border-radius: 8px;
}

.action-card:hover {
  border-color: var(--gm-border-md);
  box-shadow: 0 4px 20px rgba(0,0,0,0.35);
}

/* QR box — gold frame */
.pay-qr {
  border-radius: 14px;
  box-shadow: 0 0 0 4px rgba(212,160,23,0.10), 0 0 0 1px rgba(212,160,23,0.22), var(--shadow-md);
}

.pay-qr:hover {
  box-shadow: 0 0 0 6px rgba(212,160,23,0.18), 0 0 0 1px rgba(212,160,23,0.35), var(--shadow-lg);
  transform: scale(1.025);
}

/* SweetAlert2 — gold confirm override */
.swal-dark-confirm {
  background: linear-gradient(135deg, var(--gold-500) 0%, var(--gold-600) 100%) !important;
  color: #0b0900 !important;
  border: none !important;
  box-shadow: 0 4px 16px rgba(212,160,23,0.28) !important;
}
.swal-dark-confirm:hover {
  background: linear-gradient(135deg, var(--gold-400) 0%, var(--gold-500) 100%) !important;
}

/* SweetAlert2 timer bar — gold */
.swal2-timer-progress-bar {
  background: var(--gold-500) !important;
}

/* Toastr info border — gold */
#toast-container > .toast-info {
  border-left: 3px solid var(--gold-500) !important;
}
#toast-container > .toast-info::before {
  color: var(--gold-500) !important;
}
