/* CEEZ Midnight (docs/CEEZ-DESIGN.md): a flat, editorial, midnight-blue interface. Midnight-blue page, flat sheets, 1px hairlines, one violet accent,
   Geist for text and Geist Mono for every number, label and piece of metadata, 2px corners, no shadows on panels, no gradients.
   Every colour in the application is one of these tokens; dark is the default and a warm-paper light twin exists for each. */
@font-face { font-family: 'Geist'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/ui/assets/fonts/geist-var-latin.woff2) format('woff2'); }
@font-face { font-family: 'Geist Mono'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/ui/assets/fonts/geist-mono-var-latin.woff2) format('woff2'); }

:root, html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #171b40; --bg2: #1b2048; --card: #202553; --card-hover: #272d61; --elevated: #262c5f;
  --text: #eef0f7; --text-strong: #ffffff; --muted: #b3b9cd; --soft: #a3a9c0;
  --line: #2e3466; --line2: #3a4180; --border: #2e3466; --border-strong: #8d94ab; --field: #8d94ab;
  --accent: #9578f2; --accent-hover: #a68cf6; --accent-text: #b9a6fb; --accent-soft: rgba(132, 94, 238, .18); --signal: #845eee; --on-accent: #ffffff;
  --accent-rgb: 149, 120, 242;
  --btn-bg: #eef0f7; --btn-fg: #171b40; --btn-bg-hover: #ffffff;
  --good: #5fd38d; --warn: #f2b543; --bad: #ff7a6e;
  --track: #2e3466; --overlay: rgba(10, 12, 34, .78); --dots: rgba(141, 148, 171, .22); --shadow-panel: 0 16px 40px rgba(5, 7, 25, .55);
  --c1: #3987e5; --c2: #d95926; --c3: #199e70; --c4: #c98500; --c5: #e66767; --c6: #9085e9; --c7: #a3a9c0; --c8: #d55181;
}
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f4ef; --bg2: #ebeae3; --card: #ffffff; --card-hover: #ebeae3; --elevated: #ffffff;
  --text: #111110; --text-strong: #000000; --muted: #55544d; --soft: #5f5d55;
  --line: #d9d7cf; --line2: #c9c7be; --border: #d9d7cf; --border-strong: #6b6960; --field: #6b6960;
  --accent: #6250d6; --accent-hover: #5140c4; --accent-text: #5040c0; --accent-soft: rgba(98, 80, 214, .1); --signal: #6250d6; --on-accent: #ffffff;
  --accent-rgb: 98, 80, 214;
  --btn-bg: #111110; --btn-fg: #f5f4ef; --btn-bg-hover: #000000;
  --good: #16703a; --warn: #8f5600; --bad: #b8261b;
  --track: #e3e1d8; --overlay: rgba(17, 17, 16, .45); --dots: rgba(107, 105, 96, .22); --shadow-panel: 0 16px 40px rgba(17, 17, 16, .18);
  --c1: #2a78d6; --c2: #eb6834; --c3: #12865f; --c4: #b87a00; --c5: #e34948; --c6: #7a6fd8; --c7: #6b6960; --c8: #e87ba4;
}
:root {
  --sans: 'Geist', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --r: 2px; --ease: cubic-bezier(.2, .7, .2, 1); --ctl: 36px; --ctl-sm: 28px;
  /* the names the dashboard's own rules were written with, now pointing at the tokens above */
  --panel: var(--card); --dim: var(--muted); --code: var(--bg2); --sel: var(--accent-soft); --hover: color-mix(in srgb, var(--text) 6%, transparent);
  --ok: var(--good); --err: var(--bad); --wait: var(--warn); --run: var(--accent-text);
  --gold: var(--accent); --gold-dim: color-mix(in srgb, var(--accent) 55%, transparent);
}
body { background: var(--bg); color: var(--text); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
a { text-underline-offset: 3px; }
::selection { background: var(--signal); color: #fff; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
.mono, td.mono, pre, code, kbd { font-family: var(--mono); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* the page's dotted texture (a radial-gradient pattern, not a gradient fill): sign-in and empty areas only, never behind dense data */
.dotted { background: radial-gradient(var(--dots) 1.2px, transparent 1.6px) 0 0 / 24px 24px; }

/* theme switch (top bar and sign-in page) */
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; width: var(--ctl-sm); height: var(--ctl-sm); padding: 0; border: 1px solid var(--border-strong); background: transparent; color: var(--text); border-radius: var(--r); cursor: pointer; }
.theme-toggle:hover { background: var(--card-hover); color: var(--text-strong); border-color: var(--text); }
.theme-toggle svg { width: 15px; height: 15px; display: block; }
html[data-theme="light"] .theme-toggle .sun, html:not([data-theme="light"]) .theme-toggle .moon { display: none; }
