/* MeoloPOS – Oberfläche (ab 1.7: modernes, einheitliches Design).
   Farben, Schrift, Abstände und Rundungen kommen aus den Variablen hier; der Abschnitt „Design“ am Dateiende gleicht alle Bereiche an. */
:root {
  --page: #f3f5f8; --panel: #fff; --ink: #1d2733; --muted: #687587; --line: #e1e6ec; --line-2: #cfd6df;
  --bar: #141b25; --bar-2: #1f2935; --bar-ink: #fff; --bar-line: #0b1017;
  --btn: #fff; --btn-hover: #f2f5f9; --btn-down: #e7ecf2;
  --primary: #2563eb; --primary-dark: #1d4ed8; --primary-ink: #fff; --primary-soft: #e8f0fe;
  --accent: #dc2626; --ok: #16a34a; --ok-dark: #15803d; --warn: #f59e0b; --ready: #16a34a;
  --busy-bg: #fff7e6; --busy-line: #f59e0b;
  --radius: 10px; --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16,24,40,.05), 0 1px 3px rgba(16,24,40,.08);
  --shadow-lg: 0 12px 32px rgba(16,24,40,.18);
  --list: #fff; --list-hover: #f2f5f9; --list-line: #e1e6ec; --chev: #9aa6b5;
  --tab: #fff; --tab-line: #d5dce4; --tab-active: #1d2733;
  --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--page); color: var(--ink); font: 16px/1.3 var(--font); }
h1, h2, h3 { margin: 0 0 12px; font-weight: 700; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1rem; }
.muted { color: var(--muted); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.right { text-align: right; }
.stack > * + * { margin-top: 12px; }

/* Tasten */
button {
  font: inherit; font-weight: 700; cursor: pointer; color: var(--ink);
  background: var(--btn); border: 1px solid var(--line); border-radius: var(--radius);
  padding: .7em 1em; text-shadow: 0 1px 0 #f3f3f3; box-shadow: 0 1px 3px rgba(0,0,0,.12);
}
button:hover { background: var(--btn-hover); }
button:active { background: var(--btn-down); box-shadow: none; }
button:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
button:disabled { opacity: .45; cursor: default; }
button.primary, button.sel, .tabs button.active { background: var(--primary); border-color: var(--primary-dark); color: var(--primary-ink); text-shadow: 0 1px 0 #059; }
button.ok { background: var(--ok); border-color: var(--ok-dark); color: #fff; text-shadow: 0 1px 0 #1d5e1d; }
button.danger { background: var(--accent); border-color: #b02e27; color: #fff; text-shadow: 0 1px 0 #8a1f19; }
button.link { border: 0; background: none; box-shadow: none; color: inherit; text-decoration: underline; padding: 4px; text-shadow: none; font-weight: 400; }
button.big { padding: .9em 1.2em; font-size: 1.05rem; }
input, select, textarea { font: inherit; padding: .55em .6em; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; width: 100%; box-shadow: inset 0 1px 3px rgba(0,0,0,.1); color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 6px var(--primary); }
label { display: block; font-size: .85rem; color: var(--muted); margin: 8px 0 4px; }

/* Inhaltsblöcke */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.panel > h3:first-child, .panel > .row:first-child h3 { margin: -14px -14px 12px; padding: 9px 14px; background: #e9e9e9; border-bottom: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; text-shadow: 0 1px 0 #fff; }
.panel > .row:first-child { margin: -14px -14px 12px; padding: 9px 14px; background: #e9e9e9; border-bottom: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; }
.panel > .row:first-child h3 { margin: 0; padding: 0; background: none; border: 0; }

/* Kopfleiste + Navigationsleiste */
[hidden] { display: none !important; }
#topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; flex-wrap: wrap; background: var(--bar); color: var(--bar-ink); border-bottom: 1px solid var(--bar-line); text-shadow: 0 1px 0 #111; }
.brand { order: 1; flex: 1; text-align: center; font-weight: 700; padding: 11px 90px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who { order: 2; position: absolute; right: 8px; top: 6px; font-size: .85rem; display: flex; gap: 6px; align-items: center; }
#whoName { opacity: .8; }
#logoutBtn { background: var(--bar-2); color: #fff; border: 1px solid #000; text-decoration: none; font-weight: 700; padding: 5px 10px; border-radius: var(--radius); text-shadow: 0 1px 0 #111; box-shadow: none; }
#nav { order: 3; width: 100%; display: flex; border-top: 1px solid #333; }
#nav button {
  flex: 1 1 0; min-width: 0; border-radius: 0; border: 0; border-right: 1px solid #111; box-shadow: none;
  background: var(--bar-2); color: #fff; text-shadow: 0 1px 0 #111; padding: 6px 2px 7px; font-size: .78rem;
  display: flex; flex-direction: column; align-items: center; gap: 3px; position: relative;
}
#nav button:last-child { border-right: 0; }
#nav button:hover { background: #333; }
#nav button.active { background: var(--primary); text-shadow: 0 1px 0 #059; }
#nav button::before { content: ""; width: 22px; height: 22px; background: currentColor; -webkit-mask: var(--ico) center/contain no-repeat; mask: var(--ico) center/contain no-repeat; }
#nav .badge { position: absolute; top: 3px; left: calc(50% + 8px); background: var(--accent); border-radius: 9px; padding: 0 6px; font-size: .72rem; line-height: 17px; }
#nav [data-v="tische"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 3h8v8H3zM13 3h8v8h-8zM3 13h8v8H3zM13 13h8v8h-8z'/%3E%3C/svg%3E"); }
#nav [data-v="abholen"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 4a8 8 0 0 0-8 8v2h16v-2a8 8 0 0 0-8-8zm-1-3h2v2h-2zM2 16h20v3H2z'/%3E%3C/svg%3E"); }
#nav [data-v="kueche"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 9h18v2h-1v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-8H3zm4-6h2v4H7zm4-1h2v5h-2zm4 1h2v4h-2z'/%3E%3C/svg%3E"); }
#nav [data-v="bar"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 3h16l-7 9v7h4v2H7v-2h4v-7z'/%3E%3C/svg%3E"); }
#nav [data-v="pruefung"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 2a8 8 0 0 1 6.3 12.9l5.4 5.4-1.4 1.4-5.4-5.4A8 8 0 1 1 10 2zm0 2a6 6 0 1 0 0 12 6 6 0 0 0 0-12zm-1 2h2v3h3v2h-3v3H9v-3H6V9h3z'/%3E%3C/svg%3E"); }
#nav [data-v="rechnungen"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 2h14v20l-3-2-2 2-2-2-2 2-2-2-3 2zm3 5v2h8V7zm0 4v2h8v-2zm0 4v2h5v-2z'/%3E%3C/svg%3E"); }
#nav [data-v="umsatz"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 20h18v2H3zM5 11h3v8H5zm5-6h3v14h-3zm5 3h3v11h-3z'/%3E%3C/svg%3E"); }
#nav [data-v="verwaltung"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 2h4l.6 2.6 2.3 1 2.3-1.4 2.8 2.8-1.4 2.3 1 2.3L24 12v0l-2.4.4-1 2.3 1.4 2.3-2.8 2.8-2.3-1.4-2.3 1L14 22h-4l-.6-2.6-2.3-1-2.3 1.4L2 17l1.4-2.3-1-2.3L0 12l2.4-.6 1-2.3L2 6.8 4.8 4l2.3 1.4 2.3-1zm2 6a4 4 0 1 0 0 8 4 4 0 0 0 0-8z'/%3E%3C/svg%3E"); }
main { padding: 14px 16px 24px; max-width: var(--page-w, 1260px); margin: 0 auto; }

/* Anmeldung */
.login { max-width: 380px; margin: 4vh auto; text-align: center; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.login .keypad { margin-bottom: 16px; }
.login .listview { border-bottom: 0; }
.login .listview li:last-child { border-bottom: 0; }
.login .user-drop { position: relative; margin: 6px 16px 18px; text-align: left; }
.login .user-drop > button { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; font-size: 1.1rem; font-weight: 600; border: 1px solid var(--line-2, #cbd5e1); border-radius: 12px; background: #fff; box-shadow: none; text-shadow: none; }
.login .user-drop > button .ph { color: var(--muted); font-weight: 500; }
.login .user-drop > button .chev { transition: transform .15s; font-size: .9rem; color: var(--muted); }
.login .user-drop.open > button { border-color: var(--primary); border-radius: 12px 12px 0 0; }
.login .user-drop.open > button .chev { transform: rotate(180deg); }
.login .user-pop { display: none; border: 1px solid var(--primary); border-top: 0; border-radius: 0 0 12px 12px; background: #fff; overflow: hidden; }
.login .user-drop.open .user-pop { display: block; }
.login .user-pop input { display: block; width: calc(100% - 20px); box-sizing: border-box; margin: 10px; }
.login .user-scroll { max-height: max(180px, calc(100dvh - 440px)); overflow-y: auto; overscroll-behavior: contain; border-top: 1px solid var(--list-line); }
.login .user-pop .listview { border-top: 0; }
.login .user-pop .listview li button { padding-top: 13px; padding-bottom: 13px; }
.login .user-none { margin: 14px; text-align: center; }
.login > *:not(.bar-title):not(.listview) { margin-left: 16px; margin-right: 16px; }
.bar-title { background: var(--bar); color: #fff; font-weight: 700; padding: 11px; text-shadow: 0 1px 0 #111; position: relative; }
.bar-title .btn-back { position: absolute; left: 8px; top: 6px; padding: 4px 10px; font-size: .85rem; background: var(--bar-2); color: #fff; border-color: #000; text-shadow: 0 1px 0 #111; box-shadow: none; }
.pin-display { font-size: 2rem; letter-spacing: 12px; height: 50px; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: inset 0 1px 3px rgba(0,0,0,.1); margin-bottom: 14px; background: #fff; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.keypad button { font-size: 1.5rem; padding: 16px 0; }

/* Listen mit Pfeil (Listview) */
.listview { list-style: none; margin: 0; padding: 0; text-align: left; border-top: 1px solid var(--line); }
.listview li { border-bottom: 1px solid var(--line); }
.listview li button { width: 100%; text-align: left; border: 0; border-radius: 0; box-shadow: none; background: var(--list); padding: 16px 48px 16px 18px; position: relative; text-shadow: none; font-size: 1.05rem; }
.listview li button:hover { background: var(--list-hover); }
.listview li { border-bottom: 1px solid var(--list-line); }
.listview li button::after { content: ""; position: absolute; right: 14px; top: 50%; width: 26px; height: 26px; margin-top: -13px; border-radius: 50%; background: var(--chev) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath fill='%23fff' d='M5 2l5 5-5 5-1.4-1.4L7.2 7 3.6 3.4z'/%3E%3C/svg%3E") center/15px no-repeat; }

/* Tabs / Kategorien als Tastengruppe */
.tabs { display: flex; flex-wrap: wrap; margin-bottom: 12px; gap: 0; }
.tabs > button { border-radius: 0; margin-left: -1px; box-shadow: none; }
.tabs > button:first-child { border-radius: var(--radius) 0 0 var(--radius); margin-left: 0; }
.tabs > button:nth-last-child(1 of button) { border-radius: 0 var(--radius) var(--radius) 0; }
.tabs .spacer + button { border-radius: var(--radius); margin-left: 0; }

/* Tische */
.tables { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.table-tile { text-align: center; padding: 12px 8px; min-height: 104px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px; font-weight: 400; }
.table-tile .name { font-weight: 700; font-size: 1.15rem; }
.table-tile.busy { background: var(--busy-bg); border-color: var(--busy-line); }
.table-tile.ready { background: #e3f4e3; border-color: var(--ready); }
.table-tile .sum { font-weight: 700; }
.table-tile .muted { font-size: .82rem; }

/* Bestellansicht */
.order-layout { display: grid; grid-template-columns: 1fr 380px; gap: 14px; align-items: start; }
@media (max-width: 900px) { .order-layout { grid-template-columns: 1fr; } }
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.product { text-align: center; min-height: 78px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px; border-bottom: 5px solid var(--prodcolor, var(--line)); padding: 10px 6px 7px; }
.product .price { color: var(--muted); font-size: .85rem; font-weight: 400; }
.lines { list-style: none; padding: 0; margin: 0; }
.lines li { display: flex; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.lines li:last-child { border-bottom: 0; }
.lines .qty { min-width: 30px; font-weight: 700; }
.lines .name { flex: 1; min-width: 0; }
.lines .note { display: block; font-size: .85rem; color: var(--accent); }
.lines button { padding: 4px 10px; }
.total { font-size: 1.2rem; font-weight: 700; display: flex; justify-content: space-between; padding-top: 10px; border-top: 2px solid var(--ink); }
.status { font-size: .72rem; padding: 2px 7px; border-radius: 9px; background: #eee; white-space: nowrap; font-weight: 700; }
.status.offen { background: #fbd9d6; color: #8a1f19; }
.status.in_arbeit { background: #ffe4b3; color: #7a4a00; }
.status.fertig { background: #cdeccd; color: #1d5e1d; }
.status.serviert { background: #e5e5e5; color: var(--muted); }
.check { width: 22px; height: 22px; flex: none; box-shadow: none; }

/* Küche / Bar: Arbeitsbons */
.tickets { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.ticket { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; padding: 0 10px 10px; }
.ticket h3 { display: flex; justify-content: space-between; margin: 0 -10px 6px; padding: 9px 10px; background: var(--bar); color: #fff; text-shadow: 0 1px 0 #111; }
.ticket.old h3 { background: var(--accent); text-shadow: 0 1px 0 #8a1f19; }
.ticket .meta { color: var(--muted); font-size: .82rem; margin-bottom: 8px; }
.ticket .item { display: flex; gap: 8px; align-items: flex-start; padding: 8px; border-radius: var(--radius); cursor: pointer; border: 1px solid var(--line); border-left: 6px solid var(--prodcolor, var(--line)); margin-bottom: 5px; background: var(--btn); }
.ticket .item.in_arbeit { background: #fff3d6; }
.ticket .item .n { font-weight: 700; font-size: 1.1rem; }
.ticket .item .note { color: var(--accent); font-weight: 700; display: block; }

/* Rechnung / Druck */
.receipt { font-family: ui-monospace, "Courier New", monospace; font-size: 13px; width: 300px; max-width: 100%; background: #fff; padding: 14px; border: 1px dashed var(--line); margin: 0 auto; color: #000; }
.receipt .c { text-align: center; }
.receipt table { width: 100%; border-collapse: collapse; }
.receipt td { vertical-align: top; padding: 1px 0; }
.receipt td.right { white-space: nowrap; }
.receipt hr { border: 0; border-top: 1px dashed #000; }
#printArea { display: none; }
@media print {
  body > *:not(#printArea) { display: none !important; }
  #printArea { display: block; }
  #printArea .receipt { border: 0; width: 72mm; padding: 0; }
  @page { margin: 4mm; }
}

table.list { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
table.list th, table.list td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; }
table.list th { font-size: .82rem; color: #fff; background: var(--bar-2); text-shadow: 0 1px 0 #111; }
table.list tr:nth-child(odd) td { background: #fbfbfb; }
table.list td.num, table.list th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.list tr.click { cursor: pointer; }
table.list tr.click:hover td { background: #eaf3fb; }
.strike { text-decoration: line-through; color: var(--muted); }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid2 > * { min-width: 0; }
@media (max-width: 800px) { .grid2 { grid-template-columns: 1fr; } }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.kpi .v { font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; }

/* Dialog */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 16px; }
.dialog { background: #fff; border-radius: var(--radius); padding: 0 16px 16px; width: min(560px, 100%); max-height: 90vh; overflow: auto; box-shadow: 0 0 12px rgba(0,0,0,.6); }
.dialog > h3:first-child { margin: 0 -16px 14px; padding: 11px 16px; background: var(--bar); color: #fff; text-shadow: 0 1px 0 #111; }
.dialog > .receipt:first-child, .dialog > #rcpt:first-child { margin-top: 16px; }
.dialog .actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }

#toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: #222; color: #fff; padding: 10px 18px; border-radius: var(--radius); z-index: 100; box-shadow: 0 0 12px rgba(0,0,0,.4); }
#toast.err { background: var(--accent); }

.qr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.qr-grid .panel { text-align: center; font-size: .8rem; word-break: break-all; }

@media (max-width: 600px) {
  .brand { padding: 11px min(calc(var(--who-w, 108px) + 12px), calc(100% - 48px)) 11px 12px; text-align: left; }
  #topbar.eng #brand, #topbar.eng #testPill { display: none; }
  #nav button { font-size: .68rem; }
  #whoName, .who .app-ver { display: none; }
  .who { gap: 4px; max-width: calc(100% - 16px); overflow-x: auto; scrollbar-width: none; }
  .who .test-pill { padding: 2px 7px; font-size: .7rem; }
}

/* ---------- Bestellansicht ---------- */
.fullscreen #topbar { display: none; }
.fullscreen main { padding-top: 0; }
.os-header { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 10px; background: #000; color: #fff; margin: 0 -16px 18px; padding: 8px 12px; border-bottom: 1px solid #222; }
.hdr-title { flex: 1; text-align: center; font-weight: 700; font-size: 1.25rem; text-shadow: 0 1px 0 #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hdr-btn { background: #2d2d2d; color: #fff; border: 1px solid #444; text-shadow: 0 1px 0 #000; box-shadow: none; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; font-size: .95rem; }
.hdr-btn:hover { background: #3a3a3a; }
.hdr-icon { padding: 8px 18px; }
.ico-back, .ico-down { width: 24px; height: 24px; border-radius: 50%; background: #fff no-repeat center/16px; flex: none; }
.ico-back { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M7 2 1 8l6 6 1.4-1.4L4.8 9H15V7H4.8l3.6-3.6z'/%3E%3C/svg%3E"); }
.ico-down { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M7 1h2v10.2l3.6-3.6L14 9l-6 6-6-6 1.4-1.4L7 11.2z'/%3E%3C/svg%3E"); }
.order-wrap { max-width: 860px; margin: 0 auto; }
.tabbar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--tab-line); border-radius: var(--radius); overflow: hidden; margin-bottom: 14px; box-shadow: var(--shadow); }
.tabbar button { border: 0; border-left: 1px solid var(--tab-line); border-radius: 0; box-shadow: none; background: var(--tab); color: #222; text-shadow: none; padding: 16px 6px; font-size: 1.1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tabbar button:first-child { border-left: 0; }
.tabbar button:hover { background: #f4ea66; }
.tabbar button.active { background: var(--tab-active); color: #fff; text-shadow: 0 1px 0 #000; }
.search-row { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; }
.search-row input { flex: 1; min-width: 0; font-family: "Courier New", ui-monospace, monospace; font-size: 1.05rem; padding: 12px; border-color: #b9ae4a; box-shadow: 0 0 8px rgba(51,136,204,.45); }
.kasse-btn { background: var(--list); border: 1px solid var(--list-line); color: #000; text-shadow: none; font-size: 1.15rem; padding: 14px 22px; white-space: nowrap; }
.kasse-btn:hover { background: var(--list-hover); }
.listview.cyan { border: 1px solid var(--list-line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.listview .lv-head { background: #222; color: #fff; font-weight: 700; padding: 12px 18px; font-size: 1.05rem; text-shadow: 0 1px 0 #000; border-bottom: 1px solid #000; display: flex; align-items: center; gap: 10px; }
.listview .lv-back { width: auto; background: #3a3a3a; color: #fff; border: 1px solid #555; padding: 4px 12px 4px 10px; font-size: .9rem; text-shadow: none; }
.listview .lv-back::before { content: "‹ "; }
.listview .lv-back::after { display: none; }
.listview .lv-empty { padding: 16px 18px; background: var(--list); color: #333; }
.listview li button[data-p] { display: flex; align-items: center; gap: 12px; }
.listview li button[data-p]::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath fill='%23fff' d='M6 2h2v4h4v2H8v4H6V8H2V6h4z'/%3E%3C/svg%3E"); }
.lv-main { flex: 1; min-width: 0; }
.lv-aside { font-weight: 400; color: #234; display: flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; }
.lv-aside .count { background: #333; color: #fff; border-radius: 10px; padding: 1px 8px; font-weight: 700; font-size: .85rem; }
@media (max-width: 600px) {
  .tabbar button { font-size: .95rem; padding: 14px 4px; }
  .hdr-btn { padding: 8px 10px; }
  .kasse-btn { padding: 12px 14px; }
}

/* Gutscheine */
#nav [data-v="gutscheine"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2 6h20v4a2 2 0 0 0 0 4v4H2v-4a2 2 0 0 0 0-4zm7 2v8h2V8zm4 0v8h2V8z'/%3E%3C/svg%3E"); }
#nav [data-v="online"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 7V6a5 5 0 0 1 10 0v1h3l-1 15H5L4 7zm2 0h6V6a3 3 0 0 0-6 0z'/%3E%3C/svg%3E"); }
.vstat { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: .8rem; font-weight: 700; background: #ddd; color: #333; }
.vstat.gültig { background: #d4f5d4; color: #1d6b1d; }
.vstat.eingelöst { background: #e3e3e3; color: #555; }
.vstat.abgelaufen { background: #ffe9c2; color: #8a5a00; }
.vstat.gesperrt { background: #fbd4d4; color: #9c1c1c; }
.mono, .v-code { font-family: ui-monospace, "Courier New", monospace; letter-spacing: .05em; }
[data-amt].active { background: var(--list); border-color: var(--chev, #2a9); font-weight: 700; }
.voucher .v-title { font-size: 20px; font-weight: 700; letter-spacing: .3em; margin-top: 4px; }
.voucher .v-value { font-size: 30px; font-weight: 700; margin: 6px 0; }
.voucher .v-qr svg { width: 130px; height: 130px; margin: 6px auto 0; display: block; }
.voucher .v-code { font-size: 18px; font-weight: 700; margin-bottom: 4px; }

/* Drucker */
.bonpreview { font-family: ui-monospace, "Courier New", monospace; font-size: 12px; line-height: 1.35; background: #fff; color: #000; border: 1px dashed var(--line);
  padding: 12px; margin: 10px auto; width: calc(var(--w) * 1ch + 26px); max-width: 100%; overflow-x: auto; white-space: pre; }
.bonpreview .b { font-weight: 700; }
.bonpreview .big { font-size: 2em; line-height: 1.1; }
.bonpreview .big.x3 { font-size: 3em; }
.bonpreview .gap { display: block; height: calc(var(--g) * 4px); margin-top: -1.35em; }
.bonpreview .big.x4 { font-size: 4em; }
.bonpreview .qrbox { display: block; text-align: center; }
.bonpreview .qrbox svg { width: 110px; height: 110px; }
pre.cfg { background: #222; color: #e8e8e8; padding: 10px 12px; border-radius: 6px; font-size: 12.5px; overflow-x: auto; white-space: pre-wrap; word-break: break-all; }

/* Produktverwaltung */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.chips button { border-radius: 18px; padding: 7px 14px; font-weight: 600; }
.chips button .n { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 4px; border-radius: 10px; background: rgba(0,0,0,.08); font-size: .8rem; text-align: center; }
.chips button.active { background: var(--primary); border-color: var(--primary-dark); color: var(--primary-ink); text-shadow: none; }
.chips button.active .n { background: rgba(255,255,255,.25); }
.prod-tools { margin-bottom: 12px; gap: 8px; }
.prod-tools #pQ { flex: 1; min-width: 160px; }
.prod-group { margin-bottom: 16px; }
.prod-group-head { display: flex; align-items: center; gap: 10px; background: #222; color: #fff; padding: 9px 12px; border-radius: var(--radius) var(--radius) 0 0; font-weight: 700; }
.prod-group-head .muted { color: #bbb; font-weight: 400; font-size: .85rem; }
.prod-group-head .spacer { flex: 1; }
.prod-group-head button.link { color: #9fe3e6; }
.prod-table { border-radius: 0 0 var(--radius) var(--radius); }
.prod-table td { vertical-align: middle; }
.prod-table .sw { width: 22px; }
.prod-table .sw span { display: block; width: 16px; height: 16px; border-radius: 4px; border: 1px solid rgba(0,0,0,.15); }
.prod-table .pn { font-weight: 600; }
.prod-table .pd, .prod-table .pv { width: 1%; white-space: nowrap; }
.prod-table .pp { width: 1%; white-space: nowrap; }
.prod-table .pact { width: 1%; }
.prod-table tr.inactive .pn, .prod-table tr.inactive .pp { color: #999; text-decoration: line-through; }
.dest { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: .78rem; font-weight: 700; background: #eee; color: #555; }
.dest.kueche { background: #ffe3cc; color: #8a4500; }
.dest.bar { background: #d6ecff; color: #0b5394; }
.switch { position: relative; display: inline-block; width: 42px; height: 24px; margin: 0; cursor: pointer; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: #ccc; border-radius: 12px; transition: background .15s; }
.switch span::before { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; box-shadow: 0 1px 2px rgba(0,0,0,.3); transition: transform .15s; }
.switch input:checked + span { background: #3aa63a; }
.switch input:checked + span::before { transform: translateX(18px); }
@media (max-width: 600px) { .prod-table .pv { display: none; } .chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; } .chips button { flex: none; } }

/* Kassieren: oben offen, unten Rechnung */
.paybox { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 10px; }
.pb-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 10px; background: var(--list); border-bottom: 1px solid var(--list-line); font-weight: 700; }
.pb-head.bill { background: #cdeccd; border-top: 1px solid var(--line); border-bottom-color: #9fcf9f; }
.pb-head button { padding: 4px 12px; }
.paylist { max-height: 30vh; overflow: auto; }
.paylist li { padding: 0; }
.pl-row { display: flex; gap: 8px; align-items: center; width: 100%; padding: 10px; border: 0; border-radius: 0; background: none; text-align: left; font: inherit; color: inherit; cursor: pointer; min-height: 48px; }
.pl-row:hover, .pl-row:focus-visible { background: var(--btn-hover); }
.pl-arrow { font-size: 1.2rem; color: var(--chev); min-width: 20px; text-align: center; }
.paylist.bill .pl-row:hover { background: var(--btn-hover); }
.pl-empty { padding: 12px 10px !important; color: var(--muted); font-style: italic; }

/* Bewirtungsbeleg */
.checkline { display: flex; align-items: center; gap: 8px; margin: 12px 0 4px; font-weight: 600; cursor: pointer; }
.checkline input { width: 20px; height: 20px; margin: 0; }
.bewirtung { margin-top: 18px; padding-top: 12px; border-top: 2px dashed #000; }
.bewirtung .bw-line { border-bottom: 1px solid #000; height: 22px; }
@media print { .bewirtung { break-before: auto; } }

/* Verwaltung → Kassenbon */
.rc-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.rc-preview { position: sticky; top: 10px; }
.rc-h { margin: 18px 0 4px; font-size: 1rem; border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.rc-h:first-child { margin-top: 0; }
.rc-hint { font-size: .85rem; margin: -2px 0 6px 28px; }
.seg { display: flex; justify-content: center; margin-bottom: 8px; }
.seg button { border-radius: 0; }
.seg button:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.seg button:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.seg button.active { background: var(--tab-active); border-color: var(--tab-active); color: #fff; text-shadow: none; }
.receipt .r-big { font-size: 1.35em; }
.receipt .r-qr { margin-top: 8px; }
.receipt .r-qr svg { width: 110px; height: auto; }
@media (max-width: 900px) { .rc-layout { grid-template-columns: 1fr; } .rc-preview { position: static; } }

/* Kassenbons-Übersicht */
.tag { display: inline-block; padding: 1px 7px; border-radius: 9px; background: #cdeccd; color: #1d5e1d; font-size: .72rem; font-weight: 700; }
.inv-act { white-space: nowrap; text-align: right; }
.inv-act button { padding: 5px 10px; margin-left: 4px; font-size: .9rem; }
.inv-pr { white-space: nowrap; }
.strike .inv-act, .strike .inv-pr { text-decoration: none; }
.inv-wrap { overflow-x: auto; }
.inv-period { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-bottom: 10px; }
.inv-period .seg { margin: 0; }
.inv-nav { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.inv-nav input, .inv-nav select { width: auto; }
.inv-nav [data-step] { min-width: 40px; font-weight: 700; }
.inv-sum { margin: 4px 0 8px; }
.inv-act .sm { display: none; }
.m-date { display: none; font-size: .8rem; }
@media (max-width: 700px) {
  .inv-list .hide-m { display: none; }
  .inv-list td, .inv-list th { padding-left: 6px; padding-right: 6px; }
  .inv-act .lg { display: none; }
  .inv-act .sm { display: inline; }
  .m-date { display: block; }
  .inv-list .inv-act button { display: block; width: 100%; margin: 0 0 4px; padding: 6px 8px; }
  .inv-list .inv-pr { white-space: normal; font-size: .85rem; }
}

/* Gänge */
/* Gang-Leiste im Stil der Reiter (gelb, aktiv dunkel) */
.coursebar { display: flex; align-items: stretch; margin-bottom: 12px; border: 1px solid var(--tab-line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.coursebar > span { display: flex; align-items: center; padding: 0 12px; background: var(--tab-active); color: #fff; font-weight: 700; }
.coursebar button { flex: 1; border: 0; border-left: 1px solid var(--tab-line); border-radius: 0; box-shadow: none; background: var(--tab); color: #222; text-shadow: none; padding: 10px 6px; white-space: nowrap; }
.coursebar button:hover { background: #f4ea66; }
.coursebar button.active { background: var(--tab-active); color: #fff; text-shadow: 0 1px 0 #000; }
.coursebar .sm { display: none; }
@media (max-width: 600px) { .coursebar .sm { display: inline; } }
.course-head { display: flex; align-items: center; gap: 8px; margin: 12px 0 2px; padding-bottom: 4px; border-bottom: 2px solid var(--line); font-weight: 700; }
.course-head:first-child { margin-top: 0; }
.course-head button { padding: 6px 12px; }
.course-sel { width: auto; padding: 4px 6px; font-size: .85rem; }
.status.held { background: #e5e5e5; color: var(--muted); }
.lines li.is-held { opacity: .75; }
.ticket .course-tag { margin: 8px 0 2px; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.ticket .later { margin-top: 10px; padding: 6px 8px; border: 1px dashed var(--line); border-radius: var(--radius); background: var(--page); }
.ticket .later-h { font-size: .8rem; font-weight: 700; color: var(--muted); }
.ticket .later .item { opacity: .7; cursor: default; }
.ticket.waiting { opacity: .8; }
@media (max-width: 600px) {
  .coursebar > span { display: none; }
  .coursebar button { flex: 1 1 0; min-width: 0; padding: 10px 2px; font-size: .8rem; overflow: hidden; text-overflow: ellipsis; }
  .coursebar button:first-of-type { border-left: 0; }
  .coursebar .lg { display: none; }
}
@media (max-width: 600px) {
  .lines li:has(.course-sel) { flex-wrap: wrap; }
  .lines li:has(.course-sel) .name { flex: 1 1 calc(100% - 140px); }
  .course-sel { order: 5; margin-left: 38px; }
  .lines li:has(.course-sel) button { order: 6; }
}

/* Küche: abgerufene Gänge */
.calls { display: grid; gap: 8px; margin-bottom: 14px; }
.call { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius); background: var(--busy-bg); border: 2px solid var(--busy-line); box-shadow: var(--shadow); animation: callpulse 1.6s ease-in-out 3; }
.call b { font-size: 1.15rem; }
.call-ico { font-size: 1.6rem; color: var(--warn); }
.call-meta { font-size: .85rem; color: var(--muted); }
.call button { white-space: nowrap; }
.ticket.has-call { border: 2px solid var(--busy-line); }
.ticket.has-call h3 { background: var(--warn); text-shadow: 0 1px 0 #a86a10; }
.ticket .course-tag.called { color: var(--ink); background: var(--busy-bg); padding: 3px 6px; border-radius: var(--radius); }
@keyframes callpulse { 50% { box-shadow: 0 0 0 6px rgba(240,160,48,.35); } }
@media (max-width: 600px) { .call { flex-wrap: wrap; } .call button { width: 100%; } }

/* Bestellauswahl: Kategorien und Produkte hellgrau wie die Tasten */
.order-wrap .listview.cyan { border-color: var(--line); }
.order-wrap .listview li { border-bottom-color: var(--line); }
.order-wrap .listview li button, .order-wrap .listview .lv-empty { background: var(--btn); }
.order-wrap .listview li button:hover { background: var(--btn-hover); }
.order-wrap .listview li button:active { background: var(--btn-down); }
.order-wrap .listview .lv-head button.lv-back { background: #3a3a3a; }

/* Versionsnummer */
.version { font-size: .8rem; text-align: center; margin: 14px 0 0; }

/* Vollbild-Knopf in der Kopfleiste (nur wenn der Browser Vollbild kann) */
#fsBtn, #themeBtn { background: var(--bar-2); color: #fff; border: 1px solid #000; box-shadow: none; text-shadow: none; padding: 3px 8px; min-height: 26px; font-size: 1.05rem; line-height: 1; border-radius: var(--radius); }
#fsBtn.on { background: var(--primary); }
.vollbild-tipp { font-size: .82rem; padding: 0 16px; }
/* Als App vom Home-Bildschirm bzw. im Vollbild: Ränder von Notch und Home-Leiste freihalten */
@media (display-mode: fullscreen), (display-mode: standalone) {
  body { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); padding-bottom: env(safe-area-inset-bottom); }
}

/* Update in der Verwaltung */
.upd-steps { padding-left: 20px; margin: 0 0 8px; }
.upd-msg { margin-top: 12px; padding: 10px 12px; border-radius: var(--radius); background: #e5f4e8; color: #1f6b30; }
.upd-msg.err { background: #fde8e6; color: #a1261d; }
.upd-msg.warn { background: #fff4d6; color: #7a5300; }
#updFile { padding: 8px; }

/* TSE */
.receipt .tse { font-size: 11px; }
.receipt .tse td.right { white-space: normal; word-break: break-all; padding-left: 6px; }
.receipt .tse table { width: 100%; table-layout: fixed; }
.receipt .tse td:first-child { width: 36%; }
.receipt .tse .r-qr svg { width: 150px; }
.grid-tse { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; margin: 14px 0; }
@media (max-width: 900px) { .grid-tse { grid-template-columns: minmax(0, 1fr); } }
#tseState { margin-top: 0; }
#tseState .row { gap: 10px; flex-wrap: wrap; }
#tseInfo td.mono { word-break: break-all; font-size: .85em; }
#tseJobs td.small, .muted.small, p.small { font-size: .85em; }
#tseJobs td.mono { word-break: break-all; }

/* Beilagen-Auswahl */
.sidegroup { border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 12px 8px; margin: 0 0 12px; }
.sidegroup legend { font-weight: 700; padding: 0 6px; }
.sidegroup legend .muted { font-weight: 400; margin-left: 6px; }
.check-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.check-row:last-child { border-bottom: 0; }
.check-row input { width: 22px; height: 22px; margin: 0; flex: none; }
.check-row .spacer { flex: 1; }
.row.wrap { flex-wrap: wrap; }
.check-row span:not(.muted) { color: var(--ink); }

/* ================= Design (1.7) ================= */
html, body { font: 15.5px/1.4 var(--font); -webkit-font-smoothing: antialiased; }
h2 { font-size: 1.3rem; letter-spacing: -.01em; }
h3 { font-size: 1.02rem; }

/* Tasten: flach, klare Kanten, keine Schatten-Schrift */
button { font-weight: 600; text-shadow: none; border-color: var(--line-2); border-radius: var(--radius-sm); box-shadow: 0 1px 1px rgba(16,24,40,.04);
  transition: background-color .12s, border-color .12s, box-shadow .12s; }
button:hover { background: var(--btn-hover); border-color: #b9c3cf; }
button.primary, button.sel, .tabs button.active { background: var(--primary); border-color: var(--primary); color: #fff; text-shadow: none; }
button.primary:hover, button.sel:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
button.ok { background: var(--ok); border-color: var(--ok); text-shadow: none; }
button.ok:hover { background: var(--ok-dark); }
button.danger { background: #fff; border-color: #f3b4b4; color: var(--accent); text-shadow: none; }
button.danger:hover { background: #fdecec; }
.dialog .actions button.danger:only-of-type, button.danger.solid { background: var(--accent); color: #fff; border-color: var(--accent); }
button.link { color: var(--primary); text-decoration: none; font-weight: 600; }
button.link:hover { background: none; text-decoration: underline; }
input, select, textarea { border-color: var(--line-2); border-radius: var(--radius-sm); box-shadow: none; padding: .6em .7em; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.18); }
input[type=checkbox], input[type=radio] { accent-color: var(--primary); }
label { font-size: .82rem; font-weight: 600; color: var(--muted); }

/* Karten */
.panel { border-color: var(--line); border-radius: var(--radius); padding: 16px; }
.panel > h3:first-child, .panel > .row:first-child { margin: -16px -16px 14px; padding: 12px 16px; background: none; border-bottom: 1px solid var(--line); text-shadow: none; border-radius: var(--radius) var(--radius) 0 0; }
.kpi .v { font-size: 1.55rem; letter-spacing: -.01em; }
.kpi .muted:first-child { font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }

/* Kopf- und Navigationsleiste */
#topbar { background: var(--bar); border-bottom: 0; text-shadow: none; box-shadow: 0 1px 0 rgba(0,0,0,.2); }
.brand { font-weight: 700; letter-spacing: .01em; }
#logoutBtn, #fsBtn, #themeBtn { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); text-shadow: none; border-radius: var(--radius-sm); }
#logoutBtn:hover, #fsBtn:hover, #themeBtn:hover { background: rgba(255,255,255,.16); }
#nav { border-top: 1px solid rgba(255,255,255,.06); padding: 4px 6px 6px; gap: 4px; background: var(--bar); }
#nav button { background: transparent; border: 0; border-radius: var(--radius-sm); color: #aeb9c7; text-shadow: none; font-weight: 600; padding: 7px 2px; }
#nav button:hover { background: rgba(255,255,255,.07); color: #fff; }
#nav button.active { background: var(--primary); color: #fff; text-shadow: none; }
#nav .badge { box-shadow: 0 0 0 2px var(--bar); }

/* Anmeldung */
.login { border-radius: 16px; box-shadow: var(--shadow-lg); border: 0; margin-top: 6vh; }
.bar-title { background: var(--panel); color: var(--ink); text-shadow: none; font-size: 1.1rem; padding: 16px; border-bottom: 1px solid var(--line); }
.bar-title .btn-back { background: var(--btn); color: var(--ink); border-color: var(--line-2); text-shadow: none; top: 11px; }
.pin-display { border-color: var(--line-2); border-radius: var(--radius); box-shadow: none; background: #f8fafc; }
.keypad button { font-size: 1.45rem; font-weight: 600; border-radius: 12px; }

/* Listen */
.listview li, .listview li:last-child { border-bottom: 1px solid var(--line); }
.listview li button { background: var(--list); font-weight: 600; text-shadow: none; padding: 15px 48px 15px 18px; }
.listview li button:hover { background: var(--list-hover); }
.listview li button::after { background-color: transparent; width: 20px; height: 20px; margin-top: -10px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath fill='%239aa6b5' d='M5 2l5 5-5 5-1.4-1.4L7.2 7 3.6 3.4z'/%3E%3C/svg%3E"); background-size: 14px; }
.listview li button[data-p]::after { background-color: var(--primary-soft); border-radius: 50%; width: 26px; height: 26px; margin-top: -13px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath fill='%232563eb' d='M6 2h2v4h4v2H8v4H6V8H2V6h4z'/%3E%3C/svg%3E"); }
.listview.cyan, .order-wrap .listview.cyan { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.listview .lv-head { background: #f8fafc; color: var(--ink); text-shadow: none; border-bottom: 1px solid var(--line); font-size: .95rem; padding: 11px 18px; }
.listview .lv-back, .order-wrap .listview .lv-head button.lv-back { background: var(--btn); color: var(--ink); border: 1px solid var(--line-2); }
.listview .lv-empty, .order-wrap .listview .lv-empty { background: var(--panel); color: var(--muted); }
.order-wrap .listview li button { background: var(--panel); }
.lv-aside { color: var(--muted); font-weight: 600; }
.lv-aside .count { background: var(--primary); }

/* Reiter und Segmente: einheitliche Segmentleiste */
.tabs { gap: 4px; background: #e8ecf1; padding: 4px; border-radius: 12px; }
.tabs > button, .tabs > button:first-child, .tabs > button:nth-last-child(1 of button) { border: 0; border-radius: var(--radius-sm); margin: 0; background: transparent; box-shadow: none; padding: .55em .9em; color: #46525f; }
.tabs > button:hover { background: rgba(255,255,255,.7); }
.tabs > button.active { background: var(--panel); color: var(--ink); box-shadow: 0 1px 3px rgba(16,24,40,.14); }
.tabs .spacer + button, .tabs .spacer + button.primary { border-radius: var(--radius-sm); background: var(--primary); color: #fff; }
.seg { gap: 4px; background: #e8ecf1; padding: 4px; border-radius: 12px; display: inline-flex; }
div.seg { display: flex; width: fit-content; max-width: 100%; margin-left: auto; margin-right: auto; }
.seg button, .seg button:first-child, .seg button:last-child { border: 0; border-radius: var(--radius-sm); background: transparent; box-shadow: none; color: #46525f; }
.seg button.active { background: var(--panel); color: var(--ink); border: 0; box-shadow: 0 1px 3px rgba(16,24,40,.14); }
.chips button { border-radius: 999px; font-weight: 600; }
.chips button.active { background: var(--ink); border-color: var(--ink); }

/* Bestellansicht (Reiter oben, Gang-Leiste) */
.os-header { background: var(--bar); border-bottom: 0; }
.hdr-btn { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); border-radius: var(--radius-sm); text-shadow: none; }
.hdr-btn:hover { background: rgba(255,255,255,.16); }
.tabbar { border: 0; background: #e8ecf1; padding: 4px; gap: 4px; border-radius: 12px; box-shadow: none; }
.tabbar button, .tabbar button:first-child { border: 0; border-radius: var(--radius-sm); background: transparent; color: #46525f; padding: 12px 6px; font-size: 1rem; }
.tabbar button:hover { background: rgba(255,255,255,.7); }
.tabbar button.active { background: var(--panel); color: var(--ink); text-shadow: none; box-shadow: 0 1px 3px rgba(16,24,40,.14); }
.search-row input { font-family: var(--font); border-color: var(--line-2); box-shadow: none; }
.search-row input:focus { box-shadow: 0 0 0 3px rgba(37,99,235,.18); }
.kasse-btn { background: var(--ok); border-color: var(--ok); color: #fff; font-size: 1.05rem; }
.kasse-btn:hover { background: var(--ok-dark); }
.coursebar { border: 1px solid var(--line); background: var(--panel); border-radius: var(--radius); box-shadow: none; }
.coursebar > span { background: transparent; color: var(--muted); font-size: .85rem; }
.coursebar button { border: 0; border-left: 1px solid var(--line); background: transparent; color: #46525f; font-weight: 600; }
.coursebar button:hover { background: var(--btn-hover); }
.coursebar button.active { background: var(--primary-soft); color: var(--primary-dark); text-shadow: none; box-shadow: inset 0 -2px 0 var(--primary); }
.course-head { border-bottom: 1px solid var(--line); color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.total { border-top: 1px solid var(--ink); }

/* Tische */
.tables { gap: 12px; }
.table-tile { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.table-tile:hover { border-color: #b9c3cf; background: var(--panel); }
.table-tile.busy { background: var(--busy-bg); border-color: #f6c56a; box-shadow: inset 4px 0 0 var(--warn), var(--shadow); }
.table-tile.ready { background: #ecfdf3; border-color: #86d6a5; box-shadow: inset 4px 0 0 var(--ok), var(--shadow); }

/* Status-Marken */
.status, .tag, .vstat, .dest { border-radius: 999px; font-weight: 600; }
.status.offen { background: #fdecec; color: #b42318; }
.status.in_arbeit { background: #fff4db; color: #93590a; }
.status.fertig { background: #e3f8eb; color: #146c34; }

/* Küche / Bar */
.ticket { border-radius: 12px; border-color: var(--line); }
.ticket h3 { background: var(--bar); text-shadow: none; padding: 10px 12px; }
.ticket.old h3 { background: var(--accent); text-shadow: none; }
.ticket.has-call h3 { background: var(--warn); text-shadow: none; }
.ticket .item { background: #f8fafc; border-color: var(--line); border-radius: var(--radius-sm); }
.ticket .item.in_arbeit { background: var(--busy-bg); }

/* Tabellen */
table.list { border: 1px solid var(--line); border-radius: var(--radius); border-collapse: separate; border-spacing: 0; overflow: hidden; }
table.list th { background: #f8fafc; color: var(--muted); text-shadow: none; font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--line); }
table.list tr:nth-child(odd) td { background: transparent; }
table.list tr:last-child td { border-bottom: 0; }
table.list tr.click:hover td { background: var(--primary-soft); }
.prod-group-head { background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-bottom: 0; }
.prod-group-head .muted { color: var(--muted); }
.prod-group-head button.link { color: var(--primary); }
.prod-table { border-radius: 0 0 var(--radius) var(--radius); }
.switch input:checked + span { background: var(--ok); }

/* Kassieren */
.paybox { border-radius: var(--radius); background: var(--panel); }
.pb-head { background: #f8fafc; border-bottom-color: var(--line); }
.pb-head.bill { background: #ecfdf3; border-bottom-color: #b7e4c7; }
.pl-arrow { color: var(--primary); }

/* Dialoge */
.overlay { background: rgba(15,23,35,.5); backdrop-filter: blur(2px); }
.dialog { border-radius: 16px; box-shadow: var(--shadow-lg); padding: 0 20px 20px; }
.dialog > h3:first-child { background: var(--panel); color: var(--ink); text-shadow: none; margin: 0 -20px 16px; padding: 16px 20px; border-bottom: 1px solid var(--line); font-size: 1.1rem; position: sticky; top: 0; z-index: 1; }
.dialog .actions { padding-top: 14px; border-top: 1px solid var(--line); }
#toast { border-radius: 999px; background: var(--ink); box-shadow: var(--shadow-lg); font-weight: 600; }
#toast.err { background: var(--accent); }

/* Sonstiges */
pre.cfg { background: var(--bar); border-radius: var(--radius-sm); }
.upd-msg { border-radius: var(--radius-sm); }
.sidegroup { border-radius: var(--radius); }
@media (max-width: 600px) {
  main { padding: 12px 12px 24px; }
  #nav { padding: 3px 3px 5px; gap: 2px; }
  .tabbar button { font-size: .9rem; padding: 11px 2px; }
  .os-header { margin: 0 -12px 14px; }
}
.tabs.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; }
.tabs.scroll > button { flex: none; }
.dialog .actions { position: sticky; bottom: -20px; background: var(--panel); margin: 16px -20px -20px; padding: 14px 20px 20px; }
@media (max-width: 600px) { #nav button { font-size: .62rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } }

/* Farbwähler (Produktfarbe, Akzentfarbe der Speisekarte) */
input[type=color] { width: 72px; height: 42px; padding: 3px; cursor: pointer; }

/* Kategorien zum Aufklappen in der Bestellansicht */
.listview li button.acc { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.listview li button.acc::after { transform: rotate(90deg); transition: transform .15s; }
.listview li button.acc.open::after { transform: rotate(-90deg); }
.listview li button.acc.open { background: var(--list-hover); }
.listview .acc-n { color: var(--muted); font-size: .85rem; font-weight: 500; min-width: 22px; text-align: right; }
.order-wrap .listview li.acc-in > button, .order-wrap .listview li.acc-in.lv-empty { background: #f8fafc; }
.order-wrap .listview li.acc-in > button.acc { background: #eef2f7; }
.listview .lv-head .acc-close::before { content: none; }
.cat-sub { color: var(--muted, #6b7280); }

/* Pfad über der Kategorienliste */
.listview .lv-trail { flex-wrap: wrap; row-gap: 6px; }
.listview .trail { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; min-width: 0; }
.listview .trail .trail-link { width: auto; padding: 2px 4px; border: 0; background: none; color: inherit; font: inherit; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; opacity: .8; box-shadow: none; }
.listview .trail .trail-link::after { display: none; }
.listview .trail .trail-link:hover { opacity: 1; background: none; }
.listview .trail .trail-sep { opacity: .5; }
.listview .trail .trail-now { font-weight: 700; }

/* Allergene und Zusatzstoffe */
.marks { font-size: .75em; font-weight: 500; color: var(--muted); vertical-align: super; margin-left: 2px; }
.marks-edit { margin-top: 12px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.marks-edit summary { cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--ink); }
.marks-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 2px 14px; margin-top: 8px; }
.marks-grid label { display: flex; align-items: center; gap: 6px; margin: 0; font-size: .88rem; font-weight: 400; color: var(--ink); }
.marks-grid input { width: auto; margin: 0; }

/* Tagesbestand */
.stock { font-size: .78rem; font-weight: 700; padding: 1px 7px; border-radius: 8px; background: #e6f0e8; color: #24613a; white-space: nowrap; }
.stock.low { background: #fff1d6; color: #8a5a00; }
.stock.out { background: #fde2e2; color: #b42318; }
li.soldout > button { opacity: .55; }
li.soldout > button .lv-main { text-decoration: line-through; }

/* Happy Hour */
.hh-bar { margin: 0 0 10px; padding: 10px 14px; border-radius: 10px; background: #fff1d6; color: #6b4500; font-size: .95rem; }
.hh-price { color: #b45309; font-weight: 700; }
.chip-check { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; font-weight: 600; color: var(--ink); }
.chip-check input { width: auto; margin: 0; }

/* Menü zum Festpreis */
.menu-slot { padding: 10px 0; border-top: 1px solid var(--line); }
.menu-slot:first-child { border-top: 0; }
.menu-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.menu-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 4px 4px 10px; border-radius: 999px; background: #eef3fb; font-size: .9rem; font-weight: 600; }
.menu-chip button { border: 0; background: none; padding: 2px 6px; min-height: 0; color: var(--muted); }
.stock.menu { background: #e8eefc; color: #1d4ed8; }

/* Breite Bestellansicht für Tablet und PC (ab 760 px): Kategorien links, Kacheln in der Mitte, Bestellung rechts */
.ow-cats, .ow-cart { display: none; }
main:has(.order-wrap.wide) { max-width: var(--page-w, 1260px); display: flex; flex-direction: column; height: 100dvh; padding-bottom: 0; }
.order-wrap.wide { flex: 1; min-height: 0; max-width: none; width: 100%; margin: -18px 0 0; display: grid; grid-template-columns: 210px minmax(0, 1fr) 360px; }
.order-wrap.wide .ow-cats { display: flex; flex-direction: column; gap: 6px; margin-left: -16px; padding: 12px 10px; background: var(--bar-2); overflow-y: auto; }
.order-wrap.wide .ow-main { min-width: 0; min-height: 0; overflow-y: auto; padding: 14px 16px; }
.order-wrap.wide .ow-cart { display: flex; flex-direction: column; min-height: 0; margin-right: -16px; background: var(--panel); border-left: 1px solid var(--line); }
.ow-cat { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 58px; padding: 0 14px; border: 0; border-radius: 10px; background: transparent; color: #d6dde8; box-shadow: none; text-shadow: none; text-align: left; font-size: 1.02rem; }
.ow-cat:hover { background: rgba(255,255,255,.08); }
.ow-cat.active { background: var(--primary); color: #fff; }
.ow-cat .count, .tile .count { min-width: 26px; height: 26px; padding: 0 7px; border-radius: 13px; background: #fff; color: var(--primary-dark); font-size: .85rem; line-height: 26px; text-align: center; }
.tile .count { background: var(--primary); color: #fff; flex-shrink: 0; }
.t-cnt { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.p-minus { display: inline-block; min-width: 30px; height: 30px; border-radius: 15px; border: 1px solid var(--line-2); background: var(--panel); color: var(--ink); font-weight: 700; font-size: 1.1rem; line-height: 28px; text-align: center; cursor: pointer; margin-right: 6px; }
.p-minus:hover { background: #fdecec; border-color: #ef9a9a; }
.lines .qty-step button { min-width: 34px; padding: 4px 8px; }
.order-wrap.wide .tabbar button { padding: 12px 6px; font-size: 1rem; }
.order-wrap.wide .search-row { margin-bottom: 12px; }
.order-wrap.wide .search-row input { font-family: var(--font); padding: 11px 12px; border-color: var(--line-2); box-shadow: none; }
.ow-trail { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 0 0 10px; font-size: 1rem; }
.ow-trail .trail-link { padding: 4px 2px; border: 0; background: none; box-shadow: none; color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.ow-trail .trail-sep { color: var(--muted); }
.ow-hint { margin: 0 0 10px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.tile { display: flex; flex-direction: column; justify-content: space-between; gap: 8px; min-height: 104px; padding: 12px 12px 10px; border: 1px solid var(--line); border-left: 5px solid var(--line-2); border-radius: 12px; background: var(--panel); text-align: left; text-shadow: none; box-shadow: var(--shadow); }
.tile:hover { border-color: #93c5fd; }
.tile:active { transform: scale(.98); }
.tile.tile-cat { background: #eef3fb; border-color: #c9d6ea; border-left-color: #93a9cc; }
.tile.soldout { opacity: .5; }
.tile .t-top, .tile .t-bot { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; width: 100%; }
.tile .t-bot { align-items: center; font-weight: 600; font-size: .9rem; }
.tile .t-name { font-size: 1.02rem; line-height: 1.25; }
.tile .t-price { font-size: 1.02rem; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.oc-head { display: flex; align-items: baseline; justify-content: space-between; padding: 16px 18px 8px; font-size: 1.1rem; }
.oc-lines { flex: 1; min-height: 0; overflow-y: auto; padding: 0 18px; }
.oc-empty { margin: 30px 0; text-align: center; }
.oc-line { display: flex; align-items: center; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.oc-name { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.oc-name .muted { font-size: .85rem; }
.oc-course { width: auto; padding: 1px 4px; font-size: .8rem; margin-right: 2px; }
.oc-q { width: 42px; height: 42px; padding: 0; font-size: 1.2rem; flex-shrink: 0; }
.oc-n { width: 24px; text-align: center; }
.oc-foot { display: flex; flex-direction: column; gap: 10px; padding: 12px 18px 16px; border-top: 1px solid var(--line); }
.oc-old { display: flex; justify-content: space-between; color: var(--muted); font-size: .92rem; }
.oc-foot .total { display: flex; justify-content: space-between; margin: 0; font-size: 1.2rem; font-weight: 700; }
.oc-btns { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 10px; }
.oc-btns button { min-height: 56px; font-size: 1.1rem; }
.order-wrap.wide #toKasse { display: none; }
/* Tablet hochkant: Kategorien oben, Bestellung unten */
@media (orientation: portrait) {
  .order-wrap.wide { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) 38vh; }
  .order-wrap.wide .ow-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); margin: 0 -16px; padding: 10px 14px; overflow: visible; }
  .ow-cat { min-height: 50px; justify-content: center; }
  .order-wrap.wide .ow-cart { margin: 0 -16px; border-left: 0; border-top: 1px solid var(--line-2); box-shadow: 0 -8px 24px rgba(17,24,39,.08); }
  .oc-head { padding-top: 10px; }
}
/* PC mit Maus: kompaktere Kacheln */
@media (pointer: fine) {
  .tile { min-height: 84px; }
  .ow-cat { min-height: 44px; }
  .oc-q { width: 32px; height: 32px; font-size: 1rem; }
  .oc-btns button { min-height: 46px; }
}

/* Breite Produktverwaltung (ab 1000 px): Kategoriebaum, Liste, Produkt */
.pa { position: relative; display: grid; grid-template-columns: 220px minmax(0, 1fr) 470px; gap: 0; height: calc(100dvh - 250px); min-height: 520px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--panel); box-shadow: var(--shadow); }
.pa-tree { display: flex; flex-direction: column; gap: 2px; padding: 12px 8px; border-right: 1px solid var(--line); overflow-y: auto; }
.pa-tree-head { display: flex; align-items: center; justify-content: space-between; padding: 0 8px 8px; font-size: .8rem; color: var(--muted); letter-spacing: .04em; }
.pa-tree-head .link { padding: 0; font-size: .85rem; }
.pa-cat-row { display: flex; align-items: center; }
.pa-cat-row .pa-cat { flex: 1; }
.pa-cat { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 38px; padding: 0 10px; border: 0; border-radius: 8px; background: none; box-shadow: none; text-shadow: none; text-align: left; font-weight: 600; font-size: .95rem; }
.pa-cat .n { font-size: .78rem; color: var(--muted); font-weight: 500; }
.pa-cat.active { background: var(--primary); color: #fff; }
.pa-cat.active .n { color: #dbeafe; }
.pa-cat-edit { visibility: hidden; padding: 4px 8px; border: 0; background: none; box-shadow: none; color: var(--muted); }
.pa-cat-row:hover .pa-cat-edit { visibility: visible; }
.pa-mid { display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 14px 14px 0; }
.pa-tools { margin-bottom: 10px; flex-wrap: nowrap; }
.pa-tools input { flex: 1; }
.pa-filter { margin-bottom: 10px; gap: 6px; }
.pa-filter .flt { padding: 5px 12px; border-radius: 999px; font-size: .85rem; box-shadow: none; text-shadow: none; }
.pa-filter .flt.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.pa-bulk { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; padding: 8px 12px; border-radius: 10px; background: #dbeafe; color: #1e3a8a; }
.pa-bulk button { padding: 6px 12px; font-size: .88rem; border-color: #93c5fd; box-shadow: none; text-shadow: none; color: #1e3a8a; }
.pa-bulk .link { border: 0; background: none; text-decoration: underline; }
.pa-table-wrap { flex: 1; min-height: 0; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px 10px 0 0; border-bottom: 0; }
.pa-table { margin: 0; border: 0; box-shadow: none; border-radius: 0; font-size: .92rem; }
.pa-table thead th { position: sticky; top: 0; z-index: 1; background: #f8fafc; font-size: .75rem; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); }
.pa-table td { vertical-align: middle; padding-top: 6px; padding-bottom: 6px; }
.pa-table tr.sel td { background: #eff6ff; }
.pa-table tr.sel td:first-child { box-shadow: inset 3px 0 0 var(--primary); }
.pa-table tr.inactive .nm { color: var(--muted); text-decoration: line-through; }
.pa-ck { width: 34px; white-space: nowrap; }
td.pa-ck .drag { margin: 0 4px 0 -6px; vertical-align: middle; }
td.pa-ck:has(.drag) { width: 58px; }
.pa-ck input { width: 16px; height: 16px; margin: 0; }
.pa-name .dot { display: inline-block; width: 10px; height: 10px; margin-right: 8px; border-radius: 5px; vertical-align: middle; }
.pa-name .nm { font-weight: 600; }
.pa-path { font-size: .8rem; }
.pa-price { width: 84px; padding: 5px 8px; border: 1px solid transparent; border-radius: 6px; background: transparent; text-align: right; font-variant-numeric: tabular-nums; font: inherit; }
.pa-table tr:hover .pa-price, .pa-price:focus { border-color: var(--line-2); background: #fff; }
.pa-edit { min-height: 0; overflow: hidden; border-left: 1px solid var(--line); display: flex; flex-direction: column; }
/* Produktliste nutzt die ganze Breite: der Bearbeiten-Bereich erscheint erst, wenn ein Produkt gewählt ist, auf kleineren Bildschirmen über der Liste */
.pa:has(.pa-edit .pe-none), .pa:has(.pa-edit:empty) { grid-template-columns: 220px minmax(0, 1fr); }
.pa:has(.pa-edit .pe-none) .pa-edit, .pa-edit:empty { display: none; }
.pe-close { flex: none; margin-left: auto; padding: 2px 10px; border: 0; background: none; box-shadow: none; text-shadow: none; color: var(--muted); font-size: 1.1rem; }
@media (max-width: 1499px) {
  .pa, .pa:has(.pa-edit .pe-none) { grid-template-columns: 220px minmax(0, 1fr); }
  .pa-edit { position: absolute; top: 0; right: 0; bottom: 0; z-index: 5; width: min(470px, calc(100% - 220px)); background: var(--panel); box-shadow: -10px 0 30px rgba(15, 23, 42, .18); }
}
.pe-none { margin: 40px 20px; text-align: center; }
.pe { display: flex; flex-direction: column; min-height: 0; height: 100%; }
.pe-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 16px 18px 6px; }
.pe-head > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pe-head .muted { font-size: .8rem; }
.pe-head b { font-size: 1.2rem; }
.pe-head .pill { padding: 2px 10px; border-radius: 999px; background: #f1f3f6; color: var(--muted); font-size: .8rem; font-weight: 600; }
.pe-head .pill.on { background: #dcfce7; color: #166534; }
.pe-tabs { display: flex; gap: 2px; padding: 0 10px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.pe-tabs button { padding: 9px 10px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; box-shadow: none; text-shadow: none; color: var(--muted); font-size: .9rem; white-space: nowrap; }
.pe-tabs button.active { color: var(--primary-dark); border-bottom-color: var(--primary); }
.pe-body { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 18px 14px; }
.pe .pf-sec { display: none; }
.pe .pf-sec.on { display: block; }
.pe details.marks-edit { border: 0; padding: 0; margin-top: 8px; }
.pe details.marks-edit > summary { display: none; }
.pe .actions { display: flex; align-items: center; margin: 0; padding: 12px 18px; border-top: 1px solid var(--line); flex-wrap: nowrap; gap: 8px; }
.pe .actions button { padding: .55em .8em; font-size: .92rem; white-space: nowrap; }
.pe .marks-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* Umbuchen: Stückzahl je Zeile */
.mvlist li { display: flex; align-items: center; gap: 10px; }
.mvlist .name { flex: 1; }
.qty-step { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.qty-step button { min-width: 40px; min-height: 40px; padding: 0; font-size: 20px; }
.qty-step b { min-width: 22px; text-align: center; }

/* Arbeitszeit: Kommen/Gehen neben dem Namen */
#clockBtn { color: #fff; background: #1f7a3d; border: 1px solid rgba(255,255,255,.14); text-shadow: none; box-shadow: none; font-weight: 700; padding: 5px 10px; border-radius: var(--radius-sm); }
#clockBtn.on { background: #b4232c; }
#clockBtn[hidden] { display: none; }

/* Statistik */
.st-bars { display: flex; align-items: flex-end; gap: 3px; height: 160px; padding-top: 6px; }
.st-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; min-width: 0; }
.st-bar { background: var(--primary, #2563eb); border-radius: 3px 3px 0 0; min-height: 1px; }
.st-lbl { font-size: .72rem; text-align: center; color: var(--muted, #6b7280); margin-top: 3px; }
.st-days { height: 90px; gap: 1px; }
.st-hbar { background: var(--primary, #2563eb); height: 12px; border-radius: 3px; min-width: 1px; }
.st-heat { border-collapse: separate; border-spacing: 2px; font-size: .75rem; }
.st-heat th { font-weight: 600; color: var(--muted, #6b7280); padding: 0 2px; text-align: center; }
.st-heat td { width: 26px; height: 20px; border-radius: 3px; background-color: #f1f3f6; }
.small { font-size: .8rem; }

/* Tischplan */
.plan { position: relative; width: 100%; aspect-ratio: 16 / 10; min-height: 420px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  background-image: radial-gradient(circle, #dde3ea 1px, transparent 1px); background-size: 24px 24px; overflow: hidden; }
.plan .plan-t { position: absolute; width: 12%; min-height: 0; aspect-ratio: 1; padding: 6px; gap: 2px; font-size: .85rem; touch-action: none; }
.plan .plan-t .name { font-size: 1rem; }
.plan .plan-t.shape-rund { border-radius: 50%; }
.plan .plan-t.shape-lang { width: 22%; aspect-ratio: 2.2; }
.plan.editing { outline: 2px dashed var(--primary); outline-offset: 4px; }
.plan.editing .plan-t { cursor: grab; }
.table-tile.reserved { background: #fff7e6; border-color: #f1b84b; }
.res-tag { display: inline-block; background: #fdecc8; color: #7a4b00; border-radius: 6px; padding: 1px 6px; font-size: .75rem; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 6px; }
.plan { min-width: 680px; }
@media (max-width: 700px) { .plan .plan-t { font-size: .75rem; } .plan .plan-t .name { font-size: .85rem; } }
#nav [data-v="reservierungen"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 2h2v2h6V2h2v2h3a1 1 0 0 1 1 1v15a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h3zm12 7H5v10h14zm-9 2h2v2h-2zm-4 0h2v2H6zm8 0h2v2h-2zm-8 4h2v2H6zm4 0h2v2h-2z'/%3E%3C/svg%3E"); }

/* Ohne Verbindung: Hinweis unten links */
#netState { position: fixed; left: 10px; bottom: 10px; z-index: 900; padding: 7px 12px; border-radius: 999px; font-weight: 700; font-size: .85rem; color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.25); cursor: pointer; }
#netState.off { background: #b4232c; }
#netState.wait { background: #c27803; }
#netState[hidden] { display: none; }
.upd-notes { white-space: pre-wrap; font: inherit; font-size: .85rem; max-height: 260px; overflow: auto; margin: 6px 0 0; }
.upd-banner { margin: 0 0 12px; }

/* 1.15: Wartezeit, Stempelkarte, digitaler Beleg, Kundendisplay, Wareneinsatz */
.table-tile.wait-warn { box-shadow: inset 4px 0 0 var(--warn), 0 0 0 2px #f6c56a, var(--shadow); }
.table-tile.wait-late { background: #fdecec; border-color: #ef9a9a; box-shadow: inset 4px 0 0 var(--accent), 0 0 0 2px #ef9a9a, var(--shadow); }
.table-tile .wait-txt { color: #b45309; }
.table-warn { background: #fff4d6; border: 1px solid #f0c96a; color: #6b4a00; border-radius: 10px; padding: 8px 12px; margin-bottom: 10px; line-height: 1.7; }
.table-warn .link { font-weight: 700; }
.tabs button.has-warn::after { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--warn); margin-left: 6px; vertical-align: middle; }
.table-tile.wait-late .wait-txt { color: var(--accent); }
.ticket.warn h3 { background: #c27803; text-shadow: 0 1px 0 #7a4b00; }
.wait-avg { font-size: .9rem; color: var(--muted); }
.wait-avg b.warn { color: #b45309; }
.wait-avg b.late { color: var(--accent); }
.bon-qr svg { width: min(280px, 70vw); height: auto; }
.bon-qr { text-align: center; }
.stamp-info { text-align: center; font-weight: 700; margin: 6px 0; color: var(--ok-dark); }
.bon-offer { text-align: center; margin: 6px 0; font-weight: 600; color: var(--warn-dark, #8a5a00); }
.err-text { color: var(--accent); }
.i18n-row { display: grid; grid-template-columns: 110px 1fr 1.6fr; gap: 6px; align-items: center; margin-top: 6px; }
.i18n-row.one { grid-template-columns: 110px 1fr; }
@media (max-width: 600px) { .i18n-row { grid-template-columns: 1fr; } }
.disp-row { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); }
.disp-row .qr-s svg { width: 96px; height: 96px; }
.datev-acc input { padding: 4px 8px; }
table.recipe input { padding: 4px 6px; }
.pe .pf-h { display: none; }

/* Online-Bestellungen */
.online-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.online-card .lines li { display: flex; justify-content: space-between; gap: 10px; }
.online-card .num { white-space: nowrap; }
.online-card .ol-note { margin-top: 4px; padding: 4px 8px; background: #fff4d6; border-radius: 6px; }
.vstat.ol-neu { background: #ffd8c2; color: #9a3412; }
.vstat.ol-angenommen { background: #d6e8ff; color: #1d4f91; }
.vstat.ol-fertig, .vstat.ol-erledigt { background: #d4f5d4; color: #1d6b1d; }
.vstat.ol-abgelehnt, .vstat.ol-storniert { background: #fbd4d4; color: #9c1c1c; }
@media (max-width: 400px) { .online-grid { grid-template-columns: 1fr; } }
.fc-in { width: 80px; text-align: right; padding: 4px 6px; }
.staff-tbl tr.sum td { border-top: 2px solid var(--line, #dee2e6); }
.dr-tbl input, .dr-tbl select { margin: 0; }
.dr-tbl td { vertical-align: middle; }
.cl-drawer { margin: 6px 0; align-items: center; }
.kpi-mine { outline: 2px solid var(--primary-soft); }
.res-req-row{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;padding:10px 0;border-top:1px solid var(--line,#e3e6ea)}
.res-req-row:first-of-type{border-top:0}
.sumup-box{text-align:center;padding:18px 8px 8px}
.sumup-amt{font-size:2.4rem;font-weight:800;font-variant-numeric:tabular-nums;margin-bottom:10px}
.sumup-state{min-height:2.6em;display:flex;align-items:center;justify-content:center;gap:10px;font-size:1.05rem}
.spin{width:18px;height:18px;border:3px solid var(--line);border-top-color:#2563eb;border-radius:50%;display:inline-block;animation:spin .8s linear infinite;flex:none}
@keyframes spin{to{transform:rotate(360deg)}}
.ok-mark{color:#16a34a;font-weight:800;font-size:1.4rem}
.err-mark{color:#dc2626;font-weight:800;font-size:1.4rem}
.warn-text{color:#b45309}
.su-pair{display:flex;gap:10px;align-items:flex-end;flex-wrap:wrap}
.su-pair>div{flex:1;min-width:160px}
.su-more{margin:8px 0}
.su-more summary{cursor:pointer;color:var(--muted)}

/* Reihenfolge per Ziehen, mehrere Produkte anlegen (1.18) */
.grid3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .grid3 { grid-template-columns: 1fr 1fr; } .grid3 > :first-child { grid-column: 1 / -1; } }
.drag { background: none; border: 0; padding: 4px 6px; min-height: 0; color: var(--muted, #8a94a0); cursor: grab; touch-action: none; font-size: 1.1rem; line-height: 1; border-radius: 6px; }
.drag:hover, .drag:focus-visible { color: var(--ink, #1d2733); background: rgba(0, 0, 0, .06); }
.dragging { opacity: .85; background: #eef4ff !important; box-shadow: 0 2px 10px rgba(29, 53, 87, .18); position: relative; z-index: 2; }
.dragging .drag { cursor: grabbing; }
th.pa-dr, td.pa-dr, td.pdr { width: 30px; padding-left: 2px !important; padding-right: 0 !important; }
.pa-cat-row .drag { padding: 4px 2px; font-size: 1rem; opacity: .55; }
.pa-cat-row:hover .drag, .pa-cat-row .drag:focus-visible { opacity: 1; }
.bn-dialog { width: min(640px, calc(100vw - 32px)); }
.bn-wrap { max-height: min(46vh, 420px); overflow-y: auto; border: 1px solid var(--line, #e3e7ec); border-radius: 8px; }
.bn-table { margin: 0; }
.bn-table th { position: sticky; top: 0; background: var(--panel, #fff); z-index: 1; }
.bn-table td { padding: 4px 6px; }
.bn-table td.num { width: 110px; }
.bn-table td:last-child { width: 30px; }
.bn-table input { margin: 0; }
.bn-table td.num input { text-align: right; }
.bn-table tr.bn-bad input { border-color: var(--accent, #c0392b); background: #fff3f1; }
.prod-group-head { flex-wrap: wrap; row-gap: 2px; }
.prod-group-head .link { white-space: nowrap; }
.prod-table td.pdr { width: 26px; padding-right: 0 !important; }
.prod-table td.pdr .drag { padding: 4px 2px; }
@media (max-width: 600px) { .prod-table .pd { display: none; } }

/* 1.20: Plätze, Zählhilfe, Kellnerabrechnung, Tagesinfo */
.seat-tag { display: inline-block; min-width: 1.6em; padding: 0 5px; margin-right: 6px; border-radius: 6px; background: var(--primary-soft); color: inherit; font-size: .8em; font-weight: 600; text-align: center; vertical-align: 1px; }
.station .seat-tag, .ticket .seat-tag { margin: 0 0 0 6px; }
.seat-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 10px; }
.seat-chips button { padding: 6px 10px; }
.seat-chips button.active { background: var(--primary); border-color: var(--primary-dark); color: var(--primary-ink); }
.seatbar { margin-top: 6px; }
.count-grid { display: grid; grid-template-columns: 5.5em 1fr 6.5em; gap: 6px 10px; align-items: center; max-height: 55vh; overflow: auto; padding-right: 4px; }
.count-grid label { margin: 0; text-align: right; font-weight: 600; }
.count-grid input { margin: 0; }
.count-grid .num { text-align: right; color: var(--muted, #5a626a); }
.cl-drawer button { white-space: nowrap; }
.wallets { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.wallets .list td.num { white-space: nowrap; }
.dayinfo-text { white-space: normal; font-size: 1.05em; background: var(--page); border-radius: 8px; padding: 10px 12px; }
.dayinfo-list { margin: 0; padding-left: 18px; }
.dayinfo-list li { margin: 3px 0; }

/* 1.20: Preisstufen, Tageszeiten, Pfand, Ausverkauft, Inventur, Geschenkkarte */
.levelbar { margin-top: 6px; }
.dp-bar { background: var(--primary-soft); color: inherit; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.dp-bar .link { margin-left: auto; }
.stock.dep { background: #eef2f5; color: #3d4852; margin-right: 4px; }
.dep-list { display: grid; gap: 8px; margin: 8px 0 12px; }
.dep-row { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.dep-row .dep-name { min-width: 0; }
.dep-row input { margin: 0; }
.sold-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 12px; padding: 8px 12px; border-radius: 10px; background: #fde2e2; color: #b42318; font-weight: 600; }
.sold-bar button { padding: 4px 10px; background: #fff; border-color: #f3b4b4; color: #b42318; }
.sold-list { max-height: 55vh; overflow: auto; margin-top: 8px; }
.sold-list li { display: flex; align-items: center; gap: 10px; }
.sold-list li .name { flex: 1; min-width: 0; }
.inv-count input { margin: 0; max-width: 120px; }
.kpi .v.neg, td.neg { color: #b42318; }
.gift-motifs { flex-wrap: wrap; }

.pay-off { display: none !important; }

/* Kassenbon-Gestaltung: Logo, große Schrift, Trennlinien, Werbezeile */
.receipt .r-logo { margin-bottom: 6px; }
.receipt .r-logo img { max-width: 100%; height: auto; }
.receipt .r-logo .r-logo-klein { width: 35%; }
.receipt .r-logo .r-logo-mittel { width: 55%; }
.receipt .r-logo .r-logo-gross { width: 80%; }
.receipt.r-lg { font-size: 15px; }
.receipt.r-lg .tse { font-size: 11px; }
.receipt.rl-double hr { border-top: 3px double #000; }
.receipt.rl-dot hr { border-top: 2px dotted #000; }
.receipt.rl-none hr { border-top: 0; margin: 6px 0; }
.receipt .r-promo { margin: 4px 0; }
.bonpreview .tall { display: inline-block; transform: scaleY(2); transform-origin: 0 0; margin-bottom: 1.35em; }
.bonpreview .qrbox img { image-rendering: pixelated; }
.rc-logo { align-items: center; gap: 8px; flex-wrap: wrap; }
.rc-logo img { max-height: 60px; max-width: 160px; border: 1px solid var(--line); background: #fff; padding: 2px; }
.sold-mode { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin: -6px 0 14px; padding: 8px 12px; border-radius: 10px; background: #fff1f0; border: 1px solid #f3c1bd; color: #8a1c13; font-size: .92rem; }
.sold-mode[hidden] { display: none; }
.st-bar.warn { background: #f59e0b; }
.st-bar.late { background: #dc2626; }
.kpi .v.warn, td.num.warn { color: #b45309; }
.kpi .v.late, td.num.late { color: #b42318; font-weight: 700; }
/* Tischplan: Umsatz je Tisch, je mehr Umsatz desto kräftiger */
.table-tile.rev { background: rgba(37, 99, 235, var(--heat, 0)); border-color: rgba(37, 99, 235, calc(var(--heat, 0) + .2)); box-shadow: var(--shadow); }
.table-tile.rev:hover { background: rgba(37, 99, 235, calc(var(--heat, 0) + .08)); }
.table-tile.rev-none { opacity: .65; }
.table-tile .rev-busy { color: var(--warn, #d97706); font-size: .8rem; }
/* Handy: Suchfeld über die volle Breite, die Knöpfe darunter (sonst schiebt „Ausverkauft“ die Zeile aus dem Bild); Umschalter brechen um */
@media (max-width: 600px) {
  .search-row { flex-wrap: wrap; gap: 8px; }
  .search-row input { flex: 1 1 100%; }
  .search-row button { flex: 1 1 auto; padding-left: 10px; padding-right: 10px; white-space: nowrap; }
  div.seg { flex-wrap: wrap; justify-content: center; }
}
/* Veranstaltungen: Preisanteile je Steuersatz */
.ev-part { display: grid; grid-template-columns: 1fr 110px 80px 120px auto; gap: 6px; margin-top: 6px; align-items: center; }
.ev-part input, .ev-part select { margin: 0; }
.ev-lt { white-space: nowrap; }
@media (max-width: 600px) { .ev-part { grid-template-columns: 1fr 1fr; } .ev-part button { justify-self: start; } }

/* Hinweis „Testbetrieb“ in der Kopfzeile, solange der Produktivbetrieb nicht gestartet ist */
.app-ver { font-size: 12px; opacity: .6; font-variant-numeric: tabular-nums; white-space: nowrap; }
.test-pill { background: #f2b233; color: #222; border: 0; border-radius: 999px; padding: 2px 10px; font-size: .78rem; font-weight: 700; text-shadow: none; cursor: pointer; }
.test-pill:disabled { cursor: default; opacity: 1; }

/* Desktop (breiter Bildschirm mit Maus): eine Zeile mit Name links, Menü als Reiter mit Symbol neben dem Text, Anmeldung rechts */
@media (min-width: 1100px) and (pointer: fine) {
  #topbar { flex-wrap: nowrap; gap: 14px; padding: 0 12px; min-height: 56px; }
  .brand { order: 1; flex: none; text-align: left; padding: 0 6px 0 2px; max-width: 220px; font-size: 1.05rem; }
  #nav { order: 2; flex: 1; width: auto; min-width: 0; border-top: 0; padding: 0; gap: 2px; align-self: stretch; overflow-x: auto; scrollbar-width: none; }
  #nav button { flex: none; flex-direction: row; gap: 8px; padding: 0 14px; font-size: .9rem; font-weight: 600; border-radius: 0; color: #aeb9c7; background: transparent; box-shadow: inset 0 -3px 0 transparent; white-space: nowrap; }
  #nav button::before { width: 18px; height: 18px; flex: none; opacity: .85; }
  #nav button:hover { background: rgba(255,255,255,.06); color: #fff; }
  #nav button.active { background: rgba(255,255,255,.08); color: #fff; box-shadow: inset 0 -3px 0 var(--primary); }
  #nav button.active::before { opacity: 1; color: var(--primary); background: var(--primary); }
  #nav .badge { position: static; margin-left: -2px; }
  .who { order: 3; position: static; flex: none; }
  /* Hell/Dunkel wählt man am PC auf der Anmeldeseite, damit das Menü in einer Zeile bleibt */
  #themeBtn { display: none; }
  /* Name und Anmeldung teilen sich den Platz gleich auf, damit das Menü in der Bildschirmmitte steht */
  .brand { flex: 1 1 0; max-width: none; min-width: max-content; }
  #topbar .brand { justify-content: flex-start; }
  .who { flex: 1 1 0; justify-content: flex-end; white-space: nowrap; }
  #nav { flex: 0 1 auto; }
  /* Menü mittig (1.29); auto-Ränder statt justify-content, damit bei wenig Platz nichts links abgeschnitten wird */
  #nav > :first-child { margin-left: auto; }
  #nav > :last-child { margin-right: auto; }
  /* passt das Menü nicht in die Zeile: erst enger, dann eine eigene zweite Zeile, mittig über die volle Breite */
  #nav.compact button { padding: 0 9px; gap: 6px; font-size: .84rem; }
  #topbar.two-rows { flex-wrap: wrap; row-gap: 0; }
  #topbar.two-rows .brand { min-height: 52px; display: flex; align-items: center; margin-right: auto; }
  #topbar.two-rows #nav { order: 4; flex: 0 0 100%; height: 46px; border-top: 1px solid var(--bar-line); margin: 0 -12px; padding: 0 12px; box-sizing: content-box; }
}

/* Verwaltung → Module */
.mod-list { display: grid; gap: 6px; }
.mod-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; color: var(--ink); margin: 0; }
.mod-item input { width: auto; margin-top: 3px; }
.mod-item > span { display: flex; flex-direction: column; gap: 2px; }
.mod-item:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }

/* Logo MeoloPOS */
.brand { display: flex; align-items: center; justify-content: center; gap: 8px; }
.brand-ico { width: 24px; height: 24px; flex: none; }
#brand { overflow: hidden; text-overflow: ellipsis; }
.login > .login-brand { margin: 0; padding: 22px 16px 16px; border-bottom: 1px solid var(--line); }
.login-brand img { width: 230px; max-width: 75%; height: auto; display: block; margin: 0 auto; }
@media (max-width: 600px) { .brand { justify-content: flex-start; } }

/* Verwaltung → Leistung */
.perf-grid { margin: 12px 0; gap: 12px; }
.perf-chart { width: 100%; height: 110px; display: block; }
.kpi-bad .v { color: var(--accent); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); vertical-align: middle; }
.dot.on { background: var(--ok); }
.perf-scroll { overflow-x: auto; }
.perf-scroll .list { min-width: 520px; }
.pt-list .rc-h:first-child { margin-top: 0; }
.pt-item { display: block; width: 100%; text-align: left; margin: 0 0 6px; }
.pt-item.active { background: var(--tab-active); border-color: var(--tab-active); color: #fff; text-shadow: none; }
.pt-pdf { width: 100%; height: 70vh; min-height: 420px; border: 1px solid var(--line-2); border-radius: var(--radius); background: #fff; }
th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
th.sortable:hover, th.sorted { color: var(--primary); }

/* Kennzeichen vegetarisch/vegan */
.diet { display: inline-block; margin-left: 4px; padding: 0 5px; border-radius: 6px; background: #dcfce7; color: #166534; font-size: .7rem; font-weight: 700; line-height: 1.5; vertical-align: middle; letter-spacing: .02em; }
.diet.vegan { background: #bbf7d0; color: #14532d; }

/* Schichtübergabe */
.ho-tables { max-height: 38vh; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 2px 10px; }
.ho-tables .checkline { display: flex; align-items: center; gap: 8px; margin: 6px 0; }

/* Kurzcode und weitere Kategorien */
.pa-code { display: inline-block; font: 600 .78rem/1.4 ui-monospace, monospace; background: var(--page); color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; margin-right: 6px; }
.pf-more { margin: 10px 0 4px; }
.pf-more summary { cursor: pointer; font-weight: 600; }
.mc-list { max-height: 220px; overflow: auto; columns: 2 220px; }
.mc-list .checkline { margin: 3px 0; break-inside: avoid; }

/* Statistik (eigener Menüpunkt) */
.st2 { height: 180px; }
.st2 .st-pair { flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 1px; min-height: 0; }
.st2 .st-pair .st-bar { flex: 1; max-width: 34px; }
.st-bar.cmp { background: #b8c7e8; }
.st-foot { font-size: .7rem; text-align: center; line-height: 1.15; color: var(--muted); min-height: 2.3em; }
.st-dense .st-lbl, .st-dense .st-foot { font-size: .6rem; }
.st-key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: var(--primary, #2563eb); vertical-align: -1px; margin-left: 6px; }
.st-key.cmp { background: #b8c7e8; }
.st-delta { font-weight: 600; white-space: nowrap; }
.st-delta.up { color: #15803d; }
.st-delta.down { color: #b91c1c; }
.st-fc { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; margin-bottom: 14px; }
.st-fcday { padding: 8px 10px; text-align: center; }
.st-wx { font-size: 1.7rem; line-height: 1.3; }
.st-scroll { max-height: 62vh; overflow: auto; }
.st-prod tr.sel td { background: rgba(37, 99, 235, .08); }
.st-share td { vertical-align: middle; }
#printArea .st-print { font: 11pt/1.35 system-ui, sans-serif; color: #000; }
#printArea .st-print table { width: 100%; border-collapse: collapse; margin-bottom: 10px; }
#printArea .st-print th, #printArea .st-print td { border-bottom: 1px solid #ccc; padding: 3px 6px; text-align: left; }
#printArea .st-print h3 { margin: 14px 0 4px; }

/* Bild je Produkt */
.pf-img { margin-top: 12px; }
.pf-thumb { width: 72px; height: 72px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--page); }
.pf-thumb.none { display: flex; align-items: center; justify-content: center; font-size: .75rem; color: var(--muted); }
.pa-img { width: 26px; height: 26px; object-fit: cover; border-radius: 4px; vertical-align: middle; margin-right: 6px; }

/* 1.29: Reiter der Verwaltung bleiben beim Scrollen unter der Kopfzeile stehen */
.admin-tabs { position: sticky; top: var(--top-h, 0px); z-index: 8; box-shadow: 0 0 0 6px var(--page), 0 6px 10px -6px rgba(16,24,40,.25); }
/* 1.29: Hinweis Mehrwertsteuer/Zubereitung im Produkteditor, Prüfliste */
.pf-auto { margin: 4px 0 0; font-size: .82rem; }
.pf-auto.warn { color: #9a6700; }
.aa-list { max-height: 50vh; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.aa-list table { margin: 0; }
.ok-line { color: var(--ok, #1e7a46); font-weight: 600; }

/* ausgeschaltete Kategorien (1.29) */
.badge-off { display: inline-block; font-size: .75rem; padding: 1px 7px; border-radius: 9px; background: #f3e1e1; color: #8a2b2b; font-weight: 600; vertical-align: 1px; }
tr.cat-off td:not(.pa-dr) { opacity: .55; }
.prod-off { opacity: .55; }

/* Schmale Bereiche (z. B. DATEV, E-Mail, Update) stehen mittig statt links (1.29) */
main :is(.panel, .list, .row)[style*="max-width"] { margin-left: auto; margin-right: auto; }
#nav [data-v="statistik"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 3h2v16h16v2H3zm4 11l4-5 3 3 5-6 1.5 1.3-6.4 7.6-3-3-2.6 3.3z'/%3E%3C/svg%3E"); }

/* Verwaltung → TV-Karte: Vorlagen (1.60) */
.tv-themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin: 4px 0 12px; }
.tv-theme { display: grid; gap: 6px; padding: 8px; border: 2px solid var(--line); border-radius: 10px; cursor: pointer; font-weight: 400; margin: 0; }
.tv-theme.on { border-color: var(--primary); }
.tv-theme input { position: absolute; opacity: 0; pointer-events: none; }
.tv-theme:focus-within { outline: 2px solid var(--primary); outline-offset: 2px; }
.tv-thumb { aspect-ratio: 16 / 9; border-radius: 6px; padding: 8px 10px; display: flex; flex-direction: column; gap: 5px; overflow: hidden; }
.tv-thumb b { font-size: 15px; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-thumb i { display: block; height: 4px; border-radius: 2px; background: currentColor; opacity: .35; width: 80%; }
.tv-thumb i:first-of-type { border-top: 2px solid; opacity: .9; background: none; width: 45%; height: 0; }
.tv-theme .muted { font-size: 13px; }
.tv-prev { aspect-ratio: 16 / 9; max-width: 720px; border-radius: 8px; overflow: hidden; background: #000; border: 6px solid #111; }
.tv-prev iframe { width: 100%; height: 100%; border: 0; display: block; pointer-events: none; }
.tv-pick { max-height: 360px; overflow: auto; columns: 2 260px; column-gap: 24px; margin-top: 8px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; }
.tv-pick-cat { break-inside: avoid; margin-bottom: 8px; }
.tv-pick-cat > b { display: block; font-size: 13px; color: var(--muted); margin: 4px 0 2px; }
.tv-pick .checkline { margin: 2px 0; }

/* TV-Karte: eigene Bilder (1.62) */
.tv-slides { display: grid; gap: 8px; margin-top: 10px; }
.tv-slide { display: flex; gap: 12px; align-items: center; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--list); }
.tv-slide img { width: 128px; height: 72px; object-fit: cover; border-radius: 6px; flex: none; background: var(--line); }
.tv-slide.off img { opacity: .4; }
.tv-slide-f { flex: 1; min-width: 0; display: grid; gap: 4px; }
.tv-slide-f input[data-tvsc] { width: 100%; }
.tv-slide-b { display: flex; gap: 4px; flex: none; }
.tv-slide-b button { min-width: 40px; padding-inline: 8px; }
@media (max-width: 600px) { .tv-slide { flex-wrap: wrap; } .tv-slide img { width: 96px; height: 54px; } .tv-slide-b { width: 100%; justify-content: flex-end; } }

/* TV-Karte: Zeitraum der Gänsezeit (1.63) */
.tv-season { margin: 10px 0; padding: 10px 12px; border: 1px dashed var(--line-2); border-radius: 10px; }
.tv-season .grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 700px) { .tv-season .grid3 { grid-template-columns: 1fr; } }

/* Auswahl Hell / Dunkel / Wie Gerät (ab 1.64) */
.theme-pick { margin: 12px 0; }
.theme-pick button { flex: 1; min-height: 48px; }
.theme-pick button.sel { background: var(--primary); border-color: var(--primary); color: #fff; }
.login-brand .logo-dunkel { display: none; }

/* Fernzugriff über Cloudflare (ab 1.65) */
.tn-state { padding: 1px 8px; border-radius: 999px; background: #eef0f3; color: #4b5563; font-size: .85rem; }
.tn-state.ok { background: #e5f4e8; color: #1f6b30; }
.tn-state.warn { background: #fff4d6; color: #7a5300; }
.tn-state.err { background: #fde8e6; color: #a1261d; }
#tnToken { width: 100%; font-family: ui-monospace, monospace; font-size: .8rem; }
.tn-art { margin: 6px 0 10px; max-width: 320px; }
.tn-art button { flex: 1; }
.tabs.tn-art > button.active { background: var(--primary); color: #fff; }

/* ===== Dunkler Modus (erzeugt von werkzeuge/dunkel-css.py, nicht von Hand ändern) ===== */
html[data-theme="dark"] {
  color-scheme: dark;
  --page: #0e1319; --panel: #161d26; --ink: #e4e9f0; --muted: #98a4b3; --line: #2a3441; --line-2: #374252;
  --bar: #0a0e13; --bar-2: #151c25; --bar-ink: #fff; --bar-line: #000;
  --btn: #1c2430; --btn-hover: #243040; --btn-down: #2b3746;
  --primary: #3b82f6; --primary-dark: #2563eb; --primary-ink: #fff; --primary-soft: #1b2a45;
  --accent: #ef4444; --ok: #22a355; --ok-dark: #1a8a46; --warn: #f59e0b; --ready: #22a355;
  --busy-bg: #2b2412; --busy-line: #d18b0b;
  --shadow: 0 1px 2px rgba(0,0,0,.35), 0 1px 3px rgba(0,0,0,.45);
  --shadow-lg: 0 12px 32px rgba(0,0,0,.6);
  --list: #161d26; --list-hover: #1f2834; --list-line: #2a3441; --chev: #6d7a8b;
  --tab: #161d26; --tab-line: #2a3441; --tab-active: #3d4a5c;
}
html[data-theme="dark"] body { background: var(--page); color: var(--ink); }
html[data-theme="dark"] img:not([src$=".svg"]) { filter: brightness(.92); }
:where(html[data-theme="dark"]) button { text-shadow: 0 1px 0 transparent; }
:where(html[data-theme="dark"]) button.danger { text-shadow: 0 1px 0 transparent; }
:where(html[data-theme="dark"]) input, :where(html[data-theme="dark"]) select, :where(html[data-theme="dark"]) textarea { background: #1b1b1b; }
:where(html[data-theme="dark"]) .panel > h3:first-child, :where(html[data-theme="dark"]) .panel > .row:first-child h3 { background: #272727; text-shadow: 0 1px 0 transparent; }
:where(html[data-theme="dark"]) .panel > .row:first-child { background: #272727; }
:where(html[data-theme="dark"]) .login .user-drop > button { border: 1px solid var(--line-2, #424b55); background: #1b1b1b; }
:where(html[data-theme="dark"]) .login .user-pop { background: #1b1b1b; }
:where(html[data-theme="dark"]) .pin-display { background: #1b1b1b; }
:where(html[data-theme="dark"]) .table-tile.ready { background: #1d2e1d; }
:where(html[data-theme="dark"]) .status { background: #242424; }
:where(html[data-theme="dark"]) .status.offen { background: #391815; color: #daa7a4; }
:where(html[data-theme="dark"]) .status.in_arbeit { background: #4a3715; color: #ead2ac; }
:where(html[data-theme="dark"]) .status.fertig { background: #223922; color: #badbba; }
:where(html[data-theme="dark"]) .status.serviert { background: #292929; }
:where(html[data-theme="dark"]) .ticket { background: #1b1b1b; }
:where(html[data-theme="dark"]) .ticket.old h3 { text-shadow: 0 1px 0 transparent; }
:where(html[data-theme="dark"]) .ticket .item.in_arbeit { background: #3b2f11; }
:where(html[data-theme="dark"]) table.list { background: #1b1b1b; }
:where(html[data-theme="dark"]) table.list tr:nth-child(odd) td { background: #1d1d1d; }
:where(html[data-theme="dark"]) table.list tr.click:hover td { background: #15222e; }
:where(html[data-theme="dark"]) .dialog { background: #1b1b1b; }
:where(html[data-theme="dark"]) .tabbar button { color: #d6d6d6; }
:where(html[data-theme="dark"]) .tabbar button:hover { background: #6a6526; }
:where(html[data-theme="dark"]) .listview .lv-empty { color: #cfcfcf; }
:where(html[data-theme="dark"]) .lv-aside { color: #c8d1da; }
:where(html[data-theme="dark"]) .vstat { background: #2d2d2d; color: #cfcfcf; }
:where(html[data-theme="dark"]) .vstat.gültig { background: #1b381b; color: #b4dab4; }
:where(html[data-theme="dark"]) .vstat.eingelöst { background: #2a2a2a; color: #bfbfbf; }
:where(html[data-theme="dark"]) .vstat.abgelaufen { background: #443214; color: #e8d1a4; }
:where(html[data-theme="dark"]) .vstat.gesperrt { background: #3a1616; color: #d69b9b; }
:where(html[data-theme="dark"]) .chips button .n { background: rgba(255,255,255,0.09); }
:where(html[data-theme="dark"]) .chips button.active .n { background: rgba(255,255,255,0.12); }
:where(html[data-theme="dark"]) .prod-table .sw span { border: 1px solid rgba(255,255,255,0.17); }
:where(html[data-theme="dark"]) .dest { background: #242424; color: #bfbfbf; }
:where(html[data-theme="dark"]) .dest.kueche { background: #3f2712; color: #e8c6a4; }
:where(html[data-theme="dark"]) .dest.bar { background: #11283b; color: #9fc2e1; }
:where(html[data-theme="dark"]) .switch span { background: #373737; }
:where(html[data-theme="dark"]) .pb-head.bill { background: #223922; border-bottom-color: #506c50; }
:where(html[data-theme="dark"]) .tag { background: #223922; color: #badbba; }
:where(html[data-theme="dark"]) .coursebar button { color: #d6d6d6; }
:where(html[data-theme="dark"]) .coursebar button:hover { background: #6a6526; }
:where(html[data-theme="dark"]) .status.held { background: #292929; }
:where(html[data-theme="dark"]) .ticket.has-call h3 { text-shadow: 0 1px 0 transparent; }
:where(html[data-theme="dark"]) .upd-msg { background: #1d2d20; color: #b4d9bc; }
:where(html[data-theme="dark"]) .upd-msg.err { background: #321512; color: #d59d99; }
:where(html[data-theme="dark"]) .upd-msg.warn { background: #3b3011; color: #ead6ac; }
:where(html[data-theme="dark"]) button:hover { border-color: #4f565e; }
:where(html[data-theme="dark"]) button.danger { background: #1b1b1b; border-color: #663434; }
:where(html[data-theme="dark"]) button.danger:hover { background: #2f1212; }
:where(html[data-theme="dark"]) #nav button:hover { background: rgba(255,255,255,0.04); }
:where(html[data-theme="dark"]) .pin-display { background: #171e24; }
:where(html[data-theme="dark"]) .listview .lv-head { background: #171e24; }
:where(html[data-theme="dark"]) .tabs { background: #20242a; }
:where(html[data-theme="dark"]) .tabs > button, :where(html[data-theme="dark"]) .tabs > button:first-child, :where(html[data-theme="dark"]) .tabs > button:nth-last-child(1 of button) { color: #b7c0ca; }
:where(html[data-theme="dark"]) .tabs > button:hover { background: rgba(27,27,27,0.7); }
:where(html[data-theme="dark"]) .seg { background: #20242a; }
:where(html[data-theme="dark"]) .seg button, :where(html[data-theme="dark"]) .seg button:first-child, :where(html[data-theme="dark"]) .seg button:last-child { color: #b7c0ca; }
:where(html[data-theme="dark"]) .hdr-btn { background: rgba(255,255,255,0.04); }
:where(html[data-theme="dark"]) .hdr-btn:hover { background: rgba(255,255,255,0.08); }
:where(html[data-theme="dark"]) .tabbar { background: #20242a; }
:where(html[data-theme="dark"]) .tabbar button, :where(html[data-theme="dark"]) .tabbar button:first-child { color: #b7c0ca; }
:where(html[data-theme="dark"]) .tabbar button:hover { background: rgba(27,27,27,0.7); }
:where(html[data-theme="dark"]) .coursebar button { color: #b7c0ca; }
:where(html[data-theme="dark"]) .table-tile:hover { border-color: #4f565e; }
:where(html[data-theme="dark"]) .table-tile.busy { border-color: #8a6e3b; }
:where(html[data-theme="dark"]) .table-tile.ready { background: #122f1e; border-color: #4d7a5f; }
:where(html[data-theme="dark"]) .status.offen { background: #2f1212; color: #d6948f; }
:where(html[data-theme="dark"]) .status.in_arbeit { background: #392d11; color: #e1c6a0; }
:where(html[data-theme="dark"]) .status.fertig { background: #183022; color: #b3dfc3; }
:where(html[data-theme="dark"]) .ticket .item { background: #171e24; }
:where(html[data-theme="dark"]) table.list th { background: #171e24; }
:where(html[data-theme="dark"]) .pb-head { background: #171e24; }
:where(html[data-theme="dark"]) .pb-head.bill { background: #122f1e; border-bottom-color: #40614c; }
:where(html[data-theme="dark"]) .order-wrap .listview li.acc-in > button, :where(html[data-theme="dark"]) .order-wrap .listview li.acc-in.lv-empty { background: #171e24; }
:where(html[data-theme="dark"]) .order-wrap .listview li.acc-in > button.acc { background: #1b2128; }
:where(html[data-theme="dark"]) .cat-sub { color: var(--muted, #aaaeb8); }
:where(html[data-theme="dark"]) .stock { background: #212b23; color: #b9d7c4; }
:where(html[data-theme="dark"]) .stock.low { background: #3b2d11; color: #e8d1a4; }
:where(html[data-theme="dark"]) .stock.out { background: #341212; color: #d6948f; }
:where(html[data-theme="dark"]) .hh-bar { background: #3b2d11; color: #ecd8b3; }
:where(html[data-theme="dark"]) .hh-price { color: #deb290; }
:where(html[data-theme="dark"]) .menu-chip { background: #151e2c; }
:where(html[data-theme="dark"]) .stock.menu { background: #141c30; color: #889cd3; }
:where(html[data-theme="dark"]) .ow-cat:hover { background: rgba(255,255,255,0.04); }
:where(html[data-theme="dark"]) .ow-cat .count, :where(html[data-theme="dark"]) .tile .count { background: #1b1b1b; }
:where(html[data-theme="dark"]) .p-minus:hover { background: #2f1212; border-color: #723a3a; }
:where(html[data-theme="dark"]) .tile:hover { border-color: #305278; }
:where(html[data-theme="dark"]) .tile.tile-cat { background: #151e2c; border-color: #3b4658; border-left-color: #535f73; }
:where(html[data-theme="dark"]) .pa-bulk { background: #122238; color: #a4b1d7; }
:where(html[data-theme="dark"]) .pa-bulk button { border-color: #305278; color: #a4b1d7; }
:where(html[data-theme="dark"]) .pa-table thead th { background: #171e24; }
:where(html[data-theme="dark"]) .pa-table tr.sel td { background: #0e1d30; }
:where(html[data-theme="dark"]) .pa-table tr:hover .pa-price, :where(html[data-theme="dark"]) .pa-price:focus { background: #1b1b1b; }
:where(html[data-theme="dark"]) .pe-head .pill { background: #1d2025; }
:where(html[data-theme="dark"]) .pe-head .pill.on { background: #143620; color: #b7dfc6; }
:where(html[data-theme="dark"]) .st-lbl { color: var(--muted, #aaaeb8); }
:where(html[data-theme="dark"]) .st-heat th { color: var(--muted, #aaaeb8); }
:where(html[data-theme="dark"]) .st-heat td { background-color: #1d2025; }
:where(html[data-theme="dark"]) .plan { background-image: radial-gradient(circle, #24292f 1px, transparent 1px); }
:where(html[data-theme="dark"]) .table-tile.reserved { background: #34280f; border-color: #977a43; }
:where(html[data-theme="dark"]) .res-tag { background: #403215; color: #ead2ac; }
:where(html[data-theme="dark"]) .table-tile.wait-late { background: #2f1212; border-color: #723a3a; }
:where(html[data-theme="dark"]) .table-tile .wait-txt { color: #deb290; }
:where(html[data-theme="dark"]) .table-warn { background: #3b3011; border: 1px solid #89743f; color: #ecdab3; }
:where(html[data-theme="dark"]) .wait-avg b.warn { color: #deb290; }
:where(html[data-theme="dark"]) .bon-offer { color: var(--warn-dark, #e8d1a4); }
:where(html[data-theme="dark"]) .online-card .ol-note { background: #3b3011; }
:where(html[data-theme="dark"]) .vstat.ol-neu { background: #442514; color: #dcac9c; }
:where(html[data-theme="dark"]) .vstat.ol-angenommen { background: #11233b; color: #a0b8d6; }
:where(html[data-theme="dark"]) .vstat.ol-fertig, :where(html[data-theme="dark"]) .vstat.ol-erledigt { background: #1b381b; color: #b4dab4; }
:where(html[data-theme="dark"]) .vstat.ol-abgelehnt, :where(html[data-theme="dark"]) .vstat.ol-storniert { background: #3a1616; color: #d69b9b; }
:where(html[data-theme="dark"]) .staff-tbl tr.sum td { border-top: 2px solid var(--line, #404449); }
:where(html[data-theme="dark"]) .res-req-row { border-top: 1px solid var(--line,#3d4146); }
:where(html[data-theme="dark"]) .ok-mark { color: #98d9b0; }
:where(html[data-theme="dark"]) .err-mark { color: #d18a8a; }
:where(html[data-theme="dark"]) .warn-text { color: #deb290; }
:where(html[data-theme="dark"]) .drag:hover, :where(html[data-theme="dark"]) .drag:focus-visible { color: var(--ink, #d1d7de); background: rgba(255,255,255,0.07); }
:where(html[data-theme="dark"]) .dragging { background: #0e1a31 !important; }
:where(html[data-theme="dark"]) .bn-wrap { border: 1px solid var(--line, #3b4047); }
:where(html[data-theme="dark"]) .bn-table th { background: var(--panel, #1b1b1b); }
:where(html[data-theme="dark"]) .bn-table tr.bn-bad input { background: #2f130e; }
:where(html[data-theme="dark"]) .count-grid .num { color: var(--muted, #b4b9bf); }
:where(html[data-theme="dark"]) .stock.dep { background: #1d2327; color: #bdc6ce; }
:where(html[data-theme="dark"]) .sold-bar { background: #341212; color: #d6948f; }
:where(html[data-theme="dark"]) .sold-bar button { background: #1b1b1b; border-color: #663434; color: #d6948f; }
:where(html[data-theme="dark"]) .kpi .v.neg, :where(html[data-theme="dark"]) td.neg { color: #d6948f; }
:where(html[data-theme="dark"]) .sold-mode { background: #30100e; border: 1px solid #623733; color: #dda9a4; }
:where(html[data-theme="dark"]) .kpi .v.warn, :where(html[data-theme="dark"]) td.num.warn { color: #deb290; }
:where(html[data-theme="dark"]) .kpi .v.late, :where(html[data-theme="dark"]) td.num.late { color: #d6948f; }
:where(html[data-theme="dark"]) .table-tile .rev-busy { color: var(--warn, #dcb17f); }
:where(html[data-theme="dark"]) .diet { background: #143620; color: #b7dfc6; }
:where(html[data-theme="dark"]) .diet.vegan { background: #1b4429; color: #c0e2cd; }
:where(html[data-theme="dark"]) .st-delta.up { color: #a9ddbc; }
:where(html[data-theme="dark"]) .st-delta.down { color: #d38d8d; }
:where(html[data-theme="dark"]) .pf-auto.warn { color: #e6ce9d; }
:where(html[data-theme="dark"]) .ok-line { color: var(--ok, #acd8bf); }
:where(html[data-theme="dark"]) .badge-off { background: #2f1d1d; color: #cfa3a3; }
:where(html[data-theme="dark"]) .tn-state { background: #212225; color: #b5bdc7; }
:where(html[data-theme="dark"]) .tn-state.ok { background: #1d2d20; color: #b4d9bc; }
:where(html[data-theme="dark"]) .tn-state.warn { background: #3b3011; color: #ead6ac; }
:where(html[data-theme="dark"]) .tn-state.err { background: #321512; color: #d59d99; }
@media (min-width: 1100px) and (pointer: fine) {
  :where(html[data-theme="dark"]) #nav button:hover { background: rgba(255,255,255,0.03); }
  :where(html[data-theme="dark"]) #nav button.active { background: rgba(255,255,255,0.04); }
}
/* :where() hält die Spezifität wie im hellen Design, damit Regeln mit Variablen (z. B. .test-pill) weiter gewinnen */
/* Dunkler Modus: Ergänzungen von Hand (werden von dunkel-css.py ans Ende gehängt) */
:where(html[data-theme="dark"]) input, :where(html[data-theme="dark"]) select, :where(html[data-theme="dark"]) textarea { background: #10161e; color: var(--ink); border-color: var(--line-2); }
:where(html[data-theme="dark"]) input::placeholder, :where(html[data-theme="dark"]) textarea::placeholder { color: #6d7a8b; }
:where(html[data-theme="dark"]) button { color: var(--ink); }
:where(html[data-theme="dark"]) button.primary, :where(html[data-theme="dark"]) button.sel, :where(html[data-theme="dark"]) button.ok { color: #fff; }
:where(html[data-theme="dark"]) button.danger { background: transparent; border-color: #7f2a2a; color: #f87171; }
:where(html[data-theme="dark"]) .dialog .actions button.danger:only-of-type, :where(html[data-theme="dark"]) button.danger.solid { background: var(--accent); color: #fff; border-color: var(--accent); }
:where(html[data-theme="dark"]) a { color: #8ab4ff; }
:where(html[data-theme="dark"]) .muted { color: var(--muted); }
:where(html[data-theme="dark"]) .overlay { background: rgba(0,0,0,.6); }
/* im hellen Design dunkle Flächen mit var(--ink): im Dunklen nicht weiß werden lassen */
:where(html[data-theme="dark"]) .chips button.active, :where(html[data-theme="dark"]) .pa-filter .flt.active { background: var(--primary); border-color: var(--primary); color: #fff; }
:where(html[data-theme="dark"]) #toast { background: #2b3746; color: #fff; border: 1px solid #3d4a5c; }
:where(html[data-theme="dark"]) #nav .badge { color: #fff; }
:where(html[data-theme="dark"]) .login-brand .logo-hell { display: none; }
:where(html[data-theme="dark"]) .login-brand .logo-dunkel { display: block; }
