/* FCV Getränke-Kiosk – Stylesheet */
:root {
  --fcv: #2E3987;
  --fcv-2: #4453b8;
  --fcv-soft: #e8eaf6;
  --bg: #f3f4f8;
  --bg-2: #ffffff;
  --card: #ffffff;
  --card-2: #f7f8fb;
  --line: #e1e4ee;
  --text: #171a2b;
  --text-2: #5d6380;
  --text-3: #8a90aa;
  --good: #1f9d61;
  --warn: #d98a00;
  --bad: #d23c3c;
  --shadow: 0 2px 6px rgba(20, 28, 70, .06), 0 8px 24px rgba(20, 28, 70, .07);
  --shadow-lg: 0 12px 40px rgba(20, 28, 70, .22);
  --r: 18px;
  --r-sm: 12px;
  --r-lg: 26px;
  --wm-opacity: .05;
  --font: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --fcv: #7f8cff;
  --fcv-2: #a3adff;
  --fcv-soft: #252b52;
  --bg: #0f1222;
  --bg-2: #161a30;
  --card: #1b2038;
  --card-2: #222844;
  --line: #2c3354;
  --text: #eef0fb;
  --text-2: #a9afcf;
  --text-3: #7a80a3;
  --shadow: 0 2px 6px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, .55);
  --wm-opacity: .045;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 17px;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  overflow: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
input, select, textarea { user-select: text; }
.hidden { display: none !important; }

/* ---------- Wasserzeichen ---------- */
.watermark {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: no-repeat center 58% / auto 78vh;
  opacity: var(--wm-opacity);
}

/* ---------- Grundlayout ---------- */
#app { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 12px 20px; background: var(--bg-2);
  border-bottom: 1px solid var(--line); flex: 0 0 auto;
}
.topbar .logo { height: 46px; width: auto; }
.brand { display: flex; flex-direction: column; line-height: 1.1; }
.brand b { font-size: 18px; }
.brand span { font-size: 13px; color: var(--text-2); }
.spacer { flex: 1; }

.segmented {
  display: inline-flex; background: var(--card-2); border: 1px solid var(--line);
  border-radius: 999px; padding: 4px; gap: 4px;
}
.segmented button {
  padding: 10px 22px; border-radius: 999px; font-weight: 600; color: var(--text-2);
  transition: background .15s, color .15s;
}
.segmented button.on { background: var(--fcv); color: #fff; box-shadow: var(--shadow); }
:root[data-theme="dark"] .segmented button.on { color: #0f1222; }

.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px;
  border-radius: 999px; background: var(--fcv-soft); color: var(--fcv); font-weight: 600; font-size: 15px;
}
.icon-btn {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  color: var(--text-2); background: var(--card-2); border: 1px solid var(--line);
}
.icon-btn:active { transform: scale(.95); }
.icon-btn svg { width: 22px; height: 22px; }

.barmode-banner {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  background: linear-gradient(90deg, #d98a00, #e8a400); color: #1d1300;
  font-weight: 700; padding: 8px 16px; font-size: 15px; flex: 0 0 auto;
}
.barmode-banner button { background: rgba(0,0,0,.14); padding: 6px 14px; border-radius: 999px; font-weight: 700; }
.localmode-banner { background: var(--fcv-soft); color: var(--fcv); font-size: 13px; text-align: center; padding: 4px; flex: 0 0 auto; }

.main { flex: 1; min-height: 0; display: flex; }

/* ---------- Bestellen ---------- */
.order-view { flex: 1; display: grid; grid-template-columns: 150px minmax(0, 1fr) 380px; min-height: 0; min-width: 0; }
.group-rail { padding: 16px 10px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; border-right: 1px solid var(--line); background: color-mix(in srgb, var(--bg-2) 70%, transparent); }
.group-rail button {
  text-align: left; padding: 12px 12px; border-radius: var(--r-sm); font-weight: 600; font-size: 15px;
  color: var(--text-2); display: flex; align-items: center; gap: 10px;
}
.group-rail button .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--c); flex: 0 0 auto; }
.group-rail button.on { background: var(--card); color: var(--text); box-shadow: var(--shadow); }
.group-rail .cat { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); padding: 10px 12px 2px; }

.products { overflow-y: auto; padding: 20px 24px 40px; align-self: stretch; }
.products .tiles { align-content: start; }
.group-block { padding-top: 16px; }
.group-title { display: flex; align-items: center; gap: 10px; margin: 6px 4px 12px; font-size: 20px; font-weight: 700; }
.group-title::before { content: ""; width: 6px; height: 22px; border-radius: 3px; background: var(--c); }
.cat-block + .cat-block { margin-top: 22px; }
.cat-title { font-size: 14px; text-transform: uppercase; letter-spacing: .1em; color: var(--text-2); margin: 0 4px 10px; font-weight: 800; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.tile {
  position: relative; background: var(--card); border-radius: var(--r); padding: 14px 10px 14px; justify-content: center;
  box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; gap: 6px;
  border: 2px solid transparent; transition: transform .12s ease, border-color .15s;
  min-height: 172px; overflow: hidden;
}
.tile::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 70px; background: linear-gradient(var(--c), transparent); opacity: .16; }
.tile:active { transform: scale(.95); }
.tile.bump { animation: bump .3s ease; }
@keyframes bump { 40% { transform: scale(1.06); } }
.tile .img { width: 72px; height: 72px; display: grid; place-items: center; position: relative; }
.tile .img img { width: 72px; height: 72px; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(0,0,0,.15)); }
.tile .img .emoji { font-size: 58px; line-height: 1; font-family: "Noto Color Emoji", "Segoe UI Emoji", "Apple Color Emoji", sans-serif; filter: drop-shadow(0 3px 4px rgba(0,0,0,.15)); }
.tile .img .ph { width: 54px; height: 54px; border-radius: 50%; background: var(--c); opacity: .85; display: grid; place-items: center; color: #fff; font-size: 22px; font-weight: 800; }
.tile .name { font-weight: 650; text-align: center; font-size: 17px; line-height: 1.2; }
.tile .price { color: var(--text-2); font-weight: 600; font-size: 16px; }
.tile .qty {
  position: absolute; top: 8px; right: 8px; min-width: 30px; height: 30px; border-radius: 15px;
  background: var(--fcv); color: #fff; font-weight: 800; display: grid; place-items: center; padding: 0 8px;
}
:root[data-theme="dark"] .tile .qty { color: #0f1222; }
.tile .var-hint { font-size: 12px; color: var(--text-3); }

/* Warenkorb */
.cart { background: var(--bg-2); border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.cart-head { padding: 18px 20px 8px; display: flex; align-items: center; justify-content: space-between; }
.cart-head h2 { margin: 0; font-size: 22px; }
.clear-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 12px;
  font-weight: 700; font-size: 15px; color: var(--bad);
  background: color-mix(in srgb, var(--bad) 10%, transparent); border: 1px solid color-mix(in srgb, var(--bad) 30%, transparent);
}
.clear-btn svg { width: 20px; height: 20px; }
.clear-btn:active { transform: scale(.95); background: color-mix(in srgb, var(--bad) 20%, transparent); }
.cart-event { padding: 0 20px 10px; }
.cart-event select { width: 100%; padding: 12px 14px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--card); font-weight: 600; }
.cart-lines { flex: 1; overflow-y: auto; padding: 4px 14px; }
.cart-empty { color: var(--text-3); text-align: center; padding: 50px 20px; font-size: 16px; }
.cart-empty .big { font-size: 46px; margin-bottom: 8px; opacity: .5; }
.line { display: flex; align-items: center; gap: 10px; padding: 10px 8px; border-bottom: 1px solid var(--line); animation: slidein .2s ease; }
@keyframes slidein { from { opacity: 0; transform: translateX(14px); } }
.line .ln { flex: 1; min-width: 0; }
.line .ln b { display: block; font-size: 16px; }
.line .ln span { font-size: 13px; color: var(--text-2); }
.stepper { display: flex; align-items: center; gap: 6px; }
.stepper button { width: 42px; height: 42px; border-radius: 12px; background: var(--card-2); border: 1px solid var(--line); font-size: 22px; font-weight: 700; }
.stepper button:active { transform: scale(.92); }
.stepper .n { min-width: 26px; text-align: center; font-weight: 800; font-size: 18px; }
.line .sum { width: 74px; text-align: right; font-weight: 700; }
.cart-foot { padding: 14px 18px 18px; border-top: 1px solid var(--line); }
.total { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.total span { color: var(--text-2); }
.total b { font-size: 30px; }
.pay-btns { display: grid; gap: 10px; }
.btn {
  border-radius: var(--r-sm); padding: 16px 18px; font-weight: 700; font-size: 18px;
  display: flex; align-items: center; justify-content: center; gap: 10px; transition: transform .1s, opacity .15s;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .4; pointer-events: none; }
.btn.primary { background: var(--fcv); color: #fff; box-shadow: 0 6px 16px color-mix(in srgb, var(--fcv) 35%, transparent); }
:root[data-theme="dark"] .btn.primary { color: #0f1222; }
.btn.secondary { background: var(--card-2); border: 1px solid var(--line); }
.btn.good { background: var(--good); color: #fff; }
.btn.danger { background: var(--bad); color: #fff; }
.btn.ghost { background: transparent; color: var(--text-2); }
.btn.small { padding: 10px 14px; font-size: 15px; border-radius: 10px; }
.btn .sub { font-weight: 500; font-size: 13px; opacity: .8; }
.pay-btns .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pay-btns .btn.secondary { flex-direction: column; gap: 2px; padding: 12px; }

/* ---------- Overlays ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 50; background: rgba(10, 14, 35, .55);
  display: grid; place-items: center; padding: 24px; animation: fade .15s ease; backdrop-filter: blur(3px);
}
@keyframes fade { from { opacity: 0; } }
.sheet {
  background: var(--bg-2); border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  width: min(1100px, 100%); max-height: calc(100vh - 48px); display: flex; flex-direction: column;
  animation: pop .2s ease; overflow: hidden;
}
.sheet.narrow { width: min(560px, 100%); }
.sheet.mid { width: min(780px, 100%); }
@keyframes pop { from { transform: scale(.96) translateY(10px); opacity: 0; } }
.sheet-head { display: flex; align-items: center; gap: 12px; padding: 20px 24px 12px; }
.sheet-head h2 { margin: 0; font-size: 24px; flex: 1; }
.sheet-body { padding: 8px 24px 24px; overflow-y: auto; }
.sheet-foot { padding: 14px 24px 20px; display: flex; gap: 12px; justify-content: flex-end; border-top: 1px solid var(--line); }

/* Namenswahl */
.name-section { margin: 8px 0 18px; }
.name-section h3 { margin: 0 0 10px; font-size: 14px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); }
.name-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.name-tile {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 16px 14px;
  font-weight: 650; font-size: 17px; text-align: left; box-shadow: var(--shadow); display: flex; align-items: center; gap: 12px;
}
.name-tile:active { transform: scale(.97); }
.name-tile .av { width: 38px; height: 38px; border-radius: 50%; background: var(--fcv-soft); color: var(--fcv); display: grid; place-items: center; font-weight: 800; font-size: 14px; flex: 0 0 auto; }
.name-tile.team .av { background: #fff1d6; color: #9a5b00; }
:root[data-theme="dark"] .name-tile.team .av { background: #3d2e10; color: #ffc25a; }
.name-tile small { display: block; color: var(--text-3); font-weight: 500; font-size: 12px; }
.az { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.az button { width: 48px; height: 48px; border-radius: 12px; background: var(--card-2); border: 1px solid var(--line); font-weight: 800; font-size: 18px; }
.az button.on { background: var(--fcv); color: #fff; border-color: var(--fcv); }
.az button:disabled { opacity: .3; }

/* PIN-Pad */
.pin-dots { display: flex; justify-content: center; gap: 14px; margin: 8px 0 20px; }
.pin-dots i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--text-3); }
.pin-dots i.f { background: var(--fcv); border-color: var(--fcv); }
.pin-dots.shake { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-10px); } 75% { transform: translateX(10px); } }
.pinpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 340px; margin: 0 auto; }
.pinpad button { height: 72px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); font-size: 28px; font-weight: 700; box-shadow: var(--shadow); }
.pinpad button { display: grid; place-items: center; }
.pinpad button svg { width: 30px; height: 30px; }
.pinpad button:active { transform: scale(.94); background: var(--fcv-soft); }
.pin-msg { text-align: center; min-height: 24px; color: var(--bad); font-weight: 600; margin-top: 14px; }
.pin-info { text-align: center; color: var(--text-2); margin: -6px 0 14px; }

/* Bestätigung */
.confirm { text-align: center; padding: 40px 30px 30px; }
.check { width: 110px; height: 110px; margin: 0 auto 18px; border-radius: 50%; background: var(--good); display: grid; place-items: center; animation: popin .4s cubic-bezier(.2,1.6,.4,1); }
.check svg { width: 60px; height: 60px; stroke: #fff; stroke-width: 4; fill: none; stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw .4s .15s forwards; }
@keyframes popin { from { transform: scale(.3); opacity: 0; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
.confirm h2 { font-size: 30px; margin: 0 0 8px; }
.confirm p { color: var(--text-2); font-size: 18px; margin: 0 0 24px; }
.confirm .items { font-size: 18px; margin-bottom: 26px; }
.undo-bar { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; margin: 14px auto 0; max-width: 360px; }
.undo-bar i { display: block; height: 100%; background: var(--fcv); transition: width 1s linear; }

.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 80;
  background: var(--text); color: var(--bg-2); padding: 12px 14px 12px 20px; border-radius: 999px;
  display: flex; align-items: center; gap: 14px; box-shadow: var(--shadow-lg); font-weight: 600; animation: pop .2s;
}
.toast button { background: var(--fcv); color: #fff; padding: 8px 16px; border-radius: 999px; font-weight: 700; }

/* Varianten */
.var-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.var-grid button { padding: 22px 12px; border-radius: var(--r-sm); background: var(--card); border: 2px solid var(--line); font-weight: 700; font-size: 18px; box-shadow: var(--shadow); }
.var-grid button:active { border-color: var(--fcv); transform: scale(.97); }

/* Formulare */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 14px; font-weight: 600; color: var(--text-2); }
.field input, .field select, .field textarea, .inp {
  padding: 12px 14px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--card); font-size: 17px; outline: none;
}
.field input:focus, .field select:focus, .inp:focus { border-color: var(--fcv); box-shadow: 0 0 0 3px var(--fcv-soft); }
.field .hint { font-size: 13px; color: var(--text-3); }
.row { display: flex; gap: 12px; align-items: center; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.check-row { display: flex; align-items: center; gap: 10px; margin: 6px 0 14px; font-weight: 600; }
.switch { position: relative; width: 52px; height: 30px; flex: 0 0 auto; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--line); border-radius: 15px; transition: .2s; }
.switch span::after { content: ""; position: absolute; width: 24px; height: 24px; top: 3px; left: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.switch input:checked + span { background: var(--good); }
.switch input:checked + span::after { transform: translateX(22px); }
.reason-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.reason-grid button { padding: 16px; border-radius: var(--r-sm); background: var(--card); border: 2px solid var(--line); font-weight: 650; }
.reason-grid button.on { border-color: var(--fcv); background: var(--fcv-soft); color: var(--fcv); }
.dup-box { background: #fff6e0; border: 1px solid #f0d08a; color: #6b4a00; border-radius: var(--r-sm); padding: 14px; margin: 4px 0 14px; }
:root[data-theme="dark"] .dup-box { background: #33270c; border-color: #6b5214; color: #ffd98a; }
.dup-box .name-grid { margin-top: 10px; }

/* ---------- Verbrauchsliste ---------- */
.list-view { flex: 1; display: flex; flex-direction: column; min-height: 0; padding: 18px 24px; gap: 14px; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.toolbar select, .toolbar input { padding: 10px 14px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--card); font-weight: 600; }
.toolbar .az { margin: 0; }
.toolbar .az button { width: 38px; height: 38px; font-size: 15px; border-radius: 10px; }
.table-wrap { flex: 1; overflow: auto; background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); }
table.t { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 16px; }
table.t th { position: sticky; top: 0; background: var(--card-2); text-align: left; font-size: 13px; color: var(--text-2); font-weight: 700; padding: 12px 12px; border-bottom: 1px solid var(--line); z-index: 1; white-space: nowrap; }
table.t td { padding: 12px 12px; border-bottom: 1px solid var(--line); }
table.t tr.click { cursor: pointer; }
table.t tr.click:active td { background: var(--fcv-soft); }
table.t td.num, table.t th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.t td.muted { color: var(--text-3); }
table.t tr.letter td { background: var(--card-2); font-weight: 800; color: var(--fcv); padding: 6px 12px; font-size: 14px; }
table.t th.rot { writing-mode: initial; }
.tag { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--card-2); color: var(--text-2); border: 1px solid var(--line); }
.tag.good { background: color-mix(in srgb, var(--good) 15%, transparent); color: var(--good); border-color: transparent; }
.tag.bad { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); border-color: transparent; }
.tag.warn { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); border-color: transparent; }
.tag.blue { background: var(--fcv-soft); color: var(--fcv); border-color: transparent; }
.empty { text-align: center; color: var(--text-3); padding: 40px; }

/* ---------- Admin ---------- */
.admin { flex: 1; display: grid; grid-template-columns: 240px 1fr; min-height: 0; }
.admin-nav { background: var(--bg-2); border-right: 1px solid var(--line); padding: 16px 12px; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
.admin-nav .who { padding: 10px 12px 16px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.admin-nav .who b { display: block; }
.admin-nav .who span { font-size: 13px; color: var(--text-2); }
.admin-nav button { text-align: left; padding: 11px 14px; border-radius: 12px; font-weight: 600; color: var(--text-2); display: flex; align-items: center; justify-content: space-between; }
.admin-nav button.on { background: var(--fcv-soft); color: var(--fcv); }
.admin-nav .badge { background: var(--warn); color: #fff; border-radius: 999px; font-size: 12px; padding: 2px 8px; }
.admin-nav .sep { height: 1px; background: var(--line); margin: 8px 6px; }
.admin-main { overflow-y: auto; padding: 22px 28px 60px; }
.admin-main h1 { margin: 0 0 4px; font-size: 26px; }
.admin-main .lead { color: var(--text-2); margin: 0 0 18px; }
.admin-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.admin-head .grow { flex: 1; }
.search { padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); min-width: 240px; }
.inactive-toggle { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-2); font-weight: 600; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-bottom: 22px; }
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 18px 20px; }
.card.click { cursor: pointer; }
.card.click:active { transform: scale(.98); }
.card h3 { margin: 0 0 6px; font-size: 15px; color: var(--text-2); font-weight: 600; }
.card .big { font-size: 30px; font-weight: 800; }
.card .sub { font-size: 14px; color: var(--text-2); margin-top: 4px; }
.card.warn { border-left: 5px solid var(--warn); }
.card.good { border-left: 5px solid var(--good); }
.card.blue { border-left: 5px solid var(--fcv); }
.pager { display: flex; justify-content: center; gap: 10px; align-items: center; margin-top: 14px; color: var(--text-2); }
.bar-cell { display: flex; align-items: center; gap: 10px; }
.bar-cell i { display: block; height: 10px; border-radius: 5px; background: var(--fcv); min-width: 2px; }
.pl-items .pl-row { display: grid; grid-template-columns: 1fr 140px 44px; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.order-list { display: flex; flex-direction: column; gap: 8px; }
.order-list .ol { display: flex; align-items: center; gap: 10px; background: var(--card-2); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; }
.order-list .ol span { flex: 1; font-weight: 600; }
.order-list .ol button { width: 36px; height: 36px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); }
.preview-table { max-height: 320px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; margin: 10px 0; }
.err { color: var(--bad); font-weight: 600; }
.ok { color: var(--good); font-weight: 600; }
.muted { color: var(--text-3); }
.mt { margin-top: 18px; }
.section-title { font-size: 18px; margin: 24px 0 10px; }

/* Startbildschirm */
.splash { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: var(--bg); transition: opacity .4s; }
.splash img { height: 180px; animation: popin .6s cubic-bezier(.2,1.4,.4,1); }
.splash.out { opacity: 0; pointer-events: none; }

@media (max-width: 1100px) {
  .order-view { grid-template-columns: 120px minmax(0, 1fr) 330px; }
  .admin { grid-template-columns: 200px 1fr; }
}
@media (max-width: 820px) {
  .order-view { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .group-rail { display: none; }
  .cart { border-left: 0; border-top: 1px solid var(--line); max-height: 45vh; }
  .brand { display: none; }
}
.event-chip { cursor: pointer; }
.event-chip:active { transform: scale(.96); }

/* Gruppen-Leiste links */
.order-view { grid-template-columns: 176px minmax(0, 1fr) 380px; }
.group-rail { padding: 14px 10px; gap: 6px; background: var(--bg-2); }
.rail-item {
  position: relative; display: flex !important; align-items: center; gap: 10px !important;
  padding: 7px 8px !important; border-radius: 16px !important; text-align: left !important;
  color: var(--text-2); font-size: 14.5px !important; font-weight: 650; line-height: 1.15; min-height: 58px;
  border: 2px solid transparent; transition: background .15s, border-color .15s, transform .1s;
}
.rail-item:active { transform: scale(.96); }
.rail-ic {
  flex: 0 0 auto; width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; font-size: 24px; line-height: 1;
  background: color-mix(in srgb, var(--c) 16%, transparent);
  font-family: "Noto Color Emoji", "Segoe UI Emoji", "Apple Color Emoji", sans-serif;
  transition: background .15s, box-shadow .15s;
}
.rail-ic img { width: 24px; height: auto; }
.rail-lb { flex: 1; min-width: 0; hyphens: auto; overflow-wrap: anywhere; }
.rail-n {
  flex: 0 0 auto; min-width: 24px; height: 22px; padding: 0 7px; border-radius: 11px;
  background: var(--card-2); color: var(--text-3); font-size: 12px; font-weight: 700; display: grid; place-items: center;
}
.rail-item.on { background: color-mix(in srgb, var(--c) 12%, var(--card)) !important; border-color: var(--c); color: var(--text); box-shadow: var(--shadow) !important; }
.rail-item.on .rail-ic { background: var(--c); box-shadow: 0 5px 12px color-mix(in srgb, var(--c) 40%, transparent); }
.rail-item.on .rail-ic img { filter: brightness(0) invert(1); }
.rail-item.on .rail-n { background: var(--c); color: #fff; }
@media (max-width: 1100px) { .order-view { grid-template-columns: 150px minmax(0, 1fr) 330px; } }

/* ---------- Tablet-Layout groß (Fernwirkung) ---------- */
.topbar.kiosk-top { padding: 14px 24px; min-height: 92px; gap: 18px; }
.kiosk-title { margin: 0; font-size: 40px; font-weight: 800; letter-spacing: -.02em; line-height: 1; white-space: nowrap; }
.kiosk-title span { color: var(--fcv); }
.event-chip { font-size: 16px; padding: 10px 16px; }
.segmented.big button { padding: 13px 28px; font-size: 18px; }
.logo-space { width: 150px; flex: 0 0 auto; }
.hero-logo {
  position: fixed; top: 10px; right: 28px; height: 160px; width: auto; z-index: 20; pointer-events: none;
  filter: drop-shadow(0 10px 18px rgba(20, 28, 70, .28));
  animation: popin .6s cubic-bezier(.2,1.4,.4,1);
}
body:has(.localmode-banner) .hero-logo { top: 30px; }
body:has(.barmode-banner) .hero-logo { top: 74px; }
.corner-tools { position: fixed; left: 14px; bottom: 14px; z-index: 15; display: flex; gap: 8px; opacity: .45; transition: opacity .2s; }
.corner-tools:hover, .corner-tools:active { opacity: 1; }
.corner-tools .icon-btn { width: 40px; height: 40px; border-radius: 12px; }
.corner-tools .icon-btn svg { width: 19px; height: 19px; }

.order-view { grid-template-columns: 196px minmax(0, 1fr) 400px; }
.group-rail { padding: 16px 12px 76px; gap: 8px; }
.rail-item { min-height: 66px; font-size: 16.5px !important; gap: 12px !important; padding: 8px 10px !important; }
.rail-ic { width: 50px; height: 50px; border-radius: 15px; font-size: 28px; }

.products { padding: 22px 26px 40px; }
.cat-title { font-size: 15px; margin-bottom: 12px; }
.tiles { grid-template-columns: repeat(auto-fill, minmax(172px, 1fr)); gap: 16px; }
.tile { min-height: 200px; border-radius: 22px; gap: 8px; }
.tile::before { height: 84px; }
.tile .img { width: 84px; height: 84px; }
.tile .img img { width: 84px; height: 84px; }
.tile .img .emoji { font-size: 66px; }
.tile .name { font-size: 19px; }
.tile .price { font-size: 19px; font-weight: 800; color: var(--fcv); }
.tile .qty { min-width: 36px; height: 36px; border-radius: 18px; font-size: 18px; top: 10px; right: 10px; }

.cart-head { padding: 22px 22px 10px; justify-content: flex-start; gap: 14px; min-height: 92px; padding-right: 150px; }
.cart-head h2 { font-size: 26px; }
.cart-lines { padding: 4px 16px; }
.line { padding: 12px 8px; }
.line .ln b { font-size: 18px; }
.line .ln span { font-size: 14px; }
.stepper button { width: 50px; height: 50px; font-size: 26px; border-radius: 14px; }
.stepper .n { min-width: 32px; font-size: 21px; }
.line .sum { font-size: 18px; width: 84px; }
.cart-empty { font-size: 18px; }
.total span { font-size: 18px; }
.total b { font-size: 38px; }
.pay-btns .btn.primary { font-size: 23px; padding: 22px; border-radius: 16px; }
.pay-btns .btn.secondary { font-size: 19px; padding: 14px; border-radius: 16px; }

.list-view .toolbar { padding-right: 150px; }

@media (max-width: 1100px) {
  .order-view { grid-template-columns: 160px minmax(0, 1fr) 340px; }
  .kiosk-title { font-size: 30px; }
  .hero-logo { height: 120px; }
  .logo-space { width: 110px; }
  .cart-head { padding-right: 110px; }
  .tiles { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

.clear-btn { width: 48px; height: 48px; padding: 0; justify-content: center; border-radius: 14px; }
.clear-btn svg { width: 22px; height: 22px; }

/* ---------- Warenkorb über die volle Höhe ---------- */
:root { --cartW: 400px; }
body.has-cart .topbar, body.has-cart .main { margin-right: var(--cartW); }
body.has-cart .order-view { grid-template-columns: 196px minmax(0, 1fr); }
body.has-cart .cart {
  position: fixed; top: var(--bannerH, 0px); right: 0; bottom: 0; width: var(--cartW); z-index: 6;
  box-shadow: -10px 0 30px rgba(20, 28, 70, .08);
}
.cart-head { padding-right: 22px; min-height: 92px; }
.topbar.kiosk-top .logo { height: 58px; }
.kiosk-title { font-size: 34px; }
@media (max-width: 1100px) {
  :root { --cartW: 340px; }
  body.has-cart .order-view { grid-template-columns: 160px minmax(0, 1fr); }
  .kiosk-title { font-size: 26px; }
}
.topbar.kiosk-top { gap: 14px; }
.kiosk-title { font-size: 30px; }
.segmented.big button { padding: 12px 20px; font-size: 17px; }
.topbar.kiosk-top > * { flex-shrink: 0; }
.topbar.kiosk-top > .spacer { flex-shrink: 1; min-width: 0; }
@media (max-width: 1300px) { .kiosk-title { font-size: 26px; } .topbar.kiosk-top .logo { height: 50px; } .segmented.big button { padding: 11px 16px; font-size: 16px; } }

/* ---------- Ansicht wechseln links unten ---------- */
.corner-tools { left: 12px; bottom: 12px; width: 172px; flex-direction: column; gap: 10px; opacity: 1; }
.view-switch { display: flex; flex-direction: column; gap: 6px; background: var(--card-2); border: 1px solid var(--line); border-radius: 18px; padding: 5px; }
.view-switch button { display: flex; align-items: center; gap: 10px; padding: 12px 12px; border-radius: 14px; font-weight: 700; font-size: 16px; color: var(--text-2); text-align: left; hyphens: manual; line-height: 1.1; }
.view-switch button.on { background: var(--fcv); color: #fff; box-shadow: var(--shadow); }
:root[data-theme="dark"] .view-switch button.on { color: #0f1222; }
.view-switch button:active { transform: scale(.97); }
.vs-ic { font-size: 22px; line-height: 1; font-family: "Noto Color Emoji", "Segoe UI Emoji", "Apple Color Emoji", sans-serif; }
.tool-row { display: flex; gap: 8px; opacity: .45; transition: opacity .2s; }
.tool-row:hover, .tool-row:active { opacity: 1; }
.group-rail { padding-bottom: 200px !important; }

.list-layout { flex: 1; display: grid; grid-template-columns: 196px minmax(0, 1fr); min-height: 0; }
.list-side { background: var(--bg-2); border-right: 1px solid var(--line); padding: 16px 12px 200px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.side-title { font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--text-3); font-weight: 800; padding: 0 6px; }
.letter-all { padding: 12px; border-radius: 14px; font-weight: 700; font-size: 16px; text-align: left; color: var(--text-2); border: 2px solid transparent; }
.letter-all.on { background: var(--fcv-soft); color: var(--fcv); border-color: var(--fcv); }
.letters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.letters button { height: 52px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); font-weight: 800; font-size: 20px; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.letters button.on { background: var(--fcv); color: #fff; border-color: var(--fcv); }
.list-view .toolbar { padding-right: 0; }
@media (max-width: 1100px) { .list-layout { grid-template-columns: 160px minmax(0, 1fr); } .corner-tools { width: 140px; } }

/* Event-Anzeige rechts oben, vor dem Warenkorb */
.event-badge {
  display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right;
  padding: 10px 18px; border-radius: 16px; background: var(--fcv-soft); border: 2px solid color-mix(in srgb, var(--fcv) 25%, transparent);
}
.event-badge:active { transform: scale(.97); }
.eb-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-2); }
.eb-name { font-size: 26px; font-weight: 800; color: var(--fcv); line-height: 1.05; }

/* ---------- Gruppen-Leiste: schlichte Liste mit Farbbalken ---------- */
.group-rail { gap: 2px; padding: 10px 0 176px !important; background: var(--bg-2); }
.rail-item {
  border-radius: 0 !important; min-height: 50px; padding: 6px 14px 6px 16px !important; border: 0;
  border-left: 6px solid transparent; font-size: 17px !important; color: var(--text-2); box-shadow: none !important;
}
.rail-ic { background: none !important; width: 32px; height: 32px; font-size: 24px; box-shadow: none !important; border-radius: 0; }
.rail-item.on { background: color-mix(in srgb, var(--c) 14%, transparent) !important; border-left-color: var(--c); color: var(--text); font-weight: 800; }
.rail-item:active { transform: none; background: color-mix(in srgb, var(--c) 10%, transparent) !important; }
.view-switch button { padding: 10px 12px; }

/* ---------- Hintergrund und Kontrast ---------- */
.watermark { display: none !important; }
:root { --bg: #e8ebf3; --bg-2: #ffffff; --card: #ffffff; --card-2: #f4f5fa; --line: #dde1ec; }
:root[data-theme="dark"] {
  --bg: #090c18; --bg-2: #131830; --card: #222a50; --card-2: #1b2142; --line: #2d355f;
  --text: #f4f6ff; --text-2: #c3c8e6; --text-3: #8f95bd;
  --fcv: #8f9bff; --fcv-soft: #2a3266;
}
body { background: var(--bg); }
.main, .products, .list-view { background: transparent; }
.group-rail { padding-top: 0 !important; }
.list-side { padding-top: 0; }
.list-side .side-title { padding-top: 14px; }
:root[data-theme="dark"] .tile { border: 1px solid rgba(255,255,255,.07); box-shadow: 0 6px 18px rgba(0,0,0,.45); }
:root[data-theme="dark"] .tile::before { opacity: .28; }
:root[data-theme="dark"] .topbar, :root[data-theme="dark"] .group-rail, :root[data-theme="dark"] .cart, :root[data-theme="dark"] .list-side { border-color: #2a3158; }
:root[data-theme="dark"] .rail-item.on { background: color-mix(in srgb, var(--c) 30%, transparent) !important; }
:root[data-theme="dark"] .event-badge { border-color: color-mix(in srgb, var(--fcv) 45%, transparent); }

/* ================= Überarbeitung nach Design-Feedback ================= */
:root {
  --bg: #F3F5F9; --bg-2: #FFFFFF; --card: #FFFFFF; --card-2: #F3F5F9; --nav: #E9EDF5;
  --line: #DCE2EC; --text: #192033; --text-2: #59657A; --text-3: #8892A6;
  --fcv: #2E3987; --fcv-soft: #E5E9F7; --cartW: 330px;
}
:root[data-theme="dark"] {
  --bg: #0D1220; --bg-2: #151D31; --card: #202A42; --card-2: #1A2338; --nav: #151D31;
  --line: #35415C; --text: #F4F6FF; --text-2: #B5BFD4; --text-3: #8590AA;
  --fcv: #929FFF; --fcv-soft: #29365E;
}
body { background: var(--bg); }

/* Kopfzeile flacher */
.topbar.kiosk-top { min-height: 70px; padding: 10px 22px; }
.topbar.kiosk-top .logo { height: 46px; }
.kiosk-title { font-size: 28px; }

/* Event als schlichte Statusanzeige (Tippen nur für Admins relevant) */
.event-badge { background: none; border: 0; padding: 4px 2px; flex-direction: row; align-items: center; gap: 10px; }
.event-badge::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 4px color-mix(in srgb, var(--good) 20%, transparent); }
.eb-name { font-size: 24px; color: var(--text); }
.event-badge:active { transform: none; opacity: .7; }

/* Navigation schmaler, eigener Grauton */
body.has-cart .order-view { grid-template-columns: 155px minmax(0, 1fr); }
.list-layout { grid-template-columns: 155px minmax(0, 1fr); }
.group-rail, .list-side { background: var(--nav); }
.rail-item { font-size: 17px !important; padding: 6px 10px 6px 12px !important; gap: 10px !important; min-height: 54px; }
.rail-item.on { background: var(--fcv-soft) !important; }
:root[data-theme="dark"] .rail-item.on { background: var(--fcv-soft) !important; }
.corner-tools { width: 131px; left: 12px; }
.view-switch button { font-size: 15px; gap: 8px; padding: 10px 8px; }

/* Produktkacheln: einfarbig, wenig Schatten, schmaler Gruppen-Akzent */
.products { padding: 16px 20px 40px; }
.tiles { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; }
.tile {
  min-height: 156px; border-radius: 14px; padding: 16px 10px 14px; gap: 6px;
  background: var(--card); border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(16, 24, 48, .06);
}
.tile::before { height: 5px; opacity: 1; background: var(--c); }
:root[data-theme="dark"] .tile { border-color: var(--line); box-shadow: none; }
:root[data-theme="dark"] .tile::before { opacity: 1; }
.tile:active { transform: scale(.97); border-color: var(--fcv); }
.tile .img { width: 60px; height: 60px; }
.tile .img .emoji { font-size: 52px; filter: none; }
.tile .name { font-size: 19px; font-weight: 600; }
.tile .price { font-size: 21px; font-weight: 700; color: var(--fcv); }
.tile .qty { background: var(--fcv); }
.cat-title { font-size: 17px; letter-spacing: .06em; color: var(--text-2); margin-bottom: 10px; }

/* Warenkorb schmaler, Positionen größer, Abschluss klar gestaffelt */
.cart { background: var(--bg-2); }
.cart-head { min-height: 70px; padding: 14px 18px 6px; }
.cart-head h2 { font-size: 24px; }
.line { gap: 8px; }
.line .ln b { font-size: 18px; }
.stepper button { width: 46px; height: 46px; }
.stepper .n { min-width: 26px; font-size: 20px; }
.line .sum { width: 70px; font-size: 17px; }
.total b { font-size: 34px; }
.cart-foot { padding: 14px 16px 16px; }
.pay-btns .btn.primary.main-pay { flex-direction: column; gap: 2px; min-height: 72px; font-size: 23px; }
.main-pay .sub { font-size: 13px; font-weight: 600; opacity: .8; }
.pay-btns .btn.secondary { min-height: 60px; font-size: 18px; background: var(--card); border: 2px solid var(--line); }
:root[data-theme="dark"] .pay-btns .btn.secondary { background: var(--card); }
.clear-btn { width: 44px; height: 44px; }

@media (max-width: 1100px) {
  body.has-cart .order-view, .list-layout { grid-template-columns: 140px minmax(0, 1fr); }
  .tiles { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  :root { --cartW: 300px; }
}
/* Warenkorb-Zeile zweizeilig: Name + Summe oben, Mengen-Steuerung darunter */
.line { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "ln sum" "step step"; gap: 8px 10px; align-items: center; }
.line .ln { grid-area: ln; }
.line .sum { grid-area: sum; width: auto; font-size: 18px; }
.line .stepper { grid-area: step; }
.rail-item { font-size: 16px !important; }

/* Leerer Warenkorb */
.cart-empty { padding: 70px 24px; display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--text-2); }
.cart-empty-ic { width: 84px; height: 84px; border-radius: 50%; background: var(--card-2); border: 1px solid var(--line); display: grid; place-items: center; color: var(--text-3); margin-bottom: 6px; }
.cart-empty-ic svg { width: 44px; height: 44px; }
.cart-empty-t { font-size: 22px; font-weight: 700; color: var(--text); }
.cart-empty-s { font-size: 18px; line-height: 1.4; max-width: 240px; }

/* Drei-Punkte-Menü */
.more-btn { margin-left: 4px; background: transparent; border-color: transparent; }
.more-btn svg { width: 24px; height: 24px; }
.menu-pop { position: fixed; z-index: 90; min-width: 230px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; animation: pop .15s ease; }
.menu-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 14px; border-radius: 10px; font-weight: 600; font-size: 16px; text-align: left; }
.menu-item:active, .menu-item:hover { background: var(--card-2); }
.mi-ic { display: grid; place-items: center; width: 22px; color: var(--text-2); }
.mi-ic svg { width: 20px; height: 20px; }
.menu-sep { height: 1px; background: var(--line); margin: 4px 6px; }
.group-rail { padding-bottom: 130px !important; } .list-side { padding-bottom: 130px; }
/* Feste vertikale Positionen in den Kacheln: Symbol, Name (immer 2 Zeilen hoch), Preis */
.tile { justify-content: flex-start; min-height: 0; height: 172px; padding: 18px 10px 12px; }
.tile .img { flex: 0 0 60px; }
.tile .name { height: 2.4em; line-height: 1.2em; display: flex; align-items: center; justify-content: center; overflow: hidden; margin-top: 4px; }
.tile .price { line-height: 1.1; }
.tile .var-hint { position: absolute; left: 0; right: 0; bottom: 6px; text-align: center; }
.tile .name { height: 2.6em; line-height: 1.25em; overflow: visible; }
.tile { height: 176px; }

/* Namenswahl: oben fix, Liste scrollt, unten fix */
.sheet-body:has(> .picker) { padding: 0; overflow: hidden; display: flex; flex-direction: column; min-height: 0; }
.picker { display: flex; flex-direction: column; min-height: 0; max-height: calc(100vh - 140px); }
.picker-top { padding: 4px 24px 0; flex: 0 0 auto; }
.picker-top .name-section:last-child { margin-bottom: 8px; }
.picker-list { overflow-y: auto; padding: 4px 24px 16px; flex: 1 1 auto; min-height: 120px; }
.picker-foot { padding: 12px 24px 18px; border-top: 1px solid var(--line); display: flex; justify-content: center; flex: 0 0 auto; }
.name-tile.freq { background: #EEF1FA; border-color: #D5DCF3; }
:root[data-theme="dark"] .name-tile.freq { background: #29365E; border-color: #3a4876; }
.az .az-all { width: auto; padding: 0 16px; }
.btn.ghost-outline { background: transparent; border: 2px dashed var(--line); color: var(--text-2); font-size: 16px; padding: 12px 26px; }
.btn.ghost-outline:active { border-color: var(--fcv); color: var(--fcv); }
/* Bestätigung: große Knöpfe */
.confirm .row { gap: 14px; }
.confirm .row .btn { min-height: 58px; min-width: 170px; font-size: 19px; border-radius: 14px; }
.confirm .row .btn.secondary { border: 2px solid var(--line); }

/* ---------- Liste als Abrechnungstafel ---------- */
.list-side { padding: 6px 12px 130px; gap: 6px; }
.list-side .side-title { padding: 12px 4px 2px; }
.side-sel { width: 100%; padding: 11px 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); font-weight: 600; font-size: 15px; }
.side-val { padding: 10px 4px; font-weight: 700; color: var(--fcv); }
.list-view { padding: 14px 20px 16px; gap: 10px; }
.list-az { margin: 0; flex-wrap: wrap; }
.list-az button { width: 48px; height: 48px; font-size: 18px; }
.list-az .az-all { width: auto; padding: 0 18px; }
table.tally { font-size: 18px; }
table.tally th { font-size: 14px; padding: 14px 14px; }
table.tally td { padding: 0 14px; height: 54px; }
table.tally td.sticky-l b { font-size: 18px; }
table.tally .sticky-l { position: sticky; left: 0; z-index: 2; background: var(--card); box-shadow: 1px 0 0 var(--line); white-space: nowrap; }
table.tally th.sticky-l { background: var(--card-2); z-index: 3; }
table.tally .sticky-r { position: sticky; right: 0; z-index: 2; box-shadow: -1px 0 0 var(--line); }
table.tally .open-col { background: var(--fcv-soft); min-width: 130px; }
table.tally th.open-col { color: var(--fcv); z-index: 3; }
table.tally td.open-col b { font-size: 20px; color: var(--fcv); }
table.tally tfoot td { position: sticky; bottom: 0; background: var(--card-2); border-top: 2px solid var(--line); height: 56px; z-index: 2; }
table.tally tfoot td.sticky-l, table.tally tfoot td.sticky-r { z-index: 4; }
table.tally tfoot td.open-col { background: var(--fcv-soft); }
table.tally tfoot td.open-col b { font-size: 22px; }
.paid-ok { color: var(--good); font-weight: 700; font-size: 15px; }
.list-note { font-size: 13px; color: var(--text-3); text-align: right; }

/* Liste ohne Seitenleiste: volle Breite, Filterzeile oben */
.list-full { flex: 1; padding: 14px 20px 0; }
.list-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.period-chip { font-size: 18px; font-weight: 800; color: var(--fcv); background: var(--fcv-soft); padding: 12px 18px; border-radius: 14px; }
.period-sel { font-size: 17px; font-weight: 700; padding: 11px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: var(--fcv); }
.list-top .segmented button { padding: 11px 18px; font-size: 16px; }
.list-sep { width: 1px; height: 36px; background: var(--line); }
/* unten Platz für den Umschalter Bestellen / Liste links unten */
.list-full .list-note { min-height: 112px; padding: 10px 0 0 150px; }
/* Freischaltung / Fehler / Offline */
.unlock { position: fixed; inset: 0; display: grid; place-items: center; background: var(--bg); z-index: 120; padding: 20px; }
.unlock-card { width: min(440px, 100%); background: var(--bg-2); border-radius: 24px; box-shadow: var(--shadow-lg); padding: 32px; text-align: center; }
.unlock-card img { height: 90px; margin-bottom: 8px; }
.unlock-card h1 { margin: 6px 0 8px; font-size: 26px; }
.unlock-card p { color: var(--text-2); line-height: 1.5; margin: 0 0 18px; }
.unlock-card .field { text-align: left; }
.offline-banner { background: var(--bad); color: #fff; text-align: center; font-weight: 700; padding: 8px 14px; font-size: 15px; }
/* Dunkelmodus: Hauptknöpfe kräftiger, weiße Schrift (besserer Kontrast am Tablet) */
:root[data-theme="dark"] .btn.primary,
:root[data-theme="dark"] .view-switch button.on,
:root[data-theme="dark"] .segmented button.on { background: #4A5BE0; color: #fff; }
:root[data-theme="dark"] .btn.primary .sub { color: rgba(255,255,255,.85); }
:root[data-theme="dark"] .btn.primary:disabled { background: #2C3770; color: rgba(255,255,255,.55); opacity: 1; }
/* Sorten-Hinweis als kleine Plakette oben links (überlappt nichts mehr) */
.tile .var-hint {
  position: absolute; top: 10px; left: 10px; right: auto; bottom: auto;
  font-size: 12px; font-weight: 700; line-height: 1; padding: 5px 8px; border-radius: 999px;
  background: color-mix(in srgb, var(--c) 18%, var(--card)); color: var(--text-2); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent);
}

/* ---------- Einklappbare Leiste ---------- */
.rail-toggle { display: flex; align-items: center; gap: 10px; padding: 10px 16px; font-size: 14px; font-weight: 700; color: var(--text-3); border-bottom: 1px solid var(--line); }
.rail-toggle .rt-ic { width: 32px; text-align: center; font-size: 22px; line-height: 1; transition: transform .2s; }
body.portrait .rail-toggle { display: none; }
body.rail-collapsed.has-cart .order-view { grid-template-columns: 72px minmax(0, 1fr); }
body.rail-collapsed .rail-toggle { justify-content: center; padding: 10px 0; }
body.rail-collapsed .rail-toggle .rt-ic { transform: rotate(180deg); }
body.rail-collapsed .rail-lb { display: none; }
body.rail-collapsed .rail-item { justify-content: center; padding: 6px 0 !important; border-left-width: 4px; }
body.rail-collapsed .rail-ic { font-size: 28px; }
body.rail-collapsed .corner-tools { width: 52px; left: 10px; }
body.rail-collapsed .view-switch { padding: 4px; }
body.rail-collapsed .view-switch button { justify-content: center; padding: 10px 0; }
body.rail-collapsed .vs-lb { display: none; }
body.rail-collapsed .list-full .list-note { padding-left: 70px; }

/* ---------- Hochformat ---------- */
body.portrait { --cartH: 300px; }
body.portrait.has-cart .topbar, body.portrait.has-cart .main { margin-right: 0; }
body.portrait.has-cart .main { margin-bottom: var(--cartH); }
body.portrait.has-cart .cart {
  top: auto; left: 0; right: 0; width: auto; height: var(--cartH);
  display: grid; grid-template-columns: minmax(0, 1fr) 300px; grid-template-rows: auto minmax(0, 1fr);
  border-left: 0; border-top: 1px solid var(--line); box-shadow: 0 -10px 30px rgba(10, 16, 40, .18);
}
body.portrait .cart-head { grid-column: 1; grid-row: 1; min-height: 0; padding: 12px 16px 4px; }
body.portrait .cart-lines { grid-column: 1; grid-row: 2; }
body.portrait .cart-foot { grid-column: 2; grid-row: 1 / 3; border-top: 0; border-left: 1px solid var(--line); display: flex; flex-direction: column; justify-content: flex-end; }
body.portrait .cart-empty { padding: 16px; flex-direction: row; gap: 14px; text-align: left; }
body.portrait .cart-empty-ic { width: 56px; height: 56px; margin: 0; }
body.portrait .cart-empty-ic svg { width: 30px; height: 30px; }
body.portrait .cart-empty-t { font-size: 19px; }
body.portrait .cart-empty-s { font-size: 15px; max-width: none; }
body.portrait.has-cart .corner-tools { bottom: calc(var(--cartH) + 10px); }
body.portrait .tiles { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
body.portrait .kiosk-title { font-size: 24px; }
body.portrait .list-full .list-note { min-height: 120px; }
body.portrait.has-cart .order-view { grid-template-columns: 72px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
body.portrait .group-rail { display: flex; }
body.portrait .brand { display: flex; }
:root[data-theme="dark"] .az button.on, :root[data-theme="dark"] .letters button.on { background: #4A5BE0; border-color: #4A5BE0; color: #fff; }
/* Umschalter Bestellen / Liste oben in der Kopfzeile, nur Symbole */
.corner-tools { display: none !important; }
.view-switch.top-switch { flex-direction: row; gap: 4px; padding: 4px; border-radius: 16px; margin-left: 10px; }
.view-switch.top-switch button { width: 54px; height: 46px; padding: 0; justify-content: center; border-radius: 12px; }
.view-switch.top-switch .vs-ic { font-size: 24px; }
.group-rail { padding-bottom: 20px !important; }
.list-full .list-note, body.rail-collapsed .list-full .list-note, body.portrait .list-full .list-note { min-height: 0; padding: 8px 0 12px; }
/* Kopfzeile immer volle Breite; Warenkorb beginnt darunter, ohne eigenen Titel */
body.has-cart .topbar { margin-right: 0 !important; }
body.has-cart:not(.portrait) .cart { top: var(--topH, 92px); }
.cart-head { min-height: 0 !important; padding: 12px 16px 4px !important; justify-content: space-between !important; align-items: center; }
.cart-count { font-weight: 700; color: var(--text-2); font-size: 16px; }
.clear-btn { width: auto !important; height: 40px !important; padding: 0 14px !important; gap: 8px; font-size: 15px; }
.clear-btn svg { width: 18px !important; height: 18px !important; }
.cart-empty-t { font-size: 21px; }
/* Liste: Tabelle scrollt waagrecht innerhalb ihres Rahmens (auch hochkant, per Wischen) */
.main, .list-full, .list-view { min-width: 0; }
.list-full .table-wrap { min-width: 0; max-width: 100%; overflow: auto; -webkit-overflow-scrolling: touch; touch-action: pan-x pan-y; overscroll-behavior: contain; }
table.tally th, table.tally td.num { white-space: nowrap; }
/* Details in der Liste: Auswahl und Bezahlt-Knöpfe */
.chk { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; border: 2px solid var(--line); background: var(--card); font-weight: 800; color: #fff; font-size: 17px; }
.chk.on { background: var(--good); border-color: var(--good); }
.detail-t td { height: 54px; }
.detail-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }
.detail-actions .btn { min-height: 56px; font-size: 17px; }
.stats-view { flex: 1; padding: 20px 28px 40px; }
