:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --ink: #16181d;
  --muted: #646b76;
  --line: #d9dde5;
  --panel: #ffffff;
  --ok: #0f7b45;
  --warn: #9a6700;
  --bad: #b42318;
  --accent: #2457d6;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.45 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}
h1, h2, p { margin: 0; }
h1 { font-size: 26px; }
h2 { font-size: 16px; }
p, .empty, th { color: var(--muted); }
button, input {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: var(--ink);
  padding: 0 12px;
}
button:not(:disabled) {
  cursor: pointer;
}
button:not(:disabled):hover {
  border-color: var(--accent);
}
.grid {
  display: grid;
  gap: 12px;
}
.metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 12px;
}
.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
}
.panel, .metric {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}
.config {
  margin-bottom: 12px;
}
.configGrid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr auto;
  gap: 8px;
}
.statusMsg {
  min-height: 20px;
  margin-top: 8px;
  color: var(--muted);
}
.statusMsg.ok { color: var(--ok); }
.statusMsg.bad { color: var(--bad); }
.metric b {
  display: block;
  font-size: 22px;
  margin-top: 6px;
}
.panelHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th, td {
  text-align: left;
  padding: 10px 8px;
  border-top: 1px solid var(--line);
  vertical-align: middle;
}
.pill {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: var(--accent);
}
.ok { color: var(--ok); }
.warn { color: var(--warn); }
.bad { color: var(--bad); }
.list {
  display: grid;
  gap: 8px;
}
.item {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}
.flag {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding: 10px 0;
}
.actions {
  display: flex;
  gap: 8px;
  margin: 8px 0 10px;
}
@media (max-width: 900px) {
  .metrics, .two { grid-template-columns: 1fr; }
  .configGrid { grid-template-columns: 1fr; }
  .topbar { align-items: flex-start; flex-direction: column; }
  table { font-size: 12px; }
  th, td { padding: 8px 4px; }
}
