:root {
  --r-lg: 16px; --r-md: 10px; --r-sm: 7px;
  --f-head: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --f-body: "Atkinson Hyperlegible", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --side-w: 236px;
}
/* ── Farbthemes: jeweils hell und dunkel. Auswahl in Einstellungen → Darstellung ── */
:root, html[data-theme="tanne"] { --bg: #EDF0EA; --surface: #FFFFFF; --surface-2: #F4F6F2; --ink: #1E2A23; --ink-2: #56645B; --line: #D4DBD0; --primary: #2E5E55; --primary-2: #244A43; --on-primary: #FFFFFF; --mustard: #D69A2D; --on-mustard: #2A1F08; --berry: #A8405A; --good: #3C7D4F; --warn: #8F6310; --rib-a: #2E5E55; --rib-b: #29554D; --rib-ink: #E7EEE8; color-scheme: light; }
html[data-theme="tanne"][data-dark] { --bg: #131916; --surface: #1B231F; --surface-2: #212B26; --ink: #E6ECE5; --ink-2: #A2AFA6; --line: #33413A; --primary: #84BCAD; --primary-2: #9CCBBE; --on-primary: #0F1F1A; --mustard: #E5B55C; --on-mustard: #241904; --berry: #E48098; --good: #7FC690; --warn: #E2B04F; --rib-a: #1B2D28; --rib-b: #182824; --rib-ink: #D6E3DA; color-scheme: dark; }
html[data-theme="heide"] { --bg: #F1EEF3; --surface: #FFFFFF; --surface-2: #F6F3F8; --ink: #251D2B; --ink-2: #62566B; --line: #DCD4E2; --primary: #5E3F73; --primary-2: #4C3260; --on-primary: #FFFFFF; --mustard: #C9973A; --on-mustard: #2B1E06; --berry: #B23A48; --good: #3F7A55; --warn: #8F6310; --rib-a: #5E3F73; --rib-b: #573A6B; --rib-ink: #F0E8F5; color-scheme: light; }
html[data-theme="heide"][data-dark] { --bg: #17131B; --surface: #201A26; --surface-2: #28212F; --ink: #ECE5F1; --ink-2: #AFA3B8; --line: #3A3142; --primary: #C3A4D8; --primary-2: #D2B9E3; --on-primary: #21142B; --mustard: #E3B866; --on-mustard: #241904; --berry: #EE8A96; --good: #86C79A; --warn: #E2B04F; --rib-a: #2A1F33; --rib-b: #261C2E; --rib-ink: #E3D8EA; color-scheme: dark; }
html[data-theme="fjord"] { --bg: #ECF0F3; --surface: #FFFFFF; --surface-2: #F3F6F8; --ink: #1A2530; --ink-2: #54636F; --line: #D2DAE1; --primary: #2C5574; --primary-2: #22445E; --on-primary: #FFFFFF; --mustard: #E2B13C; --on-mustard: #2A2104; --berry: #B5384B; --good: #2F7D5B; --warn: #8A600C; --rib-a: #2C5574; --rib-b: #284E6B; --rib-ink: #E6EEF4; color-scheme: light; }
html[data-theme="fjord"][data-dark] { --bg: #11171C; --surface: #18212A; --surface-2: #1F2A34; --ink: #E3EAF0; --ink-2: #9DADBA; --line: #2E3C48; --primary: #8DB8D9; --primary-2: #A6C9E4; --on-primary: #0D1C29; --mustard: #EDC566; --on-mustard: #241B03; --berry: #EE8896; --good: #7ECBA5; --warn: #E2B04F; --rib-a: #182836; --rib-b: #162432; --rib-ink: #D3E1EC; color-scheme: dark; }
html[data-theme="moos"] { --bg: #EFF0E6; --surface: #FFFFFC; --surface-2: #F5F6EE; --ink: #23261A; --ink-2: #5D6250; --line: #D8DBC9; --primary: #55642A; --primary-2: #45521F; --on-primary: #FFFFFF; --mustard: #7E4A6B; --on-mustard: #FFFFFF; --berry: #A63A3A; --good: #3E7A3A; --warn: #8F6310; --rib-a: #55642A; --rib-b: #4F5D26; --rib-ink: #EEF1DE; color-scheme: light; }
html[data-theme="moos"][data-dark] { --bg: #15170F; --surface: #1D2016; --surface-2: #252919; --ink: #E8EADC; --ink-2: #A9AE98; --line: #363B29; --primary: #B8C77E; --primary-2: #C9D696; --on-primary: #1B2008; --mustard: #D7A0C3; --on-mustard: #2A1023; --berry: #EC8D8D; --good: #9BCB86; --warn: #E2B04F; --rib-a: #23281A; --rib-b: #202517; --rib-ink: #DCE2C8; color-scheme: dark; }
html[data-theme="beere"] { --bg: #F4EFF0; --surface: #FFFFFF; --surface-2: #F9F5F6; --ink: #2A1B21; --ink-2: #6A5860; --line: #E2D5DA; --primary: #7D2B4C; --primary-2: #66223D; --on-primary: #FFFFFF; --mustard: #2E7D78; --on-mustard: #FFFFFF; --berry: #B83A0C; --good: #3C7D4F; --warn: #8F6310; --rib-a: #7D2B4C; --rib-b: #742846; --rib-ink: #F7E6EC; color-scheme: light; }
html[data-theme="beere"][data-dark] { --bg: #1A1215; --surface: #23191D; --surface-2: #2C2025; --ink: #F1E6EA; --ink-2: #B7A2AA; --line: #43303A; --primary: #E59BB8; --primary-2: #EEB3CA; --on-primary: #2E0E1B; --mustard: #7DCFC6; --on-mustard: #0A2523; --berry: #F59A6E; --good: #86C79A; --warn: #E2B04F; --rib-a: #34202A; --rib-b: #2F1D26; --rib-ink: #EBD6DF; color-scheme: dark; }
html[data-theme="torf"] { --bg: #F0EDEA; --surface: #FFFFFF; --surface-2: #F6F3F0; --ink: #2A211B; --ink-2: #67594E; --line: #DDD3CA; --primary: #5B3A26; --primary-2: #4A2F1F; --on-primary: #FFFFFF; --mustard: #4F7F6F; --on-mustard: #FFFFFF; --berry: #A8403A; --good: #37774A; --warn: #8F6310; --rib-a: #5B3A26; --rib-b: #543522; --rib-ink: #F2E7DD; color-scheme: light; }
html[data-theme="torf"][data-dark] { --bg: #18130F; --surface: #211A15; --surface-2: #2A221C; --ink: #EEE5DD; --ink-2: #B2A397; --line: #3F332A; --primary: #D9B08C; --primary-2: #E5C4A6; --on-primary: #2A1A0D; --mustard: #8FC4B1; --on-mustard: #0D2620; --berry: #EE8A80; --good: #86C79A; --warn: #E2B04F; --rib-a: #2C211A; --rib-b: #281E17; --rib-ink: #E5D6C8; color-scheme: dark; }
html[data-theme="graphit"] { --bg: #EEEEEC; --surface: #FFFFFF; --surface-2: #F5F5F3; --ink: #1C1D1F; --ink-2: #5E6063; --line: #D7D8D6; --primary: #2F3338; --primary-2: #1F2226; --on-primary: #FFFFFF; --mustard: #2F739A; --on-mustard: #FFFFFF; --berry: #B23A3A; --good: #2F7A4D; --warn: #8F6310; --rib-a: #2F3338; --rib-b: #2B2F33; --rib-ink: #ECEDEE; color-scheme: light; }
html[data-theme="graphit"][data-dark] { --bg: #131415; --surface: #1B1C1E; --surface-2: #232527; --ink: #E8E9EA; --ink-2: #A3A6A9; --line: #35383B; --primary: #E4E5E6; --primary-2: #FFFFFF; --on-primary: #18191B; --mustard: #7FC0E2; --on-mustard: #0A1F2B; --berry: #EE8A8A; --good: #7FC694; --warn: #E2B04F; --rib-a: #1F2124; --rib-b: #1C1E21; --rib-ink: #DDDFE1; color-scheme: dark; }

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 16px/1.5 var(--f-body); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--f-head); font-weight: 700; line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.1rem); }
h2 { font-size: 1.12rem; }
h3 { font-size: 1rem; }
a { color: var(--primary); }
small, .small { font-size: .84rem; }
.muted { color: var(--ink-2); }
.num { font-variant-numeric: tabular-nums; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--mustard); outline-offset: 2px; }
svg.i { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.boot { padding: 40px; color: var(--ink-2); }

/* ── Knitted rib: the signature surface ── */
.rib {
  background-color: var(--rib-a);
  background-image:
    linear-gradient(135deg, transparent 46%, var(--rib-b) 47% 53%, transparent 54%),
    linear-gradient(45deg, transparent 46%, var(--rib-b) 47% 53%, transparent 54%);
  background-size: 18px 22px;
  color: var(--rib-ink);
}

/* ── Shell ── */
.shell { min-height: 100vh; }
.side { position: fixed; inset: 0 auto 0 0; width: var(--side-w); display: flex; flex-direction: column; padding: 22px 14px 16px; z-index: 20; }
.brand { display: flex; gap: 11px; align-items: center; padding: 0 8px 22px; }
.brand svg { width: 38px; height: 38px; }
.brand b { font-family: var(--f-head); font-size: 1.22rem; display: block; line-height: 1.1; }
.brand small { opacity: .8; display: block; }
.side nav { display: flex; flex-direction: column; gap: 3px; }
.side nav a { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: var(--r-md); color: inherit; text-decoration: none; font-weight: 700; opacity: .86; }
.side nav a:hover { background: rgba(255,255,255,.08); opacity: 1; }
.side nav a.on { background: var(--bg); color: var(--ink); opacity: 1; }
.side-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding: 12px 8px 0; border-top: 1px solid rgba(255,255,255,.18); }
.side-foot .icon-btn { color: inherit; }
main { margin-left: var(--side-w); }
.view { max-width: 1180px; margin: 0 auto; padding: 30px 32px 120px; }
.bottom { display: none; }
.mobile-top { display: none; }

@media (max-width: 860px) {
  .side { display: none; }
  main { margin-left: 0; }
  .view { padding: 18px 16px calc(112px + env(safe-area-inset-bottom)); }
  .mobile-top { display: flex; align-items: center; gap: 10px; padding: calc(10px + env(safe-area-inset-top)) 16px 10px; position: sticky; top: 0; z-index: 15; }
  .mobile-top svg { width: 28px; height: 28px; }
  .mobile-top b { font-family: var(--f-head); font-size: 1.05rem; }
  .mobile-top small { margin-left: auto; opacity: .82; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .bottom { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; inset: auto 0 0 0; z-index: 30; background: var(--surface); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .bottom a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; font-size: .74rem; font-weight: 700; color: var(--ink-2); text-decoration: none; border-radius: var(--r-md); }
  .bottom a.on { color: var(--primary); background: var(--surface-2); }
  .bottom svg.i { width: 23px; height: 23px; }
}

/* ── Page head ── */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head .sub { margin: 6px 0 0; color: var(--ink-2); }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-2); text-decoration: none; font-weight: 700; font-size: .9rem; margin-bottom: 8px; }

/* ── Buttons ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line); background: var(--surface); padding: 9px 15px; border-radius: var(--r-md); font-weight: 700; cursor: pointer; text-decoration: none; color: var(--ink); min-height: 42px; white-space: nowrap; }
.btn:hover { border-color: var(--ink-2); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.btn.primary:hover { background: var(--primary-2); }
.btn.danger { background: var(--berry); border-color: var(--berry); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { color: var(--ink); background: var(--surface-2); }
.btn.small { min-height: 34px; padding: 5px 11px; font-size: .9rem; }
.btn.lg { min-height: 52px; font-size: 1.05rem; width: 100%; }
.btn.timer-go { background: var(--mustard); border-color: var(--mustard); color: var(--on-mustard); }
.btn:disabled { opacity: .55; cursor: default; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 0; background: transparent; border-radius: var(--r-md); cursor: pointer; color: var(--ink-2); }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }

/* ── Panels ── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; }
.card > h2, .sec-head { margin-bottom: 14px; }
.sec-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.sec-head h2 { margin: 0; }
.stack { display: grid; gap: 16px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.empty { text-align: center; padding: 40px 20px; color: var(--ink-2); }
.empty h2, .empty h3 { color: var(--ink); margin-bottom: 6px; font-size: 1.15rem; }
.empty .btn { margin-top: 14px; }
.empty-s { color: var(--ink-2); margin: 4px 0; }
.err-box { background: var(--surface); border: 1px solid var(--berry); color: var(--ink); padding: 18px; border-radius: var(--r-lg); }

/* ── KPI strip ── */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); margin-bottom: 16px; overflow: hidden; }
.kpi { padding: 16px 18px; border-left: 1px solid var(--line); }
.kpi:first-child { border-left: 0; }
.kpi span { display: block; color: var(--ink-2); font-size: .88rem; }
.kpi b { display: block; font-family: var(--f-head); font-size: 1.55rem; margin-top: 2px; font-variant-numeric: tabular-nums; }
.kpi em { font-style: normal; font-size: .82rem; color: var(--ink-2); }
.kpi b.neg { color: var(--berry); }
@media (max-width: 860px) {
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi:nth-child(3) { border-left: 0; }
  .kpi:nth-child(n+3) { border-top: 1px solid var(--line); }
  .kpi b { font-size: 1.3rem; }
}

/* ── Forms ── */
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 13px; min-width: 0; }
.field > span { font-weight: 700; font-size: .9rem; }
.field small { color: var(--ink-2); }
input:not([type=checkbox]):not([type=file]), select, textarea {
  width: 100%; border: 1px solid var(--line); background: var(--surface-2); border-radius: var(--r-md);
  padding: 10px 12px; min-height: 44px; }
textarea { resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); background: var(--surface); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 22%, transparent); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 560px) { .three { grid-template-columns: 1fr 1fr; } .three > :last-child { grid-column: span 2; } }
.check { display: flex; gap: 10px; align-items: center; font-weight: 700; margin: 6px 0 12px; }
.check input { width: 20px; height: 20px; accent-color: var(--primary); }

/* ── Toolbar ── */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; align-items: center; }
.search { position: relative; flex: 1 1 220px; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-2); }
.search input { padding-left: 40px !important; background: var(--surface) !important; }
.toolbar select { width: auto; flex: 0 1 190px; background: var(--surface); }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 3px; overflow-x: auto; max-width: 100%; }
.seg button { border: 0; background: transparent; padding: 7px 14px; border-radius: 999px; font-weight: 700; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.seg button.on { background: var(--primary); color: var(--on-primary); }

/* ── Product grid ── */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.pcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; text-decoration: none; color: inherit; display: flex; flex-direction: column; }
.pcard:hover { border-color: var(--ink-2); }
.pimg { aspect-ratio: 4/3; background: var(--surface-2); display: grid; place-items: center; position: relative; color: var(--ink-2); }
.pimg img { width: 100%; height: 100%; object-fit: cover; }
.pimg svg.i { width: 44px; height: 44px; opacity: .5; }
.pimg .badge { position: absolute; top: 10px; left: 10px; }
.pbody { padding: 13px 15px 15px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.pbody h3 { font-size: 1.04rem; }
.pmeta { display: flex; gap: 12px; color: var(--ink-2); font-size: .86rem; flex-wrap: wrap; }
.pprice { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 8px; }
.pprice b { font-size: 1.12rem; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) {
  .pgrid { grid-template-columns: 1fr; gap: 10px; }
  .pcard { flex-direction: row; }
  .pimg { aspect-ratio: auto; width: 104px; flex: none; }
  .pimg .badge { display: none; }
}
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: .8rem; font-weight: 700; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.chip.good { background: color-mix(in srgb, var(--good) 16%, transparent); color: var(--good); }
.chip.ok { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.chip.bad { background: color-mix(in srgb, var(--berry) 15%, transparent); color: var(--berry); }
.badge { padding: 3px 9px; border-radius: 999px; font-size: .76rem; font-weight: 700; background: var(--surface); color: var(--ink); border: 1px solid var(--line); }

/* ── Lists (materials, tools, time, sales) ── */
.list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.list-group { padding: 14px 18px 6px; font-family: var(--f-head); font-weight: 700; color: var(--ink-2); background: var(--surface-2); border-top: 1px solid var(--line); display: flex; justify-content: space-between; }
.list-group:first-child { border-top: 0; }
.row { display: flex; gap: 14px; align-items: center; padding: 12px 18px; border-top: 1px solid var(--line); text-decoration: none; color: inherit; }
.list-group + .row { border-top: 0; }
.row:first-child { border-top: 0; }
a.row:hover, .row.click:hover { background: var(--surface-2); cursor: pointer; }
.thumb { width: 48px; height: 48px; border-radius: var(--r-sm); background: var(--surface-2); flex: none; display: grid; place-items: center; overflow: hidden; color: var(--ink-2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.row-main { flex: 1; min-width: 0; }
.row-main b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-main small { color: var(--ink-2); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-end { text-align: right; flex: none; font-variant-numeric: tabular-nums; }
.row-end small { display: block; color: var(--ink-2); }
.stock-low { color: var(--berry); font-weight: 700; }
.qbtns { display: flex; gap: 4px; }

/* ── Product editor ── */
.edit-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.col-main, .col-side { display: grid; gap: 16px; }
.col-side { position: sticky; top: 20px; }
@media (max-width: 1000px) { .edit-grid { grid-template-columns: 1fr; } .col-side { position: static; } }
.img-row { display: grid; grid-template-columns: 170px 1fr; gap: 16px; }
@media (max-width: 560px) { .img-row { grid-template-columns: 1fr; } }
.imgpick { display: flex; flex-direction: column; gap: 6px; }
.imgpick-preview { aspect-ratio: 1; border: 2px dashed var(--line); border-radius: var(--r-lg); display: grid; place-items: center; cursor: pointer; overflow: hidden; background: var(--surface-2); color: var(--ink-2); text-align: center; }
.imgpick-preview:hover { border-color: var(--primary); color: var(--primary); }
.imgpick-preview img { width: 100%; height: 100%; object-fit: cover; }
.imgpick-preview span { display: flex; flex-direction: column; align-items: center; gap: 6px; font-weight: 700; font-size: .9rem; }
.imgpick-preview svg.i { width: 30px; height: 30px; }
.imgpick.busy .imgpick-preview { opacity: .5; pointer-events: none; }
@media (max-width: 560px) { .imgpick-preview { aspect-ratio: 16/10; } }

.mrow { display: grid; grid-template-columns: minmax(0, 1fr) 150px 86px 40px; gap: 8px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.mrow:first-child { border-top: 0; }
.qty { position: relative; }
.qty input { padding-right: 62px !important; }
.qty span { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--ink-2); font-size: .82rem; pointer-events: none; }
.mcost { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }
@media (max-width: 560px) {
  .mrow { grid-template-columns: 1fr 40px; }
  .mrow select { grid-column: 1 / -1; }
  .mrow .mcost { text-align: left; }
  .mrow .qty { grid-column: 1; }
  .mrow .mcost { grid-row: 3; }
  .mrow .icon-btn { grid-row: 2; grid-column: 2; }
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tchip { border: 1px solid var(--line); background: var(--surface-2); padding: 8px 13px; border-radius: 999px; cursor: pointer; font-weight: 700; color: var(--ink-2); }
.tchip small { font-weight: 400; }
.tchip.on { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }

.calc dl { display: grid; grid-template-columns: 1fr auto; gap: 7px 12px; margin: 4px 0 0; font-variant-numeric: tabular-nums; }
.calc dt { color: var(--ink-2); }
.calc dd { margin: 0; text-align: right; }
.calc .tot { font-weight: 700; color: var(--ink); padding-top: 8px; border-top: 1px solid var(--line); }
.suggest { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 11px 13px; background: var(--surface-2); border-radius: var(--r-md); flex-wrap: wrap; }
.suggest span { flex: 1; color: var(--ink-2); font-size: .92rem; }
.suggest b { font-variant-numeric: tabular-nums; }
.result { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; margin-top: 12px; }
.result div { padding: 10px; border-radius: var(--r-md); background: var(--surface-2); }
.result span { display: block; font-size: .78rem; color: var(--ink-2); line-height: 1.25; }
.result b { font-variant-numeric: tabular-nums; font-size: 1.02rem; }
.result.good b { color: var(--good); }
.result.bad b { color: var(--berry); }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; margin: 0; font-variant-numeric: tabular-nums; }
.kv dt { color: var(--ink-2); }
.kv dd { margin: 0; text-align: right; font-weight: 700; }
.save-bar { position: sticky; bottom: 12px; }
@media (max-width: 860px) { .save-bar { bottom: calc(80px + env(safe-area-inset-bottom)); } }
.moves { margin: 0; padding: 0; list-style: none; }
.moves li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); font-size: .9rem; }
.moves li:first-child { border-top: 0; }
.plus { color: var(--good); font-weight: 700; }
.minus { color: var(--berry); font-weight: 700; }

/* ── Timer ── */
.timer-card { display: flex; flex-direction: column; gap: 12px; }
.timer-card.running { background: var(--mustard); border-color: var(--mustard); color: var(--on-mustard); }
.timer-card .big { font-family: var(--f-head); font-size: 2.6rem; font-variant-numeric: tabular-nums; line-height: 1; }
.timer-card .what { font-weight: 700; }
.timer-card.running .btn { background: var(--on-mustard); color: var(--mustard); border-color: var(--on-mustard); }
.timer-pill { position: fixed; right: 18px; bottom: 18px; z-index: 40; display: flex; align-items: center; gap: 10px; background: var(--mustard); color: var(--on-mustard); padding: 8px 8px 8px 16px; border-radius: 999px; font-weight: 700; box-shadow: 0 6px 20px rgba(0,0,0,.18); max-width: calc(100vw - 36px); }
.timer-pill .t { font-variant-numeric: tabular-nums; font-family: var(--f-head); font-size: 1.1rem; }
.timer-pill .what { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; font-size: .9rem; }
.timer-pill .btn { background: var(--on-mustard); color: var(--mustard); border: 0; }
.timer-pill .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--on-mustard); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .timer-pill .dot { animation: none; } }
@media (max-width: 860px) { .timer-pill { left: 12px; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); } .timer-pill .what { flex: 1; max-width: none; } }
.timer-pill[hidden] { display: none; }

/* ── Charts ── */
.bars { display: grid; gap: 11px; }
.bar-top { display: flex; justify-content: space-between; gap: 10px; font-size: .92rem; margin-bottom: 4px; }
.bar-top b { font-variant-numeric: tabular-nums; }
.bar { height: 9px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--primary); border-radius: 999px; }
.cols { display: flex; align-items: flex-end; gap: 6px; height: 170px; padding-top: 10px; }
.col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; min-width: 0; }
.col-bar { width: 100%; max-width: 38px; background: var(--primary); border-radius: 5px 5px 2px 2px; min-height: 2px; }
.col.cur .col-bar { background: var(--mustard); }
.col span { font-size: .72rem; color: var(--ink-2); }
table.tbl { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.tbl th { text-align: left; font-size: .84rem; color: var(--ink-2); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 10px; border-bottom: 1px solid var(--line); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .r { text-align: right; }
.tbl-wrap { overflow-x: auto; }

/* ── Auth ── */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-art { display: flex; flex-direction: column; justify-content: flex-end; padding: 48px; }
.auth-art h1 { font-size: clamp(2.2rem, 1.5rem + 2.6vw, 3.6rem); max-width: 12ch; }
.auth-art p { max-width: 38ch; opacity: .88; font-size: 1.08rem; }
.auth-form { display: grid; place-items: center; padding: 32px 20px; }
.auth-form form { width: 100%; max-width: 380px; }
.auth-form h2 { font-size: 1.5rem; margin-bottom: 6px; }
.auth-form .lead { color: var(--ink-2); margin: 0 0 22px; }
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .auth-art { padding: 36px 22px 28px; min-height: 34vh; }
}

/* ── Dialog ── */
dialog { border: 0; padding: 0; border-radius: var(--r-lg); background: var(--surface); color: var(--ink); width: min(520px, calc(100vw - 24px)); max-height: calc(100vh - 40px); }
dialog::backdrop { background: rgba(10, 20, 15, .45); }
.dlg-form { display: flex; flex-direction: column; max-height: calc(100vh - 40px); }
.dlg-form header { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px 6px; }
.dlg-body { padding: 8px 18px; overflow-y: auto; }
.dlg-form footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px 16px; border-top: 1px solid var(--line); }
@media (max-width: 560px) {
  dialog { margin: auto 0 0; width: 100vw; max-width: 100vw; border-radius: var(--r-lg) var(--r-lg) 0 0; }
  .dlg-form footer { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
  .dlg-form footer .btn { flex: 1; }
}

/* ── Toasts ── */
#toasts { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 100; display: grid; gap: 8px; width: min(420px, calc(100vw - 24px)); }
.toast { background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: var(--r-md); font-weight: 700; box-shadow: 0 6px 20px rgba(0,0,0,.2); transition: opacity .3s, transform .3s; }
.toast.err { background: var(--berry); color: #fff; }
.toast.out { opacity: 0; transform: translateY(-6px); }

.more-list a.row { font-weight: 700; padding: 16px 18px; }
.loading { color: var(--ink-2); padding: 30px 0; }
.hide-m { }
@media (max-width: 860px) { .hide-m { display: none !important; } }

/* ── Feinschliff nach Sichtprüfung ── */
.stack { align-content: start; }
body.has-pill .save-bar { bottom: 82px; }
@media (max-width: 860px) {
  body.has-pill .save-bar { bottom: calc(144px + env(safe-area-inset-bottom)); }
  body.has-pill .view { padding-bottom: calc(176px + env(safe-area-inset-bottom)); }
  .toolbar select { flex: 1 1 40%; }
}
@media (max-width: 560px) {
  .row { gap: 10px; padding: 11px 14px; }
  .thumb { width: 40px; height: 40px; }
  .row-end small.unit-price { display: none; }
  .qbtns .icon-btn { width: 36px; height: 36px; }
}

/* ── Theme-Auswahl ── */
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.theme-opt { border: 2px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); cursor: pointer; text-align: left; padding: 0; color: var(--ink); }
.theme-opt:hover { border-color: var(--ink-2); }
.theme-opt.on { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary); }
.theme-prev { display: grid; grid-template-columns: 34% 1fr; height: 78px; }
.theme-prev .tp-side { background-size: 12px 15px; }
.theme-prev .tp-main { padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.theme-prev .tp-card { flex: 1; border-radius: 6px; display: flex; align-items: center; gap: 6px; padding: 0 8px; }
.theme-prev .tp-dot { width: 14px; height: 14px; border-radius: 50%; }
.theme-prev .tp-bar { height: 6px; border-radius: 3px; flex: 1; }
.theme-meta { padding: 10px 12px 12px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.theme-meta b { display: block; }
.theme-meta small { color: var(--ink-2); display: block; line-height: 1.3; }
.theme-meta svg.i { color: var(--primary); flex: none; }
.theme-opt { position: relative; }
.theme-meta svg.i { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; padding: 4px; border-radius: 50%; background: var(--primary); color: var(--on-primary); stroke-width: 2.6; }

/* ── Bildergalerie ── */
.gal { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.gal-item { position: relative; margin: 0; aspect-ratio: 1; border-radius: var(--r-md); overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.gal-item.main { grid-column: span 2; grid-row: span 2; border: 2px solid var(--primary); }
.gal-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gal-badge { position: absolute; left: 8px; top: 8px; background: var(--primary); color: var(--on-primary); font-size: .74rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.gal-badge.ext { left: auto; right: 8px; top: auto; bottom: 8px; background: var(--surface); color: var(--ink-2); border: 1px solid var(--line); }
.gal-tools { position: absolute; right: 6px; top: 6px; display: flex; gap: 4px; }
.gal-btn { width: 32px; height: 32px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; background: color-mix(in srgb, var(--surface) 88%, transparent); color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.18); }
.gal-btn svg.i { width: 17px; height: 17px; }
.gal-btn:hover { background: var(--surface); color: var(--primary); }
@media (hover: hover) { .gal-tools { opacity: 0; transition: opacity .15s; } .gal-item:hover .gal-tools, .gal-item:focus-within .gal-tools { opacity: 1; } }
.gal-add { aspect-ratio: 1; border: 2px dashed var(--line); border-radius: var(--r-md); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; cursor: pointer; color: var(--ink-2); font-weight: 700; font-size: .86rem; text-align: center; padding: 8px; background: var(--surface-2); }
.gal-add:hover { border-color: var(--primary); color: var(--primary); }
.gal-add.busy { pointer-events: none; opacity: .7; }
.gal-add svg.i { width: 28px; height: 28px; }
@media (max-width: 560px) { .gal { grid-template-columns: repeat(3, 1fr); gap: 8px; } }

/* ── Varianten ── */
.vrow { display: grid; grid-template-columns: minmax(0, 180px) minmax(0, 1fr) 40px; gap: 8px; align-items: center; margin-bottom: 8px; }
@media (max-width: 560px) { .vrow { grid-template-columns: 1fr 40px; } .vrow [data-f=v] { grid-column: 1; grid-row: 2; } .vrow .icon-btn { grid-row: 1 / span 2; grid-column: 2; } }

/* ── Import ── */
.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 210px; border: 2px dashed var(--line); cursor: pointer; text-align: center; background: var(--surface); }
.drop:hover, .drop.over { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 6%, var(--surface)); }
.drop svg.i { width: 40px; height: 40px; color: var(--primary); }
.drop b { font-family: var(--f-head); font-size: 1.15rem; }
.src-list { margin: 0; }
.src-list dt { font-weight: 700; margin-top: 10px; }
.src-list dt:first-child { margin-top: 0; }
.src-list dd { margin: 2px 0 0; color: var(--ink-2); font-size: .93rem; }
.linkbtn { display: inline-flex; align-items: center; gap: 5px; border: 0; background: none; padding: 0; color: var(--primary); font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.linkbtn svg.i { width: 16px; height: 16px; }
.imp-top { margin-bottom: 16px; }
.note { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; margin-bottom: 16px; border-radius: var(--r-md); background: color-mix(in srgb, var(--mustard) 16%, var(--surface)); border: 1px solid color-mix(in srgb, var(--mustard) 45%, var(--line)); }
.imp-stats { display: grid; grid-template-columns: repeat(5, 1fr); border: 1px solid var(--line); border-radius: var(--r-md); margin-bottom: 14px; }
.imp-stats div { padding: 10px 14px; border-left: 1px solid var(--line); }
.imp-stats div:first-child { border-left: 0; }
.imp-stats b { display: block; font-family: var(--f-head); font-size: 1.4rem; font-variant-numeric: tabular-nums; }
.imp-stats span { color: var(--ink-2); font-size: .85rem; }
@media (max-width: 560px) { .imp-stats { grid-template-columns: repeat(3, 1fr); } .imp-stats div:nth-child(4) { border-left: 0; } .imp-stats div:nth-child(n+4) { border-top: 1px solid var(--line); } }
.imp-warn { margin: 0 0 14px; padding: 12px 16px 12px 32px; border-radius: var(--r-md); background: color-mix(in srgb, var(--mustard) 14%, var(--surface)); }
.imp-warn li + li { margin-top: 4px; }
.imp-opts { margin-bottom: 10px; }
.imp-opts .check { font-weight: 400; }
.imp-tbl td { vertical-align: middle; }
.imp-tbl .thumb { width: 44px; height: 44px; }
.imp-title { display: block; max-width: 44ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.imp-tbl small { display: block; }
.imp-tbl tr.bad td { opacity: .6; }
.imp-go { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; position: sticky; bottom: 12px; }
@media (max-width: 860px) { .imp-go { bottom: calc(80px + env(safe-area-inset-bottom)); } .imp-title { max-width: 22ch; } }
.bar.big { height: 14px; }
.imp-errs { margin: 6px 0 0; padding-left: 18px; }
.imp-go { background: var(--surface); padding: 12px 0 4px; border-top: 1px solid var(--line); margin-top: 12px; }
h1.long { font-size: clamp(1.25rem, 1rem + .9vw, 1.6rem); max-width: 60ch; }
@media (max-width: 560px) { .drop { min-height: 140px; } }
.nowrap { white-space: nowrap; }
@media (max-width: 560px) {
  .imp-go { flex-wrap: wrap; }
  .imp-go .btn { flex: 1 1 auto; }
  .imp-go .btn.primary { order: -1; flex-basis: 100%; }
}
@media (max-width: 860px) { .imp-go { position: static; } }
@media (max-width: 560px) {
  .imp-opts .seg { display: flex; width: 100%; }
  .imp-opts .seg button { flex: 1; padding: 7px 6px; font-size: .9rem; }
}
.imp-opts .check { flex-wrap: wrap; row-gap: 0; }
.imp-opts .check small { flex-basis: 100%; padding-left: 30px; }
.pbody h3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

[hidden] { display: none !important; }

/* ── Handwerksbereiche ── */
.craft-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.craft { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); display: flex; flex-direction: column; }
.craft.on { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 7%, var(--surface)); }
.craft-main { display: flex; gap: 10px; align-items: flex-start; padding: 12px; cursor: pointer; flex: 1; }
.craft-main input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.craft-box { width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--line); background: var(--surface); flex: none; display: grid; place-items: center; margin-top: 1px; }
.craft-box svg.i { width: 15px; height: 15px; stroke-width: 3; opacity: 0; }
.craft.on .craft-box { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.craft.on .craft-box svg.i { opacity: 1; }
.craft-main input:focus-visible + .craft-box { outline: 3px solid var(--mustard); outline-offset: 2px; }
.craft-main b { display: block; line-height: 1.25; }
.craft-main small { display: block; color: var(--ink-2); line-height: 1.3; margin-top: 2px; }
.craft-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 0 12px 10px 44px; flex-wrap: wrap; }
.craft-foot .linkbtn { font-size: .88rem; margin-left: auto; }
.craft-add { flex-direction: row; align-items: center; justify-content: center; gap: 8px; min-height: 72px; border-style: dashed; color: var(--ink-2); font-weight: 700; cursor: pointer; background: transparent; }
.craft-add:hover { border-color: var(--primary); color: var(--primary); }
.eff { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.eff summary { cursor: pointer; font-weight: 700; color: var(--primary); }
.eff-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px 20px; margin-top: 14px; }
.eff-grid h3 { font-size: .9rem; color: var(--ink-2); margin-bottom: 6px; }
.eff-grid .chip { font-weight: 400; color: var(--ink); }
.gen-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 4px 20px; }
.danger-link { color: var(--berry); margin-top: 6px; }

/* ── Chip-Listen ── */
.chipedit { display: flex; flex-wrap: wrap; gap: 6px; padding: 7px; min-height: 46px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); cursor: text; align-items: center; }
.chipedit:focus-within { border-color: var(--primary); background: var(--surface); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 22%, transparent); }
.chipedit.ro { cursor: default; }
.cchip { display: inline-flex; align-items: center; gap: 2px; padding: 4px 4px 4px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .9rem; }
.chipedit.ro .cchip { padding-right: 10px; }
.cchip button { width: 22px; height: 22px; border: 0; background: none; border-radius: 50%; display: grid; place-items: center; cursor: pointer; color: var(--ink-2); padding: 0; }
.cchip button:hover { background: var(--surface-2); color: var(--berry); }
.cchip button svg.i { width: 14px; height: 14px; }
input.cchip-in { flex: 1 1 140px; border: 0 !important; background: transparent !important; box-shadow: none !important; min-height: 30px !important; padding: 2px 6px !important; }

/* ── Auswahl mit Plus-Knopf ── */
.sel-plus { display: flex; gap: 6px; }
.sel-plus select { flex: 1; min-width: 0; }
.sel-plus .btn { padding: 0 12px; }
.field > .seg { align-self: flex-start; }
.craft-foot { padding-left: 12px; }

/* ── Gebühren & Verkaufsimport ── */
.fee-tbl input { min-height: 38px !important; padding: 6px 8px !important; max-width: 120px; }
.fee-tbl td { padding: 6px 8px; }
.ch-tbl { margin-top: 12px; font-size: .9rem; }
.ch-tbl th, .ch-tbl td { padding: 6px 4px; }
.neg-t { color: var(--berry); font-weight: 700; }
.privacy { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 14px; padding: 10px 12px; border-radius: var(--r-md); background: color-mix(in srgb, var(--good) 12%, var(--surface)); font-size: .92rem; }
.privacy svg.i { color: var(--good); flex: none; margin-top: 1px; }
.imp-tbl select { min-height: 38px; padding: 6px 8px; max-width: 340px; }
.imp-tbl select.suggest-sel { border-color: var(--mustard); background: color-mix(in srgb, var(--mustard) 10%, var(--surface)); }
.imp-stats b { white-space: nowrap; }
@media (max-width: 560px) { .imp-stats b { font-size: 1.05rem; } .imp-tbl select { max-width: 160px; } }

/* ── Barrierefreiheit (axe-core) ── */
.pbody h2.ptitle { font-size: 1.04rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 860px) {
  .lbl-m { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
}
html:not([data-dark]) .chip.ok { color: color-mix(in srgb, var(--warn) 62%, #000); }
html:not([data-dark]) .chip.good { color: color-mix(in srgb, var(--good) 72%, #000); }
.tbl-wrap:focus-visible { outline: 3px solid var(--mustard); outline-offset: 2px; }

/* Bestellungen, Wareneingang, Partien */
.poline { display: grid; grid-template-columns: minmax(0, 1fr) 110px 130px 40px; gap: 8px; align-items: end; padding-bottom: 6px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.poline .field { margin-bottom: 0; }
.poline .icon-btn { margin-bottom: 4px; }
@media (max-width: 560px) { .poline { grid-template-columns: 1fr 1fr 40px; } .poline > :first-child { grid-column: 1 / -1; } }
.recv-row { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px 0; margin: 10px 0 0; min-width: 0; }
.recv-row legend { font-weight: 700; padding: 0 4px; }
.card details summary { cursor: pointer; color: var(--primary); font-weight: 600; padding: 6px 0; }
.moves li small a { color: inherit; }
.print-only { display: none; }
@media print {
  @page { margin: 16mm; }
  body { background: #fff !important; color: #000; }
  .side, .bottom, .mobile-top, .timer-pill, .page-head, .back, #pof, dialog, .toast { display: none !important; }
  .shell, main, .view { display: block !important; padding: 0 !important; margin: 0 !important; }
  .print-only { display: block; font: 11pt/1.45 system-ui, sans-serif; }
  .print-only h1 { font-size: 18pt; margin: 0 0 2mm; }
  .print-only table { width: 100%; border-collapse: collapse; margin: 6mm 0; }
  .print-only th, .print-only td { border-bottom: 1px solid #999; padding: 2mm 1.5mm; text-align: left; }
  .print-only .r { text-align: right; }
  .print-only tfoot td { border-bottom: 0; }
}

/* Produktsicherheit */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
label.tchip { display: inline-flex; align-items: center; gap: 6px; }
.tchip:focus-within { outline: 3px solid var(--mustard); outline-offset: 2px; }
.notice { border-left: 4px solid var(--warn); background: color-mix(in srgb, var(--warn) 9%, var(--surface)); }
.notice.bad { border-left-color: var(--berry); background: color-mix(in srgb, var(--berry) 8%, var(--surface)); }
.notice ul { margin: 6px 0 0; padding-left: 18px; }
.hz { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px 2px; margin-bottom: 10px; }
.hz.off { background: var(--surface-2); }
.hz.off .hz-a { display: none; }
.hz-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.hz-head .check { margin: 0; font-weight: 700; }
.hz-grid { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 0 10px; }
.hz-grid.hz-a { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.hz.off .hz-grid { grid-template-columns: 1fr; }
@media (max-width: 560px) { .hz-grid, .hz-grid.hz-a { grid-template-columns: 1fr; } }
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: flex; gap: 8px; align-items: flex-start; padding: 5px 0; border-bottom: 1px solid var(--line); }
.checklist li:last-child { border-bottom: 0; }
.checklist li .i { flex: none; width: 18px; height: 18px; margin-top: 2px; }
.checklist li.ok .i { color: var(--good); }
.checklist li.miss .i { color: var(--berry); }
.checklist li.opt .i { color: var(--warn); }
.checklist small { display: block; color: var(--ink-2); font-size: .82rem; }
.stack-s { display: grid; gap: 8px; }
.stack-s .btn { justify-content: flex-start; }
.pre { white-space: pre-wrap; font: .85rem/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--surface-2); border-radius: 10px; padding: 10px 12px; margin: 0; max-height: 280px; overflow: auto; }
.tchip.on small { color: var(--on-primary); }
.pre:focus-visible { outline: 3px solid var(--mustard); outline-offset: 2px; }
.err-box h1 { font-size: 1.3rem; margin: 0 0 8px; }
html:not([data-dark]) .chip.bad { color: color-mix(in srgb, var(--berry) 78%, #000); }

/* Einstellungen: Tabs */
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: thin; border-bottom: 1px solid var(--line); margin: 0 0 18px; padding: 0 2px; }
.tabs [role=tab] { flex: none; background: none; border: 0; border-bottom: 3px solid transparent; padding: 10px 14px 9px; font: inherit; font-weight: 700; color: var(--ink-2); cursor: pointer; border-radius: 8px 8px 0 0; }
.tabs [role=tab]:hover { color: var(--ink); background: var(--surface-2); }
.tabs [role=tab][aria-selected=true] { color: var(--primary); border-bottom-color: var(--primary); }
.tabs [role=tab]:focus-visible { outline: 3px solid var(--mustard); outline-offset: -3px; }
.tab-panel > .card + .card, .tab-panel > section + section { margin-top: 16px; }
.switch { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; cursor: pointer; }
.switch input { width: 40px; height: 22px; appearance: none; border-radius: 999px; background: var(--line); position: relative; cursor: pointer; transition: background .15s; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked { background: var(--primary); }
.switch input:checked::after { transform: translateX(18px); }
.switch input:focus-visible { outline: 3px solid var(--mustard); outline-offset: 2px; }
.co-sum { background: var(--surface-2); border-radius: 12px; padding: 12px 14px; line-height: 1.55; }
.card h3 { margin: 16px 0 6px; }
html[data-dark] .chip.bad { color: color-mix(in srgb, var(--berry) 55%, #fff); }

/* Scannen */
.scan-card { display: grid; gap: 14px; }
.scan-lot { margin: 0; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--mustard) 16%, var(--surface)); }
.scan-stock { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.scan-stock b { font-size: 2rem; }
.scan-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.scan-actions .btn { justify-content: center; min-height: 56px; }
@media (max-width: 560px) { .scan-actions { grid-template-columns: 1fr; } }
.moves li.hl { background: color-mix(in srgb, var(--mustard) 14%, transparent); border-radius: 8px; padding-left: 6px; padding-right: 6px; }
.scan-set { display: grid; grid-template-columns: minmax(0, 1fr) 180px; gap: 18px; align-items: start; }
.scan-qr { margin: 0; text-align: center; }
.scan-qr img { background: #fff; border-radius: 10px; padding: 6px; width: 160px; height: 160px; }
@media (max-width: 560px) { .scan-set { grid-template-columns: 1fr; } }

/* Verkaufskanäle in den Firmenangaben */
.channels { border: 0; padding: 0; margin: 4px 0 16px; min-width: 0; }
.channels legend { font-weight: 700; font-size: .9rem; padding: 0; margin-bottom: 4px; }
.channels > p { margin: 0 0 10px; }
.ch-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.ch-list > p { margin: 0; }
.ch-row { display: grid; grid-template-columns: minmax(150px, 210px) 2fr 1fr auto; gap: 8px; align-items: start; }
.ch-row .field { margin: 0; }
.ch-act { display: flex; gap: 4px; }
@media (max-width: 720px) {
  .ch-row { grid-template-columns: 1fr auto; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
  .ch-row .field:nth-child(2), .ch-row .field:nth-child(3) { grid-column: 1 / -1; }
  .ch-act { grid-row: 1; grid-column: 2; }
}

/* Betreiber: Einladungslink */
.invite-box { margin-top: 16px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.invite-box > p { margin: 0 0 10px; }
.invite-box input[readonly] { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; }

/* Support-Ansicht (Betreiber, nur lesend) */
.support-banner { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; padding: 10px 14px; border-radius: 10px;
  background: var(--mustard); color: var(--on-mustard); }
.support-banner svg { flex: none; width: 20px; height: 20px; }
.support-banner span { flex: 1; }
.support-banner .btn { background: var(--surface); color: var(--ink); }

/* Betreiber-Konsole */
.qr-box { width: 200px; height: 200px; margin: 6px auto 14px; background: #fff; padding: 8px; border-radius: 10px; }
.qr-box svg { width: 100%; height: 100%; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .03em; }
.codes { columns: 2; padding-left: 1.4em; margin: 0 0 14px; }
.codes li { margin: 0 0 6px; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .field { margin: 0; }
.toolbar .grow { flex: 1 1 260px; }
.dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0 0 10px; }
.dl dt { color: var(--ink-2); }
.dl dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.check { display: flex; gap: 8px; align-items: flex-start; }
.steps { padding-left: 1.3em; margin: 0 0 8px; }
.steps li { margin-bottom: 4px; }
