/* LENVRAK Ventas — estilos (aspecto familiar para quienes usaban Casa Market) */
@font-face { font-family: 'Poppins'; font-weight: 400; font-display: swap; src: url(../fonts/poppins-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Poppins'; font-weight: 500; font-display: swap; src: url(../fonts/poppins-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Poppins'; font-weight: 600; font-display: swap; src: url(../fonts/poppins-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Poppins'; font-weight: 700; font-display: swap; src: url(../fonts/poppins-latin-700-normal.woff2) format('woff2'); }

:root {
  --primario: #00b3b3;
  --primario-osc: #009a9a;
  --primario-suave: #e3f7f6;
  --primario-medio: #cdeeee;
  --fondo-claro: #f1fbfb;
  --naranja: #ff5900;
  --naranja-osc: #e04f00;
  --naranja-suave: #fff0e6;
  --naranja-franja: #ffa53a;
  --morado: #9b77c7;
  --verde: #3bd166;
  --verde-osc: #2cb553;
  --fondo: #ffffff;
  --panel: #ffffff;
  --lateral: #fafafa;
  --tinta: #1f2937;
  --tinta-fuerte: #020817;
  --tinta-2: #4b5563;
  --tinta-3: #6b7280;
  --gris-prod: #666666;
  --linea: #e2e8f0;
  --linea-2: #f1f5f9;
  --aviso: #b45309;
  --aviso-suave: #fef3c7;
  --peligro: #c81e3a;
  --peligro-suave: #fde8ec;
  --info: #2563eb;
  --info-suave: #e8f0fe;
  --radio: 8px;
  --radio-g: 12px;
  --sombra: 0 1px 2px rgba(15, 23, 42, .05), 0 6px 20px rgba(15, 23, 42, .07);
  --fuente: 'Poppins', 'Segoe UI', system-ui, sans-serif;
  --alto-cabecera: 64px;
  --ancho-lateral: 255px;
}
body[data-tema="azul"] { --primario: #1b6fd1; --primario-osc: #155bb0; --primario-suave: #e6effb; --primario-medio: #cfe0f7; --fondo-claro: #f3f7fd; }
body[data-tema="selva"] { --primario: #0b8a5f; --primario-osc: #08704d; --primario-suave: #e3f3ec; --primario-medio: #cbe9dc; --fondo-claro: #f2faf6; }
body[data-tema="vino"] { --primario: #8e2445; --primario-osc: #741c38; --primario-suave: #f6e7ec; --primario-medio: #edd0d9; --fondo-claro: #fbf4f6; }
body[data-tema="morado"] { --primario: #6a4bb5; --primario-osc: #573c99; --primario-suave: #eee9f8; --primario-medio: #ddd3f2; --fondo-claro: #f7f5fc; }
body[data-tema="rojo"] { --primario: #d22f2f; --primario-osc: #b02525; --primario-suave: #fbe9e9; --primario-medio: #f6d0d0; --fondo-claro: #fdf5f5; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--fuente); font-size: 14px; line-height: 1.45; color: var(--tinta-fuerte); background: var(--fondo); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.25; color: var(--tinta); }
h1 { font-size: 24px; font-weight: 500; }
h2 { font-size: 18px; font-weight: 600; }
h3 { font-size: 15px; font-weight: 600; }
.num, td.num, .cifra { font-variant-numeric: tabular-nums; }
a { color: var(--primario); }
:focus-visible { outline: 2px solid var(--primario); outline-offset: 2px; }
[hidden] { display: none !important; }
svg[aria-hidden="true"] { width: 20px; height: 20px; flex: none; }

/* ---------------- estructura ---------------- */
.marco { display: grid; grid-template-rows: var(--alto-cabecera) minmax(0, 1fr); height: 100vh; height: var(--alto, 100dvh); }
.cabecera { display: flex; align-items: center; gap: 16px; padding: 0 16px 0 12px; background: #fff; z-index: 30; box-shadow: 0 1px 2px rgba(0, 0, 0, .05); position: relative; }
.hamburguesa { width: 40px; height: 40px; border: 0; background: none; border-radius: 6px; cursor: pointer; display: grid; place-items: center; color: #020817; }
.hamburguesa:hover { background: #f4f4f5; }
.hamburguesa svg { width: 24px; height: 24px; }
.marca { display: inline-flex; align-items: center; gap: 2px; font-weight: 700; font-size: 18px; text-decoration: none; color: var(--primario); letter-spacing: -.3px; }
.marca .punto-marca { width: 22px; height: 22px; border-radius: 50%; background: var(--naranja); display: inline-grid; place-items: center; color: #fff; font-size: 12px; margin: 0 3px; }
.marca .segunda { color: var(--naranja); }
.cabecera .tienda { font-weight: 500; font-size: 14px; color: #020817; }
.cabecera .relleno { flex: 1; }
.cabecera .version { color: rgba(100, 116, 139, .3); font-size: 12px; align-self: flex-end; margin-bottom: 12px; }
.pildora { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--primario); color: var(--primario); background: #fff; font-weight: 500; font-size: 14px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.pildora:hover { background: var(--primario-suave); }
.pildora svg { width: 16px; height: 16px; }
.pildora.caja-cerrada { border-color: #cbd5e1; color: #64748b; }
.pildora .led { width: 8px; height: 8px; border-radius: 50%; background: #84cc16; }
.pildora.caja-cerrada .led { background: #cbd5e1; }
.pildora.llena { background: var(--primario); color: #fff; }
.pildora.llena:hover { background: var(--primario-osc); }

.cuerpo { display: grid; grid-template-columns: var(--ancho-lateral) minmax(0, 1fr); min-height: 0; position: relative; }
.cuerpo > .lateral { grid-column: 1; grid-row: 1; }
.cuerpo > .vista { grid-column: 2; grid-row: 1; }
.marco.sin-lateral .cuerpo, .marco.modo-cajon .cuerpo { grid-template-columns: 0 minmax(0, 1fr); }
.marco.sin-lateral:not(.modo-cajon) .lateral { visibility: hidden; }
.lateral { background: #fff; overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 4px; scrollbar-color: var(--primario) transparent; scrollbar-width: thin; }
.lateral-cabeza { display: none; align-items: center; gap: 8px; height: 48px; padding: 0 4px; font-size: 18px; font-weight: 500; color: #020817; }
.lateral-cabeza .hamburguesa { width: 32px; height: 32px; }
.cajon-fondo { display: none; }
/* Cajón (pantallas que no son Inicio, como en Casa Market) */
.marco.modo-cajon .lateral { position: fixed; top: 0; left: 0; bottom: 0; width: var(--ancho-lateral); z-index: 60; visibility: hidden; transform: translateX(-100%); transition: transform .2s ease, visibility .2s;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, .1), 0 4px 6px -4px rgba(0, 0, 0, .1); }
.marco.modo-cajon .lateral-cabeza { display: flex; }
.marco.modo-cajon.cajon-abierto .lateral { visibility: visible; transform: none; }
.marco.modo-cajon.cajon-abierto .cajon-fondo { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .3); z-index: 55; }
.menu-grupo { border-radius: 6px; }
.menu-grupo > button, .menu-simple { width: 100%; display: flex; align-items: center; gap: 8px; height: 32px; padding: 8px; border: 0; background: none; border-radius: 6px; cursor: pointer; color: #64748b; font-weight: 500; font-size: 14px; line-height: 20px; text-align: left; text-decoration: none; }
.menu-grupo > button:hover, .menu-simple:hover { background: #f4f4f5; color: #18181b; }
.menu-grupo > button svg, .menu-simple svg { width: 16px; height: 16px; color: #3f3f46; }
.menu-grupo > button .flecha { margin-left: auto; width: 16px; height: 16px; transition: transform .15s; }
.menu-grupo.abierto > button .flecha { transform: rotate(90deg); }
.menu-grupo.abierto { background: #ffede1; }
.menu-grupo.abierto > button, .menu-grupo.abierto > button:hover { background: #ffede1; color: var(--naranja); }
.menu-simple.activo { color: var(--naranja); }
.submenu { display: none; margin: 0 14px; padding: 2px 10px 10px; border-left: 1px solid #e4e4e7; flex-direction: column; gap: 12px; }
.menu-grupo.abierto .submenu { display: flex; }
.submenu a { display: block; color: #3f3f46; text-decoration: none; font-size: 14px; line-height: 20px; }
.submenu a:hover { color: var(--naranja); }
.submenu a.activo { color: var(--naranja); font-weight: 500; }
.lateral hr { border: 0; border-top: 1px solid var(--linea); margin: 8px 4px; }

.vista { overflow: auto; padding: 16px 64px 40px; background: #fff; min-height: 0; }
.encabezado { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; min-height: 40px; }
.encabezado h1 { font-size: 24px; font-weight: 500; color: #141f29; line-height: 32px; }
.encabezado .volver { width: 32px; height: 32px; display: grid; place-items: center; color: var(--tinta); text-decoration: none; border-radius: var(--radio); border: 0; background: none; cursor: pointer; }
.encabezado .volver:hover { background: var(--linea-2); }
.encabezado h1 { margin-right: auto; }
.encabezado .acciones { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.encabezado .acciones .btn { min-height: 32px; height: 32px; padding: 0 12px; font-size: 14px; }

/* ---------------- botones y campos ---------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 16px; border-radius: 6px; border: 1px solid #d1d5db; background: #fff; color: var(--tinta-fuerte); font-weight: 500; font-size: 14px; cursor: pointer; white-space: nowrap; text-decoration: none; }
.btn:hover { background: #f8fafc; }
.btn svg { width: 17px; height: 17px; }
.btn-primario { background: var(--primario); border-color: var(--primario); color: #fff; font-weight: 600; }
.btn-primario:hover { background: var(--primario-osc); border-color: var(--primario-osc); }
.btn-naranja { background: var(--naranja); border-color: var(--naranja); color: #fff; font-weight: 600; }
.btn-naranja:hover { background: var(--naranja-osc); }
.btn-borde { border-color: var(--naranja); color: var(--naranja); font-weight: 500; background: transparent; }
.btn-borde:hover { background: var(--naranja-suave); }
.btn-borde-turquesa { border-color: var(--primario); color: var(--primario); background: transparent; }
.btn-borde-turquesa:hover { background: var(--primario-suave); }
.btn-peligro { color: var(--peligro); border-color: #f3b8c3; }
.btn-peligro:hover { background: var(--peligro-suave); }
.btn-peligro-lleno { background: var(--peligro); border-color: var(--peligro); color: #fff; }
.btn-suave { background: var(--primario-suave); border-color: transparent; color: var(--primario-osc); font-weight: 600; }
.btn-texto { border-color: transparent; background: none; color: var(--primario-osc); padding: 0 8px; }
.btn-texto:hover { background: var(--primario-suave); }
.btn-chico { min-height: 32px; padding: 0 12px; font-size: 12px; }
.btn-gris { border-color: #565859; color: #565859; background: transparent; font-size: 12px; min-height: 32px; height: 32px; padding: 0 12px; }
.btn-gris svg { width: 14px; height: 14px; }
.btn-grande { min-height: 48px; font-size: 15px; padding: 0 26px; }
.btn-icono { width: 40px; padding: 0; }
.btn-icono.btn-chico { width: 32px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.campo { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.campo > span, .etiqueta { font-size: 12.5px; font-weight: 500; color: var(--tinta-3); }
.campo small, .ayuda { font-size: 12px; color: var(--tinta-3); }
.entrada, select.entrada, textarea.entrada { width: 100%; min-height: 42px; padding: 8px 12px; border: 1px solid #d1d5db; border-radius: var(--radio); background: #fff; font-size: 14px; }
.entrada:focus { outline: none; border-color: var(--primario); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primario) 18%, transparent); }
textarea.entrada { min-height: 80px; resize: vertical; }
.entrada.num { text-align: right; }
.entrada-grande { min-height: 50px; font-size: 20px; font-weight: 600; }
.flotante { position: relative; display: block; }
.flotante > .entrada, .flotante > .selector { width: 100%; }
.flotante > span { position: absolute; top: -8px; left: 10px; padding: 0 4px; background: #fff; font-size: 11px; color: var(--tinta-3); z-index: 1; }
.flotante .entrada { border-color: var(--primario); }
.casilla { display: flex; align-items: flex-start; gap: 9px; cursor: pointer; font-weight: 500; }
.casilla input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--primario); flex: none; }
.casilla small { display: block; font-weight: 400; color: var(--tinta-3); }
.prefijo { position: relative; }
.prefijo::before { content: attr(data-prefijo); position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--tinta-3); font-weight: 500; pointer-events: none; }
.prefijo .entrada { padding-left: 32px; }
.grupo-entrada { display: flex; gap: 8px; align-items: stretch; }

.fila { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.fila.fin { justify-content: flex-end; }
.fila.entre { justify-content: space-between; }
.rejilla { display: grid; gap: 14px; }
.r2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.r3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.r4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ocupa-2 { grid-column: span 2; }
.pila > * + * { margin-top: 14px; }
.relleno { flex: 1; }
.mudo { color: var(--tinta-3); }
.peligro-texto { color: var(--peligro); }
.aviso-texto { color: var(--aviso); }
.ok-texto { color: var(--primario-osc); }

.tarjeta { background: #fff; border: 1px solid var(--linea); border-radius: var(--radio-g); padding: 18px 20px; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); }
.tarjeta > h2 + * { margin-top: 12px; }
.seccion-num { font-size: 16px; font-weight: 600; color: var(--tinta); margin: 0 0 12px; }

.pestanas { display: flex; gap: 4px; border-bottom: 1px solid var(--linea); margin-bottom: 16px; overflow-x: auto; }
.pestanas button { border: 0; background: none; padding: 10px 14px; font-weight: 500; color: var(--tinta-3); border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; }
.pestanas button.activo { color: var(--primario-osc); border-bottom-color: var(--primario); font-weight: 600; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid #d1d5db; background: #fff; border-radius: var(--radio); padding: 6px 12px; font-weight: 500; font-size: 13px; cursor: pointer; color: var(--tinta-2); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.chip.activo { background: var(--primario); border-color: var(--primario); color: #fff; }
.chip svg { width: 16px; height: 16px; }

.insignia { display: inline-flex; align-items: center; gap: 4px; padding: 1px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--linea-2); color: var(--tinta-2); white-space: nowrap; }
.insignia.ok { background: var(--primario-suave); color: var(--primario-osc); }
.insignia.aviso { background: var(--aviso-suave); color: var(--aviso); }
.insignia.peligro { background: var(--peligro-suave); color: var(--peligro); }
.insignia.info { background: var(--info-suave); color: var(--info); }
.insignia.naranja { background: var(--naranja); color: #fff; }
.led-estado { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #84cc16; }
.led-estado.no { background: #cbd5e1; }

/* ---------------- tablas ---------------- */
.barra-filtros { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.barra-filtros select.entrada, .barra-filtros input.entrada, .barra-filtros .filtro { min-height: 34px; height: 34px; padding: 4px 12px; border: 1px solid #9a9a9a; border-radius: 8px; color: #9a9a9a; font-size: 14px; font-weight: 500; background-color: #fff; width: auto; }
.barra-filtros select.entrada:has(option:checked:not([value=""])) { color: #020817; border-color: #565859; }
.barra-filtros input.entrada { color: #020817; }
.barra-filtros input.entrada::placeholder { color: #9a9a9a; }
.barra-filtros .ancho { min-width: 280px; }
.barra-filtros .chip.activo { height: 34px; border-radius: 8px; font-size: 14px; }
.borrar-filtros { margin-left: auto; height: 32px; padding: 0 12px; border: 0; border-radius: 6px; background: #f2f2f2; color: #9a9a9a; font-weight: 500; font-size: 14px; cursor: pointer; white-space: nowrap; }
.borrar-filtros:hover { color: #565859; }
.tabla-caja { background: #fff; border-radius: 12px; border-bottom: 4px solid #d1d5db; box-shadow: 0 10px 15px -3px rgba(0, 0, 0, .1), 0 4px 6px -4px rgba(0, 0, 0, .1); overflow: hidden; display: flex; flex-direction: column; }
.tabla-scroll { overflow: auto; }
.tabla-herramientas { display: flex; align-items: center; gap: 8px; padding: 12px 12px 4px; flex-wrap: wrap; }
.tabla-herramientas .relleno { flex: 1; }
.tabla-herramientas .total-pill, .total-pill { background: #f2f2f2; border-radius: 4px; padding: 8px; height: 32px; display: inline-flex; align-items: center; font-size: 12px; line-height: 16px; color: #020817; white-space: nowrap; }
.lupa { display: inline-flex; align-items: center; height: 40px; width: 40px; border: 1px solid #cdcdcd; border-radius: 999px; overflow: hidden; transition: width .2s; cursor: text; background: #fff; }
.lupa svg { width: 18px; height: 18px; flex: none; margin: 0 10px; color: #020817; }
.lupa input { border: 0; outline: 0; padding: 0 12px 0 0; font-size: 14px; width: 100%; min-width: 0; background: none; }
.lupa:focus-within, .lupa.llena { width: 320px; border-color: var(--primario); }
.tabla-info { display: flex; align-items: center; gap: 8px; padding: 4px 12px 8px; font-size: 12px; color: #3f4546; }
.tabla-info .relleno { flex: 1; }
.tam-pagina { height: 32px; min-width: 112px; border: 1px solid #e2e8f0; border-radius: 6px; padding: 0 10px; font-size: 14px; color: #3f4546; background: #fff; }
table.tabla { width: 100%; border-collapse: collapse; font-size: 12px; line-height: 16px; }
.tabla th { text-align: left; font-size: 12px; font-weight: 500; color: #64748b; text-transform: uppercase; height: 45px; padding: 1px 12px; border-bottom: 1px solid #e2e8f0; background: #fff; position: sticky; top: 0; z-index: 1; white-space: nowrap; }
.tabla td { height: 45px; padding: 6px 12px; border-bottom: 1px solid #e2e8f0; vertical-align: middle; color: #020817; }
.tabla tbody tr.clic { cursor: pointer; }
.tabla tbody tr:hover { background: #f3f4f6; }
.tabla .num { text-align: right; white-space: nowrap; }
.tabla .centro { text-align: center; }
.tabla .fuerte { font-weight: 600; text-transform: uppercase; }
.tabla tfoot td { font-weight: 600; border-top: 1px solid var(--linea); }
.tabla tr.anulada td { color: var(--tinta-3); text-decoration: line-through; }
.tabla .kebab, .kebab { width: 40px; height: 40px; border: 0; border-radius: 8px; background: rgba(0, 0, 0, .05); cursor: pointer; display: inline-grid; place-items: center; color: #0f172a; }
.tabla .kebab:hover, .kebab:hover { background: rgba(0, 0, 0, .1); }
.tabla .kebab svg { width: 16px; height: 16px; }
.tabla-pie { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; padding: 10px 12px 12px; margin-top: auto; }
.tabla-pie .pie-texto { font-size: 12px; color: #3f4546; }
.paginacion { display: flex; align-items: center; justify-content: flex-end; font-size: 12px; color: #0f172a; }
.paginacion button { min-width: 28px; height: 28px; padding: 6px 10px; margin-left: 8px; border: 1px solid transparent; border-radius: 6px; background: #fff; cursor: pointer; font-size: 12px; font-weight: 500; color: #0f172a; line-height: 16px; }
.paginacion button:first-child, .paginacion button:last-child { border-color: #3f4546; }
.paginacion button:disabled { opacity: .4; cursor: default; }
.paginacion button.activo { border-color: #3f4546; background: rgba(0, 0, 0, .05); }
.paginacion span { margin-left: 8px; }
.punto-estado { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #84cc16; }
.punto-estado.no { background: #ef4444; }
.punto-estado.medio { background: #f59e0b; }
.interruptor { position: relative; width: 32px; height: 16px; border: 0; border-radius: 999px; background: #e5e7eb; cursor: pointer; padding: 0; flex: none; display: inline-block; vertical-align: middle; }
.interruptor span { position: absolute; top: -2px; left: -2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, .15), 0 2px 4px -2px rgba(0, 0, 0, .1); transition: transform .15s; }
.interruptor.si { background: rgba(0, 179, 179, .3); }
.interruptor.si span { background: var(--primario); transform: translateX(16px); }
.interruptor:disabled { cursor: default; opacity: .6; }
.miniatura { width: 32px; height: 32px; border-radius: 6px; object-fit: contain; background: #fff; border: 1px solid var(--linea-2); display: block; }
.miniatura.vacia { display: grid; place-items: center; color: var(--tinta-3); font-weight: 600; font-size: 12px; background: var(--fondo-claro); }
.vacio { text-align: center; padding: 40px 20px; color: var(--tinta-3); }
.vacio h3 { color: var(--tinta-2); margin-bottom: 6px; }
.menu-flotante { position: fixed; z-index: 150; background: #fff; border: 1px solid var(--linea); border-radius: 10px; box-shadow: var(--sombra); padding: 6px; min-width: 200px; }
.menu-flotante button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border: 0; background: none; border-radius: 6px; cursor: pointer; text-align: left; font-size: 13.5px; color: var(--tinta); }
.menu-flotante button:hover { background: var(--linea-2); }
.menu-flotante button svg { width: 17px; height: 17px; color: var(--tinta-3); }
.menu-flotante button.peligro { color: var(--peligro); }
.menu-flotante .titulo { font-size: 12px; color: var(--tinta-3); padding: 4px 12px; font-weight: 600; }

/* ---------------- indicadores ---------------- */
.inicio-cont { max-width: 1216px; margin: 0 auto; }
.inicio-cont .encabezado h1 { font-size: 30px; font-weight: 600; color: #1f2937; line-height: 36px; }
.selector-periodo { height: 40px; min-width: 200px; border: 1px solid #d1d5db; border-radius: 8px; padding: 8px 16px; font-size: 14px; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .05); }
.subtitulo-sec { font-size: 20px; font-weight: 500; color: #4b5563; line-height: 28px; margin: 8px 0 0; }
.nota-periodo { font-size: 12px; color: #64748b; margin: 2px 0 16px; }
.cifras { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.cifra-caja { background: #fff; border: 1px solid rgba(229, 231, 235, .6); border-radius: 6px; padding: 20px; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 1px 2px rgba(0, 0, 0, .05); }
.cifra-caja .cab { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.cifra-caja .nombre { color: #64748b; font-weight: 500; font-size: 14px; line-height: 20px; }
.cifra-caja .variacion { font-size: 14px; font-weight: 600; color: #22c55e; text-align: right; line-height: 20px; }
.cifra-caja .variacion.baja { color: #ef4444; }
.cifra-caja .variacion small { display: block; font-weight: 400; color: #64748b; font-size: 10px; line-height: 12px; }
.cifra-caja .valor { font-size: 24px; font-weight: 700; line-height: 32px; margin: 8px 0; font-variant-numeric: tabular-nums; color: #1f2937; }
.cifra-caja .pie { margin-top: auto; background: #f9fafb; border-radius: 4px; padding: 6px 8px; display: flex; justify-content: space-between; font-size: 12px; color: #64748b; }
.cifra-caja .pie strong { color: #1f2937; font-weight: 500; }
.accesos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.acceso { display: flex; flex-direction: column; justify-content: space-between; min-height: 110px; padding: 20px; border: 1px solid rgba(229, 231, 235, .6); border-radius: 6px; text-decoration: none; color: #1f2937; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .05); }
.acceso:hover { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, .08); }
.acceso svg { width: 20px; height: 20px; margin-bottom: 8px; }
.acceso strong { display: block; font-weight: 600; font-size: 16px; line-height: 24px; }
.acceso span { display: block; font-size: 12px; line-height: 16px; color: #64748b; margin-top: 4px; }
.acceso.c1 svg { color: var(--naranja); } .acceso.c2 svg { color: #22c55e; } .acceso.c3 svg { color: #db2777; }
.acceso.c4 svg { color: #f59e0b; } .acceso.c5 svg { color: #2563eb; } .acceso.c6 svg { color: #7c3aed; }
.acceso.c7 { background: #fffbeb; border-color: #fde68a; } .acceso.c7 svg { color: #d97706; }
.aviso-banda { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: var(--radio-g); background: var(--naranja); color: #fff; margin-bottom: 16px; }
.aviso-banda strong { display: block; font-size: 15px; }
.aviso-banda .btn { background: #fff; color: var(--naranja); border-color: #fff; font-weight: 600; }
.aviso-borde { border: 1.5px solid var(--naranja); border-radius: var(--radio-g); padding: 12px 16px; color: var(--primario-osc); font-weight: 500; margin-bottom: 16px; }

/* ---------------- ingreso ---------------- */
.acceso-pantalla { min-height: 100vh; min-height: var(--alto, 100dvh); display: grid; grid-template-columns: 1fr minmax(380px, 520px); }
.acceso-pantalla .lado { background: radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--primario) 70%, #fff) 0, var(--primario) 45%, var(--primario-osc) 100%); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: center; gap: 18px; position: relative; overflow: hidden; }
.acceso-pantalla .lado h1 { color: #fff; font-size: 40px; font-weight: 700; max-width: 14ch; }
.acceso-pantalla .lado p { font-size: 16px; max-width: 38ch; opacity: .92; margin: 0; }
.acceso-pantalla .lado .mosaico-deco { display: grid; grid-template-columns: repeat(3, 76px); gap: 12px; margin-top: 18px; }
.acceso-pantalla .lado .mosaico-deco span { height: 76px; border-radius: 14px; background: rgba(255, 255, 255, .16); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.acceso-pantalla .lado .mosaico-deco span:nth-child(2) { background: var(--naranja); }
.acceso-pantalla .formulario { padding: 40px 44px; display: flex; flex-direction: column; justify-content: center; gap: 16px; background: #fff; }
.acceso-pantalla .formulario .marca { font-size: 30px; justify-content: center; }
.acceso-pantalla .formulario .marca .punto-marca { width: 34px; height: 34px; font-size: 17px; }
.bienvenida { text-align: center; color: var(--tinta-2); margin-top: -8px; }
.usuarios-acceso { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.usuarios-acceso button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 8px; border: 1.5px solid var(--linea); border-radius: var(--radio-g); background: #fff; cursor: pointer; font-weight: 500; font-size: 13px; }
.usuarios-acceso button.activo { border-color: var(--primario); background: var(--fondo-claro); }
.usuarios-acceso small { color: var(--tinta-3); font-weight: 400; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--naranja-suave); color: var(--naranja); font-weight: 600; font-size: 13px; flex: none; }
.usuarios-acceso .avatar { width: 44px; height: 44px; font-size: 16px; }
.puntos-pin { display: flex; gap: 12px; justify-content: center; margin: 4px 0; }
.puntos-pin span { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #cbd5e1; }
.puntos-pin span.lleno { background: var(--primario); border-color: var(--primario); }
.teclado-pin { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.teclado-pin button { min-height: 52px; font-size: 20px; font-weight: 500; border: 1px solid var(--linea); border-radius: var(--radio); background: #fff; cursor: pointer; }
.teclado-pin button:active { background: var(--fondo-claro); }
.btn-empezar { min-height: 44px; border: 0; border-radius: var(--radio); background: var(--primario); color: #fff; font-weight: 600; cursor: pointer; width: 100%; }
.btn-empezar:hover { background: var(--primario-osc); }
.version-linea { display: flex; align-items: center; gap: 10px; color: var(--tinta-3); font-size: 12px; }
.version-linea::before, .version-linea::after { content: ''; flex: 1; border-top: 1px solid var(--linea); }

/* ---------------- punto de venta ---------------- */
.pv { position: fixed; inset: 0; display: grid; grid-template-columns: 148px minmax(0, 1fr) 512px; grid-template-rows: 62px minmax(0, 1fr); background: #fff; z-index: 40; font-family: 'Poppins', sans-serif; }
.pv-barra { grid-column: 1 / 3; grid-row: 1; display: flex; align-items: center; padding: 0 1rem; background: #fff; filter: drop-shadow(rgba(0, 0, 0, .11) 0 0 5px); z-index: 3; min-width: 0; }
.pv-barra .volver { display: inline-flex; align-items: center; color: var(--primario); text-decoration: none; margin-right: 4px; }
.pv-barra .volver svg { width: 22px; height: 22px; }
.pv-barra .marca { font-size: 22px; margin: .5rem .75rem .5rem .5rem; white-space: nowrap; }
.pv-barra .marca .punto-marca { width: 26px; height: 26px; font-size: 14px; }
.pv-buscar { flex: 1; position: relative; display: flex; align-items: center; justify-content: space-between; height: 48px; border: 1px solid rgba(0, 180, 180, .3); border-radius: .5rem; padding: .5rem 10px .5rem 14px; background: #fff; min-width: 0; }
.pv-buscar:focus-within { box-shadow: inset 0 0 0 1.5px rgba(0, 180, 180, .3); }
.pv-buscar input { flex: 1; border: 0; outline: 0; font-family: inherit; font-size: 24px; font-weight: 400; color: #666; background: none; min-width: 0; height: 100%; }
.pv-buscar input::placeholder { color: #9e9e9e; }
.pv-buscar .pista { font-size: 14px; color: #acacac; margin-right: 10px; white-space: nowrap; line-height: 21px; }
.pv-buscar svg { color: var(--primario); width: 20px; height: 20px; flex: none; }
.pv-iconos { display: flex; gap: 14px; margin-left: 10px; align-items: center; }
.pv-icono { width: 40px; height: 40px; display: grid; place-items: center; border: 0; background: none; color: var(--primario); cursor: pointer; border-radius: .375rem; }
.pv-icono.caja { border: 1px solid #e2e8f0; color: grey; }
.pv-icono:hover { background: #f1f5f9; }
.pv-icono.apagado { color: #cbd5e1; }
.pv-icono svg { width: 22px; height: 22px; }
/* categorías */
.pv-cats { grid-row: 2; grid-column: 1; display: flex; flex-direction: column; min-height: 0; }
.pv-nuevo { flex: none; display: flex; align-items: center; justify-content: center; gap: 5px; height: 50px; border: 0; background: #9b77c7; color: #fff; font-family: inherit; font-size: 13px; font-weight: 600; line-height: 22px; cursor: pointer; }
.pv-cats .lista { flex: 1; overflow-y: auto; min-height: 0; margin: 0; padding: 0; background: #f1fbfb; border: 1px solid var(--primario); }
.pv-cat { display: block; width: 100%; border: 0; border-bottom: 1px solid var(--primario); background: transparent; color: var(--primario); font-family: inherit; font-weight: 600; font-size: 16px; line-height: 22px; padding: .75rem .25rem; cursor: pointer; text-align: center; overflow-x: hidden; transition: .3s; }
.pv-cat:last-child { border-bottom: 0; }
.pv-cat:hover { background: var(--primario); color: #fff; opacity: .5; }
.pv-cat.activo { background: var(--primario); color: #fff; opacity: 1; }
.pv-acciones { flex: none; border: 0; background: var(--naranja); color: #fff; font-family: inherit; font-weight: 600; font-size: 13px; height: 50px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.pv-acciones svg { width: 20px; height: 20px; }
/* productos */
.pv-productos { grid-row: 2; grid-column: 2; overflow-y: scroll; padding: 1rem 1rem 30px; min-height: 0; }
.pv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); grid-auto-rows: max-content; gap: 16px 32px; }
.pv-prod { position: relative; width: 170px; margin: 0 auto; border: 0; padding: 0; background: none; border-radius: 15px; cursor: pointer; font-family: inherit; transition: .3s; }
.pv-prod::before { content: ''; position: absolute; inset: 0; border-radius: 15px; transition: .3s; z-index: 0; }
.pv-prod .pv-contenido { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; background: #fff; padding: 2rem .2rem 1.5rem; border-radius: 15px; }
.pv-prod.marcado::before { background-color: rgba(0, 179, 179, .55); }
.pv-prod.marcado .pv-contenido { background: transparent; }
.pv-prod.marcado .pv-img { border-color: #fff; }
.pv-prod.resaltado::before { background-color: rgba(0, 179, 179, .18); box-shadow: 0 0 0 2px var(--primario); }
.pv-prod.resaltado .pv-contenido { background: transparent; }
.pv-precio { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 2; background: var(--primario); color: #fff; font-size: 14px; font-weight: 700; line-height: 18px; border-radius: 20px; padding: .18rem .75rem; white-space: nowrap; text-transform: lowercase; }
.pv-precio::first-letter { text-transform: uppercase; }
.pv-img { display: block; width: 140px; height: 140px; object-fit: cover; border-radius: 10px; border: 1px solid transparent; background: #fff; }
.pv-img.inicial { display: grid; place-items: center; font-size: 34px; font-weight: 700; color: #9adede; background: #f1fbfb; }
.pv-img-marco { position: relative; display: block; }
.sello-ref { position: absolute; left: 6px; right: 6px; top: 50%; transform: translateY(-50%); background: rgba(15, 23, 42, .62); color: #fff; font-size: 11px; font-weight: 600; text-align: center; letter-spacing: .02em; padding: 4px 2px; border-radius: 6px; pointer-events: none; }
.miniatura.referencial { border: 1.5px dashed #f59e0b; }
/* verificar fotos referenciales */
.fotos-ref { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.foto-ref { background: #fff; border: 1px solid var(--linea-2); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 6px; position: relative; }
.foto-ref.elegida { border-color: var(--primario); box-shadow: 0 0 0 2px var(--primario); }
.foto-ref .marco-img { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: #fff; cursor: zoom-in; }
.foto-ref .marco-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.foto-ref .nombre { font-size: 13px; font-weight: 600; line-height: 1.25; color: var(--tinta); min-height: 32px; }
.foto-ref .meta { font-size: 12px; color: var(--tinta-3); }
.foto-ref .botones { display: flex; gap: 6px; margin-top: auto; }
.foto-ref .botones .btn { flex: 1; padding: 6px 4px; font-size: 13px; }
.foto-ref input[type=checkbox] { position: absolute; top: 16px; left: 16px; width: 18px; height: 18px; z-index: 2; accent-color: var(--primario); }
/* equipo no autorizado */
.equipo-bloqueado { text-align: center; align-items: center; }
.equipo-bloqueado h2 { margin: 6px 0 4px; font-size: 22px; color: var(--tinta); }
.icono-candado svg { width: 54px; height: 54px; color: var(--primario); stroke-width: 1.6; }
.codigo-equipo { font-size: 30px; font-weight: 700; letter-spacing: .12em; color: var(--primario); background: #f1fbfb; border-radius: 10px; padding: 10px 18px; margin: 10px 0 4px; }
.equipos-lista .estado { font-size: 12px; font-weight: 600; border-radius: 20px; padding: 2px 10px; }
.equipos-lista .estado.pendiente { background: #fff7e6; color: #b45309; }
.equipos-lista .estado.aprobado { background: #e8f8f2; color: #047857; }
.equipos-lista .estado.rechazado { background: #fdecec; color: #b91c1c; }
.pv-stock { position: absolute; top: 10rem; left: 50%; transform: translateX(-50%); z-index: 2; background: var(--naranja); color: #fff; font-size: 15px; font-weight: 700; height: 22px; line-height: 22px; border-radius: 20px; padding: 0 .75rem; white-space: nowrap; }
.pv-nombre { color: #666; font-size: 16px; font-weight: 400; line-height: 21.28px; margin-top: 1rem; text-align: center; width: 100%; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pv-mas { grid-column: 1 / -1; text-align: center; color: #666; font-size: 18px; padding: 12px; }
/* ticket */
.pv-ticket { grid-column: 3; grid-row: 1 / 3; display: flex; flex-direction: column; background: #fff; min-height: 0; width: 512px; }
.pv-cliente { flex: none; height: 62px; display: flex; align-items: center; justify-content: space-between; padding: 15px 20px; background: var(--primario); color: #fff; }
.pv-cliente .nombre-cliente { display: flex; align-items: center; min-width: 0; cursor: pointer; font-size: 15px; font-weight: 700; line-height: 28px; text-transform: capitalize; }
.pv-cliente .nombre-cliente svg { width: 18px; height: 18px; margin-right: .75rem; flex: none; }
.pv-cliente .nombre-cliente span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 300px; }
.pv-cliente .nombre-cliente.debe { color: #ffd0b5; }
.pv-cliente .iconos { display: flex; gap: .5rem; align-items: center; }
.pv-cliente button.icono { width: 32px; height: 32px; border: 0; background: none; color: #fff; cursor: pointer; border-radius: 6px; display: grid; place-items: center; }
.pv-cliente button.icono svg { width: 24px; height: 24px; }
.pv-cliente button.icono:hover { background: rgba(255, 255, 255, .16); }
.pv-franja { flex: none; height: 6px; background: var(--naranja-franja); }
.pv-pantalla { flex: 1; display: flex; flex-direction: column; justify-content: space-between; background: #f1fbfb; min-height: 0; overflow: hidden; padding-bottom: 10px; }
.pv-deuda { background: #fff3eb; color: #c2410c; font-size: 14px; padding: 6px 14px; font-weight: 500; }
.pv-lineas { flex: 1; display: flex; flex-direction: column; overflow-y: auto; padding: 1rem 14px; min-height: 0; }
.pv-lineas > :first-child { margin-top: auto !important; }
.pv-linea { position: relative; display: flex; align-items: center; justify-content: space-between; background: #fff; border-radius: 10px; margin-top: 10px; min-height: 70px; padding: .25rem .75rem; cursor: pointer; }
.pv-linea .quitar { flex: none; border: 0; background: none; color: var(--primario); padding: 0; margin-right: 10px; cursor: pointer; display: grid; place-items: center; }
.pv-linea .quitar svg { width: 24px; height: 24px; }
.pv-linea .detalle { flex: 1; min-width: 0; padding-right: 1rem; overflow: hidden; }
.pv-linea .sup { display: block; color: #9e9e9e; font-size: 14px; font-weight: 600; }
.pv-linea .nom { display: block; color: #9e9e9e; font-size: 24px; font-weight: 400; line-height: 26px; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-linea .inf { display: block; color: #9e9e9e; font-size: 18px; line-height: 21.28px; text-transform: lowercase; }
.pv-linea .inf .guion { margin: 0 8px; }
.pv-linea .lado { display: flex; align-items: center; gap: 8px; }
.pv-linea .imp { color: #9e9e9e; font-size: 22px; line-height: 26px; font-variant-numeric: tabular-nums; }
.pv-linea .editar { border: 0; background: none; padding: 0; color: #fff; cursor: pointer; display: none; place-items: center; }
.pv-linea .editar svg { width: 20px; height: 20px; }
.pv-linea .etq { display: inline-block; font-size: 13px; font-weight: 600; padding: 0 8px; border-radius: 20px; border: 1.5px solid #9e9e9e; color: #9e9e9e; margin-left: 6px; text-transform: none; }
.pv-linea.sel { background: var(--naranja); }
.pv-linea.sel .sup, .pv-linea.sel .nom, .pv-linea.sel .inf, .pv-linea.sel .imp { color: #fff; }
.pv-linea.sel .etq { border-color: #fff; color: #fff; }
.pv-linea.sel .editar { display: grid; }
.pv-linea.recien { animation: destello .6s ease-out; }
.pv-total { flex: none; display: flex; flex-direction: column; height: 59px; margin-top: 1.5rem; padding: 0 40px 0 20px; }
.pv-total .cuenta { font-size: 14px; font-weight: 700; color: #020817; text-align: right; line-height: 15px; }
.pv-total .fila-total { display: flex; justify-content: space-between; }
.pv-total .fila-total span { color: #575656; font-size: 34px; font-weight: 700; line-height: 39px; font-variant-numeric: tabular-nums; }
.pv-total .fila-total span:last-child { font-weight: 600; }
.pv-total .desc { font-size: 14px; font-weight: 600; color: #c2410c; line-height: 15px; }
/* elegir unidad (como Casa Market, dentro del ticket) */
.pv-elegir { flex: 1; overflow-y: auto; padding: 2rem 2rem 1rem; }
.pv-elegir .sup { color: #9e9e9e; font-size: 14px; font-weight: 600; }
.pv-elegir .nombre { color: var(--primario); font-size: 2rem; font-weight: 400; line-height: 38px; margin: 0 0 1.25rem; }
.pv-elegir .nombre small { font-size: 1.5rem; }
.pv-elegir .subtitulo { color: var(--primario); font-size: 1.2rem; line-height: 38px; }
.pv-elegir label { display: flex; align-items: center; gap: 10px; font-size: 1.2rem; color: #334155; padding: 6px 0; cursor: pointer; }
.pv-elegir label input { width: 18px; height: 18px; accent-color: var(--primario); }
.pv-elegir label.sin-precio { color: #b0b0b0; cursor: not-allowed; }
.pv-elegir .acciones { display: flex; gap: 1.75rem; justify-content: center; margin-top: 1.5rem; padding: 0 4rem; }
.pv-elegir .acciones .btn { flex: 1; min-height: 44px; font-size: 16px; }
/* teclado del ticket */
.pv-teclado { flex: none; position: relative; background: var(--primario); padding: 1rem 2rem; }
.pv-plegar { position: absolute; top: -1rem; left: calc(50% - 1rem); width: 2rem; height: 2rem; border-radius: 50%; border: 0; background: var(--naranja); color: #fff; display: grid; place-items: center; cursor: pointer; z-index: 3; transition: .5s; }
.pv-plegar svg { width: 16px; height: 16px; }
.pv-plegar.girado { transform: rotate(180deg); }
.pv-modos { display: flex; gap: 5px; margin: .5rem 0 1rem; overflow-x: auto; }
.pv-modos button { border: 0; border-radius: 20px; background: #fff; color: #666; font-family: inherit; font-size: 1rem; font-weight: 600; padding: 0 10px; height: 33px; line-height: 33px; cursor: pointer; white-space: nowrap; transition: .3s; }
.pv-modos button.activo { background: var(--naranja); color: #fff; font-weight: 700; }
.pv-modos button:disabled { opacity: .5; cursor: not-allowed; }
.pv-cuerpo-teclado { display: flex; justify-content: space-between; gap: .5rem; }
.teclado-cm { display: flex; justify-content: flex-start; }
.teclado-cm .numeros { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 180px; }
.teclado-cm .operadores { display: flex; flex-direction: column; gap: 10px; margin-left: 1.25rem; }
.teclado-cm button { width: 52px; height: 51px; border-radius: 50%; border: 0; background: #fff; color: #020817; font-family: inherit; font-size: 26px; font-weight: 400; line-height: 51px; cursor: pointer; display: grid; place-items: center; padding: 0; }
.teclado-cm button:active { transform: scale(.95); }
.teclado-cm .op svg { width: 24px; height: 24px; color: var(--primario); }
.teclado-cm .barra-mas, .teclado-cm .barra-menos { position: relative; display: block; width: 25px; height: 5px; background: var(--primario); }
.teclado-cm .barra-mas::after { content: ''; position: absolute; width: 5px; height: 25px; top: -10px; left: 10px; background: var(--primario); }
.pv-cobro { display: grid; grid-template-rows: repeat(4, minmax(0, 1fr)); gap: .5rem; padding: .5rem; width: 150px; }
.btn-pagar { grid-row: 1 / 4; border: 0; border-radius: 12px; background: #3bea4d; color: #fff; font-family: inherit; font-size: 20px; font-weight: 500; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; cursor: pointer; padding: 8px 16px; }
.btn-pagar:hover { background: rgba(59, 234, 77, .7); }
.btn-pagar svg { width: 64px; height: 64px; }
.btn-pagar:disabled { background: #cbcbcb; color: #fff; cursor: not-allowed; }
.btn-rapido { grid-row: 4; border: 0; border-radius: 12px; background: #fff; color: #6b7280; font-family: inherit; font-weight: 700; font-size: 18px; cursor: pointer; padding: 4px 8px; }
.btn-rapido:hover { background: rgba(255, 255, 255, .7); }
.btn-rapido:disabled { background: #e5e7eb; color: #fff; cursor: not-allowed; }
.pv-sin-teclado { flex: none; position: relative; display: flex; gap: 22px; padding: 1rem 2rem; background: var(--primario); }
.pv-sin-teclado .btn-rapido, .pv-sin-teclado .btn-pagar { flex: 1; height: 45px; flex-direction: row; gap: 8px; font-size: 18px; grid-row: auto; }
.pv-sin-teclado .btn-pagar svg { width: 26px; height: 26px; }
.pv-sin-teclado .btn-rapido { color: #666; font-weight: 600; }
.pv-caja-cerrada { margin: auto 16px 0; padding: 18px; border-radius: 10px; background: #fff; border: 1.5px dashed var(--naranja); text-align: center; font-size: 15px; }
.pv-caja-cerrada strong { display: block; font-size: 18px; margin-bottom: 6px; }

/* ---------------- pantalla de pago (medidas de Casa Market) ---------------- */
.pago { position: fixed; inset: 0; z-index: 45; display: flex; background: #fff; font-family: 'Poppins', sans-serif; overflow: hidden; }
.pago-izq { flex: 1; display: flex; flex-direction: column; min-width: 0; overflow-y: auto; }
.pago-izq .mini-cabecera { flex: none; height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 1.75rem; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .05); }
.pago-izq .mini-cabecera .izq { display: flex; align-items: center; gap: 1rem; }
.pago-izq .mini-cabecera .tienda { font-weight: 500; margin-left: .5rem; }
.pago-izq .mini-cabecera .der { display: flex; align-items: center; gap: .5rem; }
.pago-izq .mini-cabecera .version { font-size: 12px; color: rgba(100, 116, 139, .3); }
.pago-izq .mini-cabecera .pildora-usuario { height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--primario); color: var(--primario); font-size: 14px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; }
.pago-titulo { display: flex; align-items: center; justify-content: space-between; padding: 0 30px; margin: 1.5rem 0; }
.pago-titulo .izq { display: flex; align-items: center; gap: 1.5rem; }
.pago-titulo h1 { font-size: 22px; font-weight: 400; margin: 0; }
.pago-titulo .total { font-size: 22px; font-weight: 500; }
.pago-titulo button { border: 0; background: none; padding: 0; cursor: pointer; display: grid; place-items: center; color: #000; }
.pago-titulo button svg { width: 20px; height: 20px; }
.pago-docs { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; padding: 0 30px; margin-bottom: 2rem; }
.pago-doc { height: 40px; padding: 8px 16px; border: 0; border-bottom: 2px solid var(--naranja); border-radius: 0; background: rgba(255, 89, 0, .1); color: var(--naranja); font-family: inherit; font-size: 16px; font-weight: 500; text-transform: capitalize; cursor: pointer; }
.pago-doc.activo { background: var(--naranja); color: #fff; }
.pago-doc:not(.activo) { background: transparent; border-bottom-color: #f3c6ad; color: #c2410c; }
.pago-doc-datos { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.pago-doc-datos:empty { display: none; }
.pago-doc-datos .fila-doc { display: flex; gap: 8px; }
.pago-doc-datos label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--tinta-3); flex: none; }
.pago-doc-datos .fila-doc label { flex: 0 0 150px; }
.pago-doc-datos .fila-doc label.ancho { flex: 1 1 auto; }
.pago-doc-datos .entrada { height: 36px; font-size: 15px; }
.qr-ticket svg { display: inline-block; margin: 4px 0; }
.pago-docs .historica { margin-left: auto; height: 36px; padding: 0 12px; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; color: #475569; font-size: 14px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; }
.pago-cliente-bloque { padding: 0 30px; }
.pago-cliente-bloque h3 { color: #666; font-size: 18px; font-weight: 400; line-height: 21px; margin: 0; }
.pago-cliente { display: flex; align-items: center; gap: 13px; margin-top: 10px; }
.pago-cliente .nombre-pago { width: 22rem; max-width: 100%; height: 3rem; padding: 1.1rem 1rem 0; border-radius: 8px; border: 1px solid #fff; background: #f5f5f5; color: #666; font-family: inherit; font-size: 20px; line-height: 24px; text-transform: capitalize; }
.pago-cliente .btn { width: 130px; border-radius: .5rem; }
.pago-enlaces { display: flex; gap: 19px; margin: 1rem 0 0; font-size: 16px; flex-wrap: wrap; }
.pago-enlaces button { border: 0; background: none; padding: 0; color: var(--primario); font-family: inherit; font-size: 16px; text-decoration: underline; cursor: pointer; }
.pago-enlaces button:last-child { color: var(--naranja); }
.pago-metodos { display: flex; flex-direction: column; padding: 20px 30px; margin-bottom: 21px; }
.pago-metodos h3 { color: #666; font-size: 1.5rem; font-weight: 400; line-height: 28px; margin: 0 0 .75rem; }
.pago-tabs { display: flex; gap: 0; margin-bottom: 1.25rem; }
.pago-tabs button { height: 40px; padding: 8px 16px; border: 0; border-bottom: 2px solid transparent; background: none; color: #141f29; font-family: inherit; font-size: 14px; text-transform: capitalize; cursor: pointer; }
.pago-tabs button.activo { color: var(--naranja); border-bottom-color: var(--naranja); }
.metodos { position: relative; display: flex; flex-wrap: wrap; gap: 30px; width: 100%; padding: 0 2rem 2rem 0; box-sizing: border-box; }
.metodo { --color: #61948e; width: 110px; height: 105px; border-radius: 8px; border: 3px solid var(--color); background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; cursor: pointer; transition: .3s; font-family: inherit; }
.metodo span { color: var(--color); font-size: 1rem; font-weight: 400; line-height: 21px; text-transform: uppercase; }
.metodo svg { width: 30px; height: 30px; color: var(--color); }
.metodo.activo { background: var(--color); }
.metodo.activo span, .metodo.activo svg { color: #fff; }
.metodo.m-efectivo { --color: #ff5900; }
.metodo.m-transferencia { --color: #61948e; }
.metodo.m-yape { --color: #b05be5; }
.metodo.m-plin { --color: #00b2c8; }
.metodo.m-tarjeta { --color: #94c9f0; }
.metodo.m-credito { --color: #ff5f85; }
.pago-nota { margin-top: 0; }
.pago-der { width: 535px; flex: none; display: flex; flex-direction: column; justify-content: space-between; min-height: 0; }
.pago-recibido { flex: none; height: 11.25rem; padding: 1rem 0; background: var(--primario); display: flex; flex-wrap: wrap; align-items: center; justify-content: center; text-align: center; }
.pago-recibido .titulo { display: flex; flex-direction: column; align-items: center; }
.pago-recibido .etq { color: #fff; font-size: 24px; font-style: italic; font-weight: 700; line-height: 28px; text-transform: uppercase; }
.pago-recibido .monto { color: #fff; font-size: 60px; font-weight: 700; line-height: 69px; font-variant-numeric: tabular-nums; }
.pago-recibido .cambio { width: 100%; display: flex; gap: 10px; justify-content: center; margin-top: .5rem; }
.pago-recibido .cambio span { background: #fff; border-radius: 10px; color: #868686; font-size: 23px; font-weight: 600; height: 34px; line-height: 26px; padding: .25rem 1.25rem; }
.pago-recibido .cambio span.falta { background: var(--naranja); color: #fff; }
.pago-chips { flex: 1; overflow-y: auto; padding: 2rem 0; display: flex; flex-direction: column; align-items: center; background: #fff; min-height: 80px; }
.pago-chip { position: relative; display: flex; align-items: center; justify-content: space-between; width: 23rem; height: 50px; margin: 0 0 .75rem -44px; padding: 10px 20px; border-radius: 10px; background: #61948e; color: #fff; cursor: pointer; }
.pago-chip.c-efectivo { background: #f3a46b; }
.pago-chip.c-yape { background: #b05be5; }
.pago-chip.c-plin { background: #00b2c8; }
.pago-chip.c-tarjeta { background: #94c9f0; }
.pago-chip.c-credito { background: #ff5f85; }
.pago-chip.activo { box-shadow: 0 0 0 3px rgba(0, 0, 0, .12); }
.pago-chip .tipo { font-size: 26px; font-weight: 600; line-height: 30px; text-transform: uppercase; }
.pago-chip .valor { font-size: 26px; font-weight: 400; line-height: 31px; font-variant-numeric: tabular-nums; }
.pago-chip .ref { position: absolute; top: -18px; left: 16px; background: #fff; color: #666; border: 1.5px solid #9e9e9e; border-radius: 20px; font-size: .8rem; padding: 1px 8px; }
.pago-chip .quitar { position: absolute; left: calc(100% + .25rem); width: 34px; height: 34px; border-radius: 50%; border: 0; background: none; color: var(--primario); display: grid; place-items: center; cursor: pointer; }
.pago-chip .quitar svg { width: 30px; height: 30px; }
.pago-ref { border: 0; background: none; color: var(--primario); text-decoration: underline; font-family: inherit; font-size: 15px; cursor: pointer; }
.pago-teclado { flex: none; height: 22.5rem; padding: 20px 30px; background: var(--primario); display: flex; flex-direction: column; align-items: center; }
.pago-rapidos { display: flex; gap: .5rem; margin-bottom: 1rem; flex-wrap: wrap; justify-content: center; }
.pago-rapidos button { border: 0; border-radius: 20px; background: #f1fbfb; color: var(--primario); font-family: inherit; font-size: 25px; font-weight: 700; line-height: 29px; padding: 6px 1.25rem; cursor: pointer; transition: .3s; }
.pago-rapidos button.exacto { background: var(--naranja); color: #fff; font-size: 20px; line-height: 22px; }
.pago-cuerpo { display: flex; gap: 1.25rem; align-items: stretch; flex: 1; min-height: 0; }
.pago-cuerpo .btn-pagar { width: 133px; grid-row: auto; border-radius: 10px; font-size: 24px; box-shadow: rgba(0, 0, 0, .25) 0 4px 4px; }
.pago-cuerpo .btn-pagar.imprimir { font-size: 16px; }
.pago-acciones { display: flex; flex-direction: column; gap: .5rem; }
.pago-acciones .btn-pagar { flex: 1; }
.pago-acciones .btn-pagar.imprimir { flex: none; height: 44px; flex-direction: row; background: #fff; color: #666; box-shadow: none; font-size: 15px; font-weight: 600; }
.pago-acciones .btn-pagar.imprimir svg { width: 18px; height: 18px; color: #666; }
.pago-listo { position: fixed; inset: 0; z-index: 46; display: grid; place-items: center; background: rgba(2, 8, 23, .45); }
.pago-listo .caja { background: #fff; border-radius: 16px; padding: 30px 34px; width: min(440px, 92vw); text-align: center; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
.pago-listo .check { width: 64px; height: 64px; margin: 0 auto 10px; border-radius: 50%; background: #3bea4d; color: #fff; display: grid; place-items: center; }
.pago-listo .check svg { width: 36px; height: 36px; }
.pago-listo .vuelto-grande { font-size: 40px; font-weight: 700; color: var(--naranja); font-variant-numeric: tabular-nums; }

/* ---------------- ficha de producto ---------------- */
.ficha-producto { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; max-width: 1120px; margin: 0 auto; }
.ficha-producto .tarjeta { padding: 20px 22px; }
.ficha-producto .bloque + .bloque { margin-top: 22px; }
.fondo-claro { background: var(--fondo-claro); }
.vista.fondo-claro { background: var(--fondo-claro); }
.codigo-fila { display: flex; gap: 10px; align-items: center; }
.codigo-fila .entrada { border-color: var(--primario); }
.codigo-fila .icono-barras { color: var(--primario); display: flex; align-items: center; gap: 6px; font-weight: 500; border: 0; background: none; cursor: pointer; }
.codigo-fila .icono-barras svg { width: 26px; height: 26px; }
.foto-zona { display: flex; gap: 14px; align-items: flex-start; }
.foto-producto { width: 84px; height: 96px; border-radius: 8px; border: 1px solid var(--linea); background: #fff center / contain no-repeat; display: grid; place-items: center; color: var(--tinta-3); font-size: 11px; text-align: center; flex: none; position: relative; }
.foto-acciones { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.foto-acciones .btn-texto { padding: 0; min-height: 26px; font-weight: 500; }
.selector { display: flex; align-items: stretch; border: 1px solid var(--primario); border-radius: var(--radio); overflow: hidden; position: relative; }
.selector .entrada { border: 0; border-radius: 0; text-transform: uppercase; color: var(--primario-osc); }
.selector .entrada:focus { box-shadow: none; }
.selector .flecha { width: 38px; background: var(--primario); color: #fff; display: grid; place-items: center; flex: none; }
.selector .flecha svg { width: 18px; height: 18px; }
.alternos { border: 1px solid var(--primario); border-radius: var(--radio); padding: 8px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 44px; position: relative; }
.alternos .alt { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--linea); border-radius: 999px; padding: 3px 10px; font-size: 12px; }
.alternos .alt button { border: 0; background: none; padding: 0; cursor: pointer; display: grid; place-items: center; }
.alternos .alt button svg { width: 14px; height: 14px; }
.alternos input { border: 0; outline: 0; flex: 1; min-width: 140px; font-size: 13px; }
.precios-par { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ganancia { background: #f3f4f6; border-radius: var(--radio); padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; color: var(--tinta-3); font-weight: 500; }
.ganancia.perdida { background: var(--peligro-suave); color: var(--peligro); }
.agregar-fila { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-top: 1px solid var(--linea-2); color: var(--tinta-2); cursor: pointer; background: none; border-left: 0; border-right: 0; border-bottom: 0; width: 100%; font-size: 14px; }
.agregar-fila:hover { color: var(--primario-osc); }
.agregar-fila svg { width: 20px; height: 20px; }
.conversion { display: flex; align-items: center; gap: 12px; border: 1.5px solid var(--primario); border-radius: 10px; padding: 10px 14px; margin-top: 10px; }
.conversion .txt { flex: 1; }
.conversion .txt strong { display: block; font-size: 14.5px; font-weight: 600; text-transform: uppercase; }
.conversion .txt span { font-size: 13px; color: var(--tinta-3); }
.conversion .redondo { width: 28px; height: 28px; border-radius: 50%; border: 0; background: var(--primario); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; }
.conversion .redondo svg { width: 15px; height: 15px; }
.tramos-resumen { font-size: 12px; color: var(--naranja-osc); }
.tabla-stock { width: 100%; border-collapse: collapse; font-size: 13px; }
.tabla-stock th { font-size: 11.5px; color: var(--primario-osc); font-weight: 600; text-align: left; padding: 6px; }
.tabla-stock td { padding: 6px; }
.pie-ficha { display: flex; justify-content: center; gap: 18px; margin: 26px 0 10px; }
.pie-ficha .btn { min-width: 170px; min-height: 44px; font-size: 15px; }
.modal-titulo-subrayado { font-size: 19px; font-weight: 600; color: var(--primario); border-bottom: 1px solid var(--primario); padding-bottom: 4px; margin-bottom: 16px; }
.equivale { text-align: center; color: var(--tinta-2); margin: 10px 0; }
.tramo-fila { display: grid; grid-template-columns: 1fr 1fr 1fr 32px; gap: 8px; align-items: end; margin-top: 8px; }
.unidad-bloque { background: #f3f4f6; border-radius: 8px; padding: 10px 12px; margin-top: 10px; }
.unidad-bloque .titulo { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--tinta-2); font-weight: 500; text-transform: uppercase; }
.unidad-bloque .detalle { background: #fff; border-radius: 8px; padding: 10px 12px; margin-top: 8px; }

/* ---------------- compra ---------------- */
.compra-pie { position: sticky; bottom: -40px; background: #fff; border-top: 1px solid var(--linea); padding: 12px 0; margin-top: 16px; display: flex; align-items: center; gap: 12px; }
.total-compra { text-align: right; }
.total-compra small { display: block; font-size: 11px; color: var(--tinta-3); }
.total-compra strong { font-size: 18px; color: var(--naranja); }

/* ---------------- caja ---------------- */
.caja-info { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.caja-info .dato { background: #f8fafc; border-radius: 10px; padding: 10px 12px; }
.caja-info .dato small { display: block; font-size: 11px; color: var(--tinta-3); text-transform: uppercase; }
.caja-info .dato strong { font-weight: 600; }
.efectivo-caja { background: var(--primario); color: #fff; border-radius: 16px; padding: 22px; }
.efectivo-caja .monto { font-size: 40px; font-weight: 700; font-variant-numeric: tabular-nums; }
.efectivo-caja .sub { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.efectivo-caja .sub div { background: rgba(255, 255, 255, .16); border-radius: 12px; padding: 12px; }
.efectivo-caja .sub strong { display: block; font-size: 20px; }
.efectivo-caja small { opacity: .9; }
.acciones-caja { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.accion-caja { display: flex; flex-direction: column; gap: 2px; text-align: left; border: 1px solid var(--linea); border-radius: 12px; padding: 14px; background: #fff; cursor: pointer; }
.accion-caja:hover { border-color: var(--primario); }
.accion-caja strong { font-weight: 600; }
.accion-caja span { font-size: 12px; color: var(--tinta-3); }
.accion-caja svg { width: 22px; height: 22px; color: var(--primario); margin-bottom: 4px; }
.renglon { display: flex; justify-content: space-between; padding: 6px 0; font-variant-numeric: tabular-nums; }
.renglon.mas strong { color: #16a34a; } .renglon.menos strong { color: var(--peligro); }
.barra-medio { height: 6px; border-radius: 3px; background: var(--linea-2); overflow: hidden; margin-top: 4px; }
.barra-medio div { height: 100%; background: var(--primario); }

/* ---------------- modal y avisos ---------------- */
#capa-modal .fondo-modal { position: fixed; inset: 0; background: rgba(2, 8, 23, .45); display: grid; place-items: center; z-index: 100; padding: 16px; animation: aparecer .12s ease-out; }
@keyframes aparecer { from { opacity: 0; } }
.modal { background: #fff; border-radius: 12px; width: min(540px, 100%); max-height: calc(var(--alto, 100dvh) - 32px); display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
.modal.ancho { width: min(860px, 100%); }
.modal.muy-ancho { width: min(1180px, 100%); }
.modal.chico { width: min(420px, 100%); }
.modal-cabeza { display: flex; align-items: center; gap: 10px; padding: 16px 22px 10px; }
.modal-cabeza h2 { margin-right: auto; color: var(--primario); font-size: 19px; }
.modal-cuerpo { padding: 8px 22px 18px; overflow: auto; }
.modal-pie { display: flex; gap: 12px; justify-content: flex-end; padding: 12px 22px 18px; flex-wrap: wrap; }
.modal-pie.centrado { justify-content: center; }
.modal-pie.centrado .btn { min-width: 150px; }
.btn-cancelar-rosa { border-color: #f59fb0; color: #e5486a; }
.btn-cancelar-rosa:hover { background: #fff1f4; }

#avisos { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { pointer-events: auto; background: var(--tinta); color: #fff; padding: 11px 18px; border-radius: var(--radio); font-weight: 500; box-shadow: var(--sombra); max-width: min(560px, 92vw); animation: subir .18s ease-out; }
.toast.error { background: var(--peligro); }
.toast.ok { background: var(--primario-osc); }
@keyframes subir { from { transform: translateY(8px); opacity: 0; } }
.nota { padding: 12px 14px; border-radius: var(--radio); background: var(--info-suave); color: #1e40af; font-size: 13.5px; }
.nota.aviso { background: var(--aviso-suave); color: #92400e; }
.nota.peligro { background: var(--peligro-suave); color: var(--peligro); }
.nota.naranja { background: var(--naranja-suave); color: var(--naranja-osc); }
.caja-foto { border: 2px dashed var(--linea); border-radius: var(--radio-g); padding: 22px; text-align: center; background: #fafafa; }
.caja-foto.arrastrando { border-color: var(--primario); background: var(--fondo-claro); }
.vista-foto { max-width: 100%; max-height: 260px; border-radius: var(--radio); display: block; margin: 0 auto; }
.cargando { display: inline-block; width: 18px; height: 18px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: girar .7s linear infinite; vertical-align: -3px; }
@keyframes girar { to { transform: rotate(360deg); } }
.vuelto { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 16px; border-radius: var(--radio-g); background: var(--primario-suave); color: var(--primario-osc); font-weight: 600; }
.vuelto .monto { font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; }
.vuelto.falta { background: var(--peligro-suave); color: var(--peligro); }
.vuelto.sobra { background: var(--aviso-suave); color: var(--aviso); }
.cobro-total { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 16px; border-radius: var(--radio-g); background: var(--fondo-claro); }
.cobro-total .monto { font-size: 32px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------------- gráficos ---------------- */
.grafico { position: relative; }
.grafico svg { width: 100%; height: 220px; display: block; overflow: visible; }
.grafico .barra-dato { fill: var(--primario); }
.grafico .barra-dato:hover, .grafico .barra-dato.foco { fill: var(--primario-osc); }
.grafico .eje text { fill: var(--tinta-3); font-size: 11px; font-family: var(--fuente); }
.grafico .rejilla-linea { stroke: var(--linea-2); }
.grafico .base { stroke: var(--linea); }
.tooltip { position: absolute; pointer-events: none; background: var(--tinta); color: #fff; padding: 6px 10px; border-radius: 6px; font-size: 12px; white-space: nowrap; transform: translate(-50%, -110%); z-index: 5; }
.barra-h { height: 8px; border-radius: 4px; background: var(--primario); min-width: 2px; }
.barra-h-fondo { background: var(--linea-2); border-radius: 4px; width: 100%; }

/* ---------------- impresión (80 mm) ---------------- */
#zona-impresion { display: none; }
@media print {
  @page { size: 80mm auto; margin: 0; }
  body { background: #fff; }
  body > *:not(#zona-impresion) { display: none !important; }
  #zona-impresion { display: block; }
}
.ticket-impreso { width: 72mm; margin: 0 auto; padding: 4mm 0; font-family: 'Courier New', monospace; font-size: 12px; color: #000; line-height: 1.3; }
.ticket-impreso .centro { text-align: center; }
.ticket-impreso .grande { font-size: 15px; font-weight: 700; }
.ticket-impreso hr { border: 0; border-top: 1px dashed #000; margin: 6px 0; }
.ticket-impreso table { width: 100%; border-collapse: collapse; }
.ticket-impreso td { vertical-align: top; padding: 1px 0; }
.ticket-impreso td.d { text-align: right; white-space: nowrap; padding-left: 6px; }
.ticket-impreso .total { font-size: 16px; font-weight: 700; }

/* ---------------- pantallas chicas ---------------- */
@media (max-width: 1100px) {
  .r4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ficha-producto { grid-template-columns: 1fr; }
  .caja-info { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .accesos { grid-template-columns: 1fr; }
  .compra-pie { flex-wrap: wrap; bottom: -14px; padding: 10px 0 calc(10px + env(safe-area-inset-bottom)); }
  .compra-pie .relleno, .compra-pie #n-resumen { display: none; }
  .compra-pie .casilla small { display: none; }
  .compra-pie .total-compra { margin-left: auto; }
  .compra-pie .btn-grande { flex: 1 1 100%; }
  .encabezado .acciones .btn { font-size: 13px; padding: 0 10px; }
  .encabezado h1 { font-size: 21px; }
  .vista { padding-bottom: calc(40px + env(safe-area-inset-bottom)); }
  .cuerpo { grid-template-columns: 0 minmax(0, 1fr); }
  .lateral, .marco.modo-cajon .lateral { position: fixed; top: var(--alto-cabecera); bottom: 0; left: 0; width: 260px; z-index: 50; box-shadow: var(--sombra); visibility: hidden; transform: none; }
  .marco.lateral-movil .lateral { visibility: visible; }
  .marco .lateral-cabeza { display: none; }
  .barra-filtros .ancho { min-width: 0; }
  .lupa:focus-within, .lupa.llena { width: 100%; }
  .cabecera .tienda, .cabecera .version, .pildora .ocultar-movil { display: none; }
  .marco { max-width: 100vw; overflow-x: hidden; }
  .cabecera { min-width: 0; gap: 6px; padding: 0 10px; }
  .vista { padding: 14px; }
  .pv { grid-template-columns: 84px minmax(0, 1fr); grid-template-rows: 56px minmax(0, 1fr) auto; }
  .pv-ticket { grid-column: 1 / -1; grid-row: 3; max-height: 55vh; width: auto; }
  .pv-cliente { height: 48px; }
  .pv-barra .marca, .pv-buscar .pista, #pv-red, #pv-recargar { display: none; }
  .pv-buscar { height: 40px; }
  .pv-buscar input { font-size: 17px; }
  .pv-cat { font-size: 12.5px; padding: 10px 4px; }
  .pv-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
  .pv-prod { width: 130px; }
  .pv-img { width: 104px; height: 104px; }
  .pv-stock { top: 7.6rem; font-size: 13px; }
  .pv-nombre { font-size: 14px; }
  .pv-linea .nom { font-size: 18px; }
  .pv-linea .inf, .pv-linea .imp { font-size: 15px; }
  .pv-total .fila-total span { font-size: 26px; }
  .pv-teclado { padding: 1rem; }
  .pago { flex-direction: column; overflow-y: auto; }
  .pago-izq { overflow: visible; }
  .pago-der { width: 100%; }
  .pago-recibido .monto { font-size: 40px; }
  .pago-chip { width: 80%; margin-left: 0; }
  .pago-teclado { height: auto; }
  .r2, .r3, .r4, .precios-par, .acciones-caja { grid-template-columns: 1fr; }
  .ocupa-2 { grid-column: auto; }
  .acceso-pantalla { grid-template-columns: 1fr; }
  .acceso-pantalla .lado { display: none; }
  .acceso-pantalla .formulario { padding: 24px; }
}
@media (max-width: 520px) {
  #estado-caja .txt { display: none; }
  .cabecera .marca { font-size: 17px; }
  .encabezado h1 { font-size: 20px; }
  .encabezado .acciones { width: 100%; }
  .aviso-banda { flex-wrap: wrap; }
  .aviso-banda > div { flex-basis: calc(100% - 40px); }
  .aviso-banda .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.celda-nombre { display: flex; align-items: center; gap: 8px; min-width: 220px; }
.celda-nombre small { display: block; font-size: 11px; line-height: 14px; }

/* ---------------- cierre de caja (como Casa Market) ---------------- */
.cierre-cm { padding-bottom: 0; }
.cierre-cont { max-width: 1024px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; padding-bottom: 32px; }
.cm-tarjeta { background: #fff; border: 1px solid rgba(226, 232, 240, .7); border-radius: 24px; padding: 24px; box-shadow: 0 1px 2px rgba(0, 0, 0, .05); }
.cm-tarjeta h2 { font-size: 15px; font-weight: 600; margin-bottom: 10px; }
.cm-tarjeta .tit { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; line-height: 22px; }
.cm-tarjeta .tit small { display: block; font-size: 12px; font-weight: 400; color: #64748b; }
.cm-tarjeta .monto-lado { font-size: 18px; font-weight: 700; }
.icono-suave { width: 36px; height: 36px; border-radius: 12px; display: inline-grid; place-items: center; background: #e9f9f8; color: var(--primario); flex: none; }
.icono-suave svg { width: 18px; height: 18px; }
.icono-suave.naranja { background: #fff1e8; color: var(--naranja); }
.icono-suave.verde { background: #ecfdf3; color: #16a34a; }
.icono-suave.rojo { background: #fef2f2; color: #dc2626; }
.icono-mini { width: 28px; height: 28px; border-radius: 8px; display: inline-grid; place-items: center; background: #fff; color: #64748b; border: 1px solid #e2e8f0; flex: none; }
.icono-mini svg { width: 14px; height: 14px; }
.icono-blanco { width: 36px; height: 36px; border-radius: 12px; display: inline-grid; place-items: center; background: rgba(255, 255, 255, .18); flex: none; }
.icono-blanco svg { width: 18px; height: 18px; color: #fff; }
.chip-caja { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 6px 12px; border-radius: 999px; background: #e9f9f8; box-shadow: inset 0 0 0 1px #99dee1; color: #23877f; font-size: 12px; font-weight: 600; }
.chip-caja .punto { width: 8px; height: 8px; border-radius: 50%; background: var(--primario); }
.btn-cm-alto { min-height: 40px !important; height: 40px !important; padding: 8px 16px !important; font-weight: 600; }
.sucursal { padding: 20px; }
.sucursal .cab { display: flex; align-items: center; gap: 12px; }
.sucursal .etq { margin: 0; font-size: 12px; font-weight: 500; color: #64748b; }
.sucursal .val { margin: 0; font-size: 16px; font-weight: 600; }
.datos4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.datos4 > div { display: flex; align-items: center; gap: 10px; background: #f8fafc; border-radius: 14px; padding: 10px 12px; min-width: 0; }
.datos4 small { display: block; font-size: 10px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase; color: #64748b; }
.datos4 strong { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cierre-fila { display: flex; gap: 16px; flex-wrap: wrap; }
.efectivo-cm { flex: 1.6 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 24px; border-radius: 24px; padding: 28px; color: #fff;
  background: linear-gradient(to right bottom, #00b3b3, #21a8a5, #206059); box-shadow: 0 10px 15px -3px rgba(0, 179, 179, .25), 0 4px 6px -4px rgba(0, 179, 179, .25); }
.efectivo-cm .tit { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; }
.efectivo-cm .monto { margin: 16px 0 0; font-size: 48px; line-height: 48px; font-weight: 700; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.efectivo-cm .desc { margin: 6px 0 0; font-size: 14px; color: rgba(255, 255, 255, .85); }
.efectivo-cm .sub { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: auto; }
.efectivo-cm .sub > div { background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .2); border-radius: 16px; padding: 14px; }
.efectivo-cm .sub small { display: block; font-size: 12px; font-weight: 600; color: rgba(255, 255, 255, .9); }
.efectivo-cm .sub strong { display: block; font-size: 22px; font-weight: 700; margin-top: 6px; font-variant-numeric: tabular-nums; }
.efectivo-cm .sub span { display: block; font-size: 11px; color: rgba(255, 255, 255, .75); margin-top: 2px; }
.total-turno { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.total-turno .monto { margin: 16px 0 0; font-size: 36px; line-height: 40px; font-weight: 700; font-variant-numeric: tabular-nums; }
.total-turno .desc { margin: 4px 0 0; font-size: 13px; color: #64748b; }
.total-turno .renglon { padding: 3px 0; font-size: 13px; color: #64748b; }
.total-turno .renglon.mas strong { color: #16a34a; }
.total-turno .renglon.menos strong { color: #dc2626; }
.caja-gris { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #f8fafc; border-radius: 14px; padding: 12px 14px; }
.caja-gris strong { font-size: 14px; font-weight: 600; }
.caja-gris small { display: block; font-size: 11px; color: #64748b; }
.cierre-acciones { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.accion-cm { display: flex; align-items: center; gap: 12px; width: 100%; padding: 16px; border: 1px solid rgba(226, 232, 240, .7); border-radius: 16px; background: #fff; text-align: left; cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .05); text-decoration: none; color: #020817; font: inherit; }
.accion-cm:hover { border-color: var(--primario); }
.accion-cm > div { flex: 1; min-width: 0; }
.accion-cm strong { display: block; font-size: 14px; font-weight: 600; }
.accion-cm span:not(.icono-suave) { display: block; font-size: 12px; color: #64748b; }
.accion-cm > svg { width: 16px; height: 16px; color: #94a3b8; }
.vacio-cm { margin-top: 14px; border: 1px dashed #e2e8f0; border-radius: 16px; padding: 28px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.vacio-cm svg { width: 22px; height: 22px; color: var(--naranja); background: #fff1e8; border-radius: 10px; padding: 6px; box-sizing: content-box; margin-bottom: 6px; }
.vacio-cm strong { font-size: 13px; font-weight: 600; }
.vacio-cm span { font-size: 12px; color: #64748b; max-width: 40ch; }
.lista-digital { margin-top: 12px; }
.barra-inferior { position: sticky; bottom: -40px; margin: 0 -64px -40px; display: flex; justify-content: center; gap: 12px; padding: 12px 16px; background: rgba(255, 255, 255, .9); border-top: 1px solid rgba(226, 232, 240, .7);
  box-shadow: 0 -4px 16px -8px rgba(0, 0, 0, .12); backdrop-filter: blur(6px); z-index: 5; }
.btn-cm { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; min-width: 192px; padding: 8px 24px; border-radius: 12px; font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit; }
.btn-cm svg { width: 16px; height: 16px; }
.btn-cm.borde { border: 1px solid var(--primario); color: var(--primario); background: #fff; }
.btn-cm.lleno { border: 0; background: var(--primario); color: #fff; box-shadow: 0 4px 6px -1px rgba(0, 179, 179, .25), 0 2px 4px -2px rgba(0, 179, 179, .25); }
.btn-cm.lleno:hover { background: var(--primario-osc); }
@media (max-width: 860px) {
  .datos4, .cierre-acciones, .efectivo-cm .sub { grid-template-columns: 1fr 1fr; }
  .efectivo-cm { flex-basis: 100%; }
  .barra-inferior { margin: 0 -14px -14px; bottom: -14px; }
  .btn-cm { min-width: 0; flex: 1; }
}

/* ---------------- voz en la caja ---------------- */
.pv-icono.voz.activo { background: var(--naranja); color: #fff; border-color: var(--naranja); animation: latido 1.1s ease-in-out infinite; }
.pv-icono.voz.siempre { background: var(--primario); color: #fff; border-color: var(--primario); }
@keyframes latido { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 89, 0, .45); } 50% { box-shadow: 0 0 0 8px rgba(255, 89, 0, 0); } }
.voz-burbuja { position: fixed; top: 74px; left: 50%; transform: translateX(-50%); z-index: 90; max-width: min(720px, 92vw); display: flex; align-items: center; gap: 12px;
  background: #fff; color: #0f172a; border: 1px solid #e2e8f0; border-left: 5px solid var(--primario); border-radius: 14px; padding: 12px 18px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, .15); font-size: 16px; line-height: 22px; }
.voz-burbuja[hidden] { display: none; }
.voz-burbuja .onda { width: 10px; height: 10px; border-radius: 50%; background: var(--primario); flex: none; }
.voz-burbuja.oyendo { border-left-color: var(--naranja); color: #475569; font-style: italic; }
.voz-burbuja.oyendo .onda { background: var(--naranja); animation: latido 1.1s ease-in-out infinite; }
.pv-linea .sin-stock { color: var(--naranja); font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .pv-icono.voz.activo, .voz-burbuja.oyendo .onda { animation: none; } }
.filtros-barra .entrada { width: auto; flex: none; }
.filtros-barra .entrada[name=q] { flex: 1; }
.grupo-permisos { border: 1px solid var(--linea); border-radius: 10px; padding: 6px 14px 10px; margin: 0; display: grid; gap: 4px; }
.grupo-permisos legend { font-weight: 600; padding: 0 6px; font-size: 13px; color: var(--tinta); }
.doc-info { display: block; min-height: 16px; font-size: 12px; color: var(--tinta); margin-top: 2px; }
.doc-info.ok { color: var(--verde-osc); }
.doc-info.aviso { color: var(--naranja-osc); font-weight: 600; }
