/* Xerus – Stylesheet
   Schrift: Atkinson Hyperlegible (für schnelles Lesen im Betrieb)
   Farben: Tannengrün als Grundton, Ocker als Akzent */

@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("../fonts/ah-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("../fonts/ah-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #eef1ed;
  --surface: #ffffff;
  --surface-2: #f5f7f4;
  --ink: #17201d;
  --muted: #5a6762;
  --line: #d5dcd7;
  --line-strong: #b9c4be;
  --primary: #1e5b4a;
  --primary-hover: #174a3c;
  --primary-ink: #ffffff;
  --primary-soft: #dbeae4;
  --accent: #e2a33b;
  --accent-ink: #3a2706;
  --accent-soft: #fbefd8;
  --danger: #b33d29;
  --danger-soft: #f7e0db;
  --focus: #e2a33b;
  --shadow: 0 1px 2px rgba(23, 32, 29, .06), 0 6px 18px -10px rgba(23, 32, 29, .25);
  --font: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r-panel: 14px;
  --r-ctrl: 10px;
  --r-input: 8px;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #101614;
    --surface: #17201c;
    --surface-2: #1d2723;
    --ink: #e5ebe8;
    --muted: #98a7a0;
    --line: #2a3631;
    --line-strong: #3b4a44;
    --primary: #5fb39a;
    --primary-hover: #74c4ac;
    --primary-ink: #0b1813;
    --primary-soft: #1d3a30;
    --accent: #e8ae4c;
    --accent-ink: #2a1c04;
    --accent-soft: #3a2e19;
    --danger: #e27762;
    --danger-soft: #3d221d;
    --focus: #e8ae4c;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -12px rgba(0, 0, 0, .6);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
[x-cloak] { display: none !important; }
a { color: var(--primary); text-underline-offset: 2px; }
h1, h2, h3 { line-height: 1.2; margin: 0; font-weight: 700; }
h1 { font-size: 1.75rem; letter-spacing: -.01em; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.num { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 1.25rem;
  padding: .7rem max(1.25rem, env(safe-area-inset-left));
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 700; font-size: 1.1rem; color: var(--ink); text-decoration: none; }
.brand img { width: 30px; height: 30px; }
.topnav { display: flex; gap: .25rem; flex: 1; }
.topnav a {
  padding: .45rem .75rem; border-radius: var(--r-ctrl); color: var(--muted); text-decoration: none; font-weight: 700;
}
.topnav a:hover { color: var(--ink); background: var(--surface-2); }
.topnav a[aria-current="page"] { color: var(--ink); background: var(--primary-soft); }
.whoami { display: flex; align-items: center; gap: .75rem; color: var(--muted); font-size: .9rem; }
@media (max-width: 640px) {
  .topbar { flex-wrap: wrap; gap: .5rem; }
  .topnav { order: 3; flex-basis: 100%; overflow-x: auto; }
  .whoami span { display: none; }
}

/* ---------- Seite ---------- */
.page { max-width: 1120px; margin: 0 auto; padding: 1.75rem 1.25rem 4rem; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); margin-top: .25rem; }
.section { margin-top: 2.25rem; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .75rem; flex-wrap: wrap; }
.stack > * + * { margin-top: 1rem; }
.row { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.spacer { flex: 1; }
.cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: start; }
@media (max-width: 860px) { .cols-2 { grid-template-columns: 1fr; } }

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
}
.panel-pad { padding: 1.25rem; }

/* ---------- Event-Kopf mit Reitern ---------- */
.event-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.event-head .logo {
  width: 56px; height: 56px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line);
  object-fit: contain; padding: 4px; flex: none;
}
.event-head .crumbs { font-size: .9rem; color: var(--muted); }
.event-head .crumbs a { color: var(--muted); }
.tabs {
  display: flex; gap: .25rem; overflow-x: auto; border-bottom: 1px solid var(--line);
  margin: 0 -1.25rem 1.75rem; padding: 0 1.25rem; scrollbar-width: none;
}
.tabs a {
  padding: .7rem .9rem; white-space: nowrap; text-decoration: none; color: var(--muted); font-weight: 700;
  border-bottom: 3px solid transparent; margin-bottom: -1px;
}
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.tabs .count {
  display: inline-block; min-width: 1.4em; padding: 0 .35em; margin-left: .3rem; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink); font-size: .75rem; text-align: center;
}

.readonly-note {
  padding: .75rem 1rem; border-radius: var(--r-ctrl); background: var(--surface-2); border: 1px dashed var(--line-strong);
  color: var(--muted); margin-bottom: 1.25rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  min-height: 44px; padding: .55rem 1rem;
  font: inherit; font-weight: 700; line-height: 1.1;
  color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--r-ctrl); cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .12s, border-color .12s, transform .06s;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn.accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); }
.btn.danger:hover { background: var(--danger-soft); }
.btn.danger.solid { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--ink); background: var(--surface-2); }
.btn.sm { min-height: 36px; padding: .35rem .7rem; font-size: .9rem; }
.btn.icon { width: 36px; min-height: 36px; padding: 0; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* ---------- Formulare ---------- */
.field { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.field > span, .label { font-weight: 700; font-size: .92rem; }
.field .hint { color: var(--muted); font-size: .85rem; font-weight: 400; }
.input, select.input, textarea.input {
  width: 100%; min-height: 44px; padding: .55rem .75rem;
  font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: var(--r-input);
}
textarea.input { min-height: 84px; resize: vertical; }
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 25%, transparent); }
.input:disabled { background: var(--surface-2); color: var(--muted); }
.input.money { text-align: right; font-variant-numeric: tabular-nums; }
.input-affix { position: relative; }
.input-affix .affix { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-affix .input { padding-left: 3.1rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.25rem; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.check { display: flex; align-items: flex-start; gap: .6rem; cursor: pointer; padding: .35rem 0; }
.check input { width: 20px; height: 20px; margin: .1rem 0 0; accent-color: var(--primary); flex: none; }
.check small { display: block; color: var(--muted); }
input[type="color"].input { padding: .25rem; width: 56px; }
.form-actions { display: flex; gap: .75rem; justify-content: flex-end; margin-top: 1.25rem; flex-wrap: wrap; }

/* ---------- Listen ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list > li {
  display: flex; align-items: center; gap: .9rem; padding: .8rem 1.1rem; border-top: 1px solid var(--line);
  min-height: 60px;
}
.list > li:first-of-type { border-top: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .title { font-weight: 700; }
.list .meta { color: var(--muted); font-size: .88rem; }
.list a.rowlink { color: inherit; text-decoration: none; }
.list a.rowlink:hover .title { text-decoration: underline; }
.list .actions { display: flex; gap: .35rem; flex: none; }
.list-group-title {
  padding: .6rem 1.1rem; background: var(--surface-2); border-top: 1px solid var(--line);
  font-weight: 700; font-size: .92rem; color: var(--muted);
}
.panel > div:first-of-type > .list-group-title { border-top: 0; border-radius: var(--r-panel) var(--r-panel) 0 0; }
.empty { padding: 2rem 1.25rem; text-align: center; color: var(--muted); }
.empty strong { display: block; color: var(--ink); margin-bottom: .25rem; }

.swatch { width: 14px; height: 14px; border-radius: 4px; flex: none; }
.reorder { display: flex; flex-direction: column; gap: 2px; }
.reorder .btn { min-height: 22px; height: 22px; width: 30px; padding: 0; font-size: .8rem; }

/* ---------- Chips & Badges ---------- */
.chip {
  display: inline-flex; align-items: center; gap: .35rem; padding: .15rem .6rem; border-radius: 999px;
  font-size: .82rem; font-weight: 700; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line);
  white-space: nowrap;
}
.chip.prep { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }
.chip.live { background: var(--primary-soft); color: var(--primary); border-color: transparent; }
.chip.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip.warn { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
@media (prefers-color-scheme: dark) { .chip.prep { color: var(--accent); } }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip-toggle {
  display: inline-flex; align-items: center; gap: .4rem; min-height: 36px; padding: .3rem .8rem;
  border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  font: inherit; font-size: .9rem; font-weight: 700; cursor: pointer;
}
.chip-toggle[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }

/* ---------- Dialoge ---------- */
dialog.dlg {
  width: min(640px, calc(100vw - 2rem)); max-height: calc(100dvh - 2rem);
  padding: 0; border: 1px solid var(--line); border-radius: var(--r-panel);
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow);
}
dialog.dlg.wide { width: min(860px, calc(100vw - 2rem)); }
dialog.dlg[open] { display: flex; flex-direction: column; overflow: hidden; }
dialog.dlg .dlg-head, dialog.dlg .dlg-foot { flex: none; }
dialog.dlg::backdrop { background: rgba(10, 16, 14, .5); }
.dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); }
.dlg-body { padding: 1.25rem; overflow: auto; flex: 1 1 auto; min-height: 0; }
.dlg-foot { display: flex; gap: .75rem; justify-content: flex-end; padding: 1rem 1.25rem; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--r-panel) var(--r-panel); flex-wrap: wrap; }
.dlg-foot .left { margin-right: auto; }
dialog.dlg form { display: contents; }

/* ---------- Toasts ---------- */
.toasts { position: fixed; left: 50%; bottom: max(1.25rem, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: .5rem; width: min(480px, calc(100vw - 2rem)); }
.toast {
  padding: .8rem 1rem; border-radius: var(--r-ctrl); background: var(--ink); color: var(--bg);
  box-shadow: var(--shadow); font-weight: 700;
}
.toast.error { background: var(--danger); color: #fff; }

/* ---------- Übersicht / Checkliste ---------- */
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: flex; align-items: center; gap: .75rem; padding: .6rem 0; border-top: 1px solid var(--line); }
.checklist li:first-child { border-top: 0; }
.checklist .dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-strong); flex: none; display: grid; place-items: center; }
.checklist .dot.done { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.checklist .dot.done::after { content: ""; width: 9px; height: 5px; border: solid currentColor; border-width: 0 0 2px 2px; transform: rotate(-45deg) translate(1px, -1px); }
.checklist .grow { flex: 1; }

.logo-box { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.logo-box .preview {
  width: 96px; height: 96px; border-radius: 12px; border: 1px solid var(--line); background: #fff;
  display: grid; place-items: center; overflow: hidden; flex: none;
}
.logo-box .preview img { max-width: 88%; max-height: 88%; }
.qr { width: 168px; height: 168px; background: #fff; border-radius: 10px; padding: 6px; border: 1px solid var(--line); }
.url-box { font-weight: 700; word-break: break-all; }

/* ---------- Produkte ---------- */
.allergen-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .1rem .75rem; }
.lines { display: flex; flex-direction: column; gap: .5rem; }
.line { display: grid; grid-template-columns: 1fr 130px 36px; gap: .5rem; align-items: center; }
.price-col { text-align: right; min-width: 92px; font-variant-numeric: tabular-nums; font-weight: 700; }
.filter-bar { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-bottom: 1rem; }
.filter-bar .input { max-width: 260px; }

/* ---------- Tischplan ---------- */
.plan-toolbar { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-bottom: 1rem; }
.plan-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 1.25rem; align-items: start; }
@media (max-width: 960px) { .plan-wrap { grid-template-columns: 1fr; } }
.plan-scroll { overflow: auto; padding: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); }
.plan-canvas {
  position: relative; margin: 0 auto;
  background-color: var(--surface-2);
  background-image: radial-gradient(circle, var(--line-strong) 1.2px, transparent 1.4px);
  border-radius: 8px; outline: 1px solid var(--line);
  user-select: none; -webkit-user-select: none;
}
.ptable {
  position: absolute; display: grid; place-items: center; padding: 3px;
  touch-action: none; cursor: grab;
}
.ptable .top {
  width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--surface); border: 2px solid var(--line-strong); border-radius: 10px;
  box-shadow: 0 2px 0 var(--line-strong);
  overflow: hidden;
}
.ptable .no { font-weight: 700; font-size: 1.35rem; line-height: 1; font-variant-numeric: tabular-nums; }
.ptable .lbl { font-size: .7rem; color: var(--muted); max-width: 95%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ptable.sel .top { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 40%, transparent); }
.ptable.drag { cursor: grabbing; z-index: 5; }
.ptable.drag .top { box-shadow: var(--shadow); }
.ptable .grip {
  position: absolute; right: 3px; bottom: 3px; width: 20px; height: 20px; cursor: nwse-resize; touch-action: none;
  background: linear-gradient(135deg, transparent 52%, var(--accent) 52%); border-radius: 0 0 10px 0;
}
.plan-side .panel-pad + .panel-pad { border-top: 1px solid var(--line); }

/* ---------- Personal ---------- */
.staff-row { flex-wrap: wrap; }
.staff-row .role { width: 190px; }
.staff-row .stations { flex-basis: 100%; padding-left: 0; }

/* ---------- Login-Seiten ---------- */
.auth {
  min-height: 100dvh; display: grid; place-items: center; padding: 2rem 1rem;
}
.auth-card { width: min(420px, 100%); }
.auth-card .brand { justify-content: center; margin-bottom: 1.5rem; font-size: 1.4rem; }
.auth-card .brand img { width: 40px; height: 40px; }
.error-text { color: var(--danger); font-weight: 700; }

/* ---------- Event-Login (Handy / Tablet) ---------- */
body.event { min-height: 100dvh; padding-bottom: env(safe-area-inset-bottom); }
.ev-wrap { max-width: 760px; margin: 0 auto; padding: max(1.5rem, env(safe-area-inset-top)) 1.25rem 2rem; }
.ev-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .75rem; padding: 1.5rem 0 2rem; }
.ev-head .ev-logo {
  width: 132px; height: 132px; border-radius: 28px; background: #fff; border: 1px solid var(--line);
  display: grid; place-items: center; overflow: hidden; box-shadow: var(--shadow);
}
.ev-head .ev-logo img { max-width: 86%; max-height: 86%; }
.ev-head h1 { font-size: 1.9rem; }
.ev-head .club { color: var(--muted); font-weight: 700; }
.ev-head.compact { padding: .5rem 0 1rem; gap: .5rem; }
.ev-head.compact .ev-logo { width: 64px; height: 64px; border-radius: 16px; }
.ev-head.compact h1 { font-size: 1.25rem; }
.ev-head.compact .club { display: none; }
.ev-status { text-align: center; max-width: 440px; margin: 0 auto; }
.ev-status .code {
  display: inline-block; margin: 1.25rem 0; padding: .9rem 1.4rem; border-radius: 16px;
  background: var(--surface); border: 2px dashed var(--accent);
  font-size: 2.4rem; font-weight: 700; letter-spacing: .12em; font-variant-numeric: tabular-nums;
}
.people {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .75rem;
}
.person {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: .9rem;
  min-height: 108px; padding: 1rem; text-align: left;
  font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-bottom-width: 3px; border-radius: var(--r-panel); cursor: pointer;
}
.person:hover { border-color: var(--primary); }
.person:active { transform: translateY(1px); border-bottom-width: 2px; }
.person .initials {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary); font-weight: 700;
}
.person .pname { font-weight: 700; font-size: 1.1rem; line-height: 1.2; }
.person .prole { font-size: .82rem; color: var(--muted); }
.device-note { text-align: center; color: var(--muted); font-size: .85rem; margin-top: 2rem; }

.pin-sheet { text-align: center; max-width: 340px; margin: 0 auto; }
.pin-sheet .who { font-size: 1.3rem; font-weight: 700; margin-bottom: .25rem; }
.pin-dots { display: flex; justify-content: center; gap: 1rem; margin: 1.5rem 0 1rem; }
.pin-dots span { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-strong); }
.pin-dots span.on { background: var(--ink); border-color: var(--ink); }
.pin-dots.shake { animation: shake .35s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.pin-msg { min-height: 1.5rem; font-weight: 700; color: var(--danger); }
.pinpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; margin-top: 1rem; }
.pinpad button {
  height: 72px; font: inherit; font-size: 1.6rem; font-weight: 700; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-bottom-width: 3px; border-radius: 16px; cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.pinpad button:active { transform: translateY(1px); border-bottom-width: 2px; background: var(--surface-2); }
.pinpad button.fn { font-size: 1rem; color: var(--muted); background: transparent; border-color: transparent; }

/* =========================================================
   Etappe 2: Service-App
   ========================================================= */
body.svc { padding-bottom: 0; }
.svc-bar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: .6rem;
  padding: max(.55rem, env(safe-area-inset-top)) max(.75rem, env(safe-area-inset-right)) .55rem max(.75rem, env(safe-area-inset-left));
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.svc-bar .title { flex: 1; min-width: 0; font-weight: 700; font-size: 1.12rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.svc-bar .back { width: 40px; min-height: 40px; color: var(--ink); }
.svc-bar .back svg { width: 24px; height: 24px; }
.svc-logo { width: 34px; height: 34px; border-radius: 9px; object-fit: contain; background: #fff; border: 1px solid var(--line); }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--primary-soft); color: var(--primary); font: inherit; font-weight: 700; font-size: .85rem;
}
.conn { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--danger); }
.conn.on { background: #3aa76d; box-shadow: 0 0 0 3px color-mix(in srgb, #3aa76d 25%, transparent); }
.conn.inline { display: inline-block; vertical-align: middle; margin-right: .3rem; }
.offline { position: sticky; top: 56px; z-index: 29; padding: .5rem .9rem; background: var(--danger); color: #fff; font-weight: 700; text-align: center; font-size: .92rem; }
.svc-note { padding: .45rem .9rem; background: var(--accent-soft); color: var(--accent-ink); font-size: .88rem; font-weight: 700; text-align: center; }
.svc-note.warn { background: var(--surface-2); color: var(--muted); }
.svc-note.inline { border-radius: var(--r-ctrl); text-align: left; margin-bottom: 1rem; }
@media (prefers-color-scheme: dark) { .svc-note { color: var(--accent); } }

.svc-main { max-width: 1100px; margin: 0 auto; padding: .9rem max(.75rem, env(safe-area-inset-left)) calc(100px + env(safe-area-inset-bottom)); }
.svc-section { margin-top: 1.5rem; }
.svc-section h2 { font-size: 1.05rem; margin-bottom: .6rem; }

/* Abholbereit-Leiste */
.ready-strip { display: flex; gap: .5rem; overflow-x: auto; margin-bottom: .75rem; padding-bottom: .1rem; }
.ready-chip {
  flex: none; min-height: 44px; padding: .4rem .9rem; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 700; white-space: nowrap;
}
.area-chips { margin-bottom: .75rem; }

/* Tischplan Service */
.svc-plan { overflow-x: auto; }
.svc-plan .plan-canvas { margin: 0; }
.stable { position: absolute; padding: 3px; }
.stable .top {
  width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  font: inherit; color: var(--ink); cursor: pointer;
  background: var(--surface); border: 2px solid var(--line-strong); border-radius: 10px;
  box-shadow: 0 2px 0 var(--line-strong); padding: 0;
}
.stable .top:active { transform: translateY(1px); box-shadow: 0 1px 0 var(--line-strong); }
.stable .no { font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.stable .who { font-size: .66rem; font-weight: 700; line-height: 1; }
.stable.mine .top { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); box-shadow: 0 2px 0 var(--primary-hover); }
.stable.other .top {
  color: var(--muted); border-style: dashed;
  background: repeating-linear-gradient(135deg, var(--surface) 0 6px, var(--surface-2) 6px 12px);
}
.stable.ready .top { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 55%, transparent); animation: readyPulse 1.8s ease-in-out infinite; }
@keyframes readyPulse { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 20%, transparent); } }
.stable .badge {
  position: absolute; top: -5px; right: -5px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px;
  display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-size: .75rem; font-weight: 700;
  box-shadow: 0 0 0 2px var(--surface); pointer-events: none;
}
.stable .hold-dot {
  position: absolute; left: 50%; bottom: 7px; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%;
  background: var(--primary-ink); opacity: .85; pointer-events: none;
}
.legend { display: flex; flex-wrap: wrap; gap: .9rem; margin: .7rem 0 0; }
.legend span { display: inline-flex; align-items: center; gap: .35rem; }
.legend .lg { width: 14px; height: 14px; border-radius: 4px; border: 2px solid var(--line-strong); background: var(--surface); display: inline-block; }
.legend .lg.mine { background: var(--primary); border-color: var(--primary); }
.legend .lg.other { border-style: dashed; background: repeating-linear-gradient(135deg, var(--surface) 0 3px, var(--surface-2) 3px 6px); }
.legend .lg.ready { background: var(--accent); border-color: var(--accent); }

.list li.tap, .ilist li.tap { cursor: pointer; }
.list li.tap:active, .ilist li.tap:active { background: var(--surface-2); }
.tno {
  width: 46px; height: 46px; border-radius: 10px; display: grid; place-items: center; flex: none;
  background: var(--primary); color: var(--primary-ink); font-weight: 700; font-size: 1.15rem; font-variant-numeric: tabular-nums;
}
.chev { width: 20px; height: 20px; color: var(--muted); flex: none; }

/* Status-Chips */
.chip.st-held { background: transparent; border: 1px dashed var(--line-strong); color: var(--muted); }
.chip.st-open { background: var(--surface-2); color: var(--ink); }
.chip.st-ready { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.chip.st-served { background: var(--primary-soft); color: var(--primary); border-color: transparent; }
.chip.st-cancelled { text-decoration: line-through; }

/* Tischansicht */
.table-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.table-head .total { font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.ready-box, .held-box { border-radius: var(--r-panel); padding: .9rem 1rem; margin-bottom: .75rem; }
.ready-box { background: var(--accent-soft); border: 2px solid var(--accent); }
.ready-box h3, .held-box h3 { font-size: 1.05rem; }
.ready-box .ilist li { border-color: color-mix(in srgb, var(--accent) 35%, transparent); padding-left: 0; padding-right: 0; }
.held-box { background: var(--surface); border: 2px dashed var(--line-strong); }
.ilist { list-style: none; margin: 0; padding: 0; }
.ilist > li { display: flex; align-items: flex-start; gap: .75rem; padding: .75rem 1rem; border-top: 1px solid var(--line); }
.ilist > li:first-of-type { border-top: 0; }
.ilist .qty { font-weight: 700; min-width: 2.2em; font-variant-numeric: tabular-nums; padding-top: .05rem; }
.ilist .iname { font-weight: 700; line-height: 1.3; }
.ilist .isub { color: var(--muted); font-size: .86rem; }
.ilist .iright { display: flex; flex-direction: column; align-items: flex-end; gap: .3rem; flex: none; }
.iprice { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.ilist li.cancelled { color: var(--muted); }
.ilist li.cancelled .iname { text-decoration: line-through; }

/* Untere Leiste */
.bottom-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; gap: .6rem;
  padding: .6rem max(.75rem, env(safe-area-inset-right)) calc(.6rem + env(safe-area-inset-bottom)) max(.75rem, env(safe-area-inset-left));
  background: var(--surface); border-top: 1px solid var(--line);
}
.bottom-bar .btn { min-height: 54px; font-size: 1.05rem; }
.bottom-bar .btn.big { flex: 1; }
.cart-pill { margin-left: .5rem; min-width: 24px; padding: 0 7px; border-radius: 12px; background: var(--accent); color: var(--accent-ink); font-size: .85rem; line-height: 24px; }
.cart-btn.bump { animation: bump .26s ease-out; }
@keyframes bump { 40% { transform: scale(1.03); } }

/* Bestellen */
.catbar {
  position: sticky; top: 56px; z-index: 20; display: flex; gap: .45rem; overflow-x: auto;
  margin: -.9rem calc(-1 * max(.75rem, env(safe-area-inset-left))) .9rem; padding: .7rem max(.75rem, env(safe-area-inset-left));
  background: var(--bg); border-bottom: 1px solid var(--line); scrollbar-width: none;
}
.catbar .chip-toggle { flex: none; min-height: 42px; padding: .4rem 1rem; font-size: .98rem; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
@media (max-width: 380px) { .pgrid { grid-template-columns: 1fr 1fr; } }
.ptile { position: relative; }
.ptile-main {
  width: 100%; min-height: 92px; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start;
  gap: .5rem; padding: .75rem .8rem; text-align: left; cursor: pointer;
  font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-bottom-width: 3px; border-radius: 12px;
}
.ptile-main:active { transform: translateY(1px); border-bottom-width: 2px; background: var(--surface-2); }
.ptile .pn { font-weight: 700; line-height: 1.25; padding-right: 1.6rem; }
.ptile .pp { color: var(--muted); font-variant-numeric: tabular-nums; font-size: .92rem; }
.ptile.soldout .ptile-main { opacity: .5; cursor: not-allowed; }
.ptile.soldout .pn { text-decoration: line-through; }
.pinfo {
  position: absolute; right: .45rem; bottom: .55rem; width: 30px; height: 30px; border-radius: 50%;
  border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--ink);
  font: italic 700 .95rem/1 Georgia, serif; cursor: pointer;
}
.pinfo.static { position: static; flex: none; }
.pcount {
  position: absolute; top: .45rem; right: .45rem; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 13px;
  display: grid; place-items: center; background: var(--primary); color: var(--primary-ink); font-weight: 700; font-size: .85rem;
  pointer-events: none;
}

/* Sheets (Bottom-Sheet auf dem Handy, Dialog auf dem Tablet) */
dialog.sheet {
  width: 100%; max-width: 640px; max-height: 90dvh; margin: auto auto 0; padding: 0;
  border: 0; border-radius: 18px 18px 0 0; background: var(--surface); color: var(--ink);
  box-shadow: var(--shadow);
}
dialog.sheet[open] { display: flex; flex-direction: column; overflow: hidden; animation: sheetIn .2s ease-out; }
dialog.sheet::backdrop { background: rgba(10, 16, 14, .5); }
@keyframes sheetIn { from { transform: translateY(24px); opacity: .6; } }
@media (min-width: 700px) { dialog.sheet { margin: auto; border-radius: 16px; max-height: 84dvh; } }
.sheet-inner { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; padding: 1rem 1.1rem .75rem; border-bottom: 1px solid var(--line); }
.sheet-head h2 { font-size: 1.2rem; }
.sheet-body { padding: 1rem 1.1rem; overflow: auto; flex: 1 1 auto; min-height: 0; }
.sheet-foot {
  display: flex; gap: .6rem; padding: .75rem 1.1rem calc(.75rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); background: var(--surface-2);
}
.sheet-foot .btn { min-height: 52px; }
.grow { flex: 1; }
.label { font-weight: 700; font-size: .92rem; margin-bottom: .4rem; display: block; }
.seg { display: flex; flex-wrap: wrap; gap: .45rem; }
.seg button {
  min-height: 46px; padding: .45rem .95rem; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font: inherit; font-weight: 700;
}
.seg button .muted { font-weight: 400; }
.seg button[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.seg button[aria-pressed="true"] .muted { color: inherit; opacity: .85; }
.seg.small button { min-height: 36px; padding: .25rem .7rem; font-size: .85rem; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 10px; overflow: hidden; flex: none; }
.stepper button { width: 46px; height: 46px; border: 0; background: var(--surface-2); color: var(--ink); font: inherit; font-size: 1.35rem; font-weight: 700; cursor: pointer; }
.stepper span { min-width: 2.6rem; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.stepper.sm button { width: 38px; height: 38px; font-size: 1.1rem; }
.stepper.sm span { min-width: 2rem; }
.cart-group + .cart-group { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.cg-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; margin-bottom: .5rem; }
.cart-line { display: flex; align-items: center; gap: .75rem; padding: .45rem 0; }
.cart-line .iname { font-weight: 700; line-height: 1.25; }
.cart-line .isub { color: var(--muted); font-size: .86rem; }
.action-list { display: flex; flex-direction: column; gap: .5rem; }
.action-list .btn { min-height: 54px; justify-content: flex-start; font-size: 1.02rem; }
.tpick { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: .5rem; }
.tpick button {
  height: 60px; border-radius: 10px; border: 2px solid var(--line-strong); background: var(--surface);
  color: var(--ink); font: inherit; font-size: 1.3rem; font-weight: 700; cursor: pointer; font-variant-numeric: tabular-nums;
}
.tpick button.busy { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.allergen-list { margin: 0; padding-left: 1.2rem; }
.allergen-list li { padding: .15rem 0; }
