:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --ink: #18202a;
  --muted: #697383;
  --line: #dfe4ea;
  --brand: #125c7a;
  --brand-2: #18845f;
  --danger: #b3261e;
  --warn: #a05a00;
  --ok: #176b3a;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}
a { color: var(--brand); text-decoration: none; }
.layout { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar { background: #111820; color: #eef3f6; padding: 24px 18px; }
.brand { font-weight: 700; font-size: 18px; margin-bottom: 28px; }
.nav a { display: flex; padding: 10px 12px; border-radius: 6px; color: #dce6eb; margin-bottom: 4px; }
.nav a:hover, .nav a.active { background: #1e2b36; color: #fff; }
.main { padding: 28px; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.grid { display: grid; gap: 16px; }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 18px; }
.metric { font-size: 30px; font-weight: 700; margin-top: 8px; }
.muted { color: var(--muted); }
.table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); }
.table th, .table td { padding: 11px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.table th { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 3px 9px; font-size: 12px; background: #e9eef2; }
.severity-critical, .severity-high { background: #ffe5e0; color: var(--danger); }
.severity-medium { background: #fff1d9; color: var(--warn); }
.severity-low { background: #e6f4ec; color: var(--ok); }
.severity-info { background: #e8eef7; color: #315a8a; }
.finding-evidence { display: inline-block; margin-top: 4px; white-space: pre-line; }
.button, button { border: 0; background: var(--brand); color: #fff; padding: 9px 13px; border-radius: 6px; cursor: pointer; font-weight: 600; }
.button.secondary { background: #e7ecef; color: var(--ink); }
button.danger { background: var(--danger); }
.actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.inline-form { display: inline-block; margin-left: 6px; }
.link-button { border: 0; background: transparent; padding: 0; color: var(--brand); font-weight: 400; }
.link-button.danger-text { color: var(--danger); }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 11px;
  background: #fff;
  color: var(--ink);
}
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.form-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.project-switcher { max-width: 420px; margin-bottom: 16px; }
.auth { max-width: 420px; margin: 8vh auto; }
.flash { border-radius: 6px; padding: 12px 14px; margin-bottom: 16px; background: #e8f4ef; color: var(--ok); }
.error { background: #ffe9e6; color: var(--danger); }
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .grid.cols-4, .grid.cols-2, .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
}
