/* MM-Montageplanung. Palette und Kontraste nach /brand-mm 4.0, WCAG 2.2 AA geprüft. Systemschrift, keine externen Ressourcen. */

/* 1 Tokens */
:root {
  --text: #1a1a1a; --text-2: #545557; --text-3: #6b6c6e;
  --grund: #fafafa; --flaeche: #ffffff; --linie: #e6e6e6; --linie-stark: #d0d0d0; --feld-rand: #8e8f91;
  --akzent: #036690; --akzent-hell: #e6f1f7; --orange: #ed8406; --auf-orange: #171717; --orange-hell: #fff3e3;
  --rot: #b42318; --rot-hell: #fdecea; --gelb: #8a5a00; --gelb-hell: #fff4d6; --gruen: #1e7a3c; --gruen-hell: #e7f5ec;
  --wartet: #5b3f8c; --wartet-hell: #f3eefa;
  --vorschlag-rand: #9e9e9e; --angekuendigt: #fff4d6; --angekuendigt-text: #8a5a00;
  --bestaetigt: #e6f1f7; --bestaetigt-text: #035377; --erledigt: #e7f5ec; --erledigt-text: #1e7a3c;
  --radius: 12px; --radius-klein: 10px; --schatten: 0 1px 2px rgba(0,0,0,.04), 0 1px 1px rgba(0,0,0,.03);
  --abstand: 16px; --seitenleiste: 232px;
  --schrift: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --sicher-unten: env(safe-area-inset-bottom, 0px);
  --pfeil-unten: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

/* 2 Grundlagen */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.5 var(--schrift); color: var(--text); background: var(--grund); }
a { color: var(--akzent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--akzent); outline-offset: 2px; border-radius: 6px; }
h1 { font-size: 28px; line-height: 1.2; margin: 0 0 4px; letter-spacing: -.01em; }
h2 { font-size: 17px; margin: 0; }
h3 { font-size: 15px; margin: 0; }
p { margin: 0 0 8px; }
.icon { width: 20px; height: 20px; flex: none; vertical-align: -4px; }
.icon.gross { width: 24px; height: 24px; }
.leer { color: var(--text-3); }
.nur-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.leise { color: var(--text-2); font-size: 14px; font-weight: 400; }
fieldset { min-width: 0; }
table { border-collapse: collapse; width: 100%; background: var(--flaeche); }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--linie); vertical-align: top; }
th { font-size: 13px; color: var(--text-2); font-weight: 650; background: var(--grund); }
.errorlist { color: var(--rot); list-style: none; padding: 0; margin: 4px 0; font-size: 14px; }

/* 3 Layout */
.app { min-height: 100vh; }
.seitenleiste { position: fixed; inset: 0 auto 0 0; width: var(--seitenleiste); z-index: 10; overflow-y: auto; background: var(--flaeche); border-right: 1px solid var(--linie); display: flex; flex-direction: column; gap: 6px; padding: 16px 12px; }
.seitenleiste .marke { display: flex; align-items: center; gap: 10px; padding: 2px 8px 14px; color: var(--text); font-weight: 700; font-size: 14px; }
.seitenleiste .marke:hover, .mobil-kopf .marke:hover { text-decoration: none; }
.marke img { display: block; height: auto; }
.nav { display: flex; flex-direction: column; gap: 2px; margin-top: 14px; }
.nav a { position: relative; display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: var(--radius); color: var(--text); font-weight: 500; }
.nav a:hover { background: var(--grund); text-decoration: none; }
.nav a[aria-current="page"] { background: var(--akzent-hell); color: var(--akzent); font-weight: 650; }
.nav a[aria-current="page"]::before { content: ""; position: absolute; left: -12px; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: var(--orange); }
.seitenleiste-fuss { margin-top: auto; display: flex; flex-direction: column; gap: 2px; padding-top: 12px; border-top: 1px solid var(--linie); }
.seitenleiste-fuss a, .seitenleiste-fuss button.link { display: flex; align-items: center; justify-content: flex-start; gap: 12px; width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-radius: var(--radius); background: none; color: var(--text-2); font-size: 15px; font-weight: 500; text-align: left; text-decoration: none; }
.seitenleiste-fuss a:hover, .seitenleiste-fuss button.link:hover { background: var(--grund); color: var(--text); }
.seitenleiste-fuss a[aria-current="page"] { color: var(--akzent); font-weight: 650; }
.seitenleiste-fuss form { margin: 0; }
.seitenleiste-fuss .icon { width: 20px; height: 20px; }  /* wie in der Navigation; „button .icon“ wäre 18 px, „Abmelden“ säße 2 px links */
.angemeldet { margin: 4px 0 0; padding: 0 12px; font-size: 13px; color: var(--text-3); }
.inhalt { padding: 32px 40px 48px; }
/* Volle Fensterbreite, auch auf großen Bildschirmen (Formulare eingeschlossen). */
.seitenleiste ~ .inhalt { margin-left: var(--seitenleiste); }
.kopf-aktionen { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.kopf-aktionen:empty { display: none; }
.tabs, .mobil-kopf { display: none; }
@media (max-width: 899px) {
  .seitenleiste { display: none; }
  .inhalt, .seitenleiste ~ .inhalt { margin-left: 0; padding: 16px 16px calc(96px + var(--sicher-unten)); max-width: none; }
  h1 { font-size: 24px; }
  .mobil-kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; background: var(--flaeche); border-bottom: 1px solid var(--linie); position: sticky; top: 0; z-index: 20; }
  .mobil-kopf .marke { display: flex; align-items: center; gap: 10px; min-height: 44px; color: var(--text); font-weight: 700; font-size: 14px; }
  .tabs { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; inset: auto 0 0 0; background: var(--flaeche); border-top: 1px solid var(--linie); padding: 6px 4px calc(6px + var(--sicher-unten)); z-index: 30; }
  .tabs > a, .tabs summary { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; border-radius: var(--radius); color: var(--text); font-size: 12px; font-weight: 600; cursor: pointer; list-style: none; text-decoration: none; }
  .tabs > a:hover, .tabs summary:hover { background: var(--grund); text-decoration: none; }
  .tabs summary::-webkit-details-marker { display: none; }
  .tabs .icon { width: 24px; height: 24px; }
  .tabs a[aria-current="page"] { color: var(--akzent); background: var(--akzent-hell); }
  .tastatur-offen .tabs { display: none; }  /* Bildschirmtastatur offen (app.js): iOS ließe die feste Leiste mitten im Bild über dem Feld schweben */
  .mehr[open] > summary { color: var(--akzent); background: var(--akzent-hell); }
  .mehr-blatt { position: fixed; left: 8px; right: 8px; bottom: calc(72px + var(--sicher-unten)); background: var(--flaeche); border: 1px solid var(--linie-stark); border-radius: 16px; padding: 6px; box-shadow: 0 8px 24px rgba(23,23,23,.18); max-height: 70vh; overflow-y: auto; }
  .mehr-blatt a, .mehr-blatt button.link { display: flex; align-items: center; justify-content: flex-start; gap: 14px; width: 100%; min-height: 52px; padding: 0 12px; border: 0; border-radius: var(--radius); background: none; color: var(--text); font-size: 16px; font-weight: 600; text-align: left; text-decoration: none; }
  .mehr-blatt a:hover, .mehr-blatt button.link:hover { background: var(--grund); }
  .mehr-blatt a[aria-current="page"] { color: var(--akzent); background: var(--akzent-hell); }
  .mehr-blatt form { margin: 0; }
}
@media (min-width: 560px) and (max-width: 899px) { .mehr-blatt { left: auto; width: 280px; } }  /* Tablet: schmales Blatt rechts über dem Mehr-Tab */

/* 4 Komponenten */
/* Karten */
.karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); box-shadow: var(--schatten); padding: 16px 20px; margin: 0 0 16px; min-width: 0; }
.karte > h2 { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.karte-kopf { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin-bottom: 10px; }
.karte-kopf h2 { display: flex; align-items: center; gap: 10px; margin: 0; }
.karte-kopf .rechts { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.abschnitt-titel { margin: 24px 0 8px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); }
.zaehler { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; background: var(--linie); color: var(--text); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin: 0 0 16px; }
.kachel { display: flex; flex-direction: column; gap: 2px; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); box-shadow: var(--schatten); padding: 16px 20px; color: var(--text-2); min-width: 0; }
.kachel .icon { color: var(--akzent); margin-bottom: 4px; }
.kachel strong { font-size: 24px; line-height: 1.15; color: var(--text); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.kachel span { font-size: 14px; }

/* Knöpfe (Höhe mindestens 44 px) */
.knopf, button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 1px solid var(--linie-stark); border-radius: var(--radius); background: var(--flaeche); color: var(--text); font: inherit; font-weight: 600; font-size: 14px; line-height: 1.2; text-align: center; text-decoration: none; cursor: pointer; }
.knopf:hover, button:hover { background: var(--grund); border-color: var(--feld-rand); text-decoration: none; }
.knopf .icon, button .icon { width: 18px; height: 18px; vertical-align: 0; }
.knopf.primaer, button.primaer { background: var(--akzent); border-color: var(--akzent); color: #fff; }
.knopf.primaer:hover, button.primaer:hover { background: #02506f; border-color: #02506f; }
.knopf.haupt, button.haupt { background: var(--orange); border-color: var(--orange); color: var(--auf-orange); font-weight: 700; font-size: 15px; min-height: 48px; }
.knopf.haupt:hover, button.haupt:hover { background: #f39a2e; border-color: #f39a2e; }
.knopf.zweit, button.zweit { background: var(--flaeche); border-color: var(--linie-stark); color: var(--text); }
.knopf.gefahr, button.gefahr { background: var(--flaeche); border-color: var(--rot); color: var(--rot); }
.knopf.gefahr:hover, button.gefahr:hover { background: var(--rot-hell); }
.knopf.klein, button.klein { font-size: 13px; padding: 0 12px; }
.knopf.breit, button.breit { width: 100%; }
.knopf.rund { width: 48px; padding: 0; border-radius: 50%; }
button.link { min-height: 0; padding: 0; border: 0; background: none; color: var(--akzent); font-weight: 500; font-size: inherit; text-decoration: none; }
button.link:hover { background: none; text-decoration: underline; }
button:disabled { opacity: .55; cursor: not-allowed; }

/* Status-Pillen: immer Icon plus Text, nie nur Farbe */
.pille { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 4px 10px 4px 8px; border-radius: 999px; border: 1.5px solid transparent; font-size: 13px; font-weight: 650; line-height: 1.25; background: var(--grund); color: var(--text); overflow-wrap: anywhere; }
.pille .icon { width: 16px; height: 16px; vertical-align: 0; }
a.pille:hover { text-decoration: none; filter: brightness(.97); }
.pille.vorschlag { background: var(--flaeche); border: 1.5px dashed var(--vorschlag-rand); color: var(--text); }
.pille.angekuendigt { background: var(--angekuendigt); border-color: #ebcb7e; color: var(--angekuendigt-text); }
.pille.bestaetigt { background: var(--bestaetigt); border-color: #a9d3e8; color: var(--bestaetigt-text); }
.pille.erledigt { background: var(--erledigt); border-color: #b5ddbf; color: var(--erledigt-text); }
.pille.geteilt { background: var(--flaeche); border: 1.5px solid var(--akzent); color: var(--akzent); }
.etikett { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 7px; background: var(--linie); color: var(--text); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.etikett .icon { width: 12px; height: 12px; vertical-align: 0; }
.status-punkt { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.status-punkt::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--text-3); flex: none; }
.status-punkt.ok::before { background: var(--gruen); box-shadow: 0 0 0 3px var(--gruen-hell); }
.status-punkt.fehler::before { background: var(--rot); box-shadow: 0 0 0 3px var(--rot-hell); }
.status-punkt.fehler { color: var(--rot); }

/* Formulare */
input, select, textarea { font: inherit; min-height: 44px; padding: 8px 12px; border: 1px solid var(--feld-rand); border-radius: var(--radius-klein); background: var(--flaeche); color: var(--text); max-width: 100%; }
textarea { min-height: 88px; }
/* Handy/Tablet (dieselbe Grenze wie das mobile Layout): Safari zoomt in jedes Feld mit Schrift unter 16 px und bleibt vergrößert. Am PC bleiben die Schriftgrößen wie sie sind. */
@media (max-width: 899px) {
  input, select, textarea { font-size: 16px; }
  /* Datum und Uhrzeit: iOS zeichnet sie mit eigener Mindestbreite und ragt sonst über den Kasten; so sind sie so breit wie die Textfelder daneben */
  input[type="date"], input[type="time"], input[type="datetime-local"], input[type="month"], input[type="week"] { -webkit-appearance: none; appearance: none; min-width: 0; max-width: 100%; }
  input[type="date"]::-webkit-date-and-time-value, input[type="time"]::-webkit-date-and-time-value, input[type="datetime-local"]::-webkit-date-and-time-value { text-align: left; min-width: 0; }
  input::placeholder { font-size: 14px; }  /* Platzhalter etwas kleiner als die 16-px-Eingabeschrift: sonst wird z. B. „Was ist falsch, fehlt oder ist beschädigt?“ rechts abgeschnitten */
  /* Das i bleibt beim Schild oder Knopf davor und rutscht nie allein in die nächste Zeile: Der Vorgänger reserviert Platz fürs i (18 px + 8 px Abstand), das i selbst zählt beim Umbrechen nicht mit (negativer Rand). Am PC unverändert. */
  .kopf-pillen > :has(+ .info), .ks-anzahlung-leise > :has(+ .info) { margin-right: 26px; }
  .kopf-pillen > form:has(+ .info) > button { margin-right: 26px; }  /* „Übernahme fertig“: die Hülle (display: contents) trägt keinen Rand */
  .kopf-pillen > .info, .ks-anzahlung-leise > .info { margin-left: -26px; }
  form.formular-zeile:has(> button + .info:last-child) { flex-direction: row; flex-wrap: nowrap; align-items: center; justify-content: flex-start; }  /* Kundentermin „Kunde hat bestätigt“: i neben dem Knopf statt darunter */
}
input[type="checkbox"], input[type="radio"] { min-height: 0; width: 20px; height: 20px; flex: none; accent-color: var(--akzent); }
input[type="checkbox"] { margin: 0; }  /* Browser-Vorgabe (3 px, links 4 px) schob den Haken 4 px nach rechts */
.seiten-lead { margin: 0 0 20px; color: var(--text-2); max-width: 70ch; text-wrap: pretty; }
.seiten-lead a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.formular-abschnitt { display: grid; gap: 16px 36px; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); box-shadow: var(--schatten); padding: 20px; margin: 0 0 16px; min-width: 0; }
.abschnitt-kopf { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.abschnitt-kopf > .icon { margin-top: 2px; color: var(--akzent); }
.abschnitt-kopf h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 17px; font-weight: 700; line-height: 1.3; }
.abschnitt-kopf p { margin: 4px 0 0; font-size: 13.5px; line-height: 1.45; color: var(--text-2); text-wrap: balance; }
.abschnitt-felder { min-width: 0; }
.formular-abschnitt.stapel, details.formular-abschnitt { display: block; }
.formular-abschnitt.stapel > .abschnitt-kopf, details.formular-abschnitt > summary { margin-bottom: 16px; }
details.formular-abschnitt > summary { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; list-style: none; cursor: pointer; border-radius: var(--radius-klein); }
details.formular-abschnitt > summary::-webkit-details-marker { display: none; }
details.formular-abschnitt > summary::after { content: ""; flex: none; width: 18px; height: 18px; margin: 3px 4px 0 0; background: var(--text-2); -webkit-mask: var(--pfeil-unten) center / 18px 18px no-repeat; mask: var(--pfeil-unten) center / 18px 18px no-repeat; }
details.formular-abschnitt[open] > summary::after { transform: rotate(180deg); }
details.formular-abschnitt:not([open]) > summary { margin-bottom: 0; }
.feld-raster { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.feld-raster.einspaltig { grid-template-columns: minmax(0, 1fr); max-width: 560px; }
/* Passwort ändern: Karte und Knöpfe so breit wie die Felder (560 px + Kartenrand; ab 1200 px dazu die Überschriftenspalte 240 + 36 px).
   Erst ab 900 px: darunter klebt die Knopfleiste randlos unten. */
@media (min-width: 900px) { .formular-schmal { max-width: 602px; } }
@media (min-width: 1200px) { .formular-schmal { max-width: 894px; } }
.feld-raster > .voll { grid-column: 1 / -1; }
.untergruppe { margin: 22px 0 12px; padding-top: 16px; border-top: 1px solid var(--linie); font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); }
.abschnitt-felder > .untergruppe:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.feld { display: flex; flex-direction: column; gap: 4px; min-width: 0; margin: 0 0 16px; }
.feld[hidden] { display: none; }  /* „Aufmaß erledigt am“ erscheint erst bei „erledigt“ (aufmass.js) */
.feld-kopf > label, .feld-kopf > .feld-label { font-size: 14px; font-weight: 650; color: var(--text); }
.feld input:not([type="checkbox"]):not([type="radio"]), .feld select, .feld textarea { width: 100%; }
.feld .wert { position: relative; display: flex; align-items: center; }
.feld .wert input { padding-right: 5.6em; }
.feld .wert input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.feld .wert input::-webkit-outer-spin-button, .feld .wert input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.einheit { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--text-2); font-size: 14px; pointer-events: none; }
.hilfe { font-size: 13px; line-height: 1.45; color: var(--text-2); margin: 0; }
.hilfe ul { margin: 4px 0 0; padding-left: 18px; }
.feld.haken.voll { margin-bottom: 4px; }  /* einzelne Haken wie eine Liste: die Tippfläche (44 px) lässt schon 12 px Luft über und unter dem Haken */
.feld.haken .feld-kopf > label { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; cursor: pointer; }
.feld .wahl > div { display: grid; gap: 8px; }
.feld.wahl-nebeneinander .wahl > div { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 8px 20px; }  /* kurze Auswahl (Verkauf/Aufmaß): ab ca. 660 px Feldbreite nebeneinander, darunter untereinander */
.feld.wahl-nebeneinander .wahl label { height: 100%; }  /* bricht eine Beschriftung um, sind beide Kästen gleich hoch */
.feld .wahl label { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 14px; border: 1px solid var(--feld-rand); border-radius: var(--radius-klein); background: var(--flaeche); font-weight: 500; cursor: pointer; }
.feld .wahl label:has(input:checked) { border-color: var(--akzent); background: var(--akzent-hell); font-weight: 650; }
.wahl-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }  /* Beschriftung mit mehreren Zeilen (Craftnote-Treffer) */
.wahl-text a[data-wahl-neu] { display: inline-flex; align-items: center; min-height: 44px; }  /* Link „Stattdessen neues Reparatur-Projekt anlegen“: Tippfläche am Handy */
.feld.fehler input:not([type="checkbox"]):not([type="radio"]), .feld.fehler select, .feld.fehler textarea { border-color: var(--rot); box-shadow: inset 0 0 0 1px var(--rot); }
.fehlertext { display: flex; align-items: flex-start; gap: 6px; margin: 0; font-size: 13px; font-weight: 600; line-height: 1.4; color: var(--rot); }
.fehlertext .icon { width: 16px; height: 16px; margin-top: 1px; }
.formular-fehler { display: flex; align-items: flex-start; gap: 12px; margin: 0 0 16px; padding: 14px 16px; border: 1px solid #f1cbc6; border-left: 4px solid var(--rot); border-radius: var(--radius); background: var(--rot-hell); }
.formular-fehler > .icon { margin-top: 1px; color: var(--rot); }
.formular-fehler strong { color: var(--rot); }
.formular-fehler p, .formular-fehler .errorlist { margin: 4px 0 0; color: var(--text); font-size: 14px; }
.formular-fehler .fehler-abschnitt { font-weight: 650; }
.positionen { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 20px; margin-bottom: 4px; }
.position { display: grid; grid-template-columns: minmax(0, 1fr) 100px; gap: 0 12px; align-items: start; align-content: start; }  /* neben einer höheren Zeile (Notiz, Nr. 31) nicht auseinanderziehen */
.position.bestand { grid-template-columns: minmax(0, 1fr) auto; }
/* Offener Abschnitt: „vom Lager“ und „entfernen“ stehen unter dem Produkt (neben ihm bliebe am Handy kaum Platz für den Namen) */
.position.bestand.mit-wahl { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 761px) { .position.bestand.mit-wahl { grid-row: span 2; } }  /* steht neben zwei Ergänzen-Zeilen, nicht über einer */
.position-wahl { display: flex; flex-wrap: wrap; align-items: center; gap: 0 24px; }
.position-notiz { grid-column: 1 / -1; }  /* Nr. 31: Notiz zum Produkt in eigener Zeile unter Produkt und Menge */
.position-notiz[hidden] { display: none; }
.wahl-gruppe { display: inline-flex; align-items: center; gap: 6px; }
/* Feste Angabe im Formular (Bearbeiten-Seite): gleiche Höhe wie ein Eingabefeld, aber erkennbar nicht änderbar */
.feld-fest { display: flex; align-items: center; min-height: 44px; padding: 8px 12px; border: 1px solid var(--linie); border-radius: var(--radius-klein); background: var(--grund); color: var(--text); overflow-wrap: anywhere; }
.leer-hinweis { margin-bottom: 12px; }
.haken-zeile { display: flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 500; cursor: pointer; }
.formular-knoepfe { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; margin: 8px 0 24px; }
.formular-knoepfe.lokal { margin: 12px 0 0; }
.vorschau h2 { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.vorschau .formular-knoepfe { margin-bottom: 0; }
.tabellen-rahmen { overflow-x: auto; margin: 0 0 12px; border: 1px solid var(--linie); border-radius: var(--radius-klein); }
.tabellen-rahmen table { background: none; }
.tabellen-rahmen tr:last-child td { border-bottom: 0; }
.liste-einfach { margin: 0 0 12px; padding-left: 20px; }
.ausweich a { display: inline-flex; align-items: center; min-height: 44px; }  /* Termin ändern: Ausweichtermine, Betroffene (Fingergröße) */
.laenger-wahl { display: grid; gap: 4px; }  /* „Dauert länger“: Auswahl als Zeilen in Fingergröße */
.laenger-wahl label { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.laenger-wahl .eigenes { display: flex; flex-wrap: wrap; gap: 8px; padding-left: 28px; }
.laenger-wahl a { display: inline-flex; align-items: center; min-height: 44px; }  /* „zuerst verlegen“ in Fingergröße (Demo 18.10.2026) */
.anrufliste li { padding: 6px 0; }
.zeile-form { display: inline-flex; margin: 0; }
.auswahl { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.auswahl .knopf, .auswahl button { min-height: 56px; }
.produkt-neu { margin: 12px 0 8px; }
.produkt-neu .feld { margin: 0; }
@media (min-width: 560px) {
  .produkt-neu .feld.breit { flex: 1 1 260px; }
  .produkt-neu .feld.schmal { flex: 0 0 120px; }
}
@media (min-width: 1200px) {
  .formular-abschnitt:not(.stapel):not(details) { grid-template-columns: 240px minmax(0, 1fr); padding: 24px 28px; }
}
@media (max-width: 760px) {
  .feld-raster { grid-template-columns: minmax(0, 1fr); }
  .positionen { grid-template-columns: minmax(0, 1fr); }
  .tabelle-karten thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .tabelle-karten, .tabelle-karten tbody, .tabelle-karten tr, .tabelle-karten td { display: block; }
  .tabelle-karten tr { padding: 8px 12px; border-bottom: 1px solid var(--linie); }
  .tabelle-karten tr:last-child { border-bottom: 0; }
  .tabelle-karten td { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border: 0; text-align: right; }
  .tabelle-karten td::before { content: attr(data-label); flex: none; color: var(--text-2); font-size: 13px; font-weight: 650; text-align: left; }
}
@media (max-width: 899px) {
  /* Knopfleiste klebt über der Tab-Leiste (64 px + Rand + Sicherheitsabstand); der Seitenabstand unten hält das letzte Feld frei. */
  .formular-knoepfe:not(.lokal) { position: sticky; bottom: calc(65px + var(--sicher-unten)); z-index: 15; flex-wrap: nowrap; margin: 0 -16px; padding: 10px 16px; border-top: 1px solid var(--linie); background: var(--flaeche); }
  /* Bildschirmtastatur offen (app.js): Die Tab-Leiste ist weg, und iOS ließe die klebende Leiste mitten im Bild unter dem Feld schweben.
     Dann steht sie an ihrem Platz am Formularende (wie .f-leiste.tippen in formulare.css). Nach dem Schließen rechnet app.js die Lage neu. */
  .tastatur-offen .formular-knoepfe:not(.lokal) { position: static; }
  .formular-abschnitt { padding: 16px; }
}
@media (max-width: 559px) {
  /* Handy: Neben-Knopf links in seiner Breite (bricht notfalls in zwei Zeilen um), der letzte Knopf (Haupt-Knopf) füllt den Rest und bricht nie um. Ab 560 px stehen alle in natürlicher Breite rechts, wie am PC. */
  .formular-knoepfe > * { min-width: 0; }
  .formular-knoepfe > :last-child { flex: 1 0 auto; white-space: nowrap; }
  .formular-knoepfe:not(.lokal) > .knopf, .formular-knoepfe:not(.lokal) > button { padding: 0 10px; }
}

/* Listenzeilen */
.zeile-liste { list-style: none; margin: 0; padding: 0; }
.zeile-liste > li { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; padding: 12px 0; border-top: 1px solid var(--linie); }
.zeile-liste > li:first-child { border-top: 0; }
.zeile-liste .rechts { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* Toasts (Meldungen): im normalen Seitenfluss oben im Inhalt, verdecken nie eine Bedienfläche. */
.toasts { display: flex; flex-direction: column; gap: 8px; margin: 0 0 16px; }
.toast { display: flex; align-items: center; gap: 8px 12px; margin: 0; padding: 4px 4px 4px 16px; min-height: 52px; border-radius: var(--radius); border: 1px solid var(--linie-stark); border-left-width: 4px; background: var(--flaeche); color: var(--text); box-shadow: var(--schatten); }
.toast-text { flex: 1 1 auto; min-width: 0; padding: 8px 0; overflow-wrap: anywhere; }
.toast.success { background: var(--gruen-hell); border-color: #b5ddbf; border-left-color: var(--gruen); }
.toast.error { background: var(--rot-hell); border-color: #f1cbc6; border-left-color: var(--rot); }
.toast.warning { background: var(--gelb-hell); border-color: #ebcb7e; border-left-color: var(--gelb); }
.toast.info { background: var(--akzent-hell); border-color: #a9d3e8; border-left-color: var(--akzent); }
/* Der Schließen-Knopf arbeitet nur mit JavaScript; ohne bleibt die Meldung einfach stehen. */
.toast-zu { display: none; flex: none; width: 44px; min-height: 44px; padding: 0; border: 0; border-radius: var(--radius-klein); background: none; color: var(--text); }
.toast-zu:hover { background: rgba(23,23,23,.08); }
.js .toast-zu { display: inline-flex; }
.toast .knopf { flex: none; }
/* Rückgängig-Fenster (nur mit JavaScript): klebt oben im Sichtfeld, damit der Knopf erreichbar bleibt, solange das Fenster offen ist. */
.toasts.rueckgaengig { position: sticky; top: 12px; z-index: 25; margin-bottom: 12px; }
@media (max-width: 899px) {
  .toasts.rueckgaengig { top: 68px; }
}

/* 5 Seiten */
/* Seite: Heute */
.heute { display: flow-root; }
.seitenkopf { display: flex; flex-direction: column; gap: 8px; margin: 0 0 16px; }
.seitenkopf h1 { margin: 0; }
.seitenkopf .datum { margin: 0; color: var(--text-2); }
.fortschritt { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; color: var(--text); }
.fortschritt strong { font-variant-numeric: tabular-nums; }
.karte.dringend { border-color: #f1cbc6; }
.dringend > h2 .icon { color: var(--rot); }
.aufgaben, .zeitleiste { list-style: none; margin: 0; padding: 0; }
.aufgabe { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 4px 12px; align-items: start; padding: 14px 0 14px 12px; border-top: 1px solid var(--linie); border-left: 4px solid var(--linie-stark); }
.aufgabe:first-child { border-top-color: transparent; }
.aufgabe.rot { border-left-color: var(--rot); }
.aufgabe.gelb { border-left-color: var(--orange); }
.aufgabe-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--grund); color: var(--text-2); }
.aufgabe.rot .aufgabe-icon { background: var(--rot-hell); color: var(--rot); }
.aufgabe.gelb .aufgabe-icon { background: var(--gelb-hell); color: var(--gelb); }
.aufgabe-text { min-width: 0; overflow-wrap: break-word; }
.aufgabe-titel { margin: 0 0 2px; }
.aufgabe-titel .ort { color: var(--text-2); }
.aufgabe-link { position: relative; padding: 12px 0 15px; color: inherit; text-decoration: none; }  /* Tippfläche 45 px, unsichtbar: oben bis an den eigenen Kartenrand, unten über den Satz der eigenen Karte (relative: liegt darüber), nie in die Karte darüber */
.aufgabe-link:hover strong, .aufgabe-link:focus-visible strong { text-decoration: underline; }
.aufgabe-link:focus-visible { outline: none; }
.aufgabe-link:focus-visible > span { outline: 3px solid var(--akzent); outline-offset: 2px; border-radius: 6px; }  /* Fokusrahmen eng um Name und Ort wie vorher, nicht um die unsichtbare Tippfläche */
.aufgabe-satz { margin: 0; color: var(--text); }
.aufgabe .hinweis { margin: 4px 0 0; font-size: 14px; }
.aufgabe-aktionen { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 8px; }
.aufgabe-aktionen form { margin: 0; }
.aufgabe-aktionen .knopf, .aufgabe-aktionen button { width: 100%; padding-top: 8px; padding-bottom: 8px; }
.aufgabe.verschwindet { opacity: .4; text-decoration: line-through; }
.aufgaben > .leer { padding: 8px 0; }
.zeitleiste > li { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 4px 12px; align-items: start; padding: 10px 0; border-top: 1px solid var(--linie); }
.zeitleiste > li:first-child { border-top: 0; }
.zeitleiste > li.leer { display: block; padding: 4px 0; }
.zeitleiste time { font-weight: 700; font-variant-numeric: tabular-nums; padding-top: 10px; }
.zeitleiste a { display: flex; flex-direction: column; justify-content: center; min-width: 0; min-height: 44px; overflow-wrap: break-word; color: var(--text); }
.zeitleiste a strong { color: var(--akzent); }
.zeitleiste a span { color: var(--text-2); font-size: 14px; }
.wochenkarte > summary { min-height: 44px; padding: 10px 0; cursor: pointer; font-size: 17px; font-weight: 700; }
.wochenkarte[open] > summary { margin-bottom: 6px; }
.wochenstreifen { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
.wtag { flex: 0 0 min(220px, 76%); scroll-snap-align: start; min-width: 0; background: var(--grund); border: 1px solid var(--linie); border-radius: var(--radius-klein); padding: 10px; }
.wtag.heute-tag { background: var(--flaeche); border-color: var(--akzent); box-shadow: 0 0 0 1px var(--akzent); }
.wtag h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 0 0 6px; font-size: 14px; }
.heute-marke { background: var(--orange); color: var(--auf-orange); font-weight: 700; }
.wtag > p { margin: 0; }
.wzelle { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-height: 44px; }
.wzelle .teil { width: 24px; flex: none; font-size: 12px; color: var(--text-2); }
.wlink { display: inline-flex; align-items: center; min-width: 0; max-width: 100%; min-height: 44px; }
.wtermine { list-style: none; margin: 6px 0 0; padding: 6px 0 0; border-top: 1px solid var(--linie); font-size: 14px; }
/* Grid statt flex: der Text ist ein anonymes Element; mit minmax(0, 1fr) darf es schmaler werden als sein längstes Wort und bricht dann um. */
.wtermine a { display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; min-height: 44px; overflow-wrap: break-word; }
.legende .abschnitt-titel { margin-top: 12px; }
.legende ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.legende li { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; font-size: 13px; color: var(--text-2); }
.heute .kacheln { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 4px; }
.heute .kacheln .kachel { flex: 0 0 min(260px, 80%); scroll-snap-align: start; }
@media (min-width: 560px) {
  .aufgabe-aktionen { flex-direction: row; flex-wrap: wrap; }
  .aufgabe-aktionen .knopf, .aufgabe-aktionen button { width: auto; }
}
@media (min-width: 761px) {
  .wochenstreifen { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; }
  .wtag { flex: none; }
  .heute .kacheln { display: grid; gap: 16px; overflow: visible; }
}
/* Unter 1200 px sind die Tageskarten schmal: Halbtag (VM/NM) steht immer über dem Eintrag, nie mal daneben, mal darüber */
@media (max-width: 1199px) {
  .wzelle { flex-direction: column; flex-wrap: nowrap; align-items: flex-start; gap: 0; }
  .wzelle + .wzelle { margin-top: 8px; }
}
@media (min-width: 900px) {
  .seitenkopf { flex-direction: row; align-items: flex-end; justify-content: space-between; margin-bottom: 20px; }
  .aufgabe { grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; }
  .aufgabe-aktionen { grid-column: auto; flex-direction: column; align-items: stretch; max-width: 320px; }
  .aufgabe-aktionen .knopf, .aufgabe-aktionen button { width: 100%; }
  .aufgabe-aktionen button { min-width: 296px; white-space: nowrap; }
  .legende ul { display: flex; flex-wrap: wrap; gap: 10px 22px; }
  .legende li { flex-direction: row; align-items: center; gap: 8px; }
}
@media (min-width: 1200px) {
  .heute > .seitenkopf { clear: both; }
  .heute > #dringend, .heute > #zu-erledigen { float: left; clear: left; width: calc(100% - 384px); }
  .heute > #aussendienst, .heute > #montage-heute, .heute > #woche { float: right; clear: right; width: 360px; }  /* „Montage heute“ (seit 18.10.2026) unter „Außendienst heute“, sonst liegt sie über beiden Spalten */
  .heute > #naechste-woche { clear: both; }
  .heute > .kacheln { clear: both; padding-top: 8px; }
  .wochenstreifen { grid-template-columns: 1fr; }
  #naechste-woche .wochenstreifen { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .wtag { padding: 8px 10px; }
  .legende ul { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 12px; }
  .legende li { display: grid; grid-template-columns: subgrid; grid-column: 1 / -1; }
  .legende li > .pille { justify-self: start; }  /* Chip in seiner natürlichen Breite, nicht auf den breitesten gestreckt */
}

/* Heute unterwegs: nur am Handy, direkt über „Dringend“ (am PC zeigt die Karte „Außendienst heute“ dasselbe) */
.unterwegs { display: none; }
@media (max-width: 899px) {
  .unterwegs { display: block; margin: 0 0 12px; }
  .unterwegs h2 { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); }
  .unterwegs ul { display: flex; gap: 8px; margin: 0; padding: 0 0 2px; list-style: none; overflow-x: auto; }
  .unterwegs li { flex: none; max-width: 100%; }
  .unterwegs a { display: flex; align-items: center; gap: 8px; max-width: 100%; min-height: 44px; padding: 0 14px; border-radius: var(--radius); background: var(--orange); color: var(--auf-orange); font-size: 14px; font-weight: 600; }
  .unterwegs a:hover { text-decoration: none; filter: brightness(.97); }
  .unterwegs time { font-weight: 700; font-variant-numeric: tabular-nums; }
  .unterwegs a span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .heute > .karte.mit-unterwegs { display: none; }
  /* Nr. 37 (Paket 2b): Die Karte „Außendienst heute“ ist hier ausgeblendet, deshalb steht „Mitbringen“ als zweite Zeile in der Kachel */
  .unterwegs a:has(.mitbringen) { flex-wrap: wrap; row-gap: 2px; padding: 8px 14px; }
  .unterwegs a .mitbringen { flex: 0 0 100%; margin: 0; font-size: 13px; font-weight: 500; color: inherit; white-space: normal; }
}
@media (max-width: 559px) {
  .heute .seitenkopf { gap: 4px; margin-bottom: 10px; }
  .heute .seitenkopf h1 { font-size: 22px; }
  .heute .karte { padding: 12px 14px; }
  .aufgabe { grid-template-columns: 32px minmax(0, 1fr); gap: 2px 10px; padding: 10px 0 10px 8px; }
  .aufgabe-icon { width: 32px; height: 32px; }
  .aufgabe-icon .icon { width: 18px; height: 18px; }
  .aufgabe-satz { font-size: 14px; }
  .aufgabe-aktionen { gap: 6px; }
}

/* Seite: Kalender */
.kalender-kopf { display: flex; flex-direction: column; gap: 10px; margin: 0 0 16px; }
.kalender-kopf h1 { margin: 0; }
.knopfgruppe { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 559px) {
  .knopfgruppe.stapel { flex-direction: column; }  /* Handy: untereinander in voller Breite wie die Knöpfe im Rest der Seite */
  .knopfgruppe.stapel .knopf { width: 100%; }
}
.wochenkopf { margin: 20px 0 8px; font-size: 15px; color: var(--text-2); }
.plantafel { margin: 0 0 16px; min-width: 0; }
.tafel { display: none; background: var(--flaeche); border: 1px solid var(--linie-stark); border-radius: var(--radius); box-shadow: var(--schatten); overflow: hidden; }
.tafel-kopf, .tafel-zeile { display: grid; grid-template-columns: 108px repeat(6, minmax(0, 1fr)); }  /* 108 px: „Außendienst“ (82 px) braucht Luft zur Linie */
.tafel-kopf > span, .tafel-zeile > span { display: flex; flex-direction: column; gap: 4px; min-width: 0; border-right: 1px solid var(--linie); border-bottom: 1px solid var(--linie); }
.tafel-kopf > span:last-child, .tafel-zeile > span:last-child { border-right: 0; }
.tafel-zeile:last-child > span { border-bottom: 0; }
.tafel-kopf > span { padding: 8px 10px; background: var(--grund); border-top: 4px solid transparent; font-size: 13px; font-weight: 700; color: var(--text-2); }
.tafel-kopf strong { font-size: 17px; color: var(--text); font-variant-numeric: tabular-nums; }
.tafel-kopf small { font-size: 12px; font-weight: 600; color: var(--text-2); }
.tafel-kopf > .heute { border-top-color: var(--orange); background: var(--orange-hell); }
.tafel-kopf > .frei { background: var(--linie); }
.marke-heute { align-self: flex-start; padding: 1px 9px; border-radius: 999px; background: var(--orange); color: var(--auf-orange); font-size: 12px; font-weight: 700; }
.tafel-zeile > [role="rowheader"] { padding: 10px; background: var(--grund); font-size: 13px; font-weight: 700; color: var(--text); }
.tafel-zeile > [role="rowheader"] .icon { width: 18px; height: 18px; color: var(--text-2); }
.tafel-zeile > [role="cell"] { min-height: 108px; padding: 6px; }
.tafel-zeile.uhrzeit > [role="cell"] { min-height: 84px; }
.tafel-zeile > .heute { background: var(--orange-hell); }
.tafel-zeile > .frei, .tafel-zeile > .gesperrt { background: repeating-linear-gradient(135deg, var(--grund) 0 8px, var(--linie) 8px 16px); }
.tafel .leer { padding: 4px 6px; font-size: 13px; }
.plantafel .pille { white-space: nowrap; }
/* Freie Zellen im Kalender: Klick öffnet „Eintragen“ */
.tafel a.eintragen { display: flex; align-items: center; min-height: 44px; }  /* Klickziel mindestens 44 px */
.tafel a.eintragen, .tag-handy > p a.eintragen { color: var(--akzent); text-decoration: none; }
.tafel a.eintragen:hover, .tafel a.eintragen:focus-visible, .tag-handy > p a.eintragen:hover, .tag-handy > p a.eintragen:focus-visible { text-decoration: underline; }
/* Nr. 20: break-word bricht nur Wörter, die allein nicht in die Zeile passen (E-Mail, Web-Adresse); normale Wörter trennt hyphens. Nicht „anywhere“ (f375b60). Silbentrennung erst ab 8 Buchstaben, damit „Familie“ nicht in „Fami-lie“ zerfällt. */
.block { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; padding: 8px 10px; border: 1.5px solid transparent; border-radius: var(--radius-klein); background: var(--flaeche); color: var(--text); font-size: 13px; line-height: 1.3; text-decoration: none; box-shadow: var(--schatten); overflow-wrap: break-word; word-break: normal; -webkit-hyphens: auto; hyphens: auto; hyphenate-limit-chars: 8; }
/* In der Tafel trägt Farbe plus Icon den Status (Legende erklärt ihn); der Text bleibt für Screenreader erhalten. */
.tafel .block .pille > span { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.tafel .block .pille { padding: 3px; }
/* break-word verkleinert die Mindestbreite nicht: ohne max-width wächst ein Kind (strong) in der Spalte auf die Länge des langen Wortes. */
.block > * { max-width: 100%; }
.block:hover { text-decoration: none; filter: brightness(.97); }
.block strong { font-size: 14px; font-weight: 700; }
.block.vorschlag { background: var(--flaeche); border: 1.5px dashed var(--vorschlag-rand); }
.block.angekuendigt { background: var(--angekuendigt); border-color: #ebcb7e; border-left: 5px solid #b07a12; }
.block.bestaetigt { background: var(--akzent); border-color: var(--akzent); color: #fff; }
.block.bestaetigt strong, .block.bestaetigt:hover { color: #fff; }
.block.erledigt { background: #e9e9ea; border-color: var(--linie-stark); color: #3d3e40; box-shadow: none; }
.block.aussen { background: var(--orange); border-color: var(--orange); color: var(--auf-orange); }
.block.aussen strong { font-size: 13px; }
.block.aussen time { font-weight: 700; font-variant-numeric: tabular-nums; }
.block.aussen.erledigt, .tag-handy .aussen.erledigt { background: color-mix(in srgb, var(--orange) 38%, var(--flaeche)); border-color: color-mix(in srgb, var(--orange) 55%, var(--flaeche)); color: var(--text); }  /* erledigt bleibt sichtbar, tritt zurück */
.block .etikett { background: var(--flaeche); color: var(--text); border: 1px solid var(--linie-stark); }
.problem-marke { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; padding: 1px 7px 1px 5px; border: 1px solid var(--rot); border-radius: 7px; background: var(--flaeche); color: var(--rot); font-size: 12px; font-weight: 700; line-height: 1.3; }
.problem-marke .icon { width: 14px; height: 14px; vertical-align: 0; }
.tafel .problem-marke { padding: 2px; }
.block.problem { box-shadow: 0 0 0 2px var(--rot), var(--schatten); }
.tag-handy > p.problem { padding-left: 8px; border-left: 4px solid var(--rot); }
.tagesliste { display: flex; flex-direction: column; gap: 8px; }
.tag-handy { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); box-shadow: var(--schatten); padding: 0 16px; }
.tag-handy > summary { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; min-height: 48px; font-size: 16px; font-weight: 700; cursor: pointer; }
.tag-handy > summary .marke-heute { align-self: center; }  /* in der Zeile mittig; flex-start gilt nur im Rasterkopf */
.tag-handy[open] > summary { border-bottom: 1px solid var(--linie); margin-bottom: 6px; }
.tag-handy.frei:not([open]) { background: var(--grund); }
.tag-handy > p { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; min-height: 44px; margin: 0; min-width: 0; overflow-wrap: break-word; }
/* 12 px zwischen Einträgen, wo sie sonst aneinanderkleben: Kacheln in „Termin wählen“ und am Handy (Eintrag bricht unter „VM“/„NM“ um) */
.tag-handy > p:has(> .block) { padding: 6px 0; }
@media (max-width: 559px) { .tag-handy > p { padding: 6px 0; } }
.tag-handy > p a { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; min-height: 44px; min-width: 0; overflow-wrap: break-word; color: var(--text); }
.tag-handy > p a:hover { text-decoration: none; }
.tag-handy .teil { width: 24px; flex: none; font-size: 12px; color: var(--text-2); }
.tag-handy .aussen { padding: 6px 10px; border-radius: var(--radius-klein); background: var(--orange); color: var(--auf-orange); margin-bottom: 6px; }
.plantafel-legende { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.plantafel.kompakt { margin-bottom: 8px; }
.kompakt .tafel-kopf > span { padding: 4px 8px; }
.kompakt .tafel-kopf strong { font-size: 14px; }
.kompakt .tafel-zeile > [role="cell"] { min-height: 64px; padding: 4px; }
.kompakt .tafel-zeile.uhrzeit > [role="cell"] { min-height: 48px; }
/* Nr. 35: Uhrzeit-Zeile ohne Termine in der ganzen Woche bleibt schmal (nur „+“ je Tag); Zusatz im Zeilenkopf, Gruppen-Überschriften */
.tafel-zeile.uhrzeit.leer-woche > [role="cell"] { min-height: 0; }
.tafel-zeile > [role="rowheader"] small { display: block; font-size: 12px; font-weight: 600; color: var(--text-2); }
.tag-handy > p.gruppe { min-height: 0; padding: 8px 0 2px; font-size: 12px; font-weight: 700; color: var(--text-2); }
.wtermine .wgruppe, .aussendienst .gruppe { font-size: 12px; font-weight: 700; color: var(--text-2); }
/* Nr. 37 (Paket 2b): „Vom Lager mitnehmen: …“ und „Mitbringen (Besuch …): …“ als eigene kleine Zeile unter dem Termin (Kalender, Heute); bricht um, scrollt nie seitlich */
.mitbringen { display: block; margin-top: 2px; font-size: 12px; font-weight: 400; line-height: 1.35; overflow-wrap: anywhere; }
.zeitleiste a span.mitbringen { margin-top: 0; font-size: 13px; color: var(--text-2); }
.liste-einfach .mitbringen { color: var(--text-2); }
.tag-handy > p .mitbringen { flex: 0 0 100%; }
.wzelle .mitbringen { flex: 0 0 100%; padding-left: 32px; color: var(--text-2); }
.wtermine .mitbringen { padding: 0 0 6px 8px; color: var(--text-2); }
.etikett.auch { -webkit-hyphens: manual; hyphens: manual; }  /* „auch 13:30 Verkauf“ bricht an Leerzeichen, nicht in „Ver-kauf“ */
.kompakt .block { padding: 5px 8px; font-size: 12px; gap: 2px; }
.kompakt .block strong { font-size: 12.5px; }
@media (max-width: 559px) { .kalender-kopf .knopf { flex: 1 1 calc(50% - 4px); } }  /* zwei Knöpfe je Zeile, ein einzelner letzter füllt die Zeile */
@media (min-width: 560px) {
  .kalender-kopf { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; }
}
/* Die Seitenleiste nimmt Platz: das Raster mit sieben Spalten braucht mindestens 1100 px Fensterbreite, darunter die Tagesliste. */
@media (min-width: 1100px) {
  .tafel { display: block; }
  .tagesliste { display: none; }
}

/* Seite: Listen */
.listenkopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 16px; }
.listenkopf h1 { margin: 0; }
.filterchips { display: flex; flex-direction: column; gap: 12px; margin: 0 0 16px; }
.suche { display: flex; gap: 8px; }
.anderswo { margin: 0 0 16px; font-weight: 600; }  /* Nr. 37: Suchtreffer beim anderen Typ (Kommissionen/Reparaturen) */
.suche input { flex: 1; min-width: 0; }
.chipreihe { display: flex; gap: 8px; overflow-x: auto; padding: 4px 4px 6px; margin: -4px -4px -6px; }
.filterchips .chip { position: relative; display: inline-flex; flex: none; padding: 0; border: 0; border-radius: 999px; background: none; font-size: 14px; line-height: 1.2; }
.filterchips .chip input { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; margin: 0; padding: 0; opacity: 0; cursor: pointer; }
.filterchips .chip span { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border: 1.5px solid var(--linie-stark); border-radius: 999px; background: var(--flaeche); color: var(--text); font-weight: 600; white-space: nowrap; }
.filterchips .chip:hover span { background: var(--grund); border-color: var(--feld-rand); }
.filterchips .chip input:checked + span { background: var(--akzent); border-color: var(--akzent); color: #fff; }
.filterchips .chip input:checked + span::before { content: "\2713"; font-weight: 700; }
.filterchips .chip input:focus-visible + span { outline: 3px solid var(--akzent); outline-offset: 2px; }
.zeile-liste > li.zeile { display: block; margin: 0 0 10px; padding: 0; border: 1px solid var(--linie); border-radius: var(--radius); background: var(--flaeche); box-shadow: var(--schatten); }
.zeile-liste > li.zeile.nicht-eingeplant { background: var(--wartet-hell); border-left: 4px solid var(--wartet); }
.zeile-liste > li.zeile.nicht-eingeplant .zeile-link:hover { background: #ebe2f6; }
.band.nicht-eingeplant { margin: 0 0 16px; padding: 10px 14px; border-radius: var(--radius-klein); background: var(--wartet-hell); border-left: 4px solid var(--wartet); display: flex; gap: 8px; align-items: center; }
.band.nicht-eingeplant a { font-weight: 600; white-space: nowrap; }
/* Nr. 54: Umstell-Knopf unter einer Zeile der Liste „Pausiert“ (Formulare dürfen nicht im Zeilen-Link stehen) */
.zeile-umstellen { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 0 16px 12px 13px; }
.zeile-umstellen form { margin: 0; }
.zeile-umstellen .leise { color: var(--text-2); font-size: 14px; }
.etikett.bei-gelegenheit { background: var(--grund); border: 1px solid var(--linie-stark); color: var(--text); }
.zeile-link { display: grid; grid-template-columns: minmax(0, 1fr) 24px; grid-template-areas: "kopf pfeil" "pillen pillen" "meta meta"; gap: 8px 12px; align-items: center; min-height: 64px; padding: 12px 16px; border-radius: var(--radius); color: var(--text); }
.zeile-link:hover { background: var(--grund); text-decoration: none; }
.zeile-link:hover .zeile-name { text-decoration: underline; }
.zeile-liste > li.zeile.nicht-eingeplant .zeile-link, .zeile-liste > li.zeile.rechnung-offen .zeile-link { padding-left: 13px; }  /* Rand links ist 4 statt 1 px dick: Inhalt bleibt mit den anderen Zeilen bündig */
.zeile-kopf { grid-area: kopf; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-width: 0; margin: 0; }
.zeile-name { font-size: 16px; overflow-wrap: anywhere; }
.zeile-kopf .ort { color: var(--text-2); }
.zeile-pillen { grid-area: pillen; display: flex; flex-wrap: wrap; gap: 6px 8px; min-width: 0; }
.zeile-pillen:empty { display: none; }
.zeile-meta { grid-area: meta; }
.zeile-pfeil { grid-area: pfeil; color: var(--text-3); }
.pille.zurueckgestellt, .pille.storniert { background: var(--grund); border: 1.5px solid var(--linie-stark); color: var(--text-2); text-decoration: line-through; }
.zeile-liste > li.zeile.bestellung { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 14px 16px; border-left: 4px solid var(--linie-stark); }
.zeile-liste > li.zeile.bestellung.ueberfaellig { border-left-color: var(--rot); }
.faellig { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.faellig-datum { font-size: 17px; font-variant-numeric: tabular-nums; }
.ueberfaellig .faellig-datum { color: var(--rot); }
.faellig-art { color: var(--text-2); font-size: 14px; }
.etikett.rot { background: var(--rot-hell); color: var(--rot); font-weight: 700; }
.etikett.nicht-eingeplant { background: var(--wartet); color: #fff; }
/* „Noch nicht einplanen“ steht seit 13.10.2026 ohne eigenen Kasten am Ende der Knopfreihe. Das Formular nimmt die Restbreite;
   Knopf und i bleiben zusammen, der Erklärtext bricht innerhalb um statt das ganze Formular in eine neue Zeile zu schieben. */
.nicht-einplanen-schalter { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; flex: 1 1 260px; min-width: 0; margin: 0; }
/* Bricht der Erklärtext unter den Knopf, wird das Formular höher: oben ausrichten, damit der Knopf auf einer Linie mit den Nachbarn bleibt */
.abschnittskarte .knopfzeile > .nicht-einplanen-schalter { align-self: flex-start; }
.abschnittskarte .knopfgruppe > .knopfzeile:has(> .nicht-einplanen-schalter) { align-items: flex-start; }  /* schlägt die Regel weiter unten (align-items: center) */
.abschnittskarte .knopfgruppe > .knopfzeile:has(> .nicht-einplanen-schalter) > .leise { align-self: center; }
.nicht-einplanen-schalter > .mit-info { flex: none; }
.nicht-einplanen-schalter > .leise { flex: 1 1 200px; min-width: 0; font-size: 14px; }
/* Hinweise ohne eigenen Knopf gebündelt in einem Kasten statt je ein gelber Balken über die ganze Breite */
.offen-kasten { padding: 8px 12px; border-left: 4px solid var(--gelb); border-radius: var(--radius-klein); background: var(--gelb-hell); font-size: 14px; }
.offen-kasten > strong { display: block; margin-bottom: 2px; }
.offen-kasten ul { margin: 0; padding-left: 18px; }
.offen-kasten li:only-child { margin-left: -18px; list-style: none; }
.nicht-einplanen-alle { margin-top: 12px; }
.liste-gruppe > .abschnitt-titel { display: flex; align-items: center; gap: 8px; margin-top: 20px; }
.bestellung-info .zeile-kopf a { display: inline-flex; align-items: center; min-height: 44px; }
.zeile-stand { margin: 0; color: var(--text); }
.bestellung-aktion { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; padding-top: 10px; border-top: 1px solid var(--linie); }
.bestellung-aktion .hinweis { margin: 0; font-size: 14px; }
.aktion-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; margin: 0; }
.mini { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 13px; font-weight: 600; color: var(--text-2); }
.mini input, .mini select { width: 100%; font-weight: 400; color: var(--text); }
.mini.haken { flex-direction: row; align-items: center; gap: 8px; align-self: flex-end; min-height: 44px; color: var(--rot); }
.mini.haken input { width: 20px; }
@media (max-width: 559px) {
  .aktion-form, .mini { width: 100%; }
  .aktion-form .knopf { width: 100%; }
}
@media (min-width: 900px) {
  /* Feste Spalten, damit Name, Termine und Anzahlung in allen Zeilen untereinander stehen; die Filter-Chips brechen um statt seitlich zu scrollen */
  .zeile-link { grid-template-columns: minmax(0, 1fr) 168px 24px; grid-template-areas: "kopf meta pfeil" "pillen meta pfeil"; }
  .kundentermine .zeile-link { grid-template-columns: minmax(0, 1fr) auto 24px; grid-template-areas: "kopf meta pfeil"; }
  .zeile-kopf > .etikett:first-child { justify-content: center; min-width: 96px; }
  .chipreihe { flex-wrap: wrap; overflow: visible; }
  .zeile-liste > li.zeile.bestellung { grid-template-columns: 170px minmax(0, 1fr); gap: 4px 20px; }
  .bestellung-aktion { grid-column: 1 / -1; }
  /* Kartenkopf: Zeile 1 = Datum | Werk (44 px wie der Link rechts), Zeile 2 = Art/Etikett | Stand; Spalte links oben statt gestreckt */
  .faellig { align-self: start; align-items: center; align-content: start; row-gap: 0; }  /* oben: die Mitte darf eine Zeile „Ersatzteile“ mehr haben */
  .faellig-datum { flex: 1 0 100%; display: flex; align-items: center; min-height: 44px; }
}
@media (min-width: 1300px) {
  /* Name und Termine erst ab hier nebeneinander: darunter passt beides nicht in je eine Zeile (Weber, Brandl wären zweizeilig) */
  .zeile-link { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) 168px 24px; grid-template-areas: "kopf pillen meta pfeil"; }
}
@media (max-width: 899px) {
  .listenkopf .knopf { display: none; }
}

/* Seite: Detail */
.kopfkarte { display: flex; flex-direction: column; gap: 12px; min-width: 0; margin: 0 0 16px; padding: 16px 20px; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); box-shadow: var(--schatten); }
.kopfkarte-kopf { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px 16px; }
.kopfkarte-titel { min-width: 0; flex: 1 1 260px; }
.kopfkarte h1 { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0; overflow-wrap: anywhere; }
.kopfkarte h1 .etikett { font-size: 13px; }
.kopfkarte > p { margin-bottom: 0; }  /* der Kartenabstand (gap) genügt, sonst kommen 8 px Absatzabstand dazu */
.kopf-ort { display: flex; align-items: center; gap: 6px; margin: 4px 0 0; color: var(--text-2); }
.kopf-pillen { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0; }
.kopf-pillen form { display: contents; }  /* Knopf „Übernahme fertig“ in der Pillen-Zeile */
.kontakt { display: flex; flex-wrap: wrap; gap: 0 20px; margin: 0; padding: 0; list-style: none; }
.kontakt li { min-width: 0; }
.kontakt a, .kontakt .leer { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; overflow-wrap: anywhere; }
.kontakt .ks-anzahlung-leise { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; min-height: 44px; }
.notiz { margin: 0; padding: 10px 12px; border-left: 4px solid var(--linie-stark); border-radius: var(--radius-klein); background: var(--grund); }
.anzahlung-zeile { display: flex; flex-wrap: wrap; align-items: flex-end; align-items: last baseline; gap: 8px 12px; padding-top: 12px; border-top: 1px solid var(--linie); }  /* Pille und „fällig bis“ auf der Textlinie des Datumsfelds; flex-end davor ist die Rückfallebene */
.pille.anzahlung-eingegangen { background: var(--erledigt); border-color: #b5ddbf; color: var(--erledigt-text); }
.pille.anzahlung-offen { background: var(--angekuendigt); border-color: #ebcb7e; color: var(--angekuendigt-text); }
.warnungen { display: flex; flex-direction: column; gap: 8px; list-style: none; margin: 0 0 16px; padding: 0; }
.warnung { display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 10px 14px; border: 1px solid var(--linie-stark); border-left: 4px solid var(--linie-stark); border-radius: var(--radius-klein); background: var(--flaeche); }
.warnung.rot { border-left-color: var(--rot); background: var(--rot-hell); }
.warnung.gelb { border-left-color: var(--gelb); background: var(--gelb-hell); }
.warnung .icon { margin-top: 2px; }
.warnung.rot .icon { color: var(--rot); }
.warnung.gelb .icon { color: var(--gelb); }
.warnung:has(> .warnung-link) { padding: 0; }  /* die ganze Zeile ist der Link (Tippfläche mind. 44 px) */
.warnung-link { display: flex; align-items: flex-start; gap: 10px; flex: 1; min-width: 0; min-height: 44px; padding: 11px 14px; border-radius: var(--radius-klein); color: inherit; text-decoration: none; }
.warnung-link > span { overflow-wrap: anywhere; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); }
.warnung-link:hover > span, .warnung-link:focus-visible > span { text-decoration-thickness: 2px; text-decoration-color: currentColor; }
.warnung:has(> .warnung-text) { flex-wrap: wrap; }  /* W27: Text mit Zusatzzeile, daneben der Knopf; schmal rutscht der Knopf darunter */
.warnung-text { flex: 1 1 14em; min-width: 0; overflow-wrap: anywhere; }
.warnung-zusatz { display: block; }
.warnung:has(.warnung-link:hover) { border-color: var(--feld-rand); }
.abschnittskarte, .unterkarte { scroll-margin-top: 80px; }  /* Sprung vom Warnungs-Link: nicht unter den festen Kopf am Handy */
.code { margin-right: 6px; font-size: 12px; font-weight: 700; color: var(--text-2); }
.abschnittskarte { display: flex; flex-direction: column; gap: 12px; }
.abschnittskarte > * { margin-top: 0; margin-bottom: 0; }
.abschnittskarte .karte-kopf { margin-bottom: 0; }
.termin-zeile { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 600; }
.termin-zeile .icon { color: var(--text-2); }
.kette { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.kette li { padding: 8px 12px; border: 1px dashed var(--linie-stark); border-radius: var(--radius-klein); background: var(--grund); font-size: 14px; overflow-wrap: anywhere; }
.kette li::before { content: "\25CB\00A0"; color: var(--text-3); }
.kette li.ok { border: 1px solid #a9d3e8; background: var(--akzent-hell); }
@media (max-width: 899px) { .kette.ks-schritte li { display: flex; align-items: baseline; } }  /* Handy: Kreis oder Haken links auf der Grundlinie der ersten Textzeile, Text daneben und umbrechend (bei einem Link stand der Kreis sonst allein darüber); am PC unverändert */
.kette li.ok::before { content: "\2713\00A0"; font-weight: 700; color: var(--akzent); }
/* Produkte eines Abschnitts in einer Zeile: grau hinterlegt (Grau hat sonst keine Bedeutung), Lagerware orange,
   weil sie keinen Bestellkasten hat und sonst untergeht. Kein Hellblau: das heißt in der App „ok“. */
.produktzeile { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0; }
.produkt { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; max-width: 100%; padding: 3px 10px;
  border: 1px solid #d6d9dd; border-radius: 14px; background: #eef0f2; font-size: 14px; overflow-wrap: anywhere; }
.produkt-zusatz { color: var(--text-2); }
.produkt.lager { border-color: #f5c27a; background: var(--orange-hell); }
.lager-marke { padding: 0 7px; border: 1px solid #f5c27a; border-radius: 7px; background: var(--flaeche); font-size: 12px; font-weight: 600; }
.termin-liste { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.termin-liste li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 14px; }
.abschnittskarte .knopfgruppe { align-items: stretch; }
.abschnittskarte .knopfgruppe > .formular-zeile { flex: 1 1 300px; padding: 10px 12px; border: 1px solid var(--linie); border-radius: var(--radius-klein); background: var(--grund); }
/* Lose Knöpfe stehen in einer eigenen Zeile über den Kästen: neben einem Kasten würde „stretch“ sie auf dessen Höhe ziehen (66 bis 116 px statt 44 px) */
.abschnittskarte .knopfgruppe > .knopfzeile { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; flex: 1 1 100%; }
@media (min-width: 560px) { .abschnittskarte .knopfgruppe > .formular-zeile { flex: 0 1 auto; } }  /* Kasten so breit wie sein Inhalt, keine leere graue Fläche; am Handy volle Breite wie die Knöpfe */
.formular-zeile { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.formular-zeile .mini { width: 100%; }
.formular-zeile > button { width: 100%; }
.kundeninfo { display: flex; flex-direction: column; gap: 10px; }
.kundeninfo:not(:has(*)) { display: none; }
.kundeninfo .hinweis, .unterkarte .hinweis { margin: 0; padding: 8px 12px; border-left: 4px solid var(--gelb); border-radius: var(--radius-klein); background: var(--gelb-hell); color: var(--text); font-size: 14px; }
.kundeninfo-zeile { display: flex; flex-direction: column; gap: 8px; }
.kundeninfo-zeile > .knopf, .kundeninfo-zeile > form, .kundeninfo-zeile button { width: 100%; }
.kundeninfo-zeile > form { margin: 0; }
.unterkarte { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 12px 14px; border: 1px solid var(--linie); border-radius: var(--radius-klein); background: var(--grund); }
.unterkarte .karte-kopf { margin-bottom: 0; }
.unterkarte h3 { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.unterkarte h3 .icon { color: var(--text-2); }
.unterkarte .formular-zeile { padding: 10px 12px; border: 1px solid var(--linie); border-radius: var(--radius-klein); background: var(--flaeche); }
.ab-bezug { width: 100%; margin: 0; font-size: 13px; font-weight: 600; color: var(--text-2); }
.ab-live { width: 100%; margin: 0; font-size: 13px; line-height: 1.45; color: var(--text-2); overflow-wrap: anywhere; }
.ab-live:empty { position: absolute; }  /* bleibt für Vorlesegeräte da, braucht aber keinen Platz (auch keinen Zeilenabstand) */
.ab-live.unstimmig { color: var(--gelb); font-weight: 600; }
/* Hinweis unter einem Datumsfeld (datum-pruefen.js): falsches Jahr rot, auffälliges Datum gelb */
.datum-hinweis { display: block; margin: 2px 0 0; font-size: 13px; line-height: 1.45; font-weight: 600; color: var(--gelb); overflow-wrap: anywhere; }
.datum-hinweis:empty { display: none; }
.datum-hinweis.hart { color: var(--rot); }
.formular-zeile.nachtrag-formular { flex-direction: column; align-items: stretch; gap: 14px; }
.nachtrag-kopf { display: flex; flex-direction: column; gap: 2px; }
.nachtrag-titel { margin: 0; font-weight: 700; }
.nachtrag-gruppe { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding-top: 10px; border-top: 1px solid var(--linie); }
.nachtrag-gruppentitel { width: 100%; margin: 0; font-size: 13px; font-weight: 700; color: var(--text-2); }
.nachtrag-formular > button { align-self: flex-start; }
@media (min-width: 560px) { .nachtrag-gruppe { flex-direction: row; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; } }
@media (min-width: 560px) { .ab-live { order: 2; } }  /* in der Zeilenansicht unter den Feldern und dem Knopf */
.bestell-info { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; font-size: 14px; color: var(--text-2); }
.bestell-info strong { color: var(--text); }
/* „Abschnitt hinzufügen“ unter dem letzten Abschnitt: eigene Zeile, klar getrennt von den Karten darunter */
.abschnitt-ergaenzen { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; margin: 0 0 16px; padding: 8px 16px; border: 1.5px dashed var(--akzent); border-radius: var(--radius); background: var(--flaeche); color: var(--akzent); font-weight: 650; }
.abschnitt-ergaenzen:hover { background: var(--akzent-hell); text-decoration: none; }
.abschnitt-grenze { margin: 0 0 16px; }
.gefahrzone { min-width: 0; border: 1px dashed var(--linie-stark); border-radius: var(--radius-klein); background: var(--flaeche); }
.gefahrzone > summary, .verlauf > summary { display: flex; align-items: center; gap: 8px; min-height: 44px; list-style: none; cursor: pointer; }
.gefahrzone > summary { padding: 0 12px; font-weight: 600; color: var(--text-2); }
.gefahrzone > summary > span { text-wrap: balance; }  /* Umbruch am Handy gleichmäßig: „zur 1. Demontage“ bleibt zusammen */
.gefahrzone > summary .icon { color: var(--rot); }
.gefahrzone[open] > summary { color: var(--rot); border-bottom: 1px dashed var(--linie-stark); }
.gefahrzone > summary::-webkit-details-marker, .verlauf > summary::-webkit-details-marker { display: none; }
.gefahrzone > summary::after, .verlauf > summary::before { content: ""; flex: none; width: 18px; height: 18px; background: var(--text-2); -webkit-mask: var(--pfeil-unten) center / 18px 18px no-repeat; mask: var(--pfeil-unten) center / 18px 18px no-repeat; }
.gefahrzone > summary::after { margin-left: auto; }
.verlauf > summary::before { order: -1; }
.gefahrzone[open] > summary::after, .verlauf[open] > summary::before { transform: rotate(180deg); }
.gefahr-inhalt { display: flex; flex-direction: column; gap: 10px; padding: 12px; }
.gefahr-inhalt > .formular-zeile { padding: 0; border: 0; background: none; }
.gefahr-inhalt > .formular-zeile.gefahr-ende { padding-top: 12px; border-top: 1px solid var(--linie); }
.gefahrzone.seitenende { margin: 0 0 16px; }
.montageinfo { white-space: pre-wrap; font: inherit; background: var(--grund); border: 1px solid var(--linie); padding: .75rem; border-radius: var(--radius-klein); overflow-wrap: anywhere; margin: 0 0 12px; }  /* Nr. 33: Vorschau der Montageinfo, Umbrüche wie im Chat; kein waagerechtes Scrollen am Handy */
.verlauf-liste { margin: 0; padding: 0; list-style: none; font-size: 14px; }
.verlauf-liste li { padding: 6px 0; border-top: 1px solid var(--linie); overflow-wrap: anywhere; }
.verlauf-liste li:first-child { border-top: 0; }
.verlauf { border-top: 1px solid var(--linie); }
.verlauf:first-child { border-top: 0; }
.verlauf > summary { font-weight: 600; }
.verlauf .verlauf-liste { padding-bottom: 8px; }
@media (min-width: 560px) {
  .formular-zeile { flex-direction: row; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; }
  .formular-zeile .mini { width: auto; }
  .formular-zeile .mini.breit { flex: 1 1 220px; }  /* nur in der Zeile: in der Handy-Spalte wäre die Basis eine Höhe von 220 px */
  .formular-zeile > button { width: auto; }
  .formular-zeile > .zeile-text { display: flex; align-items: center; min-height: 44px; }  /* reiner Text in der Zeile: so hoch wie Haken und Knopf, sonst hängt er an der Unterkante tiefer */
  .kundeninfo-zeile { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .kundeninfo-zeile > .knopf, .kundeninfo-zeile > form, .kundeninfo-zeile button { width: auto; }
}
@media (max-width: 559px) {
  .abschnittskarte .knopfzeile > .knopf { flex: 1 1 100%; }  /* wie alle anderen Knöpfe der Karte: volle Breite */
  .abschnittskarte .knopfzeile > .nicht-einplanen-schalter, .nicht-einplanen-schalter > .mit-info { flex: 1 1 100%; }  /* Knopf bis ans i, Erklärtext darunter */
  .abschnittskarte .knopfzeile > .mit-info { flex: 1 1 100%; }  /* „Dauert länger“ mit i: volle Breite wie die anderen Knöpfe (19.10.2026) */
  .abschnittskarte .knopfzeile > .mit-info > .knopf { flex: 1 1 auto; }  /* der Link-Knopf wächst bis ans i (die Grundregel greift nur bei button) */
  .anzahlung-zeile > .formular-zeile { flex: 1 1 100%; }  /* Datum und Knopf „Anzahlung eingegangen“ wie im Abschnitt: volle Breite */
}
@media (min-width: 900px) {
  .kopfkarte { padding: 20px 24px; }
  .abschnittskarte { padding: 20px 24px; }
}

/* Seite: Anmelden */
.anmelde-karte { max-width: 420px; margin: 6vh auto 0; padding: 28px; background: var(--flaeche); border: 1px solid var(--linie); border-top: 4px solid var(--orange); border-radius: var(--radius); box-shadow: var(--schatten); }
.anmelde-karte .logo { display: block; width: 200px; height: auto; margin: 0 auto 16px; }
.anmelde-karte h1 { margin: 0 0 4px; text-align: center; font-size: 22px; }
.anmelde-lead { margin: 0 0 20px; text-align: center; color: var(--text-2); }
.anmelde-karte .formular { max-width: none; }
.anmelde-karte .knopf.primaer { min-height: 48px; margin-top: 4px; font-size: 15px; }
.anmelde-karte .fuss { margin: 18px 0 0; text-align: center; font-size: 13px; color: var(--text-2); }
@media (max-width: 899px) {
  .anmelde-karte { margin-top: 2vh; padding: 22px 18px; }
}

/* Übergangsregeln: noch in Gebrauch für die Druckansicht (_woche.html), den Filter-Chip der Kommissionsliste (.chip) und .hinweis (Detailseite, Bestellungen, Aufgaben). */
.druckkopf { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 3px solid var(--orange); margin-bottom: 12px; padding-bottom: 8px; }
.druckkopf h1 { margin: 0; } .druckkopf .logo { width: 160px; height: auto; }
.hinweis { color: var(--gelb); }
.hinweis:has(> .icon) { display: flex; align-items: flex-start; gap: 8px; }  /* Warnsymbol mit Abstand zum Text (Adresse unklar, Craftnote nicht verbunden) */
.hinweis > .icon { margin-top: 1px; }
.woche { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.tag { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius-klein); padding: 8px; min-width: 0; }
.tag h3 { font-size: 14px; margin: 0 0 6px; }
.tag.frei, .tag.gesperrt { background: repeating-linear-gradient(45deg, var(--grund), var(--grund) 6px, var(--flaeche) 6px, var(--flaeche) 12px); }
.halbtag { display: flex; gap: 6px; align-items: flex-start; margin: 4px 0; }
.teil { font-size: 12px; color: var(--text-2); width: 24px; flex: none; }
.chip { display: inline-block; padding: 3px 9px; border-radius: 6px; font-size: 14px; line-height: 1.35; color: var(--text); background: var(--flaeche); border: 1px solid transparent; overflow-wrap: anywhere; }
.chip.vorschlag { border: 1px dashed var(--vorschlag-rand); } .chip.angekuendigt { background: var(--angekuendigt); border-color: #ebcb7e; }
.chip.bestaetigt { background: var(--bestaetigt); color: var(--bestaetigt-text); font-weight: 600; } .chip.erledigt { background: var(--erledigt); color: var(--erledigt-text); }
.chip.zurueckgestellt, .chip.storniert { text-decoration: line-through; }
.badge { font-size: 11px; background: var(--gelb-hell); color: var(--gelb); padding: 1px 6px; border-radius: 4px; }
.aussendienst { list-style: none; padding: 6px 0 0; margin: 6px 0 0; border-top: 1px solid var(--linie); font-size: 14px; }
@media (max-width: 760px) {
  .woche { grid-template-columns: 1fr; }
  .tag.frei:not(.gesperrt) { display: none; }
}
@media print {
  @page { size: A4 landscape; margin: 10mm; }
  .seitenleiste, .mobil-kopf, .tabs, .toasts, .nicht-drucken, .neuigkeit-balken { display: none; }
  .druckkopf .logo { width: 40mm; }
  .chip.bestaetigt { background: #fff; color: #000; border: 2px solid #000; }
  body { background: #fff; font-size: 11px; }
  .inhalt, .seitenleiste ~ .inhalt { margin: 0; max-width: none; padding: 0; }
  .woche { grid-template-columns: repeat(6, 1fr); }
  .tag { break-inside: avoid; }
  .chip { border: 1px solid #999; }
}

/* Zwischenstand (Neue Kommission): Hinweis, Knopf mit i-Symbol, Block „Angefangen“ in der Liste */
.zwischenstand-hinweis { margin: 0 0 16px; }
.knopf-mit-info { display: inline-flex; align-items: center; gap: 6px; margin-right: 6px; }  /* das i hängt am Knopf davor, nicht am nächsten */
.knopf-mit-info .info-text { top: auto; bottom: calc(100% - 5px); }  /* Der Knopf sitzt unten: Erklärung nach oben öffnen */
.angefangen > .hilfe { margin-bottom: 8px; }
.angefangen .zeile-liste > li { justify-content: space-between; }
.angefangen .rechts { align-items: flex-start; }
.angefangen-text { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-width: 0; overflow-wrap: anywhere; }
details.verwerfen > summary { list-style: none; cursor: pointer; }
details.verwerfen > summary::-webkit-details-marker { display: none; }
details.verwerfen > form { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; font-size: 13px; }
button[hidden] { display: none; }
@media (max-width: 760px) {
  /* Vier Knöpfe passen nicht in eine Zeile: Raster zwei mal zwei, oben Abbrechen und Zwischenstand speichern, unten Vorschau berechnen und Speichern */
  .formular-knoepfe:not(.lokal):has(.knopf-mit-info) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
  .knopf-mit-info { min-width: 0; margin-right: 0; }  /* im Raster füllt die Einheit ihre Zelle */
  .knopf-mit-info > button:first-child { flex: 1 1 auto; min-width: 0; padding: 0 10px; }
}
/* Was ist neu */
.neuigkeiten-quittung { margin: 0 0 16px; }
.neuigkeit h3 { margin: 14px 0 6px; font-size: 15px; }
.neuigkeit-punkte { margin: 0; padding-left: 20px; }  /* Text über die volle Kartenbreite (Maurizio 09.10.2026) */
.neuigkeit-punkte li { margin: 0 0 8px; }
.neuigkeit-datum { color: var(--text-2); font-size: 14px; }
.anleitungen-kasten { border-left: 4px solid var(--akzent); }
.anleitungen-kasten > summary { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 12px; min-height: 44px; list-style: none; cursor: pointer; }
.anleitungen-kasten > summary::-webkit-details-marker { display: none; }
.anleitungen-kasten > summary::after { content: ""; grid-row: 1 / span 2; grid-column: 2; width: 18px; height: 18px; background: var(--text-2); -webkit-mask: var(--pfeil-unten) center / 18px 18px no-repeat; mask: var(--pfeil-unten) center / 18px 18px no-repeat; }
.anleitungen-kasten[open] > summary::after { transform: rotate(180deg); }
.anleitungen-kopf { display: flex; align-items: center; gap: 8px; }
.anleitungen-kopf > h2 { margin: 0; font-size: 17px; }
.anleitungen-zahl { padding: 0 8px; border-radius: 999px; background: var(--akzent-hell); color: var(--akzent); font-size: 13px; font-weight: 700; }
.anleitungen-lead { color: var(--text-2); font-size: 14px; }
.anleitungen-kasten[open] > summary { margin-bottom: 8px; }
.anleitungen-kasten[open] .anleitungen-tipp { display: none; }
.anleitungen-liste { margin: 0; padding: 0; list-style: none; }
.anleitungen-liste li { display: flex; flex-direction: column; gap: 2px; padding: 6px 0; overflow-wrap: anywhere; }
.anleitungen-liste a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.anleitungen-zusatz { color: var(--text-2); font-size: 14px; }
.pille.neu-fuer-dich { background: var(--orange-hell); border-color: #f5c27a; color: var(--text); }
.neuigkeit-balken { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 16px; padding: 8px 8px 8px 16px; border: 1px solid #a9d3e8; border-left: 4px solid var(--akzent); border-radius: var(--radius); background: var(--akzent-hell); }
.neuigkeit-balken-text { display: flex; align-items: center; gap: 10px; flex: 1 1 240px; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.neuigkeit-balken form { display: flex; gap: 8px; margin: 0; }
.neu-punkt { display: inline-block; flex: none; width: 8px; height: 8px; margin-left: auto; border-radius: 50%; background: var(--orange); }
.mehr > summary { position: relative; }
.mehr > summary .neu-punkt { position: absolute; top: 8px; right: calc(50% - 16px); margin: 0; }
@media print { .neuigkeit-balken { display: none; } }

/* Kalender-Popup (Nr. 15) */
dialog.fenster { width: min(1180px, 96vw); max-width: none; max-height: 92vh; padding: 0; border: 0; border-radius: var(--radius); box-shadow: 0 10px 40px rgba(0, 0, 0, .25); }
dialog.fenster::backdrop { background: rgba(0, 0, 0, .35); }
.fenster-inhalt { padding: 16px 20px; max-height: 92vh; overflow: auto; }
.fenster-inhalt[aria-busy="true"] { opacity: .6; }
.wahl-kopf { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: flex-start; justify-content: space-between; margin-bottom: 12px; }
.wahl-kopf > div { flex: 1 1 200px; }  /* Titel darf umbrechen, Zurück/Schließen bleibt rechts in der Titelzeile */
.wahl-kopf h1 { font-size: 20px; margin: 0; text-wrap: balance; }
.wahl-kopf p { text-wrap: balance; }  /* Untertitel neben dem X am Handy: kein einzelnes Wort in der zweiten Zeile */
.wahl-blaettern { margin-bottom: 12px; }
@media (max-width: 559px) { .wahl-blaettern .knopf { flex: 1 1 calc(50% - 4px); } .wahl-blaettern .wahl-frueheste { order: 1; flex-basis: 100%; } }  /* Früher und Später nebeneinander, „Zur frühesten Woche“ darunter über die ganze Breite */
.wahl-woche + .wahl-woche { margin-top: 12px; }
.wahl-vorschau ul { margin: 0 0 12px; padding-left: 20px; }
.block.gewaehlt { border-color: var(--akzent); box-shadow: 0 0 0 2px var(--akzent-hell); }
.block.weicht-aus { outline: 2px dashed var(--orange); outline-offset: -2px; }
.legende-muster { display: inline-flex; padding: 1px 8px; }
@media (max-width: 899px) {
  dialog.fenster { width: 100vw; height: 100dvh; max-height: none; margin: 0; border-radius: 0; }
  .fenster-inhalt { max-height: 100dvh; padding: 12px 16px calc(16px + var(--sicher-unten)); }
}
/* Reservetag („+1 Tag Reserve“): blasse Belegung „Reserve · Kunde“ in Kalender, Wochenstreifen und Druck; Häkchen-Feld */
.reserve-feld[hidden] { display: none; }
.block.reserve { background: repeating-linear-gradient(135deg, var(--akzent-hell) 0 6px, #f4f9fc 6px 12px); border: 1.5px dashed #a9d3e8; color: var(--bestaetigt-text); box-shadow: none; }
.block.reserve strong { color: var(--bestaetigt-text); font-weight: 650; }
.pille.reserve { background: repeating-linear-gradient(135deg, var(--akzent-hell) 0 6px, #f4f9fc 6px 12px); border: 1.5px dashed #a9d3e8; color: var(--bestaetigt-text); }
.tag-handy > p a.reserve-zeile { position: relative; min-height: 0; color: var(--bestaetigt-text); }
.tag-handy > p a.reserve-zeile::after { content: ""; position: absolute; inset: -11px 0; }  /* Tippfläche mindestens 44 px, der Chip selbst so hoch wie die Status-Chips */
.reserve-zeile { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border: 1.5px dashed #a9d3e8; border-radius: 999px; background: var(--akzent-hell); font-size: 14px; line-height: 1.25; font-weight: 650; overflow-wrap: anywhere; }
.chip.reserve { background: var(--akzent-hell); border: 1px dashed #a9d3e8; color: var(--bestaetigt-text); }
.plantafel-legende .pille.reserve, .legende .pille.reserve { white-space: nowrap; }
@media print { .chip.reserve { background: #fff; color: #000; border: 1px dashed #666; } }
/* Nr. 56: Ausfall-Halbtag des Montage-Teams („Regen“, „Team fehlt“, „Ausfall“): rot-hell mit rotem Rand, keine Belegung, kein „frei“ */
.block.ausfall { flex-direction: row; align-items: center; gap: 6px; background: var(--rot-hell); border-color: var(--rot); color: var(--rot); box-shadow: none; }
.block.ausfall strong { display: inline-flex; align-items: center; gap: 6px; color: var(--rot); font-weight: 700; }
.block.ausfall .icon { width: 16px; height: 16px; flex: none; }
.chip.ausfall { background: var(--rot-hell); border: 1px solid var(--rot); color: var(--rot); font-weight: 650; }
.etikett.ausfall, .tafel-kopf small.ausfall-kopf { background: var(--rot-hell); color: var(--rot); font-weight: 700; }
.tafel-kopf small.ausfall-kopf { align-self: flex-start; padding: 0 6px; border-radius: 6px; }
a.block.ausfall:hover strong, a.block.ausfall:focus-visible strong, a.ausfall-zeile:hover, a.ausfall-zeile:focus-visible { text-decoration: underline; }  /* B-3: der rote Kasten führt zum Vorgang */
.tafel-kopf small.ausfall-kopf .ausfall-link { color: inherit; text-decoration: underline; }
a.ausfall-zeile { text-decoration: none; }
.ausfall-zeile { display: inline-flex; align-items: center; padding: 3px 10px; border: 1.5px solid var(--rot); border-radius: 999px; background: var(--rot-hell); color: var(--rot); font-size: 14px; line-height: 1.25; font-weight: 650; }
.plan-anpassen { display: inline-flex; align-items: center; align-self: flex-start; gap: 4px; font-size: 12px; font-weight: 600; color: var(--text-2); text-decoration: none; }
.plan-anpassen:hover { color: var(--akzent); text-decoration: underline; }
.plan-anpassen .icon { width: 14px; height: 14px; }
.plan-anpassen { min-height: 44px; margin-block: -4px; }  /* 44 px Tippfläche ganz im Tageskopf (kein Überlappen mit Nachbar-Links oder Karten); der Link nimmt den 4-px-Abstand nach oben und den 4-px-Rand unten des Kopfes selbst ein, der Kopf wächst nur um 18 px */
.hinweis.erledigt-ausgefallen a { padding-block: 13px; }  /* Link bleibt im Satz (Umbruch wie vorher); Polster vergrößert nur die Tippfläche, nicht die Zeilenhöhe */
@media print { .chip.ausfall { background: #fff; color: #000; border: 1px solid #000; font-weight: 700; } .plan-anpassen { display: none; } }
/* Nr. 56 (Etappe B): geplante Pause eines einzelnen Abschnitts („Pause: Gruber“) und Vormerkung auf die Reserve eines anderen. Pause: grau, keine Belegung,
   kein „frei“; arbeitet dort ein anderer, steht der Text klein unter dessen Karte. Vormerkung: Karte mit gestricheltem Rand wie ein Vorschlag. */
.block.pause { background: var(--grund); border: 1.5px solid var(--linie-stark); color: var(--text-2); box-shadow: none; }
.block.pause strong { color: var(--text-2); font-weight: 650; }
.chip.pause { background: var(--grund); border: 1px solid var(--linie-stark); color: var(--text-2); font-weight: 600; }
.pause-klein, .pause-zeile, .etikett.pause-etikett { font-size: 12px; line-height: 1.3; color: var(--text-2); }
.pause-klein { display: block; margin-top: 2px; }
.pause-zeile { display: inline-flex; align-items: center; padding: 3px 10px; border: 1.5px solid var(--linie-stark); border-radius: 999px; background: var(--grund); font-size: 14px; font-weight: 600; }
.block.vorgemerkt { border: 1.5px dashed var(--vorschlag-rand); }
.etikett.vorgemerkt-etikett, .badge.vorgemerkt-etikett { background: var(--flaeche); color: var(--text); border: 1px dashed var(--vorschlag-rand); font-weight: 600; }
@media print { .block.pause, .chip.pause { background: #fff; color: #000; border: 1px solid #666; } .pause-klein { color: #000; } }
.zwei-montagen-hinweis { margin: 4px 0; padding: 4px 8px; font-size: 12.5px; line-height: 1.35; border-left: 3px solid var(--gelb); background: var(--gelb-hell); }  /* Nr. 61 Teil 3: Wochendruck */
@media print { .zwei-montagen-hinweis { background: #fff; color: #000; border: 1px solid #666; border-left-width: 3px; } }
.schloss-marke { display: inline-flex; color: var(--text-2); }
.schloss-marke .icon { width: 12px; height: 12px; }
.legende-schloss { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-2); }
.unbekannt-marke { display: inline-flex; color: var(--gelb); }  /* „Kunde kennt diesen Stand noch nicht“ (E1, 17.10.2026) */
.unbekannt-marke .icon { width: 12px; height: 12px; }
/* Nr. 22: Stunden je Produktzeile und Summe unter den Produkten */
.position-stunden { align-self: end; padding-bottom: 10px; color: var(--text-2); font-size: 13px; font-variant-numeric: tabular-nums; }
.position-stunden.fehlt { color: var(--rot); font-weight: 650; }
.produkt-summe { margin-top: 4px; font-weight: 600; }
/* Nr. 23: Vorschau im Klartext */
.vorschau-abschnitt { padding: 12px 0; border-top: 1px solid var(--linie); }
.vorschau-abschnitt h3 { margin: 0 0 4px; font-size: 15px; }
.vorschau-termin { margin: 0; font-weight: 650; }
.vorschau-warum { margin: 4px 0 0; }
.vorschau-todos { margin: 8px 0 0; padding-left: 20px; }
.vorschau-todos li { margin: 2px 0; }
.vorschau-todos li.ueberfaellig { color: var(--rot); font-weight: 650; list-style: none; margin-left: -20px; display: flex; gap: 6px; align-items: center; }
#vorschau { scroll-margin-top: 80px; }  /* wie .abschnittskarte: Überschrift nicht unter dem festen Kopf am Handy */
/* Nr. 23 Teil 3: Kalender-Ausschnitt in der Vorschau */
.vorschau-kalender { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--linie); }
.vorschau-kalender h3 { margin: 0 0 4px; font-size: 15px; }
.vorschau-woche { margin-top: 12px; }
.vorschau-woche .wochenkopf, .wahl-woche .wochenkopf { margin: 0 0 6px; font-size: 14px; }
.block.neu { background: var(--akzent-hell); border: 2px solid var(--akzent); }
.etikett.verschoben { border-color: var(--orange); }
.neu-zeile { font-weight: 650; }
@media (max-width: 767px) { .vorschau-woche:not(.mit-vorschlag) { display: none; } }

/* ===== Paket 08.10. (Nr. 24–29) ===== */
/* Nr. 28: vorläufiger Kundentermin hält die Zeit frei, ist aber gestrichelt wie ein Vorschlag */
.block.aussen.vorlaeufig, .tag-handy .aussen.vorlaeufig { background: var(--orange-hell); border: 1.5px dashed var(--orange); color: var(--text); }
.etikett.vorlaeufig, .block .etikett.vorlaeufig { background: var(--orange-hell); border: 1px dashed var(--orange); color: var(--text); }
/* Nr. 26: Abschlussdaten unter der Terminzeile. „Abschnitt erledigt melden“ steht seit 13.10.2026 in der Knopfreihe (.aufklapp) */
.abschluss { margin: 8px 0 0; }
.abschluss-aendern > summary, details.aufklapp > summary { list-style: none; display: inline-flex; width: auto; }
.abschluss-aendern > summary::-webkit-details-marker, details.aufklapp > summary::-webkit-details-marker { display: none; }
.erledigt-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; margin: 10px 0 0; }
/* Aufklapp-Knopf in der Knopfreihe, sein Kasten folgt im DOM direkt dahinter: offen = sichtbar (ohne JS, ohne :has).
   Am PC (ab 560 px) steht der Kasten per order unter der ganzen Reihe, die Knöpfe bleiben stehen; am Handy direkt unter seinem Knopf. */
details.aufklapp { margin: 0; }
details.aufklapp[open] > summary { border-color: var(--akzent); background: var(--akzent-hell); }
.aufklapp-feld { display: none; padding: 10px 14px 12px; border: 1px solid var(--linie-stark); border-left: 4px solid var(--akzent); border-radius: var(--radius-klein); background: var(--grund); }
details.aufklapp[open] + .aufklapp-feld { display: block; }
.aufklapp-kopf { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 36px; }
.aufklapp-feld .erledigt-form { margin-top: 6px; }
.aufklapp-feld .nicht-fertig-form { margin-top: 6px; }
.aufklapp-fehler { flex: 1 1 100%; display: flex; flex-direction: column; gap: 2px; }
.aufklapp-feld input[aria-invalid="true"] { border-color: var(--rot); box-shadow: inset 0 0 0 1px var(--rot); }  /* wie .feld.fehler */
@media (min-width: 560px) { .aufklapp-feld { order: 99; flex: 1 1 100%; } }
@media (max-width: 559px) { details.aufklapp, .aufklapp-feld { flex: 1 1 100%; } details.aufklapp > summary { width: 100%; } }
.erledigt-form .hinweis { flex: 1 1 100%; margin: 0; }
/* Nr. 51: Pflichtfrage und Zweige im Erledigt-Kasten; jeder Block steht in voller Breite unter den Daten */
.erledigt-form .erl-block { flex: 1 1 100%; min-width: 0; }
.erledigt-form .erl-block[hidden], .erledigt-form .erl-block [hidden] { display: none; }
.erledigt-form .feld.voll { flex: 1 1 100%; }
.erledigt-form .feld.w-s { max-width: 220px; }
.erl-wiederkommen { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 12px; }
.erl-wiederkommen .hinweis { flex: 1 1 auto; }
.erl-wiederkommen-aus { margin: 0 0 12px; }
.erl-rest > .feld:last-child, .erl-abschluss > .feld:last-of-type { margin-bottom: 12px; }
.erledigt-form .folge-aufmass { flex: 1 1 100%; }  /* Nr. 32 E: je Folgeabschnitt eine eigene Zeile */
.erledigt-form .folge-aufmass .mini.haken { color: var(--text); align-self: center; }  /* kein Rot: keine Gefahr-Bestätigung */
.abschluss-zeile { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; color: var(--erledigt-text); font-weight: 600; }
/* „Abschlussdaten ändern“ steht neben „Erledigt: …“ (ändert genau diese Daten); aufgeklappt wächst nur der Knopf-Teil, der Text bleibt oben */
.abschluss-kopf { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 12px; }
.abschluss-kopf > .abschluss-zeile { margin: 0; min-height: 44px; }
.abschluss-kopf > .abschluss-aendern { flex: 1 1 auto; }
.abschluss-kopf > .abschluss-aendern > .erledigt-form { margin-top: 8px; }

/* Nr. 29: Rechnung je erledigtem Abschnitt */
.rechnung-zeile { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 8px 0 0; }
.etikett.rechnung-offen { background: var(--gelb); color: #fff; }
.etikett.rechnung-ok { background: var(--erledigt); color: var(--erledigt-text); }
/* Nr. 51: die Rechnung wartet auf einen Restpunkt (kein Handlungsdruck wie „offen“: eher ruhig gelb) */
.etikett.rechnung-wartet { background: var(--gelb-hell); color: var(--gelb); }
/* Nr. 29: erledigt, aber Rechnung noch nicht geschickt, bleibt in „Alle laufenden“ gelb markiert */
.zeile-liste > li.zeile.rechnung-offen { background: var(--gelb-hell); border-left: 4px solid var(--gelb); }
.zeile-liste > li.zeile.rechnung-offen .zeile-link:hover { background: #ffecb8; }
/* Nr. 25: belegte, aber wählbare Felder im Kalender-Fenster zeigen „wählen“ wie freie Felder */
a.block .waehlen-marke { align-self: flex-end; margin-top: auto; padding: 1px 8px; border-radius: 7px; background: var(--akzent); color: #fff; font-size: 12px; font-weight: 600; }
a.block:hover .waehlen-marke, a.block:focus-visible .waehlen-marke { text-decoration: underline; }
/* Nr. 25: eine an das Sprungziel geholte, dann geschlossene Meldung hinterlässt keine Lücke in der Karte */
.toasts:empty { display: none; }
/* Nr. 37, Paket 1.7: Reparaturliste – Termin, Material, Arbeit, Rechnung als beschriftete Werte unter dem Kopf. Unter 560 px zwei Spalten,
   darüber vier; die Regel ist spezifischer als die Spaltenregeln der Kommissionsliste (900/1300 px) und gilt deshalb in jeder Breite. */
.zeile-link.reparatur { grid-template-columns: minmax(0, 1fr) 24px; grid-template-areas: "kopf pfeil" "pillen pillen" "angaben angaben"; }
.rep-angaben { grid-area: angaben; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; padding-top: 10px; border-top: 1px solid var(--linie); }
.rep-feld { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.rep-name { font-size: 12px; font-weight: 600; color: var(--text-3); letter-spacing: .01em; }
.rep-wert { font-weight: 600; overflow-wrap: anywhere; }
.rep-wert.leise { font-weight: 400; color: var(--text-3); }
.rep-wert.rot { color: var(--rot); }
.rep-wert.gelb { color: var(--gelb); }
.rep-wert.lila { color: var(--wartet); }
.rep-wert.gruen { color: var(--erledigt-text); }
.rep-tags { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 8px; }
.chipreihe .chip-titel { flex: none; align-self: center; font-size: 14px; font-weight: 600; color: var(--text-2); }
@media (min-width: 560px) {
  .rep-angaben { grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); }
}

/* Nr. 37, Paket 2a: Ersatzteile (Zeilen im Formular, Anzeige auf der Kommissionsseite) */
.ersatzteil-zeilen { display: grid; gap: 12px; }
.ersatzteil-zeile { margin: 0; padding: 12px 14px 14px; border: 1px solid var(--linie); border-radius: 10px; background: var(--flaeche); }
.ersatzteil-zeile[hidden] { display: none; }
.ersatzteil-zeile.fehler { border-color: var(--rot); }
.ersatzteil-zeile legend { padding: 0 6px; font-size: 13px; font-weight: 700; color: var(--text-2); }
[data-ersatzteil-mehr] { margin-top: 10px; }
.ersatzteil-leeren { margin-top: 10px; }
/* Feinschliff Nr. 37: Planungswahl in „Neue Reparatur“ (reparatur_planung.js). Drei Kacheln ab ca. 700 px Feldbreite nebeneinander,
   am Handy untereinander; jede Kachel mindestens 48 px hoch. */
.feld.planung-wahl .wahl > div { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 8px 12px; }
.feld.planung-wahl .wahl label { height: 100%; align-items: flex-start; padding: 10px 14px; }
.feld.planung-wahl .wahl label input { margin-top: 1px; }
.planung-gruppe[hidden] { display: none; }
.planung-hinweis { margin: 0 0 16px; font-size: 14px; line-height: 1.5; color: var(--text-2); }
.planung-hinweis .mit-info { display: inline-flex; align-items: center; gap: 4px; color: var(--text); font-weight: 600; }
.ersatzteile { display: grid; gap: 6px; margin: 6px 0 0; }
.ersatzteil-aktion { margin: 0; }
.etikett.teil-rot { background: var(--rot-hell); color: var(--rot); }
.etikett.teil-gelb { background: var(--gelb); color: #fff; }
.etikett.teil-gruen { background: var(--erledigt); color: var(--erledigt-text); }
.zeile-teile { margin: 2px 0 0; color: var(--text-2); font-size: 13px; }

/* Nr. 37 (Paket 3b): Craftnote-Suche in „Neue Reparatur“ */
.craftnote-suche { margin-bottom: 16px; }
.craftnote-suche[hidden] { display: none; }
/* Nr. 36: „Anderes Projekt suchen“ auf der Seite „Craftnote-Projekt“: Feld und Knopf nebeneinander, am Handy untereinander */
.craftnote-frei-zeile { display: flex; gap: 8px; align-items: stretch; }
.craftnote-frei-zeile input { flex: 1 1 auto; min-width: 0; }
.craftnote-frei-zeile .knopf { flex: 0 0 auto; }
@media (max-width: 480px) { .craftnote-frei-zeile { flex-direction: column; } }
.craftnote-status:empty { display: none; }
.craftnote-status { margin: 8px 0 0; }
.craftnote-treffer { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.craftnote-treffer-zeile { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border: 1px solid var(--feld-rand); border-radius: var(--radius-klein); background: var(--flaeche); }
.craftnote-treffer-zeile .knopf { flex: none; }
.craftnote-etiketten { display: flex; flex-wrap: wrap; gap: 4px; }
.craftnote-herkunft { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 16px; }
.craftnote-herkunft[hidden] { display: none; }
.craftnote-herkunft > span { flex: 1 1 0; min-width: 12em; }
@media (max-width: 600px) {
  .craftnote-treffer-zeile { flex-direction: column; align-items: stretch; }
}

/* Nr. 38: Tourvorschlag (Paket 1: PLZ in der Reparaturzeile) */
.etikett.plz-fehlt { background: var(--gelb); color: #fff; }

/* Nr. 38 (Paket 2): Bereich „Für einen Reparaturtag prüfen“ */
.tourvorschlag { padding: 0; margin: 0 0 16px; }
.tourvorschlag > summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; min-height: 44px; padding: 10px 16px; cursor: pointer; }
.tourvorschlag[open] > summary { border-bottom: 1px solid var(--linie); }
.tour-zahlen { color: var(--text-2); font-size: 14px; }
.tour-zahl { white-space: nowrap; }
.tour-gruppe, .tour-termin { padding: 0 16px 8px; }
.tour-anleitung { margin: 0; padding: 8px 16px 0; }
.tour-anleitung a { display: inline-flex; align-items: center; min-height: 44px; }
.tour-termin > summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 600; }
.tour-besetzung { margin: 12px 0 4px; font-size: 15px; }
.tour-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tour-einsatz { border: 1px solid var(--linie); border-radius: var(--radius-klein); padding: 10px 12px; background: var(--flaeche); min-width: 0; }
.tour-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-width: 0; }
.tour-kopf > *, .tour-einsatz { min-width: 0; overflow-wrap: anywhere; }
.tour-kopf .ort { color: var(--text-2); }
.tour-angaben { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 6px 0 0; }
.tour-gruende { margin: 6px 0 0; padding-left: 18px; }
.tour-mitnehmen, .tour-besuch { margin: 6px 0 0; }
.tour-knoepfe { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; }
/* Nr. 38 (Paket 4): Vorschläge für Reparaturtage; am Handy alles untereinander */
.tag-vorschlag { border: 1px solid var(--linie); border-left: 4px solid var(--gruen); border-radius: var(--radius-klein); padding: 10px 12px; margin: 0 0 12px; background: var(--flaeche); min-width: 0; overflow-wrap: anywhere; }
.tag-vorschlag.tag-knapp { border-left-color: var(--gelb); }
.tag-titel { margin: 0 0 8px; font-size: 16px; }
.tag-halte { list-style: decimal; margin: 0; padding-left: 22px; display: grid; gap: 10px; }
.tag-halt { padding-left: 4px; min-width: 0; }
.tag-summen, .tag-abfahrt { margin: 8px 0 0; }
.etikett.gruen { background: var(--gruen-hell); color: var(--gruen); font-weight: 700; }
.etikett.gelb { background: var(--gelb-hell); color: var(--gelb); font-weight: 700; }
.tag-hinweis { margin: 6px 0 0; padding: 6px 10px; border-left: 4px solid var(--gelb); border-radius: var(--radius-klein); background: var(--gelb-hell); font-size: 14px; }
.tag-quelle { margin-top: 8px; }
.liste-halt { border: 1px solid var(--linie); border-radius: var(--radius-klein); padding: 10px 14px; margin: 0 0 12px; break-inside: avoid; }
.liste-halt h2 { margin: 0 0 4px; font-size: 18px; }
.liste-halt p { margin: 4px 0; overflow-wrap: anywhere; }
.liste-datum { margin: 0 0 12px; font-weight: 600; }
.tag-warnliste { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tag-warnliste .tag-hinweis { margin: 0; }
@media (max-width: 600px) {
  .tour-knoepfe .knopf { flex: 1 1 100%; }
}
/* Außendienst-Termin: Hinweis „schon ein offener Termin“ beim Anlegen, „Termin löschen“ beim Ändern (Vorfall Höfele 29.10.2026) */
.termin-schon-da { margin: 0 0 16px; padding: 10px 14px; border-left: 4px solid var(--gelb); border-radius: var(--radius-klein); background: var(--gelb-hell); font-size: 14px; }
.termin-schon-da p { margin: 0; }
.termin-schon-da p.kopf { display: flex; gap: 6px; align-items: flex-start; }
.termin-schon-da ul + p, .termin-schon-da p + p { margin-top: 8px; }
.termin-schon-da .icon { color: var(--gelb); flex: none; margin-top: 2px; }
.termin-schon-da ul { margin: 8px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.termin-schon-da li .knopf { margin-left: 6px; }
.termin-loeschen { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--linie); }
.termin-loeschen > .hilfe { margin: 0; }
.nav .zaehler, .mehr-blatt .zaehler { margin-left: auto; }  /* Nr. 50: Zahl der Abnahmeprotokolle zu klären */
