:root {
  --bg: #eef2f4;
  --ink: #1c2830;
  --muted: #5d6b74;
  --line: #d5dee3;
  --card: #fff;
  --side: #13293d;
  --side2: #1d3b56;
  --accent: #c46b12;
  --ok: #0f7b4c;
  --bad: #9b1c1c;
  --warn: #8a5a00;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font: 15px/1.45 "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
.shell { display: flex; min-height: 100vh; }
aside {
  width: 220px;
  background: var(--side);
  color: #e7eef3;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}
.brand { padding: 22px 18px 12px; font-weight: 700; letter-spacing: .04em; }
nav { display: flex; flex-direction: column; padding: 8px; gap: 2px; }
nav a { color: #d5e2ea; text-decoration: none; padding: 8px 10px; border-radius: 8px; }
nav a.active, nav a:hover { background: var(--side2); color: white; }
.sidefoot { margin-top: auto; padding: 14px; font-size: 13px; color: #b7c6d1; }
.sidefoot form { margin-top: 8px; }
.sidefoot button, button, .btn {
  background: var(--accent);
  color: white;
  border: 0;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  font: inherit;
  text-decoration: none;
  display: inline-block;
}
button.ghost, .btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
button.danger { background: var(--bad); }
main { flex: 1; padding: 22px 26px 40px; max-width: 1240px; }
main.solo { max-width: 420px; margin: 8vh auto; }
h1 { font-size: 22px; margin: 0 0 14px; }
h2 { font-size: 16px; margin: 0 0 10px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 14px;
}
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.stat b { display: block; font-size: 22px; margin-top: 4px; }
.muted, .hint { color: var(--muted); font-size: 13px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; color: var(--muted); font-weight: 600; }
label { display: block; margin: 10px 0 4px; font-size: 13px; font-weight: 600; }
input, select, textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  background: white;
}
textarea { min-height: 70px; }
.split { display: grid; grid-template-columns: 180px 1fr; gap: 8px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.checks label { font-weight: 500; display: inline-flex; gap: 6px; align-items: center; margin-right: 10px; }
.checks input { width: auto; }
.flash { padding: 10px 12px; border-radius: 8px; }
.flash.ok { background: #e5f6ee; color: var(--ok); }
.flash.bad { background: #fdecec; color: var(--bad); }
.pill { display: inline-block; border-radius: 999px; padding: 2px 8px; font-size: 12px; background: #e7eef2; }
.pill.ok { background: #e5f6ee; color: var(--ok); }
.pill.bad { background: #fdecec; color: var(--bad); }
.pill.warn { background: #fff4df; color: var(--warn); }
.login-card { background: white; border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
ol.steps { margin: 0; padding-left: 18px; }
ol.steps li { margin: 4px 0; }
.dash-meta { margin: -6px 0 14px; color: var(--muted); }
.dash-meta b { color: var(--ink); }
.gauges {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 8px;
}
.gauge {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 12px 12px;
  text-align: center;
}
.gauge svg { width: 132px; height: 132px; display: block; margin: 0 auto 4px; }
.gauge .track { fill: none; stroke: #e6edf2; stroke-width: 12; }
.gauge .arc { fill: none; stroke-width: 12; stroke-linecap: butt; }
.gauge .g-num { font-size: 28px; font-weight: 700; fill: var(--ink); }
.gauge .g-unit { font-size: 12px; fill: var(--muted); }
.gauge b { display: block; font-size: 15px; }
.legend { margin-top: 8px; font-size: 12px; color: var(--muted); display: grid; gap: 2px; }
.legend span { display: flex; align-items: center; justify-content: center; gap: 6px; }
.legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.legend i.free { background: #d5dee3; }
.legend i.ok { background: var(--ok); }
.legend i.warn { background: var(--warn); }
.legend i.bad { background: var(--bad); }
.gauge-extra { margin-top: 4px; font-size: 12px; color: var(--muted); line-height: 1.35; }
.info-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.info-card { margin-bottom: 0; }
.info-card b { display: block; font-size: 22px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.info-card .sub { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; word-break: break-all; }
.info-card a { color: var(--side); }
.dash-cpu { margin: 4px 2px 14px; }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.dash-grid .card { margin-bottom: 0; }
.dash-grid + .dash-grid, .dash-grid + .card, .card + .dash-grid { margin-top: 14px; }
.svc { list-style: none; margin: 0; padding: 0; }
.svc li {
  display: grid;
  grid-template-columns: 14px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.svc li:last-child { border-bottom: 0; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #d5dee3; }
.dot.ok { background: var(--ok); }
.dot.bad { background: var(--bad); }
.dot.warn { background: var(--warn); }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.metrics div {
  background: #f6f8fa;
  border-radius: 10px;
  padding: 10px 12px;
}
.metrics b { display: block; font-size: 22px; }
.metrics span { color: var(--muted); font-size: 12px; }
.dash-foot { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.dash-foot p { margin: 0; }
.live-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.live-head h2 { margin-bottom: 8px; }
.mono { font-variant-numeric: tabular-nums; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.filters label { margin: 0; font-size: 12px; font-weight: 600; }
.filters input, .filters select { width: auto; min-width: 9rem; margin-top: 4px; }
.filters button, .filters .btn { margin-bottom: 1px; }
@media (max-width: 980px) {
  .gauges, .info-row { grid-template-columns: 1fr 1fr; }
  .dash-grid { grid-template-columns: 1fr; }
}
@media (max-width: 800px) {
  .shell { display: block; }
  aside { width: auto; }
  nav { flex-direction: row; flex-wrap: wrap; }
  .split { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .dash-foot { display: block; }
  .dash-foot form { margin-top: 10px; }
}
