/* Auftragskern – Oberfläche */
/* 2.107 (Prüfbericht C, S4): Vierzehn Umbruchpunkte waren es – 560, 700, 720,
   760, 860, 900, 980, 1100, 1150, 1250, 1400, 1439, 1500, 1600. Kein Mensch
   kann sich merken, was bei welcher Breite geschieht, und die Punkte widersprachen
   einander (das Menü brach bei 900 UND 1439, die Dispo bei 980 UND 1250).
   Es sind jetzt sechs Punkte, an denen sich etwas ändert:
     560   Handy hochkant – schmalste Stufe
     700   Handy quer und kleines Tablet
     900   Tablet: Rollrahmen an, klebender Tabellenkopf aus, Menü zweizeilig
           (901 ist die Gegenprobe derselben Grenze)
     1100  kleiner Laptop – Kacheln zweispaltig
     1440  Büro-Laptop: Dispo bekommt ihre zweite Spalte
           (1441 ist die Gegenprobe derselben Grenze)
   Wer eine neue Regel schreibt, nimmt einen dieser Punkte. */
/* 2.107 (Prüfbericht C, S3): Die dunklen Farben standen zweimal wörtlich gleich
   im Regelwerk – einmal unter :root[data-theme="dunkel"], einmal in einer
   Media-Regel für „system“. 34 Marken doppelt: jede Farbänderung musste an
   zwei Stellen gemacht werden, und genau das ging seit 1.80 mehrfach schief.
   Jetzt steht jede Marke EINMAL da, als light-dark(hell, dunkel). Welche Hälfte
   gilt, entscheidet allein „color-scheme“ – und das setzen die drei Regeln
   direkt unter der Leiter aus der Benutzereinstellung (hell / dunkel / system).
   FALLE: Eine Farbe, die nur in einem @media-Block steht, gibt es im anderen
   Zustand nicht. Deshalb nie eine Marke nur dort definieren. */
:root {
  color-scheme: light dark;   /* Vorgabe „system“ – die Regeln unten übersteuern sie */
  --blau: light-dark(#1f3a5f, #7aa7e0);
  --blau-hell: light-dark(#2e4f8b, #9dc0ee);
  --linie: light-dark(#d9dee6, #333a45);
  /* 2.107 (Prüfbericht C, S6): Rahmen von Bedienelementen brauchen nach
     WCAG 1.4.11 einen Kontrast von 3:1 zum Untergrund. --linie hat 1,35:1 –
     das reicht für Trennlinien in Tabellen und Karten, nicht aber für den Rand
     eines Eingabefeldes. Deshalb eine zweite, kräftigere Linie: 3,5:1 auf Weiß,
     3,4:1 auf der dunklen Fläche. Sie gilt NUR für Bedienelemente (Felder,
     leise Knöpfe, Kästchen) – Karten und Tabellen bleiben ruhig. */
  --linie-stark: light-dark(#7f8a9a, #6b7480);
  /* 2.54: Diese vier Namen standen seit 2.47 in vier Seiten, ohne dass es sie
     gab - die Rahmen dort wurden schlicht nicht gezeichnet. Sie zeigen jetzt
     auf die Namen, die es wirklich gibt; weil CSS erst beim Benutzen aufloest,
     folgen sie dem dunklen Thema von selbst. */
  --rand: var(--linie);
  --karte: var(--flaeche);
  --gedaempft: var(--leise);
  --text-leise: var(--leise);
  --grau: light-dark(#f4f6f9, #171a1f);
  --text: light-dark(#22262b, #e4e7ec);
  --leise: light-dark(#5a6472, #98a2b0);   /* 1.72: war #6b7480 - 4,18:1 auf grauen Flaechen, jetzt ueber 4,5:1 */
  --ok: light-dark(#1a7f37, #56c579);
  --warn: light-dark(#b42318, #ff8a7d);
  /* Flächen und Töne, die das dunkle Theme austauscht */
  --flaeche: light-dark(#fff, #1f242b);          /* Karten, Tabellen, Eingabefelder */
  --flaeche2: light-dark(#eef1f6, #262c35);      /* Tabellenkopf */
  --flaeche3: light-dark(#f6f8fb, #2a313b);      /* Zeile unter dem Mauszeiger */
  --gewaehlt: light-dark(#f2f6fc, #2b3646);      /* ausgewählte Kachel */
  --kopf-schrift: light-dark(#dfe6f0, #cfd8e5);
  --kopf-leise: light-dark(#cdd7e4, #aab6c6);
  --plakette-bg: light-dark(#e8ecf3, #2b323c);
  --plakette-text: light-dark(var(--blau), #cfe0f7);
  --ok-bg: light-dark(#eaf6ee, #1c2f24); --ok-rand: light-dark(#bfe3cb, #2f5a3e); --ok-text: light-dark(var(--ok), #7fd79b);
  --warn-bg: light-dark(#fdefee, #33211f); --warn-rand: light-dark(#f2c2bd, #6b3a33); --warn-text: light-dark(var(--warn), #ff9d91);
  --merk-bg: light-dark(#fff6df, #332c18); --merk-rand: light-dark(#eeda9f, #6a5a2c); --merk-text: light-dark(#6b5200, #f0d99a);
  --info-bg: light-dark(#fffbe8, #2e2a1c); --info-rand: light-dark(#e0cf95, #5f5533); --info-text: light-dark(#4a3c07, #ecdcae);
  --schatten: light-dark(rgba(31,58,95,.12), rgba(0,0,0,.5));
  --kopf-bg: light-dark(#1f3a5f, #12171e);
  --knopf-bg: light-dark(#1f3a5f, #3b6ea8);
  --knopf-bg-an: light-dark(#16304f, #4b80bd);
  --knopf-text: #fff;
  --grundschrift: 15px;
  /* 1.82: Eine Leiter statt zweiundzwanzig Einzelentscheidungen. Schrift, Ecken
   und Abstaende kommen ab hier nur noch aus diesen Stufen. */
  --s-mini: 11px; --s-klein: 12.5px; --s-fliess: 13.5px; --s-normal: 15px;
  --s-gross: 17px; --s-titel: 21px; --s-zahl: 26px; --s-riesig: 30px;
  --r-klein: 6px; --r-karte: 10px; --r-pille: 20px;
  --a-1: 2px; --a-2: 4px; --a-3: 6px; --a-4: 8px; --a-5: 10px;
  --a-6: 12px; --a-7: 14px; --a-8: 18px; --a-9: 24px; --a-10: 30px;
  /* 1.80: Plakettenfarben als eigene Marken. Vorher standen die Pastelltoene
     fest im Regelwerk - im dunklen Theme leuchteten sie wie Textmarker auf
     schwarzem Papier. Jetzt tauscht das Theme sie mit. */
  --pl-gelb-bg: light-dark(#fdeed8, #3a2f14);  --pl-gelb-tx: light-dark(#8a5a00, #f0cf85);
  --pl-blau-bg: light-dark(#dcebff, #1b2c44);  --pl-blau-tx: light-dark(#114488, #a3c8f5);
  --pl-lila-bg: light-dark(#e6e0fa, #2b2545);  --pl-lila-tx: light-dark(#4a3a99, #c6b9f5);
  --pl-gruen-bg: light-dark(#dcf3e3, #17301f); --pl-gruen-tx: light-dark(#14632c, #86d8a2);
  --pl-grau-bg: light-dark(#e8ecf3, #2b323c);  --pl-grau-tx: light-dark(#4a5361, #b8c2cf);
  --pl-rot-bg: light-dark(#fbe0dd, #3a201d);   --pl-rot-tx: light-dark(#8f1d12, #ff9d91);
  --pl-sofort-bg: light-dark(#b42318, #7d241c); --pl-sofort-tx: light-dark(#fff, #ffd9d4);
}
/* Welches Thema gilt: die Benutzereinstellung schreibt data-theme an <html>
   (kopf.php). „system“ heißt: das Gerät entscheidet – das ist die Vorgabe oben. */
:root[data-theme="hell"] { color-scheme: light; }
:root[data-theme="dunkel"] { color-scheme: dark; }
:root[data-theme="system"] { color-scheme: light dark; }
/* Kompakte Ansicht: kleinere Schrift und engere Kacheln */
body.kompakt { --grundschrift: 13.5px; }
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: var(--grundschrift); color: var(--text); background: var(--grau);
}
a { color: var(--blau); }

/* Kopf */
.kopf { background: var(--kopf-bg); color: #fff; }
.kopfzeile {
  max-width: none; margin: 0 auto; padding: 0 16px;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap; min-height: 52px;
}
.marke { color: #fff; font-weight: 700; font-size: 17px; text-decoration: none; }
/* 2.107 (C, Ä6): Die Leiste steht in der Fußzeile - der weiße Kasten war nur
   dafür da, dass die Logos auf dunkelblauem Kopfgrund lesbar bleiben. Auf dem
   normalen Seitengrund braucht es ihn nicht (und im dunklen Thema stand er als
   greller weißer Block da). */
.logochips { display: inline-flex; gap: var(--a-4); align-items: center; }
.logochips img { height: 22px; max-width: 96px; object-fit: contain; display: block; }
.auftragslogo { float: right; max-height: 52px; max-width: 220px; object-fit: contain; margin-left: 14px; }
.kopf nav { display: flex; gap: 4px; flex-wrap: wrap; }
.kopf nav a {
  color: var(--kopf-schrift); text-decoration: none; padding: 14px 12px; display: inline-block;
  border-bottom: 3px solid transparent;
}
.kopf nav a:hover { color: #fff; }
.kopf nav a.aktiv { color: #fff; border-bottom-color: #f0a832; }
/* 2.171 (Ticket #175): Ein Knopf zur Dispo-Tafel, direkt links neben dem
   Suchfeld. Er schiebt sich selbst nach rechts, damit die beiden als Paar am
   Ende der Leiste stehen; fehlt er (auf der Tafel selbst oder ohne das Recht),
   übernimmt das Suchfeld diese Aufgabe wie bisher. */
.tafel-knopf {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  color: var(--kopf-schrift); text-decoration: none; font-size: 13.5px;
  padding: 7px 12px; border-radius: 6px; border: 1px solid rgba(255,255,255,.28);
  white-space: nowrap;
}
.tafel-knopf:hover { color: #fff; border-color: rgba(255,255,255,.6); background: rgba(255,255,255,.08); }
.tafel-knopf .ikon { width: 16px; height: 16px; }
.tafel-knopf + .suchfeld { margin-left: 10px; }
/* 2.251 (Ü1): Boten-Chat als Knopf in der Leiste - rechts neben „Dispotafel", vor dem Suchfeld. */
.chat-kopf {
  margin-left: auto; display: inline-flex; align-items: center; justify-content: center; position: relative;
  width: 36px; height: 36px; padding: 0; border-radius: 6px; border: 1px solid rgba(255,255,255,.28);
  background: transparent; color: var(--kopf-schrift); cursor: pointer; flex: 0 0 auto;
}
.chat-kopf svg { width: 20px; height: 20px; }
.chat-kopf:hover, .chat-kopf[aria-expanded="true"] { color: #fff; border-color: rgba(255,255,255,.6); background: rgba(255,255,255,.08); }
.chat-kopf .cb-zahl { position: absolute; top: -7px; right: -7px; min-width: 19px; height: 19px; border-radius: 10px;
  background: #c0392b; color: #fff; font-size: 11.5px; font-weight: 700; line-height: 19px; padding: 0 5px; }
@keyframes ck-blinken { 0%, 49% { background: var(--warn); color: #fff; } 50%, 100% { background: transparent; } }
.chat-kopf.neu { animation: ck-blinken 1.4s step-end infinite; }
.chat-kopf.wink { animation: cb-wink .5s ease-in-out 2; }
.chat-kopf.neu.wink { animation: ck-blinken 1.4s step-end infinite, cb-wink .5s ease-in-out 2; }
@media (prefers-reduced-motion: reduce) { .chat-kopf.neu, .chat-kopf.wink { animation: none; background: var(--warn); } }
.tafel-knopf + .chat-kopf { margin-left: 10px; }
.chat-kopf + .suchfeld { margin-left: 10px; }
.sr-nur { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* Das Fenster hängt dann oben rechts unter der Leiste (top setzt chat-blase.js). */
.chatblase.im-kopf { right: 18px; left: auto; bottom: auto; top: 64px; }
body.seite-postkasten .chatblase.im-kopf { right: 18px; left: auto; }
@media (min-width: 1441px) { body.seite-dispo .chatblase.im-kopf { right: 18px; left: auto; } }
@media print { .chat-kopf { display: none; } }
/* 2.317 (Ticket 238): Preisrechner als Knopf in der Leiste - rechts neben dem Boten-Chat, vor dem Suchfeld. Gleiche Form
   wie der Chat-Knopf. Der Chat-Knopf steht bis zum Freischalten durch chat-blase.js mit [hidden] da: Dann schiebt sich
   dieser Knopf selbst nach rechts - außer „Dispotafel" steht davor und hat das schon getan. */
.preis-kopf {
  margin-left: auto; display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 6px; border: 1px solid rgba(255,255,255,.28);
  color: var(--kopf-schrift); text-decoration: none; flex: 0 0 auto;
}
.preis-kopf svg { width: 20px; height: 20px; }
.preis-kopf:hover { color: #fff; border-color: rgba(255,255,255,.6); background: rgba(255,255,255,.08); }
.tafel-knopf + .preis-kopf, .chat-kopf + .preis-kopf, .tafel-knopf + .chat-kopf[hidden] + .preis-kopf { margin-left: 10px; }
.chat-kopf[hidden] + .preis-kopf { margin-left: auto; }
.preis-kopf + .suchfeld { margin-left: 10px; }
@media print { .preis-kopf { display: none; } }
.suchfeld { margin-left: auto; }
.suchfeld input {
  border: none; border-radius: 6px; padding: 8px 10px; width: 220px; font-size: 15px;
}
.benutzer { display: flex; gap: 10px; align-items: center; font-size: 13.5px; color: var(--kopf-leise); }
.benutzer a { color: var(--kopf-leise); }

/* Inhalt */
/* 2.107 (Prüfbericht C, S5): Ohne Höchstbreite laufen Tabellenzeilen auf einem
   2560er Bildschirm über 2.500 px - fünf Zahlen auf einem Meter Papier. 1900 px
   ist die Grenze, ab der eine Zeile nicht mehr in einem Blick zu lesen ist.
   Die Dispo-Tafel und die Arbeitsplätze BRAUCHEN die Breite (drei Spalten plus
   Beförderer) - sie nehmen sie sich unten ausdrücklich zurück.
   2.107 (C, Ä8): Unten bleibt Platz für die schwebende Chat-Blase, damit sie
   den letzten Knopf einer Seite nicht mehr verdeckt. */
.inhalt { max-width: 1900px; margin: 0 auto; padding: 18px 16px 40px; }
/* Platz unten NUR, wenn die Chat-Blase da ist - sonst wäre auf jeder Seite ohne
   Blase (Anmeldung, Fahrer, Druck) ein leeres Band. */
body:has(.chatblase:not(.im-kopf)) .inhalt { padding-bottom: 76px; }
body.seite-dispo .inhalt, body.seite-karte .inhalt, body.seite-postkasten .inhalt,
body[class*="seite-ap-"] .inhalt, body.seite-leitstand .inhalt { max-width: none; }
h1 { font-size: 21px; margin: 8px 0 14px; color: var(--blau); }
h2 { font-size: 17px; margin: 22px 0 10px; color: var(--blau); }
.fuss { max-width: none; margin: 0 auto; padding: 10px 16px 24px; color: var(--leise); font-size: 12.5px; }

/* Reiter */
.reiter { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 14px; }
.reiter a {
  text-decoration: none; padding: var(--a-4) var(--a-7); border-radius: var(--r-pille);
  background: var(--flaeche); border: 1px solid var(--linie-stark); color: var(--text);
}
.reiter a.aktiv { background: var(--knopf-bg); border-color: var(--knopf-bg); color: var(--knopf-text); }
.reiter .zahl { color: var(--leise); font-size: 12.5px; margin-left: 4px; }
.reiter a.aktiv .zahl { color: var(--kopf-leise); }

/* Filterzeile */
.filter { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
/* 2.107 (Prüfbericht C, Vorschlag 1): Die Dispo-Filter standen auf einem 1280er
   Schirm in DREI Zeilen (132 px). Diese Zeile ist auf eine gebaut:
   kompaktere Bedienelemente, Datum und Tagesstand oben bei der Überschrift,
   und die drei selten geänderten Filter (Firma, Stand, Bote) hinter
   „Weitere Filter“. Sie bleibt umbruchfähig - auf dem Handy wird sie mehrzeilig,
   das ist dort richtig so. */
.filter-eine-zeile { gap: var(--a-3); margin-bottom: var(--a-5); }
.filter-eine-zeile .knopf, .filter-eine-zeile button { padding: var(--a-3) var(--a-6); font-size: var(--s-fliess); }
.filter-eine-zeile .fz-pfeil { padding: var(--a-3) var(--a-5); font-size: var(--s-gross); line-height: 1; }
.filter-eine-zeile select { font-size: var(--s-fliess); padding: var(--a-3) var(--a-4); }
.filter-eine-zeile .fz-zeitraum { max-width: 158px; }
.filter-eine-zeile .fz-datum { display: inline-flex; gap: var(--a-4); align-items: center; }
.filter-eine-zeile .fz-datum input { font-size: var(--s-fliess); padding: var(--a-2) var(--a-3); }
.filter-eine-zeile .katwahl { gap: var(--a-2); }
.filter-eine-zeile .katwahl label { padding: var(--a-2) var(--a-5); font-size: var(--s-klein); }
.filter-rechts { display: inline-flex; gap: var(--a-3); align-items: center; margin-left: auto; }
/* Auswahlfelder in einer einzeiligen Filterleiste bekommen einen Deckel - sonst
   nimmt sich „Alle Auftragsarten“ zweihundert Pixel für ein Wort. */
.filter-eine-zeile select { max-width: 170px; }
.filter-eine-zeile input[type=search] { max-width: 200px; }
/* 2.251 (D1): Auftragssuche in der Filterzeile der Tafel - schmal, wächst beim Tippen */
.filter-eine-zeile .fz-suche { width: 150px; max-width: 260px; font-size: var(--s-fliess); padding: var(--a-3) var(--a-4); transition: width .15s; }
.filter-eine-zeile .fz-suche:focus, .filter-eine-zeile .fz-suche:not(:placeholder-shown) { width: 260px; }
.filter-eine-zeile .filter-rechts .knopf { font-size: var(--s-klein); padding: var(--a-3) var(--a-5); }
.filter-eine-zeile .fz-datum label { white-space: nowrap; }
/* „Weitere Filter“: ein Aufklapper, der ÜBER der Tafel aufgeht statt sie
   herunterzuschieben - dieselbe Bauweise wie die Vorschau (2.62). */
.filter-mehr { position: relative; }
.filter-mehr > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: var(--a-3);
  padding: var(--a-3) var(--a-6); border: 1px solid var(--linie-stark); border-radius: var(--r-klein);
  background: var(--flaeche); color: var(--blau); font-size: var(--s-fliess); white-space: nowrap; }
.filter-mehr > summary::-webkit-details-marker { display: none; }
.filter-mehr > summary::after { content: "▾"; color: var(--leise); }
.filter-mehr[open] > summary { border-color: var(--blau); background: var(--gewaehlt); }
.filter-mehr .fm-klapp { position: absolute; z-index: 50; top: calc(100% + 4px); right: 0; min-width: 260px;
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--r-karte);
  box-shadow: 0 8px 24px var(--schatten); padding: var(--a-5) var(--a-6) var(--a-6); }
.filter-mehr .fm-klapp label { display: block; margin: var(--a-5) 0 var(--a-2); font-size: var(--s-fliess); color: var(--leise); }
.filter-mehr .fm-klapp label:first-child { margin-top: 0; }
.filter-mehr .fm-klapp select { width: 100%; }
/* 2.107 (Prüfbericht C, Ä9): Aufgabenhilfe - zwölf Handgriffe mit Klickfolge. */
.hilfe-aufgaben { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: var(--a-5); align-items: start; }
@media (max-width: 900px) { .hilfe-aufgaben { grid-template-columns: minmax(0, 1fr); } }
.hilfe-aufgabe { margin: 0; padding: var(--a-6) var(--a-7); }
.hilfe-aufgabe > summary { cursor: pointer; font-size: var(--s-normal); color: var(--blau); }
.hilfe-aufgabe[open] > summary { margin-bottom: var(--a-5); border-bottom: 1px solid var(--linie); padding-bottom: var(--a-4); }
.hilfe-aufgabe ol { margin: 0; padding-left: 22px; }
.hilfe-aufgabe ol li { margin: var(--a-3) 0; line-height: 1.45; }

/* 2.107 (Prüfbericht C, Ä12): Buchstabenleiste wie im Telefonbuch. Buchstaben
   ohne Eintrag bleiben stehen (sonst springt die Leiste bei jedem Filter), sind
   aber blass und nicht anklickbar. */
.buchstabenleiste { display: flex; flex-wrap: wrap; gap: var(--a-2); align-items: center; margin: 0 0 var(--a-6); }
.buchstabenleiste a, .buchstabenleiste span.leer {
  display: inline-flex; align-items: center; gap: var(--a-2); min-width: 30px; justify-content: center;
  padding: var(--a-3) var(--a-4); border-radius: var(--r-klein); font-size: var(--s-fliess);
  text-decoration: none; border: 1px solid transparent;
}
.buchstabenleiste a { color: var(--blau); background: var(--flaeche); border-color: var(--linie); }
.buchstabenleiste a:hover { border-color: var(--blau); background: var(--gewaehlt); }
.buchstabenleiste a.an { background: var(--knopf-bg); border-color: var(--knopf-bg); color: var(--knopf-text); }
.buchstabenleiste a.an .klein { color: var(--kopf-leise); }
.buchstabenleiste span.leer { color: var(--leise); opacity: .45; }

/* 2.107 (Prüfbericht C, Ä11): Ein Kasten der Einstellungen, in dem etwas
   geändert, aber noch nicht gespeichert wurde. */
.geaendert-marke { align-self: center; font-size: var(--s-klein); font-weight: 600;
  color: var(--merk-text); background: var(--merk-bg); border: 1px solid var(--merk-rand);
  border-radius: var(--r-pille); padding: var(--a-1) var(--a-5); }

/* 2.107 (Prüfbericht C, Ä10): Das Werkzeugmenü einer Liste - dieselbe Bauweise
   wie „Weitere Filter“ oben, damit es im Programm nur EINE Sorte Klappmenü in
   einer Leiste gibt. */
.werkzeug-menu { position: relative; }
.werkzeug-menu > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: var(--a-3);
  padding: var(--a-3) var(--a-6); border: 1px solid var(--linie-stark); border-radius: var(--r-klein);
  background: var(--flaeche); color: var(--blau); font-size: var(--s-fliess); white-space: nowrap; }
.werkzeug-menu > summary::-webkit-details-marker { display: none; }
.werkzeug-menu > summary::after { content: "▾"; color: var(--leise); }
.werkzeug-menu[open] > summary { border-color: var(--blau); background: var(--gewaehlt); }
.werkzeug-menu .wm-klapp { position: absolute; z-index: 50; top: calc(100% + 4px); right: 0; min-width: 230px;
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--r-karte);
  box-shadow: 0 8px 24px var(--schatten); padding: var(--a-3) 0; display: flex; flex-direction: column; }
.werkzeug-menu .wm-klapp a { display: flex; align-items: center; gap: var(--a-5);
  padding: var(--a-4) var(--a-7); color: var(--text); text-decoration: none; font-size: var(--s-fliess); white-space: nowrap; }
.werkzeug-menu .wm-klapp a:hover { background: var(--gewaehlt); color: var(--blau); }
.werkzeug-menu .wm-klapp .ikon { color: var(--leise); }

/* Überschriftzeile der Dispo: Titel, Tag und Tagesstand nebeneinander. */
.dispo-kopf { gap: var(--a-3) var(--a-7); margin-bottom: var(--a-5); }
/* 2.239 (Ticket #191, WWO): Schieberegler „Online-Auftragsannahme“ in der Kopfzeile der Dispo */
.annahme-schalter { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 0 auto; }
.annahme-schalter .schieber { position: relative; width: 42px; height: 24px; border-radius: 12px; border: 0; padding: 0; cursor: pointer;
  background: #9aa3ad; transition: background .15s ease-out; }
.annahme-schalter .schieber.an { background: #2e9e4f; }
.annahme-schalter .schieber.aus { background: #c94a42; }
.annahme-schalter .schieber:disabled { cursor: default; opacity: .6; }
.annahme-schalter .schieber .knauf { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: left .15s ease-out; }
.annahme-schalter .schieber.an .knauf { left: 21px; }
.annahme-schalter .schieber:focus-visible { outline: 2px solid var(--blau); outline-offset: 2px; }
.dispo-tag { font-size: var(--s-gross); color: var(--text); }
@media (max-width: 700px) { .dispo-tag { font-size: var(--s-normal); } }
.filter select { width: auto; padding: var(--a-3) var(--a-4); border: 1px solid var(--linie-stark); border-radius: var(--r-klein); background: var(--flaeche); color: var(--text); }

/* Tabellen */
/* 1.80: „overflow: hidden“ war nur fuer die runden Ecken da - es macht die
   Tabelle aber zum Rollbehaelter, und darin klebt kein Tabellenkopf mehr.
   Die Ecken runden jetzt die Eckzellen selbst. */
.tabelle { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 10px; }
.tabelle tr:first-child th:first-child, .tabelle tr:first-child td:first-child { border-top-left-radius: 7px; }
.tabelle tr:first-child th:last-child, .tabelle tr:first-child td:last-child { border-top-right-radius: 7px; }
.tabelle th, .tabelle td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--linie); vertical-align: top; }
.tabelle th { background: var(--flaeche2); font-size: 13.5px; color: var(--leise); font-weight: 600; }
.tabelle tr:last-child td { border-bottom: none; }
.tabelle tr:hover td { background: var(--flaeche3); }
.tabelle a.zeile { color: inherit; text-decoration: none; display: block; }
.tabelle .rechts { text-align: right; }
.klein { font-size: 12.5px; color: var(--leise); }

/* Plaketten */
.plakette {
  display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12.5px;
  background: var(--plakette-bg); color: var(--plakette-text); white-space: nowrap;
}
.plakette.offen { background: var(--pl-gelb-bg); color: var(--pl-gelb-tx); }
.plakette.vergeben { background: var(--pl-blau-bg); color: var(--pl-blau-tx); }
.plakette.abgeholt { background: var(--pl-lila-bg); color: var(--pl-lila-tx); }
.plakette.zugestellt { background: var(--pl-gruen-bg); color: var(--pl-gruen-tx); }
.plakette.abgerechnet { background: var(--pl-grau-bg); color: var(--pl-grau-tx); }
.plakette.storniert { background: var(--pl-rot-bg); color: var(--pl-rot-tx); }
.plakette.CT { background: var(--pl-rot-bg); color: var(--pl-rot-tx); } /* City Trans = Rot */
.plakette.CC { background: var(--pl-blau-bg); color: var(--pl-blau-tx); } /* Centro Car = Blau */
/* 2.104: Geschäftsbereich in Kunden und Adressbuch */
.plakette.bereich-kurier { background: var(--pl-blau-bg); color: var(--pl-blau-tx); }
.plakette.bereich-zustellung { background: var(--pl-lila-bg); color: var(--pl-lila-tx); }
.plakette.bereich-spedition { background: var(--pl-gruen-bg); color: var(--pl-gruen-tx); }
/* 2.139: Eine Kündigungswelle im Anfragen-Reiter. Sie ist weder Warnung noch
   Erfolg - sie ist der Vorgang, bei dem am meisten auf dem Spiel steht. */
.plakette.welle { background: var(--pl-lila-bg); color: var(--pl-lila-tx); }
.filter .bereich-wahl { max-width: 220px; margin: 0; }

/* Formulare */
form label { display: block; margin: 10px 0 4px; font-size: 13.5px; color: var(--leise); }
/* 2.107 (Prüfbericht C, S6): Feldrahmen mit --linie hatten 1,35:1 zum Weiß -
   auf einem hellen Bildschirm sah man nicht, wo das Feld anfängt. --linie-stark
   hat 3,5:1 und erfüllt damit WCAG 1.4.11 für Bedienelemente. */
input[type=text], input[type=search], input[type=password], input[type=number], input[type=tel],
input[type=date], input[type=time], input[type=datetime-local], input[type=email], select, textarea {
  width: 100%; padding: 8px 8px; border: 1px solid var(--linie-stark); border-radius: var(--r-klein);
  font-size: 15px; font-family: inherit; background: var(--flaeche); color: var(--text);
}
input[type=checkbox], input[type=radio] { accent-color: var(--blau); }
textarea { min-height: 64px; resize: vertical; }
button, .knopf {
  display: inline-block; background: var(--knopf-bg); color: var(--knopf-text); border: none; border-radius: 6px;
  padding: 8px 18px; font-size: 15px; cursor: pointer; text-decoration: none; font-family: inherit;
}
button:hover, .knopf:hover { background: var(--knopf-bg-an); }
button.leise, .knopf.leise { background: var(--flaeche); color: var(--blau); border: 1px solid var(--linie-stark); }
button.warnknopf { background: var(--warn); }
.knopfzeile { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
/* 2.107 (Prüfbericht C, Ä1): Die Handlungen eines Auftrags stehen oben und
   bleiben beim Scrollen stehen. Vorher lagen sie am Seitenende - jede Änderung
   begann mit 1.700 Pixeln Scrollen (auf dem Handy 3.100).
   FALLE: „sticky“ braucht einen Wert für „top“ UND einen Vorfahren ohne
   overflow. .inhalt hat keinen - deshalb klebt sie am Fensterrand. Der Kopf
   scrollt mit weg, also reicht top:0 mit etwas Luft. */
.knopfzeile.oben {
  position: sticky; top: 0; z-index: 8; margin: 0 0 var(--a-7);
  padding: var(--a-4) 0; background: var(--grau);
  box-shadow: 0 6px 8px -6px var(--schatten);
}
@media print { .knopfzeile.oben { display: none; } }

/* Karten und Spalten */
.karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 10px; padding: 14px 16px; margin-bottom: 14px; }
.spalten { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 22px; }
.spalten3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 22px; }
.spalten4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 22px; }
@media (max-width: 900px) {
  .spalten, .spalten3, .spalten4 { grid-template-columns: minmax(0, 1fr); }
  .suchfeld input { width: 140px; }
}
/* 2.137, Ticket #139: Der Dauerauftrag - links das Wiederkehrmuster und die
   Auftragsdaten, rechts die Ziele untereinander. Wer aus EasyTrans kommt,
   findet sich damit ohne Erklärung zurecht. Unter 1100 Pixeln untereinander. */
.da-raster { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 34px; }
@media (max-width: 1100px) { .da-raster { grid-template-columns: minmax(0, 1fr); } }
.da-ziel legend { font-weight: 600; }
.da-ziel .da-weg { margin-top: 6px; }
.liste tr.ruht td { opacity: .62; }
.warn-plakette { background: var(--warn-bg, #fdeeee); color: var(--warn-text, #8f2323); }

.ok { color: var(--ok-text); background: var(--ok-bg); border: 1px solid var(--ok-rand); padding: 8px 12px; border-radius: 6px; }
.warn { color: var(--warn-text); background: var(--warn-bg); border: 1px solid var(--warn-rand); padding: 8px 12px; border-radius: 6px; }
.hinweis { color: var(--leise); font-size: 13.5px; }

/* Station-Blöcke */
.station { border: 1px solid var(--linie); border-left: 4px solid var(--blau); border-radius: 6px; padding: 10px 12px; margin-bottom: 10px; background: var(--flaeche); }
.station.abholen { border-left-color: #f0a832; }
/* 2.237 (Ticket #189): die dritte Stationsart „Entladen & Laden“ - eigene Farbe, damit sie auf der Karte auffällt */
.station.beides { border-left-color: #8a5fbf; }
.station .stationkopf { display: flex; justify-content: space-between; align-items: center; font-weight: 600; gap: 10px; }
.station .griff { cursor: grab; color: var(--leise); font-size: 17px; user-select: none; padding: 0 6px; }
.station.ziehen { opacity: 0.4; }
.station.ablage-oben { box-shadow: 0 -3px 0 0 var(--blau); }
.stationkopf .kopfknoepfe { display: flex; gap: 8px; align-items: center; }
/* 2.107 (Prüfbericht C, K2): Auf dem Handy war die Auftragsmaske 541 px breit -
   Griff, Nummer, Typ-Auswahl, ▲▼, „Adresse des Auftraggebers“ und „Entfernen“
   standen in EINER Flex-Zeile ohne Umbruch. Die ganze Maske rutschte beim Tippen
   seitlich weg, und „Entfernen“ war nur nach Seitwärtsscrollen erreichbar.
   Unter 700 px bricht die Zeile jetzt um; die Knöpfe stehen dann unter dem Kopf
   und dürfen die volle Breite nehmen. */
@media (max-width: 700px) {
  .station .stationkopf { flex-wrap: wrap; align-items: flex-start; }
  .stationkopf .kopfknoepfe { flex-wrap: wrap; width: 100%; margin-top: var(--a-3); }
  .stationkopf .kopfknoepfe button, .stationkopf .kopfknoepfe .knopf { font-size: var(--s-klein); padding: var(--a-3) var(--a-5); }
  .station select, .station .st-typ { max-width: 100%; }
}

/* Anmeldung */
.anmeldeseite { display: flex; min-height: 100vh; align-items: flex-start; justify-content: center; background: var(--grau); padding: 6vh 16px; }
.anmeldebox { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 10px; padding: 24px 30px 30px; width: 100%; max-width: 380px; }
/* 2.84: Das Anmeldefenster zeigt jetzt alle fuenf Markenlogos - dafuer braucht es Breite. */
.anmeldeseite .anmeldebox:has(.anmeldemarken) { max-width: 460px; }
.anmeldebox h1 { margin-top: 0; }
/* 1.89: Fahrtenwerk-Logo als Kopf des Anmeldefensters, Programmname klein darunter */
.anmeldelogo { margin: 4px 0 14px; text-align: center; }
.anmeldelogo img { width: 100%; max-width: 300px; height: auto; display: inline-block; }
.anmeldebox h1.anmeldename { font-size: 15px; font-weight: 600; text-align: center; margin: 0 0 2px; color: var(--leise); }
/* 2.84: alle Marken beider Firmen im Anmeldefenster, nach Firma gruppiert */
.anmeldemarken { display: flex; flex-direction: column; gap: 14px; margin: 16px 0 22px; }
.anmeldemarken-gruppe { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.anmeldemarken-firma { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--leise); }
.anmeldemarken-reihe { display: flex; gap: 18px; align-items: center; justify-content: center; flex-wrap: wrap; }
.anmeldemarken-reihe img { max-height: 38px; max-width: 150px; height: auto; width: auto; object-fit: contain; }

/* Dispo-Tafel */
/* 2.107 (Prüfbericht C, K1 und Ä5): Die zweite Spalte war 340 px breit und
   brach erst unter 980 px um. Zwischen 1251 und 1440 px blieben für drei
   Kategoriespalten mit je 320 px Mindestbreite nur 890 px - die dritte Spalte
   lief UNTER die Beförderer-Karte und war nicht mehr bedienbar (1280 px ist die
   häufigste Büroauflösung neben 1920). Und unter 980 px stand die Karte am
   Seitenende: Zuteilen hieß 3.000 px scrollen (Ä5).
   Jetzt: nebeneinander erst ab 1441 px, darunter fährt die Beförderer-Karte als
   Schublade von rechts ein - automatisch, sobald ein Auftrag gewählt ist, und
   über den Knopf „Boten“ in der Filterzeile auch ohne Auswahl. */
.dispo { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.dispo-380 { grid-template-columns: minmax(0, 1fr) 380px; }   /* 1.80: war eine Stilangabe
   direkt am Tag - die schlaegt jede Regel, auch die fuers Telefon. */
/* Griff und Schließknopf der Schublade gibt es nur unter 1441 px - darüber
   steht die Karte fest an ihrem Platz. Die Grundregel MUSS vor der
   Media-Regel stehen, sonst gewinnt sie (gleiche Spezifität, später im Text). */
.bef-zu, .bef-auf { display: none; align-items: center; gap: var(--a-3); }
@media (max-width: 1440px) {
  .dispo, .dispo-380 { grid-template-columns: minmax(0, 1fr); }
  .dispo-rechts {
    position: fixed; z-index: 70; top: 0; right: 0; bottom: 0; width: min(390px, 94vw);
    background: var(--grau); border-left: 1px solid var(--linie);
    box-shadow: -8px 0 26px var(--schatten); padding: 10px 12px; overflow-y: auto;
    transform: translateX(103%); visibility: hidden; transition: transform .18s ease-out, visibility .18s;
  }
  body.bef-offen .dispo-rechts { transform: none; visibility: visible; }
  .dispo-rechts .karte { position: static !important; margin-bottom: 0; }
  .bef-zu { display: inline-flex; }
  /* Der Griff, der die Schublade ohne Auswahl öffnet - er steht in der Filterzeile. */
  .bef-auf { display: inline-flex; }
}
@media (prefers-reduced-motion: reduce) { .dispo-rechts { transition: none; } }
.dispo-block {
  margin-bottom: 22px;
  display: grid; grid-template-columns: 1fr; gap: 6px;
}
.dispo-block h2, .dispo-block summary, .dispo-block p { grid-column: 1 / -1; }
.dispo-block h2 { margin: 0; }
.dispo-block summary { cursor: pointer; font-size: 17px; color: var(--blau); margin-bottom: 8px; }
.dispo-block.alt summary { color: var(--warn); }
.zahl-plakette {
  display: inline-block; min-width: 20px; text-align: center; padding: 2px 8px;
  border-radius: 10px; background: var(--plakette-bg); color: var(--plakette-text); font-size: 12.5px; font-weight: 600;
}
.warnzahl { background: var(--warn-bg); color: var(--warn-text); }
.dispo-karte {
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: 10px;
  padding: 8px 12px; cursor: pointer;
}
.dispo-karte:hover { border-color: var(--blau-hell); box-shadow: 0 1px 4px var(--schatten); }
.dispo-karte.gewaehlt { border-color: var(--blau); box-shadow: 0 0 0 2px var(--blau); background: var(--gewaehlt); }
.dk-kopf { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dk-zeit { font-weight: 600; font-size: 13.5px; color: var(--blau); white-space: nowrap; }
.dk-weg { font-size: 13.5px; margin: 5px 0 4px; color: var(--text); }
.dk-fuss { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
/* 2.107 (Prüfbericht C, Vorschlag 1): Die Knopfreihe der Kachel - immer
   dieselben Knöpfe in derselben Reihenfolge, die Haupthandlung immer rechts.
   Vorher standen Angaben und Knöpfe gemischt in einer Zeile, und „Weiter: …“
   sprang je nach Stand des Auftrags an eine andere Stelle. */
.dk-taten { display: flex; gap: var(--a-3); align-items: center; flex-wrap: wrap;
  margin-top: var(--a-3); padding-top: var(--a-3); border-top: 1px dashed var(--linie); }
.dk-taten:empty { display: none; }
.dk-taten form { display: inline; margin: 0; }
.dk-taten .dk-haupttat { margin-left: auto; }
/* 2.57: Der Mitnahme-Hinweis auf der Dispo-Kachel. Bewusst ein Link und keine
   Plakette - er tut etwas, wenn man ihn anklickt, und das soll man sehen. */
.dk-vorschlag {
  font-size: 12.5px; white-space: nowrap; border-radius: 10px; padding: 2px 8px;
  text-decoration: none; background: var(--plakette-bg); color: var(--plakette-text);
  border: 1px solid transparent; font-variant-numeric: tabular-nums;
}
.dk-vorschlag:hover { border-color: var(--blau-hell); }
.dk-vorschlag.eng { background: var(--merk-bg); color: var(--merk-text); }

/* 2.56, Ticket #126: Die Vorschau der nächsten fünf Tage. Eine Zeile je
   Auftrag. Die Spalte ist ihr eigener Messrahmen (container-type) - wird sie
   schmal, verschwinden zuerst die Orte, weil Nummer, PLZ und Fahrzeugart die
   Angaben sind, an denen man den Auftrag wiedererkennt. */
.vs-block > summary { cursor: pointer; }
.vs-block > summary .klein { margin-left: 8px; font-weight: 400; }
.vs-spalte { container-type: inline-size; }
.vs-liste { max-height: 260px; overflow-y: auto; }
.vs-tag {
  font-size: 11.5px; font-weight: 600; color: var(--leise); text-transform: uppercase;
  letter-spacing: .04em; margin: 7px 0 2px; position: sticky; top: 0; background: var(--flaeche);
}
.vs-zeile {
  display: flex; align-items: baseline; gap: 6px; font-size: 12.5px;
  padding: 2px 0; border-bottom: 1px solid var(--linie); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.vs-nr { font-weight: 600; text-decoration: none; font-variant-numeric: tabular-nums; }
.vs-ort-block { color: var(--leise); font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; }
.vs-pfeil { color: var(--leise); }
.vs-fz {
  margin-left: auto; font-size: 11.5px; color: var(--leise);
  background: var(--flaeche2); border-radius: 8px; padding: 0 6px;
}
@container (max-width: 330px) { .vs-ort { display: none; } }

/* 2.56, Ticket #124: Einkauf und Ertrag auf der Dispo-Kachel.
   Der Vorschlag aus der Historie trägt bewusst eine eigene Farbe und ein ~ -
   er ist keine Zusage, sondern eine Erinnerung daran, was das sonst kostet. */
.dk-geld {
  font-size: 12.5px; white-space: nowrap; border-radius: 10px; padding: 2px 8px;
  font-variant-numeric: tabular-nums; background: var(--flaeche2); color: var(--leise);
}
.dk-geld.gut { background: var(--ok-bg); color: var(--ok-text); }
.dk-geld.gelb { background: var(--merk-bg); color: var(--merk-text); }
.dk-geld.rot { background: var(--warn-bg); color: var(--warn-text); font-weight: 600; }
.dk-geld.vorschlag {
  background: transparent; color: var(--blau-hell); border: 1px dashed var(--linie); font-style: italic;
}
.dk-bote {
  background: var(--ok-bg); color: var(--ok-text); border-radius: 10px; padding: 2px 8px;
  font-size: 12.5px; white-space: nowrap;
}
.dk-ort {
  font-size: 12.5px; white-space: nowrap; text-decoration: none; color: var(--ok-text);
  background: var(--ok-bg); border-radius: 10px; padding: 2px 8px;
}
.dk-ort.alt { color: var(--warn); background: var(--warn-bg); }
.dk-knopf {
  padding: 4px 10px; font-size: 12.5px; border-radius: 6px; background: var(--knopf-bg); color: var(--knopf-text);
}
.dk-knopf.leiser { background: var(--flaeche); color: var(--warn); border: 1px solid var(--linie); padding: 4px 8px; }
.dk-fuss form { display: inline; margin: 0; }
/* 2.241 (P3): WhatsApp-Knopf auf der Kachel - neutral, kein Warnrot wie „ד */
.dk-knopf.leiser.dk-wa { color: var(--text); text-decoration: none; }

/* Dispo-Zeilen: eine Zeile je Auftrag mit Namen und Anweisungen */
.dispo-karte.dz {
  display: grid; grid-template-columns: 52px 205px 1fr 150px;
  gap: 4px 12px; align-items: start; padding: 8px 12px;
}
@media (max-width: 1440px) { .dispo-karte.dz { grid-template-columns: 52px 1fr 150px; } .dispo-karte.dz .dz-weg { grid-column: 2 / span 2; } }
.dz-zeit { font-size: 13.5px; color: var(--blau); white-space: nowrap; padding-top: 2px; }
.dz-auftrag { line-height: 1.45; }
.dz-weg { line-height: 1.5; font-size: 13.5px; }
.dz-anm {
  margin-top: 4px; padding: 4px 8px; border-radius: 6px;
  background: var(--merk-bg); border: 1px solid var(--merk-rand); color: var(--merk-text); font-size: 13.5px;
}
.dz-rechts { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: 13.5px; }
.dz-rechts form { display: inline; margin: 0; }
.dz-knoepfe { display: flex; gap: 6px; }

/* Ladezeit-Stempel und automatischer Preisvorschlag */
.stempelzeile { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 8px 0 0; }
input.vorgeschlagen { background: var(--merk-bg); border-color: var(--merk-rand); color: var(--text); }

/* Dispo: Kategorie-Spalten mit Kacheln */
.dispo-kategorien { display: flex; gap: 14px; align-items: flex-start; }
.dispo-kat { flex: 1 1 0; min-width: min(300px, 100%); }
.dispo-kat.kat-breit { min-width: 650px; }
/* 2.107 (C, K1/S4): Die Mindestbreiten hingen an 1500 und 1250 px und passten
   nicht zum Umbruch der Tafel. Jetzt hängt beides am selben Punkt (1440) und
   die Spalten dürfen schmaler werden, statt sich zu überlagern. */
@media (max-width: 1440px) { .dispo-kat.kat-breit { min-width: 300px; } }
@media (max-width: 900px) { .dispo-kategorien { flex-wrap: wrap; } .dispo-kat { min-width: min(300px, 100%); } }
.dispo-kat h2 { margin: 0 0 8px; font-size: 17px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* 2.285 (DG2): min(300px, 100%) - in einer Spalte, die schmaler ist als 300 px, ragte die Kachel sonst 6 bis 10 px über den Rand. */
.kat-kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 8px; align-items: start; }
/* 2.144, Ticket #147: Trennzeile zwischen offenen und vergebenen Aufträgen.
   Muss über die ganze Spaltenbreite gehen, sonst nimmt sie im Raster den Platz
   einer Kachel ein und die Trennung wäre keine. */
.tafel-trenner { grid-column: 1 / -1; margin: 2px 0 0; display: flex; align-items: center; gap: 8px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--leise, #6b7480); }
.tafel-trenner::after { content: ''; flex: 1; height: 1px; background: var(--rand, #dfe3ea); }
.tafel-trenner + .tafel-trenner { margin-top: 0; }
.tafel-trenner.vergeben { margin-top: 10px; }
.dispo-karte.kachel { border-width: 2px; }
.dispo-karte.rand-gelb { border-color: #e6b93c; box-shadow: 0 0 0 1px #e6b93c; }
.dispo-karte.rand-rot { border-color: #c94a42; box-shadow: 0 0 0 1px #c94a42; }

/* Fahrzeugklassen-Etiketten */
.fz-etikett { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.fz-pkw   { background: var(--pl-gruen-bg); color: var(--pl-gruen-tx); }
.fz-kombi { background: var(--pl-blau-bg); color: var(--pl-blau-tx); }
.fz-caddy { background: var(--pl-gelb-bg); color: var(--pl-gelb-tx); }
.fz-bus   { background: var(--pl-lila-bg); color: var(--pl-lila-tx); }
.fz-gross { background: var(--pl-grau-bg); color: var(--pl-grau-tx); }

/* Info-Zeichen mit Schwebefenster (nur Zeigen, kein Klick) */
.info-zeichen { position: relative; cursor: help; color: var(--blau); font-size: 15px; line-height: 1; }
.info-fenster {
  display: none; position: absolute; z-index: 30; left: 0; top: 20px; width: 300px;
  background: var(--info-bg); border: 1px solid var(--info-rand); border-radius: 10px; padding: 8px 12px;
  font-size: 13.5px; color: var(--info-text); box-shadow: 0 3px 12px rgba(0,0,0,.28); white-space: normal; font-weight: 400;
}
.info-zeichen:hover .info-fenster, .info-zeichen:focus .info-fenster { display: block; }
.dispo-hinweis {
  position: sticky; top: 0; z-index: 5; background: var(--merk-bg); border: 1px solid var(--merk-rand);
  color: var(--merk-text); padding: 8px 12px; border-radius: 6px; margin-bottom: 12px; font-size: 15px;
}
.bef-liste { max-height: 62vh; overflow-y: auto; margin-top: 10px; }
/* Schnellerfassung (1.54/1.55) */
.schnellzeile { display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  border-left: 3px solid var(--blau); }
.schnellzeile .ikon { width: 24px; height: 24px; color: var(--blau); flex: none; }
.schnell-quittung { display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  border-left: 3px solid var(--ok); margin-bottom: 12px; }

.schnell-dialog { border: 0; border-radius: 10px; padding: 0; width: min(1020px, 94vw);
  max-height: 88vh; background: var(--flaeche); color: var(--text);
  box-shadow: 0 18px 60px rgba(0,0,0,.3); }
.schnell-dialog::backdrop { background: rgba(15,22,32,.55); }
.schnell-dialog > form { padding: 18px 20px 20px; max-height: 88vh; overflow: auto; }
.schnell-dialog .kopf { display: flex; align-items: center; gap: 12px; margin-bottom: 12px;
  padding-bottom: 10px; border-bottom: 1px solid var(--linie); }
.schnell-dialog .kopf strong { font-size: 17px; }
.schnell-dialog .kopf button { margin-left: auto; }
.schnell-dialog .strecke { cursor: pointer; }
.strecke.fest { cursor: default; margin-bottom: 14px; background: var(--flaeche2); }
.strecke.fest:hover { border-color: var(--linie); }


.strecken { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.strecke { display: flex; align-items: center; gap: 16px; width: 100%; text-align: left;
  padding: 12px 14px; border: 1px solid var(--linie); border-radius: 10px;
  background: var(--flaeche); color: var(--text); cursor: pointer; font-size: 15px; }
.strecke:hover, .strecke:focus-visible { border-color: var(--blau); background: var(--flaeche2); }
.strecke .kunde { flex: none; width: 190px; display: flex; flex-direction: column; gap: 3px;
  border-right: 1px solid var(--linie); padding-right: 14px; }
.strecke .kunde strong { color: var(--blau); line-height: 1.25; }
.strecke .weg { flex: 1; display: grid; grid-template-columns: 1fr auto 1fr; column-gap: 12px; align-items: center; }
.strecke .weg > strong:nth-of-type(1) { grid-column: 1; grid-row: 1; }
.strecke .weg > .klein:nth-of-type(1) { grid-column: 1; grid-row: 2; color: var(--leise); }
.strecke .weg .pfeil { grid-column: 2; grid-row: 1 / span 2; font-size: 21px; color: var(--leise); }
.strecke .weg > strong:nth-of-type(2) { grid-column: 3; grid-row: 1; }
.strecke .weg > .klein:nth-of-type(2) { grid-column: 3; grid-row: 2; color: var(--leise); }
.strecke .rand { flex: none; text-align: right; color: var(--leise); min-width: 108px; }
/* 2.10, Ticket #111: Fahrzeugart des Bauplans - gut sichtbar, damit aus einem
   PKW-Auftrag nicht ungewollt ein Kombi- oder Bus-Auftrag wird. */
.strecke .fahrzeug { color: var(--text); font-weight: 600; }

/* 2.12: Ampel-Checkliste fürs Absegnen - was die Technik schon geprüft hat. */
.checkliste { list-style: none; padding: 0; margin: 0; }
.checkliste li { padding: 1px 0; font-size: 13px; }
.checkliste li.ok { color: var(--ok-text); }
.checkliste li.warn { color: var(--warn-text); font-weight: 600; }
.checkliste li.offen { color: var(--leise); }
@media (max-width: 700px) {
  .strecke { flex-wrap: wrap; align-items: flex-start; gap: 8px; }
  .strecke .kunde { width: 100%; border-right: 0; border-bottom: 1px solid var(--linie); padding: 0 0 6px; }
  .strecke .weg { grid-template-columns: 1fr; }
  .strecke .weg > * { grid-column: 1 !important; grid-row: auto !important; }
  .strecke .rand { text-align: left; }
}


/* Sortierbare Spaltenköpfe (1.56) */
.tabelle th a.sortkopf { color: inherit; text-decoration: none; display: inline-block; white-space: nowrap; }
.tabelle th a.sortkopf:hover { color: var(--blau); text-decoration: underline; }
.tabelle th a.sortkopf.an { color: var(--blau); }

/* Kategorienwahl in der Dispo (1.56, Ticket #32) */
.katwahl { display: inline-flex; gap: 4px; align-items: center; }
.katwahl label { display: inline-flex; align-items: center; gap: 5px; margin: 0; font-weight: 500;
  font-size: var(--s-fliess); padding: var(--a-3) var(--a-6); border: 1px solid var(--linie-stark); border-radius: var(--r-pille);
  background: var(--flaeche); cursor: pointer; white-space: nowrap; }
.katwahl label:hover { border-color: var(--blau); }
.katwahl label.an { background: var(--blau); color: #fff; border-color: var(--blau); }
.katwahl input { width: auto; margin: 0; accent-color: #fff; }

.bef-gruppe { font-size: 12.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--leise); padding: 10px 4px 4px; border-top: 1px solid var(--linie); margin-top: 4px; }
.bef-gruppe:first-child { border-top: 0; margin-top: 0; padding-top: 2px; }
.bef-zeile {
  padding: 8px 10px; border: 1px solid var(--linie); border-radius: 6px; margin-bottom: 6px;
  cursor: pointer; background: var(--flaeche);
}
.bef-zeile:hover { border-color: var(--blau-hell); background: var(--gewaehlt); }

/* Verlauf */
.verlauf { list-style: none; padding: 0; margin: 0; }
.verlauf li { padding: 6px 0; border-bottom: 1px dashed var(--linie); font-size: 13.5px; }
.verlauf li:last-child { border-bottom: none; }
.verlauf .wer { color: var(--leise); }

/* Live-Aktualisierung der Dispo (Ticket #5): neue Aufträge leuchten kurz gelb auf */
@keyframes kachel-neu-glimmen {
  0%   { background-color: #ffe9a8; box-shadow: 0 0 0 3px #e6b93c; }
  60%  { background-color: #fff6dd; box-shadow: 0 0 0 2px #eccf7e; }
  100% { background-color: transparent; box-shadow: none; }
}
.dispo-karte.kachel-neu { animation: kachel-neu-glimmen 6s ease-out; }

/* 2.165 (Wunsch GF): Website-Bestellungen blinken rot, bis das Büro sie bestätigt.
   Langsam (1,6 s) und mit Rand statt Vollfläche - es soll auffallen, nicht flackern. */
@keyframes web-neu-blinken {
  0%, 100% { border-color: #c94a42; box-shadow: 0 0 0 2px #c94a42; background-color: var(--flaeche); }
  50%      { border-color: #ff6a5e; box-shadow: 0 0 0 4px rgba(201, 74, 66, .45); background-color: var(--pl-rot-bg); }
}
.dispo-karte.web-neu { border-color: #c94a42; box-shadow: 0 0 0 2px #c94a42; animation: web-neu-blinken 1.6s ease-in-out infinite; }
.dispo-karte.web-neu.gewaehlt { animation: none; }
.web-neu-form { display: inline; margin: 0; }
.plakette.web-neu { background: #c94a42; color: #fff; border: 0; cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 600; line-height: inherit; }
button.plakette.web-neu:hover { background: #a93a33; }
@media (prefers-reduced-motion: reduce) { .dispo-karte.web-neu { animation: none; } }

/* Kompakte Ansicht (persönliche Einstellung 1.22): mehr auf den Bildschirm */
body.kompakt .inhalt { padding: 12px 12px 30px; }
body.kompakt h1 { font-size: 21px; margin: 6px 0 10px; }
body.kompakt h2 { font-size: 15px; margin: 16px 0 8px; }
body.kompakt .kopf nav a { padding: 12px 8px; }
body.kompakt .karte { padding: 10px 12px; margin-bottom: 10px; }
body.kompakt .tabelle th, body.kompakt .tabelle td { padding: 6px 8px; }
body.kompakt .dispo-karte { padding: 6px 8px; }
body.kompakt .dispo-karte.dz { padding: 6px 8px; }
body.kompakt .kat-kacheln { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px; }
body.kompakt .dispo-kat { min-width: 275px; }
body.kompakt .dispo-block { margin-bottom: 14px; }
body.kompakt .station { padding: 8px 10px; margin-bottom: 8px; }

/* Startseite: frei sortierbare Kacheln (Ticket #12) */
.start-kacheln { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 22px; }
/* 2.107 (Prüfbericht C, Ä19): Ein Rasterfeld ist von sich aus so breit wie sein
   breitestes Kind - eine Tabelle sprengt damit die Spalte, statt in sich zu
   rollen. „min-width: 0“ dreht das um; die Regel dafür steht seit 1.80 weiter
   unten (.spalten > * …), hier kommen nur die Raster dazu, die es seither gibt. */
.hilfe-aufgaben > * { min-width: 0; }
@media (max-width: 1100px) { .start-kacheln { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (max-width: 700px) { .start-kacheln { grid-template-columns: minmax(0, 1fr); } }
.kachel-frei { position: relative; }
.kachel-griff { position: absolute; top: 10px; right: 12px; cursor: grab; color: var(--leise); font-size: 15px; user-select: none; padding: 2px 6px; border-radius: 6px; }
.kachel-griff:hover { background: var(--flaeche2); color: var(--text); }
.kachel-frei.zieht { opacity: .55; outline: 2px dashed var(--blau); }

/* Marke Skynet-TMS mit Version (Tickets #14/#16) */
.kopfzeile .marke { display: inline-flex; align-items: center; gap: 8px; }
.marke-logo { height: 26px; width: 26px; }
.kopfzeile .marke .version { font-size: 12.5px; font-weight: 500; opacity: .8; letter-spacing: .02em; }

/* ===== 1.36 Design: Symbole, Marken, farbige Tafel, Kacheln ===== */
.ikon { width: 1.15em; height: 1.15em; vertical-align: -0.2em; flex: none; }
.kopf nav a { display: inline-flex; align-items: center; gap: 6px; padding: 12px 10px; }
.nav-ikon { width: 17px; height: 17px; opacity: .85; }
.kopf nav a.aktiv .nav-ikon, .kopf nav a:hover .nav-ikon { opacity: 1; }
/* 2.107 (Prüfbericht C, Ä7): Hier standen bis 2.106 drei Regeln, die einander
   aufhoben (1400 aus, 1400 an, 1439 aus, 901 an !important). Wirksam war nur
   die letzte. Es gibt jetzt genau EINE Stelle für die Menü-Beschriftung, weiter
   unten unter „Menü: eine Stelle für die Beschriftung“. */
/* 2.09: Zähler am Menüpunkt "Rechts. Zustellungen" - bleibt auch sichtbar, wenn
   schmale Fenster die Beschriftungen einklappen (deshalb nach der Regel oben). */
.nav-zahl { display: inline-flex; align-items: center; justify-content: center; min-width: 19px; height: 19px;
  padding: 0 5px; border-radius: 999px; font-size: 11.5px; font-weight: 700; line-height: 1;
  background: var(--kopf-chip, rgba(255,255,255,.18)); color: var(--kopf-text, #fff); }
.nav-zahl.hand { background: #c0392b; color: #fff; }
/* 2.179, Ticket #169 (WWO): der gelbe Punkt neben dem roten. Rot = neu
   hereingekommen, gelb = laeuft schon und wartet (Antwort da, Nachfassen
   faellig). Dunkle Schrift, weil Gelb sonst nichts traegt. */
.nav-zahl.wartet { background: #e8a800; color: #2b2200; }
.nav-zahl + .nav-zahl { margin-left: 3px; }
/* 2.107 (Prüfbericht C, Ä6): Die Logoleiste steht jetzt in der Fußzeile, nicht
   mehr im Kopf. Dort braucht sie keinen weißen Kasten auf dunkelblauem Grund
   (der im dunklen Thema stehenblieb) und keine eigenen Umbruchregeln - sie
   bricht wie jeder andere Fließinhalt um. */
.fuss .logochips { display: inline-flex; flex-wrap: wrap; align-items: center;
  gap: var(--a-5); margin-left: var(--a-6); vertical-align: middle;
  /* Die Logos sind für hellen Grund gezeichnet - im dunklen Thema brauchen sie
     eine helle Unterlage, sonst verschwinden sie. Hell bleibt sie unsichtbar. */
  background: light-dark(transparent, #e9edf3); border-radius: var(--r-klein);
  padding: var(--a-2) var(--a-4); }
.fuss .logochips img { height: 20px; max-width: 74px; width: auto; opacity: .85; }
.fuss .logochips a:hover img { opacity: 1; }
/* 2.102 (Pruefbericht Ae8): Auf dem Handy brach die Logoleiste nicht um und
   machte jede Seite 417 px breit - waagerechtes Scrollen bei jeder Geste.
   Der Riegel gegen waagerechtes Scrollen bleibt; breite Tabellen rollen seit
   2.107 in sich selbst (K6), sie brauchen ihn nicht mehr. */
@media (max-width: 560px) {
  .fuss .logochips { margin-left: 0; margin-top: var(--a-4); }
  .fuss .logochips img { height: 17px; max-width: 58px; }
  body { overflow-x: hidden; }
}
.suchfeld { display: flex; align-items: center; position: relative; }
.such-ikon { position: absolute; left: 9px; width: 15px; height: 15px; color: #6b7480; pointer-events: none; }
.suchfeld input { padding-left: 30px; }
.benutzer a { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; }
.benutzer a:hover { color: #fff; }

/* Überschriften mit Symbol */
h1 .ikon, h2 .ikon { width: 1.05em; height: 1.05em; margin-right: 6px; color: var(--blau); }
.karte > h2:first-child, .karte > h2.mit-ikon { display: flex; align-items: center; gap: 8px; }

/* Dispo-Tafel: jede Spalte in ihrer Farbe (Kurier blau, Zustellung rot, Spedition grün, Sonstiges grau) */
/* 2.107 (Prüfbericht C, S3): auch hier standen dieselben acht Farben dreimal. */
:root { --kat-kurier: light-dark(#2e5fa8, #8fb4ec); --kat-zustellung: light-dark(#b42318, #ff9d91);
  --kat-spedition: light-dark(#1e7f4f, #7fd79b); --kat-dienstleistung: light-dark(#5b6572, #aab6c6);
  --kat-kurier-bg: light-dark(#eef3fb, #1c2738); --kat-zustellung-bg: light-dark(#fbeeed, #33211f);
  --kat-spedition-bg: light-dark(#eaf5ef, #1b2f24); --kat-dienstleistung-bg: light-dark(#f0f2f5, #262c35); }
.dispo-kat { border-radius: 10px; padding: 10px 10px 6px; background: var(--kat-bg, transparent); border-top: 4px solid var(--kat-farbe, var(--linie)); }
.dispo-kat.kat-kurier { --kat-farbe: var(--kat-kurier); --kat-bg: var(--kat-kurier-bg); }
.dispo-kat.kat-zustellung { --kat-farbe: var(--kat-zustellung); --kat-bg: var(--kat-zustellung-bg); }
.dispo-kat.kat-spedition { --kat-farbe: var(--kat-spedition); --kat-bg: var(--kat-spedition-bg); }
.dispo-kat.kat-dienstleistung { --kat-farbe: var(--kat-dienstleistung); --kat-bg: var(--kat-dienstleistung-bg); }
.dispo-kat h2 { color: var(--kat-farbe, var(--blau)); }
.dispo-kat h2 .ikon { width: 20px; height: 20px; color: var(--kat-farbe, var(--blau)); margin: 0; }
.dispo-kat h2 .zahl-plakette { background: var(--kat-farbe, var(--blau)); color: #fff; }
.dispo-karte.kachel { border-left: 5px solid var(--kat-farbe, var(--linie)); }
.dispo-karte.kachel[data-bereich="kurier"] { --kat-farbe: var(--kat-kurier); }
.dispo-karte.kachel[data-bereich="zustellung"] { --kat-farbe: var(--kat-zustellung); }
.dispo-karte.kachel[data-bereich="spedition"] { --kat-farbe: var(--kat-spedition); }
.dk-kopf .art-ikon { width: 18px; height: 18px; color: var(--kat-farbe, var(--blau)); }
.dispo-karte.rand-gelb, .dispo-karte.rand-rot { border-left-width: 5px; }
.bef-zeile.ohne-bereich { opacity: .45; }
.bef-zeile .bereich-punkte { float: right; display: inline-flex; gap: 3px; margin-top: 3px; }
/* 2.107 (Prüfbericht C, Ä4): Worte statt Farbpunkte. Die Farbe bleibt als
   zweites Merkmal - Farbe ALLEIN darf nie die einzige Auskunft sein. */
.bef-zeile .bereich-worte { float: right; display: inline-flex; flex-wrap: wrap; gap: 3px; margin: 2px 0 0 6px; }
.bereich-worte .bw { font-size: var(--s-mini); font-weight: 600; line-height: 1.5;
  padding: 0 var(--a-3); border-radius: var(--r-pille); background: var(--plakette-bg); color: var(--plakette-text); white-space: nowrap; }
.bereich-worte .bw.kurier { background: var(--kat-kurier-bg); color: var(--kat-kurier); }
.bereich-worte .bw.zustellung { background: var(--kat-zustellung-bg); color: var(--kat-zustellung); }
.bereich-worte .bw.spedition { background: var(--kat-spedition-bg); color: var(--kat-spedition); }
.bereich-worte .bw.keine { background: var(--warn-bg); color: var(--warn-text); }
.bereich-punkt { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: var(--linie); }
.bereich-punkt.kurier { background: var(--kat-kurier); } .bereich-punkt.zustellung { background: var(--kat-zustellung); } .bereich-punkt.spedition { background: var(--kat-spedition); }

/* Startseite: Kacheln mit Symbol und großer Zahl */
.kachel-frei > h2:first-of-type { display: flex; align-items: center; gap: 8px; margin-top: 0; }
.kennzahlen { display: flex; gap: 16px; flex-wrap: wrap; margin: 4px 0 12px; }
.kennzahl { display: flex; flex-direction: column; min-width: 78px; padding: 8px 12px; border-radius: 10px; background: var(--flaeche2); }
.kennzahl strong { font-size: 26px; line-height: 1.1; color: var(--blau); font-weight: 700; }
.kennzahl span { font-size: 12.5px; color: var(--leise); }
.kennzahl.warn strong { color: var(--warn-text); }
.kennzahl.ok strong { color: var(--ok-text); }
.kennzahl.offen strong { color: #b26a00; }
.kennzahl.unterwegs strong { color: #4a3a99; }

/* Knöpfe mit Symbol */
button .ikon, .knopf .ikon { width: 1.05em; height: 1.05em; margin-right: 5px; }

/* Plaketten mit Symbol der Auftragsart */
.plakette .ikon { width: 13px; height: 13px; vertical-align: -2px; margin-right: 3px; }
body.kompakt .kennzahl strong { font-size: 21px; }
body.kompakt .dispo-kat { padding: 6px 6px 4px; }
/* Kopf in zwei festen Zeilen: Marke + Suche + Benutzer, darunter die Navigation */
.kopfzeile { min-height: 0; padding-top: 6px; row-gap: 0; }
.kopf nav { flex: 1 0 100%; order: 10; border-top: 1px solid rgba(255,255,255,.12); margin-top: 6px; }
.kopf nav a { padding: 10px 12px; }
.suchfeld { margin-left: auto; }
.suchfeld input { padding: 6px 10px 6px 30px; }
body.kompakt .kopf nav a { padding: 8px 8px; }
/* 1.42: Zahlenspalten nicht umbrechen, Menü etwas enger (mehr Punkte) */
/* 2.107 (C, K5): „nowrap“ gilt nur noch für Zellen, die wirklich nur Zahlen
   tragen. Eine Zelle mit erklärendem Text bekommt zusätzlich „umbruch“. */
.tabelle td.rechts, .tabelle th.rechts { white-space: nowrap; font-variant-numeric: tabular-nums; }
.tabelle td.rechts.umbruch, .tabelle th.rechts.umbruch { white-space: normal; }
.kopf nav a { padding: 10px 8px; }
/* 1.44: Live-Suche für Kunden und Beförderer */
.sucher { position: relative; display: block; }
.sucher > input { width: 100%; }
.sucher .treffer {
  position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 3px);
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: 10px;
  box-shadow: 0 6px 20px var(--schatten); max-height: 320px; overflow-y: auto;
}
.sucher .treffer div.t {
  padding: 8px 12px; cursor: pointer; border-bottom: 1px solid var(--linie); font-size: 15px; line-height: 1.35;
}
.sucher .treffer div.t:last-child { border-bottom: none; }
.sucher .treffer div.t:hover, .sucher .treffer div.t.an { background: var(--gewaehlt); }
.sucher .treffer div.t strong { display: block; font-weight: 600; }
.sucher .treffer div.t span { color: var(--leise); font-size: 12.5px; }
.sucher .treffer div.t .nr { font-family: ui-monospace, "SFMono-Regular", monospace; color: var(--blau); }
.sucher .treffer div.t.inaktiv strong { opacity: .6; }
.sucher .treffer p.leer { margin: 0; padding: 10px 12px; font-size: 13.5px; color: var(--leise); }
/* 2.319 (Flo 16.11.2026: „Immer darunter"): ähnlich geschriebene Kunden - abgesetzt unter den genauen Treffern.
   Gilt für jede Trefferliste (Auftragsmaske, Dauerauftrag, Arbeitsplatz) und für die Kundenliste. */
.treffer p.aehnlich-kopf { margin: 0; padding: 5px 12px 3px; font-size: 11px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--leise); background: var(--flaeche2); border-top: 1px solid var(--linie); border-bottom: 1px solid var(--linie); }
.treffer p.leer + p.aehnlich-kopf { border-top: none; }
.treffer div.t.aehnlich strong { font-weight: 500; }
.aehnlich-block { margin: 14px 0 0; }
.aehnlich-block h2 { font-size: 15px; margin: 0 0 2px; }
.aehnlich-block .klein { margin: 0 0 8px; }

/* 1.45: Adress-Suche an den Stationen – die Liste schwebt unter dem Feld,
   damit sie in dynamisch ergänzten Zielen ohne eigenes Gerüst funktioniert. */
.treffer.schwebend {
  position: absolute; z-index: 60;
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: 10px;
  box-shadow: 0 6px 20px var(--schatten); max-height: 320px; overflow-y: auto;
}
.treffer.schwebend div.t {
  padding: 8px 12px; cursor: pointer; border-bottom: 1px solid var(--linie);
  font-size: 15px; line-height: 1.35;
}
.treffer.schwebend div.t:last-child { border-bottom: none; }
.treffer.schwebend div.t:hover, .treffer.schwebend div.t.an { background: var(--gewaehlt); }
.treffer.schwebend div.t strong { display: block; font-weight: 600; }
.treffer.schwebend div.t span { color: var(--leise); font-size: 12.5px; }
.treffer.schwebend p.leer { margin: 0; padding: 10px 12px; font-size: 13.5px; color: var(--leise); }
.marke-eigen, .marke-frei {
  display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 10px;
  font-size: 11px; font-weight: 600; vertical-align: 1px;
}
.marke-eigen { background: var(--blau); color: #fff; }
.marke-frei { background: var(--gewaehlt); color: var(--leise); }

/* Adressbuch-Pflege */
.ab-liste td.klein { font-size: 12.5px; color: var(--leise); }
.ab-zuordnung { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

/* 1.46: Auftragsvorlagen */
.vorlagenleiste {
  display: flex; flex-wrap: wrap; gap: 7px; align-items: center;
  margin: 2px 0 14px;
}
.vorlagenleiste > .klein { color: var(--leise); margin-right: 2px; }
.knopf.vorlage-knopf { padding: 6px 12px; font-size: 13.5px; }
.knopf.vorlage-knopf .klein { color: var(--leise); font-weight: 400; }
.vorlagen-liste td.klein { color: var(--leise); font-size: 12.5px; }

/* 1.47: Sofortauftrag – ohne Zeitfenster angenommen */
.plakette.sofort { background: var(--pl-sofort-bg); color: var(--pl-sofort-tx); }
/* 2.283: „ohne Uhrzeit“ - der Kunde hat keine genannt. Gestrichelt und leise: es fehlt nichts, es ist nur offen.
   Bewusst KEINE Signalfarbe - das ist weder eilig (ab sofort) noch ein Fehler. */
.plakette.ohne-uhrzeit { background: transparent; color: var(--text); border: 1px dashed var(--leise); }
.ap-vkopf .ap-ohne-uhrzeit { margin-left: 4px; }
.dk-ohne-uhrzeit { font-weight: 500; font-size: 12px; color: var(--text); border: 1px dashed var(--leise); border-radius: 9px; padding: 0 6px; white-space: nowrap; }
.ap-z-ohne { display: block; width: 46px; font-size: 10.5px; font-weight: 600; line-height: 1.1; color: var(--leise); white-space: normal; }
body.seite-arbeitsplatz .ap-z-zeit.ohne { grid-row: 1 / span 2; }

/* 2.117: „Beleg fehlt" – CMR oder Lieferschein liegt noch nicht vor. Kein
   Grund, den Auftrag anzuhalten (Entscheidung GF), aber einer, ihn zu sehen. */
.plakette.beleg { background: light-dark(#fdeeee, #3b1d1d); color: light-dark(#8f2323, #ffb4ac);
  border: 1px solid light-dark(#eec3c3, #6b2f2f); font-weight: 700; }

/* 2.119: Angenommene Angebote – der grüne Rand sagt: hier liegt Geld auf dem
   Tisch, das nur noch zum Auftrag werden muss. Er stand seit 2.111 im Quelltext
   von anfragen.php, ohne dass es je eine Regel dazu gab. */
.angenommen-karte { border-left: 5px solid light-dark(#1e7f4f, #2f9e6a); }
.angenommen-karte h2 { color: light-dark(#1e5c1e, #a8e0ad); }

/* 2.117 (Wunsch GF): Das gewünschte Zustelldatum der Anfrage soll herausstechen.
   Der Abstand zum heutigen Tag bestimmt, wie laut die Plakette ist – und ein
   FEHLENDES Datum ist selbst eine Meldung, keine Leerstelle. */
.termin { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700;
  padding: 5px 12px; border-radius: 8px; border: 1px solid transparent; line-height: 1.25;
  font-variant-numeric: tabular-nums; }
.termin::before { content: "📅"; font-size: 13px; }
.termin-heute, .termin-morgen, .termin-vorbei {
  background: light-dark(#b42318, #7d241c); color: #fff; border-color: light-dark(#8f1c13, #a03329); }
.termin-vorbei::before { content: "⚠"; }
.termin-bald { background: light-dark(#fff4e0, #4a3a12); color: light-dark(#7a4d00, #ffd98a);
  border-color: light-dark(#e8c98a, #6b5520); }
.termin-spaeter { background: light-dark(#eef3fa, #23303f); color: light-dark(#1f3a5f, #cfe0f5);
  border-color: light-dark(#c6d5e8, #38495f); }
.termin-fehlt { background: light-dark(#fff8e1, #423a1c); color: light-dark(#7a5c00, #ffe08a);
  border-color: light-dark(#e5cf8a, #5f5426); }
.termin-fehlt::before { content: "?"; font-weight: 700; }
.termin-hinweis { margin: 10px 0 0; padding: 9px 12px; border-radius: 8px; font-size: 14px;
  background: light-dark(#fdeeee, #3b1d1d); color: light-dark(#8f2323, #ffb4ac);
  border: 1px solid light-dark(#eec3c3, #6b2f2f); }
.termin-hinweis.offen { background: light-dark(#fff8e1, #423a1c); color: light-dark(#7a5c00, #ffe08a);
  border-color: light-dark(#e5cf8a, #5f5426); }
/* 2.136: Knöpfe, die zusammengehören, bleiben beim Umbrechen zusammen. Ohne
   das rutschte der Zwischenbescheid neben „Verwerfen" und „Löschen" - und stand
   damit optisch bei den Knöpfen, die etwas wegnehmen, statt bei dem, der etwas
   tut. `.rechts` schiebt das Gefährliche ans Ende der Zeile. */
.knopfgruppe { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.knopfgruppe.rechts { margin-left: auto; }
.knopfgruppe .freiwillig { font-weight: 400; color: var(--leise); }

/* 2.136: Die Zeile unter einer Anfrage, an der ein Zwischenbescheid hängt -
   wann er hinausging und welchen spätesten Termin der Kunde genannt hat. Sie
   steht bewusst abgesetzt unter dem Angebotsformular, nicht darin: Der Termin
   wird zu einem anderen Zeitpunkt eingetragen als der Preis. */
.zwischenzeile { display: flex; align-items: flex-end; gap: 10px 14px; flex-wrap: wrap;
  margin: 10px 0 0; padding: 9px 12px; border-radius: 8px;
  background: light-dark(#f3f6fb, #23303f); border: 1px solid light-dark(#dbe4f0, #33465c); }
.zwischenzeile label { display: flex; flex-direction: column; gap: 3px; }
.zwischenzeile input[type="date"] { min-height: 32px; padding: 3px 8px; }
.zwischenzeile > span.klein { align-self: center; }

.betrieb-kachel { border-left: 4px solid var(--blau); }
.betrieb-hinweis { color: var(--leise); font-size: 12.5px; margin: 4px 0 0; }
.stundenbalken { display: flex; align-items: flex-end; gap: 4px; height: 120px; margin: 10px 0 4px; }
.stundenbalken > div { flex: 1; background: var(--blau); border-radius: 6px 3px 0 0; min-height: 2px; position: relative; }
.stundenbalken > div span { position: absolute; bottom: -18px; left: 0; right: 0; text-align: center; font-size: 11px; color: var(--leise); }

/* 1.47: Ein Element mit hidden-Attribut muss verschwinden – sonst gewinnt die
   display-Regel der Klasse (z. B. .plakette) gegen das Standardverhalten. */
[hidden] { display: none !important; }

/* 1.48: Training */
.spielwahl { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.spielkachel { margin: 0; }
.spielkachel h3 { font-size: 15px; }
#spiel-auswahl .knopf { width: 100%; }

/* 1.49: Substatus */
.plakette.sub-grau  { background: var(--pl-grau-bg); color: var(--pl-grau-tx); }
.plakette.sub-gelb  { background: var(--pl-gelb-bg); color: var(--pl-gelb-tx); }
.plakette.sub-rot   { background: var(--pl-rot-bg); color: var(--pl-rot-tx); }
.plakette.sub-blau  { background: var(--pl-blau-bg); color: var(--pl-blau-tx); }
.plakette.sub-gruen { background: var(--pl-gruen-bg); color: var(--pl-gruen-tx); }
.plakette.sub-lila  { background: var(--pl-lila-bg); color: var(--pl-lila-tx); }
.plakette.sub-faellig { outline: 2px solid var(--warn); outline-offset: 1px; }
.sub-menu { display: inline-block; position: relative; }
.sub-menu > summary { cursor: pointer; list-style: none; padding: 0 6px; color: var(--leise); font-size: 13.5px; }
.sub-menu > summary::-webkit-details-marker { display: none; }
.sub-menu[open] > summary { color: var(--blau); }
.sub-form {
  position: absolute; right: 0; z-index: 50; width: 290px; padding: 10px;
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: 10px;
  box-shadow: 0 6px 20px var(--schatten); display: flex; flex-direction: column; gap: 6px;
}
.sub-form select, .sub-form input { width: 100%; }
/* 2.104: Beschriftung über dem Feld, nicht daneben - und Fließtext trotz nowrap der Zelle */
.sub-form { white-space: normal; text-align: left; }
.sub-form label { display: flex; flex-direction: column; gap: 2px; }

/* ============================================================
   1.57 – Spielereien
   Alles hier ist rein optisch. Der Block ganz unten schaltet jede
   Bewegung ab, sobald das Gerät „Bewegung reduzieren“ meldet.
   ============================================================ */

/* ---- Sprungfeld (Strg + K) ---- */
.sprung-dialog {
  width: min(640px, 92vw); max-height: 74vh; padding: 0; border: 1px solid var(--linie);
  border-radius: 10px; background: var(--flaeche); color: var(--text);
  box-shadow: 0 24px 60px rgba(0,0,0,.28); overflow: hidden;
}
.sprung-dialog::backdrop { background: rgba(16,22,32,.45); }
.sprung-kopf { display: flex; gap: 8px; align-items: center; padding: 12px; border-bottom: 1px solid var(--linie); }
.sprung-kopf input { flex: 1; font-size: 17px; padding: 10px 12px; margin: 0; }
.sprung-kopf .leise { padding: 8px 12px; white-space: nowrap; }
.sprung-liste { max-height: 52vh; overflow-y: auto; }
.sprung-gruppe {
  padding: 8px 14px 4px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--leise); background: var(--flaeche3); position: sticky; top: 0;
}
.sprung-zeile {
  display: flex; gap: 10px; align-items: baseline; padding: 8px 14px;
  color: inherit; text-decoration: none; border-bottom: 1px solid var(--linie);
}
.sprung-zeile:last-child { border-bottom: 0; }
.sprung-zeile.an { background: var(--gewaehlt); box-shadow: inset 3px 0 0 var(--blau); }
.sprung-name { font-weight: 600; }
.sprung-zusatz { color: var(--leise); font-size: 13.5px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sprung-stand { padding: 8px 14px; font-size: 12.5px; color: var(--leise); border-top: 1px solid var(--linie); background: var(--flaeche3); }
.fuss-tipp { color: inherit; opacity: .75; }
.fuss-tipp a { color: inherit; }
@media (max-width: 700px) { .fuss-tipp { display: none; } }

/* ---- Ladebalken ---- */
.ladebalken { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 9999; pointer-events: none; }
.ladebalken > i { display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--blau-hell), #58c3ff);
  box-shadow: 0 0 8px rgba(88,195,255,.7); transition: width .25s ease-out; }
.ladebalken.fertig { opacity: 0; transition: opacity .3s ease .1s; }

/* ---- Haken, der sich selbst zeichnet ---- */
.haken { width: 19px; height: 19px; flex: 0 0 auto; vertical-align: -4px; margin-right: 7px; }
.haken circle { fill: none; stroke: currentColor; stroke-width: 1.6; opacity: .3; }
.haken path { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 18; stroke-dashoffset: 18; animation: haken-zeichnen .45s ease-out .05s forwards; }
.haken.still path { stroke-dashoffset: 0; animation: none; }
@keyframes haken-zeichnen { to { stroke-dashoffset: 0; } }

/* ---- Fortschrittsring in der Dispo ---- */
.tagesstand { display: inline-flex; align-items: center; gap: 10px; padding-left: 2px; }
.tagesring { position: relative; width: 46px; height: 46px; flex: 0 0 auto; }
.tagesring svg { width: 46px; height: 46px; transform: rotate(-90deg); overflow: visible; }
.tagesring circle { fill: none; stroke-width: 3.2; }
.tagesring .ring-bett { stroke: var(--linie); }
.tagesring .ring-wert { stroke: var(--blau); stroke-linecap: round;
  transition: stroke-dasharray .8s cubic-bezier(.22,.9,.3,1); }
.tagesring .ring-wert.voll { stroke: var(--ok); }
.tagesring b { position: absolute; inset: 0; display: flex; align-items: baseline; justify-content: center;
  font-size: 15px; font-weight: 700; line-height: 46px; }
.tagesring b small { font-size: 11px; font-weight: 500; opacity: .65; margin-left: 1px; }
.tageszahlen b { font-weight: 700; }
.tageszahlen .z-offen { color: var(--warn); }
.tageszahlen .z-unterwegs { color: var(--blau); }
.tageszahlen .z-fertig { color: var(--ok); }

/* ---- Tagesuhr ---- */
.tagesuhr { margin: 20px 0 14px; padding: 0 2px; }
.tu-band { position: relative; height: 20px; border-radius: 10px; background: var(--flaeche2);
  border: 1px solid var(--linie); }
.tu-vorbei { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 10px 0 0 10px;
  background: var(--flaeche3); transition: width .6s ease; }
.tu-striche { position: absolute; inset: 0; }
.tu-striche i { position: absolute; top: 5px; width: 3px; height: 10px; border-radius: 6px;
  background: var(--leise); transform: translateX(-1px); }
.tu-striche i.offen { background: var(--blau); }
.tu-striche i.vergeben { background: #8a94a3; }
.tu-striche i.abgeholt { background: var(--ok); }
.tu-striche i.spaet { background: var(--warn); height: 16px; top: 2px; }
.tu-zeiger { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--warn);
  transition: left .6s ease; }
.tu-zeiger span { position: absolute; top: -16px; left: 50%; transform: translateX(-50%);
  font-size: 11px; font-weight: 700; color: var(--warn); background: var(--flaeche);
  padding: 0 4px; border-radius: 6px; white-space: nowrap; }
.tu-stunden { position: relative; height: 15px; margin-top: 2px; }
.tu-stunden span { position: absolute; transform: translateX(-50%); font-size: 11px; color: var(--leise); }
.tu-stunden span:first-child { transform: none; }
.tu-stunden span:last-child { transform: translateX(-100%); }
@media (max-width: 700px) { .tagesuhr { display: none; } }

/* ---- „Wussten Sie schon?“ ---- */
.karte.wusstest { border-left: 4px solid var(--merk-rand); }
.wusst-titel { margin: 6px 0 2px; font-size: 12.5px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--leise); }
.wusst-wert { margin: 0 0 6px; font-size: 21px; font-weight: 700; line-height: 1.25; }
.wusst-text { margin: 0; color: var(--leise); }

/* ---- Ruhe, wenn das Gerät es verlangt ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; scroll-behavior: auto !important;
  }
  .haken path { stroke-dashoffset: 0; }
}
body.keine-spielerei .ladebalken { display: none; }
body.keine-spielerei .haken path { stroke-dashoffset: 0; animation: none; }
body.keine-spielerei .tagesring .ring-wert,
body.keine-spielerei .tu-vorbei,
body.keine-spielerei .tu-zeiger { transition: none; }

/* 1.58 – Telefonnummern (Ticket #39): Leitungswahl beim Klick.
   Steht nicht fest, über welche Firma angerufen wird, hängen zwei kleine
   Leitungsknöpfe an der Nummer. */
.tel-wahl { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.tel-wahl .tel-nr { color: var(--text); }
a.tel-leitung {
  display: inline-block; min-width: 22px; padding: 2px 6px; border-radius: 6px;
  font-size: 11px; font-weight: 700; line-height: 1.5; text-align: center;
  text-decoration: none; border: 1px solid var(--linie); color: var(--leise);
  background: var(--flaeche2);
}
a.tel-leitung:hover { color: #fff; border-color: transparent; }
a.tel-leitung.firma-cc:hover { background: #1f3a5f; }   /* Centro Car */
a.tel-leitung.firma-ct:hover { background: #b42318; }   /* City Trans */

/* 1.62, Ticket #44: von Hand richtiggestellte Arbeitszeit */
.zeit-stift { color: var(--blau); font-weight: 700; margin-left: 4px; cursor: help; }

/* Ticket #48: Auge am Passwortfeld */
.pw-huelle { position: relative; display: block; }
.pw-huelle > input { padding-right: 40px; width: 100%; box-sizing: border-box; }
.pw-auge {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; padding: 0; margin: 0; border: 0; background: none;
  color: var(--leise, #6b7280); cursor: pointer; display: flex;
  align-items: center; justify-content: center; border-radius: 6px;
}
.pw-auge:hover { color: var(--text, #111); background: rgba(0,0,0,.06); }
.pw-auge:focus-visible { outline: 2px solid var(--rand-aktiv, #2563eb); outline-offset: 1px; }

/* Ticket #47: Warnung vor Doppelanlage */
.dub-warnung { border-left: 4px solid var(--warn, #c2410c); }
.dub-warnung h2.warn { color: var(--warn, #c2410c); }
.dub-warnung table { margin-top: 10px; }

/* Ticket #50: Logo als Verweis auf die Website der Marke */
.marken-verweis { display: inline-flex; align-items: center; text-decoration: none; }
.logochips a { display: inline-flex; align-items: center; border-radius: 6px; }
.logochips a:hover img, .marken-verweis:hover img { filter: brightness(1.08); }

/* Ticket #53: Flamme für eilige Aufträge (Zustellfrist unter zwei Stunden) */
.flamme { font-size: 15px; line-height: 1; cursor: help; filter: saturate(1.2); }
.flamme-ueberfaellig { animation: flamme-pochen 1.6s ease-in-out infinite; }
@keyframes flamme-pochen { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .55; transform: scale(1.14); } }
@media (prefers-reduced-motion: reduce) { .flamme-ueberfaellig { animation: none; opacity: 1; } }
body.keine-spielerei .flamme-ueberfaellig { animation: none; }

/* Ticket #49: Notizen */
.notiz-flaeche { display: grid; grid-template-columns: 300px 1fr; gap: 16px; align-items: start; }
@media (max-width: 900px) { .notiz-flaeche { grid-template-columns: 1fr; } }
.notiz-spalte { display: flex; flex-direction: column; gap: 8px; }
.notiz-zettel {
  display: block; padding: 10px 12px; border-radius: 10px; text-decoration: none;
  color: inherit; border: 1px solid var(--linie); border-left-width: 5px;
  background: var(--flaeche); box-shadow: 0 1px 3px var(--schatten);
}
.notiz-zettel:hover { box-shadow: 0 3px 10px var(--schatten); }
.notiz-zettel.offen { outline: 2px solid var(--blau); outline-offset: 1px; }
.notiz-zettel.ist-erledigt { opacity: .55; }
.notiz-zettel strong { display: block; margin-bottom: 3px; }
.notiz-zettel .klein { display: block; color: var(--leise); }
.notiz-zettel .notiz-fuss { margin-top: 5px; font-size: 11px; }
.notiz-zettel.farbe-gelb  { border-left-color: #eab308; }
.notiz-zettel.farbe-blau  { border-left-color: #3b82f6; }
.notiz-zettel.farbe-gruen { border-left-color: #22a04a; }
.notiz-zettel.farbe-rot   { border-left-color: #dc2626; }
.notiz-zettel.farbe-grau  { border-left-color: #9ca3af; }

.notiz-werkzeuge { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin: 10px 0 0; }
.notiz-werkzeuge button {
  min-width: 34px; padding: 6px 8px; font-size: 13.5px; background: var(--flaeche2, #f3f4f6);
  border: 1px solid var(--linie); border-radius: 6px; cursor: pointer; color: inherit;
}
.notiz-werkzeuge button:hover { background: var(--linie); }
.notiz-werkzeuge .trenner { width: 1px; height: 20px; background: var(--linie); margin: 0 4px; }
.notiz-editor {
  min-height: 220px; max-height: 60vh; overflow-y: auto; padding: 12px 14px; margin-top: 6px;
  border: 1px solid var(--linie); border-radius: 10px; background: var(--flaeche);
  line-height: 1.5;
}
.notiz-editor:focus { outline: 2px solid var(--blau); outline-offset: -1px; }
.notiz-editor h2 { font-size: 17px; margin: 10px 0 4px; }
.notiz-editor h3 { font-size: 15px; margin: 8px 0 4px; }
.notiz-editor p { margin: 0 0 8px; }
.notiz-editor ul, .notiz-editor ol { margin: 0 0 8px; padding-left: 22px; }
.notiz-editor img, .notiz-bild { max-width: 100%; height: auto; border-radius: 6px; margin: 6px 0; display: block; }

.notiz-anhaenge { display: flex; flex-wrap: wrap; gap: 14px; }
.notiz-anhang { width: 170px; display: flex; flex-direction: column; gap: 5px; }
.notiz-anhang img { width: 100%; height: 110px; object-fit: cover; border-radius: 6px; border: 1px solid var(--linie); }
.notiz-anhang .klein { color: var(--leise); line-height: 1.3; }

/* Ticket #58: Online-Kacheln der Boten unter dem Zeitstrahl */
.online-leiste { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 12px; }
.online-leiste .ol-titel { font-size: 12.5px; color: var(--leise); margin-right: 4px; font-weight: 600; }
.ol-kachel {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 6px;
  background: var(--flaeche); border: 1px solid var(--linie); text-decoration: none; color: inherit;
  font-size: 13.5px; font-variant-numeric: tabular-nums;
}
.ol-kachel:hover { border-color: var(--blau); }
.ol-kachel .ol-punkt { width: 8px; height: 8px; border-radius: 50%; background: #9ca3af; flex: none; }
.ol-kachel.faehrt .ol-punkt { background: #22a04a; }
.ol-kachel.steht  .ol-punkt { background: #2e5fa8; }
.ol-kachel.stumm  { opacity: .6; }
.ol-kachel .ol-wagen { font-weight: 600; }
.ol-kachel .ol-zahl {
  min-width: 16px; padding: 0 4px; border-radius: 10px; background: var(--blau); color: #fff;
  font-size: 11px; line-height: 16px; text-align: center;
}
.ol-kachel .ol-akku { font-size: 11px; filter: grayscale(1) brightness(.6); }
.online-leiste .ol-legende { color: var(--leise); margin-left: auto; }

/* Ticket #57: Meldungen der Boten in der Dispo */
.melde-leiste { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.melde-karte { border-left: 4px solid var(--blau); padding: 10px 12px; margin: 0; }
.melde-karte.schaden { border-left-color: var(--warn); }
.melde-karte .mk-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 6px; }
.melde-karte .mk-verlauf { display: flex; flex-direction: column; gap: 3px; margin: 4px 0 8px; }
.melde-karte .mk-zeile { display: flex; gap: 8px; align-items: baseline; font-size: 13.5px; padding: 4px 6px; border-radius: 6px; }
.melde-karte .mk-zeile.bote { background: var(--flaeche2, #f3f4f6); }
.melde-karte .mk-zeile.wir { background: rgba(46,95,168,.10); }
.melde-karte .mk-wer { font-weight: 600; white-space: nowrap; font-size: 12.5px; color: var(--leise); min-width: 96px; }
.melde-karte .mk-text { flex: 1; }
.melde-karte .mk-zeit { white-space: nowrap; color: var(--leise); }
.melde-karte .mk-antwort { display: flex; gap: 6px; align-items: center; }
.melde-karte .mk-antwort input[type=text] { flex: 1; margin: 0; }

/* Ticket #64: Tourenansicht als Seitenfenster */
.tour-knopf {
  display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 6px;
  border: 1px solid var(--linie); background: var(--flaeche); color: inherit; cursor: pointer;
  font-size: 12.5px; line-height: 1.6;
}
.tour-knopf:hover { border-color: var(--blau); background: rgba(46,95,168,.08); }
.tour-knopf .tk-zahl { font-weight: 700; }
.tour-knopf.gesetzt { border-color: var(--blau); }

.tour-fenster {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 92vw); z-index: 60;
  background: var(--flaeche); border-left: 1px solid var(--linie);
  box-shadow: -6px 0 24px var(--schatten); display: none; flex-direction: column;
}
.tour-fenster.offen { display: flex; }
.tour-fenster .tf-kopf {
  display: flex; align-items: flex-start; gap: 10px; padding: 14px 16px;
  border-bottom: 1px solid var(--linie);
}
.tour-fenster .tf-kopf > div { flex: 1; }
.tour-fenster .tf-kopf button { padding: 4px 10px; font-size: 17px; line-height: 1; }
.tour-fenster .hinweis, .tour-fenster .warn { margin: 10px 16px 0; }
.tour-fenster .tf-liste { flex: 1; overflow-y: auto; padding: 12px 16px; }
.tour-fenster .tf-fuss { padding: 10px 16px; border-top: 1px solid var(--linie); }

.tf-kachel {
  border: 1px solid var(--linie); border-left: 4px solid var(--blau); border-radius: 10px;
  padding: 8px 10px; margin-bottom: 8px; background: var(--flaeche); cursor: pointer;
}
.tf-kachel.abholen { border-left-color: #2e5fa8; }
.tf-kachel.liefern { border-left-color: #1e7f4f; }
.tf-kachel.beides { border-left-color: #8a5fbf; }   /* 2.237 (Ticket #189) */
.tf-kachel.zieht { opacity: .45; }
.tf-kachel.drueber { border-top: 2px solid var(--blau); }
.tf-kachel .tf-zeile { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12.5px; }
.tf-kachel .tf-platz {
  min-width: 20px; height: 20px; border-radius: 50%; background: var(--blau); color: #fff;
  font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center;
}
.tf-kachel .tf-typ { color: var(--leise); }
.tf-kachel .tf-nr { font-weight: 600; }
.tf-kachel .tf-zeit { margin-left: auto; color: var(--leise); font-variant-numeric: tabular-nums; }
.tf-kachel .tf-griff { cursor: grab; color: var(--leise); padding: 0 2px; }
.tf-kachel .tf-adresse { margin-top: 4px; font-size: 13.5px; }
.tf-kachel .tf-da { color: var(--ok-text, #2e7d32); margin-top: 3px; }
.tf-kachel .tf-blase { display: none; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--linie); }
.tf-kachel.auf .tf-blase { display: block; }

/* 1.72: kleiner Ausschalter an der Online-Kachel (Schicht beenden aus der Dispo) */
.ol-beenden { margin-left: -6px; margin-right: 6px; }
.ol-aus { background: none; border: 0; color: var(--leise); font-size: 15px; line-height: 1;
  padding: 4px 6px; cursor: pointer; border-radius: 6px; }
.ol-aus:hover { background: var(--flaeche2); color: var(--rot, #b42318); }

/* 1.72: Sprunglink fuer die Tastatur - unsichtbar, bis er den Fokus bekommt */
.sprung-inhalt { position: absolute; left: -9999px; top: 0; background: var(--flaeche);
  color: var(--text); padding: 8px 14px; border-radius: 0 0 8px 0; z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.sprung-inhalt:focus { left: 0; }
main.inhalt:focus { outline: none; }

/* Fahrzeugarten zum Anhaken (1.76, Ticket #75). Mehrspaltig, damit
   zwanzig Arten nicht zwanzig Zeilen brauchen. */
.fz-haken { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 4px 14px; margin: 4px 0 2px; }
.fz-haken label { display: flex; align-items: center; gap: 6px; margin: 0;
  font-weight: 400; font-size: 13.5px; min-height: 30px; }
.fz-haken input { width: auto; margin: 0; }

/* ---------- Tour aus der Online-Kachel öffnen (1.77, Ticket #71) ---------- */
/* Die Zahl auf der Kachel eines Boten in der Schicht ist jetzt ein Knopf: Er
   öffnet dasselbe Tourfenster wie das Symbol in der Beförderer-Spalte. Ein
   Knopf IM Link wäre ungültiges HTML, deshalb liegt er daneben - die Hülle
   hält beide zusammen. */
.ol-gruppe { display: inline-flex; align-items: center; }
.ol-kachel .ol-akku { margin-left: 2px; }
button.ol-zahl {
  font: inherit; cursor: pointer; border: 1px solid var(--linie); border-left: 0;
  background: var(--flaeche2); color: var(--text);
  border-radius: 0 7px 7px 0; padding: 4px 8px; margin-left: -1px; line-height: 1.35;
  font-weight: 700; font-variant-numeric: tabular-nums;
}
button.ol-zahl:hover { background: var(--blau); color: #fff; border-color: var(--blau); }
button.ol-zahl:focus-visible { outline: 2px solid var(--blau); outline-offset: 1px; }

/* ---------- Diktierfunktion (1.77, Ticket #79) ---------- */
/* Der Halter ist null Pixel hoch und sitzt direkt hinter dem Textfeld. Von dort
   legt sich der Knopf über dessen rechte untere Ecke, ohne das Feld selbst
   anzufassen. */
.diktat-halter { display: block; position: relative; height: 0; overflow: visible; }
.diktat-halter.neben { display: inline-flex; align-items: center; height: auto; margin-left: 5px; }
.diktat-knopf {
  /* Etwas Abstand zur Ecke: dort sitzt der Anfasser zum Vergrößern des Feldes. */
  position: absolute; right: 17px; bottom: 10px; z-index: 2;
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; padding: 0; cursor: pointer;
  border: 1px solid var(--rahmen, #d7dce2); border-radius: 50%;
  background: var(--flaeche, #fff); color: var(--leise, #6b7480);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .10);
}
.diktat-halter.neben .diktat-knopf { position: static; }
.diktat-knopf:hover { color: var(--blau, #2e5fa8); border-color: var(--blau, #2e5fa8); }
.diktat-knopf:focus-visible { outline: 2px solid var(--blau, #2e5fa8); outline-offset: 2px; }
.diktat-knopf.hoert { background: #b42318; border-color: #b42318; color: #fff;
  animation: diktat-puls 1.4s ease-in-out infinite; }
@keyframes diktat-puls {
  0%, 100% { box-shadow: 0 0 0 0 rgba(180, 35, 24, .45); }
  50%      { box-shadow: 0 0 0 6px rgba(180, 35, 24, 0); }
}
@media (prefers-reduced-motion: reduce) { .diktat-knopf.hoert { animation: none; } }
.diktat-stand { position: absolute; right: 53px; bottom: 13px; z-index: 2;
  max-width: min(58%, 340px); font-size: 12.5px; line-height: 1.3; color: var(--leise, #6b7480);
  background: var(--flaeche, #fff); border: 1px solid var(--rahmen, #d7dce2); border-radius: 6px;
  padding: 4px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.diktat-halter.neben .diktat-stand { position: static; margin-left: 6px; }
.diktat-stand[hidden] { display: none; }

/* Nebenarten des Beförderers (1.78, Ticket #86) */
.art-haken { display: flex; flex-wrap: wrap; gap: 4px 6px; margin: 3px 0 2px; }
.art-haken label { display: inline-flex; align-items: center; gap: 4px; margin: 0; font-size: 12.5px;
  border: 1px solid var(--linie); border-radius: 6px; padding: 2px 8px; cursor: pointer; font-weight: 400; }
.art-haken label.an,
.art-haken label:has(input:checked) { border-color: var(--blau); background: rgba(46, 95, 168, .08); }
.art-haken input { margin: 0; }
.plakette.neben-art { background: var(--flaeche2); color: var(--leise); border: 1px solid var(--linie); }

/* Wagen-Knöpfe in der Beförderer-Spalte (1.78, Ticket #85) */
/* Fahrer eines Beförderers (1.80, Ticket #94): eine Zeile je App-Zugang,
   Wagennummer vorn, Name dahinter. Klickbar nur für Zugänge, die zuteilen. */
.bef-fahrer { display: flex; flex-direction: column; gap: 3px; margin-top: 6px; }
.bf-wagen { display: flex; align-items: center; gap: 6px; width: 100%; text-align: left;
  font: inherit; font-size: 12.5px; line-height: 1.5;
  border: 1px solid var(--linie); border-radius: 6px; padding: 2px 8px;
  background: var(--flaeche2); color: var(--text); }
button.bf-wagen { cursor: pointer; }
button.bf-wagen:hover { background: var(--blau); border-color: var(--blau); color: #fff; }
button.bf-wagen:hover .bf-nr { background: #fff; color: var(--blau); }
.bf-nr { flex: none; min-width: 26px; text-align: center; padding: 0 6px; border-radius: 6px;
  background: var(--blau); color: #fff; font-size: 11px; font-weight: 700;
  font-variant-numeric: tabular-nums; }
.bf-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dk-wagen { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 6px;
  background: var(--blau); color: #fff; font-size: 11px; font-weight: 700;
  font-variant-numeric: tabular-nums; }

/* Preis und Einkauf am Auftrag ändern (1.79, Vorschlag 2) */
.preis-stift { background: none; border: 0; cursor: pointer; color: var(--leise); padding: 2px 4px;
  line-height: 1; vertical-align: middle; border-radius: 6px; }
.preis-stift:hover { color: var(--blau); background: var(--flaeche2); }
.preis-stift .ikon { width: 15px; height: 15px; }
.preis-form { display: inline-flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.preis-form[hidden], .preis-wert[hidden], .preis-stift[hidden] { display: none !important; }

/* Sammelzuteilung in der Dispo (1.79, Vorschlag 5) */
.dk-haken { width: auto; margin: 0 5px 0 0; flex: none; cursor: pointer; }
.dispo-karte.angehakt { box-shadow: inset 0 0 0 2px var(--blau); }
.sammel-leiste { display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--flaeche2); border: 1px solid var(--linie); border-radius: 10px;
  padding: 8px 12px; margin-bottom: 10px; }
.sammel-leiste[hidden] { display: none; }
.sammel-leiste .klein { color: var(--leise); }
.sammel-leiste .knopf { margin-left: 0; }
.sammel-leiste .knopf:first-of-type { margin-left: auto; }

/* Tarifrechner in der Auftragsannahme (1.79, Vorschlag 4) */
.tarif-kasten summary { cursor: pointer; }
.tarif-kasten summary:hover { color: var(--blau); }

/* Geschäftszahlen auf der Startseite (1.79, Vorschlag 6) */
/* 2.107 (Prüfbericht C, K5): „white-space: nowrap“ galt für ALLE Zellen - die
   Erklärspalte („zum Vorwochentag“, „Vorjahresmonat“) wurde damit auf einem
   1280er Laptop abgeschnitten. Die Zahl darf nicht umbrechen, die Erklärung
   schon; deshalb bekommt nur die letzte Spalte den Umbruch zurück. */
.gf-zahlen th { font-weight: 400; color: var(--leise); }
.gf-zahlen td { white-space: nowrap; }
.gf-zahlen td:last-child { white-space: normal; min-width: 9em; }
.gf-zahlen td:last-child .klein { display: block; }
.gf-wandel { font-weight: 700; font-size: 12.5px; }
.gf-wandel.auf { color: var(--ok-text, #1c6b38); }
.gf-wandel.ab { color: var(--warn-text); }
/* 2.107 (C, F2): kein Umsatz zum Vergleich heißt nicht Alarm. */
.gf-wandel.leise { color: var(--leise); font-weight: 600; }

/* ---------------------------------------------------------------------------
   1.80 – Bedienung: Rollrahmen, klebende Tabellenköpfe, Tastaturfokus,
   leere Listen und ein Druckbild. */

/* Rollrahmen (1.80): Auf dem Telefon rollt eine breite Tabelle in ihrem eigenen
   Rahmen, statt die ganze Seite seitlich wegzuschieben. Betraf 13 von 24 Seiten.
   FALLE: overflow-x:auto macht den Rahmen zum Rollbehälter - overflow-y rechnet
   der Browser dann still auf „auto“ hoch, und darin klebt kein position:sticky
   mehr an der Fensterkante. Deshalb gilt der Rahmen nur schmal, der klebende
   Tabellenkopf nur breit. Die beiden dürfen sich nie überschneiden. */
.rollrahmen { max-width: 100%; }
@media (max-width: 900px) {
  .rollrahmen { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; }
  .rollrahmen::-webkit-scrollbar { height: 7px; }
  .rollrahmen::-webkit-scrollbar-thumb { background: var(--linie); border-radius: var(--r-klein); }
  .rollrahmen > .tabelle { min-width: 100%; width: auto; }
  /* 2.107 (Prüfbericht C, K6): Der Rollrahmen musste bisher von Hand um jede
     Tabelle gelegt werden - in kunde.php, monatsabschluss.php, zustellungen.php
     und abrechnen.php fehlte er, und die Stammdaten waren auf dem Handy
     abgeschnitten (nicht einmal wegrollbar, weil body overflow-x:hidden hat).
     Jetzt rollt JEDE Tabelle in einer Karte in sich selbst, auch ohne Rahmen.
     FALLE: display:block macht die Tabelle zum Rollbehälter; Zeilen und Zellen
     richten sich weiterhin aneinander aus (der Browser legt eine anonyme
     Tabelle darum). Nur oberhalb 900px darf das nicht gelten - dort klebt der
     Tabellenkopf, und ein Rollbehälter würde ihn lösen (siehe Falle oben). */
  .karte table, main.inhalt > table, .kachel-frei table {
    display: block; overflow-x: auto; overscroll-behavior-x: contain;
    scrollbar-width: thin; max-width: 100%; width: max-content; min-width: 100%;
  }
  .rollrahmen > table { display: table; }
}

/* Klebender Tabellenkopf (1.80): Bei langen Listen bleibt die Beschriftung oben
   stehen. Erst ab 901px, siehe Falle oben. 46px ist die Höhe der Kopfleiste. */
@media (min-width: 901px) {
  .tabelle > thead th, .tabelle > tbody > tr:first-child > th {
    position: sticky; top: 0; z-index: 3;
    box-shadow: inset 0 -1px 0 var(--linie);
  }
}

/* Tastaturfokus (1.80): Wer ohne Maus arbeitet, muss sehen, wo er steht.
   :focus-visible trifft nur die Tastatur - Mausklicks lösen keinen Ring aus. */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--blau); outline-offset: 2px; border-radius: 6px;
}
/* 2.250 (F12): Steht das Feld direkt unter seinem Beschriftungstext (label > input), schnitt
   der 2-px-Außenring die Unterlängen der Beschriftung an - innerhalb eines Labels liegt er am Rand. */
form label > input:focus-visible, form label > select:focus-visible, form label > textarea:focus-visible { outline-offset: 0; }
.kopf a:focus-visible, .kopf input:focus-visible, .kopf button:focus-visible {
  outline-color: var(--kopf-schrift);
}
.tabelle a.zeile:focus-visible { outline-offset: -2px; }

/* Leere Listen (1.80): Statt einer nackten Tabelle ein Satz, warum nichts da ist. */
.leer-hinweis {
  border: 1px dashed var(--linie); border-radius: 10px; background: var(--flaeche);
  padding: 24px 20px; text-align: center; color: var(--leise); margin: 4px 0 0;
}
.leer-hinweis .leer-kopf { display: block; color: var(--text); font-weight: 600; margin-bottom: 4px; }
.leer-hinweis a { color: var(--blau); }
/* Leere Tabelle: die Hinweiszeile fuellt die ganze Breite und liest sich wie
   ein Absatz, nicht wie ein abgeschnittener Datensatz. */
.tabelle td.leer-zeile { text-align: center; padding: 30px 18px; color: var(--leise); }
.tabelle td.leer-zeile .leer-kopf { display: block; color: var(--text); font-weight: 600; margin-bottom: 4px; }
.tabelle tr:hover td.leer-zeile { background: var(--flaeche); }

/* Druckbild (1.80): Papier ist weiß und hat keine Knöpfe. */
@media print {
  /* 2.107: color-scheme muss mit - sonst loest light-dark() auf Papier die
     dunkle Haelfte auf, wenn der Benutzer im dunklen Thema druckt. */
  :root { color-scheme: light;
          --flaeche: #fff; --flaeche2: #fff; --flaeche3: #fff; --grau: #fff;
          --text: #000; --leise: #333; --linie: #999; --linie-stark: #666; --schatten: transparent; }
  .kopf, .fuss, .filter, .leiste, .werkzeuge, .notiz-werkzeuge, .sammel-leiste,
  #sammel-leiste, .melde-leiste, .online-leiste, .kopfknoepfe, .sprung-dialog,
  .diktat-halter, .tagesuhr, .sprung-inhalt, .knopf, button, .katwahl,
  form.suchfeld, .reiter { display: none !important; }
  a { color: #000; text-decoration: none; }
  h1, h2, h3, h4 { color: #000; }
  @page { margin: 14mm 12mm; }
  body { background: #fff; color: #000; font-size: 11pt; }
  main.inhalt { padding: 0; max-width: none; }
  .rollrahmen { overflow: visible !important; }
  .tabelle { border: 1px solid #999; font-size: 10pt; }
  .tabelle th { background: #eee !important; color: #000; }
  .tabelle tr { break-inside: avoid; page-break-inside: avoid; }
  .tabelle thead { display: table-header-group; }
  .karte { border: 1px solid #999; box-shadow: none; break-inside: avoid; }
  .plakette { border: 1px solid #999; background: #fff !important; color: #000 !important; }
  /* Aufklappbares bleibt aufgeklappt sichtbar - die Beschriftung im
     Zusammenklapper ist oft die Ueberschrift des Abschnitts. */
  details > summary { font-weight: 600; list-style: none; }
}

/* Rasterzellen dürfen schrumpfen (1.80): Eine Zelle im Raster ist von Haus aus
   mindestens so breit wie ihr breitester unteilbarer Inhalt - eine Tabelle also.
   Genau daran schob sich die Seite auf dem Telefon seitlich weg, obwohl die
   Spalte längst „1fr“ war. min-width:0 hebt diese Mindestbreite auf. */
.spalten > *, .spalten3 > *, .spalten4 > *, .start-kacheln > *, .dispo > * { min-width: 0; }
.katwahl { flex-wrap: wrap; }

/* Suche in Hilfe & Neuerungen (1.80, Ticket #92) */
.hilfe-suchkasten { max-width: 860px; }
.hilfe-suchkasten input[type=search] { width: 100%; max-width: 460px; }
.hilfe-punkt.treffer { background: var(--gewaehlt); border-radius: 6px; padding-left: 10px !important; padding-right: 10px !important; }

/* Pause statt Abmeldung (1.80, Ticket #91) */
.pausen-form { margin: 0; }
.pausen-form button { font: inherit; font-size: 13.5px; line-height: 1.4; cursor: pointer;
  background: transparent; color: var(--kopf-leise); border: 1px solid rgba(255,255,255,.28);
  border-radius: 6px; padding: 4px 8px; }
.pausen-form button:hover { color: #fff; border-color: rgba(255,255,255,.6); }
.pausen-banner { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

.pausenseite { min-height: 100vh; margin: 0; background: var(--grau); }
.pausen-grund { position: fixed; inset: 0; filter: blur(7px); opacity: .55; pointer-events: none; }
.pausen-grund .pg-kopf { height: 52px; background: var(--kopf-bg); }
.pausen-grund .pg-flaeche { padding: 40px 8vw; display: flex; flex-direction: column; gap: 22px; }
.pausen-grund .pg-block { height: 34px; border-radius: 10px; background: var(--flaeche);
  border: 1px solid var(--linie); }
.pausen-kasten { position: relative; z-index: 2; max-width: 420px; margin: 12vh auto 0;
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: 10px;
  padding: 24px 30px 30px; box-shadow: 0 18px 50px var(--schatten); text-align: left; }
.pausen-kasten h1 { margin: 6px 0 10px; }
.pausen-tasse { font-size: 30px; line-height: 1; }
.pausen-uhr { font-size: 30px; font-weight: 700; margin: 2px 0 10px; font-variant-numeric: tabular-nums; }
.pausen-kasten input[type=password] { width: 100%; }
@media (max-width: 560px) { .pausen-kasten { margin: 6vh 12px 0; } }

/* Sammelpunkt „Mehr“ in der Kopfleiste (1.82) */
.nav-mehr { position: relative; }
.nav-mehr > summary {
  color: var(--kopf-schrift); cursor: pointer; list-style: none;
  display: inline-flex; align-items: center; gap: 6px; padding: 10px 12px;
  border-bottom: 3px solid transparent;
}
.nav-mehr > summary::-webkit-details-marker { display: none; }
.nav-mehr > summary::marker { content: ''; }
.nav-mehr > summary:hover { color: #fff; }
.nav-mehr.aktiv > summary { color: #fff; border-bottom-color: #f0a832; }
.nav-mehr[open] > summary { color: #fff; }
/* FALLE: Das Menue haengt am rechten Rand der Leiste. Mit „left: 0“ schob es
   sich bei 1440 Pixeln 101 Pixel aus dem Fenster hinaus. Es klappt deshalb
   nach links auf, vom rechten Rand des Knopfes aus. */
.nav-klapp {
  position: absolute; top: 100%; right: 0; left: auto; z-index: 60; min-width: 210px;
  max-width: calc(100vw - 24px);
  display: flex; flex-direction: column; gap: 2px; padding: 6px;
  background: var(--kopf-bg); border: 1px solid rgba(255,255,255,.2);
  border-radius: 10px; box-shadow: 0 14px 34px rgba(0,0,0,.35);
}
.nav-klapp a {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  border-radius: 6px; border-bottom: 0; white-space: nowrap;
}
.nav-klapp a span { display: inline !important; }
.nav-klapp a:hover { background: rgba(255,255,255,.14); color: #fff; }
.nav-klapp a.aktiv { background: rgba(255,255,255,.1); color: #fff; }


/* Seitenkopf (1.82): Ueberschrift und Statusreiter in einer Zeile. */
.seitenkopf { display: flex; align-items: center; gap: 8px 18px; flex-wrap: wrap; margin: 0 0 12px; }
.seitenkopf h1 { margin: 0; }
.seitenkopf .reiter { margin: 0; }
@media (max-width: 700px) { .seitenkopf { gap: 8px; } }

/* Der Sammelpunkt bekommt in den engen Baendern dieselben Abstaende wie die
   ubrigen Menuepunkte (1.82). */

/* 1.90, Ticket #96: Screenshots ins Ticket - Ablagefeld und Vorschau */
#ticket-formular.ablage { outline: 2px dashed var(--blau-hell); outline-offset: 6px; border-radius: var(--r-karte); }
.ticket-ablage-hinweis kbd { border: 1px solid var(--linie); border-radius: var(--r-klein); padding: 0 5px; font-family: inherit; font-size: var(--s-klein); background: var(--flaeche2); }
.ticket-anhaenge { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 10px; }
.ticket-anhang { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--linie); border-radius: var(--r-karte); padding: 4px 6px 4px 4px; font-size: var(--s-klein); background: var(--flaeche); }
.ticket-anhang img { width: 56px; height: 42px; object-fit: cover; border-radius: var(--r-klein); }
.ticket-anhang .name { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticket-anhang .weg { border: 0; background: transparent; font-size: var(--s-gross); line-height: 1; cursor: pointer; color: var(--leise); padding: 0 4px; }
.ticket-anhang .weg:hover { color: var(--warn); }
/* 1.90, Ticket #98: Wagennummer und Fahrzeug je Zugang direkt in der Zeile */
.wagenzeile { display: inline-flex; gap: 4px; align-items: center; margin: 0; }
.wagenzeile input, .wagenzeile select { font-size: var(--s-klein); padding: 3px 6px; width: auto; }
.wagenzeile select { max-width: 150px; }
/* 1.91, Ticket #99: Stationen frei ordnen - Nummer, Art-Auswahl, Pfeile */
.stationtitel { display: inline-flex; align-items: center; gap: 6px; }
.st-nr { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--r-pille); background: var(--blau); color: #fff; font-size: var(--s-klein); font-weight: 700; }
.station.abholen .st-nr { background: #f0a832; color: #3b2a00; }
.station.beides .st-nr { background: #8a5fbf; color: #fff; }
.station .st-art { width: auto; font-size: var(--s-fliess); font-weight: 600; padding: 3px 26px 3px 8px; }
.stationkopf .st-hoch, .stationkopf .st-runter { padding: 2px 8px; font-size: var(--s-klein); line-height: 1.4; }
.stationkopf .st-hoch:disabled, .stationkopf .st-runter:disabled { opacity: .35; cursor: default; }

/* ---------- Anfragen: Marke und Doppelanfragen (2.31) ---------- */
/* Zwei Marken in einer Liste. Ohne Logo muesste man jede Zeile lesen, um zu
   wissen, wer da gefragt hat - mit Logo sieht man es beim Ueberfliegen. */
.marken-kennung { display: inline-flex; align-items: center; gap: 6px; vertical-align: middle;
  border: 1px solid var(--rahmen, #d8d8d8); border-radius: 12px; padding: 1px 9px 1px 4px;
  font-size: 12px; line-height: 1.5; white-space: nowrap; background: var(--flaeche, #fafafa); }
.marken-kennung img { height: 16px; width: auto; display: block; }
.marken-kennung > span { font-weight: 600; }

/* Der Hinweis, dass dieselbe Anfrage schon bei der anderen Marke lief. Steht
   NUR hier im Programm - nach aussen bleiben die Marken getrennt. */
/* 2.107 (Prüfbericht C, S3): Die dunklen Werte hingen allein an der
   Geräteeinstellung - wer „Hell“ eingestellt hatte, bekam auf einem dunklen Gerät trotzdem
   den dunklen Kasten. Über light-dark() folgt er jetzt der Einstellung. */
.doppelt-kasten { border-left: 3px solid light-dark(#b8860b, #d4a72c); background: light-dark(#fdf6e3, #33290d);
  color: light-dark(#4a3c14, #f0e3bd);
  padding: 9px 12px; margin: 0 0 10px; border-radius: 0 4px 4px 0; }
.doppelt-kasten strong { display: block; font-size: 13.5px; margin-bottom: 4px; }
.doppelt-kasten ul { margin: 0; padding-left: 0; list-style: none; }
.doppelt-kasten li { margin: 3px 0; }
.doppelt-kasten p { margin: 6px 0 0; opacity: .85; }
.doppelt-kasten .marken-kennung { background: light-dark(#fff, #241d09); }
/* 2.159 (Ticket #153): das alte Angebot zum Aufklappen */
.doppelt-kasten details.doppelt-alt summary { cursor: pointer; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.doppelt-kasten details.doppelt-alt summary::before { content: '▸'; font-size: 11px; opacity: .7; }
.doppelt-kasten details.doppelt-alt[open] summary::before { content: '▾'; }
.doppelt-kasten .doppelt-alt-inhalt { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px 16px; margin: 6px 0 4px 16px; padding: 8px 10px; border-radius: 6px; background: light-dark(rgba(255,255,255,.7), rgba(0,0,0,.25)); font-size: 13.5px; }
.doppelt-kasten .doppelt-alt-text { grid-column: 1 / -1; }
.plakette.vergleich-gleich { background: light-dark(#dff3e3, #143d1f); color: light-dark(#1b6b32, #9be0ad); }
.plakette.vergleich-aehnlich { background: light-dark(#fff1cc, #4a3b08); color: light-dark(#7a5a00, #f1d27a); }
.plakette.vergleich-anders { background: light-dark(#eceff3, #2b3340); color: light-dark(#4b5563, #b8c2cf); }
.plakette.vergleich-unbekannt { background: light-dark(#eceff3, #2b3340); color: light-dark(#6b7280, #9aa4b2); }
.plakette.doppelt { background: light-dark(#fdf6e3, #33290d); color: light-dark(#7a5c00, #f0e3bd); border: 1px solid light-dark(#e3d08a, #6b581f); }

/* ---------- Anfragen: Text links, Karte rechts (2.28) ---------- */
/* Die Karte war ein breites Panorama unter dem Text - viel Flaeche, wenig
   Nutzen. Jetzt steht sie daneben, laesst sich schieben und zoomen.
   2.32: breiter nach links gezogen (Wunsch Flo) - bei einer Strecke ueber Land
   sieht man so beide Enden, ohne erst zu zoomen. Der Text darunter braucht die
   Breite nicht, der laeuft ohnehin nur ueber wenige Zeilen.
   2.33: noch breiter und mitwachsend, mit etwas Luft zum Rand des Kaestchens.
   Unter 900 px rutscht die Karte weiterhin unter den Text. */
.anfrage-raster {
  display: grid;
  /* 2.33: Die Karte waechst mit dem Fenster mit, statt in Stufen zu springen:
     von 330 Pixel auf schmalen Schirmen bis 760 Pixel auf breiten. Sie waechst
     schneller als das Fenster - was an Platz dazukommt, gehoert der Karte, denn
     der Text daneben braucht ihn nicht. */
  grid-template-columns: minmax(0, 1fr) clamp(330px, 52vw - 220px, 760px);
  gap: 20px;
  align-items: start;
  margin-bottom: 10px;
  padding-right: 4px;         /* die Karte klebt nicht am Rand des Kaestchens */
}
.anfrage-text { min-width: 0; }
.anfrage-karte {
  height: 300px;
  border: 1px solid var(--rand, #d9dee6);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  z-index: 0;                 /* die Kachel darf nicht ueber Kopfzeile oder Menue liegen */
}
.anfrage-karte:focus-within { outline: 2px solid var(--blau, #2b7bb3); outline-offset: 2px; }
@media (max-width: 900px) {
  .anfrage-raster { grid-template-columns: 1fr; }
  .anfrage-karte { height: 240px; }
}

/* ---------- Meldung bei neuer Anfrage (2.36) ----------
   Rechts unten, über allem, aber nie über einem Dialog. Sie soll auffallen und
   trotzdem nicht im Weg stehen: nach 30 Sekunden geht sie von selbst, und
   solange der Zeiger darauf liegt, bleibt sie. */
#meldungen { position: fixed; right: 18px; bottom: 18px; z-index: 60;
  display: flex; flex-direction: column; gap: 10px; max-width: min(380px, calc(100vw - 36px)); }
.meldung-karte { background: var(--flaeche); border: 1px solid var(--linie);
  border-left: 4px solid var(--warn-rand, #b42318); border-radius: 8px; padding: 12px 14px 12px 13px;
  box-shadow: 0 14px 40px rgba(15, 26, 43, .18); opacity: 0; transform: translateY(10px);
  transition: opacity .25s ease, transform .25s ease; }
.meldung-karte.da { opacity: 1; transform: none; }
.mk-kopf { display: flex; align-items: center; gap: 8px; }
.mk-kopf strong { font-size: 15px; }
.mk-punkt { width: 8px; height: 8px; border-radius: 50%; background: #b42318; flex: none;
  box-shadow: 0 0 0 4px rgba(180, 35, 24, .16); }
.mk-marke { font-size: 12.5px; color: var(--leise); border: 1px solid var(--linie);
  border-radius: 20px; padding: 1px 8px; }
.mk-zu { margin-left: auto; background: none; border: 0; color: var(--leise); font-size: 20px;
  line-height: 1; cursor: pointer; padding: 0 2px; }
.mk-zu:hover { color: var(--text); }
.mk-strecke { margin: 8px 0 0; font-size: 15.5px; font-weight: 600; }
.mk-mail, .mk-offen { margin: 3px 0 0; font-size: 13px; color: var(--leise); }
.mk-fuss { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 11px; }
.mk-knopf { background: var(--blau, #2b7bb3); color: #fff; text-decoration: none; font-size: 14px;
  font-weight: 600; padding: 7px 14px; border-radius: 6px; }
.mk-knopf:hover { filter: brightness(.94); color: #fff; }
.mk-leise { background: none; border: 1px solid var(--linie); color: var(--text); font-size: 13px;
  padding: 7px 12px; border-radius: 6px; cursor: pointer; }
.mk-leise:hover { border-color: var(--text); }
/* 2.37: Die Antwort auf ein Angebot ist eine gute Nachricht - sie bekommt Grün
   statt Rot, sonst dieselbe Karte. */
.meldung-karte.antwort { border-left-color: var(--ok-rand, #2e7d32); }
.meldung-karte.antwort .mk-punkt { background: #2e7d32; box-shadow: 0 0 0 4px rgba(46, 125, 50, .16); }
@media (prefers-reduced-motion: reduce) {
  .meldung-karte { transition: none; opacity: 1; transform: none; }
}
@media (max-width: 700px) {
  #meldungen { left: 12px; right: 12px; bottom: 12px; max-width: none; }
}
/* 2.39: Statt eines ganzen Kastens nur noch ein kleiner Schalter neben der
   Überschrift. Aus heißt: keine Karte, kein Ton, keine Meldung des Systems -
   nur auf diesem Rechner, andere Rechner bleiben unberührt. */
.seitenkopf-zeile { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 0 0 4px; }
.melde-schalter { display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  background: var(--flaeche); color: var(--text); border: 1px solid var(--linie);
  border-radius: 999px; padding: 5px 13px 5px 10px; font-size: 13.5px; font-family: inherit; }
.melde-schalter:hover { border-color: var(--blau); }
.melde-schalter .ikon { width: 15px; height: 15px; }
.melde-schalter::after { content: "an"; font-weight: 600; color: var(--ok-text, #2e7d32); }
.melde-schalter[aria-pressed="false"] { color: var(--leise); }
.melde-schalter[aria-pressed="false"]::after { content: "aus"; color: var(--leise); font-weight: 400; }
.melde-schalter[aria-pressed="false"] .ikon { opacity: .55; }
/* Vom Browser blockiert: dann meldet nur das Programm selbst */
.melde-schalter[data-stand="denied"]::after { content: "nur im Programm"; color: var(--leise); font-weight: 400; }

/* ---------- Antwort auf ein Angebot (2.37) ----------
   Der Abschnitt steht ganz oben und darf das auch zeigen: eine grüne Kante,
   sonst nichts Lautes. Die Antwort selbst steht im Klartext da, damit niemand
   erst den Mailverlauf aufklappen muss. */
.antwort-karte { border-left: 4px solid var(--ok-rand, #2e7d32); }
.antwort-karte > h2 { display: flex; align-items: center; gap: 10px; }
.plakette.gut { background: var(--ok-bg, #e4f2e4); color: var(--ok-text, #2e7d32);
  border: 1px solid var(--ok-rand, #bcdfbc); }
/* 2.38, FEHLER BEHOBEN: Hier stand var(--flaeche-2) - diese Farbe gibt es gar
   nicht, also griff immer der helle Ersatzwert. Im Dunkelmodus stand damit
   heller Text auf hellem Grund: praktisch unlesbar. Jetzt die Farben, die es
   wirklich gibt, und die Schriftfarbe ausdrücklich dazu. */
.antwort-text { background: var(--flaeche); color: var(--text); border: 1px solid var(--linie);
  border-radius: 6px; padding: 10px 12px; margin: 8px 0 0; }
.antwort-text pre { white-space: pre-wrap; font-size: 13.5px; margin: 0; line-height: 1.55;
  font-family: inherit; color: var(--text); }
.antwort-text .zitat { color: var(--leise); font-size: 12.5px; margin: 8px 0 0; }
/* Die Vorschauzeile: eine Zeile, mehr nicht - der Rest steckt im Aufklapper */
.antwort-vorschau { margin: 8px 0 0; color: var(--text); overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.antwort-mehr { margin: 6px 0 0; }
.antwort-mehr > summary { cursor: pointer; color: var(--blau); font-size: 13.5px; }

/* ---------- Postkasten (2.41) ----------
   Drei Spalten wie in jedem Mailprogramm: Ordner, Nachrichten, geöffnete Mail.
   Ohne geöffnete Mail bekommt die Liste die ganze Breite. Unter 1000 px liegt
   alles untereinander - dort ist Nebeneinander nur Gedränge. */
.post-raster { position: relative; display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 14px; align-items: start;
  max-width: 1720px; }   /* 2.102 (Design 3): auf 2560 px stand die Uhrzeit zwei Meter vom Absender */
.post-raster.mit-lesen { grid-template-columns: 205px minmax(260px, 340px) minmax(0, 1fr); }
@media (max-width: 1440px) { .post-raster.mit-lesen { grid-template-columns: 190px minmax(240px, 300px) minmax(0, 1fr); } }
@media (max-width: 1100px) {
  .post-raster, .post-raster.mit-lesen { grid-template-columns: minmax(0, 1fr); }
  .post-ordner, .post-liste { max-height: none; }
  .pk-griff { display: none; }
}
/* 2.100: Die Spalten sind verschiebbar. Der Griff liegt in der Luecke zwischen
   zwei Spalten; die Breiten merkt sich der Browser je Mensch. */
.pk-griff { position: absolute; top: 0; bottom: 0; width: 11px; margin-left: -5px; cursor: col-resize;
  z-index: 20; background: transparent; border: 0; padding: 0; }
.pk-griff::before { content: ""; position: absolute; left: 4px; top: 6px; bottom: 6px; width: 3px;
  border-radius: 3px; background: transparent; transition: background .12s; }
.pk-griff:hover::before, .pk-griff.zieht::before { background: var(--blau); }
body.pk-zieht-spalte { cursor: col-resize; user-select: none; }

.post-suche { display: flex; gap: 6px; align-items: center; margin-left: auto; }
.post-suche input[type="search"] { width: 240px; }

/* 2.102 (Design 4): Im Postkasten eine Stufe groesser - 11 px fuer Uhrzeit und
   Zaehler sind fuer ein Buero, das den ganzen Tag hineinsieht, zu klein. Nur hier,
   der Rest des Programms bleibt. */
.post-raster { --s-mini: 12px; --s-klein: 13px; }
/* Spalte 1: Postfächer und ihre Ordner */
.post-ordner { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--r-karte);
  padding: 8px 6px; max-height: calc(100vh - 210px); overflow: auto; }
.post-fach + .post-fach { margin-top: 6px; border-top: 1px solid var(--linie); padding-top: 6px; }
/* 2.100: Der Fachkopf ist ein Schalter zum Auf- und Zuklappen. */
.post-fach-kopf { display: flex; align-items: center; gap: 6px; font-size: var(--s-klein); color: var(--leise);
  padding: 3px 8px 5px; font-weight: 600; width: 100%; background: none; border: 0; text-align: left;
  border-radius: var(--r-klein); cursor: pointer; font-family: inherit; }
.post-fach-kopf:hover { background: var(--flaeche3); color: var(--text); }
.post-fach-kopf .ikon { width: 15px; height: 15px; flex: none; }
.post-fach-kopf span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-fach-name { flex: 1 1 auto; min-width: 0; }
.post-fach-pfeil { flex: none; width: 9px; color: var(--leise); }
.post-fach-pfeil::before { content: "\25BE"; display: inline-block; transition: transform .12s; }
.post-fach.zu .post-fach-pfeil::before { transform: rotate(-90deg); }
.post-fach.zu .post-fach-ordner { display: none; }
.post-fach-zahl { flex: none; margin-left: auto; background: var(--blau); color: #fff;
  border-radius: var(--r-pille); padding: 0 7px; font-size: var(--s-mini); font-weight: 700; }
.post-fach:not(.zu) .post-fach-zahl { background: var(--plakette-bg); color: var(--plakette-text); }
.post-ordner-zeile { display: flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: var(--r-klein);
  color: var(--text); text-decoration: none; font-size: var(--s-fliess); }
.post-ordner-zeile:hover { background: var(--flaeche3); }
.post-ordner-zeile.aktiv { background: var(--gewaehlt); font-weight: 600; }
.po-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.po-zahl { margin-left: auto; background: var(--plakette-bg); color: var(--plakette-text);
  border-radius: var(--r-pille); padding: 0 7px; font-size: var(--s-mini); font-weight: 700; order: 8; }

/* 2.122 (Wunsch GF): die Favoritenliste, wie man sie aus Outlook kennt.
   Der Stern liegt IN der Ordnerzeile und ist erst beim Überfahren zu sehen -
   ein voller Stern bleibt stehen, damit man erkennt, was oben steht. */
.post-favoriten .post-fach-name { font-weight: 700; }
.post-favoriten .post-ordner-zeile .po-name { flex: none; }
.post-favoriten .post-ordner-zeile .po-fach { flex: 1; min-width: 0; }
.po-fach { color: var(--leise); font-size: var(--s-mini); overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.po-fach::before { content: "– "; }
.pk-stern { order: 9; flex: none; cursor: pointer; color: var(--leise); font-size: 13px;
  line-height: 1; padding: 0 1px; opacity: 0; transition: opacity .12s; }
.pk-stern.an { opacity: .9; color: #e0a400; }
.post-ordner-zeile:hover .pk-stern, .post-ordner-zeile:focus-within .pk-stern { opacity: .7; }
.pk-stern:hover, .pk-stern:focus-visible { opacity: 1; }
.pk-stern:focus-visible { outline: 2px solid var(--blau); border-radius: var(--r-klein); }

/* Spalte 2: die Nachrichten */
.post-liste { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--r-karte);
  overflow: auto; max-height: calc(100vh - 210px); }
/* 2.102 (Design 2): Filter in der schmalen Mittelspalte als eine Auswahl statt
   drei umbrechender Zeilen. Voreinstellung: Knoepfe sichtbar, Auswahl versteckt. */
.pk-filter-wahl { display: none; width: auto; font-size: 12px; padding: 2px 6px; }
.post-raster.mit-lesen .post-filter .post-filter-knopf,
.post-raster.mit-lesen .post-filter .pk-thema-wahl { display: none; }
.post-raster.mit-lesen .post-filter .pk-filter-wahl { display: inline-block; }
.post-raster.mit-lesen .post-filter .pk-anzahl { white-space: nowrap; }
@media (max-width: 1100px) {
  .post-filter .post-filter-knopf, .post-filter .pk-thema-wahl { display: inline-block !important; }
  .post-filter .pk-filter-wahl { display: none !important; }
}
/* 2.101: „Alle" - das sichtbare Gegenstueck zu Strg+A */
.pk-alle { display: inline-flex; align-items: center; gap: 5px; margin: 0 0 0 6px; padding: 2px 8px 2px 6px;
  border: 1px solid var(--linie); border-radius: var(--r-pille); font-size: var(--s-mini); color: var(--leise);
  cursor: pointer; white-space: nowrap; }
.pk-alle:hover { background: var(--flaeche3); color: var(--text); }
.pk-alle input { margin: 0; width: auto; }
.post-filter { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; padding: 8px 10px;
  border-bottom: 1px solid var(--linie); position: sticky; top: 0; background: var(--flaeche); z-index: 1; }
.post-filter-knopf { font-size: var(--s-klein); padding: 3px 10px; border-radius: var(--r-pille);
  color: var(--leise); text-decoration: none; }
.post-filter-knopf:hover { background: var(--flaeche3); }
.post-filter-knopf.aktiv { background: var(--blau); color: #fff; font-weight: 600; }

/* Die Zeile ist ein Raster - schmal (neben einer geöffneten Mail) liegen die
   Angaben untereinander, breit nebeneinander wie in jedem Mailprogramm.
   FALLE (2.35 gelernt): Jedes Kind bekommt seinen Platz ausdrücklich zugewiesen,
   sonst rutscht es in die erste Spalte und läuft dort senkrecht. */
.post-zeile { display: grid; gap: 2px 10px; padding: 8px 12px; border-bottom: 1px solid var(--linie);
  color: var(--text); text-decoration: none;
  grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; }
.post-zeile > .pz-von    { grid-column: 1; grid-row: 1; }
.post-zeile > .pz-wann   { grid-column: 2; grid-row: 1; }
.post-zeile > .pz-mitte  { grid-column: 1 / 3; grid-row: 2; min-width: 0; display: block; }
.post-zeile > .pz-marker { grid-column: 1 / 3; grid-row: 3; display: flex; gap: 5px;
  align-items: center; flex-wrap: wrap; }
.post-zeile > .pz-marker:empty { display: none; }
.pz-mitte .pz-betreff { display: block; }
.pz-mitte .pz-vorschau { display: block; color: var(--leise); }
/* Breit: alles in einer Zeile, Betreff und Vorschau nebeneinander */
.post-raster:not(.mit-lesen) .post-zeile { grid-template-columns: 210px minmax(0, 1fr) auto 76px; }
.post-raster:not(.mit-lesen) .post-zeile > .pz-mitte { grid-column: 2; grid-row: 1;
  display: flex; gap: 10px; align-items: baseline; }
.post-raster:not(.mit-lesen) .post-zeile > .pz-marker { grid-column: 3; grid-row: 1; }
.post-raster:not(.mit-lesen) .post-zeile > .pz-wann { grid-column: 4; grid-row: 1; text-align: right; }
.post-raster:not(.mit-lesen) .pz-mitte .pz-vorschau { max-width: 60ch; }   /* 2.102 (Design 3) */
.post-raster:not(.mit-lesen) .pz-mitte .pz-betreff { flex: 0 1 auto; max-width: 55%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1100px) {
  .post-raster:not(.mit-lesen) .post-zeile { grid-template-columns: minmax(0, 1fr) auto; }
  .post-raster:not(.mit-lesen) .post-zeile > .pz-mitte { grid-column: 1 / 3; grid-row: 2; display: block; }
  .post-raster:not(.mit-lesen) .post-zeile > .pz-marker { grid-column: 1 / 3; grid-row: 3; }
  .post-raster:not(.mit-lesen) .post-zeile > .pz-wann { grid-column: 2; grid-row: 1; }
  .post-raster:not(.mit-lesen) .pz-mitte .pz-betreff { max-width: none; white-space: normal; }
}
.post-zeile:hover { background: var(--flaeche3); }
.post-zeile.aktiv { background: var(--gewaehlt); box-shadow: inset 3px 0 0 var(--blau); }
.post-zeile.neu .pz-von, .post-zeile.neu .pz-betreff { font-weight: 700; }
.post-zeile.neu { box-shadow: inset 3px 0 0 var(--blau-hell); }
.post-zeile.neu.aktiv { box-shadow: inset 3px 0 0 var(--blau); }
.pz-von { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--s-fliess); }
.pz-wann { font-size: var(--s-mini); color: var(--leise); white-space: nowrap; }
.pz-betreff { font-size: var(--s-fliess); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pz-vorschau { font-size: var(--s-klein); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pz-ki { color: var(--blau); }   /* 2.102: die KI-Zusammenfassung vor der echten Vorschau */
.pz-merker { color: var(--leise); font-size: var(--s-mini); display: inline-flex; align-items: center; gap: 2px; }
.pz-merker .ikon { width: 12px; height: 12px; }
.pz-marker .plakette { font-size: var(--s-mini); padding: 0 6px; }

/* Spalte 3: die geöffnete Nachricht */
.post-lesen { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--r-karte);
  padding: 14px 16px; min-width: 0; }
.pl-kopf h2 { margin: 0; font-size: var(--s-gross); overflow-wrap: anywhere; }
.pl-knoepfe { margin: 10px 0; }
.pl-knoepfe form { display: flex; gap: 6px; flex-wrap: wrap; }
.pl-wissen { background: var(--flaeche3); border: 1px solid var(--linie); border-radius: var(--r-klein);
  padding: 8px 10px; margin: 0 0 12px; }
.plw-zeile { display: flex; align-items: center; gap: 7px; font-size: var(--s-fliess); flex-wrap: wrap; }
.plw-zeile + .plw-zeile { margin-top: 4px; }
.plw-zeile .ikon { width: 16px; height: 16px; flex: none; color: var(--leise); }
.plw-auftraege { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 0 23px; }
.plw-auftrag { display: inline-flex; gap: 5px; align-items: baseline; background: var(--flaeche);
  border: 1px solid var(--linie); border-radius: var(--r-pille); padding: 2px 9px;
  font-size: var(--s-klein); text-decoration: none; color: var(--text); }
.plw-auftrag:hover { background: var(--gewaehlt); }

.post-html { width: 100%; height: min(70vh, 780px); border: 1px solid var(--linie);
  border-radius: var(--r-klein); background: #fff; }
.post-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: var(--s-fliess); line-height: 1.55;
  color: var(--text); background: var(--flaeche); border: 1px solid var(--linie);
  border-radius: var(--r-klein); padding: 12px 14px; }
.post-zitat { color: var(--leise); }

.pl-anhaenge { margin: 14px 0 0; }
.pl-anhaenge h3 { font-size: var(--s-klein); text-transform: uppercase; letter-spacing: .04em;
  color: var(--leise); margin: 0 0 6px; }
.pl-anhang { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--linie);
  border-radius: var(--r-klein); padding: 5px 10px; margin: 0 6px 6px 0; text-decoration: none;
  color: var(--text); font-size: var(--s-klein); background: var(--flaeche); }
.pl-anhang:hover { background: var(--gewaehlt); }
.pl-anhang .ikon { width: 15px; height: 15px; color: var(--leise); }
.pl-notiz { margin: 16px 0 0; border-top: 1px solid var(--linie); padding-top: 10px; }

/* Plakette für ein Postfach, das im Postkasten hängt */
.plakette.postkasten { background: var(--pl-gruen-bg); color: var(--pl-gruen-tx); }

/* ---------- Schreiben im Postkasten (2.44) ---------- */
.pl-antworten { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 8px; }
.karte.schreiben label { display: block; margin-bottom: 10px; }
.karte.schreiben label > span.klein { font-weight: 400; }
.schreiben-text { width: 100%; font-family: inherit; font-size: var(--s-fliess); line-height: 1.55;
  color: var(--text); background: var(--flaeche); border: 1px solid var(--linie);
  border-radius: var(--r-klein); padding: 12px 14px; resize: vertical; }
.schreiben-text:focus { outline: 2px solid var(--blau-hell); outline-offset: 1px; }

/* ---------- Spiele mit Tempo (2.61) ---------- */
/* Die Buehne ist eine Karte mit fester Bildhoehe; das Bild selbst zeichnet
   Tageslicht und bleibt deshalb in beiden Themen gleich. Alles darum herum
   folgt den Farbnamen. */
.spielkachel.arkade { display: flex; flex-direction: column; }
.spielkachel.arkade .arkade-art {
  font-size: var(--s-mini); text-transform: uppercase; letter-spacing: .08em;
  color: var(--leise); font-weight: 600;
}
.spielkachel.arkade a.knopf { margin-top: auto; align-self: flex-start; }

.spiel-buehne { position: relative; padding: 12px 14px 14px; }
.spiel-leiste {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding-bottom: 10px; border-bottom: 1px solid var(--linie); margin-bottom: 12px;
}
.spiel-stand { font-weight: 700; font-size: var(--s-gross); color: var(--blau); font-variant-numeric: tabular-nums; }
.spiel-leben { letter-spacing: 3px; font-size: 15px; }
.spiel-leben .an { color: var(--warn); }
.spiel-leben .aus { color: var(--linie); }
.spiel-uhr {
  margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 700;
  font-size: var(--s-gross); color: var(--blau);
}
.spiel-uhr.knapp { color: var(--warn); }

.spiel-flaeche { min-height: 240px; }
.spiel-leinwand { display: block; width: 100%; border-radius: var(--r-klein); background: #eef3f8; }
.spiel-auftrag { margin: 0 0 8px; font-size: var(--s-normal); }
.spiel-lage {
  margin: 12px 0 0; padding: 10px 12px; border-radius: var(--r-klein);
  background: var(--flaeche2); font-size: var(--s-normal);
}

.spiel-wahl { display: grid; gap: 8px; margin-top: 12px; }
.spiel-wahl.drei { grid-template-columns: repeat(3, 1fr); }
.spiel-wahl.lang { grid-template-columns: 1fr; }
.spiel-taste { display: flex; align-items: center; gap: 10px; text-align: left; width: 100%; }
.spiel-taste .taste-nr {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: var(--r-klein);
  background: var(--plakette-bg); color: var(--plakette-text);
  font-size: var(--s-mini); font-weight: 700;
}

.spiel-echo {
  margin-top: 12px; padding: 10px 12px; border-radius: var(--r-klein);
  border: 1px solid var(--linie); background: var(--flaeche2); font-size: var(--s-fliess);
}
.spiel-echo.gut { background: var(--ok-bg); border-color: var(--ok-rand); color: var(--ok-text); }
.spiel-echo.schlecht { background: var(--warn-bg); border-color: var(--warn-rand); color: var(--warn-text); }
.spiel-echo button { display: block; }

.spiel-deckel {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  gap: 4px; padding: 20px; background: var(--flaeche);
  border-radius: var(--r-karte); z-index: 2;
}
.spiel-deckel h2 { margin: 0; }
.spiel-deckel p { margin: 0; max-width: 46ch; }

.spiel-unten { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }

/* Tour packen */
.packen-feld { position: relative; height: 250px; border-radius: var(--r-klein); background: var(--flaeche2); overflow: hidden; }
.packen-karte {
  position: absolute; left: 50%; top: 0; transform: translate(-50%, 0);
  width: min(280px, 82%); padding: 10px 12px; border-radius: var(--r-klein);
  background: var(--flaeche); border: 2px solid var(--blau); box-shadow: 0 2px 8px var(--schatten);
}
.packen-karte.knapp { border-color: var(--warn); }
.packen-ziel { font-weight: 700; font-size: var(--s-gross); color: var(--blau); }
.packen-zeile { font-size: var(--s-klein); color: var(--leise); }

/* Ertrag oder Verlust */
.ertrag-reihe { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ertrag-karte {
  text-align: left; padding: 12px; border-radius: var(--r-klein);
  border: 2px solid var(--linie); background: var(--flaeche); cursor: pointer;
  font: inherit; color: inherit;
}
.ertrag-karte:hover:enabled { border-color: var(--blau); }
.ertrag-kopf { font-size: var(--s-mini); text-transform: uppercase; letter-spacing: .08em; color: var(--leise); font-weight: 600; }
.ertrag-weg { font-weight: 600; margin: 2px 0 4px; }
.ertrag-zahl { font-size: var(--s-normal); font-variant-numeric: tabular-nums; margin-top: 4px; }

/* Frist laeuft */
.frist-kopf { margin-bottom: 10px; }
.frist-gross { font-size: var(--s-titel); font-weight: 700; color: var(--blau); }
.frist-warnung { margin-top: 6px; color: var(--warn-text); font-size: var(--s-fliess); font-weight: 600; }
.frist-huelle { height: 8px; border-radius: var(--r-pille); background: var(--flaeche2); overflow: hidden; }
.frist-balken { height: 100%; width: 100%; background: var(--blau); }
.frist-balken.knapp { background: var(--warn); }

@media (max-width: 560px) {
  .spiel-wahl.drei { grid-template-columns: 1fr; }
  .ertrag-reihe { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .packen-karte { transition: none; }
}

/* 2.61: Nachbesserungen nach dem ersten Durchspielen */
.packen-boden {
  position: absolute; left: 0; right: 0; bottom: 0; height: 26px;
  display: flex; align-items: center; justify-content: center;
  background: var(--warn-bg); color: var(--warn-text);
  font-size: var(--s-mini); letter-spacing: .08em; text-transform: uppercase; font-weight: 600;
  border-top: 2px dashed var(--warn-rand);
}
.ertrag-karte { min-height: 190px; }
.ertrag-weg { font-size: var(--s-gross); }
.ertrag-zahl { font-size: var(--s-gross); margin-top: 8px; }
.ertrag-zahl strong { font-size: var(--s-zahl); color: var(--blau); }
.frist-huelle { margin: 12px 0 14px; }

/* 2.62: Postfach-Zugang - woran man ein fremdes Fach erkennt */
.post-fach-art {
  margin-left: auto; font-size: var(--s-mini); font-weight: 700;
  padding: 0 5px; border-radius: var(--r-klein);
  background: var(--plakette-bg); color: var(--plakette-text);
}
.post-fach-art.vertretung { background: var(--merk-bg); color: var(--merk-text); }
.zugang-haken { max-height: 190px; overflow-y: auto; border: 1px solid var(--linie);
  border-radius: var(--r-klein); padding: 8px 10px; }
.hinweis.merk { background: var(--merk-bg); border: 1px solid var(--merk-rand);
  color: var(--merk-text); border-radius: var(--r-klein); padding: 8px 12px; }

/* 2.62: Die Vorschau der nächsten fünf Tage hängt am Knopf in der Filterzeile
   und geht ÜBER der Tafel auf. Die Hülle ist null Pixel hoch - auf der Dispo
   ist Höhe das knappste Gut, und die Vorschau sieht man nicht den ganzen Tag. */
.vs-huelle { position: relative; height: 0; }
.vs-panel {
  position: absolute; top: 2px; left: 0; right: 0; z-index: 20;
  background: var(--flaeche); border: 1px solid var(--linie);
  border-radius: var(--r-karte); box-shadow: 0 8px 24px var(--schatten);
  padding: 12px 14px;
}
.vs-panel-kopf { display: flex; align-items: center; gap: 8px; }
.vs-panel-kopf strong { font-size: var(--s-gross); color: var(--blau); }
.vs-panel-kopf .klein { font-weight: 400; }
.vs-zu {
  margin-left: auto; border: 1px solid var(--linie); background: var(--flaeche);
  color: var(--leise); border-radius: var(--r-klein); cursor: pointer;
  padding: 2px 8px; font-size: var(--s-normal); line-height: 1.4;
}
.vs-zu:hover { color: var(--text); border-color: var(--blau); }
.vs-knopf[aria-expanded="true"] { background: var(--gewaehlt); border-color: var(--blau); }
@media (max-width: 700px) { .vs-panel { padding: 10px; } }

/* ---------- Schwebende Chat-Blase (2.77) ---------- */
/* Liegt auf jeder Seite. Standardplatz unten rechts; verschoben wird sie über
   left/top, deshalb sind right/bottom nur die Vorgabe. */
/* 2.102 (Design 10): Im Postkasten steht die Chatblase links unten - rechts
   verdeckte sie die Nachrichtenzahl und das Feld Wiedervorlage. */
body.seite-postkasten .chatblase { right: auto; left: 18px; }
/* 2.107 (Prüfbericht C, Ä8): Über 1440 px steht rechts unten die Boten-Karte -
   dort verdeckte die Blase „Alle Beförderer“ und die letzte Zeile der Liste.
   Wie im Postkasten steht sie dann links. Darunter ist die Karte eine
   Schublade (K1) und liegt ohnehin über der Blase - dort bleibt sie rechts,
   wo die Hand sie erwartet. */
@media (min-width: 1441px) { body.seite-dispo .chatblase { right: auto; left: 18px; } }
/* Und während jemand tippt, tritt sie zurück: In auftrag-neu.php lag sie über
   „Entfernen“ von Station 2, in auftrag.php über dem Feld „Nachricht an den
   Boten“. Sie bleibt anklickbar - der Mauszeiger holt sie sofort zurück. */
body:has(input:focus, textarea:focus, select:focus, [contenteditable]:focus) .chatblase { opacity: .16; }
.chatblase:hover, .chatblase:focus-within { opacity: 1 !important; }
.chatblase { transition: opacity .15s ease-out; }
.chatblase { position: fixed; right: 18px; bottom: 18px; z-index: 60;
             display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.chatblase .cb-knopf { width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: grab;
             background: var(--blau); color: #fff; box-shadow: 0 3px 12px rgba(0,0,0,.28);
             display: flex; align-items: center; justify-content: center; position: relative;
             touch-action: none; padding: 0; }
.chatblase .cb-knopf:active { cursor: grabbing; }
.chatblase .cb-knopf svg { width: 25px; height: 25px; }
.chatblase .cb-knopf.neu { background: var(--warn); }
/* 2.237 (Ticket #192, WWO): „Kommt eine neue Chatnachricht an, soll der Chatpunkt
   abwechselnd blinken, in Rot und Blau/Grau - je nach Standardfarben." Solange etwas
   Ungelesenes da ist, wechselt der Knopf zwischen Warnfarbe und seiner Grundfarbe. */
@keyframes cb-blinken { 0%, 49% { background: var(--warn); } 50%, 100% { background: var(--blau); } }
.chatblase .cb-knopf.neu { animation: cb-blinken 1.4s step-end infinite; }
.chatblase .cb-knopf.neu .cb-zahl { animation: none; }
.chatblase .cb-zahl { position: absolute; top: -3px; right: -3px; min-width: 19px; height: 19px;
             border-radius: 10px; background: var(--warn); color: #fff; font-size: 11.5px;
             font-weight: 700; line-height: 19px; padding: 0 5px; border: 2px solid var(--flaeche); }
.chatblase .cb-knopf.neu .cb-zahl { background: #fff; color: var(--warn); border-color: var(--warn); }
@keyframes cb-wink { 0%,100% { transform: scale(1); } 30% { transform: scale(1.18); } 60% { transform: scale(.96); } }
.chatblase .cb-knopf.wink { animation: cb-wink .5s ease-in-out 2; }
.chatblase .cb-knopf.neu.wink { animation: cb-blinken 1.4s step-end infinite, cb-wink .5s ease-in-out 2; }
@media (prefers-reduced-motion: reduce) { .chatblase .cb-knopf.wink, .chatblase .cb-knopf.neu { animation: none; } }
.chatblase .cb-fenster { width: min(380px, calc(100vw - 24px)); height: min(520px, calc(100vh - 120px));
             background: var(--flaeche); border: 1px solid var(--linie); border-radius: 12px;
             box-shadow: 0 8px 28px rgba(0,0,0,.24); overflow: hidden; display: flex; flex-direction: column; }
.chatblase .cb-kopf { display: flex; justify-content: space-between; align-items: center;
             padding: 7px 10px; border-bottom: 1px solid var(--linie); background: var(--flaeche2); }
.chatblase .cb-kopf button { border: 1px solid var(--linie); background: var(--flaeche); color: var(--leise);
             border-radius: 7px; padding: 2px 9px; font-size: 14px; line-height: 1.3; margin-left: 4px; }
.chatblase .cb-rahmen { flex: 1; width: 100%; border: 0; }
/* Auf dem Handy nimmt das Fenster die Breite - ein 380er Kasten neben dem Rand
   wäre dort unbedienbar. */
@media (max-width: 560px) {
  .chatblase { left: 10px !important; right: 10px !important; top: auto !important; bottom: 12px !important; }
  .chatblase .cb-fenster { width: calc(100vw - 20px); height: calc(100vh - 130px); }
}
@media print { .chatblase { display: none; } }

/* Firmen-Trennstrich in der Postfachspalte (2.80) */
.post-firma { font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
              color: var(--leise); padding: 10px 8px 3px; border-top: 1px solid var(--linie); margin-top: 4px; }
.post-ordner > .post-firma:first-child { border-top: 0; margin-top: 0; padding-top: 4px; }

/* Signaturvorschau beim Schreiben (2.82) */
.sig-vorschau { margin: 8px 0 0; }
.sig-rahmen { border: 1px dashed var(--linie); border-radius: 9px; padding: 10px 12px;
              background: var(--flaeche3); margin-top: 4px; max-height: 190px; overflow: auto; }
.sig-rahmen img { max-height: 38px; }


/* ===== 2.85: Menue mit Unterreitern ===== */
/* Die Gruppen klappen nach RECHTS auf, vom linken Rand ihres Knopfes aus - nur
   „Mehr“ haengt weiter am rechten Rand der Leiste. Bis 2.84 klappte alles nach
   links, weil es nur einen einzigen Sammelpunkt ganz rechts gab; bei „Dispo“
   waere das Menue damit aus dem Fenster gelaufen. */
.kopf nav .nav-gruppe .nav-klapp { left: 0; right: auto; }
.kopf nav .nav-gruppe.nav-rechts .nav-klapp { left: auto; right: 0; }
/* ---- Menü: eine Stelle für die Beschriftung (2.107, Prüfbericht C, Ä7) ----
   Bis 2.106 regelten fünf Media-Regeln in vier Blöcken dasselbe; wirksam war
   nur die letzte, und unter 900 px blieben acht Symbole ohne ein einziges Wort
   stehen (nur `title` – auf einem Tablet nie sichtbar). Jetzt gilt:
     • ab 901 px: Symbol und Name nebeneinander, wie gewohnt.
     • bis 900 px: Name UNTER das Symbol, kleiner – statt ihn wegzunehmen.
       Zwei Reihen Symbole ohne Wort kosten genauso viel Höhe wie eine Reihe
       mit Wort und sagen nichts.
   Der Zähler (.nav-zahl) bleibt in jeder Breite sichtbar. */
@media (max-width: 900px) {
  .kopf nav a, .kopf nav .nav-gruppe > summary {
    flex-direction: column; gap: var(--a-1); padding: var(--a-3) var(--a-5);
    line-height: 1.15; text-align: center;
  }
  .kopf nav a span:not(.nav-zahl), .kopf nav .nav-gruppe > summary span:not(.nav-zahl) {
    font-size: var(--s-mini); letter-spacing: -.01em;
  }
  .nav-ikon { width: 20px; height: 20px; }
  /* Im aufgeklappten Untermenü stehen Symbol und Name wieder nebeneinander. */
  .kopf nav .nav-klapp a { flex-direction: row; text-align: left; padding: var(--a-4) var(--a-6); }
  .kopf nav .nav-klapp a span:not(.nav-zahl) { font-size: var(--s-fliess); }
}
/* 2.107 (Prüfbericht C, Ä6): Auf dem Handy stand das Menü in ZWEI Reihen und
   kostete zusammen mit der Logoleiste rund 260 Pixel Kopf – auf jeder Seite.
   Die Logos sind in die Fußzeile gewandert; das Menü steht jetzt in EINER Reihe
   und lässt sich seitwärts wischen. Nichts ist versteckt (ein Menüknopf hätte
   acht Punkte hinter einem Klick verborgen), und der Punkt, auf dem man steht,
   wird beim Laden in Sicht gerollt (kopf.php). */
@media (max-width: 560px) {
  .kopf nav { flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain;
              scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .kopf nav::-webkit-scrollbar { display: none; }
  .kopf nav > a, .kopf nav > .nav-gruppe { flex: 0 0 auto; scroll-margin-inline: 24px; }
  .kopf nav a, .kopf nav .nav-gruppe > summary { padding: var(--a-3) var(--a-4); }
  /* Ein Untermenü in einem Rollbehälter würde abgeschnitten - deshalb hängt es
     hier am Fenster statt am Knopf. */
  .kopf nav .nav-gruppe .nav-klapp { position: fixed; left: 8px; right: 8px; width: auto; max-height: 60vh; overflow-y: auto; }
}
/* Der Zaehler am zugeklappten Menue ist die Summe seiner Kinder. */
.nav-mehr > summary .nav-zahl { margin-left: 2px; }
.nav-klapp a .nav-zahl { margin-left: auto; }

/* ---------- 2.94: Postkasten - Auswahl, Sammelleiste, Menue, Hinweis ---------- */
/* Das Kaestchen liegt links neben der Zeile; der Platz dafuer entsteht ueber den Rand. */
.post-zeile { position: relative; padding-left: 34px; outline: none; }
.post-zeile:focus-visible { box-shadow: inset 0 0 0 2px var(--blau); }
.pz-wahl { position: absolute; left: 11px; top: 11px; width: 15px; height: 15px; border: 1.5px solid var(--linie-stark, #9aa6b8);
  border-radius: 4px; background: var(--flaeche); cursor: pointer; }
.pz-wahl[aria-checked="true"] { background: var(--blau); border-color: var(--blau); }
.pz-wahl[aria-checked="true"]::after { content: ""; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.post-zeile:hover .pz-wahl { border-color: var(--blau); }
.post-zeile.gewaehlt { background: var(--gewaehlt); }
.post-zeile.gewaehlt.neu, .post-zeile.gewaehlt { box-shadow: inset 3px 0 0 var(--blau); }
.post-liste.pk-wartet { opacity: .6; pointer-events: none; }
.pk-leiste { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; padding: 6px 10px;
  background: var(--gewaehlt); border-bottom: 1px solid var(--linie); font-size: 12.5px; }
.pk-leiste .pk-zahl { font-weight: 700; margin-right: 4px; }
.pk-leiste button { font: inherit; padding: 3px 9px; border: 1px solid var(--linie); border-radius: var(--r-klein);
  background: var(--flaeche); color: var(--text); cursor: pointer; }
.pk-leiste button:hover { border-color: var(--blau); }
.pk-leiste .pk-rot { color: var(--warn-text); }
.pk-leiste .pk-x { margin-left: auto; }
.pk-menu { position: fixed; z-index: 1200; min-width: 200px; max-height: 80vh; overflow-y: auto; padding: 4px;
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--r-karte);
  box-shadow: 0 10px 30px var(--schatten); font-size: 13px; }
.pk-menu button { display: block; width: 100%; text-align: left; font: inherit; padding: 6px 12px; border: 0;
  background: none; color: var(--text); border-radius: var(--r-klein); cursor: pointer; }
.pk-menu button:hover, .pk-menu button:focus { background: var(--gewaehlt); outline: none; }
.pk-menu .pk-einzug { padding-left: 22px; }
.pk-menu .pk-rot { color: var(--warn-text); }
.pk-menu .pk-kopf { padding: 6px 12px 2px; color: var(--leise); font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; }
.pk-menu .pk-trenner { height: 1px; background: var(--linie); margin: 4px 6px; }
.pk-toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 1300; display: flex; gap: 12px;
  align-items: center; padding: 10px 16px; background: var(--blau); color: #fff; border-radius: var(--r-pille);
  box-shadow: 0 10px 30px var(--schatten); font-size: 13.5px; max-width: min(92vw, 640px); }
.pk-toast.warn { background: var(--warn); }
.pk-toast button { font: inherit; font-weight: 700; padding: 4px 12px; border: 1px solid rgba(255,255,255,.6); border-radius: var(--r-pille);
  background: rgba(255,255,255,.14); color: #fff; cursor: pointer; }
.pk-toast button.pk-x { padding: 2px 9px; font-weight: 400; opacity: .8; }   /* 2.102: Hinweis von Hand schliessen */
@media (prefers-reduced-motion: no-preference) { .pk-toast { animation: pk-auf .18s ease-out; } }
@keyframes pk-auf { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------- 2.108: Papierkorb endgültig leeren ---------- */
/* Der Knopf steht in der Filterzeile über der Liste - nur im Papierkorb und im
   Spam-Ordner, überall sonst gibt es ihn gar nicht. Rot, aber nicht gefüllt:
   er soll auffindbar sein, nicht anziehend. */
.pk-leeren { font: inherit; font-size: 12px; padding: 2px 10px; margin-left: 8px; cursor: pointer;
  border: 1px solid var(--warn-text); border-radius: var(--r-pille); background: transparent; color: var(--warn-text); }
.pk-leeren:hover:not(:disabled) { background: var(--warn-bg); }
.pk-leeren:disabled { opacity: .6; cursor: default; }

/* Die Sicherheitsfrage vor dem endgültigen Löschen. Ein eigener Kasten statt
   window.confirm(): hier steht in zwei Sätzen, was gleich passiert. */
.pk-frage { position: fixed; inset: 0; z-index: 1400; background: rgba(15, 25, 40, .42);
  display: flex; align-items: center; justify-content: center; padding: 18px; }
.pk-frage-karte { background: var(--karte); color: var(--text); border-radius: var(--r-karte);
  box-shadow: 0 18px 50px var(--schatten); padding: 20px 22px; max-width: 460px; }
.pk-frage-karte h3 { margin: 0 0 8px; font-size: 16px; }
.pk-frage-karte p { margin: 0 0 16px; font-size: 13.5px; line-height: 1.5; }
.pk-frage-knoepfe { display: flex; gap: 10px; justify-content: flex-end; }
.pk-frage-knoepfe button { font: inherit; padding: 6px 14px; border-radius: var(--r-pille); cursor: pointer;
  border: 1px solid var(--rand); background: var(--karte); color: var(--text); }
.pk-frage-knoepfe button.pk-rot { background: #b3261e; border-color: #b3261e; color: #fff; font-weight: 700; }
.pk-frage-knoepfe button:focus-visible { outline: 2px solid var(--blau); outline-offset: 2px; }
@media (prefers-reduced-motion: no-preference) { .pk-frage-karte { animation: pk-auf .16s ease-out; } }

/* ---------- 2.95: Ziehen auf Ordner, Papierkorb ---------- */
.post-ordner-zeile.pk-ziel { background: var(--gewaehlt); box-shadow: inset 0 0 0 2px var(--blau); }
body.pk-zieht .post-ordner-zeile { transition: background .1s; }
.pk-schild { position: fixed; top: -100px; left: -100px; padding: 4px 10px; background: var(--blau); color: #fff;
  border-radius: var(--r-pille); font-size: 12.5px; font-weight: 700; pointer-events: none; }
.post-ordner-zeile.art-papierkorb .po-name { color: var(--leise); }
.post-ordner-zeile.art-papierkorb .po-name::before { content: "🗑 "; font-size: 11px; }

/* ---------- 2.96: Schreiben im eigenen Fenster ---------- */
.pk-fenster { position: fixed; inset: 0; z-index: 1100; background: rgba(15, 25, 40, .38); display: flex; align-items: flex-end; justify-content: flex-end; padding: 18px; }
.pk-fenster-rahmen { width: min(960px, 100%); max-height: calc(100vh - 36px); display: flex; flex-direction: column;
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--r-karte); box-shadow: 0 24px 60px var(--schatten); overflow: hidden; }
.pk-fenster-kopf { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px 8px 16px;
  background: var(--blau); color: #fff; font-weight: 700; }
.pk-fenster-knoepfe button { font: inherit; padding: 2px 9px; border: 1px solid rgba(255,255,255,.5); border-radius: var(--r-klein);
  background: rgba(255,255,255,.12); color: #fff; cursor: pointer; margin-left: 4px; }
.pk-fenster-inhalt { overflow: auto; padding: 12px 14px; }
.pk-fenster-inhalt .karte.schreiben { max-width: none !important; border: 0; box-shadow: none; padding: 0; margin: 0; }
.pk-fenster-inhalt .schreiben-text { height: 240px; min-height: 140px; resize: vertical; }
body.pk-fenster-offen { overflow: hidden; }
@media (max-width: 700px) { .pk-fenster { padding: 0; } .pk-fenster-rahmen { max-height: 100vh; border-radius: 0; } }
@media (prefers-reduced-motion: no-preference) { .pk-fenster-rahmen { animation: pk-fenster-auf .16s ease-out; } }
@keyframes pk-fenster-auf { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* 2.99: Das Sprechfenster im Postkasten (nur Geschaeftsfuehrung)
   2.100: eine Zeile in der Kopfleiste statt eines Kastens in der Spalte -
   die Antwort klappt darunter auf und legt sich ueber die Seite. */
.pk-sprech { position: relative; flex: 1 1 320px; min-width: 220px; max-width: 520px; }
.pk-sprech-form { display: flex; gap: 6px; align-items: center; }
.pk-sprech-marke { flex: none; font-size: 11px; font-weight: 700; letter-spacing: .5px; color: var(--blau);
  border: 1px solid var(--linie); border-radius: 999px; padding: 2px 8px; background: var(--flaeche3); cursor: help; }
.pk-sprech-form input { flex: 1; min-width: 0; font-size: 13px; padding: 5px 8px; }
.pk-sprech-form button { padding: 4px 10px; white-space: nowrap; }
.pk-sprech.wartet .pk-sprech-form { opacity: .55; pointer-events: none; }
.pk-sprech-antwort { position: absolute; z-index: 60; top: calc(100% + 5px); left: 0; right: 0; min-width: 300px;
  padding: 8px 10px; border-radius: 8px; background: var(--flaeche); border: 1px solid var(--linie);
  box-shadow: 0 8px 24px rgba(16, 26, 40, .18); font-size: 13px; line-height: 1.4; }
@media (max-width: 700px) { .pk-sprech { max-width: none; } .pk-sprech-antwort { position: static; box-shadow: none; margin-top: 6px; } }
.pk-sprech-antwort.warn { border-color: #d9a441; }
.pk-sprech-antwort .pks-satz { margin: 0 0 4px; }
/* 2.101: Die Rueckfrage und das Feld, in das man ihr antwortet. */
.pk-sprech-antwort .pks-bisher { margin: 0 0 4px; color: var(--leise); font-size: 12px; }
.pk-sprech-antwort .pks-rueckfrage { font-weight: 600; }
.pk-sprech-antwort .pks-antwortzeile { display: flex; gap: 6px; margin: 6px 0 8px; }
.pk-sprech-antwort .pks-antwortzeile input { flex: 1; min-width: 0; font-size: 13px; padding: 5px 8px; }
.pk-sprech-antwort .pks-antwortzeile button { padding: 4px 10px; white-space: nowrap; }
.pk-sprech-antwort .pks-vorschau { margin: 0 0 6px; font-weight: 600; }
.pk-sprech-antwort ul.pks-liste { margin: 0 0 8px; padding-left: 16px; }
.pk-sprech-antwort ul.pks-liste li { margin: 0 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-sprech-antwort .pks-knoepfe { display: flex; flex-wrap: wrap; gap: 6px; }
.pk-sprech-antwort .pks-knoepfe button, .pk-sprech-antwort .pks-knoepfe .knopf { padding: 4px 10px; font-size: 13px; line-height: 1.3; }
.pk-sprech-antwort .pks-knoepfe button.pk-rot { background: #b3261e; border-color: #b3261e; color: #fff; }   /* 2.102 (Design 6): Loeschen ist rot */
.schreiben-vorschlag { display: block; margin: 4px 0 6px; font-weight: 400; }   /* 2.102 (Design 7) */
.pk-sprech-antwort .pks-modell { display: block; margin-top: 6px; color: var(--leise); font-size: 11px; }

/* ============================================================
   2.105 – Arbeitsplatz „Telefon & Dispo“ (Probe, Vorschlag 3)
   Drei Spalten: Liste · Vorgang · Handlung. Die Spalten laden nach,
   die Seite nie. Farben der Arten wie auf der Tafel (--kat-*).
   ============================================================ */
body.seite-arbeitsplatz .inhalt { padding: 10px 14px 20px; }
.ap { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr) minmax(260px, 330px); gap: 14px; align-items: start; }
.ap-probe { grid-column: 1 / -1; margin: 0 0 4px; font-size: 13px; color: var(--leise); }
@media (max-width: 1100px) { .ap { grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); } .ap-handlung { grid-column: 1 / -1; } }
@media (max-width: 700px) { .ap { grid-template-columns: minmax(0, 1fr); } }
.ap-liste, .ap-vorgang, .ap-handlung { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 10px; min-width: 0; }
.ap-liste { display: flex; flex-direction: column; max-height: calc(100vh - 150px); }
.ap-liste-kopf { padding: 10px 10px 6px; border-bottom: 1px solid var(--linie); display: flex; flex-direction: column; gap: 6px; }
.ap-tag { display: flex; gap: 4px; align-items: center; }
.ap-tag input[type=date] { width: auto; flex: 1; }
.ap-tag button { padding: 4px 9px; }
.ap-filter { display: flex; flex-direction: column; gap: 6px; }
.ap-arten { display: flex; flex-wrap: wrap; gap: 4px; }
.ap-art { border: 1px solid var(--linie); background: var(--flaeche); color: var(--text); border-radius: 999px; padding: 2px 10px; font-size: 12.5px; cursor: pointer; --kat-farbe: var(--leise); --kat-bg: var(--flaeche2, #f0f2f5); }
.ap-art.kat-kurier { --kat-farbe: var(--kat-kurier); --kat-bg: var(--kat-kurier-bg); }
.ap-art.kat-zustellung { --kat-farbe: var(--kat-zustellung); --kat-bg: var(--kat-zustellung-bg); }
.ap-art.kat-spedition { --kat-farbe: var(--kat-spedition); --kat-bg: var(--kat-spedition-bg); }
.ap-art.kat-dienstleistung { --kat-farbe: var(--kat-dienstleistung); --kat-bg: var(--kat-dienstleistung-bg); }
.ap-art::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--kat-farbe); margin-right: 5px; vertical-align: 1px; }
.ap-art[data-art=""]::before { display: none; }
.ap-art.an { background: var(--kat-bg); border-color: var(--kat-farbe); color: var(--text); font-weight: 600; }
.ap-liste-zeile { display: flex; justify-content: space-between; align-items: center; }
.ap-liste-zeile .knopf { padding: 4px 12px; }
.ap-zeilen { overflow: auto; flex: 1; min-height: 200px; }
.ap-zeile { display: grid; grid-template-columns: minmax(48px, max-content) minmax(0, 1fr) auto; grid-template-rows: auto auto; gap: 1px 8px; padding: 4px 9px 4px 7px; border-left: 4px solid var(--kat-farbe, var(--linie)); border-bottom: 1px solid var(--linie); cursor: pointer; font-size: 13px; line-height: 1.25; align-items: baseline; }
.ap-zeile.kat-kurier { --kat-farbe: var(--kat-kurier); --kat-bg: var(--kat-kurier-bg); }
.ap-zeile.kat-zustellung { --kat-farbe: var(--kat-zustellung); --kat-bg: var(--kat-zustellung-bg); }
.ap-zeile.kat-spedition { --kat-farbe: var(--kat-spedition); --kat-bg: var(--kat-spedition-bg); }
.ap-zeile.kat-dienstleistung { --kat-farbe: var(--kat-dienstleistung); --kat-bg: var(--kat-dienstleistung-bg); }
.ap-zeile:hover { background: var(--kat-bg); }
.ap-zeile.aktiv { background: var(--kat-bg); box-shadow: inset 0 0 0 1px var(--kat-farbe); }
.ap-zeile:focus-visible { outline: 2px solid var(--blau); outline-offset: -2px; }
.ap-z-zeit { font-variant-numeric: tabular-nums; color: var(--text); font-weight: 600; }
.ap-z-zeit b { color: var(--kat-zustellung); margin-left: 2px; }
.ap-z-kunde { font-weight: 600; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-zeile .plakette { font-size: 10.5px; padding: 1px 6px; justify-self: end; }
.ap-z-nr { font-size: 11px; color: var(--leise); font-variant-numeric: tabular-nums; }
.ap-z-weg { color: var(--leise); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; min-width: 0; }
.ap-z-weg i { font-style: normal; opacity: .8; }
.ap-z-bote { font-size: 11.5px; color: var(--leise); white-space: nowrap; justify-self: end; max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.ap-z-bote .preis-fehlt { color: var(--warn-text, #a33); font-weight: 600; }   /* 2.251 (A4) */
/* 2.106, nur Telefon & Dispo: drei Zeilen je Auftrag – Zeit · Kunde · Stand / Straße, Ort → Straße, Ort / Nummer · Empfänger · Bote · Preis.
   Die anderen Arbeitsplätze behalten die zwei Zeilen; ihre Listen sind anders geschnitten. */
body.seite-arbeitsplatz .ap { grid-template-columns: minmax(320px, 430px) minmax(0, 1fr) minmax(260px, 330px); }
body.seite-arbeitsplatz .ap-zeile { grid-template-rows: auto auto auto; }
body.seite-arbeitsplatz .ap-z-zeit { grid-row: 1; grid-column: 1; }
body.seite-arbeitsplatz .ap-z-kunde { grid-row: 1; grid-column: 2; }
body.seite-arbeitsplatz .ap-zeile .plakette { grid-row: 1; grid-column: 3; }
body.seite-arbeitsplatz .ap-z-weg { grid-row: 2; grid-column: 2 / 4; color: var(--text); white-space: normal; text-overflow: clip; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.2; }
body.seite-arbeitsplatz .ap-z-weg i { color: var(--leise); opacity: 1; }
body.seite-arbeitsplatz .ap-z-nr { grid-row: 3; grid-column: 1 / 3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.seite-arbeitsplatz .ap-z-bote { grid-row: 3; grid-column: 3; max-width: 190px; }
.ap-zeile.ap-anfrage { --kat-farbe: var(--blau); --kat-bg: var(--flaeche2, #eef3fa); }
.plakette.anfrage { background: var(--blau); color: #fff; }
/* „Wie früher“: Stichwort → die letzten Aufträge dazu, jeder mit „Neu wie dieser“ */
/* 2.241: Wer ruft an? - Feld links oben und die Anruf-Karte in der Mitte */
.ap-anruf-zeile { display: flex; gap: 4px; }
.ap-anruf-zeile input { flex: 1; min-width: 0; }
.ap-anruf-zeile button { padding: 4px 10px; }
.ap-anrufkarte { display: flex; flex-direction: column; gap: 8px; }
.ap-anrufkarte h3 { margin: 4px 0 0; font-size: 20px; }
.ap-anrufkarte h4 { margin: 10px 0 2px; font-size: var(--s-klein); text-transform: uppercase; letter-spacing: .05em; color: var(--leise); }
.ap-anrufkarte p { margin: 0; }
.ap-anruf-kopf { font-size: 15px; }
.ap-anruf-hoerer { display: inline-block; color: var(--gruen, #1e7f4f); font-size: 18px; }
.ap-anruf-kn { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.ap-anruf-liste { display: flex; flex-direction: column; gap: 4px; }
.ap-anruf-auftrag, .ap-anruf-wahl { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 7px 10px;
  border: 1px solid var(--linie); border-radius: 6px; background: var(--flaeche); color: var(--text); font: inherit; font-size: 14px; cursor: pointer; width: 100%; }
.ap-anruf-wahl { flex-direction: row; justify-content: space-between; align-items: center; cursor: default; }
.ap-anruf-wahl > span { display: flex; flex-direction: column; }
.ap-anruf-auftrag:hover, .ap-anruf-auftrag:focus-visible { border-color: var(--akzent, #1f3a5f); }
.ap-st-kn .ap-st-haus { font-size: 15px; }
/* 2.242: Netzsuche für unbekannte Anrufer */
.ap-netz { border-top: 1px dashed var(--linie); padding-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.ap-netz:empty { display: none; }
.ap-netz-treffer { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 10px; border: 1px solid var(--linie); border-radius: 6px; background: var(--flaeche); }
.ap-netz-treffer a { color: inherit; }
.ap-netz-laeuft { display: flex; align-items: center; gap: 6px; }
.ap-netz-punkt { width: 8px; height: 8px; border-radius: 50%; background: var(--blau, #1f6feb); animation: ap-netz-puls 1.2s ease-in-out infinite; }
@keyframes ap-netz-puls { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ap-netz-punkt { animation: none; } }
.ap-wiefrueher { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--linie); }
.ap-wiefrueher label { display: block; margin-bottom: 6px; color: var(--text); }
.ap-wiefrueher input { max-width: 360px; font-size: 15px; }
.ap-vorlagen { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.ap-vorlage { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 10px; border: 1px solid var(--linie); border-left: 4px solid var(--kat-farbe, var(--linie)); border-radius: 6px; background: var(--flaeche); color: var(--text); font-size: 13px; }
.ap-vorlage.kat-kurier { --kat-farbe: var(--kat-kurier); }
.ap-vorlage.kat-zustellung { --kat-farbe: var(--kat-zustellung); }
.ap-vorlage.kat-spedition { --kat-farbe: var(--kat-spedition); }
.ap-vorlage.kat-dienstleistung { --kat-farbe: var(--kat-dienstleistung); }
.ap-vorlage-kn { display: flex; gap: 6px; flex-shrink: 0; }
.ap-vorlage-kn .knopf { padding: 4px 10px; font-size: 12.5px; }
.ap-anfrage-daten { display: grid; grid-template-columns: max-content 1fr; gap: 3px 12px; margin: 6px 0 10px; font-size: 13.5px; }
.ap-anfrage-daten dt { color: var(--leise); }
.ap-anfrage-daten dd { margin: 0; }
.ap-kundentext, .kundentext { margin: 0 0 8px; padding: 8px 10px; border-left: 4px solid var(--pl-gelb-tx); background: var(--pl-gelb-bg); color: var(--text); border-radius: 6px; font-size: 13.5px; }
.plakette.kundentext { background: var(--pl-gelb-bg); color: var(--pl-gelb-tx); max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-anfrage-text { white-space: pre-wrap; font: inherit; font-size: 13px; background: var(--flaeche2, #f4f5f7); border: 1px solid var(--linie); border-radius: 6px; padding: 10px; max-height: 50vh; overflow: auto; }
.ap-leer { padding: 16px; color: var(--leise); }
.ap-vorgang { padding: 12px 14px; }
.ap-vkopf { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.ap-vkopf .ap-nr { font-size: 17px; font-weight: 600; }
.ap-vkopf-rechts { display: flex; gap: 6px; align-items: end; }
.ap-vkopf-rechts select { width: auto; }
.ap-vkopf-rechts .ap-produktwahl { margin: 0; font-size: 11.5px; display: flex; flex-direction: column; gap: 2px; }   /* 2.264 (#212): Beschriftung „Produkt“ */
.ap-felder { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 10px; margin-bottom: 8px; }
.ap-felder label { margin: 0; font-size: 12.5px; }
.ap-felder .ap-breit { grid-column: 1 / -1; }
.ap-kunde-feld { grid-column: span 2; }
.ap-kontakt-neu { grid-column: 1 / -1; display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 8px; align-items: end; padding: 8px; border: 1px dashed var(--linie); border-radius: 8px; }
.ap-kontakt-neu .ap-kontakt-hinweis { grid-column: 1 / -1; }
@media (max-width: 900px) { .ap-felder { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ap-kontakt-neu { grid-template-columns: 1fr 1fr; } }
/* 2.263 (Tickets #209/#210): Beförderer, Produkt und Einkauf im Erfassungsformular */
.ap-bef-block { padding: 8px 8px 6px; border: 1px solid var(--linie); border-radius: 8px; background: var(--flaeche, #fafafa); }
.ap-bef-block .ap-bef-feld { grid-column: 1 / 3; }
.ap-bef-block .ap-bef-chips { display: flex; gap: 6px; align-items: end; flex-wrap: wrap; padding-bottom: 2px; }
.ap-bef-block .ap-bef-chips .leise { padding: 4px 8px; font-size: 12px; }
.ap-bef-neu { grid-column: 1 / -1; display: grid; grid-template-columns: 2fr 1fr 70px 1fr 1fr 1fr auto; gap: 8px; align-items: end; padding: 8px; border: 1px dashed var(--linie); border-radius: 8px; }
.ap-bef-neu .ap-bef-neu-hinweis { grid-column: 1 / -1; }
.ap-ekquelle { display: block; min-height: 1em; }
@media (max-width: 900px) { .ap-bef-block .ap-bef-feld { grid-column: 1 / -1; } .ap-bef-neu { grid-template-columns: 1fr 1fr; } }
.ap-stationen { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 4px 0 10px; }
@media (max-width: 700px) { .ap-stationen { grid-template-columns: minmax(0, 1fr); } }
.ap-station { border: 1px solid var(--linie); border-radius: 8px; padding: 8px 10px 10px; margin: 0; display: flex; flex-direction: column; gap: 6px; position: relative; }
.ap-station legend { font-weight: 600; padding: 0 4px; }
.ap-station input { width: 100%; }
.ap-plzort { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 6px; }
.ap-station .ap-kundenadresse { align-self: flex-start; padding: 3px 9px; font-size: 12.5px; }
.ap-station .ap-treffer { position: absolute; left: 8px; right: 8px; top: 62px; z-index: 30;
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: 10px; box-shadow: 0 6px 20px var(--schatten); max-height: 320px; overflow-y: auto; }
.ap-station .ap-treffer div.t { padding: 8px 12px; cursor: pointer; border-bottom: 1px solid var(--linie); font-size: 15px; line-height: 1.35; }
.ap-station .ap-treffer div.t strong { display: block; font-weight: 600; }
.ap-station .ap-treffer div.t span { color: var(--leise); font-size: 12.5px; }
.ap-mehrstationen { grid-column: 1 / -1; margin: 0; }
.ap-knoepfe { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-top: 6px; border-top: 1px solid var(--linie); }
.ap-meldung { font-size: 13px; }
.ap-meldung.ok { color: var(--ok-text, #1a7f37); }
.ap-meldung.warn { color: var(--warn-text); background: none; border: 0; padding: 0; }
.ap-preisquelle, .ap-kmhinweis { display: block; margin-top: 2px; font-weight: 400; }
.ap-verlauf { margin-top: 12px; }
.ap-verlauf h3 { font-size: 13px; margin: 0 0 4px; color: var(--leise); text-transform: uppercase; letter-spacing: .03em; }
.ap-verlauf ul { list-style: none; padding: 0; margin: 0; font-size: 12.5px; }
.ap-verlauf li { padding: 3px 0; border-top: 1px solid var(--linie); }
.ap-handlung { padding: 10px 12px; display: flex; flex-direction: column; gap: 10px; position: sticky; top: 8px; }
.ap-h h3 { margin: 0 0 6px; font-size: 15px; }
.ap-h-zeile { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; align-items: center; }
.ap-h-zeile .knopf, .ap-h-zeile .leise { padding: 5px 11px; }
.ap-rot { color: var(--warn-text); }
/* 2.281 (Prüfung Auftragsannahme): Rückfrage in der Seite statt im Browser-Fenster - ähnlicher Kunde, Datum,
   inzwischen geändert, ungespeicherte Eingaben, Stornogrund. Steht im Formular über den Knöpfen, in der rechten
   Spalte oben. */
.ap-rueckfrage { border: 1px solid var(--warn-rand); background: var(--warn-bg); color: var(--text); border-radius: 8px;
  padding: 10px 12px; margin: 8px 0; }
.ap-rueckfrage p { margin: 0 0 8px; font-size: 14px; line-height: 1.4; }
.ap-rueckfrage-feld { width: 100%; margin: 0 0 8px; }
.ap-rueckfrage-knoepfe { display: flex; flex-wrap: wrap; gap: 8px; }
.ap-handlung .ap-rueckfrage { margin: 0 0 10px; }
.knopf.ap-rot-voll { background: var(--warn-text); border-color: var(--warn-text); color: #fff; }
/* Ein Zeit- oder Zahlenfeld, das sich nicht lesen lässt (E1/E2) - rot, bis es berichtigt ist */
input.ap-unlesbar, .ap-st input.ap-unlesbar { border-color: var(--warn-text); background: var(--warn-bg); }
.ap-laeuft { margin: 6px 0; }
.ap-bote { margin: 0 0 4px; }
.ap-zuteil { display: flex; flex-direction: column; gap: 6px; }
.ap-vorschlaege { display: flex; flex-direction: column; gap: 4px; }
/* 2.250 (F3): Wagennummer vor dem Fahrernamen in den Zuteil-Treffern, wie die Chips der Tafel */
.ap-zuteil .treffer .wagen-chip { display: inline-block; min-width: 26px; padding: 0 6px; border-radius: 10px; background: var(--blau); color: #fff; font-size: 12px; font-weight: 700; text-align: center; line-height: 18px; vertical-align: 1px; }
.ap-vorschlag { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--linie); border-radius: 8px; font-size: 13px; }
.ap-vorschlag.frei { border-color: var(--kat-spedition); background: var(--kat-spedition-bg); }
.ap-vorschlag .klein { display: block; }
.ap-vorschlag button { padding: 3px 10px; white-space: nowrap; }
.ap-wartet { opacity: .6; pointer-events: none; }
.ap-frei summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.ap-frei-form { display: grid; grid-template-columns: minmax(0, 1fr) 90px; gap: 6px; margin-top: 6px; }
.ap-frei-form .ap-frei-ort { grid-column: 1 / -1; }
.ap-frei-form button { grid-column: 1 / -1; }
.ap-toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 400; padding: 9px 16px; border-radius: 8px; font-size: 14px; box-shadow: 0 6px 20px var(--schatten); max-width: min(90vw, 560px); }
.ap-toast.ok { background: var(--ok-bg, #e6f4ea); color: var(--ok-text, #1a7f37); border: 1px solid var(--ok-text, #1a7f37); }
.ap-toast.warn { background: var(--warn-bg); color: var(--warn-text); border: 1px solid var(--warn-rand); }
/* 2.274 (Ticket #229): „Transportauftrag … schicken?“ nach dem Zuteilen am Arbeitsplatz - bleibt stehen bis Ja/Nein */
.ap-versand { position: fixed; left: 50%; bottom: 72px; transform: translateX(-50%); z-index: 401; display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center;
  padding: 12px 16px; border-radius: 10px; background: var(--karte, #fff); color: var(--text, #1c2430); border: 2px solid var(--blau);
  box-shadow: 0 8px 26px var(--schatten); max-width: min(92vw, 640px); font-size: 14.5px; }
.ap-versand[hidden] { display: none; }
.ap-versand-knoepfe { display: flex; gap: 8px; }

/* ================================================================
   2.107 – Postfächer: Logo und Firmenfarbe, Vollständigkeits-Ampel,
   Griffe zum Sortieren, Grußformel im Schreibfenster (Ausschnitt „postfach“).
   ================================================================ */

/* Wunsch GF 4: Vor jeder Postfachbezeichnung das Logo seiner Marke, die Zeile
   in der Farbe der Firma. --firmenfarbe steht am Element, damit derselbe Bau-
   stein in Postkasten, Postfachliste und Schreibfenster gleich aussieht. */
.pf-logo { height: auto; width: auto; max-width: 96px; object-fit: contain; flex: none; vertical-align: middle; }
.pf-punkt { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: none; }
.pf-zeile { display: inline-flex; align-items: center; gap: 7px; min-width: 0; }
.pf-zeile .pf-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--firmenfarbe-schrift, var(--firmenfarbe, var(--text))); font-weight: 600; }
/* Die Firmenfarbe kommt als fester Wert aus dem Programm (die Marke bestimmt sie,
   nicht das Thema). Im dunklen Thema wird sie fürs LESEN aufgehellt - der
   Streifen und das Logo behalten den Originalton.
   2.107 (Prüfbericht C, S3 – vom Aufräumer zusammengeführt): Diese Aufhellung stand
   zuerst zweimal da, einmal unter :root[data-theme="dunkel"] und einmal in einer
   Media-Regel für „system“ - genau die Doppelpflege, die S3 aus dem Regelwerk
   entfernt hat. Jetzt steht sie EINMAL da, als light-dark(hell, dunkel); welche
   Hälfte gilt, entscheidet allein „color-scheme“ (die drei Regeln ganz oben). */
.pf-zeile { --firmenfarbe-schrift: light-dark(var(--firmenfarbe, var(--text)),
  color-mix(in srgb, var(--firmenfarbe, var(--text)) 62%, white)); }
.post-fach { --firmenfarbe-schrift: light-dark(var(--firmenfarbe, var(--leise)),
  color-mix(in srgb, var(--firmenfarbe, var(--leise)) 62%, white)); }
.pk-kopf-fach { font-size: 20px; min-width: 0; }
.pk-kopf-fach .pf-logo { max-height: 24px; }

/* Die Postfachzeile in der linken Spalte bekommt einen Streifen in der Firmenfarbe. */
.post-fach { border-left: 3px solid var(--firmenfarbe, transparent); padding-left: 4px; border-radius: 3px; }
.post-fach .post-fach-name { color: var(--firmenfarbe-schrift, var(--firmenfarbe, var(--leise))); }
.post-fach-kopf .pf-logo { max-height: 16px; max-width: 56px; }

/* Wunsch GF 3: Der Griff zum Verschieben. Er ist blass, bis die Maus in der
   Zeile steht - sonst flimmert die Spalte vor lauter Punkten. */
.pk-griff-reihe { flex: none; cursor: grab; color: var(--leise); opacity: 0; font-size: 12px;
  line-height: 1; padding: 0 1px; user-select: none; }
.post-fach-kopf:hover .pk-griff-reihe, .post-ordner-zeile:hover .pk-griff-reihe,
.post-fach-kopf:focus-visible .pk-griff-reihe, .post-ordner-zeile:focus-visible .pk-griff-reihe,
body.pk-schiebt .pk-griff-reihe { opacity: .75; }
.pk-griff-reihe:active { cursor: grabbing; }
.pk-wandert { opacity: .45; outline: 2px dashed var(--blau); outline-offset: 1px; }
body.pk-schiebt .post-ordner-zeile, body.pk-schiebt .post-fach-kopf { cursor: grabbing; }

/* Wunsch GF 1: Die Ampel „vollständig / es fehlt …“ */
.pf-ampel { display: inline-flex; align-items: center; gap: 5px; font-size: var(--s-klein); }
.pf-ampel::before { content: ""; width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--leise); }
.pf-ampel.gut::before { background: var(--ok-text, #1a7f37); }
.pf-ampel.luecke::before { background: var(--warn-text, #a5460f); }
.pf-ampel.gut { color: var(--ok-text, #1a7f37); }
.pf-ampel.luecke { color: var(--warn-text, #a5460f); }
.pf-luecken { margin: 0; padding: 0; list-style: none; }
.pf-luecken li { padding: 3px 0; border-top: 1px solid var(--linie); font-size: var(--s-klein); }
.pf-luecken li:first-child { border-top: 0; }
.pf-luecken a { white-space: nowrap; }
.pf-geerbt { color: var(--leise); font-size: var(--s-klein); margin: 6px 0 0; }
.pf-pruefkasten { border: 1px solid var(--linie); border-left: 4px solid var(--firmenfarbe, var(--linie));
  border-radius: var(--r-karte); padding: 10px 12px; margin: 0 0 14px; background: var(--flaeche); max-width: 900px; }
.pf-pruefkasten h3 { margin: 0 0 6px; font-size: 15px; }

/* Wunsch GF 2: Grußformel im Schreibfenster – sie steht sichtbar über der
   Signatur, damit niemand ein zweites Mal grüßt. */
.pk-gruss { border: 1px dashed var(--linie); border-radius: 9px; padding: 7px 10px; margin: 8px 0 0;
  background: var(--flaeche3); white-space: pre-wrap; font-size: var(--s-fliess); }
.pk-gruss-aus { color: var(--leise); font-style: italic; white-space: normal; }

/* 2.107 (Wunsch GF 2): Auf der ganzen Seite ist das Schreibfeld 18 Zeilen hoch –
   damit rutschten Grußformel und Signatur unter den Bildschirmrand, und genau
   die soll man vor dem Senden sehen. Das Feld bleibt frei ziehbar, hört aber
   bei knapp einem halben Bildschirm auf. Im Fenster im Postkasten gilt ohnehin
   eine feste Höhe (240 px), die darunter liegt. */
.karte.schreiben .schreiben-text { max-height: min(46vh, 420px); }

/* ================================================================
   2.107 – Wünsche der Geschäftsführung (Ausschnitt „dispo2“):
   Fahrzeug je Auftragsart, Stationen am Arbeitsplatz, Karte auf dem
   zweiten Bildschirm, Fünf-Tage-Vorschau, Zeitraum von–bis.
   ================================================================ */

/* Wunsch 1: In der Liste „Fahrzeugarten“ steht je Zeile, bei welchen Auftragsarten
   die Art zur Auswahl kommt. Drei Kästchen nebeneinander, damit die Tabelle nicht
   dreimal so hoch wird. */
.fz-arten { display: flex; flex-wrap: wrap; gap: 2px 12px; }
.fz-arten label { display: inline-flex; align-items: center; gap: 5px; margin: 0; font-size: var(--s-klein); white-space: nowrap; }
.fz-arten input { width: auto; }
/* Die Zeile „Ausnahme: anderes Fahrzeug“ unter dem Fahrzeugfeld der Auftragsmaske. */
.fz-ausnahme { display: flex; align-items: center; gap: 6px; margin: 4px 0 0; font-weight: 400; }
.fz-ausnahme input { width: auto; }

/* Wunsch 5: „bis“ neben dem Tagesfeld des Arbeitsplatzes. Leer heißt ein Tag. */
.ap-tag .ap-bis-wort { color: var(--leise); font-size: var(--s-klein); }
.ap-tag input[type=date] { min-width: 0; }

/* Wunsch 3 und 4: Vorschau-Knopf und Karte über der Liste. */
.ap-werkzeuge { display: flex; gap: 6px; flex-wrap: wrap; }
.ap-werkzeuge > * { padding: 4px 10px; font-size: var(--s-klein); }
.ap-vorschau { border: 1px solid var(--linie); border-radius: 8px; padding: 8px 10px; background: var(--flaeche2, #f4f5f7); }
.ap-vs-kopf { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.ap-vs-tage { display: flex; gap: 5px; margin-top: 7px; flex-wrap: wrap; }
.ap-vs-tag { flex: 1 1 52px; display: flex; flex-direction: column; align-items: center; gap: 1px;
  border: 1px solid var(--linie); border-radius: 7px; background: var(--flaeche); color: var(--text);
  padding: 5px 4px; cursor: pointer; font-size: 11.5px; line-height: 1.15; }
.ap-vs-tag b { font-size: 15px; font-variant-numeric: tabular-nums; }
.ap-vs-tag:hover, .ap-vs-tag:focus-visible { border-color: var(--blau); }
.ap-vs-tag.leer { color: var(--leise); }
.ap-vs-tag.leer b { font-weight: 400; }

/* Wunsch 2: Die Stationen am Arbeitsplatz – eine Zeile je Station, die vier
   Adressfelder nebeneinander. Empfänger, Telefon und die Spuren klappen darunter auf.
   Der Zuschnitt bleibt knapp: kein Kasten je Station wie in der Auftragsmaske. */
.ap-stationen { display: block; margin: 4px 0 10px; }
.ap-st-kopf { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.ap-st-titel { font-weight: 600; font-size: 13px; }
.ap-st-zahl { color: var(--leise); }
.ap-st-neu { margin-left: auto; display: flex; gap: 6px; }
.ap-st-neu button { padding: 2px 9px; font-size: var(--s-klein); }
.ap-st-liste { display: flex; flex-direction: column; gap: 4px; }
/* Die Felder stehen in benannten Bereichen, nicht in einer Reihenfolge - so lässt sich
   der Zuschnitt umstellen, ohne die Reihenfolge im Formular anzufassen (die Tabulator-
   Reihenfolge bleibt: Art, Name, Straße, PLZ, Ort, Knöpfe). */
.ap-st { display: grid; gap: 4px 5px; align-items: center; position: relative;
  grid-template-columns: 14px 15px 92px minmax(0, 1.25fr) minmax(0, 1.55fr) 52px minmax(0, 1fr) auto;
  grid-template-areas: "griff nr typ name adr plz ort kn"
                       "zeiten zeiten zeiten zeiten zeiten zeiten zeiten zeiten"
                       "zusatz zusatz zusatz zusatz zusatz zusatz zusatz zusatz";
  border: 1px solid var(--linie); border-left: 4px solid var(--kat-zustellung, #7a5cc4); border-radius: 7px; padding: 4px 6px; }
.ap-st.abholen { border-left-color: var(--kat-kurier, #1f6feb); }
.ap-st.beides { border-left-color: #8a5fbf; }   /* 2.237 (Ticket #189) */
.ap-st input, .ap-st select { width: 100%; font-size: 12.5px; padding: 3px 5px; margin: 0; min-width: 0; }
.ap-st-griff { grid-area: griff; cursor: grab; color: var(--leise); user-select: none; text-align: center; }
.ap-st-griff:active { cursor: grabbing; }
.ap-st-nr { grid-area: nr; color: var(--leise); font-size: 11.5px; text-align: center; font-variant-numeric: tabular-nums; }
.ap-st-typ { grid-area: typ; } .ap-st-name { grid-area: name; } .ap-st-adresse { grid-area: adr; }
.ap-st-plz { grid-area: plz; } .ap-st-ort { grid-area: ort; }
.ap-st-kn { grid-area: kn; display: flex; gap: 1px; }
.ap-st-kn button { padding: 2px 4px; font-size: 11px; line-height: 1.1; }
.ap-st-kn button[disabled] { opacity: .35; }
.ap-st-zusatz { grid-area: zusatz; display: flex; gap: 4px; align-items: center; flex-wrap: wrap; margin-top: 2px; }
.ap-st-zusatz .ap-st-kontakt { flex: 2 1 180px; width: auto; }
.ap-st-zusatz .ap-st-telefon { flex: 1 1 110px; width: auto; }
.ap-st-zusatz .ap-kundenadresse { padding: 2px 8px; font-size: var(--s-klein); white-space: nowrap; }
/* 2.107: Der Hinweis „hier hängt schon etwas dran“ ist eine Warnung fürs Entfernen,
   kein Fehler - er stand rot unter jeder gestempelten Station und sah nach Problem aus. */
.ap-st-spuren { flex: 1 1 100%; color: var(--leise); font-size: 12px; }
.ap-st.ziehen { opacity: .45; }
.ap-st.ablage-oben { box-shadow: 0 -3px 0 var(--blau); }
/* 2.250 (Prüfung Bedienbarkeit F2): Der Kasten der Adressvorschläge hatte Lage, aber weder
   Hintergrund noch Rahmen – die Treffer standen als loser Text über Straße/PLZ/Ort. Er sitzt
   nicht in einem .sucher, darum bekommt er den Stil des Kundenkastens hier noch einmal. */
.ap-st .ap-treffer { position: absolute; left: 118px; right: 8px; top: 32px; z-index: 30;
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: 10px;
  box-shadow: 0 6px 20px var(--schatten); max-height: 320px; overflow-y: auto; }
.ap-st .ap-treffer div.t { padding: 8px 12px; cursor: pointer; border-bottom: 1px solid var(--linie); font-size: 15px; line-height: 1.35; }
.ap-st .ap-treffer div.t:last-child { border-bottom: none; }
.ap-st .ap-treffer div.t:hover { background: var(--gewaehlt); }
.ap-st .ap-treffer div.t strong { display: block; font-weight: 600; }
.ap-st .ap-treffer div.t span { color: var(--leise); font-size: 12.5px; }
.ap-st-fuss { margin: 5px 0 0; color: var(--leise); }
/* Unter 1440 px ist die mittlere Spalte zu schmal für acht Felder in einer Reihe -
   dann rutschen Straße, PLZ und Ort in eine zweite Zeile DESSELBEN Kastens. Die Station
   bleibt damit ein Block, und man liest weiter von oben nach unten die Stopps ab.
   1440 ist bewusst ein Umbruchpunkt, den das Regelwerk schon kennt (2.107, Prüfbericht
   „design“ S4: höchstens sieben Umbruchpunkte in style.css). */
@media (max-width: 1440px) {
  .ap-st { grid-template-columns: 14px 15px 96px minmax(0, 1fr) 56px minmax(0, 1fr) auto;
    /* 2.281 (Prüfung Auftragsannahme E8): Die Zeile „zeiten“ fehlte hier. Die Zeiten einer Station (Uhr-Symbol,
       seit 2.262) hatten bei 1440 px und schmaler keinen Platz im Raster - der Name schrumpfte auf 60 px, die
       Zeitfelder standen in einer schmalen Spalte rechts. Bei 1920 px (Regel oben) war es in Ordnung. */
    grid-template-areas: "griff nr typ  name name name kn"
                         "griff nr adr  adr  plz  ort  ort"
                         "zeiten zeiten zeiten zeiten zeiten zeiten zeiten"
                         "zusatz zusatz zusatz zusatz zusatz zusatz zusatz"; }
  .ap-st .ap-treffer { left: 8px; top: 30px; }
}
/* Der Knopf „▾“ einer Station, an der schon etwas hängt (Stempel, Frachtbrief,
   Empfänger) – ein Punkt genügt; der Satz steht im Aufklapper und in der Rückfrage. */
.ap-st-mehr.hat-spuren { color: var(--warn-text, #a5460f); font-weight: 700; }
.ap-st-mehr.hat-spuren::after { content: "•"; margin-left: 1px; }
/* 2.107: Der Sofort-Zähler (Entscheidung 10) in der Zeile des Arbeitsplatzes bekommt
   seine eigene Zeile unter der Strecke – in der 48 Pixel schmalen ersten Spalte lief
   sein Text über die Adresse daneben. */
.ap-zeile .sofort-zaehler { grid-column: 2 / -1; justify-self: start; margin-left: 0; }

/* ---------- Die gefuehrte Einweisung (2.123) ---------- */
/* Der Kasten liegt fest im Bild, nicht auf der Seite - beim Scrollen bleibt er
   stehen und der Ring wandert mit dem Ziel. Kein dunkler Schleier ueber der
   Seite: Man soll weiterlesen koennen, was hinter dem Kasten steht. */
.ew-kasten { position: fixed; z-index: 3000; max-width: 380px; width: min(380px, calc(100vw - 24px));
  background: var(--flaeche); color: var(--text); border: 1px solid var(--linie);
  border-radius: var(--r-karte); box-shadow: 0 12px 40px rgba(0,0,0,.28); padding: 14px 16px; }
.ew-kasten[hidden] { display: none !important; }
.ew-kasten h3 { margin: 2px 0 6px; font-size: var(--s-gross); }
.ew-kasten .ew-zahl { margin: 0; font-size: var(--s-mini); color: var(--leise); font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em; }
.ew-kasten .ew-text { font-size: var(--s-fliess); line-height: 1.5; }
.ew-kasten .ew-text p { margin: 0 0 6px; }
.ew-knoepfe { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
.ew-knoepfe .knopf { margin-left: auto; }
/* Der Ring muss auf JEDEM Untergrund zu sehen sein - auch auf der dunklen
   Kopfzeile. Deshalb NICHT die Firmenfarbe: die ist dort das Blau des Kopfes,
   der Ring waere unsichtbar. Weiss innen, bernstein aussen - das liest sich auf
   hell wie auf dunkel. Kein Schleier ueber den Rest der Seite: Man soll
   weiterlesen koennen, was hinter dem Kasten steht. */
.ew-ring { position: absolute; z-index: 2999; pointer-events: none; border-radius: var(--r-klein);
  box-shadow: 0 0 0 2px #fff, 0 0 0 5px #e0a400; transition: all .18s ease; }
.ew-ring[hidden] { display: none !important; }
.ew-angebot { border-left: 4px solid var(--blau); }
.ew-balken { height: 8px; border-radius: var(--r-pille); background: var(--flaeche3); overflow: hidden; }
.ew-balken span { display: block; height: 100%; background: var(--blau); }
.ew-lektionen { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ew-lektion { display: flex; align-items: center; gap: 12px; padding: 8px 10px;
  border: 1px solid var(--linie); border-radius: var(--r-klein); }
.ew-lektion.fertig { background: var(--flaeche2, transparent); }
.ew-lektion-text { flex: 1; min-width: 0; }
.ew-lektion .knopf { flex: none; }
@media (prefers-reduced-motion: reduce) { .ew-ring { transition: none; } }

/* 2.128: „Was bleibt übrig" - zwei Balken an derselben Achse, herein und hinaus. */
.me-balken { height: 7px; border-radius: var(--r-pille); background: var(--flaeche3);
  overflow: hidden; margin: 2px 0; }
.me-balken span { display: block; height: 100%; }
.warn-text { color: var(--warn); }

/* 2.147: Zuteilungsvorschlaege. Die Plakette traegt einen eigenen Rand, damit
   sie sich von der Statusplakette daneben unterscheidet - dieselbe Farbe heisst
   sonst zweimal etwas anderes. Das Nichtwissen (gelb) und das Ungerechnete
   (grau) sind dabei absichtlich genauso gross wie der Treffer: wer nur die
   gruenen sieht, verlaesst sich auf den Rechner. */
.plakette[class*="vorschlag-"] { border: 1px dashed currentColor; }
.plakette.vorschlag-unklar { font-weight: 600; }
.plakette.vorschlag-neu { opacity: .75; }

/* 2.162, Ticket #161: Stammdaten des neuen Kunden in der Auftragsmaske */
.kunde-stamm { border: 1px dashed var(--linie); border-radius: 8px; padding: 8px 12px; margin: 0 0 12px; }
.kunde-stamm > summary { cursor: pointer; font-size: 13px; }
.kunde-stamm[open] { background: var(--grau); }

/* 2.162, Ticket #162: Kontaktperson ändern - klappt unter ihren Daten auf */
.kontakt-aendern { margin-top: 6px; }
.kontakt-aendern > summary { display: inline-block; cursor: pointer; font-size: 12px; padding: 2px 8px;
  border: 1px solid var(--linie); border-radius: 6px; color: var(--leise); list-style: none; }
.kontakt-aendern > summary::-webkit-details-marker { display: none; }
.kontakt-aendern[open] > summary { color: var(--text); }
.kontakt-aendern form { margin-top: 8px; padding: 8px 10px; border: 1px solid var(--linie);
  border-radius: 8px; background: var(--grau); }
.kontakt-aendern label { font-size: 12px; }

/* ---------- Lagebild (2.173) ----------
   Ein festes, gezeichnetes Bild der Lage. Keine Kartenkacheln: Die Farben
   müssen deshalb selbst tragen, und sie müssen in beiden Themen stehen. */
.lagebild-kopf { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin: 0 0 10px; }
.lagebild-sichten { display: flex; gap: 6px; }
.lagebild-tag { display: flex; gap: 6px; align-items: center; }
.lagebild-tag label { color: var(--leise, #5b6572); }
.lagebild-tag input[type=date] { padding: 5px 7px; border: 1px solid var(--linie); border-radius: 6px;
  background: var(--karte, #fff); color: var(--text, #1f2933); font: inherit; font-size: 13px; }
.lagebild-legende { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--leise, #5b6572); }
.lagebild-legende i.lb-punkt { display: inline-block; width: 11px; height: 11px; border-radius: 50%; vertical-align: -1px; margin-right: 4px; }
.lb-punkt.lb-offen { background: #b42318; }
/* Dringlichkeit: EINE Farbe, vier Stufen. Es ist dieselbe Sache - ein Auftrag,
   der abgeholt werden muss -, nur mehr oder weniger eilig. Verschiedene Farben
   würden verschiedene Sorten behaupten. */
.lb-punkt.lb-d0 { background: #e3a9a3; }
.lb-punkt.lb-d1 { background: #d07a70; }
.lb-punkt.lb-d2 { background: #b42318; }
.lb-punkt.lb-d3 { background: #7a1610; }
.lagebild-modus { display: flex; gap: 4px; }
.lagebild-modus .knopf { padding: 5px 9px; font-size: 12.5px; }
.lb-punkt.lb-bote { background: #1f3a5f; }
.lb-punkt.lb-stopp-leg { background: #1f3a5f; opacity: .38; }
.lb-punkt.lb-frei { background: #0f7b3f; }
.lagebild-legende i.lb-punkt.lb-ziel { background: #e8a33d; }

/* Auf 16:9: Bild links, Tafel rechts. Die Stadt ist fast quadratisch, ein
   breiter Monitor hat daneben Platz - der gehoert den Boten. */
.lagebild-bahn { display: flex; gap: 12px; align-items: stretch; min-height: min(72vh, 820px); }
.lagebild-rahmen { position: relative; flex: 1 1 auto; min-width: 0; background: var(--karte-innen, #f7f8fa); border: 1px solid var(--rand, #dcdfe4); border-radius: 8px; overflow: hidden; }
.lagebild-rahmen svg { display: block; width: 100%; height: 100%; }
.lagebild-tafel { flex: 0 0 clamp(268px, 24%, 460px); display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.lagebild-tafel h2 { margin: 0; font-size: 15px; }
.lagebild-fuss { flex: 0 0 auto; margin: 0; }
@media (max-width: 1100px) { .lagebild-bahn { flex-direction: column; } .lagebild-tafel { flex: 0 0 auto; } }

/* Die Botentafel: Farbe, Wagen, Name, was noch vor ihm liegt. */
.lagebild-boten { list-style: none; margin: 0; padding: 0; flex: 1 1 auto; min-height: 0; overflow-y: auto; font-size: 13px; }
.lagebild-boten li { display: flex; align-items: center; gap: 7px; padding: 4px 6px; border-radius: 5px; cursor: pointer; }
.lagebild-boten li:hover { background: var(--karte-innen, #f7f8fa); }
.lagebild-boten li.leer { color: var(--leise, #5b6572); cursor: default; }
.lagebild-boten li.leer:hover { background: none; }
.lagebild-boten .lb-chip { flex: 0 0 auto; width: 11px; height: 11px; border-radius: 50%; background: currentColor; }
.lagebild-boten .lb-wer { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.lagebild-boten .lb-obere { display: flex; gap: 6px; min-width: 0; }
.lagebild-boten .lb-wagen { flex: 0 0 auto; font-weight: 600; color: var(--text, #1f2933); }
.lagebild-boten .lb-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text, #1f2933); }
/* 2.175: „frei ab 14:20, Bogenhausen" - danach sucht der Disponent aus. */
.lagebild-boten .lb-zweit { color: var(--leise, #5b6572); font-size: 11.5px; line-height: 1.3; }
.lagebild-boten .lb-zweit:empty { display: none; }
.lagebild-boten .lb-rest { flex: 0 0 auto; align-self: center; color: var(--leise, #5b6572); font-size: 12px; }
.lagebild-boten li { align-items: flex-start; }
.lagebild-boten .lb-chip { margin-top: 4px; }

/* Die Tafel für einen gewählten Auftrag */
.lagebild-auftrag { flex: 0 0 auto; border: 1px solid var(--linie); border-radius: 8px;
  padding: 9px 11px; background: var(--karte-innen, #f7f8fa); font-size: 13px; }
.lagebild-auftrag .lb-a-kopf { display: flex; align-items: center; gap: 8px; }
.lagebild-auftrag .lb-a-nr { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lagebild-auftrag .lb-a-zu { flex: 0 0 auto; border: 0; background: none; cursor: pointer;
  font-size: 18px; line-height: 1; color: var(--leise, #5b6572); padding: 0 2px; }
.lagebild-auftrag p { margin: 4px 0; }
.lagebild-auftrag .lb-a-frist { font-weight: 600; }
.lagebild-auftrag .lb-a-frist.lb-d2 { color: #b42318; }
.lagebild-auftrag .lb-a-frist.lb-d3 { color: #7a1610; }
.lagebild-auftrag h3 { margin: 9px 0 4px; font-size: 13px; }
.lagebild-auftrag ul { list-style: none; margin: 0; padding: 0; }
.lagebild-auftrag li { display: flex; align-items: center; gap: 7px; padding: 3px 4px;
  border-radius: 5px; cursor: pointer; }
.lagebild-auftrag li:hover { background: var(--karte, #fff); }
.lagebild-auftrag li.leer { color: var(--leise, #5b6572); cursor: default; }
.lagebild-auftrag li.leer:hover { background: none; }
.lagebild-auftrag .lb-chip { flex: 0 0 auto; width: 11px; height: 11px; border-radius: 50%; background: currentColor; }
.lagebild-auftrag .lb-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; color: var(--text, #1f2933); }
.lagebild-auftrag .lb-rest { flex: 0 0 auto; color: var(--leise, #5b6572); font-size: 12px; }
.lagebild-boten li.ist-frei .lb-rest { color: #0f7b3f; font-weight: 600; }
/* Wer für den gewählten Auftrag nicht in Frage kommt, tritt auch hier zurück. */
.lagebild-boten li.tritt-zurueck { opacity: .35; }

body.lagebild-allein { margin: 0; padding: 10px 12px; background: var(--grau, #eef1f4); height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
body.lagebild-allein .lagebild-bahn { flex: 1 1 auto; min-height: 0; }
body.lagebild-allein .lagebild-tafel { overflow: hidden; }

/* Der Grund: fuenf ruhige Toene, damit zwei Nachbarn nie gleich aussehen. Sie
   duerfen NICHT kraeftig sein - darueber liegen die Marken, die sollen tragen. */
.lb-bezirk { stroke: var(--karte-innen, #f7f8fa); stroke-width: 1.6; stroke-linejoin: round; }
.lb-ton0 { fill: light-dark(rgba(31, 58, 95, .06), rgba(150, 182, 224, .07)); }
.lb-ton1 { fill: light-dark(rgba(31, 58, 95, .13), rgba(150, 182, 224, .15)); }
.lb-ton2 { fill: light-dark(rgba(31, 58, 95, .20), rgba(150, 182, 224, .23)); }
.lb-ton3 { fill: light-dark(rgba(31, 58, 95, .09), rgba(150, 182, 224, .11)); }
.lb-ton4 { fill: light-dark(rgba(31, 58, 95, .165), rgba(150, 182, 224, .19)); }
.lb-bezirkname { fill: light-dark(#44515f, #b9c3d0); text-anchor: middle; pointer-events: none; font-family: inherit; }
.lb-land { fill: light-dark(rgba(31, 58, 95, .06), rgba(150, 182, 224, .09)); stroke: light-dark(rgba(31, 58, 95, .35), rgba(150, 182, 224, .40)); stroke-width: 1.2; }
.lb-stadt { fill: light-dark(#8a93a0, #9aa5b3); }
.lb-stadtname { font-size: 11px; fill: light-dark(#52606d, #b9c3d0); font-family: inherit; pointer-events: none; }

/* Wege */
.lb-weg { stroke-width: 1.6; fill: none; opacity: .8; }
.lb-weg-offen { stroke: #b42318; color: #b42318; stroke-dasharray: 5 4; }
.lb-weg-bote { stroke-width: 2; }
/* Ein ganzer Tag sind schnell hundert Linien. Die Tourlinien sind deshalb
   dünner und zurückhaltender als die Pfeile des laufenden Betriebs. */
.lb-weg-tour { stroke-width: 1.3; opacity: .55; }

/* Marken */
.lb-marke { cursor: pointer; stroke: #fff; stroke-width: 1.5; }
.lb-marke:hover { stroke-width: 2.5; }
.lb-offen { fill: #b42318; }
/* Dieselbe Leiter auf der Karte: blass = hat Zeit, dunkel = überfällig. Dazu
   wächst die Marke - Farbe allein reicht nicht, wenn jemand Rot schlecht sieht. */
.lb-marke.lb-d0 { fill: light-dark(#e3a9a3, #8c5a55); r: 5; }
.lb-marke.lb-d1 { fill: light-dark(#d07a70, #b06a60); r: 6; }
.lb-marke.lb-d2 { fill: #b42318; r: 7.5; }
.lb-marke.lb-d3 { fill: #7a1610; r: 9; stroke-width: 2.5; }
.lb-marke.lb-gross { r: 11; stroke-width: 3; }
.lb-weg-offen.lb-d0 { stroke: light-dark(#e3a9a3, #8c5a55); color: light-dark(#e3a9a3, #8c5a55); opacity: .5; }
.lb-weg-offen.lb-d1 { stroke: light-dark(#d07a70, #b06a60); color: light-dark(#d07a70, #b06a60); }
.lb-weg-offen.lb-d3 { stroke: #7a1610; color: #7a1610; }

/* Die Zahl je Bezirk: ein Auftragshaufen als eine Marke. */
.lb-zahl { stroke: light-dark(#fff, #1b1f24); stroke-width: 2; cursor: pointer; }
.lb-zahl-text { fill: #fff; font-size: 12.5px; font-weight: 700; text-anchor: middle;
  pointer-events: none; font-family: inherit; }
.lb-marke.lb-zahl.lb-d0 { r: 13; }
.lb-marke.lb-zahl.lb-d1 { r: 13; }
.lb-marke.lb-zahl.lb-d2 { r: 13; }
.lb-marke.lb-zahl.lb-d3 { r: 13; }

/* „Der könnte das fahren": eine dünne Linie vom Boten zur Abholung. */
.lb-weg-passt { stroke-width: 2; stroke-dasharray: 2 5; stroke-linecap: round; opacity: .85; }
.lb-passt-text { font-size: 12px; font-weight: 700; text-anchor: middle; fill: currentColor;
  pointer-events: none; font-family: inherit; paint-order: stroke;
  stroke: light-dark(#fff, #1b1f24); stroke-width: 3px; }
.lb-ziel { fill: #e8a33d; }
.lb-bote { fill: #1f3a5f; }
.lb-frei { fill: #0f7b3f; }
.lb-stopp { r: 5; }
/* Schon erledigte Stationen einer Tour: sie bleiben stehen, treten aber zurück.
   Wer auf einen vergangenen Tag schaut, will sie sehen; wer plant, nicht. */
.lb-erledigt { opacity: .34; }
/* Hervorheben: Diese beiden stehen ABSICHTLICH nach .lb-erledigt - beim
   Überfahren einer Zeile gewinnt die Hervorhebung gegen die Blässe. */
.lb-blass { opacity: .07; }
.lb-vorn { opacity: 1; }
.lagebild-boten li { transition: background .1s; }
.lb-marktext, .lb-randname { font-size: 11px; fill: light-dark(#3a4551, #dfe4ea); font-family: inherit; pointer-events: none; }
.lb-randname { text-anchor: middle; font-weight: 600; }

/* Acht Farben für acht Boten - danach wiederholen sie sich, das ist in Ordnung:
   Die Farbe trennt Nachbarn, sie ist kein Name. */
.lb-f0 { stroke: #1f3a5f; fill: #1f3a5f; color: #1f3a5f; }
.lb-f1 { stroke: #0f7b3f; fill: #0f7b3f; color: #0f7b3f; }
.lb-f2 { stroke: #8a4bbf; fill: #8a4bbf; color: #8a4bbf; }
.lb-f3 { stroke: #0e7490; fill: #0e7490; color: #0e7490; }
.lb-f4 { stroke: #b06000; fill: #b06000; color: #b06000; }
.lb-f5 { stroke: #a01f6e; fill: #a01f6e; color: #a01f6e; }
.lb-f6 { stroke: #3f6212; fill: #3f6212; color: #3f6212; }
.lb-f7 { stroke: #7c3a12; fill: #7c3a12; color: #7c3a12; }
.lb-marke.lb-f0, .lb-marke.lb-f1, .lb-marke.lb-f2, .lb-marke.lb-f3,
.lb-marke.lb-f4, .lb-marke.lb-f5, .lb-marke.lb-f6, .lb-marke.lb-f7 { stroke: #fff; }
.lagebild-ohne { flex: 0 1 auto; margin: 0; padding: 8px 10px; max-height: 26vh; overflow-y: auto; border-left: 3px solid #e8a33d; background: var(--karte-innen, #f7f8fa); font-size: 13px; border-radius: 4px; }


/* ---------- Wer ist gerade da? (2.179, Ticket #178, Wunsch WWO) ----------
   Eine Reihe kleiner Kuerzel im Kopf, je eines mit einem Punkt davor.
   Gruen = am Platz, Orange = arbeitet, Rot = viel los. Wer sich seit einer
   Viertelstunde nicht geruehrt hat, bekommt einen gruenen Punkt, der auf und
   ab dimmt - „da, aber gerade nicht am Rechner". */
.werda { display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  max-width: 320px; overflow: hidden; }
.werda-chip { display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 7px 2px 5px; border-radius: 999px; font-size: 11.5px; font-weight: 700;
  letter-spacing: .02em; background: var(--kopf-chip, rgba(255,255,255,.18));
  color: var(--kopf-text, #fff); white-space: nowrap; }
.werda-chip.ich { outline: 1px solid rgba(255,255,255,.55); }
.werda-punkt { width: 9px; height: 9px; border-radius: 50%; background: #2e9e4f; flex: none; }
.werda-punkt.ton-mittel { background: #e8a800; }
.werda-punkt.ton-viel { background: #d64533; }
.werda-punkt.ton-ruhig { background: #2e9e4f; animation: werda-atmen 2.6s ease-in-out infinite; }
/* 2.239 (Ticket #183): telefoniert - blauer Punkt und Hörer; der Schalter in der Kopfzeile */
.werda-punkt.ton-telefon { background: #1a73c4; }
.werda-hoerer { font-size: 11px; line-height: 1; }
.telefon-schalter { border: 1px solid rgba(255,255,255,.45); background: transparent; color: inherit; border-radius: 14px;
  padding: 2px 9px; font: inherit; font-size: 12.5px; cursor: pointer; white-space: nowrap; }
.telefon-schalter.an { background: #1a73c4; border-color: #1a73c4; color: #fff; }
.telefon-schalter:hover { border-color: #fff; }
@media (max-width: 900px) { .telefon-schalter span { display: none; } }
@keyframes werda-atmen { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .werda-punkt.ton-ruhig { animation: none; opacity: .5; } }
/* Auf schmalen Bildschirmen ist die Kopfzeile fuer Arbeit da, nicht fuer eine
   Anwesenheitsliste - sie faellt dort ganz weg. */
@media (max-width: 900px) { .werda { display: none; } }


/* ---------- Schichteinteilung (2.180, Ticket #174, Wunsch WWO) ----------
   Der Punkt vor „3 von 7": gruen = es werden noch Boten gebraucht, orange =
   die noetige Anzahl ist erreicht, rot = darueber. Dieselben drei Farben wie
   in der Fahrer-App, damit Dispo und Bote dasselbe sehen. */
.schicht-punkt { display: inline-block; width: 10px; height: 10px; border-radius: 50%;
  vertical-align: -1px; margin-inline-end: 4px; background: #2e9e4f; }
.schicht-punkt.ton-orange { background: #e8a800; }
.schicht-punkt.ton-rot { background: #d64533; }


/* ---------- Einkaufspreis bei der Zuteilung (2.181, Entscheidung FKO) ----------
   Ein kleiner Kasten ueber der Tafel: je Auftrag ein Feld. Kein confirm(),
   kein prompt() - die schluckt der eingebaute Browser und man sieht nicht,
   fuer welchen Auftrag man gerade tippt. */
.ek-kasten { position: fixed; inset: 0; background: rgba(15, 30, 55, .45); z-index: 60;
  display: flex; align-items: center; justify-content: center; padding: 16px; }
.ek-kasten[hidden] { display: none; }
.ek-inhalt { background: var(--karte-bg, #fff); color: var(--text, #1c2430); border-radius: 12px;
  padding: 16px 18px; width: min(460px, 100%); box-shadow: 0 18px 40px rgba(0,0,0,.25); }
.ek-zeile { display: grid; grid-template-columns: 1fr auto 110px; gap: 8px; align-items: center; margin: 6px 0; }
.ek-zeile input { margin: 0; text-align: right; }
.ek-zeile input.ek-fehlt { border-color: #d64533; }
.ek-pflicht input { border-color: #d64533; }

/* 2.183: Stationssuche - Trennzeile je Quelle (Adressbuch / Karte / PLZ) */
.treffer.schwebend .st-quelle { padding: 5px 12px 2px; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--leise); background: var(--flaeche2); border-bottom: 1px solid var(--linie); }
.treffer.schwebend .st-quelle + div.t { border-top: none; }

/* 2.183: „Im Netz nachschlagen" - der Kasten mit den Treffern unter der Station */
.netz-kasten { margin: 8px 0 4px; padding: 8px 12px; border: 1px solid var(--linie); border-radius: 10px; background: var(--flaeche2); }
.netz-kasten p { margin: 4px 0; }
.netz-kasten p.warn { color: var(--warn-text); background: var(--warn-bg); border: 1px solid var(--warn-rand); padding: 6px 10px; border-radius: 6px; }
.netz-treffer { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 6px 0; border-top: 1px solid var(--linie); }
.netz-treffer strong { display: block; }
.netz-treffer .klein a { color: inherit; }

/* 2.183: „Zuletzt an diese Anschrift" - die Zeile unter der Station */
.zuletzt-zeile { margin-top: 6px; padding: 6px 10px; border-left: 3px solid var(--linie-stark); background: var(--flaeche3); border-radius: 0 8px 8px 0; font-size: 13px; color: var(--leise); }
.zuletzt-zeile .zuletzt-kopf { font-weight: 600; margin-right: 6px; }
.zuletzt-zeile .zuletzt-eintrag { display: inline-block; margin: 2px 12px 2px 0; }
.zuletzt-zeile .zuletzt-eintrag a { font-weight: 600; color: inherit; }
.zuletzt-zeile .zuletzt-eintrag em { font-style: italic; }
.zuletzt-zeile button.leise { margin-left: 6px; padding: 0 8px; font-size: 12px; }

/* 2.203: Reiter „Bestellungen" - Fristen des Kündigungskuriers in der Zeile */
.best-tabelle .frist { display: inline-block; font-size: 12.5px; font-weight: 600; margin-top: 3px; }
.best-tabelle .frist.frist-laeuft { color: #8a6d00; }
.best-tabelle .frist.frist-knapp { color: #c0392b; }
/* 2.210: Same-Day - heute abholen, heute zustellen; die Zeile fällt auf */
.best-tabelle tr.sameday > td { background: rgba(192, 57, 43, .08); }
.best-tabelle tr.sameday > td:first-child { box-shadow: inset 3px 0 0 #c0392b; }
.sd-plakette { display: inline-block; background: #c0392b; color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .06em;
  padding: 2px 7px; border-radius: 999px; margin-bottom: 3px; }
.best-tabelle tr.frist-knapp td:first-child { box-shadow: inset 3px 0 0 #c0392b; }
.best-tabelle .frist.frist-aus { color: #7a7a7a; font-weight: 500; }
.best-tabelle td a.leise { font-size: 13px; }
.best-tabelle button.leise { padding: 3px 9px; font-size: 12.5px; vertical-align: middle; }
.best-tabelle .web-neu-form { vertical-align: middle; }

/* 2.251 (D7): Aufklappbare Abschnitte auf der Auftragsseite - Überschrift bleibt
   als eine Zeile stehen, der Erklärtext klappt gesondert auf. */
details.abschnitt > summary { cursor: pointer; }
details.abschnitt > summary h2 { display: inline; margin: 0; }
details.erklaerung > summary { cursor: pointer; color: var(--leise); font-size: 13px; }

/* 2.251 (P8): Laschen - Reiter INNERHALB einer Seite (Pillen .reiter wechseln die Seite). */
.akte-kopf { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; margin: 0 0 12px; }
.laschen { display: flex; gap: 2px; flex-wrap: wrap; border-bottom: 2px solid var(--linie); flex: 1 1 auto; }
.laschen a { text-decoration: none; color: var(--leise); padding: 8px 14px; margin-bottom: -2px;
             border-bottom: 2px solid transparent; font-weight: 600; white-space: nowrap; }
.laschen a:hover { color: var(--text); }
.laschen a.aktiv { color: var(--text); border-bottom-color: var(--blau); }
.laschen a .zahl { color: var(--leise); font-weight: 400; font-size: 12.5px; }
.laschen a.zur-liste { margin-left: auto; font-weight: 400; }
.pflicht { color: var(--warn); font-weight: 700; }
@media print { .laschen { display: none; } [data-teil][hidden]:not(a) { display: block !important; } }
/* 2.251 (R2): Stichtag als eine Zeile über der Liste */
.stichtag-zeile { margin: 0 0 12px; }
.stichtag-zeile > summary { cursor: pointer; color: var(--leise); }
.stichtag-zeile > summary u { text-decoration: underline; }
/* 2.251 (R3): „n Kunden abrechenbar → Abrechnen" über der Rechnungsliste */
.abrechenbar-zeile { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 0 0 12px; padding: 8px 14px;
  border: 1px solid var(--linie); border-left: 4px solid var(--blau); border-radius: var(--r-klein, 8px); background: var(--flaeche); }

/* 2.252 (Ü2): Sprungleiste und Suche in den Einstellungen - klebt unter dem Seitenanfang */
.einst-sprung { position: sticky; top: 0; z-index: 30; background: var(--flaeche); border: 1px solid var(--linie);
  border-radius: var(--r-klein, 8px); padding: 8px 10px; margin: 0 0 14px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.einst-sprung .einst-suche { flex: 0 0 300px; max-width: 100%; margin: 0; }
.einst-chips { display: flex; gap: 4px; flex-wrap: wrap; flex: 1 1 300px; }
.einst-chip { font-size: 12.5px; color: var(--leise); text-decoration: none; padding: 3px 9px; border-radius: 999px;
  border: 1px solid var(--linie); background: var(--flaeche2, var(--flaeche)); white-space: nowrap; }
.einst-chip:hover { color: var(--text); border-color: var(--text); }
.einst-chip.aktiv { color: var(--knopf-text); background: var(--knopf-bg); border-color: var(--knopf-bg); }
.einst-meldung { margin: -6px 0 12px; }
/* 2.310 (Gesamtprüfung G4): Die Chips sind ab sechs Abschnitten die Reiter der Seite. Unterpunkte (die zwei Firmen unter
   „Mailversand", die 25 Mail-Vorlagen) sind gestrichelt umrandet und stehen nur beim gewählten Abschnitt. */
.einst-chip.einst-alle { font-weight: 600; }
.einst-chip.einst-unter { border-style: dashed; }
.einst-chip[hidden] { display: none; }
/* 2.252 (Ü8/A6): Reiterzeile der Anfragen mit Zahlen */
.anfragen-reiter .nav-zahl { margin-left: 6px; vertical-align: middle; }
.zahlen-was { margin: -4px 0 12px; max-width: 90ch; }
/* 2.252 (Ü4): Erklärtext einer Seite als eine Zeile, aufklappbar, Stand je Browser gemerkt */
.seite-erklaerung { margin: 0 0 12px; max-width: 90ch; }
.seite-erklaerung > summary { cursor: pointer; color: var(--leise); font-size: 13px; }
.seite-erklaerung > summary::after { content: " ▾"; }
.seite-erklaerung[open] > summary::after { content: " ▴"; }
.seite-erklaerung .erkl-inhalt { padding: 6px 0 0; }
.seite-erklaerung .erkl-inhalt > p:last-child { margin-bottom: 0; }
.hilfe-aeltere { margin: 10px 0; }
.hilfe-aeltere > summary { padding: 8px 0; }
/* 2.252 (Ü8): Laschen auch im Seitenkopf (Aufträge, Rechnungen) und als Filterzeile */
.seitenkopf .laschen { margin: 0; border-bottom: 0; flex: 0 1 auto; }
.seitenkopf .laschen a { padding: 6px 12px; }
.laschen .zahl { color: var(--leise); font-size: 12.5px; margin-left: 4px; }
/* 2.262 (Ticket #206): Ertrag auf Auftragsseite und in der Auftragsmaske – rot, wenn der Einkauf über dem Verkauf liegt */
.ertrag-zeile strong.rot, input#ertrag-anzeige.rot { color: var(--warn-text, #b42318); }
input#ertrag-anzeige { background: var(--flaeche2, #f4f4f6); }
/* 2.262 (Ticket #208): Lade-/Entladezeit je Station am Arbeitsplatz */
.ap-st-zeiten { grid-area: zeiten; display: flex; gap: 4px; align-items: center; flex-wrap: wrap; margin-top: 2px; }
.ap-st-zeiten .ap-st-datum { flex: 0 1 140px; width: auto; }
.ap-st-zeiten .ap-st-zeit-ab, .ap-st-zeiten .ap-st-zeit-bis { flex: 0 1 120px; width: auto; }
.ap-st-zeiten-wort { white-space: nowrap; }
.ap-st-kn .ap-st-zeit.hat-zeit { background: var(--gewaehlt, #e8f0fe); font-weight: 600; }
/* 2.262 (Ticket #205): Feierabend-Abfrage */
.feierabend { position: fixed; inset: 0; z-index: 9000; background: rgba(10, 14, 22, .55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.feierabend-kasten { background: var(--flaeche, #fff); color: var(--tinte, #17181b); border-radius: 10px; padding: 22px 24px; max-width: 520px; width: 100%;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .35); display: flex; flex-direction: column; gap: 12px; }
.feierabend-kasten h2 { margin: 0; font-size: 20px; }
.feierabend-kasten .fa-text { margin: 0; }
.feierabend-kasten .fa-wahl { display: flex; gap: 18px; flex-wrap: wrap; }
.feierabend-kasten .fa-wahl label { display: inline-flex; align-items: center; gap: 6px; }
.feierabend-kasten .fa-wahl input { width: auto; margin: 0; }
.feierabend-kasten .fa-grund-feld { display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
.feierabend-kasten .fa-grund-feld textarea { font-weight: 400; resize: vertical; }
.feierabend-kasten .fa-pflicht { font-weight: 400; color: var(--leise); }
.feierabend-kasten .fa-knoepfe { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.feierabend-kasten .fa-fehler { margin: 0; }

/* 2.266 (Ticket #214): Laufzeit-Zeile auf der Dispo-Kachel - ein Auftrag über mehrere Tage steht an jedem Tag dazwischen */
.dk-laufzeit { color: var(--blau); margin: -2px 0 4px; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 2.266 (Ticket #219): Dispo-Ansprechpartner des Beförderers auf der Boten-Kachel - neben den Wagen, auch ohne Wagennummer */
.bef-dispo { display: flex; flex-direction: column; gap: 3px; margin-top: 4px; }
.bd-chip { display: flex; align-items: center; gap: 6px; font-size: 12.5px; line-height: 1.5;
  border: 1px dashed var(--linie); border-radius: 6px; padding: 2px 8px; background: var(--flaeche); color: var(--text); }
.bd-chip.mit-notiz { border-style: solid; }
.bd-rolle { flex: none; padding: 0 6px; border-radius: 6px; background: var(--flaeche2); border: 1px solid var(--linie);
  color: var(--text2, var(--text)); font-size: 10.5px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; }
.bd-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-chip a { margin-left: auto; white-space: nowrap; }
.ap-kontakt-notiz { display: block; margin-top: 2px; color: var(--text2, inherit); white-space: normal; }   /* 2.266 (#221) */
.kontakt-notiz { margin-top: 2px; }

/* 2.269 (Ticket #220): Mail-Vorschau vor dem Versand */
.mv-knoepfe { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 10px 0 14px; }
.mv-knoepfe .mv-versenden { font-weight: 700; padding: 10px 18px; }
.mv-daten { border-collapse: collapse; width: 100%; }
.mv-daten th { text-align: left; padding: 4px 12px 4px 0; vertical-align: top; white-space: nowrap; color: var(--text2, inherit); font-weight: 600; width: 1%; }
.mv-daten td { padding: 4px 0; }
/* 2.277 (Ticket #235): Dieselfloater im Rechnungslauf und unter „Neue Rechnung“ */
.treibstoff-kasten { padding: 10px 14px; margin-bottom: 14px; border-left: 4px solid var(--blau); }
.treibstoff-kasten .tk-zeile { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; justify-content: space-between; }
.treibstoff-kasten .tk-satz { font-size: 20px; font-variant-numeric: tabular-nums; }
.treibstoff-kasten .tk-aendern summary { list-style: none; cursor: pointer; display: inline-block; }
.treibstoff-kasten .tk-aendern summary::-webkit-details-marker { display: none; }
.treibstoff-kasten .tk-form { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; margin-top: 8px; }
.treibstoff-kasten .tk-form .klein { flex: 1 1 260px; }
.treibstoff-kasten .tk-hinweis { margin: 8px 0 0; padding: 6px 10px; background: var(--merk-bg); border: 1px solid var(--merk-rand); color: var(--merk-text); border-radius: 6px; }
.treibstoff-kasten .tk-verlauf { margin-top: 6px; }
/* 2.275 (Ticket #230): „Konversation suchen“ – Auftragsmail als Antwort in ein Gespräch */
.mv-konv { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--linie); }
.mv-konv.gewaehlt { background: var(--ok-bg); border: 1px solid var(--ok-rand); border-radius: 8px; padding: 8px 12px; color: var(--ok-text); }
.mv-konv.gewaehlt strong { color: inherit; }
.mv-konv-wahl { margin-top: 12px; padding: 12px 14px; background: var(--flaeche3); border: 1px solid var(--linie); border-radius: 8px; }
.mv-konv-suche { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.mv-konv-suche label { flex: 1 1 360px; }
.mv-konv-liste { margin-top: 10px; font-size: 13.5px; }
.mv-konv-liste td { vertical-align: top; }
.mv-rahmen { width: 100%; height: 720px; border: 0; background: #f5f5f5; border-radius: 8px; }
.mv-text { white-space: pre-wrap; font-size: 13px; background: var(--gewaehlt); padding: 12px; border-radius: 8px; overflow-x: auto; margin: 0; }

/* 2.280 (Ticket #237): Vorschau neuer Chat-Nachrichten unten rechts - nur auf der Dispotafel (chat-vorschau.js). */
.chatvorschau { position: fixed; right: 18px; bottom: 18px; z-index: 70; display: flex; flex-direction: column;
  gap: 8px; width: min(340px, calc(100vw - 24px)); pointer-events: none; }
.chatvorschau .cv-karte { pointer-events: auto; background: var(--flaeche); color: var(--text); border: 1px solid var(--linie);
  border-left: 4px solid var(--blau); border-radius: 10px; box-shadow: 0 8px 24px rgba(15, 30, 50, .18);
  padding: 10px 34px 10px 12px; position: relative; cursor: pointer; animation: cv-rein .18s ease-out; }
.chatvorschau .cv-karte:hover { border-left-color: var(--warn); }
.chatvorschau .cv-kopf { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--leise); }
.chatvorschau .cv-kopf span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chatvorschau .cv-von { display: block; font-weight: 700; margin-top: 2px; }
.chatvorschau .cv-text { display: block; margin-top: 2px; line-height: 1.35; overflow-wrap: anywhere; }
.chatvorschau .cv-zu { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border: 0; border-radius: 6px;
  background: transparent; color: var(--leise); font-size: 18px; line-height: 1; cursor: pointer; padding: 0; }
.chatvorschau .cv-zu:hover, .chatvorschau .cv-zu:focus-visible { background: var(--flaeche3); color: var(--text); }
.chatvorschau .cv-erlaubnis { pointer-events: auto; font-size: 12px; background: var(--flaeche); border: 1px dashed var(--linie);
  border-radius: 8px; padding: 6px 10px; color: var(--leise); }
.chatvorschau .cv-erlaubnis button { font-size: 12px; padding: 2px 8px; margin-left: 4px; }
@keyframes cv-rein { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .chatvorschau .cv-karte { animation: none; } }
@media print { .chatvorschau { display: none; } }

/* ---------- 2.285 (Prüfung Disposition) ---------- */
/* DE1/DB2: die Leiste über der Tafel. Der Anker ist null Pixel hoch und klebt oben im Fenster - die Leiste selbst
   schwebt darunter, damit sich keine Kachel verschiebt, wenn ein Satz kommt oder geht. */
.dispo-leiste-anker { position: sticky; top: 8px; height: 0; z-index: 30; }
.dispo-leiste { position: absolute; top: 0; left: 0; width: min(900px, 100%); display: flex; flex-direction: column; gap: 6px; pointer-events: none; }
.dispo-leiste > * { pointer-events: auto; }
.dl-zeile { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0; padding: 9px 12px 9px 14px; border-radius: 10px;
  border: 1px solid var(--linie); background: var(--flaeche); box-shadow: 0 6px 22px rgba(15, 30, 55, .22); font-size: 14.5px; }
.dl-zeile .dl-text { flex: 1 1 260px; min-width: 0; }
.dl-zeile.ok { color: var(--ok-text); background: var(--ok-bg); border-color: var(--ok-rand); }
.dl-zeile.warn { color: var(--warn-text); background: var(--warn-bg); border-color: var(--warn-rand); }
.dl-zeile.dl-hinweis { color: var(--merk-text); background: var(--merk-bg); border-color: var(--merk-rand); font-size: 15px; }
.dl-zeile .dl-form { margin: 0; display: inline-flex; }
.dl-zeile button, .dl-zeile .knopf { margin: 0; padding: 4px 12px; }
.dl-zeile .dl-zu:not(.leise) { margin-left: auto; background: transparent; border: 0; color: inherit; font-size: 15px; padding: 2px 6px; cursor: pointer; line-height: 1; box-shadow: none; }
/* DE7: Die Auswahl gewinnt gegen die Ampel - dunkelblauer Rahmen außen, die Ampel bleibt als linker Balken. */
.dispo-karte.gewaehlt, .dispo-karte.rand-rot.gewaehlt, .dispo-karte.rand-gelb.gewaehlt { border-color: var(--blau); box-shadow: 0 0 0 3px var(--blau); background: var(--gewaehlt); }
.dispo-karte.rand-rot.gewaehlt { border-left-color: #c94a42; }
.dispo-karte.rand-gelb.gewaehlt { border-left-color: #e6b93c; }
/* DE3: Einkaufs-Kasten - ein Feld, das keine Zahl ist oder über dem Verkauf liegt */
.ek-zeile input.ek-falsch { border-color: #c94a42; background: #fdf1f0; }
/* DB1: Boten-Zeile mit der Tastatur */
.bef-zeile:focus-visible { outline: 3px solid var(--blau); outline-offset: 1px; }
/* DB7: Vorschau - Uhrzeit vorn, Kunde und Bote in einer zweiten, leisen Zeile */
.vs-zeile { flex-wrap: wrap; }
.vs-zeit { font-variant-numeric: tabular-nums; font-weight: 700; min-width: 40px; }
.vs-zeit.leer { font-weight: 400; color: var(--leise); }
.vs-kunde { flex-basis: 100%; font-size: 12px; color: var(--leise); padding-left: 46px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vs-kunde .vs-bote { color: var(--ok-text); font-weight: 600; }
/* DE9 (beim Nachstellen gefunden): Das Formular der Wiedervorlage hing rechtsbündig am Fähnchen und ragte in der
   linken Spalte 219 px aus dem Fenster - „Merken" war nicht erreichbar. Auf der Tafel nimmt es jetzt die Breite der Kachel. */
.dispo-karte { position: relative; }
.dispo-karte .sub-menu { position: static; }
.dispo-karte .sub-form { left: 8px; right: 8px; width: auto; }
/* Einkaufs- und Rückfrage-Kasten liegen über der Boten-Schublade (z-index 70), nicht darunter. */
.ek-kasten { z-index: 80; }

/* ---------- 2.286 (Prüfung Disposition, DL2): „aus früheren Tagen nicht erledigt" ---------- */
.dispo-alt { margin: 0 0 10px; padding: 6px 12px; border: 1px solid var(--warn-rand); background: var(--warn-bg); border-radius: 8px; }
.dispo-alt > summary { cursor: pointer; color: var(--warn-text); }
.dispo-alt-liste { margin-top: 6px; }
.dispo-alt-zeile { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; padding: 5px 0; border-top: 1px solid var(--warn-rand); font-size: 14px; }
.dispo-alt-zeile .da-tag { font-variant-numeric: tabular-nums; min-width: 44px; color: var(--warn-text); }
.dispo-alt-zeile .da-kunde { font-weight: 600; }
.dispo-alt-zeile .da-bote { margin-left: auto; color: var(--leise); }

/* ---------- 2.287 (Prüfung Disposition: DL7, DB4, DL5) ---------- */
.dk-gegenstand { font-size: 12.5px; color: var(--leise); margin: 2px 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dk-mehr { position: relative; display: inline-block; }
.dk-mehr > summary { list-style: none; cursor: pointer; padding: 1px 9px 3px; border: 1px solid var(--linie); border-radius: 6px; color: var(--leise); font-weight: 700; line-height: 1.2; background: var(--flaeche); }
.dk-mehr > summary::-webkit-details-marker { display: none; }
.dk-mehr[open] > summary { color: var(--blau); border-color: var(--blau); }
.dk-mehr-menu { position: absolute; z-index: 45; left: 0; top: calc(100% + 4px); background: var(--flaeche); border: 1px solid var(--linie); border-radius: 8px; box-shadow: 0 6px 20px var(--schatten); padding: 6px; white-space: nowrap; }
.dk-mehr-menu form { margin: 0; }
#frage-eingabe.ek-falsch { border-color: #c94a42; background: #fdf1f0; }

/* 2.302 (Gesamtprüfung S11, S15): „Speichern" bleibt am unteren Rand stehen, wenn das Formular länger ist als der
   Bildschirm. Gedacht für eine Knopfzeile am Ende einer .karte (deren Innenabstand 14/16 px gleicht der Rand aus). */
.knopfzeile.fest { position: sticky; bottom: 0; z-index: 15; margin: 14px -16px -14px; padding: 10px 16px; background: var(--flaeche);
  border-top: 1px solid var(--linie); border-radius: 0 0 10px 10px; box-shadow: 0 -8px 14px -12px var(--schatten, rgba(0,0,0,.35)); }
/* 2.311 (Gesamtprüfung G4): dieselbe Leiste für eine Knopfzeile, die frei im Formular steht und nicht am Ende einer
   Karte - Preistafel und Auftragsmaske. Ohne den Randausgleich der Karte, dafür mit eigenem Rahmen ringsum. */
.knopfzeile.fest.frei { margin: 14px 0 0; border: 1px solid var(--linie); border-radius: 10px; }
/* Springt der Cursor (Tab) in ein Feld am unteren Bildrand, rollt der Browser es über die Leiste - nicht dahinter. */
html:has(.knopfzeile.fest) { scroll-padding-bottom: 84px; }
@media print { .knopfzeile.fest { position: static; box-shadow: none; } }

/* 2.314 – Dispo-Tafel nach dem freigegebenen Bild (Flo 14.11.2026: „Ja, so bauen"; Prüfung Disposition DG1, DB3, DB6).
   Flache Kachel mit festen Plätzen: Zeile 1 Uhrzeit groß · Nummer · Firma als Kürzel · Ausnahmen; dann die Strecke;
   der Gegenstand; die Angaben Fahrzeug · Kunde · Preis · EK …… ⚑ ⋯; bei vergebenen darunter Bote …… WhatsApp ·
   Entziehen · Weiter. ⚑ und ⋯ sitzen immer oben rechts in der Angabenzeile; reicht der Platz in einer schmalen
   Spalte nicht, bricht dahinter nur der Einkaufspreis (oder der Preis) in eine zweite Zeile um. */
#tafel-bereich .dispo-karte.kachel { padding: 6px 9px 7px; }
#tafel-bereich .dk-kopf { gap: 2px 8px; align-items: baseline; }
#tafel-bereich .dk-kopf > .dk-haken { order: -3; align-self: center; margin: 0; }
#tafel-bereich .dk-kopf > .dk-zeit { order: -2; margin-left: 0 !important; font-size: 19px; font-weight: 700; line-height: 1.15; color: var(--text); }
#tafel-bereich .dk-kopf > .dk-zeit:empty { display: none; }
#tafel-bereich .dk-kopf > .plakette.sofort { order: -2; background: none; border: 0; padding: 0; font-size: 19px; font-weight: 700; line-height: 1.15; color: #b3261e; }
#tafel-bereich .dk-kopf > .art-ikon, #tafel-bereich .dk-kopf > .plakette.dk-stand-ruhig { display: none; }
#tafel-bereich .dk-kopf > .plakette.dk-firma { font-weight: 700; letter-spacing: .03em; padding: 1px 7px; }
#tafel-bereich .dk-weg { margin: 2px 0 0; }
#tafel-bereich .dk-weg > div, #tafel-bereich .dk-gegenstand { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#tafel-bereich .dk-gegenstand { margin: 0 0 1px; }
#tafel-bereich .dk-fuss { flex-wrap: nowrap; align-items: flex-start; gap: 5px; min-width: 0; margin-top: 2px; }
#tafel-bereich .dk-fuss > * { flex: 0 0 auto; }
#tafel-bereich .dk-fuss > .dk-angaben { flex: 1 1 0; min-width: 0; min-height: 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; }
#tafel-bereich .dk-angaben > * { flex: 0 0 auto; }
#tafel-bereich .dk-angaben > [style*="margin-left:auto"] { margin-left: 0 !important; }
#tafel-bereich .dk-angaben > span.klein[style*="margin-left:auto"] { font-size: 14px; font-weight: 700; color: var(--text); }
#tafel-bereich .dk-angaben > span.klein[style*="margin-left:auto"]:empty { display: none; }
/* Der Kunde zählt für den Umbruch nur mit seiner Mindestbreite und nimmt sich dann, was in der Zeile frei ist */
#tafel-bereich .dk-angaben > .dk-kunde { flex: 1 1 0; min-width: 2.4em; max-width: max-content; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#tafel-bereich .dk-angaben > .dk-geld { padding: 1px 5px; font-size: 12px; }
#tafel-bereich .dk-fuss > .sub-menu > summary { display: block; padding: 4px 5px; border: 1px solid var(--linie); border-radius: 6px; line-height: 1; background: var(--flaeche); }
#tafel-bereich .dk-fuss > .sub-menu > summary .ikon { display: block; width: 14px; height: 14px; margin: 0; }
#tafel-bereich .dk-fuss > .dk-mehr > summary { padding: 0 6px 2px; line-height: 20px; }
/* Das Menü hinter „⋯" klappt nach links auf - der Knopf sitzt jetzt am rechten Rand der Kachel */
#tafel-bereich .dk-fuss .dk-mehr-menu { left: auto; right: 0; }
/* Der Ertragsanteil hinter dem Einkaufspreis steht im Hinweistext; auf der Kachel erst, wenn sie breit genug ist */
@media (max-width: 1699px) { #tafel-bereich .dk-geld > .dk-anteil { display: none; } }
/* Zeile des Boten: links wer fährt (gibt nach, bevor ein Knopf umbricht), rechts die Knöpfe - „Weiter" immer ganz rechts.
   Die Zeile misst sich selbst (container): Ist sie schmal, zeigt der WhatsApp-Knopf nur sein Zeichen. */
#tafel-bereich .dk-taten { gap: 4px 6px; margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--linie); justify-content: flex-end; container: dk-taten / inline-size; }
#tafel-bereich .dk-taten:not(:has(> *)) { display: none; }
#tafel-bereich .dk-taten > .dk-bote, #tafel-bereich .dk-taten > .dk-vorschlag { flex: 1 1 0; min-width: 3.4em; max-width: max-content; overflow: hidden; text-overflow: ellipsis; margin-right: auto; }
#tafel-bereich .dk-taten > .dk-bote:has(+ a.dk-ort) { margin-right: 0; }
#tafel-bereich .dk-taten > a.dk-ort { margin-right: auto; }
#tafel-bereich .dk-taten .dk-haupttat { margin-left: 0; }
#tafel-bereich .dk-taten .dk-knopf { white-space: nowrap; }
#tafel-bereich .dk-wa { display: inline-flex; align-items: center; }
#tafel-bereich .dk-wa > .dk-wa-bild { display: none; width: 15px; height: 15px; margin: 0; }
@container dk-taten (max-width: 419px) {
  #tafel-bereich .dk-wa > .dk-wa-bild { display: block; }
  #tafel-bereich .dk-wa > .dk-wa-wort { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  #tafel-bereich .dk-wa { padding-left: 7px; padding-right: 7px; }
}
/* Kopf der Seite enger (DB6): Lage, Filterzeile und der Hinweis auf frühere Tage rücken zusammen */
body:has(#tafel-bereich) details.lage-kasten { margin-bottom: 6px; padding-top: 5px; padding-bottom: 5px; }
body:has(#tafel-bereich) form.filter.filter-eine-zeile { margin-bottom: 6px; }
body:has(#tafel-bereich) details.dispo-alt { margin-bottom: 6px; }
body:has(#tafel-bereich) details.dispo-alt:not([open]) { padding-top: 2px; padding-bottom: 2px; }
body:has(#tafel-bereich) details.dispo-alt:not([open]) > summary { font-size: 13.5px; }
body:has(#tafel-bereich) .dispo-kopf { margin-bottom: 6px; }
body:has(#tafel-bereich) .dispo-kopf .tagesring, body:has(#tafel-bereich) .dispo-kopf .tagesring svg { width: 32px; height: 32px; }
body:has(#tafel-bereich) .dispo-kopf .tagesring b { font-size: 11px; }
#tafel-bereich .dispo-kat > h2 { margin-bottom: 4px; }
/* Boten-Auswahl (DB3): Stopps und „frei ca." je Bote; ist eine Kachel gewählt, ordnet sich die Liste nach Eignung */
.bef-fuer { margin: 0 0 6px; padding: 4px 8px; border-radius: 6px; background: var(--gewaehlt); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bef-fuer[hidden] { display: none; }
.bef-lage { margin-left: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; color: var(--leise); }
.bef-lage.frei { color: #1e6b31; }
.bef-liste.geordnet { display: flex; flex-direction: column; }
.bef-liste.geordnet > .bef-gruppe:not(.bef-rang) { display: none; }
.bef-liste.geordnet > .bef-zeile { flex: 0 0 auto; }
/* Eine Hauptzeile je Bote: Wagen · Name …… Stopps · frei ca. · Tour. Darunter klein, was seltener gebraucht wird
   (Fahrzeug, Freischaltung, Ort, Provision, Telefon). Mehrere Wagen und die Disposition eines Unternehmens stehen darunter.
   Ist eine Kachel gewählt, sagen die Überschriften der Liste, wer freigeschaltet ist - die Wörter dazu entfallen dann. */
#bef-liste .bef-zeile { padding: 5px 8px; margin-bottom: 4px; }
#bef-liste .bef-zeile > div { display: flex; flex-wrap: wrap; align-items: center; gap: 1px 6px; min-width: 0; }
#bef-liste .bef-zeile > div::after { content: ""; order: 10; flex: 0 0 100%; height: 0; }
#bef-liste .bef-zeile .bef-fahrer { order: -1; flex-direction: row; flex-wrap: wrap; gap: 3px; margin: 0; }
#bef-liste .bef-zeile .bef-fahrer .bf-wagen { width: auto; }
#bef-liste .bef-zeile .bef-fahrer:has(> .bf-wagen + .bf-wagen) { order: 20; flex: 0 0 100%; margin-top: 2px; }
#bef-liste .bef-zeile > div > strong { flex: 1 1 0; min-width: 7em; max-width: max-content; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#bef-liste .bef-zeile .bef-lage { order: 5; margin-left: auto; }
#bef-liste .bef-zeile .tour-knopf { order: 6; padding: 0 6px; }
#bef-liste .bef-zeile .bef-fz { order: 11; font-weight: 600; }
/* 2.322 (DB3): „fuhr schon für den Kunden" - steht vorn in der kleinen Zeile, solange eine Kachel gewählt ist */
#bef-liste .bef-zeile .bef-fuhr { order: 11; font-weight: 600; color: light-dark(#1e6b31, #86d8a2); white-space: nowrap; }
#bef-liste .bef-zeile .bereich-worte { order: 12; float: none; margin: 0; }
#bef-liste.geordnet .bef-zeile .bereich-worte { display: none; }
#bef-liste .bef-zeile .bef-ort { order: 13; }
#bef-liste .bef-zeile .bef-tel { order: 14; white-space: nowrap; }
#bef-liste .bef-zeile .bef-dispo { order: 21; flex: 0 0 100%; min-width: 0; margin: 2px 0 0; }
#bef-liste .bef-gruppe { padding: 6px 4px 3px; }

/* 2.301 (Gesamtprüfung V1, V3, V4): Felder, die ein Zugang nur ansehen darf - sichtbar gesperrt, nicht nur stumm. */
fieldset.nur-lesen:disabled input, fieldset.nur-lesen:disabled select, fieldset.nur-lesen:disabled textarea, input.nur-lesen:disabled {
  background: var(--flaeche2, #f4f5f7); color: var(--text-leise, #5b6572); cursor: not-allowed; }

/* ---------- 2.304 – Partner-Portal am Handy (Gesamtprüfung A10) ----------
   Subunternehmer sitzen selten am Schreibtisch. Bis 2.303 waren die Tabellen des Portals bis 847 px breit und nur mit
   Wischen zu lesen; „Neuer Link" und „Deaktivieren" lagen außerhalb des Bildes, die Tippflächen waren 16 bis 33 px hoch.
   Alles hier gilt nur mit body.partner-seite (partner_kopf) - die Seiten des Büros bleiben unberührt.
   Am Rechner ändert sich nur die Zeile des Einrichtungslinks (Breite aus der Klasse statt aus dem style-Attribut). */
body.partner-seite .fahrer-link { font-size: 11.5px; width: 260px; }
@media (max-width: 720px) {
  body.partner-seite .pkopf { padding: 10px 12px; gap: 8px 12px; }
  body.partner-seite .pkopf nav { flex: 1 1 100%; order: 3; display: flex; flex-wrap: wrap; gap: 6px; }
  body.partner-seite .pkopf nav a { flex: 1 1 auto; margin: 0; padding: 11px 10px; min-height: 44px; text-align: center; opacity: 1;
    border: 1px solid rgba(255, 255, 255, .35); border-radius: 8px; }
  body.partner-seite .pkopf nav a.aktiv { background: #fff; color: #1f3a5f; border-color: #fff; font-weight: 600; }
  body.partner-seite .pkopf .wer { margin-left: auto; text-align: right; }
  body.partner-seite .pkopf .wer a { display: inline-block; padding: 12px 4px 12px 8px; }
  body.partner-seite main { padding: 12px; overflow-wrap: anywhere; }   /* „Verkehrshaftungs-/Frachtführerversicherung" lief aus dem Kasten */
  body.partner-seite main button, body.partner-seite main a.knopf { min-height: 44px; }
  body.partner-seite main input[type=text], body.partner-seite main input[type=tel], body.partner-seite main input[type=date],
  body.partner-seite main input[type=file], body.partner-seite main select { font-size: 16px; }   /* sonst zoomt Safari beim Antippen */

  /* Jede Zeile eine Karte */
  .rollrahmen.karten { overflow: visible; }
  .rollrahmen > table.tabelle.karten, table.tabelle.karten, table.tabelle.karten tbody, table.tabelle.karten tr, table.tabelle.karten td { display: block; }
  table.tabelle.karten { border: 0; background: transparent; min-width: 0; width: 100%; }
  table.tabelle.karten tr.kopf { display: none; }
  table.tabelle.karten tr { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 10px; padding: 10px 12px; margin: 0 0 10px; }
  table.tabelle.karten tr:hover td { background: transparent; }
  table.tabelle.karten td { border: 0; padding: 4px 0; text-align: left; border-radius: 0; overflow-wrap: anywhere; }
  table.tabelle.karten td:first-child { font-size: 16px; padding-bottom: 8px; margin-bottom: 4px; border-bottom: 1px solid var(--linie); }
  table.tabelle.karten td[data-l] { position: relative; padding-left: 112px; min-height: 28px; }
  table.tabelle.karten td[data-l]::before { content: attr(data-l); position: absolute; left: 0; top: 6px; width: 104px;
    font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--leise); line-height: 1.35;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  table.tabelle.karten td.leer-zeile { padding: 18px 6px; border-bottom: 0; margin: 0; font-size: 14px; }
  table.tabelle.karten td .pdf-link { display: inline-block; padding: 9px 16px; margin: -4px 0; border: 1px solid var(--linie); border-radius: 8px; text-decoration: none; font-weight: 600; }
  /* Fahrer & Wagen: der Link über die volle Breite, die beiden Knöpfe nebeneinander und groß */
  table.tabelle.karten td.link-zelle { padding-left: 0; padding-top: 26px; }
  table.tabelle.karten td.link-zelle::before { top: 4px; width: auto; }
  body.partner-seite .fahrer-link { width: 100%; font-size: 13px; }
  table.tabelle.karten td.knopf-zelle { display: flex; gap: 8px; white-space: normal !important; padding-top: 8px; }
  table.tabelle.karten td.knopf-zelle form { flex: 1 1 0; display: block !important; }
  table.tabelle.karten td.knopf-zelle button { width: 100%; }
  /* Meine Papiere: das Hochladen untereinander, jedes Feld über die volle Breite */
  table.tabelle.karten td.hochladen form { flex-direction: column; align-items: stretch !important; gap: 8px !important; padding-top: 6px; }
  table.tabelle.karten td.hochladen input[type=file], table.tabelle.karten td.hochladen input[type=date] { width: 100% !important; }
  body.partner-seite main input[type=file] { min-height: 44px; padding: 2px 0; }
  body.partner-seite main input[type=file]::file-selector-button { min-height: 40px; padding: 8px 14px; margin-right: 10px; border: 1px solid var(--linie-stark);
    border-radius: 8px; background: var(--flaeche); color: var(--text); font: inherit; }
  table.tabelle.karten td.hochladen .gueltig { display: flex; flex-direction: column; gap: 2px; margin: 0; }
}

/* ================================================================
   2.317 – Preisrechner (Ticket 238): drei Reiter, ein Formular, daneben der Preis
   ================================================================ */
.pr-vor { max-width: 860px; }
.pr-reiter { margin: 0 0 14px; flex: 0 0 auto; }
.pr-reiter a { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; }
.pr-reiter .plakette { font-size: 11px; padding: 1px 6px; }
.pr-flaeche { display: grid; grid-template-columns: minmax(0, 560px) minmax(0, 460px); gap: 16px; align-items: start; }
.pr-form, .pr-ergebnis { margin: 0; }
.pr-gebiet { margin: 0 0 12px; color: var(--leise); }
.pr-orte { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; align-items: end; }
.pr-ort { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 6px; }
.pr-ort legend, .pr-fz legend { padding: 0; margin: 0 0 5px; font-size: 13px; font-weight: 600; color: var(--leise); }
.pr-ort label { display: block; position: relative; min-width: 0; }
.pr-ort input { width: 100%; }
.pr-ort input.fehlt { border-color: var(--warn); box-shadow: 0 0 0 2px color-mix(in srgb, var(--warn) 22%, transparent); }
.pr-tausch { width: 34px; height: 34px; border-radius: 6px; border: 1px solid var(--linie); background: transparent; color: var(--leise);
  font-size: 16px; line-height: 1; cursor: pointer; padding: 0; }
.pr-tausch:hover { color: var(--text); border-color: var(--leise); }
.pr-fz { border: 0; padding: 0; margin: 16px 0 0; min-width: 0; }
.pr-fz-wahl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.pr-fz-wahl label { position: relative; display: block; cursor: pointer; }
.pr-fz-wahl input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.pr-fz-wahl span { display: block; height: 100%; padding: 8px 10px; border: 1px solid var(--linie); border-radius: 8px; }
.pr-fz-wahl strong { display: block; font-size: 14px; }
.pr-fz-wahl small { display: block; margin-top: 2px; color: var(--leise); font-size: 12px; line-height: 1.3; }
.pr-fz-wahl input:checked + span { border-color: var(--blau); box-shadow: inset 0 0 0 1px var(--blau); }
.pr-fz-wahl input:focus-visible + span { outline: 2px solid var(--blau); outline-offset: 2px; }
.pr-los { margin: 16px 0 0; }
.pr-fehler { margin: 12px 0 0; }
.pr-ergebnis { min-height: 150px; }
.pr-leer { margin: 0; color: var(--leise); }
.pr-kopfzeile { margin: 0; color: var(--leise); }
.pr-strecke { margin: 2px 0 0; font-weight: 600; }
.pr-preis { margin: 10px 0 0; line-height: 1.1; }
.pr-preis strong { font-size: 40px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.pr-preis small { font-size: 14px; color: var(--leise); }
.pr-brutto { margin: 4px 0 0; color: var(--leise); }
.pr-zeilen { width: 100%; margin: 14px 0 0; border-collapse: collapse; font-size: 13.5px; }
.pr-zeilen td { padding: 5px 0; border-top: 1px solid var(--linie); }
.pr-zeilen td.zahl { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; padding-left: 12px; }
.pr-zeilen tr.pr-summe td { font-weight: 700; border-top: 2px solid var(--linie); }
.pr-hinweise { margin: 12px 0 0; padding: 0 0 0 18px; color: var(--leise); }
.pr-hinweise li + li { margin-top: 3px; }
.pr-sperrtext { margin: 0; }
.pr-weiter { margin: 14px 0 0; }
@media (max-width: 1100px) { .pr-flaeche { grid-template-columns: minmax(0, 1fr); max-width: 620px; } }
@media (max-width: 560px) {
  .pr-orte { grid-template-columns: minmax(0, 1fr); }
  .pr-tausch { justify-self: start; }
  .pr-fz-wahl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ================================================================
   2.320 – Rechnungsseiten: was geprüft wird, steht oben
   Rechnung: Eckdaten und Positionen nebeneinander, darunter „Aktionen" über die ganze Breite.
   Rechnungslauf: Kopfzeile der Prüfliste, aufklappbare Positionen, Summenzeile.
   ================================================================ */
.re-oben { display: grid; grid-template-columns: minmax(380px, 520px) minmax(0, 1fr); gap: 0 14px; align-items: start; }
@media (max-width: 1100px) { .re-oben { grid-template-columns: minmax(0, 1fr); } }
.re-positionen textarea.pos-text { width: 100%; min-height: 0; resize: none; overflow: hidden; line-height: 1.35; display: block; }
.re-positionen .knopfzeile { margin-top: 10px; align-items: center; }
.re-positionen .knopfzeile .klein { flex: 1 1 320px; }
.re-aktionen > .knopfzeile { margin-top: 0; align-items: center; }
.re-korrigieren { margin-top: 12px; border-top: 1px solid var(--linie); padding-top: 10px; }
.re-korrigieren > summary { cursor: pointer; font-weight: 600; }
.re-korrigieren > summary .klein { font-weight: 400; margin-left: 6px; }

.rl-kopf { display: flex; gap: 10px 18px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin: 0 0 8px; }
.rl-kopf p { flex: 1 1 420px; }
.rl-kopf .knopf { white-space: nowrap; }
button.rl-auf { padding: 2px 9px; min-width: 46px; font-variant-numeric: tabular-nums; }
tr.rl-pos > td { background: var(--flaeche3); padding-top: 6px; padding-bottom: 10px; }
.rl-pos-tabelle { margin: 0; font-size: var(--s-fliess); }
.rl-pos-tabelle td { border-bottom: 1px solid var(--linie); }
.rl-pos-tabelle tr:last-child td { border-bottom: 0; }
tr.rl-summe > td { background: var(--flaeche2); border-top: 2px solid var(--linie-stark); }
.rl-postfach { white-space: nowrap; }

/* Pillen der Rechnungsgruppe (Ausgangsrechnungen · Mahnlauf · Einkauf · Gutschriften): auf allen vier Seiten dieselbe Zeile */
.seitenkopf .reiter.rechnungsgruppe { margin-left: auto; }
.reiter.rechnungsgruppe a { padding: var(--a-3) var(--a-6); font-size: var(--s-fliess); }

/* ================================================================
   2.297 – Arbeitsplatz Telefon & Dispo: neuer Aufbau
   (Prüfung Auftragsannahme B1–B5, G1–G4; Prüfung Disposition DB5.
   Bild von Flo am 14.11.2026 freigegeben: „Ja, so bauen".)
   Alles unter body.seite-arbeitsplatz - die Arbeitsplätze Zustellung,
   Buchhaltung und Geschäftsführung teilen sich die Klassen und bleiben,
   wie sie sind.
   ================================================================ */
/* Verweise statt Knöpfe: Vorschau, Karte, Zeitraum, „Neu wie dieser", „Alle Felder" */
body.seite-arbeitsplatz .ap-verweis, body.seite-arbeitsplatz button.ap-verweis { background: none; border: 0; padding: 0; color: var(--blau); font-size: 12.5px; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; font-family: inherit; white-space: nowrap; }
body.seite-arbeitsplatz .ap-verweis:hover { background: none; text-decoration-thickness: 2px; }
body.seite-arbeitsplatz .ap-verweis[hidden], body.seite-arbeitsplatz .ap-zeitraum[hidden] { display: none; }

/* --- linke Spalte: drei knappe Zeilen über der Liste --- */
body.seite-arbeitsplatz .ap-liste { max-height: calc(100vh - 118px); }
body.seite-arbeitsplatz .ap-liste-kopf { padding: 8px 9px 5px; gap: 5px; }
body.seite-arbeitsplatz .ap-liste-kopf input, body.seite-arbeitsplatz .ap-liste-kopf select { padding-top: 5px; padding-bottom: 5px; }

body.seite-arbeitsplatz .ap-kopf1 { display: flex; gap: 6px; }
body.seite-arbeitsplatz .ap-kopf1 .ap-anruf-zeile { flex: 1; min-width: 0; }
body.seite-arbeitsplatz .ap-kopf1 #ap-neu { white-space: nowrap; padding: 6px 14px; }
body.seite-arbeitsplatz .ap-kopf2 { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px; align-items: center; }
body.seite-arbeitsplatz .ap-kopf2 .ap-tag input[type=date] { width: 138px; flex: none; }
body.seite-arbeitsplatz .ap-kopf2 select { width: auto; max-width: 118px; }
body.seite-arbeitsplatz .ap-kopf2 input[type=search] { min-width: 0; }
body.seite-arbeitsplatz .ap-zeitraum { display: flex; gap: 6px; align-items: center; font-size: 12.5px; }
body.seite-arbeitsplatz .ap-zeitraum input[type=date] { width: 150px; }
body.seite-arbeitsplatz .ap-zeitraum button { padding: 4px 10px; font-size: 12.5px; }
body.seite-arbeitsplatz .ap-liste-zeile { gap: 10px; flex-wrap: nowrap; white-space: nowrap; }
body.seite-arbeitsplatz #ap-anzahl { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
body.seite-arbeitsplatz .ap-werkzeuge { display: flex; gap: 10px; flex: none; }
/* Die fünf Filter stehen in EINER Zeile - bei 430 px Spaltenbreite passen sie; wird es enger, kürzt der letzte ab */
body.seite-arbeitsplatz .ap-arten { flex-wrap: nowrap; gap: 3px; overflow: hidden; }
body.seite-arbeitsplatz .ap-liste-kopf .ap-art { font-size: 12px; padding: 1px 7px; white-space: nowrap; flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
body.seite-arbeitsplatz .ap-liste-kopf .ap-art::before { margin-right: 4px; }
body.seite-arbeitsplatz .ap-art-zahl { font-weight: 700; }
body.seite-arbeitsplatz .ap-vorschau { margin-top: 2px; }

/* --- Liste: zwei Zeilen je Auftrag (46 px statt 75) --- */
body.seite-arbeitsplatz .ap-zeile { grid-template-columns: 50px minmax(0, 1fr) auto; grid-template-rows: auto auto; gap: 1px 8px; padding: 6px 9px 6px 8px; align-items: baseline; }
body.seite-arbeitsplatz .ap-z-zeit { grid-row: 1 / 3; grid-column: 1; align-self: start; font-size: 14px; white-space: nowrap; }
body.seite-arbeitsplatz .ap-z-zeit.ohne { font-size: 11.5px; color: var(--leise); padding-top: 2px; }
body.seite-arbeitsplatz .ap-zeile.eilt .ap-z-zeit, body.seite-arbeitsplatz .ap-zeile.vorbei .ap-z-zeit { color: var(--warn-text); }
body.seite-arbeitsplatz .ap-z-kunde { grid-row: 1; grid-column: 2; font-size: 13.5px; }
body.seite-arbeitsplatz .ap-zeile > .plakette, body.seite-arbeitsplatz .ap-zeile > .sofort-zaehler { grid-row: 1; grid-column: 3; justify-self: end; margin: 0; white-space: nowrap; align-self: center; line-height: 1.35; }
/* Der Sofort-Zähler bringt seine Farbe selbst mit (gelb, dann rot - sofort-zaehler.js); hier nur die Größe der Plaketten */
body.seite-arbeitsplatz .ap-zeile > .sofort-zaehler { font-size: 10.5px; padding: 1px 7px; }
body.seite-arbeitsplatz .ap-zeile > .sofort-zaehler:empty { display: none; }
body.seite-arbeitsplatz .plakette.ap-vorbei { background: var(--warn-bg); color: var(--warn-text); border: 0; box-shadow: inset 0 0 0 1px var(--warn-rand); font-weight: 600; }
body.seite-arbeitsplatz .ap-z-weg { grid-row: 2; grid-column: 2; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--leise); font-size: 12px; line-height: 1.25; -webkit-line-clamp: unset; }
body.seite-arbeitsplatz .ap-z-bote { grid-row: 2; grid-column: 3; max-width: 190px; font-size: 12px; }

/* --- Formular: Reihenfolge wie am Telefon gesprochen wird --- */
body.seite-arbeitsplatz .ap-vkopf { margin-bottom: 6px; }
body.seite-arbeitsplatz .ap-vkopf-rechts { gap: 14px; align-items: center; flex-wrap: wrap; }
body.seite-arbeitsplatz .ap-reihe { display: grid; gap: 6px 10px; margin-bottom: 6px; align-items: start; }
body.seite-arbeitsplatz .ap-reihe label, body.seite-arbeitsplatz .ap-anmerkung, body.seite-arbeitsplatz .ap-bef-block > label { margin: 0; font-size: 12.5px; display: block; min-width: 0; }
body.seite-arbeitsplatz .ap-reihe-kunde { grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.25fr) minmax(0, 1fr); }
body.seite-arbeitsplatz .ap-reihe-kunde .ap-kunde-feld { grid-column: auto; }
/* 2.306 (Gesamtprüfung G8): Der Rahmen des gewählten Feldes (2 px, 2 px Abstand) berührte die Beschriftung darüber -
   am Kundenfeld fiel es auf, weil es beim Öffnen gewählt ist. Die ganze Reihe bekommt 4 px Luft, damit sie in einer Flucht bleibt. */
body.seite-arbeitsplatz .ap-reihe-kunde > label > .sucher, body.seite-arbeitsplatz .ap-reihe-kunde > label > select,
body.seite-arbeitsplatz .ap-reihe-kunde > label > input:not([type=hidden]) { margin-top: 4px; }
body.seite-arbeitsplatz .ap-reihe-fahrt { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1.05fr) minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr); }
/* 2.318 (AZ4): rechtssichere Zustellung - mit „Zustellung bis (Tag)" sind es sechs Felder: zwei Reihen zu dreien
   (Produkt · Fahrzeug · Datum / Abholung ab · Zustellung bis (Tag) · Zustellung bis). In einer Reihe wären sie unlesbar schmal. */
body.seite-arbeitsplatz .ap-mit-zustelltag .ap-reihe-fahrt { grid-template-columns: repeat(3, minmax(0, 1fr)); }
body.seite-arbeitsplatz .ap-reihe-preis { display: flex; }
body.seite-arbeitsplatz .ap-reihe-preis label { flex: 0 0 104px; }
body.seite-arbeitsplatz .ap-reihe-preis .ap-preis-feld { flex: 0 0 128px; }
body.seite-arbeitsplatz .ap-reihe-preis .ap-gegenstand { flex: 1 1 auto; }
body.seite-arbeitsplatz .ap-anmerkung { margin-bottom: 8px; }
body.seite-arbeitsplatz .ap-preiszeile { display: flex; flex-wrap: wrap; gap: 2px 14px; margin: -3px 0 6px; }
body.seite-arbeitsplatz .ap-preiszeile:not(:has(span:not(:empty))) { display: none; }
body.seite-arbeitsplatz .ap-preiszeile .ap-preisquelle, body.seite-arbeitsplatz .ap-preiszeile .ap-kmhinweis { display: inline; margin: 0; }
body.seite-arbeitsplatz .ap-preiszeile span:empty { display: none; }
body.seite-arbeitsplatz .ap-vorbelegt { margin: -2px 0 7px; line-height: 1.35; }
body.seite-arbeitsplatz .ap-vorbelegt b { color: var(--text); font-weight: 600; }
body.seite-arbeitsplatz .ap-kontakt-notiz { display: block; margin: -2px 0 7px; }
body.seite-arbeitsplatz .ap-kontakt-notiz[hidden] { display: none; }
body.seite-arbeitsplatz .ap-kontakt-neu { margin-bottom: 8px; }
body.seite-arbeitsplatz .ap-firmawahl:disabled { color: var(--text); opacity: 1; background: var(--flaeche2, #f4f5f7); }
@media (max-width: 900px) {
  body.seite-arbeitsplatz .ap-reihe-kunde { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  body.seite-arbeitsplatz .ap-reihe-kunde .ap-kunde-feld { grid-column: 1 / -1; }
  body.seite-arbeitsplatz .ap-reihe-fahrt { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* --- Stationen: Karte mit zwei Zeilen, Felder so groß wie alle anderen ---
   Oben: Griff · Nummer · Art · Firma/Name · Zeiten · Mehr · Entfernen. Unten: Straße · PLZ · Ort.
   Die Pfeile (erst ab drei Stationen) stehen links unter der Nummer - in der oberen Zeile nähmen sie dem Namen den Platz
   (bei 1366 px blieben ihm 60 px). Die Knöpfe sind dafür einzeln ins Raster gelegt (.ap-st-kn löst sich auf). */
body.seite-arbeitsplatz .ap-stationen { display: block; margin: 2px 0 8px; }
body.seite-arbeitsplatz .ap-st-kopf { align-items: center; margin-bottom: 5px; }
body.seite-arbeitsplatz .ap-st-titel { font-size: 14px; }
body.seite-arbeitsplatz .ap-st-neu button { padding: 4px 11px; font-size: 13px; }
body.seite-arbeitsplatz .ap-st-liste { gap: 6px; }
body.seite-arbeitsplatz .ap-st { gap: 5px 6px; padding: 7px 8px 7px 5px;
  /* Die Knopfspalten haben feste Breiten: „auto" wüchse auf die Eigenbreite der Eingabefelder darunter (PLZ, Ort) und
     ließe dem Namen nichts übrig. */
  grid-template-columns: 15px 15px 114px minmax(0, 1fr) 76px 60px 90px;
  grid-template-areas: "griff nr     typ name kz  km  kw"
                       "hoch  runter adr adr  plz ort ort"
                       "zeiten zeiten zeiten zeiten zeiten zeiten zeiten"
                       "zusatz zusatz zusatz zusatz zusatz zusatz zusatz"; }
body.seite-arbeitsplatz .ap-st input, body.seite-arbeitsplatz .ap-st select { font-size: 14px; padding: 5px 8px; }
body.seite-arbeitsplatz .ap-st-nr { font-size: 12.5px; }
body.seite-arbeitsplatz .ap-st-kn { display: contents; }
body.seite-arbeitsplatz .ap-st-kn button { padding: 5px 4px; font-size: 13px; line-height: 1.2; white-space: nowrap; text-align: center; }
body.seite-arbeitsplatz .ap-st-zeit { grid-area: kz; }
body.seite-arbeitsplatz .ap-st-mehr { grid-area: km; }
body.seite-arbeitsplatz .ap-st-weg { grid-area: kw; }
body.seite-arbeitsplatz .ap-st-kn .ap-st-hoch { grid-area: hoch; }
body.seite-arbeitsplatz .ap-st-kn .ap-st-runter { grid-area: runter; }
body.seite-arbeitsplatz .ap-st-kn .ap-st-hoch, body.seite-arbeitsplatz .ap-st-kn .ap-st-runter { display: none; padding: 0; width: 15px; height: 28px; font-size: 10px; border: 0; background: none; color: var(--blau); }
body.seite-arbeitsplatz .ap-st-liste.viele .ap-st-hoch, body.seite-arbeitsplatz .ap-st-liste.viele .ap-st-runter { display: block; }
body.seite-arbeitsplatz .ap-st-kn .ap-st-hoch:hover, body.seite-arbeitsplatz .ap-st-kn .ap-st-runter:hover { background: var(--gewaehlt, #e8f0fe); }
body.seite-arbeitsplatz .ap-st-griff { visibility: hidden; }
body.seite-arbeitsplatz .ap-st-liste.viele .ap-st-griff { visibility: visible; }
body.seite-arbeitsplatz .ap-st-mehr.hat-spuren::after { content: " •"; margin: 0; }
body.seite-arbeitsplatz .ap-st-zeiten, body.seite-arbeitsplatz .ap-st-zusatz { gap: 6px; padding-left: 36px; }
body.seite-arbeitsplatz .ap-st .ap-treffer { left: 41px; top: 38px; }
@media (max-width: 700px) {
  body.seite-arbeitsplatz .ap-st { grid-template-columns: 15px 15px minmax(0, 1fr) 76px minmax(0, 1fr);
    grid-template-areas: "griff nr typ typ typ" "hoch runter name name name" ". . adr adr adr" ". . plz ort ort" ". . kz km kw"
                         "zeiten zeiten zeiten zeiten zeiten" "zusatz zusatz zusatz zusatz zusatz"; }
}

/* --- Beförderer: eine Zeile. Feld · Einkauf · „An … übergeben"; „＋ anlegen" steht rechts über dem Feld --- */
body.seite-arbeitsplatz .ap-bef-block { display: grid; grid-template-columns: minmax(0, 1fr) 118px auto auto; gap: 6px 10px; align-items: end; margin: 0 0 4px; padding: 8px 9px; }
body.seite-arbeitsplatz .ap-bef-block .ap-bef-feld { grid-column: 1; grid-row: 1; }
body.seite-arbeitsplatz .ap-bef-block .ap-bef-feld .klein { white-space: nowrap; }
body.seite-arbeitsplatz .ap-bef-block .ap-ek-feld { grid-column: 2; grid-row: 1; }
body.seite-arbeitsplatz .ap-bef-block .ap-bef-chips { display: contents; }
body.seite-arbeitsplatz .ap-bef-block .ap-bef-neu-kn { grid-column: 1; grid-row: 1; justify-self: end; align-self: start; font-size: 12px; }
body.seite-arbeitsplatz .ap-bef-block .ap-bef-weg { grid-column: 3; grid-row: 1; padding: 6px 10px; font-size: 13px; }
body.seite-arbeitsplatz .ap-bef-block .ap-bef-partner { grid-column: 4; grid-row: 1; padding: 6px 12px; font-size: 13.5px; white-space: nowrap; }
body.seite-arbeitsplatz .ap-bef-block .ap-bef-neu { grid-column: 1 / -1; grid-row: 2; }
body.seite-arbeitsplatz .ap-bef-block .ap-ekquelle { grid-column: 1 / -1; }
body.seite-arbeitsplatz .ap-bef-block .ap-ekquelle:empty { display: none; }

/* --- Leiste: „Speichern" bleibt unten am Fenster. Rechts steht, was noch fehlt; eine Meldung steht darüber. --- */
body.seite-arbeitsplatz .ap-knoepfe { position: sticky; bottom: 0; z-index: 20; margin: 10px -14px -12px; padding: 8px 14px; background: var(--flaeche); border-top: 1px solid var(--linie); border-radius: 0 0 10px 10px; box-shadow: 0 -8px 14px -12px var(--schatten); flex-wrap: wrap; gap: 6px 8px; }
body.seite-arbeitsplatz .ap-knoepfe button { padding: 7px 14px; font-size: 14.5px; white-space: nowrap; }
body.seite-arbeitsplatz .ap-knoepfe kbd { font: 10.5px/1 ui-monospace, SFMono-Regular, Consolas, monospace; padding: 2px 4px; margin-left: 6px; border: 1px solid currentColor; border-radius: 4px; opacity: .8; }
body.seite-arbeitsplatz .ap-knoepfe .ap-meldung { order: -1; flex: 1 1 100%; }
body.seite-arbeitsplatz .ap-knoepfe .ap-meldung:empty { display: none; }
body.seite-arbeitsplatz .ap-fehlt { flex: 1 1 90px; min-width: 0; text-align: right; line-height: 1.25; }
/* Schmale Bildschirme (1366 px): die Tastenhinweise weichen dem Satz „Es fehlt: …" - sie stehen im Tooltip der Knöpfe */
@media (max-width: 1400px) { body.seite-arbeitsplatz .ap-knoepfe kbd { display: none; } }
/* Bis 1100 px: zwei Spalten, die Handlung darunter. Die Regel von 2.106 (drei Spalten für diese Seite) war stärker als
   der Umbruch für schmale Fenster - bei 1024 px blieben dem Formular 208 px. */
@media (max-width: 1100px) {
  body.seite-arbeitsplatz .ap { grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); }
  body.seite-arbeitsplatz .ap-arten { flex-wrap: wrap; }
  body.seite-arbeitsplatz .ap-liste-zeile { flex-wrap: wrap; white-space: normal; }
}
@media (max-width: 700px) { body.seite-arbeitsplatz .ap { grid-template-columns: minmax(0, 1fr); } }
/* 1366 px: Liste und rechte Spalte geben der Mitte je 30 px ab - sonst blieben dem Namen einer Station 96 px */
@media (min-width: 1101px) and (max-width: 1400px) {
  body.seite-arbeitsplatz .ap { grid-template-columns: minmax(300px, 400px) minmax(0, 1fr) minmax(250px, 300px); gap: 12px; }
  body.seite-arbeitsplatz .ap-liste-kopf .ap-art { font-size: 11.5px; padding: 1px 6px; }
  body.seite-arbeitsplatz .ap-arten { gap: 2px; }
  body.seite-arbeitsplatz .ap-kopf2 .ap-tag input[type=date] { width: 128px; }
  body.seite-arbeitsplatz .ap-werkzeuge { gap: 7px; }
  body.seite-arbeitsplatz .ap-liste-zeile .klein, body.seite-arbeitsplatz .ap-liste-zeile .ap-verweis { font-size: 12px; }
}
body.seite-arbeitsplatz .ap-verlauf { margin-top: 10px; }
body.seite-arbeitsplatz .ap-fz-hinweis { margin: -2px 0 7px; }
body.seite-arbeitsplatz .ap-fz-hinweis[hidden] { display: none; }

/* --- rechte Spalte beim Erfassen: der Kunde --- */
body.seite-arbeitsplatz .ap-kb h3 { font-size: 16px; }
body.seite-arbeitsplatz .ap-kb h4 { margin: 13px 0 6px; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--leise); }
body.seite-arbeitsplatz .ap-kb-notiz { margin: 0; padding: 8px 10px; border-radius: 8px; background: var(--pl-gelb-bg); color: var(--pl-gelb-tx); font-size: 13px; line-height: 1.4; white-space: pre-line; }
body.seite-arbeitsplatz .ap-kb-auftrag { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 7px 9px; margin-bottom: 6px; border: 1px solid var(--linie); border-radius: 8px; font-size: 13px; }
body.seite-arbeitsplatz .ap-kb-auftrag > div { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
body.seite-arbeitsplatz .ap-kb-ziel { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.seite-arbeitsplatz .ap-kb-auftrag button { flex: none; padding: 4px 10px; font-size: 12.5px; white-space: nowrap; }
body.seite-arbeitsplatz .ap-kb-zeile { display: flex; justify-content: space-between; gap: 10px; padding: 1px 0; font-size: 13px; font-variant-numeric: tabular-nums; }
body.seite-arbeitsplatz .ap-kb-zeile span:last-child { white-space: nowrap; }
body.seite-arbeitsplatz .ap-kb-summe { margin-top: 4px; padding-top: 5px; border-top: 1px solid var(--linie); font-weight: 600; }
body.seite-arbeitsplatz .ap-kb-fuss { margin: 12px 0 0; }

/* 2.313 (Paket C der Auftragsannahme): Marke neben der Firma, Zusatzzeile Spedition, „Weitere Angaben" */
body.seite-arbeitsplatz .ap-reihe-kunde:has(.ap-marke-feld:not([hidden])) { grid-template-columns: minmax(0, 1.6fr) minmax(0, .9fr) minmax(0, 1.05fr) minmax(0, 1.15fr); }
@media (min-width: 701px) { body.seite-arbeitsplatz form.ap-spedition .ap-st { grid-template-columns: 15px 15px 136px minmax(0, 1fr) 76px 60px 90px; } }
body.seite-arbeitsplatz .ap-firmawahl.ap-offen { border-color: var(--warn); box-shadow: 0 0 0 2px color-mix(in srgb, var(--warn) 22%, transparent); }
body.seite-arbeitsplatz .ap-reihe-spedition { grid-template-columns: repeat(3, minmax(0, 150px)); }
body.seite-arbeitsplatz .ap-weitere { margin: 0 0 8px; border: 1px solid var(--linie); border-radius: 8px; padding: 6px 10px; background: var(--flaeche2, transparent); }
body.seite-arbeitsplatz .ap-weitere > summary { cursor: pointer; font-size: 12.5px; font-weight: 600; }
body.seite-arbeitsplatz .ap-weitere[open] > summary { margin-bottom: 6px; }
body.seite-arbeitsplatz .ap-reihe-weitere { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 1.4fr); }
body.seite-arbeitsplatz .ap-weitere-haken { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; font-size: 12.5px; }
body.seite-arbeitsplatz .ap-weitere-haken label { margin: 0; display: inline-flex; align-items: center; gap: 6px; font-weight: 400; }
body.seite-arbeitsplatz .ap-weitere-haken input[type=checkbox] { width: auto; margin: 0; }
body.seite-arbeitsplatz .ap-weitere-haken .ap-intern-grund { flex: 1 1 260px; }
body.seite-arbeitsplatz .ap-weitere-haken .ap-intern-grund input { flex: 1 1 auto; }
body.seite-arbeitsplatz .ap-weitere-haken label[hidden] { display: none; }
@media (max-width: 760px) {
  body.seite-arbeitsplatz .ap-reihe-kunde:has(.ap-marke-feld:not([hidden])) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  body.seite-arbeitsplatz .ap-reihe-weitere { grid-template-columns: minmax(0, 1fr); }
}

/* Schwebende Hinweise oben rechts - unten in der Mitte lagen sie über Preis, Kilometer und der Leiste (B3) */
body.seite-arbeitsplatz .ap-toast { left: auto; right: 22px; top: 96px; bottom: auto; transform: none; max-width: min(92vw, 420px); }
