/* ===================== Caja Chikipapelería — estilos ===================== */
:root {
  --verde: #25b864;
  --verde-osc: #1b9a52;
  --rosa: #f4a0b2;
  --azul: #7da7e0;
  --menta: #86c9a6;
  --amarillo: #f6cf4b;
  --fondo: #f6f8fc;
  --blanco: #ffffff;
  --texto: #1f2a44;
  --gris: #6b7489;
  --linea: #e3e8f1;
  --rojo: #d9485f;
  --radio: 16px;
  --sombra: 0 2px 10px rgba(31, 42, 68, .06), 0 1px 2px rgba(31, 42, 68, .05);
  --titulo: 'Fredoka', system-ui, sans-serif;
  --cuerpo: 'Plus Jakarta Sans', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--cuerpo); color: var(--texto); background: var(--fondo); font-size: 15px; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--titulo); font-weight: 600; margin: 0; letter-spacing: .2px; }
.boot { display: grid; place-items: center; height: 100vh; color: var(--gris); }
.muted { color: var(--gris); }
.small { font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }

/* ---------- botones y campos ---------- */
.btn { text-decoration: none; color: inherit; white-space: nowrap; border: 0; border-radius: 12px; padding: 10px 16px; font-weight: 700; cursor: pointer; background: var(--linea); transition: transform .08s, background .15s, box-shadow .15s; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; }
.btn:hover { background: #d7deea; }
.btn:active { transform: scale(.97); }
.btn:focus-visible, .field:focus-visible, .chip:focus-visible, .prod:focus-visible { outline: 3px solid var(--azul); outline-offset: 2px; }
.btn.primary { background: var(--verde); color: #fff !important; box-shadow: 0 4px 14px rgba(37, 184, 100, .3); }
.btn.primary:hover { background: var(--verde-osc); }
.btn.danger { background: #fde4e8; color: #a8243a; }
.btn.danger:hover { background: #fbcfd7; }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--linea); }
.btn.big { font-size: 18px; min-height: 56px; border-radius: 14px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.field { width: 100%; border: 2px solid var(--linea); border-radius: 12px; padding: 10px 12px; background: #fff; min-height: 44px; transition: border-color .15s; }
.field:focus { border-color: var(--azul); outline: none; }
label.lbl { display: block; font-size: 13px; font-weight: 700; margin: 12px 0 6px; }
.row { display: flex; gap: 10px; align-items: center; }
.row > * { flex: 1; }
.check { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-weight: 600; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--verde); }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px;
  background: radial-gradient(circle at 15% 20%, rgba(246, 207, 75, .25), transparent 40%),
              radial-gradient(circle at 85% 15%, rgba(244, 160, 178, .25), transparent 40%),
              radial-gradient(circle at 70% 90%, rgba(125, 167, 224, .25), transparent 45%), var(--fondo); }
.login .card { width: 100%; max-width: 400px; background: #fff; border-radius: 24px; padding: 32px 28px; box-shadow: 0 20px 50px rgba(31, 42, 68, .12); animation: subir .4s ease-out; }
.login img { width: 100%; max-width: 280px; display: block; margin: 0 auto 6px; }
.login h1 { text-align: center; font-size: 22px; margin-bottom: 4px; }
.login p.sub { text-align: center; margin: 0 0 12px; }
.login .btn { width: 100%; margin-top: 20px; }
.err { color: var(--rojo); font-weight: 600; font-size: 14px; margin-top: 12px; min-height: 1em; }
@keyframes subir { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- estructura ---------- */
.shell { display: grid; grid-template-rows: auto minmax(0, 1fr); grid-template-columns: minmax(0, 1fr); height: 100vh; height: 100dvh; }
.top { display: flex; align-items: center; gap: 12px; padding: 10px 18px; background: #fff; border-bottom: 1px solid var(--linea); }
.top img { height: 30px; }
.nav { display: flex; gap: 2px; margin-left: 8px; flex-wrap: nowrap; min-width: 0; align-items: center; }
.nav a { text-decoration: none; color: var(--gris); font-weight: 700; padding: 8px 10px; border-radius: 10px; position: relative; font-size: 14px; white-space: nowrap; }
.nav a:hover { background: var(--fondo); color: var(--texto); }
.nav a.on { background: #e5f6ec; color: var(--verde-osc); }
.menu { position: relative; }
.menu-btn { border: 0; background: transparent; font-weight: 700; color: var(--gris); padding: 8px 12px; border-radius: 10px; cursor: pointer; font-size: 14px; white-space: nowrap; min-height: 38px; }
.menu-btn:hover { background: var(--fondo); color: var(--texto); }
.menu-btn.on { background: #e5f6ec; color: var(--verde-osc); }
.menu-pop { position: fixed; margin-top: 6px; background: #fff; border-radius: 14px; box-shadow: 0 16px 40px rgba(31, 42, 68, .18); padding: 6px; min-width: 210px; z-index: 45; display: grid; animation: subir .15s ease-out; }
.menu-pop a { padding: 10px 14px !important; border-radius: 10px; font-size: 15px !important; }
.nav .badge { background: var(--rosa); color: #6b1d2c; border-radius: 999px; font-size: 11px; padding: 1px 7px; margin-left: 4px; }
.who { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--amarillo); display: grid; place-items: center; font-family: var(--titulo); font-weight: 700; border: 0; font-size: 16px; color: var(--texto); position: relative; }
button.avatar { cursor: pointer; transition: box-shadow .15s; }
button.avatar:hover, button.avatar[aria-expanded="true"] { box-shadow: 0 0 0 3px #fbe4a6; }
.avatar.big { width: 46px; height: 46px; font-size: 20px; flex: 0 0 auto; }
.acct { position: relative; }
.acct-badge { position: absolute; top: -4px; right: -4px; background: var(--rojo); color: #fff; border-radius: 999px; font-size: 11px; min-width: 18px; height: 18px; display: grid; place-items: center; padding: 0 4px; font-family: var(--cuerpo); }
.acct-pop { position: absolute; right: 0; top: 48px; width: min(380px, calc(100vw - 24px)); background: #fff; border-radius: 18px; box-shadow: 0 20px 50px rgba(31, 42, 68, .22); z-index: 60; padding: 6px 0; animation: subir .15s ease-out; max-height: 80vh; overflow: auto; }
.acct-head { display: flex; gap: 12px; align-items: center; padding: 12px 16px; }
.acct-sec { border-top: 1px solid var(--linea); padding: 10px 16px; }
.acct-t { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--gris); margin-bottom: 6px; }
.acct-row { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 6px 0; }
.acct-btns { display: flex; gap: 6px; flex: 0 0 auto; }
.acct-btns .btn { min-height: 34px; padding: 6px 10px; font-size: 13px; }
.acct-actions { display: grid; gap: 2px; }
.acct-actions .btn { justify-content: flex-start; min-height: 40px; }
.dot-on { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--verde); margin-right: 6px; }
.who .name { font-weight: 700; line-height: 1.1; }
.who .role { font-size: 12px; color: var(--gris); }
main { overflow: auto; }
.page { padding: 22px; max-width: 1200px; margin: 0 auto; }
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { font-size: 26px; margin-right: auto; }
.card { background: #fff; border-radius: var(--radio); box-shadow: var(--sombra); padding: 18px; }

/* ---------- caja ---------- */
.pos { display: grid; grid-template-columns: minmax(0, 1fr) 380px; height: 100%; min-height: 0; }
.pos-left { padding: 18px; overflow: auto; min-height: 0; }
.pos-right { background: #fff; border-left: 1px solid var(--linea); display: flex; flex-direction: column; min-height: 0; }
.search { position: relative; }
.search .field { padding-left: 42px; font-size: 17px; min-height: 52px; border-radius: 14px; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--gris); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.chip { border: 2px solid var(--linea); background: #fff; border-radius: 999px; padding: 6px 14px; font-weight: 700; cursor: pointer; font-size: 13px; min-height: 36px; }
.chip.on { background: var(--texto); color: #fff; border-color: var(--texto); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 12px; }
.prod { text-align: left; border: 0; background: #fff; border-radius: var(--radio); padding: 14px; cursor: pointer; box-shadow: var(--sombra); display: flex; flex-direction: column; gap: 6px; min-height: 120px; position: relative; overflow: hidden; transition: transform .1s, box-shadow .15s; }
.prod::before { content: ''; position: absolute; left: 0; top: 0; right: 0; height: 5px; background: var(--c, var(--azul)); }
.prod:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(31, 42, 68, .1); }
.prod:active { transform: scale(.97); }
.prod .pname { font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.prod .pprice { font-family: var(--titulo); font-size: 20px; font-weight: 600; margin-top: auto; }
.prod .pmeta { font-size: 12px; color: var(--gris); }
.prod.agotado { opacity: .55; }
.prod .pimg { display: block; height: 96px; margin: -2px -4px 4px; border-radius: 10px; background: #fff; overflow: hidden; }
.prod .pimg img { width: 100%; height: 100%; object-fit: contain; display: block; }
.prow { display: flex; align-items: center; gap: 12px; }
.thumb { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; background: var(--fondo); flex: 0 0 auto; }
.thumb.none { display: grid; place-items: center; font-size: 20px; opacity: .5; }
.bot-img { float: right; width: 54px; height: 54px; object-fit: contain; border-radius: 8px; margin-left: 8px; background: #fff; }
.photo-row { display: flex; gap: 14px; align-items: center; margin-top: 12px; }
.photo { width: 96px; height: 96px; border-radius: 14px; border: 2px dashed var(--linea); display: grid; place-items: center; overflow: hidden; background: var(--fondo); flex: 0 0 auto; text-align: center; font-size: 12px; color: var(--gris); }
.photo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.photo-row label.btn { cursor: pointer; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tag { display: inline-block; font-size: 11px; font-weight: 800; border-radius: 6px; padding: 2px 6px; }
.tag.low { background: #fff3cd; color: #7a5b00; }
.tag.out { background: #fde4e8; color: #a8243a; }
.tag.var { background: #e7effb; color: #2c5a9c; }
.tag.may { background: #e5f6ec; color: #1b7a44; }
.tag.web { background: #e7effb; color: #2c5a9c; }
.tag.imp { background: #fdf0d0; color: #7a5b00; }

.cart-head { padding: 16px 18px 10px; display: flex; align-items: center; gap: 8px; }
.cart-head h2 { font-size: 20px; margin-right: auto; }
.cart { flex: 1; overflow: auto; padding: 0 12px; min-height: 0; }
.empty { text-align: center; color: var(--gris); padding: 40px 20px; }
.empty .ico { font-size: 40px; margin-bottom: 8px; }
.line { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 10px 6px; border-bottom: 1px dashed var(--linea); animation: entra .2s ease-out; }
@keyframes entra { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }
.line .lname { font-weight: 700; }
.line .ltotal { font-weight: 800; text-align: right; }
.line .lsub { font-size: 12px; color: var(--gris); }
.qty { display: flex; align-items: center; gap: 4px; }
.qty button { width: 32px; height: 32px; border-radius: 9px; border: 0; background: var(--fondo); font-weight: 800; cursor: pointer; font-size: 16px; }
.qty button:hover { background: var(--linea); }
.qty input { width: 54px; text-align: center; border: 2px solid var(--linea); border-radius: 9px; height: 32px; font-weight: 700; }
.line .del { background: none; border: 0; color: var(--gris); cursor: pointer; font-size: 13px; text-decoration: underline; padding: 4px; justify-self: end; }
.cart-foot { border-top: 1px solid var(--linea); padding: 14px 18px 18px; }
.total { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.total .t { font-family: var(--titulo); font-size: 40px; font-weight: 700; }
.pay { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pay .btn { flex-direction: column; gap: 2px; font-size: 15px; min-height: 54px; }
.pay .btn small { font-weight: 600; font-size: 11px; opacity: .85; }
.pay .efectivo { background: var(--verde); color: #fff; }
.pay .efectivo:hover { background: var(--verde-osc); }
.pay .tarjeta { background: #e7effb; color: #2c5a9c; }
.pay .transferencia { background: #fbe7ec; color: #8c2a40; }
.pay .fiado { background: #efe6f8; color: #5b3a85; }
.from-pending { background: #e7effb; color: #2c5a9c; border-radius: 10px; padding: 8px 12px; margin: 0 12px 8px; font-size: 13px; font-weight: 700; display: flex; gap: 8px; align-items: center; }
.from-pending button { margin-left: auto; background: none; border: 0; color: inherit; text-decoration: underline; cursor: pointer; font-weight: 700; }

/* ---------- modal ---------- */
.overlay { position: fixed; inset: 0; background: rgba(31, 42, 68, .45); display: grid; place-items: center; padding: 16px; z-index: 50; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: #fff; border-radius: 22px; padding: 24px; width: 100%; max-width: 440px; max-height: 92vh; overflow: auto; box-shadow: 0 30px 60px rgba(0, 0, 0, .2); animation: subir .2s ease-out; }
.modal.wide { max-width: 620px; }
.modal h2 { font-size: 22px; margin-bottom: 4px; }
.modal .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }
.bills { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
.bills .btn { min-height: 44px; font-size: 15px; }
.big-input { font-size: 30px; font-family: var(--titulo); font-weight: 600; text-align: right; min-height: 64px; }
.change { margin-top: 16px; border-radius: 16px; padding: 16px; text-align: center; background: var(--fondo); }
.change .c { font-family: var(--titulo); font-size: 44px; font-weight: 700; }
.change.ok { background: #e5f6ec; color: #155f36; }
.change.bad { background: #fde4e8; color: #a8243a; }
.success { text-align: center; }
.succ-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
.succ-actions #nv { grid-column: 1 / -1; }
.print-btn { background: #e7effb; color: #2c5a9c; min-height: 52px; font-size: 16px; }
.print-btn:hover { background: #d3e2f7; }
.wa-btn { background: #e5f6ec; color: #1b7a44; min-height: 52px; font-size: 16px; }
.wa-btn:hover { background: #cdeedb; }
.success .check-ico { width: 72px; height: 72px; border-radius: 50%; background: var(--verde); color: #fff; display: grid; place-items: center; margin: 4px auto 12px; font-size: 38px; animation: pop .35s cubic-bezier(.2, 1.6, .5, 1); }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }

/* ---------- tablas y reportes ---------- */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--gris); padding: 10px 12px; border-bottom: 2px solid var(--linea); }
td { padding: 12px; border-bottom: 1px solid var(--linea); vertical-align: middle; }
tr.canceled td { color: var(--gris); text-decoration: line-through; }
td.r, th.r { text-align: right; }
.table-wrap { overflow: auto; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: #fff; border-radius: var(--radio); padding: 16px 18px; box-shadow: var(--sombra); border-top: 5px solid var(--c, var(--azul)); }
.stat .k { font-size: 13px; color: var(--gris); font-weight: 700; }
.stat .v { font-family: var(--titulo); font-size: 30px; font-weight: 700; margin-top: 4px; }
.stat .s { font-size: 12px; color: var(--gris); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.two .card h3 { font-size: 18px; margin-bottom: 10px; }
.bar { height: 8px; border-radius: 4px; background: var(--fondo); overflow: hidden; margin-top: 6px; }
.bar i { display: block; height: 100%; background: var(--menta); }
.pend { display: grid; gap: 12px; }
.pend .card { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }

#toast { position: fixed; bottom: 22px; left: 50%; transform: translate(-50%, 30px); background: var(--texto); color: #fff; padding: 12px 20px; border-radius: 12px; font-weight: 700; opacity: 0; pointer-events: none; transition: .25s; z-index: 80; max-width: 90vw; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.bad { background: var(--rojo); }
#print-area { display: none; }

/* ---------- seguridad ---------- */
.wait { text-align: center; }
.wait-ico { font-size: 54px; margin: 6px 0 4px; animation: pop .4s ease-out; }
.wait h1 { margin-bottom: 8px; }
.dots { display: flex; gap: 6px; justify-content: center; margin: 14px 0 6px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--verde); animation: blink 1.2s infinite ease-in-out; }
.dots i:nth-child(2) { animation-delay: .2s; } .dots i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; transform: scale(.8); } 40% { opacity: 1; transform: none; } }
.rec { margin-top: 14px; text-align: left; }
.rec summary { cursor: pointer; font-weight: 700; color: var(--gris); font-size: 14px; }
.rec form { margin-top: 10px; }
.codes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.codes code { font-size: 18px; font-weight: 700; background: var(--fondo); border-radius: 10px; padding: 10px; text-align: center; letter-spacing: 1px; }
#approve-root { position: fixed; top: 76px; right: 16px; z-index: 95; display: grid; gap: 10px; width: min(440px, calc(100vw - 32px)); }
.appr { background: #fff; border-radius: 18px; box-shadow: 0 20px 50px rgba(31, 42, 68, .28); padding: 16px; display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; border: 3px solid var(--amarillo); animation: subir .25s ease-out; }
.appr-ico { font-size: 30px; grid-row: span 2; }
.appr-btns { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.sec-block { border-top: 1px solid var(--linea); margin-top: 14px; padding-top: 14px; }
.devtbl td { padding: 8px 4px; font-size: 13px; }
.nowrap { white-space: nowrap; }

/* ---------- estado de internet ---------- */
.net { font-size: 12px; font-weight: 800; padding: 6px 12px; border-radius: 999px; white-space: nowrap; }
.net.off { background: #fde4e8; color: #a8243a; }
.net.sync { background: #fff3cd; color: #7a5b00; }

/* ---------- selector de cliente, recargas ---------- */
.pick-list { max-height: 320px; overflow: auto; margin-top: 10px; display: grid; gap: 6px; }
.pick { display: flex; gap: 8px; align-items: baseline; text-align: left; border: 2px solid var(--linea); background: #fff; border-radius: 12px; padding: 10px 12px; cursor: pointer; }
.pick:hover, .pick:focus-visible { border-color: var(--azul); outline: none; }
.pick .num { margin-left: auto; font-size: 13px; font-weight: 700; }
.owes { color: #a8243a; }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--fondo); border-radius: 12px; padding: 4px; margin-top: 12px; }
.seg button { border: 0; background: transparent; border-radius: 9px; padding: 10px; font-weight: 700; cursor: pointer; min-height: 42px; }
.seg button.on { background: #fff; box-shadow: var(--sombra); }

/* ---------- reportes ---------- */
.chart { width: 100%; height: auto; display: block; }
.chart .cv { font-size: 11px; font-weight: 700; fill: var(--texto); font-family: var(--cuerpo); }
.chart .cl { font-size: 11px; fill: var(--gris); font-family: var(--cuerpo); }
h3.ch { font-size: 18px; margin-bottom: 10px; }
.stack { display: flex; height: 18px; border-radius: 9px; overflow: hidden; background: var(--fondo); }
.stack i { display: block; height: 100%; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }

/* ---------- etiquetas ---------- */
.bc-mini { height: 34px; width: auto; max-width: 160px; }
.labels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3mm; padding: 8mm; }
.label { border: 1px dashed #bbb; border-radius: 2mm; padding: 2.5mm; text-align: center; break-inside: avoid; font-family: Arial, sans-serif; color: #000; }
.label .ln { font-size: 10pt; font-weight: 700; line-height: 1.15; height: 2.3em; overflow: hidden; }
.label .lp { font-size: 15pt; font-weight: 800; margin: 1mm 0; }
.label svg { width: 100%; height: 15mm; }

/* ---------- Chiki, asistente de precios ---------- */
.bot-btn { background: #fdf0d0; color: #6b4e00; }
.bot-btn:hover { background: #fbe4a6; }
.bot { position: fixed; top: 76px; right: 16px; bottom: 16px; width: 380px; max-width: calc(100vw - 32px); background: #fff; border-radius: 22px; box-shadow: 0 24px 60px rgba(31, 42, 68, .22); display: flex; flex-direction: column; z-index: 40; overflow: hidden; animation: subir .2s ease-out; }
.bot-head { display: flex; align-items: center; gap: 10px; padding: 14px 14px 12px 16px; border-bottom: 1px solid var(--linea); background: linear-gradient(135deg, rgba(246, 207, 75, .25), rgba(244, 160, 178, .2)); }
.bot-head .btn { margin-left: auto; min-height: 36px; padding: 6px 10px; }
.bot-ava { width: 48px; height: 48px; border-radius: 50%; background: #fff; display: grid; place-items: center; overflow: hidden; box-shadow: 0 2px 8px rgba(31, 42, 68, .12); }
.bot-ava img { width: 46px; height: 46px; margin-top: 6px; }
.bot-face { width: 26px; height: 26px; margin: -4px 0; }
.bot-row { display: flex; gap: 8px; align-items: flex-end; align-self: flex-start; max-width: 96%; animation: entra .2s ease-out; }
.bot-row .bot-msg { max-width: 100%; }
.bot-mini { width: 30px; height: 33px; flex: 0 0 auto; }
.bot-msgs { flex: 1; overflow: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.bot-msg { max-width: 92%; padding: 10px 13px; border-radius: 16px; line-height: 1.45; animation: entra .2s ease-out; }
.bot-msg.chiki { background: var(--fondo); border-bottom-left-radius: 4px; align-self: flex-start; }
.bot-msg.me { background: var(--verde); color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; font-weight: 600; }
.bot-card { background: #fff; border: 1px solid var(--linea); border-radius: 12px; padding: 10px 12px; margin-top: 8px; }
.bot-card .tag { margin-left: 4px; }
.bot-add { margin-top: 8px; min-height: 34px; padding: 6px 12px; font-size: 13px; background: #e5f6ec; color: var(--verde-osc); }
.bot-add:hover { background: #cdeedb; }
.bot-sug { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 14px 10px; }
.bot-sug .chip { font-size: 12px; min-height: 30px; padding: 4px 10px; }
.bot-form { display: flex; gap: 8px; padding: 12px 14px 14px; border-top: 1px solid var(--linea); }
.bot-form .btn { flex: 0 0 auto; }

/* ---------- celular y tablet ---------- */
@media (max-width: 1500px) {
  .who .name, .who .role { display: none; }
}
@media (max-width: 900px) {
  .pos { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
  .pos-right { border-left: 0; border-top: 1px solid var(--linea); max-height: 55vh; }
  .two { grid-template-columns: 1fr; }
  .top { flex-wrap: wrap; }
  .who .name, .who .role { display: none; }
  .net { order: 2; }
  .bot { top: 12px; right: 8px; left: 8px; bottom: 8px; width: auto; max-width: none; }
}
@media (max-width: 900px) {
  .pos-right { max-height: 46vh; }
  .cart .empty { padding: 14px; }
  .cart .empty .ico { display: none; }
  .cart-foot { padding: 10px 14px 12px; }
}
@media (max-width: 560px) {
  .pos-left > .row { flex-wrap: wrap; }
  .pos-left > .row .search { flex: 1 1 100% !important; }
  .pos-left > .row .btn { flex: 1 1 0 !important; }
  .top { padding: 8px 12px; gap: 8px; }
  .top img { height: 24px; }
  .nav { order: 3; width: 100%; margin: 0; flex-wrap: nowrap; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pos-left { padding: 12px; }
  #free { padding: 10px; font-size: 13px; }
  .pay .btn { min-height: 54px; }
  .total .t { font-size: 32px; }
  .page { padding: 14px; }
  .bills { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; transition: none !important; } }

/* ---------- ticket impreso (sirve para térmica de 58/80 mm y para hoja carta) ---------- */
@media print {
  body { background: #fff; }
  #app, #modal-root, #toast { display: none !important; }
  #print-area { display: block; }
}
.ticket { text-align: left; width: 72mm; max-width: 100%; margin: 0 auto; font-family: 'Courier New', monospace; font-size: 12px; color: #000; }
.ticket img { width: 100%; max-width: 60mm; display: block; margin: 0 auto 4px; filter: grayscale(1) contrast(1.4); }
.ticket .c { text-align: center; }
.ticket hr { border: 0; border-top: 1px dashed #000; margin: 6px 0; }
.ticket table td { padding: 2px 0; border: 0; font-size: 12px; }
.ticket .tot { font-size: 16px; font-weight: 700; }
.ticket.w58 { width: 48mm; font-size: 11px; }
.ticket.w58 table td { font-size: 11px; }
.ticket.w58 .tot { font-size: 14px; }
.ticket.w58 img { max-width: 44mm; }
.ticket.w80 { width: 72mm; }
.modal .ticket { border: 1px dashed var(--linea); padding: 12px; border-radius: 8px; margin-top: 12px; }
.empty a { color: var(--verde-osc); font-weight: 700; }
@media (max-width: 560px) { .menu-pop { right: 12px; } }

.linkbtn { background: none; border: 0; color: var(--gris); font-weight: 700; text-decoration: underline; cursor: pointer; margin-top: 14px; display: block; width: 100%; font-size: 14px; }
.linkbtn:hover { color: var(--texto); }

body.acct-open #approve-root { display: none; }
