/* Asal Sammelbesteller – Gestaltung
   Welt: der Asal-Quartalsrundbrief (Druckdaten). Himmel und grüne Schwarzwaldhügel im Kopf, grüne Balken mit weißer
   Schrift, rote Preisschilder „statt … €“, blaue Ersparnis-Kreise, „Gratis“-Stempel in Handschrift, Open Sans wie im Druck.
   Hell, weil draußen und im Wohnzimmer bei Tageslicht bestellt wird; große Schrift und Tippflächen für Nicht-Technik-Profis. */

/* Schriften selbst gehostet (Open Sans, Gochi Hand – SIL Open Font License, über Fontsource): keine Anfragen an Google. */
@font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/open-sans-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/open-sans-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/open-sans-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/open-sans-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 800; font-display: swap; src: url('/fonts/open-sans-latin-800-normal.woff2') format('woff2'); }
@font-face { font-family: 'Gochi Hand'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/gochi-hand-latin-400-normal.woff2') format('woff2'); }

:root {
  --navy: #2f7d1f;          /* Asal-Grün dunkel: Kopf, Hauptaktionen */
  --navy-2: #3f9229;        /* Grün der Rundbrief-Balken */
  --navy-ink: #eaf5e3;
  --leaf: #7cc24a;
  --sky: #2a8bd6;
  --blue: #1b97d5;          /* Ersparnis-Kreis */
  --red: #d7242a;           /* Preisschild, Logo */
  --red-tint: #fdecec;
  --yellow: #ffe100;        /* Logo-Gelb */
  --green: #2f7d1f;
  --green-tint: #e9f5e1;
  --amber: #a15c00;
  --amber-tint: #fff3dc;

  --ground: #f2f4f7;
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --line: #e1e5ea;
  --line-2: #cdd3db;
  --ink: #111c2a;
  --ink-2: #3a4757;
  --ink-3: #5f6b7a;
  --ink-4: #8a94a1;
  --focus: #2f6fd6;

  --r-s: 8px; --r-m: 12px; --r-l: 16px; --r-xl: 22px; --r-full: 999px;
  --shadow-1: 0 1px 2px rgb(20 40 20 / .06), 0 1px 1px rgb(20 40 20 / .04);
  --shadow-2: 0 6px 18px -6px rgb(20 40 20 / .18), 0 2px 6px rgb(20 40 20 / .06);
  --shadow-up: 0 -8px 24px -10px rgb(20 40 20 / .22);
  --font: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --display: 'Open Sans', system-ui, sans-serif;
  --hand: 'Gochi Hand', 'Comic Sans MS', cursive;
  --tap: 48px;
  --safe-b: env(safe-area-inset-bottom);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--line-2) transparent; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 16.5px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
::selection { background: color-mix(in srgb, var(--yellow) 70%, white); color: var(--ink); }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--navy-2); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--focus) 55%, transparent); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.01em; margin: 0; }
.ico { flex: none; display: block; }
.num { font-variant-numeric: tabular-nums; }
.loading { padding: 3rem 1rem; text-align: center; color: var(--ink-3); }
.muted { color: var(--ink-3); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ── Kopf ─────────────────────────────────────────────── */
.appbar { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 30; box-shadow: 0 1px 0 rgb(255 255 255 / .06); }
.appbar-in { max-width: 820px; margin: 0 auto; display: flex; align-items: center; gap: .75rem; min-height: 60px; padding: .5rem 1rem; }
.appbar.wide .appbar-in { max-width: 1240px; }
.logo { height: 26px; width: auto; border-radius: 3px; display: block; }
.appbar-title { flex: 1; min-width: 0; }
.appbar-title b { display: block; font-family: var(--display); font-weight: 700; font-size: 1.02rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appbar-title span { display: block; font-size: .8rem; color: rgb(255 255 255 / .82); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-full); border: 0; background: transparent; color: inherit; cursor: pointer; }
.appbar .icon-btn:hover { background: rgb(255 255 255 / .1); }
.back { display: inline-flex; align-items: center; gap: .15rem; color: #fff; text-decoration: none; font-weight: 600; margin-left: -.4rem; padding: .4rem .5rem; border-radius: var(--r-s); }
.back:hover { background: rgb(255 255 255 / .1); }

/* Navy-Fortsetzung unter dem Kopf: Kennzahlen des Durchgangs */
.band { background: var(--navy); color: #fff; padding: .25rem 1rem 1.25rem; }
.band-in { max-width: 820px; margin: 0 auto; }
.round-card { background: var(--navy-2); border-radius: var(--r-l); padding: 1rem 1.1rem; display: grid; gap: .8rem; }
.round-top { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.round-top h2 { font-size: 1.05rem; font-weight: 700; }
.round-top span { font-size: .85rem; color: rgb(255 255 255 / .82); }
.meter { height: 10px; border-radius: var(--r-full); background: rgb(255 255 255 / .12); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--yellow); border-radius: inherit; transition: width .4s var(--ease); }
.round-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.round-stats div b { display: block; font-family: var(--display); font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.round-stats div span { font-size: .78rem; color: rgb(255 255 255 / .82); }

/* ── Grundgerüst ──────────────────────────────────────── */
.page { max-width: 820px; margin: 0 auto; padding: 1rem 1rem calc(7.5rem + var(--safe-b)); }
.page.wide { max-width: 1240px; padding-bottom: 3rem; }
.stack > * + * { margin-top: 1rem; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin: 1.75rem 0 .6rem; }
.section-head h2 { font-size: 1.12rem; font-weight: 700; }
.section-head p { margin: 0; font-size: .88rem; color: var(--ink-3); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--shadow-1); }
.panel-pad { padding: 1rem 1.1rem; }

/* ── Buttons ──────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: var(--tap); padding: 0 1.15rem; border-radius: var(--r-m);
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .1s; }
.btn:hover { border-color: var(--ink-4); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-2); border-color: var(--navy-2); }
.btn-go { background: var(--green); border-color: var(--green); color: #fff; }
.btn-go:hover { background: #18684a; border-color: #18684a; }
.btn-danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn-quiet { border-color: transparent; background: transparent; }
.btn-quiet:hover { background: var(--surface-2); }
.btn-sm { min-height: 38px; padding: 0 .85rem; font-size: .9rem; border-radius: var(--r-s); }
.btn-block { width: 100%; }

/* ── Eingaben ─────────────────────────────────────────── */
.input { width: 100%; min-height: var(--tap); padding: .65rem .9rem; border: 1px solid var(--line-2); border-radius: var(--r-m); background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.input:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 4px color-mix(in srgb, var(--focus) 18%, transparent); }
.input::placeholder { color: var(--ink-4); }
textarea.input { min-height: 84px; resize: vertical; }
.field-label { display: block; font-size: .88rem; font-weight: 600; color: var(--ink-2); margin: 0 0 .35rem; }
.hint { font-size: .82rem; color: var(--ink-3); margin: .35rem 0 0; }
.search { position: relative; }
.search .ico { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); color: var(--ink-4); pointer-events: none; }
.search .input { padding-left: 2.7rem; }

/* Umschalter (Segmente) */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-m); }
.seg button { min-height: 42px; border: 0; border-radius: 9px; background: transparent; font-weight: 600; color: var(--ink-3); cursor: pointer; font-size: .92rem; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }

/* Filter-Chips mit Zahl */
.chips { display: flex; gap: .45rem; overflow-x: auto; padding: 2px 2px 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: .45rem; min-height: 40px; padding: 0 .95rem; border-radius: var(--r-full); border: 1px solid var(--line-2);
  background: var(--surface); font-weight: 600; font-size: .9rem; color: var(--ink-2); cursor: pointer; }
.chip em { font-style: normal; font-size: .78rem; min-width: 1.4rem; padding: .05rem .4rem; border-radius: var(--r-full); background: var(--surface-2); color: var(--ink-3); text-align: center; }
.chip.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip.on em { background: rgb(255 255 255 / .16); color: #fff; }

/* Status-Pillen */
.pill { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .6rem; border-radius: var(--r-full); font-size: .78rem; font-weight: 700; white-space: nowrap; }
.pill-ok { background: var(--green-tint); color: var(--green); }
.pill-warn { background: var(--amber-tint); color: var(--amber); }
.pill-new { background: #e8eefb; color: #2b4f9a; }
.pill-offer { background: var(--yellow); color: var(--navy); }
.pill-quiet { background: var(--surface-2); color: var(--ink-3); }

/* ── Kundenliste ──────────────────────────────────────── */
.clist { list-style: none; margin: 0; padding: 0; }
.clist li + li { margin-top: .5rem; }
.crow { width: 100%; display: grid; grid-template-columns: 44px 1fr auto; gap: .85rem; align-items: center; padding: .85rem 1rem; text-align: left; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--shadow-1); transition: border-color .15s, box-shadow .15s; }
.crow:hover { border-color: var(--line-2); box-shadow: var(--shadow-2); }
.avatar { width: 44px; height: 44px; border-radius: var(--r-full); display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: .95rem;
  background: #e9f5e1; color: var(--navy-2); }
.crow.done .avatar { background: var(--green-tint); color: var(--green); }
.crow.todo .avatar { background: var(--amber-tint); color: var(--amber); }
.cname { font-weight: 700; font-size: 1.02rem; line-height: 1.3; }
.cmeta { font-size: .86rem; color: var(--ink-3); margin-top: .1rem; }
.cside { display: grid; justify-items: end; gap: .35rem; }
.qdots { display: flex; gap: 4px; align-items: center; }
.qdots i { width: 9px; height: 9px; border-radius: var(--r-full); background: var(--line); }
.qdots i.on { background: var(--navy-2); }
.qdots small { font-size: .7rem; color: var(--ink-4); margin-right: 2px; }

/* ── Kundenkopf auf der Bestellseite ──────────────────── */
.cust-head { background: var(--navy); color: #fff; padding: .25rem 1rem 1.2rem; }
.cust-head-in { max-width: 820px; margin: 0 auto; display: grid; gap: .9rem; }
.cust-addr { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; font-size: .9rem; color: rgb(255 255 255 / .88); }
.cust-addr span, .cust-addr a { display: inline-flex; align-items: center; gap: .35rem; color: inherit; text-decoration: none; }
.cust-addr a { color: #fff; font-weight: 600; }
.kpi-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.kpi { background: var(--navy-2); border-radius: var(--r-m); padding: .65rem .8rem; }
.kpi b { display: block; font-family: var(--display); font-size: 1.08rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.kpi span { font-size: .76rem; color: rgb(255 255 255 / .82); }
.qhist { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; }
.qhist div { background: var(--navy-2); border-radius: 8px; padding: .4rem .2rem; text-align: center; }
.qhist div.on { background: #2c6e1b; }
.qhist small { display: block; font-size: .66rem; color: rgb(255 255 255 / .7); }
.qhist b { display: block; font-size: .74rem; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ── Vorschläge (horizontale Reihen) ──────────────────── */
.rail-head { display: flex; align-items: center; gap: .5rem; margin: 1.25rem 0 .55rem; }
.rail-head h3 { font-size: .98rem; font-weight: 700; }
.rail-head .ico { color: var(--red); }
.rail-head p { margin: 0 0 0 auto; font-size: .8rem; color: var(--ink-3); }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: 168px; gap: .65rem; overflow-x: auto; padding: 2px 2px 8px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.tile { scroll-snap-align: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden; display: grid; grid-template-rows: 116px auto; box-shadow: var(--shadow-1); }
.tile.has-qty { border-color: var(--green); box-shadow: 0 0 0 2px var(--green-tint); }
.tile-img { background: #fff; display: grid; place-items: center; position: relative; border-bottom: 1px solid var(--line); }
.tile-img img { max-width: 100%; max-height: 108px; object-fit: contain; }
.tile-img .pill { position: absolute; left: 6px; top: 6px; }
.tile-body { padding: .55rem .65rem .65rem; display: grid; gap: .25rem; align-content: start; }
.tile-name { font-weight: 600; font-size: .86rem; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.15em; }
.tile-why { font-size: .74rem; color: var(--ink-3); }
.tile-foot { display: flex; align-items: center; justify-content: space-between; gap: .4rem; margin-top: .15rem; }
.add { width: 38px; height: 38px; border-radius: var(--r-full); border: 0; background: var(--navy); color: #fff; display: grid; place-items: center; cursor: pointer; }
.add:hover { background: var(--navy-2); }
.tile .qty-badge { font-weight: 700; color: var(--green); font-size: .86rem; }

/* ── Artikelzeilen (wie auf dem Papier-Bestellschein) ─── */
.cat-head { position: sticky; top: 60px; z-index: 5; display: flex; align-items: baseline; justify-content: space-between; margin: 1.5rem 0 0; padding: .55rem .9rem;
  background: #3f9229; color: var(--navy); border-radius: var(--r-m) var(--r-m) 0 0; font-family: var(--display); font-weight: 700; font-size: .92rem; }
.cat-head small { font-family: var(--font); font-weight: 500; color: var(--ink-3); }
.plist { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden; }
.cat-head + .plist { border-top: 0; border-radius: 0 0 var(--r-l) var(--r-l); }
.plist > li + li { border-top: 1px solid var(--line); }
.prow { display: grid; grid-template-columns: 76px 1fr; gap: .85rem; padding: .85rem .9rem; transition: background .15s; }
.prow.has-qty { background: #f2faf6; }
.pimg { width: 76px; height: 76px; border-radius: var(--r-m); background: #fff; border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; }
.pimg img { max-width: 100%; max-height: 100%; object-fit: contain; }
.pimg .ico { color: var(--line-2); }
.pmain { min-width: 0; display: grid; gap: .3rem; }
.ptop { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; }
.pname { font-weight: 700; line-height: 1.3; }
.pname small { font-weight: 500; color: var(--ink-3); font-size: .88rem; margin-left: .2rem; white-space: nowrap; }
.pprice { text-align: right; font-family: var(--display); font-weight: 700; font-size: 1.05rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pprice s { display: block; font-family: var(--font); font-weight: 500; font-size: .8rem; color: var(--ink-4); }
.pprice.offer { color: var(--red); }
.ptags { display: flex; flex-wrap: wrap; gap: .3rem; }
.tag { font-size: .72rem; font-weight: 600; padding: .1rem .45rem; border-radius: 6px; background: var(--surface-2); color: var(--ink-3); border: 1px solid var(--line); }
.tag.bio { background: var(--green-tint); color: var(--green); border-color: transparent; }
.pnote { font-size: .82rem; color: var(--ink-2); }
.pnote b { color: var(--navy); }
.pfav { font-size: .8rem; color: var(--green); font-weight: 600; display: inline-flex; align-items: center; gap: .3rem; }
.pbottom { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-top: .15rem; }
.pline { font-size: .84rem; color: var(--ink-3); }
.pline b { color: var(--green); }
.stepper { display: inline-flex; align-items: center; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-full); padding: 3px; }
.stepper button { width: 42px; height: 42px; border: 0; border-radius: var(--r-full); background: var(--surface); box-shadow: var(--shadow-1); display: grid; place-items: center; cursor: pointer; color: var(--navy); }
.stepper button:disabled { opacity: .35; box-shadow: none; cursor: default; }
.stepper input { width: 46px; border: 0; background: transparent; text-align: center; font-weight: 700; font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.stepper input:focus { outline: none; }
.has-qty .stepper { background: var(--green-tint); border-color: transparent; }
.empty { padding: 2rem 1rem; text-align: center; color: var(--ink-3); background: var(--surface); border: 1px dashed var(--line-2); border-radius: var(--r-l); }

/* Bestellschein-Werkzeuge */
.toolbar { position: sticky; top: 60px; z-index: 6; background: var(--ground); padding: .75rem 0 .5rem; display: grid; gap: .6rem; }
.gift-note { display: flex; align-items: center; gap: .6rem; padding: .75rem .9rem; border-radius: var(--r-m); background: var(--yellow); color: var(--navy); font-weight: 600; font-size: .92rem; }
.gift-note.got { background: var(--green-tint); color: var(--green); }

/* ── Summenleiste unten ───────────────────────────────── */
.sumbar { position: fixed; inset: auto 0 0 0; z-index: 40; background: var(--surface); border-top: 1px solid var(--line); box-shadow: var(--shadow-up); padding: .7rem 1rem calc(.7rem + var(--safe-b)); }
.sumbar-in { max-width: 820px; margin: 0 auto; display: flex; align-items: center; gap: .75rem; }
.sum { flex: 1; min-width: 0; }
.sum b { display: block; font-family: var(--display); font-size: 1.3rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.sum span { font-size: .82rem; color: var(--ink-3); }
.sumbar .btn { min-height: 52px; padding: 0 1.4rem; font-size: 1rem; }

/* ── Kundenlink ───────────────────────────────────────── */
.hero { background: var(--navy); color: #fff; padding: 1.1rem 1rem 1.6rem; }
.hero-in { max-width: 820px; margin: 0 auto; display: grid; gap: 1rem; }
.hero h1 { font-size: clamp(1.45rem, 5vw, 1.9rem); font-weight: 700; line-height: 1.2; }
.hero p { margin: 0; color: rgb(255 255 255 / .88); max-width: 52ch; }
.facts { display: flex; flex-wrap: wrap; gap: .5rem; }
.fact { display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .75rem; border-radius: var(--r-full); background: var(--navy-2); font-size: .86rem; color: #fff; }
.fact .ico { color: var(--yellow); }

/* ── Anmeldung ────────────────────────────────────────── */
.login { min-height: 100dvh; display: grid; grid-template-rows: auto 1fr; background: linear-gradient(var(--navy) 0 42%, var(--ground) 42%); }
.login-top { padding: 2.2rem 1rem 0; text-align: center; color: #fff; }
.login-top .logo { height: 40px; margin: 0 auto .9rem; }
.login-top h1 { font-size: 1.5rem; font-weight: 700; }
.login-top p { margin: .3rem 0 0; color: rgb(255 255 255 / .82); }
.login-card { width: min(420px, calc(100% - 2rem)); margin: 1.75rem auto 2rem; align-self: start; padding: 1.4rem; display: grid; gap: 1rem; }
.login-foot { text-align: center; font-size: .88rem; }

/* ── Dialog ───────────────────────────────────────────── */
.dlg { border: 0; padding: 0; border-radius: var(--r-xl); width: min(460px, calc(100% - 2rem)); box-shadow: 0 30px 80px -20px rgb(20 40 20 / .45); color: var(--ink); }
.dlg::backdrop { background: rgb(20 40 20 / .45); backdrop-filter: blur(2px); }
.dlg-inner { display: grid; }
.dlg-head { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1rem .25rem 1.25rem; }
.dlg-head h2 { font-size: 1.15rem; font-weight: 700; }
.dlg-body { padding: .5rem 1.25rem 1rem; color: var(--ink-2); }
.dlg-body p { margin: 0 0 .75rem; }
.dlg-foot { display: flex; justify-content: flex-end; gap: .5rem; padding: .75rem 1rem 1rem; border-top: 1px solid var(--line); }

/* ── Meldung ──────────────────────────────────────────── */
#toast { position: fixed; left: 50%; bottom: calc(6.5rem + var(--safe-b)); z-index: 60; transform: translate(-50%, 12px); max-width: min(92vw, 520px);
  padding: .8rem 1.1rem; border-radius: var(--r-m); background: var(--ink); color: #fff; font-weight: 500; box-shadow: var(--shadow-2);
  opacity: 0; pointer-events: none; transition: opacity .2s var(--ease), transform .2s var(--ease); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.err { background: var(--red); }

/* ── Innendienst ──────────────────────────────────────── */
.tabs-nav { display: flex; gap: .25rem; overflow-x: auto; }
.tabs-nav button { display: inline-flex; align-items: center; gap: .45rem; min-height: 40px; padding: 0 .9rem; border: 0; border-radius: var(--r-s); background: transparent; color: rgb(255 255 255 / .88); font-weight: 600; cursor: pointer; white-space: nowrap; }
.tabs-nav button:hover { background: rgb(255 255 255 / .08); color: #fff; }
.tabs-nav button.on { background: #fff; color: var(--navy); }
.tabs-nav em { font-style: normal; font-size: .74rem; padding: .05rem .45rem; border-radius: var(--r-full); background: var(--yellow); color: var(--navy); }
.tools { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; padding: .9rem 1rem; border-bottom: 1px solid var(--line); }
.tools .search { flex: 1 1 260px; }
.switch { display: inline-flex; align-items: center; gap: .55rem; font-size: .9rem; color: var(--ink-2); cursor: pointer; user-select: none; }
.switch input { appearance: none; width: 40px; height: 24px; border-radius: var(--r-full); background: var(--line-2); position: relative; cursor: pointer; transition: background .15s; margin: 0; flex: none; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: var(--r-full); background: #fff; box-shadow: var(--shadow-1); transition: transform .15s var(--ease); }
.switch input:checked { background: var(--green); }
.switch input:checked::after { transform: translateX(16px); }
.switch input:disabled { opacity: .5; }
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tbl th { position: sticky; top: 0; background: var(--surface-2); text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); font-weight: 700;
  padding: .65rem .9rem; border-bottom: 1px solid var(--line); white-space: nowrap; cursor: pointer; user-select: none; }
.tbl th.r, .tbl td.r { text-align: right; }
.tbl td { padding: .7rem .9rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr:hover { background: #fafbfc; }
.tbl tr.is-on td:first-child { box-shadow: inset 3px 0 0 var(--green); }
.tbl .sub { display: block; font-size: .8rem; color: var(--ink-3); }
.code { font-family: var(--display); font-weight: 700; color: var(--navy); }
.shop-cell { display: flex; align-items: center; gap: .65rem; min-width: 220px; }
.shop-cell img { width: 44px; height: 44px; object-fit: contain; border-radius: 8px; border: 1px solid var(--line); background: #fff; flex: none; }
.row-actions { display: flex; flex-wrap: wrap; gap: .35rem; justify-content: flex-end; }
.inbox-row { width: 100%; display: grid; grid-template-columns: 1fr auto auto; gap: 1rem; align-items: center; padding: 1rem 1.1rem; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; cursor: pointer; }
.inbox-row:hover { background: #fafbfc; }
.order-card { padding: 1rem 1.1rem; }
.order-card + .order-card { border-top: 1px solid var(--line); }
.order-card header { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: .6rem; }
.drop { display: grid; place-items: center; gap: .5rem; padding: 1.6rem 1rem; border: 2px dashed var(--line-2); border-radius: var(--r-l); background: var(--surface-2); text-align: center; cursor: pointer; color: var(--ink-2); }
.drop:hover { border-color: var(--navy-2); }
.drop .ico { color: var(--navy-2); }
.notice { display: flex; gap: .6rem; padding: .8rem 1rem; border-radius: var(--r-m); background: #e8eefb; color: #23427e; font-size: .92rem; }
.notice.warn { background: var(--amber-tint); color: #7a4600; }
.notice.ok { background: var(--green-tint); color: var(--green); }

@media (min-width: 720px) {
  .prow { grid-template-columns: 92px 1fr; }
  .pimg { width: 92px; height: 92px; }
  .rail { grid-auto-columns: 184px; }
  .kpi-row { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 420px) {
  .qhist { grid-template-columns: repeat(4, 1fr); }
  .round-stats div b { font-size: 1.1rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
