:root {
  --bg: #f6f7f9; --surface: #ffffff; --text: #1c2430; --muted: #5f6b7a; --border: #dde2e8; --accent: #1f5fbf;
  --ok: #1b7f4b; --warn: #a76100; --bad: #b42318; --stale: #6b4fb3; --chip: #eef1f5;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11151b; --surface: #1a2029; --text: #e6eaf0; --muted: #9aa5b3; --border: #2c3542; --accent: #79a8f2;
    --ok: #4cc38a; --warn: #f0a83c; --bad: #f2776b; --stale: #b09cf0; --chip: #252d39;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--accent); }
main { padding: 16px; max-width: 1280px; margin: 0 auto; }
h1 { font-size: 1.5rem; margin: 8px 0 16px; } h2 { font-size: 1.05rem; margin: 0 0 12px; }
.topbar { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--border); }
.brand { font-weight: 700; color: var(--text); text-decoration: none; }
.topbar nav { display: flex; gap: 16px; flex: 1; } .topbar nav a { text-decoration: none; color: var(--muted); }
.topbar nav a[aria-current] { color: var(--text); font-weight: 600; }
.session { display: flex; gap: 12px; align-items: center; } .session form { margin: 0; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 16px; margin-bottom: 16px; }
.narrow { max-width: 420px; margin: 48px auto; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
table { width: 100%; border-collapse: collapse; } th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.card table th, .card table td { padding: 6px 4px; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--chip); font-size: .8rem; white-space: nowrap; }
.sev-critical, .sev-high, .crit-critical, .state-down { color: var(--bad); font-weight: 600; }
.sev-medium, .crit-high, .state-degraded { color: var(--warn); }
.state-healthy { color: var(--ok); } .state-stale { color: var(--stale); }
.muted { color: var(--muted); font-size: .9em; } .empty { color: var(--muted); font-style: italic; } .error { color: var(--bad); margin: 4px 0; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
input, select, button { font: inherit; padding: 6px 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); }
button { cursor: pointer; } button[type=submit], .actions button { background: var(--accent); color: #fff; border-color: var(--accent); }
button.link { background: none; border: 0; color: var(--accent); padding: 0; }
label { display: block; margin-bottom: 12px; } label input { display: block; width: 100%; margin-top: 4px; }
.inline { display: inline-flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 0; } .actions { min-width: 220px; }
.tabs { display: flex; gap: 16px; margin-bottom: 12px; } .tabs a { text-decoration: none; color: var(--muted); } .tabs a[aria-current] { color: var(--text); font-weight: 600; }
.plain { list-style: none; margin: 0; padding: 0; } .plain li { padding: 4px 0; }
.timeline { list-style: none; padding: 0; margin: 0; } .timeline li { padding: 4px 0; border-bottom: 1px dashed var(--border); }
.timeline time { color: var(--muted); font-variant-numeric: tabular-nums; margin-right: 8px; }
.crumbs { margin: 0; font-size: .9rem; }
code { font-size: .85em; }
