/* =====================================================================================================================
   RUESS UI 2026 – Modul 1 „Lager & Logistik“ (3.3.0): Wareneingang, Offene Bestellungen, Einkauf-Aufgaben.
   Gleiches Seitengerüst: Seitenkopf (Titel, Stern, Beschreibung) → EINE Karte → Werkzeugleiste (Filter links, Aktionen rechts,
   Beschriftung ÜBER dem Feld) → Reiter → Tabelle. In beiden Designs (data-seiten="2026"). Fachlogik/Markup unverändert (nur Klassen ergänzt).
   ===================================================================================================================== */

/* ---- Seitenkopf: überall der gemeinsame Kopf mit Stern; der eigene Listenkopf der Module entfällt ------------------------ */
html[data-ui="lageplan"] body:is([data-view="offeneBestellungen"], [data-view="einkaufAufgaben"]):has(.ui-liste-kopf) .app-page-hero { display: flex !important; }
html[data-ui="lageplan"] #appBox .app-view .ui-liste-kopf { display: none !important; }

/* ---- Eine Karte je Seite --------------------------------------------------------------------------------------------- */
html[data-seiten="2026"] #appBox :is(#wareneingangView, #offeneBestellungenView, #einkaufAufgabenView, #ausgangsprotokolleView, #eingangsprotokolleView, #autostadtView, #tikosTraegerView, #tikosPreiseView) .ap-page > :is(.box, .ap-box, .ap-card) {
  padding: 20px 20px 16px !important;
  margin: 0 !important;
  border: 1px solid var(--ds-line) !important;
  border-radius: var(--u-r-card) !important;
  background: var(--ds-surface) !important;
  box-shadow: none !important;
}

/* ---- Werkzeugleiste: Filter links, Aktionen rechts (Modul 6: auch Aus-/Eingangsprotokolle) ------------------------------------------------------------------- */
html[data-seiten="2026"] #appBox :is(#wareneingangView, #offeneBestellungenView, #einkaufAufgabenView, #ausgangsprotokolleView, #eingangsprotokolleView, #autostadtView, #tikosTraegerView, #tikosPreiseView) .ap-toolbar {
  display: flex !important; flex-wrap: wrap !important; align-items: flex-end !important; justify-content: space-between !important;
  gap: 12px 16px !important; margin: 0 0 14px !important; padding: 0 !important; border: 0 !important; background: none !important;
}
html[data-seiten="2026"] #appBox :is(#wareneingangView, #offeneBestellungenView, #einkaufAufgabenView, #ausgangsprotokolleView, #eingangsprotokolleView, #autostadtView, #tikosTraegerView, #tikosPreiseView) .ap-toolbar .ap-filter {
  display: flex !important; flex-wrap: wrap !important; align-items: flex-end !important; gap: 12px !important; flex: 1 1 520px !important; margin: 0 !important;
}
/* Beschriftung über dem Feld (Text-Knoten im <label>) */
html[data-seiten="2026"] #appBox :is(#wareneingangView, #offeneBestellungenView, #einkaufAufgabenView, #ausgangsprotokolleView, #eingangsprotokolleView, #autostadtView, #tikosTraegerView, #tikosPreiseView) .ap-toolbar .ap-filter label:not(:has(input[type="checkbox"])) {
  display: flex !important; flex-direction: column !important; align-items: stretch !important; gap: 6px !important;
  flex: 0 1 auto !important; margin: 0 !important; padding: 0 !important;
  font-size: var(--u-fs-xs) !important; font-weight: 600 !important; color: var(--ds-muted) !important; text-transform: none !important; letter-spacing: .01em;
}
html[data-seiten="2026"] #appBox :is(#wareneingangView, #offeneBestellungenView, #einkaufAufgabenView, #ausgangsprotokolleView, #eingangsprotokolleView, #autostadtView, #tikosTraegerView, #tikosPreiseView) .ap-toolbar .ap-filter label :is(input, select) { width: 168px !important; max-width: 100% !important; flex: 0 0 auto !important; /* alte Regel flex:1 1 160px wurde in der Spalte zur Höhe */ }
html[data-seiten="2026"] #appBox :is(#wareneingangView, #offeneBestellungenView, #einkaufAufgabenView, #ausgangsprotokolleView, #eingangsprotokolleView, #autostadtView, #tikosTraegerView, #tikosPreiseView) .ap-toolbar .ap-filter label input[type="date"] { width: 156px !important; }
html[data-seiten="2026"] #appBox :is(#wareneingangView, #offeneBestellungenView, #einkaufAufgabenView, #ausgangsprotokolleView, #eingangsprotokolleView, #autostadtView, #tikosTraegerView, #tikosPreiseView) .ap-toolbar .ap-filter label select { width: auto !important; min-width: 168px !important; padding-right: 34px !important; }
html[data-seiten="2026"] #appBox #wareneingangView .ap-toolbar .ap-filter label.ap-search:has(#weSuche) { flex: 1 1 260px !important; }
html[data-seiten="2026"] #appBox #wareneingangView #weSuche { width: 100% !important; min-width: 220px; }
html[data-seiten="2026"] #appBox #offeneBestellungenView #obArtikel { width: 220px !important; }
/* Häkchen-Filter: Höhe wie ein Feld, Text normal */
html[data-seiten="2026"] #appBox :is(#wareneingangView, #offeneBestellungenView, #einkaufAufgabenView, #ausgangsprotokolleView, #eingangsprotokolleView, #autostadtView, #tikosTraegerView, #tikosPreiseView) .ap-toolbar .ap-filter label:has(input[type="checkbox"]) {
  display: inline-flex !important; flex-direction: row !important; align-items: center !important; gap: 8px !important;
  height: var(--u-h-field); margin: 0 !important; padding: 0 2px !important; white-space: nowrap;
  font-size: var(--u-fs-sm) !important; font-weight: 500 !important; color: var(--ds-text) !important; text-transform: none !important; cursor: pointer;
}
html[data-seiten="2026"] #appBox :is(#wareneingangView, #offeneBestellungenView, #einkaufAufgabenView, #ausgangsprotokolleView, #eingangsprotokolleView, #autostadtView, #tikosTraegerView, #tikosPreiseView) .ap-toolbar .ap-filter > :is(button, .ap-btn) { align-self: flex-end !important; }
html[data-seiten="2026"] #appBox :is(#wareneingangView, #offeneBestellungenView, #einkaufAufgabenView, #ausgangsprotokolleView, #eingangsprotokolleView, #autostadtView, #tikosTraegerView, #tikosPreiseView) .ui-filter-zurueck { border-style: dashed !important; }
html[data-seiten="2026"] #appBox :is(#wareneingangView, #offeneBestellungenView, #einkaufAufgabenView, #ausgangsprotokolleView, #eingangsprotokolleView, #autostadtView, #tikosTraegerView, #tikosPreiseView) .ap-toolbar .ap-tools {
  display: flex !important; flex-wrap: wrap !important; align-items: center !important; justify-content: flex-end !important; gap: 8px !important; margin-left: auto !important;
}

/* ---- Hinweiszeile unter der Leiste ----------------------------------------------------------------------------------- */
html[data-seiten="2026"] #appBox :is(#wareneingangView, #offeneBestellungenView, #einkaufAufgabenView, #ausgangsprotokolleView, #eingangsprotokolleView, #autostadtView, #tikosTraegerView, #tikosPreiseView) .ap-page > :is(.ap-card, .box) > p.ap-hint {
  margin: -4px 0 12px !important; font-size: var(--u-fs-sm) !important; color: var(--ds-muted) !important; line-height: 1.45;
}

/* ---- Reiter: eine Zeile, bei Platzmangel waagerecht scrollen (nie zweizeilig) ---------------------------------------- */
html[data-seiten="2026"] #appBox :is(#wareneingangView, #einkaufAufgabenView, #ausgangsprotokolleView, #eingangsprotokolleView, #autostadtView, #tikosTraegerView, #tikosPreiseView) .ap-tabs {
  display: flex !important; flex-wrap: nowrap !important; gap: 4px !important; overflow-x: auto; scrollbar-width: thin;
  margin: 0 0 12px !important; padding: 2px 0 !important;
}
html[data-seiten="2026"] #appBox :is(#wareneingangView, #einkaufAufgabenView, #ausgangsprotokolleView, #eingangsprotokolleView, #autostadtView, #tikosTraegerView, #tikosPreiseView) .ap-tabs > .ap-tab { flex: 0 0 auto; white-space: nowrap; gap: 6px; display: inline-flex !important; align-items: center; }
html[data-seiten="2026"] #appBox #einkaufAufgabenView .ap-toolbar .ui-segment { margin: 0 !important; }
html[data-seiten="2026"] #appBox :is(#wareneingangView, #ausgangsprotokolleView, #eingangsprotokolleView, #autostadtView, #tikosTraegerView, #tikosPreiseView) .ap-tab .ap-badge {
  display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--ds-surface-2) !important; color: var(--ds-text) !important; border: 0 !important;
  font: 600 11.5px/1 var(--lp-mono, "IBM Plex Mono", monospace) !important;
}
html[data-seiten="2026"] #appBox :is(#wareneingangView, #ausgangsprotokolleView, #eingangsprotokolleView, #autostadtView, #tikosTraegerView, #tikosPreiseView) .ap-tab:is(.active, [aria-selected="true"]) .ap-badge { background: rgba(255, 255, 255, .18) !important; color: #fff !important; }

/* ---- Wareneingang: Kopfzeile + Übersicht als ruhige Kennzahl-Leiste --------------------------------------------------- */
html[data-seiten="2026"] #appBox #wareneingangView .we-kopfzeile { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 0 0 14px; }
html[data-seiten="2026"] #appBox #wareneingangView .we-ue-zeile {
  min-height: 32px !important; height: auto !important; padding: 4px 10px !important; border-radius: 8px !important;
  background: transparent !important; border: 0 !important; color: var(--ds-ink) !important; font-size: var(--u-fs) !important; font-weight: 600 !important;
  white-space: normal !important; text-align: left !important; max-width: 100%; line-height: 1.35 !important;
}
html[data-seiten="2026"] #appBox #wareneingangView .we-ue-zeile:hover { background: var(--ds-surface-hover) !important; }
html[data-seiten="2026"] #appBox #wareneingangView .we-uebersicht {
  margin: 0 0 16px !important; padding: 16px !important; border: 0 !important; border-radius: 12px !important; background: var(--ds-surface-2) !important;
}
html[data-seiten="2026"] #appBox #wareneingangView .we-ue-kopf { align-items: flex-end; margin-bottom: 12px; }
html[data-seiten="2026"] #appBox #wareneingangView .we-ue-wahl { align-items: flex-end; gap: 12px; }
html[data-seiten="2026"] #appBox #wareneingangView .we-ue-wahl label { display: flex; flex-direction: column; gap: 6px; font-size: var(--u-fs-xs); font-weight: 600; color: var(--ds-muted); }
html[data-seiten="2026"] #appBox #wareneingangView .we-kacheln { gap: 12px !important; }
html[data-seiten="2026"] #appBox #wareneingangView .we-kachel {
  padding: 14px 16px !important; border-radius: 12px !important; border: 1px solid var(--ds-line) !important; background: var(--ds-surface) !important; gap: 4px !important;
}
html[data-seiten="2026"] #appBox #wareneingangView .we-kachel strong { font: 600 26px/1.1 var(--lp-mono, "IBM Plex Mono", monospace) !important; color: var(--ds-ink); letter-spacing: -.01em; }
html[data-seiten="2026"] #appBox #wareneingangView .we-kachel span { font-size: var(--u-fs-sm); color: var(--ds-text); }
html[data-seiten="2026"] #appBox #wareneingangView .we-ue-direkt { border-top: 1px solid var(--ds-line) !important; margin: 12px 0 0 !important; padding-top: 10px !important; font-size: var(--u-fs-sm); }

/* ---- Tabellen: Aktionen in einer Zeile, rechtsbündig; Zahlen rechts -------------------------------------------------- */
html[data-seiten="2026"] #appBox :is(#wareneingangView, #offeneBestellungenView, #einkaufAufgabenView, #ausgangsprotokolleView, #eingangsprotokolleView, #autostadtView, #tikosTraegerView, #tikosPreiseView) .ap-table td.ap-actions {
  white-space: nowrap; text-align: right; width: 1%;
}
html[data-seiten="2026"] #appBox :is(#wareneingangView, #offeneBestellungenView, #einkaufAufgabenView, #ausgangsprotokolleView, #eingangsprotokolleView, #autostadtView, #tikosTraegerView, #tikosPreiseView) .ap-table td.ap-actions > :is(button, .ap-btn) + :is(button, .ap-btn) { margin-left: 4px; }
html[data-seiten="2026"] #appBox :is(#wareneingangView, #offeneBestellungenView, #einkaufAufgabenView, #ausgangsprotokolleView, #eingangsprotokolleView, #autostadtView, #tikosTraegerView, #tikosPreiseView) .ap-table :is(td, th).num { text-align: right; font-variant-numeric: tabular-nums; }
html[data-seiten="2026"] #appBox :is(#wareneingangView, #offeneBestellungenView, #einkaufAufgabenView, #ausgangsprotokolleView, #eingangsprotokolleView, #autostadtView, #tikosTraegerView, #tikosPreiseView) .ap-table-wrap { border-radius: 12px; }

/* ---- Handy ----------------------------------------------------------------------------------------------------------- */
@media (max-width: 760px) {
  html[data-seiten="2026"] #appBox :is(#wareneingangView, #offeneBestellungenView, #einkaufAufgabenView, #ausgangsprotokolleView, #eingangsprotokolleView, #autostadtView, #tikosTraegerView, #tikosPreiseView) .ap-page > :is(.box, .ap-box, .ap-card) { padding: 14px 12px !important; border-radius: 12px !important; }
  /* Filter als 2-Spalten-Raster: Felder gleich breit, Suche/Artikel über die ganze Breite */
  html[data-seiten="2026"] #appBox :is(#wareneingangView, #offeneBestellungenView, #ausgangsprotokolleView, #eingangsprotokolleView, #autostadtView, #tikosTraegerView, #tikosPreiseView) .ap-toolbar .ap-filter {
    display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; flex-basis: 100% !important; gap: 10px !important; align-items: end !important;
  }
  html[data-seiten="2026"] #appBox :is(#wareneingangView, #offeneBestellungenView, #ausgangsprotokolleView, #eingangsprotokolleView, #autostadtView, #tikosTraegerView, #tikosPreiseView) .ap-toolbar .ap-filter label.ap-search:is(:has(#weSuche), :has(#obArtikel)) { grid-column: 1 / -1; }
  html[data-seiten="2026"] #appBox :is(#wareneingangView, #offeneBestellungenView, #ausgangsprotokolleView, #eingangsprotokolleView, #autostadtView, #tikosTraegerView, #tikosPreiseView) .ap-toolbar .ap-filter label:has(input[type="checkbox"]) { white-space: normal !important; height: auto !important; min-height: var(--u-h-field); line-height: 1.25; }
  html[data-seiten="2026"] #appBox :is(#wareneingangView, #offeneBestellungenView, #ausgangsprotokolleView, #eingangsprotokolleView, #autostadtView, #tikosTraegerView, #tikosPreiseView) .ap-toolbar .ap-filter > :is(button, .ap-btn) { grid-column: 1 / -1; justify-self: end; }
  html[data-seiten="2026"] #appBox :is(#wareneingangView, #offeneBestellungenView, #einkaufAufgabenView, #ausgangsprotokolleView, #eingangsprotokolleView, #autostadtView, #tikosTraegerView, #tikosPreiseView) .ap-toolbar .ap-filter label.ap-search :is(input, select, input[type="date"], #obArtikel, #weSuche) { width: 100% !important; min-width: 0 !important; }
  html[data-seiten="2026"] #appBox :is(#wareneingangView, #offeneBestellungenView, #einkaufAufgabenView, #ausgangsprotokolleView, #eingangsprotokolleView, #autostadtView, #tikosTraegerView, #tikosPreiseView) .ap-toolbar .ap-tools { flex-basis: 100%; }
  html[data-seiten="2026"] #appBox #wareneingangView .we-kacheln { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  html[data-seiten="2026"] #appBox #wareneingangView .we-kachel strong { font-size: 22px !important; }
}

/* =====================================================================================================================
   Modul 2 (3.3.0): Kommissionierung, Packzähler, Inventar – waren schon weitgehend im neuen Stil; hier nur die Befunde.
   ===================================================================================================================== */
/* Packstation-Suche: EIN Feld (vorher Kasten im Kasten: UI-2026-Feldrahmen innerhalb des Suchrahmens), Fokusring am Rahmen */
html[data-seiten="2026"] #appBox #counterView .counter-search {
  border: 1px solid var(--ds-line-strong) !important; border-radius: var(--u-r-card) !important; background: var(--ds-surface) !important;
  gap: 10px; color: var(--ds-muted); font-size: 22px; transition: border-color var(--u-dur) var(--u-ease), box-shadow var(--u-dur) var(--u-ease);
}
html[data-seiten="2026"] #appBox #counterView .counter-search:focus-within { border-color: var(--ds-focus) !important; box-shadow: var(--u-ring); }
html[data-seiten="2026"] #appBox #counterView .counter-search input {
  border: 0 !important; box-shadow: none !important; background: transparent !important; padding: 0 !important; height: 44px !important; min-height: 44px !important; font-size: 17px !important;
}
html[data-seiten="2026"] #appBox #counterView .counter-search input:focus { box-shadow: none !important; }
/* „+ PE“ am Packplatz: Grün dunkler für Kontrast ≥ 4,5:1 (vorher #4e853d = 4,42:1 mit weißer Schrift) */
html[data-seiten="2026"] #appBox #counterPage .counter-pack-actions button.counter-pack-plus:not(:disabled) { background: #3f6f31 !important; border-color: #3f6f31 !important; color: #fff !important; }
html[data-seiten="2026"] #appBox #counterPage .counter-pack-actions button.counter-pack-plus:not(:disabled):hover { background: #345c28 !important; border-color: #345c28 !important; }

/* Kommissionierung „Aufträge“: Hinweis links und Knöpfe rechts in EINER Zeile (vorher zwei Zeilen) */
html[data-seiten="2026"] #appBox #kommissionierungWork:has(> .kom-page-toolbar) { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
html[data-seiten="2026"] #appBox #kommissionierungWork:has(> .kom-page-toolbar) > * { flex: 1 1 100%; order: 3; min-width: 0; }
html[data-seiten="2026"] #appBox #kommissionierungWork > .kom-page-toolbar { flex: 0 0 auto; order: 2; margin: 0 0 0 auto !important; }
html[data-seiten="2026"] #appBox #kommissionierungWork > .kom-workplace-hint { flex: 1 1 200px; order: 1; margin: 0 !important; font-size: var(--u-fs-sm); color: var(--ds-muted); }
/* Modul 6: Suche der Aus-/Eingangsprotokolle nimmt wie im Wareneingang den freien Platz */
html[data-seiten="2026"] #appBox :is(#ausgangsprotokolleView, #eingangsprotokolleView, #autostadtView, #tikosTraegerView, #tikosPreiseView) .ap-toolbar .ap-filter label.ap-search:has(input[type="search"]) { flex: 1 1 260px !important; }
html[data-seiten="2026"] #appBox :is(#ausgangsprotokolleView, #eingangsprotokolleView, #autostadtView, #tikosTraegerView, #tikosPreiseView) .ap-toolbar .ap-filter label.ap-search input[type="search"] { width: 100% !important; min-width: 200px; }

/* 3.3.1 (Marvin 18.11., Foto Wareneingang): Mengenfeld "Jetzt geliefert" im Positions-Ablauf - die Feldregel oben (14 px Schrift, 14 px Innenabstand)
   machte es zu schmal, "200" stand als "20" da. Feste Breite fuer 4 Stellen (max 9999), grosse fette Zahl, kein Pfeil-Spinner (es gibt − und +). */
html[data-seiten="2026"] #appBox .app-view .ob-ablauf .ob-zahl {
  width: 96px !important; min-width: 96px !important; flex: 0 0 auto !important;
  padding: 0 var(--ds-space-2) !important;
  font-size: 1.15rem !important; font-weight: 700 !important; text-align: center !important;
  -moz-appearance: textfield; appearance: textfield;
}
html[data-seiten="2026"] #appBox .app-view .ob-ablauf .ob-zahl::-webkit-inner-spin-button,
html[data-seiten="2026"] #appBox .app-view .ob-ablauf .ob-zahl::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* 3.3.1 (Marvin 18.11.): Kommissionieren - "Nicht gefunden", "Anderes Problem" und "Gepackt" weiter auseinander (vorher 12 px), damit man
   im Lager nicht daneben tippt. */
html[data-seiten="2026"] #appBox #kommissionierungView .kom-pick .kom-work-actions { column-gap: var(--ds-space-8) !important; row-gap: var(--ds-space-5) !important; }

/* 3.3.3 (Marvin 19.11.): Kommissionierung "In Klärung" - Werkzeugleiste (Beschriftung über dem Feld, Aktion rechts), gleiche Meldungen als
   EINE Zeile mit "× n" (aufklappbar), Grund, "nicht bestellt" rot, Ampel nach Alter. Nur Tokens; Tabelle scrollt im eigenen Rahmen. */
html[data-seiten="2026"] #appBox #kommissionierungView .kom-klaerung-toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--ds-space-3); }
html[data-seiten="2026"] #appBox #kommissionierungView .kom-klaerung-toolbar .kom-klaerung-feld { display: flex; flex-direction: column; gap: var(--ds-space-1); flex: 0 0 auto; min-width: 0; margin: 0; font-size: var(--ds-font-xs); color: var(--ds-muted); }
html[data-seiten="2026"] #appBox #kommissionierungView .kom-klaerung-toolbar .kom-klaerung-feld > :is(input, select) { flex: 0 0 auto !important; height: 40px; min-height: 40px; margin: 0; }
html[data-seiten="2026"] #appBox #kommissionierungView .kom-klaerung-toolbar .kom-klaerung-feld .kom-search { width: 260px !important; max-width: 100%; }
html[data-seiten="2026"] #appBox #kommissionierungView .kom-klaerung-toolbar .kom-klaerung-feld select { min-width: 200px; max-width: 100%; }
html[data-seiten="2026"] #appBox #kommissionierungView .kom-klaerung-toolbar .kom-klaerung-tests { display: inline-flex; align-items: center; gap: var(--ds-space-2); flex: 0 0 auto; margin: 0; min-height: 40px; font-size: var(--ds-font-sm); color: var(--ds-text); cursor: pointer; }
html[data-seiten="2026"] #appBox #kommissionierungView .kom-klaerung-toolbar .kom-klaerung-tests input { width: 18px; height: 18px; margin: 0; accent-color: var(--ds-focus); }
html[data-seiten="2026"] #appBox #kommissionierungView .kom-klaerung-toolbar > .kom-spacer { flex: 1 1 auto; }
html[data-seiten="2026"] #appBox #kommissionierungView .kom-klaerung-scroll { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
html[data-seiten="2026"] #appBox #kommissionierungView .kom-klaerung-table td.kom-klaerung-aktion { text-align: right; white-space: nowrap; }
html[data-seiten="2026"] #appBox #kommissionierungView .kom-klaerung-table tr.kom-klaerung-gruppe td { font-weight: 600; }
html[data-seiten="2026"] #appBox #kommissionierungView .kom-klaerung-table tr.kom-klaerung-einzel td { background: var(--ds-surface-2); font-weight: 400; color: var(--ds-text); }
html[data-seiten="2026"] #appBox #kommissionierungView .kom-klaerung-table .kom-klaerung-sub { padding-left: var(--ds-space-6); color: var(--ds-muted); }
html[data-seiten="2026"] #appBox #kommissionierungView .kom-klaerung-kunde { display: inline-flex; align-items: center; gap: var(--ds-space-1); }
html[data-seiten="2026"] #appBox #kommissionierungView .kom-klaerung-table button.ap-icon-btn.kom-klaerung-toggle {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  width: 28px; height: 28px; min-width: 28px; min-height: 28px; padding: 0; margin: 0;
  border: 1px solid var(--ds-line); border-radius: var(--ds-radius-sm); background: var(--ds-surface); color: var(--ds-text);
  font-size: var(--ds-font-sm); font-weight: 700; line-height: 1; box-shadow: none; transform: none;
}
html[data-seiten="2026"] #appBox #kommissionierungView .kom-klaerung-table button.ap-icon-btn.kom-klaerung-toggle:hover { border-color: var(--ds-line-strong); background: var(--ds-surface-hover); }
html[data-seiten="2026"] #appBox #kommissionierungView .kom-klaerung-table button.ap-icon-btn.kom-klaerung-toggle:focus-visible { outline: 2px solid var(--ds-focus); outline-offset: 1px; }
html[data-seiten="2026"] #appBox #kommissionierungView .kom-klaerung-table button.ap-icon-btn.kom-klaerung-toggle:active { transform: scale(.98); }
html[data-seiten="2026"] #appBox #kommissionierungView .kom-klaerung-badge {
  display: inline-flex; align-items: center; padding: 0 var(--ds-space-2); min-height: 20px;
  border-radius: var(--ds-radius-pill); font-size: var(--ds-font-xs); font-weight: 700; line-height: 1.4; white-space: nowrap; vertical-align: middle;
}
html[data-seiten="2026"] #appBox #kommissionierungView .kom-klaerung-badge.ist-anzahl { border: 1px solid var(--ds-line-strong); background: var(--ds-surface); color: var(--ds-ink); }
html[data-seiten="2026"] #appBox #kommissionierungView .kom-klaerung-badge.ist-gelb { background: var(--ds-warning-soft); color: var(--ds-warning); }
html[data-seiten="2026"] #appBox #kommissionierungView .kom-klaerung-badge.ist-rot { background: var(--ds-danger-soft); color: var(--ds-danger); }
html[data-seiten="2026"] #appBox #kommissionierungView .kom-klaerung-be { display: block; margin-top: var(--ds-space-1); font-size: var(--ds-font-xs); color: var(--ds-text); white-space: nowrap; }
html[data-seiten="2026"] #appBox #kommissionierungView .kom-klaerung-be-leer { color: var(--ds-muted); }
@media (max-width: 640px) {
  html[data-seiten="2026"] #appBox #kommissionierungView .kom-klaerung-toolbar { display: grid; grid-template-columns: 1fr 1fr; align-items: end; }
  html[data-seiten="2026"] #appBox #kommissionierungView .kom-klaerung-toolbar .kom-klaerung-feld .kom-search,
  html[data-seiten="2026"] #appBox #kommissionierungView .kom-klaerung-toolbar .kom-klaerung-feld select { width: 100%; min-width: 0; }
  html[data-seiten="2026"] #appBox #kommissionierungView .kom-klaerung-toolbar > .kom-spacer { display: none; }
  html[data-seiten="2026"] #appBox #kommissionierungView .kom-klaerung-toolbar > #kommissionierungKlaerungRecallSelected { grid-column: 1 / -1; justify-self: end; }
}
/* 3.3.3: Pflichtfeld "Grund" im Dialog "Kundenbetreuung informieren" - volle Breite, Formularhöhe wie die Notiz */
html[data-seiten="2026"] #kommissionierungKlaerungModal .kom-klaerung-grund-feld { display: block; width: 100%; min-height: var(--ds-h-form); margin: 0 0 var(--ds-space-3); }

/* 3.3.4 (Marvin 19.11., Foto Tablet Packstation): Fehlmengen-Zeile - "Kundenbetreuung informieren (n)" lag auf dem Tablet UEBER der Fehlmengen-Zahl.
   Ursache: Aktions-Spalte fest 170 px (bis 1100 px) bzw. 292 px, der Knopf breiter -> rechtsbuendig nach LINKS ueber die Zahl hinaus.
   Jetzt: bis 1539 px stehen die Knoepfe in einer eigenen Zeile unter Artikel/Zahl (rechtsbuendig, umbrechend), die Zahl bleibt frei. */
@media (min-width: 700px) and (max-width: 1539px) {
  html[data-seiten="2026"] #appBox .kom-shortage-row {
    grid-template-columns: 28px minmax(0, 1fr) 84px !important;
    grid-template-areas: "toggle main qty" "toggle times qty" "toggle side side" !important;
    row-gap: var(--ds-space-2) !important;
  }
}
html[data-seiten="2026"] #appBox .kom-shortage-row .kom-shortage-side { min-width: 0; max-width: 100%; }
html[data-seiten="2026"] #appBox .kom-shortage-row .kom-shortage-actions { flex-wrap: wrap; justify-content: flex-end; max-width: 100%; }
html[data-seiten="2026"] #appBox .kom-shortage-row .kom-shortage-actions .kom-btn { max-width: 100%; white-space: normal; }

/* 3.3.5 (Marvin 19.11.: "Packstation fiel bei allen Erneuerungen bisschen durch"): die allgemeine Knopf-Regel aus ui-2026.css machte die
   Zaehlknoepfe −/+ der Packstation 36 px hoch mit 14 px Schrift (vorher 76 px / 32 px) und das Rueckgaengig-Symbol 14 px - am Tablet zu klein.
   Hier wieder gross (Hoehe/Schrift aus Tokens), Farben bleiben wie in counter.css / oben. */
html[data-seiten="2026"] #appBox #counterPage .counter-pack-actions button.counter-pack-button { min-height: calc(var(--ds-h-form) + var(--ds-space-5)) !important; padding: var(--ds-space-2) var(--ds-space-3) !important; font-size: calc(var(--ds-font-xl) * 1.4) !important; font-weight: 800 !important; line-height: 1.1 !important; }
html[data-seiten="2026"] #appBox #counterPage .counter-station-bar button.counter-undo-button { padding: 0 !important; font-size: calc(var(--ds-font-xl) * 1.4) !important; }
/* 3.3.5: gesperrte −/+ (z. B. waehrend "Layout bearbeiten" oder Mangel kleiner als PE) wurden von ui-2026.css als Lime-Hauptknopf gezeigt - jetzt klar gesperrt. */
html[data-seiten="2026"] #appBox #counterPage .counter-pack-actions button.counter-pack-button:disabled { background: var(--ds-surface-2) !important; border-color: var(--ds-line) !important; color: var(--ds-muted) !important; opacity: .7; cursor: not-allowed; }
/* 3.3.9 (Foto Marvin 24.11.): BE-Liste im Lieferschein-Fenster ("Offene Bestellungen", "Bestellungen (BE)") - "Ansehen"/"übernehmen" stehen nebeneinander
   (Ursache Ueberlappung siehe wareneingang.css 3.3.9). Am Handy (bis 640 px) brechen sie IN der Zelle untereinander um, statt das ganze Fenster waagerecht zu schieben. */
@media (max-width: 640px) {
  html[data-seiten="2026"] #appBox #wareneingangView .ap-modal .ap-table td.we-be-knoepfe { min-width: 0; white-space: normal; }
  html[data-seiten="2026"] #appBox #wareneingangView .ap-modal .ap-table td.we-be-knoepfe > :is(button, .ap-btn, .we-ok) { display: flex; align-items: center; justify-content: center; width: max-content; margin: 0 0 var(--ds-space-2) auto; }
  html[data-seiten="2026"] #appBox #wareneingangView .ap-modal .ap-table td.we-be-knoepfe > :last-child { margin-bottom: 0; }
  html[data-seiten="2026"] #appBox #wareneingangView .ap-modal .we-offene { max-width: 100%; overflow-x: auto; } /* Tabelle scrollt selbst (Regel 7), das Fenster nicht */
}
/* 3.3.9 (Guardian-Rundgang 0.3.1 oeffnet jetzt das Lieferschein-Fenster): Schliessen-✕ der Lager-Fenster war auf Tablet/Handy 30x34 px - jetzt 44 px wie alle Tippflaechen (3.3.7). */
@media (pointer: coarse), (max-width: 1100px) {
  html[data-seiten="2026"] #appBox :is(#wareneingangView, #offeneBestellungenView, #einkaufAufgabenView) .ap-modal .ap-dialog > header .ap-icon-btn { width: 44px !important; height: 44px !important; min-width: 44px !important; min-height: 44px !important; flex: 0 0 44px !important; }
}
/* 3.3.9 (Marvin 24.11., 2. Wareneingangs-Platz): Druckerwahl Traeger-/Lageretikett (public/we-drucker.js) - eine schlanke Zeile "Druckt auf: …", aufklappbar zu zwei Auswahlen.
   Gilt in der BE-Ansicht (Buchen + Drucken) und im Lieferschein-Fenster (Etiketten drucken). Nur Tokens, keine eigenen Farben. */
html[data-seiten="2026"] #appBox :is(#wareneingangView, #offeneBestellungenView) .we-drucker { margin: var(--ds-space-2) 0 var(--ds-space-3); border: 1px solid var(--ds-line); border-radius: var(--ds-radius-md); background: var(--ds-surface); }
html[data-seiten="2026"] #appBox :is(#wareneingangView, #offeneBestellungenView) .we-drucker > summary { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ds-space-1) var(--ds-space-2); min-height: var(--ds-h-bar); padding: var(--ds-space-1) var(--ds-space-3); cursor: pointer; list-style: none; font-size: var(--ds-font-sm); color: var(--ds-text); }
html[data-seiten="2026"] #appBox :is(#wareneingangView, #offeneBestellungenView) .we-drucker > summary::-webkit-details-marker { display: none; }
html[data-seiten="2026"] #appBox :is(#wareneingangView, #offeneBestellungenView) .we-drucker-titel { font-weight: 600; color: var(--ds-ink); }
html[data-seiten="2026"] #appBox :is(#wareneingangView, #offeneBestellungenView) .we-drucker-art { color: var(--ds-muted); }
html[data-seiten="2026"] #appBox :is(#wareneingangView, #offeneBestellungenView) .we-drucker-ziel small { color: var(--ds-muted); font-size: var(--ds-font-xs); }
html[data-seiten="2026"] #appBox :is(#wareneingangView, #offeneBestellungenView) .we-drucker-fehlt strong { color: var(--ds-danger); }
html[data-seiten="2026"] #appBox :is(#wareneingangView, #offeneBestellungenView) .we-drucker-trenn { color: var(--ds-muted); }
html[data-seiten="2026"] #appBox :is(#wareneingangView, #offeneBestellungenView) .we-drucker-aendern { margin-left: auto; font-weight: 600; text-decoration: underline; color: var(--ds-text); }
html[data-seiten="2026"] #appBox :is(#wareneingangView, #offeneBestellungenView) .we-drucker[open] .we-drucker-aendern { text-decoration: none; }
html[data-seiten="2026"] #appBox :is(#wareneingangView, #offeneBestellungenView) .we-drucker-wahl { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--ds-space-2) var(--ds-space-3); padding: var(--ds-space-2) var(--ds-space-3) var(--ds-space-3); border-top: 1px solid var(--ds-line); }
html[data-seiten="2026"] #appBox :is(#wareneingangView, #offeneBestellungenView) .we-drucker-feld { display: flex; flex-direction: column; gap: var(--ds-space-1); margin: 0; font-size: var(--ds-font-xs); color: var(--ds-muted); }
html[data-seiten="2026"] #appBox :is(#wareneingangView, #offeneBestellungenView) .we-drucker-feld select { flex: 0 0 auto; width: 100%; max-width: none; }
html[data-seiten="2026"] #appBox :is(#wareneingangView, #offeneBestellungenView) .we-drucker-wahl .ap-hint { grid-column: 1 / -1; margin: 0; }
@media (pointer: coarse), (max-width: 1100px) {
  html[data-seiten="2026"] #appBox :is(#wareneingangView, #offeneBestellungenView) .we-drucker > summary { min-height: 44px; }
}
@media (max-width: 640px) {
  html[data-seiten="2026"] #appBox :is(#wareneingangView, #offeneBestellungenView) .we-drucker-trenn { display: none; }
  html[data-seiten="2026"] #appBox :is(#wareneingangView, #offeneBestellungenView) .we-drucker-ziel { flex: 1 1 100%; }
}

/* 3.5.1 (Marvin 25.11., Offene Bestellungen „sieht auch kacka aus“): Filterleiste ab Tablet als EINE umbrechende Zeile - Felder mit Beschriftung
   oben, Haken direkt am Text (vorher wie Felder im Raster verteilt, Haken weit weg vom Text), „Anzeigen“/„Filter zurücksetzen“ rechts. Handy: Raster bleibt. */
@media (min-width: 761px) {
  html[data-seiten="2026"] #appBox #offeneBestellungenView .ap-toolbar .ap-filter {
    display: flex !important; flex-wrap: wrap !important; align-items: flex-end !important; gap: var(--ds-space-3) var(--ds-space-4) !important; grid-template-columns: none !important; width: 100%;
  }
  html[data-seiten="2026"] #appBox #offeneBestellungenView .ap-toolbar .ap-filter label:not(:has(input[type="checkbox"])) { flex: 0 1 auto !important; }
  html[data-seiten="2026"] #appBox #offeneBestellungenView .ap-toolbar .ap-filter label.ap-search:has(#obArtikel) { flex: 1 1 260px !important; }
  html[data-seiten="2026"] #appBox #offeneBestellungenView .ap-toolbar .ap-filter label.ap-search:has(#obArtikel) input { width: 100% !important; }
  html[data-seiten="2026"] #appBox #offeneBestellungenView .ap-toolbar .ap-filter label:has(input[type="checkbox"]) {
    display: inline-flex !important; flex-direction: row !important; align-items: center !important; gap: var(--ds-space-2) !important; flex: 0 0 auto !important;
    width: auto !important; min-height: 40px; padding: 0 !important; white-space: nowrap !important; font-weight: 500;
  }
  html[data-seiten="2026"] #appBox #offeneBestellungenView .ap-toolbar .ap-filter > button[type="submit"] { margin-left: auto !important; }
}
/* 3.5.1 (Marvin 25.11.: Kategorien „muss ich auch selber anlegen können“): Hinweis unter dem Kategorie-Feld im Produkt-Editor */
html[data-seiten="2026"] #appBox .inv-feld-hinweis { display: block; margin-top: var(--ds-space-1); font-size: var(--ds-font-xs); color: var(--ds-muted); }
/* 3.5.1: die Feldbreite (168 px) galt auch für Haken - Checkbox stand mitten in einem breiten Kasten, weit weg vom Text */
html[data-seiten="2026"] #appBox :is(#wareneingangView, #offeneBestellungenView, #einkaufAufgabenView, #ausgangsprotokolleView, #eingangsprotokolleView, #autostadtView, #tikosTraegerView, #tikosPreiseView) .ap-toolbar .ap-filter label input[type="checkbox"] {
  width: 22px !important; min-width: 22px !important; flex: 0 0 22px !important; margin: 0 !important;
}
