:root { --bg: #06203a; --panel: #0b2a48; --blau: #008ccd; --text: #e8f1f8; --mut: #9fb8cc; --ok: #55efc4; --warn: #ffe66d; --bad: #ff6b6b; }
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { display: flex; flex-direction: column; background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
.bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; padding-top: max(10px, env(safe-area-inset-top)); background: var(--panel); border-bottom: 1px solid rgba(255,255,255,.08); }
.logo { height: 34px; width: auto; }
.title { font-weight: 800; font-size: 17px; letter-spacing: .02em; }
.title span { color: var(--blau); }
.status { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--mut); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--mut); }
.status[data-state="live"] .dot { background: var(--ok); box-shadow: 0 0 0 4px rgba(85,239,196,.18); animation: pulse 1.4s ease-in-out infinite; }
.status[data-state="live"] { color: var(--ok); }
.status[data-state="wait"] .dot { background: var(--warn); }
.status[data-state="error"] .dot { background: var(--bad); }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }
.stage { position: relative; flex: 1; background: #000; display: flex; align-items: center; justify-content: center; overflow: hidden; }
video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(6,32,58,.85); padding: 20px; text-align: center; }
.overlay[hidden] { display: none; }
.overlay__box { max-width: 420px; }
.overlay__title { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.overlay__text { font-size: 14px; color: var(--mut); line-height: 1.5; margin-bottom: 18px; }
.foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; padding-bottom: max(10px, env(safe-area-inset-bottom)); background: var(--panel); border-top: 1px solid rgba(255,255,255,.08); font-size: 13px; color: var(--mut); flex-wrap: wrap; }
.sep { margin: 0 8px; opacity: .5; }
.actions { display: flex; gap: 8px; }
.btn { font: inherit; font-weight: 700; padding: 10px 16px; border-radius: 9px; border: none; background: var(--blau); color: #fff; cursor: pointer; text-decoration: none; display: inline-block; }
.btn--ghost { background: rgba(255,255,255,.08); color: var(--text); }
.btn--ghost:hover { background: rgba(255,255,255,.14); }
.btn[hidden] { display: none; }
/* Stream-Umschalter (nur sichtbar, wenn der Benutzer mehr als einen Stream hat) */
.streams { display: flex; gap: 3px; padding: 3px; border-radius: 9px; background: rgba(255,255,255,.06); }
.streams[hidden] { display: none; }
.streams button, .streams a { font: inherit; font-size: 13px; font-weight: 700; padding: 6px 12px; border: none; border-radius: 7px; background: transparent; color: var(--mut); cursor: pointer; text-decoration: none; }
.streams button:hover, .streams a:hover { color: var(--text); }
.streams button[aria-pressed="true"], .streams a[aria-pressed="true"] { background: var(--blau); color: #fff; }
.user { margin-left: 10px; opacity: .7; }
.user:empty { display: none; }
@media (max-width: 480px) { .bar { flex-wrap: wrap; } .streams { order: 3; width: 100%; } .streams button { flex: 1; } }
.streams button[data-online]::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 7px; border-radius: 50%; vertical-align: middle; background: var(--bad); }
.streams button[data-online="ok"]::after { background: var(--ok); }
.streams button[data-online="warn"]::after { background: var(--warn); }
/* Offline-Seite der Diagnose (diagnose-offline.html) */
.offline { flex-direction: column; padding: 24px; background: var(--bg); overflow: auto; }
.offline__box { width: 100%; max-width: 560px; }
.offline__title { font-size: 22px; font-weight: 800; margin: 0 0 8px; }
.offline__text { color: var(--mut); line-height: 1.5; margin: 0 0 18px; }
.checks { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.checks li { display: grid; grid-template-columns: 12px 1fr; column-gap: 10px; align-items: center; padding: 10px 12px; background: var(--panel); border: 1px solid rgba(255,255,255,.08); border-radius: 10px; }
.checks__name { font-weight: 700; }
.checks__info { grid-column: 2; font-size: 13px; color: var(--mut); }
.checks li[data-state="ok"] .dot { background: var(--ok); }
.checks li[data-state="bad"] .dot { background: var(--bad); box-shadow: 0 0 0 4px rgba(255,107,107,.15); }
.checks li[data-state="warn"] .dot { background: var(--warn); }
.offline__stand { font-size: 12px; color: var(--mut); margin: 0 0 16px; }
.offline__actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---- Anmeldeseite (login.html): Einsatz-Konsole mit Sonar-Radar ---- */
.login-body { position: relative; justify-content: center; align-items: center; padding: 24px; padding-top: max(24px, env(safe-area-inset-top)); overflow: hidden;
  background: radial-gradient(120% 90% at 50% 0%, #0a3358 0%, var(--bg) 55%, #041526 100%); }
/* Sonar-Wasserfall im Hintergrund (gezeichnet von login.js, SideScan-Optik) */
.sonar { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .55; pointer-events: none;
  mask-image: linear-gradient(180deg, #000 0%, #000 70%, rgba(0,0,0,.35) 100%); -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 70%, rgba(0,0,0,.35) 100%); }
.sonar__range { position: absolute; left: 0; right: 0; top: max(8px, env(safe-area-inset-top)); display: flex; justify-content: space-between; padding: 0 14px; pointer-events: none;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 11px; letter-spacing: .08em; color: rgba(159,184,204,.75); text-transform: uppercase; }
.sonar__range span { position: relative; padding-top: 10px; }
.sonar__range span::before { content: ""; position: absolute; top: 0; left: 50%; width: 1px; height: 7px; background: rgba(159,184,204,.6); }
.sonar__range span:first-child::before { left: 0; } .sonar__range span:last-child::before { left: auto; right: 0; }
.sonar__ping { position: absolute; left: 50%; top: calc(max(8px, env(safe-area-inset-top)) + 30px); width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; pointer-events: none;
  border: 2px solid rgba(85,239,196,.9); box-shadow: 0 0 10px rgba(85,239,196,.7); animation: ping 2.4s ease-out infinite; }
@keyframes ping { 0% { transform: scale(1); opacity: 1; } 100% { transform: scale(14); opacity: 0; } }
.sonar__tag { position: absolute; left: 14px; bottom: max(10px, env(safe-area-inset-bottom)); pointer-events: none;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 11px; letter-spacing: .08em; color: rgba(159,184,204,.6); text-transform: uppercase; }
@media (prefers-reduced-motion: reduce) { .sonar__ping { animation: none; opacity: .6; } }
/* Karte */
.login { position: relative; width: 100%; max-width: 460px; }
.login__card { background: rgba(11,42,72,.88); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid rgba(0,140,205,.35); border-radius: 18px; padding: 24px 26px 22px;
  box-shadow: 0 30px 70px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.03) inset; display: flex; flex-direction: column; }
.login__head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.login__logo { height: 52px; width: auto; }
.login__eyebrow { margin: 0 0 2px; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--blau); }
.login__title { margin: 0; font-size: 28px; line-height: 1.05; letter-spacing: -.01em; }
.login__title span { color: var(--blau); }
.login__status { display: inline-flex; align-items: center; gap: 7px; margin-top: 8px; font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ok); border: 1px solid rgba(85,239,196,.35); border-radius: 999px; padding: 4px 9px; background: rgba(85,239,196,.06); }
.login__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .35; } }
.login__tech { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 20px; }
.tech { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 10px; border-radius: 10px; background: rgba(0,0,0,.22); border: 1px solid rgba(255,255,255,.06); }
.tech__ico { width: 20px; height: 20px; color: var(--blau); flex-shrink: 0; }
.tech__label { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--mut); }
.tech__val { font-size: 12px; font-weight: 700; color: var(--text); white-space: nowrap; }
.login__label { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--mut); margin: 0 0 6px; }
.login__input { font: inherit; font-size: 16px; padding: 12px 14px; border-radius: 10px; border: 1px solid rgba(0,140,205,.25); background: rgba(0,0,0,.28); color: var(--text); margin-bottom: 14px; outline: none; letter-spacing: .02em; }
.login__input:focus { border-color: var(--blau); box-shadow: 0 0 0 3px rgba(0,140,205,.25), 0 0 18px rgba(0,140,205,.15); }
.login__btn { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 13px 16px; font-size: 16px; border-radius: 12px; margin-top: 2px; box-shadow: 0 10px 26px rgba(0,140,205,.35); }
.login__btn:hover { background: #1a9cd9; }
.login__btn:disabled { opacity: .6; cursor: wait; }
.login__btnico { width: 20px; height: 20px; }
.login__error { margin: 0 0 12px; padding: 9px 12px; border-radius: 9px; background: rgba(255,107,107,.10); border: 1px solid rgba(255,107,107,.35); color: var(--bad); font-size: 13px; font-weight: 700; }
.login__notice { margin: 0 0 12px; padding: 9px 12px; border-radius: 9px; background: rgba(85,239,196,.08); border: 1px solid rgba(85,239,196,.3); color: var(--ok); font-size: 13px; }
.login__foot { margin: 16px 0 0; text-align: center; color: var(--mut); font-size: 12px; line-height: 1.5; }
.actions a.btn { text-decoration: none; display: inline-block; }
@media (max-width: 480px) {
  .login-body { padding: 14px; }
  .login__card { padding: 20px 18px 18px; }
  .login__tech { grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
  .tech { padding: 8px 8px; }
  .tech__val { font-size: 11px; }
}
