/* AIOStats design tokens — the source of truth.
   Dark is the default. The app sets data-theme="light" on <html> for light mode.
   Colour is status only; there is no brand accent. */

:root {
  color-scheme: dark;

  /* Surfaces */
  --bg: #07080A;
  --bg-elevated: #0C0E12;
  --surface: #111419;
  --surface-2: #171B22;
  --surface-3: #1D222B;
  --border: #242A33;
  --border-strong: #323A46;

  /* Text */
  --text: #F2F4F7;
  --text-secondary: #B4BCC7;
  --muted: #9AA4B2;
  --faint: #8A94A3;

  /* Status — the only colour in the UI */
  --green: #3DD68C;
  --green-dim: rgba(61, 214, 140, 0.12);
  --amber: #F2B84B;
  --amber-dim: rgba(242, 184, 75, 0.12);
  --red: #F06A6A;
  --red-dim: rgba(240, 106, 106, 0.12);
  --grey: #8A94A3;
  --grey-dim: rgba(138, 148, 163, 0.12);

  --focus: #E9EFF7;

  /* Charts */
  --chart-line: #C9D2DE;
  --chart-fill: rgba(201, 210, 222, 0.08);
  --chart-grid: rgba(255, 255, 255, 0.07);

  /* Type */
  --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --text-11: 11px;
  --text-12: 12px;
  --text-13: 13px;
  --text-15: 15px;
  --text-17: 17px;
  --text-20: 20px;
  --text-24: 24px;
  --text-32: 32px;

  --leading-tight: 1.2;
  --leading-normal: 1.45;
  --leading-relaxed: 1.6;

  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;

  /* Shape */
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  /* Layout */
  --header-h: 56px;
  --tab-h: 64px;
  --content-max: 720px;
  --gutter: 16px;
  --tap: 44px;

  /* Motion */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur-fast: 120ms;
  --dur: 160ms;
  --dur-slow: 240ms;
}

[data-theme="light"] {
  color-scheme: light;

  --bg: #F5F6F8;
  --bg-elevated: #FFFFFF;
  --surface: #FFFFFF;
  --surface-2: #F0F2F5;
  --surface-3: #E8EBF0;
  --border: #DDE1E7;
  --border-strong: #C9CFD8;

  --text: #12151A;
  --text-secondary: #404A57;
  --muted: #5A6472;
  --faint: #5F6875;

  --green: #0B7A52;
  --green-dim: rgba(11, 122, 82, 0.10);
  --amber: #8A5A00;
  --amber-dim: rgba(138, 90, 0, 0.10);
  --red: #B3261E;
  --red-dim: rgba(179, 38, 30, 0.10);
  --grey: #687280;
  --grey-dim: rgba(104, 114, 128, 0.10);

  --focus: #12151A;

  --chart-line: #2C3542;
  --chart-fill: rgba(44, 53, 66, 0.08);
  --chart-grid: rgba(18, 21, 26, 0.08);
}

/* Optional base helpers. Screens may use these; they are not a component library. */
html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: var(--text-15);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.tabular {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.status-available { color: var(--green); }
.status-degraded { color: var(--amber); }
.status-failed { color: var(--red); }
.status-queued { color: var(--grey); }

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: 0 0 auto;
}
.dot.available { background: var(--green); }
.dot.degraded { background: var(--amber); }
.dot.failed { background: var(--red); }
.dot.queued { background: var(--grey); }

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
