/* ============================================================
   WAREGENT — DESIGN TOKENS  v44
   Brand: Logo Blue (#0A4DA8) replaces old Indigo (#6366F1)
   ============================================================ */
:root {
  /* ── Brand accent (logo-matched blue) ── */
  --accent:        #0A4DA8;
  --accent-hover:  #0A3F8C;
  --accent-dim:    rgba(10,77,168,0.10);
  --accent-border: rgba(10,77,168,0.22);
  --accent-text:   #3B82F6;

  /* ── Brand navy (dark headers / brand bar) ── */
  --brand-navy:    #082050;

  /* ── Status colors — meaning only, never decoration ── */
  --green:        #22C55E;
  --green-dim:    rgba(34,197,94,0.10);
  --green-border: rgba(34,197,94,0.20);
  --green-text:   #16A34A;

  --yellow:        #F59E0B;
  --yellow-dim:    rgba(245,158,11,0.10);
  --yellow-border: rgba(245,158,11,0.20);
  --yellow-text:   #B45309;

  --red:           #EF4444;
  --red-dim:       rgba(239,68,68,0.10);
  --red-border:    rgba(239,68,68,0.20);
  --red-text:      #DC2626;

  --blue:          #3B82F6;
  --blue-dim:      rgba(59,130,246,0.10);
  --blue-border:   rgba(59,130,246,0.20);
  --blue-text:     #2563EB;

  /* orange/purple retained — used by existing badges (.badge-orange/.badge-purple) */
  --orange:        #F97316; --orange-dim: rgba(249,115,22,0.10); --orange-border: rgba(249,115,22,0.20); --orange-text: #EA580C;
  --purple:        #A855F7; --purple-dim: rgba(168,85,247,0.10); --purple-border: rgba(168,85,247,0.20); --purple-text: #9333EA;

  /* ── Radius ── */
  --r-xs:  3px;
  --r-sm:  4px;
  --r:     6px;
  --r-md:  8px;
  --r-lg:  10px;
  --r-xl:  14px;
  --r-2xl: 20px;
  --r-pill:9999px;

  /* ── Transition ── */
  --t:      150ms ease;
  --t-md:   200ms ease;
  --t-slow: 300ms ease;

  /* ── Layout ── */
  --sidebar-w:   224px;
  --topbar-h:    52px;
  --content-max: 1160px;

  /* ── Spacing scale (8px base) ── */
  --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;
}

/* ── DARK (default) ── */
[data-theme="dark"] {
  --bg:        #0A0A0E;
  --bg-2:      #111116;
  --bg-3:      #17171D;
  --bg-4:      #1D1D25;
  --bg-5:      #23232D;
  --bd:        #1E1E28;
  --bd-2:      #28283A;
  --bd-3:      #34344A;
  --tx:        #F4F4FA;
  --tx-2:      #ABABC4;
  --tx-3:      #74748C;
  --tx-4:      #45455C;
  --input-bg:  #14141A;
  --input-bd:  #28283A;
  --scroll-thumb: #2A2A3A;

  --shadow-xs: 0 1px 2px rgba(0,0,0,.25);
  --shadow-sm: 0 1px 4px rgba(0,0,0,.30);
  --shadow:    0 2px 8px rgba(0,0,0,.35);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.40);
  --shadow-xl: 0 16px 48px rgba(0,0,0,.50);

  /* Dark theme: status text is lighter for legibility on dark bg */
  --green-text:  #4ADE80;
  --yellow-text: #FCD34D;
  --red-text:    #FCA5A5;
  --blue-text:   #93C5FD;
  --accent-text: #60A5FA;
}

/* ── LIGHT ── */
[data-theme="light"] {
  --bg:        #F1F3F4;
  --bg-2:      #FFFFFF;
  --bg-3:      #E8EAED;
  --bg-4:      #DEE1E6;
  --bg-5:      #D3D7DD;
  --bd:        #DADCE0;
  --bd-2:      #C4C7CC;
  --bd-3:      #B0B4BA;
  --tx:        #1A1C1E;   /* WCAG AA body text — never use tx-3/tx-4 for body */
  --tx-2:      #3C4043;   /* secondary text — still passes AA */
  --tx-3:      #5F6368;   /* captions ONLY */
  --tx-4:      #80868B;   /* disabled ONLY */
  --input-bg:  #FFFFFF;
  --input-bd:  #DADCE0;
  --scroll-thumb: #DADCE0;

  --shadow-xs: 0 1px 2px rgba(0,0,0,.06);
  --shadow-sm: 0 1px 4px rgba(0,0,0,.08);
  --shadow:    0 2px 8px rgba(0,0,0,.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.10);
  --shadow-xl: 0 16px 48px rgba(0,0,0,.12);

  /* Light theme: status text must be dark enough on white (AA) */
  --green-text:  #16A34A;
  --yellow-text: #B45309;
  --red-text:    #DC2626;
  --blue-text:   #2563EB;
  --accent-text: #0A4DA8;
}