/* ==========================================================================
   Design tokens — colour, type, spacing, radius, elevation.
   Light theme is the default; dark theme overrides the same names.
   ========================================================================== */
:root{
  /* Brand */
  --navy: #0B2A6B;
  --navy-2: #12397F;
  --accent: #D9480F;

  /* Surfaces */
  --bg: #F3F6FB;
  --surface: #FFFFFF;
  --surface-2: #F8FAFD;
  --surface-3: #EEF3FA;
  --border: #DFE6F1;
  --border-strong: #C6D3E7;

  /* Text */
  --text: #0F1B33;
  --text-2: #43536D;
  --text-3: #6A7A94;

  /* Actions */
  --primary: #1565C0;
  --primary-hover: #0F55A6;
  --primary-soft: #E7F0FC;
  --primary-ink: #0B2A6B;
  --on-primary: #FFFFFF;

  /* Status */
  --success: #157A3C;
  --success-soft: #E3F6EA;
  --warning: #A15C07;
  --warning-soft: #FFF3D9;
  --danger: #C62828;
  --danger-hover: #A91F1F;
  --danger-soft: #FDECEC;
  --info: #1565C0;
  --info-soft: #E7F0FC;
  --violet: #5A3FA0;
  --violet-soft: #EFEAFB;

  /* Sidebar */
  --sidebar-bg: #0B2A6B;
  --sidebar-text: #C9D8F2;
  --sidebar-text-strong: #FFFFFF;
  --sidebar-hover: rgba(255,255,255,.08);
  --sidebar-active: rgba(255,255,255,.14);
  --sidebar-border: rgba(255,255,255,.10);

  /* Type */
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Poppins", var(--font-sans);
  --fs-xs: 12.5px;
  --fs-sm: 14px;
  --fs-md: 16px;
  --fs-lg: 18px;
  --fs-xl: 22px;
  --fs-2xl: 28px;

  /* Spacing (4px scale) */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px;

  /* Radius */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --r-pill: 999px;

  /* Elevation */
  --shadow-xs: 0 1px 2px rgba(15,27,51,.06);
  --shadow-sm: 0 1px 3px rgba(15,27,51,.07), 0 1px 2px rgba(15,27,51,.04);
  --shadow-md: 0 4px 14px rgba(15,27,51,.08), 0 1px 3px rgba(15,27,51,.05);
  --shadow-lg: 0 20px 48px rgba(15,27,51,.22);
  --focus-ring: 0 0 0 3px rgba(21,101,192,.32);

  --overlay: rgba(9,18,38,.55);
  --sidebar-w: 260px;
  --bottom-nav-h: 68px;
  --ease: cubic-bezier(.2,.7,.2,1);

  color-scheme: light;
}

html[data-theme="dark"]{
  --bg: #0A111F;
  --surface: #111B2E;
  --surface-2: #15213A;
  --surface-3: #1A2945;
  --border: #23365A;
  --border-strong: #31497A;

  --text: #EEF3FF;
  --text-2: #B6C5E1;
  --text-3: #8899B9;

  --primary: #6FA8FF;
  --primary-hover: #8FBCFF;
  --primary-soft: #182C50;
  --primary-ink: #CFE0FF;
  --on-primary: #0A1B3A;

  --success: #5FD38D;
  --success-soft: #133524;
  --warning: #FFC15A;
  --warning-soft: #3A2C0F;
  --danger: #FF8A80;
  --danger-hover: #FFA39B;
  --danger-soft: #3D1A1D;
  --info: #6FA8FF;
  --info-soft: #182C50;
  --violet: #CDBEFF;
  --violet-soft: #2B2450;
  --accent: #FF8A4C;

  --sidebar-bg: #0D1628;
  --sidebar-text: #A9BBDB;
  --sidebar-border: rgba(255,255,255,.07);

  --shadow-xs: none;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.35);
  --shadow-md: 0 6px 18px rgba(0,0,0,.35);
  --shadow-lg: 0 24px 56px rgba(0,0,0,.6);
  --focus-ring: 0 0 0 3px rgba(111,168,255,.4);
  --overlay: rgba(2,6,15,.7);

  color-scheme: dark;
}
