/* ==========================================================================
 * SAFC | Coaching Hub — Design Tokens (Verified WCAG 2.1 AA/AAA, Refined M1.0B)
 * Palette campionata su assets/branding/safc-logo.png (DEC-10 APPROVED):
 * - Primary Burgundy: #AE203E
 * - Ivory:            #EBE8D4
 * - Slate Grey:       #5A5F68
 * - Brand Black:      #000000
 * - Dark Mode Accent: #EE6E88 (6.11:1 - 6.64:1 AA)
 * ========================================================================== */

:root,
[data-theme="light"] {
  color-scheme: light;

  /* Brand Base */
  --safc-burgundy: #AE203E;
  --safc-burgundy-hover: #8E1832;
  --safc-burgundy-dark: #7E142B;
  --safc-ivory: #EBE8D4;
  --safc-ivory-light: #F7F5EE;
  --safc-slate: #5A5F68;
  --safc-black: #000000;

  /* Semantic Surfaces & Ink (Light Mode — High-Glare Pitchside Default, lighter M1.0B chrome) */
  --bg-canvas: #F8F6F0;
  --bg-surface: #FFFFFF;
  --bg-surface-alt: #F1EFE4;
  --bg-surface-tint: #FAF8F3;
  --border-subtle: rgba(90, 95, 104, 0.16);
  --border-strong: rgba(90, 95, 104, 0.30);

  --text-primary: #111317;
  --text-secondary: #535861;
  --text-on-brand: #FFFFFF;

  --brand-action-bg: #AE203E;
  --brand-action-hover: #8E1832;
  --brand-fg-accent: #AE203E;
  --brand-soft-bg: rgba(174, 32, 62, 0.08);
  --brand-ring: rgba(174, 32, 62, 0.28);

  /* Semantic Status (WCAG AA/AAA Verified) */
  --status-ok: #166534;
  --status-ok-bg: #DCFCE7;
  --status-warn: #9A3412;
  --status-warn-bg: #FFEDD5;
  --status-danger: #991B1B;
  --status-danger-bg: #FEE2E2;
  --status-tbc: #1E40AF;
  --status-tbc-bg: #DBEAFE;

  /* Football Badges & Missing Data (N/D != 0) */
  --badge-yellow-bg: #FACC15;
  --badge-yellow-fg: #080808;
  --badge-red-bg: #B91C1C;
  --badge-red-fg: #FFFFFF;
  --badge-missing-bg: #ECEEE9;
  --badge-missing-fg: #535861;

  /* Logo Framing */
  --logo-ring: rgba(17, 19, 23, 0.08);
  --logo-bg: transparent;

  /* Typography & Metrics (Refined M1.0B) */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 9999px;
  --shadow-sm: 0 1px 2px rgba(17, 19, 23, 0.04);
  --shadow-md: 0 4px 16px rgba(17, 19, 23, 0.06);

  /* Touch & Layout Metrics */
  --touch-min: 48px;
  --cta-height: 56px;
  --header-height: 64px;
  --bottom-nav-height: 68px;
  --desktop-rail-width: 248px;
}

[data-theme="dark"] {
  color-scheme: dark;

  --bg-canvas: #0D0E10;
  --bg-surface: #15171B;
  --bg-surface-alt: #1E2127;
  --bg-surface-tint: #1A1D23;
  --border-subtle: rgba(235, 232, 212, 0.10);
  --border-strong: rgba(235, 232, 212, 0.22);

  --text-primary: #EBE8D4;
  --text-secondary: #A9AFB8;
  --text-on-brand: #FFFFFF;

  /* Dark Mode Rule: #AE203E / #B82242 ONLY as solid container with #FFFFFF text; #EE6E88 for foreground accents */
  --brand-action-bg: #B82242;
  --brand-action-hover: #AE203E;
  --brand-fg-accent: #EE6E88;
  --brand-soft-bg: rgba(238, 110, 136, 0.12);
  --brand-ring: rgba(238, 110, 136, 0.35);

  --status-ok: #4ADE80;
  --status-ok-bg: rgba(74, 222, 128, 0.14);
  --status-warn: #FBBF24;
  --status-warn-bg: rgba(251, 191, 36, 0.14);
  --status-danger: #F87171;
  --status-danger-bg: rgba(248, 113, 113, 0.16);
  --status-tbc: #60A5FA;
  --status-tbc-bg: rgba(96, 165, 250, 0.16);

  --badge-missing-bg: #252930;
  --badge-missing-fg: #A9AFB8;

  /* Subtle Ivory ring preserves circular black crest outline without altering PNG */
  --logo-ring: rgba(235, 232, 212, 0.38);
  --logo-bg: rgba(235, 232, 212, 0.08);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.32);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.38);
}
