:root {
  --bg: #0f1419;
  --surface: #1a2332;
  --border: #2d3a4d;
  --text: #e8edf4;
  --muted: #8b9cb3;
  --green: #22c55e;
  --yellow: #eab308;
  --red: #ef4444;
  --orange: #ff6b35;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

.header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.header-inner {
  max-width: 880px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem;
}

.header h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
}

.subtitle {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.main {
  max-width: 880px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

.banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: 10px;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.banner-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.banner-operational {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.4);
}
.banner-operational .banner-dot { background: var(--green); }

.banner-partial {
  background: rgba(234, 179, 8, 0.12);
  border: 1px solid rgba(234, 179, 8, 0.35);
}
.banner-partial .banner-dot { background: var(--yellow); }

.banner-major {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
}
.banner-major .banner-dot { background: var(--red); }

.banner-loading {
  background: var(--surface);
  border: 1px solid var(--border);
}
.banner-loading .banner-dot { background: var(--muted); }

.meta {
  color: var(--muted);
  font-size: 0.875rem;
  margin: 0 0 1.25rem;
}

.tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1.25rem;
  padding: 0.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.tab {
  flex: 1;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  border: none;
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.tab:hover {
  color: var(--text);
}

.tab-active {
  color: var(--text);
  background: var(--bg);
  box-shadow: 0 0 0 1px var(--border);
}

.panel-hidden[hidden] {
  display: none !important;
}

.incident-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
}

.incident-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.incident-title {
  font-weight: 600;
  font-size: 1.05rem;
  margin: 0;
}

.incident-service {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 0.2rem;
}

.incident-times {
  margin-top: 0.65rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.incident-duration {
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.incidents-empty {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 2rem 1.25rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}

.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
}

.service-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.service-name {
  font-weight: 600;
  font-size: 1.05rem;
}

.service-desc {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 0.15rem;
}

.badge {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  white-space: nowrap;
}

.badge-up { background: rgba(34, 197, 94, 0.2); color: var(--green); }
.badge-degraded { background: rgba(234, 179, 8, 0.2); color: var(--yellow); }
.badge-down { background: rgba(239, 68, 68, 0.2); color: var(--red); }

.uptime {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.35rem;
}

.hour-bars-section {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.hour-bars-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.hour-bars-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
}

.hour-bars-range {
  font-size: 0.72rem;
  color: var(--muted);
}

.hour-bars {
  display: flex;
  align-items: flex-end;
  gap: 1px;
  height: 40px;
  width: 100%;
  overflow-x: auto;
  padding-bottom: 2px;
}

.hour-bar {
  flex: 0 0 auto;
  width: 3px;
  min-width: 3px;
  border-radius: 2px 2px 1px 1px;
  height: 100%;
  transition: opacity 0.15s ease;
}

.hour-bar:hover {
  opacity: 0.85;
}

.hour-bar-up {
  background: var(--green);
}

.hour-bar-degraded {
  background: var(--yellow);
  height: 72%;
}

.hour-bar-down {
  background: var(--red);
  height: 88%;
}

.hour-bar-unknown {
  background: var(--border);
  height: 28%;
  opacity: 0.65;
}

.checks {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.check-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  font-size: 0.85rem;
  padding: 0.35rem 0;
}

.check-name { min-width: 6rem; color: var(--muted); }
.check-url {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 0.8rem;
}
.check-meta { color: var(--muted); font-size: 0.8rem; }
.check-error { color: var(--red); font-size: 0.8rem; }

.footer {
  text-align: center;
  padding: 1rem;
  color: var(--muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--border);
}
