/* MX Lager — App-Leiste + Reiter (Umbau E1, 0.336.0)
   Rein Praesentation. Ohne JS bleiben alle Reiter als flache Liste sichtbar (Fallback). */

.mx-lager-app { }

/* Standard (0.351.0): interaktive Umschalter (App-Leiste + Buchen-Dialog-Reiter) sind <button>-Elemente.
   Kadence faerbt button:focus/:active hell und der Zustand bleibt bis zum naechsten Klick haengen.
   Darum die Theme-Zustaende zentral EINMAL neutralisieren — von beiden Komponenten wiederverwendet. */
.mx-lager-nav__btn, .mx-mb-tab,
.mx-lager-nav__btn:hover, .mx-lager-nav__btn:focus, .mx-lager-nav__btn:active,
.mx-mb-tab:hover, .mx-mb-tab:focus, .mx-mb-tab:active {
  background: transparent !important;
  box-shadow: none !important;
  text-shadow: none !important;
}
.mx-lager-nav__btn:focus-visible, .mx-mb-tab:focus-visible { outline: 2px solid #ec6608; outline-offset: -2px; }

/* D1 (0.345.0): Aktion-Umschalter im Buchen-Dialog (Wareneingang/Verbrauch/Umlagern/Korrektur). */
.mx-mb-tabs { display:flex; gap:6px; background:#0f1418; border:1px solid rgba(255,255,255,.12); border-radius:10px; padding:4px; margin:0 0 14px; flex-wrap:wrap; }
.mx-mb-tab { flex:1; min-width:92px; text-align:center; padding:8px 6px; border:0; border-radius:8px; font-weight:700; font-size:.82rem; color:#9aa7b0; cursor:pointer; }
.mx-mb-tab:hover { color:#cfd8dd; }
/* Aktiver Reiter (Standard-Neutralisierung oben zentral). */
.mx-mb-tab.is-active, .mx-mb-tab.is-active:hover, .mx-mb-tab.is-active:focus, .mx-mb-tab.is-active:active { background:#ec6608 !important; color:#111 !important; }
.mx-mb-seg[hidden] { display:none; }

/* Reiter-Modus erst aktiv, wenn JS die Klasse setzt (No-JS-Fallback: alles sichtbar). */
.mx-lager-app.mxl-js .mx-lager-panel { display: none; }
.mx-lager-app.mxl-js .mx-lager-panel.is-active { display: block; }

/* Abschnitts-Ueberschrift innerhalb eines Reiters (z. B. "Katalog" im Anlegen-Reiter). */
.mx-lager-secttl {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  opacity: 0.72;
  margin: 20px 0 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

/* Schnellaktionen oben (Wareneingang / Verbrauch). */
.mx-lager-quick {
  display: flex;
  gap: 8px;
  margin: 8px 0 6px;
}
.mx-lager-quick__b {
  flex: 1;
  text-align: center;
  font-weight: 700;
}

/* Untere App-Leiste. */
.mx-lager-nav {
  position: sticky;
  bottom: 0;
  z-index: 40;
  display: flex;
  gap: 2px;
  background: #14181c;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  margin-top: 16px;
}
.mx-lager-nav[hidden] { display: none; }
.mx-lager-nav__btn {
  flex: 1;
  border: 0;
  background: transparent;
  color: #9aa7b0;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 9px 4px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  min-height: 52px;
  border-radius: 0;
}
.mx-lager-nav__btn:hover { color: #cfd8dd; }
/* Aktiver Reiter: dezent (leichte orange Toenung + Leiste oben), nicht grell. */
.mx-lager-nav__btn.is-active {
  color: #ec6608;
  background: rgba(236, 102, 8, 0.12) !important;
  box-shadow: inset 0 3px 0 #ec6608 !important;
}
.mx-lager-nav__ic { font-size: 1.2rem; line-height: 1; }

/* Portalierte App-Leiste (Mobil, ans <body> gehaengt): fest am unteren Viewport-Rand. */
.mx-lager-nav.mxl-nav--fixed {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
}

/* Mobil: Leiste fest am unteren Rand, Platz darunter freihalten. */
@media (max-width: 600px) {
  .mx-lager-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
  }
  .mx-lager-app.mxl-js { padding-bottom: 66px; }
}

/* ===== E2: Bestand als Karten statt Tabelle ===== */
.mx-lc-sortbar { margin: 6px 0 10px; }
.mx-field--inline { display: inline-flex; align-items: center; gap: 8px; }
.mx-field--inline > span { font-size: 0.8rem; font-weight: 700; color: #9aa7b0; }

/* Kategorie-Gruppe */
.mx-ueb-katgrp { margin: 0 0 12px; }
.mx-ueb-katgrp__sum {
  cursor: pointer;
  list-style: none;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: #cfd8dd;
  padding: 8px 2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.mx-ueb-katgrp__sum::-webkit-details-marker { display: none; }
.mx-ueb-katgrp__sum::before { content: "▾ "; color: #ec6608; }
.mx-ueb-katgrp:not([open]) .mx-ueb-katgrp__sum::before { content: "▸ "; }
.mx-ueb-kat-n { color: #8a97a0; font-weight: 700; }
.mx-ueb-katgrp__body { padding-top: 8px; }

/* ===== Artikel-Karte (0.349.0 modern) ===== */
.mx-lc { margin: 0 0 12px; }
.mx-lc__d {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  background: linear-gradient(180deg, #171c22, #12171b);
  overflow: hidden;
  box-shadow: 0 8px 24px -18px #000;
}
/* Dünner Farb-Akzent oben: orange normal, rot bei kritisch/leer. */
.mx-lc__d::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, #ec6608, rgba(236, 102, 8, 0.15));
}
.mx-lc[data-status="kritisch"] .mx-lc__d::before,
.mx-lc[data-status="leer"] .mx-lc__d::before {
  background: linear-gradient(90deg, #e0533d, rgba(224, 83, 61, 0.15));
}
.mx-lc__d[open] { border-color: rgba(236, 102, 8, 0.45); }
.mx-lc__sum { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 12px; padding: 15px 16px; }
.mx-lc__sum::-webkit-details-marker { display: none; }
.mx-lc__main { flex: 1; min-width: 0; }
.mx-lc__name { display: block; font-size: 1.06rem; font-weight: 800; letter-spacing: 0.2px; line-height: 1.15; }
.mx-lc__meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
/* Menge: Zahl gross + kleines Einheiten-Label daneben (statt "1 / liter"). */
.mx-lc__qty { flex: 0 0 auto; display: inline-flex; align-items: baseline; gap: 6px; }
.mx-lc__qn { font-size: 1.5rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.mx-lc__qu { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: #8d9aa4; }
/* Status als Pill mit Punkt. */
.mx-lc__status { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; font-size: 0.66rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; padding: 5px 10px; border-radius: 999px; border: 1px solid; white-space: nowrap; }
.mx-lc__dot { width: 7px; height: 7px; border-radius: 50%; }
.mx-lc__status--ok { color: #bfe6c6; border-color: rgba(95, 174, 107, 0.5); background: rgba(95, 174, 107, 0.12); }
.mx-lc__status--ok .mx-lc__dot { background: #5fae6b; }
.mx-lc__status--kritisch { color: #ffb9ac; border-color: rgba(224, 83, 61, 0.5); background: rgba(224, 83, 61, 0.12); }
.mx-lc__status--kritisch .mx-lc__dot { background: #e0533d; }
.mx-lc__status--leer { color: #ffd9a8; border-color: rgba(242, 163, 60, 0.5); background: rgba(242, 163, 60, 0.12); }
.mx-lc__status--leer .mx-lc__dot { background: #f2a33c; }
.mx-lc__body { padding: 2px 16px 16px; border-top: 1px solid rgba(255, 255, 255, 0.10); }
.mx-lc__sec { margin: 12px 0; }
.mx-lc__lbl { display: block; font-size: 0.66rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; color: #6b7681; margin-bottom: 8px; }
/* Bestand je Lager als ruhige Panel-Zeile. */
.mx-lc__loc { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: #191f25; border: 1px solid rgba(255, 255, 255, 0.10); flex-wrap: wrap; }
.mx-lc__loc + .mx-lc__loc { margin-top: 8px; }
.mx-lc__locn { font-weight: 700; }
.mx-lc__locr { display: inline-flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.mx-lc__locb { min-width: 48px; text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.mx-lc__locr form { margin: 0; }
/* C1: Inline-Mindestbestand je Lagerort-Zeile. */
.mx-lc__minf { display: inline-flex; align-items: center; gap: 5px; }
.mx-lc__minlbl { font-size: 0.66rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.4px; color: #6b7681; }
.mx-lc__minf .mx-preis-inp { width: 56px; text-align: center; }
/* C2: Fahrzeug-Zuordnung als aufklappbares Formular in der Karte. */
.mx-lc__fzform { margin: 10px 0 0; }

/* Kennzahlen-Raster. */
.mx-lc__stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(146px, 1fr)); gap: 10px; margin: 12px 0 2px; }
.mx-lc__stat { background: #191f25; border: 1px solid rgba(255, 255, 255, 0.10); border-radius: 12px; padding: 11px 13px; }
.mx-lc__stat--accent { background: linear-gradient(180deg, rgba(236, 102, 8, 0.10), rgba(236, 102, 8, 0.02)); border-color: rgba(236, 102, 8, 0.30); }
.mx-lc__statk { display: block; font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.5px; color: #6b7681; font-weight: 800; }
.mx-lc__statv { display: block; font-weight: 800; font-size: 1.05rem; margin-top: 5px; letter-spacing: 0.2px; font-variant-numeric: tabular-nums; }
.mx-lc__statv small { font-weight: 600; color: #8d9aa4; font-size: 0.78rem; }
.mx-lc__statv .mx-preis-edit { display: inline-flex; align-items: center; gap: 6px; }
.mx-lc__statv .mx-preis-inp { width: 72px; text-align: left; }
/* Info-Chips als Pills. */
.mx-lc__chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 14px 0 2px; }
.mx-lc__chip { font-size: 0.72rem; border: 1px solid rgba(255, 255, 255, 0.10); border-radius: 999px; padding: 5px 11px; color: #8d9aa4; display: inline-flex; align-items: center; gap: 6px; background: rgba(255, 255, 255, 0.02); }
.mx-lc__chip b { color: #fff; font-weight: 700; }
/* Aktionsleiste. */
.mx-lc__actbar { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, 0.10); }
.mx-lc__actbar .mx-btn { border-radius: 11px; }
.mx-lc__actgrow { flex: 1; min-width: 160px; justify-content: center; }
.mx-lc-more { display: block; width: 100%; margin: 4px 0 10px; }

/* Handlungsbedarf oben */
.mx-handlungsbedarf .mx-hb-row {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  padding: 9px 10px; margin: 6px 0;
  border-left: 4px solid #f2a33c; border-radius: 8px;
  background: rgba(242, 163, 60, 0.08);
}
.mx-handlungsbedarf .mx-hb-row .mx-ueb-book { margin-left: auto; }
