/* Status - Glas-Look (dunkel). Farben haben immer eine Bedeutung:
   grün = läuft, orange = Warnung, rot = Ausfall - dazu immer ein Wort/Symbol. */
:root {
  --bg: #090a11; --ink: #f3f4fb; --mut: #9aa0b8; --line: rgba(255, 255, 255, .13);
  --ok: #2de2a6; --warn: #ffb020; --bad: #ff5a5f; --coral: #ff6a4d;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  font-family: -apple-system, "SF Pro Text", system-ui, "Helvetica Neue", Arial, "Noto Color Emoji", sans-serif;
  color: var(--ink); background: var(--bg); min-height: 100vh;
  background-image:
    radial-gradient(120% 55% at -10% -5%, rgba(255, 64, 160, .28), transparent 60%),
    radial-gradient(90% 45% at 110% 12%, rgba(70, 120, 255, .22), transparent 62%),
    radial-gradient(80% 40% at 50% 112%, rgba(255, 106, 77, .16), transparent 60%);
}
.app { max-width: 480px; margin: 0 auto; padding: calc(14px + env(safe-area-inset-top)) 16px 40px; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 0 14px; }
h1 { font-size: 30px; line-height: 1.05; margin: 0; letter-spacing: -.02em; }
.sub { color: var(--mut); font-size: 12.5px; margin-top: 3px; }

.chip { white-space: nowrap; font-size: 12px; font-weight: 800; padding: 6px 11px; border-radius: 999px; display: inline-flex; gap: 6px; align-items: center; border: 1px solid var(--line); background: rgba(255, 255, 255, .07); }
.chip i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; }
.chip.ok { color: var(--ok); } .chip.warn { color: var(--warn); } .chip.bad { color: var(--bad); }

.glass {
  position: relative; border-radius: 22px; padding: 16px; margin-bottom: 12px; border: 1px solid var(--line);
  background: linear-gradient(150deg, rgba(255, 255, 255, .11), rgba(255, 255, 255, .04));
  box-shadow: 0 12px 32px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .14);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.glass h2 { font-size: 12px; letter-spacing: .09em; text-transform: uppercase; color: var(--mut); margin: 0 0 12px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 12px; }
.glass p { margin: 0 0 8px; line-height: 1.45; } .glass p:last-child { margin-bottom: 0; }
.muted { color: var(--mut); font-size: 13px; }
.foot { text-align: center; color: var(--mut); font-size: 11px; margin: 14px 0 0; }

@media (prefers-reduced-motion: no-preference) {
  .chip i { animation: pulse 2.4s ease-in-out infinite; }
  @keyframes pulse { 50% { opacity: .45; } }
}

/* ---- Formulare, Anmeldung ---- */
a { color: inherit; }
.link { color: #a9b4ff; font-weight: 700; text-decoration: none; } .link:hover { text-decoration: underline; }
a.chip { text-decoration: none; color: var(--ink); }
.center { min-height: 78vh; display: flex; flex-direction: column; justify-content: center; text-align: center; }
.logo { width: 84px; height: 84px; margin: 0 auto 18px; border-radius: 26px; display: flex; align-items: center; justify-content: center; font-size: 42px;
  background: linear-gradient(145deg, #6c5ce7, #ff4fa3); box-shadow: 0 14px 34px rgba(255, 79, 163, .4), inset 0 1px 0 rgba(255, 255, 255, .4); }
.form { text-align: left; }
.form label { display: block; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--mut); margin: 14px 0 6px; }
.form input { width: 100%; font: inherit; font-size: 17px; color: var(--ink); padding: 14px 15px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255, 255, 255, .07); outline: none; }
.form input:focus { border-color: #8b7bff; box-shadow: 0 0 0 3px rgba(139, 123, 255, .35); }
.code-input { text-align: center; letter-spacing: .12em; font-size: 22px !important; font-variant-numeric: tabular-nums; }
.btn-big { display: block; width: 100%; margin-top: 18px; border: 0; font: inherit; font-weight: 900; font-size: 17px; color: #fff; padding: 16px; border-radius: 20px; cursor: pointer;
  background: linear-gradient(180deg, #8b7bff, #6c5ce7); box-shadow: 0 10px 26px rgba(108, 92, 231, .55), inset 0 1px 0 rgba(255, 255, 255, .4); }
.btn-ghost { display: block; width: 100%; margin-top: 10px; font: inherit; font-weight: 800; font-size: 14px; color: var(--ink); padding: 13px; border-radius: 18px; border: 1px solid var(--line); background: rgba(255, 255, 255, .06); text-align: center; text-decoration: none; cursor: pointer; }
.hint { color: var(--mut); font-size: 12px; margin: 16px 8px 8px; line-height: 1.45; text-wrap: balance; }
.error { text-align: left; margin: 0 0 14px; padding: 12px 14px; border-radius: 16px; font-weight: 700; font-size: 14px; color: #ffd9da; background: rgba(255, 90, 95, .16); border: 1px solid rgba(255, 90, 95, .5); }
.notice { text-align: left; margin: 0 0 12px; padding: 12px 14px; border-radius: 16px; font-size: 13.5px; line-height: 1.45; background: rgba(255, 176, 32, .13); border: 1px solid rgba(255, 176, 32, .45); color: #ffe2a8; }
.qr { background: #fff; width: 244px; margin: 12px auto; padding: 12px; border-radius: 18px; } .qr img { display: block; }
.secret { text-align: center; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; word-break: break-all; padding: 10px; border-radius: 12px; background: rgba(255, 255, 255, .07); }
.ctr { text-align: center; }
.codes { list-style: none; margin: 12px 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.codes li { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-weight: 800; font-size: 15px; text-align: center; padding: 11px 4px; border-radius: 12px; background: rgba(255, 255, 255, .08); border: 1px dashed var(--line); user-select: all; -webkit-user-select: all; }
.log { list-style: none; margin: 0; padding: 0; } .log li { display: flex; flex-direction: column; gap: 2px; padding: 9px 0; border-top: 1px solid rgba(255, 255, 255, .07); font-size: 14px; } .log li:first-child { border-top: 0; }
.log li.bad .lab { color: var(--warn); font-weight: 800; } .log .muted { font-size: 12px; }
code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .92em; background: rgba(255, 255, 255, .1); padding: 1px 6px; border-radius: 6px; }

/* ---- Übersicht: Tabs, Seiten-Zeilen, Verlaufsbalken ---- */
.tabs { display: flex; gap: 8px; margin: 2px 0 14px; overflow-x: auto; scrollbar-width: none; }
.tab { flex: none; font-weight: 800; font-size: 13.5px; padding: 8px 15px; border-radius: 999px; color: var(--ink); text-decoration: none; border: 1px solid var(--line); background: rgba(255, 255, 255, .05); position: relative; }
.tab.on { background: rgba(255, 255, 255, .12); }
.tab.on::after { content: ""; position: absolute; left: 16px; right: 16px; bottom: -1px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, #a855f7, #ff9a3c); box-shadow: 0 0 10px #a855f7; }
.glass h2 b { color: var(--ink); letter-spacing: 0; text-transform: none; font-size: 12px; }

.st-up { --c: var(--ok); } .st-slow { --c: var(--warn); } .st-down { --c: var(--bad); } .st-unknown { --c: var(--mut); }
.svc { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 12px 0 12px 12px; border-top: 1px solid rgba(255, 255, 255, .07); position: relative; }
.glass > .svc:first-of-type { border-top: 0; }
.svc::before { content: ""; position: absolute; left: -4px; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--c); box-shadow: 0 0 12px var(--c); }
.svc.head { border-top: 0; padding-top: 0; } .svc.head::before { top: 2px; }
.ico { width: 44px; height: 44px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 22px; background: linear-gradient(145deg, var(--a), var(--b)); box-shadow: 0 6px 14px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .35); }
.nm { font-weight: 800; font-size: 15px; } .dom { color: var(--mut); font-size: 11.5px; margin-top: 1px; overflow-wrap: anywhere; }
.st { text-align: right; } .st b { display: block; font-size: 12.5px; color: var(--c); } .st span { font-size: 11.5px; color: var(--mut); }
.bars { grid-column: 2 / 4; display: flex; gap: 2px; height: 14px; margin-top: -2px; }
.site > .bars { margin: 4px 0 10px; height: 18px; }
.bars i { flex: 1; border-radius: 2px; background: rgba(255, 255, 255, .12); }
.bars i.ok { background: var(--ok); opacity: .85; } .bars i.warn { background: var(--warn); } .bars i.bad { background: var(--bad); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0 14px; }
.stats > div { background: rgba(255, 255, 255, .06); border-radius: 14px; padding: 9px 10px; }
.stats dt { font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--mut); margin: 0 0 3px; }
.stats dd { margin: 0; font-weight: 900; font-size: 16px; }
.lab { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--mut); margin: 8px 0 4px; }
.svc .dom, .card-dom { white-space: nowrap; font-size: 12px; }
.svc > div:nth-child(2) { min-width: 0; }
.svc .st span { display: block; max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-left: auto; }

/* Server-Ansicht */
.rings { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 6px 0 12px; }
.ring { --c: var(--ok); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), rgba(255, 255, 255, .1) 0); filter: drop-shadow(0 0 8px color-mix(in srgb, var(--c) 45%, transparent)); }
.ring.lv-warn { --c: var(--warn); } .ring.lv-bad { --c: var(--bad); }
.ring .in { width: 76%; aspect-ratio: 1; border-radius: 50%; background: #131627; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring .in b { font-size: 20px; font-weight: 900; } .ring .in span { font-size: 10.5px; color: var(--mut); font-weight: 700; }
.rings.sm { max-width: 300px; margin-left: auto; margin-right: auto; }
.stats small { display: block; font-size: 11px; color: var(--mut); margin-top: 2px; }
.bars.hist { height: 40px; align-items: flex-end; }
.bars.hist i { height: var(--h, 8%); min-height: 3px; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0 10px 12px; border-top: 1px solid rgba(255, 255, 255, .07); position: relative; }
.row::before { content: ""; position: absolute; left: -4px; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--ok); box-shadow: 0 0 12px var(--ok); }
.row.lv-warn::before { background: var(--warn); box-shadow: 0 0 12px var(--warn); } .row.lv-bad::before { background: var(--bad); box-shadow: 0 0 12px var(--bad); }
.row .nm { font-weight: 800; } .row .dom { color: var(--mut); font-size: 12px; }
.row .st { text-align: right; } .row .st b { display: block; font-size: 13px; } .row .st span { color: var(--mut); font-size: 12px; }
.row.lv-ok .st b { color: var(--ok); } .row.lv-warn .st b { color: var(--warn); } .row.lv-bad .st b { color: var(--bad); }
.glass > .row:first-of-type { border-top: 0; }
code.cmd { display: inline-block; background: rgba(255, 255, 255, .08); border-radius: 8px; padding: 3px 8px; font-size: 12px; word-break: break-all; }
.warnbox { border-color: rgba(255, 176, 32, .5); }
.stats dd { white-space: nowrap; font-size: 15px; }

/* Als App (installiert): Tabs unten wie in einer richtigen App */
@media (display-mode: standalone) {
  .app { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; margin: 0; justify-content: space-around; gap: 6px; overflow: visible;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: rgba(14, 16, 28, .82); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); border-top: 1px solid var(--line); }
  .tab { flex: 1; text-align: center; padding: 10px 6px; }
  .tab.on::after { bottom: 2px; }
}
[hidden] { display: none !important; }
a.btn-big { text-align: center; text-decoration: none; }
.badge { display: inline-block; min-width: 18px; padding: 1px 6px; margin-left: 4px; border-radius: 999px; background: var(--bad); color: #fff; font-size: 11px; font-weight: 900; text-align: center; }
.tabs { gap: 6px; } .tab { padding: 8px 11px; font-size: 13px; }
@media (display-mode: standalone) { .tab { padding: 10px 4px; font-size: 12.5px; } }
.tabs { gap: 5px; } .tab { flex: 1 1 auto; text-align: center; padding: 8px 4px; font-size: 12.5px; white-space: nowrap; }
.tab .badge { margin-left: 2px; min-width: 16px; padding: 0 5px; }
