/* Fleet Safety — design tokens v0.1 (placeholder palette from the client MVP: navy / teal / slate)
   Single source for colour, type, radius, spacing and elevation.
   No component writes a hex value. Prefix --fs-. Mirrors the structure of o10 tokens.css. */

:root {
  /* brand */
  --fs-brand:            #0e7490;   /* teal: primary actions, active nav, links */
  --fs-brand-hover:      #155e75;
  --fs-brand-subtle:     #e0f2f7;
  --fs-ink:              #0b2545;   /* navy: sidebar, login panel, headings */
  --fs-ink-hover:        #123e6b;

  /* surfaces */
  --fs-canvas:           #f4f7fb;
  --fs-surface:          #ffffff;
  --fs-surface-raised:   #ffffff;
  --fs-surface-sunken:   #eef2f7;
  --fs-border:           #e6edf5;
  --fs-border-strong:    #cbd5e1;

  /* text */
  --fs-text:             #0f172a;
  --fs-text-secondary:   #475569;
  --fs-text-tertiary:    #64748b;
  --fs-text-muted:       #94a3b8;   /* decorative only; below AA */
  --fs-text-on-ink:      #ffffff;
  --fs-text-on-brand:    #ffffff;

  /* status — report and action statuses */
  --fs-status-new:         #2563eb;  --fs-status-new-bg:         #e0ebff;
  --fs-status-review:      #7c3aed;  --fs-status-review-bg:      #ede9fe;
  --fs-status-assigned:    #b45309;  --fs-status-assigned-bg:    #fef3c7;
  --fs-status-progress:    #0e7490;  --fs-status-progress-bg:    #e0f2f7;
  --fs-status-awaiting:    #0369a1;  --fs-status-awaiting-bg:    #e0f2fe;
  --fs-status-closed:      #047857;  --fs-status-closed-bg:      #d1fae5;
  --fs-status-rejected:    #475569;  --fs-status-rejected-bg:    #e2e8f0;
  --fs-status-reopened:    #c2410c;  --fs-status-reopened-bg:    #ffedd5;
  --fs-status-merged:      #64748b;  --fs-status-merged-bg:      #f1f5f9;

  /* severity */
  --fs-sev-low:          #047857;    --fs-sev-low-bg:      #d1fae5;
  --fs-sev-medium:       #b45309;    --fs-sev-medium-bg:   #fef3c7;
  --fs-sev-high:         #c2410c;    --fs-sev-high-bg:     #ffedd5;
  --fs-sev-critical:     #b91c1c;    --fs-sev-critical-bg: #fee2e2;

  /* signals */
  --fs-overdue:          #b91c1c;    --fs-overdue-bg:      #fee2e2;
  --fs-warning:          #b45309;    --fs-warning-bg:      #fef3c7;
  --fs-ok:               #047857;    --fs-ok-bg:           #d1fae5;
  --fs-demo:             #92400e;    --fs-demo-bg:         #fde68a;

  /* report types */
  --fs-type-hazard:      #b91c1c;
  --fs-type-near-miss:   #b45309;
  --fs-type-suggestion:  #0e7490;

  /* type */
  --fs-font-display: 'Inter', system-ui, sans-serif;
  --fs-font-ui:      'Inter', system-ui, sans-serif;
  --fs-font-mono:    'JetBrains Mono', ui-monospace, monospace;

  /* radius */
  --fs-r-sm: 6px;  --fs-r-md: 10px;  --fs-r-lg: 14px;  --fs-r-xl: 20px;  --fs-r-full: 999px;

  /* spacing, base 4 */
  --fs-s-1: 4px;  --fs-s-2: 8px;  --fs-s-3: 12px;  --fs-s-4: 16px;
  --fs-s-5: 20px; --fs-s-6: 24px; --fs-s-8: 32px;  --fs-s-12: 48px;

  /* elevation */
  --fs-shadow-raised:  0 1px 2px rgba(11,37,69,.06), 0 10px 22px -18px rgba(11,37,69,.35);
  --fs-shadow-overlay: 0 30px 60px -30px rgba(11,37,69,.45), 0 1px 2px rgba(11,37,69,.08);

  /* layout */
  --fs-sidebar-w: 224px;
  --fs-appbar-h: 56px;
  --fs-tabbar-h: 60px;
  --fs-tap: 44px;
}

[data-theme='dark'] {
  --fs-brand:            #22b8d6;
  --fs-brand-hover:      #5fd0e6;
  --fs-brand-subtle:     #0f3744;
  --fs-ink:              #0a1a2f;
  --fs-ink-hover:        #12304f;

  --fs-canvas:           #0b1320;
  --fs-surface:          #121c2c;
  --fs-surface-raised:   #182538;
  --fs-surface-sunken:   #0e1726;
  --fs-border:           #223148;
  --fs-border-strong:    #334a68;

  --fs-text:             #e8eef7;
  --fs-text-secondary:   #aab8cc;
  --fs-text-tertiary:    #8da0b8;
  --fs-text-muted:       #637a95;
  --fs-text-on-ink:      #e8eef7;
  --fs-text-on-brand:    #06263f;

  --fs-status-new:         #7aa7ff;  --fs-status-new-bg:         #16284a;
  --fs-status-review:      #b69cff;  --fs-status-review-bg:      #26204a;
  --fs-status-assigned:    #f5b94a;  --fs-status-assigned-bg:    #3a2a10;
  --fs-status-progress:    #22b8d6;  --fs-status-progress-bg:    #0f3744;
  --fs-status-awaiting:    #5fb8ec;  --fs-status-awaiting-bg:    #0f2f45;
  --fs-status-closed:      #4ad39a;  --fs-status-closed-bg:      #0f3327;
  --fs-status-rejected:    #a5b4c8;  --fs-status-rejected-bg:    #1f2a3b;
  --fs-status-reopened:    #ff9a5c;  --fs-status-reopened-bg:    #3c2314;
  --fs-status-merged:      #8da0b8;  --fs-status-merged-bg:      #1a2434;

  --fs-sev-low:          #4ad39a;    --fs-sev-low-bg:      #0f3327;
  --fs-sev-medium:       #f5b94a;    --fs-sev-medium-bg:   #3a2a10;
  --fs-sev-high:         #ff9a5c;    --fs-sev-high-bg:     #3c2314;
  --fs-sev-critical:     #ff7b7b;    --fs-sev-critical-bg: #3f1a1a;

  --fs-overdue:          #ff7b7b;    --fs-overdue-bg:      #3f1a1a;
  --fs-warning:          #f5b94a;    --fs-warning-bg:      #3a2a10;
  --fs-ok:               #4ad39a;    --fs-ok-bg:           #0f3327;
  --fs-demo:             #fde68a;    --fs-demo-bg:         #4a3508;

  --fs-type-hazard:      #ff7b7b;
  --fs-type-near-miss:   #f5b94a;
  --fs-type-suggestion:  #22b8d6;

  --fs-shadow-raised:  none;
  --fs-shadow-overlay: 0 16px 40px rgba(0,0,0,.6);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) { color-scheme: dark; }
}

html, body {
  background: var(--fs-canvas);
  color: var(--fs-text);
  font-family: var(--fs-font-ui);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--fs-brand); }
a:hover { color: var(--fs-brand-hover); }
