:root {
  --bg: #08080b;
  --bg2: #0d0d11;
  --card: #14141a;
  --card-hover: #18181f;
  --line: #1f1f28;
  --line2: #2a2a35;
  --fg: #ececf0;
  --dim: #8a8a96;
  --muted: #5a5a66;
  --accent: #ff5cb3;
  --accent2: #7c5cff;
  --green: #4ade80;
  --yellow: #facc15;
  --red: #f87171;
  --orange: #fb923c;
  --blue: #60a5fa;
  --cyan: #22d3ee;
  --shadow: 0 1px 2px rgba(0,0,0,.2), 0 4px 16px rgba(0,0,0,.25);
  --shadow-lg: 0 20px 60px rgba(0,0,0,.5);
}

* { box-sizing: border-box; }
:root {
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, "Fira Code", Menlo,
               Consolas, monospace;
}

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--fg);
  font: 13px/1.55 var(--font-sans);
  font-feature-settings: "cv02", "cv03", "cv04", "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  position: relative;
}

/* Monospace only where it earns its keep */
.terminal, .terminal *,
pre, code, kbd, samp,
.audit-target, .scan-id-line code,
.findings-tbl .poc, .findings-tbl pre,
.terminal-frame pre, .finding-card pre,
.tag-SYS, .tag-SCAN, .tag-EXPLOIT, .tag-VERIFY, .tag-PATCH,
.tag-WARN, .tag-ERR, .tag-AI {
  font-family: var(--font-mono);
}

h1, h2, h3, h4, h5 { font-family: var(--font-sans); letter-spacing: -.01em; }
h1 { letter-spacing: -.02em; }
.kpi-value, .stat-value, .hero-stats strong, .plan .price {
  font-family: var(--font-sans);
  font-feature-settings: "tnum"; /* tabular numbers */
}

/* ─── Unified themed background (aurora + dot grid) ─── */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(ellipse 50% 40% at 12% 6%,  rgba(255,92,179,.08),  transparent 55%),
    radial-gradient(ellipse 45% 45% at 88% 92%, rgba(124,92,255,.08),  transparent 55%),
    var(--bg);
  animation: auroraShift 30s ease-in-out infinite alternate;
}
body::after {
  content: '';
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,.025) 1px, transparent 0);
  background-size: 28px 28px;
}
@keyframes auroraShift {
  0%   { transform: translate(0, 0)     scale(1); }
  50%  { transform: translate(-2%, 1%)  scale(1.04); }
  100% { transform: translate(1%, -1%)  scale(1.02); }
}

/* Landing keeps its own grid + brighter glow on top */
.landing .grid-bg, .auth .grid-bg { display: none; }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── Landing ─── */
.landing { min-height: 100vh; position: relative; overflow-x: hidden; }
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 32px; max-width: 1280px; margin: 0 auto;
  position: relative; z-index: 5;
}
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a { color: var(--dim); font-size: 13px; }
.nav-links a:hover { color: var(--fg); }
.btn-primary, .btn-ghost {
  padding: 6px 12px; border-radius: 6px; font-size: 11.5px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  width: auto; line-height: 1; cursor: pointer; border: 1px solid transparent;
  margin: 0;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: white !important;
}
.btn-primary:hover { filter: brightness(1.1); text-decoration: none; }
.btn-primary.disabled { opacity: .4; pointer-events: none; }
.btn-primary.big, .btn-ghost.big { padding: 9px 16px; font-size: 12px; }
.btn-ghost { color: var(--fg) !important; border-color: var(--line); background: var(--bg2); }
.btn-ghost:hover { border-color: var(--accent2); text-decoration: none; }

.hero {
  text-align: center; padding: 50px 18px 26px; max-width: 820px; margin: 0 auto;
  position: relative; z-index: 2;
}
.hero-tag {
  display: inline-block; padding: 4px 11px; border-radius: 999px;
  background: var(--bg2); border: 1px solid var(--line);
  font-size: 10.5px; color: var(--dim); margin-bottom: 18px;
}
.hero h1 {
  font-size: 44px; font-weight: 800; letter-spacing: -.03em;
  line-height: 1.1; margin: 0 0 16px;
}
.hero h1 .grad {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero .lede { font-size: 15px; line-height: 1.65; color: var(--dim); margin: 0 auto 22px; max-width: 660px; font-weight: 400; }
.cta-row { display: flex; justify-content: center; gap: 10px; margin-bottom: 32px; }
.hero-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 16px; max-width: 720px; margin: 0 auto;
}
.hero-stats > div {
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px; text-align: center;
}
.hero-stats strong {
  display: block; font-size: 28px; font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-stats span { font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: 1px; }

.terminal-demo {
  max-width: 1040px; margin: 40px auto 80px; padding: 0 24px;
  position: relative; z-index: 2;
}
.terminal-frame {
  background: #08080a; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 30px 80px rgba(0,0,0,.6); overflow: hidden;
}
.t-bar {
  background: var(--bg2); padding: 10px 14px;
  border-bottom: 1px solid var(--line); color: var(--dim); font-size: 12px;
}
.t-bar .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }
.t-bar .dot.r { background: #ff5f56; } .t-bar .dot.y { background: #ffbd2e; } .t-bar .dot.g { background: #27c93f; }
.terminal-frame pre {
  padding: 22px 26px; margin: 0; font-size: 12.5px; line-height: 1.7;
  color: var(--fg); white-space: pre; overflow-x: auto;
}
.terminal-frame .muted { color: var(--muted); }
.terminal-frame .phase { color: var(--accent); font-weight: 700; }
.terminal-frame .g { color: var(--green); font-weight: 700; }

section h2 { text-align: center; font-size: 32px; font-weight: 800; letter-spacing: -.5px; margin: 0 0 40px; }
.features, .how, .pricing { padding: 80px 24px; max-width: 1120px; margin: 0 auto; position: relative; z-index: 2; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 880px) { .grid-3 { grid-template-columns: 1fr; } .hero h1 { font-size: 38px; } .hero-stats { grid-template-columns: repeat(2, 1fr); } }

.feature {
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 16px 16px;
}
.feature .ico { font-size: 20px; margin-bottom: 8px; }
.feature h3 { margin: 0 0 6px; font-size: 14px; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--fg); }
.feature p { color: var(--dim); margin: 0; font-size: 12px; line-height: 1.65; }

.phase-list { list-style: none; padding: 0; max-width: 640px; margin: 0 auto; }
.phase-list li {
  display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--line);
}
.phase-list li:last-child { border-bottom: none; }
.phase-list .num {
  flex: 0 0 28px; height: 28px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: white; border-radius: 50%; display: grid; place-items: center;
  font-weight: 800; font-size: 11px;
}
.phase-list h4 { margin: 0 0 3px; font-size: 13px; font-weight: 600; }
.phase-list p  { margin: 0; color: var(--dim); font-size: 12px; line-height: 1.6; }

.pricing .muted { text-align: center; color: var(--dim); margin: -28px 0 32px; font-size: 13px; }
.plan {
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 18px 16px; text-align: center;
}
.plan.featured { border-color: var(--accent2); box-shadow: 0 0 30px rgba(124,92,255,.15); }
.plan h3 { margin: 0 0 4px; font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: 1px; }
.plan .price { font-size: 22px; font-weight: 800; margin-bottom: 10px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 14px; color: var(--dim); font-size: 11px; }
.plan ul li { padding: 4px 0; border-bottom: 1px dashed var(--line); }
.plan ul li:last-child { border-bottom: none; }

.footer {
  display: flex; justify-content: space-between; align-items: flex-end;
  padding: 40px 32px; max-width: 1280px; margin: 60px auto 0;
  border-top: 1px solid var(--line); color: var(--dim); font-size: 12px;
  flex-wrap: wrap; gap: 18px;
}

/* ───── Auth (login) ───── */
.auth { min-height: 100vh; display: grid; place-items: center; position: relative; overflow: hidden; }
.grid-bg {
  position: fixed; inset: 0; z-index: 0;
  background:
    radial-gradient(circle at 20% 10%, rgba(255,92,179,.12), transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(124,92,255,.12), transparent 40%),
    linear-gradient(var(--line) 1px, transparent 1px) 0 0/40px 40px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0/40px 40px,
    var(--bg);
  opacity: .7;
}
.card {
  position: relative; z-index: 1;
  background: var(--card);
  border: 1px solid var(--line);
  padding: 36px 32px;
  width: 360px;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.logo { font-family: var(--font-sans); font-size: 18px; font-weight: 700; letter-spacing: -.6px; }
.logo .brand { color: var(--accent); }
.logo .dot { color: var(--fg); }
.logo .tld { color: var(--accent2); }
.logo.small { font-size: 13px; }
.tag { color: var(--dim); margin: 4px 0 18px; font-size: 11px; }
form label { display: block; margin: 8px 0; color: var(--dim); font-size: 11px; }
form input {
  display: block; width: 100%;
  background: var(--bg2); color: var(--fg);
  border: 1px solid var(--line); border-radius: 6px;
  padding: 7px 10px; margin-top: 3px;
  font: inherit; font-size: 12px;
}
form input:focus { outline: none; border-color: var(--accent2); }
button {
  width: 100%; margin-top: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: white; border: 0; border-radius: 6px;
  padding: 9px; font: inherit; font-size: 12px; font-weight: 600;
  cursor: pointer;
}
button:hover { filter: brightness(1.1); }
.err {
  background: #2a1117; border: 1px solid #5a1f2c; color: #ffb4c0;
  padding: 8px 12px; border-radius: 8px; margin-bottom: 8px;
}
.foot { margin-top: 18px; color: var(--muted); font-size: 11px; display: flex; justify-content: space-between; }
.kbd { background: var(--bg2); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; }

/* ───── Dashboard ───── */
.app { min-height: 100vh; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 18px; border-bottom: 1px solid var(--line);
  background: var(--bg2);
}
.topbar nav { display: flex; gap: 16px; align-items: center; color: var(--dim); }
.user { color: var(--fg); }
.logout { color: var(--dim); }
.dashboard, .scan-detail { padding: 16px 28px; max-width: 1480px; margin: 0 auto; width: 100%; box-sizing: border-box; }
.page-pane, .grid-2, .grid-3, .kpi-row, .card { width: 100%; box-sizing: border-box; }
.grid-2 > .card, .grid-3 > .card, .kpi-row > .kpi { min-width: 0; margin-bottom: 0; }
.grid-2, .grid-3.perf { margin-bottom: 12px; }
.page-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px; gap: 12px;
}
.page-head h1 { font-size: 19px; margin: 0 0 2px; font-weight: 700; letter-spacing: -.02em; }
.page-head .muted { margin: 0; font-size: 12px; }

.page-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.ptab {
  background: transparent; border: 0; padding: 7px 14px;
  color: var(--dim); font: inherit; font-size: 11px; cursor: pointer;
  width: auto; margin: 0; border-bottom: 2px solid transparent;
}
.ptab:hover { color: var(--fg); }
.ptab.active { color: var(--fg); border-bottom-color: var(--accent); }
.page-pane { display: none; }
.page-pane.active { display: block; }

.kpi-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 12px;
}
.kpi {
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px;
}
.kpi-label { font-size: 10.5px; color: var(--dim); text-transform: uppercase; letter-spacing: .08em; font-weight: 500; }
.kpi-value { font-size: 26px; font-weight: 700; margin: 6px 0 4px; letter-spacing: -.02em; }
.kpi-sub { font-size: 11px; color: var(--muted); }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 16px; margin-bottom: 12px;
}
.card h3 { margin: 0 0 12px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); font-weight: 600; }
.card h4 { margin: 10px 0 6px; font-size: 11.5px; color: var(--dim); font-weight: 500; }

.bar-list { list-style: none; padding: 0; margin: 0; }
.bar-list li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0; border-bottom: 1px dashed var(--line);
  font-size: 12.5px;
}
.bar-list li:last-child { border-bottom: none; }
.bar-list strong { font-size: 14px; font-weight: 600; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-2 .card { margin-bottom: 12px; }
.grid-3.perf { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.grid-3.perf .card { margin: 0; padding: 10px 14px; }
.grid-3.perf .kpi-value { font-size: 16px; margin-top: 2px; }

.chart-placeholder { text-align: center; padding: 30px 16px; }
.chart-placeholder p { color: var(--muted); margin: 0; font-size: 11px; }

.audit-console .ac-head, .audit-list-card .ac-head { display: block; margin-bottom: 10px; }
.audit-console .ac-head h3 { margin-bottom: 3px; }
.audit-console .ac-head .muted { margin: 0; font-size: 10.5px; }
.plan-pill {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg2); border: 1px solid var(--line);
  border-radius: 6px; padding: 7px 10px; margin: 10px 0;
  font-size: 11.5px;
}
.plan-pill strong { color: var(--accent); }

.sub-tabs { display: flex; gap: 2px; margin: 12px 0 10px; border-bottom: 1px solid var(--line); }
.stab {
  background: transparent; border: 0; padding: 7px 12px;
  color: var(--dim); font: inherit; font-size: 11px; cursor: pointer;
  width: auto; margin: 0; border-bottom: 2px solid transparent;
}
.stab:hover:not([disabled]) { color: var(--fg); }
.stab.active { color: var(--fg); border-bottom-color: var(--accent); }
.stab[disabled] { opacity: .4; cursor: not-allowed; }
.stab-pane { display: none; }
.stab-pane.active { display: block; }
.stab-pane textarea {
  display: block; width: 100%;
  background: var(--bg2); color: var(--fg);
  border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 12px; margin-top: 4px; font: inherit; resize: vertical;
}
.stab-pane button[type="submit"] { margin-top: 12px; padding: 9px; font-size: 12px; }
.legal { font-size: 10px; margin-top: 8px; }

.filters { display: flex; gap: 4px; }
.filter-btn {
  background: var(--bg2); border: 1px solid var(--line);
  border-radius: 999px; padding: 4px 10px; font: inherit; font-size: 10.5px;
  color: var(--dim); cursor: pointer; width: auto; margin: 0;
}
.filter-btn span {
  background: var(--line); color: var(--dim); padding: 0 5px;
  border-radius: 999px; margin-left: 5px; font-size: 9.5px;
}
.filter-btn.active {
  border-color: var(--accent); color: var(--fg);
}
.filter-btn.active span { background: var(--accent); color: white; }

.audit-list { list-style: none; padding: 0; margin: 0; }
.audit-card {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 12px; background: var(--bg2);
  border: 1px solid var(--line); border-radius: 8px; margin-bottom: 6px;
  gap: 10px;
}
.audit-card.hide { display: none; }
.audit-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.audit-target { font-size: 12.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--cyan); }
.audit-date { font-size: 10.5px; }
.audit-actions { display: flex; gap: 4px; align-items: center; flex-shrink: 0; }
.btn-ghost.small { padding: 4px 9px; font-size: 10.5px; }

.kv {
  display: flex; justify-content: space-between;
  padding: 8px 0; border-bottom: 1px dashed var(--line);
  font-size: 12.5px;
}
.kv:last-child { border-bottom: none; }
.kv span { color: var(--dim); }

@media (max-width: 1100px) {
  .kpi-row, .grid-2, .grid-3.perf { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .kpi-row, .grid-2, .grid-3.perf { grid-template-columns: 1fr; }
}

/* ─── Scan detail ─── */
.scan-grid { display: grid; grid-template-columns: 1fr 360px; gap: 20px; }
.scan-grid .terminal { min-height: 420px; max-height: 60vh; }
.status-row { margin-bottom: 12px; }
.scan-id-line code { background: var(--bg2); padding: 1px 6px; border-radius: 4px; }

.findings-list { display: flex; flex-direction: column; gap: 10px; }
.finding-card {
  background: var(--bg2); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 16px;
}
.finding-head { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; font-size: 11px; }
.finding-cat { color: var(--dim); }
.finding-src { font-family: ui-monospace, monospace; }
.finding-card h4 { margin: 4px 0 8px; font-size: 14px; color: var(--fg); }
.finding-card pre { background: #08080a; padding: 10px; border-radius: 6px; font-size: 11px; white-space: pre-wrap; word-break: break-all; }

@media (max-width: 1100px) {
  .scan-grid { grid-template-columns: 1fr; }
}

.dash-cols {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 22px;
}

/* ─── Stats row ─── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
}
.stat-label { font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: 1px; }
.stat-value { font-size: 26px; font-weight: 700; margin-top: 4px; }
.stat-value.sev-CRITICAL { color: var(--red); }
.stat-value.sev-HIGH     { color: var(--red); }
.stat-value.sev-MEDIUM   { color: var(--yellow); }
.stat-value.sev-LOW      { color: var(--cyan); }
.empty-li { color: var(--dim); font-size: 12px; padding: 8px 12px; }
@media (max-width: 1100px) {
  .stats-row { grid-template-columns: repeat(3, 1fr); }
  .dash-cols { grid-template-columns: 1fr; }
}
.left h2 { font-size: 12px; color: var(--dim); text-transform: uppercase; letter-spacing: 1px; margin: 24px 0 8px; }
.left h2:first-child { margin-top: 0; }
.left details { margin: 12px 0; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg2); }
.left details summary { cursor: pointer; color: var(--dim); font-size: 12px; }
.scans { list-style: none; padding: 0; margin: 0; }
.scans li {
  display: flex; justify-content: space-between; align-items: center;
  gap: 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px;
  margin-bottom: 6px; background: var(--bg2);
}
.scans li .scan-link { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.del-btn {
  width: 22px; height: 22px; padding: 0; margin: 0;
  border: 1px solid transparent; border-radius: 6px;
  background: transparent; color: var(--muted);
  font: inherit; line-height: 1; cursor: pointer; flex-shrink: 0;
}
.del-btn:hover { background: #2a1117; border-color: #5a1f2c; color: var(--red); }
.status { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--line); color: var(--dim); }
.status.running { background: #1c2a4a; color: var(--blue); }
.status.done    { background: #0e2a1a; color: var(--green); }
.status.error   { background: #2a1117; color: var(--red); }

/* ───── Terminal ───── */
.terminal {
  background: #0c0c10;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  min-height: 56vh;
  font-size: 11px;
  white-space: pre-wrap;
  overflow-y: auto;
  max-height: 70vh;
}
.terminal .prompt { color: var(--dim); margin-bottom: 8px; }
.terminal .line { line-height: 1.7; }
.terminal .muted { color: var(--muted); }
.terminal .cmd { color: var(--fg); }

.sev-CRITICAL { color: var(--red); font-weight: 700; }
.sev-HIGH     { color: var(--red); }
.sev-MEDIUM   { color: var(--yellow); }
.sev-LOW      { color: var(--cyan); }
.sev-INFO     { color: var(--dim); }

.tag-SYS     { color: var(--blue); }
.tag-SCAN    { color: var(--cyan); }
.tag-EXPLOIT { color: var(--red); }
.tag-VERIFY  { color: var(--green); }
.tag-PATCH   { color: var(--yellow); }
.tag-WARN    { color: var(--yellow); }
.tag-ERR     { color: var(--red); }
.tag-AI      { color: var(--accent); font-weight: 700; }

.phase { color: var(--accent); font-weight: 700; margin-top: 12px; }

.summary {
  margin-top: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 20px;
}
.summary h3 { margin: 0 0 8px; color: var(--green); }
.counts { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.counts span { padding: 3px 10px; border-radius: 999px; background: var(--bg2); border: 1px solid var(--line); font-size: 12px; }
.summary .actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.summary .actions button {
  width: auto; margin: 0; padding: 8px 14px;
  background: var(--bg2); border: 1px solid var(--line);
  color: var(--cyan);
}
.summary .actions button:hover { background: var(--line); }

.tabs { display: flex; gap: 4px; margin-bottom: 10px; border-bottom: 1px solid var(--line); }
.tab {
  background: transparent; border: 1px solid transparent;
  border-bottom: none; padding: 8px 16px;
  color: var(--dim); font: inherit; cursor: pointer;
  width: auto; margin: 0; border-radius: 6px 6px 0 0;
}
button.btn-ghost, button.btn-primary, button.del-btn,
button.filter-btn, button.ptab, button.stab, button.tab,
button#refresh-all, button#show-findings-btn {
  width: auto;
}
.tab:hover { color: var(--fg); }
.tab.active {
  background: var(--card); border-color: var(--line);
  border-bottom: 1px solid var(--card); color: var(--fg);
  position: relative; top: 1px;
}
.badge {
  display: inline-block; padding: 0 6px; margin-left: 4px;
  background: var(--accent); color: white; border-radius: 999px;
  font-size: 10px; line-height: 16px; min-width: 16px; text-align: center;
}
.tab-pane { display: none; }
.tab-pane.active { display: block; }

.empty { padding: 40px; text-align: center; color: var(--dim); }

.findings-tbl {
  width: 100%; border-collapse: collapse;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  overflow: hidden;
}
.findings-tbl th {
  background: var(--bg2); color: var(--dim);
  padding: 10px 12px; text-align: left;
  font-size: 11px; text-transform: uppercase; letter-spacing: 1px;
  border-bottom: 1px solid var(--line);
}
.findings-tbl td {
  padding: 10px 12px; border-bottom: 1px solid var(--line);
  vertical-align: top; font-size: 13px;
}
.findings-tbl tr:last-child td { border-bottom: none; }
.sev-pill { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 700; }
.sev-pill.CRITICAL { background: #4a0e1c; color: #ff6b80; }
.sev-pill.HIGH     { background: #3a0e16; color: var(--red); }
.sev-pill.MEDIUM   { background: #3a2c08; color: var(--yellow); }
.sev-pill.LOW      { background: #082a2e; color: var(--cyan); }
.sev-pill.INFO     { background: var(--bg2); color: var(--dim); }
.findings-tbl details { margin-top: 6px; }
.findings-tbl details summary { color: var(--dim); cursor: pointer; font-size: 12px; }
.findings-tbl pre { background: #08080a; border: 1px solid var(--line); border-radius: 6px; padding: 10px; margin-top: 6px; white-space: pre-wrap; word-break: break-all; font-size: 11px; }

.report {
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 20px; max-height: 75vh; overflow-y: auto;
  font-size: 13px; line-height: 1.7; white-space: pre-wrap;
}

/* ════════════════════════════════════════════════════════════════════
   v0.3 — Sidebar app shell (Linear/Vercel-inspired)
   ════════════════════════════════════════════════════════════════════ */
.shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}
.shell .topbar { display: none; }  /* sidebar replaces topbar */
.shell .dashboard, .shell .scan-detail { padding: 28px 36px; max-width: none; margin: 0; }

.sidebar {
  border-right: 1px solid var(--line);
  background: var(--bg2);
  padding: 20px 14px;
  display: flex; flex-direction: column; gap: 18px;
  position: sticky; top: 0; height: 100vh;
}
.brand-mark {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 8px; text-decoration: none; color: var(--fg);
}
.brand-mark .mark {
  width: 30px; height: 30px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: white; border-radius: 8px;
  display: grid; place-items: center;
  font-weight: 800; font-size: 16px;
  box-shadow: 0 4px 14px rgba(124,92,255,.3);
}
.brand-mark .brand-text {
  font-weight: 700; font-size: 14px; letter-spacing: -.02em;
  display: flex; flex-direction: column; line-height: 1;
}
.brand-mark .brand-text small {
  font-size: 9.5px; color: var(--dim); text-transform: uppercase;
  letter-spacing: .12em; font-weight: 500; margin-top: 3px;
}
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 7px;
  color: var(--dim); font-size: 13px; font-weight: 500;
  text-decoration: none;
  position: relative;
  cursor: pointer;
}
.nav-item:hover { background: var(--card); color: var(--fg); text-decoration: none; }
.nav-item.active {
  background: var(--card);
  color: var(--fg);
  box-shadow: inset 2px 0 0 var(--accent);
}
.nav-item .ico {
  width: 18px; height: 18px;
  display: grid; place-items: center;
  font-size: 11px;
  color: var(--dim);
}
.nav-item.active .ico { color: var(--accent); }
.nav-badge {
  margin-left: auto;
  background: var(--card); color: var(--dim);
  padding: 1px 6px; border-radius: 999px;
  font-size: 10px; font-weight: 600;
  border: 1px solid var(--line);
}
.nav-item.active .nav-badge { background: var(--bg2); color: var(--fg); }

.side-foot { margin-top: auto; padding: 10px; }
.plan-mini {
  background: linear-gradient(135deg, rgba(255,92,179,.08), rgba(124,92,255,.08));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px; margin-bottom: 10px;
}
.plan-mini-label { font-size: 12px; font-weight: 600; color: var(--fg); }
.plan-mini-sub   { font-size: 10.5px; color: var(--dim); margin-top: 2px; }
.logout-link {
  display: block; text-align: center; padding: 7px;
  color: var(--dim); font-size: 12px;
  border: 1px solid var(--line); border-radius: 7px;
}
.logout-link:hover { color: var(--fg); border-color: var(--accent2); text-decoration: none; }

/* ─── Main + page header ─── */
.main { min-width: 0; }
.main-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: 24px; gap: 20px; flex-wrap: wrap;
}
.main-head h1 {
  font-size: 24px; margin: 0 0 4px;
  font-weight: 700; letter-spacing: -.02em;
}
.main-head h1 .accent {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.main-head .muted { font-size: 13px; }
.head-actions { display: flex; gap: 8px; }

/* ─── KPI redesign ─── */
.kpi-row {
  grid-template-columns: repeat(4, 1fr);
}
.kpi {
  position: relative;
  transition: border-color .15s, transform .15s;
}
.kpi:hover { border-color: var(--line2); transform: translateY(-1px); }
.kpi-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px;
}
.kpi-trend {
  font-size: 10px; color: var(--dim);
  background: var(--bg2); padding: 2px 8px; border-radius: 999px;
  border: 1px solid var(--line);
}
.kpi-trend.up { color: var(--green); border-color: rgba(74,222,128,.3); }
.kpi-value { font-size: 28px; font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.kpi-value small { font-size: 14px; color: var(--dim); font-weight: 500; margin-left: 2px; }
.kpi-value.sm { font-size: 22px; }

/* ─── Cards refined ─── */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 16px;
  transition: border-color .15s;
}
.card:hover { border-color: var(--line2); }
.card.mini { padding: 14px 18px; }
.card-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
}
.card-head h3 {
  margin: 0; font-size: 13px; font-weight: 600;
  color: var(--fg);
  text-transform: none; letter-spacing: 0;
}
.card-head .muted { font-size: 11px; }

/* ─── Status bars (replaces dashed list) ─── */
.status-bars { display: flex; flex-direction: column; gap: 10px; }
.sb-row {
  display: grid;
  grid-template-columns: 110px 1fr 36px;
  align-items: center; gap: 12px;
  font-size: 12px;
}
.sb-row .sb-label { color: var(--dim); display: flex; align-items: center; gap: 8px; font-weight: 500; }
.sb-row strong { text-align: right; font-size: 14px; font-weight: 600; }
.sb-bar { height: 6px; background: var(--bg2); border-radius: 999px; overflow: hidden; }
.sb-fill { height: 100%; transition: width .3s ease; border-radius: 999px; }
.sb-fill.done     { background: var(--green); }
.sb-fill.running  { background: var(--blue); }
.sb-fill.failed   { background: var(--red); }
.sb-fill.critical { background: linear-gradient(90deg, var(--red), #ff3366); }
.sb-fill.high     { background: var(--red); }
.sb-fill.medium   { background: var(--yellow); }
.sb-fill.low      { background: var(--cyan); }
.sb-fill.info     { background: var(--muted); }
.dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--muted); display: inline-block;
}
.dot.done     { background: var(--green); }
.dot.running  { background: var(--blue); animation: pulse 2s infinite; }
.dot.failed   { background: var(--red); }
.dot.critical { background: var(--red); }
.dot.high     { background: var(--red); }
.dot.medium   { background: var(--yellow); }
.dot.low      { background: var(--cyan); }
.dot.info     { background: var(--muted); }
@keyframes pulse {
  0%,100% { opacity: 1; }
  50%     { opacity: .4; }
}

/* ─── New scan form ─── */
.scan-form { display: flex; flex-direction: column; gap: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row .form-field { margin: 0; }
.form-field { display: flex; flex-direction: column; gap: 5px; }
.form-field .lbl {
  font-size: 11.5px; color: var(--dim);
  display: flex; align-items: center; gap: 6px;
}
.form-field .hint { color: var(--muted); font-weight: 400; }
.form-field input, .form-field textarea {
  background: var(--bg2); color: var(--fg);
  border: 1px solid var(--line); border-radius: 7px;
  padding: 9px 12px;
  font: inherit; font-size: 13px;
  transition: border-color .15s, background .15s;
}
.form-field input:focus, .form-field textarea:focus {
  outline: none; border-color: var(--accent2);
  background: var(--card-hover);
}
.auth-details {
  background: var(--bg2); border: 1px solid var(--line);
  border-radius: 8px; padding: 0;
}
.auth-details summary {
  list-style: none; cursor: pointer;
  padding: 11px 14px;
  font-size: 12px; color: var(--dim);
}
.auth-details summary::-webkit-details-marker { display: none; }
.auth-details summary .chev { display: inline-block; transition: transform .2s; margin-right: 4px; }
.auth-details[open] summary .chev { transform: rotate(90deg); }
.auth-details .form-row { padding: 0 14px 14px; grid-template-columns: 2fr 1fr 1fr; }
.form-actions {
  display: flex; align-items: center; gap: 14px;
  padding-top: 4px;
}
.form-actions .btn-primary { padding: 10px 18px; }
.form-actions .legal { margin: 0; font-size: 11px; }

/* ─── Audit list ─── */
.audit-card {
  padding: 12px 14px; border-radius: 8px;
  background: var(--bg2);
  transition: border-color .15s, background .15s;
}
.audit-card:hover { background: var(--card-hover); border-color: var(--line2); }
.audit-target-row { display: flex; align-items: center; gap: 10px; }
.audit-meta { gap: 4px; }
.audit-target { color: var(--cyan); font-size: 13px; font-weight: 500; }
.audit-date { font-size: 10.5px; }

.empty-li { padding: 0; }
.empty-state {
  text-align: center; padding: 40px 20px;
  display: flex; flex-direction: column; gap: 6px; align-items: center;
}
.empty-ico {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--bg2); border: 1px solid var(--line);
  display: grid; place-items: center; margin-bottom: 4px;
  color: var(--dim); font-size: 18px;
}
.empty-state strong { font-size: 14px; }
.empty-state .muted { font-size: 12px; }

/* ─── Severity pills (refined) ─── */
.sev-pill {
  display: inline-block;
  padding: 2px 8px; border-radius: 4px;
  font-size: 10px; font-weight: 700;
  font-family: var(--font-sans);
  letter-spacing: .04em; text-transform: uppercase;
  border: 1px solid transparent;
}
.sev-pill.CRITICAL { background: rgba(248,113,113,.12); color: #ff7a8c; border-color: rgba(248,113,113,.3); }
.sev-pill.HIGH     { background: rgba(251,146,60,.12); color: var(--orange); border-color: rgba(251,146,60,.3); }
.sev-pill.MEDIUM   { background: rgba(250,204,21,.12); color: var(--yellow); border-color: rgba(250,204,21,.3); }
.sev-pill.LOW      { background: rgba(34,211,238,.10); color: var(--cyan); border-color: rgba(34,211,238,.25); }
.sev-pill.INFO     { background: var(--bg2); color: var(--dim); border-color: var(--line); }

/* ─── Sub-tabs (Web target / GitHub) ─── */
.sub-tabs {
  display: flex; gap: 4px; margin-bottom: 18px;
  background: var(--bg2);
  border: 1px solid var(--line); border-radius: 9px;
  padding: 4px;
  width: fit-content;
}
.stab {
  background: transparent; border: 0;
  padding: 7px 14px; border-radius: 6px;
  color: var(--dim); font: inherit; font-size: 12px; font-weight: 500;
  width: auto; margin: 0; cursor: pointer;
}
.stab.active { background: var(--card); color: var(--fg); }

/* ─── Filter pills polish ─── */
.filter-btn {
  background: transparent; border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px; font: inherit; font-size: 11px;
  color: var(--dim); cursor: pointer; width: auto; margin: 0;
  transition: border-color .15s, color .15s;
}
.filter-btn:hover { border-color: var(--line2); color: var(--fg); }
.filter-btn.active {
  border-color: var(--accent2); color: var(--fg);
  background: rgba(124,92,255,.1);
}
.filter-btn.active span { background: var(--accent2); color: white; }

/* ─── Buttons refined ─── */
.btn-primary, .btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 7px 14px; border-radius: 7px;
  font-size: 12px; font-weight: 600; line-height: 1;
  cursor: pointer; border: 1px solid transparent;
  width: auto; margin: 0;
  transition: filter .15s, border-color .15s, background .15s;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: white !important;
  box-shadow: 0 4px 14px rgba(124,92,255,.25);
}
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-ghost {
  background: var(--bg2); color: var(--fg) !important;
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--line2); background: var(--card-hover); }

@media (max-width: 1100px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row;
             padding: 12px 18px; gap: 12px; align-items: center; }
  .side-nav { flex-direction: row; gap: 4px; flex: 1; overflow-x: auto; }
  .side-foot { display: none; }
  .nav-item.active { box-shadow: inset 0 -2px 0 var(--accent); }
}
@media (max-width: 720px) {
  .kpi-row, .grid-2, .grid-3.perf, .form-row, .auth-details .form-row {
    grid-template-columns: 1fr;
  }
}
