/* lager – Stile des Pakets H (seit 0.8): Seriennummern, Chargen, Wareneingang mit EK, VK-Automatik, IDS-Ergebnis,
   Zählen nach Seriennummer und Charge. Die Grundstile des Lagers stehen in app.css (lg-…). Nur Variablen aus app.css. */

/* ---------- Seriennummern erfassen (snFeld) ---------- */
.lg-sn { display: grid; gap: 8px; min-width: 0; }
.lg-sn-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.lg-sn-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; max-width: 100%; padding: 4px 8px 4px 12px; border: 1px solid var(--copper); border-radius: 18px;
  background: var(--copper-tint); color: var(--copper-dark); font: 500 13.5px var(--sans); cursor: pointer; }
.lg-sn-chip .mono { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-sn-chip .ico { flex: none; opacity: .75; }
.lg-sn-chip:hover .ico, .lg-sn-chip:focus-visible .ico { opacity: 1; }
.lg-sn-eingabe { display: flex; gap: 8px; align-items: center; }
.lg-sn-eingabe input { flex: 1; min-width: 0; min-height: 42px; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); color: var(--ink); font: 500 15px var(--mono); text-transform: uppercase; }
.lg-sn-eingabe input::placeholder { text-transform: none; font-family: var(--sans); }
.lg-sn-eingabe .btn { flex: none; }
.lg-sn-vorschlag { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.lg-sn-nimm { font-family: var(--mono); }
.lg-sn-titel { overflow-wrap: anywhere; }

/* ---------- Charge und MHD (chargeFeld) ---------- */
.lg-charge { display: grid; gap: 6px; min-width: 0; }
.lg-charge.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.lg-charge input[data-ch] { font-family: var(--mono); text-transform: uppercase; }
.lg-charge select { min-height: 44px; }

/* Zusatzzeile unter einer Position (Material-Dialog, Buchen, Wareneingang) */
.lg-zeile-extra { grid-column: 1 / -1; min-width: 0; padding-top: 8px; border-top: 1px dashed var(--line-2); }
.lg-zeile-extra > small.muted { display: block; margin-bottom: 6px; font-size: 12.5px; }
.form > .lg-zeile-extra { padding: 10px 12px; border: 1px dashed var(--line-2); border-radius: 10px; background: var(--surface-2); }

/* ---------- Wareneingang zur Bestellung ---------- */
.lg-we { flex-wrap: wrap; row-gap: 8px; padding: 10px 0; }
.lg-we > .grow { flex-basis: 220px; }
.lg-we > .lg-zeile-extra { flex-basis: 100%; }
.lg-we-ek { flex: none; width: 128px; gap: 2px; }
.lg-we-ek input { text-align: right; font: 500 15px var(--mono); }
.form > .lg-we-ek { width: auto; }
.form > .lg-we-ek input { max-width: 180px; }

/* ---------- Artikel, Bestellung, Seriennummer ---------- */
.lg-kopf-link { color: inherit; text-decoration: none; border-bottom: 1px solid var(--line-2); }
.lg-kopf-link:hover, .lg-kopf-link:focus-visible { color: var(--copper-dark); border-bottom-color: var(--copper); }
.detail-head .m .lg-kopf-link { display: inline-flex; align-items: center; gap: 4px; }
.lg-ids-ergebnis { border-left: 3px solid var(--info); }
.lg-anlage-liste li { gap: 10px; }
.lg-anlage-liste .end .btn { white-space: nowrap; }

/* ---------- Artikel-Dialog: VK-Automatik, Seriennummer/Charge ---------- */
.lg-vk-auto, .lg-pflicht { display: grid; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); }
.lg-vk-auto .field { max-width: 320px; }
.lg-vk-auto [data-vk-info] { display: block; margin-top: 2px; }

/* ---------- VK neu berechnen ---------- */
.lg-vk-liste { display: grid; gap: 8px; min-width: 0; }
.lg-vk-liste .zt-wrap { max-height: min(46vh, 420px); overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.lg-vk-tabelle th:first-child, .lg-vk-tabelle td:first-child { width: 36px; text-align: center; }
.lg-vk-tabelle input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--copper); }
.lg-vk-tabelle td small { font-size: 12px; }
.lg-vk-tabelle th, .lg-vk-tabelle td { padding: 8px 8px; }
.lg-vk-tabelle th { letter-spacing: .04em; }
.lg-vk-tabelle td.r { white-space: nowrap; font: 500 13px var(--mono); }
.lg-vk-tabelle td:nth-child(2) { min-width: 120px; }

/* ---------- Inventur nach Seriennummer und Charge ---------- */
.lg-zaehl-knopf { min-width: 108px; min-height: 52px; justify-content: center; font: 600 18px var(--mono); }
.lg-ch-zaehl li { gap: 12px; }
.lg-ch-zaehl .t { font-family: var(--mono); }

/* ---------- Handy ---------- */
@media (max-width: 560px) {
  .lg-charge.two { grid-template-columns: minmax(0, 1fr); }
  .lg-sn-eingabe { flex-wrap: wrap; }
  .lg-sn-eingabe input { flex-basis: 100%; }
  .lg-sn-eingabe .btn { flex: 1; justify-content: center; }
  .lg-we-ek { width: 100%; }
  .lg-we-ek input { max-width: none; }
  .lg-zaehl-knopf { min-width: 88px; }
  .lg-anlage-liste li { flex-wrap: wrap; }
  .lg-anlage-liste .end { width: 100%; }
  .lg-anlage-liste .end .btn { width: 100%; justify-content: center; }
}

/* ---------- Dunkel ---------- */
:root[data-theme="dark"] .lg-sn-chip, :root[data-theme="dark"] .lg-kopf-link:hover { color: var(--copper-light); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .lg-sn-chip, :root:not([data-theme="light"]) .lg-kopf-link:hover { color: var(--copper-light); }
}
