/* local.css — escáner de códigos (js/escaner.js) y rubro Comercio / Local (js/local.js). */

/* ---------- Escáner a pantalla completa ---------- */
.esc-abierto { overflow: hidden; }
.esc { position: fixed; inset: 0; z-index: 200; background: #000; color: #fff; display: flex; flex-direction: column; font-family: inherit; }
.esc.is-flash .esc-visor::after { animation: escFlash .35s ease-out; }
@keyframes escFlash { from { opacity: .55; } to { opacity: 0; } }
.esc-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: max(14px, env(safe-area-inset-top)) 16px 12px; background: linear-gradient(#000, rgba(0, 0, 0, .6)); position: relative; z-index: 2; }
.esc-top b { display: block; font-size: 17px; }
.esc-top span { font-size: 13px; color: rgba(255, 255, 255, .7); }
.esc-x { width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .14); color: #fff; font-size: 18px; cursor: pointer; flex-shrink: 0; }
.esc-visor { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.esc-visor::after { content: ""; position: absolute; inset: 0; background: #22C55E; opacity: 0; pointer-events: none; }
.esc-visor video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.esc-marco { position: absolute; left: 50%; top: 46%; width: min(86vw, 520px); height: min(34vw, 200px); transform: translate(-50%, -50%); box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .45); border-radius: 14px; }
.esc-marco i { position: absolute; width: 28px; height: 28px; border: 3px solid #fff; }
.esc-marco i:nth-child(1) { top: -2px; left: -2px; border-right: 0; border-bottom: 0; border-radius: 14px 0 0 0; }
.esc-marco i:nth-child(2) { top: -2px; right: -2px; border-left: 0; border-bottom: 0; border-radius: 0 14px 0 0; }
.esc-marco i:nth-child(3) { bottom: -2px; left: -2px; border-right: 0; border-top: 0; border-radius: 0 0 0 14px; }
.esc-marco i:nth-child(4) { bottom: -2px; right: -2px; border-left: 0; border-top: 0; border-radius: 0 0 14px 0; }
.esc-laser { position: absolute; left: 8%; right: 8%; top: 50%; height: 2px; background: #EF4444; box-shadow: 0 0 12px 2px rgba(239, 68, 68, .7); animation: escLaser 1.6s ease-in-out infinite; }
@keyframes escLaser { 0%, 100% { transform: translateY(-34px); } 50% { transform: translateY(34px); } }
.esc-estado { position: absolute; left: 16px; right: 16px; bottom: 18px; margin: 0; text-align: center; font-size: 14px; color: rgba(255, 255, 255, .9); text-shadow: 0 1px 3px #000; }
.esc-res { position: absolute; left: 50%; top: calc(46% + min(17vw, 100px) + 22px); transform: translate(-50%, 10px); z-index: 3; min-width: min(86vw, 420px); padding: 12px 16px; border-radius: 14px; background: #fff; color: #111; display: flex; flex-direction: column; gap: 2px; opacity: 0; transition: opacity .2s, transform .25s; pointer-events: none; text-align: center; }
.esc-res.is-on { opacity: 1; transform: translate(-50%, 0); }
.esc-res b { font-size: 15px; }
.esc-res span { font-family: ui-monospace, monospace; font-size: 12px; color: #666; }
.esc-res.is-ok { box-shadow: inset 0 -4px 0 #22C55E; }
.esc-res.is-mal { box-shadow: inset 0 -4px 0 #EF4444; }
.esc-bot { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; padding: 12px 14px max(14px, env(safe-area-inset-bottom)); background: #0B0B0C; position: relative; z-index: 2; }
.esc-btn { height: 40px; padding: 0 14px; border-radius: 99px; border: 1px solid rgba(255, 255, 255, .25); background: none; color: #fff; font: inherit; font-size: 14px; cursor: pointer; }
.esc-btn.is-on { background: #FDE047; color: #111; border-color: #FDE047; }
.esc-manual { display: flex; gap: 6px; flex: 1 1 220px; max-width: 360px; }
.esc-manual input { flex: 1; min-width: 0; height: 40px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .08); color: #fff; padding: 0 12px; font: inherit; font-size: 15px; outline: 0; }
.esc-manual button { height: 40px; padding: 0 14px; border-radius: 10px; border: 0; background: #fff; color: #111; font-weight: 700; cursor: pointer; }
.esc-listo { height: 46px; padding: 0 22px; border-radius: 99px; border: 0; background: #22C55E; color: #052e16; font: inherit; font-weight: 700; font-size: 16px; cursor: pointer; flex: 1 1 100%; max-width: 360px; }

/* ---------- Caja (punto de venta) ---------- */
.pos { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 16px; align-items: start; }
.pos-scan { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 16px; border-radius: 16px; background: var(--card); border: 2px solid var(--brand); box-shadow: 0 0 0 5px var(--brand-soft); }
.pos-scan-ic { display: flex; color: var(--brand); }
.pos-scan-ic .ic { width: 26px; height: 26px; }
.pos-scan input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: inherit; font-size: 18px; height: 46px; }
.pos-cam { height: 46px; border-radius: 12px; }
.pos-res { list-style: none; margin: 8px 0 0; padding: 6px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.pos-res button { width: 100%; display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 10px 12px; border: 0; background: none; border-radius: 10px; cursor: pointer; text-align: left; font: inherit; }
.pos-res button:hover { background: #F3F4F6; }
.pos-res .mono { font-size: 12px; color: var(--mute); }
.pos-res em { font-style: normal; font-weight: 700; }
.pos-h { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--mute); font-weight: 650; margin: 22px 0 10px; }
.pos-rapidos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.pos-tile { position: relative; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; justify-content: space-between; min-height: 92px; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); cursor: pointer; text-align: left; font: inherit; box-shadow: var(--shadow); transition: transform .12s, border-color .15s; }
.pos-tile:hover { border-color: var(--brand-line); }
.pos-tile:active { transform: scale(.97); }
.pos-tile b { font-size: 14px; line-height: 1.25; display: flex; align-items: center; gap: 4px; }
.pos-tile b .ic { width: 15px; height: 15px; }
.pos-tile span { font-weight: 700; color: var(--brand-ink); }
.pos-tile.is-libre { border-style: dashed; background: var(--brand-soft); }
.pos-tile.is-libre span { font-weight: 500; color: var(--mute); font-size: 12.5px; }
.pos-poco { position: absolute; top: 8px; right: 8px; font-style: normal; font-size: 10.5px; font-weight: 700; color: #B45309; background: #FEF3E2; padding: 2px 6px; border-radius: 99px; }
.pos-tip { display: flex; gap: 8px; align-items: flex-start; margin: 16px 0 0; padding: 12px 14px; border-radius: 12px; background: #F3F4F6; color: var(--ink-2); font-size: 13px; }
.pos-tip .ic { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; }
.pos-der { position: sticky; top: 76px; display: flex; flex-direction: column; padding: 16px; max-height: calc(100vh - 96px); }
.pos-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.pos-head b { font-size: 16px; }
.pos-head .link { margin-left: auto; }
.pos-lineas { list-style: none; margin: 0 -6px; padding: 0; overflow-y: auto; flex: 1; min-height: 80px; }
.pos-lineas li { display: grid; grid-template-columns: 1fr auto auto auto; gap: 8px; align-items: center; padding: 10px 6px; border-bottom: 1px solid var(--line); border-radius: 8px; transition: background .6s; }
.pos-lineas li.is-nuevo { background: #ECFDF5; }
.pos-l-nom { min-width: 0; display: flex; flex-direction: column; }
.pos-l-nom b { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pos-l-nom span { font-size: 12px; color: var(--mute); }
.pos-cant { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--line-2); border-radius: 99px; padding: 2px; }
.pos-cant button { width: 30px; height: 30px; border-radius: 50%; border: 0; background: #F3F4F6; display: grid; place-items: center; cursor: pointer; }
.pos-cant button .ic { width: 14px; height: 14px; stroke-width: 2.4; }
.pos-cant > span { min-width: 26px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.pos-cant .mono { padding: 0 8px; font-size: 13px; }
.pos-l-sub { font-variant-numeric: tabular-nums; white-space: nowrap; }
.pos-vacio { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 40px 10px; color: var(--mute); text-align: center; }
.pos-vacio .ic { width: 34px; height: 34px; color: var(--brand); margin-bottom: 6px; }
.pos-vacio b { color: var(--ink); }
.pos-tot { padding-top: 12px; margin-top: 8px; border-top: 2px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.pos-tot > div { display: flex; justify-content: space-between; align-items: baseline; font-variant-numeric: tabular-nums; }
.pos-total span { font-size: 15px; font-weight: 600; }
.pos-total b { font-size: 32px; font-weight: 750; letter-spacing: -.02em; }
.pos-cobrar { height: 58px; font-size: 18px; border-radius: 14px; margin-top: 12px; }
.pos-cobrar[disabled] { opacity: .45; cursor: not-allowed; }
.pos-caja { margin: 10px 0 0; text-align: center; font-size: 12px; }

/* Cobro */
.modal-card.is-cobro { width: min(620px, 100%); }
.cob-total { display: flex; flex-direction: column; align-items: center; padding: 14px; border-radius: 14px; background: #F7F8FA; margin-bottom: 14px; }
.cob-total span { font-size: 13px; color: var(--mute); }
.cob-total b { font-size: 36px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.cob-total small { color: #B45309; font-weight: 700; }
.cob-pagos { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cob-pagos li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; background: #ECFDF5; }
.cob-pagos li span { flex: 1; font-weight: 600; }
.cob-medios { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-bottom: 12px; }
.cob-medio input { position: absolute; opacity: 0; pointer-events: none; }
.cob-medio span { display: flex; align-items: center; gap: 8px; padding: 12px; border-radius: 12px; border: 1.5px solid var(--line-2); cursor: pointer; font-weight: 600; transition: all .15s; }
.cob-medio span .ic { width: 18px; height: 18px; }
.cob-medio input:checked + span { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); }
.cob-medio input:focus-visible + span { box-shadow: 0 0 0 3px var(--brand-soft); }
.cob-det { display: flex; flex-direction: column; gap: 10px; }
.cob-billetes { display: flex; flex-wrap: wrap; gap: 6px; }
.cob-billetes button { height: 36px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line-2); background: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.cob-billetes button:hover { border-color: var(--brand); }
.cob-vuelto { margin: 0; padding: 12px; border-radius: 12px; background: #ECFDF5; color: #166534; font-size: 16px; text-align: center; }
.cob-vuelto b { font-size: 22px; }
.cob-vuelto.is-falta { background: #FEF3E2; color: #B45309; }
.cob-qr { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 12px; background: #EFF6FF; }
.cob-qr-img { width: 70px; height: 70px; border-radius: 10px; background: #fff; display: grid; place-items: center; flex-shrink: 0; }
.cob-qr-img .ic { width: 40px; height: 40px; }
.cob-qr div:last-child { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.cob-listo { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 0 12px; padding: 12px; border-radius: 12px; background: #ECFDF5; color: #166534; font-weight: 700; }
.cob-comp { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 14px; }
.cob-comp > span { color: var(--mute); }
.cob-comp label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.cob-tip { font-size: 12.5px; }

/* Ticket */
.tk { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px; max-width: 320px; margin: 0 auto; padding: 16px; background: #FFFDF8; border: 1px dashed #C9CDD4; border-radius: 6px; display: flex; flex-direction: column; gap: 3px; }
.tk span { display: block; }
.tk-marca { font-size: 16px; text-align: center; }
.tk hr { width: 100%; border: 0; border-top: 1px dashed #999; margin: 6px 0; }
.tk-l { display: flex; justify-content: space-between; gap: 10px; }
.tk-l b { white-space: nowrap; }
.tk-total { font-size: 16px; }
.tk-ley { font-size: 11px; text-align: center; }
.tk-gracias { text-align: center; }

/* Toast con acciones (código desconocido) */
.toast-acciones { display: inline-flex; gap: 6px; margin-left: 10px; }
.toast-accion { border: 0; border-radius: 99px; padding: 5px 11px; background: #fff; color: #111; font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.toast { pointer-events: auto; }

/* Productos */
.lo-cod { font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.lo-stock { display: inline-block; font-weight: 700; font-variant-numeric: tabular-nums; }
.lo-stock.is-bajo { color: #B45309; }
.lo-stock.is-sin { color: #C2312F; }
.lo-margen { font-weight: 650; color: #17803D; }
.lo-margen.is-bajo { color: #B45309; }
.lo-cod-in { display: flex; gap: 6px; }
.lo-cod-in input { flex: 1; min-width: 0; }
.lo-cod-in .btn-icon { width: 38px; height: 38px; flex-shrink: 0; }
.lo-hist { font-size: 12.5px; }
.lo-movs { border-top: 1px solid var(--line); padding-top: 10px; }
.lo-movs ul { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.lo-movs li { display: grid; grid-template-columns: 60px 1fr; gap: 0 10px; font-size: 13px; }
.lo-movs li > span:first-child { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.lo-movs li small { grid-column: 2; font-size: 11.5px; }
.lo-prev { border-top: 1px solid var(--line); padding-top: 10px; }
.lo-prev > b { display: block; margin-bottom: 8px; font-size: 13.5px; }

/* Mercadería e inventario */
.lo-ing-head { margin-bottom: 14px; display: flex; flex-direction: column; gap: 14px; }
.lo-ing-scan { box-shadow: none; border-width: 1.5px; }
.card.lo-ing-scan { padding: 8px 8px 8px 16px; margin-bottom: 14px; }
.lo-ing-pie { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 14px; }
.lo-ing-pie > div { display: flex; align-items: center; gap: 14px; }
.lo-ing-pie b { font-size: 18px; }
.lo-in-costo { width: 100px; }
.lo-desc { margin-bottom: 14px; }
.lo-conteo-cats { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.notice { display: flex; align-items: center; gap: 10px; padding: 12px 16px; }
.notice .ic { width: 18px; height: 18px; flex-shrink: 0; }
.notice.is-warn { background: #FEF3E2; border-color: #F3D9B1; color: #92400E; }

/* Cierre de caja: arqueo por billete */
.lo-arqueo { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 10px 0; }
.lo-arqueo label { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.lo-arqueo input { height: 34px; border: 1px solid var(--line-2); border-radius: 7px; padding: 0 8px; font: inherit; font-size: 15px; font-weight: 700; text-align: right; }
.lo-arq-res { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.lo-arq-res > div { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 10px; background: #F7F8FA; }
.lo-arq-res span { font-size: 12px; color: var(--mute); }
.lo-arq-res b { font-size: 18px; font-variant-numeric: tabular-nums; }
.lo-arq-res .is-ok { background: #ECFDF5; color: #166534; }
.lo-arq-res .is-falta { background: #FEE2E2; color: #991B1B; }
.lo-arq-res .is-sobra { background: #FEF3E2; color: #92400E; }

@media (max-width: 1100px) {
  .pos { grid-template-columns: 1fr; }
  .pos-der { position: static; max-height: none; }
}
@media (max-width: 620px) {
  .pos-scan { flex-wrap: wrap; padding: 8px; }
  .pos-scan input { font-size: 16px; }
  .pos-cam { width: 100%; height: 52px; font-size: 16px; }
  .pos-rapidos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lo-arqueo, .lo-arq-res { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toast-acciones { display: flex; margin: 8px 0 0; }
}

/* Balanza (js/balanza.js) */
.bz-leer { width: 100%; min-height: 50px; justify-content: center; font-size: 15.5px; }
.bz-leer .ic { width: 20px; height: 20px; }
.bz-o { display: flex; align-items: center; gap: 10px; margin: 14px 0 10px; font-size: 12.5px; color: var(--mute); }
.bz-o::before, .bz-o::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.bz-ov { position: fixed; inset: 0; z-index: 300; background: rgba(15, 23, 42, .55); display: grid; place-items: center; padding: 16px; }
.bz-card { width: 100%; max-width: 400px; background: var(--card); border-radius: 18px; padding: 18px; box-shadow: var(--shadow-lg); }
.bz-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; font-size: 16px; }
.bz-display { display: grid; grid-template-columns: 1fr auto; align-items: baseline; padding: 18px 20px 14px; border-radius: 14px; background: #0B1F14; color: #7CF29A; font-family: "SFMono-Regular", Consolas, monospace; box-shadow: inset 0 2px 10px rgba(0, 0, 0, .5); }
.bz-kg { font-size: 54px; font-weight: 700; letter-spacing: .02em; text-align: right; line-height: 1; font-variant-numeric: tabular-nums; }
.bz-u { font-size: 20px; margin-left: 8px; }
.bz-est { grid-column: 1 / -1; font-family: Inter, system-ui, sans-serif; font-size: 12.5px; color: #F7C948; margin-top: 8px; }
.bz-est.is-ok { color: #7CF29A; }
.bz-total { text-align: center; font-size: 17px; font-weight: 650; margin: 12px 0 2px; min-height: 22px; }
.bz-msg { text-align: center; font-size: 12.5px; margin: 6px 0 14px; }
.bz-acts { display: flex; justify-content: flex-end; gap: 8px; }
.bz-acts .btn-primary { flex: 1; justify-content: center; }
.bz-tit { font-size: 14px; margin-top: 4px; }
.bz-etq { display: flex; gap: 14px; align-items: center; }
.bz-etq > div { flex-shrink: 0; width: 170px; padding: 8px 10px; border: 1px dashed #9CA3AF; border-radius: 8px; background: #fff; color: #000; display: flex; flex-direction: column; font-size: 11.5px; }
.bz-etq > div b { font-size: 12px; }
.bz-etq p { font-size: 12.5px; margin: 0; }
.bz-barras { width: 100%; height: auto; margin-top: 4px; }
@media (max-width: 520px) { .bz-etq { flex-direction: column; align-items: flex-start; } .bz-kg { font-size: 44px; } }
.bz-aviso { margin-top: 8px; color: #B45309; }

/* Ventas por cajero */
.lo-cajeros { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-bottom: 16px; }
.lo-caj { display: flex; flex-direction: column; gap: 8px; }
.lo-caj[role="button"] { cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.lo-caj[role="button"]:hover { border-color: #C3C8D0; }
.lo-caj.is-on { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.lo-caj-h { display: flex; align-items: center; gap: 10px; }
.lo-caj-h > div { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.lo-caj-h .muted { font-size: 12.5px; }
.lo-caj-pos { font-size: 20px; font-weight: 750; color: var(--mute); }
.lo-caj-total { font-size: 28px; font-weight: 750; letter-spacing: -.02em; }
.lo-caj-bar { height: 7px; border-radius: 99px; background: #EEF0F3; overflow: hidden; }
.lo-caj-bar span { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.lo-caj-pct { font-size: 12px; margin-top: -4px; }
.lo-caj-n { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding-top: 8px; border-top: 1px solid var(--line); }
.lo-caj-n div { display: flex; flex-direction: column; }
.lo-caj-n b { font-size: 15px; }
.lo-caj-n span { font-size: 11.5px; color: var(--mute); }
.lo-caj-medios { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--ink-2); }
.lo-vfila { cursor: pointer; }
.lo-vfila:hover td { background: #F7F8FA; }
/* Ticket de fiambrería (vista previa en Productos → Balanza) */
.bz-tk { width: 200px !important; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 10.5px !important; gap: 2px; }
.bz-tk-l { line-height: 1.35; margin-top: 4px; }
.bz-tk-tot { font-size: 14px !important; margin-top: 8px; border-top: 1px dashed #9CA3AF; padding-top: 6px; }
.bz-tk .bz-barras { margin-top: 2px; }

/* Ticket por WhatsApp */
.cob-wa { display: grid; grid-template-columns: auto 1fr; gap: 6px 8px; align-items: center; margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: #EAF7EE; }
.cob-wa > svg { width: 18px; height: 18px; color: #1E7B3A; }
.cob-wa > span { font-weight: 600; font-size: 13.5px; }
.cob-wa > span small { font-weight: 500; color: var(--ink-2, #555); }
.cob-wa input { grid-column: 1 / -1; height: 40px; border: 1px solid #CFE6D6; border-radius: 8px; padding: 0 10px; font: inherit; background: #fff; }
.tk-wa { display: inline-flex; gap: 6px; align-items: center; }
.tk-wa input { width: 150px; height: 36px; border: 1px solid #DDE1E6; border-radius: 8px; padding: 0 8px; font: inherit; }

/* Cobro con QR */
.cob-qr { align-items: stretch; margin-top: 10px; }
.cob-qr-img { width: 150px; height: 150px; padding: 6px; }
.cob-qr-img svg { width: 100%; height: 100%; }
.cob-qr-carga { width: 26px; height: 26px; border-radius: 50%; border: 3px solid #CFE0F5; border-top-color: #2F6FDB; animation: qr-gira .8s linear infinite; }
.cob-qr-info { display: flex; flex-direction: column; gap: 6px; font-size: 13px; min-width: 0; }
.cob-qr-monto { font-size: 22px; }
.cob-qr-estado { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: #2F6FDB; }
.cob-qr-estado.is-ok { color: #1E7B3A; }
.cob-qr-estado svg { width: 18px; height: 18px; }
.cob-qr-dot { width: 9px; height: 9px; border-radius: 50%; background: #2F6FDB; animation: qr-late 1s ease-in-out infinite; }
.cob-qr-acc { display: flex; flex-wrap: wrap; gap: 6px; }
@keyframes qr-gira { to { transform: rotate(360deg); } }
@keyframes qr-late { 50% { opacity: .25; } }
.qr-cliente { position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; background: rgba(10, 20, 35, .82); padding: 16px; }
.qr-cliente-card { display: flex; flex-direction: column; align-items: center; gap: 12px; width: min(440px, 100%); padding: 28px 24px; border-radius: 22px; background: #fff; text-align: center; font-size: 15px; }
.qr-cliente-marca { font-size: 18px; }
.qr-cliente-monto { font-size: 36px; font-weight: 750; }
.qr-cliente-img { width: min(300px, 70vw); aspect-ratio: 1; }
.qr-cliente-img svg { width: 100%; height: 100%; }
@media (max-width: 560px) { .cob-qr { flex-direction: column; align-items: center; text-align: center; } .cob-qr-acc { justify-content: center; } }

/* Stock y ofertas */
.lo-tachado { color: var(--ink-3, #8A9099); font-weight: 500; margin-right: 4px; }
.pos-tile.is-oferta { border-color: #F2B8B5; }
.pos-oferta { position: absolute; top: 8px; right: 8px; padding: 2px 7px; border-radius: 6px; background: #C2312F; color: #fff; font-style: normal; font-size: 11px; font-weight: 700; }
.sp-chk { width: 18px; height: 18px; cursor: pointer; accent-color: var(--brand, #4D7C0F); }
.sp-row.is-sel td { background: color-mix(in oklab, var(--brand, #4D7C0F) 8%, white); }
.sp-cant { width: 84px; height: 34px; border: 1px solid var(--line, #DDE1E6); border-radius: 8px; padding: 0 8px; text-align: right; font: inherit; }
.sp-oferta-precio { color: #C2312F; }
.sp-tabla { margin-bottom: 76px; }
.sp-bar { position: sticky; bottom: 12px; z-index: 5; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-top: -64px; padding: 12px 14px; border-radius: 14px; background: var(--card, #fff); border: 1px solid var(--line, #DDE1E6); box-shadow: 0 12px 30px -14px rgba(0,0,0,.35); font-size: 14px; }
.sp-acc { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sp-tabla { overflow-x: auto; }
.sp-tabla td:nth-child(2) { min-width: 210px; }

/* Planilla de stock (Excel interno) */
.xl-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 10px; }
.xl-fx { flex: 1 1 360px; display: flex; align-items: center; min-width: 0; height: 38px; border: 1px solid #C9CED6; border-radius: 6px; background: #fff; font-size: 13px; overflow: hidden; }
.xl-ref { width: 64px; padding: 0 10px; border-right: 1px solid #DDE1E6; font-weight: 700; font-family: ui-monospace, Consolas, monospace; }
.xl-fx-ic { padding: 0 10px; color: #8A9099; font-style: italic; font-weight: 700; border-right: 1px solid #DDE1E6; }
.xl-fx-txt { padding: 0 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xl-q { flex: 0 1 260px; }
.xl-wrap { overflow: auto; max-height: 64vh; border: 1px solid #C9CED6; border-radius: 8px; background: #fff; margin-bottom: 18px; }
.xl { border-collapse: separate; border-spacing: 0; font-size: 13px; font-variant-numeric: tabular-nums; min-width: 100%; }
.xl th, .xl td { border-right: 1px solid #E3E6EA; border-bottom: 1px solid #E3E6EA; padding: 0; white-space: nowrap; }
.xl thead th { position: sticky; z-index: 2; background: #F3F4F6; }
.xl thead tr:first-child th { top: 0; height: 22px; }
.xl thead tr:nth-child(2) th { top: 22px; }
.xl-l { color: #6B7280; font-weight: 600; font-size: 11.5px; text-align: center; }
.xl-h { padding: 6px 10px !important; text-align: left; font-weight: 700; cursor: pointer; user-select: none; }
.xl-h.is-f { color: #4D7C0F; }
.xl-n { position: sticky; left: 0; z-index: 1; min-width: 38px; background: #F3F4F6; color: #6B7280; font-weight: 600; font-size: 11.5px; text-align: center; }
.xl thead .xl-n { z-index: 3; }
.xl-c { padding: 0 10px !important; height: 30px; }
.xl-c.is-num { text-align: right; }
.xl-c.is-f { background: #F7F8FA; color: #374151; }
.xl-c.is-bajo { color: #B45309; font-weight: 700; }
.xl-c.is-sin { color: #C2312F; font-weight: 700; }
.xl-c.is-pedir { color: #1D4ED8; font-weight: 700; }
.xl-c:focus, .xl-in:focus { outline: 2px solid #217346; outline-offset: -2px; }
.xl-c:has(.xl-in) { padding: 0 !important; }
.xl-in { width: 100%; min-width: 90px; height: 30px; border: 0; background: transparent; padding: 0 10px; font: inherit; color: inherit; }
.xl-c.is-num .xl-in { text-align: right; min-width: 70px; }
.xl-r:hover td { background: #F0F7EA; }
.xl-r.is-reciente td { background: #FFFBEA; }
.xl-mov { padding: 0 8px !important; }
.xl-mov-tag { display: inline-block; padding: 1px 7px; border-radius: 5px; font-size: 11.5px; font-weight: 650; }
.xl-mov-tag.is-in { background: #E6F4EA; color: #1E7B3A; }
.xl-mov-tag.is-out { background: #FDECEC; color: #C2312F; }
.xl tfoot td, .xl tfoot th { position: sticky; bottom: 0; background: #EEF2E8; font-weight: 700; border-top: 2px solid #C9CED6; }
.xl-movs { margin-bottom: 18px; }
/* Carga rápida */
.cr-box { padding: 16px; margin-bottom: 16px; }
.cr-fila { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.cr-cod { flex: 1 1 320px; display: flex; align-items: center; gap: 10px; height: 54px; padding: 0 14px; border: 2px solid var(--brand, #4D7C0F); border-radius: 12px; background: #fff; }
.cr-cod input { flex: 1; min-width: 0; border: 0; font: inherit; font-size: 17px; outline: none; background: transparent; }
.cr-cant { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--ink-2, #555); }
.cr-cant input { width: 110px; height: 54px; border: 2px solid #DDE1E6; border-radius: 12px; padding: 0 12px; font: inherit; font-size: 20px; font-weight: 700; text-align: center; }
.cr-cant input:focus { border-color: var(--brand, #4D7C0F); outline: none; }
.cr-fila .btn { height: 54px; }
.cr-opts { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-top: 12px; }
.cr-sw { display: inline-flex; gap: 8px; align-items: center; font-size: 13.5px; cursor: pointer; }
.cr-sw input { width: 18px; height: 18px; accent-color: var(--brand, #4D7C0F); }
.cr-nota { flex: 0 1 320px; height: 38px; border: 1px solid #DDE1E6; border-radius: 8px; padding: 0 10px; font: inherit; }
.cr-ayuda { margin: 10px 0 0; font-size: 12.5px; }
tr.cr-ult td { background: #F0F7EA; }
.xl-in[data-k="nombre"] { min-width: 230px; }
.xl-in[data-k="proveedor"], .xl-in[data-k="categoria"] { min-width: 140px; }
.xl-mov-tag.is-precio { background: #E8F0FD; color: #1D4ED8; }
.xl-c:has(.xl-in) { background: #fff; }
.xl-c:has(.xl-in):hover { box-shadow: inset 0 0 0 1px #9FC9A9; }

/* Planilla: producto bajo el mínimo, bien en rojo */
.xl-r.is-critico td, .xl-r.is-critico th.xl-n { background: #FDE2E1 !important; color: #8F1D1A; }
.xl-r.is-sin-stock td, .xl-r.is-sin-stock th.xl-n { background: #F8C7C4 !important; color: #7A1411; font-weight: 600; }
.xl-r.is-critico th.xl-n, .xl-r.is-sin-stock th.xl-n { box-shadow: inset 4px 0 0 #D92D20; }
.xl-c.is-alerta { padding: 0 6px !important; }
.xl-alerta-w { display: flex; align-items: center; gap: 6px; }
.xl-alerta { flex-shrink: 0; padding: 2px 6px; border-radius: 4px; background: #D92D20; color: #fff; font-size: 10.5px; font-weight: 800; letter-spacing: .02em; animation: xl-late 1.6s ease-in-out infinite; }
.is-sin-stock .xl-alerta { background: #7A1411; }
.xl-c.is-alerta .xl-in { min-width: 56px; font-weight: 800; color: #B42318; }
@keyframes xl-late { 50% { opacity: .55; } }
.xl-r.is-critico td, .xl-r.is-critico th.xl-n { background: #F9C4BF !important; color: #7A1411 !important; font-weight: 700; }
.xl-r.is-sin-stock td, .xl-r.is-sin-stock th.xl-n { background: #E8645A !important; color: #fff !important; font-weight: 700; }
.xl-r.is-sin-stock .xl-in, .xl-r.is-sin-stock .xl-c.is-alerta .xl-in { color: #fff; }
.xl-r.is-critico .xl-c.is-f, .xl-r.is-sin-stock .xl-c.is-f { background: inherit; }
