:root {
  color-scheme: dark;
  --bg: #101214;
  --panel: #191d21;
  --panel-2: #20262b;
  --line: #2e363d;
  --text: #edf2f4;
  --muted: #95a3ad;
  --good: #4ec58a;
  --warn: #e6b450;
  --bad: #ee6a6a;
  --info: #63a9ff;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.sidebar {
  border-right: 1px solid var(--line);
  padding: 22px 16px;
  background: #141719;
}
.brand { display: flex; gap: 12px; align-items: center; margin-bottom: 28px; }
.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #26323a;
  color: var(--good);
  font-weight: 800;
}
h1, h2, h3, p { margin: 0; }
.brand h1 { font-size: 18px; }
.brand p, #subtitle, .muted { color: var(--muted); }
nav { display: grid; gap: 8px; }
nav button, .actions button, .actions input {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  border-radius: 8px;
  padding: 10px 12px;
}
nav button, .actions button {
  text-align: left;
  cursor: pointer;
}
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; }
.toolbar button, .pager button {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
}
.pager {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  padding: 10px 0 0;
}
.pager button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
.toolbar button:hover, .pager button:not(:disabled):hover {
  background: var(--panel-2);
  border-color: #46606f;
}
.actions input {
  width: 210px;
  outline: none;
}
.actions input:focus { border-color: #46606f; background: var(--panel-2); }
nav button.active, .actions button:hover { background: var(--panel-2); border-color: #46606f; }
.guard {
  margin-top: 24px;
  padding: 10px;
  border: 1px solid #5b4330;
  color: var(--warn);
  border-radius: 8px;
}
main { padding: 22px; min-width: 0; }
header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.actions { display: flex; gap: 10px; align-items: center; }
.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  color: var(--muted);
}
.pill.good { color: var(--good); border-color: #315c45; }
.pill.warn { color: var(--warn); border-color: #69542d; }
.grid { display: grid; gap: 14px; }
.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 12px;
}
.form-grid label { display: grid; gap: 6px; }
.form-grid input {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  border-radius: 8px;
  padding: 10px 12px;
  min-width: 0;
}
.form-grid input:focus { outline: none; border-color: #46606f; background: var(--panel-2); }
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  min-width: 0;
}
.kpi strong { display: block; font-size: 24px; margin-top: 8px; }
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
th, td {
  border-bottom: 1px solid var(--line);
  padding: 9px 10px;
  text-align: left;
  white-space: nowrap;
}
th { color: var(--muted); font-weight: 600; background: #171b1f; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
pre {
  margin: 10px 0 0;
  color: var(--text);
  white-space: pre-wrap;
  font-size: 12px;
}
.ok { color: var(--good); }
.warn { color: var(--warn); }
.bad { color: var(--bad); }
.scroll { overflow-x: auto; }
@media (max-width: 900px) {
  body { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .cols-5, .cols-4, .cols-2 { grid-template-columns: 1fr; }
}
