/* =====================================================================
   Restaurant POS Starter - POS terminal, kitchen display, customer display and print styles.
   Uses the colour tokens of app.css (light / dark).
   ===================================================================== */

/* ---------------------------------------------------------------- terminal shell */
body.pos { height: 100vh; overflow: hidden; background: var(--bg); user-select: none; -webkit-user-select: none; touch-action: manipulation; }
body.pos input, body.pos textarea { user-select: text; -webkit-user-select: text; }
.pos-app { display: grid; grid-template-rows: 60px 1fr; height: 100vh; }
.pos-top { display: flex; align-items: center; gap: 10px; padding: 0 14px; background: var(--surface); border-bottom: 1px solid var(--line); }
.pos-top .brand { display: flex; align-items: center; gap: 10px; font-weight: 750; letter-spacing: -.01em; min-width: 0; }
.pos-top .brand .mark { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2)); flex: none; }
.pos-top .brand small { display: block; font-weight: 500; color: var(--muted); font-size: .74rem; white-space: nowrap; }
.pos-tabs { display: flex; gap: 4px; background: var(--surface-2); padding: 4px; border-radius: 14px; margin-left: 12px; }
.pos-tabs button { border: 0; background: transparent; color: var(--muted); font: 650 .9rem/1 var(--font); padding: 10px 16px; border-radius: 10px;
  cursor: pointer; display: inline-flex; align-items: center; gap: 7px; min-height: 40px; }
.pos-tabs button.on { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-sm); }
.pos-tabs .n { background: var(--primary); color: var(--primary-ink); border-radius: 999px; font-size: .7rem; padding: 2px 7px; }
.pos-top .spacer { flex: 1; }
.pos-clock { font: 650 1rem/1 var(--mono); color: var(--muted); }
.pos-user { display: flex; align-items: center; gap: 8px; padding: 4px 6px 4px 4px; border-radius: 999px; background: var(--surface-2); }
.pos-user .avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: .8rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-2)); }
.pos-user b { font-size: .86rem; } .pos-user small { display: block; color: var(--muted); font-size: .72rem; }
.pos-main { min-height: 0; position: relative; }
.view { position: absolute; inset: 0; display: none; }
.view.on { display: flex; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: .74rem; font-weight: 650; background: var(--surface-2); }
.pill.warn { background: var(--amber-soft); color: var(--amber); } .pill.ok { background: var(--green-soft); color: var(--green); }
.pill.bad { background: var(--red-soft); color: var(--red); } .pill.info { background: var(--blue-soft); color: var(--blue); }

/* ---------------------------------------------------------------- floor plan */
.floor { flex: 1; display: flex; flex-direction: column; padding: 14px 16px; gap: 12px; min-width: 0; }
.floor-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.zone-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.zone-tabs button, .chip-btn { border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); border-radius: 999px; padding: 9px 16px;
  font: 600 .88rem/1 var(--font); cursor: pointer; min-height: 40px; }
.zone-tabs button.on, .chip-btn.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.legend { display: flex; gap: 12px; font-size: .78rem; color: var(--muted); flex-wrap: wrap; }
.legend i { display: inline-block; width: 11px; height: 11px; border-radius: 4px; margin-right: 5px; vertical-align: -1px; }
.floor-canvas { position: relative; flex: 1; border-radius: 20px; background:
  radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--muted) 22%, transparent) 1px, transparent 1.5px) 0 0 / 28px 28px, var(--surface);
  border: 1px solid var(--line); overflow: auto; }
.ftable { position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 0;
  cursor: pointer; font-family: var(--font); color: #fff; box-shadow: var(--shadow-sm); transition: transform .12s, box-shadow .12s; padding: 4px; }
.ftable:active { transform: scale(.97); }
.ftable:hover { box-shadow: var(--shadow); }
.ftable b { font-size: 1.05rem; } .ftable small { font-size: .7rem; opacity: .92; line-height: 1.15; text-align: center; }
.ftable.SQUARE { border-radius: 14px; } .ftable.ROUND { border-radius: 50%; } .ftable.RECT { border-radius: 14px; }
.ftable.AVAILABLE { background: #3f9a6a; } .ftable.OCCUPIED { background: #d0632c; } .ftable.BILL_REQUESTED { background: #b8860b; }
.ftable.RESERVED { background: #5b62c9; } .ftable.CLEANING { background: #7b8794; }
.ftable .ready { position: absolute; top: -6px; right: -6px; background: #fff; color: var(--green); border-radius: 999px; font-size: .66rem; font-weight: 800;
  padding: 2px 6px; box-shadow: var(--shadow-sm); }
.floor-side { width: 300px; border-left: 1px solid var(--line); background: var(--surface); padding: 14px; display: flex; flex-direction: column; gap: 10px; overflow: auto; }
.big-btn { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface);
  color: var(--text); font: 650 .95rem/1.2 var(--font); cursor: pointer; text-align: left; min-height: 60px; width: 100%; }
.big-btn:hover { border-color: var(--primary); }
.big-btn .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); flex: none; }
.big-btn small { display: block; font-weight: 500; color: var(--muted); font-size: .76rem; }
.mini-list { display: flex; flex-direction: column; gap: 6px; }
.mini-bill { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2);
  cursor: pointer; border: 0; color: var(--text); font: inherit; text-align: left; width: 100%; }
.mini-bill:hover { background: var(--surface-3); }
.mini-bill small { color: var(--muted); display: block; font-size: .74rem; }

/* ---------------------------------------------------------------- order screen */
.order-view { flex: 1; display: grid; grid-template-columns: 1fr 400px; min-width: 0; }
.menu-pane { display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 12px 14px; gap: 10px; }
.menu-head { display: flex; gap: 8px; align-items: center; }
.menu-head .input { height: 44px; border-radius: 999px; background: var(--surface); }
.cat-bar { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.cat-bar button { flex: none; border: 0; border-radius: 12px; padding: 10px 16px; min-height: 44px; font: 650 .88rem/1 var(--font); cursor: pointer;
  background: var(--surface); color: var(--text); border-left: 4px solid var(--cat, var(--primary)); box-shadow: var(--shadow-sm); }
.cat-bar button.on { background: var(--cat, var(--primary)); color: #fff; }
.sub-bar { display: flex; gap: 6px; flex-wrap: wrap; }
.sub-bar button { border: 1px solid var(--line-strong); background: transparent; border-radius: 999px; padding: 6px 12px; font: 600 .8rem/1 var(--font); color: var(--muted); cursor: pointer; min-height: 34px; }
.sub-bar button.on { background: var(--surface); color: var(--text); border-color: var(--text); }
.items-grid { flex: 1; overflow: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; align-content: start; padding: 2px 2px 20px; }
.item-btn { position: relative; border: 0; border-radius: 16px; background: var(--surface); color: var(--text); text-align: left; padding: 12px; min-height: 96px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 6px; cursor: pointer; font-family: var(--font); box-shadow: var(--shadow-sm);
  border-top: 4px solid var(--cat, var(--primary)); transition: transform .08s; }
.item-btn:active { transform: scale(.97); }
.item-btn b { font-size: .95rem; line-height: 1.2; }
.item-btn .price { font-weight: 750; color: var(--primary); }
.item-btn .tags { display: flex; gap: 4px; flex-wrap: wrap; }
.item-btn .tag { font-size: .66rem; font-weight: 700; padding: 2px 6px; border-radius: 6px; background: var(--surface-2); color: var(--muted); }
.item-btn.out { opacity: .45; } .item-btn.out::after { content: "SOLD OUT"; position: absolute; inset: auto 8px 8px auto; font-size: .64rem; font-weight: 800;
  color: #fff; background: var(--red); padding: 2px 6px; border-radius: 6px; }
.item-btn.later { opacity: .55; }
.ticket { display: flex; flex-direction: column; min-height: 0; background: var(--surface); border-left: 1px solid var(--line); }
.ticket-head { padding: 12px 14px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.ticket-head .t1 { display: flex; align-items: center; gap: 8px; }
.ticket-head h2 { margin: 0; font-size: 1.15rem; }
.ticket-head .meta { display: flex; gap: 6px; flex-wrap: wrap; }
.ticket-lines { flex: 1; overflow: auto; padding: 6px 8px; }
.tline { display: grid; grid-template-columns: 34px 1fr auto; gap: 8px; padding: 9px 8px; border-radius: 12px; cursor: pointer; align-items: start; }
.tline:hover { background: var(--surface-2); }
.tline .q { font-weight: 800; text-align: center; background: var(--surface-2); border-radius: 8px; padding: 3px 0; font-size: .9rem; }
.tline .n b { font-size: .92rem; } .tline .n small { display: block; color: var(--muted); font-size: .76rem; line-height: 1.35; }
.tline .n .rem { color: var(--accent); font-style: italic; }
.tline .a { text-align: right; font-weight: 700; font-size: .92rem; }
.tline .a small { display: block; font-weight: 600; color: var(--green); font-size: .74rem; }
.tline.child { grid-template-columns: 34px 1fr auto; padding-top: 2px; padding-left: 26px; opacity: .85; }
.tline.child .q { background: transparent; color: var(--muted); }
.tline.voided .n b, .tline.voided .a { text-decoration: line-through; color: var(--muted); }
.st { display: inline-block; font-size: .64rem; font-weight: 800; padding: 1px 6px; border-radius: 6px; margin-left: 4px; vertical-align: 1px; letter-spacing: .02em; }
.st-NEW { background: var(--blue-soft); color: var(--blue); } .st-HELD { background: var(--violet-soft); color: var(--violet); }
.st-FIRED { background: var(--amber-soft); color: var(--amber); } .st-PREPARING { background: var(--accent-soft); color: var(--accent); }
.st-READY { background: var(--green-soft); color: var(--green); } .st-SERVED { background: var(--grey-soft); color: var(--grey); }
.st-VOIDED { background: var(--red-soft); color: var(--red); }
.ticket-totals { padding: 10px 16px; border-top: 1px solid var(--line); font-size: .9rem; }
.ticket-totals .r { display: flex; justify-content: space-between; padding: 2px 0; }
.ticket-totals .r.disc { color: var(--green); }
.ticket-totals .grand { font-size: 1.5rem; font-weight: 800; padding-top: 6px; letter-spacing: -.02em; }
.ticket-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 10px 12px 12px; }
.ticket-actions .btn { height: 52px; border-radius: 14px; font-size: .88rem; padding: 0 8px; }
.ticket-actions .wide { grid-column: span 2; }
.ticket-actions .pay { background: var(--green); color: #fff; font-size: 1.05rem; }
.ticket-actions .pay:hover { background: var(--green); filter: brightness(1.08); color: #fff; }
.empty-ticket { text-align: center; color: var(--muted); padding: 40px 20px; }

/* ---------------------------------------------------------------- lists (bills, paid, shift) */
.panel-view { flex: 1; overflow: auto; padding: 16px; }
.panel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.list-card { background: var(--surface); border-radius: 18px; border: 1px solid var(--line); padding: 14px; }
.list-card h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.bill-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 12px; border-radius: 12px; cursor: pointer; border: 0; background: transparent;
  color: var(--text); text-align: left; font: inherit; width: 100%; }
.bill-row:hover { background: var(--surface-2); }
.bill-row small { color: var(--muted); display: block; font-size: .78rem; }
.kv-grid { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; font-size: .92rem; }
.kv-grid .h { font-weight: 750; padding-top: 8px; grid-column: span 2; border-top: 1px dashed var(--line); }

/* ---------------------------------------------------------------- dialogs */
.pos-modal { position: fixed; inset: 0; background: rgba(10, 15, 20, .55); display: none; align-items: center; justify-content: center; z-index: 50; padding: 16px; }
.pos-modal.open { display: flex; }
.pos-dialog { background: var(--surface); color: var(--text); border-radius: 22px; width: min(560px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg); }
.pos-dialog.wide { width: min(860px, 100%); }
.pos-dialog header { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.pos-dialog header h3 { margin: 0; flex: 1; font-size: 1.15rem; }
.pos-dialog .body { padding: 16px 18px; overflow: auto; }
.pos-dialog footer { display: flex; gap: 10px; justify-content: flex-end; padding: 12px 18px 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.pos-dialog footer .btn { height: 48px; border-radius: 14px; min-width: 110px; }
.opt-group { margin-bottom: 14px; }
.opt-group h4 { margin: 0 0 8px; font-size: .9rem; display: flex; gap: 8px; align-items: center; }
.opt-group h4 small { color: var(--muted); font-weight: 500; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--text); border-radius: 12px; padding: 10px 14px; min-height: 46px; cursor: pointer;
  font: 600 .88rem/1.2 var(--font); }
.opt small { display: block; font-weight: 500; color: var(--muted); font-size: .74rem; }
.opt.on { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.opt[disabled] { opacity: .4; cursor: not-allowed; }
.qty-row { display: flex; align-items: center; gap: 10px; }
.qty-row button { width: 48px; height: 48px; border-radius: 14px; border: 1px solid var(--line-strong); background: var(--surface-2); font-size: 1.4rem; cursor: pointer; color: var(--text); }
.qty-row output { font-size: 1.4rem; font-weight: 800; min-width: 40px; text-align: center; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.keypad button { height: 58px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); font: 700 1.3rem/1 var(--font); color: var(--text); cursor: pointer; }
.keypad button:active { background: var(--surface-3); }
.pin-dots { display: flex; gap: 12px; justify-content: center; margin: 8px 0 16px; }
.pin-dots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-strong); }
.pin-dots i.on { background: var(--primary); border-color: var(--primary); }
.reason-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.reason-chips button { border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); border-radius: 999px; padding: 8px 12px; font: 600 .82rem/1 var(--font); cursor: pointer; }
.reason-chips button.on { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.pay-layout { display: grid; grid-template-columns: 1fr 280px; gap: 16px; }
.pay-due { background: var(--surface-2); border-radius: 16px; padding: 14px; text-align: center; }
.pay-due .big { font-size: 2.2rem; font-weight: 800; letter-spacing: -.02em; }
.methods { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0; }
.methods button { border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--text); border-radius: 14px; padding: 10px 6px; min-height: 64px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font: 650 .78rem/1.1 var(--font); cursor: pointer; }
.methods button.on { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.methods button[disabled] { opacity: .35; }
.tender-list { display: flex; flex-direction: column; gap: 6px; }
.tender { display: flex; justify-content: space-between; align-items: center; background: var(--surface-2); border-radius: 12px; padding: 10px 12px; font-weight: 650; }
.tender button { border: 0; background: transparent; color: var(--red); cursor: pointer; }
.quick-cash { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.quick-cash button { border: 1px solid var(--line-strong); background: var(--surface); border-radius: 12px; padding: 10px 12px; font: 700 .9rem/1 var(--font); cursor: pointer; color: var(--text); min-height: 44px; }
.qr-box { display: grid; place-items: center; gap: 8px; padding: 10px; }
.qr-box svg { border-radius: 12px; background: #fff; padding: 6px; }
.done-box { text-align: center; padding: 10px; }
.done-box .ok { width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 10px; display: grid; place-items: center; background: var(--green-soft); color: var(--green); }
.done-box .ok .i { width: 40px; height: 40px; }
.done-box .change { font-size: 2.2rem; font-weight: 800; }
.split-lines { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow: auto; }
.split-line { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); }
.split-line .grow { min-width: 0; }
.denoms { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.denoms label { display: flex; align-items: center; gap: 8px; background: var(--surface-2); padding: 8px 10px; border-radius: 12px; font-weight: 650; }
.denoms input { width: 70px; height: 38px; }
.pos-toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: 14px;
  font-weight: 650; z-index: 80; box-shadow: var(--shadow-lg); max-width: min(560px, 92vw); display: none; }
.pos-toast.show { display: block; }
.pos-toast.err { background: var(--red); color: #fff; }
.lock-hint { font-size: .74rem; color: var(--muted); }

/* ---------------------------------------------------------------- sign-in tiles */
.pin-page { min-height: 100vh; display: grid; grid-template-columns: 1fr 420px; background: var(--bg); }
.pin-left { padding: 28px; display: flex; flex-direction: column; gap: 18px; overflow: auto; }
.pin-left h1 { margin: 0; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.tile-btn { border: 2px solid transparent; background: var(--surface); border-radius: 20px; padding: 18px 12px; cursor: pointer; display: flex; flex-direction: column;
  align-items: center; gap: 10px; color: var(--text); font: inherit; box-shadow: var(--shadow-sm); min-height: 150px; justify-content: center; }
.tile-btn .av { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 1.3rem; }
.tile-btn b { font-size: .95rem; } .tile-btn small { color: var(--muted); font-size: .76rem; }
.tile-btn.on { border-color: var(--primary); }
.tile-btn.locked { opacity: .5; }
.pin-right { background: var(--surface); border-left: 1px solid var(--line); padding: 28px; display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.pin-right h2 { text-align: center; margin: 0; }
.pin-msg { text-align: center; min-height: 22px; color: var(--red); font-weight: 600; font-size: .9rem; }

/* ---------------------------------------------------------------- kitchen display */
body.kds { background: #0d1418; color: #e8eef2; height: 100vh; overflow: hidden; }
body.kds .pos-top { background: #121c22; border-color: #1f2c35; color: #e8eef2; }
body.kds .pill { background: #1d2a33; color: #e8eef2; }
body.kds .btn-outline { background: transparent; border-color: #2d3d48; color: #e8eef2; }
body.kds .btn-outline:hover { border-color: #e8eef2; color: #fff; }
body.kds .pos-top .brand small { color: #93a3ae; }
.kds-board { position: absolute; inset: 60px 0 0 0; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 12px; padding: 12px; overflow-y: auto; align-items: flex-start; }
.kds-ticket { flex: none; width: 270px; background: #17222a; border-radius: 16px; overflow: hidden; border-top: 8px solid #3f9a6a; display: flex; flex-direction: column;
  max-height: calc(100vh - 90px); }
.kds-ticket.yellow { border-top-color: #e2b23c; } .kds-ticket.red { border-top-color: #e5533d; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 4px rgba(229, 83, 61, .35); } }
.kds-ticket header { padding: 10px 12px; display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; background: #1d2a33; }
.kds-ticket header b { font-size: 1.25rem; }
.kds-ticket header small { display: block; color: #93a3ae; font-size: .74rem; }
.kds-ticket .timer { font: 800 1.2rem/1 var(--mono); }
.kds-ticket ul { list-style: none; margin: 0; padding: 8px 12px; overflow: auto; flex: 1; }
.kds-ticket li { padding: 7px 0; border-bottom: 1px dashed #2a3a45; font-size: 1.02rem; }
.kds-ticket li b { font-size: 1.15rem; margin-right: 6px; color: #ffb36b; }
.kds-ticket li small { display: block; color: #93a3ae; font-size: .82rem; }
.kds-ticket li .rem { color: #ffd166; font-weight: 700; }
.kds-ticket li.void { color: #ff7b6e; text-decoration: line-through; }
.kds-ticket li.void small { text-decoration: none; }
.kds-ticket footer { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px 12px; }
.kds-ticket footer button { height: 54px; border-radius: 12px; border: 0; font: 800 .95rem/1 var(--font); cursor: pointer; }
.kds-start { background: #2a3a45; color: #e8eef2; } .kds-bump { background: #3f9a6a; color: #fff; } .kds-recall { background: #5b62c9; color: #fff; grid-column: span 2; }
.kds-empty { margin: auto; color: #93a3ae; font-size: 1.2rem; text-align: center; }
.kds-stations button { border: 1px solid #2d3d48; background: transparent; color: #e8eef2; border-radius: 999px; padding: 8px 14px; font: 650 .85rem/1 var(--font); cursor: pointer; min-height: 40px; }
.kds-stations button.on { background: #e8eef2; color: #0d1418; }
.kds-86 { position: absolute; right: 12px; bottom: 12px; background: #3a1a16; color: #ffb4aa; border-radius: 12px; padding: 8px 12px; font-size: .82rem; max-width: 50vw; }

/* ---------------------------------------------------------------- customer display */
body.display { background: linear-gradient(160deg, #2a0e02, #a3360a); color: #fff; height: 100vh; overflow: hidden; }
.cd { height: 100vh; display: grid; grid-template-columns: 1.2fr 1fr; }
.cd-left { padding: 40px; display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.cd-left h1 { font-size: 2.6rem; margin: 0; }
.cd-right { background: rgba(255, 255, 255, .96); color: #0f1b24; padding: 30px; display: flex; flex-direction: column; gap: 10px; overflow: hidden; }
.cd-lines { flex: 1; overflow: hidden; display: flex; flex-direction: column; gap: 6px; font-size: 1.15rem; }
.cd-lines div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed #d0d8e0; padding-bottom: 6px; }
.cd-total { font-size: 2.6rem; font-weight: 800; display: flex; justify-content: space-between; }
.cd-qr { display: grid; place-items: center; gap: 10px; text-align: center; }
.cd-qr svg { width: min(340px, 40vh); height: auto; }

/* ---------------------------------------------------------------- printouts (80 mm) */
body.print-page { background: var(--surface-2); }
.paper { width: 80mm; max-width: 100%; margin: 16px auto; background: #fff; color: #000; padding: 6mm 5mm; font: 12px/1.4 ui-monospace, "Cascadia Mono", Consolas, monospace;
  box-shadow: var(--shadow); }
.paper.a4 { width: 190mm; font-family: var(--font); font-size: 12.5px; padding: 12mm; }
.paper h1, .paper h2 { font-family: var(--font); text-align: center; margin: 0 0 2px; font-size: 15px; }
.paper .c { text-align: center; } .paper .r { text-align: right; }
.paper hr { border: 0; border-top: 1px dashed #000; margin: 6px 0; }
.paper table { width: 100%; border-collapse: collapse; }
.paper td { vertical-align: top; padding: 1px 0; }
.paper .big { font-size: 16px; font-weight: 800; }
.paper .copy { text-align: center; font-weight: 800; border: 2px solid #000; margin: 4px 0; padding: 2px; letter-spacing: .3em; }
.paper .qr { display: grid; place-items: center; margin-top: 6px; }
.paper .kot-item { font-size: 16px; font-weight: 800; }
.print-bar { display: flex; gap: 8px; justify-content: center; margin: 16px; }
@media print {
  .print-bar, .no-print { display: none !important; }
  body.print-page { background: #fff; }
  .paper { box-shadow: none; margin: 0; padding: 0 2mm; }
  @page { margin: 4mm; }
}

/* ---------------------------------------------------------------- back-office extras */
.nav a .count { margin-left: auto; background: var(--red); color: #fff; border-radius: 999px; font-size: .68rem; padding: 2px 7px; }
.nav a.active .count { background: #fff; color: var(--red); }
.quad { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.quad .q { border-radius: 14px; padding: 12px; background: var(--surface-2); }
.q-Star { border-left: 5px solid var(--green); } .q-Plowhorse { border-left: 5px solid var(--blue); }
.q-Puzzle { border-left: 5px solid var(--amber); } .q-Dog { border-left: 5px solid var(--red); }
.heat td.h { text-align: center; font-size: .72rem; min-width: 34px; border-radius: 6px; }
.swatch { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; }
.floor-editor { position: relative; height: 480px; border-radius: 16px; border: 1px solid var(--line);
  background: radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--muted) 22%, transparent) 1px, transparent 1.5px) 0 0 / 20px 20px, var(--surface); }
.bar-h { height: 10px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.bar-h i { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--primary-2)); }
.mini-chart { display: flex; align-items: flex-end; gap: 4px; height: 160px; }
.mini-chart .col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 3px; min-width: 0; height: 100%; }
.mini-chart .col i { display: block; width: 100%; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, var(--primary-2), var(--primary)); min-height: 2px; }
.mini-chart .col i.lw { background: var(--surface-3); }
.mini-chart .col small { font-size: .62rem; color: var(--muted); }
.mini-chart .pair { display: flex; gap: 2px; width: 100%; align-items: flex-end; height: 100%; }

/* labels in the top bar and pills never wrap: on narrower screens less important parts are hidden instead */
.pos-tabs button, .pill, .pos-clock, .pos-user b, .pos-user small, .pos-top .btn { white-space: nowrap; }
.pos-tabs button, .pos-user, .pos-top .pill { flex: none; }
@media (max-width: 1360px) {
  .pos-clock { display: none; }
  .pos-tabs { margin-left: 4px; }
  .pos-tabs button { padding: 10px 12px; }
}
@media (max-width: 1100px) {
  .pos-user > span:last-child { display: none; }
  .order-view { grid-template-columns: 1fr 340px; }
  .floor-side { width: 240px; }
  .pay-layout { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .order-view { grid-template-columns: 1fr; grid-template-rows: 1fr 46vh; }
  .ticket { border-left: 0; border-top: 1px solid var(--line); }
  .floor-side { display: none; }
  .pin-page { grid-template-columns: 1fr; }
  .pos-tabs button span { display: none; }
  .panel-grid { grid-template-columns: 1fr; }
  .cd { grid-template-columns: 1fr; }
}
