/* ==========================================================================
   Tappa NBA Intelligence Platform — Design Tokens & Variables
   Chakra Petch · Unbounded · Tomorrow · Aldrich · Sedgwick Ave Display
   ========================================================================== */
@import url("https://fonts.googleapis.com/css2?family=Aldrich&family=Chakra+Petch:ital,wght@0,400;0,500;0,600;0,700;1,600&family=Sedgwick+Ave+Display&family=Tomorrow:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400;1,600&family=Unbounded:wght@400;500;600;700;800;900&display=swap");

:root {
  /* Tappa Brand Tokens */
  --tappa-orange: #ea580c;
  --tappa-orange-hover: #f97316;
  --tappa-orange-active: #c2410c;
  --tappa-orange-subtle: rgba(234, 88, 12, 0.12);
  --tappa-orange-border: rgba(234, 88, 12, 0.32);

  /* Surface & Canvas (Solid Zinc/Slate — Zero murky blur) */
  --bg-app: #09090b;
  --bg-header: #0d0d11;
  --bg-surface: #121216;
  --bg-surface-elevated: #17171d;
  --bg-surface-hover: #1d1d24;
  --bg-input: #101014;

  /* Tappa Signature Obsidian Lighting & Inset Wells */
  --tappa-surface-gradient: linear-gradient(180deg, #131722 0%, #0c0e15 100%);
  --tappa-border-top: 1px solid rgba(255, 255, 255, 0.12);
  --tappa-border-sides: 1px solid rgba(255, 255, 255, 0.05);
  --tappa-border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  --tappa-inset-bg: #080a10;
  --tappa-inset-border: 1px solid rgba(255, 255, 255, 0.07);
  --tappa-hover-shadow: 0 10px 32px -4px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(234, 88, 12, 0.22);

  /* Crisp 1px Borders */
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-default: rgba(255, 255, 255, 0.12);
  --border-focus: var(--tappa-orange);

  /* Typography */
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-dim: #475569;

  /* Data & State Accents (Functional, not decorative) */
  --accent-blue: #38bdf8;
  --accent-blue-dim: rgba(56, 189, 248, 0.08);
  --accent-blue-border: rgba(56, 189, 248, 0.22);

  --accent-emerald: #34d399;
  --accent-emerald-dim: rgba(52, 211, 153, 0.08);
  --accent-emerald-border: rgba(52, 211, 153, 0.22);

  --accent-amber: #fbbf24;
  --accent-amber-dim: rgba(251, 191, 36, 0.08);
  --accent-amber-border: rgba(251, 191, 36, 0.22);

  --accent-rose: #f87171;
  --accent-rose-dim: rgba(248, 113, 113, 0.08);
  --accent-rose-border: rgba(248, 113, 113, 0.22);

  --accent-purple: #c084fc;
  --accent-purple-dim: rgba(192, 132, 252, 0.08);
  --accent-purple-border: rgba(192, 132, 252, 0.22);

  /* Typography Scale */
  --font-brand: 'Chakra Petch', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-headline: 'Chakra Petch', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-metric: 'Unbounded', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-sans: 'Tomorrow', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'Aldrich', monospace, sans-serif;
  --font-street: 'Sedgwick Ave Display', cursive, sans-serif;

  /* Strict Geometric Radii (Anti-Slop: No puffy pill buttons) */
  --radius-xs: 3px;
  --radius-sm: 5px;
  --radius-md: 7px;
  --radius-lg: 10px;

  /* Obsidian Plaque System (Arena Ribbon & Broadcast Telemetry Standard) */
  --plaque-bg: #090c14;
  --plaque-bg-elevated: #0e1320;
  --plaque-border: rgba(255, 255, 255, 0.08);
  --plaque-border-hover: rgba(255, 255, 255, 0.16);
  --plaque-radius: var(--radius-xs, 3px);

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 12px -2px rgba(0, 0, 0, 0.65);
  --shadow-lg: 0 12px 28px -4px rgba(0, 0, 0, 0.8);
}

[data-theme="light"] {
  /* Obsidian Plaque System Light Mode */
  --plaque-bg: #f1f3f7;
  --plaque-bg-elevated: #e2e6ee;
  --plaque-border: #cbd5e1;
  --plaque-border-hover: #94a3b8;
  /* Surface & Canvas Light Theme */
  --bg-app: #f4f5f8;
  --bg-header: #ffffff;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f8fafc;
  --bg-surface-hover: #f1f5f9;
  --bg-input: #f8fafc;

  /* Tappa Signature Lighting & Inset Wells for Light Theme */
  --tappa-surface-gradient: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  --tappa-border-top: 1px solid #e2e8f0;
  --tappa-border-sides: 1px solid #e2e8f0;
  --tappa-border-bottom: 1px solid #cbd5e1;
  --tappa-inset-bg: #f1f5f9;
  --tappa-inset-border: 1px solid #e2e8f0;
  --tappa-hover-shadow: 0 10px 24px -4px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(234, 88, 12, 0.35);

  /* Crisp 1px Light Borders */
  --border-subtle: #e2e8f0;
  --border-default: #cbd5e1;
  --border-focus: var(--tappa-orange);

  /* Typography */
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-dim: #94a3b8;

  /* High-Contrast Accessible Accents on Light Backgrounds */
  --accent-blue: #0284c7;
  --accent-blue-dim: rgba(2, 132, 199, 0.08);
  --accent-blue-border: rgba(2, 132, 199, 0.22);

  --accent-emerald: #059669;
  --accent-emerald-dim: rgba(5, 150, 105, 0.08);
  --accent-emerald-border: rgba(5, 150, 105, 0.22);

  --accent-amber: #d97706;
  --accent-amber-dim: rgba(217, 119, 6, 0.08);
  --accent-amber-border: rgba(217, 119, 6, 0.22);

  --accent-rose: #e11d48;
  --accent-rose-dim: rgba(225, 29, 72, 0.08);
  --accent-rose-border: rgba(225, 29, 72, 0.22);

  --accent-purple: #9333ea;
  --accent-purple-dim: rgba(147, 51, 234, 0.08);
  --accent-purple-border: rgba(147, 51, 234, 0.22);

  /* Brand Tints Calibrated for Light Canvas */
  --tappa-orange-subtle: rgba(234, 88, 12, 0.08);
  --tappa-orange-border: rgba(234, 88, 12, 0.28);

  /* Light Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px -2px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 28px -4px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] * {
  scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

[data-theme="light"] ::-webkit-scrollbar-track {
  background: #f4f5f8;
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.18);
}

[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
  background: var(--tappa-orange, #ea580c);
}