/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #1a1a1a;
  --bg-panel: #222;
  --bg-input: #2a2a2a;
  --accent: #aad604;
  --accent-dim: #8ab003;
  --text: #e0e0e0;
  --text-secondary: #a0a0a0;
  --text-dim: #666;
  --border: #333;
  --red: #e54545;
  --yellow: #e5c745;
  --green: #45c745;
  --font: 'Nunito', -apple-system, sans-serif;
  --mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

html, body {
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
}

/* --- Header --- */
#header {
  display: flex;
  align-items: center;
  height: 48px;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.header-left h1 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.header-left h1 .accent { color: var(--accent); }

/* --- Main --- */
#main {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 20px 40px;
}

/* --- Overall banner --- */
.banner {
  padding: 20px 24px;
  border-radius: 6px;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 28px;
}

.banner.operational {
  background: rgba(69, 199, 69, 0.12);
  border: 1px solid rgba(69, 199, 69, 0.3);
  color: var(--green);
}

.banner.degraded {
  background: rgba(229, 199, 69, 0.12);
  border: 1px solid rgba(229, 199, 69, 0.3);
  color: var(--yellow);
}

.banner.disruption {
  background: rgba(229, 69, 69, 0.12);
  border: 1px solid rgba(229, 69, 69, 0.3);
  color: var(--red);
}

/* --- Sections --- */
.section {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 16px;
  overflow: hidden;
}

.section h2 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  padding: 10px 14px 0;
}

.section-body {
  padding: 10px 14px 12px;
  font-size: 13px;
}

.loading {
  color: var(--text-dim);
  font-style: italic;
}

/* --- Monitor rows --- */
.monitor-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}

.monitor-row:last-child { border-bottom: none; }

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot.up { background: var(--green); }
.dot.down { background: var(--red); }
.dot.paused, .dot.maintenance { background: var(--yellow); }
.dot.unknown { background: var(--text-dim); }

.monitor-name { flex: 1; font-size: 13px; }
.monitor-uptime { font-size: 12px; color: var(--text-dim); font-family: var(--mono); }
.monitor-status-label {
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 600;
}
.monitor-status-label.up { color: var(--green); }
.monitor-status-label.down { color: var(--red); }
.monitor-status-label.paused, .monitor-status-label.maintenance { color: var(--yellow); }

/* --- Incident rows --- */
.incident-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}

.incident-row:last-child { border-bottom: none; }

.incident-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 3px;
  flex-shrink: 0;
}

.incident-badge.ongoing {
  background: var(--red);
  color: #fff;
}

.incident-badge.resolved {
  background: var(--border);
  color: var(--text-secondary);
}

.incident-name {
  flex: 1;
  font-size: 13px;
}

.incident-time {
  font-size: 12px;
  color: var(--text-dim);
  white-space: nowrap;
}

/* --- Empty state --- */
.empty {
  color: var(--text-dim);
  font-style: italic;
  font-size: 13px;
}

/* --- Footer --- */
#footer {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px 24px;
  font-size: 12px;
  color: var(--text-dim);
  text-align: center;
}

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

/* --- Responsive --- */
@media (max-width: 600px) {
  #main { padding: 16px 12px 32px; }
  .banner { font-size: 16px; padding: 16px; }
}
