/* Marvo Fleet: the same design tokens, type and layout as the client dashboard (ui/src/tokens.css, shell.css), so the two feel like one product. */
@font-face { font-family: "Bricolage Grotesque"; src: url("/fonts/bricolage.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("/fonts/figtree.woff2") format("woff2"); font-weight: 300 900; font-display: swap; }
:root {
  color-scheme: light; --font-display: "Bricolage Grotesque", sans-serif; --font-body: "Figtree", sans-serif; --font-mono: ui-monospace, "JetBrains Mono", monospace;
  --ground: oklch(0.964 0.003 248); --surface: oklch(0.995 0.002 262); --panel: oklch(0.94 0.012 270); --line: oklch(0.899 0.012 260); --line-strong: oklch(0.74 0.02 264);
  --ink: oklch(0.219 0.033 266); --ink-2: oklch(0.443 0.037 267); --steel: oklch(0.56 0.03 266);
  --board: oklch(0.203 0.033 268); --board-raised: oklch(0.255 0.04 267); --board-line: oklch(0.336 0.048 268); --board-ink: oklch(0.958 0.009 265); --board-dim: oklch(0.76 0.02 265);
  --alert: oklch(0.87 0.17 92); --alert-ink: oklch(0.2 0.04 92); --stop: oklch(0.58 0.2 27); --stop-ink: oklch(0.985 0.005 27); --ok: oklch(0.62 0.15 152);
  --action: oklch(0.46 0.232 269); --action-deep: oklch(0.403 0.203 269); --info-ink: oklch(0.995 0.002 262);
  --st-ok: oklch(0.45 0.14 152); --st-fail: oklch(0.5 0.19 27); --st-warn: oklch(0.5 0.12 75);
  --radius: 8px; --ease: cubic-bezier(0.16, 1, 0.3, 1); --shadow-sheet: 0 24px 64px -24px oklch(0.15 0.02 255 / 0.45), 0 2px 6px oklch(0.15 0.02 255 / 0.12);
}
:root[data-theme="dark"] {
  color-scheme: dark; --st-ok: oklch(0.8 0.16 152); --st-fail: oklch(0.76 0.15 27); --st-warn: var(--alert);
  --ground: oklch(0.16 0.03 268); --surface: oklch(0.203 0.033 268); --panel: oklch(0.255 0.04 267); --line: oklch(0.336 0.048 268); --line-strong: oklch(0.44 0.013 255);
  --ink: oklch(0.955 0.005 250); --ink-2: oklch(0.78 0.01 250); --steel: oklch(0.62 0.012 255); --board: oklch(0.13 0.03 268); --board-raised: oklch(0.19 0.034 268); --board-line: oklch(0.3 0.04 268);
  --shadow-sheet: 0 24px 64px -24px oklch(0.05 0.01 255 / 0.8), 0 2px 6px oklch(0.05 0.01 255 / 0.4);
}
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--font-body); font-size: 0.9375rem; line-height: 1.5; font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p { margin: 0; } h1, h2, h3 { font-family: var(--font-display); font-weight: 600; text-wrap: balance; letter-spacing: 0.005em; }
button, input, select, textarea { font: inherit; color: inherit; } button { cursor: pointer; } svg { display: block; max-width: 100%; }
:focus { outline: none; } :focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 2px; }
.muted { color: var(--ink-2); } .error { color: var(--st-fail); } .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* shell */
.app { display: grid; grid-template-columns: 15rem minmax(0, 1fr); min-height: 100dvh; }
.sidebar { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; gap: 1.5rem; padding: 1.25rem 0.75rem; background: var(--surface); border-inline-end: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 0.75rem; padding: 0.25rem 0.5rem; text-decoration: none; color: inherit; }
.brand-mark { flex: none; width: 2.25rem; height: 2.25rem; } .brand-mark svg { width: 100%; height: 100%; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; letter-spacing: -0.02em; line-height: 1; }
.brand-sub { display: block; font-family: var(--font-body); font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); margin-top: 0.25rem; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 0.75rem; height: 2.5rem; padding-inline: 0.75rem; border-radius: var(--radius); text-decoration: none; color: var(--ink-2); font-weight: 500; transition: background 160ms var(--ease), color 160ms var(--ease); }
.nav a:hover { background: var(--panel); color: var(--ink); } .nav a[aria-current="page"] { background: var(--ink); color: var(--ground); font-weight: 600; }
.nav svg { flex: none; width: 20px; height: 20px; } .nav b { margin-inline-start: auto; min-width: 1.25rem; padding: 0 0.375rem; border-radius: 999px; background: var(--alert); color: var(--alert-ink); font-size: 0.75rem; text-align: center; }
.sidebar-foot { margin-top: auto; display: grid; gap: 0.5rem; padding: 0.5rem; } .sidebar-foot .muted { font-size: 0.75rem; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; min-height: 4rem; padding: 0.75rem clamp(1rem, 3vw, 2.5rem); background: color-mix(in oklch, var(--ground) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar h1 { font-size: 1.75rem; line-height: 1; margin-inline-end: auto; }
.content { padding: clamp(1rem, 3vw, 2.5rem); width: 100%; max-width: 88rem; margin-inline: auto; display: grid; gap: 1.5rem; }
.mobilenav { display: none; }
@media (max-width: 62rem) { .app { grid-template-columns: minmax(0, 1fr); } .sidebar { display: none; } .topbar h1 { font-size: 1.5rem; }
  .mobilenav { display: flex; gap: 0.25rem; overflow-x: auto; padding: 0.5rem clamp(1rem, 3vw, 2.5rem); background: var(--surface); border-bottom: 1px solid var(--line); }
  .mobilenav a { flex: none; padding: 0.5rem 0.875rem; border-radius: var(--radius); text-decoration: none; color: var(--ink-2); font-weight: 600; } .mobilenav a[aria-current="page"] { background: var(--ink); color: var(--ground); } }

/* components */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; height: 2.5rem; padding-inline: 1rem; border-radius: var(--radius); border: 1px solid var(--action); background: var(--action); color: var(--info-ink); text-decoration: none; white-space: nowrap; font-size: 0.8125rem; font-weight: 600; transition: background 160ms var(--ease), transform 160ms var(--ease); }
.btn:hover { background: var(--action-deep); border-color: var(--action-deep); } .btn:active { transform: translateY(1px); } .btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--line-strong); } .btn-outline:hover { background: var(--panel); border-color: var(--ink); }
.btn-stop { background: var(--stop); border-color: var(--stop); color: var(--stop-ink); } .btn-stop:hover { background: oklch(0.52 0.2 27); border-color: oklch(0.52 0.2 27); }
.btn-sm { height: 2rem; padding-inline: 0.75rem; }
.panel { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 1.25rem; display: grid; gap: 1rem; align-content: start; } .panel > h2 { font-size: 1.25rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 0.75rem; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 1rem 1.125rem; display: grid; gap: 0.25rem; } .stat b { font-family: var(--font-display); font-size: 2.25rem; line-height: 1; font-weight: 600; }
.stat span { color: var(--ink-2); font-size: 0.8125rem; font-weight: 600; } .stat.healthy b { color: var(--st-ok); } .stat.attention b { color: var(--st-fail); } .stat.silent b { color: var(--st-warn); }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); } table { border-collapse: collapse; width: 100%; min-width: 44rem; }
th, td { text-align: start; padding: 0.75rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; } tr:last-child td { border-bottom: 0; }
th { font-size: 0.75rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-2); font-weight: 600; background: var(--panel); }
tbody tr[tabindex] { cursor: pointer; } tbody tr[tabindex]:hover { background: var(--panel); }
.chip { display: inline-flex; align-items: center; gap: 0.4rem; border-radius: 999px; padding: 0.125rem 0.625rem; font-size: 0.8125rem; font-weight: 600; border: 1px solid currentColor; white-space: nowrap; } .chip::before { content: ""; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: currentColor; }
.chip.healthy { color: var(--st-ok); } .chip.attention { color: var(--st-fail); } .chip.silent { color: var(--st-warn); } .chip.self { color: var(--ink-2); }
.pkg { color: var(--ink-2); font-size: 0.8125rem; }
.list { display: grid; list-style: none; margin: 0; padding: 0; } .list li { display: flex; gap: 0.75rem; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 0.75rem 0; border-top: 1px solid var(--line); } .list li:first-child { border-top: 0; }
.empty { padding: 2.5rem 1rem; text-align: center; color: var(--ink-2); display: grid; gap: 0.5rem; justify-items: center; } .empty strong { color: var(--ink); font-family: var(--font-display); font-size: 1.125rem; }
dialog { background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-sheet); padding: 1.5rem; width: min(40rem, calc(100vw - 1.5rem)); max-height: calc(100dvh - 2rem); }
dialog::backdrop { background: oklch(0.1 0.02 265 / 0.55); } dialog .body, dialog form { display: grid; gap: 1rem; } dialog h2 { font-size: 1.375rem; }
label { display: grid; gap: 0.375rem; font-weight: 600; font-size: 0.8125rem; }
input, select, textarea { padding: 0.5rem 0.75rem; min-height: 2.5rem; border-radius: var(--radius); border: 1px solid var(--line-strong); background: var(--surface); width: 100%; } textarea { min-height: 5rem; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 0.75rem 1rem; } .grid2 > div > .muted { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.health { display: flex; align-items: center; gap: 0.5rem; } .dot { width: 0.625rem; height: 0.625rem; border-radius: 50%; background: var(--ok); } .dot.bad { background: var(--stop); }
.actions { display: flex; gap: 0.5rem; flex-wrap: wrap; } ul.events { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.375rem; max-height: 14rem; overflow: auto; }

/* sign-in: the dark board, like the dashboard's */
.signin { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.signin .board { background: var(--board); color: var(--board-ink); padding: clamp(1.5rem, 5vw, 4rem); display: flex; flex-direction: column; justify-content: space-between; gap: 2rem; }
.signin .board h1 { font-size: clamp(2.25rem, 5vw, 4rem); line-height: 1.02; letter-spacing: -0.02em; max-width: 12ch; } .signin .board .muted { color: var(--board-dim); }
.signin form { align-self: center; justify-self: center; width: min(24rem, calc(100% - 2rem)); display: grid; gap: 1rem; padding: 2rem 0; } .signin form h2 { font-size: 1.75rem; }
@media (max-width: 62rem) { .signin { grid-template-columns: minmax(0, 1fr); } .signin .board { padding-block: 1.5rem; } .signin .board h1 { font-size: 2rem; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
