:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --panel: #ffffff;
  --text: #172033;
  --muted: #667085;
  --line: #d9e1ec;
  --primary: #1663d6;
  --primary-dark: #0f4fac;
  --danger: #b42318;
  --warn: #a15c00;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}
a { color: var(--primary); text-decoration: none; }
button, .button {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  font: inherit;
}
.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.primary:hover { background: var(--primary-dark); }
.ghost { background: #fff; }
.danger-link { color: var(--danger); }
.login-page {
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-panel {
  width: min(420px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 32px;
  box-shadow: 0 12px 34px rgba(16, 24, 40, .08);
}
.brand {
  font-size: 28px;
  font-weight: 700;
}
.subtitle {
  margin: 8px 0 24px;
  color: var(--muted);
}
.form {
  display: grid;
  gap: 16px;
}
label {
  display: grid;
  gap: 6px;
  color: #344054;
  font-size: 14px;
}
.hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.inline-hint {
  margin: -10px 0 2px 26px;
}
input, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  min-height: 38px;
  padding: 8px 10px;
  font: inherit;
  background: #fff;
}
.check {
  display: flex;
  align-items: center;
  gap: 8px;
}
.check input { width: auto; min-height: auto; }
.topbar {
  height: auto;
  min-height: 72px;
  padding: 16px 28px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.topbar h1 {
  margin: 0;
  font-size: 22px;
}
.topbar p {
  margin: 4px 0 0;
  color: var(--muted);
}
.container {
  width: min(1180px, calc(100% - 32px));
  margin: 24px auto 48px;
}
.narrow { width: min(760px, calc(100% - 32px)); }
.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.metrics div, .card, .alert {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.metrics div {
  padding: 14px;
  display: grid;
  gap: 6px;
}
.metrics span {
  color: var(--muted);
  font-size: 13px;
}
.metrics strong { font-size: 15px; word-break: break-all; }
.warnings {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}
.alert {
  padding: 12px 14px;
  color: var(--warn);
  background: #fff8eb;
}
.alert.danger, .alert.high {
  color: var(--danger);
  background: #fff3f1;
}
.card { padding: 18px; }
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.section-head h2 { margin: 0; font-size: 18px; }
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
th, td {
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  text-align: left;
  vertical-align: middle;
}
th { color: var(--muted); font-weight: 600; }
.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  word-break: break-all;
}
.domain-link {
  font-family: inherit;
  font-weight: 600;
}
.domain-link:hover { text-decoration: underline; }
.actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 180px;
}
.actions form { margin: 0; }
.actions button {
  min-height: 30px;
  padding: 0 8px;
}
.empty {
  color: var(--muted);
  text-align: center;
}
.grid-form {
  grid-template-columns: 1fr;
}
.form-actions {
  display: flex;
  gap: 10px;
}
.status-code {
  font-size: 48px;
  font-weight: 800;
  color: var(--primary);
}
@media (max-width: 720px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }
  .actions {
    flex-wrap: wrap;
  }
}
