/* Priohair-Design (Theme-Einstellungen des Shops): DM Sans, #f6f6f6 Grund, weiße Karten,
   Schwarz als Aktionsfarbe, Gelb #f8e077 als Hervorhebung, Buttons 4 px, Karten 10 px, Pillen 40 px. */

@font-face { font-family: "DM Sans"; font-weight: 400; font-display: swap; src: url("/vendor/dm-sans-400.woff2") format("woff2"); }
@font-face { font-family: "DM Sans"; font-weight: 500; font-display: swap; src: url("/vendor/dm-sans-500.woff2") format("woff2"); }
@font-face { font-family: "DM Sans"; font-weight: 700; font-display: swap; src: url("/vendor/dm-sans-700.woff2") format("woff2"); }

:root {
  --bg: #f6f6f6; --surface: #ffffff; --surface-2: #f3f3f3; --line: #e3e3e3;
  --fg: #000000; --muted: #5c5c5c; --accent: #000000; --accent-fg: #ffffff; --accent-soft: #fdf6d6;
  --hl: #f8e077; --hl-fg: #000000;
  --ok: #1a7f3c; --ok-soft: #e6f4ea; --warn: #7a5a00; --warn-soft: #fdf3c4; --bad: #c0262d;
  --font: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r: 10px; --r-btn: 4px; --r-pill: 40px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121212; --surface: #1c1c1c; --surface-2: #242424; --line: #333333;
    --fg: #ffffff; --muted: #a8a8a8; --accent: #ffffff; --accent-fg: #121212; --accent-soft: #2e2a16;
    --ok: #5fcf8a; --ok-soft: #173222; --warn: #f8e077; --warn-soft: #2e2a16; --bad: #ff8a8f;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font); font-size: 15px; line-height: 1.5; padding-bottom: env(safe-area-inset-bottom, 0px); }
[hidden] { display: none !important; }
img { max-width: 100%; }
h1, h2, h3 { font-weight: 700; margin: 0; text-wrap: balance; }
h1 { font-size: 1.6rem; letter-spacing: -.02em; }
h2 { font-size: 1.05rem; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.brandbar { background: #000; color: #fff; padding-top: env(safe-area-inset-top, 0px); }
.brandbar-in { max-width: 1180px; margin: 0 auto; padding: 12px max(16px, env(safe-area-inset-right, 0px)) 12px max(16px, env(safe-area-inset-left, 0px)); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.logo { height: 21px; width: auto; display: block; }
.bb-sub { font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; opacity: .75; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 20px max(16px, env(safe-area-inset-right, 0px)) 48px max(16px, env(safe-area-inset-left, 0px)); }
.center { text-align: center; padding-top: 80px; }
.login { max-width: 440px; padding-top: 48px; }
.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.sub { color: var(--muted); font-size: .9rem; margin-top: 2px; max-width: 60ch; }
.demo-badge { font-size: .78rem; font-weight: 700; background: var(--hl); color: var(--hl-fg); padding: 6px 10px; border-radius: var(--r-pill); }
.grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
@media (max-width: 900px) { .grid { grid-template-columns: minmax(0, 1fr); } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.label { font-size: .72rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; display: block; }
.hint { font-size: .82rem; color: var(--muted); margin: 0; }
.err { font-size: .85rem; color: var(--bad); min-height: 1em; margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: inherit; font-size: .88rem; border: 1px solid var(--line); background: var(--surface); color: var(--fg); padding: 6px 13px; border-radius: var(--r-pill); cursor: pointer; white-space: nowrap; }
.chip small { color: var(--muted); font-variant-numeric: tabular-nums; margin-left: 4px; }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); font-weight: 700; }
.chip[aria-pressed="true"] small { color: inherit; opacity: .8; }
input[type=text], input[type=search], input[type=password], textarea, select { font: inherit; font-size: 16px; width: 100%; border: 1px solid #bdbdbd; background: var(--surface); color: var(--fg); border-radius: var(--r-btn); padding: 10px 12px; }
textarea { resize: vertical; min-height: 64px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .row2 { grid-template-columns: 1fr; } }

/* Kunde */
.customer-wrap { position: relative; }
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-btn); box-shadow: 0 8px 24px rgba(0,0,0,.12); z-index: 10; overflow: hidden; }
.suggest button { all: unset; box-sizing: border-box; display: block; width: 100%; padding: 9px 12px; cursor: pointer; border-bottom: 1px solid var(--line); }
.suggest button:last-child { border-bottom: 0; }
.suggest button:hover, .suggest button:focus-visible { background: var(--surface-2); }
.suggest small { color: var(--muted); display: block; font-size: .78rem; }
.picked { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; background: var(--accent-soft); border-radius: var(--r-btn); padding: 8px 10px; font-size: .9rem; }

/* Suche */
.finder { position: sticky; top: 0; z-index: 5; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 14px 12px; display: flex; flex-direction: column; gap: 10px; }
@media (max-width: 900px) { .finder { position: static; } }
.searchrow { display: flex; gap: 8px; }
.searchbox { position: relative; flex: 1; min-width: 0; }
.searchbox input { padding: 12px 12px 12px 42px; border-width: 2px; border-color: var(--line); }
.searchbox input:focus { border-color: var(--accent); outline: none; }
.searchbox .ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.scanbtn { font: inherit; font-weight: 700; display: flex; align-items: center; gap: 6px; border: 0; background: var(--accent); color: var(--accent-fg); border-radius: var(--r-btn); padding: 0 14px; cursor: pointer; }
@media (max-width: 420px) { .scanbtn span { display: none; } }
.cats { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.filters select { width: auto; min-width: 160px; padding: 7px 10px; font-size: 15px; }
.toggle { display: flex; align-items: center; gap: 6px; font-size: .9rem; cursor: pointer; }
.toggle input { accent-color: var(--accent); width: 18px; height: 18px; }
.resinfo { font-size: .82rem; color: var(--muted); margin-left: auto; }

.quick { display: flex; flex-wrap: wrap; gap: 8px; }
.qp { font: inherit; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); border-radius: var(--r-btn); padding: 6px 10px 6px 6px; cursor: pointer; font-size: .84rem; text-align: left; max-width: 100%; }
.qp:hover { border-color: var(--accent); }
.qp .plus { background: var(--hl); color: var(--hl-fg); border-radius: var(--r-btn); padding: 1px 6px; font-weight: 700; }

/* Produkte */
.plist { display: flex; flex-direction: column; gap: 8px; }
.cathead { font-weight: 700; font-size: .85rem; color: var(--muted); margin: 14px 2px 8px; display: flex; gap: 8px; align-items: baseline; }
.cathead:first-child { margin-top: 0; }
.prod { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.prod-head { all: unset; box-sizing: border-box; display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; padding: 9px 12px; cursor: pointer; }
.prod-head.static { cursor: default; }
.prod-head:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.thumb { width: 48px; height: 48px; border-radius: 8px; border: 1px solid var(--line); display: grid; place-items: center; font-weight: 700; font-size: .72rem; color: var(--muted); background: var(--surface-2); object-fit: cover; flex: none; overflow: hidden; }
.thumb.sm { width: 30px; height: 30px; border-radius: 6px; }
.pname { font-weight: 700; font-size: .96rem; }
.pmeta { font-size: .8rem; color: var(--muted); }
.pright { display: flex; align-items: center; gap: 10px; font-size: .85rem; color: var(--muted); }
.count { background: var(--accent); color: var(--accent-fg); font-weight: 700; font-size: .75rem; border-radius: var(--r-pill); padding: 2px 8px; }
.chev { transition: transform .15s; }
.prod.open .chev { transform: rotate(90deg); }
.variants { display: none; border-top: 1px solid var(--line); background: var(--surface-2); }
.prod.open .variants { display: block; }
.var { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto auto auto; gap: 12px; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.var:last-child { border-bottom: 0; }
.flat { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.flat .var { background: var(--surface); }
.flat .var.first { background: var(--accent-soft); }
.dot { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); flex: none; background: var(--surface-2); object-fit: cover; }
.vname { font-size: .9rem; overflow-wrap: anywhere; }
mark { background: var(--hl); color: var(--hl-fg); border-radius: 3px; padding: 0 1px; }
.vsku { font-size: .75rem; color: var(--muted); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.vstock { font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.vstock.out { color: var(--bad); font-weight: 700; }
.vprice { font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; font-size: .9rem; font-weight: 700; }
.vprice small { display: block; font-weight: 400; font-size: .7rem; color: var(--muted); }
.step { display: flex; align-items: center; border: 1px solid var(--line); border-radius: var(--r-btn); background: var(--surface); }
.step button { font: inherit; width: 36px; height: 36px; border: 0; background: none; color: var(--fg); cursor: pointer; font-size: 1.15rem; touch-action: manipulation; }
.step button:disabled { opacity: .3; cursor: default; }
.step input { width: 38px; border: 0; padding: 0; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; background: none; font-size: 15px; -moz-appearance: textfield; }
.step input::-webkit-inner-spin-button { -webkit-appearance: none; }
.empty { font-size: .9rem; color: var(--muted); padding: 14px; border: 1px dashed var(--line); border-radius: var(--r-btn); text-align: center; }
.more { padding: 10px; text-align: center; }
@media (max-width: 560px) { .var { grid-template-columns: 30px minmax(0, 1fr) auto auto; } .vstock { display: none; } }

/* Bestellzettel */
.slip { position: sticky; top: 16px; }
@media (max-width: 900px) { .slip { position: static; } }
.sliphead { display: flex; justify-content: space-between; align-items: center; }
.linkbtn { font: inherit; background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; padding: 4px; }
.linkbtn.light { color: #fff; }
.lines { display: flex; flex-direction: column; gap: 8px; max-height: 320px; overflow: auto; }
.line { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: start; font-size: .88rem; }
.line .dot { width: 30px; height: 30px; }
.amt { font-variant-numeric: tabular-nums; white-space: nowrap; }
.sums { border-top: 1px solid var(--line); padding-top: 10px; display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-size: .88rem; font-variant-numeric: tabular-nums; }
.sums .muted { color: var(--muted); }
.sums .grandl { font-weight: 700; padding-top: 10px; border-top: 1px solid var(--line); margin-top: 4px; align-self: end; }
.sums .grand { font-weight: 700; font-size: 1.4rem; padding-top: 6px; border-top: 1px solid var(--line); margin-top: 4px; }
.pay { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.payopt { font: inherit; text-align: left; border: 1px solid var(--line); background: var(--surface); color: var(--fg); border-radius: var(--r-btn); padding: 10px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.payopt b { font-size: .92rem; }
.payopt small { font-size: .72rem; color: var(--muted); }
.payopt[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.status-note { font-size: .8rem; padding: 8px 10px; border-radius: var(--r-btn); margin-top: 8px; }
.st-paid { background: var(--ok-soft); color: var(--ok); }
.st-open { background: var(--warn-soft); color: var(--warn); }
.submit { font: inherit; font-weight: 700; font-size: 1rem; letter-spacing: .02em; width: 100%; border: 0; border-radius: var(--r-btn); padding: 14px; background: var(--accent); color: var(--accent-fg); cursor: pointer; }
.submit:hover:not(:disabled) { opacity: .85; }
.submit:disabled { opacity: .45; cursor: not-allowed; }

/* Erfolg */
.okbox { background: var(--ok-soft); color: var(--ok); border-radius: var(--r); padding: 14px 16px; font-weight: 700; }
.done { max-width: 720px; margin: 0 auto; }
.btnrow { display: flex; flex-wrap: wrap; gap: 10px; }
.ghost { font: inherit; border: 1px solid var(--line); background: var(--surface); color: var(--fg); border-radius: var(--r-btn); padding: 10px 14px; cursor: pointer; text-decoration: none; display: inline-block; }

/* Scanner */
.scanner { position: fixed; inset: 0; background: rgba(0,0,0,.85); z-index: 30; display: grid; place-items: center; padding: max(16px, env(safe-area-inset-top, 0px)) 16px max(16px, env(safe-area-inset-bottom, 0px)); }
.scanner-box { width: min(520px, 100%); color: #fff; display: flex; flex-direction: column; gap: 10px; }
.scanner-head { display: flex; justify-content: space-between; align-items: center; }
#scanRegion { width: 100%; background: #000; border-radius: var(--r); overflow: hidden; min-height: 240px; }
#scanRegion video { width: 100% !important; height: auto !important; }
.scanner-hint { font-size: .88rem; opacity: .85; margin: 0; }

.cartbar { display: none; }
@media (max-width: 900px) {
  .cartbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center; gap: 12px; font: inherit; font-size: .95rem; border: 0; background: var(--accent); color: var(--accent-fg); padding: 14px max(16px, env(safe-area-inset-right, 0px)) calc(14px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); cursor: pointer; text-align: left; }
  .cartbar[hidden] { display: none !important; }
  body.has-cartbar .wrap { padding-bottom: 96px; }
  body.has-cartbar .toast { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
}
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--fg); color: var(--bg); padding: 9px 16px; border-radius: var(--r-pill); font-size: .9rem; font-weight: 700; z-index: 40; max-width: calc(100% - 32px); text-align: center; }
.toast.bad { background: var(--bad); color: #fff; }
@media (prefers-reduced-motion: reduce) { .chev { transition: none; } }
