:root {
  --bg: #07090f;
  --bg-soft: #0c1019;
  --surface: #101622;
  --surface-2: #141c2b;
  --line: #223048;
  --line-soft: rgba(151, 170, 205, 0.16);
  --text: #f2f6ff;
  --muted: #92a0b7;
  --muted-2: #68758c;
  --accent: #4f8cff;
  --accent-2: #37d6a3;
  --danger: #ff5d6c;
  --warn: #ffb454;
  --ok: #44d18d;
  --shadow: 0 24px 90px rgba(0, 0, 0, 0.38);
}

* { box-sizing: border-box; }
html { font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(79, 140, 255, 0.18), transparent 34rem),
    radial-gradient(circle at top right, rgba(55, 214, 163, 0.10), transparent 30rem),
    var(--bg);
}
a { color: inherit; }

.topbar {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  border-bottom: 1px solid var(--line-soft);
}
.brand {
  font-size: 24px;
  font-weight: 850;
  text-decoration: none;
  letter-spacing: 0;
}
.brand span { color: var(--accent-2); }
nav { display: flex; gap: 18px; color: var(--muted); font-weight: 650; }
nav a { text-decoration: none; }
nav a:hover { color: var(--text); }

main { max-width: 1180px; margin: 0 auto; padding: 28px 24px; }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
  gap: 24px;
  align-items: stretch;
  min-height: 560px;
}
.hero-copy, .hero-panel, .content-band, .admin-login, .violation, .admin-section, .scan-progress {
  background: linear-gradient(180deg, rgba(20, 28, 43, 0.92), rgba(13, 18, 29, 0.96));
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow);
  border-radius: 8px;
}
.hero-copy {
  padding: 58px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
h1 { margin: 0; font-size: clamp(40px, 6vw, 76px); line-height: 0.96; letter-spacing: 0; }
h2 { margin: 0 0 18px; font-size: 28px; line-height: 1.15; }
h3 { margin: 0 0 10px; font-size: 19px; }
p { color: var(--muted); line-height: 1.65; }
.hero-copy p { font-size: 18px; max-width: 680px; }
.form-note { margin: 12px 0 0; font-size: 13px; color: var(--muted-2); }

.scan-form, .admin-login form {
  display: flex;
  gap: 10px;
  margin-top: 28px;
}
input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 15px 16px;
  font: inherit;
  color: var(--text);
  background: #090d15;
  outline: none;
}
input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.18); }
button, .button {
  border: 0;
  border-radius: 8px;
  padding: 15px 18px;
  background: linear-gradient(135deg, var(--accent), #7aa8ff);
  color: #fff;
  font: inherit;
  font-weight: 780;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
button:hover, .button:hover { filter: brightness(1.08); }
.secondary { background: #1b2537; color: var(--text); }

.hero-panel {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.scanner-console {
  border-radius: 8px;
  background: #080c13;
  border: 1px solid var(--line);
  padding: 20px;
  min-height: 160px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}
.scanner-console p { margin: 8px 0; color: #a8ffdc; font-size: 14px; }
.console-head { display: flex; gap: 7px; margin-bottom: 14px; }
.console-head span { width: 10px; height: 10px; border-radius: 999px; background: var(--danger); }
.console-head span:nth-child(2) { background: var(--warn); }
.console-head span:nth-child(3) { background: var(--ok); }

.check-list { display: grid; gap: 10px; }
.check-list div {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.025);
  border-radius: 8px;
}
.check-list b { color: var(--accent-2); }
.check-list span { color: var(--muted); }

.stats, .summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 26px 0;
}
.stats article, .summary-grid article {
  background: rgba(16, 22, 34, 0.88);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 22px;
}
.stats span, .summary-grid span, .muted { color: var(--muted); }
.stats strong, .summary-grid strong { display: block; margin-top: 8px; font-size: 28px; }
.compact strong { font-size: 22px; }

.content-band, .admin-login, .admin-section { padding: 34px; margin: 28px 0; }
.columns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.columns > div { border-top: 2px solid var(--accent); padding-top: 16px; }

.result-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 24px;
}
.result-head h1 { font-size: clamp(28px, 5vw, 48px); overflow-wrap: anywhere; }
.status {
  display: inline-flex;
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 800;
  background: #1b2537;
}
.status-done { background: rgba(68, 209, 141, 0.12); color: var(--ok); }
.status-failed { background: rgba(255, 93, 108, 0.12); color: var(--danger); }
.status-running, .status-queued { background: rgba(255, 180, 84, 0.12); color: var(--warn); }

.scan-progress {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 28px;
  padding: 34px;
  align-items: center;
}
.scan-radar {
  position: relative;
  width: 210px;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(79, 140, 255, 0.38);
  background: radial-gradient(circle, rgba(55, 214, 163, 0.22), transparent 52%);
  overflow: hidden;
}
.scan-radar::before {
  content: "";
  position: absolute;
  inset: 50% 50% 0 0;
  background: linear-gradient(45deg, rgba(79, 140, 255, 0.55), transparent 70%);
  transform-origin: left top;
  animation: sweep 2.4s linear infinite;
}
.scan-radar span {
  position: absolute;
  inset: 26px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
}
.scan-radar span:nth-child(2) { inset: 58px; }
.scan-radar span:nth-child(3) { inset: 92px; background: var(--accent-2); box-shadow: 0 0 24px var(--accent-2); }
@keyframes sweep { to { transform: rotate(360deg); } }

.progress-steps { display: grid; gap: 9px; margin-top: 22px; }
.progress-steps div {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 10px;
  align-items: center;
  padding: 11px 13px;
  border-radius: 8px;
  border: 1px solid var(--line-soft);
  color: var(--muted);
}
.progress-steps b { color: var(--muted-2); }
.progress-steps div.active {
  color: var(--text);
  border-color: rgba(79, 140, 255, 0.55);
  background: rgba(79, 140, 255, 0.10);
}
.progress-steps div.done b { color: var(--accent-2); }

.violations { display: grid; gap: 15px; }
.group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
}
.group-title span {
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
}
.violation {
  padding: 24px;
  border-left: 5px solid var(--warn);
  box-shadow: none;
}
.violation span { color: var(--muted); font-size: 14px; }
.violation strong { color: var(--danger); }
.severity-critical { border-left-color: var(--danger); }
.severity-high { border-left-color: var(--warn); }
.severity-medium { border-left-color: #e4b000; }
.severity-low { border-left-color: var(--ok); }
.checked-pages p { overflow-wrap: anywhere; margin: 8px 0; }

.alert {
  margin: 18px 0 0;
  padding: 14px 16px;
  border-radius: 8px;
  background: rgba(255, 93, 108, 0.12);
  color: #ffb7be;
  font-weight: 650;
}
.success { background: rgba(68, 209, 141, 0.12); color: var(--ok); }

.table { display: grid; gap: 8px; overflow-x: auto; }
.table-row {
  min-width: 860px;
  display: grid;
  grid-template-columns: 70px 2fr 1fr 1fr;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid var(--line-soft);
  padding: 12px 0;
}
.scans-table .table-row { grid-template-columns: 70px 2fr 0.8fr 1fr 1.2fr; }
.head { color: var(--muted); font-weight: 800; }
.table form { margin: 0; }
.table button { padding: 8px 10px; }

.footer {
  max-width: 1180px;
  margin: 32px auto;
  padding: 0 24px 24px;
  color: var(--muted);
  font-size: 14px;
}
.footer p { margin: 4px 0; }

@media (max-width: 860px) {
  .topbar { height: auto; padding-top: 18px; align-items: flex-start; }
  nav { flex-direction: column; gap: 8px; }
  main { padding: 16px; }
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-copy, .hero-panel, .content-band, .admin-login, .admin-section, .scan-progress { padding: 24px; }
  h1 { font-size: 42px; }
  .scan-form, .admin-login form { flex-direction: column; }
  .stats, .summary-grid, .columns, .scan-progress { grid-template-columns: 1fr; }
  .result-head { flex-direction: column; }
  .scan-radar { width: min(210px, 100%); margin: 0 auto; }
}

@media (prefers-reduced-motion: reduce) {
  .scan-radar::before { animation: none; }
}
