/* ==========================================================================
   Statusseite
   ========================================================================== */

.st-hero { --st: #5f8484; --st-soft: rgba(95, 132, 132, 0.14); padding-bottom: clamp(28px, 4vw, 44px); }
.st-hero[data-state="ok"] { --st: #6ee7a0; --st-soft: rgba(110, 231, 160, 0.13); }
.st-hero[data-state="degraded"] { --st: #ffc857; --st-soft: rgba(255, 200, 87, 0.13); }
.st-hero[data-state="partial"] { --st: #ff8a5b; --st-soft: rgba(255, 138, 91, 0.14); }
.st-hero[data-state="major"] { --st: #ff6b6b; --st-soft: rgba(255, 107, 107, 0.15); }

.st-banner { display: flex; align-items: center; gap: 22px; max-width: 760px; margin-top: 8px; padding: clamp(18px, 3vw, 28px) clamp(20px, 3vw, 32px); border: 1px solid color-mix(in srgb, var(--st) 45%, transparent); border-radius: 22px; background: linear-gradient(135deg, var(--st-soft), rgba(9, 78, 82, 0.08)); box-shadow: 0 24px 60px -34px var(--st); transition: border-color 0.4s, background 0.4s, box-shadow 0.4s; }
.st-banner h1 { font-size: clamp(1.5rem, 3.6vw, 2.3rem); line-height: 1.15; }
.st-banner p { margin-top: 4px; color: var(--muted); }
.st-orb { position: relative; flex: none; width: 46px; height: 46px; border-radius: 50%; background: var(--st); box-shadow: 0 0 0 0 var(--st); animation: st-pulse 2.4s infinite; }
.st-orb::after { content: ""; position: absolute; inset: 13px 15px 15px 15px; border: solid var(--on-accent); border-width: 0 0 4px 4px; border-radius: 2px; transform: rotate(-45deg) translate(1px, -2px); opacity: 0.85; }
.st-hero[data-state="degraded"] .st-orb::after, .st-hero[data-state="partial"] .st-orb::after, .st-hero[data-state="major"] .st-orb::after, .st-hero[data-state="unknown"] .st-orb::after { inset: 12px 21px; border-width: 0 4px 0 0; transform: none; border-radius: 3px; height: 16px; box-shadow: 0 -0 0 0 transparent; }
@keyframes st-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--st) 55%, transparent); } 70% { box-shadow: 0 0 0 16px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

.st-updated { margin-top: 14px; color: var(--muted); font-size: 0.88rem; }
.st-refresh { padding: 0; border: 0; background: none; color: var(--accent); font: inherit; font-size: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.st-refresh:disabled { opacity: 0.5; cursor: progress; }

.st-body { display: grid; gap: clamp(28px, 4vw, 44px); padding-block: clamp(20px, 3vw, 34px) clamp(64px, 9vw, 110px); }
.st-h2 { margin-bottom: 16px; font-size: 1.25rem; font-style: normal; }

/* Kennzahlen */
.st-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.st-metric { display: grid; gap: 3px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.st-metric span { color: var(--muted); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.st-metric strong { font-size: 1.55rem; line-height: 1.15; font-variant-numeric: tabular-nums; }
.st-metric small { color: #6c8f8f; font-size: 0.78rem; }

/* Dienste */
.st-components { display: grid; gap: 16px; }
.st-card { display: grid; gap: 16px; padding: clamp(18px, 2.4vw, 26px); border: 1px solid var(--line); border-radius: 20px; background: linear-gradient(160deg, rgba(9, 78, 82, 0.2), rgba(9, 78, 82, 0.06)); animation: st-in 0.5s ease both; }
.st-card.is-down { border-color: rgba(255, 107, 107, 0.55); }
.st-card.is-degraded { border-color: rgba(255, 200, 87, 0.5); }
@keyframes st-in { from { opacity: 0; transform: translateY(8px); } }
.st-card header { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.st-ico { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line-strong); border-radius: 13px; background: rgba(1, 16, 21, 0.6); color: var(--accent); }
.st-ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.st-card-title { flex: 1; min-width: 200px; }
.st-card-title h3 { font-size: 1.1rem; font-style: normal; }
.st-card-title p { margin-top: 1px; color: var(--muted); font-size: 0.86rem; }
.st-card-state { display: grid; justify-items: end; gap: 4px; }
.st-card-state strong { font-size: 1.05rem; font-variant-numeric: tabular-nums; }

.st-pill { display: inline-flex; align-items: center; gap: 7px; padding: 4px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.07); color: var(--muted); font-size: 0.78rem; font-weight: 700; white-space: nowrap; }
.st-pill i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.st-pill.is-ok { background: rgba(110, 231, 160, 0.14); color: #6ee7a0; }
.st-pill.is-degraded { background: rgba(255, 200, 87, 0.15); color: #ffc857; }
.st-pill.is-down { background: rgba(255, 107, 107, 0.16); color: #ff8f8f; }
.st-pill.is-ok i { animation: st-blink 2.4s infinite; }
@keyframes st-blink { 50% { opacity: 0.35; } }

.st-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 0; }
.st-stats div { display: grid; gap: 2px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(1, 16, 21, 0.45); }
.st-stats dt { color: var(--muted); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; }
.st-stats dd { margin: 0; font-size: 1.02rem; font-weight: 700; font-variant-numeric: tabular-nums; }

/* Diagramm */
.st-chart-wrap { padding: 12px 14px 8px; border: 1px solid var(--line); border-radius: 14px; background: rgba(1, 16, 21, 0.45); }
.st-chart { display: block; width: 100%; height: 96px; }
.st-line { fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.st-grid { stroke: rgba(255, 255, 255, 0.07); stroke-dasharray: 3 5; vector-effect: non-scaling-stroke; }
.st-dot { vector-effect: non-scaling-stroke; }
.st-dot.is-degraded { fill: #ffc857; }
.st-dot.is-down { fill: #ff6b6b; }
.st-chart-axis, .st-bars-axis { display: flex; justify-content: space-between; margin-top: 6px; color: #6c8f8f; font-size: 0.72rem; }
.st-chart-empty { padding: 28px 0; color: var(--muted); font-size: 0.86rem; text-align: center; }

/* 90 Tage */
.st-bars { display: grid; grid-template-columns: repeat(90, minmax(0, 1fr)); gap: 3px; height: 34px; }
.st-bars i { border-radius: 3px; background: rgba(255, 255, 255, 0.08); transition: transform 0.15s, filter 0.15s; }
.st-bars i.is-ok { background: #3fcf86; }
.st-bars i.is-warn { background: #ffc857; }
.st-bars i.is-down { background: #ff6b6b; }
.st-bars i:hover { transform: scaleY(1.18); filter: brightness(1.25); }

.st-tip { position: fixed; z-index: 60; padding: 7px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: #03181e; color: var(--text); font-size: 0.8rem; white-space: nowrap; pointer-events: none; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); }
.st-tip[hidden] { display: none; }

/* Vorfaelle */
.st-incidents { display: grid; gap: 10px; }
.st-incident { display: flex; align-items: center; gap: 16px; padding: 14px 18px; border: 1px solid var(--line); border-left: 4px solid #ff6b6b; border-radius: 14px; background: var(--surface); }
.st-incident.is-degraded { border-left-color: #ffc857; }
.st-incident.is-resolved { border-left-color: #3fcf86; opacity: 0.85; }
.st-incident h3 { font-size: 1rem; font-style: normal; }
.st-incident p { margin-top: 2px; color: var(--muted); font-size: 0.84rem; }
.st-empty { display: flex; align-items: center; gap: 14px; padding: 18px 22px; border: 1px dashed var(--line-strong); border-radius: 16px; color: var(--muted); }
.st-empty span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(110, 231, 160, 0.15); color: #6ee7a0; font-weight: 800; }
.st-empty p { margin: 0; }

.st-note { max-width: 70ch; color: var(--muted); font-size: 0.86rem; line-height: 1.65; }
.st-note a { color: var(--accent); }

@media (max-width: 640px) {
  .st-banner { gap: 14px; }
  .st-orb { width: 36px; height: 36px; }
  .st-card-state { justify-items: start; }
  .st-bars { gap: 2px; height: 28px; }
  .st-incident { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { .st-orb, .st-pill.is-ok i, .st-card { animation: none; } }

/* Kopfbereich */
.st-hero { position: relative; padding: calc(var(--header-h) + clamp(28px, 5vw, 56px)) 0 clamp(24px, 4vw, 40px); background: radial-gradient(720px 320px at 12% 0%, var(--st-soft), transparent 70%), radial-gradient(500px 260px at 92% 15%, rgba(76, 194, 255, 0.06), transparent 70%); overflow: hidden; transition: background 0.5s; }
.st-hero .container { position: relative; }
.st-hero .eyebrow { margin-bottom: 14px; }
