/* UAVIS – Gestaltung
   Leitidee: Annunciator-Panel. Die Status-Kacheln sind die Signallampen der Flotte,
   alles andere bleibt ruhig und sachlich. Hell, Dunkel oder nach System. */
@font-face { font-family: 'Atkinson'; src: url('fonts/atkinson-hyperlegible-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Atkinson'; src: url('fonts/atkinson-hyperlegible-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Barlow C'; src: url('fonts/barlow-condensed-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Barlow C'; src: url('fonts/barlow-condensed-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
  --bg: #edf1f5; --surface: #ffffff; --surface2: #f5f7fa; --ink: #0f1a24; --ink2: #536170; --line: #d5dde5; --line2: #e6ebf0;
  --side: #0d1824; --side-ink: #c9d5e1; --side-ink2: #7f91a3; --side-akt: #1b2b3d;
  --akzent: #1f5fd6; --akzent-ink: #ffffff; --akzent-soft: #e6eefc; --link: #1a55c4; --focus: #2f6fed;
  --gruen: #12874a; --gruen-ink: #ffffff; --gruen-soft: #e2f4ea; --gruen-text: #0d6b3a;
  --gelb: #e6a10b; --gelb-ink: #1f1600; --gelb-soft: #fdf1d3; --gelb-text: #7a5300;
  --rot: #cf1f37; --rot-ink: #ffffff; --rot-soft: #fbe4e8; --rot-text: #b0182e;
  --grau: #6a7787; --grau-ink: #ffffff; --grau-soft: #e6eaef;
  --schatten: 0 1px 2px rgba(15, 26, 36, .05);
  --r-tile: 10px; --r-ctl: 10px; --r-karte: 14px;
  --body: 'Atkinson', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --cond: 'Barlow C', 'Arial Narrow', system-ui, sans-serif;
  --seite: 248px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="hell"]) {
    --bg: #0a121b; --surface: #111c27; --surface2: #172432; --ink: #e6edf4; --ink2: #93a3b4; --line: #233344; --line2: #1b2a39;
    --side: #070e15; --side-akt: #15243a;
    --akzent: #3d7bf0; --akzent-soft: #16294a; --link: #8db4ff; --focus: #7aa8ff;
    --gruen: #1c9a58; --gruen-soft: #10301f; --gruen-text: #6fd39b;
    --gelb: #eaa915; --gelb-soft: #36290a; --gelb-text: #f5c656;
    --rot: #db2b44; --rot-soft: #3a121a; --rot-text: #ff8b9b;
    --grau: #5b6878; --grau-soft: #1e2a37;
    --schatten: none; color-scheme: dark;
  }
}
:root[data-theme="dunkel"] {
  --bg: #0a121b; --surface: #111c27; --surface2: #172432; --ink: #e6edf4; --ink2: #93a3b4; --line: #233344; --line2: #1b2a39;
  --side: #070e15; --side-akt: #15243a;
  --akzent: #3d7bf0; --akzent-soft: #16294a; --link: #8db4ff; --focus: #7aa8ff;
  --gruen: #1c9a58; --gruen-soft: #10301f; --gruen-text: #6fd39b;
  --gelb: #eaa915; --gelb-soft: #36290a; --gelb-text: #f5c656;
  --rot: #db2b44; --rot-soft: #3a121a; --rot-text: #ff8b9b;
  --grau: #5b6878; --grau-soft: #1e2a37;
  --schatten: none; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.45 var(--body); min-height: 100vh; padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
a { color: var(--link); text-underline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink2); }
.small { font-size: 14px; }
h1, h2, h3 { line-height: 1.15; margin: 0; }
h1 { font: 700 30px/1.05 var(--cond); letter-spacing: .005em; }
h2 { font: 700 21px/1.15 var(--cond); letter-spacing: .01em; margin: 28px 0 10px; }
h3 { font-size: 16px; font-weight: 700; margin: 0 0 4px; }

/* ---------- Rahmen: Kopf (Handy) und Navigation ---------- */
.top { position: sticky; top: 0; z-index: 5; background: var(--side); color: #fff; padding: calc(10px + env(safe-area-inset-top)) 16px 10px; display: flex; align-items: center; gap: 12px; }
.top .titel { font: 700 20px/1 var(--cond); letter-spacing: .1em; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .titel span { font-weight: 600; letter-spacing: .02em; color: var(--side-ink2); margin-left: 8px; }
.top button { background: transparent; border: 1px solid rgba(255,255,255,.25); color: inherit; border-radius: 999px; padding: 6px 12px; font-size: 14px; cursor: pointer; }
.offline { background: var(--gelb); color: var(--gelb-ink); padding: 8px 16px; font-size: 14px; }
.nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 6; background: var(--surface); border-top: 1px solid var(--line); display: flex; padding-bottom: env(safe-area-inset-bottom); }
.nav a { flex: 1; position: relative; text-align: center; padding: 9px 2px 10px; text-decoration: none; color: var(--ink2); font-size: 12.5px; font-weight: 700; display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; }
.nav a svg { width: 24px; height: 24px; flex: none; }
.nav a[aria-current="page"] { color: var(--akzent); }
.nav a .badge { position: absolute; top: 4px; left: calc(50% + 6px); background: var(--rot); color: #fff; border-radius: 999px; font-size: 11px; padding: 0 5px; line-height: 16px; }
.nav .seitenkopf, .nav .seitenfuss { display: none; }
main { max-width: 1480px; margin: 0 auto; padding: 18px 16px 34px; }

/* ---------- Desktop: Seitenleiste und Spalten ---------- */
@media (min-width: 1000px) {
  body { padding: 0 0 0 var(--seite); }
  .top { display: none; }
  .offline { position: sticky; top: 0; z-index: 4; padding-left: 36px; }
  .nav { top: 0; right: auto; width: var(--seite); flex-direction: column; background: var(--side); border: 0; padding: 22px 14px 18px; gap: 2px; }
  .nav .seitenkopf { display: block; padding: 0 10px 22px; color: #fff; }
  .nav .seitenkopf b { display: block; font: 700 30px/1 var(--cond); letter-spacing: .12em; }
  .nav .seitenkopf span { display: block; font-size: 12.5px; color: var(--side-ink2); margin-top: 6px; line-height: 1.3; }
  .nav a { flex: none; flex-direction: row; gap: 12px; padding: 11px 12px; font-size: 15px; color: var(--side-ink); border-radius: 10px; text-align: left; }
  .nav a:hover { background: rgba(255,255,255,.05); color: #fff; }
  .nav a[aria-current="page"] { background: var(--side-akt); color: #fff; box-shadow: inset 3px 0 0 var(--akzent); }
  .nav a .badge { position: static; margin-left: auto; font-size: 12px; padding: 1px 7px; }
  .nav .seitenfuss { display: flex; flex-direction: column; gap: 6px; margin-top: auto; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.08); }
  .seitenfuss button { display: flex; align-items: center; gap: 10px; width: 100%; background: transparent; border: 0; color: var(--side-ink); text-align: left; padding: 9px 12px; border-radius: 10px; cursor: pointer; font-size: 14px; }
  .seitenfuss button:hover { background: rgba(255,255,255,.05); color: #fff; }
  .seitenfuss button svg { width: 20px; height: 20px; flex: none; opacity: .85; }
  .seitenfuss .wer { padding: 10px 12px 2px; font-size: 13px; color: var(--side-ink2); }
  .seitenfuss .wer b { display: block; color: #fff; font-size: 14.5px; }
  main { padding: 30px 40px 48px; }
  .spalten { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(340px, 1fr); gap: 32px; align-items: start; }
  .spalten.gleich { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .spalten > .spalte > h2:first-child, .spalten > .spalte > h1:first-child { margin-top: 0; }
  .spalte.klebt { position: sticky; top: 24px; }
  main .panel { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
  main .lampe { min-height: 134px; }
  dialog { width: min(620px, calc(100vw - 40px)); }
}
@media (min-width: 1600px) { .spalten { grid-template-columns: minmax(0, 1.8fr) minmax(400px, 1fr); } }

/* ---------- Seitenkopf mit Statusleiste ---------- */
.kopfzeile { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.kopfzeile .unter { color: var(--ink2); font-size: 14px; margin-top: 4px; }
.lage { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r-karte); background: var(--surface); overflow: hidden; margin-bottom: 16px; }
.lage div { padding: 10px 14px; border-left: 1px solid var(--line2); }
.lage div:first-child { border-left: 0; }
.lage b { display: flex; align-items: center; gap: 8px; font: 700 28px/1 var(--cond); }
.lage span { font-size: 13px; color: var(--ink2); }
.lage i { width: 10px; height: 10px; border-radius: 50%; background: var(--gruen); display: inline-block; }
.lage i.gelb { background: var(--gelb); } .lage i.rot { background: var(--rot); } .lage i.grau { background: var(--grau); }
@media (max-width: 480px) { .lage b { font-size: 24px; } .lage div { padding: 9px 10px; } .lage span { font-size: 12px; } }

/* ---------- Signallampen ---------- */
.panel { display: grid; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 8px; }
.lampe { display: block; text-decoration: none; border-radius: var(--r-tile); padding: 12px 12px 11px; min-height: 118px; position: relative; color: var(--gruen-ink); background: var(--gruen); border: 0; text-align: left; width: 100%; cursor: pointer; box-shadow: inset 0 1px 0 rgba(255,255,255,.18), inset 0 -4px 0 rgba(0,0,0,.16); transition: transform .12s ease; }
a.lampe:hover { transform: translateY(-1px); }
.lampe.gelb { background: var(--gelb); color: var(--gelb-ink); }
.lampe.rot { background: var(--rot); color: var(--rot-ink); }
.lampe.grau { background: var(--grau); color: var(--grau-ink); }
.lampe .kennung { font: 700 24px/1 var(--cond); letter-spacing: .02em; display: block; word-break: break-word; padding-right: 34px; }
.lampe .muster { font-size: 13.5px; opacity: .85; display: block; margin-top: 3px; }
.lampe .zustand { display: block; margin-top: 12px; font-weight: 700; font-size: 15px; }
.lampe .grund { display: block; font-size: 13.5px; opacity: .92; margin-top: 2px; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.lampe .std { position: absolute; top: 12px; right: 12px; font: 600 15px/1 var(--cond); opacity: .8; }
.lampe.gross { min-height: 0; padding: 18px; }
.lampe.gross .kennung { font-size: 36px; }
.lampe.gross .grund { -webkit-line-clamp: unset; }

/* ---------- Bausteine ---------- */
.aktionen { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 18px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 18px; border-radius: var(--r-ctl); border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 700; cursor: pointer; text-decoration: none; transition: background .12s, border-color .12s; }
.btn:hover { border-color: var(--ink2); }
.btn.primaer { background: var(--akzent); border-color: var(--akzent); color: var(--akzent-ink); }
.btn.primaer:hover { filter: brightness(1.08); }
.btn.gross { min-height: 56px; font-size: 18px; flex: 1 1 220px; }
.btn.gefahr { background: var(--rot-soft); border-color: transparent; color: var(--rot-text); }
.btn.klein { min-height: 36px; padding: 6px 12px; font-size: 14px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.karte { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-karte); padding: 16px 18px; margin-bottom: 12px; box-shadow: var(--schatten); }
.liste { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-karte); overflow: hidden; box-shadow: var(--schatten); }
.zeile { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-top: 1px solid var(--line2); text-decoration: none; color: inherit; }
.zeile:first-child { border-top: 0; }
a.zeile:hover { background: var(--surface2); }
.zeile .haupt { flex: 1; min-width: 0; }
.zeile .rechts { text-align: right; white-space: nowrap; }
.punkt { width: 12px; height: 12px; border-radius: 50%; flex: none; margin-top: 5px; background: var(--gruen); box-shadow: 0 0 0 3px var(--gruen-soft); }
.punkt.gelb { background: var(--gelb); box-shadow: 0 0 0 3px var(--gelb-soft); }
.punkt.rot { background: var(--rot); box-shadow: 0 0 0 3px var(--rot-soft); }
.punkt.grau { background: var(--grau); box-shadow: 0 0 0 3px var(--grau-soft); }
.tag { display: inline-block; font-size: 12.5px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--grau-soft); color: var(--ink2); margin: 2px 4px 2px 0; }
.tag.rot { background: var(--rot-soft); color: var(--rot-text); } .tag.gelb { background: var(--gelb-soft); color: var(--gelb-text); } .tag.gruen { background: var(--gruen-soft); color: var(--gruen-text); }
.hinweis { border-left: 4px solid var(--gelb); background: var(--gelb-soft); padding: 10px 12px; border-radius: 6px; margin: 10px 0; }
.hinweis.rot { border-color: var(--rot); background: var(--rot-soft); }
.hinweis.blau { border-color: var(--akzent); background: var(--akzent-soft); }
.leer { padding: 22px 16px; text-align: center; color: var(--ink2); }
.reiter { display: flex; gap: 4px; overflow-x: auto; margin: 0 -16px 14px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.reiter button { border: 0; background: transparent; padding: 10px 12px; font-weight: 700; color: var(--ink2); border-bottom: 3px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap; }
.reiter button[aria-selected="true"] { color: var(--ink); border-color: var(--akzent); }
@media (min-width: 1000px) { .reiter { margin: 0 0 14px; padding: 0; } }
.zahlen { display: flex; gap: 24px; flex-wrap: wrap; margin: 14px 0 0; }
.zahlen div b { display: block; font: 700 26px/1 var(--cond); }
.zahlen div span { font-size: 13.5px; color: var(--ink2); }

/* ---------- Formulare ---------- */
form .feld, .feld { margin-bottom: 14px; }
label.titel, .feld > label { display: block; font-weight: 700; margin-bottom: 5px; }
input[type=text], input[type=password], input[type=date], input[type=time], input[type=number], input[type=search], select, textarea { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--surface); transition: border-color .12s; }
input:hover, select:hover, textarea:hover { border-color: var(--ink2); }
textarea { min-height: 90px; resize: vertical; }
.reihe { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.reihe3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
@media (max-width: 420px) { .reihe3 { grid-template-columns: 1fr 1fr; } }
.segment { display: flex; border: 1px solid var(--line); border-radius: var(--r-ctl); overflow: hidden; background: var(--surface); }
.segment label { flex: 1; text-align: center; padding: 11px 8px; cursor: pointer; font-weight: 700; margin: 0; }
.segment label + label { border-left: 1px solid var(--line2); }
.segment input { position: absolute; opacity: 0; pointer-events: none; }
.segment label:has(input:checked) { background: var(--akzent); color: #fff; }
.segment label:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: -3px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; }
.chip span { display: inline-flex; align-items: center; gap: 7px; min-height: 42px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 700; cursor: pointer; }
.chip span i { width: 9px; height: 9px; border-radius: 50%; background: var(--gruen); }
.chip span i.gelb { background: var(--gelb); } .chip span i.rot { background: var(--rot); } .chip span i.grau { background: var(--grau); }
.chip input:checked + span { background: var(--akzent); color: #fff; border-color: var(--akzent); }
.chip input:disabled + span { opacity: .45; cursor: not-allowed; text-decoration: line-through; }
.chip input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.schalter { display: flex; align-items: center; gap: 10px; font-weight: 700; min-height: 44px; cursor: pointer; }
.schalter input { width: 22px; height: 22px; accent-color: var(--rot); }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-top: 1px solid var(--line2); cursor: pointer; }
.check input { width: 22px; height: 22px; flex: none; margin-top: 1px; accent-color: var(--akzent); }
.fehler { color: var(--rot-text); font-weight: 700; margin: 8px 0; }

/* ---------- Dialog ---------- */
dialog { border: 0; border-radius: 16px; padding: 0; width: min(560px, calc(100vw - 20px)); max-height: calc(100vh - 30px); background: var(--surface); color: var(--ink); box-shadow: 0 24px 70px rgba(0,0,0,.35); }
dialog::backdrop { background: rgba(6,12,20,.6); backdrop-filter: blur(2px); }
dialog .kopf { padding: 18px 20px 6px; display: flex; gap: 10px; align-items: flex-start; }
dialog .kopf h2 { margin: 0; flex: 1; }
dialog .inhalt { padding: 6px 20px 18px; overflow: auto; }
dialog .fuss { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 20px 16px; border-top: 1px solid var(--line2); flex-wrap: wrap; }
.unterschrift { border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 12px; background: var(--surface2); margin-top: 12px; }
.unterschrift p { margin: 0 0 8px; }

/* ---------- Anmeldung ---------- */
.login { max-width: 420px; margin: 9vh auto 0; padding: 0 16px 40px; }
.login .marke { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.login .marke img { width: 58px; height: 58px; border-radius: 13px; }
.wortmarke { font: 700 46px/0.95 var(--cond); letter-spacing: .08em; }
.voll { font-size: 14px; color: var(--ink2); letter-spacing: .01em; margin-top: 4px; }
body:has(> .login) { padding: 0; }
@media (min-width: 1000px) {
  body:has(> .login) { background: linear-gradient(90deg, var(--side) 0 42%, var(--bg) 42% 100%); }
  body:has(> .login) .login { margin: 0 0 0 calc(42% + 7vw); padding-top: 14vh; }
  body:has(> .login)::before { content: 'UAVIS'; position: fixed; left: 5vw; bottom: 8vh; font: 700 clamp(90px, 13vw, 220px)/0.8 var(--cond); letter-spacing: .06em; color: rgba(255,255,255,.06); pointer-events: none; }
}
.toast { position: fixed; left: 50%; bottom: calc(88px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 10px; font-weight: 700; z-index: 20; max-width: calc(100vw - 32px); }
@media (min-width: 1000px) { .toast { left: calc(50% + var(--seite) / 2); bottom: 28px; } }

/* ---------- Jahresvorgabe, Crew, QR ---------- */
.fortschritt { margin-top: 14px; }
.fortschritt .fz { display: flex; justify-content: space-between; gap: 10px; font-size: 14.5px; margin-bottom: 5px; }
.balken { position: relative; height: 10px; background: var(--grau-soft); border-radius: 999px; }
.balken i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: var(--gruen); }
.balken i.gelb { background: var(--gelb); } .balken i.rot { background: var(--rot); } .balken i.grau { background: var(--grau); }
.balken s { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: var(--ink); border-radius: 1px; }
.balken.klein { height: 7px; flex: 1; }
.mini { display: flex; align-items: center; gap: 10px; margin: 6px 0 2px; font-size: 13px; }
.mini > span { width: 46px; color: var(--ink2); }
.mini > b { width: 46px; text-align: right; font-size: 13.5px; }
.crewzeile { border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 10px; margin-bottom: 8px; background: var(--surface2); }
.crewzeile select { min-height: 44px; }
.crewzeile .segment label { padding: 9px 6px; }
.crewzeile .segment label:has(input:disabled) { opacity: .4; cursor: not-allowed; }
.crewzeile .reihe3 { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.crewzeile .reihe3 input { padding: 10px 8px; }
.crewzeile .reihe3 label { font-size: 14px; }
.qr { width: min(260px, 70vw); margin: 6px auto; background: #fff; padding: 4px; border-radius: 8px; }
.qr svg { display: block; width: 100%; height: auto; }

/* ---------- Lagebild (zweiter Bildschirm, Leitstand) ---------- */
body.lagebild { padding: 0; background: #070d14; color: #e6edf4; min-height: 100vh; --surface: #0f1a25; --surface2: #142231; --line: #213245; --line2: #1a2939; --ink: #e6edf4; --ink2: #8ea0b3; --grau-soft: #1c2938; --gruen-soft: #0f2c1c; --gelb-soft: #33270a; --rot-soft: #37111a; --gruen-text: #6fd39b; --gelb-text: #f5c656; --rot-text: #ff8b9b; color-scheme: dark; }
.lb { display: grid; grid-template-rows: auto 1fr; min-height: 100vh; padding: 22px 28px 26px; gap: 20px; }
.lb-kopf { display: flex; align-items: center; gap: 24px; }
.lb-kopf .marke { font: 700 34px/1 var(--cond); letter-spacing: .12em; }
.lb-kopf .ort { color: #8ea0b3; font-size: 16px; }
.lb-kopf .uhr { margin-left: auto; font: 700 44px/1 var(--cond); font-variant-numeric: tabular-nums; letter-spacing: .03em; }
.lb-kopf .stand { color: #8ea0b3; font-size: 13px; text-align: right; }
.lb-kopf button { background: transparent; border: 1px solid #2a3c51; color: #c9d5e1; border-radius: 999px; padding: 8px 14px; cursor: pointer; }
.lb-haupt { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(320px, 1fr); gap: 24px; align-items: start; }
.lb .panel { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.lb .lampe { min-height: 150px; padding: 16px; }
.lb .lampe .kennung { font-size: 32px; }
.lb .lampe .zustand { font-size: 18px; margin-top: 16px; }
.lb .lampe .grund { font-size: 15px; }
.lb h2 { margin: 0 0 10px; font-size: 20px; color: #c9d5e1; }
.lb .lage { background: #0f1a25; }
.lb .block { margin-bottom: 22px; }
@media (max-width: 900px) { .lb-haupt { grid-template-columns: 1fr; } .lb-kopf .uhr { font-size: 30px; } }

/* ---------- Druck (Freigabebescheinigung) ---------- */
.beleg { background: #fff; color: #000; max-width: 760px; margin: 0 auto; padding: 28px; border: 1px solid #999; }
.beleg h1 { font-size: 26px; }
.beleg table { width: 100%; border-collapse: collapse; margin: 14px 0; }
.beleg td, .beleg th { border: 1px solid #888; padding: 6px 8px; text-align: left; vertical-align: top; font-size: 14px; }
@media print { .top, .nav, .nodruck, .offline { display: none !important; } body { background: #fff; padding: 0 !important; } main { padding: 0; max-width: none; } .beleg { border: 0; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Kopfaktionen auf der Startseite */
.kopfaktionen { margin: 0; }
@media (max-width: 999px) { .kopfzeile .kopfaktionen { width: 100%; order: -1; } }
@media (min-width: 1000px) {
  .kopfaktionen .btn.gross { flex: none; min-height: 46px; font-size: 16px; }
  main:not(:has(.spalten)):not(:has(.panel)) { max-width: 1040px; margin-left: 0; }
  main:has(.spalten), main:has(.panel) { margin-left: 0; }
}
@media (min-width: 1000px) {
  body:has(> .login)::after { content: 'Flugbuch, Wartung und Freigabe für die UAV-Staffel – an einem Ort, auch ohne Internet.'; position: fixed; left: 5vw; top: 14vh; width: calc(42% - 10vw); font: 600 clamp(26px, 2.4vw, 38px)/1.15 var(--cond); color: #c9d5e1; letter-spacing: .01em; pointer-events: none; }
}
@media (min-width: 1000px) { main { max-width: 1760px; } }
@media (max-width: 600px) { .panel .lampe .std { display: none; } .panel .lampe .kennung { padding-right: 0; } }

/* Server und Sicherung */
.hinweis.gruen { border-color: var(--gruen); background: var(--gruen-soft); }
.rot-text { color: var(--rot-text); font-weight: 700; }
table.kv { width: 100%; border-collapse: collapse; margin: 6px 0 12px; font-size: 15px; }
table.kv th { text-align: left; font-weight: 400; color: var(--ink2); padding: 6px 8px 6px 0; width: 55%; }
table.kv td { padding: 6px 0; font-variant-numeric: tabular-nums; }
table.kv tr + tr th, table.kv tr + tr td { border-top: 1px solid var(--line2); }
#betrieb .zeile { flex-wrap: wrap; }
#betrieb .zeile .haupt { flex: 1 1 240px; min-width: 0; }
#betrieb .zeile .rechts { margin: 0; flex-wrap: wrap; justify-content: flex-end; display: flex; gap: 8px; }
@media (max-width: 600px) { #betrieb .zeile .rechts { flex: 1 1 100%; justify-content: flex-start; } }
.neustart { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; background: rgba(8, 16, 26, .82); color: #fff; text-align: center; padding: 20px; }
.neustart > div { max-width: 440px; }
.neustart .kreisel { width: 44px; height: 44px; margin: 0 auto 16px; border-radius: 50%; border: 4px solid rgba(255,255,255,.25); border-top-color: #fff; animation: dreh 1s linear infinite; }
@keyframes dreh { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .neustart .kreisel { animation-duration: 3s; } }

/* 0.6.0: Kopf mobil, Suche, Hilfe */
.tag.blau { background: var(--akzent-soft); color: var(--link); }
.top button.rund { width: 38px; height: 38px; padding: 0; display: grid; place-items: center; position: relative; flex: none; }
.top button.rund svg { width: 20px; height: 20px; }
.punktzahl { position: absolute; top: 4px; right: 4px; width: 9px; height: 9px; border-radius: 50%; background: var(--rot); border: 2px solid var(--side); }
@media (min-width: 1000px) {
  .nav .suchfeld { display: flex; align-items: center; gap: 10px; margin: 0 4px 16px; padding: 9px 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.04); color: var(--side-ink2); cursor: pointer; font-size: 14px; text-align: left; }
  .nav .suchfeld:hover { color: #fff; border-color: rgba(255,255,255,.25); }
  .nav .suchfeld svg { width: 18px; height: 18px; flex: none; }
  .nav .suchfeld span { flex: 1; }
  .nav .suchfeld kbd { font: 600 11.5px/1 var(--sans, inherit); border: 1px solid rgba(255,255,255,.2); border-radius: 5px; padding: 3px 5px; }
  .seitenfuss button .badge { margin-left: auto; background: var(--rot); color: #fff; border-radius: 999px; font-size: 12px; padding: 1px 7px; }
  .seitenfuss button[aria-current="page"] { background: var(--side-akt); color: #fff; }
}
.nav .suchfeld { display: none; }
@media (min-width: 1000px) { .nav .suchfeld { display: flex; } }
dialog.suche { width: min(680px, calc(100vw - 20px)); margin-top: 10vh; max-height: 75vh; display: flex; flex-direction: column; }
dialog.suche:not([open]) { display: none; }
.suchkopf { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.suchkopf svg { width: 22px; height: 22px; color: var(--ink2); flex: none; }
.suchkopf input { border: 0; outline: 0; font-size: 18px; padding: 8px 0; background: transparent; color: var(--ink); flex: 1; min-width: 0; box-shadow: none; }
.suchliste { overflow-y: auto; padding: 6px 0; }
.treffer { display: flex; gap: 12px; align-items: baseline; padding: 9px 16px; text-decoration: none; color: inherit; }
.treffer[aria-selected="true"], .treffer:hover { background: var(--akzent-soft); }
.treffer .typ { flex: none; width: 112px; font-size: 12px; font-weight: 700; color: var(--ink2); text-transform: uppercase; letter-spacing: .04em; }
.treffer .tt { display: flex; flex-direction: column; min-width: 0; }
.treffer .tt .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 600px) { .treffer { flex-direction: column; gap: 2px; } .treffer .typ { width: auto; } }
.reiter a { padding: 10px 12px; font-weight: 700; color: var(--ink2); border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none; }
.reiter a[aria-selected="true"] { color: var(--ink); border-color: var(--akzent); }
.hilfe-text { font-size: 16px; line-height: 1.55; }
.hilfe-text h2 { margin-top: 0; }
.hilfe-text ul, .hilfe-text ol { padding-left: 22px; } .hilfe-text li { margin: 4px 0; }
#hliste .zeile[aria-current="page"] { background: var(--akzent-soft); }
.release ul { padding-left: 20px; margin: 10px 0 0; } .release li { margin: 4px 0; } .release h2 { margin: 0 0 2px; }
.ueber .marke { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.ueber .marke img { width: 56px; height: 56px; border-radius: 12px; }
.ueber .wortmarke { font: 700 30px/1 var(--cond); letter-spacing: .12em; }
.ueber .voll { color: var(--ink2); font-size: 14px; margin-top: 4px; }
.neu-hinweis { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.neu-hinweis .btn { margin-left: auto; }
.kopf2 { display: flex; align-items: center; justify-content: space-between; gap: 10px; } .kopf2 h2 { margin-bottom: 8px; }
.bilder { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.bilder img { width: 140px; height: 100px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); display: block; }
.bilder .vb { position: relative; } .bilder .vb .btn { position: absolute; top: 4px; right: 4px; min-height: 28px; padding: 2px 8px; }
.karte.antwort.vonadmin { border-left: 4px solid var(--akzent); }
/* Prüfpunkte im Abzeichnen-Dialog */
.pp-kopf { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; } .pp-kopf h3 { margin: 0; }
.pp { padding: 10px 0; border-top: 1px solid var(--line2); }
.pp-text { margin-bottom: 8px; }
.pp-wahl label { padding: 8px 6px; font-size: 14px; }
.pp-wahl .pp-io:has(input:checked) { background: var(--gruen); }
.pp-wahl .pp-nio:has(input:checked) { background: var(--rot); }
.pp-wahl .pp-entf:has(input:checked) { background: var(--grau); }
.pp-bem { margin-top: 8px; }

/* Passkeys */
.passkey-btn { width: 100%; margin: 4px 0 2px; }
.passkey-btn svg, .zeile > svg { width: 20px; height: 20px; flex: none; }
.zeile > svg { margin-top: 2px; color: var(--ink2); }
.oder { display: flex; align-items: center; gap: 10px; color: var(--ink2); font-size: 13px; margin: 10px 0 6px; }
.oder::before, .oder::after { content: ''; flex: 1; border-top: 1px solid var(--line); }
