:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #0b1120;
  color: #e5eefb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.22), transparent 32rem),
    linear-gradient(135deg, #0b1120 0%, #111827 52%, #020617 100%);
}

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

.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 8px;
  color: #38bdf8;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: clamp(2.3rem, 7vw, 5rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

h2 {
  margin-bottom: 0;
  font-size: 1rem;
}

.subtitle {
  max-width: 620px;
  margin-bottom: 0;
  color: #9fb1c9;
  font-size: 1.05rem;
}

.status-card,
.panel {
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(18px);
}

.status-card {
  display: flex;
  align-items: center;
  min-width: 280px;
  padding: 18px;
  border-radius: 22px;
  gap: 14px;
}

.status-card p {
  margin: 4px 0 0;
  color: #94a3b8;
  font-size: 0.88rem;
}

.dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #f59e0b;
  box-shadow: 0 0 24px #f59e0b;
}

.dot.online {
  background: #22c55e;
  box-shadow: 0 0 24px #22c55e;
}

.dot.offline {
  background: #ef4444;
  box-shadow: 0 0 24px #ef4444;
}

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
}

.panel {
  min-width: 0;
  padding: 22px;
  border-radius: 28px;
}

.chart-panel {
  min-height: 520px;
}

.ph-panel {
  grid-column: 1;
  min-height: 360px;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  color: #cbd5e1;
}

.chart-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.chart-tools button {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(125, 211, 252, 0.34);
  border-radius: 12px;
  padding: 0;
  background: rgba(14, 165, 233, 0.12);
  color: #dbeafe;
  cursor: pointer;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1;
}

.chart-tools button:hover {
  background: rgba(14, 165, 233, 0.24);
}

.panel-title span {
  color: #7dd3fc;
  font-size: 0.84rem;
}

.timeline-help {
  margin: -8px 0 14px;
  color: #64748b;
  font-size: 0.82rem;
}

.tag-list {
  display: grid;
  gap: 12px;
}

.counter-card {
  margin-bottom: 16px;
  padding: 18px;
  border: 1px solid rgba(34, 197, 94, 0.28);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.16), rgba(14, 165, 233, 0.08));
}

.counter-card span,
.counter-card p {
  color: #9fb1c9;
  font-size: 0.86rem;
}

.counter-card strong {
  display: block;
  margin: 4px 0;
  color: #dcfce7;
  font-size: 3rem;
  line-height: 1;
}

.counter-card p {
  margin-bottom: 0;
}

.tag-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.42);
}

.tag-row span {
  color: #94a3b8;
  font-size: 0.86rem;
}

.tag-row strong {
  font-size: 1.25rem;
}

canvas {
  width: 100% !important;
  max-height: 445px;
  cursor: grab;
}

canvas:active {
  cursor: grabbing;
}

@media (max-width: 860px) {
  .hero,
  .grid {
    grid-template-columns: 1fr;
  }

  .hero {
    display: grid;
  }

  .status-card {
    min-width: 0;
  }

  .chart-panel {
    min-height: 420px;
  }

  .panel-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .chart-tools {
    justify-content: flex-start;
  }

  .ph-panel {
    grid-column: auto;
  }
}
