/* Paletten-Station: Handy hochkant (375 px), grosse Beruehrflaechen (>= 48 px), hoher Kontrast fuer die Halle.
   ATS-Blau #1E77BE, weisser Grund, Systemschrift (keine externen Schriften). */
:root {
  --blau: #1E77BE;
  --blau-dunkel: #155b93;
  --blau-hell: #e7f0f9;
  --text: #0f172a;
  --grau: #475569;
  --grau-hell: #94a3b8;
  --linie: #cbd5e1;
  --flaeche: #f1f5f9;
  --gruen: #15803d;
  --gruen-hell: #dcfce7;
  --gelb: #facc15;
  --gelb-text: #713f12;
  --gelb-hell: #fef9c3;
  --amber: #d97706;
  --rot: #b91c1c;
  --rot-hell: #fee2e2;
  --radius: 14px;
  --schrift: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans",
    "Noto Sans Arabic", "Geeza Pro", Tahoma, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; background: #fff; color: var(--text); }
body {
  font: 17px/1.35 var(--schrift);
  text-align: left;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}
[hidden] { display: none !important; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg.ic { width: 1.25em; height: 1.25em; flex: none; stroke: currentColor; fill: none; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.2em; }

/* Zweisprachig: deutsche Zeile, arabische kleiner darunter (Lager-Desk Bi.tsx) */
.de { display: block; }
.ar { display: block; direction: rtl; unicode-bidi: plaintext; text-align: inherit; font-size: .8em;
  line-height: 1.45; font-weight: 400; opacity: .78; letter-spacing: 0; }
.inline .de, .inline .ar { display: inline; }
.inline .ar { margin-left: .4em; }

/* Kopf */
.kopf { padding: 10px 16px 8px; border-bottom: 1px solid var(--linie); background: #fff; }
.kopf-zeile { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 36px; }
.kopf-zeile + .kopf-zeile { margin-top: 6px; }
.logo { height: 24px; width: auto; display: block; }
.datum { font-size: 26px; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; }
.netz { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; padding: 5px 10px;
  border-radius: 999px; background: var(--gruen-hell); color: var(--gruen); white-space: nowrap; }
.netz::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.netz.aus { background: var(--rot-hell); color: var(--rot); }
.netz.wartet { background: var(--gelb-hell); color: var(--gelb-text); }
.mitarbeiter { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; max-width: 52%;
  padding: 6px 14px; border: 2px solid var(--blau); border-radius: 999px; background: #fff; color: var(--blau-dunkel);
  font-weight: 700; font-size: 15px; }
.mitarbeiter .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mitarbeiter.fehlt { background: var(--gelb); border-color: var(--gelb); color: var(--text); }

main { max-width: 560px; margin: 0 auto; padding: 12px 16px 120px; }
.seite.mittig { text-align: center; padding-top: 48px; }
.seite.mittig h1 { font-size: 24px; margin: 12px 0 8px; }
.gross-symbol { color: var(--blau); display: flex; justify-content: center; }
.gross-symbol svg.ic { width: 72px; height: 72px; stroke-width: 1.6; }
.erklaerung { color: var(--grau); margin: 0 auto 20px; max-width: 30em; }
.meldung-klein { color: var(--rot); font-size: 15px; }
.lade-kreis { width: 44px; height: 44px; margin: 0 auto 14px; border-radius: 50%; border: 4px solid var(--blau-hell);
  border-top-color: var(--blau); animation: drehen .9s linear infinite; }
@keyframes drehen { to { transform: rotate(360deg); } }

h2.abschnitt { font-size: 15px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--grau);
  margin: 22px 0 8px; }
h2.abschnitt .ar { text-transform: none; font-size: .9em; }

/* Knoepfe */
.knopf { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 56px; padding: 10px 18px; border-radius: var(--radius); border: 2px solid transparent;
  font-weight: 750; font-size: 18px; text-align: center; text-decoration: none; line-height: 1.2;
  transition: transform .06s, background .15s; touch-action: manipulation; }
.knopf:active:not(:disabled) { transform: scale(.98); }
.knopf:disabled { opacity: .45; cursor: not-allowed; }
.knopf.haupt { background: var(--blau); color: #fff; }
.knopf.haupt:active:not(:disabled) { background: var(--blau-dunkel); }
.knopf.gruen { background: var(--gruen); color: #fff; }
.knopf.gefahr { background: var(--rot); color: #fff; }
.knopf.gefahr-rand { background: #fff; color: var(--rot); border-color: var(--rot); }
.knopf.neben { background: #fff; color: var(--blau-dunkel); border-color: var(--blau); }
.knopf.klein { min-height: 48px; font-size: 15px; padding: 6px 12px; }
.knopf.breit { display: flex; width: 100%; }
.knopf.riesig { min-height: 72px; font-size: 20px; }
.knopf .ar { opacity: .85; }
.knopf-reihe { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }

/* Offene Vorgaenge */
.offen-liste { display: grid; gap: 8px; margin-bottom: 14px; }
.offen-karte { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 12px; width: 100%;
  min-height: 64px; padding: 10px 14px; border: 2px solid var(--blau); border-radius: var(--radius);
  background: var(--blau-hell); text-align: left; }
.offen-karte .sendung { font-weight: 800; font-size: 17px; font-variant-numeric: tabular-nums; word-break: break-all; }
.offen-karte .info { color: var(--grau); font-size: 14px; grid-column: 1; }
.offen-karte .zahl { grid-row: 1 / span 2; grid-column: 2; text-align: right; font-weight: 800; font-size: 20px;
  color: var(--blau-dunkel); white-space: nowrap; }
.offen-karte .zahl small { display: block; font-size: 13px; font-weight: 700; }

/* Reiter */
.reiter { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 4px 0 6px; }
.reiter button { display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 8px 12px;
  border: 2px solid var(--linie); border-radius: var(--radius); background: #fff; font-weight: 750; font-size: 16px;
  text-align: left; line-height: 1.2; }
.reiter button .reiter-symbol { color: var(--blau); display: flex; }
.reiter button .reiter-symbol svg.ic { width: 26px; height: 26px; }
.reiter button[aria-selected="true"] { background: var(--blau); border-color: var(--blau); color: #fff; }
.reiter button[aria-selected="true"] .reiter-symbol { color: #fff; }

/* Kacheln / Chips */
.kacheln { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kachel { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 4px;
  min-height: 72px; padding: 10px 14px; border: 2px solid var(--linie); border-radius: var(--radius);
  background: #fff; text-align: left; font-weight: 800; font-size: 18px; line-height: 1.15; min-width: 0; }
.kachel .name { overflow-wrap: anywhere; }
.kachel .kuerzel { font-size: 13px; font-weight: 800; letter-spacing: .06em; padding: 2px 8px; border-radius: 6px;
  background: var(--flaeche); color: var(--grau); }
.kachel.ohne { border-style: dashed; grid-column: 1 / -1; min-height: 60px; }
.kachel.ohne .ar { font-weight: 500; }
.kachel.neu { color: var(--blau); align-items: center; }
.neu-felder { display: grid; gap: 10px; margin-top: 12px; }
.kachel[aria-pressed="true"] { border-color: var(--blau); background: var(--blau); color: #fff; }
.kachel[aria-pressed="true"] .kuerzel { background: rgba(255, 255, 255, .22); color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 8px 14px;
  border: 2px solid var(--linie); border-radius: 12px; background: #fff; font-weight: 700; font-size: 16px;
  text-align: center; line-height: 1.2; max-width: 100%; overflow-wrap: anywhere; }
.chip[aria-pressed="true"] { border-color: var(--blau); background: var(--blau); color: #fff; }
.chip small { display: block; font-weight: 500; font-size: 12px; opacity: .85; }
.segment { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border: 2px solid var(--blau);
  border-radius: 12px; overflow: hidden; }
.segment button { min-height: 48px; border: 0; border-left: 2px solid var(--blau); background: #fff;
  color: var(--blau-dunkel); font-weight: 800; font-variant-numeric: tabular-nums; }
.segment button:first-child { border-left: 0; }
.segment button[aria-pressed="true"] { background: var(--blau); color: #fff; }
.hinweis-box { padding: 12px 14px; border-radius: 12px; background: var(--flaeche); color: var(--grau); font-size: 15px; }
.hinweis-box.gelb { background: var(--gelb-hell); color: var(--gelb-text); }

/* Anzahl */
.anzahl { display: grid; grid-template-columns: 64px 1fr 64px; gap: 8px; }
.anzahl button { min-height: 72px; border: 2px solid var(--blau); border-radius: var(--radius); background: #fff;
  color: var(--blau-dunkel); font-size: 32px; font-weight: 700; line-height: 1; }
.anzahl input { width: 100%; min-height: 72px; text-align: center; font-size: 40px; font-weight: 800;
  border: 2px solid var(--linie); border-radius: var(--radius); background: var(--flaeche);
  font-variant-numeric: tabular-nums; }
.anzahl input:focus { outline: 3px solid var(--blau); outline-offset: 0; background: #fff; }
.schnellwahl { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; margin-top: 8px; }
.schnellwahl .chip { font-size: 20px; font-weight: 800; }
.start-knopf { margin-top: 22px; }
.formular-fehler { margin-top: 10px; color: var(--rot); font-weight: 700; }

/* Vorgang */
.vorgang-kopf { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.zurueck { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 56px; min-height: 48px;
  padding: 4px 10px; border: 2px solid var(--linie); border-radius: 12px; background: #fff; font-weight: 700; font-size: 14px; }
.vorgang-titel { min-width: 0; flex: 1; }
.vorgang-titel .sendung { font-size: 20px; font-weight: 850; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.vorgang-titel .info { color: var(--grau); font-size: 14px; overflow-wrap: anywhere; }
.art-marke { display: inline-block; padding: 2px 8px; border-radius: 6px; background: var(--blau-hell);
  color: var(--blau-dunkel); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.fortschritt { padding: 14px 16px 16px; border-radius: 18px; background: var(--flaeche); text-align: center; }
.fortschritt .zahlen { font-size: 64px; font-weight: 900; line-height: 1; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums; }
.fortschritt .zahlen .von { color: var(--grau); font-weight: 700; }
.fortschritt .wort { font-size: 18px; font-weight: 700; color: var(--grau); margin-top: 2px; }
.fortschritt.fertig { background: var(--gruen-hell); }
.fortschritt.fertig .zahlen { color: var(--gruen); }
.balken { height: 14px; margin-top: 12px; border-radius: 7px; background: #dbe3ec; overflow: hidden; }
.balken > i { display: block; height: 100%; width: 0; background: var(--blau); border-radius: 7px; transition: width .25s; }
.fortschritt.fertig .balken > i { background: var(--gruen); }

.banner { display: grid; gap: 8px; margin-top: 10px; padding: 12px 14px; border-radius: 12px; font-size: 15px; font-weight: 600; }
.banner.ok { background: var(--gruen-hell); color: #14532d; }
.banner.fehler { background: var(--rot-hell); color: #7f1d1d; }
.banner.info { background: var(--blau-hell); color: #0c3b61; }
.banner.gelb { background: var(--gelb-hell); color: var(--gelb-text); }
.banner .zeile { display: flex; align-items: flex-start; gap: 8px; }
.banner .zeile > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.banner .x { min-width: 40px; min-height: 40px; margin: -8px -8px 0 0; border: 0; background: transparent;
  font-size: 22px; line-height: 1; color: inherit; }
.banner .knopf-reihe { margin-top: 0; }

.scan { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; margin-top: 12px; }
.scan-feld { width: 100%; min-width: 0; min-height: 64px; padding: 8px 14px; border: 3px solid var(--blau);
  border-radius: var(--radius); background: #fff; font-size: 22px; font-weight: 700; letter-spacing: .02em;
  font-variant-numeric: tabular-nums; }
.scan-feld:focus { outline: 4px solid rgba(30, 119, 190, .3); outline-offset: 0; }
.scan-feld::placeholder { color: var(--grau-hell); font-weight: 600; }
.scan-knopf { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  width: 64px; min-height: 64px; border: 2px solid var(--blau); border-radius: var(--radius); background: #fff;
  color: var(--blau-dunkel); font-size: 11px; font-weight: 800; padding: 4px; }
.scan-knopf svg.ic { width: 26px; height: 26px; }
.scan-knopf[aria-pressed="true"] { background: var(--blau); color: #fff; }
.scan-hinweis { margin: 6px 2px 0; font-size: 14px; color: var(--grau); }

.filter { display: flex; gap: 8px; margin: 18px 0 8px; align-items: center; }
.filter h2.abschnitt { margin: 0; flex: 1; }
.filter .chip { min-height: 44px; padding: 6px 12px; font-size: 14px; }
.paletten-liste { list-style: none; margin: 0; padding: 0; border: 1px solid var(--linie); border-radius: var(--radius);
  overflow: hidden; }
.paletten-liste li { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 10px;
  min-height: 60px; padding: 6px 8px 6px 12px; border-top: 1px solid var(--linie); }
.paletten-liste li:first-child { border-top: 0; }
.paletten-liste .nr { font-size: 22px; font-weight: 850; color: var(--grau); text-align: right;
  font-variant-numeric: tabular-nums; }
.paletten-liste .pname { font-weight: 750; font-size: 16px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.paletten-liste .pstatus { font-size: 13px; font-weight: 700; color: var(--grau); }
.paletten-liste li.gescannt { background: #f0fdf4; }
.paletten-liste li.gescannt .nr, .paletten-liste li.gescannt .pstatus { color: var(--gruen); }
.paletten-liste li.gebucht .pstatus { color: var(--blau-dunkel); }
.paletten-liste li.wartet .pstatus { color: var(--gelb-text); }
.paletten-liste li.neu { animation: neu 1.2s ease-out; }
@keyframes neu { from { background: #bbf7d0; } }
.leer { padding: 16px; text-align: center; color: var(--grau); }
.aktionen { display: grid; gap: 10px; margin-top: 18px; }

/* Ergebnis */
.ergebnis { text-align: center; padding-top: 24px; }
.ergebnis .haken { width: 96px; height: 96px; margin: 0 auto 12px; border-radius: 50%; background: var(--gruen);
  color: #fff; display: flex; align-items: center; justify-content: center; }
.ergebnis .haken svg.ic { width: 56px; height: 56px; stroke-width: 3; }
.ergebnis .haken.grau { background: var(--grau); }
.ergebnis .gross { font-size: 26px; font-weight: 850; margin: 6px 0; }
.ergebnis .beleg { display: inline-block; margin: 8px 0; padding: 10px 16px; border-radius: 12px; background: var(--flaeche);
  font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ergebnis .klein { color: var(--grau); }

/* Zaehlung */
.zaehlstand { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.zaehlstand > div { padding: 10px 6px; border-radius: 14px; background: var(--flaeche); text-align: center; min-width: 0; }
.zaehlstand .z { font-size: 34px; font-weight: 900; line-height: 1.05; font-variant-numeric: tabular-nums; }
.zaehlstand .w { font-size: 14px; font-weight: 700; color: var(--grau); }
.zaehlstand .fehlt .z { color: var(--rot); }
.zaehlstand .gezaehlt .z { color: var(--gruen); }
details.fehlende { margin-top: 12px; border: 1px solid var(--linie); border-radius: var(--radius); }
details.fehlende summary { display: flex; align-items: center; min-height: 52px; padding: 8px 14px; font-weight: 750;
  cursor: pointer; list-style: none; }
details.fehlende summary::-webkit-details-marker { display: none; }
details.fehlende summary::after { content: "\25BE"; margin-left: auto; font-size: 18px; color: var(--grau); }
details.fehlende[open] summary::after { content: "\25B4"; }
.fehl-liste { list-style: none; margin: 0; padding: 0; }
.fehl-liste li { padding: 10px 14px; border-top: 1px solid var(--linie); }
.fehl-liste .pname { font-weight: 800; font-variant-numeric: tabular-nums; }
.fehl-liste .info { color: var(--grau); font-size: 14px; overflow-wrap: anywhere; }

/* Bewerten */
.paletten-karte { margin-top: 12px; padding: 14px; border: 2px solid var(--linie); border-radius: 16px; }
.paletten-karte .pname { font-size: 26px; font-weight: 900; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.felder { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 10px 0 0; font-size: 15px; }
.felder dt { color: var(--grau); font-weight: 600; }
.felder dt .ar { font-size: .78em; }
.felder dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.marke { display: inline-block; padding: 3px 10px; border-radius: 8px; font-weight: 800; font-size: 14px; }
.marke.gut { background: var(--gruen-hell); color: #14532d; }
.marke.mittel { background: #fef3c7; color: #78350f; }
.marke.schlecht { background: var(--rot-hell); color: #7f1d1d; }
.marke.keine { background: var(--flaeche); color: var(--grau); }
.notiz-feld { display: block; margin-top: 12px; }
.notiz-feld textarea { display: block; width: 100%; min-height: 56px; margin-top: 4px; padding: 10px 12px;
  border: 2px solid var(--linie); border-radius: 12px; font-size: 17px; resize: vertical; }
.notiz-feld textarea:focus { outline: 3px solid var(--blau); border-color: var(--blau); }
.bewert-knoepfe { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.bewert-knoepfe .knopf { min-height: 96px; font-size: 20px; padding: 8px 4px; color: #fff; }
.bewert-knoepfe .gut { background: var(--gruen); }
.bewert-knoepfe .mittel { background: var(--amber); color: #1c1917; }
.bewert-knoepfe .schlecht { background: var(--rot); }
.bewert-knoepfe .knopf[aria-pressed="true"] { outline: 4px solid var(--text); outline-offset: 2px; }
.auswertung { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.auswertung th, .auswertung td { padding: 8px 4px; border-bottom: 1px solid var(--linie); text-align: right; }
.auswertung th:first-child, .auswertung td:first-child { text-align: left; }
.auswertung th { font-size: 12px; color: var(--grau); font-weight: 800; vertical-align: bottom; }
.auswertung th .ar { font-size: 11px; }
.auswertung td.lf { font-weight: 750; overflow-wrap: anywhere; }
.auswertung td.lf small { display: block; font-weight: 500; color: var(--grau); font-size: 12px; }
.auswertung .p-gut { color: var(--gruen); font-weight: 800; }
.auswertung .p-mittel { color: #92400e; font-weight: 800; }
.auswertung .p-schlecht { color: var(--rot); font-weight: 800; }
.mini-balken { display: flex; height: 6px; margin-top: 4px; border-radius: 3px; overflow: hidden; background: var(--flaeche); }
.mini-balken i { display: block; height: 100%; }
.mini-balken .b-gut { background: var(--gruen); }
.mini-balken .b-mittel { background: var(--amber); }
.mini-balken .b-schlecht { background: var(--rot); }

/* Blitz nach jedem Scan: volle Breite, oben, aus der Ferne lesbar */
.flash { position: fixed; left: 0; right: 0; top: 0; z-index: 50; min-height: 38vh; padding: 28px 16px 22px;
  padding-top: max(28px, env(safe-area-inset-top)); display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center; color: #fff; box-shadow: 0 10px 40px rgba(0, 0, 0, .35);
  animation: blitz .18s ease-out; }
.flash.ok { background: var(--gruen); }
.flash.warn { background: var(--gelb); color: #1c1917; }
.flash.fehler { background: var(--rot); }
.flash .gross { font-size: 34px; font-weight: 900; line-height: 1.1; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.flash .zeile { font-size: 20px; font-weight: 750; margin-top: 10px; }
.flash .meldung { font-size: 17px; font-weight: 600; margin-top: 10px; max-width: 32em; opacity: .95; }
.flash .tippen-zu { font-size: 12px; opacity: .7; margin-top: 14px; }
@keyframes blitz { from { opacity: .2; transform: translateY(-10px); } }

/* Hinweis unten */
.toast { position: fixed; left: 12px; right: 12px; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 40;
  max-width: 536px; margin: 0 auto; padding: 14px 16px; border-radius: 14px; background: #0f172a; color: #fff;
  font-weight: 650; font-size: 16px; box-shadow: 0 8px 30px rgba(0, 0, 0, .3); }
.toast.fehler { background: var(--rot); }
.toast.ok { background: var(--gruen); }

/* Dialoge (eigene Rueckfragen, nie window.confirm) */
dialog { padding: 0; border: 0; color: var(--text); }
dialog::backdrop { background: rgba(15, 23, 42, .55); }
.dialog { width: min(520px, calc(100vw - 24px)); max-height: calc(100vh - 32px); border-radius: 18px; overflow: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35); }
.dialog:focus { outline: none; }
.dialog .dlg-inhalt { padding: 18px 16px 16px; }
.dialog h2 { font-size: 21px; margin: 0 0 10px; overflow-wrap: anywhere; }
.dialog p { margin: 0 0 12px; }
.dialog .dlg-text { font-size: 18px; font-weight: 600; }
.dialog .dlg-warnung { padding: 10px 12px; border-radius: 10px; background: var(--gelb-hell); color: var(--gelb-text);
  font-weight: 650; }
.dialog .dlg-fehler { padding: 10px 12px; border-radius: 10px; background: var(--rot-hell); color: #7f1d1d; font-weight: 700; }
.dialog .dlg-knoepfe { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.dialog .dlg-knoepfe .knopf:only-child { grid-column: 1 / -1; }
.dialog input[type="text"] { width: 100%; min-height: 56px; padding: 8px 14px; border: 2px solid var(--linie);
  border-radius: 12px; font-size: 22px; }
.dialog input[type="text"]:focus { outline: 3px solid var(--blau); border-color: var(--blau); }
.dialog .abschnitt:first-of-type { margin-top: 8px; }
.dialog .kacheln .kachel { min-height: 60px; font-size: 16px; }

.kamera { width: 100vw; height: 100vh; max-width: 100vw; max-height: 100vh; margin: 0; background: #000; color: #fff;
  display: none; flex-direction: column; }
.kamera[open] { display: flex; }
.kamera:focus { outline: none; }
.kamera-kopf { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px; padding-top: max(10px, env(safe-area-inset-top)); }
.kamera-kopf .knopf.neben { background: #fff; }
.kamera-bild { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.kamera-bild video { width: 100%; height: 100%; object-fit: cover; display: block; background: #111; }
.kamera-rahmen { position: absolute; left: 12.5%; right: 12.5%; top: 50%; aspect-ratio: 1; transform: translateY(-50%);
  max-height: 75%; margin: 0 auto; border: 4px solid rgba(255, 255, 255, .9); border-radius: 18px;
  box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .35); }
.kamera-status { margin: 0; padding: 12px 16px; text-align: center; font-size: 16px; font-weight: 600; }
.kamera-treffer { margin: 0 12px 10px; padding: 14px; border-radius: 12px; text-align: center; font-size: 20px; font-weight: 850; }
.kamera-treffer.ok { background: var(--gruen); }
.kamera-treffer.warn { background: var(--gelb); color: #1c1917; }
.kamera-treffer.fehler { background: var(--rot); }
.kamera-treffer .meldung { display: block; font-size: 15px; font-weight: 600; margin-top: 4px; }
#kamera_licht { margin: 0 12px max(12px, env(safe-area-inset-bottom)); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition: none !important; }
}
@media (min-width: 600px) {
  .kacheln { grid-template-columns: repeat(3, 1fr); }
  .reiter { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Versand / Heute / DACHSER (CEO 23.10.2026) ---------- */
.reiter button.ganz { grid-column: 1 / -1; min-height: 64px; font-size: 18px; font-weight: 800; }
.kennzahlen { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 6px 0 4px; }
.kennzahl { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 82px;
  padding: 8px 4px; border-radius: var(--radius); background: var(--flaeche); text-align: center; font-size: 13px; font-weight: 700;
  color: var(--grau); }
.kennzahl strong { font-size: 34px; line-height: 1; font-weight: 900; color: var(--text); font-variant-numeric: tabular-nums; }
.kennzahl.blau { background: var(--blau); color: #fff; }
.kennzahl.blau strong { color: #fff; }
.kennzahl.gruen strong { color: var(--gruen); }
.kennzahl.gelb { background: var(--gelb-hell); color: var(--gelb-text); }
.aufgaben { display: grid; gap: 10px; margin-bottom: 14px; }
.aufgabe { display: grid; gap: 10px; padding: 14px; border: 2px solid var(--linie); border-radius: 18px; background: #fff; }
.aufgabe.spaet { border-color: var(--rot); }
.aufgabe.grau { background: var(--flaeche); border-style: dashed; }
.aufgabe-kopf { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; }
.art-symbol { display: flex; color: var(--blau); }
.art-symbol svg.ic { width: 34px; height: 34px; }
.aufgabe-titel { min-width: 0; }
.aufgabe-titel strong { display: block; font-size: 19px; font-weight: 850; overflow-wrap: anywhere; }
.aufgabe-titel small { display: block; color: var(--grau); font-size: 14px; overflow-wrap: anywhere; }
.termin { padding: 4px 9px; border-radius: 8px; background: var(--flaeche); font-size: 14px; font-weight: 800; text-align: center; }
.termin.heute { background: var(--blau-hell); color: var(--blau-dunkel); }
.termin.spaet { background: var(--rot); color: #fff; }
.aufgabe-menge { display: flex; align-items: center; gap: 12px; }
.aufgabe-menge .zahl { font-size: 48px; font-weight: 900; line-height: 1; color: var(--blau-dunkel); font-variant-numeric: tabular-nums; }
.aufgabe-menge .wort { font-size: 18px; font-weight: 800; min-width: 0; }
.aufgabe-menge .wort small { display: block; font-size: 14px; font-weight: 500; color: var(--grau); overflow-wrap: anywhere; }
.aufgabe-art { font-size: 14px; font-weight: 700; color: var(--grau); }
.status-zeile { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; font-size: 15px; font-weight: 700; }
.status-zeile small { display: block; font-weight: 500; }
.status-zeile.gelb { background: var(--gelb-hell); color: var(--gelb-text); }
.status-zeile.info { background: var(--blau-hell); color: #0c3b61; }
.hinweis-box.gruen { background: var(--gruen-hell); color: #14532d; font-weight: 700; }
details.warten { margin: 4px 0 14px; }
details.warten summary { min-height: 48px; display: flex; align-items: center; padding: 8px 12px; border-radius: 12px;
  background: var(--flaeche); font-weight: 800; cursor: pointer; }
.neu-liste { display: grid; gap: 8px; margin: 6px 0; }
.neu-zeile { padding: 10px 12px; border-radius: 12px; background: var(--blau-hell); }
.neu-zeile strong { display: block; font-size: 18px; }
.neu-zeile small { color: var(--grau); }
.paletten-editor { display: grid; gap: 10px; }
.palette-zeile { display: grid; gap: 10px; padding: 12px; border: 2px solid var(--linie); border-radius: 16px; }
.palette-zeile-kopf { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.palette-zeile-kopf strong { flex: 1; min-width: 8em; font-size: 18px; }
.palette-zeile-kopf .x { min-width: 44px; min-height: 44px; border: 2px solid var(--linie); border-radius: 10px; background: #fff;
  font-size: 22px; font-weight: 800; }
.palette-felder { display: grid; gap: 8px; }
.palette-felder > div { display: grid; grid-template-columns: 1fr minmax(170px, 200px); align-items: center; gap: 10px; }
.chip.spalte { flex-direction: column; }
.feld-titel { display: block; font-size: 13px; font-weight: 800; color: var(--grau); margin-bottom: 4px; }
.feld-titel small { font-weight: 500; margin-left: 4px; }
.stepper { display: grid; grid-template-columns: 52px 1fr 52px; gap: 4px; align-items: stretch; }
.stepper button { min-height: 56px; border: 2px solid var(--blau); border-radius: 10px; background: #fff; color: var(--blau-dunkel);
  font-size: 24px; font-weight: 900; padding: 0; }
.stepper label { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.stepper input { width: 100%; min-width: 0; min-height: 36px; border: 0; background: transparent; text-align: center;
  font-size: 22px; font-weight: 900; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper small { font-size: 12px; color: var(--grau); line-height: 1; }
.summe { padding: 12px 14px; border-radius: 12px; background: var(--blau-hell); font-size: 19px; color: #0c3b61; }
.neu-felder.zwei { grid-template-columns: 1fr 1fr; }
.neu-felder input, .neu-felder select, .eingabe { width: 100%; min-height: 52px; padding: 8px 12px; border: 2px solid var(--linie);
  border-radius: 12px; background: #fff; font-size: 18px; }
.adresse { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border-radius: 16px; background: var(--flaeche); }
.adresse-text { flex: 1; min-width: 0; display: grid; gap: 2px; overflow-wrap: anywhere; }
.adresse-text strong { font-size: 18px; }
.chips.abstand, .abstand { margin-top: 10px; }
.pruef-liste { display: grid; gap: 6px; margin: 8px 0; }
.pruef-gross { display: flex; align-items: baseline; gap: 10px; }
.pruef-gross strong { font-size: 56px; font-weight: 900; line-height: 1; color: var(--blau-dunkel); }
.pruef-gross span { font-size: 20px; font-weight: 800; }
.pruef-zeile { padding: 8px 10px; border-radius: 10px; background: var(--flaeche); font-size: 16px; overflow-wrap: anywhere; }
.sscc { display: grid; gap: 4px; padding: 8px 2px; }
.sscc code { font-size: 15px; letter-spacing: .03em; }
.preis-box { margin-top: 16px; padding: 16px; border-radius: 18px; background: var(--gruen-hell); text-align: center; }
.preis-gross { font-size: 48px; font-weight: 900; color: #14532d; font-variant-numeric: tabular-nums; }
.preis-wort { font-weight: 700; color: #14532d; }
.preis-box .details { text-align: left; margin: 10px 0 0; padding-left: 18px; color: var(--grau); font-size: 14px; }
@media (max-width: 380px) {
  .kennzahlen { grid-template-columns: repeat(2, 1fr); }
  .palette-felder > div { grid-template-columns: 1fr; }
}
/* Lager-Display am PC/Fernseher: Uebersicht breiter, Karten nebeneinander */
@media (min-width: 900px) {
  main:has(#s_start:not([hidden]) #heute) { max-width: 1180px; }
  main:has(#s_start:not([hidden]) #heute) .reiter { grid-template-columns: repeat(5, 1fr); }
  main:has(#s_start:not([hidden]) #heute) .reiter button.ganz { grid-column: auto; }
  #heute .aufgaben { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
}

/* LKW dokumentieren (Welle 1, Lager-Desk-Ersatz) */
.knopf.gruen-rand { background: #fff; color: var(--gruen); border-color: var(--gruen); }
.foto-raster { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: start; }
.foto-feld { display: grid; gap: 6px; min-width: 0; }
.knopf.foto-knopf { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; min-height: 72px;
  padding: 8px 12px; text-align: left; }
.foto-name { display: grid; min-width: 0; font-size: 15px; line-height: 1.2; hyphens: auto; -webkit-hyphens: auto; }
.foto-zahl { font-size: 22px; font-variant-numeric: tabular-nums; }
.foto-vorschau { display: flex; flex-wrap: wrap; gap: 4px; }
.foto-vorschau img { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; border: 1px solid var(--linie); }
.doku-felder { display: grid; gap: 10px; }
.doku-feld { display: block; margin-top: 10px; }
.doku-feld input, .doku-feld textarea { width: 100%; min-height: 52px; padding: 8px 12px; border: 2px solid var(--linie);
  border-radius: 12px; background: #fff; font: inherit; font-size: 18px; }
.doku-feld input.gross { text-transform: uppercase; }
.doku-feld input:focus, .doku-feld textarea:focus { outline: 3px solid var(--blau-hell); border-color: var(--blau); }
.doku-paletten { display: grid; gap: 10px; }
.doku-zeile { display: grid; grid-template-columns: 1fr minmax(150px, 190px); align-items: center; gap: 10px; }
.doku-zeile .stepper strong { font-size: 24px; font-variant-numeric: tabular-nums; }
.scan-hinweis.warn { color: var(--gelb-text); font-weight: 700; }
.doku-offen { display: grid; gap: 8px; }
.doku-offen .zeile-karte { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; padding: 10px 12px;
  border: 2px solid var(--gelb); border-radius: var(--radius); background: var(--gelb-hell); }
.doku-offen .zeile-karte small { display: block; color: var(--grau); }
.aufgabe .knopf.breit + .knopf.breit { margin-top: 8px; }
.dsv-labels { display: grid; gap: 8px; }
.dsv-label { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; padding: 10px 12px;
  border: 2px solid var(--linie); border-radius: var(--radius); background: #fff; }
.dsv-label small { display: block; color: var(--grau); }
.dsv-label .status-zeile { grid-column: 1 / -1; }
.dsv-stoerung { margin-bottom: 8px; }
.dsv-stoerung .de, .dsv-stoerung .ar, .dsv-stoerung small { display: block; }
.dsv-stoerung small { margin-top: 4px; font-weight: 700; }
@media (min-width: 900px) { .dsv-labels { grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); } }
.dsv-label.fehler { border-color: var(--rot); }
.dsv-label.offen { border-color: var(--gelb); }
.status-zeile.gruen { background: var(--gruen-hell); color: #14532d; }
.status-zeile.rot { background: var(--rot-hell); color: var(--rot); }
@media (min-width: 600px) { .foto-raster { grid-template-columns: repeat(4, 1fr); } .doku-felder { grid-template-columns: 1fr 1fr; } }

/* Lager-Aufgaben (Welle 1, Lager-Desk-Ersatz) */
.aufgabe.klickbar { cursor: pointer; }
.aufgabe.klickbar:focus-visible { outline: 3px solid var(--blau); outline-offset: 2px; }
.aufgabe.bereit { border-color: var(--gruen); background: var(--gruen-hell); }
.fortschritt-balken { height: 8px; border-radius: 4px; background: var(--flaeche); overflow: hidden; margin: 8px 0 2px; }
.fortschritt-balken span { display: block; height: 100%; background: var(--gruen); }
.beschreibung { white-space: pre-line; margin: 12px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--flaeche);
  font-size: 16px; overflow-wrap: anywhere; }
.positionen { display: grid; gap: 8px; }
.position { display: grid; grid-template-columns: 36px 1fr; align-items: center; gap: 10px; min-height: 56px; padding: 8px 12px;
  border: 2px solid var(--linie); border-radius: 12px; background: #fff; color: var(--text); font: inherit; font-size: 17px;
  text-align: left; cursor: pointer; }
.position .kasten { display: grid; place-items: center; width: 32px; height: 32px; border: 2px solid var(--blau); border-radius: 8px; }
.position.fertig { border-color: var(--gruen); background: var(--gruen-hell); }
.position.fertig .kasten { border-color: var(--gruen); background: var(--gruen); color: #fff; }
.position.fertig > span:last-child { text-decoration: line-through; color: var(--grau); }
.position .kasten .ic { width: 22px; height: 22px; }

/* ---------- Mitarbeiter-PC: Labels + Auftrag (CEO 05.11.2026) ---------- */
.text-feld { width: 100%; min-height: 52px; padding: 8px 12px; border: 2px solid var(--linie); border-radius: 10px; font: inherit;
  font-weight: 700; background: #fff; color: var(--text); }
.text-feld:focus { outline: 3px solid var(--blau); outline-offset: 0; border-color: var(--blau); }
.drucker-block { display: grid; gap: 10px; }
.drucker-chip { gap: 8px; text-align: left; }
.ampel { flex: none; width: 14px; height: 14px; border-radius: 50%; background: var(--gruen); box-shadow: 0 0 0 2px #fff; }
.ampel.stoerung { background: var(--rot); }
.ampel.aus { background: var(--grau-hell); }
.labels-raster { display: grid; gap: 6px; }
.label-karte { display: grid; gap: 12px; padding: 14px; border: 2px solid var(--linie); border-radius: 18px; background: #fff; }
.label-muster { display: grid; gap: 4px; padding: 12px; border: 2px dashed var(--linie); border-radius: 10px; text-align: center; }
.label-muster strong { font-size: 34px; line-height: 1.05; font-weight: 900; letter-spacing: .02em; overflow-wrap: anywhere; }
.label-muster small { color: var(--grau); font-variant-numeric: tabular-nums; }
.label-knoepfe { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.label-knoepfe .klein { grid-column: 1 / -1; }
.auftrag-raster { display: grid; gap: 14px; align-items: start; }
.kunde-name { font-size: 22px; line-height: 1.2; overflow-wrap: anywhere; }
.auftrag-tabelle { width: 100%; border-collapse: collapse; font-size: 15px; }
.auftrag-tabelle th { padding: 6px 8px; border-bottom: 2px solid var(--linie); color: var(--grau); font-size: 13px; text-align: left; }
.auftrag-tabelle td { padding: 8px; border-bottom: 1px solid var(--linie); vertical-align: top; overflow-wrap: anywhere; }
.auftrag-tabelle .zahl { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.auftrag-tabelle tfoot td { border-bottom: 0; font-weight: 800; }
.auftrag-tabelle tfoot .gross { font-size: 20px; }
.auftrag-tabelle tfoot .klein td { padding-top: 0; color: var(--grau); font-size: 13px; font-weight: 600; }
.alles-knopf { margin-top: 12px; flex-direction: row; gap: 10px; }
.alles-ergebnis { display: grid; gap: 6px; margin-top: 8px; }
.einzel-liste { display: grid; gap: 8px; }
.einzel-zeile { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 8px; padding: 8px 12px;
  border: 2px solid var(--linie); border-radius: 12px; }
@media (min-width: 900px) {
  main:has(#s_start:not([hidden]) #heute) .reiter { grid-template-columns: repeat(6, 1fr); }
  main:has(#s_start:not([hidden]) #labels), main:has(#s_auftrag:not([hidden])) { max-width: 1180px; }
  main:has(#s_start:not([hidden]) #labels) .reiter { grid-template-columns: repeat(6, 1fr); }
  main:has(#s_start:not([hidden]) #labels) .reiter button.ganz { grid-column: auto; }
  .labels-raster { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  #labels .drucker-block { grid-template-columns: 1fr 1fr; }
  .auftrag-raster { grid-template-columns: 3fr 2fr; gap: 24px; }
}

/* Neuer PC per Passwort */
.einrichten-seite { display: grid; gap: 16px; max-width: 560px; }
.einrichten-form { display: grid; gap: 12px; }
.einrichten-form input { width: 100%; min-height: 52px; padding: 10px 14px; border: 2px solid var(--linie); border-radius: 12px; font: 18px var(--schrift); }
.einrichten-form input:focus { outline: 3px solid var(--blau); outline-offset: 1px; }
.einrichten-schritte { display: grid; gap: 10px; margin: 0; padding-inline-start: 22px; }
.einrichten-schritte .ar { display: block; color: var(--grau); font-size: 14px; }
#einrichten-start { display: flex; align-items: center; justify-content: center; text-decoration: none; }

/* Startseite Lager-PC */
.pc-seite { display: grid; gap: 24px; max-width: 1100px; margin: 0 auto; padding: 20px 16px 40px; }
.pc-kopf { margin: 0; font-size: 26px; color: var(--blau); }
.pc-kopf .ar { display: block; font-size: 16px; font-weight: 500; }
.pc-titel { margin: 0 0 10px; font-size: 18px; }
.pc-titel .ar { margin-inline-start: 10px; font-size: 14px; font-weight: 500; color: var(--grau); }
.pc-kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.pc-kachel { display: grid; align-content: center; gap: 2px; min-height: 84px; padding: 14px 16px; overflow-wrap: anywhere;
  border: 1px solid var(--linie); border-radius: var(--radius); background: #fff; color: var(--text); font-weight: 650; text-decoration: none; }
.pc-kachel:hover { border-color: var(--blau); background: var(--blau-hell); }
.pc-kachel:focus-visible { outline: 3px solid var(--blau-dunkel); outline-offset: 2px; }
.pc-kachel.haupt { border-color: var(--blau); background: var(--blau); color: #fff; font-size: 20px; }
.pc-kachel.haupt:hover { background: var(--blau-dunkel); }
.pc-kachel .ar { font-size: 14px; font-weight: 500; }
.pc-host { color: var(--grau); font-size: 13px; font-weight: 500; }
.pc-drucker { cursor: default; gap: 10px; }

/* CMR am Bildschirm: sieht aus wie der Frachtbrief, getippt wird direkt im Feld */
#cmr-druck { display: none; }
.cmr-leiste { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 10px 0; }
.cmr-stand { display: inline-flex; align-items: center; gap: 10px; min-height: 36px; padding: 4px 12px; border-radius: 999px; background: var(--gruen-hell); color: #14532d; font-size: 14px; font-weight: 600; }
.cmr-stand .ar { margin-inline-start: 6px; font-weight: 500; }
.cmr-stand small { font-weight: 500; opacity: .85; }
.cmr-stand.speichert { background: var(--flaeche); color: var(--grau); }
.cmr-stand.fehler { background: var(--rot-hell); color: #7f1d1d; }
.cmr-notfall { opacity: .9; }
.cmr-blatt { --cmr: #1a1a1a; display: grid; gap: 4px; width: 100%; max-width: 1040px; margin: 0 auto 24px; padding: 14px; border: 1px solid var(--linie); border-radius: 6px; background: #fff; color: #111; box-shadow: 0 2px 10px rgba(15, 23, 42, .08); }
.cmr-kopf { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 6px 10px; border: 2px solid var(--cmr); color: var(--cmr); }
.cmr-exemplar { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 700; }
.cmr-exemplar-nr { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border: 2px solid var(--cmr); font-size: 15px; }
.cmr-titel { display: flex; align-items: center; gap: 10px; text-align: center; }
.cmr-oval { padding: 4px 11px; border: 2.5px solid var(--cmr); border-radius: 50%; font-size: 15px; font-weight: 800; }
.cmr-titel-de { font-size: 15px; font-weight: 800; letter-spacing: .3px; }
.cmr-titel-en { font-size: 11px; }
.cmr-nummer { text-align: end; font-size: 14px; }
.cmr-nummer strong { color: #111; }
.cmr-paar { display: grid; grid-template-columns: 1.04fr 1fr; gap: 4px; }
.cmr-spalte { display: grid; gap: 4px; align-content: stretch; }
.cmr-feld { display: grid; align-content: start; gap: 3px; min-width: 0; padding: 5px 7px; border: 1px solid var(--cmr); }
.cmr-feld.dick { border-width: 2.5px; }
.cmr-label { color: var(--cmr); font-size: 11px; line-height: 1.25; }
.cmr-label b { display: inline-flex; align-items: center; justify-content: center; min-width: 17px; height: 17px; padding: 0 2px; border: 1px solid var(--cmr); font-size: 11px; }
.cmr-label i { opacity: .75; }
.cmr-ar { display: block; margin-top: 1px; color: var(--grau); font-size: 12px; font-weight: 500; }
.cmr-feld input, .cmr-feld textarea, .cmr-teil input { display: block; width: 100%; min-width: 0; padding: 4px 6px; border: 0; border-bottom: 1px dashed var(--linie); border-radius: 3px; background: #f7fafd; color: #111; font: 15px/1.35 var(--schrift); resize: vertical; }
.cmr-feld input:focus, .cmr-feld textarea:focus, .cmr-teil input:focus { outline: 2px solid var(--blau); outline-offset: 0; background: #fff; }
.cmr-ware { display: grid; grid-template-columns: 15% 9% 12% minmax(0, 1fr) 9% 11% 10%; gap: 4px; }
.cmr-wahlen { display: grid; gap: 4px; }
.cmr-wahl { display: inline-flex; align-items: center; gap: 8px; color: #111; font-size: 13px; }
.knopf-los { min-height: 36px; padding: 2px 4px; border: 0; background: none; font-family: inherit; cursor: pointer; text-align: start; }
.knopf-los:focus-visible { outline: 2px solid var(--blau); }
.cmr-kaestchen { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border: 1px solid var(--cmr); font-size: 13px; font-weight: 800; line-height: 1; }
.cmr-kosten { width: 100%; border-collapse: collapse; color: var(--cmr); font-size: 11px; }
.cmr-kosten th, .cmr-kosten td { padding: 2px 5px; border: 1px solid var(--cmr); font-weight: 400; text-align: start; }
.cmr-kosten td { height: 20px; }
.cmr-kosten i { opacity: .75; }
.cmr-teile { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 12px; }
.cmr-teil { display: flex; align-items: center; gap: 8px; }
.cmr-teil-text { flex: none; color: var(--cmr); font-size: 11px; }
.cmr-unterschriften { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.cmr-unterschriften .cmr-feld { min-height: 120px; }
.cmr-stempel-platz { display: flex; align-items: center; justify-content: center; }
.cmr-stempel { padding: 5px 12px; border: 2px solid #0033A0; color: #0033A0; font-size: 10px; line-height: 1.35; text-align: center; transform: rotate(-2.5deg); }
.cmr-stempel-firma { font-size: 13px; font-weight: 800; letter-spacing: .5px; }
.cmr-empfang { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; align-items: end; color: var(--cmr); font-size: 11px; }
.cmr-linie { height: 16px; border-bottom: 1px solid var(--cmr); }
.cmr-klein { margin-top: 8px; color: var(--cmr); font-size: 10px; }
.cmr-fuss { color: var(--cmr); font-size: 10px; text-align: center; }
.cmr-neu { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin: 12px 0; }
.cmr-liste { display: grid; gap: 8px; }
.cmr-zeile { display: grid; grid-template-columns: minmax(110px, auto) minmax(0, 1fr) minmax(0, 2fr) auto; align-items: center; gap: 12px; min-height: 52px; padding: 8px 14px; border: 1px solid var(--linie); border-radius: 10px; color: var(--text); text-decoration: none; }
.cmr-zeile:hover { border-color: var(--blau); background: var(--blau-hell); }
.cmr-zeile small { color: var(--grau); }
.cmr-zeile-kurz { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Am PC nutzt das Blatt die volle Breite, die schmale Handy-Spalte der Station wuerde es zerquetschen */
main:has(#s_cmr:not([hidden])) { max-width: 1120px; }
.cmr-kosten { table-layout: fixed; overflow-wrap: anywhere; }
.cmr-kosten th:first-child, .cmr-kosten td:first-child { width: 40%; }
.cmr-label { overflow-wrap: anywhere; }
@media (max-width: 1000px) {
  .cmr-ware { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cmr-ware .cmr-feld:nth-child(4) { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .cmr-kopf { grid-template-columns: 1fr; text-align: center; }
  .cmr-titel { justify-content: center; }
  .cmr-nummer { text-align: center; }
  .cmr-paar, .cmr-teile { grid-template-columns: minmax(0, 1fr); }
  .cmr-ware { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cmr-unterschriften { grid-template-columns: minmax(0, 1fr); }
  .cmr-zeile { grid-template-columns: minmax(0, 1fr) auto; }
}

/* Notfall-Druck: nur die vier Durchschlaege, je eine A4-Seite */
@media print {
  @page { size: A4 portrait; margin: 0; }
  html.druck-cmr, html.druck-cmr body { background: #fff; }
  html.druck-cmr body > :not(#cmr-druck) { display: none !important; }
  html.druck-cmr #cmr-druck { display: block; }
  #cmr-druck { -webkit-print-color-adjust: exact; print-color-adjust: exact; font-family: Arial, Helvetica, sans-serif; }
  #cmr-druck .cmr-blatt { box-sizing: border-box; grid-template-rows: auto auto auto auto minmax(32mm, auto) auto auto minmax(32mm, 1fr) auto; gap: 1mm; width: 210mm; max-width: none; height: 297mm; margin: 0; padding: 7mm; overflow: hidden; border: 0; border-radius: 0; box-shadow: none; break-after: page; }
  #cmr-druck .cmr-blatt:last-child { break-after: auto; }
  #cmr-druck .cmr-kopf { padding: 1.5mm 2.5mm; }
  #cmr-druck .cmr-exemplar { font-size: 7pt; }
  #cmr-druck .cmr-exemplar-nr { width: 6.5mm; height: 6.5mm; font-size: 11pt; }
  #cmr-druck .cmr-oval { font-size: 11pt; }
  #cmr-druck .cmr-titel-de { font-size: 10pt; }
  #cmr-druck .cmr-titel-en { font-size: 7pt; }
  #cmr-druck .cmr-nummer { font-size: 10pt; }
  #cmr-druck .cmr-paar, #cmr-druck .cmr-spalte, #cmr-druck .cmr-ware, #cmr-druck .cmr-unterschriften { gap: 1mm; }
  #cmr-druck .cmr-feld { padding: 1mm 1.5mm; border-width: .9pt; }
  #cmr-druck .cmr-feld.dick { border-width: 2pt; }
  #cmr-druck .cmr-label { font-size: 6pt; }
  #cmr-druck .cmr-label b { min-width: 3.4mm; height: 3.4mm; font-size: 6pt; }
  #cmr-druck .cmr-ar { display: none; }
  #cmr-druck .cmr-wert { min-height: 4mm; font-size: 9pt; line-height: 1.25; white-space: pre-line; overflow-wrap: anywhere; }
  #cmr-druck .cmr-wert.lang { font-size: 7.5pt; }
  #cmr-druck .cmr-wahl { font-size: 7.5pt; }
  #cmr-druck .cmr-wahlen { gap: .5mm; }
  #cmr-druck .cmr-kaestchen { width: 3.2mm; height: 3.2mm; font-size: 7pt; }
  #cmr-druck .cmr-kosten { font-size: 6pt; }
  #cmr-druck .cmr-kosten td { height: 3.6mm; padding: .3mm 1mm; }
  #cmr-druck .cmr-kosten th { padding: .3mm 1mm; }
  #cmr-druck .cmr-teil-text { font-size: 7pt; }
  #cmr-druck .cmr-unterschriften .cmr-feld { min-height: 0; }
  #cmr-druck .cmr-stempel { font-size: 6.8pt; }
  #cmr-druck .cmr-stempel-firma { font-size: 9.5pt; }
  #cmr-druck .cmr-empfang { font-size: 7pt; }
  #cmr-druck .cmr-klein, #cmr-druck .cmr-fuss { font-size: 5.8pt; }
}
