:root {
  color-scheme: dark;
  --bg: #090b10;
  --panel: #111720;
  --accent: #3ca8ff;
  --text: #f4f6fa;
  --muted: #8b93a3;
  font-family: "Inter", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

.health-page {
  padding: 2rem clamp(1rem, 4vw, 3rem) 3rem;
  max-width: 960px;
  margin: 0 auto;
}

.health-page__header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-bottom: 2rem;
}

.health-page__eyebrow {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 0 0 0.25rem;
}

.health-page__title {
  margin: 0;
  font-size: clamp(2rem, 3vw, 2.5rem);
}

.health-page__controls {
  text-align: right;
}

.health-page__refresh {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  color: var(--text);
  padding: 0.65rem 1.25rem;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.health-page__refresh:hover,
.health-page__refresh:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

.health-page__timestamp {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.health-status,
.incidents {
  background: var(--panel);
  border-radius: 18px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.health-status__title,
.incidents__title {
  margin: 0;
  font-size: 1.25rem;
}

.health-status__grid {
  margin-top: 1rem;
  display: grid;
  gap: 1rem;
}

.health-status__empty,
.incidents__empty {
  margin: 0;
  color: var(--muted);
}

.status-card {
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 1rem;
  border-radius: 14px;
  position: relative;
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.status-card__icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.status-card__icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.status-card__content {
  flex: 1;
}

.status-card__heading {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.status-card__meta {
  margin: 0.25rem 0 0.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.status-card__status {
  font-size: 1.35rem;
  margin: 0;
}

.status-card__message {
  margin: 0.65rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.status-card--down .status-card__status {
  color: #f56b6b;
}

.status-card--up .status-card__status {
  color: #5cf4a1;
}

.incidents__list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.incident {
  border-left: 3px solid var(--accent);
  padding: 0.75rem 1rem;
  border-radius: 0 12px 12px 0;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
}

.incident__heading {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.incident__meta {
  margin: 0.25rem 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.incident__body {
  margin: 0;
  line-height: 1.4;
  font-size: 0.95rem;
  color: var(--text);
}

@media (min-width: 640px) {
  .health-status__grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}
