:root {
  --bg: #f5f6f8; --panel: #fff; --ink: #1c2530; --muted: #66727f; --line: #dde2e8; --accent: #0b5cad;
  --critical: #7a1fa2; --high: #c62828; --medium: #d9730d; --low: #a58a00; --info: #6b7785; --ok: #1f7a3d;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #14181d; --panel: #1d232b; --ink: #e6eaef; --muted: #98a4b1; --line: #2e3742; --accent: #6db3f2;
    --critical: #c77be6; --high: #f0706a; --medium: #f0a04b; --low: #d9c04a; --info: #98a4b1; --ok: #5cc483; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.5 system-ui, "Segoe UI", sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
header.top { background: var(--panel); border-bottom: 1px solid var(--line); padding: 0 24px; display: flex;
  align-items: center; gap: 28px; }
header.top strong { font-size: 15px; letter-spacing: .02em; }
header.top nav a { display: inline-block; padding: 14px 2px; margin-right: 18px; color: var(--muted);
  border-bottom: 2px solid transparent; }
header.top nav a.on { color: var(--ink); border-color: var(--accent); }
main { max-width: 1900px; margin: 0 auto; padding: 20px 24px 60px; }
h1 { font-size: 20px; margin: 4px 0 16px; }
h2 { font-size: 15px; margin: 0 0 10px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 16px; margin-bottom: 16px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); margin-bottom: 16px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--c, var(--line));
  border-radius: 8px; padding: 12px 14px; color: inherit; }
.tile b { display: block; font-size: 26px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tile span { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; white-space: nowrap;
  position: sticky; top: var(--bar, 0px); background: var(--panel); z-index: 2; box-shadow: 0 1px 0 var(--line); }
.pinned { position: sticky; top: 0; z-index: 3; background: var(--panel); padding: 10px 0; margin: -10px 0 0; }
td.nowrap { white-space: nowrap; }
table.fixed { table-layout: fixed; }
table.fixed td { overflow-wrap: anywhere; }
td.wrap { overflow-wrap: anywhere; min-width: 220px; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.mono { font-family: ui-monospace, "JetBrains Mono", Consolas, monospace; font-size: 12.5px; }
.muted { color: var(--muted); }
.sev, .pill { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 11.5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; }
.sev { color: #fff; background: var(--info); }
.sev-critical { background: var(--critical); } .sev-high { background: var(--high); }
.sev-medium { background: var(--medium); } .sev-low { background: var(--low); }
@media (prefers-color-scheme: dark) { .sev { color: #14181d; } }
.pill { border: 1px solid var(--line); color: var(--muted); }
.pill.ok { color: var(--ok); border-color: var(--ok); } .pill.bad { color: var(--high); border-color: var(--high); }
.pill.warn { color: var(--medium); border-color: var(--medium); }
form.inline { display: inline; }
input, select, textarea, button { font: inherit; color: inherit; background: var(--panel); border: 1px solid var(--line);
  border-radius: 6px; padding: 6px 9px; }
textarea { width: 100%; min-height: 110px; font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; }
button { cursor: pointer; background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
@media (prefers-color-scheme: dark) { button { color: #14181d; } }
button.plain { background: var(--panel); color: var(--ink); border-color: var(--line); font-weight: 400; }
button.danger { background: var(--panel); color: var(--high); border-color: var(--high); }
button:disabled { opacity: .5; cursor: default; }
label { margin-right: 14px; white-space: nowrap; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 10px; }
.flash { background: var(--panel); border: 1px solid var(--accent); border-radius: 8px; padding: 10px 14px; margin-bottom: 14px; }
details > summary { cursor: pointer; }
details.finding { border-bottom: 1px solid var(--line); padding: 8px 0; }
details.finding:last-child { border-bottom: 0; }
details.finding summary { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
details.finding .body { margin: 8px 0 4px 4px; padding-left: 12px; border-left: 2px solid var(--line); }
details.finding .body p { margin: 4px 0; }
.bar { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); }
.note { color: var(--muted); font-size: 13px; margin: 0 0 10px; }
.now { display: flex; gap: 12px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.now .step { flex: 1; min-width: 260px; font-weight: 600; }
.spin { width: 12px; height: 12px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%;
  animation: spin 1s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.auth { max-width: 420px; margin: 48px auto; }
.auth label { display: block; margin: 0 0 14px; white-space: normal; color: var(--muted); font-size: 13px; }
.auth label input { display: block; width: 100%; margin-top: 4px; color: var(--ink); font-size: 15px; padding: 8px 10px; }
.auth button { width: 100%; padding: 9px; }
.qr { text-align: center; margin: 12px 0; }
.qr svg { background: #fff; border-radius: 6px; max-width: 100%; height: auto; }
