/* MANV-Tool – ein Stylesheet, Farben aus SPEC.md (Referenz: Tablet quer 1280 × 800). */
:root {
  --sk-rot: #C62828;
  --sk-gelb: #F2C200;
  --sk-gruen: #2E7D32;
  --sk-tot: #374151;
  --kopf: #1F2933;
  --kopf-tief: #111820;
  --kopf-text2: #C9D1D9;
  --grund: #EEF1F4;
  --flaeche: #FFFFFF;
  --flaeche2: #F3F5F7;
  --text: #111827;
  --text2: #374151;
  --leise: #4B5563;
  --leiser: #6B7280;
  --rand: #D5DBE1;
  --rand-hell: #E5E7EB;
  --rand-dunkel: #9AA4AF;
  --blau: #1D4ED8;
  --blau-hell: #DBEAFE;
  --blau-sehrhell: #EFF6FF;
  --blau-text: #1E3A8A;
  --orange: #C2410C;
  --ok: #4ADE80;
  --berechnet: #E8F5E9;
  --radius: 16px;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  -webkit-text-size-adjust: 100%;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--grund); color: var(--text); display: flex; flex-direction: column; overflow: hidden; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--blau); outline-offset: 2px; }

.leise { color: var(--leiser); }
.leise-dunkel { color: var(--leise); }
.fett { font-weight: 600; }
.klein { font-size: 13px; margin: 0; }
.zahl { font-variant-numeric: tabular-nums; }
.kuerzen { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; padding-right: 8px; }

/* ---------- Kopfleiste ---------- */
.kopfleiste {
  min-height: 64px; flex-shrink: 0; background: var(--kopf); color: #fff;
  display: flex; align-items: center; gap: 12px 16px; padding: 8px 16px; flex-wrap: wrap;
}
.lage { display: flex; flex-direction: column; width: 270px; min-width: 0; flex-shrink: 1; }
.lage strong { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lage span { font-size: 13px; color: var(--kopf-text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#reiter { display: flex; gap: 4px; background: var(--kopf-tief); border-radius: 12px; padding: 4px; }
#reiter a {
  display: inline-flex; align-items: center; height: 48px; padding: 0 20px; border-radius: 9px;
  color: #E5E7EB; font-size: 16px; font-weight: 600; text-decoration: none;
}
#reiter a[aria-current="page"] { background: #fff; color: var(--text); font-weight: 700; }
.kopf-rechts { margin-left: auto; display: flex; align-items: center; gap: 6px; }
#zaehler { display: flex; gap: 6px; }
.zaehler { display: inline-flex; align-items: center; height: 32px; padding: 0 9px; border-radius: 8px; font-size: 14px; font-weight: 700; }
.online { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; font-size: 13px; color: var(--kopf-text2); }
.online::before { content: ""; width: 10px; height: 10px; border-radius: 5px; background: var(--ok); }
.online.aus { color: #fff; font-weight: 700; }
.online.aus::before { background: #F87171; }

.offline-hinweis {
  flex-shrink: 0; background: #B91C1C; color: #fff; text-align: center; font-weight: 700;
  padding: 10px 16px; font-size: 16px;
}

/* ---------- SK-Farben ---------- */
.sk-it, .sk-i { background: var(--sk-rot); color: #fff; border-color: var(--sk-rot); }
.sk-it { background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.22) 0 6px, transparent 6px 12px); }
.sk-ii { background: var(--sk-gelb); color: var(--text); border-color: var(--sk-gelb); }
.sk-iii { background: var(--sk-gruen); color: #fff; border-color: var(--sk-gruen); }
.sk-w { background: #fff; color: var(--text); border-color: var(--leiser); }
.sk-t { background: var(--sk-tot); color: #fff; border-color: var(--sk-tot); }
.zaehler.sk-w { border: none; }

.sk-badge {
  display: inline-flex; align-items: center; justify-content: center; min-width: 76px; height: 32px; padding: 0 8px;
  border-radius: 8px; font-size: 14px; font-weight: 800; border: 2px solid; white-space: nowrap;
}
.sk-badge.gross { height: 36px; }
.els { font-size: 11px; font-weight: 700; border-radius: 5px; padding: 2px 5px; background: var(--rand-hell); color: var(--text2); margin-left: 6px; }

/* ---------- Allgemeine Bausteine ---------- */
#inhalt { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 16px; position: relative; }
.karte { background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--radius); }
.knopf {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px;
  border-radius: 12px; font-size: 16px; font-weight: 700; text-decoration: none; border: 1px solid transparent;
}
.knopf-dunkel { background: var(--kopf); color: #fff; }
.knopf-hell { background: #fff; color: var(--text); border-color: var(--rand); }
.klein-knopf { min-height: 44px; padding: 0 12px; font-size: 14px; font-weight: 600; border-radius: 10px; }
.knopf-icon {
  width: 48px; height: 48px; border-radius: 12px; border: 1px solid var(--rand); background: #fff;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.eingabe {
  height: 48px; width: 100%; border: 1px solid var(--rand-dunkel); border-radius: 10px; padding: 0 12px;
  font-size: 17px; background: #fff; min-width: 0;
}
select.eingabe { font-size: 16px; font-weight: 600; padding: 0 10px; }
.eingabe.berechnet { background: var(--berechnet); border-color: var(--sk-gruen); color: #14532D; font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip {
  min-height: 44px; padding: 0 12px; border-radius: 22px; font-size: 14px; font-weight: 600;
  background: #fff; color: var(--text); border: 1px solid var(--rand-dunkel);
}
.chip.an { background: var(--kopf); color: #fff; border-color: var(--kopf); }
.chip.null { color: var(--leiser); border: 1px dashed var(--rand); }
.chip.aktiv {
  display: inline-flex; align-items: center; gap: 6px; padding: 0 8px 0 12px;
  background: var(--blau-hell); color: var(--blau-text); border-color: var(--blau);
}

.platzhalter { margin: auto; max-width: 560px; padding: 32px; text-align: center; }
.platzhalter h1 { margin-top: 0; }
.ladefehler { margin: auto; text-align: center; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 150%); max-width: calc(100% - 32px);
  padding: 14px 20px; border-radius: 12px; font-size: 16px; font-weight: 600; color: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,.25); transition: transform .2s ease, visibility .2s; z-index: 50; pointer-events: none;
  visibility: hidden;
}
.toast.sichtbar { transform: translate(-50%, 0); visibility: visible; }
.toast-fehler { background: #B91C1C; }
.toast-ok { background: var(--sk-gruen); }
.toast-info { background: var(--blau-text); }

/* ---------- Übersicht ---------- */
.uebersicht { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.filterkarte { flex-shrink: 0; margin-bottom: 12px; }
.filter-ort { display: flex; align-items: center; gap: 8px; padding: 8px 12px 0; }
.chips-scroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.chips-scroll .chip { flex-shrink: 0; }
.filterleiste { display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 4px 12px 8px; flex-wrap: wrap; }
.leiste-titel { font-size: 13px; font-weight: 700; color: var(--leise); flex-shrink: 0; }
.angezeigt { margin-left: auto; font-size: 14px; color: var(--leise); }
.tabelle { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
.tabelle-scroll { flex: 1; min-height: 0; overflow: auto; }
.raster-tabelle, .zeile {
  /* Passt bei iPad quer (ca. 1180 px) ganz auf den Schirm; schmaler (hochkant) waagerecht scrollbar */
  display: grid; grid-template-columns: 96px 100px 60px minmax(100px, 1fr) minmax(150px, 1.4fr) 170px 100px minmax(120px, 1fr) 60px 36px;
  min-width: 1000px; align-items: center; padding: 0 12px; column-gap: 4px;
}
.thead { position: sticky; top: 0; z-index: 1; height: 48px; align-items: stretch; background: var(--flaeche2); border-bottom: 1px solid var(--rand); }
.kopf {
  display: flex; align-items: center; gap: 5px; padding: 0; border: none; background: transparent;
  font-size: 13px; font-weight: 700; color: var(--text2); text-align: left;
}
.kopf.an { color: var(--blau); }
.kopf .pfeil { font-size: 11px; color: var(--blau); }
.kopf-mehr { display: inline-flex; color: var(--rand-dunkel); }
.kopf.offen { color: var(--blau); }
.kopf.offen .kopf-mehr { transform: rotate(180deg); color: var(--blau); }
.kopf.an .pfeil { color: var(--blau); }
.fsymbol { color: var(--blau); display: inline-flex; }
.zeile {
  width: 100%; min-height: 52px; border: none; border-bottom: 1px solid var(--rand-hell); background: #fff;
  font-size: 15px; text-align: left;
}
.zeile:hover { background: #F8FAFC; }
.zeile.gewaehlt { background: var(--blau-hell); }
.pak { font-weight: 700; font-variant-numeric: tabular-nums; }
.pzc { display: flex; gap: 8px; align-items: baseline; min-width: 0; }
.pzc b { font-variant-numeric: tabular-nums; }
.ort { display: inline-flex; align-items: center; min-width: 0; }
.stift { display: flex; justify-content: center; color: var(--blau); }
.leer-hinweis { padding: 40px; text-align: center; font-size: 16px; color: var(--leise); }

/* ---------- Bearbeiten-Blatt ---------- */
.blatt-hintergrund {
  position: fixed; left: 0; right: 0; top: var(--kopf-hoehe, 64px); bottom: 0; z-index: 20;
  background: rgba(17, 24, 39, .45); display: flex; justify-content: flex-end;
}
.blatt {
  width: min(500px, 100%); height: 100%; background: #fff; box-shadow: -12px 0 30px rgba(0,0,0,.2);
  display: flex; flex-direction: column; cursor: default;
}
.blatt-kopf { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--rand-hell); }
.blatt-kopf h2 { margin: 0; flex: 1; font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; min-width: 0; overflow-wrap: anywhere; }
.blatt-kopf h2:focus { outline: none; }
.blatt-inhalt { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 20px; display: flex; flex-direction: column; gap: 14px; }
.blatt-fuss { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-top: 1px solid var(--rand-hell); }
.blatt-fuss .klein { flex: 1; }
.feld { display: flex; flex-direction: column; gap: 6px; border: none; padding: 0; margin: 0; min-width: 0; }
.feld > span, .feld > legend { font-size: 14px; font-weight: 700; padding: 0; }
fieldset.feld > legend { margin-bottom: 6px; }
.berechnet-hinweis { font-style: normal; font-size: 12px; color: var(--sk-gruen); margin-left: 4px; }
.raster-feld { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 10px; }
/* Geburtsdatum als Tag / Monat / Jahr (iPad: Drehrad), Text senkrecht mittig */
/* Geburtsdatum: Feld öffnet Drehrad-Fenster (Nutzer, 16.11.2026, Vorschlag A) */
.geb-zeile { display: flex; gap: 8px; align-items: center; }
.geb-knopf { flex: 1; display: flex; align-items: center; justify-content: space-between; text-align: left; cursor: pointer; }
.geb-knopf.leer span { color: #9CA3AF; }
.geb-knopf svg { width: 20px; height: 20px; color: var(--leise); }
.alter-feld { align-items: center; text-align: center; margin-top: 4px; }
.alter-feld > span { color: var(--leise); }
.alter-feld .eingabe { width: 150px; text-align: center; }
.alter-hinweis { text-align: center; margin-top: -8px; }
.rad-dialog { max-width: 440px; }
.rad-box { position: relative; display: grid; grid-template-columns: .8fr 1fr 1.2fr; gap: 4px; border: 1px solid var(--rand); border-radius: 14px; padding: 0 6px; background: #fff; }
.rad { height: 220px; overflow-y: auto; scroll-snap-type: y mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 30%, #000 70%, transparent); mask-image: linear-gradient(to bottom, transparent, #000 30%, #000 70%, transparent); }
.rad::-webkit-scrollbar { display: none; }
.rad-pad { height: 88px; }
.rad-opt { height: 44px; display: flex; align-items: center; justify-content: center; font-size: 21px; font-weight: 700; scroll-snap-align: center; cursor: pointer; font-variant-numeric: tabular-nums; }
.rad-band { position: absolute; left: 6px; right: 6px; top: 50%; height: 44px; transform: translateY(-50%); border-radius: 10px; background: rgba(29,78,216,.08); border-top: 2px solid rgba(29,78,216,.35); border-bottom: 2px solid rgba(29,78,216,.35); pointer-events: none; }
.rad-hinweis { text-align: center; margin: 10px 0 0; }
/* iPad/Safari: Datumsfeld hat sonst eine feste Eigenbreite und schiebt sich unter das Alter-Feld */
input[type="date"].eingabe { -webkit-appearance: none; appearance: none; display: block; min-width: 0; max-width: 100%; }
input[type="date"].eingabe::-webkit-date-and-time-value { text-align: left; }
.raster-feld > .feld { min-width: 0; }
.raster2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.raster3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pzc-feld { grid-template-columns: 110px minmax(0, 1fr); align-items: end; }
.pzc-text { margin: 0 0 14px; font-size: 14px; color: var(--leise); }
.sk-knopf { height: 48px; border-radius: 10px; font-size: 15px; font-weight: 700; border: 2px solid; }
.sk-knopf.gewaehlt { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--text); }
.ort-knopf {
  min-height: 48px; padding: 4px 8px; border-radius: 10px; font-size: 14px; font-weight: 600; line-height: 1.2;
  background: #fff; color: var(--text); border: 1px solid var(--rand);
  hyphens: auto; overflow-wrap: anywhere;
}
.ort-knopf.gewaehlt { background: var(--kopf); color: #fff; border-color: var(--kopf); }
.ort-knopf:disabled { cursor: not-allowed; opacity: .85; }

/* ---------- Kleinere Bildschirme / hochkant ---------- */
@media (max-width: 1100px) {
  .lage { width: auto; flex: 1 1 200px; }
  .kopf-rechts { margin-left: 0; }
}
@media (max-width: 700px) {
  #inhalt { padding: 10px; }
  #reiter { width: 100%; }
  #reiter a { flex: 1; justify-content: center; padding: 0 6px; font-size: 15px; }
  .raster3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .raster-feld, .raster2 { grid-template-columns: minmax(0, 1fr); }
  .pzc-feld { grid-template-columns: 110px minmax(0, 1fr); }
  .angezeigt { margin-left: 0; }
}

/* =====================================================================
   Etappen 3–7
   ===================================================================== */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.seite { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.seite-scroll { overflow-y: auto; margin: -16px; padding: 16px; }
.knopf { gap: 8px; }
.knopf-blau { background: var(--blau); color: #fff; }
.knopf-gruen { background: var(--sk-gruen); color: #fff; }
.knopf-orange { background: #C2410C; color: #fff; }
.knopf-rand { background: #fff; color: var(--blau); border-color: var(--blau); }
.knopf-aus, .knopf:disabled { background: #F3F4F6; color: var(--leiser); border-color: var(--rand); cursor: not-allowed; }
.knopf-warnung { background: #fff; color: #B91C1C; border-color: #B91C1C; }
.knopf-icon.klein { width: 44px; height: 44px; border-radius: 10px; }
.gestrichelt { border: 2px dashed var(--rand-dunkel); width: 100%; justify-content: flex-start; }
.link-knopf { background: none; border: none; color: var(--blau); font-weight: 600; text-decoration: underline; padding: 8px 0; min-height: 36px; text-align: left; }
.knopf-reihe { display: flex; gap: 8px; flex-wrap: wrap; }
.zeile-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.zeile-form .eingabe { flex: 1; min-width: 160px; }
.eingabe.kurz { flex: 0 0 110px; min-width: 0; }
.eingabe.gross { height: 56px; font-size: 20px; font-weight: 700; }
.klein-eingabe { height: 44px; font-size: 16px; }
.marke { font-size: 12px; font-weight: 700; border-radius: 6px; padding: 3px 8px; margin-left: 8px; }
.marke-gruen { background: #DCFCE7; color: #166534; }
.marke-blau { background: var(--blau-hell); color: var(--blau-text); }
.marke-optional { font-size: 12px; font-weight: 700; border-radius: 6px; padding: 3px 8px; background: #EEF1F4; color: var(--leise); border: 1px dashed var(--rand-dunkel); }
.pflicht { font-size: 12px; font-weight: 700; border-radius: 6px; padding: 3px 8px; background: #FEE2E2; color: #991B1B; }
.warn-text { color: #9A3412; font-weight: 600; }
.demo-link { font-size: 13px; color: var(--leise); }
.demo-hinweis { margin: 0; padding: 10px 12px; border-radius: 10px; background: #FEF3C7; color: #78350F; font-size: 14px; }
.leer-zone { list-style: none; padding: 8px; }

/* Kopfleiste: Gerät, Korb */
.geraet-knopf {
  display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; margin-top: 2px; min-height: 28px;
  background: transparent; border: 1px solid #4B5563; border-radius: 8px; color: #E5E7EB; font-size: 12px; font-weight: 600; padding: 2px 8px;
}
.geraet-knopf svg { width: 14px; height: 14px; }
#kopf-extra:empty { display: none; }
.korb {
  margin-left: 6px; height: 48px; padding: 0 12px; border-radius: 12px; border: none; background: #fff; color: var(--text);
  display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 15px;
}
.korb.huepf { animation: huepf .5s ease-out; }
@keyframes huepf { 40% { transform: scale(1.2); } }

/* Dialoge */
.dialog-huelle {
  position: fixed; inset: 0; z-index: 30; background: rgba(17, 24, 39, .5);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.dialog { width: min(560px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: 0 20px 50px rgba(0,0,0,.3); }
.dialog.breit { width: min(1000px, 100%); }
.dialog-kopf { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--rand-hell); }
.dialog-kopf h2 { margin: 0; flex: 1; font-size: 20px; }
.dialog-kopf h2:focus { outline: none; }
.dialog-inhalt { padding: 16px 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.dialog-inhalt h3 { margin: 4px 0 0; font-size: 16px; }
.dialog-fuss { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.geraet-form { display: flex; flex-direction: column; gap: 12px; }
.geraet-form p { margin: 0; }
.demo-bereich { border-top: 1px solid var(--rand-hell); padding-top: 12px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.demo-bereich p { margin: 0; }

/* Kamera */
.kamera { position: relative; background: #0B1220; border-radius: 14px; overflow: hidden; min-height: 260px; display: flex; align-items: center; justify-content: center; }
.kamera video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.kamera-dialog .kamera { aspect-ratio: 4 / 3; }
.scan-rahmen { position: relative; width: min(56%, 300px); aspect-ratio: 1; border: 4px solid rgba(255,255,255,.9); border-radius: 16px; box-shadow: 0 0 0 9999px rgba(0,0,0,.25); pointer-events: none; }
.gesichts-rahmen { position: relative; width: 38%; aspect-ratio: 3 / 4; border: 4px dashed rgba(255,255,255,.9); border-radius: 50%; pointer-events: none; }
.kamera-text { position: absolute; left: 12px; right: 12px; bottom: 10px; margin: 0; text-align: center; color: #fff; font-weight: 600; text-shadow: 0 1px 3px #000; }
.kamera-text.fehler { background: rgba(185, 28, 28, .9); border-radius: 8px; padding: 8px; text-shadow: none; }
.kamera-knopf { position: absolute; top: 10px; right: 10px; }

/* ---------- Sichten ---------- */
.sichten { display: flex; flex-direction: column; gap: 14px; }
.sichten-raster { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 14px; align-items: start; }
.pflicht-spalte .block + .block { border-top: 1px solid var(--rand-hell); padding-top: 14px; }
.speichern-knopf { min-height: 56px; font-size: 18px; }
.pflicht-spalte .sk-kacheln { grid-template-columns: repeat(2, minmax(0, 1fr)); } /* SK in zwei Reihen (Nutzer, 16.11.2026) */
.spalte { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.spalte.optional { border-style: dashed; background: #FAFBFC; }
.block { display: flex; flex-direction: column; gap: 10px; }
.block-kopf { display: flex; align-items: center; gap: 10px; }
.block-kopf h2 { margin: 0; font-size: 18px; flex: 1; }
.feld-titel { font-size: 14px; font-weight: 700; }
.bearbeiten-leiste { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--blau-hell); color: var(--blau-text); border-radius: 10px; padding: 6px 6px 6px 12px; }
.pak-eingabe { display: flex; gap: 8px; }
.pak-eingabe .eingabe { flex: 1; }
.pak-eingabe .knopf { min-height: 56px; padding: 0 16px; }
.pak-erkannt { display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 2px solid var(--sk-gruen); background: #F0FDF4; border-radius: 12px; padding: 8px 8px 8px 14px; }
.pak-gross { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.sk-kacheln { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sk-kachel { min-height: 84px; border-radius: 14px; border: 2px solid; display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 10px 12px; text-align: left; }
.sk-kachel.gewaehlt { box-shadow: 0 0 0 3px #fff, 0 0 0 7px var(--text); }
.sk-kachel-titel { display: flex; align-items: center; justify-content: space-between; font-size: 20px; font-weight: 800; }
.sk-kachel-text { font-size: 13px; font-weight: 600; opacity: .95; }
.sk-haken { display: inline-flex; background: #fff; color: var(--text); border-radius: 50%; padding: 2px; }
.sk-selten { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.sk-klein { min-height: 44px; padding: 0 12px; border-radius: 10px; display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; background: #fff; border: 1px solid var(--rand); }
.sk-klein.gewaehlt { background: var(--rand-hell); border: 3px solid var(--text); }
.sk-punkt { width: 14px; height: 14px; border-radius: 4px; border: 2px solid; }
.abschluss { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--rand-hell); padding-top: 12px; }
.abschluss .knopf { flex: 1; }
/* Sichten: Speichern abgesetzt über die ganze Breite (gilt für Pflicht- und freiwillige Angaben) */
.speichern-leiste { position: sticky; bottom: 0; z-index: 3; display: flex; align-items: center; gap: 16px; padding: 12px 16px;
  box-shadow: 0 -6px 18px rgba(0,0,0,.08); }
.speichern-leiste > span { flex: 1; }
.speichern-leiste .speichern-knopf { min-width: 280px; min-height: 56px; font-size: 18px; }
.dialog-kopf-knoepfe { display: flex; gap: 8px; }
.dialog-kopf-knoepfe .knopf { min-height: 44px; padding: 0 18px; }
.flug-karte { position: fixed; left: 0; top: 0; z-index: 80; pointer-events: none; box-shadow: 0 10px 24px rgba(0,0,0,.3); }
@keyframes ziel-pulsiert { 0% { box-shadow: 0 0 0 0 rgba(46,125,50,.8); } 100% { box-shadow: 0 0 0 14px rgba(46,125,50,0); } }
#reiter a.ziel-pulsiert { animation: ziel-pulsiert .7s ease-out; }
.status-ok { display: inline-flex; align-items: center; gap: 6px; color: #166534; font-weight: 700; }
.status-fehlt { color: #9A3412; font-weight: 700; }

/* Ort / Status – Verlauf: grün nur, wo die Person wirklich war */
.vl-spalte { display: flex; flex-direction: column; align-items: stretch; }
.pfeil-runter { display: flex; justify-content: center; color: var(--rand-dunkel); height: 18px; align-items: center; }
.vl-feld {
  display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 10px;
  min-height: 44px; padding: 3px 12px 3px 8px; border-radius: 12px; text-align: left; font-size: 15px; font-weight: 600;
}
.vl-symbol { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; }
.vl-zeit { font-size: 13px; font-variant-numeric: tabular-nums; }
.vl-nie { background: #F9FAFB; color: var(--leise); border: 1px dashed var(--rand-dunkel); }
.vl-nie .vl-symbol { background: var(--rand-hell); color: var(--leise); }
.vl-war { background: #DCFCE7; color: #14532D; border: 2px solid var(--sk-gruen); }
.vl-war .vl-symbol { background: var(--sk-gruen); color: #fff; }
.vl-war .vl-symbol svg { width: 16px; height: 16px; }
.vl-jetzt { background: var(--kopf); color: #fff; border: 2px solid var(--kopf); box-shadow: 0 0 0 3px var(--blau-hell); }
.vl-jetzt .vl-symbol { background: #fff; color: var(--text); }
.vl-jetzt .vl-zeit { font-weight: 700; font-size: 12px; }
.vl-ende { display: grid; grid-template-columns: minmax(0, .8fr) auto minmax(0, 1.2fr); gap: 8px; align-items: center; /* „In der Klinik“ mittig zum „Anderen Verbleib“ (Nutzer, 16.11.2026) */ }
.vl-oder { align-self: center; font-size: 13px; color: var(--leise); }
.vl-klinik { min-height: 48px; border-radius: 12px; border: 1px dashed var(--rand-dunkel); background: #F3F4F6; color: var(--leiser); display: flex; flex-direction: column; justify-content: center; padding: 6px 10px; font-weight: 600; font-size: 14px; }
.vl-klinik .els { margin: 4px 0 0; align-self: flex-start; }
.vl-klinik.jetzt { background: var(--kopf); color: #fff; border-style: solid; }
.verbleib { margin: 0; border: 1px dashed var(--rand-dunkel); border-radius: 12px; padding: 6px 8px 8px; min-width: 0; }
.verbleib.jetzt { border: 2px solid var(--kopf); }
.verbleib legend { font-size: 13px; font-weight: 800; padding: 0 4px; color: var(--text2); }
.verbleib-knoepfe { display: flex; flex-direction: column; gap: 6px; }
.vb-knopf { min-height: 44px; border-radius: 10px; border: 1px solid var(--rand); background: #fff; font-size: 14px; font-weight: 600; text-align: left; padding: 0 10px; }
.vb-knopf.gewaehlt { background: var(--kopf); color: #fff; border-color: var(--kopf); }
.anpassen-knopf { align-self: flex-start; }

/* Foto, PZC */
.foto-zeile { display: flex; gap: 12px; align-items: center; }
.foto-vorschau { width: 96px; height: 120px; object-fit: cover; border-radius: 10px; border: 1px solid var(--rand); }
.pzc-chip { display: flex; align-items: center; gap: 10px; border: 2px solid var(--kopf); border-radius: 12px; padding: 6px 6px 6px 12px; }
.pzc-chip b { font-size: 18px; }
.pzc-chip span { flex: 1; min-width: 0; }
.pzc-auswahl { display: flex; flex-direction: column; gap: 10px; border: 1px solid var(--rand); border-radius: 12px; padding: 10px; background: #fff; }
.pzc-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pzc-kachel { min-height: 56px; border-radius: 10px; border: 1px solid var(--rand-dunkel); background: #fff; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 6px 10px; text-align: left; font-size: 14px; }
.pzc-kachel b { font-size: 16px; }
.pzc-kachel.gewaehlt { background: var(--kopf); color: #fff; border-color: var(--kopf); }
/* PZC-Auswahl in drei Stufen (Fenster) */
.pzc-stufen { display: flex; flex-direction: column; gap: 8px; }
.pzc-oben { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.pzc-oben .knopf-icon { width: 40px; height: 40px; }
.pzc-pfad { border: none; background: var(--blau-sehrhell, #EFF6FF); color: var(--blau); font-weight: 700; border-radius: 999px; padding: 6px 10px; min-height: 36px; font-size: 13px; text-align: left; }
.pzc-pfad.aktiv { background: var(--blau); color: #fff; }
.pzc-pfeil { color: #9CA3AF; font-weight: 700; }
.pzc-stufe { font-size: 13px; font-weight: 800; color: var(--leise); text-transform: uppercase; letter-spacing: .04em; }


/* Archiv / Zeitstrahl */
.archiv-karte { padding: 16px; }
.archiv { border-top: 1px solid var(--rand-hell); padding-top: 12px; }
.archiv-karte .archiv { border-top: none; padding-top: 0; }
.archiv h3 { margin: 0; font-size: 16px; }
.archiv > p { margin: 2px 0 10px; }
.zeitstrahl { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 3px solid var(--rand); display: flex; flex-direction: column; gap: 12px; }
.zeitstrahl > li { position: relative; }
.zeitstrahl > li::before { content: ""; position: absolute; left: -26px; top: 4px; width: 13px; height: 13px; border-radius: 50%; background: #fff; border: 3px solid var(--blau); }
.zs-kopf { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 14px; }
.zs-kopf time { font-variant-numeric: tabular-nums; color: var(--leise); }
.zs-geraet { font-size: 12px; font-weight: 700; background: #EEF1F4; border-radius: 6px; padding: 2px 7px; color: var(--text2); }
.zs-details { margin: 4px 0 0; padding: 0; list-style: none; font-size: 14px; }
.zs-details s { color: var(--leiser); }

/* Orte-Dialog */
.orte-raster { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; grid-template-areas: "verlauf verbleib" "vorschlaege vbvorschlaege"; align-items: stretch; }
/* Beide Vorschlag-Kästen gleich hoch (Nutzer, 16.11.2026) */
.o-vorschlaege .dnd-vorschlaege, .o-vb-vorschlaege .dnd-vorschlaege { flex: 1; align-content: flex-start; }
.o-verlauf { grid-area: verlauf; } .o-verbleib { grid-area: verbleib; }
.o-vorschlaege { grid-area: vorschlaege; } .o-vb-vorschlaege { grid-area: vbvorschlaege; }
.vb-liste.ziel { outline: 2px dashed var(--blau); outline-offset: 4px; border-radius: 10px; }
/* Ziehen: keine Textmarkierung (iPad/Safari markierte sonst den Namen) */
.dnd-item, .dnd-item * { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.dnd-item input { -webkit-user-select: text; user-select: text; }
.dnd-zieht, .dnd-zieht * { -webkit-user-select: none !important; user-select: none !important; }
.orte-raster > section { display: flex; flex-direction: column; gap: 8px; }
.orte-raster p { margin: 0; }
.dnd-liste, .dnd-vorschlaege, .vb-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.dnd-vorschlaege { flex-direction: row; flex-wrap: wrap; min-height: 60px; padding: 8px; border: 2px dashed var(--rand); border-radius: 12px; }
.dnd-vorschlaege.ziel { border-color: var(--blau); background: var(--blau-sehrhell); }
.dnd-item {
  display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 4px 4px 4px 6px; border-radius: 10px;
  background: #fff; border: 1px solid var(--rand-dunkel); font-weight: 600; touch-action: none; user-select: none; cursor: grab;
}
.dnd-item.vorschlag { border-style: dashed; background: #F9FAFB; }
.dnd-item .griff { display: inline-flex; color: var(--leiser); padding: 0 4px; }
.dnd-name { flex: 1; min-width: 0; }
.dnd-quelle { opacity: .3; }
.dnd-geist { position: fixed; left: 0; top: 0; z-index: 60; pointer-events: none; box-shadow: 0 12px 30px rgba(0,0,0,.3); cursor: grabbing; }
.dnd-linie { height: 4px; border-radius: 2px; background: var(--blau); list-style: none; }
.vb-eintrag { display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 4px 4px 4px 12px; border-radius: 10px; border: 1px solid var(--rand-dunkel); font-weight: 600; }
.vb-eintrag .dnd-name, .vb-eintrag > span { flex: 1; }
.vb-eintrag input, .dnd-item input { flex: 1; }

.sonstige-form { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.sonstige-form .feld { width: 100%; }
.segment { display: inline-flex; background: #EEF1F4; border-radius: 10px; padding: 4px; gap: 4px; }
.segment label { position: relative; }
.segment input { position: absolute; opacity: 0; }
.segment span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; border-radius: 8px; font-weight: 600; font-size: 14px; cursor: pointer; }
.segment input:checked + span { background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.15); }
.segment input:focus-visible + span { outline: 3px solid var(--blau); }
.info-kasten { background: #F3F4F6; border-radius: 10px; padding: 10px 12px; font-size: 14px; color: var(--text2); }

/* ---------- Check-In ---------- */
.checkin { flex: 1; min-height: 0; display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 14px; }
.ci-links { padding: 16px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; }
.ci-links h2 { margin: 0; font-size: 18px; }
.ci-links p { margin: 0; }
.rollen { display: flex; flex-direction: column; gap: 8px; }
.rolle { min-height: 56px; border-radius: 12px; display: flex; align-items: center; gap: 10px; padding: 0 14px; font-size: 16px; font-weight: 600; background: #fff; border: 1px solid var(--rand); text-align: left; }
.rolle.gewaehlt { background: var(--kopf); color: #fff; border: 2px solid var(--kopf); }
.rolle-nr { width: 26px; height: 26px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; background: #EEF1F4; color: var(--leise); }
.rolle.gewaehlt .rolle-nr { background: #fff; color: var(--text); }
/* Name und Zusatz „Anderer Verbleib“ untereinander – alle Zeilen gleich hoch, nichts springt */
.rolle-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.rolle-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rolle-typ { font-size: 11px; font-weight: 700; opacity: .7; margin-top: 2px; }
.ci-rechts { display: flex; flex-direction: column; gap: 12px; min-height: 0; overflow-y: auto; }
.ci-leiste { display: flex; align-items: center; gap: 10px; padding: 12px 16px; flex-wrap: wrap; }
.ci-rolle { font-size: 18px; background: var(--kopf); color: #fff; border-radius: 8px; padding: 4px 10px; }
.ci-zahl { margin-left: auto; font-weight: 700; }
.ci-kamera { min-height: 300px; flex-shrink: 0; }
.ci-flash { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(90%, 620px); }
.flash { display: flex; align-items: center; gap: 18px; padding: 18px 24px; border-radius: 16px; animation: flashEin .25s ease-out; }
.flash div { display: flex; flex-direction: column; gap: 4px; }
.flash b { font-size: 24px; }
.flash-ok { background: #15803D; color: #fff; }
.flash-unbekannt { background: #FFEDD5; color: #7C2D12; border: 3px solid #9A3412; }
.flash-gleich { background: #fff; color: var(--text); border: 3px solid var(--rand-dunkel); }
@keyframes flashEin { from { transform: scale(.9); opacity: 0; } }
.sk-unbekannt { background: #FFEDD5; color: #7C2D12; border-color: #9A3412; }
#ci-manuell { padding: 10px 14px; }
.ci-log-karte { padding: 12px 16px; }
.ci-log-karte h3 { margin: 0 0 8px; font-size: 16px; }
.ci-log { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.log-zeile { display: flex; align-items: center; gap: 12px; min-height: 56px; border-bottom: 1px solid var(--rand-hell); flex-wrap: wrap; padding: 4px 0; }
.log-text { flex: 1; min-width: 180px; color: var(--text2); }
.log-zeile.rueckgaengig { opacity: .55; }
.log-zeile.rueckgaengig .pak, .log-zeile.rueckgaengig .log-text { text-decoration: line-through; }

/* ---------- Zuweisung ---------- */
.zuweisung { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.zw-leiste { display: flex; align-items: center; gap: 12px; justify-content: space-between; flex-wrap: wrap; }
.sperre { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 22px; border: 1px solid var(--rand-dunkel); background: #fff; font-weight: 700; font-size: 14px; }
.sperre.an { background: #7C2D12; color: #fff; border-color: #7C2D12; }
.sperre-hinweis { margin: 0; padding: 8px 12px; border-radius: 10px; background: #FFEDD5; color: #7C2D12; font-size: 14px; }
.zw-buehne { flex: 1; min-height: 0; overflow: hidden; }
.zw-buehne { position: relative; }
.zw-spur {
  display: grid; grid-template-columns: 360px minmax(0, 1fr) 360px; gap: 12px; height: 100%; width: calc(100% + 372px);
  transition: transform .42s cubic-bezier(.2,.8,.2,1); touch-action: pan-y;
}
.zw-spur.rechts { transform: translateX(-372px); }
.zw-pfeil {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5; width: 44px; min-height: 140px; padding: 8px 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--rand-dunkel); background: #fff; color: var(--text); box-shadow: 0 4px 14px rgba(0,0,0,.15);
  font-size: 13px; font-weight: 700;
}
.zw-pfeil span { writing-mode: vertical-rl; }
.zw-pfeil-links { left: 0; border-radius: 0 12px 12px 0; }
.zw-spur.rechts .zw-fz { padding-left: 54px; }
.zw-spur:not(.rechts) .zw-fz { padding-right: 54px; }
.fz[data-ziehbar] { cursor: pointer; }
.zw-pfeil-links span { transform: rotate(180deg); }
.zw-pfeil-rechts { right: 0; border-radius: 12px 0 0 12px; }
.zw-pfeil-rechts svg { transform: rotate(180deg); }
.spalten-titel { margin: 0; font-size: 17px; }
.gruppen-titel { margin: 4px 0 0; font-size: 14px; color: var(--text2); display: flex; align-items: center; gap: 6px; }
.fz.anfahrt { background: #F3F4F6; border-style: dashed; color: var(--leise); }
/* Patient:innen, die noch nicht an der Ladezone sind: grau und inaktiv wie Fahrzeuge auf Anfahrt */
.zw-person-huelle.kommt .zw-person { background: #F7F8FA; border-style: dashed; border-color: #E5E7EB; color: #9CA3AF; cursor: default; opacity: .6; }
.zw-person-huelle.kommt .sk-badge { opacity: .5; }
.zw-person-huelle.kommt .info-knopf { opacity: .6; }
.kommt-titel { margin-top: 12px; }
.kommt-gruppe { margin: 4px 0 0; font-size: 13px; font-weight: 700; color: var(--leise); }
.anfahrt-text { margin: 0; }
.fz-wahl { display: flex; flex-direction: column; align-items: flex-start; text-align: left; background: none; border: none; padding: 0; min-height: 44px; min-width: 0; color: inherit; }
.fz-wahl:disabled { cursor: default; color: inherit; }
.fz[data-ziehbar], .zw-person { touch-action: pan-y; }
/* body > … : stärker als „.zw-person-huelle { position: relative }“ weiter unten – sonst landet der Geist beim Ziehen einer Person außerhalb des Bildschirms */
body > .zw-geist { position: fixed; left: 0; top: 0; z-index: 60; pointer-events: none; opacity: .92; box-shadow: 0 16px 36px rgba(0,0,0,.3); margin: 0; }
.zw-quelle { opacity: .35; }
.drop-ziel { outline: 4px solid var(--blau); outline-offset: 2px; background: var(--blau-sehrhell) !important; }
/* Klinikvorschlag in Sichten / Bearbeiten */
.kv-liste { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.kv-eintrag { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border: 1px solid var(--rand); border-radius: 10px; background: #fff; }
.kv-eintrag { text-align: left; width: 100%; font: inherit; color: inherit; min-height: 52px; }
.kv-eintrag.kv-gewaehlt { border: 2px solid var(--sk-gruen); background: #F0FDF4; }
.kv-eintrag.kv-gewaehlt .kv-name svg { color: var(--sk-gruen); width: 18px; height: 18px; vertical-align: -3px; margin-right: 4px; }
.kv-best { font-size: 12px; font-weight: 600; color: var(--leise); }
.grund-vorschlag { color: #14532D; background: #DCFCE7; display: inline-flex; align-items: center; gap: 4px; }
.grund-vorschlag svg { width: 14px; height: 14px; }
.kv-name { font-weight: 700; }
.kv-voll, .kv-fehlt { color: #B45309; }
/* Ziehen: alle möglichen Ziele gestrichelt markieren (Person → Fahrzeug, Fahrzeug → Klinik) */
body > .zw-geist { transition: transform 0s, scale .15s ease-out, rotate .15s ease-out; }
body > .zw-geist.angehoben { scale: 1.04; rotate: -1.5deg; }
.zieht-person .fz[data-drop-fz], .zieht-fahrzeug .kl-karte[data-drop-kl] {
  outline: 3px dashed var(--blau); outline-offset: 2px; transition: transform .15s ease-out, background .15s;
}
.zieht-person .fz[data-drop-fz].drop-ziel, .zieht-fahrzeug .kl-karte.drop-ziel { outline-style: solid; outline-width: 4px; transform: scale(1.02); }
.aufleuchten { animation: aufleuchten .9s ease-out; }
@keyframes aufleuchten { 0% { box-shadow: 0 0 0 0 rgba(22,163,74,.7); } 100% { box-shadow: 0 0 0 16px rgba(22,163,74,0); } }
@media (prefers-reduced-motion: reduce) { body > .zw-geist.angehoben { scale: none; rotate: none; } .zieht-person .fz.drop-ziel, .zieht-fahrzeug .kl-karte.drop-ziel { transform: none; } }
.kl-fz { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; padding: 8px; border-radius: 10px; border: 2px solid var(--sk-gruen); background: #F0FDF4; }
.kl-fz-kopf { display: flex; align-items: center; gap: 8px; }
.kl-fz-kopf > span { flex: 1; }
.kl-fz-insassen { display: flex; gap: 4px; flex-wrap: wrap; }
.korb-status { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.els-status { font-size: 13px; font-weight: 700; border-radius: 6px; padding: 2px 7px; background: #FEF3C7; color: #78350F; align-self: flex-start; }
.els-status.unterwegs { background: #DCFCE7; color: #166534; }
@media (prefers-reduced-motion: reduce) { .zw-spur { transition: none; } }
.zw-pat, .zw-fz, .zw-kl { min-height: 0; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.segmente { display: flex; background: #EEF1F4; border-radius: 12px; padding: 4px; gap: 4px; flex-shrink: 0; }
.seg { flex: 1; min-height: 44px; border: none; border-radius: 9px; background: transparent; font-size: 14px; font-weight: 700; color: var(--text2); }
.seg.an { background: #fff; color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.zw-liste { display: flex; flex-direction: column; gap: 8px; }
.zw-person { display: flex; flex-direction: column; gap: 4px; width: 100%; text-align: left; padding: 10px 12px; border-radius: 12px; background: #fff; border: 2px solid var(--rand-hell); }
.zw-person.gewaehlt { background: var(--blau-hell); border-color: var(--blau); }
.zw-person-kopf { display: flex; align-items: center; gap: 10px; }
.sk-badge.klein { min-width: 64px; height: 26px; font-size: 13px; }
.zw-unter { font-size: 13px; font-weight: 600; }
.zw-unter.gut { color: #166534; }
.zw-unter.offen { color: #9A3412; }
.zw-chips { flex-shrink: 0; }
.fz-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; align-items: start; }
.fz { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 14px; background: #fff; border: 1px solid var(--rand-dunkel); }
.fz.ctx { background: var(--blau-sehrhell); border: 3px solid var(--blau); }
.fz.bereit { border: 2px solid var(--sk-gruen); }
.fz-kopf { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.fz-kopf > div { display: flex; flex-direction: column; }
.fz-name { font-size: 17px; }
.belegung { font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; border-radius: 6px; padding: 3px 7px; background: #EEF1F4; color: var(--text2); }
.belegung.voll { background: #FEE2E2; color: #991B1B; }
.slots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.slots.eins { grid-template-columns: 1fr; }
.slot { display: flex; align-items: center; gap: 6px; min-height: 48px; padding: 4px 4px 4px 10px; border-radius: 10px; border: 2px solid; }
.slot-text { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 13px; line-height: 1.2; }
.slot-text b { font-size: 14px; white-space: nowrap; }
.slot-x { width: 40px; height: 40px; flex-shrink: 0; border-radius: 8px; border: none; background: rgba(255,255,255,.85); color: var(--text); display: flex; align-items: center; justify-content: center; }
.slot-frei { background: #F9FAFB; color: var(--leise); border: 2px dashed var(--rand-dunkel); font-size: 14px; }
.fz-hinweis { margin: 0; font-size: 13px; font-weight: 600; color: #991B1B; line-height: 1.3; }
.fz-knoepfe { display: flex; gap: 6px; flex-wrap: wrap; }
.fz-knoepfe .knopf { flex: 1; padding: 0 8px; }
.kl-kopfzeile { display: flex; align-items: center; gap: 10px; }
.kl-kopfzeile > div { display: flex; flex-direction: column; }
.kl-liste { display: flex; flex-direction: column; gap: 8px; }
.kl-karte { display: flex; flex-direction: column; gap: 6px; border-radius: 12px; padding: 10px 12px; background: #fff; border: 1px solid var(--rand); }
.kl-kopf { display: flex; flex-direction: column; }
.grund { align-self: flex-start; font-size: 12px; font-weight: 700; border-radius: 6px; padding: 3px 8px; }
.grund-passt { background: #DCFCE7; color: #166534; }
.grund-fehlt { background: #FFEDD5; color: #9A3412; }
.grund-voll { background: #FEE2E2; color: #991B1B; }
.kl-fuss { display: flex; align-items: center; gap: 8px; }
.kl-fuss .knopf { margin-left: auto; min-width: 104px; }
.kaps { display: flex; gap: 6px; flex-wrap: wrap; }
.kap { display: inline-flex; align-items: center; height: 28px; padding: 0 7px; border-radius: 6px; font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.kap.meine { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--text); }
.kap.null { opacity: .45; }

/* Korb */
.korb-tabelle { display: flex; flex-direction: column; overflow-x: auto; }
.korb-zeile { display: grid; grid-template-columns: 90px 110px 100px minmax(160px, 1fr) 190px 190px; gap: 8px; align-items: center; min-height: 56px; border-bottom: 1px solid var(--rand-hell); min-width: 880px; }
.korb-sortiert { margin-left: auto; }
.korb-kopf { min-height: 40px; font-size: 13px; font-weight: 700; color: var(--text2); background: var(--flaeche2); }
.korb-aktionen { display: flex; flex-direction: column; align-items: flex-start; }

/* Übersicht: Spalten-Popup, Aufblinken */
.spalten-popup { position: fixed; z-index: 25; box-shadow: 0 12px 30px rgba(0,0,0,.2); padding: 12px; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; }
.popup-kopf { display: flex; align-items: center; justify-content: space-between; }
.popup-abschnitt { display: flex; flex-direction: column; gap: 6px; }
.zeile.blitz { animation: blitz 1.6s ease-out; }
@keyframes blitz { from { background: #FEF08A; } }
.ort-typ { display: block; font-size: 11px; font-weight: 600; opacity: .7; }
@media (prefers-reduced-motion: reduce) { .zeile.blitz, .korb.huepf, .flash { animation: none; } }

@media (max-width: 1100px) {
  .sichten-raster { grid-template-columns: minmax(0, 1fr) 320px; }
  .pflicht-spalte .sk-kacheln { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .checkin { grid-template-columns: 260px minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .sichten-raster { grid-template-columns: minmax(0, 1fr); }
  .checkin { grid-template-columns: minmax(0, 1fr); overflow-y: auto; }
  .ci-rechts { overflow: visible; }
  .orte-raster { grid-template-columns: minmax(0, 1fr); grid-template-areas: "verlauf" "vorschlaege" "verbleib" "vbvorschlaege"; }
  .zw-buehne { overflow-y: auto; }
  .zw-spur, .zw-spur.rechts { display: flex; flex-direction: column; width: 100%; height: auto; transform: none; }
  .zw-pat, .zw-fz, .zw-kl { overflow: visible; }
  .zw-pfeil { display: none; }
  .zw-spur .zw-fz, .zw-spur.rechts .zw-fz { padding: 12px; }
}

/* Orte-Dialog: Pfeil am Verlauf, „Sonstiges“ zum Eintippen */
.vl-pfeil-rahmen { position: relative; padding-left: 26px; }
.vl-pfeil-rahmen::before { content: ""; position: absolute; left: 9px; top: 10px; bottom: 14px; width: 3px; border-radius: 2px; background: var(--rand-dunkel); }
.vl-pfeil-rahmen::after { content: ""; position: absolute; left: 3px; bottom: 2px; border: 8px solid transparent; border-top: 12px solid var(--rand-dunkel); border-bottom: 0; }
.sonstiges {
  display: flex; align-items: center; gap: 6px; min-height: 52px; padding: 0 10px; border-radius: 10px; list-style: none;
  border: 2px dashed var(--blau); background: var(--blau-sehrhell); color: var(--blau-text);
}
.sonstiges input { border: none; background: transparent; font-size: 16px; font-weight: 600; min-width: 0; width: 150px; height: 44px; color: var(--text); }
.sonstiges input::placeholder { color: #6B7280; font-style: italic; }
.sonstiges input:focus { outline: none; }
.sonstiges:focus-within { background: #fff; border-style: solid; }
.sonstiges.breit input { flex: 1; width: auto; }

/* Übersicht: Gruppierung bei mehreren Filterwerten */
.gruppen-kopf {
  position: sticky; top: 48px; z-index: 1; display: flex; align-items: center; gap: 12px; min-width: 1150px;
  padding: 4px 12px; background: #E8EEF6; border-bottom: 1px solid var(--rand); font-size: 15px;
}
.gruppen-kopf .link-knopf { font-size: 14px; }
.els-banner { font-size: 13px; font-weight: 700; border-radius: 6px; padding: 4px 8px; background: var(--sk-gruen); color: #fff; }

/* Zuweisung: Mini-Anzeige Klinikplätze (von uns zugeordnet / gemeldet) */
.kl-kopf-zeile { display: flex; align-items: flex-start; gap: 8px; }
.kl-kopf-zeile .kl-kopf { flex: 1; min-width: 0; }
.info-knopf { color: var(--blau); border-color: var(--blau); }
.kap-legende { margin: 0; }
.mini-kap { display: inline-grid; grid-template-columns: auto auto; grid-template-rows: auto 4px; column-gap: 5px; row-gap: 3px; align-items: center; padding: 3px 6px; border-radius: 7px; border: 1px solid var(--rand); background: #fff; font-size: 13px; font-variant-numeric: tabular-nums; }
.mini-kap.meine { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--text); }
.mini-sk { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 20px; border-radius: 5px; font-size: 12px; font-weight: 800; }
.mini-zahl b { font-size: 15px; }
.mini-balken { grid-column: 1 / -1; height: 4px; border-radius: 2px; background: #E5E7EB; overflow: hidden; }
.mini-balken span { display: block; height: 100%; background: var(--sk-gruen); }
.mini-kap.voll .mini-balken span { background: #D97706; }
.mini-kap.ueber { border-color: #B91C1C; background: #FEF2F2; }
.mini-kap.ueber .mini-balken span { background: #B91C1C; }
.mini-kap.ueber .mini-zahl { color: #991B1B; }

/* Klinik-Details (Popup) */
.kd-kopf { margin: 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; color: var(--leise); font-size: 14px; }
.kd-meldung { font-weight: 700; color: var(--text); }
.kd-vorschau { margin: 0; padding: 8px 10px; border-radius: 10px; background: var(--blau-sehrhell); border: 1px solid var(--blau); font-size: 14px; }
.kd-raster { display: grid; grid-template-columns: 64px 250px minmax(0, 1fr); gap: 8px 12px; align-items: center; }
.kd-zahl { font-size: 14px; }
.kd-zahl b { font-size: 16px; }
.kd-frei { font-weight: 800; border-radius: 5px; padding: 1px 6px; margin-left: 4px; white-space: nowrap; }
.kd-frei.ok { background: #DCFCE7; color: #166534; }
.kd-frei.knapp { background: #FEF3C7; color: #92400E; }
.kd-frei.ueber { background: #FEE2E2; color: #991B1B; }
.strahl { position: relative; height: 34px; display: grid; grid-template-columns: repeat(12, 1fr); border: 1px solid #E5E7EB; border-radius: 6px; overflow: hidden; }
.strahl > span:not([class*="strahl-"]) { border-right: 1px solid #EEF1F4; }
.strahl > span.vergangen { background: #F6F7F9; }
.strahl-jetzt { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: var(--kopf); }
.strahl-pkt { position: absolute; width: 13px; height: 13px; border-radius: 4px; transform: translateX(-50%); border: 2px solid transparent; }
.strahl-pkt.unterwegs { border-color: #111827; }
.strahl-pkt.zugewiesen { background: #fff !important; border: 2px dashed #111827; }
.strahl-pkt.vorschau { box-shadow: 0 0 0 3px var(--blau); }
.strahl-rand { position: absolute; top: 8px; font-size: 11px; font-weight: 700; color: var(--leise); background: rgba(255,255,255,.85); padding: 0 3px; }
.strahl-rand.links { left: 2px; }
.strahl-rand.rechts { right: 2px; }
.strahl-achse { display: flex; justify-content: space-between; font-size: 12px; color: var(--leise); margin-top: -4px; }
.kd-legende { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--leise); }
.kd-legende i.strahl-pkt { position: static; display: inline-block; transform: none; vertical-align: -2px; margin-right: 4px; }
.kd-unten { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 20px; }
.kd-liste { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; }
.kd-liste li { display: flex; align-items: center; gap: 10px; min-height: 40px; border-bottom: 1px solid var(--rand-hell); font-size: 14px; flex-wrap: wrap; }
.kd-liste li .zahl { margin-left: auto; }
.kd-melden { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; margin-top: 8px; }
.kd-melden label { display: flex; flex-direction: column; font-size: 13px; font-weight: 700; gap: 4px; }
.kd-melden .eingabe { width: 80px; }
@media (max-width: 760px) {
  .kd-raster { grid-template-columns: 56px minmax(0, 1fr); }
  .kd-raster .strahl, .kd-raster .strahl-achse { grid-column: 1 / -1; }
  .kd-unten { grid-template-columns: minmax(0, 1fr); }
}
.kl-fuss .kaps { flex-wrap: nowrap; gap: 4px; }
.kl-fuss .knopf { min-width: 0; padding: 0 12px; }
.mini-kap { padding: 2px 5px; column-gap: 4px; font-size: 12px; }
.mini-sk { min-width: 20px; height: 18px; font-size: 11px; }
.mini-zahl b { font-size: 14px; }
.kd-stand { display: block; font-size: 11px; color: var(--leise); }
.bearbeiten-dialog .dialog-inhalt { background: var(--grund); }
.bearbeiten-dialog.dialog.breit { width: min(1220px, 100%); }
/* Kopfleiste kompakter, damit mit T und Summe alles in eine Zeile passt (1280 px) */
.lage { width: 210px; }
#reiter a { padding: 0 15px; }
#zaehler { gap: 4px; }
.zaehler { padding: 0 7px; font-size: 13px; }
.online { margin-left: 4px; }

/* Kopfleiste: SK I–III mit geschweifter Klammer und Σ */
#zaehler { align-items: flex-start; }
.zaehler-gruppe { display: inline-flex; flex-direction: column; align-items: stretch; }
.zaehler-reihe { display: flex; gap: 4px; }

/* Bearbeiten-Popup */
.zuweisung-nachtraeglich { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--rand-hell); padding-top: 12px; }
.bearbeiten-dialog .bearbeiten-leiste { padding: 10px 12px; }
.link-pak { display: inline-flex; align-items: center; gap: 4px; background: none; border: none; padding: 0; min-height: 44px; color: var(--blau); text-decoration: underline; font-weight: 700; }
.link-pak svg { width: 16px; height: 16px; }
.korb-zeile.klickbar { cursor: pointer; }
.korb-zeile.klickbar:hover { background: #F8FAFC; }

/* Zuweisung: Personen mit ⓘ, Filter, Fahrzeug-Liste */
.zw-person-huelle { display: flex; align-items: stretch; gap: 6px; touch-action: pan-y; }
.zw-person-huelle .zw-person { flex: 1; min-width: 0; }
.person-info { align-self: center; }
.titel-filter { display: inline-flex; align-items: center; gap: 6px; background: none; border: none; padding: 0; min-height: 44px; font: inherit; font-weight: 700; color: inherit; }
.titel-filter span { font-weight: 600; font-size: 14px; }
.titel-filter svg { color: var(--blau); }
.zw-filter { padding: 10px; display: flex; flex-direction: column; gap: 8px; border-color: var(--blau); }
.spalten-kopf { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.segment-klein { display: inline-flex; background: #EEF1F4; border-radius: 10px; padding: 3px; gap: 3px; }
.segment-klein button { min-height: 38px; padding: 0 12px; border: none; border-radius: 8px; background: transparent; font-weight: 700; font-size: 13px; color: var(--text2); }
.segment-klein button.an { background: #fff; color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.fz-liste { display: flex; flex-direction: column; gap: 6px; }
.fz.fz-zeile { flex-direction: row; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 10px; flex-wrap: wrap; }
.fz-zeile .fz-wahl { min-width: 150px; }
.fz-zeile .fz-wahl > span { white-space: nowrap; }
.fz-zeile-insassen { flex: 1; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; min-width: 120px; }
.fz-zeile-insassen .sk-badge { gap: 2px; padding-right: 2px; }
.mini-x { width: 28px; height: 22px; border: none; border-radius: 5px; background: rgba(255,255,255,.85); color: var(--text); display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.mini-x svg { width: 12px; height: 12px; }
.fz-zeile .knopf { min-height: 40px; }

/* Klammer unter SK I–III: Summe mittig, Arme gehen aus der Mitte der Schrift nach links/rechts und biegen nach oben */
.klammer { display: flex; align-items: flex-start; margin: 1px 2px 0; }
.klammer-arm { flex: 1; height: 8px; border-bottom: 1.5px solid #9CA3AF; }
.klammer-arm.links { border-left: 1.5px solid #9CA3AF; border-bottom-left-radius: 7px; }
.klammer-arm.rechts { border-right: 1.5px solid #9CA3AF; border-bottom-right-radius: 7px; }
.summe-text { padding: 0 6px; font-size: 12px; font-weight: 800; color: #fff; line-height: 16px; white-space: nowrap; }

/* Patientenkachel: ⓘ klein oben rechts in der Kachel */
.zw-person-huelle { position: relative; }
.zw-person-huelle .zw-person { padding-right: 44px; }
.person-info.knopf-icon { position: absolute; top: 6px; right: 6px; width: 34px; height: 34px; border-radius: 8px; border-width: 1px; background: #fff; }
.person-info svg { width: 18px; height: 18px; }

/* Sichten: großer Scan-Knopf, eingeklappte Orte; Orte-Dialog: gesperrt */
.scan-gross { width: 100%; min-height: 64px; font-size: 19px; }
.orte-mehr { align-self: flex-start; margin-top: 8px; }
/* „Einklappen“ klein oben an der Überschrift „Ort / Status“ (Nutzer, 16.11.2026) */
.orte-weniger { display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 0 8px; font-size: 14px; font-weight: 600; }
.orte-weniger svg { width: 16px; height: 16px; transform: rotate(180deg); }
.orte-weniger.orte-auf svg { transform: none; }
.orte-unten { align-self: center; }
.gesperrt-marke { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--leise); padding: 0 8px; }
.gesperrt-marke svg { width: 16px; height: 16px; }
.dnd-item.gesperrt { background: #F8FAFC; }

/* ---------- SK-Rahmen einheitlich (Nutzer, 16.11.2026) ----------
   Vorher setzten Badge, Kachel, Slot usw. „border: 2px solid“ ohne Farbe → Rahmen in Schriftfarbe:
   bei SK II dunkel, bei SK I/III/Tot weiß (unsichtbar). Jetzt alle mit einem dunkleren Ton der eigenen Farbe.
   Muss am Ende stehen, damit es die „border: … solid“-Angaben weiter oben überschreibt. */
:root { --sk-rot-rand: #7F1D1D; --sk-gelb-rand: #7A5B00; --sk-gruen-rand: #14532D; --sk-tot-rand: #111827; --sk-weiss-rand: #4B5563; }
.sk-it, .sk-i { border-color: var(--sk-rot-rand); }
.sk-ii { border-color: var(--sk-gelb-rand); }
.sk-iii { border-color: var(--sk-gruen-rand); }
.sk-t { border-color: var(--sk-tot-rand); }
.sk-w { border-color: var(--sk-weiss-rand); }
.zaehler.sk-w { border: none; }

/* Korb: Klinik als Link zu den Klinik-Details, unter dem Status klein „seit … Minuten“ */
.link-klinik { background: none; border: none; padding: 0; min-height: 44px; font: inherit; font-weight: 700; color: var(--blau); text-align: left; display: inline-flex; align-items: center; gap: 4px; }
.link-klinik svg { width: 16px; height: 16px; flex-shrink: 0; }
.link-klinik { min-width: 0; max-width: 100%; }
.link-klinik-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.korb-seit { display: block; font-size: 11px; color: var(--leise); font-weight: 500; }

/* Weitere Angaben zugeklappt: schmale Leiste mit grau-weißen Symbolen (Nutzer, 16.11.2026, Vorschlag C) */
.sichten-raster.opt-zu { grid-template-columns: minmax(0, 1fr) 84px; }
@media (max-width: 1100px) { .sichten-raster.opt-zu { grid-template-columns: minmax(0, 1fr) 84px; } }
.opt-schiene { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 12px 8px; border: 2px dashed #CBD5E1; border-radius: 14px; background: #F8FAFC;
  align-self: stretch; width: 100%; font: inherit; color: inherit; cursor: pointer; } /* volle Höhe der Pflicht-Spalte */
.opt-schiene:active { background: #EEF2F7; }
.opt-knopf { position: relative; width: 64px; height: 64px; border-radius: 14px; border: 1px solid var(--rand); background: #fff; color: #6B7280;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 0; }
.opt-knopf svg { width: 24px; height: 24px; color: #6B7280; }
.opt-knopf small { font-size: 11px; font-weight: 700; color: #6B7280; }
.opt-knopf.voll { border-color: #9CA3AF; }
.opt-haken { position: absolute; top: -7px; right: -7px; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 1px solid #9CA3AF;
  display: flex; align-items: center; justify-content: center; }
.opt-haken svg { width: 13px; height: 13px; color: #374151; }
.opt-schiene-text { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 12px; font-weight: 800; color: #9CA3AF; margin-top: 6px; letter-spacing: .03em; }

/* Sichten mit zugeklappten Weiteren Angaben: schmaler und mittig, damit es nicht „anschreit“ (Nutzer, 16.11.2026) */
.sichten-eng { max-width: 820px; margin: 0 auto; width: 100%; }
/* Symbole laufen beim Scrollen mit, damit „Weitere Angaben“ immer zu sehen ist */
.opt-schiene { justify-content: flex-start; }
.opt-schiene-innen { position: sticky; top: 12px; display: flex; flex-direction: column; align-items: center; gap: 10px; }

/* Geschlecht: vier Kacheln in einer Reihe (Nutzer, 16.11.2026, Vorschlag A) */
.geschlecht-kacheln { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 6px; }
.geschlecht-kachel { height: 72px; border: 1px solid var(--rand); border-radius: 12px; background: var(--flaeche); color: var(--text2);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 0 2px;
  font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.geschlecht-kachel svg { width: 28px; height: 28px; }
.geschlecht-kachel.an { border: 2px solid var(--blau); background: var(--blau-hell); color: var(--blau-text); }
