:root {
  --bg: #0b1020;
  --panel: rgba(255,255,255,.09);
  --panel-strong: rgba(255,255,255,.14);
  --line: rgba(255,255,255,.16);
  --text: #f7f9ff;
  --muted: #aab3ca;
  --good: #57e389;
  --warn: #ffd166;
  --danger: #ff6b6b;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(87, 227, 137, .22), transparent 32rem),
    radial-gradient(circle at top right, rgba(86, 154, 255, .20), transparent 35rem),
    var(--bg);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.monitor-shell {
  width: min(1400px, calc(100% - 28px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.hero-panel, .toolbar-panel, .chart-panel, .empty-state {
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(255,255,255,.13), rgba(255,255,255,.06));
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 70px rgba(0,0,0,.28);
  border-radius: 28px;
}

.hero-panel {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding: clamp(22px, 4vw, 42px);
  margin-bottom: 18px;
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--good);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-weight: 800;
  font-size: .75rem;
}

h1 { font-size: clamp(2rem, 5vw, 4.1rem); line-height: .95; margin: 0 0 14px; font-weight: 850; }
p { color: var(--muted); margin: 0; max-width: 760px; }

.status-pill {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(255,255,255,.10);
  border: 1px solid var(--line);
  color: var(--muted);
}

.pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 0 0 rgba(87,227,137,.7);
  animation: pulse 1.6s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(87,227,137,.7); }
  70% { box-shadow: 0 0 0 12px rgba(87,227,137,0); }
  100% { box-shadow: 0 0 0 0 rgba(87,227,137,0); }
}

.toolbar-panel {
  padding: 14px;
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.search-box { max-width: 520px; }
.input-group-text, .form-control {
  background: rgba(255,255,255,.10) !important;
  border-color: var(--line) !important;
  color: var(--text) !important;
}
.form-control::placeholder { color: rgba(255,255,255,.45); }

.station-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
}

.station-card {
  position: relative;
  overflow: hidden;
  display: block;
  text-decoration: none;
  color: var(--text);
  min-height: 360px;
  padding: 22px;
  border-radius: 32px;
  background: linear-gradient(160deg, rgba(255,255,255,.16), rgba(255,255,255,.06));
  border: 1px solid var(--line);
  box-shadow: 0 20px 50px rgba(0,0,0,.22);
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.station-card:hover { transform: translateY(-4px); border-color: rgba(87,227,137,.5); color: var(--text); }
.station-card::after {
  content: "";
  position: absolute;
  inset: auto -30% -50% -30%;
  height: 190px;
  background: radial-gradient(circle, rgba(87,227,137,.22), transparent 62%);
  pointer-events: none;
}

.station-top { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 18px; }
.station-title { font-size: 1.35rem; font-weight: 820; margin: 0; }
.station-room { color: var(--muted); font-size: .95rem; }
.station-time { color: var(--muted); font-size: .82rem; text-align: right; }

.values-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.value-box {
  padding: 14px;
  border-radius: 22px;
  background: rgba(0,0,0,.16);
  border: 1px solid rgba(255,255,255,.10);
}
.value-box span { display: block; color: var(--muted); font-size: .78rem; margin-bottom: 4px; }
.value-box strong { display: block; font-size: 1.45rem; line-height: 1; }
.value-box small { color: var(--muted); }

.sparkline-wrap { height: 110px; margin-top: 12px; }
.sparkline-wrap canvas { width: 100% !important; height: 110px !important; }

.back-link { display: inline-flex; margin-bottom: 16px; color: var(--muted); text-decoration: none; }
.back-link:hover { color: var(--text); }
.detail-values { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.metric-card {
  padding: 18px;
  border-radius: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
}
.metric-card span { color: var(--muted); display: block; margin-bottom: 6px; }
.metric-card strong { font-size: clamp(1.6rem, 4vw, 2.4rem); }
.chart-panel { padding: 22px; margin-bottom: 18px; }
.chart-panel h2 { font-size: 1.2rem; margin-bottom: 16px; }
.empty-state { padding: 42px; text-align: center; }

@media (max-width: 760px) {
  .hero-panel, .toolbar-panel { flex-direction: column; align-items: stretch; }
  .status-pill { justify-content: center; }
  .station-grid { grid-template-columns: 1fr; }
  .detail-values { grid-template-columns: 1fr 1fr; }
}
