:root {
  --brand: #1F3A5F;
  --ink: #18212b;
  --muted: #5d6b7a;
  --line: #dde3ea;
  --bg: #f4f6f9;
  --panel: #ffffff;
  --crit: #c0392b; --high: #d35400; --med: #b7950b; --low: #2e86c1; --info: #7f8c8d;
  --ok: #1e8449; --err: #c0392b;
  --radius: 8px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 14px/1.5 -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 0 0 4px; }
h2 { font-size: 16px; margin: 0 0 12px; }
h3 { font-size: 14px; margin: 0 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 12px; }

/* layout */
.topbar { background: var(--brand); color: #fff; }
.topbar .inner { max-width: 1280px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; gap: 24px; height: 54px; }
.topbar .brand { font-weight: 700; color: #fff; display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.topbar .brand img { height: 28px; background: #fff; border-radius: 4px; padding: 2px; }
.topbar nav { display: flex; gap: 4px; flex: 1; }
.topbar nav a { color: rgba(255,255,255,.82); padding: 6px 12px; border-radius: 6px; }
.topbar nav a:hover, .topbar nav a.on { background: rgba(255,255,255,.14); color: #fff; text-decoration: none; }
.topbar .who { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.topbar .who a, .topbar .who button { color: rgba(255,255,255,.9); }
.topbar .who button { background: none; border: 0; cursor: pointer; font: inherit; padding: 0; }
main { max-width: 1280px; margin: 0 auto; padding: 24px 20px 60px; }
.pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: 1fr 1fr; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.side { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
@media (max-width: 960px) { .g2, .g3, .side { grid-template-columns: 1fr; } .topbar nav { display: none; } }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.panel + .panel { margin-top: 18px; }
.sticky { position: sticky; top: 16px; }

/* banners */
.flash { padding: 10px 14px; border-radius: 6px; margin-bottom: 16px; border: 1px solid; }
.flash.ok { background: #eaf7ef; border-color: #b7e1c6; color: #145a32; }
.flash.err { background: #fdecea; border-color: #f5c2bd; color: #922b21; }
.banner { background: #fff8e1; border-bottom: 1px solid #f1d98a; color: #6e5300; font-size: 13px; }
.banner .inner { max-width: 1280px; margin: 0 auto; padding: 7px 20px; }

/* forms */
label { display: block; font-weight: 600; font-size: 12px; color: var(--muted); margin: 0 0 4px; text-transform: uppercase; letter-spacing: .03em; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=search], input[type=number], select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid #c9d2dc; border-radius: 6px; font: inherit; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--brand) 35%, transparent); border-color: var(--brand); }
textarea { min-height: 76px; resize: vertical; }
.field { margin-bottom: 14px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > .field { flex: 1; min-width: 160px; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--ink); }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 6px; border: 1px solid var(--brand);
  background: var(--brand); color: #fff; font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn:hover { filter: brightness(1.1); text-decoration: none; }
.btn.ghost { background: #fff; color: var(--brand); }
.btn.danger { background: #fff; color: var(--err); border-color: #e6b0aa; }
.btn.sm { padding: 4px 10px; font-size: 12px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
form.inline { display: inline; }

/* tables */
table.list { width: 100%; border-collapse: collapse; }
table.list th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); border-bottom: 2px solid var(--line); padding: 8px 10px; }
table.list td { border-bottom: 1px solid var(--line); padding: 10px; vertical-align: top; }
table.list tr:hover td { background: #fafbfc; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* severity + grade */
.sev { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; color: #fff; white-space: nowrap; }
.sev-Critical { background: var(--crit); } .sev-High { background: var(--high); } .sev-Medium { background: var(--med); }
.sev-Low { background: var(--low); } .sev-Info { background: var(--info); }
.tag { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 999px; background: #eef2f7; color: var(--muted); }
.tag.done { background: #eaf7ef; color: #145a32; }
.grade { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; font-weight: 800; color: #fff; }
.grade.big { width: 96px; height: 96px; font-size: 52px; border-radius: 14px; }
.grade-A { background: #1e8449; } .grade-B { background: #2e86c1; } .grade-C { background: #b7950b; }
.grade-D { background: #d35400; } .grade-F { background: #c0392b; }
.scorebox { display: flex; gap: 16px; align-items: center; margin-bottom: 14px; }
.counts { display: flex; gap: 6px; flex-wrap: wrap; }
.bar { height: 6px; background: #eef2f7; border-radius: 3px; overflow: hidden; margin-top: 4px; }
.bar > span { display: block; height: 100%; background: var(--brand); }
.w0{width:0}.w5{width:5%}.w10{width:10%}.w15{width:15%}.w20{width:20%}.w25{width:25%}.w30{width:30%}.w35{width:35%}.w40{width:40%}.w45{width:45%}.w50{width:50%}.w55{width:55%}.w60{width:60%}.w65{width:65%}.w70{width:70%}.w75{width:75%}.w80{width:80%}.w85{width:85%}.w90{width:90%}.w95{width:95%}.w100{width:100%}
.arealist { list-style: none; margin: 0; padding: 0; }
.arealist li { padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.arealist li:last-child { border: 0; }
.arealist .top { display: flex; justify-content: space-between; gap: 8px; }

/* stats */
.stat { font-size: 28px; font-weight: 800; }

/* tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tabs a { padding: 8px 14px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 600; }
.tabs a.on { color: var(--brand); border-color: var(--brand); text-decoration: none; }

/* findings */
.finding { border: 1px solid var(--line); border-left: 4px solid var(--info); border-radius: 6px; background: #fff; margin-bottom: 12px; }
.finding.s-Critical { border-left-color: var(--crit); } .finding.s-High { border-left-color: var(--high); }
.finding.s-Medium { border-left-color: var(--med); } .finding.s-Low { border-left-color: var(--low); }
.finding summary { list-style: none; cursor: pointer; padding: 12px 14px; display: flex; gap: 10px; align-items: center; }
.finding summary::-webkit-details-marker { display: none; }
.finding summary .t { font-weight: 600; flex: 1; }
.finding .body { padding: 0 14px 14px; }
.finding .warn { color: var(--high); font-size: 12px; }
.lib-item { padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: flex-start; }
.lib-item .t { flex: 1; font-size: 13px; }
.lib-item .obs { color: var(--muted); font-size: 12px; }
.lib-item.used { opacity: .45; }
.lib-scroll { max-height: 62vh; overflow: auto; padding-right: 4px; }
.hidden { display: none !important; }

/* auth */
.authwrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.authcard { width: 100%; max-width: 400px; }
.authcard h1 { margin-bottom: 4px; }
.qr { display: block; margin: 8px auto 12px; width: 200px; height: 200px; }
.empty { text-align: center; padding: 36px 12px; color: var(--muted); }
footer.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 20px; }
.mt { margin-top: 18px; }
.narrow { max-width: 560px; }
.findings-grid { grid-template-columns: minmax(0, 1fr) 420px; align-items: start; }
@media (max-width: 960px) { .findings-grid { grid-template-columns: 1fr; } }
.finding .right { margin-top: -30px; text-align: right; }
.grow2 { flex: 2 !important; }
.field.end { display: flex; align-items: flex-end; }
.scorestrip { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.scorestrip { margin-bottom: 18px; }
.narrow.wide { max-width: 820px; }
fieldset.plain { border: 0; padding: 0; margin: 0; min-width: 0; }
.wcol { width: 110px; }

/* license manager */
.g4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .g4 { grid-template-columns: 1fr 1fr; } }
.statrow .panel + .panel { margin-top: 0; }
.tag.st-active { background: #eaf7ef; color: #145a32; }
.tag.st-expiring { background: #fff8e1; color: #6e5300; }
.tag.st-expired { background: #fdecea; color: #922b21; }
.tag.st-void { background: #eef2f7; color: var(--muted); text-decoration: line-through; }
.keybox { word-break: break-all; min-height: 120px; }
.prewrap { white-space: pre-wrap; }
.nowrap { white-space: nowrap; }
table.kv td { padding: 6px 10px; }
table.kv td:first-child { width: 120px; }
.searchrow { max-width: 360px; }
ol.small { padding-left: 18px; margin: 6px 0; }
