/* PayBox POS — kiosko. Mismo código para horizontal y vertical (media query de orientación).
   4 temas de resalto (manual del cliente): verde PayBox, naranja, morado y azul celeste neón. */
:root {
  --acento: #F26B1D; --acento-osc: #D2560D; --acento-suave: #FFF1E8;
  --fondo: #F6F7F9; --tarjeta: #FFFFFF; --texto: #1C2230; --texto-2: #5B6475; --linea: #E4E7EC;
  --ok: #16A34A; --alerta: #DC2626;
  --radio: 16px; --sombra: 0 2px 10px rgba(20, 30, 50, .07);
  --u: clamp(10px, 1.15vmin, 16px);            /* unidad base: escala con la pantalla */
  --alto-barra: calc(var(--u) * 6.4);
  --marca-alto: calc(var(--u) * 5.2);
  font-family: "Poppins", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
html[data-tema="verde"]   { --acento: #1FA84A; --acento-osc: #168038; --acento-suave: #E7F7EC; }
html[data-tema="naranja"] { --acento: #F26B1D; --acento-osc: #D2560D; --acento-suave: #FFF1E8; }
html[data-tema="morado"]  { --acento: #7C3AED; --acento-osc: #5F22CC; --acento-suave: #F1EAFE; }
html[data-tema="celeste"] { --acento: #00B4EC; --acento-osc: #0090C2; --acento-suave: #E2F7FE; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--fondo); color: var(--texto); }
body { font-size: calc(var(--u) * 1.5); user-select: none; -webkit-user-select: none; touch-action: manipulation; overscroll-behavior: none; }
img { -webkit-user-drag: none; user-drag: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; touch-action: manipulation; }
button:disabled { opacity: .45; cursor: default; }
input, textarea, select { font: inherit; color: inherit; user-select: text; -webkit-user-select: text; }
[hidden] { display: none !important; }
.flex1 { flex: 1; }
.ico { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ico.grande { width: 3.5em; height: 3.5em; stroke-width: 1.4; }

/* ── Marca fija (logo cliente | powered by PayBox) ── */
#marca { position: fixed; z-index: 50; top: calc(var(--u) * 1.2); left: calc(var(--u) * 1.4); height: var(--marca-alto);
  display: flex; align-items: center; gap: calc(var(--u) * .8); padding: calc(var(--u) * .5) calc(var(--u) * .9);
  background: rgba(255,255,255,.92); border-radius: 12px; box-shadow: var(--sombra); }
#logo-cliente { height: 100%; max-width: calc(var(--u) * 12); object-fit: contain; }
.marca-sep { width: 3px; align-self: stretch; background: #1F8FFF; border-radius: 2px; }
.marca-pb { display: flex; flex-direction: column; justify-content: center; gap: 2px; height: 100%; }
.marca-pb img:first-child { height: 24%; width: auto; align-self: flex-start; }
.marca-pb img:last-child { height: 62%; width: auto; }
.espacio-marca { width: calc(var(--u) * 22); height: var(--marca-alto); flex: none; }

/* ── Vistas ── */
.vista { position: fixed; inset: 0; display: none; }
.vista.activa { display: grid; animation: aparecer .25s ease; }
@keyframes aparecer { from { opacity: 0 } to { opacity: 1 } }
.cab { grid-area: cab; display: flex; align-items: center; gap: calc(var(--u) * 1.2); padding: calc(var(--u) * 1.2) calc(var(--u) * 1.4) calc(var(--u) * .6); min-width: 0; }

/* Botones comunes */
.btn-ayuda, .btn-plano { display: inline-flex; align-items: center; gap: .5em; padding: .7em 1em; border-radius: 12px; font-weight: 600; font-size: .95em; }
.btn-ayuda { background: var(--tarjeta); box-shadow: var(--sombra); }
.btn-plano:active, .btn-ayuda:active { background: var(--acento-suave); }
.btn-inicio { display: inline-flex; align-items: center; gap: .55em; padding: .75em 1.4em; border-radius: 12px; background: var(--acento); color: #fff; font-weight: 700; }
.btn-pagar { display: inline-flex; align-items: center; justify-content: center; gap: .6em; padding: .85em 1.6em; border-radius: 14px;
  background: var(--acento); color: #fff; font-weight: 700; font-size: 1.1em; box-shadow: 0 6px 16px color-mix(in srgb, var(--acento) 35%, transparent); }
.btn-pagar:active:not(:disabled) { background: var(--acento-osc); transform: translateY(1px); }
.btn-pagar.demo { background: #334155; box-shadow: none; }
.btn-volver { display: inline-flex; align-items: center; gap: .55em; padding: .75em 1.4em; border-radius: 12px; border: 2px solid var(--acento); color: var(--acento-osc); font-weight: 700; background: #fff; }
.btn-ico { display: inline-grid; place-items: center; width: 2.2em; height: 2.2em; border-radius: 50%; }
.btn-ico.chico { width: 1.8em; height: 1.8em; }

/* ── Reposo / carrusel ── */
#v-reposo { background: #fff; cursor: pointer; }
#carrusel { position: absolute; inset: 0; overflow: hidden; }
.diapo { position: absolute; inset: 0; opacity: 0; transition: opacity .8s ease; display: grid; place-items: center; }
.diapo.visible { opacity: 1; }
.diapo img.medio, .diapo video.medio { width: 100%; height: 100%; object-fit: cover; }
/* Promocional cuya orientación no coincide con la pantalla: completo sobre fondo difuminado (no se recorta). */
.diapo.ajustada img.medio { object-fit: contain; position: relative; z-index: 1; }
.diapo img.fondo { position: absolute; inset: -6%; width: 112%; height: 112%; object-fit: cover; filter: blur(28px) brightness(.8); z-index: 0; }
.bienvenida { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: calc(var(--u) * 2.4);
  padding: calc(var(--u) * 9) calc(var(--u) * 4) calc(var(--u) * 5);
  background: radial-gradient(circle at 50% 30%, var(--acento-suave), #fff 65%); text-align: center; }
.bienvenida .logo-grande { height: calc(var(--u) * 20); max-width: 70vw; object-fit: contain; }
.bienvenida h1 { margin: 0; font-size: calc(var(--u) * 5.2); line-height: 1.05; }
.toca { display: inline-flex; align-items: center; gap: .6em; padding: .9em 1.8em; border-radius: 999px; background: var(--acento); color: #fff; font-weight: 700;
  font-size: calc(var(--u) * 2.2); animation: latido 1.8s ease-in-out infinite; }
@keyframes latido { 0%, 100% { transform: scale(1) } 50% { transform: scale(1.06) } }
.top5 { width: min(100%, calc(var(--u) * 90)); }
.top5 h3 { margin: 0 0 calc(var(--u) * 1); color: var(--texto-2); font-size: calc(var(--u) * 1.7); text-transform: uppercase; letter-spacing: .08em; }
.top5 .lista { display: grid; grid-template-columns: repeat(5, 1fr); gap: calc(var(--u) * 1.2); }
.top5 .item { background: #fff; border-radius: var(--radio); box-shadow: var(--sombra); padding: calc(var(--u) * 1); display: flex; flex-direction: column; align-items: center; gap: .3em; }
.top5 .item .foto { width: 100%; aspect-ratio: 1; }
.top5 .item span { font-size: .85em; font-weight: 600; line-height: 1.15; min-height: 2.3em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.top5 .item b { color: var(--acento-osc); }
#puntos { position: absolute; bottom: calc(var(--u) * 1.6); left: 0; right: 0; display: flex; justify-content: center; gap: 8px; }
#puntos i { width: 10px; height: 10px; border-radius: 50%; background: rgba(0,0,0,.2); }
#puntos i.on { background: var(--acento); width: 26px; border-radius: 5px; }

/* ── Venta ── */
#v-venta { grid-template-columns: minmax(0, 1fr) minmax(calc(var(--u) * 26), 29%);
  grid-template-rows: auto auto minmax(0, 1fr) var(--alto-barra);
  grid-template-areas: "cab carrito" "cats carrito" "prod carrito" "barra pagar"; }
.buscador { flex: 1; min-width: 0; display: flex; align-items: center; gap: .6em; background: var(--tarjeta); border: 2px solid var(--linea); border-radius: 999px; padding: .55em 1em; box-shadow: var(--sombra); }
.buscador:focus-within { border-color: var(--acento); }
.buscador input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 1em; }
.buscador input::-webkit-search-cancel-button { display: none; }
.buscador .ico { color: var(--texto-2); }
.chips { grid-area: cats; display: flex; gap: calc(var(--u) * .9); overflow-x: auto; padding: calc(var(--u) * .4) calc(var(--u) * 1.4) calc(var(--u) * .8); scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; flex-direction: column; align-items: center; gap: .25em; min-width: calc(var(--u) * 8.5); padding: .55em .9em; border-radius: 14px;
  background: var(--tarjeta); box-shadow: var(--sombra); font-size: .82em; font-weight: 600; color: var(--texto-2); }
.chip .ico { width: 1.9em; height: 1.9em; }
.chip.activa { background: var(--acento); color: #fff; }
.rejilla { grid-area: prod; overflow-y: auto; padding: calc(var(--u) * .4) calc(var(--u) * 1.4) calc(var(--u) * 1.4);
  display: grid; grid-template-columns: repeat(auto-fill, minmax(calc(var(--u) * 14.5), 1fr)); gap: calc(var(--u) * 1.2); align-content: start; }
.prod { position: relative; background: var(--tarjeta); border-radius: var(--radio); box-shadow: var(--sombra); padding: calc(var(--u) * 1); text-align: left;
  display: flex; flex-direction: column; gap: .35em; transition: transform .12s; }
.prod:active { transform: scale(.97); }
.foto { position: relative; width: 100%; aspect-ratio: 1.15; border-radius: 12px; overflow: hidden; display: grid; place-items: center; background: var(--acento-suave); }
.foto img { width: 100%; height: 100%; object-fit: contain; }
.foto .ph { width: 46%; height: 46%; color: var(--acento); stroke-width: 1.4; }
.prod .nombre { font-weight: 600; font-size: .92em; line-height: 1.2; min-height: 2.4em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.prod .precio { font-weight: 800; font-size: 1.1em; }
.prod .mas { position: absolute; right: calc(var(--u) * .9); bottom: calc(var(--u) * .9); width: calc(var(--u) * 3.4); height: calc(var(--u) * 3.4); border-radius: 50%;
  background: var(--acento); color: #fff; display: grid; place-items: center; box-shadow: 0 3px 8px color-mix(in srgb, var(--acento) 40%, transparent); }
.prod .cant-en-carrito { position: absolute; top: calc(var(--u) * .6); right: calc(var(--u) * .6); min-width: 1.9em; height: 1.9em; padding: 0 .4em; border-radius: 999px;
  background: var(--acento); color: #fff; font-weight: 800; font-size: .8em; display: grid; place-items: center; }
.sin-resultados { grid-column: 1 / -1; text-align: center; color: var(--texto-2); padding: 3em 1em; }

.panel-carrito { grid-area: carrito; display: flex; flex-direction: column; min-height: 0; margin: calc(var(--u) * 1.2) calc(var(--u) * 1.4) calc(var(--u) * .6) 0;
  background: var(--tarjeta); border-radius: 20px; box-shadow: var(--sombra); padding: calc(var(--u) * 1.6); }
.carrito-tit { display: flex; align-items: center; justify-content: space-between; }
.carrito-tit h2 { margin: 0; font-size: 1.3em; }
.icono-carrito { position: relative; } .icono-carrito .ico { width: 1.8em; height: 1.8em; }
.icono-carrito b { position: absolute; top: -.6em; right: -.7em; min-width: 1.6em; height: 1.6em; padding: 0 .3em; border-radius: 999px; background: var(--acento); color: #fff; font-size: .7em; display: grid; place-items: center; }
#lineas { list-style: none; margin: calc(var(--u) * 1) 0; padding: 0; flex: 1; overflow-y: auto; }
.linea { display: grid; grid-template-columns: calc(var(--u) * 5.2) 1fr auto; grid-template-rows: auto auto; gap: .2em .8em; padding: .7em 0; border-bottom: 1px solid var(--linea); align-items: center; }
.linea.nueva { animation: resaltar .9s ease; }
@keyframes resaltar { from { background: var(--acento-suave) } to { background: transparent } }
.linea .foto { grid-row: 1 / 3; aspect-ratio: 1; border-radius: 10px; }
.linea .ln-nombre { font-weight: 600; font-size: .88em; line-height: 1.2; }
.linea .ln-borrar { color: var(--texto-2); justify-self: end; }
.linea .ln-cant { display: flex; align-items: center; gap: .4em; }
.linea .ln-cant button { width: calc(var(--u) * 3.2); height: calc(var(--u) * 3.2); border-radius: 50%; border: 2px solid var(--linea); display: grid; place-items: center; }
.linea .ln-cant b { min-width: 1.6em; text-align: center; }
.linea .ln-total { font-weight: 800; justify-self: end; }
.vacio { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: var(--texto-2); gap: .6em; padding: 1em; }
.vacio .ico { color: var(--acento); }
.carrito-total { display: flex; justify-content: space-between; align-items: baseline; border-top: 2px solid var(--linea); padding-top: calc(var(--u) * 1); font-weight: 700; }
.carrito-total b { font-size: 1.9em; color: var(--acento); }

.barra { grid-area: barra; display: flex; align-items: center; gap: calc(var(--u) * 1); padding: 0 calc(var(--u) * 1.4) calc(var(--u) * 1); }
.pagar-celda { grid-area: pagar; display: flex; align-items: stretch; padding: 0 calc(var(--u) * 1.4) calc(var(--u) * 1) 0; }
.pagar-celda .btn-pagar { flex: 1; justify-content: space-between; }
.barra.centrada { justify-content: center; }

/* ── Cobro ── */
#v-cobro { background: var(--fondo); grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); grid-template-rows: auto minmax(0, 1fr) auto var(--alto-barra);
  grid-template-areas: "cab olv" "tot olv" "pago pago" "barra barra"; column-gap: calc(var(--u) * 1.4); }
.olvidaste { grid-area: olv; display: flex; flex-direction: column; min-height: 0; margin: calc(var(--u) * 1.2) calc(var(--u) * 1.4) 0 0; gap: calc(var(--u) * 1); }
.banner { position: relative; overflow: hidden; border-radius: 20px; padding: calc(var(--u) * 2) calc(var(--u) * 2.4); color: #fff;
  background: linear-gradient(120deg, var(--acento), var(--acento-osc)); display: flex; align-items: center; justify-content: space-between; }
.banner h2 { margin: 0; font-size: calc(var(--u) * 3.6); line-height: 1; font-weight: 900; letter-spacing: -.01em; }
.banner p { margin: .4em 0 0; opacity: .92; }
.banner-ico { width: calc(var(--u) * 8); height: calc(var(--u) * 8); opacity: .3; stroke-width: 1.3; }
.olvidaste .rejilla { padding: 0; grid-template-columns: repeat(auto-fill, minmax(calc(var(--u) * 13), 1fr)); overflow-y: auto; }
.rejilla.fila .prod .foto { aspect-ratio: 1.3; }
.totales { grid-area: tot; align-self: start; margin-left: calc(var(--u) * 1.4); background: var(--tarjeta); border-radius: 20px; box-shadow: var(--sombra); padding: calc(var(--u) * 1.8); }
.tot-principal { display: flex; justify-content: space-between; align-items: center; font-weight: 800; font-size: 1.3em; padding-bottom: .5em; border-bottom: 2px solid var(--linea); margin-bottom: .4em; }
.monto { font-size: 1.9em; color: #fff; background: var(--acento); padding: .1em .45em; border-radius: 12px; }
.tot-fila { display: flex; justify-content: space-between; align-items: center; padding: .45em 0; font-weight: 600; }
.tot-fila > span { display: inline-flex; align-items: center; gap: .6em; }
.punto { width: .8em; height: .8em; border-radius: 3px; display: inline-block; }
.p-pagado { background: var(--ok); } .p-porpagar { background: var(--acento); } .p-cambio { background: #64748B; }
.acento { color: var(--acento-osc); }
.formas { grid-area: pago; padding: calc(var(--u) * 1.4) calc(var(--u) * 1.4) calc(var(--u) * .8); }
.formas h3 { margin: 0 0 .7em; text-align: center; font-size: 1.4em; }
.formas h3 em { font-style: normal; color: var(--acento); }
.formas-rejilla { display: grid; grid-template-columns: repeat(4, 1fr); gap: calc(var(--u) * 1.2); }
.formas-rejilla button { display: flex; flex-direction: column; align-items: center; gap: .3em; padding: calc(var(--u) * 1.4) .6em; border-radius: 16px; background: var(--tarjeta); box-shadow: var(--sombra); border: 2px solid transparent; }
.formas-rejilla button .ico { width: 2.6em; height: 2.6em; color: var(--acento); stroke-width: 1.6; }
.formas-rejilla button b { font-size: 1.05em; }
.formas-rejilla button small { color: var(--texto-2); font-size: .72em; text-align: center; }
.formas-rejilla button:active { border-color: var(--acento); background: var(--acento-suave); }
.formas-rejilla button.no-disponible { opacity: .4; }

/* ── Instrucciones de pago ── */
#v-pago > * { grid-area: auto; }               /* una sola columna: sin áreas con nombre */
#v-pago > .cab, #v-pago > .barra { justify-self: stretch; }
#v-pago { grid-template-columns: 1fr; grid-template-rows: auto auto minmax(0, 1fr) auto auto var(--alto-barra); justify-items: center; background: #fff; }
.titulo-vista { margin: 0; font-size: calc(var(--u) * 3); text-align: center; padding: 0 1em; }
.animaciones { display: flex; gap: calc(var(--u) * 3); align-items: center; justify-content: center; flex-wrap: wrap; padding: calc(var(--u) * 2); min-height: 0; }
.anim { width: calc(var(--u) * 28); max-width: 42vw; display: flex; flex-direction: column; align-items: center; gap: calc(var(--u) * 1.4); text-align: center; font-weight: 700; font-size: 1.15em; }
.anim .escena { position: relative; width: 100%; aspect-ratio: 1.1; background: var(--acento-suave); border-radius: 24px; overflow: hidden; }
.totales.compacto { margin: 0; width: min(92%, calc(var(--u) * 50)); align-self: auto; }
.aviso { color: var(--texto-2); text-align: center; margin: .6em 1em; min-height: 1.3em; }
/* escenas animadas en CSS puro */
.ranura { position: absolute; left: 20%; right: 20%; top: 56%; height: 9%; background: #334155; border-radius: 8px; }
.billete { position: absolute; left: 28%; width: 44%; height: 26%; top: 12%; border-radius: 6px; background: linear-gradient(135deg, #7ccf8c, #3f9f5a);
  border: 3px solid #2f7e46; animation: meterBillete 2.4s ease-in-out infinite; }
.billete::after { content: "$"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-weight: 900; font-size: 1.6em; }
@keyframes meterBillete { 0% { transform: translateY(0); opacity: 0 } 15% { opacity: 1 } 60% { transform: translateY(95%); opacity: 1 } 75%, 100% { transform: translateY(125%); opacity: 0 } }
.bandeja { position: absolute; left: 22%; right: 22%; top: 62%; height: 20%; border: 4px solid #334155; border-top: 0; border-radius: 0 0 20px 20px; }
.moneda { position: absolute; width: 13%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fde68a, #d4a017); border: 3px solid #b8860b; top: 8%;
  animation: caerMoneda 2.2s ease-in infinite; }
.moneda:nth-child(2) { left: 30%; animation-delay: 0s } .moneda:nth-child(3) { left: 44%; animation-delay: .15s } .moneda:nth-child(4) { left: 57%; animation-delay: .3s } .moneda:nth-child(5) { left: 38%; animation-delay: .45s }
@keyframes caerMoneda { 0% { transform: translateY(0); opacity: 0 } 15% { opacity: 1 } 70% { transform: translateY(330%); opacity: 1 } 100% { transform: translateY(330%); opacity: 0 } }
.terminal { position: absolute; left: 30%; width: 40%; top: 28%; height: 62%; background: #334155; border-radius: 14px; }
.terminal::before { content: ""; position: absolute; left: 12%; right: 12%; top: 10%; height: 30%; background: #94d2bd; border-radius: 6px; }
.tarjeta-anim { position: absolute; left: 32%; width: 36%; height: 22%; top: 2%; border-radius: 8px; background: linear-gradient(135deg, var(--acento), var(--acento-osc)); animation: acercar 2.4s ease-in-out infinite; }
@keyframes acercar { 0%, 100% { transform: translateY(0) rotate(-8deg) } 50% { transform: translateY(80%) rotate(0) } }
.lector { position: absolute; left: 25%; right: 25%; bottom: 10%; height: 16%; background: #334155; border-radius: 10px; }
.lector::after { content: ""; position: absolute; left: 10%; right: 10%; top: -30%; height: 4px; background: #ef4444; box-shadow: 0 0 12px #ef4444; animation: barrido 1.2s ease-in-out infinite alternate; }
@keyframes barrido { from { transform: translateY(0) } to { transform: translateY(-160%) } }
.telefono { position: absolute; left: 36%; width: 28%; top: 6%; height: 56%; border-radius: 14px; background: #1e293b; border: 4px solid #0f172a; animation: flotar 2.4s ease-in-out infinite; }
.telefono::before { content: ""; position: absolute; inset: 18% 14%; background: repeating-conic-gradient(#fff 0 25%, #0f172a 0 50%) 0 0 / 30% 30%; border-radius: 3px; }
@keyframes flotar { 0%, 100% { transform: translateY(0) } 50% { transform: translateY(12%) } }

/* ── Gracias ── */
#v-gracias { place-items: center; background: radial-gradient(circle at 30% 40%, var(--acento-suave), #fff 60%); }
.gracias { display: flex; align-items: center; justify-content: center; gap: calc(var(--u) * 5); padding: calc(var(--u) * 8) calc(var(--u) * 3) calc(var(--u) * 3); flex-wrap: wrap; }
.gracias-texto { display: flex; flex-direction: column; gap: calc(var(--u) * 1); min-width: min(90vw, calc(var(--u) * 40)); }
.gracias h1 { margin: 0; font-size: calc(var(--u) * 5); line-height: 1.05; }
.gracias .ok { display: flex; align-items: center; gap: .5em; margin: 0; color: var(--ok); font-weight: 700; font-size: 1.2em; }
.gracias .ok .ico { width: 1.6em; height: 1.6em; }
.gracias .tot-fila { font-size: 1.2em; border-bottom: 1px solid var(--linea); }
.entrega { margin: .6em 0 0; padding: 1em 1.2em; border-radius: 14px; background: var(--acento); color: #fff; font-weight: 700; font-size: 1.25em; }
.pronto { margin: 0; color: var(--texto-2); font-weight: 600; font-size: 1.2em; }
.gracias .btn-pagar { align-self: flex-start; margin-top: .6em; }
.ticket-anim { position: relative; width: calc(var(--u) * 22); height: calc(var(--u) * 30); }
.impresora { position: absolute; top: 0; left: 0; right: 0; height: 32%; background: #334155; border-radius: 16px; z-index: 2; }
.impresora::after { content: ""; position: absolute; left: 14%; right: 14%; bottom: 14%; height: 8%; background: #0f172a; border-radius: 4px; }
.papel { position: absolute; left: 20%; right: 20%; top: 22%; height: 70%; background: #fff; box-shadow: var(--sombra); border-radius: 0 0 6px 6px; padding: 18% 10% 0;
  display: flex; flex-direction: column; gap: 9%; transform-origin: top; animation: imprimir 2.2s ease-out both;
  -webkit-mask: linear-gradient(#000 92%, transparent); mask: linear-gradient(#000 92%, transparent); }
.papel i { height: 5%; background: var(--linea); border-radius: 3px; } .papel i:nth-child(2) { width: 70% } .papel i:nth-child(4) { width: 50%; background: var(--acento) }
@keyframes imprimir { from { transform: scaleY(0) } to { transform: scaleY(1) } }

/* ── Administración ── */
#v-admin { background: var(--fondo); grid-template-columns: minmax(calc(var(--u) * 24), 26%) 1fr; grid-template-rows: auto minmax(0, 1fr); grid-template-areas: "cab cab" "menu panel"; }
.admin-cab h2 { margin: 0; }
.etiqueta { padding: .4em .9em; border-radius: 999px; background: var(--acento-suave); color: var(--acento-osc); font-weight: 700; font-size: .85em; }
.admin-menu { grid-area: menu; overflow-y: auto; padding: calc(var(--u) * 1) calc(var(--u) * 1.4); display: flex; flex-direction: column; gap: 6px; }
.admin-menu button { text-align: left; padding: .8em 1em; border-radius: 12px; background: var(--tarjeta); font-weight: 600; display: flex; flex-direction: column; gap: .15em; }
.admin-menu button small { font-weight: 400; color: var(--texto-2); font-size: .75em; }
.admin-menu button.activa { background: var(--acento); color: #fff; } .admin-menu button.activa small { color: #fff; opacity: .9; }
.admin-menu button.pendiente { opacity: .55; }
.admin-panel { grid-area: panel; overflow-y: auto; padding: calc(var(--u) * 1) calc(var(--u) * 2) calc(var(--u) * 3) calc(var(--u) * .6); }
.admin-panel h3 { margin: .2em 0 .8em; font-size: 1.4em; }
.campo { background: var(--tarjeta); border-radius: 14px; padding: 1em 1.2em; margin-bottom: 10px; box-shadow: var(--sombra); display: flex; flex-direction: column; gap: .5em; }
.campo > label, .campo > .lbl { font-weight: 700; }
.campo small { color: var(--texto-2); }
.campo input[type=text], .campo textarea, .campo select, .modal input { width: 100%; padding: .7em .9em; border-radius: 10px; border: 2px solid var(--linea); background: #fff; }
.campo textarea { min-height: 5em; resize: vertical; }
.paso { display: flex; align-items: center; gap: .8em; } .paso b { min-width: 4.5em; text-align: center; font-size: 1.2em; }
.paso button { width: 2.6em; height: 2.6em; border-radius: 50%; border: 2px solid var(--linea); background: #fff; font-size: 1.1em; font-weight: 700; }
.opciones { display: flex; flex-wrap: wrap; gap: 8px; }
.opciones button, .opciones label { padding: .6em 1.1em; border-radius: 999px; border: 2px solid var(--linea); background: #fff; font-weight: 600; display: inline-flex; align-items: center; gap: .5em; }
.opciones .sel { border-color: var(--acento); background: var(--acento-suave); color: var(--acento-osc); }
.muestra { width: 1.3em; height: 1.3em; border-radius: 50%; display: inline-block; }
.medios { display: grid; grid-template-columns: repeat(auto-fill, minmax(calc(var(--u) * 16), 1fr)); gap: 10px; }
.medio-item { position: relative; background: #000; border-radius: 12px; overflow: hidden; aspect-ratio: 16/10; }
.medio-item img, .medio-item video { width: 100%; height: 100%; object-fit: cover; }
.medio-item .acciones { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; padding: 6px; background: linear-gradient(transparent, rgba(0,0,0,.6)); }
.medio-item .acciones button { background: #fff; border-radius: 8px; padding: .25em .6em; font-size: .8em; font-weight: 700; }
.acciones-panel { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; position: sticky; bottom: 0; padding: 10px 0; background: linear-gradient(transparent, var(--fondo) 30%); }
.lista-simple { list-style: none; padding: 0; margin: 0; } .lista-simple li { padding: .6em 0; border-bottom: 1px solid var(--linea); display: flex; justify-content: space-between; gap: 1em; }
.proximamente { text-align: center; color: var(--texto-2); padding: 3em 1em; }

/* ── Modales y avisos ── */
.modal { border: 0; border-radius: 22px; padding: calc(var(--u) * 2.6); width: min(92vw, calc(var(--u) * 52)); box-shadow: 0 20px 60px rgba(0,0,0,.25); color: var(--texto); }
.modal::backdrop { background: rgba(15, 23, 42, .55); }
.modal h2 { margin: 0 0 .6em; font-size: 1.5em; }
.modal label { display: flex; flex-direction: column; gap: .35em; font-weight: 600; margin-bottom: .9em; }
.modal-botones { display: flex; justify-content: flex-end; gap: 12px; margin-top: 1em; flex-wrap: wrap; }
.pasos { padding: 0; margin: 0; list-style: none; display: flex; flex-direction: column; gap: .9em; counter-reset: p; }
.pasos li { display: flex; gap: .8em; align-items: center; font-weight: 600; }
.pasos .ico { width: 2.2em; height: 2.2em; padding: .45em; border-radius: 12px; background: var(--acento-suave); color: var(--acento); }
.nota { color: var(--texto-2); } .error { color: var(--alerta); font-weight: 600; min-height: 1.2em; margin: 0; }
#tiempo-restante { color: var(--acento-osc); font-size: 1.2em; }
#aviso-flotante { position: fixed; left: 50%; bottom: calc(var(--alto-barra) + 20px); transform: translate(-50%, 30px); opacity: 0; pointer-events: none; z-index: 100;
  background: #0f172a; color: #fff; padding: .8em 1.4em; border-radius: 14px; font-weight: 600; transition: all .25s; max-width: 90vw; text-align: center; }
#aviso-flotante.visible { opacity: 1; transform: translate(-50%, 0); }
#aviso-flotante.error { background: var(--alerta); }
#sin-red { position: fixed; top: calc(var(--u) * 1.2); right: calc(var(--u) * 1.4); z-index: 60; display: flex; align-items: center; gap: .4em; padding: .4em .8em; border-radius: 999px; background: #FEF3C7; color: #92400E; font-size: .8em; font-weight: 700; }

.solo-vertical { display: none !important; }

/* ── Vertical (pantalla en retrato) ── */
@media (orientation: portrait) {
  :root { --u: clamp(10px, 1.45vmin, 17px); }
  #v-venta { grid-template-columns: minmax(0, 1fr) minmax(calc(var(--u) * 20), 36%);
    grid-template-rows: auto auto minmax(0, 1fr) var(--alto-barra);
    grid-template-areas: "cab cab" "cats cats" "prod carrito" "barra pagar"; }
  .panel-carrito { margin-top: 0; padding: calc(var(--u) * 1.2); }
  .linea { grid-template-columns: calc(var(--u) * 4.2) 1fr; }
  .linea .ln-borrar { grid-column: 2; grid-row: 1; }
  .linea .ln-nombre { padding-right: 2em; }
  .linea .ln-total { grid-column: 2; }
  .linea { grid-template-rows: auto auto auto; }
  .rejilla { grid-template-columns: repeat(auto-fill, minmax(calc(var(--u) * 13), 1fr)); }
  .barra .servicios span { font-size: .8em; }
  .barra { gap: calc(var(--u) * .5); flex-wrap: nowrap; }
  .barra .btn-plano, .barra .btn-inicio { flex-direction: column; gap: .2em; padding: .4em .7em; font-size: .85em; }
  #v-cobro { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr) auto auto var(--alto-barra); grid-template-areas: "cab" "olv" "tot" "pago" "barra"; }
  .olvidaste { margin: 0 calc(var(--u) * 1.4); }
  .totales { margin: calc(var(--u) * 1.2) calc(var(--u) * 1.4) 0; }
  .formas-rejilla { gap: calc(var(--u) * .8); }
  .solo-vertical { display: inline-flex !important; } .solo-horizontal { display: none !important; }
  .top5 .lista { grid-template-columns: repeat(3, 1fr); } .top5 .item:nth-child(n+4) { display: none; }
  .animaciones { flex-direction: column; } .anim { max-width: 70vw; width: calc(var(--u) * 30); }
  .gracias { flex-direction: column; }
  #v-admin { grid-template-columns: 1fr; grid-template-rows: auto auto minmax(0, 1fr); grid-template-areas: "cab" "menu" "panel"; }
  .admin-menu { flex-direction: row; overflow-x: auto; } .admin-menu button { flex: none; } .admin-menu button small { display: none; }
  .admin-panel { padding: calc(var(--u) * 1) calc(var(--u) * 1.4) calc(var(--u) * 3); }
}

/* admin (extra) */
.ent, .campo input[type=search], .campo input[type=email], .campo input[type=tel], .campo input[type=url], .campo input[type=number] {
  width: 100%; min-height: 3em; padding: .7em .9em; border-radius: 10px; border: 2px solid var(--linea); background: #fff; }
.ent:focus, .campo textarea:focus, .campo select:focus { outline: 0; border-color: var(--acento); }
.ent:disabled, .campo textarea:disabled, .campo select:disabled { background: var(--fondo); color: var(--texto-2); }
.campo .sub { display: flex; flex-direction: column; gap: .3em; font-weight: 600; font-size: .9em; color: var(--texto-2); }
.opciones button { min-height: 2.9em; }
.opciones button:disabled, .paso button:disabled { opacity: .5; }
.opciones button:disabled.sel { opacity: 1; }
.aviso-rol { margin: 0 0 10px; padding: .8em 1.1em; border-radius: 12px; background: #FEF3C7; color: #92400E; font-weight: 600; }
.fila-botones { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.campo .fila-botones { margin-bottom: 0; }
.fila-botones .ent { flex: 1; min-width: 12em; width: auto; }
.fila-botones .btn-pagar, .fila-botones .btn-volver { flex: none; font-size: 1em; }
.titulo-form { font-size: 1.2em; }
.fila-logo { display: flex; align-items: center; gap: 1em; flex-wrap: wrap; }
.logo-previo { height: calc(var(--u) * 9); max-width: calc(var(--u) * 20); object-fit: contain; border-radius: 12px; background: var(--fondo); padding: 6px; }
.medio-item .medio-num { position: absolute; top: 6px; left: 6px; padding: .2em .6em; border-radius: 8px; background: rgba(0,0,0,.6); color: #fff; font-size: .75em; font-weight: 700; }
.medio-item .acciones button { min-width: 2.6em; min-height: 2.4em; }
.medio-item .acciones button:disabled { opacity: .4; }
.medios .proximamente { grid-column: 1 / -1; padding: 1.5em 1em; margin: 0; }
.chip-cat { display: inline-flex; align-items: center; gap: .5em; padding: .45em .6em .45em 1.1em; border-radius: 999px; border: 2px solid var(--linea); background: #fff; font-weight: 600; min-height: 2.9em; }
.chip-cat button { width: 2.1em; height: 2.1em; border-radius: 50%; background: var(--fondo); color: var(--texto-2); font-weight: 700; }
.lista-prod li { align-items: center; }
.lista-prod .mini { width: calc(var(--u) * 5); height: calc(var(--u) * 5); flex: none; border-radius: 10px; object-fit: contain; background: var(--acento-suave); }
.lista-prod .prod-datos { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .15em; }
.lista-prod .prod-datos small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lista-prod .prod-precio { flex: none; }
.lista-prod .btn-volver { flex: none; padding: .6em 1.1em; }
.lista-prod li.inactivo .prod-datos, .lista-prod li.inactivo .prod-precio, .lista-prod li.inactivo .mini { opacity: .5; }
.btn-volver.peligro { border-color: var(--alerta); color: var(--alerta); margin-right: auto; }
.campo.proximamente { text-align: left; align-items: flex-start; padding: 1.6em; }
.campo.proximamente p { margin: 0; }
.admin-cab .etiqueta { white-space: nowrap; }
.admin-cab .btn-volver { flex: none; }
@media (orientation: portrait) { .admin-cab h2 { display: none; } }

/* integración: aviso de la vista de pago legible y botones de forma de pago en vertical */
#pago-aviso:not(:empty) { font-weight: 600; color: var(--texto); background: var(--acento-suave); border-radius: 12px; padding: .7em 1.2em; max-width: 92%; }
@media (orientation: portrait) {
  .formas-rejilla button { padding: calc(var(--u) * 1.2) .3em; }
  .formas-rejilla button b { font-size: .88em; line-height: 1.15; text-align: center; }
  .formas-rejilla button small { font-size: .62em; }
}

/* ventas y ticket */
.folio { margin: 0; font-weight: 700; color: var(--texto-2); letter-spacing: .04em; }
.ticket-aviso { margin: 0; padding: .6em 1em; border-radius: 12px; background: #FEF3C7; color: #92400E; font-weight: 600; }
.tabla { width: 100%; border-collapse: collapse; font-size: .92em; }
.tabla th, .tabla td { padding: .55em .5em; border-bottom: 1px solid var(--linea); text-align: left; vertical-align: top; }
.tabla th { color: var(--texto-2); font-size: .8em; text-transform: uppercase; letter-spacing: .05em; }
.tabla td.num, .tabla th.num { text-align: right; white-space: nowrap; }
.tabla tr.cancelada td { color: var(--texto-2); text-decoration: line-through; }
.tabla tr.sel td { background: var(--acento-suave); }
.tabla .btn-volver { padding: .4em .8em; font-size: .9em; }
.resumen { display: grid; grid-template-columns: repeat(auto-fill, minmax(calc(var(--u) * 14), 1fr)); gap: 10px; }
.resumen .dato { background: var(--tarjeta); border-radius: 12px; padding: .8em 1em; box-shadow: var(--sombra); display: flex; flex-direction: column; gap: .2em; }
.resumen .dato small { color: var(--texto-2); }
.resumen .dato b { font-size: 1.3em; }
.estado-pill { display: inline-flex; align-items: center; gap: .4em; padding: .3em .8em; border-radius: 999px; font-weight: 700; font-size: .85em; background: var(--fondo); }
.estado-pill.ok { background: #DCFCE7; color: #166534; } .estado-pill.mal { background: #FEE2E2; color: #991B1B; } .estado-pill.duda { background: #FEF3C7; color: #92400E; }
.licencia { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.1em; word-break: break-all; padding: .6em .9em; background: var(--fondo); border-radius: 10px; user-select: text; -webkit-user-select: text; }
.ticket-previo { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .8em; white-space: pre; overflow-x: auto; background: #fff; border: 1px dashed var(--linea); border-radius: 10px; padding: .8em 1em; max-height: 22em; overflow-y: auto; }
.detalle-venta { background: var(--fondo); border-radius: 12px; padding: .8em 1em; margin-top: 8px; }
.aviso-admin { display: flex; gap: .6em; align-items: center; margin: 0 0 10px; padding: .7em 1em; border-radius: 12px; background: #FEE2E2; color: #991B1B; font-weight: 600; }
.fechas { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.fechas label { display: flex; flex-direction: column; gap: .3em; font-weight: 600; font-size: .9em; color: var(--texto-2); }
.fechas input[type=date] { min-height: 3em; padding: .5em .8em; border-radius: 10px; border: 2px solid var(--linea); background: #fff; }

/* admin: caja, seguridad, alertas, reportes y modales de PIN/monto/texto */
.m-pedir { width: min(92vw, calc(var(--u) * 40)); }
.m-pedir .campo { box-shadow: none; padding: 0; background: none; }
.m-pedir textarea { width: 100%; min-height: 6em; padding: .7em .9em; border-radius: 10px; border: 2px solid var(--linea); }
.teclado { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: .6em 0; }
.teclado button { min-height: calc(var(--u) * 5.2); border-radius: 14px; background: var(--fondo); font-size: 1.5em; font-weight: 700; border: 2px solid var(--linea); }
.teclado button:active { background: var(--acento-suave); border-color: var(--acento); }
.teclado button.borrar { font-size: 1.2em; color: var(--alerta); }
.pantalla-pin { display: flex; justify-content: center; gap: 14px; min-height: 2em; margin: .4em 0; }
.pantalla-pin i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--texto-2); }
.pantalla-pin i.on { background: var(--acento); border-color: var(--acento); }
.pantalla-monto { text-align: center; font-size: 2.2em; font-weight: 800; color: var(--acento-osc); padding: .2em .4em; background: var(--fondo); border-radius: 14px; margin: .3em 0; }
.m-doc { width: min(94vw, calc(var(--u) * 48)); }
.m-doc .ticket-previo { max-height: 55vh; }
.resumen .dato.acento b { color: var(--acento-osc); }
details.dispositivo { background: var(--tarjeta); border-radius: 12px; padding: .6em .9em; margin-top: 8px; }
details.dispositivo summary { cursor: pointer; font-weight: 600; display: flex; align-items: center; gap: .6em; flex-wrap: wrap; min-height: 2.4em; }
.tabla.denoms td, .tabla.denoms th { padding: .4em .5em; }
.tabla tr.cajon td, .tabla tr.inactivo td { color: var(--texto-2); }
.rejilla-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(14em, 1fr)); gap: 10px; }
.rejilla-denoms { display: grid; grid-template-columns: repeat(auto-fit, minmax(20em, 1fr)); gap: 10px; }
.fila-den .den { min-width: 4.5em; font-weight: 700; }
.fila-den button.chico { width: auto; padding: 0 .7em; border-radius: 999px; font-size: .9em; }
.chk { display: inline-flex; align-items: center; gap: .4em; font-weight: 600; }
.chk input { width: 1.4em; height: 1.4em; }
.titulo-form { font-size: 1.1em; }
.btn-volver.peligro { border-color: var(--alerta); color: var(--alerta); }
@media (orientation: portrait) { .m-pedir { width: min(94vw, calc(var(--u) * 34)); } }

/* inventario y mantenimiento */
.prod.agotado .foto { filter: grayscale(.9); opacity: .55; }
.prod .cinta { position: absolute; left: -1px; top: calc(var(--u) * 1.2); padding: .2em .8em; background: var(--alerta); color: #fff; font-weight: 800; font-size: .72em; border-radius: 0 999px 999px 0; letter-spacing: .04em; }
.lista-inv li { align-items: center; gap: .8em; }
.lista-inv .prod-datos { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .15em; }
.lista-inv .btn-volver { flex: none; padding: .6em 1.1em; }
.lista-inv .inv-existencia { min-width: 5.5em; text-align: right; font-size: 1.15em; }
.lista-inv .inv-existencia.bajo { color: var(--alerta); }
.lista-inv .inv-existencia.agotado { color: var(--alerta); text-decoration: underline; }
.lista-inv .inv-existencia.sin { color: var(--texto-2); }
.lista-inv li.bajo { background: #FFF7ED; border-radius: 10px; padding-left: .5em; }
.lista-inv .inv-acciones { flex: none; }
.lista-inv .conteo { width: 7em; text-align: right; }
.tabla-scroll { overflow-x: auto; }
.dato.mal b { color: var(--alerta); }
@media (orientation: portrait) {
  .lista-inv li { flex-wrap: wrap; }
  .lista-inv .inv-acciones { width: 100%; justify-content: flex-end; }
}

/* visor de PDF y botones de reporte */
.m-pdf { width: min(96vw, 1400px); height: 92vh; max-height: 92vh; padding: calc(var(--u) * 1.2); flex-direction: column; gap: calc(var(--u) * .8); }
.m-pdf:not([open]) { display: none; }
.m-pdf[open] { display: flex; }
.m-pdf .pdf-cab { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.m-pdf .pdf-cab h2 { margin: 0; font-size: 1.2em; }
.m-pdf .pdf-cab a.btn-volver { text-decoration: none; }
.m-pdf .pdf-marco { flex: 1; width: 100%; min-height: 0; border: 1px solid var(--linea); border-radius: 12px; background: #525659; }
.fila-reporte { margin: 8px 0 12px; }

/* ═════════ Recarga celular y pago de servicios ═════════ */
#v-servicios { background: var(--fondo); }
#servicios-raiz { position: absolute; inset: 0; display: flex; flex-direction: column; min-height: 0; }
.srv-cab { flex: none; }
.srv-cab .titulo-vista { font-size: calc(var(--u) * 2.4); margin: 0; }
.srv-cuerpo { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.srv-chips { flex: none; }
.srv-buscar { flex: none; margin: 0 calc(var(--u) * 1.4) calc(var(--u) * .8); }
.srv-rejilla { grid-area: auto; flex: 1; min-height: 0; grid-template-columns: repeat(auto-fill, minmax(calc(var(--u) * 16), 1fr)); }
.srv-item { position: relative; background: var(--tarjeta); border-radius: var(--radio); box-shadow: var(--sombra); padding: calc(var(--u) * 1.1); display: flex; flex-direction: column; align-items: center; gap: .3em; text-align: center; }
.srv-item:active { transform: scale(.97); }
.srv-logo { width: 100%; aspect-ratio: 2.2; border-radius: 12px; background: var(--acento-suave); display: grid; place-items: center; overflow: hidden; }
.srv-logo img { max-width: 92%; max-height: 82%; object-fit: contain; }
.srv-logo .ph { width: 40%; height: 40%; color: var(--acento); }
.srv-logo.grande { aspect-ratio: auto; width: calc(var(--u) * 16); height: calc(var(--u) * 9); margin: 0 auto; }
.srv-serv { font-weight: 700; font-size: .95em; line-height: 1.15; }
.srv-prod { font-size: .8em; color: var(--texto-2); line-height: 1.1; min-height: 1.1em; }
.srv-precio { font-weight: 800; color: var(--acento-osc); }
.srv-vacio { grid-column: 1/-1; text-align: center; color: var(--texto-2); padding: 2em 1em; display: flex; flex-direction: column; gap: 1em; align-items: center; }

.srv-captura, .srv-resumen, .srv-resultado, .srv-procesando { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; align-items: center; gap: calc(var(--u) * 1); padding: calc(var(--u) * 1) calc(var(--u) * 1.4) calc(var(--u) * 2); }
.srv-tit { margin: 0; font-size: calc(var(--u) * 2.2); text-align: center; }
.srv-campo-lbl { font-weight: 700; margin-top: .4em; }
.srv-monto-fijo { display: flex; gap: .6em; align-items: baseline; background: var(--acento-suave); padding: .5em 1.2em; border-radius: 12px; }
.srv-monto-fijo b { font-size: 1.4em; color: var(--acento-osc); }
.srv-pantalla { text-align: center; font-size: 2em; font-weight: 800; color: var(--acento-osc); min-height: 1.3em; letter-spacing: .04em; background: var(--fondo); border-radius: 14px; padding: .25em .6em; width: min(100%, calc(var(--u) * 34)); }
.srv-ref { width: min(100%, calc(var(--u) * 34)); text-align: center; font-size: 1.4em; }
.srv-ayuda { color: var(--texto-2); text-align: center; margin: .2em 0; min-height: 1.2em; }
.srv-ayuda.error { color: var(--alerta); font-weight: 600; }
.srv-captura .teclado { width: min(100%, calc(var(--u) * 34)); }
.srv-botones { display: flex; gap: calc(var(--u) * 1); justify-content: center; flex-wrap: wrap; margin-top: .6em; width: min(100%, calc(var(--u) * 40)); }
.srv-botones .btn-pagar { flex: 1; justify-content: center; }
.srv-botones .btn-pagar.grande { font-size: 1.3em; padding: 1em 1.6em; }

.srv-rsm-caja { width: min(100%, calc(var(--u) * 46)); background: var(--tarjeta); border-radius: 20px; box-shadow: var(--sombra); padding: calc(var(--u) * 1.8); }
.srv-rsm-caja h3 { margin: 0 0 .6em; }
.srv-rsm-fila { display: flex; justify-content: space-between; gap: 1em; padding: .5em 0; border-bottom: 1px solid var(--linea); }
.srv-rsm-fila span { color: var(--texto-2); }
.srv-rsm-fila b { text-align: right; }
.srv-rsm-total { display: flex; justify-content: space-between; align-items: baseline; border-top: 2px solid var(--linea); margin-top: .4em; padding-top: .6em; font-weight: 700; }
.srv-rsm-total b { font-size: 1.9em; color: var(--acento); }

.srv-pago { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: calc(var(--u) * 1.2); padding: calc(var(--u) * 7) calc(var(--u) * 2) calc(var(--u) * 2); overflow-y: auto; }
.srv-pago .titulo-vista { font-size: calc(var(--u) * 2.6); margin: 0; }
.srv-pago .totales.compacto { width: min(92%, calc(var(--u) * 46)); }

.srv-procesando { align-items: center; justify-content: center; }
.srv-spinner { width: calc(var(--u) * 7); height: calc(var(--u) * 7); border-radius: 50%; border: calc(var(--u) * .9) solid var(--acento-suave); border-top-color: var(--acento); animation: srv-giro 1s linear infinite; }
@keyframes srv-giro { to { transform: rotate(360deg); } }

.srv-res-caja { width: min(100%, calc(var(--u) * 46)); background: var(--tarjeta); border-radius: 20px; box-shadow: var(--sombra); padding: calc(var(--u) * 2); text-align: center; }
.srv-res-tit { display: flex; align-items: center; justify-content: center; gap: .5em; font-size: 1.4em; font-weight: 800; margin: 0 0 .6em; }
.srv-res-tit .ico { width: 1.8em; height: 1.8em; }
.srv-res-tit.ok { color: var(--ok); } .srv-res-tit.err { color: var(--alerta); } .srv-res-tit.warn { color: #B45309; }
.srv-res-msg { color: var(--alerta); }
.srv-res-datos { text-align: left; margin-top: .6em; }
.srv-res-datos .tot-fila { padding: .4em 0; border-bottom: 1px solid var(--linea); }
.srv-res-nota { margin-top: .8em; font-weight: 700; }
.srv-admin-saldo { margin: .4em 0; font-size: 1.1em; }

@media (orientation: portrait) {
  .srv-rejilla { grid-template-columns: repeat(auto-fill, minmax(calc(var(--u) * 13), 1fr)); }
  .srv-cab .titulo-vista { font-size: calc(var(--u) * 2); }
}

/* estado de equipos (admin-caja) */
.dispositivo-estado { padding: .35em 0; display: flex; align-items: center; gap: .4em; flex-wrap: wrap; }
.dispositivo-estado small { color: var(--texto-2, #666); }

/* Gráfica de efectivo por denominación (administración) */
.grafica-efectivo { display: flex; flex-direction: column; gap: .6em; margin: .4em 0 .6em; }
.grafica-dispositivo { background: var(--fondo); border-radius: 12px; padding: .6em .8em .3em; }
.grafica-titulo { display: flex; align-items: center; gap: .5em; margin-bottom: .2em; font-size: .95em; }
.grafica-titulo .grafica-total { color: var(--texto-2); font-size: .85em; margin-left: auto; }
.grafica-efectivo svg.grafica { width: 100%; height: auto; display: block; overflow: visible; }
.grafica-efectivo svg .eje { stroke: var(--linea); stroke-width: 1; }
.grafica-efectivo svg text { font-family: inherit; fill: var(--texto); font-size: 12px; font-variant-numeric: tabular-nums; }
.grafica-efectivo svg text.etq { fill: var(--texto-2); font-weight: 600; }
.grafica-efectivo svg text.val.vacio { fill: var(--texto-2); opacity: .7; }
.grafica-efectivo svg g.fila:hover path { filter: brightness(.92); }
.grafica-leyenda { display: flex; flex-wrap: wrap; gap: .4em 1.2em; font-size: .8em; color: var(--texto-2); }
.grafica-leyenda > span { display: inline-flex; align-items: center; gap: .4em; }
.muestra { display: inline-block; width: 12px; height: 12px; border-radius: 3px; flex: none; }

/* Diagramas de fallas de los equipos (ilustrativos) */
.falla-equipo { display: grid; grid-template-columns: minmax(180px, 320px) 1fr; gap: .8em; align-items: center; background: #FEF2F2; border: 1px solid #FECACA; border-radius: 12px; padding: .6em .8em; margin: .3em 0 .5em; }
.falla-equipo svg.diagrama { width: 100%; height: auto; display: block; }
.falla-equipo .carcasa { fill: #fff; stroke: var(--linea); stroke-width: 2; }
.falla-equipo .parte > :first-child { fill: #E5E7EB; stroke: #9CA3AF; stroke-width: 2; }
.falla-equipo .parte.falla > :first-child { fill: #FCA5A5; stroke: #DC2626; stroke-width: 3; animation: parpadeo 1.2s ease-in-out infinite; }
.falla-equipo .parte text.etq { font-size: 11px; fill: var(--texto-2); }
.falla-equipo .parte.falla text.etq { fill: #B91C1C; font-weight: 700; }
.falla-equipo .falla-texto p { margin: .3em 0; }
.falla-equipo .falla-texto small { display: block; color: var(--texto-2); }
@keyframes parpadeo { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
@media (max-width: 700px) { .falla-equipo { grid-template-columns: 1fr; } }
.rutas .ruta-item { display: inline-flex; align-items: center; gap: .4em; padding: .3em .5em; background: var(--fondo); border-radius: 10px; }

/* Retiro con código QR */
#v-retiro { background: var(--fondo); display: grid; place-items: center; }
.retiro { width: min(92vw, 720px); background: var(--tarjeta); border-radius: 20px; box-shadow: var(--sombra); padding: calc(var(--u) * 3) calc(var(--u) * 3); text-align: center; display: flex; flex-direction: column; align-items: center; gap: calc(var(--u) * 1.4); }
.retiro h1 { margin: 0; font-size: calc(var(--u) * 3.2); }
.retiro-qr-marco { width: calc(var(--u) * 18); height: calc(var(--u) * 18); border: 4px dashed var(--acento); border-radius: 18px; display: grid; place-items: center; animation: latido 2s ease-in-out infinite; }
.retiro-qr-icono { width: 60%; height: 60%; background:
  linear-gradient(var(--texto) 0 0) 0 0 / 30% 30% no-repeat, linear-gradient(var(--texto) 0 0) 100% 0 / 30% 30% no-repeat, linear-gradient(var(--texto) 0 0) 0 100% / 30% 30% no-repeat,
  linear-gradient(var(--texto-2) 0 0) 60% 60% / 14% 14% no-repeat, linear-gradient(var(--texto-2) 0 0) 85% 70% / 14% 14% no-repeat, linear-gradient(var(--texto-2) 0 0) 65% 88% / 14% 14% no-repeat; opacity: .8; }
.retiro-instr { font-size: calc(var(--u) * 2.2); font-weight: 700; margin: 0; }
.retiro-estado { font-size: calc(var(--u) * 2); margin: 0; }
.retiro-monto { font-size: calc(var(--u) * 5); font-weight: 800; color: var(--acento); }
.retiro .ok { color: var(--ok); font-weight: 700; font-size: calc(var(--u) * 2.2); margin: 0; }
.qr-caja { display: flex; flex-direction: column; align-items: center; gap: .5em; }
.qr-img { width: min(70vw, 300px); height: auto; image-rendering: pixelated; border: 8px solid #fff; border-radius: 8px; box-shadow: var(--sombra); }
.qr-texto { font-size: 1.1em; letter-spacing: .08em; background: var(--fondo); padding: .3em .6em; border-radius: 8px; }
