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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #fafafa;
  color: #231F20;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }

/* ── Header ───────────────────────────────────────── */
.site-header {
  background: #231F20;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.site-header span {
  font-family: "Arial Black", "Arial Bold", Gadget, sans-serif;
  font-size: 1.75rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.03em;
}

.site-header img {
  max-height: 1.5em;
  display: inline-block;
}

/* ── Hero / Overall Status ────────────────────────── */
.hero {
  padding: 2rem 1.5rem 2rem;
  text-align: center;
}

.hero .status-icon {
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero .status-icon svg {
  display: block;
}

.hero h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

/* ── Container ────────────────────────────────────── */
.container {
  max-width: 680px;
  width: 100%;
  margin: 0 auto;
  padding: 0 1rem 3rem;
  flex: 1;
}

/* ── Notice Banner ────────────────────────────────── */
.notice-banner {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-left: 4px solid #F0B310;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.75rem;
  line-height: 1.55;
  font-size: 0.9rem;
  color: #231F20;
}

.notice-banner .notice-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
  font-weight: 700;
  font-size: 0.85rem;
  color: #770400;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Resolved notice variant */
.notice-banner.resolved {
  border-left-color: #1565c0;
}

.notice-banner.resolved .notice-header {
  color: #1565c0;
}

.notice-banner .notice-header svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.notice-banner.hidden { display: none; }

/* ── Group Card ────────────────────────────────────── */
.group {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.15rem;
  border-bottom: 1px solid #f0f0f0;
  cursor: default;
}

.group-header .group-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #231F20;
}

/* ── Service Row ──────────────────────────────────── */
.service {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1.15rem 0.7rem 1.75rem;
  border-bottom: 1px solid #f5f5f5;
}

.service:last-child { border-bottom: none; }

.service-name {
  font-size: 0.88rem;
  color: #555;
}

/* ── Status Indicator (icon) ──────────────────────── */
.status-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.status-indicator svg {
  display: block;
  flex-shrink: 0;
}

/* ── Custom Tooltip ───────────────────────────────── */
.has-tooltip {
  position: relative;
  cursor: pointer;
}

.has-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #231F20;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.has-tooltip::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: #231F20;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.has-tooltip:hover::after,
.has-tooltip:hover::before {
  opacity: 1;
}

/* ── Updated timestamp ────────────────────────────── */
.last-updated {
  text-align: center;
  font-size: 0.78rem;
  color: #bbb;
  margin-top: 1.5rem;
}

/* ── Loading / Error ──────────────────────────────── */
.loading, .error-msg {
  text-align: center;
  padding: 4rem 1rem;
  font-size: 0.95rem;
  color: #aaa;
}

.error-msg { color: #770400; }

/* ── Legend ────────────────────────────────────────── */
.legend {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 1.5rem;
  padding: 0.75rem 0;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #777;
  letter-spacing: 0.02em;
}

.legend-item svg {
  display: block;
  flex-shrink: 0;
}

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 480px) {
  .hero { padding: 2rem 1rem 1.75rem; }
  .hero h1 { font-size: 1.25rem; }
  .legend { gap: 0.75rem 1rem; }
}
