/* RUESS Hub 2.70.0 - Wareneingang: Ergaenzungen zur Protokoll-Oberflaeche (ausgangsprotokolle.css gilt auch fuer #wareneingangView). */
#wareneingangView .ap-dialog.we-wide, #offeneBestellungenView .ap-dialog.we-wide, #einkaufAufgabenView .ap-dialog.we-wide { width: min(860px, 100%); }
#wareneingangView .we-form .we-full, #offeneBestellungenView .we-form .we-full, #einkaufAufgabenView .we-form .we-full { flex: 1 1 100%; }
#wareneingangView .we-lnr, #offeneBestellungenView .we-lnr, #einkaufAufgabenView .we-lnr { font-size: 15px; letter-spacing: .02em; margin: 0 8px; }
#wareneingangView .we-actions, #offeneBestellungenView .we-actions, #einkaufAufgabenView .we-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
#wareneingangView .ap-dialog h4, #offeneBestellungenView .ap-dialog h4, #einkaufAufgabenView .ap-dialog h4 { margin: 14px 0 6px; font-size: 13px; }
#wareneingangView .ap-status.st-WartetAufErfassung, #offeneBestellungenView .ap-status.st-WartetAufErfassung, #einkaufAufgabenView .ap-status.st-WartetAufErfassung { background: #fff2cc; color: #775b0a; }
#wareneingangView .ap-status.st-Bereit, #offeneBestellungenView .ap-status.st-Bereit, #einkaufAufgabenView .ap-status.st-Bereit { background: #dbeaf7; color: #1c4f7a; }
#wareneingangView .ap-status.st-Abgelegt, #offeneBestellungenView .ap-status.st-Abgelegt, #einkaufAufgabenView .ap-status.st-Abgelegt { background: #e3f1d2; color: #2f5b0b; }
#wareneingangView .ap-status.st-LNummer, #offeneBestellungenView .ap-status.st-LNummer, #einkaufAufgabenView .ap-status.st-LNummer, #wareneingangView .ap-status.st-Erfasst, #offeneBestellungenView .ap-status.st-Erfasst, #einkaufAufgabenView .ap-status.st-Erfasst { background: #eef1ee; color: #3a443e; }
#wareneingangView .ap-status.st-Dublette, #offeneBestellungenView .ap-status.st-Dublette, #einkaufAufgabenView .ap-status.st-Dublette { background: #fff2cc; color: #775b0a; }
#wareneingangView .we-dublette, #offeneBestellungenView .we-dublette, #einkaufAufgabenView .we-dublette { background: #fff8e1; border: 1px solid #f0dfa0; border-radius: 8px; padding: 8px 12px; }

/* 2.70.9: Sidebar-Gruppe "Einkauf & Lager" (Icon wie ti-truck-delivery) und "Wareneingang" (Icon wie ti-file-barcode, auch in der ausgeklappten Unterliste) */
.sidebar-nav #einkaufLagerNav::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23323a3b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='7' cy='17' r='2'/%3E%3Ccircle cx='17' cy='17' r='2'/%3E%3Cpath d='M5 17H3V6a1 1 0 0 1 1-1h9v12m-4 0h6m4 0h2v-6h-8m0-5h5l3 5'/%3E%3Cpath d='M3 9h4'/%3E%3C/svg%3E"); }
.sidebar-nav .sidebar-subnav #wareneingangNav { position: relative; padding-left: 44px; }
.sidebar-nav .sidebar-subnav #wareneingangNav::before { display: block; left: 14px; top: 50%; transform: translateY(-50%); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23323a3b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3v4a1 1 0 0 0 1 1h4'/%3E%3Cpath d='M17 21H7a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7l5 5v11a2 2 0 0 1-2 2z'/%3E%3Cpath d='M8 13v4M11 13v4M14 13v4M17 13v4'/%3E%3C/svg%3E"); }

/* 2.71.1: Offene Bestellungen - Lieferschein links, Positionen rechts */
.ob-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 14px; align-items: start; }
.ob-pdf { width: 100%; height: 72vh; border: 1px solid #d7ddd0; border-radius: 8px; background: #fff; }
.ob-pdfbox { margin-top: 8px; }
.ob-ls-wahl { display: block; }
.ob-ls-wahl select { max-width: 100%; }
.ob-menge { width: 6.5em; }
.ob-gehakt td { background: #f1f6e7; }
.ob-titel { font-size: 1.1em; margin: 0 8px; }
.we-eingang { font-size: 0.85em; margin-top: 2px; }
@media (max-width: 960px) { .ob-split { grid-template-columns: 1fr; } .ob-pdf { height: 55vh; } }
/* 2.71.1: Zaehler offener Einkauf-Faelle im Menue */
.sidebar-count { display: inline-block; min-width: 1.4em; padding: 0 6px; border-radius: 10px; background: #c0392b; color: #fff; font-size: 11px; line-height: 1.5; text-align: center; margin-left: 6px; }
.sidebar-count.hidden { display: none; }
.ob-problem { white-space: nowrap; }

/* 2.71.2: BE-Ansicht - Tabelle scrollt innerhalb des Bereichs, Bezeichnung 2 Zeilen, erledigte Positionen ausgegraut */
.ob-split > * { min-width: 0; }
.ob-scroll { max-width: 100%; overflow-x: auto; }
.ob-tabelle { min-width: 720px; }
.ob-bez { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 20em; line-height: 1.3; word-break: break-word; }
.ob-null td { color: #8a9296; background: #f6f7f4; }
.ob-erledigt { margin-top: 10px; }
.ob-erledigt summary { cursor: pointer; color: #667174; margin-bottom: 6px; }
.ob-alle { display: inline-flex; align-items: center; gap: 6px; }
.ob-problem { white-space: nowrap; }

/* 2.71.2: Spalte Eingang - Erfassungsdatum klein darunter */
.we-erfasst { font-size: 0.78em; margin-top: 1px; }

/* 2.71.2: Filterleiste kompakt in EINER Zeile (Wareneingang, Offene Bestellungen, Einkauf-Aufgaben); Spalten sauber ausgerichtet; "Öffnen" kleiner */
#wareneingangPage .ap-toolbar, #offeneBestellungenPage .ap-toolbar, #einkaufAufgabenPage .ap-toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; }
#wareneingangPage .ap-filter, #offeneBestellungenPage .ap-filter, #einkaufAufgabenPage .ap-filter { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 10px; width: auto; flex: 0 1 auto; margin: 0; }
#wareneingangPage .ap-filter .ap-search, #offeneBestellungenPage .ap-filter .ap-search, #einkaufAufgabenPage .ap-filter .ap-search { display: flex; flex-direction: column; gap: 2px; width: auto; flex: 0 0 auto; margin: 0; font-size: 0.85em; }
#wareneingangPage .ap-filter input:not([type="checkbox"]), #wareneingangPage .ap-filter select, #offeneBestellungenPage .ap-filter input:not([type="checkbox"]), #offeneBestellungenPage .ap-filter select, #einkaufAufgabenPage .ap-filter select { width: 10.5em; max-width: 100%; box-sizing: border-box; }
#wareneingangPage .ap-filter input[type="search"] { width: 15em; }
#offeneBestellungenPage .ap-filter .ob-alle, #wareneingangPage .ap-filter .ob-alle { flex-direction: row; align-items: center; gap: 6px; white-space: nowrap; padding-bottom: 6px; }
#wareneingangPage .ap-filter .ap-btn, #offeneBestellungenPage .ap-filter .ap-btn { align-self: flex-end; }
#wareneingangPage .ap-table th, #wareneingangPage .ap-table td, #offeneBestellungenPage .ap-table th, #offeneBestellungenPage .ap-table td, #einkaufAufgabenPage .ap-table th, #einkaufAufgabenPage .ap-table td { vertical-align: middle; text-align: left; }
.ap-table th.num, .ap-table td.num { text-align: right !important; font-variant-numeric: tabular-nums; }
.ap-table th.ctr, .ap-table td.ctr { text-align: center !important; }
.ap-btn.klein { padding: 2px 10px; font-size: 0.85em; line-height: 1.5; }

/* 2.71.2: Regel fuer alle neuen Seiten - Knoepfe nie ueber die volle Breite, immer so breit wie ihr Text */
#wareneingangView button, #offeneBestellungenView button, #einkaufAufgabenView button { width: auto; flex: 0 0 auto; min-width: 0; align-self: auto; display: inline-block; }
#wareneingangView .ap-actions, #offeneBestellungenView .ap-actions, #einkaufAufgabenView .ap-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-start; }
#offeneBestellungenView td.ap-actions, #einkaufAufgabenView td.ap-actions { display: table-cell; text-align: right; }
.ob-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 6px; }
.ob-kopf .ob-titel { margin: 0; }

/* 2.71.3: schlichtere Maske - kein grosser Kopfkasten darueber (Titel steht in der Seite), kompaktere Tabellen, hell/dunkel-neutrale Farben */
body[data-view="offeneBestellungen"] .app-page-hero, body[data-view="einkaufAufgaben"] .app-page-hero { display: none; }
.seiten-kopf { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 2px 0 10px; }
.seiten-kopf h2 { margin: 0; font-size: 1.3rem; font-weight: 700; }
.ob-hinweis { margin: 6px 0 12px; padding: 7px 12px; border-radius: 8px; background: rgba(162, 191, 19, 0.12); border: 1px solid rgba(162, 191, 19, 0.35); font-size: 0.9em; }
.ob-kopf { margin-bottom: 8px; }
.ob-kopf .ob-titel { font-size: 1.15rem; margin: 0 4px; }
.ob-split { grid-template-columns: minmax(300px, 0.85fr) minmax(0, 1.5fr); gap: 18px; }
.ob-split h4 { margin: 4px 0 8px; font-size: 0.95rem; }
.ob-pdf { height: calc(100vh - 250px); min-height: 440px; }
.ob-tabelle th, .ob-tabelle td { padding: 7px 9px; }
.ob-tabelle thead th { font-size: 0.72rem; letter-spacing: 0.04em; white-space: nowrap; }
.ob-tabelle tbody tr:hover td { background: rgba(127, 127, 127, 0.08); }
.ob-menge { width: 5.4em; height: 30px; padding: 2px 8px; border-radius: 8px; box-sizing: border-box; text-align: right; }
.ob-haken { width: 18px !important; height: 18px !important; cursor: pointer; }
.ob-gehakt td { background: rgba(162, 191, 19, 0.16); }
.ob-null td { background: transparent; color: inherit; opacity: 0.55; }
.ob-erledigt summary { padding: 4px 0; }
.ob-problem .ap-btn.klein { padding: 2px 9px; }

/* 2.71.4: Bestellung prüfen und buchen - EIN Weg in drei Schritten, große Knöpfe (mindestens 44 px, auch per Touch), keine vollbreiten Balken */
.ob-ablauf .ob-schritte { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 14px; padding: 0; }
.ob-ablauf .ob-schritte li { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; min-height: 44px; border-radius: 999px; border: 2px solid var(--line, #c9d3df); color: var(--muted, #5b6b7d); font-weight: 600; }
.ob-ablauf .ob-schritte li.aktiv { border-color: #1f6feb; color: #0b3d91; background: rgba(31, 111, 235, .10); }
.ob-ablauf .ob-schritte li.fertig { border-color: #1a7f37; color: #1a7f37; background: rgba(26, 127, 55, .10); }
.ob-ablauf .ob-nr { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: currentColor; }
.ob-ablauf .ob-nr { color: inherit; }
.ob-ablauf .ob-schritte li .ob-nr { color: #fff; background: currentColor; }
.ob-ablauf .ob-schritte li:not(.aktiv):not(.fertig) .ob-nr { background: #8793a3; }
.ob-ablauf .ob-schritte li.aktiv .ob-nr { background: #1f6feb; }
.ob-ablauf .ob-schritte li.fertig .ob-nr { background: #1a7f37; }
.ob-ablauf .ob-gross { min-height: 44px; min-width: 44px; padding: 0 20px; font-size: 1rem; font-weight: 600; border-radius: 10px; border: 2px solid var(--line, #c9d3df); background: var(--panel, #fff); color: inherit; cursor: pointer; width: auto; }
.ob-ablauf .ob-gross.primary { background: #1f6feb; border-color: #1f6feb; color: #fff; }
.ob-ablauf .ob-gross[disabled] { opacity: .45; cursor: not-allowed; }
.ob-ablauf .ob-aktionen { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 14px 0; }
.ob-ablauf .ob-karte { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; padding: 12px 14px; margin: 0 0 10px; border-radius: 12px; border: 2px solid var(--line, #c9d3df); border-left-width: 10px; }
.ob-ablauf .ob-karte-text { flex: 1 1 220px; min-width: 0; }
.ob-ablauf .ob-karte.ob-gruen { border-color: #1a7f37; background: rgba(26, 127, 55, .08); }
.ob-ablauf .ob-karte.ob-gelb { border-color: #bf8700; background: rgba(191, 135, 0, .10); }
.ob-ablauf .ob-karte.ob-rot { border-color: #cf222e; background: rgba(207, 34, 46, .08); }
.ob-ablauf .ob-zaehler { display: inline-flex; align-items: center; gap: 6px; }
.ob-ablauf .ob-zahl { width: 5.2em; min-height: 44px; text-align: center; font-size: 1.15rem; font-weight: 700; border-radius: 10px; border: 2px solid var(--line, #c9d3df); }
.ob-ablauf .ob-frage { margin: 8px 0 4px; padding: 14px 16px; border-radius: 12px; background: rgba(31, 111, 235, .08); }
.ob-ablauf .ob-frage-text { margin: 4px 0; font-size: 1.1rem; }
.ob-ablauf .ob-fertig { margin: 8px 0; padding: 16px; border-radius: 12px; background: rgba(26, 127, 55, .10); border: 2px solid #1a7f37; }
.ob-ablauf .ob-fertig-text { margin: 0 0 6px; font-size: 1.35rem; font-weight: 700; color: #1a7f37; }
.ob-ablauf .ob-symbole { display: flex; flex-wrap: wrap; gap: 12px; margin: 12px 0; }
.ob-ablauf .ob-symbol, #obDialog .ob-symbol { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 110px; min-height: 88px; padding: 10px 14px; font-size: 1rem; font-weight: 600; border-radius: 12px; border: 2px solid var(--line, #c9d3df); background: var(--panel, #fff); color: inherit; cursor: pointer; }
.ob-ablauf .ob-sym, #obDialog .ob-sym { font-size: 2rem; line-height: 1; }
#obDialog .ob-gross { min-height: 44px; min-width: 44px; padding: 0 20px; font-size: 1rem; font-weight: 600; border-radius: 10px; width: auto; }
#obDialog .ob-aktionen { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
@media (max-width: 720px) { .ob-ablauf .ob-karte { padding: 10px; } .ob-ablauf .ob-zahl { width: 4.4em; } }

/* 2.71.9: Lieferschein-Detail kompakt - eine Leiste (Hauptaktion links, "Mehr" rechts), BE-Tabelle mit Stand und kleinen Knoepfen */
#wareneingangView .we-leiste { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 12px 0; }
#wareneingangView .we-leiste-links { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
#wareneingangView .we-mehr { position: relative; }
#wareneingangView .we-mehr > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; padding: 0 12px; }
#wareneingangView .we-mehr > summary::-webkit-details-marker { display: none; }
#wareneingangView .we-mehr-menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 5; min-width: 220px; display: flex; flex-direction: column; padding: 4px; border: 1px solid #d7ddd0; border-radius: 10px; background: #fff; box-shadow: 0 8px 24px rgba(23, 32, 28, .2); }
#wareneingangView .we-mehr-menu button.we-mehr-item { display: block; align-self: stretch; text-align: left; border: 0; background: transparent; color: #2f3a33; padding: 7px 10px; border-radius: 6px; cursor: pointer; font: inherit; }
#wareneingangView .we-mehr-menu button.we-mehr-item:hover { background: rgba(127, 127, 127, 0.14); }
#wareneingangView .we-be-status { white-space: nowrap; }
#wareneingangView .we-be-status span + span { margin-left: 8px; }
#wareneingangView .we-be-knoepfe { display: table-cell; text-align: right; white-space: nowrap; }
#wareneingangView .we-be-knoepfe .ap-btn + .ap-btn { margin-left: 6px; }
#wareneingangView .we-ok { color: #1a7f37; font-weight: 600; }
#wareneingangView .we-nein { color: #cf222e; font-weight: 600; }
#wareneingangView .we-be-hinweis { color: #bf8700; font-size: 0.9em; }

/* 2.71.9: Bestellung pruefen und buchen - lesbarer: PDF breit (ca. 45 %), ruhigere Karten, Problem-Dialog mit gleich grossen Knoepfen */
.ob-ablauf .ob-split { grid-template-columns: minmax(0, 45fr) minmax(0, 55fr); gap: 18px; }
.ob-ablauf .ob-pdf { display: block; width: 100%; height: calc(100vh - 230px); min-height: 520px; }
.ob-pdf-leiste { display: flex; align-items: center; gap: 8px; margin: 4px 0 6px; }
.ob-warn { margin: 8px 0; padding: 8px 12px; border-radius: 8px; border: 1px solid #cf222e; background: rgba(207, 34, 46, .08); }
.ob-ablauf .ob-karte { border-width: 1px; border-left-width: 6px; padding: 12px 14px; gap: 10px 16px; background: transparent; }
.ob-ablauf .ob-karte.ob-gruen { border-color: rgba(26, 127, 55, .45); border-left-color: #1a7f37; background: rgba(26, 127, 55, .05); }
.ob-ablauf .ob-karte.ob-gelb { border-color: rgba(127, 127, 127, .35); border-left-color: #bf8700; background: transparent; }
.ob-ablauf .ob-karte.ob-rot { border-color: rgba(207, 34, 46, .45); border-left-color: #cf222e; background: rgba(207, 34, 46, .05); }
.ob-bez-gross { font-size: 1.2rem; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.ob-meta { font-size: .95rem; opacity: .85; margin-top: 2px; }
.ob-mengen { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 6px; font-size: 1rem; }
.ob-mengen .ob-offen { padding: 1px 10px; border-radius: 999px; background: rgba(127, 127, 127, .16); }
.ob-ablauf .ob-zaehler { gap: 4px; }
.ob-ablauf .ob-zahl { width: 4.2em; }
#offeneBestellungenView .ob-ablauf .ob-zaehler .ob-gross { padding: 0 14px; font-size: 1.3rem; }
#offeneBestellungenView .ob-ablauf .ob-problem-knopf { padding: 0 12px; font-size: .9rem; font-weight: 500; }
#obDialog h3 { font-size: 1.4rem; }
#obDialog .ap-dialog-body { padding: 18px 22px 20px; }
#obDialog .ob-prob-kopf { margin: 0 0 16px; }
#obDialog .ob-prob-titel { font-size: 1.25rem; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
#obDialog .ob-symbole { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 0 0 16px; }
#obDialog .ob-symbol { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 112px; padding: 14px 10px; text-align: center; }
#obDialog .ob-sym { font-size: 2.2rem; }
#obDialog .ob-sym-text { font-size: 1.05rem; font-weight: 600; }
#obDialog .ob-prob-fuss { display: flex; justify-content: flex-end; }

.ob-ablauf .ob-ls-fertig { margin: 10px 0; padding: 10px 14px; border-radius: 8px; border: 1px solid rgba(26, 127, 55, .45); background: rgba(26, 127, 55, .06); }

/* 2.71.9: Verkaufsware - nur Menge buchen (deutlich, aber ruhig) */
.ob-ablauf .ob-ziel { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 6px; }
.ob-ablauf .ob-verkauf { font-size: .95rem; }
#offeneBestellungenView .ob-schild { padding: 2px 12px; min-height: 28px; border-radius: 999px; border: 1px solid transparent; color: #fff; font-weight: 600; font-size: .9rem; cursor: pointer; }
#offeneBestellungenView .ob-schild[disabled] { cursor: default; opacity: 1; }
#offeneBestellungenView .ob-schild-traeger { background: #1f6feb; }
#offeneBestellungenView .ob-schild-lager { background: #1a7f37; }
#offeneBestellungenView .ob-schild-verkauf { background: #8250df; }
.ob-warn.ob-warn-klein { margin: 6px 0 0; padding: 4px 10px; }

/* 2.71.10: Layout - die Positionsspalte ist nie breiter als der Bildschirm (kein Querscrollen), Karten brechen um; Etiketten je Position */
.ob-ablauf { max-width: 100%; overflow-x: hidden; }
.ob-ablauf, .ob-ablauf * { box-sizing: border-box; }
.ob-ablauf .ob-split > * { min-width: 0; max-width: 100%; }
.ob-ablauf .ob-rechts { min-width: 0; max-width: 100%; overflow-x: hidden; }
.ob-ablauf .ob-karte { max-width: 100%; flex-wrap: wrap; }
.ob-ablauf .ob-karte-text { flex: 1 1 200px; min-width: 0; }
.ob-ablauf .ob-aktionen, .ob-ablauf .ob-zaehler { flex-wrap: wrap; }
@media (max-width: 1100px) { .ob-ablauf .ob-split { grid-template-columns: minmax(0, 1fr); } .ob-ablauf .ob-pdf { height: 60vh; min-height: 360px; } }
.ob-ablauf .ob-etiketten { margin: 12px 0; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(127, 127, 127, .35); }
.ob-ablauf .ob-etiketten-kopf { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.ob-ablauf .ob-etiketten-kopf h4 { margin: 0; }
.ob-ablauf .ob-etikett-zeile { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 6px 0; border-top: 1px solid rgba(127, 127, 127, .25); margin-top: 6px; }
.ob-ablauf .ob-etikett-text { flex: 1 1 220px; min-width: 0; overflow-wrap: anywhere; }
.ob-ablauf .ob-gedruckt { color: #1a7f37; font-weight: 600; }
#offeneBestellungenView .ob-druck { min-width: 36px; min-height: 36px; padding: 0 8px; border-radius: 8px; border: 1px solid #d7ddd0; background: #fff; cursor: pointer; font-size: 1.1rem; }
#offeneBestellungenView .ob-druck[disabled] { opacity: .45; cursor: not-allowed; }

/* 2.71.10: Lieferschein-Detail - Etiketten je Position (auch erledigte Lieferscheine) */
#wareneingangView .we-etiketten { margin: 8px 0; padding: 8px 10px; border-radius: 10px; border: 1px solid rgba(127, 127, 127, .35); }
#wareneingangView .we-etiketten-kopf { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
#wareneingangView .we-etikett-zeile { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 6px 0; border-top: 1px solid rgba(127, 127, 127, .25); margin-top: 6px; }
#wareneingangView .we-etikett-text { flex: 1 1 220px; min-width: 0; overflow-wrap: anywhere; }
#wareneingangView .we-gedruckt { color: #1a7f37; font-weight: 600; }
#wareneingangView .we-druck { min-width: 36px; min-height: 36px; padding: 0 8px; border-radius: 8px; border: 1px solid #d7ddd0; background: #fff; cursor: pointer; font-size: 1.1rem; }
#wareneingangView .we-druck[disabled] { opacity: .45; cursor: not-allowed; }

/* 2.71.10: Buchen je Position - Karte mit Aktionen, Status 'gebucht n ✓ · gedruckt ✓' */
.ob-ablauf .ob-fortschritt { margin: 4px 0 8px; }
.ob-ablauf .ob-karte-aktionen { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.ob-ablauf .ob-status-zeile { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 6px; min-height: 1px; }
.ob-ablauf .ob-gebucht { color: #1a7f37; font-weight: 600; }
#offeneBestellungenView .ob-druck.ob-druck-text { min-height: 30px; padding: 0 10px; font-size: .9rem; }
#offeneBestellungenView .ob-buchen-knopf[disabled] { opacity: .45; cursor: not-allowed; }

/* 2.71.11: Rueckmeldung Einkauf -> Lager (Schild an der Position, Box oben, Verlauf aufklappbar) */
.ob-ablauf .ob-rueck { margin-top: 8px; padding: 8px 12px; border-radius: 8px; border: 1px solid rgba(127, 127, 127, .35); border-left-width: 5px; }
.ob-ablauf .ob-rueck-gelb { border-left-color: #bf8700; background: rgba(191, 135, 0, .08); }
.ob-ablauf .ob-rueck-gruen { border-left-color: #1a7f37; background: rgba(26, 127, 55, .08); }
.ob-ablauf .ob-rueck-text { overflow-wrap: anywhere; }
.ob-ablauf .ob-rueck-verlauf { margin-top: 4px; font-size: .92rem; }
.ob-ablauf .ob-rueck-verlauf ol { margin: 4px 0 0 18px; padding: 0; }
.ob-ablauf .ob-rueckbox { margin: 0 0 10px; padding: 12px 16px; border-radius: 10px; border: 1px solid #bf8700; background: rgba(191, 135, 0, .10); }
.ob-ablauf .ob-rueckbox ul { margin: 6px 0 8px 18px; padding: 0; }

/* 2.71.11: Dialoge einheitlich - Titelzeile mit X, Inhalt, Fussleiste; 20 px Innenabstand rundum, Knoepfe rechts nebeneinander, auf dem Handy volle Breite mit Abstand zum Rand */
:is(#wareneingangView, #offeneBestellungenView, #einkaufAufgabenView) .ap-modal { padding: 16px; box-sizing: border-box; overflow-y: auto; }
:is(#wareneingangView, #offeneBestellungenView, #einkaufAufgabenView) .ap-modal .ap-dialog { box-sizing: border-box; max-width: 100%; max-height: calc(100vh - 32px); overflow-y: auto; }
:is(#wareneingangView, #offeneBestellungenView, #einkaufAufgabenView) .ap-modal .ap-dialog > header { padding: 16px 20px; }
:is(#wareneingangView, #offeneBestellungenView, #einkaufAufgabenView) .ap-modal .ap-dialog > .ap-dialog-body { padding: 16px 20px 20px; }
:is(#wareneingangView, #offeneBestellungenView, #einkaufAufgabenView) .ap-modal .ap-dialog > :not(header):not(.ap-dialog-body) { margin-left: 20px; margin-right: 20px; }
:is(#wareneingangView, #offeneBestellungenView, #einkaufAufgabenView) .ap-modal .ap-dialog > :last-child:not(header) { margin-bottom: 20px; }
:is(#wareneingangView, #offeneBestellungenView, #einkaufAufgabenView) .ap-modal .ap-dialog > form { margin-top: 16px; }
:is(#wareneingangView, #offeneBestellungenView, #einkaufAufgabenView) .ap-modal .ap-dialog :is(.ap-actions, .ob-prob-fuss, footer) { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 10px; flex: 1 1 100%; width: auto; margin-top: 18px; padding-top: 14px; border-top: 1px solid #e3e8df; text-align: right; }
:is(#wareneingangView, #offeneBestellungenView, #einkaufAufgabenView) .ap-modal .ap-dialog :is(.ap-actions, .ob-prob-fuss, footer) > :is(button, .ap-btn) { flex: 0 0 auto; width: auto; min-width: 0; }
:is(#wareneingangView, #offeneBestellungenView, #einkaufAufgabenView) .ap-modal .ap-dialog .ap-form { padding: 0; }
@media (max-width: 640px) {
  :is(#wareneingangView, #offeneBestellungenView, #einkaufAufgabenView) .ap-modal { padding: 12px; }
  :is(#wareneingangView, #offeneBestellungenView, #einkaufAufgabenView) .ap-modal .ap-dialog { width: 100%; }
}
:is(#wareneingangView, #offeneBestellungenView, #einkaufAufgabenView) .ap-modal .ap-dialog .ap-form { flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 12px; }
:is(#wareneingangView, #offeneBestellungenView, #einkaufAufgabenView) .ap-modal .ap-dialog .ap-form > :is(label, p) { width: 100%; margin: 0; }
:is(#wareneingangView, #offeneBestellungenView, #einkaufAufgabenView) .ap-modal .ap-dialog .ap-form :is(input, select, textarea) { max-width: 100%; box-sizing: border-box; }

/* 2.71.12: Lieferschein links bleibt stehen (sticky, volle Fensterhoehe), nur die Positionen rechts scrollen */
.ob-ablauf { overflow-x: clip; }
.ob-ablauf .ob-split { align-items: start; }
.ob-ablauf .ob-links { position: sticky; top: 8px; align-self: start; max-height: calc(100vh - 16px); overflow-y: auto; }
.ob-ablauf .ob-pdf { height: calc(100vh - 150px); min-height: 360px; }
@media (max-width: 1100px) { .ob-ablauf .ob-links { position: static; max-height: none; overflow: visible; } }
/* 2.71.12: Vollbildmodus */
body.ob-vollbild .app-sidebar, body.ob-vollbild .sidebar-toggle, body.ob-vollbild .app-active .header, body.ob-vollbild header.header { display: none !important; }
body.ob-vollbild .app-content { margin-left: 0; width: 100%; }
body.ob-vollbild .app-active main, body.ob-vollbild main { max-width: none; padding: 8px 12px 16px; }
body.ob-vollbild .ob-ablauf .ob-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

/* 2.71.12: Lieferanten-Bestellnummer fett rechts neben dem Artikelnamen */
.ob-ablauf .ob-bez-gross, .ob-ablauf .ob-bez { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; }
.ob-lbestnr { font-weight: 700; white-space: nowrap; margin-left: auto; }

/* 2.71.12: Tagesuebersicht */
#wareneingangView .we-uebersicht { margin: 0 0 14px; padding: 12px 14px; border: 1px solid #d7ddd0; border-radius: 10px; background: #fafbf8; }
#wareneingangView .we-ue-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 8px; }
#wareneingangView .we-ue-wahl { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; font-size: 12px; }
#wareneingangView .we-kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
#wareneingangView .we-kachel { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 8px; background: #fff; border: 1px solid #e3e8df; }
#wareneingangView .we-kachel strong { font-size: 1.8rem; line-height: 1.1; }
#wareneingangView .we-kachel small { color: #667174; }
#wareneingangView .we-ue-direkt { margin: 10px 0 2px; padding-top: 8px; border-top: 1px dashed #d7ddd0; }
#wareneingangView .we-ue-personen { margin-top: 8px; }

/* 2.71.13: Lieferzusage - Datum neben der Bestellnummer, Schilder "kommt noch" (blau/grau, kein Fehler) und "ueberfaellig" (orange) */
.ob-zusage { margin-left: 10px; color: #4d5750; white-space: nowrap; }
.ob-zusage-schild { display: inline-block; margin-left: 8px; padding: 1px 10px; border-radius: 999px; font-size: .85rem; font-weight: 600; white-space: nowrap; }
.ob-zusage-schild.ob-zusage-kommt { background: rgba(31, 111, 235, .12); color: #1f4f9c; border: 1px solid rgba(31, 111, 235, .35); }
.ob-zusage-schild.ob-zusage-ueberfaellig, .ob-zusage-spalte.ob-zusage-ueberfaellig { background: rgba(219, 109, 0, .14); color: #9a4a00; border: 1px solid rgba(219, 109, 0, .45); border-radius: 999px; padding: 1px 10px; font-weight: 600; }
.ob-zusage-hinweis { margin-right: 8px; color: #1f4f9c; font-size: .9rem; }

/* 2.71.14: Textzeilen als Hinweis, Zusage umbrechen statt abschneiden, Tabelle der Liste passt in den Rahmen, Trefferhinweis des Positionsfilters */
.ob-textzeile { margin-top: 8px; padding: 8px 12px; border-radius: 8px; border: 1px solid #bf8700; border-left-width: 5px; background: rgba(191, 135, 0, .12); font-weight: 600; overflow-wrap: anywhere; }
.ob-textzeile.ob-textzeile-inline { display: inline-block; margin: 2px 0 0; padding: 2px 10px; font-size: .9rem; }
.ob-ablauf .ob-bez-gross, .ob-ablauf .ob-bez { flex-wrap: wrap; }
.ob-ablauf .ob-bez-gross > span:first-child, .ob-ablauf .ob-bez > span:first-child { flex: 1 1 12em; min-width: 0; overflow-wrap: anywhere; white-space: normal; }
.ob-bestinfo { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: baseline; gap: 2px 10px; margin-left: auto; max-width: 100%; min-width: 0; }
.ob-bestinfo .ob-lbestnr, .ob-bestinfo .ob-zusage { white-space: normal; overflow-wrap: anywhere; margin-left: 0; }
#offeneBestellungenView .ap-table-wrap { max-width: 100%; overflow-x: auto; }
#offeneBestellungenView .ap-table-wrap .ap-table th, #offeneBestellungenView .ap-table-wrap .ap-table td { padding-left: 6px; padding-right: 6px; }
.ob-passend { margin-top: 4px; font-weight: 400; font-size: .9rem; } .ob-passend summary { cursor: pointer; color: #1f4f9c; } .ob-passend ul { margin: 4px 0 0 16px; padding: 0; }

/* 2.71.14: Vorschlag aus dem Betreff (Empfangs-Scans) */
#wareneingangView .we-vorschlag, .ap-modal .we-vorschlag { margin: 8px 0 12px; padding: 10px 14px; border-radius: 8px; border: 1px solid rgba(31, 111, 235, .35); background: rgba(31, 111, 235, .07); }
.we-vorschlag-knoepfe { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }

/* 2.71.15: Wareneingang kompakter - die Lieferschein-Liste beginnt im oberen Viertel (bei 1080 px Hoehe nach ca. 200 px) */
#wareneingangView .we-kopfzeile { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2px 12px; margin: 0 0 4px; }
#wareneingangView .we-ue-zeile { border: 0; background: transparent; padding: 4px 6px; font: inherit; font-weight: 600; text-align: left; cursor: pointer; color: inherit; }
#wareneingangView .we-ue-zeile:hover { background: rgba(127, 127, 127, .12); border-radius: 6px; }
#wareneingangView .we-pfeil { color: #667174; }
#wareneingangView .we-chips-klein { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
#wareneingangView .we-chips-klein .ap-chip { font-size: 11px; padding: 1px 8px; line-height: 1.5; }
#wareneingangView .we-uebersicht[hidden] { display: none; }
#wareneingangView .we-uebersicht { margin: 0 0 8px; }
/* eine Filterzeile: Erkennung, Eingang vor, Suche, Filter + Knoepfe */
#wareneingangView .we-einzeilig { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px 12px; margin: 0 0 4px; }
#wareneingangView .we-einzeilig .ap-filter { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px 8px; flex: 1 1 520px; margin: 0; }
#wareneingangView .we-einzeilig .ap-filter label { flex-direction: row; align-items: center; gap: 6px; font-size: 12px; text-transform: none; font-weight: 600; }
#wareneingangView .we-einzeilig .ap-filter label.ap-search:last-of-type { flex: 1 1 200px; }
#wareneingangView .we-einzeilig .ap-filter label input[type=search] { min-width: 0; width: 100%; }
#wareneingangView .we-einzeilig .we-aktionen { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; }
#wareneingangView .we-werkzeuge { position: relative; }
#wareneingangView .we-werkzeuge > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; }
#wareneingangView .we-werkzeuge > summary::-webkit-details-marker { display: none; }
#wareneingangView .we-menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 60; min-width: 270px; display: flex; flex-direction: column; gap: 2px; padding: 6px; border: 1px solid #d7ddd0; border-radius: 10px; background: #fff; box-shadow: 0 12px 32px rgba(23, 32, 28, .22); }
#wareneingangView .we-menu .ap-btn { width: 100%; text-align: left; justify-content: flex-start; border-color: transparent; background: transparent; }
#wareneingangView .we-menu .ap-btn:hover { background: rgba(127, 127, 127, .14); }
/* Reiter und Tabellenkopf bleiben beim Scrollen stehen; die Tabelle nutzt die restliche Fensterhoehe */
#wareneingangView .ap-tabs { position: sticky; top: 0; z-index: 25; background: #fff; }
#wareneingangView .ap-table-wrap { max-height: calc(100vh - 200px); min-height: 240px; }
#wareneingangView .ap-table-wrap .ap-table thead th { position: sticky; top: 0; z-index: 10; background: #f4f6f1; box-shadow: 0 1px 0 #d7ddd0; }
/* Karten-Kopf (Bestellnummer, Zusage, kommt noch) bricht um statt rechts abgeschnitten zu werden */
.ob-ablauf .ob-karte-text, .ob-ablauf .ob-bez-gross, .ob-ablauf .ob-bestinfo { min-width: 0; max-width: 100%; }
.ob-ablauf .ob-bestinfo > * { max-width: 100%; }
.ob-ablauf .ob-zusage-schild { white-space: normal; }
#wareneingangView .we-werkzeuge > summary { box-sizing: border-box; min-height: 36px; padding: 0 14px; border: 1px solid #c9d3df; border-radius: 10px; background: #fff; font-weight: 600; }
#wareneingangView .we-werkzeuge[open] > summary { background: #eef2ea; }

/* 2.71.15: PDF selbst gezeichnet (pdf.js auf Canvas) statt Browser-Betrachter im Frame */
#offeneBestellungenView .ob-pdf-seiten { overflow: auto; padding: 6px; background: #e9ecef; box-sizing: border-box; }
#offeneBestellungenView .ob-pdf-seite { display: block; margin: 0 auto 8px; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .25); max-width: none; }
#offeneBestellungenView .ob-pdf-leiste a.ap-btn { text-decoration: none; margin-left: 8px; }

/* 2.71.15: PDF-Ansicht im Lieferschein-Detail (Canvas) */
#wareneingangView .we-pdf-leiste { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 8px; }
#wareneingangView .we-pdf-leiste a.ap-btn { text-decoration: none; }
#wareneingangView .we-pdf-seiten { overflow: auto; max-height: calc(100vh - 190px); min-height: 300px; padding: 6px; background: #e9ecef; border-radius: 8px; box-sizing: border-box; }
#wareneingangView .we-pdf-seite { display: block; margin: 0 auto 8px; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .25); max-width: none; }

/* 2.71.16: PDF-Vorschau NEBEN dem Formular im Lieferschein-Detail (Dialog wird breit, Vorschau bleibt beim Scrollen stehen) */
#weModal .ap-dialog.we-mit-pdf { width: min(1500px, 97vw); }
#weModal .ap-dialog.we-mit-pdf .ap-dialog-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 0 16px; align-items: start; }
#weModal .ap-dialog.we-mit-pdf .ap-dialog-body > * { grid-column: 1; min-width: 0; }
#weModal .ap-dialog.we-mit-pdf .ap-dialog-body > #wePdfNebenan { grid-column: 2; grid-row: 1 / span 60; position: sticky; top: 0; }
#weModal .we-pdf-nebenan .we-pdf-seiten { max-height: calc(100vh - 150px); }
@media (max-width: 1000px) { #weModal .ap-dialog.we-mit-pdf .ap-dialog-body { display: block; } #weModal .ap-dialog.we-mit-pdf .ap-dialog-body > #wePdfNebenan { position: static; } }

/* 2.71.18: Beleg-Zeile und Vorschaubild Seite 1 (Reiter Erfasst/Pruefen) */
.we-beleg { display: block; }
.we-vorschau { display: block; margin-top: 4px; max-width: 110px; height: auto; border: 1px solid #c9ced6; background: #fff; }

/* 2.71.18.1 Layout-Hotfix: Dialoge liegen ueber der Seitenleiste (z-index 1000), Overlay ueber die ganze Seite; Liste: Knoepfe der letzten Spalte nebeneinander (td bleibt Tabellenzelle), Fehlertext-Spalte bricht um */
:is(#wareneingangView, #offeneBestellungenView, #einkaufAufgabenView, #ausgangsprotokolleView, #eingangsprotokolleView) .ap-modal { z-index: 1200; }
#wareneingangView td.ap-actions { display: table-cell; width: 1%; min-width: 190px; white-space: nowrap; text-align: left; }
#wareneingangView td.ap-actions > .ap-btn { display: inline-block; margin: 0 4px 0 0; vertical-align: middle; }
#wareneingangView .ap-table td:nth-last-child(2) { max-width: 260px; white-space: normal; overflow-wrap: anywhere; }

/* 2.72.0 (C2): Liste Offene Bestellungen im LS-Detail, Rueckmeldung beim Uebernehmen, BE-Zeile ausgerichtet */
#wareneingangView .we-offene > summary { cursor: pointer; font-weight: 600; margin: 8px 0; }
#wareneingangView tr.we-uebernommen td { background: #e7f6ea; }
#wareneingangView .we-uebernommen-text { font-weight: 600; }
#wareneingangView .we-pos-zeile > td { background: #f6f8fa; padding: 6px 12px; }
#wareneingangView .we-pos-tabelle tr.we-passend td { background: #fff7d6; }
#wareneingangView table.we-flash { outline: 3px solid #2e9d4f; outline-offset: 2px; transition: outline-color .4s; }
#weBeRows td { vertical-align: middle; }
#wareneingangView td.we-be-knoepfe { display: table-cell; width: 1%; min-width: 0; text-align: right; white-space: nowrap; vertical-align: middle; }
#wareneingangView td.we-be-knoepfe .ap-btn { vertical-align: middle; margin: 0 0 0 6px; }
