.dash-body {
  min-height: 100vh;
  background:
    radial-gradient(900px 420px at 8% -10%, #1a2a3d 0%, transparent 55%),
    var(--bg);
}

.dash-header {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: rgba(15, 20, 25, 0.9);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.dash-header h1 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
}

.dash-header .brand {
  color: var(--text);
  text-decoration: none;
}

.dash-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}

.dash-controls input[type="password"] {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 0.5rem 0.7rem;
  width: 11rem;
}

.btn-ghost {
  display: inline-block;
  background: #1c2736;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 0.85rem;
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
  cursor: pointer;
}

.btn-ghost:hover {
  border-color: var(--accent);
}

.dash-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem 3rem;
  width: 100%;
}

.section-title {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin: 1.35rem 0 0.55rem;
  font-weight: 600;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.65rem;
}

.kpi {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.9rem 1rem;
}

.kpi .label {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.kpi .value {
  font-size: 1.35rem;
  font-weight: 700;
  margin-top: 0.3rem;
}

.kpi .sub {
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 0.2rem;
}

.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 800px) {
  .row-2 {
    grid-template-columns: 1fr;
  }
}

.dash-main .card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
}

.table-wrap {
  overflow-x: auto;
}

.dash-main table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.dash-main th,
.dash-main td {
  text-align: left;
  padding: 0.45rem 0.4rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.dash-main th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid var(--border);
  white-space: nowrap;
}

.pill.on {
  background: rgba(62, 207, 142, 0.12);
  color: var(--ok);
  border-color: rgba(62, 207, 142, 0.35);
}

.pill.off {
  background: rgba(240, 113, 120, 0.12);
  color: var(--err);
  border-color: rgba(240, 113, 120, 0.35);
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.tag {
  display: inline-block;
  padding: 0.12rem 0.45rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  background: #243040;
}

.tag.ok {
  color: var(--ok);
  background: rgba(62, 207, 142, 0.12);
}

.tag.err {
  color: var(--err);
  background: rgba(240, 113, 120, 0.12);
}

.tag.warn {
  color: #e6c07b;
  background: rgba(230, 192, 123, 0.12);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 600px) {
  .split {
    grid-template-columns: 1fr;
  }
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.small {
  font-size: 0.82rem;
}

.nowrap {
  white-space: nowrap;
}

.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.flash {
  color: #e6c07b;
  min-height: 1.2em;
  font-size: 0.9rem;
  margin: 0 0 0.5rem;
}

code {
  background: #121820;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.85em;
}
