/* Pos IA · pantallas de operación: venta, cocina, domicilios, caja, inventario y clientes. */

/* ---------- Venta ---------- */
.sell { height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 12px; }
.catalog { min-width: 0; min-height: 0; display: grid; grid-template-rows: auto auto auto minmax(0, 1fr); gap: 10px; }
.catalog > .chip { justify-self: start; }
.tickets-bar { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
.tk-tab { flex: none; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 6px 12px; text-align: left; display: grid; min-width: 112px; }
.tk-tab b { font-weight: 500; font-size: 13px; display: flex; gap: 4px; align-items: center; }
.tk-tab b svg { width: 13px; height: 13px; color: var(--warn); }
.tk-tab span { font-size: 12px; color: var(--faint); }
.tk-tab.held { border-style: dashed; }
.tk-tab[aria-current="true"] { border-color: var(--brand); border-style: solid; background: var(--brand-soft); }
.tk-tab[aria-current="true"] span { color: var(--brand-fg); }
.tk-tab.new { min-width: 0; display: flex; align-items: center; gap: 6px; color: var(--brand-fg); font-weight: 500; font-size: 13px; }
.tk-tab.new svg { width: 18px; height: 18px; }
.searchrow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.search { flex: 1; min-width: 180px; position: relative; }
.search input { padding-left: 36px; border-radius: 12px; }
.search svg { position: absolute; left: 11px; top: 50%; translate: 0 -50%; width: 18px; height: 18px; color: var(--faint); pointer-events: none; }
.cats { display: flex; gap: 6px; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.cats button { flex: none; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 14px; font-size: 14px; font-weight: 500; color: var(--muted); }
.cats button[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.grid { overflow: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; align-content: start; padding: 2px; }
.prod { border: 1px solid var(--line); background: var(--surface); border-radius: 14px; padding: 12px; text-align: left; display: grid; gap: 6px; min-height: 112px; align-content: space-between; position: relative; transition: transform .08s, border-color .1s; overflow: hidden; border-top: 3px solid var(--cat, var(--line)); }
.prod:active { transform: scale(.98); }
.prod:hover { border-color: var(--brand); border-top-color: var(--cat, var(--brand)); }
.prod .pimg { width: calc(100% + 24px); margin: -12px -12px 2px; aspect-ratio: 4 / 3; object-fit: cover; max-width: none; background: var(--surface-2); }
.prod .pname { font-weight: 500; font-size: 15px; line-height: 1.2; }
.prod .pmeta { display: flex; justify-content: space-between; align-items: end; gap: 6px; }
.prod .pmeta svg { width: 22px; height: 22px; color: var(--faint); flex: none; }
.prod .price { font-weight: 600; font-size: 15px; }
.prod .unit { font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; }
.prod .low { justify-self: start; }

.ticket { min-height: 0; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; overflow: hidden; } /* la barra de hoja solo existe en celular */
.totals { align-content: end; }
.sheet-bar { display: none; }
.ticket-head { padding: 14px 16px 10px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.ticket-head h2 { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ticket-head .grow { min-width: 96px; }
.ticket-sub { padding: 10px 16px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; border-bottom: 1px solid var(--line); }
.cust { display: flex; align-items: center; gap: 6px; border: 1px dashed var(--line); border-radius: 10px; padding: 6px 10px; background: transparent; font-size: 13px; color: var(--muted); max-width: 100%; }
.cust span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cust svg { width: 16px; height: 16px; flex: none; }
.cust.on { border-style: solid; background: var(--brand-soft); color: var(--ink); border-color: transparent; }
.lines { overflow: auto; padding: 4px 8px; min-height: 0; }
.line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 10px 8px; border-bottom: 1px solid var(--line); }
.line:last-child { border-bottom: 0; }
.line .ln { font-weight: 500; }
.line .lm { grid-column: 1 / -1; font-size: 12px; color: var(--faint); }
.line .lt { text-align: right; font-weight: 500; }
.line .qty { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.qbtn { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); display: grid; place-items: center; font-size: 17px; line-height: 1; }
.qty .q { min-width: 26px; text-align: center; font-weight: 500; }
.qty .rm, .linkbtn { border: 0; background: none; color: var(--faint); font-size: 12px; padding: 4px; }
.qty .rm:first-of-type { margin-left: auto; }
.qty .qbtn + .q + .qbtn + .rm { margin-left: auto; }
.totals { padding: 12px 16px 16px; border-top: 1px solid var(--line); display: grid; gap: 4px; background: var(--surface-2); }
.trow { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; color: var(--muted); }
.trow.total { color: var(--ink); font-size: 22px; font-weight: 600; margin-top: 4px; }
.trow.total small { font-size: 12px; font-weight: 400; color: var(--faint); }
.actions { display: grid; grid-template-columns: auto 1fr; gap: 8px; margin-top: 10px; }

/* Modales de venta */
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 9px 12px; font-size: 14px; display: inline-flex; gap: 6px; align-items: center; min-height: 40px; }
.opt svg { width: 18px; height: 18px; }
.opt[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); color: var(--ink); font-weight: 500; }
.opt small { color: var(--faint); }
.opt.pack { flex: 1 1 140px; flex-direction: column; align-items: flex-start; padding: 14px; }
.opt.cust-row { justify-content: space-between; width: 100%; text-align: left; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.keypad button { padding: 14px 0; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); font-size: 20px; font-weight: 500; }
.keypad button:active { background: var(--brand-soft); }
.readout { display: flex; justify-content: space-between; align-items: baseline; background: var(--surface-2); border-radius: 12px; padding: 12px 16px; gap: 10px; flex-wrap: wrap; }
.readout .big { font-size: 30px; font-weight: 600; }
.readout.change { background: var(--good-soft); color: var(--good); }
.modal.pay { width: min(520px, 100%); }
.receipt-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.receipt-wrap { display: grid; justify-items: center; background: var(--surface-2); border-radius: 12px; padding: 16px; overflow: auto; max-height: 70vh; }

/* Comprobante térmico (vista previa) */
.receipt { font-family: var(--font-mono); font-size: 12px; line-height: 1.5; background: #fffdf8; color: #1b1b1b; padding: 18px 16px; border-radius: 4px; width: 100%; max-width: 330px; box-shadow: 0 1px 0 #ddd, 0 6px 18px rgb(0 0 0 / .12); }
.receipt.paper-58mm { max-width: 250px; }
.receipt.paper-A4, .receipt.paper-letter { max-width: 560px; font-size: 13px; }
.receipt.fs-sm { font-size: 11px; } .receipt.fs-lg { font-size: 14px; }
.receipt .c { text-align: center; }
.receipt .r { display: flex; justify-content: space-between; gap: 8px; }
.receipt .ind { padding-left: 12px; color: #444; }
.receipt hr { border: 0; border-top: 1px dashed #999; margin: 8px 0; }
.receipt .dte-r { display: grid; gap: 0; margin-bottom: 3px; } .receipt .dte-r span:first-child { color: #555; font-size: .9em; } .receipt .dte-r .mono { overflow-wrap: anywhere; letter-spacing: .02em; }
.receipt .b { font-weight: 500; }
.receipt .big { font-size: 1.25em; }
.receipt .small { font-size: .82em; }
.receipt .key { word-break: break-all; font-size: .8em; text-align: center; }
.receipt .qr { display: block; margin: 8px auto 2px; width: 96px; height: 96px; }
.receipt .rlogo { max-height: 48px; max-width: 70%; margin: 0 auto 6px; display: block; }

/* ---------- Tableros (cocina y domicilios) ---------- */
.board-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.board-head h2 { font-size: 22px; margin-right: auto; }
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 12px; overflow-x: auto; align-items: start; padding-bottom: 6px; }
.col { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); padding: 10px; display: grid; gap: 10px; align-content: start; min-height: 200px; }
.col-h { display: flex; justify-content: space-between; align-items: center; padding: 2px 4px; font-weight: 500; }
.col .pad { padding: 8px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 8px; border-top: 4px solid var(--line); }
.card.t-good { border-top-color: var(--good); }
.card.t-warn { border-top-color: var(--warn); }
.card.t-crit { border-top-color: var(--crit); }
.card-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.card-h b { font-size: 18px; font-weight: 600; }
.card ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 15px; }
.card li small { display: block; color: var(--faint); font-size: 12px; }
.card .meta { display: flex; gap: 6px; flex-wrap: wrap; }
.card .addr { font-size: 13px; color: var(--muted); display: flex; gap: 6px; align-items: center; text-decoration: none; }
.card .addr svg { width: 16px; height: 16px; }
.view.flash, .flash .board { animation: flash 1.2s ease-out; }
@keyframes flash { 0% { box-shadow: inset 0 0 0 4px var(--brand); } 100% { box-shadow: inset 0 0 0 0 transparent; } }

/* ---------- Caja e inventario ---------- */
.two { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 12px; }
.qty-in { width: 100px !important; text-align: right; }
.tbl td.neg { color: var(--crit); } .tbl td.pos { color: var(--good); }
.cols-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }

/* ---------- Venta v2: modos, escáner, variantes, asientos, tarjeta, pases ---------- */
.cam-btn { flex: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.search.big input { font-size: 18px; padding-top: 14px; padding-bottom: 14px; border-width: 2px; border-color: var(--brand); }
.search.big svg { width: 22px; height: 22px; color: var(--brand-fg); }
.sell.mode-scan { grid-template-columns: minmax(300px, .9fr) minmax(0, 1.1fr); }
.sell.mode-scan .catalog { grid-template-rows: none; align-content: start; }
.sell.mode-scan .catalog .grid { max-height: calc(100vh - 260px); }
.strip { display: flex; gap: 8px; overflow-x: auto; align-items: stretch; padding-bottom: 2px; scrollbar-width: thin; }
.strip .eyebrow { flex: none; align-self: center; writing-mode: horizontal-tb; max-width: 80px; }
.strip-chip { flex: none; display: grid; gap: 2px; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 8px 12px; min-width: 150px; max-width: 240px; border-left: 4px solid var(--brand); }
.strip-chip b { font-size: 15px; }
.strip-chip span { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.strip-chip small { font-size: 12px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.strip-chip .chip { justify-self: start; }
.cust.icon-only { padding: 6px 8px; }
.qedit { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 4px 8px; min-width: 64px; }
.trow.good-t { color: var(--good); }
.scan-box { position: relative; background: #000; border-radius: 14px; overflow: hidden; aspect-ratio: 4 / 3; max-height: 50vh; display: grid; place-items: center; }
.scan-box.small { aspect-ratio: 16 / 9; }
.scan-video { width: 100%; height: 100%; object-fit: cover; }
.scan-frame { position: absolute; inset: 18% 12%; border: 3px solid rgb(255 255 255 / .85); border-radius: 12px; box-shadow: 0 0 0 999px rgb(0 0 0 / .25); pointer-events: none; }
.scan-err { color: #fff; padding: 16px; text-align: center; display: flex; gap: 8px; align-items: center; }
.scan-err svg { width: 22px; height: 22px; flex: none; }
.vmatrix-wrap { overflow-x: auto; }
.vmatrix { border-collapse: separate; border-spacing: 6px; margin: 0 auto; }
.vmatrix th { font-size: 13px; font-weight: 500; color: var(--muted); padding: 2px 4px; white-space: nowrap; }
.vmatrix thead th:first-child { color: var(--faint); font-size: 11px; }
.vcell { width: 64px; height: 48px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; color: var(--brand-fg); }
.vcell svg { width: 18px; height: 18px; }
.vcell:not(:disabled):hover { border-color: var(--brand); background: var(--brand-soft); }
.vcell:disabled { background: var(--surface-2); color: var(--faint); text-decoration: line-through; cursor: not-allowed; opacity: .7; }
.vcell.none { border-style: dashed; color: var(--faint); }
.opt:disabled { opacity: .5; cursor: not-allowed; text-decoration: line-through; }
.big-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.big-choice { display: grid; gap: 6px; justify-items: start; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 14px; padding: 16px; min-height: 120px; }
.big-choice svg { width: 28px; height: 28px; color: var(--brand-fg); }
.big-choice b { font-size: 16px; }
.big-choice small { color: var(--muted); }
.big-choice:hover { border-color: var(--brand); }
.sh-list { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.sh-card { display: flex; gap: 10px; align-items: center; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 8px; }
.sh-card img, .sh-poster { width: 48px; height: 68px; object-fit: cover; border-radius: 6px; flex: none; background: var(--surface-2); display: grid; place-items: center; }
.sh-poster svg { width: 24px; height: 24px; color: var(--faint); }
.seat-scroll { overflow-x: auto; padding-bottom: 6px; }
.seatmap { display: grid; gap: 5px; justify-content: center; min-width: max-content; padding: 0 4px; }
.seatmap .screen { text-align: center; font-size: 11px; letter-spacing: .3em; color: var(--faint); border-top: 4px solid var(--brand); border-radius: 50% 50% 0 0 / 14px 14px 0 0; padding-top: 6px; margin-bottom: 8px; }
.seat-row { display: flex; gap: 4px; align-items: center; }
.seat-row .rl { width: 16px; text-align: center; font-size: 12px; color: var(--faint); }
.seat { width: 28px; height: 28px; border-radius: 7px 7px 4px 4px; border: 1px solid var(--line); background: var(--surface); font-size: 10px; color: var(--muted); padding: 0; display: inline-grid; place-items: center; }
.seat.vip { border-color: #c9a227; background: #fff6d6; color: #7a5b00; }
.seat.taken { background: var(--line); color: transparent; border-color: var(--line); cursor: not-allowed; }
.seat.on, .seat[aria-pressed="true"] { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.seat.blank { visibility: hidden; }
.aisle { width: 12px; }
.seat-legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.seat-legend span { display: inline-flex; gap: 4px; align-items: center; }
.seat-legend .seat { width: 16px; height: 16px; }
.loy-box { display: grid; gap: 8px; background: var(--brand-soft); border-radius: 12px; padding: 12px; }
.loy-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.loy-rw { display: flex; justify-content: space-between; align-items: center; gap: 8px; background: var(--surface); border-radius: 10px; padding: 8px 10px; }
.loy-rw svg { width: 16px; height: 16px; vertical-align: -3px; color: var(--brand-fg); }
.loy-win { display: flex; gap: 8px; align-items: center; background: var(--good-soft); color: var(--good); border-radius: 12px; padding: 10px 12px; }
.loy-win svg { width: 20px; height: 20px; flex: none; }
.card-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.card-acts .btn.big { grid-column: 1 / -1; }
.notify-box { display: grid; gap: 8px; border: 1px dashed var(--line); border-radius: 12px; padding: 10px; }
.notify-box .eyebrow svg { width: 14px; height: 14px; vertical-align: -2px; }
.tp-state { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 10px 0; }
.tp-icon { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-fg); }
.tp-icon svg { width: 36px; height: 36px; }
.tp-state.waiting .tp-icon { animation: pulse 1.4s ease-in-out infinite; }
.tp-state.approved .tp-icon { background: var(--good-soft); color: var(--good); }
.tp-state.declined .tp-icon { background: var(--crit-soft, #fde8e8); color: var(--crit); }
.tp-amount { font-size: 32px; font-weight: 600; }
.tp-msg { font-size: 17px; font-weight: 500; max-width: 320px; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--brand); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
.link-qr { display: grid; place-items: center; }
.link-qr svg { width: min(220px, 70vw); height: auto; border-radius: 8px; }
.turn-box { display: grid; justify-items: start; gap: 2px; background: var(--surface-2); border-radius: 12px; padding: 10px 12px; }
.turn-box b { font-size: 40px; line-height: 1; }
.turn-box small { word-break: break-all; color: var(--faint); }
.pass-list { display: grid; gap: 8px; }
.pass-card { display: flex; gap: 12px; border: 1px solid var(--line); border-radius: 12px; padding: 10px; align-items: center; }
.pass-qr-box { flex: none; width: 104px; height: 104px; background: #fff; border-radius: 8px; padding: 4px; }
.pass-qr-box svg { width: 100%; height: 100%; display: block; }
.pass-info { display: grid; gap: 2px; min-width: 0; font-size: 13px; }
.pass-info b { font-size: 15px; }
.pass-info .row { flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.receipt .turn-n { font-size: 3em; line-height: 1.1; }
.receipt .pass-qr { width: 120px; height: 120px; }

/* ---------- Acceso (gate) ---------- */
.gate { display: grid; gap: 12px; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: start; }
.gate-cam { position: relative; }
.gate-cam .scan-box { aspect-ratio: 4 / 3; max-height: 62vh; }
.gate-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gate-stats .kpi .v { font-size: 34px; }
.gate-hist { display: grid; gap: 4px; max-height: 50vh; overflow: auto; }
.gate-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); font-size: 14px; }
.gate-row .dot { width: 10px; height: 10px; border-radius: 50%; }
.gate-row.admit .dot { background: var(--good); } .gate-row.deny .dot { background: var(--crit); }
.gate-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gate-flash { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; text-align: center; color: #fff; padding: 24px; animation: gatein .15s ease-out; }
.gate-flash.admit { background: #12923f; }
.gate-flash.deny { background: #c62828; }
.gate-flash .gf-icon { font-size: 120px; line-height: 1; font-weight: 700; }
.gate-flash h1 { font-size: clamp(40px, 9vw, 96px); margin: 8px 0; color: #fff; }
.gate-flash p { font-size: clamp(18px, 3.4vw, 30px); margin: 4px 0; opacity: .95; }
.gate-flash small { display: block; margin-top: 18px; opacity: .8; font-size: 15px; }
@keyframes gatein { from { opacity: .3; transform: scale(1.03); } to { opacity: 1; transform: none; } }

/* ---------- Tarjetas de juego ---------- */
.gc-card { display: grid; gap: 10px; }
.gc-balance { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.gc-balance .kpi .v { font-size: 36px; }
.machines { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.machine { border: 1px solid var(--line); background: var(--surface); border-radius: 14px; padding: 12px; display: grid; gap: 8px; border-top: 4px solid var(--brand); }
.machine b { font-size: 15px; }
.machine.premio { border-top-color: #c9a227; } .machine.simulador { border-top-color: #6b4be0; }
.key-box { display: flex; gap: 6px; align-items: center; background: var(--surface-2); border-radius: 8px; padding: 6px 8px; font-size: 12px; word-break: break-all; }

/* ---------- Agenda ---------- */
.agenda-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.agenda-head h2 { font-size: 20px; margin-right: auto; }
.agenda-scroll { overflow: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); max-height: calc(100vh - 190px); }
.agenda-grid { display: grid; grid-template-columns: 54px repeat(var(--cols), minmax(150px, 1fr)); min-width: max-content; position: relative; }
.ag-colh .ag-spec { display: block; font-size: 11.5px; font-weight: 400; color: var(--muted, #667); overflow: hidden; text-overflow: ellipsis; }
.ag-colh { position: sticky; top: 0; z-index: 3; background: var(--surface); border-bottom: 1px solid var(--line); padding: 8px; font-weight: 500; font-size: 14px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-corner { position: sticky; left: 0; top: 0; z-index: 4; background: var(--surface); border-bottom: 1px solid var(--line); }
.ag-times { position: sticky; left: 0; z-index: 2; background: var(--surface); border-right: 1px solid var(--line); }
.ag-time { height: var(--slot); font-size: 11px; color: var(--faint); text-align: right; padding: 2px 6px 0 0; box-sizing: border-box; }
.ag-col { position: relative; border-right: 1px solid var(--line); }
.ag-slot { height: var(--slot); border-bottom: 1px dashed var(--line); box-sizing: border-box; width: 100%; display: block; background: transparent; border-left: 0; border-right: 0; border-top: 0; padding: 0; }
.ag-slot:nth-child(2n) { border-bottom-style: solid; }
.ag-slot:hover { background: var(--brand-soft); }
.ag-slot.drop { background: var(--brand-soft); outline: 2px dashed var(--brand); outline-offset: -2px; }
.ag-appt { position: absolute; left: 4px; right: 4px; z-index: 1; border-radius: 8px; padding: 4px 8px; text-align: left; font-size: 12px; overflow: hidden; border: 1px solid transparent; background: var(--brand-soft); border-left: 4px solid var(--brand); display: grid; align-content: start; gap: 1px; touch-action: none; cursor: grab; }
.ag-appt b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; gap: 4px; align-items: center; }
.ag-appt b svg { width: 13px; height: 13px; flex: none; }
.ag-appt span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.ag-appt.st-arrived { border-left-color: var(--warn); background: var(--warn-soft, #fff4dd); }
.ag-appt.st-in_service { border-left-color: #6b4be0; background: #ece8ff; }
.ag-appt.st-done { border-left-color: var(--good); background: var(--good-soft); opacity: .8; }
.ag-appt.st-no_show, .ag-appt.st-cancelled { border-left-color: var(--crit); background: var(--surface-2); opacity: .6; text-decoration: line-through; }
.ag-appt.dragging { opacity: .85; box-shadow: 0 8px 24px rgb(0 0 0 / .25); z-index: 10; cursor: grabbing; }
.ag-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--crit); z-index: 2; pointer-events: none; }
.st-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .sell { grid-template-columns: minmax(0, 1fr) 340px; }
  .two { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .receipt-layout, .cols-2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .gate { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .sell, .sell.mode-scan { grid-template-columns: minmax(0, 1fr); height: auto; padding-bottom: 76px; }
  .big-choices, .card-acts { grid-template-columns: 1fr; }
  .pass-card { flex-direction: column; align-items: flex-start; }
  /* Modo lector en el celular: la lista del ticket va en línea, debajo del lector, con el total fijo abajo. */
  .sell.mode-scan .ticket { position: static; max-height: none; box-shadow: none; border-radius: var(--r); display: flex; flex-direction: column; overflow: visible; }
  .sell.mode-scan .ticket > .sheet-bar { display: none !important; }
  .sell.mode-scan .ticket > .ticket-head, .sell.mode-scan .ticket > .ticket-sub { display: flex !important; }
  .sell.mode-scan .ticket > .lines { display: block !important; overflow: visible; }
  .sell.mode-scan .ticket .totals > .trow { display: flex !important; }
  .sell.mode-scan .ticket .totals { position: sticky; bottom: calc(70px + env(safe-area-inset-bottom, 0px)); z-index: 5; border-radius: 0 0 var(--r) var(--r); }
  .sell.mode-scan .catalog .grid { max-height: none; }
  .catalog { grid-template-rows: none; }
  .grid { overflow: visible; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
  .ticket { position: fixed; z-index: 35; left: 0; right: 0; bottom: calc(70px + env(safe-area-inset-bottom, 0px)); border-radius: 18px 18px 0 0;
    max-height: calc(100% - 140px); grid-template-rows: auto; box-shadow: 0 -8px 30px rgb(0 0 0 / .18);
    padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
  .ticket:not(.open) > :not(.sheet-bar):not(.totals) { display: none; }
  .ticket:not(.open) .totals > .trow:not(.total) { display: none; }
  .ticket:not(.open) .totals .trow.total { display: none; }
  .ticket:not(.open) .totals .actions { margin-top: 0; }
  .ticket.open { grid-template-rows: auto auto auto minmax(0, 1fr) auto; }
  .sheet-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; border: 0; background: transparent; padding: 12px 16px 6px; font-size: 13px; color: var(--muted); width: 100%; }
  .sheet-bar::before { content: ""; position: absolute; left: 50%; top: 5px; translate: -50% 0; width: 40px; height: 4px; border-radius: 2px; background: var(--line); }
  .sheet-bar b { font-size: 18px; color: var(--ink); }
  .board { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: minmax(0, 1fr); }
  .board-head h2 { width: 100%; }
}

/* Celular: nada puede empujar el ancho de la vista; la cuadrícula se ajusta a 2 columnas. */
.sell > *, .catalog, .catalog > * { min-width: 0; }
@media (max-width: 480px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Canales de autoservicio en tableros */
.chip.ch-kiosk { background: #ffe9d6; color: #9a4a00; }
.chip.ch-table { background: #e3f4ea; color: #1d6b3c; }
.chip.ch-web { background: #e4ecff; color: #2647a8; }
.chip.ch-scango { background: #f1e6ff; color: #6a2fb0; }
.wa-btn { justify-self: start; background: #e6f8ee; color: #137a3d; border-color: #bfe8cf; }

/* Tarjeta de fidelidad (ficha del cliente) */
.loy-card { --lc-bg: var(--brand); --lc-fg: var(--brand-ink); background: var(--lc-bg); color: var(--lc-fg); border-radius: 16px; padding: 14px; display: grid; gap: 10px; }
.loy-card .eyebrow, .loy-card .note { color: inherit; opacity: .85; }
.loy-card-top { display: flex; justify-content: space-between; gap: 10px; align-items: start; }
.loy-tier { font-size: 22px; }
.loy-qr { background: #fff; border-radius: 10px; padding: 4px; width: 110px; height: 110px; flex: none; }
.loy-qr svg { width: 100%; height: 100%; display: block; }
.loy-nums { display: flex; gap: 20px; }
.loy-nums div { display: grid; }
.loy-nums b { font-size: 24px; }
.loy-card .btn { background: rgb(255 255 255 / .92); color: #111; border-color: transparent; }
.loy-card .note svg { width: 14px; height: 14px; vertical-align: -2px; }
