/* ZeniX AI Vigilance — design tokens (t38)
 * Calm, compact, enterprise UI: neutral grey surfaces, one accent blue,
 * 4px radii, 1px borders, no gradients, no heavy shadows.
 * Light set on :root, dark set on body.dark (toggleDarkMode / localStorage 'pharma_dark').
 * The legacy names (--bg, --card, --text2, --r-s ...) are kept because ~3,000
 * inline styles in index.html reference them; they now resolve to the new palette.
 */

:root, body {   /* also on body so the var() aliases re-resolve under body.dark */
  /* Type */
  --font-sans: "Source Sans 3", "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "Source Code Pro", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --fs-xs: 12px;   /* labels, meta, table captions */
  --fs-sm: 14px;   /* base body text */
  --fs-md: 16px;   /* section / page titles */
  --fs-lg: 20px;   /* view headings */
  --fs-xl: 24px;   /* stat values */
  --lh: 1.45;

  /* Surfaces */
  --surface-0: #FFFFFF;    /* cards, inputs, topbar */
  --surface-1: #F7F8FA;    /* app canvas, sidebar, table header */
  --surface-2: #EEF0F3;    /* hover, subtle fills */
  --line:      #EEF0F3;    /* default 1px border */
  --line-2:    #DDE1E7;    /* stronger border (inputs) */

  /* Text */
  --ink:   #1D2433;
  --ink-2: #5B6475;
  --ink-3: #8A92A3;

  /* Accent + status */
  --accent:       #2563EB;
  --accent-hover: #1D4ED8;
  --accent-soft:  #EAF1FE;
  --accent-ring:  rgba(37, 99, 235, .25);
  --ok:      #15803D;
  --warn:    #B45309;
  --danger:  #B91C1C;
  --info:    #0E7490;
  --violet:  #6D28D9;

  /* Shape + density */
  --radius: 4px;
  --border-w: 1px;
  --row-h: 32px;
  --pad: 12px;
  --shadow-pop: 0 4px 12px rgba(16, 24, 40, .10);   /* only for floating menus/modals */

  /* Legacy aliases used throughout index.html */
  --bg:      var(--surface-1);
  --bg1:     var(--surface-1);
  --bg2:     var(--surface-0);
  --card:    var(--surface-0);
  --card2:   var(--surface-1);
  --surface: var(--surface-1);
  --surface2: var(--surface-2);
  --border:  var(--line);
  --border2: var(--line-2);
  --text:    var(--ink);
  --text1:   var(--ink);
  --text2:   var(--ink-2);
  --text3:   var(--ink-3);
  --blue:    var(--accent);
  --blue-l:  #60A5FA;
  --blue-d:  var(--accent-hover);
  --blue20:  rgba(37, 99, 235, .2);
  --navy:    var(--ink);
  --green:   var(--ok);
  --green-l: #22C55E;
  --amber:   var(--warn);
  --red:     var(--danger);
  --purple:  var(--violet);
  --teal:    var(--info);
  --r:       var(--radius);
  --r-s:     var(--radius);
  --r-m:     var(--radius);
  --sidebar: 240px;
}

body.dark {
  --surface-0: #161A22;
  --surface-1: #0F1218;
  --surface-2: #1F2430;
  --line:      #262C38;
  --line-2:    #343B4A;

  --ink:   #E6E9EF;
  --ink-2: #A3ABBA;
  --ink-3: #737C8E;

  --accent:       #5B8DEF;
  --accent-hover: #7AA2F3;
  --accent-soft:  #1A2540;
  --accent-ring:  rgba(91, 141, 239, .35);
  --ok:      #4ADE80;
  --warn:    #FBBF24;
  --danger:  #F87171;
  --info:    #22D3EE;
  --violet:  #A78BFA;
  --shadow-pop: 0 4px 12px rgba(0, 0, 0, .45);

  --blue-l:  #93C5FD;
  --blue20:  rgba(91, 141, 239, .2);
  --green-l: #86EFAC;
}
