/* ─── Cloudflare Status Page ───────────────────────────────────────────────── */

/* Hero */
.cf-hero {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  animation: fadeSlideUp 0.4s ease both;
}

.cf-hero-inner {
  display: flex;
  align-items: center;
  gap: 16px;
}

.cf-logo {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #f6821f 0%, #f96815 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(246, 130, 31, 0.35);
}

.cf-logo svg {
  width: 30px;
  height: 30px;
}

.cf-hero-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.cf-hero-status {
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cf-hero-status .status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.cf-hero-status[data-indicator="none"] { color: var(--success-dim); }
.cf-hero-status[data-indicator="minor"] { color: var(--warning); }
.cf-hero-status[data-indicator="major"] { color: #f97316; }
.cf-hero-status[data-indicator="critical"] { color: var(--error-dim); }

.cf-hero-status[data-indicator="none"] .status-dot { background: var(--success); }
.cf-hero-status[data-indicator="minor"] .status-dot { background: var(--warning); }
.cf-hero-status[data-indicator="major"] .status-dot { background: #f97316; }
.cf-hero-status[data-indicator="critical"] .status-dot { background: var(--error); }

.cf-hero-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: right;
}

/* Section */
.cf-section {
  margin-bottom: 28px;
}

.cf-section-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  letter-spacing: 0.01em;
}

/* Group card */
.cf-group {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  animation: fadeSlideUp 0.4s ease both;
}

.cf-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  cursor: pointer;
  user-select: none;
}

.cf-group-header:hover {
  background: var(--bg-card-hover);
}

.cf-group-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

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

.cf-group-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.cf-group-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 1px;
}

.cf-group-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.cf-group-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 9999px;
  white-space: nowrap;
}

.cf-group-badge.ok {
  background: #f0fdf4;
  color: var(--success-dim);
  border: 1px solid #bbf7d0;
}

.cf-group-badge.warn {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

.cf-group-badge.err {
  background: #fef2f2;
  color: var(--error-dim);
  border: 1px solid #fecaca;
}

.cf-chevron {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  transition: transform var(--transition);
}

.cf-group.collapsed .cf-chevron {
  transform: rotate(-90deg);
}

.cf-group-body {
  border-top: 1px solid var(--border);
  padding: 12px 20px 16px;
}

.cf-group.collapsed .cf-group-body {
  display: none;
}

/* Component list */
.cf-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cf-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 4px;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}

.cf-item:last-child {
  border-bottom: none;
}

.cf-item-name {
  color: var(--text);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

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

.cf-item-status {
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  color: var(--text-secondary);
}

.cf-item.degraded .cf-item-status,
.cf-item.partial .cf-item-status { color: var(--warning); }
.cf-item.major .cf-item-status { color: var(--error-dim); }

/* Status dot colors */
.cf-status-operational { background: var(--success); }
.cf-status-degraded_performance { background: var(--warning); }
.cf-status-partial_outage { background: #f97316; }
.cf-status-major_outage { background: var(--error); }
.cf-status-under_maintenance { background: var(--accent); }

/* Summary chips */
.cf-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.cf-chip {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 9999px;
  background: var(--bg-card-hover);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.cf-chip .count {
  font-weight: 700;
}

.cf-chip.ok { color: var(--success-dim); border-color: #bbf7d0; background: #f0fdf4; }
.cf-chip.warn { color: #b45309; border-color: #fde68a; background: #fffbeb; }
.cf-chip.err { color: var(--error-dim); border-color: #fecaca; background: #fef2f2; }

/* List container with max height */
.cf-list-scroll {
  max-height: 340px;
  overflow-y: auto;
  padding-right: 4px;
}

.cf-list-scroll::-webkit-scrollbar {
  width: 8px;
}
.cf-list-scroll::-webkit-scrollbar-track {
  background: transparent;
}
.cf-list-scroll::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 4px;
}

/* All operational message */
.cf-all-ok {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--success-dim);
  font-weight: 600;
  padding: 6px 4px;
}

/* Incident / maintenance items */
.cf-maint {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.cf-maint-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.cf-maint-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.cf-maint-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 9999px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid #c7d2fe;
  white-space: nowrap;
}

.cf-maint-window {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 6px;
}

.cf-maint-body {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 10px;
  line-height: 1.7;
  border-top: 1px dashed var(--border);
  padding-top: 10px;
  white-space: pre-line;
}

.cf-incident {
  background: var(--bg-card);
  border: 1px solid #fecaca;
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(239, 68, 68, 0.08);
}

.cf-incident-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--error-dim);
  display: flex;
  align-items: center;
  gap: 10px;
}

.cf-incident-body {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 8px;
  white-space: pre-line;
}

/* Empty / error / loading */
.cf-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 40px 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.cf-loading .spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: cf-spin 0.8s linear infinite;
}

@keyframes cf-spin {
  to { transform: rotate(360deg); }
}

.cf-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius);
  padding: 16px 20px;
  color: var(--error-dim);
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
}

.cf-toggle {
  margin-top: 10px;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
}

.cf-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

@media (max-width: 600px) {
  .cf-hero {
    padding: 16px;
  }
  .cf-logo {
    width: 44px;
    height: 44px;
  }
  .cf-logo svg {
    width: 26px;
    height: 26px;
  }
  .cf-hero-meta {
    text-align: left;
  }
  .cf-group-header {
    padding: 14px 16px;
  }
  .cf-group-body {
    padding: 10px 16px 14px;
  }
}
