* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  min-width: 1240px;
  background: #f3f4f6;
  color: #111827;
  font-family: system-ui, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; }

.wrap {
  width: min(1400px, calc(100% - 48px));
  margin-left: auto;
  margin-right: auto;
}

.topbar {
  height: 64px;
  background: #1b1744;
  color: #fff;
}

.topbar-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.mark {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: #f97316;
  display: grid;
  place-items: center;
  flex: none;
  user-select: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.28);
}

h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.brand-sub {
  margin: 2px 0 0;
  color: #b7b3d6;
  font-size: 12px;
  line-height: 1.2;
}

.top-right {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: none;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f97316;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.28);
}

.when { text-align: right; }

.date {
  color: #c4bfdc;
  font-size: 13px;
  line-height: 1.2;
}

#clock {
  display: block;
  margin-top: 1px;
  color: #fff;
  font-size: 16px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
  line-height: 1.1;
}

.banner {
  background: #5b21b6;
  color: #fff;
  text-align: center;
  padding: 11px 24px;
  font-size: 14.5px;
  font-weight: 550;
  letter-spacing: 0.01em;
}

main.wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
  margin-bottom: 36px;
}

.warnings {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.warn {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: #fffbeb;
  border-radius: 12px;
  padding: 12px 16px;
  box-shadow: inset 4px 0 0 #f97316, 0 1px 2px rgba(16, 24, 40, 0.04);
}

.warn-icon { flex: none; margin-top: 1px; }

.warn strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #1c1917;
}

.warn p {
  margin: 2px 0 0;
  font-size: 13px;
  color: #78716c;
  line-height: 1.35;
}

.card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.05);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 22px rgba(16, 24, 40, 0.045);
}

.strip {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
}

.metrics {
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex: 1;
  min-width: 0;
}

.metric {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
}

.val {
  color: #16a34a;
  font-weight: 700;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.lbl {
  color: #9ca3af;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.disk-name {
  color: #6b7280;
  letter-spacing: 0.04em;
}

.side {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
  margin-left: auto;
  padding-left: 14px;
  border-left: 1px solid #e5e7eb;
}

.uptime {
  color: #6b7280;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.ranges {
  display: flex;
  gap: 4px;
  padding: 3px;
  border-radius: 10px;
  background: #f3f4f6;
}

.ranges button {
  border: 0;
  background: transparent;
  color: #374151;
  border-radius: 8px;
  padding: 6px 11px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}

.ranges button:hover { background: #e5e7eb; }

.ranges button.active,
.ranges button.active:hover {
  background: #1b1744;
  color: #fff;
}

.ranges button:focus-visible {
  outline: 2px solid #5b21b6;
  outline-offset: 1px;
}

.gauges {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 16px;
}

.gauge-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 8px 12px;
  min-height: 252px;
}

.kicker {
  margin: 0 0 2px;
  color: #6b7280;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.25;
}

.dial {
  height: 116px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}

.dial svg { display: block; }

.figure {
  margin: 0;
  color: #16a34a;
  font-size: 26px;
  font-weight: 750;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
}

.figure-lg {
  font-size: 42px;
  margin-bottom: 8px;
}

.sub {
  margin: 4px 0 8px;
  color: #9ca3af;
  font-size: 12px;
  text-align: center;
  line-height: 1.3;
  min-height: 2.6em;
}

.spark {
  width: 100%;
  height: 34px;
  margin-top: auto;
}

.spark svg { display: block; width: 100%; height: 34px; }

.charts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.chart-card { padding: 14px 14px 12px; }

.chart-card h2 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: #111827;
}

.chart-card canvas {
  display: block;
  width: 100%;
  height: 188px;
}

.legend {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.legend li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  font-size: 12px;
  color: #4b5563;
  line-height: 1.35;
}

.legend .name { font-weight: 600; color: #374151; }

.legend .stat { color: #6b7280; white-space: nowrap; }

.swatch {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  flex: none;
  transform: translateY(1px);
}

.swatch.line {
  width: 14px;
  height: 3px;
  border-radius: 99px;
  transform: translateY(-1px);
}

.lbl.raw,
.kicker.raw {
  text-transform: none;
  letter-spacing: 0.01em;
}

.val.muted {
  color: #9ca3af;
  font-size: 13px;
  font-weight: 650;
}

.figure.na {
  color: #9ca3af;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1.25;
  text-align: center;
  max-width: 110px;
}

.warnings:empty { display: none; }

.gauges.six { grid-template-columns: repeat(6, minmax(0, 1fr)); }

.chart-note {
  height: 188px;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.4;
  padding: 0 18px;
}

.pill[hidden],
.metric[hidden],
.gauge-card[hidden],
.chart-card canvas[hidden],
.chart-note[hidden] {
  display: none !important;
}

.visitors { padding: 14px 16px 10px; }

.visitors-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.visitors h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
}

.visitors-note {
  margin: 0;
  color: #9ca3af;
  font-size: 12px;
}

.visitors-empty {
  margin: 8px 0 10px;
  color: #6b7280;
  font-size: 14px;
}

.visitors table {
  width: 100%;
  border-collapse: collapse;
}

.visitors th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9ca3af;
  padding: 8px 8px 6px 0;
}

.visitors th.num,
.visitors td.num { text-align: right; }

.visitors td {
  padding: 9px 8px 9px 0;
  border-top: 1px solid #f3f4f6;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.visitors td.ip { font-weight: 650; }

.visitors td.num { color: #16a34a; font-weight: 700; }
