:root {
  /* Farben als Tokens (Plan K). Blau = Hauptaktion, Grün = in Ordnung, Orange = Aufmerksamkeit,
     Rot = sofort handeln. Für Text die dunkleren «-text»-Varianten (Kontrast WCAG AA). */
  --bg: #f8f9fa;
  --surface: #ffffff;
  --surface-2: #f1f3f5;
  --text: #1a1d1f;
  --text-2: #5f6873;
  --border: #e3e6ea;
  --border-strong: #c4cad1;
  --primary: #0066cc;
  --primary-hover: #0052a3;
  --primary-soft: #e6f0fa;
  --on-primary: #ffffff;
  --ok: #10b981;
  --ok-text: #047857;
  --ok-soft: #e6f6ef;
  --scan-bg: #dcf5e7;          /* 2.161 (200): QR-Knopf in der App, hellgrün */
  --scan-rand: #34a36b;
  --warn: #f59e0b;
  --warn-text: #a85a00;
  --warn-soft: #fdf3e1;
  --critical: #dc2626;
  --critical-text: #b91c1c;
  --critical-soft: #fdecec;
  --neutral: #98a2ad;
  --brand: #007a4d;
  /* Ältere Namen, die Seiten und Vorlagen noch brauchen */
  --paper: var(--bg);
  --ink: var(--text);
  --qr-grund: #ffffff;          /* 2.130 (183): QR-Codes immer schwarz auf weiss, auch im Dunkelmodus */
  --muted: var(--text-2);
  --line: var(--border);
  --green: var(--ok-text);
  --green-soft: var(--ok-soft);
  --amber: var(--warn-text);
  --amber-soft: var(--warn-soft);
  --red: var(--critical-text);
  --red-soft: var(--critical-soft);
  --blue: var(--primary);
  --blue-soft: var(--primary-soft);
  --grey-soft: var(--surface-2);
  --radius: 8px;
  --schleier: rgba(0, 0, 0, .25);       /* 2.157 (196): hinter dem Hilfe-Fenster */
  color-scheme: light dark;
  font-family: system-ui, -apple-system, "Segoe UI", "SF Pro Text", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
}

/* 2.170 (V177, Feedback 206): feste Grössen für Knöpfe und Kacheln. Nur diese Variablen verwenden (Test test_v177);
   neue Grössen oder ein Redesign nur mit Freigabe von Silas. Massstab: Optik von 2.168. */
:root {
  --knopf-h: 44px; --knopf-h-gross: 52px; --knopf-h-wahl: 64px; --knopf-h-stepper: 40px;
  --knopf-schrift-klein: 14px; --knopf-schrift-gross: 17px; --knopf-schrift-wahl: 18px; --knopf-schrift-stepper: 20px;
  --kachel-h: 120px; --kachel-h-zeile: 72px; --kachel-h-zahl: 84px; --kachel-h-leiste: 64px; --kachel-h-scan: 96px;
  --kachel-h-tablet: 34vh; --kachel-h-tablet-schmal: 160px;
  --kachel-schrift: 15px; --kachel-schrift-zeile: 14px; --kachel-schrift-scan: 18px; --kachel-schrift-tablet: 24px;
  --kachel-schrift-zahl: 28px; --kachel-schrift-zahl-klein: 15px; --kachel-schrift-zahl-text: 13px;
  --kachel-icon: 34px; --kachel-icon-zeile: 24px; --kachel-icon-leiste: 20px; --kachel-icon-scan: 32px; --kachel-icon-tablet: 64px;
}
/* Startleiste: am PC 64 px (2.171, Feedback 211, freigegeben Silas), in der App 60 px mit zwei Zeilen Titel */
html.app-modus { --kachel-h-leiste: 60px; }
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1214;
    --surface: #181c1f;
    --surface-2: #20262a;
    --text: #e8eaed;
    --text-2: #a3acb5;
    --border: #2d3439;
    --border-strong: #46505a;
    --primary: #5aa7ff;
    --primary-hover: #7ab8ff;
    --primary-soft: #14263a;
    --on-primary: #0b1220;
    --ok: #34d399;
    --ok-text: #34d399;
    --ok-soft: #10291f;
    --scan-bg: #123524;
    --scan-rand: #2f9e63;
    --warn: #fbbf24;
    --warn-text: #fbbf24;
    --warn-soft: #2e2410;
    --critical: #f87171;
    --critical-text: #f87171;
    --critical-soft: #331616;
    --neutral: #6b7580;
    --brand: #2bb07a;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-variant-numeric: tabular-nums; }
input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea {
  background-color: var(--surface); color: var(--text); }
a { color: var(--primary); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid var(--primary); outline-offset: 2px;
}
.kopf { background: var(--surface); border-bottom: 1px solid var(--line); }
.kopf-innen { margin: 0 auto; padding: 0 20px; display: flex; align-items: center; gap: 28px; height: 56px; }
.marke { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 17px; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.kreuz { width: 22px; height: 22px; background: var(--brand); border-radius: 3px; position: relative; }
.kreuz::before, .kreuz::after { content: ""; position: absolute; background: var(--surface); }
.kreuz::before { left: 9px; top: 4px; width: 4px; height: 14px; }
.kreuz::after { left: 4px; top: 9px; width: 14px; height: 4px; }
.nav { display: flex; gap: 18px; flex: 1; }
.nav a { color: var(--muted); text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a.aktiv, .nav a:hover { color: var(--ink); border-bottom-color: var(--primary); }
.abmelden { margin: 0; }
.link-knopf { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; padding: 0; }
main { margin: 0 auto; padding: 28px 20px 60px; }      /* 2.24 (054): keine feste Höchstbreite */
h1 { font-size: 26px; line-height: 1.2; margin: 0 0 4px; letter-spacing: -0.015em; font-weight: 650; }
h2 { font-size: 17px; margin: 32px 0 10px; font-weight: 650; }
.unter { color: var(--muted); margin: 0 0 20px; }
.nachricht { padding: 10px 14px; border-radius: var(--radius); margin-bottom: 16px; background: var(--blue-soft); }
.nachricht.success { background: var(--green-soft); }
.nachricht.error { background: var(--red-soft); }
.nachricht.warning { background: var(--amber-soft); }

/* Zustand: dicke Randleiste wie ein Sicherheitsschild */
.zustand { border-left: 6px solid var(--line); }
.zustand.ok { border-left-color: var(--green); }
.zustand.warn { border-left-color: var(--amber); }
.zustand.alarm { border-left-color: var(--red); }
.zustand.vorgang { border-left-color: var(--blue); }
.zustand.setup { border-left-color: var(--neutral); }
.zustand.aus { border-left-color: var(--border-strong); }
.satz { font-weight: 600; }
.satz.ok { color: var(--green); } .satz.warn { color: var(--amber); } .satz.alarm { color: var(--red); }
.satz.vorgang { color: var(--blue); } .satz.setup, .satz.aus { color: var(--muted); }

.liste { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.zeile { display: grid; grid-template-columns: minmax(180px, 1.3fr) minmax(150px, 1fr) minmax(170px, 1.2fr) 80px 130px;
  gap: 16px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.zeile:last-child { border-bottom: 0; }
.zeile:hover { background: var(--surface-2); }
.zeile .name { font-weight: 600; }
.klein { color: var(--muted); font-size: 13px; }
.zahl { font-variant-numeric: tabular-nums; }

.kopfkarte { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: flex-start; }
.kopfkarte .satz { font-size: 30px; line-height: 1.15; letter-spacing: -0.02em; margin: 6px 0 4px; }
.aktionen { display: flex; gap: 8px; flex-wrap: wrap; }
.aktionen form { margin: 0; }
button, .knopf { font: inherit; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); padding: 8px 14px; cursor: pointer; text-decoration: none; display: inline-block; }
button:hover, .knopf:hover { border-color: var(--muted); }
.haupt { background: var(--primary); border-color: var(--primary); color: var(--on-primary); font-weight: 600; }
.haupt:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.haupt:disabled { background: var(--border-strong); border-color: var(--border-strong); cursor: not-allowed; }
.gefahr { color: var(--red); }
.notfall { background: var(--red-soft); border: 1px solid var(--red); border-radius: var(--radius); padding: 14px 18px;
  margin-bottom: 16px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }

.raster { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; }
@media (max-width: 860px) {
  .raster { grid-template-columns: 1fr; }
  .zeile { grid-template-columns: 1fr 1fr; }
}
table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; color: var(--muted); font-size: 13px; background: var(--surface-2); }
tr:last-child td { border-bottom: 0; }
.marke-status { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 13px; background: var(--grey-soft); color: var(--muted); }
.marke-status.im_koffer, .marke-status.erledigt { background: var(--green-soft); color: var(--green); }
.marke-status.geoeffnet, .marke-status.entnommen, .marke-status.offen { background: var(--amber-soft); color: var(--amber); }
.marke-status.fehlgeschlagen, .marke-status.critical { background: var(--red-soft); color: var(--red); }
.marke-status.kunde { background: var(--green-soft); color: var(--green); }
.marke-status.bestand { background: var(--blue-soft); color: var(--blue); }
.marke-status.ausser_betrieb { background: var(--grey-soft); color: var(--muted); }
.hinweisliste { margin: 8px 0 0; padding-left: 20px; }
.hinweisliste li { margin: 2px 0; }

.verlauf { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.verlauf li { padding: 9px 14px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 96px 1fr; gap: 10px; }
.verlauf li:last-child { border-bottom: 0; }
.verlauf .zeit { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.verlauf .high, .verlauf .critical { font-weight: 600; }
.verlauf .critical { color: var(--red); }
.hinweis { color: var(--amber); font-size: 13px; }

.schritte { list-style: none; counter-reset: s; padding: 0; margin: 0 0 20px; display: grid; gap: 10px; }
.schritte li { counter-increment: s; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px 14px 56px; position: relative; }
.schritte li::before { content: counter(s); position: absolute; left: 16px; top: 13px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--grey-soft); display: grid; place-items: center; font-weight: 650; font-size: 14px; }
.schritte li.fertig::before { background: var(--green); color: var(--surface); }
.schritte li.jetzt { border-color: var(--green); }
.schritte li.jetzt::before { background: var(--ink); color: var(--surface); }
.pruefliste { margin: 8px 0 0; padding-left: 18px; }
.pruefliste li { margin: 3px 0; }
.blocker { color: var(--red); }
.warten { color: var(--muted); display: flex; gap: 8px; align-items: center; }
.punkt { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); animation: puls 1.2s ease-in-out infinite; }
@keyframes puls { 50% { opacity: 0.25; } }
@media (prefers-reduced-motion: reduce) { .punkt { animation: none; } }

.formular { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.formular label { font-size: 13px; color: var(--muted); }
.leer { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); padding: 24px; color: var(--muted); }
.anmeldung { max-width: 360px; margin: 80px auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.anmeldung label { display: grid; gap: 4px; margin-bottom: 14px; font-size: 13px; color: var(--muted); }
.anmeldung input { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius); }
.kasten { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.kasten details { margin-top: 8px; }
.kasten summary { cursor: pointer; }
.hinweis-kasten { background: var(--amber-soft); border-radius: var(--radius); padding: 10px 12px; margin: 10px 0; display: grid; gap: 8px; justify-items: start; }
.zeile-form { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.zeile-form select { font: inherit; padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--radius); }
.wahl { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 4px 0; }
.wahl button.gewaehlt { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.wahl .vorschlag { font-size: 12px; color: var(--muted); }
.neu-gepackt { background: var(--green-soft); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 16px;
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.karte { height: 320px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--grey-soft); z-index: 0; }

.filter { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-bottom: 14px; }
.filter label { display: grid; gap: 3px; font-size: 13px; color: var(--muted); }
.filter select, .filter input { font: inherit; padding: 6px 9px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.zahlen { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 18px; }
.zahlen a { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px;
  text-decoration: none; color: var(--ink); border-left-width: 6px; }
.zahlen a:hover { border-color: var(--muted); }
.zahlen .wert { font-size: 26px; font-weight: 650; font-variant-numeric: tabular-nums; line-height: 1.1; }
.zahlen .ok { border-left-color: var(--green); } .zahlen .warn { border-left-color: var(--amber); }
.zahlen .alarm { border-left-color: var(--red); } .zahlen .grau { border-left-color: var(--neutral); }
.bewegt { color: var(--blue); font-size: 13px; }
.auftrag { background: var(--blue-soft); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 8px; display: flex; gap: 12px; justify-content: space-between; flex-wrap: wrap; }
.auftrag.dringend { background: var(--red-soft); }
.bestellen textarea { font: inherit; width: 100%; min-height: 70px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius); }
.bestellen label { display: block; margin: 8px 0; }
.bericht { white-space: pre-wrap; font-family: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin: 0; }
.epc-feld { flex-basis: 100%; }
.epc-feld summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.epc-feld textarea { font: 13px/1.4 ui-monospace, "SF Mono", Consolas, monospace; width: 100%; max-width: 520px; padding: 7px 10px;
  border: 1px solid var(--line); border-radius: var(--radius); margin-top: 4px; }
/* Packstation und Material */
.lage { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }

.kennung { font: 13px/1.4 ui-monospace, "SF Mono", Consolas, monospace; }

.stueckliste { margin: 6px 0; }
.stueckliste td { padding: 5px 8px; }
.stueckliste tr.fehlt td { background: var(--red-soft); }
.rfid { font-size: 11px; color: var(--blue); border: 1px solid var(--primary-soft); border-radius: 4px; padding: 0 4px; }

.schnell-packen summary { cursor: pointer; color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.haken-label { display: flex !important; flex-direction: row; gap: 6px; align-items: center; }
button.gross { margin-top: 12px; }   /* 2.170 (206): Grösse und Schrift unten bei button.gross, .knopf.gross */
.schnell-packen { margin: 14px 0 6px; }

/* Handy: nichts darf seitlich über den Bildschirm hinausragen */
@media (max-width: 640px) {
  .kopf-innen { height: auto; flex-wrap: wrap; gap: 6px 16px; padding: 10px 16px; }
  .nav { order: 3; flex-basis: 100%; overflow-x: auto; white-space: nowrap; gap: 14px; padding-bottom: 2px; }
  .abmelden { margin-left: auto; }
  main { padding: 20px 16px 48px; }
  table { display: block; overflow-x: auto; }
  .stueckliste { display: table; }
  .stueckliste tr { display: grid; grid-template-columns: 2.4em 1fr; }
  .stueckliste td:nth-child(3) { grid-column: 2; padding-top: 0; }
  .kennung { word-break: break-all; }
  .zeile { grid-template-columns: 1fr; gap: 4px; }
}

/* Navigation nach Arbeitsbereichen */
.wer { white-space: nowrap; color: inherit; text-decoration: none; }
.unternav { border-top: 1px solid var(--line); background: var(--surface-2); }
.unternav-innen { margin: 0 auto; padding: 0 20px; display: flex; gap: 20px; overflow-x: auto; }
.unternav a { color: var(--muted); text-decoration: none; padding: 9px 0; font-size: 14px; border-bottom: 2px solid transparent; white-space: nowrap; }
.unternav a.aktiv, .unternav a:hover { color: var(--ink); border-bottom-color: var(--primary); }
/* 2.6: Shortcuts je Benutzer, eine Zeile unter dem Menü (bricht um statt seitlich zu scrollen) */
.shortcuts { border-top: 1px solid var(--line); background: var(--surface); }
.shortcuts-innen { margin: 0 auto; padding: 6px 20px; display: flex; flex-wrap: wrap; gap: 6px 8px; }
.shortcuts a { font-size: 13px; padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink);
               text-decoration: none; white-space: nowrap; }
.shortcuts a.aktiv, .shortcuts a:hover { border-color: var(--primary); color: var(--primary); }
.reiter { display: flex; gap: 18px; border-bottom: 1px solid var(--line); margin: 20px 0 4px; overflow-x: auto;
          scrollbar-width: none; max-width: 100%; }
.reiter::-webkit-scrollbar { display: none; }
.reiter a { color: var(--muted); text-decoration: none; padding: 8px 0; white-space: nowrap; flex: none; border-bottom: 2px solid transparent; }
.reiter a.aktiv { color: var(--ink); border-bottom-color: var(--green); font-weight: 600; }

.rollen-wahl { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.rollen-wahl label { display: flex !important; flex-direction: row; gap: 5px; align-items: center; color: var(--ink); font-size: 14px; }
@media (max-width: 640px) {
  .wer { display: none; }
  .unternav-innen { padding: 0 16px; }
}
.zeile.kompakt { grid-template-columns: 1fr auto; padding: 10px 14px; }
.verlauf-zeile { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 6px 0; border-bottom: 1px solid var(--line); }
.verlauf-zeile:last-child { border-bottom: 0; }

/* Tastatur-Leser */

#leser-hinweis { position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--surface); padding: 8px 14px; border-radius: var(--radius); font-size: 14px;
  transition: opacity .2s, transform .2s; z-index: 50; max-width: calc(100% - 32px); }
#leser-hinweis.sichtbar { opacity: 1; transform: translate(-50%, 0); }
#leser-hinweis.fehler { background: var(--red); }
.live-stand { position: fixed; right: 12px; bottom: 10px; font-size: 11.5px; color: var(--muted); background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; padding: 1px 8px; opacity: .85; z-index: 40; }
.live-stand.pause { color: var(--amber); }
@media print { .live-stand, #leser-hinweis { display: none; } }

/* Prüfung */
.pruefliste.gross { list-style: none; padding: 0; margin: 8px 0 16px; display: grid; gap: 4px; }
.pruefliste.gross li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.pruefliste.gross label { display: flex; gap: 10px; align-items: center; padding: 12px 14px; cursor: pointer; font-size: 16px; }
.pruefliste.gross input { width: 22px; height: 22px; }

tr.teil td { color: var(--muted); font-size: 13.5px; padding-top: 2px; padding-bottom: 2px; }
tr.teil td:first-child { padding-left: 18px; }

/* Zwei Spalten nebeneinander, auf schmalen Bildschirmen untereinander */
.spalten { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
@media (max-width: 760px) { .spalten { grid-template-columns: 1fr; } }

/* Lagerplan: die Fächer einer Fahrzeugseite als Raster, wie sie wirklich liegen */
.plan { display: grid; gap: 4px; margin: 10px 0 18px;
        grid-template-columns: repeat(var(--spalten), minmax(0, 1fr));
        grid-auto-rows: minmax(74px, auto); }
.fachkachel { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 8px 10px;
              border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
              text-decoration: none; color: inherit; overflow: hidden; }
.fachkachel:hover { border-color: var(--ink); }
.fachkachel.kiste { background: var(--warn-soft); }
.fachkachel.leer { background: repeating-linear-gradient(135deg, transparent, transparent 6px,
                   rgba(0,0,0,.035) 6px, rgba(0,0,0,.035) 12px); color: var(--muted); }
.fachnr { font-weight: 600; font-size: 15px; }
.fachtext { font-size: 12px; line-height: 1.35; color: var(--muted); overflow-wrap: anywhere; }
.unterfaecher { position: absolute; right: 6px; bottom: 6px; display: flex; gap: 4px; }
.unterfach { display: inline-block; min-width: 20px; padding: 1px 5px; text-align: center;
             border: 1px dashed var(--muted); border-radius: 4px; font-size: 11px; color: var(--muted); }
.legende { display: inline-block; width: 16px; height: 12px; border: 1px solid var(--muted);
           border-radius: 3px; vertical-align: -1px; background: var(--surface); }
.legende.kiste { background: var(--warn-soft); }
.legende.leer { background: repeating-linear-gradient(135deg, transparent, transparent 4px,
                rgba(0,0,0,.05) 4px, rgba(0,0,0,.05) 8px); }
.qr-fach { width: 120px; height: 120px; }

/* Ist-Bestand: Fachliste, Fach abhaken, Unterschrift */
.zustand.abweichung { border-left-color: var(--red); }
.zustand.faellig { border-left-color: var(--amber); }
.zustand.offen { border-left-color: var(--neutral); }

.fachliste { display: grid; gap: 4px; margin: 8px 0 20px; }
.fachzeile { display: grid; grid-template-columns: 46px 1fr auto; gap: 12px; align-items: center;
             padding: 12px 14px; background: var(--surface); border: 1px solid var(--line);
             border-left: 6px solid var(--line); border-radius: var(--radius);
             text-decoration: none; color: inherit; }
.fachzeile:hover { border-color: var(--ink); }
.fachzeile.ok { border-left-color: var(--green); }
.fachzeile.faellig { border-left-color: var(--amber); }
.fachzeile.abweichung { border-left-color: var(--red); }
.fachzeile.offen { border-left-color: var(--neutral); }
.fachzeile .fachnr { font-size: 19px; font-weight: 600; text-align: center; }
.fachname { font-weight: 600; }
.fachname .klein, .fachstatus .klein { display: block; font-weight: 400; }
.fachstatus { text-align: right; font-size: 13.5px; color: var(--muted); }
.fachzeile.abweichung .fachstatus { color: var(--red); }
.fachzeile.faellig .fachstatus { color: var(--amber); }
.fachzeile.ok .fachstatus { color: var(--green); }

.scanleiste { position: sticky; top: 0; z-index: 20; display: flex; gap: 10px; align-items: center;
              flex-wrap: wrap; padding: 10px 0; background: var(--paper); }
.scanleiste input { font: inherit; font-size: 16px; padding: 10px 12px; flex: 1 1 220px;
                    border: 1px solid var(--line); border-radius: var(--radius); }
#scanmeldung.ok { color: var(--green); }
#scanmeldung.warn { color: var(--amber); }

.abhaken { display: grid; gap: 6px; margin: 4px 0 18px; }
.posten { background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--line);
          border-radius: var(--radius); padding: 12px 14px; transition: background .4s; }
.posten.ok { border-left-color: var(--green); }
.posten.unter_soll { border-left-color: var(--amber); }
.posten.unter_minimum { border-left-color: var(--red); }
.posten.offen { border-left-color: var(--neutral); }
.posten.eben { background: var(--green-soft); }
.posten-kopf { display: flex; gap: 12px; justify-content: space-between; align-items: baseline; }
.posten-name { font-size: 16.5px; font-weight: 600; }
.posten-menge { text-align: right; white-space: nowrap; }
.posten-menge .ist { font-size: 22px; font-weight: 600; }
.posten-menge .klein { display: block; }

.fertigleiste { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 0 0 20px; }
.fertigleiste input[name=notiz] { font: inherit; flex: 1 1 200px; padding: 10px 12px;
                                  border: 1px solid var(--line); border-radius: var(--radius); }

.unterschrift-feld { display: grid; gap: 6px; justify-items: start; margin: 10px 0; }
.unterschrift-feld canvas { width: 100%; max-width: 420px; height: auto; touch-action: none; color: var(--text);
                            background: var(--surface); border: 1px dashed var(--line);
                            border-radius: var(--radius); }
.unterschrift-bild { width: 140px; height: 42px; fill: none; stroke: var(--ink); stroke-width: 3;
                     stroke-linecap: round; stroke-linejoin: round; }
.bericht { white-space: pre-wrap; margin: 0; font: inherit; font-size: 13px; color: var(--muted); }

@media (max-width: 620px) {
  .fachzeile { grid-template-columns: 40px 1fr; }
  .fachzeile .fachstatus { grid-column: 2; text-align: left; }

}
.fachzeile.unbelegt { border-left-style: dashed; color: var(--muted); }

/* ---------------------------------------------------------------- Scannen */
.scan-knopf { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; font-size: 14px;
              border-radius: 999px; border-color: var(--green); color: var(--green); background: var(--surface); }
.scan-knopf::before { content: ""; width: 14px; height: 14px; border: 2px solid currentColor; border-radius: 3px;
                      box-shadow: inset 0 0 0 2px var(--surface), inset 0 0 0 5px currentColor; }
.scan-knopf:hover { background: var(--green-soft); }
.scanner { position: fixed; inset: 0; z-index: 100; background: rgba(12, 18, 16, .94); color: #fff;
           display: none; flex-direction: column; padding: 14px 16px 20px; gap: 12px; }
.scanner.offen { display: flex; }
body.scanner-offen { overflow: hidden; }
.scanner-kopf { display: flex; justify-content: space-between; align-items: center; }
.scanner-zu { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.scanner-bild { position: relative; flex: 1; min-height: 0; border-radius: 12px; overflow: hidden; background: #000; }
.scanner-bild video { width: 100%; height: 100%; object-fit: cover; }
.scanner-rahmen { position: absolute; inset: 18% 14%; border: 3px solid rgba(255,255,255,.85); border-radius: 14px;
                  box-shadow: 0 0 0 999px rgba(0,0,0,.35); }
.scanner-meldung { margin: 0; font-size: 15px; text-align: center; }
.scanner-ios { margin: 0; font-size: 13px; text-align: center; opacity: .85; }   /* 2.130 (177) */
.scanner-ios .link-knopf { color: inherit; }
.scanner-hand { display: flex; gap: 8px; }
.scanner-hand input { flex: 1; font: inherit; font-size: 16px; padding: 10px 12px; border-radius: var(--radius);
                      border: 1px solid rgba(255,255,255,.3); background: rgba(255,255,255,.08); color: #fff; }
.scanner-hand input::placeholder { color: rgba(255,255,255,.6); }

/* ---------------------------------------------------------------- Anmelden und Gast */
.anmelde-seite { max-width: 420px; margin: 40px auto 0; display: grid; gap: 16px; }
.anmelde-seite .anmeldung { margin: 0; max-width: none; }
.anmelde-seite .urheber { text-align: center; color: var(--muted); margin: 8px 0 24px; }
.anmeldung button.gross { width: 100%; margin-top: 4px; }
.gast-hinweis { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); padding: 18px 22px; }
.gast-hinweis h2 { margin: 0 0 6px; font-size: 16px; }
.gast-hinweis p { margin: 0 0 10px; color: var(--muted); }
.gast-kopf { margin-bottom: 16px; }
.gast-kopf h1 { margin: 2px 0 6px; }
button.breit, .knopf.breit { width: 100%; box-sizing: border-box; display: block; text-align: center; }  /* 2.170 (206): zusammengeführt */
.suche { display: flex; gap: 10px; align-items: center; margin: 14px 0 4px; }
.suche input { flex: 1; font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid var(--line);
               border-radius: var(--radius); background: var(--surface); }
.blaettern { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; margin: 22px 0 0; }
.blaettern .knopf { text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.blaettern .knopf:last-child { justify-self: end; }
.wahl { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }
.wahl label { display: flex !important; gap: 8px; align-items: center; color: var(--ink) !important;
              font-size: 15px !important; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius); }
.wahl input { width: 18px; height: 18px; }
.melden { margin-top: 12px; }
.melden summary { padding: 4px 0; }
.melden .formular { border: 0; padding: 12px 0 0; }
.formular .haken { display: flex !important; gap: 8px; align-items: center; color: var(--ink); }

.gast-liste { display: grid; gap: 12px; margin-bottom: 8px; }
.gast-karte { display: grid; grid-template-columns: 120px 1fr; gap: 18px; align-items: start; }
.gast-karte h2 { margin: 0 0 4px; }
.gast-karte.ungueltig { opacity: .7; }
.gast-karte .qr-fach { width: 120px; height: 120px; }
.link-feld { width: 100%; font: inherit; font-size: 12.5px; padding: 6px 8px; margin: 8px 0 0; color: var(--muted);
             border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); }
@media (max-width: 560px) { .gast-karte { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- Plan mit Zustand */
.fachkachel.stand-ok { box-shadow: inset 0 -5px 0 var(--green); }
.fachkachel.stand-faellig { box-shadow: inset 0 -5px 0 var(--amber); }
.fachkachel.stand-abweichung { box-shadow: inset 0 -5px 0 var(--red); border-color: var(--red); }
.fachkachel.stand-offen { box-shadow: inset 0 -5px 0 var(--neutral); }
.unterfach.stand-ok { border-color: var(--green); color: var(--green); }
.unterfach.stand-abweichung { border-color: var(--red); color: var(--red); }
.legende.stand-ok { background: var(--green); border-color: var(--green); }
.legende.stand-faellig { background: var(--amber); border-color: var(--amber); }
.legende.stand-abweichung { background: var(--red); border-color: var(--red); }
.legende.stand-offen { background: var(--neutral); border-color: var(--neutral); }
.legende-zeile { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
.legende-zeile .legende { margin-right: 4px; }

/* ---------------------------------------------------------------- Handy */
@media (max-width: 640px) {
  /* Alle Bereiche sichtbar statt abgeschnitten: die Navigation bricht um */
  .nav { overflow: visible; flex-wrap: wrap; gap: 2px 16px; white-space: nowrap; }
  .nav a { padding: 5px 0; }
  .scan-knopf { margin-left: auto; }
  .scan-knopf + .wer + .abmelden, .scan-knopf + .abmelden { margin-left: 0; }
  .unternav-innen { flex-wrap: wrap; gap: 0 16px; overflow: visible; }
  /* Plan: auf dem schmalen Bildschirm zählen Nummer und Farbe, den Inhalt zeigt ein Tipp aufs Fach */
  .plan { grid-auto-rows: minmax(48px, auto); gap: 3px; }
  .fachkachel { padding: 6px 4px; align-items: center; justify-content: center; }
  .fachkachel .fachtext { display: none; }
  .fachkachel .fachnr { font-size: 16px; }
  .unterfaecher { position: static; justify-content: center; }
  .kopfkarte .satz { font-size: 24px; }
  h1 { font-size: 23px; }
  .live-stand { font-size: 10.5px; bottom: 6px; right: 6px; }
}
.fachzeile.einheitzeile { grid-template-columns: 1fr auto; }
.als-liste { margin: 18px 0; }
.als-liste > summary { cursor: pointer; font-weight: 600; padding: 8px 0; }
@media (max-width: 640px) {
  .kopf-innen { gap: 6px 10px; }
  .marke { font-size: 16px; gap: 8px; }
  .scan-knopf { padding: 5px 10px; }
  .fachzeile.einheitzeile { grid-template-columns: 1fr; }
  .fachzeile.einheitzeile .fachstatus { grid-column: 1; }
}
.filter-klappe { margin: 0 0 14px; }
.filter-klappe > summary { cursor: pointer; color: var(--muted); padding: 4px 0; }
.filter-klappe .filter { margin-top: 8px; }
.mehr { position: relative; }
.mehr > summary { list-style: none; cursor: pointer; }
.mehr > summary::-webkit-details-marker { display: none; }
.mehr > summary::after { content: " ▾"; font-size: 11px; }
.mehr-inhalt { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.satz-klein { font-size: 18px; font-weight: 600; margin-bottom: 4px; }
.zustand-text.ok { color: var(--green); } .zustand-text.abweichung { color: var(--red); }
.zustand-text.faellig { color: var(--amber); } .zustand-text.offen { color: var(--muted); }
.formular .haken input { min-width: 0; width: 18px; height: 18px; }
@media (max-width: 640px) {
  .zeile > .zahl:empty, .zeile > .klein:empty { display: none; }
}
input.feld { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 8px; width: 100%; max-width: 320px; }

/* ---------------------------------------------------------------- Logo und Organisationen */
.org-logo { max-height: 30px; max-width: 120px; object-fit: contain; }
@media (max-width: 640px) {
  .org-logo + .marke-text { display: none; }
  .org-logo { max-height: 28px; max-width: 110px; }
}

.org-logo-feld { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; }
.org-logo-feld img { max-height: 60px; max-width: 200px; object-fit: contain; background: #fff;
                     border: 1px solid var(--line); border-radius: var(--radius); padding: 6px; }
.org-logo-leer { width: 120px; height: 60px; display: grid; place-items: center; color: var(--muted); font-size: 13px;
                 border: 1px dashed var(--line); border-radius: var(--radius); }
.anlegen { margin-top: 20px; }
.anlegen > summary { cursor: pointer; }
.anlegen .formular { border: 0; padding: 12px 0 0; }

/* ---------------------------------------------------------------- Geführte Abläufe */
.durchgang { position: sticky; top: 0; z-index: 25; background: var(--paper); padding: 8px 0 10px; margin: -8px 0 10px; }

.balken { height: 6px; background: var(--grey-soft); border-radius: 3px; overflow: hidden; margin-top: 6px; }
.balken span { display: block; height: 100%; background: var(--green); }
.aufgaben-knoepfe { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.aufgaben-knoepfe form { margin: 0; }
.was-tun { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 14px 0 4px; }
.was-tun form { margin: 0; display: contents; }
.was-tun .knopf, .was-tun button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 12px 14px; text-align: left; font-weight: 600; min-height: var(--knopf-h-wahl); justify-content: center; }
.was-tun .klein { font-weight: 400; }
.was-tun .haupt .klein { color: var(--on-primary); opacity: .85; }
.aufzaehlung { margin: 6px 0 14px; padding-left: 18px; }
.feld-block { display: grid; gap: 4px; font-size: 13px; color: var(--muted); margin: 0 0 14px; }
.feld-block input { font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); }

.stepper { display: flex; align-items: center; gap: 4px; flex: none; }
.stepper button { width: var(--knopf-h-stepper); height: var(--knopf-h-stepper); padding: 0; font-size: var(--knopf-schrift-stepper); line-height: 1; }
.stepper input { width: 52px; height: 40px; text-align: center; font: inherit; font-size: 17px;
                 border: 1px solid var(--line); border-radius: var(--radius); }

.reparatur { margin-bottom: 10px; border-left: 6px solid var(--amber); }
.reparatur.alarm { border-left-color: var(--red); }
.reparatur .feld { max-width: none; flex: 1 1 200px; margin: 0; }
.aufgabe-zeile .satz { font-size: 14px; }
[hidden] { display: none !important; }
@media (max-width: 640px) {
  .zeile.kompakt:has(.zeile-form) { grid-template-columns: 1fr; }
  .zeile.kompakt .zeile-form { margin-top: 4px; }
}

/* Einkauf: Bestellvorschlag, Bestellung, Lieferant */

.menge-klein { width: 76px; font: inherit; font-size: 16px; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius); text-align: right; }

.notiz-feld, .breit-feld { display: grid; gap: 4px; font-size: 13px; color: var(--muted); margin: 10px 0; flex-basis: 100%; }
.notiz-feld textarea, .breit-feld textarea { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius); width: 100%; box-sizing: border-box; }

/* Versionen */
.fuss { margin: 0 auto; padding: 0 20px 28px; }
.fuss a { color: inherit; }
.versionen { margin-bottom: 18px; }
.versionen-kopf { display: flex; flex-wrap: wrap; gap: 10px 28px; }
.aenderungen { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 6px; }

/* Inventar */
.inventar-gruppe h2 { margin: 22px 0 8px; }
.zeile.inventar-zeile { grid-template-columns: minmax(0, 1fr) auto; padding: 10px 14px; }
.inventar-was { min-width: 0; overflow-wrap: anywhere; }
.inventar-menge { text-align: right; white-space: nowrap; }
.orte-klappe summary { cursor: pointer; }
.artikel-formular label { flex: 1 1 160px; }
.artikel-formular input, .artikel-formular select { width: 100%; box-sizing: border-box; }
@media (max-width: 640px) { .zeile.inventar-zeile { grid-template-columns: minmax(0, 1fr) auto; } }

/* Heute, Mehr */
.aufgaben-gruppe { margin-bottom: 22px; }
.aufgaben-gruppe h2 { margin: 18px 0 8px; }
.zeile.aufgabe-zeile, .aufgaben-gruppe .zeile.kompakt { grid-template-columns: minmax(0, 1fr) auto; min-height: 44px; }
.aufgabe-was { min-width: 0; overflow-wrap: anywhere; }
.aufgabe-datum { white-space: nowrap; text-align: right; }
.aufgabe-modul { display: block; color: var(--muted); font-size: 11px; }          /* 2.16 (040) */
.fuer-dich .aufgabe-modul { display: inline; }
/* 2.174 (V181, Feedback 214): Sammelzeile gleicher Aufgaben, aufklappbar */
.aufgabe-sammel > summary { cursor: pointer; list-style: none; }
.aufgabe-sammel > summary::-webkit-details-marker { display: none; }
.aufgabe-sammel > summary .name::before { content: "▸ "; color: var(--muted); }
.aufgabe-sammel[open] > summary .name::before { content: "▾ "; }
.aufgabe-sammel-inhalt { margin: 4px 0 8px 14px; }
.kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.kachel { display: grid; gap: 4px; align-content: start; min-height: var(--kachel-h-zeile); padding: 14px 16px; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink);
  text-decoration: none; font: inherit; cursor: pointer; width: 100%; box-sizing: border-box; }
.kachel:hover { border-color: var(--muted); }
.kachel-form { margin: 0; display: grid; }

/* Mannschaft: Name wählen */
.personen-wahl { display: grid; gap: 8px; margin-top: 10px; }
#zuletzt { display: grid; }
.person-knopf { display: grid; gap: 2px; text-align: left; min-height: 52px; padding: 10px 14px; font-size: 17px; width: 100%; }
.person-knopf.zuletzt { border-color: var(--green); background: var(--green-soft); }
.gast-person { white-space: nowrap; }

/* Kommando liest nur: Formulare zum Speichern fehlen (der Server lehnt sie ohnehin ab) */
body.nur-lesen form[method="post"]:not(.abmelden):not(.kachel-form),
body.nur-lesen details.anlegen { display: none !important; }

/* Prüfen */
.pruefpunkte { display: grid; gap: 8px; }
.kippschalter { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; min-height: 52px;
  padding: 8px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; }
.kippschalter input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.kipp-marke { width: 52px; height: 30px; border-radius: 15px; background: var(--grey-soft); border: 1px solid var(--line); position: relative; transition: background .15s; }
.kipp-marke::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: left .15s; }
.kippschalter input:checked ~ .kipp-marke { background: var(--green); border-color: var(--green); }
.kippschalter input:checked ~ .kipp-marke::after { left: 26px; }
.kippschalter input:focus-visible ~ .kipp-marke { outline: 2px solid var(--blue); outline-offset: 2px; }
.ergebnis-wahl { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 8px; }
.ergebnis-knopf { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 52px; font-weight: 600;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; }
.ergebnis-knopf:has(input:checked) { border-width: 2px; }
.ergebnis-knopf.bestanden:has(input:checked) { border-color: var(--green); background: var(--green-soft); }
.ergebnis-knopf.mangel:has(input:checked) { border-color: var(--amber); background: var(--amber-soft); }
.ergebnis-knopf.ausgesondert:has(input:checked) { border-color: var(--red); background: var(--red-soft); }
.mangel-feld { display: none; margin-top: 8px; }
.pruefen-form:has(input[value="mangel"]:checked) .mangel-feld { display: block; }
.feld-block { display: grid; gap: 4px; font-size: 13px; color: var(--muted); margin: 8px 0; }
.feld-block input { font: inherit; font-size: 16px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius); }
.anders input[type=date] { font: inherit; padding: 7px 9px; border: 1px solid var(--line); border-radius: var(--radius); margin-top: 6px; }
.punkt-knoepfe { display: flex; gap: 6px; margin: 0; }
.punkt-knoepfe button { min-width: var(--knopf-h); min-height: var(--knopf-h); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.chips select { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); min-height: 40px; max-width: 100%; }
.termin-gruppe > summary { cursor: pointer; list-style: none; }
.termin-gruppe > summary h2 { display: inline; }
.termin-gruppe { margin-bottom: 18px; }
.zeile.termin-zeile { grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
.termin-was { min-width: 0; overflow-wrap: anywhere; }
.termin-rechts { display: grid; gap: 6px; justify-items: end; text-align: right; }
.termin-datum { white-space: nowrap; }

.verfall-feld { width: 96px; font: inherit; font-size: 16px; padding: 7px 8px; border: 1px solid var(--line); border-radius: var(--radius); }

/* Fahrzeug zurück */
.rueckgabe { max-width: 560px; margin: 0 auto; }
.rueckgabe-kopf { margin: 0 0 6px; }
.rueckgabe .balken { margin-bottom: 14px; }
.schritt { display: grid; gap: 12px; margin-top: 12px; }
.anlass-wahl { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.anlass-wahl .ergebnis-knopf { min-height: 64px; font-size: 17px; }
.einsatz-wahl { display: none; gap: 6px; }
.schritt:has(input[name=anlass][value=einsatz]:checked) .einsatz-wahl,
.schritt:has(input[name=anlass][value=uebung]:checked) .einsatz-wahl { display: grid; }
.einsatz-eintrag { min-height: 44px; padding: 6px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.zahl-gross { font: inherit; font-size: 32px; font-weight: 600; text-align: center; padding: 12px; width: 100%; box-sizing: border-box;
  border: 1px solid var(--line); border-radius: var(--radius); font-variant-numeric: tabular-nums; }
.schaden-feld { display: none; }
.schaden-form:has(input[name=schaeden][value=ja]:checked) .schaden-feld { display: grid; gap: 8px; }
.checkpunkt { display: grid; gap: 6px; }
.checkpunkt .nein-notiz { display: none; max-width: none; margin: 0; }
.checkpunkt:has(input[type=checkbox]:not(:checked)) .nein-notiz { display: block; }
.checkpunkt .hilfe { display: block; }
.geraet { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 10px 12px; margin: 0; display: grid; gap: 8px; }
.geraet legend { padding: 0 4px; }
.geraet .frage { margin: 0; }
.geraet-fragen { display: none; gap: 8px; }
.geraet-fragen.immer, .geraet:has(input[name^="g_"][value=ja]:checked) .geraet-fragen { display: grid; }
.ueberspringen summary { cursor: pointer; padding: 10px 0; }

.soll-liste { margin: 0 0 6px; padding-left: 18px; }
.ergebnis-wahl.drei { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ergebnis-wahl.drei .ergebnis-knopf { font-size: 14px; padding: 0 4px; }
.fach-mengen { display: none; gap: 6px; }
.fach-form:has(input[name=ergebnis]:not([value=vollstaendig]):checked) .fach-mengen { display: grid; }
.menge-zeile { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; min-height: 44px;
  padding: 4px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.menge-zeile select { font: inherit; font-size: 16px; padding: 6px 8px; min-height: 40px; }
.zurueck-link { margin-top: 18px; }
.zusammenfassung .zeile.kompakt { grid-template-columns: minmax(0, 1fr) auto; }
.punkt-knoepfe .relevant-an { background: var(--red-soft); border-color: var(--red); color: var(--red); font-weight: 700; }

/* Kontrolle vereinfacht (1.6.0): ein Hauptknopf je Fach, Meldungen eine Ebene tiefer */
.aktionen-gross { display: grid; gap: 10px; margin: 14px 0; }
.aktionen-gross .gross, .aktionen-gross .knopf { width: 100%; text-align: center; margin: 0; }
.aktionen-gross .knopf .klein { display: block; }
.abbrechen-form { margin-top: 18px; }
.soll-liste { display: grid; gap: 6px; margin: 10px 0 14px; }
.posten.kompakt { padding: 8px 12px; }
.posten.kompakt .posten-name { font-size: 15.5px; }
.posten.kompakt .posten-menge .ist { font-size: 18px; }
.anders summary, .kasten > summary { cursor: pointer; }
.meldungen { display: grid; gap: 10px; margin-top: 8px; }
.meldung { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; margin: 0; min-width: 0; }
.meldung legend { font-weight: 600; padding: 0 4px; }
.meldewahl { display: flex; flex-wrap: wrap; gap: 6px; }
.meldewahl label { cursor: pointer; }
.meldewahl input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.meldewahl span { display: inline-block; padding: 7px 12px; border: 1px solid var(--line); border-radius: 16px;
                  font-size: 14px; background: var(--surface); }
.meldewahl input:checked + span { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.meldewahl input:focus-visible + span { outline: 2px solid var(--green); }
.meldung-felder { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.meldung-felder label, .meldung .verfall { display: grid; gap: 2px; font-size: 13px; color: var(--muted); }
.meldung-felder .text { flex: 1 1 180px; }
.meldung-felder input, .meldung .verfall input { font: inherit; padding: 7px 9px; border: 1px solid var(--line);
                                                 border-radius: var(--radius); min-width: 0; }
.stepper { display: inline-flex; }
.stepper input { width: 64px; text-align: center; border-radius: 0 !important; }
.stepper button { padding: 6px 12px; font-size: var(--knopf-schrift-gross); }
.stepper button:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.stepper button:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
/* Felder nur, wenn die Meldung sie braucht (ohne :has bleiben sie sichtbar) */
.meldung:not(:has(input[value=zu_wenig]:checked, input[value=zu_viel]:checked, input[value=gebraucht]:checked)) .anzahl { display: none; }
.meldung:not(:has(input[value=defekt]:checked, input[value=fehlt]:checked, input[value=zu_wenig]:checked, input[value=zu_viel]:checked, input[value=gebraucht]:checked)) .meldung-felder { display: none; }
.knopf.haupt .klein, button.haupt .klein { color: inherit; opacity: .85; }

/* Kleider (1.7.0): Filter brechen auf dem Handy um */
.suche.filter-zeile { flex-wrap: wrap; }
.suche.filter-zeile input[type=search] { flex: 1 1 100%; }
.suche.filter-zeile select { flex: 1 1 140px; min-width: 0; font: inherit; padding: 8px; }
.suche.filter-zeile .menge-klein { flex: 0 1 90px; min-width: 0; }

/* Eintritt und Austritt (1.9.0) */
.spind-wahl { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 6px; margin: 8px 0 14px; }
.spind-wahl button { min-height: var(--knopf-h); padding: 0; }
.meldung.schluessel { border-color: var(--amber); }

.ablauf-fuss { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 18px; }
.ablauf-fuss .abbrechen-form { margin: 0; }
.zeile-form { flex-wrap: wrap; }
.zeile-form select { max-width: 100%; min-width: 0; flex: 1 1 160px; }

/* Atemschutz (1.10.0) */
.timer { display: flex; flex-direction: column; align-items: center; margin: 12px 0; padding: 14px;
         border: 2px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.timer span:first-child { font-size: 72px; line-height: 1; font-weight: 700; font-variant-numeric: tabular-nums; }
.timer.fertig { border-color: var(--green); }
.timer.fertig span:first-child { color: var(--green); }
.gross-zahl { font-size: 28px !important; text-align: center; font-variant-numeric: tabular-nums; }
.as-zahlen { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0 14px; }
.as-zahlen .kasten { text-align: center; margin: 0; }
.as-zahlen strong { display: block; font-size: 28px; }

/* Heute: drei Kacheln (Plan K) */
.heute-kacheln { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0 18px; }
.heute-kacheln .kachel { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: var(--radius);
          background: var(--surface); border: 1px solid var(--border); border-top: 5px solid var(--neutral);
          color: var(--text); text-decoration: none; min-height: var(--kachel-h-zahl); }
.heute-kacheln .kachel strong { font-size: var(--kachel-schrift-zahl); line-height: 1.1; }
.heute-kacheln .kachel strong small { font-size: var(--kachel-schrift-zahl-klein); color: var(--text-2); font-weight: 500; }
.heute-kacheln .kachel span { font-size: var(--kachel-schrift-zahl-text); color: var(--text-2); }
.heute-kacheln .kachel.kritisch { border-top-color: var(--critical); }
.heute-kacheln .kachel.handlung { border-top-color: var(--warn); }
.heute-kacheln .kachel.bereit { border-top-color: var(--ok); }
.heute-kacheln .kachel.aktiv { outline: 2px solid var(--primary); }
.heute-kacheln .kachel:hover { background: var(--surface-2); }

/* Durchgangs-Komponente (Plan K): Kopf, Balken, erledigte Schritte eingeklappt */
.durchgang-k { margin: 0 0 12px; }
.durchgang-k-kopf { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.erledigt-schritte { margin: 6px 0 0; }
.erledigt-schritte summary { cursor: pointer; color: var(--ok-text); }
.erledigt-schritte ol { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 2px; }
.erledigt-schritte li { display: flex; gap: 8px; align-items: baseline; padding: 4px 8px; border-radius: var(--radius);
                        background: var(--ok-soft); color: var(--text-2); }
.erledigt-schritte .haken { color: var(--ok-text); font-weight: 700; }
.zurueck-link { display: inline-block; margin-top: 6px; }
.durchgang-k-fuss { display: flex; justify-content: space-between; gap: 10px; margin-top: 6px; }

/* Tabellen als Karten am Handy (Plan K) */
@media (max-width: 640px) {
  table.karten, table.karten tbody { display: block; border: 0; background: none; }
  table.karten .karten-kopf { display: none; }
  table.karten tr { display: block; background: var(--surface); border: 1px solid var(--border);
                    border-radius: var(--radius); margin: 0 0 8px; padding: 8px 12px; }
  table.karten td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 3px 0;
                    text-align: right; min-width: 0; overflow-wrap: anywhere; }
  table.karten td::before { content: attr(data-label); color: var(--text-2); font-size: 13px; text-align: left;
                            flex: 0 0 auto; }
  table.karten td:first-child { font-weight: 600; text-align: left; justify-content: flex-start; }
  table.karten td:first-child::before { content: none; }
  table.karten td:empty { display: none; }
  table.karten td.zahl { text-align: right; }
}

/* Rückfrage als Dialog (Plan K) */
dialog.rueckfrage { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
                    color: var(--text); padding: 18px; max-width: min(420px, calc(100vw - 32px)); }
dialog.rueckfrage::backdrop { background: rgba(0, 0, 0, .45); }
.rueckfrage-text { margin: 0 0 14px; font-size: 17px; }
.rueckfrage-knoepfe { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.rueckfrage-knoepfe button { min-height: var(--knopf-h); }

/* Spinde als Kacheln, eingeklappte Teile (Plan K) */
.spind-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; margin: 10px 0 18px; }
.spind-kachel { display: flex; flex-direction: column; padding: 6px 8px; min-height: 56px; border-radius: var(--radius);
                background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--neutral);
                color: var(--text); text-decoration: none; overflow: hidden; }
.spind-kachel strong { font-size: 18px; }
.spind-kachel span { font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spind-kachel.frei { border-left-color: var(--ok); }
.spind-kachel.raeumen { border-left-color: var(--warn); }
.versteckt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.qr-klappe summary { cursor: pointer; }

/* Icons (Plan K): eigene SVG-Symbole, Strich in der Textfarbe */
.ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round;
       stroke-linejoin: round; flex: none; vertical-align: -3px; }
.nav a { display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 700px) { .nav .ico { display: none; } }

/* Seitennavigation ab 1024 px (Plan K): die fünf Punkte links als Spalte, Inhalt höchstens 900 px */
@media (min-width: 1024px) {
  body { display: grid; grid-template-columns: 232px minmax(0, 1fr); grid-template-rows: 1fr auto;
                   min-height: 100vh; }
  body > .kopf { grid-row: 1 / span 2; position: sticky; top: 0; align-self: start; height: 100vh;
                           overflow-y: auto; border-bottom: 0; border-right: 1px solid var(--border); }
  body .kopf-innen { flex-direction: column; align-items: stretch; height: auto; gap: 14px; padding: 18px 14px; }
  body .nav { flex-direction: column; gap: 2px; flex: none; }
  body .nav a { padding: 9px 10px; border-bottom: 0; border-radius: var(--radius); }
  body .nav a.aktiv { background: var(--primary-soft); color: var(--primary); }
  body .nav a:hover { background: var(--surface-2); }
  body .scan-knopf { align-self: flex-start; }
  body .unternav { border-top: 1px solid var(--border); background: none; }
  body .unternav-innen { flex-direction: column; gap: 0; padding: 8px 14px; overflow: visible; }
  body .unternav-innen a { padding: 6px 10px; border-radius: var(--radius); }
  body .shortcuts { background: none; border-top: 1px solid var(--border); }
  body .shortcuts-innen { padding: 8px 14px; }
  body > main { max-width: none; width: 100%; min-width: 0; margin: 0; padding: 28px 32px 60px; }
  body > .fuss { grid-column: 2; max-width: none; margin: 0; padding: 0 32px 28px; }
}
.marke-art { display: inline-block; font-size: 12px; padding: 0 6px; border-radius: 10px; background: var(--surface-2);
              color: var(--text-2); vertical-align: 1px; }
.marke-art.einsatz { background: var(--critical-soft); color: var(--critical-text); }
.marke-art.uebung { background: var(--primary-soft); color: var(--primary); }

/* Einführung (Plan J) */
.teil-punkte { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0; }
.teil-punkt { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 10px; background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.teil-punkt.laeuft, .teil-punkt.offen { background: var(--warn-soft); color: var(--warn-text); }
.teil-punkt.erledigt { background: var(--ok-soft); color: var(--ok-text); }
.teil-punkt.gesperrt { color: var(--text-2); }
.zeile.gesperrt { opacity: .75; }
.mehrzeilig { white-space: pre-line; }
.qr-gross { width: 200px; max-width: 70vw; margin: 8px 0; }
.qr-gross svg { width: 100%; height: auto; display: block; }
.marke-stufe { display: inline-block; font-size: 12px; padding: 0 6px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); }
.marke-einfuehrung { display: inline-block; font-size: 12px; padding: 0 6px; border-radius: 10px; background: var(--ok-soft); color: var(--ok-text); }

/* Logo (Mönch im Feuer) */
.marke-logo { width: 34px; height: 34px; object-fit: contain; flex: none; }
.anmelde-logo { display: block; width: 160px; height: 160px; object-fit: contain; margin: 0 auto 8px; }

/* Orte als Baum (Plan N): am Handy nur ansehen, bearbeiten ab 1024 px */
.nur-pc { display: none !important; }
@media (min-width: 1024px) { .nur-pc { display: revert !important; } .nur-handy { display: none !important; } }
.ort-suche { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius);
             background: var(--surface); color: var(--text); margin: 8px 0 12px; min-height: 44px; }
.ort-baum { list-style: none; margin: 0; padding: 0 0 0 18px; }
.ort-baum.wurzel { padding-left: 0; }
.ort-knoten { margin: 2px 0; }
.ort-knoten > .ort-zeile, .ort-knoten > details > summary { display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 8px 10px; min-height: 44px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.ort-knoten > details > summary { cursor: pointer; list-style: none; }
.ort-knoten > details > summary::before { content: "▸"; color: var(--text-2); width: 12px; }
.ort-knoten > details[open] > summary::before { content: "▾"; }
.ort-name { font-weight: 600; color: var(--text); text-decoration: none; }
.ort-info { color: var(--text-2); }
.ort-knoepfe { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.ort-symbol { width: 10px; height: 10px; border-radius: 3px; background: var(--neutral); flex: none; }
.ort-symbol.depot { background: var(--brand); } .ort-symbol.raum { background: var(--primary); }
.ort-symbol.garderobe { background: var(--warn); } .ort-symbol.fahrzeug { background: var(--critical); }
.ort-ampel { width: 10px; height: 10px; border-radius: 50%; background: var(--neutral); }
.ort-ampel.ok { background: var(--ok); } .ort-ampel.faellig, .ort-ampel.offen { background: var(--warn); }
.ort-ampel.abweichung { background: var(--critical); }
.ort-knoten.zu-loesen > .ort-zeile, .ort-knoten.zu-loesen > details > summary { border-color: var(--warn); background: var(--warn-soft); }
.ort-knoten.ziel > .ort-zeile, .ort-knoten.ziel > details > summary { outline: 2px dashed var(--primary); }
.ort-knoten.wurzel-ziel { padding: 10px; border: 1px dashed var(--border-strong); border-radius: var(--radius); color: var(--text-2); }
.zeile.archiviert { opacity: .8; }
.spind-kachel.belegt { border-left-color: var(--critical); }

/* Startseite mit vier Kacheln (Plan Q) */
.los-kacheln { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0 18px; }
@media (min-width: 900px) { .los-kacheln { grid-template-columns: repeat(4, 1fr); } }
.los-kachel { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 10px; text-align: center;
  min-height: var(--kachel-h); padding: 14px 10px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border);
  color: var(--text); text-decoration: none; font-size: var(--kachel-schrift); }
button.los-kachel { font: inherit; font-size: var(--kachel-schrift); width: 100%; cursor: pointer; }   /* 2.30 (062): Scan-Kachel */
.los-kachel .ico { width: var(--kachel-icon); height: var(--kachel-icon); color: var(--primary); }
.los-kachel:hover, .los-kachel:focus-visible { border-color: var(--primary); }
.los-kacheln.leiste .los-kachel { min-height: var(--kachel-h-zeile); flex-direction: row; font-size: var(--kachel-schrift-zeile); }
.los-kacheln.leiste .los-kachel .ico { width: var(--kachel-icon-zeile); height: var(--kachel-icon-zeile); }

/* Plan S: Termine als Kalender (Monat am PC, Wochenliste am Handy) */
.umschalter { margin: 0 0 10px; }
.umschalter .aktiv { font-weight: 600; }
.kal-kopf { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kal-kopf h2 { margin: 0; }
.kal-legende { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.kal-punkt { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--neutral); flex: none; }
.kal-punkt.alarm { background: var(--critical); }
.kal-punkt.pruefung { background: var(--primary); }
.kal-punkt.fahrzeug { background: var(--warn); }
.kal-punkt.verfall { background: var(--brand); }
.kal-raster { display: none; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin: 10px 0 16px; }
.kal-wochentag { font-size: 13px; color: var(--muted); text-align: center; }
.kal-tag { min-height: 64px; border: 1px solid var(--line); border-radius: 8px; padding: 4px 6px; display: flex;
  flex-direction: column; gap: 4px; color: inherit; text-decoration: none; background: var(--surface); }
.kal-tag.aussen { opacity: .45; }
.kal-tag.heute { border-color: var(--primary); border-width: 2px; }
.kal-punkte { display: flex; flex-wrap: wrap; gap: 3px; align-items: center; }
.kal-liste .zeile { display: flex; gap: 10px; align-items: center; }
.kal-datum { font-weight: 600; margin: 10px 0 4px; }
.kal-datum.heute { color: var(--primary); }
.kal-abo { margin-top: 20px; }

@media (min-width: 700px) {
  .kal-raster { display: grid; }

}
.formular.auftrag-form { display: flex; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 12px; }
.auftrag-form fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; margin: 0; min-width: 0; }
.auftrag-form input:not([type=checkbox]):not([type=radio]), .auftrag-form select, .auftrag-form textarea { width: 100%; box-sizing: border-box; }
.auftrag-form .haken-label { color: var(--ink); font-size: 15px; }
.auftrag-form .haken-label input { min-width: 0; width: 18px; height: 18px; flex: none; }
.auftrag-form .anlass-wahl .ergebnis-knopf { min-height: 48px; font-size: 15px; display: flex; flex-direction: row; gap: 6px; align-items: center; }
.auftrag-form .anlass-wahl input { min-width: 0; width: auto; }

/* Plan T: eine Fahrzeugzeile überall */
.fahrzeug-zeile { display: flex; gap: 12px; align-items: center; }
.fahrzeug-zeile .fahrzeug-ico { width: 24px; height: 24px; flex: none; color: var(--muted); }
.fahrzeug-zeile .fahrzeug-was { flex: 1; min-width: 0; }
.fahrzeug-zeile .fahrzeug-rechts { text-align: right; flex: none; max-width: 45%; }
.ausser-betrieb-form { display: grid; gap: 6px; }
.durchgang-k-oben { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 6px; }
.abbrechen-oben { margin: 0; }
.abbrechen-oben button { background: none; border: 0; color: var(--muted); text-decoration: underline; padding: 6px 0; min-height: 0; cursor: pointer; }
/* Plan T: Inventar am Fahrzeug */
.inventar-fz-leiste { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.inventar-suche { flex: 1 1 200px; font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.umschalter-knoepfe { display: flex; gap: 6px; }
.fz-gruppe { border-bottom: 1px solid var(--line); }
.fz-gruppe > summary { padding: 10px 12px; cursor: pointer; display: flex; justify-content: space-between; gap: 8px; }
.inventar-zeile .zeile, .inventar-kind { display: flex; justify-content: space-between; gap: 10px; }
.inventar-unter { padding: 0 0 0 12px; }
.inventar-unter > summary { padding: 8px 12px; cursor: pointer; display: flex; gap: 8px; flex-wrap: wrap; }
.menge.unter_soll, .menge.unter_minimum { color: var(--critical-text); font-weight: 600; }
/* Plan T: Inventar als Baum der Orte */
.inv-knoten > summary, .inv-fach > summary { cursor: pointer; padding: 8px 0; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; }
.inv-knoten > summary .inv-name { font-weight: 600; }
.inv-inhalt { padding-left: 14px; border-left: 2px solid var(--line); margin-left: 4px; }
.inv-fach { margin: 0 0 4px; }
/* Plan U: Funktionen */
.funktion-zeile { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.funktion-zeile .funktion-name { flex: 1 1 160px; }
.funktion-zeile.aus { opacity: .6; }
.funktionen-wahl { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; }
/* Plan U: Fahrschule */

/* 2.0: Soll je Fach */
.soll-zeile { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.soll-zeile .soll-was { flex: 1 1 180px; min-width: 0; }
.soll-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0; }
.soll-form input, .soll-zeile input { width: 4em; }
/* 2.1: Fehlliste */
.fehl-zeile { display: flex; gap: 10px; align-items: flex-start; }
.fehl-zeile input[type=checkbox] { margin-top: 4px; }
.fehl-was { flex: 1; min-width: 0; }
.ort-fach summary { cursor: pointer; display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.ort-inhalt { margin: 6px 0 0 0; padding-left: 18px; }
/* 2.4: Einkleideliste, Ausweis */
.einkleide-zeile { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.einkleide-was { flex: 1 1 180px; min-width: 0; }
.kategorie-wahl { display: flex; flex-wrap: wrap; gap: 6px; }
.kategorie-wahl .ergebnis-knopf { min-width: 64px; justify-content: center; }
.plakat-qr svg { width: min(80vw, 360px); height: auto; display: block; margin: 12px auto; }

/* 2.7: Einsatz und Übung nie in derselben Liste: erst die Art wählen, dann nur Einträge dieser Art */
.anlass-form .einsatz-eintrag, .anlass-form .nur-mit-art { display: none !important; }
.anlass-form:has(.anlass-wahl input[value="einsatz"]:checked) .einsatz-eintrag[data-art="einsatz"],
.anlass-form:has(.anlass-wahl input[value="uebung"]:checked) .einsatz-eintrag[data-art="uebung"] { display: flex !important; }
.anlass-form:has(.anlass-wahl input[value="einsatz"]:checked) .nur-mit-art,
.anlass-form:has(.anlass-wahl input[value="uebung"]:checked) .nur-mit-art { display: block !important; }

/* 2.7: Stab-Dashboard */
.stab-kacheln { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 16px 0; }
@media (min-width: 700px) { .stab-kacheln { grid-template-columns: 1fr 1fr; } }
.stab-kachel { display: flex; flex-direction: column; gap: 6px; padding: 16px; border: 1px solid var(--border);
               border-radius: var(--radius); background: var(--surface); color: var(--text); text-decoration: none; }
.stab-kachel .ico { width: 28px; height: 28px; color: var(--primary); }
.stab-kachel strong { font-size: 18px; }
.stab-kachel span { font-size: 13px; color: var(--text-2); }
.stab-kachel:hover, .stab-kachel:focus-visible { border-color: var(--primary); }

/* 2.8: Arbeitsansicht der Fahrstunde: Handy untereinander, ab 768 px links Schüler, rechts Ablauf */
.fs-arbeit { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 768px) { .fs-arbeit { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); align-items: start; } }
.fs-schueler, .fs-ablauf { min-width: 0; }
.fs-kopf { display: flex; gap: 12px; align-items: center; }
.fs-kopf h1 { margin: 0; }
.fs-foto { width: 56px; height: 56px; border-radius: 50%; background: var(--surface-2); color: var(--text-2);
           display: flex; align-items: center; justify-content: center; font-weight: 600; flex: none; }
.fs-klappe { margin: 10px 0; }
.fs-klappe summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.fs-stand { display: flex; flex-wrap: wrap; gap: 6px; }
.fs-marke { font-size: 13px; padding: 3px 8px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); }
.fs-marke.gruen { background: var(--ok-soft); color: var(--ok-text); }
.fs-marke.gelb { background: var(--warn-soft); color: var(--warn-text); }
.fs-plan { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.fs-punkt { min-width: 34px; padding: 6px 8px; text-align: center; border: 1px solid var(--border); border-radius: 8px;
            text-decoration: none; color: var(--text); font-size: 14px; }
.fs-punkt.aktiv { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary) inset; }
.fs-punkt.gruen { background: var(--ok-soft); }
.fs-punkt.gelb { background: var(--warn-soft); }
.fs-knoepfe { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin: 12px 0; }
.fs-wert { min-height: 64px; font-size: 20px; border-radius: var(--radius); border: 2px solid var(--border);
           background: var(--surface); color: var(--text); cursor: pointer; }
.fs-wert.gruen { border-color: var(--ok); }
.fs-wert.gelb { border-color: var(--warn); }
.fs-wert.gewaehlt { background: var(--primary-soft); }
.fs-leiste { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 16px; }
.fs-leiste form { margin: 0; }
.fs-einschieben .zeile { width: 100%; text-align: left; background: var(--surface); border: 0; cursor: pointer; }
.jp-wahl { display: flex; flex-wrap: wrap; gap: 4px 12px; }

/* 2.8.1: Karte mit Pin, Abbruch wegen Einsatz */
.pin-karte { height: 260px; border-radius: var(--radius); border: 1px solid var(--border); margin: 10px 0; }
@media (min-width: 768px) { .pin-karte { height: 320px; } }
.fs-suche { width: 100%; margin: 6px 0; }
.fs-einsatz { margin: 18px 0 8px; }
.alarm-knopf { color: var(--critical-text); border-color: var(--critical); background: var(--critical-soft); }

/* 2.9: Fahrschule einheitlich: Kopf mit Rolle, Fortschrittsleiste, feste Knöpfe, Ampelliste */
.fs-seitenkopf { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.fs-seitenkopf h1 { margin-bottom: 2px; }
.fs-rolle { font-size: 13px; padding: 4px 10px; border-radius: 999px; white-space: nowrap; font-weight: 600; }
.fs-rolle.lehrer { background: var(--primary-soft); color: var(--primary); }
.fs-rolle.schueler { background: var(--warn-soft); color: var(--warn-text); }
.fs-leiste-fortschritt { height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; margin: 10px 0 4px; }
.fs-leiste-fortschritt span { display: block; height: 100%; background: var(--primary); }
.fs-manoever h2 { font-size: 26px; margin: 8px 0; }
.fs-reihe { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.fs-reihe form { margin: 0; }
.fs-wert { display: flex; align-items: center; justify-content: center; gap: 8px; }
.fs-wert:has(input:checked) { background: var(--primary-soft); border-width: 3px; }
.fs-feste-knoepfe { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 8px; margin: 14px 0; }
.fs-feste-knoepfe .knopf, .fs-feste-knoepfe button { text-align: center; }
.fs-punkt-farbe { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.fs-punkt-farbe.gruen { background: var(--ok); }
.fs-punkt-farbe.gelb { background: var(--warn); }
.fs-ampel .zeile { gap: 8px; }
.fs-zeit { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 4px 0; }
.fs-zeit form { margin: 0; }
.fs-abend { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; background: var(--surface); }
.fs-abend.ohne { border-left: 4px solid var(--critical); }
.fs-abend.buchbar { border-left: 4px solid var(--ok); }
.fs-abend.vorbei { opacity: .7; }
.fs-abend-kopf { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; align-items: center; }
.fs-abende { display: grid; gap: 10px; }
@media (min-width: 1000px) { .fs-abende { grid-template-columns: 1fr 1fr; } }
.chips .chip { padding: 6px 12px; border: 1px solid var(--line); border-radius: 18px; text-decoration: none; color: var(--ink);
               background: var(--surface); }
.chips .chip.aktiv { border-color: var(--primary); color: var(--primary); font-weight: 600; }
.mwd-buchen select { max-width: 160px; font-size: 13px; }
.fs-block { margin: 18px 0; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.fs-start { display: grid; gap: 8px; margin: 12px 0; }
.fs-zwei { display: grid; gap: 12px; }
@media (min-width: 768px) { .fs-zwei { grid-template-columns: 1fr 1fr; align-items: stretch; } }
.fs-zurueck { display: flex; flex-direction: column; justify-content: space-between; }

/* 2.10: Datei einer Weisung im Browser */
.weisung-datei iframe { width: 100%; height: 70vh; border: 1px solid var(--border); border-radius: var(--radius); }
.weisung-datei img { max-width: 100%; height: auto; border-radius: var(--radius); }
/* 2.61 (093): jedes Dokument als grosse, gut antippbare Kachel */
.weisung-kachel { display: flex; align-items: center; gap: 12px; padding: 16px; margin: 8px 0; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--surface); color: inherit; text-decoration: none; min-height: 64px; }
.weisung-kachel .ico { width: 28px; height: 28px; flex: none; }
.weisung-kachel strong { display: block; word-break: break-word; }
.weisung-kachel .klein { display: block; }
.punkt-datei { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 6px; }

/* ===================================================================== 2.10.1 (V13): Layout-Durchgang
   Eine Stelle für Felder, Knöpfe, Kacheln, Tabellen und Dialoge. Ältere Einzelregeln oben bleiben, diese gehen
   vor, weil sie später stehen. */

/* Knöpfe: drei Grössen, immer mindestens 44 px hoch, Text mittig, in Gruppen gleich hoch */
button, .knopf, input[type=submit] { min-height: var(--knopf-h); display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; padding: 8px 16px; line-height: 1.25; text-align: center; }
button.klein, .knopf.klein { padding: 6px 12px; font-size: var(--knopf-schrift-klein); }
button.gross, .knopf.gross { min-height: var(--knopf-h-gross); font-size: var(--knopf-schrift-gross); padding: 12px 22px; }
.knopf .klein, button .klein { line-height: 1.2; }
.aktionen, .aktionen-gross, .fs-leiste, .fs-reihe { align-items: stretch; }
.aktionen > form, .fs-reihe > form, .fs-leiste > form { display: flex; }
.aktionen > form > button, .fs-reihe > form > button, .fs-leiste > form > button { flex: 1; }
.link-knopf { min-height: 0; padding: 0; display: inline; }
.kopf .scan-knopf, .kopf .link-knopf, .nav a { min-height: 0; }
.aktionen-gross .knopf, .aktionen-gross button { flex-direction: column; }

/* Formulare (2.24, Feedback 054): volle Breite; Handy eine Spalte, ab 1024 px höchstens zwei Felder nebeneinander */
.formular { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: start; }
.formular > label, .formular > fieldset, .formular > div, .formular > details { min-width: 0; }
.formular label:not(.haken-label):not(.ergebnis-knopf):not(.fs-wert) { display: grid; gap: 4px; }
.formular input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]):not(.menge-klein),
.formular select, .formular textarea, .feld-block input, .feld-block select {
  width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; font: inherit; padding: 9px 11px;
  border: 1px solid var(--line); border-radius: var(--radius); min-height: 44px; }
.formular textarea { min-height: 88px; }
.menge-klein, .formular .menge-klein { width: 9ch; min-width: 9ch; min-height: 44px; }
.formular > button, .formular > a.knopf, .formular > .aktionen { justify-self: start; }
.formular > button.breit, .formular > button.gross.breit { justify-self: stretch; }
.formular .haken-label { display: flex !important; gap: 8px; align-items: center; color: var(--ink); }
.formular .haken-label input { width: 20px; height: 20px; min-height: 0; flex: none; }
main > .formular, main > form.formular { margin-inline: auto; }
@media (min-width: 768px) {
  .formular .feld-reihe, .formular .feld-reihe.zwei { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
                                                      gap: 12px 20px; }
}
@media (min-width: 1024px) {
  .formular { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; }
  /* über beide Spalten: Gruppen, Mehrfeld-Zeilen, Textfelder, Haken, Knöpfe, Überschriften, Hinweise */
  .formular > fieldset, .formular > div, .formular > details, .formular > section, .formular > p,
  .formular > h2, .formular > h3, .formular > button, .formular > a.knopf, .formular > .aktionen,
  .formular > .haken-label, .formular > .breit-feld, .formular > label:has(textarea),
  .formular > .unterschrift-feld, .formular > input[type=search] { grid-column: 1 / -1; }
}
/* Feldbreiten nach Art: kurze Werte schmal, Text und Auswahl füllen ihr Feld */
.formular input[type=date], .formular input[type=time], .formular input[type=month],
.formular input[type=datetime-local] { width: 100%; max-width: 220px; }
.formular input[type=number], .formular input[inputmode=numeric]:not(.zahl-gross),
.formular input[inputmode=decimal] { width: 100%; max-width: 160px; }
main p, main .hinweis-kasten { max-width: 95ch; }              /* Fliesstext bleibt lesbar */
/* Formulare in Zeilen (Filter, Zeilenaktionen) bleiben einzeilig, aber mit lesbaren Feldern */
.zeile-form, .inline-form, .chips { align-items: center; }
.zeile-form select, .zeile-form input:not([type=hidden]):not(.menge-klein), .chips select, .chips input[type=search],
.chips input[type=date], .suche input[type=search] { min-width: 200px; flex: 1 1 200px; min-height: 44px; }
.suche { display: flex; gap: 8px; flex-wrap: wrap; }

/* Kacheln und Karten: gleich hoch in einer Reihe, Raster mit Mindestbreite */
.kacheln { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); grid-auto-rows: 1fr; }
.los-kacheln, .stab-kacheln { grid-auto-rows: 1fr; }
.kachel, .los-kachel, .stab-kachel { height: 100%; }

/* Tabellen: Spalten nach Inhalt, Kopf nie schmaler als sein Text; am Handy seitlich scrollbar im Kasten */
th { white-space: nowrap; }
@media (max-width: 640px) {
  table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* Dialoge zentriert, höchstens 480 px */
dialog { max-width: min(480px, calc(100vw - 32px)); margin: auto; border: 1px solid var(--line); border-radius: var(--radius); }
dialog .aktionen { justify-content: flex-end; }

/* Geführte Abläufe: Hauptknopf unten, am Handy volle Breite, am PC rechts */
@media (min-width: 768px) {
  form.schritt > .haupt.gross.breit { width: auto; min-width: 240px; margin-left: auto; display: flex; }
}

/* Kopf zwischen Handy und Seitennavigation (641–1023 px): Navigation in eigener Zeile, bricht um */
@media (min-width: 641px) and (max-width: 1023px) {
  .kopf-innen { height: auto; flex-wrap: wrap; gap: 6px 16px; padding: 10px 20px; }
  .nav { order: 3; flex-basis: 100%; flex-wrap: wrap; gap: 2px 18px; }
  .scan-knopf { margin-left: auto; }
}

/* Am PC: Auswahl-, Text- und Datumsfelder mindestens 200 px, Mengenfelder bleiben schmal */
@media (min-width: 1024px) {
  main select, main input[type=text], main input[type=date], main input[type=search], main input[type=email],
  main input[type=tel], main input[type=password], main input[type=month], main input:not([type]):not([inputmode=numeric]):not(.menge-klein) { min-width: 200px; }
  .soll-zeile input:not([inputmode=numeric]) { flex: 1 1 200px; width: auto; }
}
input[inputmode=numeric] { min-height: 44px; }

/* 2.12 (Feedback 026): Stabsaufgaben-Zeile mit Link und Knöpfen */
.einfuehrung-zeile { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; align-items: center; }
.einfuehrung-zeile > a { color: inherit; text-decoration: none; min-width: 0; }
.zeilen-knoepfe { margin: 0; flex-wrap: wrap; justify-content: flex-end; }
.zeilen-knoepfe form { margin: 0; }
@media (max-width: 640px) { .einfuehrung-zeile { grid-template-columns: minmax(0, 1fr); } .zeilen-knoepfe { justify-content: flex-start; } }

.qr-gross { max-width: 240px; aspect-ratio: 1; }
.qr-gross svg { width: 100%; height: 100%; }

/* 2.14 (V18): Terminplan, eine Zeile je Abend; am Handy eine Karte */
.fs-plan { display: grid; gap: 8px; }
.fs-plan-zeile { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px 14px; padding: 10px 12px; align-items: center;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.fs-plan-zeile.gesucht { border-left: 4px solid var(--warn); }
.fs-plan-zeile.eigener { border-left: 4px solid var(--primary); }
.fs-plan-zeile.abgesagt { opacity: .6; }
.fs-plan-lehrer, .fs-plan-zeit { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.fs-plan-lehrer form, .fs-plan-zeit form { margin: 0; }
.fs-gesucht { color: var(--warn-text); font-weight: 600; }
/* 2.107 (Feedback 153): Ansicht «Alle Manöver», Speichern im Hintergrund */
.fs-ansicht { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 4px 0 10px; }
.fs-ansicht .knopf.gewaehlt { background: var(--primary-soft); border-color: var(--primary); font-weight: 600; }
.fs-alle-manoever { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  padding: 10px 12px; margin-bottom: 10px; }
.fs-alle-manoever h3 { margin: 0 0 2px; display: flex; align-items: center; gap: 8px; }
.fs-alle-manoever .fs-wert { min-height: 52px; font-size: 18px; }
.sofort-status { min-height: 1.2em; margin-top: 4px; }
.sofort-status.ok { color: var(--ok-text); }
.sofort-status.fehler { color: var(--critical-text); font-weight: 600; }
/* 2.106 (Feedback 147): Seite eines Abends */
.fs-abend-lehrer .name { font-size: 18px; font-weight: 600; margin: 2px 0 6px; }
.fs-abend-lehrer .aktionen, .fs-abend-zeit .aktionen { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.fs-abend-lehrer form, .fs-abend-zeit form { margin: 0; }
.fs-plan-bearbeiten { grid-column: 1 / -1; }
@media (min-width: 768px) {
  .fs-plan-zeile { grid-template-columns: 9.5em minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr); }
}

/* 2.15 (V19): Reiter des Moduls oben im Inhalt, über dem Titel (wie die Fahrschul-Reiter) */
.modul-reiter { margin: 0 0 16px; }
/* 2.16 (033): Modul-Reiter brechen um statt seitlich zu laufen; jede Zeile trägt ihre Linie selbst */
.reiter.modul-reiter { flex-wrap: wrap; overflow: visible; border-bottom: 0; gap: 0 18px; }
.reiter.modul-reiter a { padding: 10px 0 8px; line-height: 22px; }
.tabelle-rahmen { overflow-x: auto; }
.berechtigungen select { min-width: 130px; }

/* 2.17 (V21, 042): Manövergruppen pflegen */
.gruppe-zeile { display: block; }
.gruppe-zeile .feld-reihe { align-items: end; }
.gruppe-zeile .aktionen { margin: 0; }
.gruppe-zeile p.klein { margin: 4px 0 0; }
.gruppe-zeile.aus { opacity: .6; }

/* 2.18 (V22): Notiz offen (048), Abbruch (047), Geräte je Manöver (044) */
.fs-notiz { display: grid; gap: 4px; margin: 10px 0; font-size: 13px; color: var(--muted); }
.fs-notiz input { font: inherit; font-size: 15px; color: var(--ink); padding: 8px 10px; border: 1px solid var(--line);
                  border-radius: var(--radius); }
.fs-abbruch { margin: 8px 0 18px; }
.fs-abbruch > summary { list-style: none; text-align: center; cursor: pointer; }
.fs-abbruch > summary::-webkit-details-marker { display: none; }
.fs-abbruch .formular { margin-top: 8px; }
.geraete-liste { max-height: 260px; overflow-y: auto; }
.fs-eintragen summary { cursor: pointer; }

/* 2.19 (V23, 046): Kleidertausch und Freigaben */
.tausch-zeile { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; margin: 4px 0 0; }
.tausch-zeile .aus { color: var(--muted); text-decoration: line-through; }
.freigabe-form { margin: 6px 0 4px; }
.freigabe-form select { max-width: 100%; font: inherit; font-size: 14px; padding: 7px 8px; border: 1px solid var(--line);
                        border-radius: var(--radius); background: var(--surface); color: var(--ink); }

/* 2.21 (V25, 051): Push */
.push-box .aktionen { margin: 6px 0; }
.installieren .link-knopf { margin-left: 6px; }

/* 2.25 (055): QR-Codes auf der Fahrzeugseite */
.qr-paar { display: flex; flex-wrap: wrap; gap: 16px; }
.qr-bild { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; max-width: 160px; }
.qr-bild figcaption { display: flex; flex-direction: column; gap: 2px; font-size: 0.9rem; }
.qr-bild .qr-fach svg { width: 100%; height: 100%; display: block; }

/* 2.26 (056): Antworten eines Formulars */
.antworten-liste { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px 16px; margin: 8px 0; }
.antworten-liste dt { color: var(--text-2); font-size: 0.9rem; margin-top: 6px; }
.antworten-liste dd { margin: 0; }
@media (min-width: 768px) { .antworten-liste { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
  .antworten-liste dt { margin-top: 0; } }
.teil-punkte a.teil-punkt { text-decoration: none; }
.teil-punkte a.teil-punkt:hover { text-decoration: underline; }
/* Eine aufgeklappte Zeile (details) und eine Zeile mit nur einem Block nutzen die ganze Breite */
details.zeile { display: block; }
details.zeile > summary { cursor: pointer; }
.zeile > div:only-child { grid-column: 1 / -1; min-width: 0; }
.antworten .formular { box-sizing: border-box; max-width: 100%; margin-left: 0; margin-right: 0; }

/* 2.27 (057): Prüfpunkte mit drei Zuständen */
.pruef-kategorie { margin: 18px 0 6px; font-size: 1rem; color: var(--text-2); }
.pruef-wahl .meldewahl label.folge-ok input:checked + span { background: var(--ok-soft); color: var(--ok-text); border-color: var(--ok-text); }
.pruef-wahl .meldewahl label[class^="folge-"]:not(.folge-ok) input:checked + span { background: var(--warn-soft); color: var(--warn-text); border-color: var(--warn-text); }
.pruef-wahl .meldewahl label.folge-aussondern input:checked + span,
.pruef-wahl .meldewahl label.folge-sperren input:checked + span { background: var(--critical-soft); color: var(--critical-text); border-color: var(--critical-text); }

/* 2.33 (060): Prüfpunkte als Zeilen in einem Formular */
.punkt-zeile { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; padding: 12px 14px; }
.punkt-zeile > label { display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: var(--muted); }
.punkt-zeile > label.haken-label { flex-direction: row; align-items: center; color: var(--text); }
.punkt-zeile > label.punkt-nr { flex: 0 0 4.5em; }
.punkt-zeile .punkt-text { flex: 1 1 22em; }
.punkt-zeile .punkt-hilfe { flex: 1 1 14em; }
.punkt-zeile input:not([type=checkbox]), .punkt-zeile select { font: inherit; font-size: 15px; color: var(--text);
  min-height: 38px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface);
  width: 100%; box-sizing: border-box; }
.punkt-zeile > label { flex: 0 1 13em; }
.punkt-zeile > label:has(.menge-klein) { flex: 0 0 7em; }
.punkt-zeile > label.haken-label { flex: 0 0 auto; }
.punkt-zeile > label.punkt-art { flex: 0 1 20em; }
.punkt-zeile > span[data-nur] { align-self: center; }

/* 2.37 (Feedback 065): «Ort wählen» mit Kacheln */
.ort-waehlen { display: flex; flex-direction: column; gap: 8px; }
.ort-waehlen .ort-label { font-weight: 600; }
.ort-waehlen.fehlt { outline: 2px solid var(--red); outline-offset: 4px; border-radius: var(--radius); }
.ort-gewaehlt { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ort-pfad { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.ort-kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.ort-kachel { min-height: 48px; text-align: left; padding: 10px 12px; white-space: normal; }
.ort-kachel.gewaehlt { outline: 2px solid var(--green); }

/* 2.40 (Feedback 073): Fortschritt beim Hochladen */
.hochladen { width: 100%; display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.hochladen-spur { height: 10px; border-radius: 5px; background: var(--grey-soft); overflow: hidden; }
.hochladen-balken { height: 100%; width: 0; background: var(--primary); transition: width .2s; }
.hochladen.fehler .hochladen-text { color: var(--red); }

/* 2.41 (Feedback 074): Reparatur mit Foto */
.reparatur-text { font-size: 17px; margin: 8px 0; }
.reparatur-foto img { max-width: 100%; max-height: 420px; border-radius: var(--radius); display: block; }
.defekt-hinweis { display: block; color: inherit; text-decoration: none; }
.defekt-hinweis.alarm { background: var(--red-soft); }

/* 2.42 (Feedback 067): Zusammenfassung oben auf der Personenseite */
.zusammenfassung-spalten { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 24px; }
.person-zusammenfassung h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 0 0 4px; }
.person-zusammenfassung h3 + div, .person-zusammenfassung div + h3 { margin-top: 0; }
.person-zusammenfassung div > h3:not(:first-child) { margin-top: 12px; }

/* 2.43 (Feedback 070): Vorschläge beim Tippen */
label:has(> input[data-vorschlag]) { position: relative; }
.vorschlag-liste { position: absolute; z-index: 20; left: 0; right: 0; top: 100%; margin: 2px 0 0; padding: 4px 0; list-style: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); max-height: 260px; overflow-y: auto; }
.vorschlag-liste li { padding: 8px 12px; cursor: pointer; }
.vorschlag-liste li:hover, .vorschlag-liste li.aktiv { background: var(--primary-soft); }

/* 2.44 (Feedback 072): Scan-Kachel auf «Defekt melden» */
.defekt-scan { margin-top: 16px; }

/* 2.45 (Feedback 076): Ausbildungsstand in der laufenden Fahrstunde */
.fs-ausbildungsstand { border: 1px solid var(--border); border-radius: var(--radius); padding: 6px 12px; background: var(--surface); }
.fs-ausbildungsstand h3 { font-size: 14px; margin: 12px 0 6px; }

/* 2.49 (Feedback 078): Stapelprüfung */
.stapel-zeile { display: flex; align-items: center; gap: 10px; }
.stapel-zeile > input[type=checkbox] { width: 22px; height: 22px; flex: none; }
.stapel-link { display: flex; justify-content: space-between; gap: 10px; flex: 1; color: inherit; text-decoration: none; }
.stapel-stueck legend { padding: 0 6px; }

/* 2.55 (Feedback 084): sortierbare Listen */
.sort-liste { list-style: none; padding: 0; margin: 8px 0; display: flex; flex-direction: column; gap: 4px; }
.sort-liste li { display: flex; align-items: center; gap: 4px; padding: 4px 6px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 8px; }
.sort-liste li[data-fest] { background: var(--surface-2); color: var(--text-2); }
.sort-liste li.sort-zieht { border-color: var(--primary); box-shadow: 0 2px 8px rgba(0, 0, 0, .15); }
.sort-liste .sort-text { flex: 1; min-width: 0; }
.sort-liste .sort-text a { color: inherit; }
.sort-griff { cursor: grab; touch-action: none; user-select: none; font-size: 20px; line-height: 1; padding: 6px 4px;
  color: var(--text-2); }
.sort-liste li[data-fest] .sort-griff { visibility: hidden; }
.sort-hoch, .sort-runter, .sort-weg { min-width: 36px; min-height: 36px; padding: 2px 6px; flex: none; }
.sort-liste .sort-text .klein { display: block; }
.sort-nr { flex: none; font-variant-numeric: tabular-nums; color: var(--text-2); min-width: 1.5em; text-align: right; }
.sort-liste { counter-reset: sortnr; }
.sort-liste li .sort-nr::before { counter-increment: sortnr; content: counter(sortnr) "."; }

/* 2.57 (Feedback 088): ältere Übungen nur bei Anlass «Übung» */
.aeltere-uebungen summary { cursor: pointer; padding: 4px 0; }
.aeltere-uebungen { display: grid; gap: 6px; }
.anlass-form .aeltere-uebungen { display: none; }
.anlass-form:has(.anlass-wahl input[value="uebung"]:checked) .aeltere-uebungen { display: grid; }
.aeltere-uebungen:not([open]) > .einsatz-eintrag,
.anlass-form:has(.anlass-wahl input[value="uebung"]:checked) .aeltere-uebungen:not([open]) > .einsatz-eintrag[data-art] { display: none !important; }

.los-kacheln.nur-handy-bereiche { display: none; }
/* 2.58 (Feedback 086): am Handy nur Marke, «Start» und der eigene Name; der Rest geht über die Seite «ich» */
@media (max-width: 640px) {
  .kopf .nav { order: 0; flex: 1; flex-basis: auto; flex-wrap: nowrap; }
  .kopf .nav a:not(.nav-start), .kopf .scan-knopf, .kopf .abmelden, .kopf .nur-pc { display: none; }
  .kopf .wer { display: inline; margin-left: auto; }
  .kopf .gast-person { margin-left: auto; }
  .kopf .wer-name { font-weight: 600; text-decoration: none; color: var(--ink); }
  .los-kacheln.nur-handy-bereiche { display: grid; }
}

/* 2.63 (Feedback 099): Artikelliste mit Häkchen, Leiste für mehrere Artikel */
.artikel-zeile { display: flex; align-items: center; gap: 10px; }
.artikel-zeile > a { flex: 1; color: inherit; text-decoration: none; min-width: 0; }
.artikel-zeile > input.wahl { width: 20px; height: 20px; flex: none; }
.mehrfach-leiste { position: sticky; bottom: 8px; margin-top: 12px; box-shadow: 0 2px 10px rgba(0, 0, 0, .12); }
.mehrfach-leiste .feld-reihe { display: flex; flex-wrap: wrap; gap: 8px 12px; margin: 8px 0; }
.ablauf-gruppe { margin: 16px 0 6px; }

/* 2.66 (Feedback 103): ein Teil der Set-Prüfung ist keine Rasterzeile; alles untereinander, volle Breite */
.zeile.set-teil { display: block; }
.set-teil > * + * { margin-top: 8px; }
.set-teil .meldewahl { flex-wrap: wrap; }
.set-abweichung, .set-abweichung * { min-width: 0; max-width: 100%; }
.set-abweichung input:not([type="radio"]):not([type="checkbox"]), .set-abweichung textarea { width: 100%; box-sizing: border-box; }

/* 2.66 (Feedback 106): am Handy zoomt iOS bei Feldern unter 16 px; alle Felder mindestens 16 px */
@media (max-width: 860px) {
  input:not([type="checkbox"]):not([type="radio"]), select, textarea { font-size: 16px !important; }
}
.ziehen-hinweis { position: fixed; top: 0; left: 50%; transform: translate(-50%, -100%); z-index: 1000;
  background: var(--surface); border: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius);
  padding: 6px 14px; font-size: 14px; color: var(--muted); transition: transform .15s; pointer-events: none; }
.ziehen-hinweis.sichtbar { transform: translate(-50%, 0); }
/* «Für dich» kompakt: Dringendes einzeln, der Rest aufklappbar */
.fuer-dich-weitere > summary { list-style: none; cursor: pointer; }
.fuer-dich-weitere > summary::-webkit-details-marker { display: none; }

/* 2.68 (V73): Personenseite mit Kopf und drei Reitern */
.person-kopf h1 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 4px; }
.person-kopf-zeile { margin: 2px 0; overflow-wrap: anywhere; }
.person-kopf .chip { font-size: 13px; font-weight: 500; padding: 2px 10px; border-radius: 12px; background: var(--surface-2); color: var(--text-2); }
.chip.status-aktiv { background: var(--ok-soft); color: var(--ok-text); }
.chip.status-pause, .chip.status-eingereicht { background: var(--warn-soft); color: var(--warn-text); }
.chip.status-ehemalig { background: var(--surface-2); color: var(--text-2); }
.person-reiter { margin: 12px 0 16px; }
@media (max-width: 640px) { .person-reiter { display: grid; grid-template-columns: repeat(3, 1fr); }
  .person-reiter a { text-align: center; } }
.zeile.steht-an-zeile { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.person-unten { margin-top: 20px; }

/* 2.73 (Feedback 117): Fach weicht vom Soll ab */
.fachkachel.weicht-ab { box-shadow: inset 0 0 0 2px var(--warn); }
.soll-marke { display: inline-block; margin-top: 4px; font-size: 11px; font-weight: 600; color: var(--warn-text);
  background: var(--warn-soft); border-radius: 8px; padding: 0 6px; }


/* 2.77 (Feedback 114): Schritte in der Fahrstunde */
.fs-schritte > li.fs-schritt-zeile { flex-wrap: wrap; align-items: center; }
.fs-schritte > li.fs-schritt-zeile > ol { flex-basis: 100%; margin: 4px 0 0 1.5em; padding: 0; }
.fs-schritt { margin: 8px 0; }
.fs-schritt h2 { margin: 4px 0 8px; }
.fs-schritt-manoever { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px; }
.fs-schritt-manoever.aktiv { outline: 2px solid var(--primary); outline-offset: -2px; }
.fs-schnell { display: flex; gap: 4px; }
.fs-schnell .fs-wert.gewaehlt { font-weight: 700; box-shadow: inset 0 0 0 2px currentColor; }
.fs-schritt-weiter { margin: 6px 0; }
.fs-vorlage-liste li.sort-schritt { background: var(--surface-2); font-weight: 600; }
.fs-vorlage-liste li.sort-schritt input[name="schritt_name"] { width: 100%; }

/* 2.78 (Feedback 123): Soll korrigieren */
.soll-zeilen { display: grid; gap: 0; }
.soll-zeile { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; justify-content: space-between;
  padding: 8px 0; border-bottom: 1px solid var(--border); }
.soll-zeile:last-child { border-bottom: 0; }
.soll-name { flex: 1 1 240px; min-width: 0; overflow-wrap: anywhere; }
.soll-wahl { flex: 0 1 220px; display: flex; gap: 6px; align-items: center; }
.soll-wahl select { flex: 1; min-width: 0; }
@media (max-width: 640px) { .soll-wahl { flex-basis: 100%; } }

/* 2.84 (Feedback 126): Reiter «Daten · Weisungen» unter «Eigene Daten», gut tippbar; offene Weisungen hervorgehoben */
.reiter.reiter-gross a { padding: 12px 4px; font-size: 1.05rem; }
.weisung-zeile > summary { display: flex; flex-direction: column; gap: 2px; padding: 4px 0; }
.weisung-zeile.offen-weisung { border-left: 4px solid var(--warn); padding-left: 10px; }

/* 2.87 (V91): «Getragen für mehrere»: Häkchen nach Zug, schon Eingetragene grau */
.getragen-zug { border: 1px solid var(--line); border-radius: var(--radius); margin: 10px 0; padding: 6px 12px; }
.getragen-zug legend { font-weight: 600; padding: 0 4px; }
.getragen-person { padding: 8px 0; font-size: 16px; }
.getragen-person.schon { color: var(--muted); }

/* 2.89 (Feedback 131): Ort eines Adress-Manövers in der Schrittliste, aufklappbar */
.fs-karte-klappe { width: 100%; margin-top: 6px; }
.fs-karte-klappe > summary { cursor: pointer; padding: 6px 0; }

/* 2.91 (Feedback 132): Gesamteindruck der Fahrstunde, Verlauf je Kriterium */
.fs-kriterium { border: 0; border-top: 1px solid var(--line); margin: 0; padding: 8px 0; }
.fs-kriterium legend { font-weight: 600; padding: 0; }
.fs-punkte { display: flex; gap: 4px; flex-wrap: wrap; margin: 6px 0; }
.fs-punkte label { display: flex; align-items: center; gap: 3px; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 8px 7px; font-size: 16px; }
.fs-kriterium > input { width: 100%; box-sizing: border-box; padding: 8px 10px; border: 1px solid var(--line);
  border-radius: var(--radius); font: inherit; }
.fs-reihe-punkte { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.fs-pkt { display: inline-block; min-width: 22px; text-align: center; border-radius: 4px; background: var(--paper);
  border: 1px solid var(--line); font-size: 13px; }
.fs-pkt.tief { background: var(--warn); color: var(--ink); border-color: var(--warn); font-weight: 600; }
/* 2.105 (Feedback 151): Tauglichkeit und Gruppen im Fahrerprofil */
.fs-pkt.eins { background: var(--critical); color: var(--on-primary); border-color: var(--critical); font-weight: 600; }
.fs-punkt-farbe.ok { background: var(--ok); }
.fs-punkt-farbe.warn { background: var(--warn); }
.fs-punkt-farbe.rot { background: var(--critical); }
.fs-tauglich { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 10px 12px; margin-bottom: 8px;
  border-radius: var(--radius); border: 1px solid var(--line); border-left: 6px solid var(--neutral); background: var(--surface); }
.fs-tauglich.ok { border-left-color: var(--ok); background: var(--ok-soft); }
.fs-tauglich.warn { border-left-color: var(--warn); background: var(--warn-soft); }
.fs-tauglich.rot { border-left-color: var(--critical); background: var(--critical-soft); }
.fs-eins { display: inline-block; padding: 1px 6px; border-radius: 4px; background: var(--critical-soft); color: var(--critical-text);
  border: 1px solid var(--critical); font-size: 12px; font-weight: 600; }
.fs-gruppe { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 6px; background: var(--surface); }
.fs-gruppe > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 10px 12px; cursor: pointer; }
.fs-gruppe > summary > span:first-child { flex: 1; font-weight: 600; }
.fs-gruppe > .zeile { border-top: 1px solid var(--line); }

/* 2.93 (V99, Feedback 137): Atemschutz-Runde je Punkt mit allen Geräten */
.runde-wahl .wahl-knopf { display: flex; align-items: center; justify-content: center; gap: 4px; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 10px 6px; font-size: 16px; }
.runde-zeile { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; }
.runde-zeile.grau { opacity: 0.55; }
.runde-geraet { display: flex; flex-direction: column; min-width: 70px; }
.runde-eingabe { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; flex: 1; justify-content: flex-end; }
.runde-eingabe input:not([type]) , .runde-eingabe input[inputmode] { font-size: 16px; padding: 8px; max-width: 160px; }
.runde-weg { opacity: 0.6; }
.runde-eingabe .ergebnis-knopf { display: flex; flex-direction: row; align-items: center; gap: 6px; width: auto;
  min-width: 72px; padding: 10px 12px; font-size: 16px; white-space: nowrap; }

/* 2.95 (Feedback 135): QR zum Anmelden am PC */
.pc-qr { text-align: center; }
.pc-qr-bild svg { width: 180px; height: 180px; }

/* 2.98 (Feedback 140): Dräger-Messwerte beim Stück */
.tabelle-scroll { overflow-x: auto; }
.draeger-tabelle td.hinweis { font-weight: 600; }

/* 2.99 (Feedback 141): Auswahl je Gerät im Popup, Sollwerte klein unter dem Feld */
.runde-feld { display: inline-flex; flex-direction: column; gap: 2px; }
.soll { color: var(--muted); }
.wahl-dialog { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; width: min(92vw, 520px);
  background: var(--surface); color: var(--ink); }
.wahl-dialog::backdrop { background: rgba(0, 0, 0, 0.4); }
.wahl-kopf { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 12px; }
.wahl-dialog .spind-wahl button { min-height: var(--knopf-h-gross); font-size: var(--knopf-schrift-wahl); }
.wahl-dialog .spind-wahl button.gewaehlt { outline: 2px solid var(--primary); }
.wahl-dialog .spind-wahl button:disabled { opacity: 0.35; }

/* 2.100 (Feedback 145): Dräger-Abgleich, Stand und Dokumente */
.liste-schlicht { list-style: none; padding: 0; margin: 4px 0 10px; }
.liste-schlicht li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.draeger-stand p { margin: 4px 0; }

/* 2.101 (Feedback 143): Balken ohne bekannten Stand (Nextcloud-Aktion läuft) */
.hochladen.laufend .hochladen-balken { width: 40% !important; animation: nextcloud-laeuft 1.2s infinite ease-in-out; }
@keyframes nextcloud-laeuft { 0% { margin-left: -40%; } 100% { margin-left: 100%; } }

/* 2.114 (Feedback 159): Fahrstunden je Stufe im Jahresprogramm */
.fs-stufen { border-collapse: collapse; margin: 4px 0 8px; }
.fs-stufen th, .fs-stufen td { padding: 4px 10px 4px 0; text-align: left; vertical-align: middle; }
.fs-stufen th { font-size: 13px; color: var(--muted); font-weight: 600; }

/* 2.116 (Feedback 162): Tablet */
.tablet-seite { display: grid; justify-items: center; gap: 12px; text-align: center; padding: 24px 0; }
.tablet-qr .pc-qr-bild svg { width: min(70vw, 420px); height: min(70vw, 420px); }
.tablet-uhr { font-size: 32px; font-weight: 700; color: var(--muted); margin: 0; }
.tablet-abmelden { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 4px 0 12px; }

/* 2.117 (Feedback 163): Start mit stehender Leiste, Aufgaben nach Modul */
.start-leiste { position: sticky; top: 0; z-index: 15; max-height: 45vh; overflow-y: auto; scrollbar-width: thin;
  background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px 0; margin: -8px 0 12px; }
/* 2.120 (Feedback 169): Raster mit Umbruch statt einer Zeile, 2 Spalten am Handy, 4 ab 900 px */
.start-raster { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (min-width: 900px) { .start-raster { grid-template-columns: repeat(4, 1fr); } }
.start-leiste .los-kachel { height: var(--kachel-h-leiste); min-height: 0; flex-direction: row; justify-content: flex-start; gap: 8px;
  padding: 6px 10px; font-size: var(--kachel-schrift-zeile); text-align: left; overflow: hidden; }
/* 2.170 (206): jede Kachel gleich hoch, Titel höchstens zwei Zeilen mit «…» statt Wachsen */
.start-leiste .los-kachel strong { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; line-height: 1.2; }
.start-leiste .los-kachel .ico { width: var(--kachel-icon-leiste); height: var(--kachel-icon-leiste); flex: none; }
.start-shortcuts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.start-leiste .start-shortcut { font-size: 13px; padding: 6px 12px; border: 1px solid var(--line);
  border-radius: 999px; color: var(--ink); text-decoration: none; }
.start-zusammenfassung { margin: 12px 0 18px; }
.start-zusammenfassung .heute-kacheln { margin-bottom: 6px; }
.start-weiter { margin-top: 14px; }
/* 2.129 (Feedback 175): Tablet Atemschutz mit zwei grossen Knöpfen */
.atemschutz-tablet { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 12px 0 24px; }
.atemschutz-tablet .los-kachel { min-height: var(--kachel-h-tablet); font-size: var(--kachel-schrift-tablet); }
.atemschutz-tablet .los-kachel .ico { width: var(--kachel-icon-tablet); height: var(--kachel-icon-tablet); }
@media (max-width: 560px) { .atemschutz-tablet { grid-template-columns: 1fr; } .atemschutz-tablet .los-kachel { min-height: var(--kachel-h-tablet-schmal); } }
/* 2.129 (Feedback 174): eigene laufende Vorgänge oben */
.start-laeuft { margin: 0 0 18px; }
.start-laeuft .zeile { min-height: 52px; }
.aufgaben-modul { margin: 0 0 12px; }
.aufgaben-modul > summary { cursor: pointer; display: flex; align-items: center; gap: 6px; padding: 8px 0; }
.aufgaben-modul > summary .ico { width: 18px; height: 18px; }
.start-leiste button.los-kachel { width: 100%; font-size: var(--kachel-schrift-zeile); }
/* 2.129 (Feedback 176): in der installierten App scrollt die Leiste mit, nur im Browser steht sie */
@media (display-mode: standalone) { body:not(.tablet-modus) .start-leiste { position: static; max-height: none; overflow: visible; } }
html.app-modus body:not(.tablet-modus) .start-leiste { position: static; max-height: none; overflow: visible; }

/* 2.118 (Feedback 164): Beispiel der Schnittstelle */
.code-beispiel { white-space: pre-wrap; word-break: break-all; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 8px 10px; overflow-x: auto; }

/* 2.123 (Feedback 168): Haken «Lodur» je Fahrstunde */
.fs-stunde-zeile > a { color: inherit; text-decoration: none; min-width: 0; }
.fs-lodur { margin: 0; white-space: nowrap; }
.fs-lodur label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.fs-lodur input[type=checkbox] { width: 20px; height: 20px; }
.fs-lodur-offen { color: var(--warn-text); }

/* 2.124 (Feedback 170): Ansicht des Tablets am Handy wählen */
.tablet-ansichten { display: grid; gap: 8px; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px;
  margin: 0 0 8px; width: 100%; }
.tablet-ansichten label { display: flex; align-items: center; gap: 10px; min-height: 40px; font-size: 16px; }
.tablet-ansichten input[type=radio] { width: 20px; height: 20px; }
.tablet-link { max-width: 100%; text-align: left; }

/* 2.125: Tablet ohne linke Leiste, oben eine durchgehende Leiste: links Logo und Bereich mit Nutzer, rechts Abmelden */
body.tablet-modus { display: block; }
body.tablet-modus > .kopf { position: sticky; top: 0; z-index: 20; height: auto; border-right: 0;
  border-bottom: 1px solid var(--line); overflow: visible; }
body.tablet-modus .kopf-innen { flex-direction: row; align-items: center; flex-wrap: nowrap; height: 56px; gap: 16px;
  padding: 0 20px; }
body.tablet-modus .tablet-kopf { display: flex; align-items: baseline; gap: 10px; min-width: 0; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
body.tablet-modus .tablet-bereich { font-weight: 600; color: var(--ink); }
body.tablet-modus .tablet-nutzer { color: var(--muted); }
body.tablet-modus .tablet-abmelden-kopf { margin-left: auto; }
body.tablet-modus .tablet-abmelden-kopf .link-knopf { font-size: 16px; padding: 8px 4px; }
body.tablet-modus > main { max-width: none; margin: 0; padding: 20px 24px 48px; }
body.tablet-modus > .fuss { margin: 0; padding: 0 24px 12px; font-size: 11px; }
/* QR und Logo nach der Höhe, damit die Tablet-Seite quer ohne Scrollen passt */
body.tablet-modus .tablet-seite { gap: 6px; padding: 4px 0; }
body.tablet-modus .tablet-seite .anmelde-logo { width: min(120px, 14vh); height: min(120px, 14vh); margin-bottom: 0; }
body.tablet-modus .tablet-seite h1 { margin: 0; }
body.tablet-modus .tablet-qr .pc-qr-bild svg { width: min(70vw, 44vh, 420px); height: min(70vw, 44vh, 420px); }

/* 2.127 (Feedback 173): Zustand der Offline-Warteschlange in der Fahrstunde */
.fs-offline { position: sticky; top: 56px; z-index: 18; margin: 0 0 10px; padding: 8px 12px; border-radius: var(--radius);
  font-size: 14px; font-weight: 600; background: var(--surface-2); color: var(--ink); }
.fs-offline.warten { background: var(--warn-soft); color: var(--warn-text); }
.fs-offline.laeuft { background: var(--primary-soft); color: var(--primary); }
.fs-offline.ok { background: var(--ok-soft); color: var(--ok-text); }
.fs-offline.fehler { background: var(--critical-soft); color: var(--critical-text); font-weight: 400; }
.fs-offline ul { margin: 6px 0 0 18px; padding: 0; }

/* 2.128 (Feedback 172): «Wer ist gefahren?» im Schritt Anlass */
.fahrer-wahl { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; margin: 12px 0; display: grid; gap: 8px; }
.fahrer-wahl legend { font-weight: 600; padding: 0 4px; }
.fahrer-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fahrer-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border: 1px solid var(--line);
  border-radius: 999px; background: var(--surface); }
.anlass-form:has(input[name=anlass][value=fahrt]:checked) .fahrer-wahl,
.anlass-form:not(:has(input[name=anlass]:checked)) .fahrer-wahl { display: none; }

/* 2.130 (Feedback 183): Dunkelmodus: QR auf weisser Fläche mit Rand (Druck bleibt unverändert) */
@media screen and (prefers-color-scheme: dark) {
  svg.qr-svg { background: var(--qr-grund); padding: 6px; box-sizing: border-box; border-radius: 6px; }
}

/* 2.133 (Feedback 182): Login-QR in der Person */
@media (min-width: 601px) { .person-kopf { position: relative; padding-right: 220px; }
  .person-kopf-knopf { position: absolute; top: 4px; right: 0; } }
@media (max-width: 600px) { .person-kopf-knopf { display: inline-block; margin: 0 0 8px; } }
.login-qr-gross { width: min(80vw, 360px); background: var(--qr-grund); padding: 12px; border-radius: var(--radius); }
.login-qr-gross svg { width: 100%; height: auto; display: block; }

/* 2.135 (Feedback 180 B): Zuweisen je Aufgabe */
.aufgabe-mit-knopf { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; }
.aufgabe-zuweisen { white-space: nowrap; padding: 0 6px; text-align: right; }
.aufgabe-zurueckgestellt { color: var(--muted); }          /* 2.159 (198 A) */
.aufgabe-an { color: var(--text); font-weight: 600; }

/* 2.137 (Feedback 186): Nachweise mit Zustand je Zelle */
.nachweise { width: 100%; border-collapse: collapse; }
.nachweise th, .nachweise td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.nachweise td.nachweis.ok { color: var(--ok-text); }
.nachweise td.nachweis.warn { color: var(--warn-text); }
.nachweise td.nachweis.alarm { color: var(--critical-text); font-weight: 600; }

/* 2.140 (Feedback 188): «?» im Kopf und Hilfe-Seite */
.hilfe-knopf { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px;
  border-radius: 50%; color: var(--text-2); text-decoration: none; }
.hilfe-knopf:hover, .hilfe-knopf:focus-visible { color: var(--primary); }
.hilfe-knopf .ico { width: 22px; height: 22px; }
@media (min-width: 900px) { body:not(.tablet-modus) .hilfe-knopf { position: fixed; top: 10px; right: 14px; z-index: 30; } }
#hilfe-suche { width: 100%; margin: 4px 0 12px; }
.hilfe-thema { margin: 0 0 12px; scroll-margin-top: 70px; }
.hilfe-thema h3 { margin-top: 0; }
.hilfe-thema ol { padding-left: 20px; }
.hilfe-thema li { margin: 4px 0; }

/* 2.144 (Feedback 194): in der installierten App Start nur mit Kacheln, Zusammenfassung und «Läuft gerade» */
.nur-app { display: none !important; }
html.app-modus body:not(.tablet-modus) .nur-web { display: none !important; }
html.app-modus body:not(.tablet-modus) .nur-app { display: flex !important; }
@media (display-mode: standalone) {
  body:not(.tablet-modus) .nur-web { display: none !important; }
  body:not(.tablet-modus) .nur-app { display: flex !important; }
}
.los-kachel.kachel-dringend { border-color: var(--warn); background: var(--warn-soft); }

/* 2.157 (Feedback 196): Hilfe im Seitenfenster; PC rechts angedockt, Handy als Blatt von unten */
dialog.hilfe-fenster { position: fixed; inset: 0 0 0 auto; margin: 0; padding: 0; width: min(420px, 100vw);
  max-width: none; height: 100dvh; max-height: none; border: 0; border-left: 1px solid var(--line); border-radius: 0;
  background: var(--surface); color: var(--text); overflow-y: auto; overscroll-behavior: contain; }
dialog.hilfe-fenster::backdrop { background: var(--schleier); }
.hilfe-fenster-kopf { position: sticky; top: 0; z-index: 1; display: flex; justify-content: flex-end; align-items: center;
  padding: 8px 10px 0; background: var(--surface); }
.hilfe-fenster-zu { font-size: 20px; min-width: 44px; min-height: 44px; }
.hilfe-fenster-griff { display: none; }
.hilfe-fenster-inhalt { padding: 0 16px 24px; }
.hilfe-fenster-titel { margin-top: 0; }
.hilfe-fenster-titel:focus { outline: none; }
.hilfe-fenster-suche { width: 100%; margin-bottom: 8px; }
@media (max-width: 899px) {
  dialog.hilfe-fenster { inset: auto 0 0 0; width: 100%; height: 90dvh; border-left: 0; border-top: 1px solid var(--line);
    border-radius: var(--radius) var(--radius) 0 0; }
  .hilfe-fenster-kopf { justify-content: space-between; padding-top: 6px; touch-action: none; }
  .hilfe-fenster-griff { display: block; width: 44px; height: 5px; margin-left: calc(50% - 22px); border-radius: 3px;
    background: var(--line); }
}
@media print { dialog.hilfe-fenster { display: none !important; } }

/* 2.160 (V167, Feedback 198 B): Zuweisen an Person oder Rolle, grosse Knöpfe; mit :has nur das gewählte Feld */
.zuweisen-art, .zuweisen-rolle { border: 0; padding: 0; margin: 0 0 8px; display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 6px; }
.zuweisen-art legend, .zuweisen-rolle legend { padding: 0 0 4px; }
.wahl-knopf:has(input:checked) { border-color: var(--ink); font-weight: 600; }
form:has(.zuweisen-art input[value=person]:checked) .zuweisen-rolle { display: none; }
form:has(.zuweisen-art input[value=rolle]:checked) .zuweisen-person { display: none; }

/* 2.161 (V168, Feedback 200): Start in der App: QR-Knopf über die ganze Breite, hellgrün; Kombi-Kacheln mit Auswahl */
html.app-modus .scan-gross { grid-column: 1 / -1; height: var(--kachel-h-scan); background: var(--scan-bg); border: 2px solid var(--scan-rand);
  color: var(--ink); font-size: var(--kachel-schrift-scan); }
html.app-modus .scan-gross .ico { width: var(--kachel-icon-scan); height: var(--kachel-icon-scan); }
.kachel-wahl { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; width: min(92vw, 420px);
  background: var(--surface); color: var(--ink); }
.kachel-wahl::backdrop { background: var(--schleier); }
.kachel-wahl .wahl-gross { display: grid; gap: 10px; margin: 12px 0; }
/* 2.170 (V177, Feedback 208): Start am PC nach Kategorie; die Überschrift ändert die Kachelgrösse nicht */
.start-gruppe { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--text-2);
  margin: 10px 0 4px; }
/* 2.171 (V178, Feedback 211): am PC ein Kasten «Schnellzugriff» mit Rahmen, scrollt mit (in der App unverändert) */
.start-leiste.schnellzugriff { position: static; max-height: none; overflow: visible; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px 14px; margin: 0 0 16px; }
.schnellzugriff-kopf { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 10px; }
.schnellzugriff-kopf h2 { margin: 0; }
.schnellzugriff .start-gruppe { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 12px; }
.materialsuche-fenster { width: min(92vw, 560px); }
.materialsuche-fenster input[type=search] { width: 100%; box-sizing: border-box; margin-bottom: 8px; }
#materialsuche-treffer { max-height: 50vh; overflow-y: auto; }
.suche-gruppe { font-size: 13px; color: var(--text-2); margin: 10px 0 4px; }
.kachel-wahl .wahl-gross .knopf { min-height: var(--knopf-h-wahl); display: flex; align-items: center; justify-content: center; font-size: var(--knopf-schrift-wahl); }
.wer-zahl { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: var(--surface);
  font-size: 12px; text-align: center; margin-left: 4px; }

/* 2.164 (V171, Feedback 199): Scanner sammelt für «Stücke anlegen»; PC-Liste der Scans */
.scanner-sammeln { margin: 8px 12px; font-weight: 600; }
.scanner-sammeln[hidden] { display: none !important; }
.scan-zeile { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.scan-zeile .scan-id { max-width: 160px; }
.scan-hinweis { color: var(--amber); }

/* 2.165 (V172, Feedback 201): Bild des Artikels (von der Webseite übernommen, verkleinert) */
.artikel-bild { max-width: 160px; max-height: 160px; object-fit: contain; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--surface); }
.kopfkarte .artikel-bild { float: right; max-width: 88px; max-height: 88px; margin: 0 0 8px 12px; }
.artikel-bild-wahl { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.web-uebernehmen { margin-bottom: 12px; }

/* 2.166 (V173, Feedback 202): Testsystem – roter Balken, «✎» für Anmerkungen, Anmerkungen im Seitenfenster */
.testsystem-balken { background: var(--critical); color: var(--on-primary); text-align: center; font-weight: 600;
  font-size: 14px; padding: 4px 16px; }
@media print { .testsystem-balken, .anmerkung-knopf, .abnahme-knopf { display: none !important; } }
@media (min-width: 900px) { body:not(.tablet-modus) .anmerkung-knopf { right: 54px; }      /* 2.175: neben «?» */
  body:not(.tablet-modus) .abnahme-knopf { right: 94px; } }
.abnahme-knopf { font-size: 20px; font-weight: 600; }
.anmerkung-knopf { border: 0; background: transparent; font-size: 20px; cursor: pointer; color: var(--text-2); }
.anmerkung .anmerkung-art { font-weight: 600; }
.anmerkung-notiz .anmerkung-art { color: var(--primary); }
.anmerkung-aenderungswunsch .anmerkung-art { color: var(--warn-text); }
.anmerkung-fehler .anmerkung-art { color: var(--critical-text); }
.anmerkung-feature .anmerkung-art { color: var(--ok-text); }                    /* 2.177 (222) */
.bereich-wahl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.bereich-wahl button { margin-top: 0; }
.anmerkung-text { margin: 4px 0; }
.dev-team-wahl { font-weight: 600; }
.postausgang-text { white-space: pre-wrap; font-size: 13px; margin: 8px 0 0; max-height: 300px; overflow: auto; }
.testsystem-balken a { color: inherit; }
/* 2.176 (V183, 219): ab 1024 px ist der Körper ein Raster; ohne eigene Zeile fiel der Balken in die Zeile «1fr» und
   füllte auf kurzen Seiten den ganzen Platz */
@media (min-width: 1024px) {
  body.testsystem { grid-template-rows: auto 1fr auto; }
  body.testsystem > .kopf { grid-row: 1 / span 3; }
  body.testsystem > .testsystem-balken { grid-column: 2; grid-row: 1; }
}
/* 2.175 (V182, 202 Etappe 2): Abnahme – Stand mit Wort und Farbe, drei grosse Knöpfe je Schritt */
.abnahme-balken { height: 8px; background: var(--line); border-radius: var(--radius); overflow: hidden; margin: 6px 0 10px; }
.abnahme-balken span { display: block; height: 100%; background: var(--ok); }
.abnahme-liste { display: grid; gap: 12px; margin-bottom: 16px; }
.abnahme-schritt { border: 1px solid var(--line); border-left-width: 4px; border-radius: var(--radius); padding: 10px 12px; }
.abnahme-schritt.abnahme-ok { border-left-color: var(--ok); }
.abnahme-schritt.abnahme-fehler { border-left-color: var(--critical); }
.abnahme-stand { float: right; font-weight: 600; }
.abnahme-ok .abnahme-stand { color: var(--ok-text); }
.abnahme-fehler .abnahme-stand { color: var(--critical-text); }
.abnahme-offen .abnahme-stand { color: var(--text-2); }
.abnahme-text { margin: 6px 0; }
.abnahme-ergebnisse { margin: 6px 0; padding-left: 18px; }
.ergebnis-ok strong { color: var(--ok-text); } .ergebnis-fehler strong { color: var(--critical-text); }
.abnahme-knoepfe { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.abnahme-knoepfe button { margin-top: 0; }
button.abnahme-knopf-ok { background: var(--ok-soft); color: var(--ok-text); border-color: var(--ok); }
button.abnahme-knopf-fehler { background: var(--critical-soft); color: var(--critical-text); border-color: var(--critical); }
button.abnahme-knopf-weg { color: var(--text-2); }
.abnahme-schritt > summary { cursor: pointer; list-style: none; }                 /* 2.177 (221): zuklappbar */
.abnahme-schritt > summary::-webkit-details-marker { display: none; }
.abnahme-schritt > summary strong::before { content: "▸ "; color: var(--text-2); }
.abnahme-schritt[open] > summary strong::before { content: "▾ "; }
.abnahme-mein { font-weight: 400; color: var(--text-2); }
.abnahme-weitere > summary { cursor: pointer; } .abnahme-weitere > summary h2 { display: inline; }
.inline-form { display: inline; }
/* 2.178 (V185, 223): Bereitlegeliste – am PC Tabelle, am Handy Zeilen */
.bereitlegen-gruppe { font-size: 1.05rem; margin: 18px 0 6px; }
.bereitlegen-tabelle { width: 100%; border-collapse: collapse; margin-bottom: 8px; }
.bereitlegen-tabelle th, .bereitlegen-tabelle td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.bereitlegen-tabelle th { color: var(--text-2); font-weight: 600; font-size: 13px; }
@media (min-width: 701px) {                          /* gleiche Spalten in allen Gruppen */
  .bereitlegen-tabelle { table-layout: fixed; }
  .bereitlegen-tabelle th:nth-child(1) { width: 36px; } .bereitlegen-tabelle th:nth-child(2) { width: 26%; }
  .bereitlegen-tabelle th:nth-child(3) { width: 11%; } .bereitlegen-tabelle th:nth-child(4) { width: 13%; }
  .bereitlegen-tabelle th:nth-child(6) { width: 17%; }
}
@media (max-width: 700px) {
  .bereitlegen-tabelle thead { display: none; }
  .bereitlegen-tabelle tr { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; border-bottom: 1px solid var(--line); padding: 6px 0; }
  .bereitlegen-tabelle td { border: 0; padding: 2px 4px; }
  .bereitlegen-tabelle td:nth-child(1) { grid-row: span 3; }
  .bereitlegen-tabelle td:nth-child(2) { grid-column: 2; }
  .bereitlegen-tabelle td:nth-child(3), .bereitlegen-tabelle td:nth-child(4) { grid-column: 2; font-size: 13px; color: var(--text-2); }
  .bereitlegen-tabelle td:nth-child(5) { grid-column: 2 / span 2; font-size: 13px; }
  .bereitlegen-tabelle td:nth-child(6) { grid-column: 3; grid-row: 1; text-align: right; font-size: 13px; }
}

/* 2.167 (V174, Feedback 203): Lieferung – unerkannte Zeilen, Artikel hinzufügen, Verwerfen */
#lieferung-form > .feld-reihe, .unerkannt-zeile .feld-reihe { display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin: 6px 0; }
#lieferung-form > .feld-reihe input[list], .unerkannt-zeile input[list] { flex: 1 1 220px; min-width: 0; }
/* 2.169 (207, 209): Vorschlag statt sicherem Treffer; vom Lieferschein gelesene Felder */
.treffer-vorschlag { color: var(--warn-text); }
/* 2.172 (210): Lieferschein in der App, Vorschau der Seiten */
.foto-seiten { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin: 12px 0; }
.foto-seite { display: grid; gap: 6px; }
.foto-seite img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border: 1px solid var(--line); border-radius: var(--radius); }
.treffer-sicher, .vom-lieferschein { color: var(--muted); }
.lieferung-verwerfen { margin-top: 16px; }
/* 2.179 (V187, Feedback 229): ab 900 px stehen «?», «✎», «✓» fest oben rechts und lagen auf dem roten Balken. Auf dem
   Testsystem: Balken einzeilig mit fester Höhe und Platz rechts, die Symbole darunter mit hellem Grund. */
.testsystem-balken { line-height: 20px; }
/* 2.187 (Feedback 238): auf jeder Breite (auch Handy und im Rahmen der Handy-Ansicht) mindestens die heutige Höhe am PC,
   nie eine feste Höhe: bricht der Text um, wächst der Balken mit und der Inhalt rückt nach */
.testsystem-balken { box-sizing: border-box; min-height: 44px; height: auto; padding: 12px 16px; white-space: normal;
  overflow-wrap: anywhere; }
/* 2.182 (V189, Feedback 234): der Balken bricht um statt «…»; rechts bleibt Platz für die Symbole, die darin stehen */
@media (min-width: 900px) {
  body.testsystem > .testsystem-balken { min-height: 44px; padding: 12px 150px 12px 16px; white-space: normal;
    overflow-wrap: anywhere; }
  body.testsystem:not(.tablet-modus) .hilfe-knopf { top: 4px; background: var(--surface); border: 1px solid var(--line);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
}
/* 2.179 (V187, 225, 226): Standort als Knöpfe, Direktknöpfe «Atemschutz getragen» */
.standort-wahl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.standort-wahl .ergebnis-knopf { min-height: 48px; font-size: 15px; padding: 0 4px; }
.defekt-frei-knopf { margin-top: 12px; }
.getragen-knoepfe { display: grid; gap: 10px; margin: 12px 0 20px; }
.getragen-knoepfe form { margin: 0; }
.getragen-knoepfe .gross { min-height: 64px; margin-top: 0; }
.qr-mail-hinweis { white-space: nowrap; }
/* 2.180 (V186): Verbesserungsvorschlag im Hilfe-Fenster, Stand an Anmerkungen */
.vorschlag-bereich { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 12px; }
.vorschlag-auf { font-weight: 600; min-height: 44px; }
.hinweis-kasten.ok { background: var(--ok-soft); }
.anmerkung-vorschlag .anmerkung-art { color: var(--primary); }
.anmerkung-stand { font-weight: 600; }
.anmerkung-stand-behoben .anmerkung-stand { color: var(--ok-text); }
.anmerkung-stand-unklar .anmerkung-stand { color: var(--warn-text); }
.anmerkung-stand-abgelehnt .anmerkung-stand { color: var(--text-2); }
/* 2.181 (V188, 230): Versionen zur Abnahme als Chips, Farbe nach Stand */
.abnahme-versionen { margin: 4px 0 8px; }
.abnahme-versionen .chip.aktiv { border-color: var(--primary); font-weight: 600; }
.abnahme-versionen .chip.abnahme-bereit, .abnahme-versionen .chip.abnahme-sofort { background: var(--ok-soft); }
/* 2.181 (V188, 224): Handy- und Tablet-Ansicht (Testsystem) – Rahmen in Gerätegrösse, waagrecht scrollbar */
.ansicht-buehne { overflow-x: auto; padding: 8px 0 16px; }
.ansicht-rahmen { display: block; margin: 0 auto; border: 10px solid var(--text); border-radius: 28px;
  background: var(--surface); max-width: none; }
/* 2.184 (V191, 232): Jahresprogramm – Liste je Monat und Vorschau des Imports */
.jahresprogramm-liste .zeile { display: grid; grid-template-columns: 88px 1fr; gap: 8px; align-items: start; }
.jahresprogramm-liste .abgesagt .name { text-decoration: line-through; }
.jahresprogramm-liste .vorbei { opacity: .7; }
.import-tabelle input, .import-tabelle select { width: 100%; min-width: 64px; }
.import-tabelle td { vertical-align: top; }
.import-tabelle tr.import-hand { background: var(--amber-soft); }
.import-tabelle tr.import-neu td:last-child { color: var(--ok-text); }
/* 2.185 (V192): Fahrschulabend noch nicht für Fahrschüler freigegeben */
.fs-nicht-frei { background: var(--amber-soft); }
.fs-uebernehmen { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.fs-uebernehmen input[type=date] { width: auto; }
/* 2.188 (Feedback 242): Zeile mit fehlendem Pflichtfeld beim Einbuchen */
fieldset.lieferzeile.fehlt { border-color: var(--red); box-shadow: 0 0 0 1px var(--red); }
.hinweis-kasten.fehler { border-color: var(--red); background: var(--red-soft); }
.kommission-form { margin-top: 4px; gap: 6px; }
.kommission-form input { max-width: 220px; }
