:root {
  --bg: #f6f7fb; --card: #fff; --ink: #1b1d29; --muted: #6b6f80; --line: #e6e8f0;
  --accent: #5b3fd6; --accent-2: #efeafe;
  --critical: #b00020; --high: #d64500; --medium: #bf8700; --low: #1e6ec8; --info: #6e6e6e;
}
* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); display: flex; min-height: 100vh; }
a { color: var(--accent); }
.side { width: 220px; background: #14121f; color: #fff; padding: 20px 14px; display: flex; flex-direction: column; gap: 24px; position: sticky; top: 0; height: 100vh; }
.brand { font-weight: 700; font-size: 20px; color: #c9b8ff; padding: 0 8px; }
.side nav { display: flex; flex-direction: column; gap: 4px; }
.side nav button { background: none; border: 0; color: #c8c6d6; text-align: left; padding: 9px 10px; border-radius: 8px; cursor: pointer; font: inherit; }
.side nav button.active, .side nav button:hover { background: #2a2540; color: #fff; }
.tools { margin-top: auto; font-size: 12px; color: #9a97ab; }
.tools div { display: flex; justify-content: space-between; padding: 2px 8px; }
.tools .on { color: #6fd39a; } .tools .off { color: #8a8799; }
main { flex: 1; padding: 28px 36px; max-width: 1200px; }
.view { display: none; } .view.active { display: block; }
.top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 18px; gap: 16px; }
h1 { margin: 0; font-size: 26px; } h3 { margin: 0 0 10px; font-size: 15px; }
.muted { color: var(--muted); margin: 4px 0 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; margin-bottom: 16px; }
.grid { display: grid; gap: 16px; } .g3 { grid-template-columns: 1.1fr 1fr 1fr; }
.grid .card { margin-bottom: 0; }
.score { display: flex; gap: 18px; align-items: center; }
.ring { --p: 0; --c: var(--accent); width: 110px; height: 110px; border-radius: 50%; display: grid; place-items: center; align-content: center;
  background: radial-gradient(closest-side, #fff 78%, transparent 79%), conic-gradient(var(--c) calc(var(--p) * 1%), #eceef5 0); flex: none; }
.ring span { font-size: 32px; font-weight: 700; line-height: 1; } .ring small { color: var(--muted); font-size: 11px; }
.bars .bar { display: grid; grid-template-columns: 80px 1fr 28px; align-items: center; gap: 8px; margin: 6px 0; font-size: 13px; }
.bars .track { background: #eef0f6; border-radius: 6px; height: 10px; overflow: hidden; }
.bars .fill { background: var(--accent); height: 100%; border-radius: 6px; }
.bars b { text-align: right; }
.sevrow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin: 16px 0; }
.sev { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: 12px; padding: 12px 14px; }
.sev b { font-size: 24px; display: block; } .sev span { color: var(--muted); }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
select, input[type=text], input:not([type]), input[name] { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.tbl { width: 100%; border-collapse: collapse; margin-top: 10px; }
.tbl th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12px; padding: 8px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr.click { cursor: pointer; } .tbl tr.click:hover { background: #faf9ff; }
.tbl td.loc { font-family: ui-monospace, Consolas, monospace; font-size: 12px; word-break: break-all; max-width: 280px; }
.tbl tr.fp td { opacity: .5; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; color: #fff; background: var(--c); text-transform: uppercase; }
.pill { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--accent-2); color: var(--accent); margin-left: 6px; }
.form label { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; font-weight: 500; }
.form h3 { margin-top: 18px; }
.checks { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 6px; }
label.chk { display: inline-flex !important; flex-direction: row !important; align-items: center; gap: 6px; font-weight: 400 !important; margin: 0 !important; }
.consent { padding: 12px; background: #fff8e6; border-radius: 8px; margin: 6px 0 14px !important; }
button { font: inherit; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.primary, .btn.primary { background: var(--accent); color: #fff; border: 0; padding: 10px 18px; border-radius: 8px; text-decoration: none; font-weight: 600; }
.primary:disabled { opacity: .45; cursor: not-allowed; }
.error { color: var(--critical); min-height: 1em; margin: 6px 0 0; }
pre#logBox { background: #14121f; color: #d6d3e6; padding: 14px; border-radius: 10px; max-height: 380px; overflow: auto; font-size: 12px; white-space: pre-wrap; }
.empty { padding: 40px; text-align: center; color: var(--muted); background: var(--card); border: 1px dashed var(--line); border-radius: 14px; }
.paper { max-width: 820px; padding: 40px 48px; }
.paper h1 { font-size: 26px; } .paper h2 { font-size: 17px; margin-top: 26px; }
.paper table { border-collapse: collapse; margin: 10px 0; } .paper td, .paper th { border: 1px solid var(--line); padding: 6px 12px; text-align: left; }
.paper .f { border-left: 3px solid var(--c); padding: 4px 0 4px 12px; margin: 12px 0; }
.paper code { font-size: 12px; background: #f3f3f7; padding: 1px 4px; border-radius: 4px; word-break: break-all; }
dialog { border: 0; border-radius: 14px; max-width: 680px; width: 92vw; padding: 24px; }
dialog::backdrop { background: rgba(20, 18, 31, .45); }
@media (max-width: 900px) { body { flex-direction: column; } .side { width: auto; height: auto; position: static; } .g3, .sevrow { grid-template-columns: 1fr 1fr; } main { padding: 18px; } }
body.auth { align-items: center; justify-content: center; }
.auth-card { width: 360px; display: flex; flex-direction: column; gap: 10px; }
.auth-card label { display: flex; flex-direction: column; gap: 4px; font-weight: 500; }
.brand.dark { color: var(--accent); padding: 0; }
.who { font-size: 12px; color: #c8c6d6; padding: 0 8px; display: flex; justify-content: space-between; align-items: center; }
.who button { background: none; border: 1px solid #3a3550; color: #c8c6d6; padding: 3px 8px; font-size: 12px; }
