:root {
  --bg: #0a0e13;
  --surface: #12181f;
  --surface-raised: #1a222b;
  --border: #232c37;
  --border-soft: #1b232d;
  --text: #e7ecf1;
  --text-dim: #7e8b9a;
  --text-faint: #4d5866;
  --accent: #2dd4bf;
  --accent-dim: #1a9c8c;
  --accent-tint: rgba(45, 212, 191, 0.1);
  --good: #34d399;
  --good-tint: rgba(52, 211, 153, 0.12);
  --warn: #fbbf24;
  --warn-tint: rgba(251, 191, 36, 0.12);
  --bad: #f87171;
  --bad-tint: rgba(248, 113, 113, 0.12);
  --font-ui: 'IBM Plex Sans', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
  --radius: 10px;
}

* { box-sizing: border-box; }
body {
  margin: 0; font-family: var(--font-ui); color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; line-height: 1.5; font-size: 14px;
}
h1, h2, h3 { font-family: var(--font-ui); margin: 0; color: var(--text); }
a { color: var(--accent); }
::selection { background: var(--accent-tint); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.container { max-width: 1160px; margin: 0 auto; padding: 28px 20px 60px; }

/* Status strip */
.status-strip { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.status-strip-inner { max-width: 1160px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; }
.status-strip-left { display: flex; align-items: center; gap: 12px; }
.strip-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-faint); flex-shrink: 0; transition: background 0.2s ease; }
.strip-dot.good { background: var(--good); box-shadow: 0 0 8px var(--good-tint); }
.strip-dot.bad { background: var(--bad); box-shadow: 0 0 8px var(--bad-tint); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.strip-title { font-family: var(--font-mono); font-weight: 600; font-size: 12.5px; letter-spacing: 0.08em; color: var(--text); }
.strip-summary { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-dim); }
.btn-refresh {
  font-family: var(--font-mono); font-size: 12px; font-weight: 500; color: var(--text-dim);
  background: transparent; border: 1px solid var(--border); border-radius: 6px; padding: 6px 12px; cursor: pointer;
  transition: all 0.15s ease;
}
.btn-refresh:hover { color: var(--text); border-color: var(--accent-dim); background: var(--accent-tint); }

/* Panels */
.panel { margin-top: 28px; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--border-soft); }
.panel-title { font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim); }
.panel-meta { font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); }

/* Site cards -- dense metric-box layout */
.sites-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.site-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 18px; transition: border-color 0.15s ease;
}
.site-card:hover { border-color: var(--accent-dim); }

.site-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.site-card-id { display: flex; align-items: flex-start; gap: 11px; min-width: 0; }
.site-mark {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0; border: 1px solid;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-weight: 700; font-size: 14px;
}
.site-card-id h3 { font-size: 15.5px; font-weight: 700; margin-bottom: 2px; }
.site-domain-link {
  display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-mono); font-size: 11.5px;
  color: var(--text-dim); text-decoration: none;
}
.site-domain-link:hover { color: var(--accent); }
.site-domain-link svg { width: 11px; height: 11px; }

.health-badge {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono);
  font-weight: 700; font-size: 13px; padding: 5px 11px; border-radius: 999px;
}
.health-good { background: var(--good-tint); color: var(--good); }
.health-warn { background: var(--warn-tint); color: var(--warn); }
.health-bad { background: var(--bad-tint); color: var(--bad); }
.health-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

.traffic-trend { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; margin-bottom: 16px; }
.traffic-trend svg { width: 14px; height: 14px; }
.trend-good { color: var(--good); }
.trend-warn { color: var(--warn); }
.trend-neutral { color: var(--text-dim); }

.metric-section-label { font-size: 10.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 8px; margin-top: 16px; }
.metric-section-label:first-of-type { margin-top: 0; }

.metric-box-row { display: flex; gap: 8px; }
.metric-box { flex: 1; background: var(--surface-raised); border-radius: 9px; padding: 9px 10px; min-width: 0; }
.metric-box-label { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--text-dim); margin-bottom: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.metric-box-label svg { width: 12px; height: 12px; flex-shrink: 0; }
.metric-box-value { font-family: var(--font-mono); font-weight: 700; font-size: 16px; color: var(--text); }

.sparkline-big { height: 64px; }
.sparkline-big svg { display: block; width: 100%; height: 100%; }
.sparkline-note { font-size: 10.5px; color: var(--text-faint); font-family: var(--font-mono); margin-top: -4px; }

.footer-label { display: flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin: 16px 0 8px; }
.footer-label svg { width: 12px; height: 12px; }
.footer-box {
  display: flex; align-items: center; gap: 8px; background: var(--surface-raised); border: 1px solid var(--border-soft);
  border-radius: 9px; padding: 10px 12px; font-size: 12px; color: var(--text-dim); line-height: 1.4;
}
.footer-box-icon { color: var(--accent); flex-shrink: 0; }
.footer-box-icon svg { width: 14px; height: 14px; display: block; }
.metric-value.accent { color: var(--accent); }

/* Monitor list -- table-like, dense */
.monitor-list { display: flex; flex-direction: column; gap: 10px; }
.check-block { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.check-head {
  display: flex; align-items: center; justify-content: space-between; padding: 11px 16px;
  background: var(--surface-raised); border-bottom: 1px solid var(--border-soft);
}
.check-name { font-family: var(--font-mono); font-size: 12px; font-weight: 600; letter-spacing: 0.04em; color: var(--text); text-transform: uppercase; }
.check-body { padding: 4px 0; }
.check-body.empty { padding: 12px 16px; font-size: 12.5px; color: var(--text-dim); }

.chip { font-family: var(--font-mono); font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.chip-good { background: var(--good-tint); color: var(--good); }
.chip-warn { background: var(--warn-tint); color: var(--warn); }
.chip-bad { background: var(--bad-tint); color: var(--bad); }

.check-row {
  display: flex; align-items: center; justify-content: space-between; padding: 9px 16px;
  border-bottom: 1px solid var(--border-soft); font-size: 12.5px;
}
.check-row:last-child { border-bottom: none; }
.check-row-link { color: var(--text); text-decoration: none; }
.check-row-link:hover { color: var(--accent); }
.check-row-domain { font-family: var(--font-mono); font-size: 12px; }

.detail-row { padding: 8px 16px 10px 16px; border-bottom: 1px solid var(--border-soft); }
.detail-row:last-child { border-bottom: none; }
.detail-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.detail-items { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-dim); line-height: 1.7; padding-left: 2px; }

.status-line { text-align: center; font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); padding: 30px 0; }
.status-line.error { color: var(--bad); }

@media (max-width: 640px) {
  .status-strip-inner { padding: 10px 16px; }
  .container { padding: 20px 16px 40px; }
  .strip-summary { display: none; }
}
