/* ============================================================
   /status — Live System-Status mit auto-refresh Komponenten-Liste,
   Status-Banner und Incident-History.
   Komplett gescoped unter body.status-page.
   ============================================================ */

.status-page {
  --st-bg-void:       #06060b;
  --st-bg-card:       rgba(255,255,255,0.03);
  --st-bg-card-strong:rgba(255,255,255,0.05);
  --st-border-subtle: rgba(255,255,255,0.08);
  --st-text:          #fff;
  --st-text-muted:    rgba(255,255,255,0.62);
  --st-text-dim:      rgba(255,255,255,0.42);

  --st-ok:    #10B981;
  --st-warn:  #F59E0B;
  --st-down:  #EF4444;
  --st-skip:  #6B7280;

  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--st-bg-void);
  color: var(--st-text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  letter-spacing: -0.005em;
  overflow-x: hidden;
}
.status-page *, .status-page *::before, .status-page *::after { box-sizing: border-box; }
.status-page a { color: #c084fc; text-decoration: none; transition: color .2s ease; }
.status-page a:hover { color: #ec4899; }

/* ---- Cosmic Background ---- */
.status-bg {
  position: fixed; inset: 0; z-index: -10;
  pointer-events: none;
  background:
    radial-gradient(ellipse 50% 40% at 25% 18%, rgba(124,58,237,.12) 0%, transparent 70%),
    radial-gradient(ellipse 45% 40% at 80% 88%, rgba(16,185,129,.08) 0%, transparent 70%),
    linear-gradient(180deg, #06060b 0%, #0d081a 50%, #06060b 100%);
}
.status-stars { position: fixed; inset: 0; z-index: -8; pointer-events: none; opacity: 0.28; }
.st-star {
  position: absolute; width: 2px; height: 2px;
  background: #fff; border-radius: 50%;
  box-shadow: 0 0 4px rgba(255,255,255,0.6);
  animation: st-twinkle 4s ease-in-out infinite;
}
@keyframes st-twinkle {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50%      { opacity: 0.85; transform: scale(1.3); }
}

/* ---- Header (eigene Page-Nav) ---- */
.st-header {
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 24px 0;
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
}
.st-header .logo svg { width: 180px; height: 50px; display: block; }
.st-header nav {
  display: flex; gap: 22px; margin-left: auto;
  flex-wrap: wrap; align-items: center;
}
.st-header nav a {
  color: rgba(255,255,255,0.62);
  font-size: 14px; font-weight: 500;
}
.st-header nav a:hover { color: #fff; }

/* ---- Container ---- */
.st-container {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 24px;
}
.st-hero { padding: 56px 0 24px; }
.st-eyebrow {
  display: inline-block;
  padding: 5px 14px;
  background: rgba(168,85,247,0.12);
  border: 1px solid rgba(168,85,247,0.3);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #c4b5fd;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.st-hero h1 {
  font-family: 'Outfit', 'Inter', sans-serif;
  font-size: clamp(36px, 5.4vw, 56px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0 0 14px;
}
.st-hero h1 .accent {
  background: linear-gradient(135deg, #10B981 0%, #06B6D4 50%, #A855F7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.st-hero-sub {
  font-size: clamp(15px, 1.4vw, 18px);
  color: var(--st-text-muted);
  max-width: 620px;
  margin: 0;
  line-height: 1.55;
}

/* ============ Status-Banner ============ */
.st-banner {
  position: relative;
  padding: 22px 26px;
  margin: 28px 0 36px;
  border-radius: 16px;
  background: var(--st-bg-card-strong);
  border: 1px solid var(--st-border-subtle);
  display: flex;
  align-items: center;
  gap: 16px;
  overflow: hidden;
  transition: background .35s ease, border-color .35s ease, box-shadow .35s ease;
}
.st-banner::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--st-skip);
  transition: background .35s ease, box-shadow .35s ease;
}

.st-banner-icon {
  flex-shrink: 0;
  width: 46px; height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  position: relative;
}
.st-banner-icon::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  z-index: -1;
  opacity: 0;
  transition: opacity .35s ease;
}
.st-banner-text { min-width: 0; flex: 1; }
.st-banner-title {
  font-family: 'Outfit', sans-serif;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 3px;
  color: #fff;
}
.st-banner-sub {
  font-size: 13px;
  color: var(--st-text-muted);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.03em;
}

/* Banner-Statusvarianten */
.st-banner[data-status="operational"] {
  border-color: rgba(16,185,129,0.35);
  background: linear-gradient(135deg, rgba(16,185,129,0.12) 0%, rgba(16,185,129,0.04) 100%);
}
.st-banner[data-status="operational"]::before { background: var(--st-ok); box-shadow: 0 0 18px rgba(16,185,129,0.55); }
.st-banner[data-status="operational"] .st-banner-icon {
  background: rgba(16,185,129,0.22);
  border-color: rgba(16,185,129,0.4);
  color: var(--st-ok);
}
.st-banner[data-status="operational"] .st-banner-icon::before {
  background: radial-gradient(circle, rgba(16,185,129,0.45) 0%, transparent 70%);
  opacity: 1;
  animation: st-banner-pulse 2.4s ease-in-out infinite;
}

.st-banner[data-status="degraded"] {
  border-color: rgba(245,158,11,0.4);
  background: linear-gradient(135deg, rgba(245,158,11,0.14) 0%, rgba(245,158,11,0.04) 100%);
}
.st-banner[data-status="degraded"]::before { background: var(--st-warn); box-shadow: 0 0 18px rgba(245,158,11,0.55); }
.st-banner[data-status="degraded"] .st-banner-icon {
  background: rgba(245,158,11,0.22);
  border-color: rgba(245,158,11,0.45);
  color: var(--st-warn);
}
.st-banner[data-status="degraded"] .st-banner-icon::before {
  background: radial-gradient(circle, rgba(245,158,11,0.55) 0%, transparent 70%);
  opacity: 1;
  animation: st-banner-pulse 1.4s ease-in-out infinite;
}

.st-banner[data-status="major_outage"] {
  border-color: rgba(239,68,68,0.45);
  background: linear-gradient(135deg, rgba(239,68,68,0.16) 0%, rgba(239,68,68,0.05) 100%);
}
.st-banner[data-status="major_outage"]::before { background: var(--st-down); box-shadow: 0 0 18px rgba(239,68,68,0.6); }
.st-banner[data-status="major_outage"] .st-banner-icon {
  background: rgba(239,68,68,0.24);
  border-color: rgba(239,68,68,0.5);
  color: var(--st-down);
}
.st-banner[data-status="major_outage"] .st-banner-icon::before {
  background: radial-gradient(circle, rgba(239,68,68,0.6) 0%, transparent 70%);
  opacity: 1;
  animation: st-banner-pulse 0.8s ease-in-out infinite;
}

@keyframes st-banner-pulse {
  0%, 100% { transform: scale(1); opacity: 0.55; }
  50%      { transform: scale(1.25); opacity: 0; }
}

/* ============ Komponenten-Liste ============ */
.st-section-title {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0 0 16px;
  color: #fff;
}
.st-section-subtitle {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--st-text-dim);
  font-weight: 600;
  margin-bottom: 8px;
}

.st-components {
  background: var(--st-bg-card);
  border: 1px solid var(--st-border-subtle);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 36px;
}
.st-row {
  display: grid;
  grid-template-columns: 16px 1fr auto auto;
  gap: 14px;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--st-border-subtle);
  transition: background-color .25s ease;
}
.st-row:last-child { border-bottom: 0; }
.st-row.is-flashing { background-color: rgba(168,85,247,0.07); }

.st-dot {
  position: relative;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--st-skip);
  flex-shrink: 0;
}
.st-dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  z-index: -1;
}
.st-row[data-status="operational"] .st-dot { background: var(--st-ok); box-shadow: 0 0 8px rgba(16,185,129,0.5); }
.st-row[data-status="degraded"]    .st-dot { background: var(--st-warn); box-shadow: 0 0 8px rgba(245,158,11,0.6); }
.st-row[data-status="down"]        .st-dot { background: var(--st-down); box-shadow: 0 0 8px rgba(239,68,68,0.7); }

/* Pulse-Geschwindigkeit pro Status */
.st-row[data-status="operational"] .st-dot::after {
  background: rgba(16,185,129,0.5);
  animation: st-dot-pulse 2s ease-in-out infinite;
}
.st-row[data-status="degraded"] .st-dot::after {
  background: rgba(245,158,11,0.6);
  animation: st-dot-pulse 1.2s ease-in-out infinite;
}
.st-row[data-status="down"] .st-dot::after {
  background: rgba(239,68,68,0.7);
  animation: st-dot-pulse 0.6s ease-in-out infinite;
}
@keyframes st-dot-pulse {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50%      { transform: scale(2.4); opacity: 0; }
}

.st-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: #fff;
}
.st-latency {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  color: var(--st-text-muted);
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}
.st-latency.is-fast { color: var(--st-ok); }
.st-latency.is-medium { color: var(--st-warn); }
.st-latency.is-slow { color: var(--st-down); }
.st-checked {
  font-size: 11px;
  color: var(--st-text-dim);
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.st-row.is-skeleton .st-name,
.st-row.is-skeleton .st-latency,
.st-row.is-skeleton .st-checked {
  color: var(--st-text-dim);
  opacity: 0.6;
}

/* ============ Refresh-Footer + Connection-Banner ============ */
.st-refresh {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  background: rgba(255,255,255,0.02);
  border-top: 1px solid var(--st-border-subtle);
  font-size: 12px;
  color: var(--st-text-dim);
  font-family: 'JetBrains Mono', monospace;
  flex-wrap: wrap;
}
.st-refresh-spinner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.st-refresh-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--st-text-dim);
  transition: background .25s ease;
}
.st-refresh.is-fetching .st-refresh-dot {
  background: #c084fc;
  animation: st-refresh-spin 0.8s ease-in-out infinite;
}
@keyframes st-refresh-spin {
  0%, 100% { opacity: 0.3; }
  50%      { opacity: 1; }
}
.st-refresh.is-error {
  background: rgba(239,68,68,0.08);
  color: #fca5a5;
  border-top-color: rgba(239,68,68,0.3);
}
.st-refresh.is-error .st-refresh-dot { background: var(--st-down); animation: none; }

/* ============ Incidents ============ */
.st-incidents {
  background: var(--st-bg-card);
  border: 1px solid var(--st-border-subtle);
  border-radius: 14px;
  padding: 20px 22px;
  margin-bottom: 60px;
}
.st-incidents-empty {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 4px;
  font-size: 14px;
  color: var(--st-text-muted);
}
.st-incidents-empty::before {
  content: '✓';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: rgba(16,185,129,0.15);
  border: 1px solid rgba(16,185,129,0.4);
  color: var(--st-ok);
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}
.st-incident {
  padding: 14px 0;
  border-bottom: 1px dashed var(--st-border-subtle);
}
.st-incident:last-child { border-bottom: 0; padding-bottom: 0; }
.st-incident:first-child { padding-top: 0; }
.st-incident-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.st-incident-status-pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
}
.st-incident[data-status="resolved"] .st-incident-status-pill {
  background: rgba(16,185,129,0.14); color: var(--st-ok); border: 1px solid rgba(16,185,129,0.35);
}
.st-incident[data-status="monitoring"] .st-incident-status-pill {
  background: rgba(59,130,246,0.14); color: #60a5fa; border: 1px solid rgba(59,130,246,0.35);
}
.st-incident[data-status="investigating"] .st-incident-status-pill {
  background: rgba(245,158,11,0.14); color: var(--st-warn); border: 1px solid rgba(245,158,11,0.4);
}
.st-incident-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--st-text-dim);
  letter-spacing: 0.04em;
}
.st-incident-title {
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
  color: #fff;
}
.st-incident-desc {
  font-size: 13.5px;
  color: var(--st-text-muted);
  margin: 0;
  line-height: 1.55;
}

/* ---- Mobile ---- */
@media (max-width: 720px) {
  .st-row { grid-template-columns: 16px 1fr auto; gap: 10px; padding: 14px 16px; }
  .st-row .st-checked { display: none; }
  .st-banner { padding: 18px 18px; gap: 12px; }
  .st-banner-icon { width: 40px; height: 40px; font-size: 19px; }
  .st-banner-title { font-size: 17px; }
  .st-hero { padding: 40px 0 18px; }
  .st-incidents { padding: 16px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .st-banner-icon::before,
  .st-row .st-dot::after,
  .st-refresh.is-fetching .st-refresh-dot,
  .st-star { animation: none !important; }
}
