/* Shared tokens and primitives: dashboard and login page. */
:root {
  color-scheme: light;
  --surface-0: #f4f3f0;
  --surface-1: #fcfcfb;
  --border: #e3e2dd;
  --grid: #ecebe7;
  --text-primary: #0b0b0b;
  --text-secondary: #52514e;
  --text-muted: #7a7974;
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --series-3: #1baf7a;
  --series-4: #eda100;
  --series-5: #e87ba4;
  --series-6: #008300;
  --series-7: #6250d6;
  --series-8: #e34948;
  --good: #0ca30c;
  --critical: #d03b3b;
  --nodata: #b9b8b1;
  --pad: 20px;
  --gap: 16px;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --surface-0: #121211;
    --surface-1: #1a1a19;
    --border: #2e2e2c;
    --grid: #262624;
    --text-primary: #f0efec;
    --text-secondary: #c3c2b7;
    --text-muted: #8f8e86;
    --series-1: #3987e5;
    --series-2: #d95926;
    --series-3: #199e70;
    --series-4: #c98500;
    --series-5: #d55181;
    --series-6: #008300;
    --series-7: #9085e9;
    --series-8: #e66767;
    --nodata: #55544f;
  }
}
@media (max-width: 600px) { :root { --pad: 12px; --gap: 12px; } }

* { box-sizing: border-box; }
body {
  margin: 0; background: var(--surface-0); color: var(--text-primary);
  font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
}
h1 { font-size: 20px; margin: 0; font-weight: 600; }
h2 { font-size: 15px; font-weight: 600; margin: 0 0 2px; }
.card {
  background: var(--surface-1); border: 1px solid var(--border); border-radius: 10px;
  padding: 16px 18px; margin-bottom: var(--gap); min-width: 0;
}
@media (max-width: 600px) { .card { padding: 12px; border-radius: 8px; } }
.btn {
  font: inherit; padding: 4px 12px; min-height: 32px; border-radius: 6px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface-1); color: var(--text-secondary);
  touch-action: manipulation;
}
.btn.primary, .btn[aria-pressed="true"] {
  background: var(--text-primary); color: var(--surface-1); border-color: var(--text-primary);
}
.linkbtn { font: inherit; color: inherit; background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; }
