/* Portable A3Lab analytics overview CSS; source: admin/src/index.css. */

/* a3lab v3 admin theme (public/admin/a3lab-v3.css), plus the chart tokens the
   Bklit components read. Light and dark are both real palettes, not a flip. */
:root {
  color-scheme: light;
  --field: #eeeeef;
  --field-deep: #e4e4e6;
  --surface: #f7f7f8;
  --taupe: #e2e2e4;
  --ink: #1e1e1e;
  --ink-soft: #3a3a40;
  --slate: #626276;
  --slate-faint: rgba(98, 98, 118, 0.45);
  --line: rgba(30, 30, 30, 0.1);
  --line-strong: rgba(30, 30, 30, 0.22);
  --copper: #ad5424;
  --copper-text: #964818;
  --copper-dim: rgba(173, 84, 36, 0.12);
  --font-display: "Outfit", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;
  --font-serif: "Instrument Serif", Georgia, serif;
  --r-card: 12px;
  --r-chip: 8px;

  /* validated dataviz palette: categorical slots, sequential blue, status */
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --series-3: #1baf7a;
  --series-4: #eda100;
  --series-5: #e87ba4;
  --seq-1: #cde2fb; --seq-2: #9ec5f4; --seq-3: #6da7ec; --seq-4: #3987e5; --seq-5: #256abf; --seq-6: #184f95; --seq-7: #0d366b;
  --status-good: #0ca30c; --status-warning: #fab219; --status-serious: #ec835a; --status-critical: #d03b3b;
  --grid-hairline: #e1e0d9; --baseline: #c3c2b7; --muted-label: #898781;

  /* Bklit chart tokens */
  --chart-background: var(--surface);
  --chart-foreground: var(--ink);
  --chart-foreground-muted: var(--slate);
  --chart-label: var(--muted-label);
  --chart-line-primary: var(--series-1);
  --chart-line-secondary: var(--series-2);
  --chart-grid: var(--grid-hairline);
  --chart-crosshair: var(--copper);
  --chart-indicator-color: var(--copper);
  --chart-indicator-secondary-color: var(--series-1);
  --chart-marker-background: var(--surface);
  --chart-marker-border: var(--line-strong);
  --chart-marker-foreground: var(--ink);
  --chart-marker-badge-background: var(--ink);
  --chart-marker-badge-foreground: var(--surface);
  --chart-1: var(--series-1);
  --chart-2: var(--series-2);
  --chart-3: var(--series-3);
  --chart-4: var(--series-4);
  --chart-5: var(--series-5);
  --chart-scale-01: var(--seq-1);
  --chart-scale-02: var(--seq-2);
  --chart-scale-03: var(--seq-4);
  --chart-scale-04: var(--seq-5);
  --chart-scale-05: var(--seq-7);
  --chart-scale-pattern-color: var(--seq-3);
  --border: var(--line-strong);
  --background: var(--field);
  --foreground: var(--ink);
  --muted: var(--taupe);
  --muted-foreground: var(--slate);
  --color-muted: var(--taupe);
  --popover: var(--surface);
  --popover-foreground: var(--ink);
  --card: var(--surface);
  --card-foreground: var(--ink);
  --primary: var(--copper);
  --primary-foreground: #ffffff;
  --accent: var(--copper-dim);
  --accent-foreground: var(--copper-text);
  --radius: 12px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --field: #131316;
  --field-deep: #0e0e10;
  --surface: #1b1b1f;
  --taupe: #232328;
  --ink: #ececee;
  --ink-soft: #c9c9cf;
  --slate: #a0a0b4;
  --slate-faint: rgba(160, 160, 180, 0.4);
  --line: rgba(236, 236, 238, 0.1);
  --line-strong: rgba(236, 236, 238, 0.24);
  --copper-text: #d98e57;
  --copper-dim: rgba(173, 84, 36, 0.16);
  --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500; --series-5: #d55181;
  --status-critical: #e66767;
  --grid-hairline: #2c2c2a; --baseline: #383835;
}



html { background: var(--field); color: var(--ink); font-family: var(--font-display); }
body { margin: 0; min-width: 320px; background: var(--field); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: var(--copper-text); }
a:hover { color: var(--copper); }
button { font: inherit; color: inherit; }

.mono { font-family: var(--font-mono); }
.eyebrow { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.13em; text-transform: uppercase; color: var(--copper-text); }
.hairline { border-top: 1px solid var(--line-strong); }
.card { background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-card); }
.chip { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; padding: 4px 8px; border-radius: 999px; background: var(--copper-dim); color: var(--copper-text); white-space: nowrap; }
.btn { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; padding: 5px 9px; border: 1px solid var(--line-strong); border-radius: var(--r-chip); color: var(--slate); background: var(--surface); cursor: pointer; white-space: nowrap; }
.btn:hover, .btn[aria-pressed="true"] { border-color: var(--copper); color: var(--copper-text); }
.btn[aria-pressed="true"] { background: var(--copper-dim); }
.big { font-weight: 300; letter-spacing: -0.04em; line-height: 1; }
.table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
.table th { padding: 0 8px 8px; text-align: left; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 500; color: var(--slate); border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
.table td { padding: 9px 8px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--ink-soft); vertical-align: middle; }
.table th.num, .table td.num { text-align: right; font-family: var(--font-mono); font-size: 12px; }
.table th.decider { color: var(--copper-text); }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: var(--copper-dim); }

/* Responsive grid: one column until lg, then the template in --cols. */
.rgrid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1024px) { .rgrid { grid-template-columns: var(--cols); } }
/* Horizontal bar rows: label beside the bar, stacked above it on phones. */
.hbrow { display: grid; align-items: center; gap: 8px; grid-template-columns: var(--lw) 1fr; }
@media (max-width: 639px) { .hbrow { grid-template-columns: minmax(0, 1fr); row-gap: 2px; } }

/* A3Lab lockup as a mask so it follows the ink color in both themes. */
.wordmark { display: inline-block; width: 118px; height: 32px; flex: none; background: var(--ink); -webkit-mask: url("./a3lab-lockup.svg") left center / contain no-repeat; mask: url("./a3lab-lockup.svg") left center / contain no-repeat; }
@media (max-width: 639px) { .wordmark { width: 92px; height: 26px; } }
