/* Lager › Inventur (Bauplan 2026-11-16 Mobil buchen und Inventur, MI5; Erfassen: 2026-11-16 Inventur erfassen, ER1–ER9). Liste der
   Inventuren und die Zählansicht wie im PC-Programm: breit als Tabelle, schmal (Containerabfrage auf .li-tabelle) als Karten.
   Vorsilbe li-. Marken aus oo.css: Farbe trägt Bedeutung (grün ohne Abweichung, violett Mehrbestand, rot Fehlbestand, bernstein
   ungespeichert), Blau nur am Hauptknopf; Ecken 3 px, Haarlinien. Eingebunden in Dokument.razor. */

.li { flex: 1 1 auto; overflow-y: auto; width: 100%; max-width: 980px; margin: 0 auto; padding: 14px 14px 28px; box-sizing: border-box; }
.li.li-erfassen { max-width: 1320px; }
.li-leiste { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.li-titel { margin: 0; font-size: 18px; font-weight: 600; overflow-wrap: anywhere; }
.li-klein { color: var(--tinte-5); font-size: 12px; }
.li-leer { color: var(--tinte-4); padding: 12px 4px; }
.li-fehler { color: var(--alarm); font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.li-warn { color: var(--warn); font-weight: 600; margin: 4px 0; white-space: pre-line; }
.li-gruppe { margin: 4px 0 6px; font-size: 13px; font-weight: 600; color: var(--tinte-4); }
.li-zurueck { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 8px; color: var(--tinte-4); text-decoration: none; }
.li-zurueck:hover { color: var(--tinte-1); }
.li-r { text-align: right; justify-self: end; }

/* ── Liste der Inventuren ──────────────────────────────────────────────────── */
.li-liste { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--linie); }
.li-zeile { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; min-height: 48px; padding: 6px 4px;
  border-bottom: 1px solid var(--linie); color: inherit; text-decoration: none; }
a.li-zeile:hover { background: var(--flaeche); }
.li-zeile-text { display: grid; gap: 2px; min-width: 0; }
.li-zeile-text strong { font-weight: 600; overflow-wrap: anywhere; }
.li-fortschritt, .li-menge { font-variant-numeric: tabular-nums; font-weight: 600; text-align: right; }
.li-status { display: inline-block; padding: 1px 6px; border-radius: 3px; background: var(--flaeche-2); color: var(--tinte-3); font-size: 12px; white-space: nowrap; }
.li-status-4 { color: var(--warn); background: var(--warn-grund); }
.li-status-2 { color: var(--ok); background: var(--ok-grund); }
.li-status-3 { color: var(--tinte-5); text-decoration: line-through; }
.li-treffer { display: flex; flex-direction: column; gap: 2px; width: 100%; padding: 8px 10px; border: 1px solid var(--linie); border-radius: 3px;
  background: var(--flaeche); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.li-treffer:hover, .li-treffer:focus-visible { border-color: var(--linie-stark); background: var(--flaeche-2); }
.li-suche-zeile { display: flex; gap: 8px; }
.li-suche-zeile .ein { flex: 1 1 auto; min-width: 0; }
.li-haken { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.li-haken-hinweis { margin: -2px 0 6px 24px; }
.li-feld { display: grid; gap: 4px; margin-top: 8px; }
.li-feld > span { color: var(--tinte-4); font-size: 12px; font-weight: 600; }
.li-feld textarea { resize: vertical; min-height: 64px; }

/* ── Kopf einer Inventur ───────────────────────────────────────────────────── */
.li-kopf { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; padding-bottom: 12px;
  border-bottom: 1px solid var(--linie); }
.li-kopf-text { display: grid; gap: 6px; min-width: 0; }
.li-pillen { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.li-pille { display: inline-block; padding: 1px 6px; border: 1px solid var(--linie); border-radius: 3px; color: var(--tinte-4); font-size: 12px; white-space: nowrap; }
.li-meta { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 0; font-size: 13px; }
.li-meta > div { display: flex; gap: 6px; }
.li-meta dt { color: var(--tinte-5); }
.li-meta dd { margin: 0; color: var(--tinte-2); }
.li-hinweis { margin: 0; padding: 6px 8px; border-left: 3px solid var(--violett); background: var(--violett-grund); color: var(--tinte-2); font-size: 12px; }
.li-aktionen { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

/* ── Nächster Schritt und Fortschritt ──────────────────────────────────────── */
.li-stand { display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); gap: 12px; margin: 12px 0; }
.li-schritt { display: grid; align-content: start; gap: 4px; padding: 10px 12px; border: 1px solid var(--linie); border-left: 3px solid var(--tinte-2);
  border-radius: 3px; background: var(--flaeche); }
.li-schritt-titel { color: var(--tinte-5); font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.li-schritt-text { color: var(--tinte-1); font-weight: 600; }
.li-fortschritt-kasten { display: grid; gap: 8px; padding: 10px 12px; border: 1px solid var(--linie); border-radius: 3px; background: var(--flaeche); }
.li-fortschritt-zahl { display: flex; align-items: baseline; gap: 6px; color: var(--tinte-4); }
.li-fortschritt-zahl strong { color: var(--tinte-1); font-size: 20px; font-variant-numeric: tabular-nums; }
.li-prozent { margin-left: auto; color: var(--tinte-2); font-weight: 600; font-variant-numeric: tabular-nums; }
.li-balken { display: flex; gap: 2px; height: 10px; border-radius: 3px; overflow: hidden; background: var(--linie-fein); }
.li-teil { flex: 0 1 0; min-width: 0; }
.li-teil.ok { background: var(--ok); }
.li-teil.mehr { background: var(--violett); }
.li-teil.fehl { background: var(--alarm); }
.li-teil.gezaehlt { background: var(--tinte-4); }
.li-teil.offen { background: var(--linie-stark); }
.li-legende { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.li-chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 4px; border: 0; border-radius: 3px; background: none; color: var(--tinte-3);
  font: inherit; font-size: 12px; cursor: pointer; }
.li-chip:hover { background: var(--flaeche-2); color: var(--tinte-1); }
.li-chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--linie-stark); }
.li-chip.ok::before { background: var(--ok); }
.li-chip.mehr::before { background: var(--violett); }
.li-chip.fehl::before { background: var(--alarm); }
.li-chip.gezaehlt::before { background: var(--tinte-4); }
.li-chip.nach::before { background: var(--warn); }

/* ── Abschluss ─────────────────────────────────────────────────────────────── */
.li-plan { margin: 0 0 12px; padding: 10px 12px; border: 1px solid var(--linie); border-left: 3px solid var(--ok); border-radius: 3px; background: var(--flaeche);
  display: grid; gap: 8px; }
.li-gross { justify-content: center; height: 40px; font-size: 15px; }
.li-diff { font-weight: 600; font-variant-numeric: tabular-nums; }
.li-diff.minus { color: var(--alarm); }
.li-diff.plus { color: var(--violett); }
.li-statisch { cursor: default; }

/* ── Scanleiste: klebt oben, damit der nächste Scan nie gesucht werden muss ── */
.li-scan { position: sticky; top: -14px; z-index: 5; display: grid; grid-template-columns: minmax(0, 1fr) minmax(200px, 260px) auto; align-items: end;
  gap: 4px 10px; margin: 0 -14px 10px; padding: 10px 14px; background: var(--grund); border-bottom: 1px solid var(--linie); }
.li-scan label { display: block; margin-bottom: 4px; color: var(--tinte-4); font-size: 12px; font-weight: 600; }
.li-scan form { margin: 0; min-width: 0; }
.li-scan .ein { width: 100%; height: 36px; font-size: 15px; box-sizing: border-box; }
.li-scan-zeile { display: flex; gap: 6px; }
.li-scan-zeile .ein { flex: 1 1 auto; min-width: 0; text-align: right; font-variant-numeric: tabular-nums; }
.li-scan-zeile .kn { height: 36px; }
.li-scan-finden { height: 36px; }
.li-scan-hinweis { grid-column: 1 / -1; margin: 0; color: var(--tinte-5); font-size: 12px; }
.ein.ungueltig { border-color: var(--alarm); box-shadow: inset 0 0 0 1px var(--alarm); }

/* ── Reiter und Suche ──────────────────────────────────────────────────────── */
.li-reiter-zeile { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 12px; border-bottom: 1px solid var(--linie); }
.li-reiter { display: flex; flex-wrap: wrap; gap: 2px; }
.li-tab { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border: 0; border-bottom: 2px solid transparent; background: none;
  color: var(--tinte-4); font: inherit; cursor: pointer; margin-bottom: -1px; }
.li-tab:hover { color: var(--tinte-1); }
.li-tab.aktiv { color: var(--tinte-1); font-weight: 600; border-bottom-color: var(--tinte-1); }
.li-tab-zahl { min-width: 18px; padding: 0 5px; border-radius: 3px; background: var(--flaeche-2); color: var(--tinte-4); font-size: 11px; font-weight: 600;
  text-align: center; font-variant-numeric: tabular-nums; }
.li-suche { width: 220px; height: 30px; margin-bottom: 4px; }

/* ── Zählliste ─────────────────────────────────────────────────────────────── */
.li-tabelle { container-type: inline-size; }
.li-tkopf, .li-z { display: grid; grid-template-columns: 10px 112px minmax(180px, 1fr) 56px 88px 64px 168px minmax(120px, .8fr) 124px; align-items: center; gap: 0 10px; }
.li-tkopf { min-height: 30px; padding: 0 6px; border-bottom: 1px solid var(--linie); color: var(--tinte-5); font-size: 12px; font-weight: 600; }
.li-positionen { border-top: 0; }
.li-z { min-height: 44px; padding: 4px 6px; border-bottom: 1px solid var(--linie-fein); }
.li-z:hover { background: var(--flaeche); }
.li-z.ungespeichert { background: var(--warn-grund); }
.li-z-punkt { width: 8px; height: 8px; border-radius: 50%; border: 1px solid var(--linie-stark); box-sizing: border-box; }
.lage-ok .li-z-punkt { background: var(--ok); border-color: var(--ok); }
.lage-mehr .li-z-punkt { background: var(--violett); border-color: var(--violett); }
.lage-fehl .li-z-punkt { background: var(--alarm); border-color: var(--alarm); }
.lage-gezaehlt .li-z-punkt { background: var(--tinte-4); border-color: var(--tinte-4); }
.li-z-nr { color: var(--tinte-3); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.li-z-art { display: grid; gap: 1px; min-width: 0; }
.li-z-name { display: flex; align-items: center; gap: 6px; min-width: 0; }
.li-z-name strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li-z-zaehler { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; color: var(--tinte-5); font-size: 12px; }
.li-z-zaehler em { font-style: italic; }
.li-abz { padding: 0 5px; border-radius: 3px; font-size: 11px; font-weight: 600; }
.li-abz.nach { background: var(--warn-grund); color: var(--warn); }
.li-abz.gebucht { background: var(--ok-grund); color: var(--ok); }
.li-abz.unerwartet { background: var(--violett-grund); color: var(--violett); }
.li-sn { flex: 0 0 auto; padding: 0 5px; border: 1px solid var(--linie); border-radius: 3px; background: var(--flaeche); color: var(--tinte-4); font: inherit;
  font-size: 11px; font-weight: 600; cursor: pointer; }
.li-sn.an { border-color: var(--tinte-4); color: var(--tinte-1); }
.li-sn:disabled { cursor: default; opacity: .7; }
.li-z-soll, .li-z-diff { font-variant-numeric: tabular-nums; }
.li-z-diff { font-weight: 600; color: var(--tinte-5); }
.li-z-diff.plus { color: var(--violett); }
.li-z-diff.minus { color: var(--alarm); }
.li-z-etikett { display: none; }
.li-z-ist { margin: 0; }
.li-z-ist .ein { width: 100%; height: 30px; text-align: right; font-variant-numeric: tabular-nums; box-sizing: border-box; }
.li-z-ist .ein[readonly] { background: var(--flaeche-2); }
.li-z-grund { width: 100%; min-width: 0; }
.li-z-kom { width: 100%; min-width: 0; height: 30px; box-sizing: border-box; }
.li-z-kom[readonly] { background: transparent; border-color: transparent; }
.li-z-akt { display: flex; gap: 2px; justify-content: flex-end; }
.li-z-akt .kn-symbol { height: 28px; }
.li-speichern.warn { color: var(--warn); border-color: var(--warn); background: var(--warn-grund); }
.li-tabelle.blind .li-z-soll, .li-tabelle.blind .li-z-diff { color: var(--tinte-6); }

/* Mittel: Kommentar unter den Grund, damit Name und Felder Platz behalten. */
@container (max-width: 1080px) {
  .li-tkopf, .li-z { grid-template-columns: 10px 96px minmax(160px, 1fr) 48px 80px 56px 150px 124px; }
  .li-tkopf > :nth-child(8) { display: none; }
  .li-z-kom { grid-column: 3 / -2; grid-row: 2; margin-top: 4px; }
  .li-z:not(.mitdiff):not(.mitkom):not(.ungespeichert) .li-z-kom { display: none; }
  .li-z-akt { grid-column: -2 / -1; grid-row: 1; }
}

/* Schmal (Handy, Hochformat Tablet): jede Position als Karte, große Felder (16 px: kleiner zoomt Safari hinein). */
@container (max-width: 760px) {
  .li-tkopf { display: none; }
  .li-z { grid-template-columns: 10px minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); grid-template-areas:
      "punkt art art art" "punkt nr nr nr" "punkt soll ist diff" "punkt grund grund grund" "punkt kom kom kom" "punkt akt akt akt";
    gap: 6px 10px; padding: 10px 8px; border-bottom: 1px solid var(--linie); }
  .li-z-punkt { grid-area: punkt; align-self: start; margin-top: 6px; }
  .li-z-art { grid-area: art; }
  .li-z-name strong { white-space: normal; }
  .li-z-nr { grid-area: nr; font-size: 12px; }
  .li-z-soll { grid-area: soll; justify-self: stretch; text-align: left; }
  .li-z-ist { grid-area: ist; }
  .li-z-diff { grid-area: diff; justify-self: stretch; text-align: left; }
  .li-z-etikett { display: block; color: var(--tinte-5); font-size: 11px; font-weight: 600; }
  .li-z-ist .ein { height: 40px; font-size: 16px; }
  .li-z-soll, .li-z-diff { font-size: 16px; }
  .li-z-grund { grid-area: grund; height: 36px; font-size: 16px; }
  .li-z-kom { grid-column: auto; grid-row: auto; grid-area: kom; margin-top: 0; height: 36px; font-size: 16px; }
  .li-z:not(.mitdiff) .li-z-grund { display: none; }
  .li-z-grund-leer { display: none; }
  .li-z:not(.mitdiff):not(.mitkom):not(.ungespeichert) .li-z-kom { display: none; }
  .li-z-akt { grid-column: auto; grid-row: auto; grid-area: akt; justify-content: flex-start; flex-wrap: wrap; }
  .li-z-akt .kn-symbol { width: 40px; height: 36px; }
}

@media (max-width: 760px) {
  .li { padding: 10px 12px 24px; }
  .li-stand { grid-template-columns: 1fr; }
  .li-scan { grid-template-columns: 1fr; top: -10px; margin: 0 -12px 10px; padding: 8px 12px; }
  .li-scan .ein { height: 40px; font-size: 16px; }
  .li-scan-zeile .kn { height: 40px; }
  .li-scan-finden { justify-self: start; }
  .li-scan-hinweis { display: none; }
  .li-suche { width: 100%; }
  .li-aktionen { width: 100%; }
  .li-aktionen .kn:not(.kn-symbol) { flex: 1 1 auto; justify-content: center; }
}

@media (max-width: 560px) {
  .li-zeile { grid-template-columns: minmax(0, 1fr) auto; }
  .li-zeile .li-fortschritt { grid-column: 1 / -1; text-align: left; font-weight: 400; color: var(--tinte-5); }
}

/* Dialoge: Seriennummern und Verlauf. */
.li-sn-zahl { margin: 8px 0 4px; color: var(--tinte-4); font-size: 12px; font-weight: 600; }
.li-sn-liste { list-style: none; margin: 0; padding: 0; max-height: 40vh; overflow-y: auto; border: 1px solid var(--linie-fein); border-radius: 3px; }
.li-sn-liste li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 4px 2px 8px; border-bottom: 1px solid var(--linie-fein);
  font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.li-verlauf { display: grid; gap: 6px; margin: 0; }
.li-verlauf > div { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 8px; }
.li-verlauf dt { color: var(--tinte-5); }
.li-verlauf dd { margin: 0; overflow-wrap: anywhere; }
.li-finden-liste { display: grid; gap: 6px; margin-top: 8px; max-height: 50vh; overflow-y: auto; }
