:root {
  --c-bg: #0a0e1a;
  --c-surface: #111827;
  --c-border: #1f2937;
  --c-healthy: #00d4ff;
  --c-degraded: #f59e0b;
  --c-down: #f43f5e;
  --c-unknown: #6b7280;
  --c-text: #e5e7eb;
  --c-muted: #6b7280;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--c-bg);
  color: var(--c-text);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
}

.mono {
  font-family: 'JetBrains Mono', monospace;
}

/* ── Status dot with pulse ring ── */
.status-dot {
  position: relative;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-dot::after {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  animation: pulse-ring 2s ease-out infinite;
  opacity: 0;
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.6);
    opacity: 0.8;
  }
  100% {
    transform: scale(1.8);
    opacity: 0;
  }
}

.status-healthy {
  background: var(--c-healthy);
  color: var(--c-healthy);
}

.status-degraded {
  background: var(--c-degraded);
  color: var(--c-degraded);
  animation: none;
}

.status-degraded::after {
  animation: pulse-ring 1.2s ease-out infinite;
}

.status-down {
  background: var(--c-down);
  color: var(--c-down);
}

.status-down::after {
  animation: pulse-ring 0.7s ease-out infinite;
}

.status-unknown {
  background: var(--c-unknown);
  color: var(--c-unknown);
}

.status-unknown::after {
  display: none;
}

/* ── Server card ── */
.server-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.server-card:hover {
  border-color: #374151;
}

/* ── Metric pill ── */
.metric-pill {
  background: #0a0e1a;
  border-radius: 6px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.metric-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
}

.metric-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-muted);
}

/* ── Error bar chart ── */
.bar-track {
  height: 4px;
  background: #1f2937;
  border-radius: 2px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.6s ease;
}

/* ── Top banner gradient ── */
.top-banner {
  background: linear-gradient(135deg, #0f172a 0%, #0a0e1a 60%, #0f1629 100%);
  border-bottom: 1px solid var(--c-border);
}

/* ── Summary stat ── */
.summary-stat {
  text-align: center;
  padding: 0 20px;
  border-right: 1px solid var(--c-border);
}

.summary-stat:last-child {
  border-right: none;
}

/* ── Loading / empty states ── */
.skeleton {
  background: linear-gradient(90deg, #111827 25%, #1f2937 50%, #111827 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 6px;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--c-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--c-border);
  border-radius: 3px;
}

/* ── System metrics bar ── */
.sys-bar-track {
  width: 56px;
  height: 4px;
  background: #1f2937;
  border-radius: 2px;
  overflow: hidden;
  flex-shrink: 0;
}

.sys-bar-fill {
  height: 100%;
  border-radius: 2px;
  background: var(--c-healthy);
  transition:
    width 0.6s ease,
    background 0.3s ease;
}

/* ── Refresh spinner ── */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.spin {
  animation: spin 0.8s linear infinite;
}
