/* ────────────────────────────────────────────────────────────────────
 * Dark-only design tokens (2026-06-11).
 *
 * Owner decision: drop the light theme + 6 accent palettes entirely —
 * we never shipped a light/accent switcher, and supporting both
 * cascades was directly causing button-contrast bugs (light theme's
 * --ui-text-inverse white was bleeding into dark buttons whose
 * --ui-primary ended up white-ish due to accent overrides cascading
 * past the theme block). Single dark-only token set: 95 lines of
 * theme CSS gone, every operator sees the same surface, no future
 * theme/accent override surprises.
 * ──────────────────────────────────────────────────────────────── */
:root {
  color-scheme: dark;

  --ui-font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ui-font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  --ui-bg: #151515;
  --ui-surface: #1d1d1d;
  --ui-surface-muted: #262626;
  --ui-surface-raised: #222222;
  --ui-surface-overlay: #111111;
  --ui-sidebar-bg: #343434;
  --ui-sidebar-surface: #3f3f3f;
  --ui-sidebar-border: #4d4d4d;
  --ui-sidebar-hover: #484848;
  --ui-sidebar-active: #242424;
  --ui-border: #343434;
  --ui-border-strong: #505050;

  --ui-text: #f4f4f5;
  --ui-text-muted: #b7b7b7;
  --ui-text-subtle: #858585;
  --ui-text-inverse: #0a0a0a;

  /* Primary kept as blue. text-inverse is now near-black so primary
     buttons (light-blue bg) get a readable dark label — fixes the
     "white-on-white" Add-tracker / Setup CTAs reported 2026-06-11. */
  --ui-primary: #4da3ff;
  --ui-primary-hover: #69b4ff;
  --ui-primary-soft: #19324d;
  --ui-primary-border: #315d86;

  --ui-danger: #ff7b72;
  --ui-danger-hover: #ff938b;
  --ui-danger-soft: #3a1d1d;
  --ui-danger-border: #6b3434;

  --ui-success: #7ee787;
  --ui-success-soft: #1d331f;
  --ui-success-border: #345f38;

  --ui-warning: #f2cc60;
  --ui-warning-soft: #342a16;
  --ui-warning-border: #6a5422;

  --ui-neutral-soft: #2f2f2f;
  --ui-neutral-border: #4a4a4a;

  --ui-focus: #4da3ff;
  --ui-backdrop: rgb(0 0 0 / 70%);

  --ui-shadow-1: 0 1px 2px rgb(0 0 0 / 28%);
  --ui-shadow-2: 0 16px 40px rgb(0 0 0 / 42%);

  --ui-space-1: 4px;
  --ui-space-2: 8px;
  --ui-space-3: 12px;
  --ui-space-4: 16px;
  --ui-space-5: 20px;
  --ui-space-6: 24px;
  --ui-space-8: 32px;

  --ui-radius-1: 4px;
  --ui-radius-2: 6px;
  --ui-radius-3: 8px;

  --ui-text-xs: 12px;
  --ui-text-sm: 13px;
  --ui-text-md: 14px;
  --ui-text-lg: 16px;
  --ui-text-xl: 20px;
  --ui-text-2xl: 24px;

  --ui-weight-regular: 400;
  --ui-weight-medium: 600;
  --ui-weight-semibold: 700;
  --ui-weight-bold: 800;

  --ui-line-tight: 1.25;
  --ui-line-base: 1.5;

  --ui-sidebar-width: 248px;
  --ui-topbar-height: 64px;
  --ui-content-max: 1280px;
  --ui-control-height-sm: 30px;
  --ui-control-height: 36px;
  --ui-control-height-lg: 42px;
  --ui-row-height: 48px;
  --ui-z-sticky: 10;
  --ui-z-overlay: 40;
  --ui-z-toast: 50;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  font-family: var(--ui-font-sans);
  background: var(--ui-bg);
  color: var(--ui-text);
  line-height: var(--ui-line-base);
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--ui-bg);
  color: var(--ui-text);
  font-size: var(--ui-text-md);
}

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

a {
  color: inherit;
  text-decoration: none;
}

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