* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body {
  margin: 0; padding: 0; min-height: 100%;
  background: #08080A; color: #F2F2F4;
  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: #FF6A2B; text-decoration: none; }
a:hover { color: #FF8952; }

.topbar {
  position: sticky; top: 0; z-index: 10; height: 46px;
  background: rgba(11,11,14,0.92); border-bottom: 1px solid #1B1B21;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.topbar-inner { max-width: 900px; margin: 0 auto; height: 100%; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; }
.topbar-left { display: flex; align-items: center; gap: 10px; }
.topbar-brand { display: inline-flex; align-items: center; margin-right: 6px; text-decoration: none; }
.topbar-brand-logo { height: 24px; max-width: 140px; width: auto; object-fit: contain; display: block; }
.topbar-btn {
  display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600;
  color: #8A8A94; background: #121216; border: 1px solid #22222A; padding: 4px 11px;
  border-radius: 8px; transition: all .14s ease; text-decoration: none; cursor: pointer;
  font-family: inherit; line-height: 1.4;
}
.topbar-btn:hover { color: #EDEDF0; border-color: #32323E; background: #181820; }
.subscribe-trigger {
  color: #FF8952; background: rgba(255,106,43,0.1); border-color: rgba(255,106,43,0.28);
}
.subscribe-trigger:hover {
  color: #FFA070; background: rgba(255,106,43,0.18); border-color: rgba(255,106,43,0.45);
  box-shadow: 0 0 12px rgba(255,106,43,0.15);
}
.live-indicator { display: flex; align-items: center; gap: 8px; font-size: 11px; color: #5E5E68; font-family: "JetBrains Mono", ui-monospace, monospace; }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: #34D399; animation: pulseDot 2.4s infinite; }
@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(52,211,153,0.45); }
  70% { box-shadow: 0 0 0 7px rgba(52,211,153,0); }
  100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); }
}

.wrap {
  max-width: 900px; margin: 0 auto; padding: 56px 24px 90px;
  background: radial-gradient(900px 420px at 50% -8%, rgba(255,106,43,0.07), transparent 62%);
}
.loading { text-align: center; color: #75757F; padding: 60px 0; }

/* ---- Kopfbereich mit Logo ---- */
.brand-block { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.brand-logo-img {
  max-height: 64px; max-width: 260px; width: auto; height: auto; object-fit: contain;
  filter: drop-shadow(0 6px 20px rgba(255,106,43,0.18));
}
.brand-logo {
  width: 44px; height: 44px; border-radius: 12px;
  background: linear-gradient(135deg, #FF7A33, #FF5A1F);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #0A0A0C; font-size: 20px;
  box-shadow: 0 6px 20px rgba(255,106,43,0.3);
}
.brand-title { font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 25px; letter-spacing: -0.03em; margin: 0; text-align: center; }
.tagline { text-align: center; margin: 8px 0 30px; font-size: 13px; color: #FF8952; }

/* ---- Gesamtstatus-Banner ---- */
.banner {
  border-radius: 14px; padding: 18px 22px; display: flex; align-items: center; gap: 14px;
  border: 1px solid #1E1E24;
}
.banner.up { background: linear-gradient(135deg, rgba(52,211,153,0.10), rgba(52,211,153,0.03)); border-color: rgba(52,211,153,0.28); }
.banner.degraded { background: linear-gradient(135deg, rgba(251,191,36,0.10), rgba(251,191,36,0.03)); border-color: rgba(251,191,36,0.28); }
.banner.down { background: linear-gradient(135deg, rgba(248,113,113,0.10), rgba(248,113,113,0.03)); border-color: rgba(248,113,113,0.28); }
.banner.maintenance { background: linear-gradient(135deg, rgba(129,140,248,0.10), rgba(129,140,248,0.03)); border-color: rgba(129,140,248,0.28); }
.banner .dot-lg { width: 13px; height: 13px; border-radius: 50%; flex: none; }
.banner-text { min-width: 0; }
.banner-title { font-family: "Space Grotesk", sans-serif; font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.banner-sub { font-size: 11.5px; color: #8A8A94; margin-top: 3px; font-family: "JetBrains Mono", ui-monospace, monospace; }

/* ---- Kennzahlen ---- */
.stats-grid { margin-top: 14px; display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; }
.stat-tile {
  background: linear-gradient(170deg, #111116, #0D0D11); border: 1px solid #1E1E24;
  border-radius: 12px; padding: 15px 16px; text-align: center;
}
.stat-tile-label { font-size: 9.5px; color: #5E5E68; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; margin-bottom: 7px; }
.stat-tile-value { font-family: "Space Grotesk", sans-serif; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
@media (max-width: 620px) { .stats-grid { grid-template-columns: repeat(2,1fr); } }

.maintenance-banner {
  margin-top: 14px; background: linear-gradient(135deg, rgba(251,191,36,0.09), rgba(251,191,36,0.03));
  border: 1px solid rgba(251,191,36,0.25); border-radius: 13px; padding: 15px 18px;
  display: flex; gap: 14px; align-items: flex-start;
}
.maintenance-banner.upcoming { background: linear-gradient(135deg, rgba(129,140,248,0.08), rgba(129,140,248,0.02)); border-color: rgba(129,140,248,0.22); }
.maintenance-banner-icon { font-size: 15px; color: #FBBF24; line-height: 1; margin-top: 2px; flex: none; }
.maintenance-banner.upcoming .maintenance-banner-icon { color: #818CF8; }
.maintenance-banner-title { font-size: 12.5px; font-weight: 700; color: #FBBF24; margin-bottom: 3px; }
.maintenance-banner.upcoming .maintenance-banner-title { color: #818CF8; }
.maintenance-banner-text { font-size: 12.5px; color: #C6C6CE; line-height: 1.5; }

.section-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
  color: #4A4A54; margin: 38px 0 14px;
}

/* ---- Systemgruppen ---- */
.group { margin-bottom: 22px; }
.group-head { display: flex; align-items: center; gap: 10px; margin-bottom: 11px; flex-wrap: wrap; }
.group-name { font-family: "Space Grotesk", sans-serif; font-size: 15px; font-weight: 700; color: #EDEDF0; letter-spacing: -0.01em; }
.group-pill { font-size: 9.5px; font-weight: 700; padding: 3px 10px; border-radius: 20px; letter-spacing: 0.05em; }
.group-meta { margin-left: auto; font-size: 11px; color: #5E5E68; font-family: "JetBrains Mono", ui-monospace, monospace; }
/* Kein overflow:hidden — sonst wird der Hover-Tooltip der Balken abgeschnitten. */
.group-body { background: #0E0E12; border: 1px solid #1E1E24; border-radius: 14px; }

.monitor-info { min-width: 0; }
.monitor-badge-row { display: flex; align-items: center; gap: 9px; margin-bottom: 6px; }
.uptime-badge {
  font-size: 10px; font-weight: 700; color: #0A0A0C; padding: 2px 8px; border-radius: 10px;
  font-family: "JetBrains Mono", ui-monospace, monospace; flex: none;
}
.monitor-name { font-size: 13.5px; font-weight: 700; color: #EDEDF0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag-chips { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 6px; }
.tag-chip {
  font-size: 9.5px; font-weight: 700; color: #FF8952; background: rgba(255,106,43,0.12);
  border: 1px solid rgba(255,106,43,0.25); padding: 2px 8px; border-radius: 10px;
}
.monitor-meta { font-size: 10.5px; color: #5E5E68; font-family: "JetBrains Mono", ui-monospace, monospace; }

/* ---- 60-Tage-Balken + Tooltip ---- */
.bars-wrap { position: relative; min-width: 0; }
.bars-row { display: flex; gap: 3px; }
.bar {
  flex: 1; min-width: 2px; height: 34px; border-radius: 3px; opacity: 0.85;
  transition: opacity .12s ease, transform .12s ease; cursor: default;
}
.bar:hover { opacity: 1; transform: scaleY(1.12); }
.bar-nodata { opacity: 0.5; }
.bars-caption {
  display: flex; justify-content: space-between; font-size: 9.5px; color: #4A4A54;
  font-family: "JetBrains Mono", ui-monospace, monospace; margin-top: 7px;
}
.bar-tooltip {
  position: absolute; bottom: calc(100% + 10px); z-index: 30; pointer-events: none;
  transform: translateX(-50%);
  background: #15181C; border: 1px solid #2A3038; border-radius: 9px; padding: 9px 14px;
  text-align: center; box-shadow: 0 12px 34px rgba(0,0,0,0.65); white-space: nowrap;
}
.bar-tooltip::after {
  content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 6px solid transparent; border-top-color: #2A3038;
}
.bar-tooltip-status { font-size: 11.5px; font-weight: 800; letter-spacing: 0.07em; }
.bar-tooltip-date { font-size: 11px; color: #A8AEB6; font-family: "JetBrains Mono", ui-monospace, monospace; margin-top: 5px; }
.bar-tooltip-uptime { font-size: 10.5px; color: #6B7280; font-family: "JetBrains Mono", ui-monospace, monospace; margin-top: 2px; }

/* ---- Vorfälle ---- */
.incident-card { background: #0E0E12; border: 1px solid #1E1E24; border-radius: 13px; padding: 18px 20px; margin-bottom: 10px; }
.incident-head { display: flex; align-items: center; gap: 10px; margin-bottom: 5px; flex-wrap: wrap; }
.incident-title { font-size: 13.5px; font-weight: 700; color: #EDEDF0; }
.incident-meta { font-size: 11px; color: #5E5E68; font-family: "JetBrains Mono", ui-monospace, monospace; margin-bottom: 13px; }
.incident-updates { display: flex; flex-direction: column; gap: 11px; border-left: 2px solid #22222A; }
.incident-update { padding-left: 16px; position: relative; }
.incident-update::before {
  content: ""; position: absolute; left: -5px; top: 4px; width: 8px; height: 8px;
  border-radius: 50%; background: #FF6A2B; border: 2px solid #0E0E12;
}
.incident-update-time { font-size: 10.5px; color: #5E5E68; font-family: "JetBrains Mono", ui-monospace, monospace; }
.incident-update-text { font-size: 12.5px; color: #C6C6CE; margin-top: 2px; line-height: 1.55; }

.pill-up { color: #34D399; background: rgba(52,211,153,0.15); }
.pill-degraded { color: #FBBF24; background: rgba(251,191,36,0.15); }
.pill-down { color: #F87171; background: rgba(248,113,113,0.15); }
.pill-maintenance { color: #818CF8; background: rgba(129,140,248,0.15); }
.pill-resolved { color: #34D399; background: rgba(52,211,153,0.15); }
.pill-investigating { color: #F87171; background: rgba(248,113,113,0.15); }
.pill-identified { color: #FBBF24; background: rgba(251,191,36,0.15); }
.pill-monitoring { color: #818CF8; background: rgba(129,140,248,0.15); }

/* ---- Incident Stepper ---- */
.incident-stepper {
  position: relative; display: flex; justify-content: space-between; align-items: center;
  margin: 18px 0 20px; padding: 0 10px;
}
.incident-stepper-track {
  position: absolute; top: 12px; left: 23px; right: 23px; height: 2px;
  background: #1F1F26; z-index: 1; border-radius: 2px; overflow: hidden;
}
.incident-stepper-progress {
  position: absolute; top: 0; left: 0; height: 100%;
  background: linear-gradient(90deg, #FF6A2B, #34D399);
  transition: width 0.35s ease;
}
.incident-step {
  position: relative; z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.incident-step-node {
  width: 26px; height: 26px; border-radius: 50%; background: #101014; border: 2px solid #282832;
  display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700;
  color: #5E5E68; transition: all 0.2s ease;
}
.incident-step.active .incident-step-node {
  border-color: #FF6A2B; color: #FF6A2B; background: rgba(255,106,43,0.18);
  box-shadow: 0 0 12px rgba(255,106,43,0.4);
}
.incident-step.completed .incident-step-node {
  border-color: #34D399; background: #34D399; color: #0A0A0C;
}
.incident-step-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #5E5E68;
}
.incident-step.active .incident-step-label { color: #FF8952; }
.incident-step.completed .incident-step-label { color: #34D399; }

.footer-legend {
  margin-top: 30px; display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px; padding-top: 20px; border-top: 1px solid #16161B;
}
.legend-items { display: flex; gap: 16px; font-size: 11px; color: #4A4A54; flex-wrap: wrap; }
.legend-item { display: flex; align-items: center; gap: 6px; }
.legend-swatch { width: 9px; height: 9px; border-radius: 2px; }
.footer-time { font-size: 11px; color: #4A4A54; font-family: "JetBrains Mono", ui-monospace, monospace; }
.powered-by { text-align: center; margin-top: 30px; font-size: 11px; color: #3A3A44; }
.powered-by b { color: #5E5E68; font-weight: 700; }

.empty { color: #5E5E68; font-size: 12.5px; padding: 12px 0; }

@media (max-width: 680px) {
  .monitor-row { grid-template-columns: 1fr 28px; gap: 12px; }
  .monitor-row .bars-wrap { grid-column: 1 / -1; }
  .wrap { padding: 40px 16px 70px; }
}

/* ---- Aufklappbare Performance- & 30-Tage-Ansicht ---- */
.monitor-item-block {
  border-bottom: 1px solid #16161B;
  transition: background .15s ease;
}
.monitor-item-block:last-child { border-bottom: none; }
.monitor-item-block.expanded { background: rgba(255,255,255,0.015); }
.monitor-row {
  padding: 16px 18px;
  display: grid; grid-template-columns: minmax(220px, 300px) 1fr 28px; gap: 18px; align-items: center;
  cursor: pointer; user-select: none;
}
.monitor-row:hover { background: rgba(255,255,255,0.025); }
.expand-toggle-icon {
  width: 26px; height: 26px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: #71717A; font-size: 11px; background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  transition: transform .2s ease, color .15s ease, background .15s ease, border-color .15s ease;
}
.monitor-row:hover .expand-toggle-icon {
  color: #EDEDF0; background: rgba(255,255,255,0.07);
}
.monitor-item-block.expanded .expand-toggle-icon {
  transform: rotate(180deg); color: #FF8952;
  background: rgba(255,106,43,0.12); border-color: rgba(255,106,43,0.3);
}

.monitor-perf-drawer {
  padding: 0 20px 22px 20px;
  border-top: 1px dashed rgba(255,255,255,0.06);
  background: rgba(10,10,14,0.4);
  animation: drawerSlideDown .2s ease forwards;
}
@keyframes drawerSlideDown {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.drawer-section { margin-top: 18px; }
.drawer-section:first-child { margin-top: 14px; }
.drawer-section-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px; flex-wrap: wrap; gap: 8px;
}
.drawer-section-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  color: #71717A; display: flex; align-items: center; gap: 6px;
}
.drawer-section-meta { display: flex; align-items: center; gap: 8px; }
.drawer-bars-card {
  background: #111116; border: 1px solid #1E1E26; border-radius: 12px;
  padding: 14px 16px 12px;
}

.perf-drawer-head {
  display: flex; justify-content: space-between; align-items: center;
  margin: 16px 0 14px; flex-wrap: wrap; gap: 10px;
}
.perf-drawer-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  color: #71717A; display: flex; align-items: center; gap: 6px;
}
.perf-metrics-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px;
}
@media (max-width: 640px) {
  .perf-metrics-grid { grid-template-columns: repeat(2, 1fr); }
}
.perf-metric-card {
  background: #121217; border: 1px solid #1F1F26; border-radius: 10px;
  padding: 10px 12px; text-align: left;
}
.perf-metric-lbl { font-size: 9.5px; text-transform: uppercase; font-weight: 700; color: #52525B; letter-spacing: 0.06em; margin-bottom: 4px; }
.perf-metric-val { font-family: "Space Grotesk", sans-serif; font-size: 16px; font-weight: 700; color: #EDEDF0; }

.perf-chart-wrap {
  background: #111116; border: 1px solid #1E1E26; border-radius: 12px;
  padding: 14px 16px 12px; position: relative;
}
.perf-chart-svg { width: 100%; height: 90px; overflow: visible; display: block; }
.perf-chart-footer {
  display: flex; justify-content: space-between; margin-top: 8px;
  font-size: 10px; color: #52525B; font-family: "JetBrains Mono", ui-monospace, monospace;
}
.perf-empty-note {
  text-align: center; font-size: 12px; color: #52525B; padding: 24px 0; font-family: "JetBrains Mono", ui-monospace, monospace;
}

/* ---- Subscribe Modal ---- */
.subscribe-modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.75); backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px); z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: fadeIn .18s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.subscribe-modal {
  background: #111116; border: 1px solid #272732; border-radius: 16px;
  width: 100%; max-width: 460px; padding: 28px; box-shadow: 0 20px 50px rgba(0,0,0,0.8);
  position: relative; animation: scaleUp .2s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes scaleUp { from { transform: scale(0.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.subscribe-modal-close {
  position: absolute; top: 16px; right: 16px; width: 28px; height: 28px; border-radius: 8px;
  background: transparent; border: 1px solid #22222A; color: #8A8A94; font-size: 13px;
  display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all .15s ease;
}
.subscribe-modal-close:hover { background: #1C1C24; color: #EDEDF0; border-color: #33333E; }

.sub-modal-icon {
  width: 44px; height: 44px; border-radius: 12px; background: rgba(255,106,43,0.12);
  border: 1px solid rgba(255,106,43,0.25); color: #FF8952; display: flex;
  align-items: center; justify-content: center; font-size: 20px; margin-bottom: 16px;
}
.sub-modal-title { font-family: "Space Grotesk", sans-serif; font-size: 19px; font-weight: 700; color: #EDEDF0; margin: 0 0 8px; }
.sub-modal-desc { font-size: 13px; color: #8A8A94; line-height: 1.5; margin: 0 0 20px; }
.sub-modal-form { display: flex; flex-direction: column; gap: 12px; }
.sub-modal-input {
  width: 100%; padding: 11px 14px; background: #0A0A0C; border: 1px solid #282832;
  border-radius: 10px; color: #EDEDF0; font-size: 13.5px; outline: none; transition: border-color .15s ease;
  font-family: inherit;
}
.sub-modal-input:focus { border-color: #FF6A2B; box-shadow: 0 0 0 3px rgba(255,106,43,0.15); }
.sub-modal-submit {
  width: 100%; padding: 11px 16px; background: linear-gradient(135deg, #FF7A33, #FF5A1F);
  border: none; border-radius: 10px; color: #0A0A0C; font-weight: 700; font-size: 13.5px;
  cursor: pointer; transition: all .15s ease; font-family: inherit;
}
.sub-modal-submit:hover { filter: brightness(1.1); box-shadow: 0 4px 16px rgba(255,106,43,0.35); }
.sub-modal-submit:disabled { opacity: 0.6; cursor: not-allowed; }
.sub-modal-msg { font-size: 12.5px; margin-top: 10px; padding: 10px 12px; border-radius: 8px; }
.sub-modal-msg.ok { background: rgba(52,211,153,0.1); border: 1px solid rgba(52,211,153,0.25); color: #34D399; }
.sub-modal-msg.err { background: rgba(248,113,113,0.1); border: 1px solid rgba(248,113,113,0.25); color: #F87171; }
