/* Tischplan, Gast-Wünsche, Fahrer – Grundform. Farben und Ecken passt jedes Aussehen über Variablen an. */
:root { --op-card: #fff; --op-line: #e3e0da; --op-radius: 12px; --op-floor: #efe9df; --op-mut: #6b717a; }
.look-classic { --op-card: #ece9e2; --op-line: #a8a49a; --op-radius: 0; --op-floor: #d6d2c6; --op-mut: #555; }
.look-modern { --op-card: #fff; --op-line: #e4e1db; --op-radius: 14px; --op-floor: #f1ebe1; }

.st-frei { --c: #ffffff; --f: #222; } .st-besetzt { --c: #4f8fd8; --f: #fff; } .st-wunsch { --c: #f39c12; --f: #fff; }
.st-rechnung { --c: #8e44ad; --f: #fff; } .st-kellner { --c: #e5392b; --f: #fff; }

.op-tables { display: grid; grid-template-columns: 1fr minmax(300px, 360px); gap: 12px; height: 100%; min-height: 0; }
.op-floorwrap { display: flex; flex-direction: column; min-height: 0; gap: 8px; }
.op-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.op-rooms { display: flex; gap: 4px; }
.op-rooms button { border: 1px solid var(--op-line); background: var(--op-card); padding: 5px 12px; border-radius: var(--op-radius); cursor: pointer; }
.op-rooms button.on { background: #333; color: #fff; }
.op-legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12.5px; }
.op-legend .lg { display: inline-flex; gap: 5px; align-items: center; }
.op-legend .lg i { width: 13px; height: 13px; border-radius: 3px; background: var(--c); border: 1px solid rgba(0, 0, 0, .35); display: inline-block; }
.op-typed { font: 700 18px ui-monospace, monospace; background: #222; color: #ffd54a; padding: 2px 10px; border-radius: 6px; }
.op-floor { position: relative; flex: 1; min-height: 340px; background: var(--op-floor); border: 1px solid var(--op-line); border-radius: var(--op-radius); overflow: hidden;
  background-image: linear-gradient(rgba(0, 0, 0, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 0, 0, .035) 1px, transparent 1px); background-size: 28px 28px; }
.op-t { position: absolute; width: 15%; min-width: 92px; aspect-ratio: 1.35; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  background: var(--c); color: var(--f); border: 2px solid rgba(0, 0, 0, .28); border-radius: 12px; cursor: pointer; padding: 4px; line-height: 1.15;
  outline: 7px dotted rgba(0, 0, 0, .13); outline-offset: 5px; box-shadow: 0 6px 14px rgba(0, 0, 0, .12); transition: transform .12s; }
.op-t:hover { transform: translateY(-2px); }
.op-t.rund { border-radius: 50%; aspect-ratio: 1; width: 11.5%; }
.op-t.gross { width: 19%; }
.op-t.sel { border: 3px solid #111; box-shadow: 0 0 0 4px #ffd54a, 0 8px 18px rgba(0, 0, 0, .25); }
.op-t .nr { font-size: 26px; font-weight: 800; }
.op-t .seats { font-size: 11px; opacity: .75; }
.op-t .amt { font-weight: 700; font-size: 13px; }
.op-t .since { font-size: 11px; opacity: .85; }
.op-t .badges { position: absolute; top: -12px; right: -10px; display: flex; gap: 2px; }
.op-t .badges i { font-style: normal; background: #fff; color: #000; border-radius: 999px; padding: 1px 6px; font-size: 13px; font-weight: 700; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); }
.op-t.st-wunsch, .op-t.st-kellner { animation: op-blink 1s ease-in-out infinite; }
@keyframes op-blink { 50% { filter: brightness(1.18); box-shadow: 0 0 0 6px color-mix(in srgb, var(--c) 45%, transparent); } }
.op-hint { font-size: 12px; color: var(--op-mut); }
.op-empty, .op-none { color: var(--op-mut); padding: 14px; text-align: center; }

.op-side { background: var(--op-card); border: 1px solid var(--op-line); border-radius: var(--op-radius); padding: 12px; overflow: auto; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.op-side-h { display: flex; gap: 8px; align-items: center; }
.op-side-h b { font-size: 18px; }
.op-count { background: #333; color: #fff; border-radius: 999px; padding: 0 9px; font-weight: 700; }
.op-state { background: var(--c); color: var(--f); border: 1px solid rgba(0, 0, 0, .2); padding: 1px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.op-code { display: flex; align-items: center; gap: 10px; background: #fff8dc; border: 1px dashed #d4b44a; padding: 6px 10px; border-radius: var(--op-radius); }
.op-code span { flex: 1; font-size: 12.5px; }
.op-code b { font: 800 22px ui-monospace, monospace; letter-spacing: 3px; }
.op-reqs { display: flex; flex-direction: column; gap: 8px; }
.op-req { background: #fff; border: 1px solid var(--op-line); border-left: 6px solid #f39c12; border-radius: var(--op-radius); padding: 8px 10px; cursor: default; }
.op-req.k-kellner { border-left-color: #e5392b; } .op-req.k-rechnung { border-left-color: #8e44ad; }
.op-req.done { opacity: .6; }
.op-req-h { display: flex; gap: 8px; align-items: baseline; }
.op-req-h small { color: var(--op-mut); }
.op-req-warn { background: #fdecea; color: #8e2a20; font-size: 12px; padding: 3px 6px; margin: 4px 0; border-radius: 4px; }
.op-req-lines, .op-order { margin: 6px 0; font-size: 13px; }
.op-req-lines .l, .op-order .l { display: flex; justify-content: space-between; gap: 8px; }
.op-req-lines .l.sub { padding-left: 16px; color: #555; font-size: 12.5px; }
.op-req-lines .l.k-ohne { color: #b03a2e; font-weight: 600; }
.op-req-lines .l.note { font-style: italic; }
.op-req-lines .l.sum, .op-order .l.sum { border-top: 1px solid var(--op-line); margin-top: 3px; padding-top: 3px; font-weight: 700; }
.op-req-b { display: flex; gap: 6px; margin-top: 6px; }
.op-req-b .btn { flex: 1; }
.op-req-st { font-size: 12px; color: var(--op-mut); margin-top: 4px; }
.op-order { background: #fff; border: 1px solid var(--op-line); border-radius: var(--op-radius); padding: 8px 10px; }
.op-order-h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.op-order-h small { color: var(--op-mut); }
.op-actions { display: flex; flex-direction: column; gap: 6px; margin-top: auto; }
.op-actions .btn.pay { font-weight: 700; }

/* Bezahlen */
.op-paytotal { text-align: center; }
.op-paytotal b { display: block; font-size: 40px; line-height: 1.1; }
.op-paytotal small { color: var(--op-mut); }
.op-payways { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.op-payways .btn { padding: 12px 6px; font-size: 15px; }
.op-payways .btn.on { background: #263238; color: #fff; border-color: #263238; font-weight: 700; }
.look-modern .op-payways .btn.on { background: var(--brand, #1f6f43); border-color: transparent; }
.op-lbl { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 13px; }
.op-quick { display: flex; gap: 6px; flex-wrap: wrap; }
.op-change { font-size: 24px; font-weight: 800; color: #1f6f43; text-align: center; }
.op-change.neg { color: #b03a2e; }
.op-tiprow { display: flex; gap: 6px; align-items: center; }
.op-tiprow input { flex: 1; }
.op-vch { flex: 1; font-weight: 700; }
/* Getrennt zahlen */
.dlg.op-pay.split { width: min(860px, 96vw); }
.op-pay.split .dlg-body { display: grid; grid-template-columns: 1.15fr 1fr; gap: 8px 16px; align-items: start; }
.op-pay.split .dlg-body > :not(.op-split):not(.op-splitbar) { grid-column: 2; }
.op-pay.split .op-split { grid-column: 1; grid-row: 2 / span 8; }
.op-pay.split .op-splitbar { grid-column: 1 / -1; }
.op-splitbar { display: flex; gap: 6px; align-items: center; }
.op-splitbar .btn.on { background: #263238; color: #fff; border-color: #263238; }
.look-modern .op-splitbar .btn.on { background: var(--brand, #1f6f43); border-color: transparent; }
.op-parts { margin-left: auto; font-weight: 700; color: #1f6f43; }
.op-split { display: flex; flex-direction: column; gap: 4px; max-height: 58vh; overflow: auto; }
.op-split-h { display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--op-mut); }
.op-split-h span { flex: 1; }
.op-sp { display: flex; align-items: stretch; border: 1px solid var(--op-line); border-radius: var(--op-radius); background: #fff; }
.op-sp.on { border-color: #1f6f43; box-shadow: inset 4px 0 0 #1f6f43; background: #f1f8f3; }
.op-sp-main { flex: 1; display: flex; gap: 8px; align-items: center; background: none; border: 0; padding: 9px 10px; text-align: left; font: inherit; cursor: pointer; min-height: 44px; }
.op-sp-main kbd { min-width: 18px; }
.op-sp-main .nm { flex: 1; }
.op-sp-main .pr { font-variant-numeric: tabular-nums; font-weight: 600; }
.op-sp-q { display: flex; align-items: center; gap: 4px; padding: 0 8px; border-left: 1px solid var(--op-line); min-width: 44px; justify-content: center; }
.op-sp-q button { width: 32px; height: 32px; border: 1px solid var(--op-line); background: #fff; border-radius: 6px; font-size: 18px; cursor: pointer; }
.op-sp-q b { min-width: 34px; text-align: center; font-variant-numeric: tabular-nums; }
@media (max-width: 700px) { .op-pay.split .dlg-body { display: flex; flex-direction: column; } }

/* Fahrer */
.op-drivers { display: flex; flex-direction: column; gap: 12px; min-height: 0; overflow: auto; }
.op-selhint { background: #fff3cd; border: 1px solid #e8cf7a; padding: 8px 12px; border-radius: var(--op-radius); font-weight: 600; }
.op-dgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.op-dcard { background: var(--op-card); border: 1px solid var(--op-line); border-left: 7px solid var(--dc); border-radius: var(--op-radius); padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.op-dcard.off { opacity: .7; border-left-style: dashed; }
.op-dcard.free { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--dc) 35%, transparent); }
.op-dcard-h { display: flex; gap: 10px; align-items: center; }
.op-dcard-h small { display: block; color: var(--op-mut); }
.op-ava { width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--dc, #888); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 17px; border: 0; }
.op-ava.sm { width: 26px; height: 26px; font-size: 12px; cursor: pointer; opacity: .45; border: 2px solid #fff; padding: 0; }
.op-ava.sm:hover { opacity: .85; }
.op-ava.sm.on { opacity: 1; box-shadow: 0 0 0 2px var(--dc); }
.op-chips { display: inline-flex; gap: 3px; }
.op-nodrv { font-size: 11px; color: var(--op-mut); }
.op-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.op-dstats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.op-dstats span, .op-sums span { display: flex; flex-direction: column; }
.op-dstats small, .op-sums small { color: var(--op-mut); font-size: 11.5px; }
.op-dbtn { display: flex; gap: 6px; flex-wrap: wrap; }
.op-sums { display: flex; flex-wrap: wrap; gap: 10px 22px; padding: 6px 2px; }
.op-sums b { font-size: 17px; }
.op-sums .big b { font-size: 26px; color: #1f6f43; }
.op-assign .size-btn small { color: var(--dlg-muted, #6b7480); }

/* Hülle im Aussehen „RestaurantExpress“ */
.c-ops { position: fixed; inset: 28px 2vw 34px; z-index: 600; display: flex; flex-direction: column; background: #ece9e2; border: 1px solid #555; box-shadow: 6px 6px 0 rgba(0, 0, 0, .35); }
.c-ops-body { flex: 1; min-height: 0; padding: 10px; overflow: auto; display: flex; flex-direction: column; }
.c-ops-body > .op-tables { flex: 1; }
.look-classic .op-t { border-radius: 4px; }
.look-classic .op-t.rund { border-radius: 50%; }
.look-classic .op-req, .look-classic .op-order { box-shadow: 2px 2px 0 rgba(0, 0, 0, .12); }

/* Modern */
.m-ops { height: 100%; padding: 12px; display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.m-ops-h { display: flex; align-items: center; gap: 12px; }
.m-ops-h h2 { margin: 0; font-size: 20px; }
.m-ops > .op-tables, .m-ops > .op-drivers { flex: 1; }
.touch .op-t { min-width: 110px; }
.touch .op-req-b .btn, .touch .op-actions .btn { padding: 12px; font-size: 15px; }

@media (max-width: 900px) { .op-tables { grid-template-columns: 1fr; } .op-floor { min-height: 300px; } }
.st-reserviert { --c: #d9f2ea; --f: #0b5e47; }
.op-t.st-reserviert { border: 2px dashed #16a085; }
.op-t .res { position: absolute; left: 2px; right: 2px; bottom: -18px; font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: #fff; color: #0b5e47; border: 1px solid #16a085; border-radius: 6px; padding: 0 3px; font-weight: 600; }
.op-t .res.soon { background: #16a085; color: #fff; }
.op-res { display: flex; align-items: center; gap: 8px; background: #e9f7f2; border: 1px solid #16a085; color: #0b5e47; border-radius: 10px; padding: 6px 10px; }
.look-dos .op-res { background: #0000aa; color: #55ff55; border-color: #55ff55; border-radius: 0; }
.look-dos .op-t .res { background: #000; color: #55ff55; border-color: #55ff55; border-radius: 0; }
