/* CCC Versand – Packplatz-Werkzeug. Schwarz/Stein als ruhiger Grund, CCC-Orange als Hinweis,
   Grün für «stimmt», Rot nur für Sperren und Fehlscans. NeoGeo für Labels und Zahlen, Baikal für Text. */
@font-face { font-family: "NeoGeo"; src: url("/fonts/NeoGeo-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "NeoGeo"; src: url("/fonts/NeoGeo-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Baikal"; src: url("/fonts/Baikal-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Baikal"; src: url("/fonts/Baikal-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --bg: #FFFFFF;
  --fg: #0F0F0F;
  --surface: #F4F2EF;
  --stone: #DED9D3;
  --muted: #5F5A54;
  --line: #D9D4CD;
  --accent: #FF8C27;
  --hot: #FE51C7;
  --ok: #13B047;
  --ok-bg: #E2F5E8;
  --warn-bg: #FFF1E3;
  --err: #C42B1C;
  --err-bg: #FCEBE9;
  --on-dark: #FFFFFF;
  --font-display: "NeoGeo", "Arial Black", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Baikal", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r: 6px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141312; --fg: #F3F0EC; --surface: #1E1C1A; --stone: #2C2926; --muted: #ABA49B; --line: #3A3632;
    --accent: #FF9A40; --hot: #FE6CD0; --ok: #2BC45E; --ok-bg: #13301D; --warn-bg: #36240F; --err: #FF6A5C; --err-bg: #3A1714; --on-dark: #141312;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #141312; --fg: #F3F0EC; --surface: #1E1C1A; --stone: #2C2926; --muted: #ABA49B; --line: #3A3632;
  --accent: #FF9A40; --hot: #FE6CD0; --ok: #2BC45E; --ok-bg: #13301D; --warn-bg: #36240F; --err: #FF6A5C; --err-bg: #3A1714; --on-dark: #141312;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--fg); font: 15px/1.45 var(--font-body); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }
.disp { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
[hidden] { display: none !important; }

/* ---------- Kopf ---------- */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--stone); border-bottom: 1px solid var(--line);
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.top-in { max-width: 1440px; margin: 0 auto; display: flex; align-items: center; gap: 18px; min-height: 56px; flex-wrap: wrap; padding-block: 6px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 26px; height: 34px; }
.brand b { font-family: var(--font-display); font-weight: 700; font-size: 19px; letter-spacing: 0.04em; }
.tabs { display: flex; gap: 2px; flex-wrap: wrap; }
.tab { border: 0; background: transparent; padding: 9px 12px; border-radius: var(--r); cursor: pointer; font-family: var(--font-display); font-weight: 500;
  font-size: 13px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--fg); }
.tab:hover { background: color-mix(in srgb, var(--fg) 8%, transparent); }
.tab[aria-current="page"] { background: var(--fg); color: var(--bg); }
.tab .cnt { margin-left: 6px; font-size: 12px; opacity: 0.8; }
.who { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 13px; }
.testflag { background: var(--hot); color: #0F0F0F; font-family: var(--font-display); font-weight: 700; font-size: 12px; letter-spacing: 0.06em;
  padding: 5px 9px; border-radius: 3px; text-transform: uppercase; cursor: pointer; border: 0; }

/* Platz für das Sidekick-Feld von Shopify unten in der Mitte (nur eingebettet im Admin) */
:root { --dock: 0px; }
:root.embedded { --dock: 84px; }
main { max-width: 1440px; margin: 0 auto; padding-block: 18px calc(80px + var(--dock)); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

/* ---------- Bausteine ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--fg);
  padding: 9px 14px; border-radius: var(--r); cursor: pointer; font-weight: 600; min-height: 40px; text-decoration: none; }
.btn:hover { border-color: var(--fg); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.primary { background: var(--fg); color: var(--bg); border-color: var(--fg); font-family: var(--font-display); font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }
.btn.primary:hover { background: color-mix(in srgb, var(--fg) 85%, var(--accent)); }
.btn.big { min-height: 58px; font-size: 18px; padding: 12px 22px; width: 100%; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.danger { color: var(--err); border-color: color-mix(in srgb, var(--err) 50%, var(--line)); }
.btn.small { min-height: 32px; padding: 5px 10px; font-size: 13px; }
.kbd { font-family: ui-monospace, Menlo, monospace; font-size: 11px; border: 1px solid currentColor; border-radius: 3px; padding: 0 4px; opacity: 0.75; }

.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 3px; font-size: 12px; font-weight: 600; line-height: 1.6;
  background: var(--surface); border: 1px solid var(--line); white-space: nowrap; }
.chip.svc { font-family: var(--font-display); letter-spacing: 0.05em; }
.chip.ok { background: var(--ok-bg); border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.chip.warn { background: var(--warn-bg); border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.chip.err { background: var(--err-bg); border-color: color-mix(in srgb, var(--err) 50%, transparent); color: var(--err); }
.chip.hot { background: color-mix(in srgb, var(--hot) 22%, var(--bg)); border-color: color-mix(in srgb, var(--hot) 60%, transparent); }
.bin { font-family: var(--font-display); font-weight: 700; font-size: 15px; letter-spacing: 0.03em; background: var(--fg); color: var(--bg);
  border-radius: 3px; padding: 3px 7px; white-space: nowrap; display: inline-block; min-width: 54px; text-align: center; }
.bin.none { background: transparent; color: var(--muted); border: 1px dashed var(--line); font-weight: 500; font-size: 12px; }

.panel { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); }
.panel > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.panel > header h3 { margin: 0; font-family: var(--font-display); font-size: 13px; letter-spacing: 0.07em; text-transform: uppercase; }
.panel .body { padding: 14px; }
h1, h2 { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; margin: 0; text-wrap: balance; }
h1 { font-size: 28px; }
h2 { font-size: 18px; letter-spacing: 0.04em; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.stack { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }

/* ---------- Scanfeld ---------- */
.scanbar { display: flex; gap: 10px; align-items: stretch; flex-wrap: wrap; }
.scan { flex: 1 1 280px; min-width: 0; display: flex; align-items: center; gap: 10px; border: 2px solid var(--fg); border-radius: var(--r); padding: 0 14px; background: var(--bg); min-height: 56px; }
.scan.flash-ok { border-color: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 25%, transparent); }
.scan.flash-err { border-color: var(--err); box-shadow: 0 0 0 4px color-mix(in srgb, var(--err) 25%, transparent); }
.scan label { font-family: var(--font-display); font-weight: 700; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.scan input { flex: 1; width: 0; border: 0; outline: 0; background: transparent; font-size: 20px; min-width: 0; padding: 10px 0; font-variant-numeric: tabular-nums; }
.lastscan { font-size: 14px; padding: 8px 12px; border-radius: var(--r); display: flex; align-items: center; gap: 8px; }
.lastscan.ok { background: var(--ok-bg); }
.lastscan.err { background: var(--err-bg); color: var(--err); font-weight: 600; }

/* ---------- Warteschlange ---------- */
.qhead { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.counts { display: flex; gap: 22px; flex-wrap: wrap; }
.count b { display: block; font-family: var(--font-display); font-size: 28px; line-height: 1; }
.count span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-family: var(--font-display); font-weight: 500; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; margin: 14px 0 10px; }
.filter { border: 1px solid var(--line); background: var(--bg); padding: 6px 11px; border-radius: 999px; cursor: pointer; font-size: 13px; font-weight: 600; }
.filter[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.qlist { display: grid; gap: 8px; }
.qrow { display: grid; grid-template-columns: 28px 132px minmax(0, 1.3fr) minmax(0, 1.7fr) minmax(0, 1fr) 112px; gap: 14px; align-items: center;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg); cursor: pointer; position: relative; }
.qrow:hover { border-color: var(--fg); }
.qrow.blocked { background: color-mix(in srgb, var(--err-bg) 55%, var(--bg)); }
.qrow.blocked::before, .qrow.warned::before { content: ""; position: absolute; left: -1px; top: -1px; bottom: -1px; width: 5px; border-radius: var(--r) 0 0 var(--r); background: var(--err); }
.qrow.warned::before, .qrow.warn::before { background: var(--accent); }
.qrow.warn::before { content: ""; position: absolute; left: -1px; top: -1px; bottom: -1px; width: 5px; border-radius: var(--r) 0 0 var(--r); }
.qrow .cust { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.age.old { color: #A75400; font-weight: 600; }
.age.vold { color: var(--err); font-weight: 600; }
.chip.quiet { color: var(--muted); font-weight: 500; }
.bin.sm { font-size: 11px; padding: 0 5px; min-width: 0; line-height: 1.6; }

/* Kennzahlen als Filter */
.kpis { display: flex; gap: 8px; flex-wrap: wrap; }
.kpi { border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: var(--r); padding: 8px 14px 9px; min-width: 92px; text-align: left; cursor: pointer; font: inherit; }
.kpi:hover { border-color: var(--fg); }
.kpi b { display: block; font-family: var(--font-display); font-weight: 700; font-size: 26px; line-height: 1.05; }
.kpi span { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-display); font-weight: 500; font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.kpi[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.kpi[aria-pressed="true"] span { color: inherit; opacity: 0.85; }
.kpi.static { cursor: default; }
.kpi.static:hover { border-color: var(--line); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.ok > span > .dot, .dot.ok, .qsec.ok .dot { background: var(--ok); }
.warn > span > .dot, .dot.warn, .qsec.warn .dot { background: var(--accent); }
.err > span > .dot, .dot.err, .qsec.blocked .dot { background: var(--err); }
.hot > span > .dot { background: var(--hot); }
.qinfo { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; font-size: 13px; color: var(--muted); margin: 10px 0 2px; }
.linkbtn { border: 0; background: none; padding: 0; color: var(--fg); font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.qgroup { margin-top: 18px; }
.qsec { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-family: var(--font-display); font-weight: 700; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; }
.qsec .n { color: var(--muted); font-weight: 500; }

/* Abholungen */
.pcard { position: relative; display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg); }
.pcard.blocked { background: color-mix(in srgb, var(--err-bg) 55%, var(--bg)); }
.pc-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.pc-head .oname { font-family: var(--font-display); font-weight: 700; font-size: 16px; }
.pc-head .age { font-size: 12px; color: var(--muted); }
.cust.big { font-family: var(--font-display); font-weight: 700; font-size: 20px; margin-top: 6px; }
.pcard .items { font-size: 13px; display: grid; gap: 3px; margin-top: 8px; min-width: 0; }
.pcard .items div { display: flex; gap: 6px; align-items: baseline; min-width: 0; }
.pcard .items span.t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-side { display: grid; gap: 10px; align-content: space-between; justify-items: end; }
.pc-side .flags { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
@media (max-width: 760px) { .pcard { grid-template-columns: minmax(0, 1fr); } .pc-side { justify-items: start; } .pc-side .flags { justify-content: flex-start; } }
.qrow .oname { font-family: var(--font-display); font-weight: 700; font-size: 16px; }
.qrow .age { font-size: 12px; color: var(--muted); }
.qrow .items { font-size: 13px; display: grid; gap: 3px; min-width: 0; }
.qrow .items div { display: flex; gap: 6px; align-items: baseline; min-width: 0; }
.qrow .items span.t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qrow .flags { display: flex; flex-wrap: wrap; gap: 4px; }
.qrow .go { justify-self: end; }
.qsel { width: 20px; height: 20px; accent-color: var(--fg); }
.bulkbar { position: sticky; bottom: var(--dock); margin-top: 14px; background: var(--fg); color: var(--bg); padding: 12px 16px; border-radius: var(--r); display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.bulkbar .btn { background: var(--bg); color: var(--fg); }
.bulkbar .btn.ghost { background: transparent; color: var(--bg); border-color: color-mix(in srgb, var(--bg) 45%, transparent); }
@media (max-width: 1050px) {
  .qrow { grid-template-columns: 24px minmax(0, 1fr) minmax(0, 1fr); }
  .qrow .items, .qrow .flags { grid-column: 2 / -1; }
  .qrow .go { display: none; }
}

/* ---------- Packansicht ---------- */
.pack { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(320px, 1fr); gap: 18px; align-items: start; }
@media (max-width: 980px) { .pack { grid-template-columns: minmax(0, 1fr); } }
.packhead { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.progress { height: 10px; border-radius: 99px; background: var(--surface); overflow: hidden; border: 1px solid var(--line); }
.progress i { display: block; height: 100%; background: var(--ok); transition: width 0.2s; }
.lines { display: grid; gap: 8px; }
.line { display: grid; grid-template-columns: 70px 56px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px; border: 2px solid var(--line); border-radius: var(--r); background: var(--bg); }
.line.done { border-color: var(--ok); background: var(--ok-bg); }
.line.part { border-color: color-mix(in srgb, var(--ok) 50%, var(--line)); }
.line.flash { animation: flash 0.6s; }
.line.away { border-style: dashed; }
@keyframes flash { from { box-shadow: 0 0 0 6px color-mix(in srgb, var(--ok) 40%, transparent); } to { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .line.flash { animation: none; } .progress i { transition: none; } }
.thumb { width: 56px; height: 56px; border-radius: 4px; background: var(--surface); object-fit: cover; display: grid; place-items: center; font-family: var(--font-display); color: var(--muted); font-size: 18px; }
.line .title { font-weight: 600; line-height: 1.3; }
.line .sub { font-size: 12.5px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.qty { text-align: right; display: grid; gap: 6px; justify-items: end; }
.qty .n { font-family: var(--font-display); font-weight: 700; font-size: 26px; line-height: 1; white-space: nowrap; }
.qty .n small { font-size: 15px; color: var(--muted); }
.line.done .qty .n { color: var(--ok); }
.order-sep { font-family: var(--font-display); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 8px 0 0; display: flex; gap: 8px; align-items: center; }
.order-sep::after { content: ""; flex: 1; height: 1px; background: var(--line); }
@media (max-width: 600px) { .line { grid-template-columns: 56px minmax(0, 1fr) auto; gap: 10px; padding: 10px; } .line .thumbcell { display: none; } .scan label { display: none; } .bin { min-width: 0; } }

.side { display: grid; gap: 12px; position: sticky; top: calc(env(safe-area-inset-top, 0px) + 72px); }
@media (max-width: 980px) { .side { position: static; } }
.addr { font-size: 17px; line-height: 1.35; }
.addr b { font-size: 18px; }
.alert { padding: 10px 12px; border-radius: var(--r); font-size: 14px; display: flex; gap: 10px; align-items: flex-start; }
.alert.err { background: var(--err-bg); color: var(--err); font-weight: 600; }
.alert.warn { background: var(--warn-bg); }
.alert.info { background: var(--surface); }
.alert.strong { border: 2px solid var(--accent); }
.alert .txt { flex: 1; min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.alert input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--fg); flex: none; margin-top: 1px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.seg button { border: 0; background: var(--bg); padding: 8px 12px; cursor: pointer; font-family: var(--font-display); font-weight: 700; font-size: 13px; letter-spacing: 0.05em; }
.seg button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
.addons { display: flex; flex-wrap: wrap; gap: 6px; }
.addon { border: 1px solid var(--line); background: var(--bg); border-radius: var(--r); padding: 6px 10px; cursor: pointer; font-size: 13px; text-align: left; }
.addon[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.addon b { font-family: var(--font-display); letter-spacing: 0.05em; margin-right: 4px; }
.why { font-size: 12.5px; color: var(--muted); margin: 6px 0 0; padding-left: 16px; }
.field { display: grid; gap: 4px; }
.field > span { font-size: 12px; font-family: var(--font-display); font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.field input, .field select, .field textarea { border: 1px solid var(--line); border-radius: var(--r); padding: 9px 10px; background: var(--bg); min-height: 40px; width: 100%; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--fg); outline: none; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 600px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.pkgtabs { display: flex; gap: 6px; flex-wrap: wrap; }
.pkgtab { border: 1px solid var(--line); background: var(--bg); padding: 6px 10px; border-radius: var(--r); cursor: pointer; font-weight: 600; font-size: 13px; }
.pkgtab[aria-pressed="true"] { border: 2px solid var(--fg); }
.suggest { font-size: 12.5px; color: var(--muted); }

/* ---------- Dialoge ---------- */
.overlay { position: fixed; inset: 0; background: color-mix(in srgb, #000 45%, transparent); display: grid; place-items: center; z-index: 50;
  padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.dialog { background: var(--bg); border-radius: 8px; width: min(560px, 100%); max-height: 90vh; overflow: auto; border-top: 8px solid var(--err); }
.dialog.okd { border-top-color: var(--ok); }
.dialog.wd { border-top-color: var(--accent); }
.dialog .dh { padding: 16px 18px 6px; }
.dialog .db { padding: 6px 18px 16px; display: grid; gap: 12px; }
.dialog .df { padding: 12px 18px 18px; display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.choice { display: grid; gap: 6px; }
.choice button { text-align: left; }

/* ---------- Erfolg / Etikett ---------- */
.done-hero { background: var(--ok); color: #0F0F0F; border-radius: var(--r); padding: 22px; display: grid; gap: 6px; }
.done-hero h1 { font-size: 34px; }
.labels { display: flex; gap: 16px; flex-wrap: wrap; }
.labelcard { width: 280px; max-width: 100%; aspect-ratio: 105 / 148; background: #FFFFFF; color: #0F0F0F; border: 1px solid #0F0F0F; padding: 12px; display: grid; grid-template-rows: auto auto 1fr auto; gap: 8px; font: 12px/1.3 Arial, Helvetica, sans-serif; }
.labelcard .lc-top { display: flex; justify-content: space-between; align-items: start; border-bottom: 2px solid #0F0F0F; padding-bottom: 6px; }
.labelcard .lc-svc { font: 700 30px/1 Arial, Helvetica, sans-serif; border: 3px solid #0F0F0F; padding: 2px 8px; }
.labelcard .lc-add { display: flex; gap: 4px; flex-wrap: wrap; }
.labelcard .lc-add span { border: 2px solid #0F0F0F; font-weight: 700; padding: 1px 5px; }
.labelcard .lc-to { font-size: 14px; line-height: 1.35; align-self: center; }
.labelcard .lc-bar { height: 54px; background: repeating-linear-gradient(90deg, #0F0F0F 0 2px, #FFFFFF 2px 3px, #0F0F0F 3px 4px, #FFFFFF 4px 7px, #0F0F0F 7px 10px, #FFFFFF 10px 11px); }
.labelcard .lc-id { font: 700 13px/1.2 ui-monospace, Menlo, monospace; text-align: center; }
/* Rolle 100 × 62 mm, massstäblich: 3 px pro mm (Geometrie aus rules.js) */
.lb { position: relative; overflow: hidden; flex: none; background: #FFFFFF; color: #0F0F0F; box-shadow: 0 0 0 1px #0F0F0F; border-radius: 3px; font-family: Helvetica, Arial, sans-serif; }
.lb .lb-t { position: absolute; white-space: nowrap; line-height: 1; }
.lb .lb-bar { position: absolute; background: repeating-linear-gradient(90deg, #0F0F0F 0 2px, #FFFFFF 2px 3px, #0F0F0F 3px 4px, #FFFFFF 4px 7px, #0F0F0F 7px 10px, #FFFFFF 10px 11px, #0F0F0F 11px 12px, #FFFFFF 12px 14px); }
.lb .lb-logo { position: absolute; display: block; }
.lb .lb-svc { position: absolute; display: flex; align-items: center; justify-content: center; border: 1.5px solid #0F0F0F; font-weight: 700; line-height: 1; }
.lb.specimen::after { inset: 34% -20% auto; font-size: 30px; transform: rotate(-18deg); }
.labelcard .lc-logo { display: block; width: 110px; height: auto; margin-top: 6px; }
.specimen { position: relative; overflow: hidden; }
.specimen::after { content: "SPECIMEN"; position: absolute; inset: 40% -20% auto; transform: rotate(-28deg); text-align: center; font: 700 34px/1 Arial, sans-serif; color: rgba(196, 43, 28, 0.55); letter-spacing: 0.1em; pointer-events: none; }

/* ---------- Tabellen ---------- */
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--font-display); font-weight: 500; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); background: var(--surface); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.r, th.r { text-align: right; }

/* ---------- Lager-Tipps ---------- */
.tips { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.tip { border: 1px solid var(--line); border-radius: var(--r); padding: 14px; background: var(--bg); display: grid; gap: 6px; align-content: start; }
.tip h3 { margin: 0; font-family: var(--font-display); font-size: 15px; letter-spacing: 0.04em; text-transform: uppercase; }
.pair { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.pair:last-child { border-bottom: 0; }
.pair .p { display: flex; gap: 8px; align-items: center; min-width: 0; }
.pair .p span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.pair .link { font-family: var(--font-display); font-size: 12px; color: var(--muted); text-align: center; white-space: nowrap; }
@media (max-width: 700px) { .pair { grid-template-columns: minmax(0, 1fr); } .pair .link { text-align: left; } }
.family { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.family:last-child { border-bottom: 0; }
.bars { display: grid; gap: 4px; }
.barrow { display: grid; grid-template-columns: 64px minmax(0, 1fr) 46px; gap: 10px; align-items: center; font-size: 13px; }
.barrow .track { height: 14px; background: var(--surface); border-radius: 2px; overflow: hidden; }
.barrow .track i { display: block; height: 100%; background: var(--fg); }
.barrow .track i.a { background: var(--accent); }

/* Meldungen oben unter der Kopfzeile: unten legt Shopify im Admin das Sidekick-Feld über die App */
.toast { position: fixed; left: 50%; transform: translateX(-50%); top: calc(var(--top-h, 64px) + 10px); background: var(--fg); color: var(--bg); padding: 12px 18px; border-radius: var(--r); z-index: 60; max-width: min(720px, calc(100% - 32px)); font-weight: 600; box-shadow: 0 6px 24px color-mix(in srgb, #000 25%, transparent); cursor: pointer; animation: toast-in 0.18s ease-out; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, -8px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } }
.toast.err { background: var(--err); color: #FFFFFF; }
.empty { text-align: center; padding: 48px 16px; color: var(--muted); display: grid; gap: 10px; justify-items: center; }
.empty img { width: 64px; opacity: 0.9; }
.spinner { width: 18px; height: 18px; border: 3px solid var(--line); border-top-color: var(--fg); border-radius: 50%; animation: spin 0.8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.demo-scan { border: 1px dashed var(--hot); background: transparent; color: var(--fg); border-radius: 3px; font-size: 11.5px; padding: 1px 6px; cursor: pointer; font-family: ui-monospace, Menlo, monospace; }

@media print {
  .top, .noprint, .bulkbar, .toast { display: none !important; }
  main { padding: 0; max-width: none; }
  body { font-size: 12px; background: #FFFFFF; color: #000000; }
  .tablewrap { border: 0; overflow: visible; }
  th { background: none; color: #000000; }
}

/* Logo: Black-Datei auf hellem, White-Datei auf dunklem Grund (nie umfärben) */
.logo-d { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo-l { display: none; } :root:not([data-theme="light"]) .logo-d { display: inline; } }
:root[data-theme="dark"] .logo-l { display: none; }
:root[data-theme="dark"] .logo-d { display: inline; }

.biglabel{display:flex;flex-direction:column;gap:4px;justify-content:center;align-items:flex-start;width:min(260px,100%);aspect-ratio:105/148;max-height:300px;padding:14px;border:2px dashed var(--line);border-radius:var(--r);background:var(--bg)}
.fit{font-size:12.5px;margin-top:8px;color:var(--muted,#6b665e)}
.fit.ok::before{content:"✓ ";color:var(--ok,#2f7d4f);font-weight:700}
