:root {
  color-scheme: light;
  --bg: #f6f8fb;
  --ink: #172033;
  --muted: #5c667a;
  --line: #d8dee9;
  --accent: #116466;
  --panel: #ffffff;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 28px;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}
.brand { font-weight: 750; color: var(--ink); text-decoration: none; }
nav { display: flex; gap: 18px; flex-wrap: wrap; }
nav a, a { color: var(--accent); }
.container { width: min(1180px, calc(100% - 32px)); margin: 28px auto; }
.page-head { margin-bottom: 20px; }
h1, h2, h3 { margin: 0 0 12px; line-height: 1.15; }
p { color: var(--muted); }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin: 18px 0; }
.metrics div, .panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}
.metrics strong { display: block; font-size: 30px; }
.metrics span { color: var(--muted); }
.grid.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; align-items: start; }
.findings-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 0.7fr); gap: 20px; align-items: start; }
table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
th, td { text-align: left; padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #eef3f6; font-weight: 700; }
.finding-row { cursor: pointer; }
.finding-row:hover, .finding-row.is-selected { background: #edf7f7; }
.message-viewer {
  position: sticky;
  top: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}
form { display: grid; gap: 14px; }
label { display: grid; gap: 6px; font-weight: 650; }
label.inline { display: flex; align-items: center; gap: 8px; }
input, select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
}
button, .button {
  display: inline-block;
  width: fit-content;
  border: 0;
  border-radius: 6px;
  padding: 10px 14px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
}
.button.danger {
  background: #a92727;
}
.inline-form {
  display: inline-block;
  margin-left: 8px;
}
.inline-form button {
  margin: 0;
}
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0; }
.action-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 0 0 16px; }
.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 12px;
}
.filter-chip {
  background: #ffffff;
  color: var(--accent);
  border: 1px solid var(--line);
  padding: 7px 10px;
}
.filter-chip.is-active {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}
.settings-toolbar { color: var(--muted); }
.check-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 14px; }
.check-group {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfdff;
}
.check-group legend { padding: 0 6px; font-weight: 750; }
.check-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  padding: 8px 0;
  border-bottom: 1px solid #edf1f5;
  font-weight: 500;
}
.check-row:last-child { border-bottom: 0; }
.check-row input { width: auto; margin-top: 3px; }
.check-row small { display: block; color: var(--muted); font-size: 12px; }
.error { color: #a92727; }
.success { color: #177245; }
pre {
  max-height: 420px;
  overflow: auto;
  padding: 12px;
  background: #101820;
  color: #eff6ff;
  border-radius: 8px;
}
@media (max-width: 880px) {
  .findings-layout { grid-template-columns: 1fr; }
  .message-viewer { position: static; }
}
