/* Shared design system – loaded last on every page (site, admin, driver). Light + dark themes, flat professional styling. */
:root {
  color-scheme: light;
  --ink: #0f172a; --ink-2: #334155; --muted: #64748b;
  --bg: #f8fafc; --card: #ffffff; --surface: #ffffff; --line: #e2e8f0;
  --blue: #3b82f6; --purple: #8b5cf6; --navy: #1e3a8a; --deep: #1e3a8a;
  --sky: #eff6ff; --sky-2: #dbeafe; --violet: #ede9fe;
  --ok: #15803d; --warn: #b45309; --bad: #b91c1c;
  --ok-bg: #e7f6ec; --warn-bg: #fdf3e0; --bad-bg: #fdecec;
  --ok-fg: #14532d; --warn-fg: #7c3a06; --bad-fg: #7f1d1d;
  --inverse: #0f172a; --on-inverse: #f8fafc;
  --grad: #3b82f6;
  --grad-dark: #1e3a8a;
  --radius: 14px;
  --shadow: 0 8px 24px rgba(59, 130, 246, .1);
  --shadow-sm: 0 1px 2px rgba(59, 130, 246, .06);
  --side: #020617; --side-2: #0f172a;
  --subtle: #f8fafc; --hover: #f1f5f9; --bad-line: #fecaca; --ok-line: #bbf7d0;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f8fafc; --ink-2: #cbd5e1; --muted: #94a3b8;
  --bg: #020617; --card: #0f172a; --surface: #0f172a; --line: rgba(148, 163, 184, 0.1);
  --blue: #3b82f6; --purple: #8b5cf6; --navy: #1e3a8a; --deep: #1e3a8a;
  --sky: #1e293b; --sky-2: #334155; --violet: #1e1b4b;
  --ok: #4ade80; --warn: #fbbf24; --bad: #f87171;
  --ok-bg: #064e3b; --warn-bg: #451a03; --bad-bg: #450a0a;
  --ok-fg: #bbf7d0; --warn-fg: #fef3c7; --bad-fg: #fee2e2;
  --inverse: #f8fafc; --on-inverse: #020617;
  --grad: #3b82f6;
  --grad-dark: #0f172a;
  --shadow: 0 10px 30px rgba(0, 0, 0, .8);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .6);
  --side: #020617; --side-2: #0f172a;
  --subtle: #020617; --hover: #1e293b; --bad-line: #450a0a; --ok-line: #064e3b;
}
body { font-family: var(--font); background: var(--bg); color: var(--ink); }
body, .card, .panel, input, select, textarea, .site-header, .top { transition: background-color .2s, border-color .2s, color .2s; }
::selection { background: var(--blue); color: #fff; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* ---- inline SVG icons (replace emoji) ---- */
svg.hti { width: 1.15em; height: 1.15em; vertical-align: -.2em; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dotc { display: inline-block; width: .7em; height: .7em; border-radius: 50%; vertical-align: .02em; margin-right: .1em; }

/* ---- theme toggle ---- */
.theme-toggle { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer; padding: 0; flex: none; }
.theme-toggle:hover { background: var(--sky); color: var(--ink); }
.theme-toggle svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.d-top .theme-toggle { background: rgba(255,255,255,.12); border-color: transparent; color: #fff; width: 32px; height: 32px; }
.theme-float { position: fixed; top: 14px; right: 14px; z-index: 60; }
