/* Kassanova – Demo der Kassenoberfläche (Optik an die Android-App angelehnt) */
.demo-head { background: var(--keller); color: var(--on-dark); padding: clamp(32px, 5vw, 56px) 0 28px; }
.demo-head h1 { color: #fff; font-size: clamp(1.875rem, 4vw, 2.75rem); }
.demo-head p { max-width: 680px; margin: 14px 0 22px; font-size: 1.0625rem; }
.demo-mode { display: inline-flex; padding: 4px; border-radius: var(--radius-pill); background: rgba(255,255,255,.08); border: 1px solid rgba(226,231,222,.2); }
.demo-mode button { min-height: 44px; padding: 8px 20px; border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--on-dark); font: inherit; font-weight: 700; cursor: pointer; }
.demo-mode button.is-on { background: var(--messing); color: #fff; }

.demo-stage { background: var(--keller); padding: 0 0 clamp(40px, 6vw, 72px); }
.demo-note { color: var(--on-dark-2); font-size: .9375rem; margin: 16px 0 0; }
.demo-note a { color: var(--messing-hell); }

.guide { display: flex; align-items: center; gap: 12px; min-height: 52px; margin-bottom: 12px; padding: 12px 16px; border-radius: 12px; background: rgba(217,185,110,.14); border: 1px solid rgba(217,185,110,.4); color: #fff; font-weight: 600; }
.guide b { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--messing); color: #fff; font-size: .875rem; }

/* Gerät */
.pos { position: relative; background: #FAFAFA; border-radius: 18px; border: 8px solid #05110B; box-shadow: 0 30px 60px rgba(0,0,0,.45); overflow: hidden; color: #1B1B1B; min-height: 620px; display: flex; flex-direction: column; font-size: 1rem; }
.pos [hidden] { display: none !important; }
:where(.pos) button { font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.pos svg { width: 1.25em; height: 1.25em; flex: none; }

.pos__bar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 52px; padding: 6px 14px; background: #F1F1F1; border-bottom: 1px solid #DCDCDC; }
.pos__barl, .pos__barr { display: flex; align-items: center; gap: 8px; flex: none; white-space: nowrap; }
.pos__barr { justify-content: flex-end; }
.pos__barl img { flex: none; width: 28px; height: 28px; border-radius: 50%; }
.pos__brand { font-weight: 900; letter-spacing: .02em; color: #111; }
.pos__ico { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 8px; background: transparent; color: #222; font-size: 1.25rem; }
.pos__ico:hover { background: #E2E2E2; }
.pos__ctx { font-weight: 800; color: #1B1B1B; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.pos__user { font-size: .875rem; color: #6B6B6B; }
.pos__clock { font-variant-numeric: tabular-nums; }

.view { flex: 1; display: flex; flex-direction: column; min-height: 0; }

/* Raumplan */
.roombar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; background: #FAFAFA; }
.rooms { display: flex; gap: 12px; flex-wrap: wrap; }
.rooms button { position: relative; min-width: 84px; min-height: 52px; padding: 0 16px; border: 0; border-radius: 4px; background: #455A64; color: #fff; font-weight: 700; opacity: .6; }
.rooms button.is-on { opacity: 1; box-shadow: 0 0 0 3px #fff, 0 2px 10px rgba(0,0,0,.35); }
.rooms i { position: absolute; top: -7px; right: -7px; display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: #D32F2F; color: #fff; font-size: .6875rem; font-style: normal; font-weight: 800; box-shadow: 0 0 0 2px #fff; }
.roomtools { display: flex; gap: 8px; padding-left: 12px; border-left: 2px solid #555; }
.rt { display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 4px; color: #fff; font-size: 1.125rem; }
.rt--split { background: #444; }
.rt--swap { background: #827717; }
.plan { flex: 1; padding: 22px; background: #DFE3E4; }
.tables { position: relative; aspect-ratio: 100 / 44; min-height: 400px; }
.deco { position: absolute; display: grid; place-items: center; border-radius: 4px; background: #C9D0D2; color: #6B7A80; font-size: .8125rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.tbl { position: absolute; padding: 4px; border: 2px solid #F57F17; border-radius: 2px; background: #FFF176; color: #000; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; transition: filter .15s, transform .15s; }
.tbl:hover { filter: brightness(.96); transform: translateY(-1px); }
.tbl b { font-size: 1.875rem; font-weight: 800; }
.tbl span { font-weight: 800; font-size: 1.0625rem; }
.tbl em { position: absolute; top: 6px; right: 10px; color: #C62828; font-size: .8125rem; font-style: normal; font-weight: 800; font-variant-numeric: tabular-nums; }
.tbl.is-open { border: 3px solid #E30613; }
.tbl.is-busy::after { content: ""; position: absolute; top: 9px; left: 10px; width: 11px; height: 11px; border-radius: 50%; background: #43A047; box-shadow: 0 0 0 3px rgba(67,160,71,.3); }
.hint { color: #546E7A; font-size: .8125rem; margin: 18px 0 0; }

/* Tische sind absolut platziert: die Puls-Markierung darf ihre Position nicht überschreiben */
.pulse { z-index: 1; animation: pulse 1.4s ease-in-out infinite; }
.pulse:not(.tbl) { position: relative; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(168,122,34,0); } 50% { box-shadow: 0 0 0 7px rgba(168,122,34,.75); } }

/* Bonieren */
.order { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(270px, 30%); min-height: 0; }
.order__grid { display: flex; flex-direction: column; gap: 6px; padding: 6px; min-width: 0; }
.wg { display: flex; gap: 6px; flex-wrap: wrap; }
.wg button { min-height: 50px; padding: 0 22px; border: 0; border-radius: 4px; background: #81C784; color: #fff; font-weight: 700; }
.wg button.is-on { background: #546E7A; box-shadow: inset 0 0 0 3px #fff, 0 1px 6px rgba(0,0,0,.35); }
.tiles { flex: 1; display: grid; gap: 4px; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: minmax(68px, 1fr); }
.tile { min-width: 0; padding: 6px; border: 0; border-radius: 6px; color: #fff; font-weight: 800; font-size: clamp(.8125rem, 1.45vw, 1.1875rem); line-height: 1.15; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; overflow: hidden; hyphens: manual; overflow-wrap: break-word; transition: filter .1s, transform .1s; }
.tile span { display: block; }
.tile small { font-weight: 600; font-size: .7em; opacity: .92; font-variant-numeric: tabular-nums; }
.tile--dark { color: #3A2F00; }
.tile:active { filter: brightness(.82); transform: scale(.98); }
.tile--empty { background: #FAFAFA; border: 1px solid #E4E4E4; }

.order__bon { display: flex; flex-direction: column; min-height: 0; background: #fff; border-left: 1px solid #DCDCDC; }
.lines { flex: 1 1 0; min-height: 140px; overflow: auto; }
.line { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 8px; align-items: start; padding: 10px 12px; border-bottom: 1px solid #E0E0E0; color: #616161; font-variant-numeric: tabular-nums; }
.line small, .pline small { display: block; color: #8A8A8A; font-size: .6875rem; font-weight: 400; }
.line { grid-template-columns: 84px minmax(0, 1fr) auto; align-items: center; padding: 6px 8px; }
.line.is-sent { padding: 10px 8px; }
.line.is-sent .qty { padding-left: 12px; }
.line.is-sent .pr { padding-right: 12px; }
.line.is-new { color: #111; }
.lp { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px; color: #1B1B1B; font-variant-numeric: tabular-nums; }
.lp b { font-size: 1.375rem; line-height: 1; font-weight: 800; }
.lp--plus { background: #E8F5E9; }
.lp--plus b { color: #0A7A0A; }
.lp--minus { background: #FDECEA; min-width: 108px; }
.lp--minus b { color: #D50000; }
.lp:hover { filter: brightness(.96); }
.lp:active { transform: scale(.97); }
.empty { padding: 32px 14px; color: #8A8A8A; text-align: center; }
.order__sum { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 14px; border-top: 1px solid #E0E0E0; font-size: 1.25rem; font-weight: 800; color: #111; font-variant-numeric: tabular-nums; }
.trash { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 8px; background: transparent; color: #D32F2F; font-size: 1.25rem; }
.trash:hover { background: #FDECEC; }
.trash:disabled { opacity: .3; cursor: default; background: transparent; }
.order__actions { display: grid; gap: 4px; padding: 4px; }

.pbtn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 60px; padding: 8px 12px; border: 0; border-radius: 2px; color: #fff; font-weight: 800; }
.pbtn--go { background: #005500; }
.pbtn--stop { background: #770000; }
.pbtn--split { background: #1B3328; }
.pbtn--off { background: #7A7A7A; }
.pbtn--grey { background: #555; }
.pbtn--brass { background: var(--messing); border-radius: 10px; min-height: 48px; padding: 8px 22px; }
.pbtn:hover:not(:disabled) { filter: brightness(1.12); }
.pbtn:disabled { opacity: .45; cursor: not-allowed; }

/* Abrechnen */
.pay { flex: 1; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); min-height: 0; }
.pay__left { position: relative; display: flex; flex-direction: column; min-height: 320px; padding-bottom: 70px; border-right: 1px solid #DCDCDC; }
.phead, .pline { display: grid; grid-template-columns: 84px 44px minmax(0, 1fr) 70px 78px; gap: 8px; padding: 10px 12px; font-variant-numeric: tabular-nums; }
.phead { background: #F1F1F1; border-bottom: 2px solid #CFCFCF; font-weight: 800; }
.phead span:nth-child(n+4), .pline > span:nth-child(n+4) { text-align: right; }
.pline > .qty, .pline > .nm, .pline > span:nth-child(n+4) { padding-top: 8px; }
.pico { display: flex; gap: 4px; }
.pic { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 8px; background: transparent; font-size: 1.125rem; }
.pic--rab { color: #1B5E3A; }
.pic--rab.is-on { background: var(--messing); color: #fff; }
.pic--del { color: #C4001A; }
.pic:hover { background: #ECECEC; }
.pic--rab.is-on:hover { background: var(--messing-dunkel); }
.dialog { width: 100%; max-width: 340px; padding: 20px; border-radius: 12px; background: #fff; color: #1B1B1B; box-shadow: 0 20px 50px rgba(0,0,0,.45); }
.dialog h3 { margin: 0 0 14px; font-size: 1.125rem; color: #1B1B1B; }
.dialog__opts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.dialog__opts button { min-height: 56px; border: 0; border-radius: 4px; background: #005500; color: #fff; font-weight: 800; font-size: 1.0625rem; }
.dialog__foot { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 6px; }
.dialog__foot button { min-height: 48px; border: 0; border-radius: 4px; background: #555; color: #fff; font-weight: 700; }
.dialog__foot button:last-child { background: #770000; }
.dialog button:hover { filter: brightness(1.12); }
.plines { flex: 1 1 0; min-height: 120px; overflow: auto; }
.pline { width: 100%; border: 0; border-bottom: 1px solid #E0E0E0; background: transparent; color: #1B1B1B; font-weight: 700; text-align: left; align-items: start; }
.pline--pick:hover { background: #F3F3F3; }
.pline--pick.is-picked { background: #FFF59D; }
.pline--pick .qty { color: #005500; }
.rabatt { position: absolute; left: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 20px; border: 0; border-radius: 999px; background: var(--weinberg); color: #fff; font-weight: 800; box-shadow: 0 4px 12px rgba(0,0,0,.25); }
.rabatt.is-on { background: var(--messing); }
.pay__right { display: flex; flex-direction: column; gap: 8px; padding: 8px; background: #F1F1F1; }
.summe { display: flex; align-items: center; justify-content: space-around; gap: 12px; padding: 26px 16px; background: #fff; font-size: 1.625rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.paygrid { flex: 1; display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: minmax(84px, 1fr); gap: 8px; }
.paygrid .pbtn { font-size: 1.25rem; }
.paygrid .pbtn--wide { grid-column: span 2; }
.paymore { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.paymore button { display: flex; align-items: center; gap: 6px; min-height: 50px; padding: 4px 8px; border: 0; border-radius: 2px; background: #546E7A; color: #fff; font-size: .8125rem; font-weight: 600; line-height: 1.15; text-align: left; hyphens: manual; }
.is-splitting .phead { background: var(--keller); color: #fff; border-bottom-color: var(--keller); }
.is-splitting .summe { background: #FFEB3B; }
.is-splitting .pay__left { padding-bottom: 0; }
.is-handel #p-split, .is-handel #p-storno { display: none; }

/* Overlays */
.overlay { position: absolute; inset: 0; background: rgba(5,17,11,.86); display: grid; place-items: center; padding: 20px; z-index: 5; color: #fff; overflow: auto; }
.terminal { text-align: center; max-width: 300px; }
.terminal__screen { background: #111; border: 3px solid #333; border-radius: 18px; padding: 28px 22px; display: grid; gap: 12px; }
.terminal__screen small { color: #9aa; letter-spacing: .1em; text-transform: uppercase; font-size: .6875rem; }
.terminal__screen b { font-size: 2rem; font-variant-numeric: tabular-nums; }
.terminal__screen > span { color: var(--messing-hell); font-weight: 700; }
.terminal__tip { display: flex; justify-content: center; gap: 6px; }
.terminal__tip button { min-height: 44px; padding: 0 16px; border: 1px solid #4a4a4a; border-radius: 8px; background: #262626; color: #fff; font-weight: 700; }
.terminal__tip button:hover { background: #3a3a3a; }
.terminal__bar { height: 6px; border-radius: 3px; background: #2a2a2a; overflow: hidden; }
.terminal__bar i { display: block; height: 100%; width: 0; background: #4ADE80; transition: width 1.6s linear; }
.terminal p { color: var(--on-dark-2); font-size: .875rem; margin: 14px 0 0; }
.bonwrap { display: grid; gap: 20px; align-items: center; max-width: 640px; width: 100%; }
@media (min-width: 640px) { .bonwrap { grid-template-columns: 280px 1fr; } }
.bon { background: #fff; color: #111; font-family: "Courier New", monospace; font-size: .75rem; line-height: 1.45; padding: 16px 14px; border-radius: 4px; max-height: 420px; overflow: auto; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.bon h4 { text-align: center; margin: 0 0 2px; font-size: .9375rem; color: #111; font-family: var(--font); letter-spacing: .06em; }
.bon .c { text-align: center; }
.bon .r { display: flex; justify-content: space-between; gap: 8px; }
.bon hr { border: 0; border-top: 1px dashed #999; margin: 8px 0; }
.bon .qr { width: 72px; height: 72px; margin: 8px auto 0; background:
  conic-gradient(#111 25%, #fff 0 50%, #111 0 75%, #fff 0) 0 0/12px 12px,
  #fff; border: 4px solid #fff; outline: 1px solid #111; }
.bonside h3 { color: #fff; font-size: 1.5rem; margin-bottom: 8px; }
.bonside p { color: var(--on-dark); margin: 0 0 16px; }
.toast { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); background: #263238; color: #fff; font-weight: 600; font-size: .9375rem; padding: 10px 18px; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.35); z-index: 6; width: max-content; max-width: 92%; text-align: center; }

/* Hochformat wie am Handgerät */
@media (max-width: 819px) {
  .pos__brand { display: none; }
  .pos { border-width: 6px; border-radius: 14px; min-height: 0; }
  .plan { padding: 14px; }
  .tables { aspect-ratio: 1 / 1; min-height: 0; }
  .tbl { border-width: 2px; }
  .tbl b { font-size: 1.25rem; }
  .tbl span { font-size: .6875rem; }
  .tbl em { top: 2px; right: 4px; font-size: .625rem; }
  .tbl.is-busy::after { top: 5px; left: 5px; width: 8px; height: 8px; }
  .deco { font-size: .625rem; }
  .order, .pay { grid-template-columns: minmax(0, 1fr); }
  .tiles { grid-auto-rows: 60px; flex: none; }
  .tile { font-size: .75rem; padding: 4px; }
  .tile--pad { display: none; }
  .wg button { min-height: 44px; padding: 0 14px; font-size: .875rem; }
  .order__bon { border-left: 0; border-top: 1px solid #DCDCDC; }
  .lines { flex: none; min-height: 0; max-height: 168px; }
  .order__actions { grid-template-columns: 1fr 1fr; }
  .pay__left { min-height: 0; padding-bottom: 0; border-right: 0; }
  .plines { flex: none; max-height: 220px; }
  .rabatt { position: static; align-self: flex-start; margin: 10px 12px; }
  .phead, .pline { grid-template-columns: 76px 30px minmax(0, 1fr) 46px 52px; gap: 4px; padding: 8px 6px; font-size: .875rem; }
  .pic { width: 36px; height: 40px; }
  .summe { padding: 16px; font-size: 1.375rem; }
  .paygrid { grid-auto-rows: 72px; flex: none; }
  .paygrid .pbtn { font-size: 1.0625rem; }
  .paymore { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 559px) {
  .pos__brand, .pos__user { display: none; }
  .pos__bar { grid-template-columns: auto minmax(0, 1fr) auto; padding: 4px 8px; gap: 6px; }
  .pos__barl { gap: 4px; }
  .pos__ctx { font-size: .875rem; }
  .pos__ctx span { display: none; }
  .tile { font-size: .6875rem; font-weight: 700; padding: 3px; }
  .rooms { gap: 8px; }
  .rooms button { min-width: 0; min-height: 46px; padding: 0 12px; font-size: .875rem; }
  .rt { width: 42px; height: 42px; }
  .tile small { display: none; }
}
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; box-shadow: 0 0 0 4px rgba(168,122,34,.8); } }
