:root {
  color-scheme: dark;
  --bg: #080b10;
  --panel: #111722;
  --panel-2: #151d2a;
  --line: rgba(255,255,255,.1);
  --text: #eef4ff;
  --muted: #93a4bc;
  --green: #38d996;
  --red: #ff5f6d;
  --yellow: #ffd166;
  --blue: #5db7ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(93, 183, 255, .16), transparent 34%),
    linear-gradient(180deg, #0b1018 0%, var(--bg) 42%, #07090d 100%);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 38px 0 48px;
}

.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0 28px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

h1, h2, h3, p {
  margin: 0;
}

h1 {
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1;
  letter-spacing: 0;
}

.summary {
  max-width: 720px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  background: rgba(17, 23, 34, .72);
  border-radius: 8px;
  color: var(--muted);
  white-space: nowrap;
}

.pulse {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 6px rgba(56, 217, 150, .12);
}

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

.card, .panel {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(21, 29, 42, .94), rgba(13, 18, 27, .94));
  border-radius: 8px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .28);
}

.card {
  padding: 20px;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.name {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.name strong {
  font-size: 22px;
}

.name span {
  color: var(--muted);
  font-size: 14px;
}

.badge {
  padding: 7px 10px;
  border-radius: 999px;
  color: #06110c;
  background: var(--green);
  font-size: 12px;
  font-weight: 800;
}

.badge.down {
  color: #17070a;
  background: var(--red);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.metric {
  min-height: 74px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255,255,255,.04);
}

.metric.wide {
  grid-column: 1 / -1;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.metric b {
  display: block;
  margin-top: 8px;
  font-size: 22px;
  line-height: 1.1;
}

.metric b.good {
  color: var(--green);
}

.metric b.warn {
  color: var(--yellow);
}

.metric b.bad {
  color: var(--red);
}

.panel {
  margin-top: 16px;
  padding: 20px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.panel-head h2 {
  font-size: 20px;
}

.panel-head span {
  color: var(--muted);
  font-size: 14px;
}

canvas {
  display: block;
  width: 100%;
  height: 360px;
}

.chart-wrap {
  position: relative;
}

.chart-tooltip {
  position: absolute;
  z-index: 5;
  min-width: 210px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 8px;
  background: rgba(8, 11, 16, .94);
  box-shadow: 0 16px 40px rgba(0,0,0,.38);
  color: var(--text);
  pointer-events: none;
  transform: translate(14px, -50%);
}

.chart-tooltip.hidden {
  display: none;
}

.tooltip-time {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

.tooltip-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 5px 0;
  font-size: 14px;
}

.tooltip-row span {
  color: var(--muted);
}

.tooltip-row b {
  font-weight: 800;
}

.tooltip-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 7px;
  border-radius: 50%;
}

@media (max-width: 860px) {
  .hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .servers {
    grid-template-columns: 1fr;
  }

  canvas {
    height: 280px;
  }
}
