/* FBA Pick & Pack — authentischer JTL-WMS-Mobile-Look, in Blau.
   Referenz: echte JTL-WMS-Mobile-App + eneiro Abhol-App (projects/abholung-app).
   Weiß + Blau #0b6ea8, Roboto, JTL-Stil Inputs/Scanrow/Stepper. */
:root {
  --primary: #0b6ea8;           /* Header + Akzent (Blau, wie WMS-Mobile-Nachbau) */
  --primary-dark: #095a89;
  --primary-disabled: #b9d9ec;
  --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;
  min-height: 100vh; display: flex; flex-direction: column; }
.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; }
.appbar .burger { background: none; border: 0; color: #fff; 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;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.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(-100%); transition: transform .2s;
  box-shadow: 2px 0 12px rgba(0,0,0,.25); overflow-y: auto; }
.drawer.open { transform: translateX(0); }
.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; }
.navitem { display: flex; align-items: center; gap: 14px; padding: 15px 16px; color: var(--text-main);
  text-decoration: none; font-size: 16px; cursor: pointer; }
.navitem .ic { width: 24px; height: 22px; display: inline-flex; align-items: center; justify-content: center; color: #616161; }
.navitem.active { color: var(--primary); }
.navitem.active .ic { color: var(--primary); }
.drawer hr { border: 0; border-top: 1px solid var(--divider); margin: 6px 0; }
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.4); opacity: 0; pointer-events: none;
  transition: opacity .2s; z-index: 30; }
.scrim.show { opacity: 1; pointer-events: auto; }

/* ---------- Layout / Body ---------- */
.view { flex: 1; padding: 16px 20px; max-width: 720px; width: 100%; margin: 0 auto; }
.h1 { font-size: 18px; font-weight: 700; margin: 4px 0 14px; }
.acclabel { color: var(--primary); font-size: 16px; margin: 4px 0 14px; font-weight: 500; }
.muted { color: var(--text-muted); font-size: 14px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 600; }
.sub { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.center { text-align: center; }
.spacer { height: 8px; }
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; }

/* ---------- Cards / Listen ---------- */
.card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px; margin-bottom: 12px; }
.row { display: flex; align-items: center; gap: 12px; }
.listitem { background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px; margin-bottom: 10px; display: flex; align-items: center; gap: 12px; cursor: pointer; }
.listitem:active { background: #f3f9fd; }
.listitem .grow { flex: 1; min-width: 0; }

/* Pills / Badges */
.pill { background: #e9f2f9; color: var(--primary); border-radius: 16px; padding: 4px 12px;
  font-weight: 700; font-size: 14px; white-space: nowrap; }
.pill.ok { background: #e5f6ec; color: #12673a; }
.pill.warn { background: #fff4e0; color: #8a5a00; }
.pill.err { background: #fdeaea; color: #a1272b; }
.progress { height: 8px; background: #e9eef2; border-radius: 6px; overflow: hidden; margin-top: 8px; }
.progress > i { display: block; height: 100%; background: var(--primary); }

/* ---------- 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; }

/* ---------- Buttons ---------- */
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;
  display: flex; align-items: center; justify-content: center; gap: 8px; }
button.btn:active { background: var(--primary-dark); }
button.btn.ok { background: var(--ok); }
button.btn.danger, button.btn.err { background: var(--err); }
button.btn.warn { background: var(--warn); }
button.btn.ghost, button.btn.secondary { background: #fff; color: var(--primary); border: 1.5px solid var(--primary); }
button.btn.sm, button.btn.small { height: 42px; font-size: 15px; width: auto; padding: 0 18px; }
button.btn:disabled { background: var(--primary-disabled); color: #f0f8fc; cursor: default; }
.btnrow { display: flex; gap: 10px; }
.btnrow .btn { flex: 1; }

/* ---------- Pick-Screen (großer Platz-/Soll-Block) ---------- */
.pickhead { text-align: center; }
.platzbadge { display: inline-block; background: var(--primary); color: #fff; border-radius: var(--radius);
  padding: 8px 18px; font-size: 24px; font-weight: 800; letter-spacing: .04em; margin-top: 4px; }
.bignum { font-size: 48px; font-weight: 800; line-height: 1; }
.qtybox { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
/* Menge-Stepper (− Zahl +) im JTL-Stil */
.stepper { display: flex; align-items: stretch; border: 1px solid var(--border); border-radius: var(--radius);
  height: 56px; overflow: hidden; }
.stepper button { background: #fff; border: 0; width: 60px; font-size: 28px; color: var(--primary); cursor: pointer; }
.stepper button:active { background: #eef6fb; }
.stepper .val { flex: 1; text-align: center; font-size: 26px; font-weight: 800; display: flex;
  align-items: center; justify-content: center; border-left: 1px solid var(--border); border-right: 1px solid var(--border); }

/* Kartontyp-Gruppen (Pick) */
.grprow { display: flex; align-items: center; gap: 6px; margin: 8px 0; flex-wrap: wrap; }
.grprow input { height: 46px; font-size: 17px; text-align: center; }
.grprow .gUnits, .grprow .gBoxes { width: 78px; flex: 0 0 auto; font-weight: 700; }
.grprow .gPal { flex: 1; min-width: 120px; text-align: left; font-size: 15px; }
.grprow .gx { font-weight: 800; color: var(--text-muted); }
.grprow .geq { font-size: 15px; color: var(--text-muted); white-space: nowrap; }
.grprow .geq b { color: var(--text-main); font-size: 17px; }
.grprow .gDel { width: 40px; height: 40px; border: 0; border-radius: var(--radius); background: #fdeaea;
  color: var(--err); font-size: 18px; font-weight: 700; cursor: pointer; }

/* Führung / Platz-Strategie */
.fuehrung .step { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }

/* ---------- Statusbar unten ---------- */
.statusbar { min-height: 34px; background: #f5f7f9; color: #4a5b68; border-top: 1px solid var(--divider);
  display: flex; align-items: center; padding: 0 16px; font-size: 13px; position: sticky; bottom: 0; z-index: 15; }
.statusbar.err { background: var(--err); color: #fff; }
.statusbar.ok { background: var(--ok); color: #fff; }
.statusbar.warn { background: var(--warn); color: #fff; }

/* ---------- Export/Büro Tabelle ---------- */
.exptable { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 8px; }
.exptable th, .exptable td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--divider); }
.exptable th { color: var(--text-muted); font-weight: 600; font-size: 12.5px; }
.exptable td.num, .exptable th.num { text-align: right; }
.exprow.raus { opacity: .4; text-decoration: line-through; }
.chk { width: 20px; height: 20px; }

/* Tablet/Desktop ab 820px: zweispaltig für Pack */
@media (min-width: 820px) {
  .packgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
}

/* ---------- Native In-App-Dialog (MDE-tauglich) ---------- */
.modal-ov { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal { background: #fff; border-radius: 8px; width: 100%; max-width: 420px; overflow: hidden;
  box-shadow: 0 8px 30px rgba(0,0,0,.3); }
.modal-t { font-size: 18px; font-weight: 700; padding: 18px 18px 6px; color: var(--text-main); }
.modal-t.err { color: var(--err); }
.modal-b { padding: 4px 18px 16px; font-size: 15px; line-height: 1.5; color: var(--text-main); }
.modal-a { display: flex; gap: 10px; padding: 0 18px 18px; }
.modal-a .btn { margin-top: 0; }
