/* OCS Design Tokens — semantic HSL only, mirrored for dark mode */
:root {
  /* Surfaces */
  --background: 210 20% 98%;
  --foreground: 215 25% 15%;
  --card: 0 0% 100%;
  --card-foreground: 215 25% 15%;
  --popover: 0 0% 100%;

  /* Brand */
  --primary: 214 80% 28%;            /* navy */
  --primary-foreground: 0 0% 100%;
  --primary-soft: 214 80% 95%;
  --accent: 199 89% 48%;             /* cyan-blue */
  --accent-foreground: 0 0% 100%;
  --accent-soft: 199 89% 95%;

  /* Neutrals */
  --secondary: 210 40% 96%;
  --secondary-foreground: 215 25% 25%;
  --muted: 210 25% 95%;
  --muted-foreground: 215 15% 50%;
  --border: 215 20% 88%;
  --border-strong: 215 18% 78%;
  --input: 215 20% 88%;
  --ring: 199 89% 48%;

  /* Status */
  --destructive: 0 72% 51%;
  --destructive-soft: 0 72% 95%;
  --success: 142 60% 38%;
  --success-soft: 142 60% 92%;
  --warning: 38 92% 50%;
  --warning-soft: 38 92% 92%;
  --info: 199 89% 48%;
  --info-soft: 199 89% 95%;

  /* Status pills */
  --status-open: 199 89% 48%;
  --status-new: 214 80% 45%;
  --status-escalated: 0 72% 51%;
  --status-waive: 215 15% 50%;
  --status-recommended: 214 80% 28%;
  --status-surviving: 142 60% 38%;
  --status-rejected: 0 72% 51%;
  --status-drafting: 38 92% 50%;
  --status-complete: 142 60% 38%;

  /* Sidebar */
  --sidebar-bg-from: 214 80% 22%;
  --sidebar-bg-to: 214 80% 14%;
  --sidebar-fg: 0 0% 100%;
  --sidebar-fg-muted: 214 30% 78%;
  --sidebar-active-bg: 199 89% 48%;
  --sidebar-active-fg: 214 80% 14%;
  --sidebar-hover-bg: 214 60% 30%;
  --sidebar-border: 214 60% 18%;
  --sidebar-group: 214 30% 65%;

  /* Delphi */
  --delphi-from: 262 70% 58%;
  --delphi-to: 214 80% 50%;
  --delphi-soft: 262 70% 96%;
  --delphi-ink: 262 50% 35%;

  /* Chart palette (semantic, not by the chart-axis count) */
  --chart-baseline: 215 15% 60%;
  --chart-current: 214 80% 45%;
  --chart-recommended: 199 89% 48%;
  --chart-btl: 38 92% 50%;     /* More Sensitive */
  --chart-atl: 262 60% 55%;    /* Less Sensitive */
  --chart-productive: 142 60% 38%;
  --chart-non-productive: 0 0% 60%;

  /* Type scale */
  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Density */
  --row-h: 32px;
  --input-h: 28px;
  --radius: 6px;
  --radius-sm: 4px;
  --radius-lg: 8px;
}

[data-theme="dark"] {
  --background: 215 30% 8%;
  --foreground: 210 20% 92%;
  --card: 215 28% 11%;
  --card-foreground: 210 20% 92%;
  --popover: 215 28% 11%;

  --primary: 214 80% 55%;
  --primary-foreground: 215 30% 8%;
  --primary-soft: 214 60% 18%;
  --accent: 199 89% 55%;
  --accent-foreground: 215 30% 8%;
  --accent-soft: 199 60% 18%;

  --secondary: 215 25% 14%;
  --secondary-foreground: 210 20% 88%;
  --muted: 215 25% 14%;
  --muted-foreground: 215 15% 60%;
  --border: 215 20% 20%;
  --border-strong: 215 18% 30%;
  --input: 215 20% 20%;
  --ring: 199 89% 55%;

  --destructive: 0 72% 55%;
  --destructive-soft: 0 50% 20%;
  --success: 142 50% 45%;
  --success-soft: 142 40% 18%;
  --warning: 38 92% 55%;
  --warning-soft: 38 60% 20%;
  --info: 199 89% 55%;
  --info-soft: 199 60% 18%;

  --sidebar-bg-from: 214 60% 12%;
  --sidebar-bg-to: 214 70% 6%;
  --sidebar-fg: 0 0% 100%;
  --sidebar-fg-muted: 214 25% 70%;
  --sidebar-active-bg: 199 89% 50%;
  --sidebar-active-fg: 214 80% 10%;
  --sidebar-hover-bg: 214 50% 22%;
  --sidebar-border: 214 60% 16%;
  --sidebar-group: 214 25% 60%;

  --delphi-from: 262 60% 65%;
  --delphi-to: 214 80% 60%;
  --delphi-soft: 262 40% 22%;
  --delphi-ink: 262 70% 80%;

  --chart-baseline: 215 15% 50%;
  --chart-current: 214 80% 60%;
  --chart-recommended: 199 89% 55%;
  --chart-btl: 38 92% 55%;
  --chart-atl: 262 60% 65%;
  --chart-productive: 142 50% 50%;
  --chart-non-productive: 0 0% 50%;
}

[data-density="compact"] {
  --row-h: 28px;
  --input-h: 24px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
#root { height: 100%; min-height: 0; }
body {
  font-family: var(--font-sans);
  font-size: 12px;
  line-height: 1.5;
  color: hsl(var(--foreground));
  background: hsl(var(--background));
  font-feature-settings: "cv11", "ss01", "tnum";
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
.tnum { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); font-feature-settings: "tnum"; }
.eyebrow {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: hsl(var(--muted-foreground));
}
.h1 { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.h2 { font-size: 15px; font-weight: 600; letter-spacing: -0.005em; }
.h3 { font-size: 13px; font-weight: 600; }
.body-sm { font-size: 11px; }
.muted { color: hsl(var(--muted-foreground)); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: hsl(var(--border-strong)); border-radius: 999px; border: 2px solid hsl(var(--background)); }
::-webkit-scrollbar-track { background: transparent; }

/* Utility */
.no-select { user-select: none; }
.divider-v { width: 1px; align-self: stretch; background: hsl(var(--border)); }
.divider-h { height: 1px; background: hsl(var(--border)); }
