/* JTL-WMS-Mobile-Look, in Blau statt Türkis. Referenz: echte JTL-WMS-Mobile-App. */
:root {
  --primary: #0b6ea8;            /* Header + Akzent (Blau statt JTL-Türkis) */
  --primary-dark: #095a89;
  --primary-disabled: #b9d9ec;   /* heller Pastell-Blau (OK-Button disabled) */
  --text-main: #212121;
  --text-muted: #9e9e9e;
  --placeholder: #bdbdbd;
  --border: #e0e0e0;
  --border-active: #0b6ea8;
  --divider: #eeeeee;
  --bg: #ffffff;
  --ok: #1f9d55;
  --err: #d13438;
  --warn: #d98b00;
  --radius: 5px;
  --header-h: 56px;
  --input-h: 46px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text-main);
  font-family: "Roboto", -apple-system, "Segoe UI", "Noto Sans", Arial, sans-serif; font-size: 16px; }
.hidden { display: none !important; }

/* ---------- App-Bar ---------- */
.appbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center;
  background: var(--primary); color: #fff; height: var(--header-h); padding: 0 8px; }
.burger { background: none; border: 0; color: #fff; font-size: 22px; width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center; cursor: pointer; }
.appbar .title { flex: 1; text-align: center; font-size: 20px; font-weight: 700; }
.appbar .user { min-width: 44px; font-size: 12px; text-align: right; padding-right: 8px; opacity: .9; }

/* ---------- Drawer ---------- */
.drawer { position: fixed; top: 0; left: 0; width: 82%; max-width: 320px; height: 100%;
  background: #fff; z-index: 40; transform: translateX(0); transition: transform .2s;
  box-shadow: 2px 0 12px rgba(0,0,0,.25); overflow-y: auto; }
.drawer.hidden { transform: translateX(-100%); display: block !important; }
.drawer-head { background: var(--primary); color: #fff; padding: 14px 16px; min-height: 90px;
  display: flex; flex-direction: column; justify-content: center; }
.drawer-head .logo { display: flex; align-items: center; gap: 10px; }
.drawer-head .logo .mark { background: #fff; color: var(--primary); font-weight: 800; font-size: 15px;
  padding: 4px 7px; border-radius: 4px; letter-spacing: .5px; }
.drawer-head .logo .wms { font-size: 20px; font-weight: 800; line-height: 1; }
.drawer-head .logo .wms small { display: block; font-size: 11px; font-weight: 500; opacity: .9; }
.drawer-head .sub { font-size: 13px; opacity: .9; margin-top: 8px; }
.drawer .grouphead { color: var(--text-muted); font-size: 12.5px; padding: 14px 16px 4px; text-transform: none; }
.drawer a { display: flex; align-items: center; gap: 14px; padding: 15px 16px; color: var(--text-main);
  text-decoration: none; font-size: 16px; cursor: pointer; }
.drawer a .ic { width: 24px; height: 22px; display: inline-flex; align-items: center; justify-content: center; color: #616161; }
.drawer a .ic svg { display: block; }
.drawer a.active { color: var(--primary); }
.drawer a.active .ic { color: var(--primary); }
.drawer hr { border: 0; border-top: 1px solid var(--divider); margin: 6px 0; }
.backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 30; }

/* ---------- Layout / Body ---------- */
main { padding: 16px 20px; max-width: 680px; margin: 0 auto; }
.acclabel { color: var(--primary); font-size: 16px; margin: 4px 0 14px; font-weight: 500; }
label { display: block; font-size: 14px; color: var(--text-main); margin: 14px 0 4px; }

/* ---------- Inputs (JTL-Stil) ---------- */
input, select { width: 100%; height: var(--input-h); font-size: 16px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: var(--radius); background: #fff; color: var(--text-main); }
input::placeholder { color: var(--placeholder); }
input:focus, select:focus { outline: none; border-color: var(--border-active); border-width: 1.5px; }

/* Scan-Zeile mit OK-Button rechts (wie JTL) */
.scanrow { display: flex; gap: 10px; align-items: stretch; }
.scanrow input, .scanrow select { flex: 1; }
.okbtn { width: 88px; flex: 0 0 88px; border: 0; border-radius: var(--radius); background: var(--primary);
  color: #fff; font-size: 16px; font-weight: 600; cursor: pointer; }
.okbtn:disabled { background: var(--primary-disabled); color: #f0f8fc; cursor: default; }
.okbtn:active:not(:disabled) { background: var(--primary-dark); }

/* Filter-Boxen (Artikel / Beginnt mit) */
.filterrow { display: flex; gap: 10px; margin-bottom: 10px; }
.filterrow .fbox { border: 1px solid var(--border); border-radius: var(--radius); height: var(--input-h);
  display: flex; align-items: center; padding: 0 12px; font-size: 16px; background: #fff; }

/* ---------- Menge-Stepper (− Zahl + ⊞) ---------- */
.stepper { display: flex; align-items: stretch; border: 1px solid var(--border); border-radius: var(--radius);
  height: var(--input-h); overflow: hidden; }
.stepper button { background: #fff; border: 0; width: 52px; font-size: 24px; color: #616161; cursor: pointer; }
.stepper .val { flex: 1; text-align: center; font-size: 18px; display: flex; align-items: center; justify-content: center;
  border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
.stepper .grid { width: 48px; border-left: 1px solid var(--border); color: var(--text-muted); font-size: 16px; }

/* ---------- Toggle-Buttons (Schloss auf/zu) ---------- */
.toggle2 { display: flex; gap: 8px; }
.toggle2 .tg { width: 46px; height: 46px; border: 1.5px solid var(--border); border-radius: var(--radius);
  background: #fff; display: flex; align-items: center; justify-content: center; font-size: 20px; color: var(--placeholder); cursor: pointer; }
.toggle2 .tg.on { border-color: var(--primary); color: var(--primary); }

/* ---------- Verfügbare-Plätze / Listen ---------- */
.avail { margin-top: 18px; }
.avail .h { color: var(--primary); font-size: 16px; margin-bottom: 6px; }
.availrow { padding: 10px 0; border-bottom: 1px solid var(--divider); }
.availrow .n { font-size: 17px; }
.availrow .s { font-size: 13px; color: var(--text-muted); }

/* ---------- Banner ---------- */
.banner { padding: 12px 14px; border-radius: var(--radius); margin: 14px 0; font-size: 15px; }
.banner.ok { background: #e5f6ec; color: #12673a; border: 1px solid #b6e3c8; }
.banner.err { background: #fdeaea; color: #a1272b; border: 1px solid #f2bcbd; }
.banner.warn { background: #fff4e0; color: #8a5a00; border: 1px solid #f3d59a; }
.banner.info { background: #e9f2f9; color: #0b5178; border: 1px solid #c3dcee; }

/* ---------- Auftrags-/Ergebnis-Karte ---------- */
.auftrag { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; margin: 14px 0; }
.auftrag .nr { font-size: 22px; font-weight: 800; }
.auftrag .kunde { font-size: 18px; font-weight: 600; margin-top: 2px; }
.auftrag .muted { color: #757575; }
.auftrag .va { display: inline-block; margin-top: 8px; padding: 3px 10px; border-radius: 16px; font-size: 13px; font-weight: 600; }
.va { display: inline-flex; align-items: center; gap: 6px; }
.va::before { content: ""; width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.va.ok { background: #e5f6ec; color: #12673a; }
.va.ok::before { background: #1f9d55; }
.va.bad { background: #fdeaea; color: #a1272b; }
.va.bad::before { background: #d13438; }
.poslist { margin-top: 10px; font-size: 14px; }
.poslist .p { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 5px 0; border-bottom: 1px solid var(--divider); }
.poslist .p b { flex: 0 0 auto; }

/* Große Box-Anzeige beim Abholen */
.bigbox { text-align: center; margin: 14px 0; }
.bigbox .lbl { color: var(--primary); font-size: 16px; }
.bigbox .n { font-size: 52px; font-weight: 800; color: var(--text-main); margin-top: 4px; }

/* Buttons (Aktionen) */
button.btn { width: 100%; height: 52px; font-size: 17px; font-weight: 600; border: 0; border-radius: var(--radius);
  background: var(--primary); color: #fff; cursor: pointer; margin-top: 12px; }
button.btn:active { background: var(--primary-dark); }
button.btn.ok { background: var(--ok); }
button.btn.danger { background: var(--err); }
button.btn.ghost { background: #fff; color: var(--primary); border: 1.5px solid var(--primary); }
button.btn.sm { height: 42px; font-size: 15px; }

/* Box-Grid (Verwaltung) */
.boxgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 8px; margin-top: 12px; }
.boxcell { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 4px; text-align: center; }
.boxcell .bn { font-size: 20px; font-weight: 800; }
.boxcell .bs { font-size: 11px; margin-top: 3px; color: var(--text-muted); }
.boxcell.belegt { border-color: #f2bcbd; background: #fdf5f5; }
.boxcell.belegt .bs { color: var(--err); }
.boxcell.frei { border-color: #b6e3c8; background: #f5fbf7; }

/* Listen (Übersicht) */
.list .row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--divider); }
.list .row .a { font-weight: 600; }
.list .row .k { font-size: 14px; color: var(--text-muted); }
.pill { background: var(--primary); color: #fff; padding: 4px 12px; border-radius: 16px; font-weight: 700; font-size: 15px; }
.muted { color: var(--text-muted); font-size: 14px; }
.center { text-align: center; }
.spacer { height: 8px; }
