/* ============================================================
   Einsatzplanung — Gestaltung
   Leitbild "Planungstafel": ein Brett zum Schieben.
   Farbe gehoert der Kolonne. Status zeigt die FORM.
   Rot bleibt Warnungen vorbehalten.
   ============================================================ */

:root {
  --grund: #EEF0F2;
  --flaeche: #FFFFFF;
  --senke: #E3E7EA;
  --tinte: #171F24;
  --stumm: #4E5C64;
  --linie: #C7D0D6;
  --linie-stark: #AEB8BF;
  --akzent: #07505F;
  --akzent-weich: #DFEDF0;
  --warn: #A8452F;
  --warn-weich: #F7E7E3;
  --gut: #1F7A63;
  --gut-weich: #E0F0EB;
  --acht: #B07A16;
  --acht-weich: #F8EFDC;
  --schrift: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
  --anzeige: "Bitter", Georgia, serif;
  --r: 3px;
  --schatten: 0 1px 2px rgba(20,30,36,.10), 0 4px 14px rgba(20,30,36,.06);
  --kopfhoehe: 54px;
  color-scheme: light;
}
:root[data-thema="dunkel"] {
  --grund: #11171A;
  --flaeche: #1A2226;
  --senke: #222B30;
  --tinte: #E6ECEF;
  --stumm: #A3B1B8;
  --linie: #2C373C;
  --linie-stark: #3E4C53;
  --akzent: #4FA8BA;
  --akzent-weich: #12313A;
  --warn: #D9705A;
  --warn-weich: #33201B;
  --gut: #4FAE92;
  --gut-weich: #12302A;
  --acht: #D3A44E;
  --acht-weich: #33290F;
  --schatten: 0 1px 2px rgba(0,0,0,.4), 0 4px 14px rgba(0,0,0,.3);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-thema="hell"]) {
    --grund: #11171A;
    --flaeche: #1A2226;
    --senke: #222B30;
    --tinte: #E6ECEF;
    --stumm: #A3B1B8;
    --linie: #2C373C;
    --linie-stark: #3E4C53;
    --akzent: #4FA8BA;
    --akzent-weich: #12313A;
    --warn: #D9705A;
    --warn-weich: #33201B;
    --gut: #4FAE92;
    --gut-weich: #12302A;
    --acht: #D3A44E;
    --acht-weich: #33290F;
    --schatten: 0 1px 2px rgba(0,0,0,.4), 0 4px 14px rgba(0,0,0,.3);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--grund); color: var(--tinte);
  font-family: var(--schrift); font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }

/* ---------- Anmeldung ---------- */
.anmeldung {
  min-height: 100vh; display: grid; place-items: center; padding: 24px 16px;
  background: linear-gradient(160deg, var(--grund) 0%, var(--senke) 100%);
}
.anmelde-karte {
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--r);
  box-shadow: var(--schatten); width: 100%; max-width: 430px; padding: 28px;
}
.anmelde-karte h1 { font-family: var(--anzeige); font-size: 24px; margin: 0 0 4px; }
.anmelde-karte .unter { color: var(--stumm); margin: 0 0 22px; font-size: 14px; }
.zugang-liste { display: flex; flex-direction: column; gap: 1px; margin-top: 18px; background: var(--linie); border: 1px solid var(--linie); }
.zugang {
  display: flex; align-items: center; gap: 10px; background: var(--flaeche);
  border: 0; text-align: left; padding: 11px 13px; cursor: pointer; width: 100%;
}
.zugang:hover { background: var(--akzent-weich); }
.zugang b { display: block; font-weight: 600; font-size: 14.5px; }
.zugang span { color: var(--stumm); font-size: 13px; }
.demo-hinweis { margin-top: 18px; padding: 12px 14px; background: var(--acht-weich); border-left: 3px solid var(--acht); font-size: 13.5px; }

/* ---------- Rahmen ---------- */
.rahmen { display: grid; grid-template-columns: 218px 1fr; min-height: 100vh; }
.seitenleiste {
  background: var(--flaeche); border-right: 1px solid var(--linie);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.marke { padding: 14px 16px 12px; border-bottom: 1px solid var(--linie); }
.marke b { font-family: var(--anzeige); font-size: 16px; display: block; letter-spacing: -.01em; }
.marke span { font-size: 12px; color: var(--stumm); }
.mandant-wahl { padding: 10px 12px; border-bottom: 1px solid var(--linie); background: var(--senke); }
.mandant-wahl label { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--stumm); font-weight: 600; display: block; margin-bottom: 4px; }
.navi { flex: 1; overflow-y: auto; padding: 8px 0; }
.navi-gruppe { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--stumm); font-weight: 600; padding: 12px 16px 4px; }
.navi a {
  display: flex; align-items: center; gap: 9px; padding: 8px 16px; color: var(--tinte);
  text-decoration: none; font-size: 14.5px; border-left: 3px solid transparent; cursor: pointer;
}
.navi a:hover { background: var(--senke); }
.navi a.aktiv { background: var(--akzent-weich); border-left-color: var(--akzent); font-weight: 600; }
.navi .sym { width: 18px; text-align: center; opacity: .8; }
.navi .zaehler { margin-left: auto; background: var(--senke); border-radius: 10px; padding: 0 7px; font-size: 12px; color: var(--stumm); }
.navi a.aktiv .zaehler { background: var(--flaeche); }
.navi .zaehler.warnung { background: var(--warn-weich); color: var(--warn); font-weight: 600; }
.seiten-fuss { border-top: 1px solid var(--linie); padding: 10px 14px; font-size: 13px; }
.seiten-fuss .wer { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.seiten-fuss .wer b { font-size: 13.5px; }
.seiten-fuss .wer span { color: var(--stumm); font-size: 12px; display: block; }

.hauptbereich { min-width: 0; display: flex; flex-direction: column; }
.inhalt { padding: 20px 24px 60px; flex: 1; min-width: 0; }

/* ---------- Kopfzeile Seite ---------- */
.seiten-kopf { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.seiten-titel { font-family: var(--anzeige); font-size: 22px; margin: 0; display: flex; align-items: center; gap: 6px; }
.kopf-rechts { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- Knoepfe ---------- */
.knopf {
  border: 1px solid var(--linie-stark); background: var(--flaeche); color: var(--tinte);
  padding: 7px 13px; border-radius: var(--r); cursor: pointer; font-size: 14px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.knopf:hover { background: var(--senke); }
.knopf.haupt { background: var(--akzent); border-color: var(--akzent); color: #fff; font-weight: 600; }
.knopf.haupt:hover { filter: brightness(1.1); }
.knopf.warn { background: var(--warn); border-color: var(--warn); color: #fff; }
.knopf.still { background: transparent; }
.knopf.klein { padding: 4px 9px; font-size: 13px; }
.knopf:disabled { opacity: .45; cursor: not-allowed; }
.knopf-reihe { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Eingaben ---------- */
.ein {
  width: 100%; padding: 7px 10px; border: 1px solid var(--linie-stark);
  background: var(--flaeche); border-radius: var(--r); outline: none;
}
.ein:focus { border-color: var(--akzent); box-shadow: 0 0 0 3px var(--akzent-weich); }
textarea.ein { resize: vertical; min-height: 60px; }
.feld { margin-bottom: 13px; }
.feld-kopf { display: flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; color: var(--stumm); margin-bottom: 4px; }
.reihe { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.reihe.drei { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 560px) { .reihe, .reihe.drei { grid-template-columns: 1fr; } }

/* ---------- Hilfe-Punkt ---------- */
.hilfe-punkt {
  width: 17px; height: 17px; border-radius: 50%; border: 1px solid var(--linie-stark);
  background: var(--senke); color: var(--stumm); font-size: 11px; font-weight: 700;
  cursor: pointer; display: inline-grid; place-items: center; padding: 0; flex: none; line-height: 1;
}
.hilfe-punkt:hover { background: var(--akzent); color: #fff; border-color: var(--akzent); }
.hilfe-pop {
  position: absolute; z-index: 150; background: var(--flaeche); border: 1px solid var(--linie-stark);
  box-shadow: var(--schatten); padding: 12px 14px; border-radius: var(--r); font-size: 14px;
}
.hilfe-pop p { margin: 0 0 9px; }
.hilfe-zu { border: 0; background: var(--akzent); color: #fff; padding: 4px 10px; border-radius: var(--r); cursor: pointer; font-size: 13px; }

/* ---------- Abzeichen ---------- */
.abz {
  display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600;
  padding: 2px 8px; border-radius: 2px; color: var(--abz); background: color-mix(in srgb, var(--abz) 13%, transparent);
  border: 1px solid color-mix(in srgb, var(--abz) 32%, transparent); white-space: nowrap;
}
.abz.klein { font-size: 11.5px; padding: 1px 6px; }
.kuerzel {
  width: 26px; height: 26px; border-radius: 50%; background: var(--k); color: #fff;
  display: inline-grid; place-items: center; font-size: 11px; font-weight: 700; flex: none; letter-spacing: .02em;
}
.kuerzel.gross { width: 34px; height: 34px; font-size: 13px; }

/* ---------- Karten und Tabellen ---------- */
.karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--r); box-shadow: var(--schatten); }
.karte + .karte { margin-top: 14px; }
.karte-kopf { padding: 12px 16px; border-bottom: 1px solid var(--linie); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.karte-kopf h2 { font-family: var(--anzeige); font-size: 16px; margin: 0; display: flex; align-items: center; gap: 6px; }
.karte-kopf .rechts { margin-left: auto; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.karte-koerper { padding: 14px 16px; }
.karte-koerper.eng { padding: 0; }

.tab-huelle { overflow-x: auto; }
table.tab { width: 100%; border-collapse: collapse; font-size: 14px; }
table.tab th {
  text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--stumm); padding: 9px 12px; border-bottom: 1px solid var(--linie); white-space: nowrap; font-weight: 600;
}
table.tab td { padding: 9px 12px; border-bottom: 1px solid var(--linie); vertical-align: middle; }
table.tab tr:last-child td { border-bottom: 0; }
table.tab tbody tr:hover { background: var(--senke); }
table.tab td.rechts, table.tab th.rechts { text-align: right; }
.zeile-klick { cursor: pointer; }
.leer { padding: 34px 18px; text-align: center; color: var(--stumm); }
.leer p { margin: 0 0 12px; }
.klein { font-size: 12.5px; color: var(--stumm); }
.mono { font-variant-numeric: tabular-nums; }

/* ---------- Planungstafel ---------- */
.tafel-leiste {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--r);
  padding: 8px 12px; margin-bottom: 14px; box-shadow: var(--schatten);
}
.kw-anzeige { font-family: var(--anzeige); font-size: 16px; font-weight: 600; min-width: 190px; }
.kw-anzeige span { color: var(--stumm); font-weight: 400; font-size: 13.5px; display: block; }

.tafel-huelle { overflow-x: auto; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--r); box-shadow: var(--schatten); }
.tafel { display: grid; min-width: 900px; }
.tafel-kopf, .tafel-zeile { display: grid; grid-template-columns: 186px repeat(var(--tage), minmax(0, 1fr)); }
.tafel-kopf > div {
  padding: 8px 10px; border-bottom: 2px solid var(--linie-stark); font-size: 12.5px; font-weight: 600;
  color: var(--stumm); border-right: 1px solid var(--linie); background: var(--senke);
}
.tafel-kopf > div:last-child { border-right: 0; }
.tafel-kopf .tag-heute { background: var(--akzent-weich); color: var(--akzent); }
.tafel-kopf .tag-we { opacity: .6; }
.tafel-zeile { border-bottom: 1px solid var(--linie); min-height: 74px; }
.tafel-zeile:last-child { border-bottom: 0; }
.kolonne-kopf {
  padding: 9px 10px; border-right: 1px solid var(--linie); border-left: 4px solid var(--kf);
  display: flex; flex-direction: column; gap: 5px; background: var(--flaeche); position: sticky; left: 0; z-index: 3;
}
.kolonne-kopf b { font-size: 14px; display: flex; align-items: center; gap: 6px; }
.kolonne-kopf .kfz { font-size: 12px; color: var(--stumm); font-variant-numeric: tabular-nums; }
.kolonne-kopf .leute { display: flex; gap: 3px; flex-wrap: wrap; }
.kolonne-kopf .kuerzel { width: 22px; height: 22px; font-size: 9.5px; cursor: pointer; }
.kolonne-kopf .kuerzel.weg { opacity: .3; text-decoration: line-through; }
.zelle {
  border-right: 1px solid var(--linie); padding: 4px; position: relative; min-height: 74px;
  display: flex; flex-direction: column; gap: 3px;
}
.zelle:last-child { border-right: 0; }
.zelle.we { background: color-mix(in srgb, var(--senke) 55%, transparent); }
.zelle.heute { background: color-mix(in srgb, var(--akzent-weich) 45%, transparent); }
.zelle.ziel { outline: 2px dashed var(--akzent); outline-offset: -3px; background: var(--akzent-weich); }

.phase {
  --pf: #2E6F9E;
  background: color-mix(in srgb, var(--pf) 16%, var(--flaeche));
  border-left: 4px solid var(--pf);
  border-top: 1px solid color-mix(in srgb, var(--pf) 30%, transparent);
  border-right: 1px solid color-mix(in srgb, var(--pf) 30%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--pf) 30%, transparent);
  padding: 4px 7px; font-size: 12.5px; cursor: grab; border-radius: 2px; position: relative;
}
.phase:active { cursor: grabbing; }
.phase b { display: block; font-weight: 600; font-size: 12.5px; line-height: 1.25; }
.phase span { color: var(--stumm); font-size: 11.5px; display: block; line-height: 1.3; }
.phase.zieht { opacity: .4; }
/* Status ueber FORM, nicht ueber Farbe */
.phase.st-fertig { background-image: repeating-linear-gradient(135deg, transparent 0 5px, color-mix(in srgb, var(--pf) 22%, transparent) 5px 10px); }
.phase.st-fertig b::after { content: " ✓"; color: var(--gut); }
.phase.st-abgesagt { opacity: .5; }
.phase.st-abgesagt b { text-decoration: line-through; }
.phase.st-laeuft { box-shadow: inset 0 0 0 1px var(--pf); }
.phase.st-laeuft b::before { content: "▸ "; }
.phase .konflikt {
  position: absolute; top: -6px; right: -6px; width: 17px; height: 17px; border-radius: 50%;
  background: var(--warn); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--flaeche);
}
.phase .griff {
  position: absolute; right: 0; top: 0; bottom: 0; width: 7px; cursor: ew-resize;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--pf) 45%, transparent));
}
.termin-marke {
  font-size: 11px; padding: 2px 6px; border-radius: 2px; background: color-mix(in srgb, var(--tf) 15%, transparent);
  border: 1px dashed color-mix(in srgb, var(--tf) 45%, transparent); color: var(--tf); font-weight: 600;
}

/* Warteliste unter der Tafel */
.warte { display: flex; gap: 8px; flex-wrap: wrap; }
.warte .phase { min-width: 170px; }

/* ---------- Tagesuebersicht ---------- */
.tag-gitter { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.tag-karte { background: var(--flaeche); border: 1px solid var(--linie); border-left: 4px solid var(--kf); border-radius: var(--r); box-shadow: var(--schatten); }
.tag-karte h3 { margin: 0; padding: 11px 14px 8px; font-family: var(--anzeige); font-size: 16px; display: flex; align-items: center; gap: 8px; }
.tag-karte .inhalt { padding: 0 14px 13px; }
.tag-karte dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; font-size: 13.5px; }
.tag-karte dt { color: var(--stumm); font-size: 12px; }
.tag-karte dd { margin: 0; }

/* ---------- Ladeliste ---------- */
.lade-pos { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--linie); }
.lade-pos:last-child { border-bottom: 0; }
.lade-pos input[type=checkbox] { width: 19px; height: 19px; accent-color: var(--gut); flex: none; cursor: pointer; }
.lade-pos.ab .text { text-decoration: line-through; color: var(--stumm); }
.lade-pos .menge { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--stumm); font-size: 13px; white-space: nowrap; }
.fortschritt { height: 5px; background: var(--senke); border-radius: 3px; overflow: hidden; }
.fortschritt > i { display: block; height: 100%; background: var(--gut); }

/* ---------- Zeiterfassung ---------- */
.stempel-karte { text-align: center; padding: 26px 18px; }
.stempel-uhr { font-family: var(--anzeige); font-size: 40px; font-variant-numeric: tabular-nums; margin: 0; }
.stempel-datum { color: var(--stumm); margin: 2px 0 18px; }
.stempel-knopf {
  width: 100%; max-width: 330px; padding: 17px; font-size: 18px; font-weight: 600;
  border: 0; border-radius: var(--r); cursor: pointer; color: #fff; background: var(--gut);
}
.stempel-knopf.stop { background: var(--warn); }
.stempel-stand { margin: 16px auto 0; max-width: 330px; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1px; background: var(--linie); border: 1px solid var(--linie); }
.stempel-stand div { background: var(--flaeche); padding: 9px 6px; }
.stempel-stand b { display: block; font-size: 17px; font-variant-numeric: tabular-nums; }
.stempel-stand span { font-size: 11.5px; color: var(--stumm); }
.hinweis-zeile { display: flex; gap: 7px; align-items: flex-start; font-size: 13px; padding: 7px 10px; border-radius: 2px; margin-top: 6px; }
.hinweis-zeile.verstoss { background: var(--warn-weich); color: var(--warn); }
.hinweis-zeile.korrigiert { background: var(--acht-weich); color: var(--acht); }
.hinweis-zeile.offen { background: var(--senke); color: var(--stumm); }
.notiz-marke { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--akzent); cursor: pointer; }

/* ---------- Monteur (Handy) ---------- */
.monteur { max-width: 560px; margin: 0 auto; }
.einsatz-karte {
  background: var(--flaeche); border: 1px solid var(--linie); border-left: 5px solid var(--kf);
  border-radius: var(--r); padding: 13px 15px; margin-bottom: 10px; box-shadow: var(--schatten);
}
.einsatz-karte .datum { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--stumm); font-weight: 600; }
.einsatz-karte h3 { margin: 3px 0 5px; font-family: var(--anzeige); font-size: 17px; }
.einsatz-karte .ort { color: var(--stumm); font-size: 13.5px; }
.einsatz-karte .fuss { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 9px; align-items: center; }

/* ---------- Dialog ---------- */
.dlg-hg {
  position: fixed; inset: 0; background: rgba(15,22,26,.5); display: grid; place-items: center;
  z-index: 100; padding: 16px; opacity: 0; transition: opacity .15s;
  overflow-y: auto;
}
.dlg-hg.an { opacity: 1; }
.dlg {
  background: var(--flaeche); border-radius: var(--r); box-shadow: 0 18px 50px rgba(0,0,0,.3);
  width: 100%; max-width: 540px; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); display: flex; flex-direction: column;
  transform: translateY(8px); transition: transform .15s;
}
.dlg-hg.an .dlg { transform: none; }
.dlg.breit { max-width: 860px; }
.dlg-kopf { padding: 14px 18px; border-bottom: 1px solid var(--linie); display: flex; align-items: center; gap: 12px; }
.dlg-kopf h2 { margin: 0; font-family: var(--anzeige); font-size: 18px; }
.dlg-x { margin-left: auto; border: 0; background: transparent; font-size: 24px; line-height: 1; cursor: pointer; color: var(--stumm); padding: 0 4px; }
.dlg-koerper { padding: 16px 18px; overflow-y: auto; }
.dlg-text { margin: 0; }
.dlg-fuss { padding: 12px 18px; border-top: 1px solid var(--linie); display: flex; gap: 8px; justify-content: flex-end; background: var(--senke); }

/* ---------- Meldung ---------- */
.meldung {
  position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 16px);
  background: var(--tinte); color: var(--grund); padding: 11px 16px; border-radius: var(--r);
  box-shadow: 0 8px 28px rgba(0,0,0,.28); display: flex; align-items: center; gap: 12px;
  opacity: 0; pointer-events: none; transition: all .18s; z-index: 200; width: max-content; max-width: calc(100vw - 32px); font-size: 14px;
}
.meldung.an { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.meldung.gut { background: var(--gut); color: #fff; }
.meldung.warn { background: var(--warn); color: #fff; }
.meld-zu { border: 0; background: transparent; color: inherit; font-size: 18px; cursor: pointer; line-height: 1; }

/* ---------- Farbwahl ---------- */
.farbwahl { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; }
.farbe { width: 25px; height: 25px; border-radius: 3px; border: 2px solid transparent; cursor: pointer; padding: 0; }
.farbe.aktiv { border-color: var(--tinte); box-shadow: 0 0 0 2px var(--flaeche) inset; }
.farbe-eigen { width: 32px; height: 27px; padding: 0; border: 1px solid var(--linie-stark); background: none; cursor: pointer; }

/* ---------- Ablage (Drag & Drop) ---------- */
.ablage {
  border: 2px dashed var(--linie-stark); border-radius: var(--r); padding: 18px; text-align: center;
  cursor: pointer; color: var(--stumm); background: var(--senke);
}
.ablage.drueber { border-color: var(--akzent); background: var(--akzent-weich); color: var(--akzent); }
.ablage p { margin: 0; }
.bild-gitter { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin-top: 10px; }
.bild-gitter figure { margin: 0; position: relative; }
.bild-gitter img { width: 100%; height: 88px; object-fit: cover; border: 1px solid var(--linie); border-radius: 2px; display: block; }
.bild-gitter button { position: absolute; top: 3px; right: 3px; border: 0; background: rgba(0,0,0,.6); color: #fff; border-radius: 2px; cursor: pointer; font-size: 13px; padding: 1px 6px; }

/* ---------- Reiter ---------- */
.reiter { display: flex; gap: 2px; border-bottom: 1px solid var(--linie); margin-bottom: 14px; overflow-x: auto; }
.reiter button {
  border: 0; background: transparent; padding: 8px 14px; cursor: pointer; font-size: 14px;
  border-bottom: 3px solid transparent; color: var(--stumm); white-space: nowrap;
}
.reiter button.aktiv { color: var(--tinte); border-bottom-color: var(--akzent); font-weight: 600; }

/* ---------- Hilfe-Center ---------- */
.faq { border: 1px solid var(--linie); border-radius: var(--r); background: var(--flaeche); margin-bottom: 8px; }
.faq summary { padding: 11px 14px; cursor: pointer; font-weight: 600; list-style: none; display: flex; gap: 8px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "+"; color: var(--akzent); font-weight: 700; width: 14px; }
.faq[open] summary::before { content: "−"; }
.faq .antwort { padding: 0 14px 14px 36px; color: var(--stumm); }
.faq .antwort p { margin: 0 0 8px; }

/* ---------- Handy ---------- */
.handy-leiste { display: none; }
@media (max-width: 860px) {
  .rahmen { grid-template-columns: 1fr; }
  .seitenleiste {
    position: fixed; top: 0; left: 0; bottom: 0; width: 250px; z-index: 80;
    transform: translateX(-100%); transition: transform .2s; box-shadow: 0 0 40px rgba(0,0,0,.25);
  }
  .seitenleiste.auf { transform: none; }
  .handy-leiste {
    display: flex; align-items: center; gap: 10px; padding: 9px 14px;
    background: var(--flaeche); border-bottom: 1px solid var(--linie); position: sticky; top: 0; z-index: 60;
    padding-top: calc(9px + env(safe-area-inset-top, 0px));
  }
  .handy-leiste b { font-family: var(--anzeige); font-size: 16px; }
  .inhalt { padding: 14px 14px 70px; }
  .verdunkeln { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 70; }
  .seiten-titel { font-size: 19px; }
}
@media (min-width: 861px) { .verdunkeln { display: none; } }

/* ---------- Druck ---------- */
@media print {
  .seitenleiste, .handy-leiste, .kopf-rechts, .tafel-leiste .knopf, .meldung { display: none !important; }
  body { background: #fff; }
  .rahmen { grid-template-columns: 1fr; }
  .karte, .tafel-huelle { box-shadow: none; border-color: #999; break-inside: avoid; }
  .inhalt { padding: 0; }
}

/* ---------- Programm-Umschalter ---------- */
.programm-wahl { display: flex; gap: 1px; background: var(--linie-stark); border: 1px solid var(--linie-stark); border-radius: var(--r); overflow: hidden; }
.programm-wahl .prog {
  flex: 1; text-align: center; padding: 6px 4px; font-size: 12.5px; background: var(--flaeche);
  color: var(--stumm); text-decoration: none; cursor: pointer; line-height: 1.25;
}
.programm-wahl .prog.aktiv { background: var(--akzent); color: #fff; font-weight: 600; cursor: default; }
.programm-wahl a.prog:hover { background: var(--akzent-weich); color: var(--akzent); }

/* ============================================================
   Ausbau 2 — Symbole, Adminmodus, Probeplanung, Handy
   ============================================================ */

.sym-svg { display: block; flex: none; }
.navi .sym { width: 20px; height: 20px; display: grid; place-items: center; opacity: .95; }
.navi a { min-height: 40px; }
.knopf { min-height: 38px; }
.knopf.klein { min-height: 32px; }
.knopf .sym-svg { margin-right: -1px; }
.ein { min-height: 38px; }

/* ---------- Schwebender Hilfe-Knopf ---------- */
.hilfe-schwebend {
  position: fixed; right: 20px; bottom: 20px; z-index: 75;
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--akzent); color: #fff; border: 0; cursor: pointer;
  display: grid; place-items: center;
  box-shadow: 0 4px 16px rgba(10,40,50,.32);
}
.hilfe-schwebend:hover { filter: brightness(1.12); }
.hilfe-schwebend:active { transform: scale(.94); }
.hilfe-kopfblock { background: var(--akzent-weich); border-left: 3px solid var(--akzent); padding: 13px 15px; margin-bottom: 14px; }
.hilfe-kopfblock b { display: block; font-family: var(--anzeige); font-size: 16px; margin-bottom: 4px; }
.hilfe-kopfblock p { margin: 0; }
ul.hilfe-schritte { margin: 0 0 16px; padding-left: 20px; color: var(--stumm); }
ul.hilfe-schritte li { margin-bottom: 5px; }
.gpt-block { border: 1px solid var(--linie); border-radius: var(--r); padding: 13px 15px; background: var(--senke); }
.gpt-block .feld-kopf { font-size: 14px; color: var(--tinte); margin-bottom: 8px; }

/* ---------- Admin- und Probeleiste ---------- */
.adminleiste, .probeleiste {
  position: fixed; left: 0; right: 0; z-index: 78;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 7px 16px; font-size: 13.5px;
}
.adminleiste {
  top: 0; background: #15343D; color: #E7F2F5;
  padding-top: calc(7px + env(safe-area-inset-top, 0px));
  border-bottom: 2px solid #2C6A7C;
}
.adminleiste.brille { background: #4A3A12; border-bottom-color: #9A7A28; color: #F7EDD6; }
.probeleiste {
  bottom: 0; background: #3A2A4E; color: #EFE6F7;
  padding-bottom: calc(7px + env(safe-area-inset-bottom, 0px));
  border-top: 2px solid #6A4C93;
}
.al-text { display: flex; align-items: center; gap: 7px; flex: 1; min-width: 180px; }
.al-text b { font-weight: 600; }
.al-text .klein { color: inherit; opacity: .7; }
.adminleiste .knopf, .probeleiste .knopf {
  background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.3); color: inherit;
}
.adminleiste .knopf:hover, .probeleiste .knopf:hover { background: rgba(255,255,255,.22); }
.probeleiste .knopf.haupt { background: #fff; color: #3A2A4E; border-color: #fff; }
body.hat-adminleiste .rahmen { padding-top: 40px; }
body.hat-adminleiste .seitenleiste { top: 40px; height: calc(100vh - 40px); }
body.hat-probeleiste .inhalt { padding-bottom: 96px; }
body.hat-probeleiste .hilfe-schwebend { bottom: 66px; }

/* Tafel im Probemodus sichtbar anders */
body.hat-probeleiste .tafel-huelle { outline: 2px dashed #6A4C93; outline-offset: 3px; }

/* ---------- Untere Leiste (nur Handy) ---------- */
.unten { display: none; }
@media (max-width: 860px) {
  .unten {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 72;
    background: var(--flaeche); border-top: 1px solid var(--linie);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-shadow: 0 -2px 12px rgba(20,30,36,.08);
  }
  .unten-punkt {
    flex: 1; min-height: 56px; border: 0; background: transparent; cursor: pointer;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    color: var(--stumm); font-size: 11px; padding: 6px 2px;
    border-top: 3px solid transparent;
  }
  .unten-punkt.aktiv { color: var(--akzent); border-top-color: var(--akzent); font-weight: 600; }
  .unten-punkt:active { background: var(--senke); }

  body { padding-bottom: 0; }
  .inhalt { padding-bottom: 86px !important; }
  body.hat-probeleiste .inhalt { padding-bottom: 140px !important; }
  .hilfe-schwebend { bottom: 76px; right: 14px; width: 50px; height: 50px; }
  body.hat-probeleiste .hilfe-schwebend { bottom: 128px; }
  .probeleiste { bottom: 56px; padding-bottom: 7px; }

  /* Groessere Tippziele fuer Arbeitshandschuhe */
  .knopf { min-height: 46px; padding: 10px 16px; font-size: 15px; }
  .knopf.klein { min-height: 40px; padding: 8px 13px; font-size: 14px; }
  .ein { min-height: 46px; font-size: 16px; padding: 10px 12px; }
  .hilfe-punkt { width: 24px; height: 24px; font-size: 13px; }
  .lade-pos { padding: 12px 0; }
  .lade-pos input[type=checkbox] { width: 26px; height: 26px; }
  .reiter button { min-height: 46px; font-size: 15px; }
  table.tab td { padding: 12px; }
  .dlg-fuss { position: sticky; bottom: 0; }
  .dlg-fuss .knopf { flex: 1; justify-content: center; }
  .seiten-kopf { gap: 10px; }
  .kopf-rechts { margin-left: 0; width: 100%; }
  .kopf-rechts .knopf { flex: 1; justify-content: center; }
  .tafel-leiste { gap: 7px; }
  .tafel-leiste .knopf { flex: 1 1 auto; justify-content: center; }
  body.hat-adminleiste .rahmen { padding-top: 0; }
  body.hat-adminleiste .hauptbereich { padding-top: 44px; }
  .adminleiste { font-size: 12.5px; padding: 6px 12px; }
  .adminleiste .al-text .klein { display: none; }
}

/* ---------- Tagesliste statt Tafel (Handy) ---------- */
.tagesliste { display: flex; flex-direction: column; gap: 10px; }
.tl-tag {
  display: flex; align-items: center; gap: 8px; padding: 9px 12px;
  background: var(--senke); border: 1px solid var(--linie); font-weight: 600;
  position: sticky; top: 54px; z-index: 5;
}
.tl-tag.heute { background: var(--akzent-weich); color: var(--akzent); border-color: var(--akzent); }
.tl-tag .klein { margin-left: auto; font-weight: 400; }
.tl-karte {
  background: var(--flaeche); border: 1px solid var(--linie); border-left: 5px solid var(--kf);
  padding: 12px 14px; box-shadow: var(--schatten);
}
.tl-karte h4 { margin: 0 0 3px; font-family: var(--anzeige); font-size: 16px; }
.tl-karte .zeile { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 7px; }
.tl-leer { padding: 14px; text-align: center; color: var(--stumm); border: 1px dashed var(--linie); font-size: 13.5px; }

/* ---------- Feinschliff Optik ---------- */
.karte { border-radius: 4px; }
.karte-kopf { background: linear-gradient(var(--senke), var(--flaeche)); }
.seiten-titel { letter-spacing: -.015em; }
.tafel-kopf > div { font-size: 13px; }
.tafel-kopf .tag-heute { box-shadow: inset 0 -3px 0 var(--akzent); }
.phase { border-radius: 3px; transition: transform .1s, box-shadow .1s; }
.phase:hover { box-shadow: 0 2px 8px rgba(20,30,36,.14); }
.zelle.ziel { outline-width: 3px; }
.abz { border-radius: 3px; }
.kuerzel { box-shadow: 0 1px 2px rgba(0,0,0,.18); }
.fortschritt { height: 6px; }
.tag-karte { border-radius: 4px; }
.meldung { border-radius: 4px; font-weight: 500; }

/* ---------- Handy-Feinschliff ---------- */
@media (max-width: 860px) {
  .adminleiste, .probeleiste { flex-wrap: nowrap; gap: 6px; padding-left: 10px; padding-right: 10px; }
  .adminleiste .al-text { min-width: 0; }
  .adminleiste .al-text b, .probeleiste .al-text b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .adminleiste .knopf.klein, .probeleiste .knopf.klein { min-height: 34px; padding: 5px 10px; font-size: 12.5px; white-space: nowrap; flex: none; }
  body.hat-adminleiste .handy-leiste { top: 44px; }
  body.hat-adminleiste .tl-tag { top: 98px; }
  .kw-anzeige { font-size: 14px; min-width: 0; }
  .kw-anzeige span { display: inline; font-size: 13px; margin-right: 6px; }
  .tafel-leiste .kw-anzeige { flex: 1 1 100%; text-align: center; order: -1; padding: 2px 0 6px; border-bottom: 1px solid var(--linie); margin-bottom: 4px; }
  .tafel-leiste .knopf.klein { flex: 1 1 0; }
  .seiten-kopf .kopf-rechts .knopf.haupt { min-height: 48px; }
}

/* ---------- Adminschalter oben, Leisten hoeher ---------- */
.admin-schalter { padding: 10px 12px; border-bottom: 1px solid var(--linie); background: var(--senke); }
.handy-leiste .admin-kurz { margin-left: auto; }
.seitenleiste { height: 100vh; height: 100dvh; }
.seiten-fuss { padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }
@media (max-width: 860px) {
  .seitenleiste { padding-bottom: 70px; }
  .unten { padding-bottom: max(env(safe-area-inset-bottom, 0px), 14px); }
  .unten-punkt { min-height: 58px; }
  .inhalt { padding-bottom: 104px !important; }
  .hilfe-schwebend { bottom: 94px; }
  body.hat-probeleiste .hilfe-schwebend { bottom: 146px; }
  .probeleiste { bottom: 72px; }
  body.hat-adminleiste .seitenleiste { top: 44px; height: calc(100dvh - 44px); }
}


/* ---------- Dialoge am Handy: Blatt von unten, Knoepfe immer im Bild ---------- */
@media (max-width: 860px) {
  .dlg-hg { padding: 0; align-items: end; place-items: end center; }
  .dlg {
    max-width: none; max-height: 100dvh; border-radius: 12px 12px 0 0;
    transform: translateY(24px);
  }
  .dlg-koerper { padding-bottom: 20px; }
  .dlg-fuss {
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -4px 14px rgba(20,30,36,.08);
  }
  .dlg-kopf { padding-top: 12px; }
  .dlg-kopf::before {
    content: ""; position: absolute; top: 6px; left: 50%; width: 38px; height: 4px; margin-left: -19px;
    border-radius: 2px; background: var(--linie-stark);
  }
  .dlg-kopf { position: relative; }
}

/* ============================================================
   Gaak-Gesamtsystem — Gestaltung im Stil der LKW-Planung
   hell, ruhig, runde Karten, Marineblau als Hauptfarbe
   ============================================================ */
:root {
  --grund: #f6f7fb; --flaeche: #ffffff; --senke: #f2f4f7; --tinte: #18212f; --stumm: #667085;
  --linie: #dfe4ea; --linie-stark: #cbd5e1; --akzent: #0f172a; --akzent-weich: #edf4ff;
  --warn: #b42318; --warn-weich: #fdecec; --gut: #0b7a39; --gut-weich: #e8f7ee; --acht: #9a6700; --acht-weich: #fff6df;
  --blau: #175cd3; --blau-weich: #edf4ff;
  --schrift: Arial, Helvetica, sans-serif; --anzeige: Arial, Helvetica, sans-serif;
  --r: 14px; --rk: 22px;
  --schatten: 0 1px 2px rgba(16,24,40,.04);
}
:root[data-thema="dunkel"] {
  --grund: #0d1117; --flaeche: #161b22; --senke: #1f2630; --tinte: #e6edf3; --stumm: #9aa6b2; --linie: #2a323d; --linie-stark: #3a4552;
  --akzent: #e6edf3; --akzent-weich: #1c2a3f; --warn: #ff7b72; --warn-weich: #3a1d1d; --gut: #56d364; --gut-weich: #12301d; --acht: #e3b341; --acht-weich: #33290f;
  --blau: #79b8ff; --blau-weich: #15263d; --schatten: 0 1px 2px rgba(0,0,0,.4);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-thema="hell"]) {
    --grund: #0d1117; --flaeche: #161b22; --senke: #1f2630; --tinte: #e6edf3; --stumm: #9aa6b2; --linie: #2a323d; --linie-stark: #3a4552;
    --akzent: #e6edf3; --akzent-weich: #1c2a3f; --warn: #ff7b72; --warn-weich: #3a1d1d; --gut: #56d364; --gut-weich: #12301d; --acht: #e3b341; --acht-weich: #33290f;
    --blau: #79b8ff; --blau-weich: #15263d; --schatten: 0 1px 2px rgba(0,0,0,.4);
  }
}
:root[data-thema="dunkel"] .knopf.haupt, :root[data-thema="dunkel"] .hilfe-schwebend { color: #0d1117; }
@media (prefers-color-scheme: dark) { :root:not([data-thema="hell"]) .knopf.haupt, :root:not([data-thema="hell"]) .hilfe-schwebend { color: #0d1117; } }
body { font-size: 15px; }
.karte, .tag-karte, .faq, .tafel-huelle, .anmelde-karte { border-radius: var(--rk); }
.karte { overflow: hidden; }
.karte-kopf { background: var(--flaeche); }
.karte-kopf h2, .seiten-titel, .dlg-kopf h2, .kw-anzeige, .anmelde-karte h1, .marke b, .einsatz-karte h3, .tl-karte h4, .tag-karte h3 { font-family: var(--anzeige); font-weight: 700; letter-spacing: 0; }
.knopf { border-radius: var(--r); border-color: var(--linie-stark); }
.knopf.haupt:hover { filter: none; background: #1e293b; }
.knopf.mini { min-height: 28px; padding: 2px 8px; font-size: 12.5px; border-radius: 10px; }
.knopf.breit { width: 100%; justify-content: center; }
.ein { border-radius: var(--r); }
.ein.gross { font-size: 18px; font-weight: 700; min-height: 46px; }
.ein.klein-ein { min-height: 32px; padding: 4px 8px; font-size: 13px; border-radius: 10px; width: auto; max-width: 100%; }
.ein:focus { border-color: var(--blau); box-shadow: 0 0 0 3px var(--blau-weich); }
.dlg { border-radius: var(--rk); overflow: hidden; }
.dlg-fuss { background: var(--flaeche); }
.abz { border-radius: 999px; }
.meldung { border-radius: var(--r); }
.leer { border: 1px dashed var(--linie-stark); border-radius: 16px; background: var(--flaeche); }
.leer-klein { padding: 14px; border: 1px dashed var(--linie-stark); border-radius: 16px; color: var(--stumm); font-size: 14px; }
.hilfe-schwebend { background: var(--akzent); }
.fortschritt > i { background: var(--blau); }
.fortschritt.ueber > i { background: var(--warn); }
.fett { font-weight: 700; }
.mitte { text-align: center; }
.rot-text { color: var(--warn); font-weight: 700; }

/* Anmeldung */
.anmeldung { background: var(--grund); }
.anmelde-logo { display: block; height: 64px; margin: 0 auto 14px; border-radius: 10px; }
.anmelde-karte { text-align: left; max-width: 460px; }
.anmelde-karte h1 { text-align: center; }
.anmelde-karte .unter { text-align: center; }
.anmelde-fehler { color: var(--warn); font-size: 13px; min-height: 18px; margin: 0 0 8px; }
.zugang-gruppe { border: 1px solid var(--linie); border-radius: 16px; margin-bottom: 8px; overflow: hidden; }
.zugang-gruppe summary { padding: 10px 14px; cursor: pointer; font-weight: 700; font-size: 14px; background: var(--senke); }
.zugang-gruppe .zugang-liste { margin: 0; border: 0; border-radius: 0; }
.demo-hinweis { border-radius: 14px; border-left: 0; border: 1px solid #f2d99a; color: var(--acht); background: var(--acht-weich); }

/* Rahmen, Seitenleiste */
.rahmen { grid-template-columns: 236px 1fr; }
.marke { display: flex; align-items: center; gap: 10px; padding: 14px; }
.marke img { width: 42px; height: 42px; object-fit: contain; border-radius: 10px; background: #fff; }
.marke span { display: block; }
.firmen-wahl { display: flex; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--linie); }
.firma { flex: 1; border: 1px solid var(--linie-stark); background: var(--flaeche); border-radius: 12px; padding: 6px 8px; cursor: pointer; text-align: left; border-left: 4px solid var(--fc); }
.firma b { display: block; font-size: 13px; }
.firma span { display: block; font-size: 10.5px; color: var(--stumm); line-height: 1.2; }
.firma.aktiv { background: var(--akzent-weich); border-color: var(--fc); box-shadow: inset 0 0 0 1px var(--fc); }
.navi a { border-radius: 12px; margin: 1px 8px; padding: 7px 10px; border-left: 0; }
.navi a.aktiv { background: var(--akzent); color: #fff; }
:root[data-thema="dunkel"] .navi a.aktiv { color: #0d1117; }
.navi a.aktiv .zaehler { background: rgba(255,255,255,.2); color: inherit; }
.navi .zaehler.warnung { background: var(--warn-weich); color: var(--warn); }
.navi a.aktiv .zaehler.warnung { background: #fff; color: var(--warn); }
.navi-gruppe { padding: 12px 18px 4px; }

/* Kopfleiste */
.kopfleiste { display: flex; align-items: center; gap: 10px; padding: 10px 24px; background: var(--flaeche); border-bottom: 1px solid var(--linie); position: sticky; top: 0; z-index: 60; padding-top: calc(10px + env(safe-area-inset-top, 0px)); }
.kopf-titel { font-size: 16px; }
.kopf-aktionen { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.handy-nur { display: none !important; }
.glocke { position: relative; }
.glocke-zahl { position: absolute; top: -6px; right: -6px; background: var(--warn); color: #fff; border-radius: 999px; font-size: 11px; padding: 1px 6px; font-weight: 700; }
body.hat-adminleiste .kopfleiste { top: 40px; }
@media (max-width: 860px) {
  .handy-nur { display: inline-flex !important; }
  .breit-nur { display: none; }
  .kopfleiste { padding: 8px 12px; padding-top: calc(8px + env(safe-area-inset-top, 0px)); }
  body.hat-adminleiste .kopfleiste { top: 44px; }
  .kopf-aktionen .ein.klein-ein { max-width: 120px; }
}

/* Werkzeugleiste, Kennzahlen */
.werkzeugleiste { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--rk); padding: 10px 12px; margin-bottom: 14px; }
.werkzeugleiste .ein { width: auto; flex: 0 1 auto; }
.werkzeugleiste .ein.suche { flex: 1 1 240px; min-width: 180px; }
.wochen-navi { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.wochen-navi .kw-anzeige { min-width: 0; font-size: 15px; margin-left: 4px; }
.kennzahlen { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 14px; }
.kennzahl { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--rk); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.kennzahl.klickbar { cursor: pointer; }
.kennzahl.klickbar:hover { border-color: var(--linie-stark); }
.kz-titel { color: var(--stumm); font-size: 13px; }
.kz-wert { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.kz-unter { color: var(--stumm); font-size: 12px; }
.kennzahl.gruen .kz-wert { color: var(--gut); } .kennzahl.rot .kz-wert { color: var(--warn); }
.kennzahl.gelb .kz-wert { color: var(--acht); } .kennzahl.blau .kz-wert { color: var(--blau); }

/* Marken (Status-Kennzeichen) */
.marke-chip { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; margin: 1px 4px 1px 0; vertical-align: middle; }
.marke-chip.grau { background: var(--senke); color: #344054; }
.marke-chip.gruen { background: var(--gut-weich); color: var(--gut); }
.marke-chip.gelb { background: var(--acht-weich); color: var(--acht); }
.marke-chip.rot { background: var(--warn-weich); color: var(--warn); }
.marke-chip.blau { background: var(--blau-weich); color: var(--blau); }
:root[data-thema="dunkel"] .marke-chip.grau { color: var(--stumm); }

/* Statuskette */
.kette { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 12px; }
.kette .schritt { font-size: 12px; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--linie); color: var(--stumm); background: var(--flaeche); }
.kette .schritt.erledigt { background: var(--gut-weich); color: var(--gut); border-color: transparent; }
.kette .schritt.aktiv { background: var(--sf); color: #fff; border-color: var(--sf); font-weight: 700; }
.kette.kompakt { margin: 0; }

/* Auftraege */
.auftrag-karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 18px; padding: 12px 14px; margin-bottom: 10px; cursor: pointer; }
.ak-kopf { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ak-titel { font-weight: 700; margin: 4px 0 6px; }
.ak-zeile { display: flex; flex-wrap: wrap; gap: 2px; }
.schnellmaske .feld-hinweis { margin-top: 4px; }
.abschnitt { font-size: 15px; margin: 18px 0 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pos-liste { display: flex; flex-direction: column; gap: 10px; }
.pos-zeile { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: start; border: 1px solid var(--linie); border-radius: 16px; padding: 10px; background: var(--senke); }
.pos-nr { width: 24px; height: 24px; border-radius: 50%; background: var(--akzent); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
:root[data-thema="dunkel"] .pos-nr { color: #0d1117; }
.pos-felder { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0 10px; }
.pos-felder .feld { margin-bottom: 6px; }
.info-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 16px; background: var(--senke); border-radius: 16px; padding: 12px 14px; }
.info-raster span { display: block; }
.notiz-block { background: var(--acht-weich); border-radius: 12px; padding: 10px 12px; white-space: pre-wrap; }
.buchungen { display: flex; flex-direction: column; gap: 6px; }
.buchung { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--linie); }
.buchung .bild-gitter { width: 100%; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); }
.buchung .bild-gitter img { height: 64px; }
.verlauf summary { cursor: pointer; font-weight: 700; margin-top: 14px; }
.projekt-zeile { display: grid; grid-template-columns: 2fr 90px 1.5fr auto; gap: 6px; margin-bottom: 6px; }
.haken { display: flex; align-items: center; gap: 8px; padding: 5px 0; cursor: pointer; font-size: 14px; }
.haken input { width: 18px; height: 18px; accent-color: var(--blau); flex: none; }
.hinweis-band { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 14px; border-radius: 14px; margin-bottom: 12px; font-size: 14px; }
.hinweis-band.rot { background: var(--warn-weich); color: var(--warn); }
.hinweis-band.gelb { background: var(--acht-weich); color: var(--acht); }
.hinweis-band.blau { background: var(--blau-weich); color: var(--blau); }
.gefahr { border-color: var(--warn); }

/* Werksplanung */
.land { margin-bottom: 14px; }
.land-kopf { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 14px 16px 6px; }
.land-kopf h2 { margin: 0; font-size: 18px; }
.werk-block { border: 1px solid var(--linie); border-radius: 18px; margin: 10px 14px 14px; overflow: hidden; }
.werk-kopf { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; padding: 10px 14px; background: var(--senke); border-bottom: 1px solid var(--linie); }
.touren-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.tour-karte { border: 1px solid var(--linie); border-radius: 18px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; background: var(--flaeche); }
.tour-karte.ueber { border-color: var(--warn); }
.tour-kopf { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
ol.stopps { margin: 2px 0; padding-left: 20px; font-size: 13.5px; }
ol.stopps li { display: flex; justify-content: space-between; gap: 6px; align-items: center; margin-bottom: 2px; }
ol.stopps li::marker { color: var(--stumm); }
.stopp-knoepfe { display: inline-flex; gap: 3px; }
.spedition-pos { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--linie); }
.spedition-pos.fertig b { color: var(--gut); }

/* Lager (Handy) */
.lager { max-width: 760px; margin: 0 auto; }
.reiter.gross button { font-size: 15px; padding: 10px 14px; }
.reiter-zahl { display: inline-block; margin-left: 6px; background: var(--senke); border-radius: 999px; padding: 0 8px; font-size: 12px; }
.lager-karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 18px; padding: 12px 14px; margin-bottom: 10px; }
.lk-kopf { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.lk-zeile { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 8px; }
.lk-zeile .knopf { margin-left: auto; }
ul.pos-kurz { margin: 8px 0; padding-left: 0; list-style: none; font-size: 13.5px; }
ul.pos-kurz li { margin-bottom: 4px; }
.gruppen-kopf { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 16px 0 8px; }
.eingang-block { border: 1px solid var(--linie); border-radius: 16px; padding: 12px; margin-bottom: 10px; }
.entscheid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
.gross-knopf { min-height: 54px !important; font-size: 16px !important; justify-content: center; font-weight: 700; }
.gross-knopf.gut.aktiv { background: var(--gut); color: #fff; border-color: var(--gut); }
.gross-knopf.warn-knopf.aktiv { background: var(--warn); color: #fff; border-color: var(--warn); }
.kamera-huelle { display: inline-block; margin: 6px 0; }
.kamera-knopf { min-height: 48px; font-weight: 700; }
.foto-laedt { background: var(--senke); min-height: 60px; }
.foto-fehlt { background: var(--senke); }
.foto-gross img { width: 100%; max-height: 70vh; object-fit: contain; border-radius: 12px; }

/* Liefer-Wochenplan */
.buendel { display: flex; flex-direction: column; gap: 10px; }
.buendel-gruppe { border: 1px solid var(--linie); border-left: 5px solid var(--rf); border-radius: 16px; padding: 10px 12px; }
.buendel-kopf { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.buendel-auftrag { display: flex; gap: 8px; align-items: center; justify-content: space-between; padding: 6px 0; border-top: 1px solid var(--linie); cursor: grab; }
.tp-huelle { overflow-x: auto; }
.touren-plan { display: grid; grid-template-columns: 150px repeat(var(--spalten), minmax(150px, 1fr)); min-width: 1000px; border: 1px solid var(--linie); border-radius: 16px; overflow: hidden; }
.tp-ecke, .tp-tag { background: var(--senke); padding: 8px 10px; font-size: 13px; border-bottom: 1px solid var(--linie); border-right: 1px solid var(--linie); }
.tp-tag span { display: block; color: var(--stumm); font-size: 12px; }
.tp-tag.heute { background: var(--blau-weich); color: var(--blau); }
.tp-fahrzeug { padding: 8px 10px; border-left: 4px solid var(--ff); border-bottom: 1px solid var(--linie); border-right: 1px solid var(--linie); }
.tp-fahrzeug span { display: block; }
.tp-zelle { min-height: 90px; padding: 6px; border-bottom: 1px solid var(--linie); border-right: 1px solid var(--linie); display: flex; flex-direction: column; gap: 4px; }
.tp-zelle.heute { background: color-mix(in srgb, var(--blau-weich) 50%, transparent); }
.tp-zelle.drueber { outline: 2px dashed var(--blau); outline-offset: -3px; }
.tp-zelle.ueber { background: var(--warn-weich); }
.tp-auftrag { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 10px; padding: 5px 7px; font-size: 12.5px; display: grid; grid-template-columns: 18px 1fr; gap: 0 6px; }
.tp-auftrag .klein, .tp-auftrag .tp-knoepfe { grid-column: 2; }
.tp-nr { width: 18px; height: 18px; border-radius: 50%; background: var(--akzent); color: #fff; font-size: 11px; display: grid; place-items: center; }
:root[data-thema="dunkel"] .tp-nr { color: #0d1117; }
.tp-knoepfe { display: flex; gap: 3px; margin-top: 3px; }
.tp-fuss { margin-top: auto; display: flex; justify-content: space-between; align-items: center; }
.tp-leer { color: var(--linie-stark); text-align: center; margin: auto; }

/* Kalender */
.segment { display: inline-flex; border: 1px solid var(--linie-stark); border-radius: 12px; overflow: hidden; }
.segment button { border: 0; background: var(--flaeche); padding: 7px 12px; cursor: pointer; font-size: 13.5px; border-right: 1px solid var(--linie); }
.segment button:last-child { border-right: 0; }
.segment button.aktiv { background: var(--akzent); color: #fff; font-weight: 700; }
:root[data-thema="dunkel"] .segment button.aktiv { color: #0d1117; }
.legende { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.legende-punkt { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--linie); background: var(--flaeche); border-radius: 999px; padding: 4px 10px; font-size: 12.5px; cursor: pointer; }
.legende-punkt i { width: 10px; height: 10px; border-radius: 50%; background: var(--lf); }
.legende-punkt.aus { opacity: .4; text-decoration: line-through; }
.kal-monat { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--linie); border-radius: 16px; overflow: hidden; background: var(--flaeche); }
.kal-wt { background: var(--senke); padding: 6px; font-size: 12px; font-weight: 700; color: var(--stumm); text-align: center; border-bottom: 1px solid var(--linie); }
.kal-tag { min-height: 108px; border-right: 1px solid var(--linie); border-bottom: 1px solid var(--linie); padding: 4px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kal-tag:nth-child(7n) { border-right: 0; }
.kal-tag.fremd { background: var(--senke); opacity: .65; }
.kal-tag.heute { background: var(--blau-weich); }
.kal-tagnr { border: 0; background: transparent; font-weight: 700; font-size: 13px; cursor: pointer; align-self: flex-start; padding: 0 2px; }
.kal-mehr { border: 0; background: transparent; font-size: 11.5px; color: var(--blau); cursor: pointer; text-align: left; }
.kal-eintrag { display: flex; align-items: center; gap: 5px; width: 100%; text-align: left; border: 0; border-left: 4px solid var(--ef); background: color-mix(in srgb, var(--ef) 12%, var(--flaeche)); border-radius: 8px; padding: 5px 7px; font-size: 13px; cursor: pointer; color: var(--tinte); min-width: 0; flex-wrap: wrap; }
.kal-eintrag.kompakt { font-size: 11.5px; padding: 2px 5px; flex-wrap: nowrap; }
.kal-eintrag.kompakt .kal-titel { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kal-eintrag.wichtig { background: var(--warn-weich); border-left-color: var(--warn); box-shadow: inset 0 0 0 1px var(--warn); font-weight: 700; }
.kal-eintrag.kollision { box-shadow: inset 0 0 0 2px var(--acht); }
.kal-eintrag.erledigt { opacity: .6; }
.kal-zeit { font-weight: 700; font-variant-numeric: tabular-nums; }
.kal-titel { flex: 1; min-width: 0; }
.kal-sym { font-size: 12px; } .kal-sym.warn { color: var(--acht); font-weight: 700; }
.kal-ort { width: 100%; color: var(--stumm); font-size: 12px; }
.kal-woche { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.kal-spalte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 16px; padding: 6px; display: flex; flex-direction: column; gap: 4px; min-height: 240px; min-width: 0; }
.kal-spalte.heute { border-color: var(--blau); box-shadow: inset 0 0 0 1px var(--blau); }
.kal-spalte-kopf { display: flex; justify-content: space-between; padding: 2px 4px 6px; border-bottom: 1px solid var(--linie); margin-bottom: 2px; }
.kal-leer { color: var(--linie-stark); text-align: center; font-size: 13px; padding: 6px; }
.kal-liste { display: flex; flex-direction: column; gap: 10px; }
.kal-listentag { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 16px; padding: 8px 10px; display: flex; flex-direction: column; gap: 5px; }
.kal-listentag.heute { border-color: var(--blau); }
.kal-listenkopf { display: flex; gap: 8px; align-items: center; }
.kal-listenkopf .knopf { margin-left: auto; }
.tage-wahl, .personen-wahl { display: flex; gap: 4px; flex-wrap: wrap; }
.serie-box { border: 1px dashed var(--linie-stark); border-radius: 14px; padding: 8px 10px 2px; margin-bottom: 12px; }

/* Mitteilungen */
.mitteilungen { display: flex; flex-direction: column; gap: 6px; }
.mitteilung { display: grid; grid-template-columns: 12px 1fr auto; gap: 10px; align-items: center; text-align: left; border: 1px solid var(--linie); background: var(--flaeche); border-radius: 14px; padding: 10px 12px; cursor: pointer; color: var(--tinte); }
.mitteilung.neu { border-color: var(--blau); background: var(--blau-weich); }
.mitteilung.neu .mt-text { font-weight: 700; }
.punkt { width: 10px; height: 10px; border-radius: 50%; display: inline-block; background: var(--linie-stark); flex: none; }
.punkt.rot { background: var(--warn); } .punkt.gruen { background: var(--gut); } .punkt.gelb { background: var(--acht); } .punkt.blau { background: var(--blau); }

/* Startseite / Kacheln */
.kachel-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.kachel { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--rk); padding: 14px 16px; min-width: 0; }
.kachel h2 { font-size: 16px; margin: 0 0 10px; }
.kachel-liste { display: flex; flex-direction: column; gap: 2px; }
.kz { display: flex; align-items: flex-start; gap: 9px; padding: 7px 4px; border: 0; border-bottom: 1px solid var(--linie); background: transparent; text-align: left; width: 100%; color: var(--tinte); font-size: 14px; }
.kz .punkt { margin-top: 5px; }
.kz.klickbar { cursor: pointer; } .kz.klickbar:hover { background: var(--senke); border-radius: 8px; }
.kz-t { min-width: 0; }
.kachel-leer { margin: 6px 0; }
.kz-tour { display: flex; flex-direction: column; gap: 4px; padding: 6px 0; border-bottom: 1px solid var(--linie); }
.kachel-wahl { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--linie); }
.balken-zeile { display: grid; grid-template-columns: 120px 1fr 160px; gap: 10px; align-items: center; margin-bottom: 8px; }

/* Vollbild (Fernseher, Lager) */
body.vollbild { background: var(--grund); }
body.vollbild .tv-kopf { display: flex; align-items: center; gap: 18px; padding: 16px 28px; background: var(--akzent); color: #fff; }
body.vollbild .tv-kopf img { height: 48px; border-radius: 10px; background: #fff; }
body.vollbild .tv-kopf h1 { margin: 0; font-size: 30px; }
.tv-uhr { margin-left: auto; font-size: 22px; font-variant-numeric: tabular-nums; }
.tv-punkte { display: flex; gap: 6px; } .tv-punkte i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.3); } .tv-punkte i.an { background: #fff; }
.tv-aus { background: transparent !important; color: rgba(255,255,255,.6) !important; border-color: rgba(255,255,255,.25) !important; }
.tv-raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(480px, 1fr)); gap: 20px; padding: 20px 28px; }
.kachel.gross h2 { font-size: 26px; }
.kachel.gross .kz { font-size: 21px; padding: 10px 4px; }
.kachel.gross .klein { font-size: 17px; }
.kachel.gross .punkt { width: 14px; height: 14px; margin-top: 8px; }
.kachel.touch .knopf-reihe .knopf { flex: 1; min-height: 80px !important; font-size: 22px !important; }

/* Assistent */
.ki-verlauf { display: flex; flex-direction: column; gap: 10px; max-height: 50vh; overflow-y: auto; margin-bottom: 10px; }
.ki-verlauf.gross { max-height: none; min-height: 200px; }
.ki-frage { align-self: flex-end; background: var(--akzent); color: #fff; border-radius: 16px 16px 4px 16px; padding: 8px 12px; max-width: 85%; }
:root[data-thema="dunkel"] .ki-frage { color: #0d1117; }
.ki-antwort { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 16px 16px 16px 4px; padding: 10px 14px; max-width: 95%; }
.ki-antwort p { margin: 0 0 8px; white-space: pre-wrap; }
.ki-quellen { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; margin-top: 4px; }
.ki-beispiele { display: flex; gap: 6px; flex-wrap: wrap; }
.ki-eingabe textarea { margin-bottom: 8px; }

/* Einstellungen */
.ausnahmen { border: 1px solid var(--linie); border-radius: 14px; padding: 8px 12px; margin-top: 10px; }
.ausnahmen summary { cursor: pointer; font-weight: 700; }
.rechte-liste { display: flex; flex-direction: column; margin-top: 6px; }
.rechte-zeile { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 4px 0; border-bottom: 1px solid var(--linie); font-size: 13.5px; }
.farbpunkt { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }
.kat-zeile { display: grid; grid-template-columns: 40px 1.5fr 1fr 1fr 32px; gap: 6px; align-items: center; margin-bottom: 6px; }
.seite-zeile { border: 1px solid var(--linie); border-radius: 14px; padding: 8px; margin-bottom: 8px; }
.seite-zeile .knopf-reihe .ein { flex: 1; }

/* Monteur */
.einsatz-karte { border-radius: 18px; }
.einsatz-karte.heute { box-shadow: 0 0 0 2px var(--blau); }

@media (max-width: 860px) {
  .kennzahlen { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .kennzahl { padding: 10px 12px; }
  .kz-wert { font-size: 21px; }
  .werkzeugleiste { border-radius: 16px; padding: 8px; }
  .werkzeugleiste > * { flex: 1 1 auto; }
  .pos-zeile { grid-template-columns: 1fr auto; }
  .pos-nr { display: none; }
  .pos-felder { grid-template-columns: 1fr 1fr; }
  .projekt-zeile { grid-template-columns: 1fr 80px; }
  .projekt-zeile > :nth-child(3) { grid-column: 1; }
  .kat-zeile { grid-template-columns: 40px 1fr 32px; }
  .kat-zeile > :nth-child(3), .kat-zeile > :nth-child(4) { grid-column: 2; }
  .kachel-raster { grid-template-columns: 1fr; }
  .balken-zeile { grid-template-columns: 80px 1fr; }
  .balken-zeile > :nth-child(3) { grid-column: 2; }
  .kal-tag { min-height: 74px; }
  .kal-eintrag.kompakt { font-size: 10.5px; }
  .entscheid { grid-template-columns: 1fr; }
  .tv-raster { grid-template-columns: 1fr; padding: 12px; }
  .lk-zeile .knopf { margin-left: 0; width: 100%; justify-content: center; }
}
@media print {
  .kopfleiste, .unten, .hilfe-schwebend, .werkzeugleiste .knopf { display: none !important; }
}
.kopf-titel { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kopf-aktionen { flex: none; margin-left: 0; }
@media (max-width: 860px) {
  .kopf-aktionen { gap: 5px; }
  .kopf-aktionen .knopf.klein { min-height: 38px; padding: 6px 9px; }
  .kopf-aktionen .ein.klein-ein { max-width: 96px; }
  body.vollbild .tv-kopf { flex-wrap: wrap; padding: 10px 14px; gap: 10px; }
  body.vollbild .tv-kopf h1 { font-size: 20px; }
  .tv-uhr { font-size: 15px; }
}
.marke { flex-direction: column; align-items: flex-start; gap: 6px; }
.marke img { width: auto; height: 34px; max-width: 150px; border-radius: 6px; background: #fff; padding: 2px 4px; }
.seiten-fuss .wer .kuerzel { display: inline-grid; color: #fff; font-size: 11px; }
.reihe { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.kal-titel { overflow-wrap: anywhere; }
.kal-eintrag .kal-zeit { white-space: nowrap; }
@media (max-width: 860px) {
  .rahmen { grid-template-columns: minmax(0, 1fr); }
  .segment { flex-wrap: wrap; }
  .spedition-pos { flex-wrap: wrap; }
  .spedition-pos .knopf { width: 100%; justify-content: center; }
}
/* Schrift auf der Akzentfarbe — hell im hellen, dunkel im dunklen Thema */
:root { --auf-akzent: #ffffff; }
:root[data-thema="dunkel"] { --auf-akzent: #0d1117; }
@media (prefers-color-scheme: dark) { :root:not([data-thema="hell"]) { --auf-akzent: #0d1117; } }
.navi a.aktiv, .knopf.haupt, .segment button.aktiv, .pos-nr, .tp-nr, .ki-frage, .hilfe-schwebend { color: var(--auf-akzent); }
.knopf.haupt:hover { background: var(--akzent); filter: brightness(1.15); }

/* ============================================================
   Fassung s2 — Bedienbarkeit, Handy, Fernseher, Dialoge
   ============================================================ */
/* Dialog: Scroll-Sperre, Meldung im Dialog, Pflichtfelder, Fehler am Feld */
body.dialog-offen { overflow: hidden; }
.dlg-meldung { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; font-size: 14px; background: var(--akzent-weich); color: var(--tinte); border: 1px solid var(--linie); }
.dlg-meldung.gut { background: var(--gut-weich); border-color: var(--gut); }
.dlg-meldung.warn, .dlg-meldung.warnung, .dlg-meldung.fehler { background: var(--warn-weich); border-color: var(--warn); color: var(--tinte); }
.dlg-meldung .meld-zu { margin-left: auto; background: transparent; border: 0; font-size: 20px; line-height: 1; cursor: pointer; color: inherit; min-width: 36px; min-height: 36px; }
.feld .pflicht { color: var(--warn); font-weight: 700; }
.pflicht-hinweis { margin: 6px 0 0; }
.ein.fehler, .feld.fehler .ein { border-color: var(--warn) !important; box-shadow: 0 0 0 3px var(--warn-weich); }
.feld-fehler { color: var(--warn); font-size: 12.5px; margin-top: 4px; }
.knopf.links { margin-right: auto; }
.dlg-x { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.kz-pfeil { margin-left: auto; color: var(--stumm); font-size: 18px; align-self: center; }
.kz .marke { flex: none; margin-top: 2px; }
.buchung.storniert { opacity: .6; }
.buchung.storniert .klein { text-decoration: line-through; }
.pos-hinweis { grid-column: 1 / -1; margin: 2px 0 6px; }
.haken-reihe { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.mitteilungs-wahl .haken { padding: 6px 0; }
.qr { width: 200px; height: 200px; border: 1px solid var(--linie); border-radius: 12px; background: #fff; padding: 6px; display: block; margin: 8px 0; }
.phase .einplanen { margin-top: 6px; align-self: flex-start; }
.standort-wahl { padding: 10px 14px 0; }
.legende-schalter { margin-bottom: 6px; }
.legende.zu .legende-punkt { display: none; }
button.wer { background: transparent; border: 0; padding: 0; text-align: left; cursor: pointer; color: inherit; font: inherit; width: 100%; border-radius: 10px; }
button.wer:hover { background: var(--senke); }

/* Kontrast: Platzhalter lesbar, leere Spalten dekorativ */
.kal-leer { color: var(--stumm); }
.kal-leer:not(.text) { min-height: 22px; border-radius: 8px; background: repeating-linear-gradient(135deg, transparent 0 6px, var(--senke) 6px 12px); }
.tp-leer { color: var(--stumm); }

/* Schriftgrößen: nichts unter 12 px für Inhalte */
.tab th { font-size: 12px; }
.abz.klein { font-size: 12.5px; padding: 2px 7px; }
.phase span { font-size: 12px; }
.unten-punkt span { font-size: 12px; }
.kennzahl.klickbar::after { content: "ansehen ›"; color: var(--stumm); font-size: 12px; margin-top: 4px; }

/* Fernseher / Lager-Bildschirm: feste Kopfzeile in Marine, Größen an die Bildschirmhöhe gekoppelt, immer dunkel */
body.vollbild { --grund: #0b1220; --flaeche: #111a2e; --senke: #182238; --tinte: #f3f6fb; --stumm: #aab4c5; --linie: #273350; --linie-stark: #3a4a70; --akzent-weich: #1b2a48; --gut-weich: #0f2e1d; --warn-weich: #3a1a1a; --acht-weich: #3a2d10; background: #0b1220; color: #f3f6fb; }
body.vollbild .tv-kopf { background: #0f172a; color: #fff; }
body.vollbild .tv-kopf h1 { font-size: clamp(24px, 3.2vh, 44px); }
body.vollbild .tv-uhr { font-size: clamp(18px, 2.4vh, 34px); color: #fff; }
body.vollbild .tv-aus { color: rgba(255,255,255,.7) !important; }
body.vollbild .tv-raster { min-height: calc(100vh - 90px); align-content: start; }
body.vollbild .kachel.gross { background: var(--flaeche); border-color: var(--linie); }
body.vollbild .kachel.gross h2 { font-size: clamp(26px, 3.4vh, 48px); color: #fff; }
body.vollbild .kachel.gross .kz { font-size: clamp(24px, 2.9vh, 40px); padding: 12px 4px; color: #f3f6fb; line-height: 1.3; }
body.vollbild .kachel.gross .klein { font-size: clamp(19px, 2.2vh, 30px); color: #aab4c5; }
body.vollbild .kachel.gross .kz-tour b { font-size: clamp(22px, 2.7vh, 36px); }
body.vollbild .kachel.gross .kz-tour .klein { font-size: clamp(18px, 2.1vh, 28px); }
body.vollbild .kachel.gross .marke { font-size: clamp(15px, 1.9vh, 26px); padding: 3px 10px; }
body.vollbild .kachel.gross .kachel-leer { font-size: clamp(20px, 2.4vh, 32px); color: #aab4c5; }
body.vollbild .kachel.gross .fortschritt { height: 12px; }
body.vollbild .kachel.gross .kal-eintrag, body.vollbild .kachel.gross .kal-titel { font-size: clamp(20px, 2.4vh, 32px); }
body.vollbild .kachel.touch .knopf-reihe .knopf { font-size: clamp(22px, 2.6vh, 34px) !important; }

/* Handy: Titel, Meldungen, Formulare, Tabellen, Reiter, Tippziele */
@media (max-width: 860px) {
  .kopf-titel { display: none; }                     /* Der Titel steht als Überschrift direkt darunter */
  .kopfleiste .marke-chip { display: none; }         /* Demo-Chip steht auf Start und Anmeldung */
  .breit-nur-block { display: none !important; }
  .meldung { bottom: calc(86px + env(safe-area-inset-bottom, 0px)); max-width: calc(100vw - 24px); }
  .reihe, .reihe.drei, .pos-felder { grid-template-columns: 1fr; }
  .reihe.paar { grid-template-columns: 1fr 1fr; }
  .tab-huelle { position: relative; -webkit-overflow-scrolling: touch; background: linear-gradient(to right, var(--flaeche) 30%, transparent), linear-gradient(to left, var(--flaeche) 30%, transparent) 100% 0, radial-gradient(farthest-side at 0 50%, rgba(0,0,0,.14), transparent), radial-gradient(farthest-side at 100% 50%, rgba(0,0,0,.14), transparent) 100% 0; background-repeat: no-repeat; background-size: 40px 100%, 40px 100%, 14px 100%, 14px 100%; background-attachment: local, local, scroll, scroll; }
  .tab-huelle::after { content: "← seitlich wischen →"; display: block; text-align: center; color: var(--stumm); font-size: 12px; padding: 6px 0 2px; }
  .reiter { flex-wrap: wrap; overflow: visible; }
  .reiter.gross button { font-size: 14.5px; padding: 9px 10px; }
  .hilfe-punkt { width: 32px; height: 32px; }
  .haken input { width: 26px; height: 26px; }
  .legende-punkt, .personen-wahl .knopf, .tage-wahl .knopf { min-height: 40px; }
  .knopf.mini { min-height: 36px; min-width: 36px; }
  .farbe { width: 36px; height: 36px; }
  .kal-listenkopf .knopf.mini { min-height: 40px; min-width: 40px; }
  .hilfe-schwebend { transition: transform .2s ease, opacity .2s ease; }
  .hilfe-schwebend.versteckt { transform: translateY(120px); opacity: 0; pointer-events: none; }
  .inhalt { padding-bottom: 120px; }
  .dlg-fuss { flex-wrap: wrap; }
  .dlg-fuss .knopf.warn:not(:last-child) { order: -1; width: 100%; background: transparent; color: var(--warn); border-color: var(--linie); margin-right: 0; }
}
@media (max-width: 420px) { .reihe.paar { grid-template-columns: 1fr; } }

/* ===== Fassung s3: Papierkorb, Mehrfach-Auswahl, gesperrte Knöpfe, Werk-Kontakte, Vorwoche ===== */
.meldung .meld-knopf { background: transparent; color: var(--grund); border: 1px solid currentColor; border-radius: var(--r); padding: 4px 10px; font: inherit; font-weight: 700; cursor: pointer; min-height: 32px; }
.meldung .meld-knopf:hover { background: rgba(255,255,255,.12); }
.knopf.aus { opacity: .5; cursor: not-allowed; }
.knopf.aus:hover { filter: none; }
.knopf:disabled { opacity: .5; cursor: not-allowed; }
.mehrfach-leiste { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; margin: 0 0 10px; background: var(--akzent-weich); border: 1px solid var(--akzent); border-radius: var(--r); position: sticky; top: calc(var(--kopfhoehe) + 4px); z-index: 5; }
.mehrfach-leiste b { margin-right: auto; }
.mehrfach-haken { width: 20px; height: 20px; accent-color: var(--akzent); cursor: pointer; flex: none; }
.haken-spalte { width: 34px; }
tr.gewaehlt td, .auftrag-karte.gewaehlt { background: var(--akzent-weich); }
.auftrag-karte.gewaehlt { outline: 2px solid var(--akzent); }
.kal-wahl-zeile { display: flex; align-items: center; gap: 8px; }
.kal-wahl-zeile > .kal-eintrag { flex: 1; min-width: 0; }
.kal-eintrag.gewaehlt { outline: 2px solid var(--akzent); }
.mehrfach-platz { width: 20px; flex: none; }
.kontakt-zeile { display: grid; grid-template-columns: 1.2fr 1fr 1.4fr 1fr auto auto; gap: 6px; align-items: center; margin-bottom: 6px; }
.kontakt-zeile .haken-mail { display: flex; align-items: center; gap: 4px; font-size: 13px; white-space: nowrap; }
.empfaenger-liste { display: flex; flex-direction: column; gap: 4px; margin: 4px 0 10px; }
.empfaenger-liste label { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.vorwoche { margin-bottom: 12px; }
.vorwoche summary { cursor: pointer; padding: 10px 14px; font-weight: 700; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; list-style: none; }
.vorwoche summary::-webkit-details-marker { display: none; }
.vorwoche summary::before { content: "▸"; color: var(--stumm); }
.vorwoche[open] summary::before { content: "▾"; }
.vorwoche .vw-koerper { padding: 0 14px 12px; }
.vw-werk { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px solid var(--linie); }
.vw-werk:first-child { border-top: 0; }
.vw-offen { margin-top: 10px; padding: 10px; border: 1px solid var(--warn); background: var(--warn-weich); border-radius: var(--r); }
.vw-offen .buchung { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 4px 0; }
@media (max-width: 760px) {
  .kontakt-zeile { grid-template-columns: 1fr 1fr; }
  .kontakt-zeile .haken-mail { grid-column: 1; }
  .mehrfach-leiste { top: calc(var(--kopfhoehe) + 2px); }
}
.nowrap { white-space: nowrap; }
.dlg-fuss .knopf.links { order: -1; margin-right: auto; }
.kontakt-zeile > button { justify-self: end; width: auto; }
.ak-kopf .mehrfach-haken { margin-right: 4px; }
.ak-wahl { display: inline-flex; align-items: center; gap: 8px; }
@media (max-width: 760px) {
  .kontakt-zeile { padding-bottom: 10px; border-bottom: 1px solid var(--linie); margin-bottom: 10px; }
}

/* ===== Fassung s4: Planungstafel Monat / 3 / 6 Monate / Jahr ===== */
.gantt { --sh: 30px; --sh-klein: 22px; display: grid; min-width: calc(200px + var(--n) * var(--zw)); }
.gantt-3m, .gantt-6m, .gantt-jahr { --sh: 24px; }
.gantt-kopf, .gantt-zeile { display: grid; grid-template-columns: 200px repeat(var(--n), minmax(var(--zw), 1fr)); }
.gantt-kopf > * { border-right: 1px solid var(--linie); background: var(--senke); }
.g-ecke { position: sticky; left: 0; z-index: 4; padding: 6px 10px; font-size: 12.5px; font-weight: 600; color: var(--stumm); }
.g-monat { padding: 6px 8px; font-size: 12.5px; font-weight: 700; border-bottom: 1px solid var(--linie); white-space: nowrap; overflow: hidden; }
.gantt-einheiten { border-bottom: 2px solid var(--linie-stark); }
.g-einheit { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3px 0; font-size: 11.5px; color: var(--stumm); font-variant-numeric: tabular-nums; border: 0; border-right: 1px solid var(--linie); background: var(--senke); font-family: inherit; min-height: 30px; }
button.g-einheit { cursor: pointer; }
button.g-einheit:hover { background: var(--akzent-weich); color: var(--akzent); }
.g-einheit b { font-size: 12.5px; color: var(--tinte); }
.g-einheit small { font-size: 10px; }
.g-einheit.frei { opacity: .6; }
.g-einheit.heute { background: var(--akzent-weich); color: var(--akzent); box-shadow: inset 0 -3px 0 var(--akzent); }
.gantt-zeile { border-bottom: 1px solid var(--linie); }
.gantt-zeile:last-child { border-bottom: 0; }
.g-kopf { gap: 4px; }
.g-auslastung { display: flex; flex-direction: column; gap: 2px; }
.g-auslastung .fortschritt { height: 5px; }
.gantt-spur { grid-column: 2 / -1; display: grid; grid-template-columns: repeat(var(--n), minmax(var(--zw), 1fr)); row-gap: 3px; padding: 4px 0; position: relative; min-height: 40px; }
.gantt-spur.ziel { outline: 2px dashed var(--akzent); outline-offset: -2px; }
.g-zelle { border-right: 1px solid color-mix(in srgb, var(--linie) 70%, transparent); margin: -4px 0; }
.g-zelle.frei { background: color-mix(in srgb, var(--senke) 60%, transparent); }
.g-zelle.heute { background: color-mix(in srgb, var(--akzent-weich) 60%, transparent); }
.g-balken { margin: 0 1px; padding: 2px 6px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; z-index: 1; min-width: 0; font-size: 12px; }
.g-balken b { display: inline; font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.g-balken span { display: inline; font-size: 11px; }
.g-balken .konflikt { position: static; flex: none; width: 15px; height: 15px; font-size: 10px; border: 0; }
.g-balken.ab-vorher { border-left-style: dashed; }
.g-balken.geht-weiter { border-right: 3px solid var(--pf); }
.gantt-6m .g-balken, .gantt-jahr .g-balken { padding: 1px 4px; }
.gantt-jahr .g-balken b { font-size: 11px; }
.g-termin { z-index: 1; margin: 0 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; display: flex; align-items: center; }
.g-abwesend .gantt-spur { min-height: 30px; }
@media print {
  .gantt { min-width: 0 !important; }
  .gantt-kopf, .gantt-zeile { grid-template-columns: 150px repeat(var(--n), 1fr); }
  .g-balken { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .tafel-huelle { overflow: visible !important; box-shadow: none; }
}
.gantt-spur { align-self: stretch; }
.g-balken b { flex: 0 1 auto; min-width: 0; }
.g-balken span { flex: 0 20 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* Lagerbestellung / Abholung */
.art-zeile { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.haken-zeile { display: flex; align-items: center; gap: 8px; margin: -4px 0 10px; font-size: 14px; cursor: pointer; }
.haken-zeile input { width: 18px; height: 18px; accent-color: var(--akzent); }
.abholung-maske .feld-hinweis select { margin-top: 6px; }
@media (max-width: 760px) {
  .gantt { min-width: calc(120px + var(--n) * var(--zw)); }
  .gantt-kopf, .gantt-zeile { grid-template-columns: 120px repeat(var(--n), minmax(var(--zw), 1fr)); }
  .g-kopf .kfz { display: none; }
  .segment button { padding: 7px 9px; font-size: 13px; }
}

/* s5: Werke & LKW — Farbe je Werk-Status (gelb = bereit, gruen = abgeholt/verladen) */
tr.ws-gelb > td { background: var(--acht-weich); }
tr.ws-gruen > td { background: var(--gut-weich); }
tr.ws-gelb > td:first-child { box-shadow: inset 4px 0 0 var(--acht); }
tr.ws-gruen > td:first-child { box-shadow: inset 4px 0 0 var(--gut); }
.ein.ws-wahl.ws-gelb { background-color: var(--acht-weich); border-color: var(--acht); color: var(--acht); font-weight: 600; }
.ein.ws-wahl.ws-gruen { background-color: var(--gut-weich); border-color: var(--gut); color: var(--gut); font-weight: 600; }

/* s5: Verleih mit Reservierung — Belegungsstreifen, kleiner Kalender, Liste */
.vl-raster { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 14px; align-items: start; margin-top: 14px; }
.vl-raster > .karte { margin-top: 0; min-width: 0; }
.vl-seite { display: grid; gap: 14px; }
.vl-seite > .karte { margin-top: 0; }
@media (max-width: 1180px) { .vl-raster { grid-template-columns: 1fr; } .vl-seite { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); } }
.vl-streifen { display: flex; gap: 2px; }
.vl-tag { display: inline-block; width: 12px; height: 22px; border-radius: 3px; border: 1px solid var(--linie); background: var(--flaeche); padding: 0; flex: none; }
button.vl-tag { cursor: pointer; }
button.vl-tag:hover, button.vl-tag:focus-visible { outline: 2px solid var(--blau); outline-offset: 1px; }
.vl-tag.we { background: var(--senke); }
.vl-tag.heute { border-color: var(--tinte); border-width: 2px; }
.vl-tag.aus { background: var(--blau); border-color: var(--blau); }
.vl-tag.ueber { background: var(--warn); border-color: var(--warn); }
.vl-tag.res { background: var(--acht); border-color: var(--acht); }
.vl-tag.wahl { background: var(--gut); border-color: var(--gut); }
.vl-tag.wahl.res, .vl-tag.wahl.aus, .vl-tag.wahl.ueber { outline: 2px solid var(--warn); outline-offset: 1px; }
.vl-belegung { margin: 6px 0 12px; display: grid; gap: 4px; }
.vl-streifen.gross .vl-tag { width: 16px; height: 24px; }
.vl-legende { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; color: var(--stumm); }
.vl-legende span { display: inline-flex; align-items: center; gap: 6px; }
.vl-legende .vl-tag { width: 12px; height: 12px; }
.vl-naechste { color: var(--acht); font-weight: 600; margin-top: 2px; }
tr.vl-zeile-res > td { background: var(--acht-weich); }
td.vl-aktionen { min-width: 196px; }
.vl-knoepfe { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; max-width: 220px; margin-left: auto; }
.vl-k-leiste { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.vl-k-kopf { display: flex; align-items: center; gap: 8px; }
.vl-k-kopf b { min-width: 118px; text-align: center; }
.vl-k-gitter { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.vl-k-wt { font-size: 11px; color: var(--stumm); text-align: center; font-weight: 600; padding-bottom: 2px; }
.vl-k-tag { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 2px; min-height: 38px; padding: 4px 0 3px;
  border: 1px solid var(--linie); border-radius: 8px; background: var(--flaeche); color: inherit; font-size: 13px; cursor: pointer; }
.vl-k-tag.fremd { opacity: .45; }
.vl-k-tag.hat-res { background: var(--acht-weich); border-color: var(--acht); }
.vl-k-tag.hat-aus { background: var(--blau-weich); }
.vl-k-tag.heute span:first-child { font-weight: 800; text-decoration: underline; }
.vl-k-tag.gewaehlt { outline: 2px solid var(--blau); outline-offset: 0; }
.vl-k-punkte { display: flex; gap: 3px; height: 7px; }
.vl-k-punkte i { width: 7px; height: 7px; border-radius: 50%; display: block; }
.vl-k-punkte i.aus { background: var(--blau); }
.vl-k-punkte i.res { background: var(--acht); }
.vl-k-liste { margin-top: 10px; display: grid; gap: 6px; }
.vl-k-eintrag { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left; padding: 6px 9px; border-radius: 8px; border: 1px solid var(--linie); border-left: 4px solid var(--blau); background: var(--flaeche); color: inherit; font-size: 13px; }
.vl-k-eintrag.res { border-left-color: var(--acht); }
.vl-k-eintrag.ueber { border-left-color: var(--warn); }
button.vl-k-eintrag { cursor: pointer; }
.vl-res { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--linie); }
.vl-res:last-child { border-bottom: 0; }
.vl-res-text { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; background: none; border: 0; padding: 0; text-align: left; color: inherit; cursor: pointer; min-width: 0; }
.vl-res-text:hover b { text-decoration: underline; }
.vl-res.laeuft { box-shadow: inset 4px 0 0 var(--acht); padding-left: 8px; }
.vl-res.vorbei { opacity: .6; }

/* s7: E-Mail mit Anhang ohne Server (Teilen / Herunterladen + Mailprogramm) */
.mail-versand { display: grid; gap: 8px; }
.mv-zeile { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--linie); }
.mv-zeile b { overflow-wrap: anywhere; font-weight: 600; }
.mv-datei { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--linie); border-radius: 10px; background: var(--senke); }
.mv-datei span { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 14px; }
.mv-rechts { display: flex; justify-content: flex-end; margin-top: -4px; }

/* s8: Lieferschein bei der Ausgabe */
.ls-zeile { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ls-zeile .ein { flex: 1; min-width: 200px; }
.ls-fotos { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.ls-eintrag { display: grid; gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--linie); }
.ls-eintrag:last-child { border-bottom: 0; }

/* s10: Anhänger im Liefer-Wochenplan */
.tp-zelle .tp-anhaenger { width: 100%; margin-top: 6px; font-size: 12px; min-height: 30px; }
.tp-zelle .tp-anhaenger.mit { border-color: var(--gut); background-color: var(--gut-weich); color: var(--gut); font-weight: 600; }
.tp-zelle .tp-anh-vorschlag { width: 100%; margin-top: 4px; border-color: var(--acht); background: var(--acht-weich); color: var(--acht); font-weight: 600; white-space: normal; }
.tp-fahrzeug .stumm { display: block; }

/* s11: Lager Bescheid geben / vorbereiten */
.lager-karte.vb-offen { border-color: var(--acht); box-shadow: inset 4px 0 0 var(--acht); }
.lager-karte.vb-fertig { box-shadow: inset 4px 0 0 var(--gut); }
.vb-band { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 8px 0; padding: 8px 10px; border-radius: 10px; background: var(--acht-weich); color: var(--acht); font-size: 14px; }
.vb-band.fertig { background: var(--gut-weich); color: var(--gut); }
.vb-band .knopf { margin-left: auto; }
.vb-info > div { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.haken-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 4px 12px; }

/* s13: Einzeleinsatz („Doppelplanung“) — Person arbeitet einzelne Tage auf einer anderen Baustelle */
.kuerzel.woanders { outline: 2px dashed #D9731A; outline-offset: 1px; opacity: .6; }
.kuerzel.hilft { outline: 2px solid #2E8B57; outline-offset: 1px; }
.einsatz-chip { min-width: 0; display: flex; align-items: center; gap: 5px; margin-top: 2px; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; cursor: pointer; border: 1px dashed #D9731A; color: #8a4510; background: #fdf0e3; max-width: 100%; }
.einsatz-chip b { flex: none; font-size: 10.5px; }
.einsatz-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.einsatz-chip.hilft { border: 1px solid #2E8B57; color: #1d5e3a; background: #e6f4ec; font-weight: 600; }
:root[data-thema="dunkel"] .einsatz-chip { background: #3a2a1a; color: #f3c9a0; }
:root[data-thema="dunkel"] .einsatz-chip.hilft { background: #173326; color: #a9e0c0; }
/* s15: Kürzel je Tag (ziehen / antippen) */
.tag-leute { display: flex; flex-wrap: wrap; gap: 3px; margin-bottom: 2px; }
.tl-kz { width: 21px; height: 21px; font-size: 9px; cursor: default; }
.tl-kz[role="button"] { cursor: grab; }
.tl-kz.zieht { opacity: .35; }
.tl-kz.woanders { background: #D9731A !important; outline: 2px dashed #D9731A; opacity: .55; }
.tl-kz.hilft { background: #2E8B57 !important; box-shadow: 0 0 0 2px #bfe3cd; outline: 0; }
.tl-kz.weg { opacity: .3; text-decoration: line-through; }
.tl-karte .tag-leute { margin-top: 8px; }
.tl-karte .tl-kz { width: 28px; height: 28px; font-size: 11px; }
.tafel-legende { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 12.5px; color: var(--stumm); margin: -4px 0 10px; }
.tafel-legende span { display: inline-flex; align-items: center; gap: 6px; }
.tafel-legende .kuerzel { width: 18px; height: 18px; font-size: 8px; }
.person-tag .pt-kopf { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.pt-liste { display: flex; flex-direction: column; gap: 6px; }
.pt-wahl { width: 100%; justify-content: flex-start; text-align: left; min-height: 42px; flex-wrap: wrap; }
.pt-wahl .klein { color: var(--stumm); font-weight: 400; }
.pt-zurueck { border-color: #D9731A; color: #8a4510; }
.pt-punkt { width: 10px; height: 10px; border-radius: 50%; background: var(--kf); flex: none; }
@media print { .tafel-legende { display: none; } }
.einsatz-karte .aushilfe { margin-top: 6px; }

/* s14: Tagesbaustelle */
.zelle { position: relative; }
.zelle-plus { position: absolute; right: 4px; bottom: 4px; width: 24px; height: 24px; border-radius: 50%; border: 1px dashed var(--linie-stark); background: var(--flaeche); color: var(--stumm); font-size: 16px; line-height: 1; cursor: pointer; opacity: 0; transition: opacity .12s; }
.zelle:hover .zelle-plus, .zelle-plus:focus-visible { opacity: 1; }
@media (hover: none) { .zelle-plus { opacity: .6; } }
.tb-wahl { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tb-wahl select { flex: 1; min-width: 200px; }
.tb-kopf { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.tagesbaustelle { padding: 10px 12px; border: 1px dashed var(--linie-stark); border-radius: 12px; margin-bottom: 12px; }
@media print { .zelle-plus { display: none; } }

/* s16: Ware ohne Auftrag */
.fw-kameras { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.fw-kameras .kamera-knopf { width: 100%; justify-content: center; }
@media (max-width: 560px) { .fw-kameras { grid-template-columns: 1fr; } }
.fw-detail { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border: 1px solid var(--linie); border-radius: var(--r); background: var(--senke); }
.fw-zeile { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px; align-items: baseline; font-size: 14px; }
.fw-zeile span:last-child { overflow-wrap: anywhere; }
.fw-detail .ls-fotos { margin-top: 6px; }
.fw-bereich { margin: 4px 0 14px; }
.fw-karte { border-left: 4px solid var(--linie-stark); }
.fw-karte.fw-offen { border-left-color: var(--acht); }
.fw-karte.fw-dran { border-left-color: var(--blau); }
.fw-kopf { display: flex; gap: 10px; align-items: flex-start; }
.fw-bild { width: 64px; height: 64px; flex: none; border-radius: 8px; overflow: hidden; background: var(--senke); }
.fw-bild img { width: 100%; height: 100%; object-fit: cover; }
.fw-text { min-width: 0; flex: 1; }
.fw-wahl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 560px) { .fw-wahl { grid-template-columns: 1fr; } }
.fw-wahl .knopf { justify-content: center; text-align: center; white-space: normal; }
.fw-wahl .knopf.aktiv { outline: 3px solid var(--akzent); outline-offset: 1px; font-weight: 700; }
.fw-wahl .fw-w-lager.aktiv { background: var(--gut-weich); color: var(--gut); }
.fw-wahl .fw-w-auftrag.aktiv { background: var(--blau-weich); color: var(--blau); }
.fw-wahl .fw-w-zurueck.aktiv { background: var(--warn-weich); color: var(--warn); }
.fw-auftraege { display: flex; flex-direction: column; gap: 6px; max-height: 300px; overflow-y: auto; padding: 2px; }
button.fw-auftrag { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 10px; text-align: left; width: 100%; padding: 8px 10px; border: 1px solid var(--linie); border-radius: var(--r); background: var(--flaeche); color: inherit; font: inherit; cursor: pointer; }
button.fw-auftrag .klein { grid-column: 2; }
button.fw-auftrag.aktiv { border-color: var(--blau); background: var(--blau-weich); box-shadow: 0 0 0 2px var(--blau) inset; }
.fw-pos { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--linie); border-radius: var(--r); margin-bottom: 6px; cursor: pointer; }
.fw-pos input { margin-top: 3px; }
.fw-band { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.fw-band .knopf { margin-left: auto; }

/* s18: Spedition — Wochen-Leiste (4 zurück, 4 voraus) */
.sp-wochen { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 8px; margin-bottom: 12px; scrollbar-width: thin; }
.sp-woche { flex: 0 0 auto; min-width: 104px; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 7px 10px; border: 1px solid var(--linie); border-left: 4px solid var(--linie-stark); border-radius: var(--r); background: var(--flaeche); color: inherit; font: inherit; cursor: pointer; text-align: left; }
.sp-woche .klein { color: var(--stumm); }
.sp-woche .sp-zahl { font-size: 12px; font-variant-numeric: tabular-nums; }
.sp-woche.sp-gruen { border-left-color: var(--gut); }
.sp-woche.sp-gelb { border-left-color: var(--acht); }
.sp-woche.sp-offen { border-left-color: var(--blau); }
.sp-woche.sp-leer { opacity: .65; }
.sp-woche.jetzt b::after { content: " •"; color: var(--akzent); }
.sp-woche.aktiv { outline: 2px solid var(--akzent); outline-offset: 1px; background: var(--akzent-weich); opacity: 1; }
.sp-woche.sp-alle { min-width: 76px; }
.sp-wochen-titel { font-size: 15px; margin: 18px 2px 8px; }
.sp-wochen-titel.jetzt { color: var(--akzent); }
.sp-tour.zu .karte-kopf { border-bottom: 0; }
.sp-tour.zu { opacity: .85; }
@media print { .sp-wochen { display: none; } }

/* s18: Kalender — Farbe nach Person, Woche mit Uhrzeiten */
.kal-eintrag.mehrfarbig { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--ef) 22%, var(--flaeche)) 0 8px, color-mix(in srgb, var(--ef2) 22%, var(--flaeche)) 8px 16px); border-left-color: var(--ef); }
.kal-personen { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: -4px 0 12px; }
.kal-farbe-nach { display: inline-flex; align-items: center; gap: 4px; margin-right: 6px; }
.kal-farbe-nach .knopf.aktiv { background: var(--akzent); color: var(--grund); border-color: var(--akzent); }
.kal-person { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--linie); background: var(--flaeche); border-radius: 999px; padding: 3px 10px 3px 4px; font: inherit; font-size: 12.5px; cursor: pointer; color: inherit; }
.kal-person i { width: 14px; height: 14px; border-radius: 50%; background: var(--pf); flex: none; }
.kal-person.aktiv { outline: 2px solid var(--pf); outline-offset: 1px; font-weight: 700; }
.kal-person.aus { opacity: .45; }
.pf-liste { display: flex; flex-direction: column; gap: 6px; }
.pf-zeile { display: grid; grid-template-columns: 18px minmax(0, 1fr) 48px; align-items: center; gap: 10px; padding: 4px 0; cursor: pointer; }
.pf-punkt { width: 16px; height: 16px; border-radius: 50%; background: var(--pf); display: inline-block; }
.pf-zeile input[type=color] { width: 44px; height: 30px; border: 1px solid var(--linie); border-radius: 6px; padding: 0; background: none; }

.kw-huelle { overflow-x: auto; border: 1px solid var(--linie); border-radius: 16px; background: var(--flaeche); }
.kw-raster { display: grid; grid-template-columns: 54px repeat(7, minmax(110px, 1fr)); min-width: 820px; }
.kw-ecke { font-size: 11.5px; color: var(--stumm); padding: 8px 6px; border-bottom: 1px solid var(--linie); }
.kw-kopf { padding: 8px 8px 6px; border-bottom: 1px solid var(--linie); border-left: 1px solid var(--linie); font-size: 13px; text-align: right; position: sticky; top: 0; background: var(--flaeche); z-index: 2; }
.kw-kopf.heute { background: var(--blau-weich); color: var(--blau); }
.kw-kopf.we { color: var(--stumm); }
.kw-gt-label { font-size: 11px; color: var(--stumm); padding: 6px; border-bottom: 1px solid var(--linie-stark); }
.kw-ganztags { grid-column: 2 / -1; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-auto-rows: minmax(24px, auto); gap: 2px 0; padding: 3px 0 4px; border-bottom: 1px solid var(--linie-stark); position: relative; min-height: 30px; }
.kw-gt-zelle { border-left: 1px solid var(--linie); min-height: 26px; }
.kw-gt-zelle.heute { background: color-mix(in srgb, var(--blau-weich) 60%, transparent); }
.kw-gt-zelle.ziel, .kw-tag.ziel { background: var(--akzent-weich); outline: 2px dashed var(--akzent); outline-offset: -2px; }
.kal-eintrag.kw-band { margin: 0 3px; position: relative; z-index: 1; width: auto; }
.kw-stunden { position: relative; }
.kw-stunde { position: absolute; right: 6px; transform: translateY(-50%); font-size: 11px; color: var(--stumm); font-variant-numeric: tabular-nums; }
.kw-stunde:first-child { transform: none; }
.kw-tag { position: relative; border-left: 1px solid var(--linie); background-image: repeating-linear-gradient(to bottom, var(--linie) 0 1px, transparent 1px var(--kw-std)), repeating-linear-gradient(to bottom, transparent 0 calc(var(--kw-std) / 2), color-mix(in srgb, var(--linie) 45%, transparent) calc(var(--kw-std) / 2) calc(var(--kw-std) / 2 + 1px), transparent calc(var(--kw-std) / 2 + 1px) var(--kw-std)); }
.kw-tag.heute { background-color: color-mix(in srgb, var(--blau-weich) 45%, transparent); }
.kw-tag.we { background-color: color-mix(in srgb, var(--senke) 60%, transparent); }
.kal-eintrag.kw-termin { position: absolute; align-items: flex-start; align-content: flex-start; overflow: hidden; padding: 3px 6px; font-size: 12px; line-height: 1.25; z-index: 1; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.kal-eintrag.kw-termin .kal-zeit { width: 100%; font-size: 11px; }
.kal-eintrag.kw-termin.kurz { flex-wrap: nowrap; }
.kal-eintrag.kw-termin.kurz .kal-zeit { width: auto; }
.kal-eintrag.kw-termin.kurz .kal-titel { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kal-eintrag.beweglich { cursor: grab; }
.kal-eintrag.zieht { opacity: .4; }
.kw-griff { position: absolute; left: 0; right: 0; bottom: 0; height: 7px; cursor: ns-resize; }
.kw-griff::after { content: ""; position: absolute; left: 50%; bottom: 2px; width: 18px; margin-left: -9px; height: 2px; border-radius: 2px; background: color-mix(in srgb, var(--tinte) 35%, transparent); opacity: 0; }
.kw-termin:hover .kw-griff::after { opacity: 1; }
.kw-jetzt { position: absolute; left: 0; right: 0; height: 2px; background: var(--warn); z-index: 3; pointer-events: none; }
.kw-jetzt::before { content: ""; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--warn); }
.kw-tipp { margin: 6px 2px 0; }
@media print { .kw-tipp, .kal-farbe-nach { display: none; } .kw-huelle { overflow: visible; } }
.kal-eintrag.kw-termin, .kal-eintrag.kw-band { background: color-mix(in srgb, var(--ef) 30%, var(--flaeche)); }
.kal-eintrag.kw-termin.mehrfarbig, .kal-eintrag.kw-band.mehrfarbig { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--ef) 34%, var(--flaeche)) 0 8px, color-mix(in srgb, var(--ef2) 34%, var(--flaeche)) 8px 16px); }
.kal-eintrag.kw-termin.wichtig, .kal-eintrag.kw-band.wichtig { background: var(--warn-weich); }
.kw-griff { touch-action: none; }

/* s19: Werke & LKW — Gewicht direkt eintragen, Hauptspedition */
.kg-ein { display: inline-flex; align-items: center; gap: 4px; }
.kg-ein .ein { width: 84px; text-align: right; }
.haupt-sped { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-left: auto; }

/* s20: Aufgaben — Kachel und Seite */
.ag-zeile { display: flex; align-items: flex-start; gap: 8px; padding: 6px 4px; border-bottom: 1px solid var(--linie); }
.ag-zeile:last-child { border-bottom: 0; }
.ag-haken { flex: none; width: 22px; height: 22px; margin-top: 1px; border-radius: 50%; border: 2px solid var(--linie-stark); background: var(--flaeche); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.ag-haken:hover { border-color: var(--gut); }
.ag-haken.an { background: var(--gut); border-color: var(--gut); }
.ag-wichtig { flex: none; width: 4px; align-self: stretch; border-radius: 2px; background: var(--warn); }
.ag-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; text-align: left; background: transparent; border: 0; padding: 0; color: var(--tinte); font-size: 14px; cursor: pointer; }
.ag-text:hover .ag-titel { text-decoration: underline; }
.ag-titel { font-weight: 600; overflow-wrap: anywhere; }
.ag-titel.durch { text-decoration: line-through; color: var(--stumm); font-weight: 500; }
.ag-text:hover .ag-titel.durch { text-decoration: line-through underline; }
.ag-unter { color: var(--stumm); }
.ag-unter.rot { color: var(--warn); font-weight: 600; }
.ag-zeile.erledigt .ag-notiz { display: none; }
.ag-abschnitt { margin: 8px 0 2px; text-transform: uppercase; letter-spacing: .04em; font-size: 11px; font-weight: 700; }
.ag-abschnitt:first-child { margin-top: 0; }
.ag-neu { display: flex; gap: 6px; margin-top: 10px; }
.ag-neu .ein { flex: 1; min-width: 0; }
.ag-raster { align-items: start; }
.kachel.ag-rot h2 { color: var(--warn); }
.kachel.ag-rot { border-color: var(--warn); }
.kachel.gross .ag-text { font-size: 20px; }
.kachel.gross .ag-haken { width: 30px; height: 30px; }

/* s21: Chat */
.chat-bereich { display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.chat-liste { display: flex; flex-direction: column; gap: 4px; overflow-y: auto; padding: 4px 2px; min-height: 80px; }
.chat-bereich.kompakt .chat-liste { max-height: 260px; background: var(--senke); border-radius: 12px; padding: 8px; }
.chat-seite .chat-bereich { flex: 1; min-height: 0; }
.chat-seite .chat-liste { flex: 1; padding: 10px 6px; }
.chat-tag { text-align: center; margin: 6px 0 2px; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.chat-zeile { display: flex; }
.chat-zeile.eigen { justify-content: flex-end; }
.chat-blase { position: relative; max-width: min(78%, 560px); background: var(--flaeche); border: 1px solid var(--linie); border-radius: 14px 14px 14px 4px; padding: 7px 34px 7px 11px; display: flex; flex-direction: column; gap: 2px; }
.chat-blase.eigen { background: var(--blau-weich); border-color: transparent; border-radius: 14px 14px 4px 14px; }
.chat-von { color: var(--akzent); }
.chat-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.35; }
.chat-zeit { align-self: flex-end; font-size: 11px; }
.chat-weg { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border: 0; border-radius: 50%; background: transparent; color: var(--stumm); cursor: pointer; opacity: 0; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.chat-blase:hover .chat-weg, .chat-weg:focus { opacity: 1; }
.chat-eingabe { display: flex; gap: 6px; align-items: flex-end; }
.chat-eingabe textarea { flex: 1; min-width: 0; resize: none; }
.chat-eingabe .knopf { flex: none; }
.chat-leer { margin: 8px 0; }
.chat-raster { display: grid; grid-template-columns: 320px 1fr; gap: 14px; height: calc(100vh - 170px); min-height: 420px; }
.chat-liste-links { display: flex; flex-direction: column; gap: 6px; overflow-y: auto; min-height: 0; }
.chat-eintrag { text-align: left; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 12px; padding: 9px 11px; cursor: pointer; color: var(--tinte); display: flex; flex-direction: column; gap: 2px; }
.chat-eintrag.aktiv { border-color: var(--akzent); box-shadow: 0 0 0 1px var(--akzent) inset; }
.chat-eintrag.neu { border-color: var(--blau); background: var(--blau-weich); }
.chat-eintrag-kopf { display: flex; align-items: center; gap: 8px; }
.chat-eintrag-titel { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-zahl { flex: none; min-width: 20px; height: 20px; border-radius: 10px; background: #B23A26; color: #fff; font-size: 12.5px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; padding: 0 6px; }
.chat-vorschau { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-rechts { display: flex; flex-direction: column; gap: 8px; min-height: 0; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--rk); padding: 12px 14px; }
.chat-kopf { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-bottom: 8px; border-bottom: 1px solid var(--linie); }
.chat-kopf-text { flex: 1; min-width: 0; }
.chat-leer-rechts { margin: auto; }
.knopf.chat-neu { border-color: var(--warn); color: var(--warn); font-weight: 700; }
.chat-fenster .chat-liste { max-height: 55vh; min-height: 160px; background: var(--senke); border-radius: 12px; padding: 8px; }
@media (max-width: 759px) {
  .chat-raster { grid-template-columns: 1fr; height: auto; min-height: 0; }
  .chat-raster.nur-links .chat-rechts, .chat-raster.nur-rechts .chat-liste-links { display: none; }
  .chat-raster.nur-rechts .chat-rechts { height: calc(100dvh - 175px); min-height: 320px; padding: 8px 10px; }
  .chat-seite .chat-kopf { padding-bottom: 6px; }
  .chat-seite .chat-eingabe { padding-right: 56px; }
  .chat-blase { max-width: 88%; }
  .chat-weg { opacity: 1; }
}
