/* OnSite-Soft Statusseite – Gestaltung nach Brand Book v1.0 (Farben, Montserrat/Inter) */
@font-face { font-family: "Montserrat"; font-weight: 600; font-display: swap; src: url("/assets/fonts/montserrat-latin-600.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 700; font-display: swap; src: url("/assets/fonts/montserrat-latin-700.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("/assets/fonts/inter-latin-400.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url("/assets/fonts/inter-latin-500.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("/assets/fonts/inter-latin-600.woff2") format("woff2"); }

:root {
  --night: #020A25; --navy: #0B1640; --royal: #2342F9; --azure: #007EFD; --sky: #00B4FE; --cyan: #00E9FD; --violet: #C253FE;
  --ok: #16A34A; --ok-bar: #22C55E; --warn: #D97706; --warn-bar: #F5A524; --bad: #E11D48; --bad-bar: #F43F5E; --maint: #2342F9;
  --ink: #0B1640; --ink-2: #414B73; --muted: #5A6590; --line: #DFE4F2; --bg: #F4F6FB; --card: #FFFFFF; --none-bar: #D3D9EC;
  --display: "Montserrat", ui-sans-serif, system-ui, sans-serif;
  --body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --shadow: 0 1px 2px rgb(11 22 64 / 5%), 0 18px 40px -24px rgb(11 22 64 / 30%);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.55 var(--body); -webkit-font-smoothing: antialiased; }
a { color: var(--royal); }
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; margin: 0; }
p { margin: 0; }
svg { display: block; }
.wrap { width: 100%; max-width: 920px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: 12px; top: -48px; background: #fff; color: var(--navy); padding: 10px 14px; border-radius: 8px; font-weight: 600; z-index: 10; }
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid rgb(0 180 254 / 55%); outline-offset: 2px; border-radius: 6px; }

/* Kopf */
.top { background: radial-gradient(120% 140% at 85% -20%, rgb(194 83 254 / 28%) 0%, transparent 55%), radial-gradient(90% 120% at 0% 0%, rgb(0 233 253 / 14%) 0%, transparent 50%), var(--night); color: #E8ECF8; padding: 22px 0 92px; }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 14px; color: inherit; text-decoration: none; }
.brand img { width: 180px; height: auto; }
.brand-sub { font: 600 0.78rem/1 var(--display); letter-spacing: 0.2em; text-transform: uppercase; color: var(--cyan); padding-left: 14px; border-left: 1px solid rgb(255 255 255 / 22%); }
.top-nav { display: flex; align-items: center; gap: 18px; font-size: 0.92rem; }
.top-nav a { color: #E8ECF8; text-decoration: none; }
.top-nav a:hover { color: #fff; text-decoration: underline; }
.btn-ghost { border: 1px solid rgb(255 255 255 / 28%); padding: 8px 14px; border-radius: 10px; }
.btn-ghost:hover { background: rgb(255 255 255 / 8%); text-decoration: none !important; }

/* Gesamtstatus */
.main { margin-top: -64px; padding-bottom: 48px; }
.hero { display: flex; align-items: center; gap: 18px; padding: 24px 26px; border-radius: 18px; background: var(--card); box-shadow: var(--shadow); border-left: 6px solid var(--ok); }
.hero h1 { font-size: clamp(1.25rem, 3.4vw, 1.6rem); }
.hero p { color: var(--ink-2); margin-top: 4px; }
.hero-icon { flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--ok); }
.hero-icon svg { width: 26px; height: 26px; }
.hero.degraded, .hero.partial { border-left-color: var(--warn); } .hero.degraded .hero-icon, .hero.partial .hero-icon { background: var(--warn); }
.hero.major { border-left-color: var(--bad); } .hero.major .hero-icon { background: var(--bad); }
.hero.maintenance { border-left-color: var(--maint); } .hero.maintenance .hero-icon { background: var(--maint); }
.hero.unknown { border-left-color: var(--none-bar); } .hero.unknown .hero-icon { background: var(--muted); }

section { margin-top: 36px; }
.sec-h { font-size: 1.1rem; margin-bottom: 14px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.sec-sub { font: 400 0.88rem/1.3 var(--body); color: var(--muted); }
.card { background: var(--card); border-radius: 16px; box-shadow: var(--shadow); }
.empty { padding: 18px 22px; color: var(--ink-2); }

/* Dienste */
.comps { list-style: none; margin: 0; padding: 4px 22px; }
.comp { padding: 18px 0; border-bottom: 1px solid var(--line); }
.comp:last-child { border-bottom: 0; }
.comp-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.comp-name { font-weight: 600; }
.pill { display: inline-flex; align-items: center; gap: 7px; font-size: 0.85rem; font-weight: 600; color: var(--ok); white-space: nowrap; }
.pill .dot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 18%, transparent); }
.pill.degraded { color: var(--warn); } .pill.down { color: var(--bad); } .pill.maintenance { color: var(--maint); } .pill.unknown { color: var(--muted); }
.bars { display: flex; gap: 2px; height: 34px; }
.bar { flex: 1 1 0; min-width: 0; border-radius: 2px; background: var(--ok-bar); }
.bars .bar:hover { opacity: 0.7; }
.bar.warn { background: var(--warn-bar); } .bar.bad { background: var(--bad-bar); } .bar.none { background: var(--none-bar); }
.comp-foot { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 0.78rem; color: var(--muted); white-space: nowrap; }
.comp-foot .rule { flex: 1; height: 1px; background: var(--line); }
.comp-foot .d30 { display: none; }
.comp-foot .up { color: var(--ink-2); font-weight: 600; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 12px; font-size: 0.8rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .bar { display: inline-block; width: 10px; height: 14px; flex: none; }

/* Wartung & Vorfälle */
.window { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; font-size: 0.88rem; color: var(--ink-2); }
.window svg { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--maint); }
.inc { background: var(--card); border-radius: 16px; box-shadow: var(--shadow); padding: 18px 22px; margin-bottom: 12px; border-left: 5px solid var(--warn); }
.inc.major { border-left-color: var(--bad); } .inc.maintenance { border-left-color: var(--maint); } .inc.cancelled { border-left-color: var(--none-bar); }
.inc:not(.open) { box-shadow: none; border: 1px solid var(--line); border-left-width: 5px; }
.inc header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 8px; }
.inc h3 { font-size: 1rem; }
.tag { flex: none; font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; padding: 4px 9px; border-radius: 999px; background: #FEF3C7; color: #92400E; }
.tag.major { background: #FFE4E6; color: #9F1239; } .tag.maintenance { background: #E0E7FF; color: #1E3A8A; } .tag.cancelled { background: var(--bg); color: var(--muted); }
.meta { font-size: 0.85rem; color: var(--ink-2); }
.updates { list-style: none; margin: 12px 0 0; padding: 0; border-top: 1px solid var(--line); }
.updates li { padding: 10px 0 0; }
.updates p { font-size: 0.93rem; }
.updates time { font-size: 0.78rem; color: var(--muted); }
.days .day { padding: 14px 0; border-bottom: 1px solid var(--line); }
.day-h { font: 600 0.92rem/1.3 var(--body); margin-bottom: 8px; }
.day .none { color: var(--muted); font-size: 0.9rem; }
.day .inc { margin: 8px 0 0; }
.more { margin-top: 14px; font-weight: 600; }
.more a { text-decoration: none; } .more a:hover { text-decoration: underline; }
.back { margin: 0 0 18px; }
.back a { color: var(--royal); }
.page-h { font-size: 1.6rem; margin-bottom: 6px; }
.lead { color: var(--ink-2); margin-bottom: 20px; }
.main > .back:first-child { background: var(--card); display: inline-block; padding: 8px 14px; border-radius: 10px; box-shadow: var(--shadow); }

/* Abo */
.subscribe { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; padding: 22px; }
.subscribe h2 { font-size: 1.05rem; margin-bottom: 4px; }
.subscribe p { color: var(--ink-2); font-size: 0.92rem; }
.sub-links { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 16px; border-radius: 12px; color: #fff !important; text-decoration: none; font-weight: 600; background: linear-gradient(45deg, #C253FE 0%, #5A44FB 50%, #2342F9 100%); }
.btn svg { width: 18px; height: 18px; }
.sub-links a:not(.btn) { font-size: 0.88rem; }

/* Fuß */
.foot { border-top: 1px solid var(--line); background: var(--card); padding: 26px 0 30px; font-size: 0.88rem; color: var(--ink-2); }
.foot-in { display: grid; gap: 8px; }
.foot .small { font-size: 0.8rem; color: var(--muted); }
.foot .links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 6px; }
.foot .links a { color: var(--ink-2); }

@media (max-width: 640px) {
  .top { padding-bottom: 84px; }
  .brand img { width: 150px; }
  .brand-sub { display: none; }
  .hero { padding: 18px; gap: 14px; }
  .hero-icon { width: 40px; height: 40px; }
  .comps { padding: 4px 16px; }
  .inc { padding: 16px; }
  /* Auf dem Handy die letzten 30 Tage zeigen, damit die Balken lesbar bleiben */
  .bars .bar:nth-child(-n+60) { display: none; }
  .comp-foot .d90 { display: none; }
  .comp-foot .d30 { display: inline; }
}
@media (prefers-reduced-motion: no-preference) { .bars .bar { transition: opacity 120ms; } }
