/* Ordersystem – Oberfläche im Stil klassischer Web-Kassen (jQuery-Mobile-Look):
   dunkle Kopf- und Navigationsleiste, helle Seite, große abgerundete Tasten, Listen mit Pfeilen */
:root {
  --page: #f9f9f9; --panel: #fff; --ink: #333; --muted: #777; --line: #ddd;
  --bar: #1d1d1d; --bar-2: #2a2a2a; --bar-ink: #fff; --bar-line: #111;
  --btn: #f6f6f6; --btn-hover: #ededed; --btn-down: #e8e8e8;
  --primary: #3388cc; --primary-dark: #1f6fa6; --primary-ink: #fff;
  --accent: #d9433b; --ok: #3a9d3a; --ok-dark: #2b7f2b; --warn: #f0a030; --ready: #3a9d3a;
  --busy-bg: #fff3d6; --busy-line: #f0a030;
  --radius: .3125em;
  --shadow: 0 1px 3px rgba(0,0,0,.15);
  --list: #b9e6e8; --list-hover: #a7dcdf; --list-line: #7fa8aa; --chev: #7f9c9e;
  --tab: #faf27c; --tab-line: #bdb03c; --tab-active: #333;
  --font: Helvetica, Arial, "Segoe UI", Roboto, 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="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: 1400px; 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 > *: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 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; }
@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 120px 11px 12px; text-align: left; }
  #nav button { font-size: .68rem; }
  #whoName { display: none; }
}

/* ---------- Bestellansicht im OrderSprinter-Stil ---------- */
.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"); }
.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 .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 .pa { 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 { background: var(--bar-2); color: #fff; border: 1px solid #000; box-shadow: none; text-shadow: none; padding: 3px 8px; 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; }
#updFile { padding: 8px; }
