/* JC Autopartes · app web del personal. Sin dependencias externas. Paleta de la app móvil (#C0302D). */

@font-face { font-family: "Roboto"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/roboto-regular.woff2") format("woff2"); }
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/roboto-medium.woff2") format("woff2"); }
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/roboto-bold.woff2") format("woff2"); }

:root {
  --rojo: #c0302d;
  --rojo-osc: #9a1e22;
  --rojo-prof: #7e1519;
  --rojo-suave: #fbe9e8;
  --rojo-borde: #f1c7c5;
  --fondo: #f5f5f7;
  --blanco: #fff;
  --texto: #17171b;
  --texto-2: #6b6b73;
  --borde: #e7e7eb;
  --nav: #55565c;
  --verde: #2e7d32;
  --verde-suave: #e3f3e4;
  --ambar: #a35f00;
  --ambar-suave: #fff1db;
  --ambar-borde: #f2d29b;
  --azul: #1f5fae;
  --azul-suave: #e6effa;
  --morado: #6a3fa0;
  --morado-suave: #efe8f8;
  --encabezado: linear-gradient(180deg, #b8282a 0%, #a42124 100%);
  --sombra: 0 6px 18px rgba(0, 0, 0, .08), 0 1px 3px rgba(0, 0, 0, .04);
  --sombra-alta: 0 18px 50px rgba(0, 0, 0, .22);
  --radio: 18px;
  --radio-chico: 12px;
  --lateral: 252px;
  --barra: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif; font-size: 15px; line-height: 1.45; color: var(--texto); background: var(--fondo); }
img, svg { display: block; max-width: 100%; }
a { color: var(--rojo); text-underline-offset: 2px; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; word-break: break-all; }
.ico { width: 1.25em; height: 1.25em; flex: none; }
.ico-chico { width: 1em; height: 1em; }
.solo-lectores { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.saltar { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--texto); color: #fff; padding: 10px 16px; border-radius: 8px; text-decoration: none; }
.saltar:focus { top: 12px; }
:focus-visible { outline: 3px solid #1f6feb; outline-offset: 2px; }
.sin-js .js-solo { display: none !important; }
.js .sin-js-solo { display: none !important; }
.texto-suave { color: var(--texto-2); }
.texto-verde { color: var(--verde); }
.centro { text-align: center; }
.nowrap { white-space: nowrap; }
[hidden] { display: none !important; }

/* ───── Botones ───── */
.boton { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 12px; border: 1.5px solid transparent; font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer; background: none; transition: background .15s, border-color .15s, color .15s, transform .1s; white-space: nowrap; }
.boton:active { transform: translateY(1px); }
.boton[disabled], .boton[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.boton-rojo { background: var(--rojo); color: #fff; box-shadow: 0 4px 12px rgba(192, 48, 45, .25); }
.boton-rojo:hover { background: var(--rojo-osc); }
.boton-borde { background: #fff; color: var(--texto); border-color: #d6d6dc; }
.boton-borde:hover { border-color: var(--texto); }
.boton-borde-rojo { background: #fff; color: var(--rojo); border-color: var(--rojo); }
.boton-borde-rojo:hover { background: var(--rojo-suave); }
.boton-texto { color: var(--texto-2); font-weight: 500; }
.boton-texto:hover { color: var(--texto); }
.boton-texto-peligro { color: var(--rojo); font-weight: 600; }
.boton-texto-peligro:hover { background: var(--rojo-suave); }
.boton-peligro { background: var(--rojo-osc); color: #fff; }
.boton-peligro:hover { background: var(--rojo-prof); }
.boton-whats { background: #1f8a4c; color: #fff; }
.boton-whats:hover { background: #18703d; }
.boton-bloque { display: flex; width: 100%; }
.boton-grande { min-height: 54px; font-size: 17px; border-radius: 14px; }
.boton-chico { min-height: 34px; padding: 6px 12px; font-size: 13px; border-radius: 10px; }
.boton-cuadro { display: inline-flex; align-items: center; justify-content: center; width: 50px; height: 50px; flex: none; border-radius: 14px; background: #fff; border: 1px solid var(--borde); color: var(--texto); box-shadow: var(--sombra); }
.boton-cuadro .ico { width: 26px; height: 26px; }
.boton-circulo { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--rojo-suave); color: var(--rojo); cursor: pointer; }
.boton-circulo:hover { background: #f6d3d1; }
.boton-circulo .ico { width: 22px; height: 22px; }
.boton-basura { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 0; border-radius: 10px; background: none; color: var(--rojo); cursor: pointer; }
.boton-basura:hover { background: var(--rojo-suave); }
.boton-basura .ico { width: 22px; height: 22px; }
.enlace-accion { display: inline-flex; align-items: center; gap: 6px; color: var(--rojo); font-weight: 700; text-decoration: none; }
.enlace-accion .ico { width: 24px; height: 24px; }
.enlace-chico { font-size: 13px; font-weight: 600; position: relative; z-index: 2; }

/* ───── Estructura ───── */
/* ---------- Menú lateral (drawer): logo a color en panel blanco + navegación roja ---------- */
.lateral { display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; width: var(--lateral); background: var(--encabezado); color: #fff;
  padding: 0 12px calc(14px + env(safe-area-inset-bottom)); z-index: 60; overflow-y: auto; overscroll-behavior: contain; }
/* Fotos reales de refacciones (las del sitio público) en duotono rojo, tenues, de fondo en el menú */
.lateral { background: url("../img/refacciones-fotos.webp") center top / 100% auto no-repeat, var(--encabezado); }
.lateral-marca { position: relative; margin: 0 -12px 10px; padding: calc(20px + env(safe-area-inset-top)) 20px 24px; background: #fff;
  border-radius: 0 0 28px 0; box-shadow: 0 10px 26px rgba(70, 0, 0, .28); }
.lateral-marca::after { content: ""; position: absolute; left: 20px; right: 34px; bottom: 9px; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, var(--rojo) 0 38%, #2b2b30 38% 100%); opacity: .9; }
.lateral-logo { display: block; border-radius: 10px; }
.lateral-logo img { width: 100%; max-width: 196px; height: auto; margin: 0 auto; }
.lateral-logo:focus-visible { outline: 3px solid #1f6feb; outline-offset: 4px; }
.lateral-cerrar { display: none; position: absolute; top: calc(8px + env(safe-area-inset-top)); right: 8px; width: 40px; height: 40px; border: 0; border-radius: 50%;
  background: var(--fondo); color: var(--texto-2); cursor: pointer; align-items: center; justify-content: center; }
.lateral-cerrar .ico { width: 20px; height: 20px; }
.lateral-cerrar:hover { background: var(--borde); color: var(--texto); }
.lateral-nav { display: flex; flex-direction: column; gap: 3px; }
.lateral-grupo { margin: 12px 14px 4px; font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: rgba(255, 255, 255, .62); }
.lateral-nav a { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; color: #fff; text-decoration: none; font-weight: 500; opacity: .93;
  transition: background-color .15s ease; }
.lateral-nav a .ico { width: 22px; height: 22px; flex: none; }
.lateral-nav a small { margin-left: auto; font-size: 10.5px; background: rgba(255, 255, 255, .16); padding: 2px 7px; border-radius: 99px; }
.lateral-nav a:hover { background: rgba(255, 255, 255, .12); opacity: 1; }
.lateral-nav a:focus-visible { outline: 3px solid #fff; outline-offset: 1px; }
.lateral-nav a.activo { background: #fff; color: var(--rojo); font-weight: 700; opacity: 1; box-shadow: 0 6px 16px rgba(0, 0, 0, .15); }
.lateral-pie { margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .18); display: grid; gap: 6px; }
.lateral-usuario { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; padding: 6px 8px; border-radius: 12px; min-width: 0; }
.lateral-usuario:hover { background: rgba(255, 255, 255, .1); }
.lateral-usuario strong { display: block; font-size: 14px; }
.lateral-usuario small { display: block; font-size: 12px; opacity: .8; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lateral-usuario .avatar { background: #fff; color: var(--rojo); font-weight: 700; flex: none; }
.lateral-salir { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border-radius: 10px; border: 0; background: none; color: #fff; cursor: pointer; opacity: .85; font: inherit; font-weight: 500; }
.lateral-salir:hover { background: rgba(255, 255, 255, .12); opacity: 1; }
.lateral-fondo { display: none; }

/* Celular y tableta: drawer que se desliza desde la izquierda (botón ☰ del encabezado) */
@media (max-width: 1023px) {
  .lateral { width: min(86vw, 300px); transform: translateX(-104%); visibility: hidden; box-shadow: var(--sombra-alta);
    transition: transform .26s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .26s; }
  .lateral-cerrar { display: inline-flex; }
  .lateral-marca { padding-right: 52px; }
  .lateral-fondo { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(20, 8, 8, .48); opacity: 0; pointer-events: none; transition: opacity .26s ease; }
  body.menu-abierto { overflow: hidden; }
  body.menu-abierto .lateral { transform: none; visibility: visible; transition: transform .26s cubic-bezier(.2, .8, .2, 1); }
  body.menu-abierto .lateral-fondo { opacity: 1; pointer-events: auto; }
}
@media (min-width: 1024px) { .cabecera .cabecera-menu { display: none; } }
@media (prefers-reduced-motion: reduce) { .lateral, .lateral-fondo, .lateral-nav a { transition: none !important; } }
.marco { min-height: 100vh; padding-bottom: calc(var(--barra) + env(safe-area-inset-bottom)); }
.cabecera { background: var(--encabezado); color: #fff; padding: calc(10px + env(safe-area-inset-top)) 12px 46px; position: relative; overflow: hidden; }
.cabecera-fila { display: flex; align-items: center; gap: 8px; max-width: 1180px; margin: 0 auto; min-height: 48px; }
.cabecera-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex: none; border-radius: 50%; color: #fff; }
.cabecera-btn .ico { width: 26px; height: 26px; }
a.cabecera-btn:hover { background: rgba(255, 255, 255, .14); }
.cabecera-titulo { flex: 1; text-align: center; font-size: 22px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cabecera-logo { flex: 1; width: auto; max-width: 170px; height: auto; margin: 0 auto; object-fit: contain; }
.cabecera-inicio { padding-bottom: 8px; }
.cabecera-inicio::after { content: ""; position: absolute; right: -70px; top: 30px; width: 230px; height: 230px; border-radius: 50%; border: 26px solid rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 30px rgba(0, 0, 0, .05); pointer-events: none; }
.hoja { position: relative; background: var(--fondo); border-radius: 28px 28px 0 0; margin-top: -30px; padding: 18px 16px 28px; min-height: 60vh; outline: none; }
.hoja > * + * { margin-top: 16px; }
.sec-inicio .hoja { margin-top: 0; border-radius: 0; background: transparent; padding-top: 0; }
.sec-inicio .marco { background: linear-gradient(180deg, #a42124 0, #a42124 210px, var(--fondo) 340px); }

.barra-inferior { position: fixed; z-index: 50; left: 0; right: 0; bottom: 0; display: flex; background: #fff; border-top: 1px solid var(--borde); padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -4px 18px rgba(0, 0, 0, .05); }
.barra-inferior a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: var(--barra); color: var(--nav); text-decoration: none; font-size: 12px; font-weight: 500; }
.barra-inferior .ico { width: 26px; height: 26px; }
.barra-inferior a.activo { color: var(--rojo); font-weight: 700; }

/* Escritorio: menú lateral + contenido */
@media (min-width: 1024px) {
  body.app { background: linear-gradient(90deg, #a42124 0, #a42124 var(--lateral), var(--fondo) var(--lateral)); }
  .marco { margin-left: var(--lateral); padding-bottom: 0; }
  .barra-inferior { display: none; }
  .cabecera { padding: 22px 32px 62px; }
  .cabecera-titulo { text-align: left; font-size: 26px; }
  .cabecera-vacio:last-child { display: none; }
  .cabecera-fila { max-width: 1180px; }
  .cabecera-inicio { display: none; }
  .hoja { max-width: 1180px; margin: -36px auto 0; padding: 26px 32px 48px; border-radius: 28px 28px 0 0; }
  .sec-inicio .hoja { padding-top: 26px; }
  .sec-inicio .marco { background: linear-gradient(180deg, #a42124 0, #a42124 230px, var(--fondo) 380px); }
}
@media (min-width: 1024px) {
  .marco > .cabecera { border-radius: 0; }
}

/* ───── Avisos ───── */
.avisos { display: grid; gap: 8px; }
.aviso { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 14px; border: 1px solid; font-size: 14px; }
.aviso > .ico { width: 20px; height: 20px; margin-top: 1px; }
.aviso p { flex: 1; }
.aviso p + p { margin-top: 6px; }
.aviso a { font-weight: 700; }
.aviso-exito { background: var(--verde-suave); border-color: #bfe0c1; color: #1b5e20; }
.aviso-exito a { color: #1b5e20; }
.aviso-error { background: var(--rojo-suave); border-color: var(--rojo-borde); color: var(--rojo-osc); }
.aviso-aviso { background: var(--ambar-suave); border-color: var(--ambar-borde); color: #6d4000; }
.aviso-info { background: var(--azul-suave); border-color: #c5d8f0; color: #18467f; }
.aviso-cerrar { border: 0; background: none; color: inherit; cursor: pointer; padding: 2px; opacity: .7; }
.aviso-cerrar:hover { opacity: 1; }
.aviso .check { margin-top: 8px; }

/* ───── Tarjetas y textos ───── */
.tarjeta { background: #fff; border-radius: var(--radio); box-shadow: var(--sombra); padding: 16px; }
.tarjeta-titulo { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 700; margin-bottom: 10px; }
.tarjeta-titulo .ico { color: var(--rojo); }
.seccion-titulo { font-size: 20px; font-weight: 700; }
.seccion-sub { margin-top: 2px !important; }
.seccion-cabeza { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.conteo { color: var(--texto-2); font-size: 14px; }
.conteo strong { color: var(--texto); }
.nota { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--texto-2); }
.nota .ico { color: var(--rojo); }
.nota-ambar { background: var(--ambar-suave); color: #6d4000; padding: 10px 12px; border-radius: 12px; }
.nota-ambar .ico { color: var(--ambar); }
.nota-chica { font-size: 12.5px; margin-top: 8px; }
.precio-grande { font-size: 30px; font-weight: 700; color: var(--rojo); }
.folio-grande { font-size: 26px; font-weight: 700; }
.datos { margin: 0; display: grid; gap: 10px; }
.dato dt { font-size: 13px; color: var(--texto-2); }
.dato dd { margin: 1px 0 0; font-weight: 600; word-break: break-word; }
.dato-mono dd { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13.5px; font-weight: 500; }
.datos-centro { text-align: center; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); margin: 6px 0; }
.dato-cambio dd { color: var(--verde); font-size: 22px; }
.lista-simple { list-style: none; margin: 10px 0; padding: 0; display: grid; gap: 8px; font-size: 14px; }
.lista-simple li { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.lista-simple strong { margin-left: auto; }
.dos-columnas { display: grid; gap: 16px; }
.dos-columnas > div > * + * { margin-top: 14px; }
@media (min-width: 1024px) { .dos-columnas { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; } }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 9px; font-size: 13px; font-weight: 600; white-space: nowrap; vertical-align: middle; }
.badge-verde { background: var(--verde-suave); color: var(--verde); }
.badge-ambar { background: var(--ambar-suave); color: var(--ambar); }
.badge-rojo { background: var(--rojo-suave); color: var(--rojo); }
.badge-gris { background: #eeeef1; color: #4c4c55; }
.badge-azul { background: var(--azul-suave); color: var(--azul); }
.badge-morado { background: var(--morado-suave); color: var(--morado); }
.badge-grande { font-size: 15px; padding: 6px 12px; }

/* Estados vacíos y cajas centradas */
.estado-vacio { text-align: center; padding: 36px 16px; display: grid; justify-items: center; gap: 10px; color: var(--texto-2); }
.estado-vacio h2 { color: var(--texto); font-size: 20px; }
.estado-vacio.tarjeta { padding: 28px 16px; }
.estado-icono { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 20px; background: var(--rojo-suave); color: var(--rojo); }
.estado-icono .ico { width: 32px; height: 32px; }
.estado-exito { background: var(--verde-suave); color: var(--verde); }
.estado-peligro { background: var(--rojo-suave); color: var(--rojo-osc); }
.estado-vacio-chico { text-align: center; color: var(--texto-2); padding: 18px 8px; }
.caja-centro { max-width: 560px; margin-left: auto; margin-right: auto; text-align: center; display: grid; justify-items: center; gap: 12px; padding: 26px 20px; }
.caja-centro > form, .caja-centro .campo, .caja-centro .formas, .caja-centro .aviso, .caja-centro .nota, .caja-centro .banner-sandbox { width: 100%; text-align: left; }
.caja-centro h2 { font-size: 22px; }
.acciones-centro { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; width: 100%; }
.acciones-columna { flex-direction: column; align-items: stretch; max-width: 360px; }

/* ───── Formularios ───── */
.campo { display: grid; gap: 6px; font-size: 14px; }
.campo > span:first-child { font-weight: 600; color: var(--texto); }
.campo input, .campo select, .campo textarea { width: 100%; min-height: 48px; padding: 10px 14px; border: 1.5px solid #d9d9df; border-radius: 12px; background: #fff; font-size: 16px; }
.campo textarea { min-height: 84px; resize: vertical; }
.campo input:focus, .campo select:focus, .campo textarea:focus { border-color: var(--rojo); outline: none; box-shadow: 0 0 0 3px rgba(192, 48, 45, .15); }
.campo select:disabled { background: #f1f1f4; color: var(--texto-2); }
.campo-ico { display: flex; align-items: center; gap: 10px; border: 1.5px solid #d9d9df; border-radius: 12px; padding: 0 14px; background: #fff; }
.campo-ico:focus-within { border-color: var(--rojo); box-shadow: 0 0 0 3px rgba(192, 48, 45, .15); }
.campo-ico .ico { color: var(--texto-2); }
.campo-ico input { border: 0; padding: 10px 0; box-shadow: none !important; }
.campo-prefijo { display: flex; align-items: center; gap: 6px; border: 1.5px solid #d9d9df; border-radius: 14px; padding: 0 16px; background: #fff; }
.campo-prefijo:focus-within { border-color: var(--rojo); box-shadow: 0 0 0 3px rgba(192, 48, 45, .15); }
.campo-prefijo > span { color: var(--texto-2); font-size: 22px; }
.campo-prefijo input { border: 0; font-size: 28px; font-weight: 700; min-height: 60px; padding: 6px 0; box-shadow: none !important; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14.5px; }
.check input { width: 20px; height: 20px; accent-color: var(--rojo); }

/* ───── Login ───── */
.simple { background: var(--encabezado); min-height: 100vh; }
.simple-main { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
/* ---------- Login: foto real de refacciones con degradado de marca + panel blanco con el formulario ---------- */
.simple-main:has(> .login) { padding: 0; place-items: stretch; }
.login { display: grid; min-height: 100vh; background: #fff; }
.login-hero { position: relative; display: grid; align-content: end; gap: 16px; min-height: 300px; padding: calc(28px + env(safe-area-inset-top)) 24px 30px; color: #fff; overflow: hidden;
  background: linear-gradient(160deg, rgba(150, 26, 30, .90) 0%, rgba(110, 16, 20, .82) 45%, rgba(24, 6, 8, .78) 100%), url("../img/login-fondo.webp") center / cover no-repeat, #7e1519; }
.login-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: linear-gradient(90deg, var(--rojo) 0 38%, #2b2b30 38% 100%); }
.login-logo { width: min(230px, 62%); height: auto; filter: drop-shadow(0 4px 14px rgba(0, 0, 0, .35)); }
.login-eti { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .78); }
.login-bienvenida h1 { margin: 6px 0 0; font-size: 26px; line-height: 1.15; letter-spacing: -.01em; }
.login-bienvenida p { margin: 8px 0 0; color: rgba(255, 255, 255, .86); font-size: 15px; max-width: 34em; }
.login-puntos { display: none; }
.login-panel { display: grid; align-content: start; justify-items: center; gap: 18px; padding: 28px 20px calc(28px + env(safe-area-inset-bottom)); background: #fff; }
.login-caja { display: grid; gap: 16px; width: 100%; max-width: 400px; }
.login-titulo h2 { margin: 0; font-size: 24px; letter-spacing: -.01em; }
.login-titulo p { margin: 4px 0 0; color: var(--texto-2); font-size: 14.5px; }
.login-caja .campo-ico { position: relative; }
.login-caja .campo-ico input { min-height: 50px; }
.login-ver { flex: none; margin-right: -6px; min-height: 36px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--rojo); font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; }
.login-ver:hover { background: var(--rojo-suave); }
.login-caja .boton-grande { min-height: 52px; font-size: 17px; box-shadow: 0 10px 24px rgba(192, 48, 45, .28); }
.login-nota { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0; text-align: center; font-size: 13px; color: var(--texto-2); }
.login-pie { margin: 0; text-align: center; }
.login-pie a { color: var(--texto-2); font-size: 14px; }
.login-pie a:hover { color: var(--rojo); }
@media (min-width: 900px) {
  .login { grid-template-columns: minmax(0, 1.2fr) minmax(420px, 1fr); }
  .login-hero { align-content: space-between; min-height: 100vh; padding: 48px 56px 52px; }
  .login-hero::after { display: none; }
  .login-logo { width: 280px; }
  .login-bienvenida { max-width: 520px; margin-top: auto; }
  .login-bienvenida h1 { font-size: 40px; }
  .login-bienvenida p { font-size: 17px; }
  .login-puntos { display: grid; gap: 12px; margin: 26px 0 0; padding: 0; list-style: none; max-width: 520px; }
  .login-puntos li { display: flex; align-items: center; gap: 12px; font-weight: 500; color: #fff; }
  .login-puntos span { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex: none; border-radius: 12px;
    background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22); backdrop-filter: blur(4px); }
  .login-puntos .ico { width: 20px; height: 20px; }
  .login-panel { align-content: center; padding: 48px 40px; box-shadow: -18px 0 40px rgba(0, 0, 0, .12); }
  .login-titulo h2 { font-size: 30px; }
}
.simple .estado-vacio { background: #fff; border-radius: 24px; max-width: 480px; margin: 0 auto; }

/* ───── Inicio ───── */
.inicio-hero { color: #fff; display: grid; gap: 16px; padding-top: 4px; }
.inicio-saludo h2 { font-size: 32px; font-weight: 700; }
.inicio-saludo p { font-size: 17px; opacity: .92; margin-top: 6px; max-width: 30ch; }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.kpi { display: flex; align-items: center; gap: 12px; color: var(--texto); text-decoration: none; padding: 16px 14px; min-height: 84px; }
.kpi:hover { box-shadow: var(--sombra-alta); }
.kpi-ico { color: var(--rojo); flex: none; }
.kpi-ico .ico { width: 30px; height: 30px; }
.kpi-txt small { display: block; color: var(--texto-2); font-size: 14px; }
.kpi-txt strong { display: block; font-size: 21px; font-weight: 700; line-height: 1.15; word-break: break-word; }
.kpi-txt strong span { font-size: 16px; font-weight: 600; }
.inicio-hero .aviso { color: var(--rojo-osc); }
.accesos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px; }
.acceso { display: grid; justify-items: center; gap: 8px; padding: 18px 8px; text-decoration: none; color: var(--texto); font-weight: 500; text-align: center; }
.acceso .ico { width: 32px; height: 32px; color: var(--rojo); }
.acceso:hover { box-shadow: var(--sombra-alta); }
.banner { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-radius: var(--radio); background: linear-gradient(120deg, #b8282a, #7e1519); color: #fff; text-decoration: none; padding: 20px 0 20px 22px; overflow: hidden; min-height: 150px; box-shadow: var(--sombra); }
.banner-txt { display: grid; gap: 14px; justify-items: start; }
.banner-txt strong { font-size: 22px; line-height: 1.15; max-width: 12ch; }
.banner-btn { display: inline-flex; align-items: center; gap: 6px; background: #fff; color: var(--texto); font-weight: 700; padding: 9px 16px; border-radius: 99px; }
.banner img { width: 48%; max-width: 260px; height: auto; margin-right: -18px; }
@media (min-width: 720px) {
  .kpis { grid-template-columns: repeat(4, 1fr); }
  .accesos { grid-template-columns: repeat(6, 1fr); }
}
@media (min-width: 1024px) {
  .inicio-saludo h2 { font-size: 34px; }
  .sec-inicio .hoja > .inicio-hero { margin-top: -6px; }
}

/* ───── Búsqueda, chips y filtros ───── */
.buscador { display: flex; gap: 10px; align-items: center; }
.buscar-campo { flex: 1; display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 16px; border-radius: 14px; background: #fff; border: 1px solid var(--borde); box-shadow: var(--sombra); min-width: 0; }
.buscar-campo:focus-within { border-color: var(--rojo); box-shadow: 0 0 0 3px rgba(192, 48, 45, .15); }
.buscar-campo .ico { color: var(--texto-2); width: 22px; height: 22px; }
.buscar-campo input { flex: 1; min-width: 0; border: 0; outline: none; background: none; font-size: 16px; padding: 12px 0; }
.buscar-boton { min-height: 50px; }
.js .buscar-boton { display: none; }
.barra-acciones { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.barra-acciones .buscador { flex: 1 1 280px; }
.barra-acciones > .boton { min-height: 50px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: thin; }
.chips-envolver { flex-wrap: wrap; overflow: visible; }
.chip { display: inline-flex; align-items: center; gap: 6px; flex: none; min-height: 38px; padding: 7px 16px; border-radius: 99px; background: #ececf0; color: var(--texto); text-decoration: none; font-weight: 500; font-size: 14.5px; border: 1px solid transparent; cursor: pointer; white-space: nowrap; }
.chip:hover { background: #e2e2e7; }
.chip-activo, .chip-activo:hover { background: var(--rojo); color: #fff; font-weight: 700; }
.chip-filtro { background: var(--rojo-suave); border-color: var(--rojo-borde); color: var(--rojo-osc); font-weight: 600; }
.chip-filtro:hover { background: #f6d3d1; }
.chip-filtro .ico { width: 18px; height: 18px; }
.chip-fijo { background: var(--rojo-suave); color: var(--rojo-osc); cursor: default; }
.filtros { padding: 0; box-shadow: none; background: none; }
.filtros > summary { list-style: none; display: inline-flex; min-height: 42px; }
.filtros > summary::-webkit-details-marker { display: none; }
.filtros[open] { background: #fff; box-shadow: var(--sombra); padding: 14px; }
.filtros-form { display: grid; gap: 14px; margin-top: 14px; }
.filtros-grid { display: grid; gap: 12px; }
.filtros-checks { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.filtros-acciones { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
@media (min-width: 720px) { .filtros-grid { grid-template-columns: 1fr 1fr 160px; } }
.resultados-cabeza { display: flex; justify-content: space-between; align-items: center; }
.resultados > * + * { margin-top: 12px; }
#resultados > * + * { margin-top: 12px; }
.cargando { opacity: .55; transition: opacity .15s; }

/* ───── Productos ───── */
.lista-productos { display: grid; gap: 12px; }
@media (min-width: 1280px) { .lista-productos { grid-template-columns: 1fr 1fr; } }
.prod { position: relative; display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 14px; }
.prod-enlace { position: absolute; inset: 0; z-index: 1; border-radius: var(--radio); }
.prod-enlace:focus-visible { outline-offset: -3px; }
.prod:hover { box-shadow: var(--sombra-alta); }
.prod-img { position: relative; display: flex; align-items: center; justify-content: center; width: 84px; height: 84px; border-radius: 14px; background: #f3f3f5; overflow: hidden; flex: none; }
.prod-img-ico { width: 38px; height: 38px; color: #b9b9c2; }
.prod-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #fff; }
.prod-img.sin-imagen img { display: none; }
.prod-img-grande { width: 100%; height: auto; aspect-ratio: 1; max-width: 320px; border-radius: 18px; }
.prod-img-grande .prod-img-ico { width: 72px; height: 72px; }
.prod-info { min-width: 0; display: grid; gap: 3px; }
.prod-info h3 { font-size: 16.5px; font-weight: 700; }
.prod-cod { color: var(--texto-2); font-size: 14px; }
.prod-desc { color: var(--texto-2); font-size: 12.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.prod-ubic { display: flex; align-items: center; gap: 5px; color: var(--texto-2); font-size: 13.5px; margin-top: 2px; }
.prod-ubic .ico { width: 17px; height: 17px; }
.prod-lado { display: grid; justify-items: end; gap: 8px; text-align: right; }
.prod-precio { color: var(--rojo); font-size: 19px; font-weight: 700; }
.prod-agregar { position: relative; z-index: 2; }
.paginacion { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--texto-2); font-size: 14px; }
@media (max-width: 479px) {
  .prod { grid-template-columns: 64px minmax(0, 1fr) auto; gap: 10px; padding: 12px; }
  .prod-img { width: 64px; height: 64px; }
  .prod-desc { display: none; }
  .prod-precio { font-size: 17px; }
}

/* Ficha de producto */
.ficha { display: grid; gap: 16px; }
.ficha-principal { display: grid; gap: 18px; }
.ficha-principal > .prod-img { margin: 0 auto; }
.ficha-cuerpo { display: grid; gap: 8px; align-content: start; }
.ficha-familia { color: var(--rojo); font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: .03em; }
.ficha-nombre { font-size: 20px; }
.ficha-precio { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 6px 0; }
.ficha-agregar { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-top: 6px; }
.campo-cant { width: 110px; }
.ubic-grande { font-size: 18px; font-weight: 700; margin-bottom: 14px; }
.tabla-envoltura { overflow-x: auto; margin: 0 -4px; }
.tabla { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabla th { text-align: left; font-size: 12.5px; color: var(--texto-2); font-weight: 600; padding: 8px; border-bottom: 1px solid var(--borde); }
.tabla td { padding: 9px 8px; border-bottom: 1px solid #f0f0f3; }
@media (min-width: 900px) {
  .ficha { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; }
  .ficha-principal { grid-template-columns: 260px minmax(0, 1fr); }
  .ficha-apl, .ficha-eq { grid-column: 1 / -1; }
}

/* ───── Ventas ───── */
.lista-ventas { display: grid; gap: 10px; }
.venta-fila { position: relative; display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 14px; }
.venta-fila:hover { box-shadow: var(--sombra-alta); }
.venta-ico { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 14px; background: var(--rojo-suave); color: var(--rojo); }
.venta-info { min-width: 0; display: grid; gap: 2px; }
.venta-info h3 { font-size: 16px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.venta-info p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.venta-lado { display: grid; justify-items: end; gap: 6px; }
.venta-lado strong { font-size: 17px; }
.sobre-enlace { position: relative; z-index: 2; }
.fila-cancelada .venta-ico { background: #eeeef1; color: #8a8a93; }

.venta { display: grid; gap: 16px; }
.venta-col > * + * { margin-top: 14px; }
.venta-estado { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
@media (min-width: 1024px) {
  .venta { grid-template-columns: minmax(0, 1fr) 370px; gap: 24px; align-items: start; }
  .venta-col-lado { position: sticky; top: 16px; }
}
.cliente { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--texto); border: 1.5px solid var(--borde); box-shadow: none; padding: 14px 16px; }
a.cliente:hover { border-color: var(--rojo-borde); background: #fffafa; }
.cliente-ico { display: inline-flex; color: var(--texto); }
.cliente-ico .ico { width: 30px; height: 30px; }
.cliente-txt { flex: 1; display: grid; min-width: 0; }
.cliente-txt small { color: var(--texto-2); font-size: 13px; }
.cliente-txt strong { font-size: 17px; }
.cliente-txt .texto-suave { font-size: 13px; }
.cliente-desc { color: var(--verde); font-weight: 700; font-size: 13.5px; }
.form-codigo { display: flex; gap: 10px; align-items: center; }
.form-codigo .buscar-campo { box-shadow: none; min-height: 46px; }
.form-codigo .boton { min-height: 46px; }
.lineas { padding: 4px 16px; }
.linea { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; grid-template-areas: "img info precio" "img info acciones"; gap: 6px 12px; padding: 14px 0; border-bottom: 1px solid var(--borde); align-items: start; }
.linea:last-child { border-bottom: 0; }
.linea > .prod-img { grid-area: img; width: 64px; height: 64px; }
.linea-info { grid-area: info; min-width: 0; display: grid; gap: 2px; }
.linea-info h3 { font-size: 15.5px; }
.linea-info h3 a { color: var(--texto); text-decoration: none; }
.linea-info h3 a:hover { text-decoration: underline; }
.linea-aviso { display: flex; align-items: center; gap: 5px; color: var(--ambar); font-size: 13px; font-weight: 600; }
.linea-aviso .ico { width: 16px; height: 16px; }
.linea-precio { grid-area: precio; display: grid; justify-items: end; gap: 2px; text-align: right; }
.linea-precio strong { font-size: 17px; }
.linea-precio small { font-size: 12.5px; }
.enlace-precio { display: inline-flex; align-items: center; gap: 4px; margin-top: 2px; font-size: 13px; font-weight: 600; color: var(--rojo); text-decoration: none; }
.enlace-precio:hover, .enlace-precio:focus-visible { text-decoration: underline; }
.precio-manual .precio-datos, .precio-manual .nota-chica { width: 100%; text-align: left; }
.precio-datos { margin: 4px 0 2px; }
.tachado { text-decoration: line-through; color: var(--texto-2); font-size: 13px; }
.linea-acciones { grid-area: acciones; display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.cantidad { display: inline-flex; align-items: stretch; border: 1.5px solid #d6d6dc; border-radius: 12px; overflow: hidden; background: #fff; }
.cantidad-btn { width: 40px; border: 0; background: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: var(--texto); }
.cantidad-btn:hover:not([disabled]) { background: #f3f3f5; }
.cantidad-btn[disabled] { color: #c4c4cb; cursor: default; }
.cantidad-btn .ico { width: 20px; height: 20px; }
.cantidad-num { width: 48px; border: 0; border-left: 1.5px solid #d6d6dc; border-right: 1.5px solid #d6d6dc; text-align: center; font-weight: 700; font-size: 16px; padding: 8px 0; -moz-appearance: textfield; appearance: textfield; }
.cantidad-num::-webkit-outer-spin-button, .cantidad-num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cantidad-fija { font-weight: 700; color: var(--texto-2); }
@media (max-width: 479px) {
  .linea { grid-template-columns: 52px minmax(0, 1fr) auto; grid-template-areas: "img info precio" "acciones acciones acciones"; }
  .linea > .prod-img { width: 52px; height: 52px; }
}
.totales { display: grid; gap: 8px; padding: 18px 20px; }
.total-fila { display: flex; justify-content: space-between; gap: 12px; font-size: 16px; }
.total-fila > span:first-child { color: #45454d; }
.total-fila > span:last-child { font-weight: 600; }
.total-grande { margin-top: 4px; font-size: 22px; font-weight: 700; }
.total-grande > span:first-child { color: var(--texto); }
.total-grande strong { color: var(--rojo); font-size: 28px; }
.total-piezas { font-size: 13px; }
.botones-venta { display: grid; gap: 10px; }
.entrega .campo { margin: 12px 0; }
.segmentos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; background: #f1f1f4; padding: 4px; border-radius: 14px; }
.segmento { position: relative; cursor: pointer; }
.segmento input { position: absolute; opacity: 0; pointer-events: none; }
.segmento span { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 4px; border-radius: 11px; font-weight: 600; font-size: 13.5px; color: var(--texto-2); text-align: center; }
.segmento input:checked + span { background: #fff; color: var(--rojo); box-shadow: 0 2px 8px rgba(0, 0, 0, .1); }
.segmento input:focus-visible + span { outline: 3px solid #1f6feb; }
.entrega:not(:has(input[value="envio"]:checked)):not(:has(input[value="entregado"]:checked)) .entrega-detalles { display: none; }

/* Selectores (cliente / productos) */
.selector > * + * { margin-top: 12px; }
.lista-opciones { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.opcion { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--borde); background: #fff; text-align: left; cursor: pointer; }
.opcion:hover { border-color: var(--rojo-borde); background: #fffafa; }
.opcion-activa { border-color: var(--rojo); background: var(--rojo-suave); }
.opcion-ico { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex: none; border-radius: 12px; background: var(--rojo-suave); color: var(--rojo); }
.opcion-txt { flex: 1; min-width: 0; display: grid; gap: 2px; }
.opcion-txt strong { font-size: 15px; }
.opcion-txt small { color: var(--texto-2); font-size: 13px; }
.opcion-lado { display: grid; justify-items: end; gap: 4px; }
.opcion-producto { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; border: 1.5px solid var(--borde); border-radius: 14px; background: #fff; }
.opcion-producto > .prod-img { width: 56px; height: 56px; }
.opcion-producto > form { grid-column: 2 / -1; justify-self: end; }
@media (min-width: 640px) {
  .opcion-producto { grid-template-columns: 56px minmax(0, 1fr) auto auto; }
  .opcion-producto > form { grid-column: auto; }
}

/* Cobro */
.cobro { display: grid; gap: 18px; max-width: 980px; }
.cobro-col > * + * { margin-top: 14px; }
@media (min-width: 900px) { .cobro { grid-template-columns: 1fr 1fr; gap: 26px; align-items: start; } }
.total-cobrar { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--rojo-suave); border-radius: 18px; padding: 20px 22px; color: var(--rojo-osc); font-size: 17px; }
.total-cobrar strong { font-size: 32px; color: var(--rojo); }
.formas { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; }
.formas legend { font-weight: 700; font-size: 17px; margin-bottom: 10px; padding: 0; }
.forma { position: relative; display: block; cursor: pointer; }
.forma input { position: absolute; opacity: 0; pointer-events: none; }
.forma-caja { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; border: 1.5px solid var(--borde); background: #fff; }
.forma-caja > .ico { width: 26px; height: 26px; color: var(--texto); }
.forma-txt { flex: 1; font-weight: 600; font-size: 16px; display: grid; }
.forma-txt small { font-weight: 400; font-size: 13px; color: var(--texto-2); }
.forma-clave { color: var(--texto-2); font-size: 14px; }
.forma-clave-grande { font-size: 18px; font-weight: 700; color: var(--rojo); min-width: 28px; }
.forma-radio { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; border: 2px solid #c9c9d0; color: transparent; }
.forma-radio .ico { width: 15px; height: 15px; }
.forma input:checked + .forma-caja { border-color: var(--rojo); background: var(--rojo-suave); }
.forma input:checked + .forma-caja .forma-radio { background: var(--rojo); border-color: var(--rojo); color: #fff; }
.forma input:checked + .forma-caja > .ico { color: var(--rojo); }
.forma input:focus-visible + .forma-caja { outline: 3px solid #1f6feb; outline-offset: 2px; }
.forma-deshabilitada { cursor: not-allowed; }
.forma-deshabilitada .forma-caja { opacity: .6; }
.cobro:not(:has(input[value="01"]:checked)) [data-efectivo] { display: none; }
.cobro:has(input[value="01"]:checked) [data-referencia], .cobro:has(input[value="credito"]:checked) [data-referencia] { display: none; }
.rapidos { display: flex; gap: 8px; flex-wrap: wrap; }
.rapidos .chip { background: #fff; border-color: #d6d6dc; font-weight: 700; }
.cambio { display: flex; align-items: center; justify-content: space-between; background: var(--verde-suave); color: var(--verde); border-radius: 18px; padding: 18px 22px; font-size: 17px; }
.cambio strong { font-size: 32px; }
.cambio.falta { background: var(--rojo-suave); color: var(--rojo); }
.confirmacion .precio-grande { font-size: 36px; }

/* ───── Facturación ───── */
.pestanas { display: flex; background: #ececf0; border-radius: 16px; padding: 5px; gap: 4px; }
.pestanas a { flex: 1; text-align: center; padding: 10px 6px; border-radius: 12px; text-decoration: none; color: var(--texto); font-weight: 500; font-size: 15px; }
.pestanas a.activa { background: var(--rojo); color: #fff; font-weight: 700; box-shadow: 0 4px 12px rgba(192, 48, 45, .25); }
.pendientes > * + * { margin-top: 14px; }
.grupo { padding: 6px 16px; }
.grupo-cabeza { display: flex; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--borde); }
.grupo-cabeza h3 { font-size: 16.5px; }
.grupo-publico { border: 1.5px solid var(--ambar-borde); padding-bottom: 14px; }
.grupo-publico .nota { margin: 10px 0; }
.grupo-venta { display: flex; align-items: center; gap: 12px; padding: 12px 0; cursor: pointer; border-bottom: 1px solid #f0f0f3; }
.grupo-venta:last-child { border-bottom: 0; }
.grupo-venta input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check-circulo { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; border: 2px solid #c9c9d0; color: transparent; flex: none; }
.check-circulo .ico { width: 16px; height: 16px; }
.grupo-venta input:checked + .check-circulo { background: var(--rojo); border-color: var(--rojo); color: #fff; }
.grupo-venta input:focus-visible + .check-circulo { outline: 3px solid #1f6feb; outline-offset: 2px; }
.grupo-venta input:disabled ~ * { opacity: .45; }
.grupo-venta-txt { flex: 1; display: grid; }
.grupo-venta-txt small { color: var(--texto-2); }
.grupo-venta-txt small.global-parcial { color: #9a5b00; font-weight: 600; } /* iteración 20 */
.barra-fija { position: sticky; bottom: calc(var(--barra) + 8px + env(safe-area-inset-bottom)); z-index: 5; background: rgba(245, 245, 247, .92); backdrop-filter: blur(6px); padding: 10px 0; display: grid; gap: 6px; }
@media (min-width: 1024px) { .barra-fija { bottom: 8px; } }
.periodo .filtros-grid { margin-top: 4px; }
@media (min-width: 720px) { .periodo .filtros-grid { grid-template-columns: 1fr 1fr 140px; } }
.banner-sandbox { display: flex; gap: 12px; align-items: flex-start; background: var(--ambar-suave); border: 1.5px solid var(--ambar-borde); border-radius: 16px; padding: 14px 16px; color: #6d4000; }
.banner-sandbox > .ico { width: 30px; height: 30px; color: var(--ambar); }
.banner-sandbox strong { color: var(--ambar); font-size: 16.5px; }
.receptor-cabeza { display: flex; gap: 14px; align-items: center; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--borde); }
.receptor-cabeza h3 { font-size: 17px; }
.preview-opciones { display: grid; gap: 12px; margin-top: 12px; }
.conceptos { list-style: none; margin: 0; padding: 0; }
.concepto { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--borde); }
.concepto:first-child { padding-top: 2px; }
.concepto:last-child { border-bottom: 0; padding-bottom: 2px; }
.concepto-cant { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; background: var(--rojo-suave); color: var(--rojo); font-weight: 700; font-size: 16px; }
.concepto-info { display: grid; gap: 2px; min-width: 0; }
.concepto-info small { color: var(--texto-2); font-size: 13px; }
.concepto-imp { font-size: 16px; }
.uuid { display: grid; justify-items: center; gap: 6px; background: #f6f6f8; border-radius: 14px; padding: 12px; width: 100%; }
.uuid small { color: var(--texto-2); }
.factura-cabeza { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.factura-cabeza p + p { margin-top: 6px; }
.acciones-factura { display: flex; gap: 8px; flex-wrap: wrap; }
.ventas-relacionadas { margin-top: 12px; font-size: 14px; }
.cancelar .forma-caja { gap: 12px; }
.cancelar:not(:has(input[value="01"]:checked)) .campo-sustitucion { display: none; }

/* ───── Más ───── */
.perfil { display: flex; align-items: center; gap: 16px; }
.perfil h2 { font-size: 20px; }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; background: var(--rojo-suave); color: var(--rojo); font-weight: 700; flex: none; }
.avatar-grande { width: 62px; height: 62px; font-size: 22px; }
.menu-lista { display: grid; gap: 10px; }
.menu-item { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--texto); padding: 14px 16px; }
.menu-item:hover { box-shadow: var(--sombra-alta); }
.menu-ico { display: inline-flex; color: var(--rojo); }
.menu-ico .ico { width: 28px; height: 28px; }
.menu-txt { flex: 1; display: grid; gap: 2px; }
.menu-txt strong { font-size: 16px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.menu-txt small { color: var(--texto-2); font-size: 13px; }
.menu-item > .ico:last-child { color: var(--texto-2); }
.salir-form { margin-top: 20px !important; }
.lista-check { list-style: none; padding: 0; margin: 4px 0; display: grid; gap: 8px; text-align: left; }
.lista-check li { display: flex; gap: 10px; align-items: center; }
.lista-check .ico { color: var(--verde); }

/* ───── Modal (mejora con JS) ───── */
.modal { border: 0; padding: 0; width: min(720px, 100vw); max-width: 100vw; max-height: 100dvh; background: transparent; }
.modal::backdrop { background: rgba(20, 10, 10, .5); }
.modal-caja { background: var(--fondo); border-radius: 24px; display: flex; flex-direction: column; max-height: min(86dvh, 820px); overflow: hidden; box-shadow: var(--sombra-alta); }
.modal-cabeza { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 10px; }
.modal-cabeza h2 { font-size: 20px; }
.modal-cerrar { border: 0; background: #ececf0; border-radius: 50%; width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.modal-cuerpo { overflow-y: auto; padding: 4px 18px 20px; }
@media (max-width: 719px) {
  .modal { margin: auto 0 0; width: 100vw; }
  .modal-caja { border-radius: 24px 24px 0 0; max-height: 90dvh; }
}

/* ───── Ticket (80 mm) ───── */
.pagina-ticket { background: #ececf0; padding: 16px; }
.ticket-barra { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 8px; }
.ticket-ayuda { text-align: center; font-size: 13px; color: var(--texto-2); margin-bottom: 14px; }
.ticket { width: 80mm; max-width: 100%; margin: 0 auto; background: #fff; color: #000; padding: 5mm 4.5mm; font-size: 11.5px; line-height: 1.35; box-shadow: var(--sombra-alta); font-family: "Roboto", Arial, sans-serif; }
.ticket h1 { font-size: 15px; margin-top: 4px; }
.ticket h2 { font-size: 14px; margin: 2px 0 4px; }
.ticket hr { border: 0; border-top: 1px dashed #000; margin: 6px 0; }
.t-centro { text-align: center; }
.t-logo { width: 46mm; height: auto; margin: 0 auto; }
.t-fila { display: flex; justify-content: space-between; gap: 8px; }
.t-negritas { font-weight: 700; }
.t-linea { display: grid; grid-template-columns: 7mm minmax(0, 1fr) auto; gap: 4px; margin: 3px 0; }
.t-cant { font-weight: 700; }
.t-desc small { display: block; color: #444; font-size: 10.5px; }
.t-imp { text-align: right; white-space: nowrap; }
.t-total { font-size: 16px; font-weight: 700; margin: 4px 0; }
.t-cambio { font-size: 14px; font-weight: 700; }
.t-credito { text-align: center; font-weight: 700; border: 1.5px solid #000; padding: 4px; margin: 6px 0; }
.t-leyenda { font-size: 10.5px; }
@media print {
  @page { size: 80mm auto; margin: 0; }
  html, body { background: #fff !important; }
  .pagina-ticket { padding: 0; }
  .no-imprimir { display: none !important; }
  .ticket { box-shadow: none; width: 80mm; margin: 0; padding: 3mm 4mm; }
}

/* ---------- Iteración 6: caja y factura global ---------- */
.caja-fila .venta-lado { display: grid; justify-items: end; gap: 6px; }
.caja-credito { margin-top: 14px; }
.global-atajos { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 6px; }
.global-atajos .chip { border: 0; cursor: pointer; font: inherit; }
.global-dia { display: grid; gap: 6px; margin-top: 10px; }
.global-dia-cabeza { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--borde); font-size: 14.5px; cursor: pointer; }
.global-dia-cabeza input { width: 20px; height: 20px; accent-color: var(--rojo); }
.global-barra { position: sticky; bottom: 0; z-index: 3; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  margin: 14px -4px 0; padding: 12px 14px; background: var(--blanco); border-top: 1px solid var(--borde); box-shadow: 0 -6px 16px rgba(0, 0, 0, .06); border-radius: 14px; }
.global-barra-txt { display: grid; gap: 2px; }
.global-barra-total { font-size: 22px; color: var(--rojo); }
.global-barra .boton:disabled { opacity: .5; cursor: not-allowed; }
@media (max-width: 760px) {
  .global-barra { bottom: 64px; padding: 10px 12px; gap: 8px; }
  .global-barra-txt { grid-template-columns: 1fr auto; align-items: baseline; width: 100%; }
  .global-barra-txt small { display: none; }
  .global-barra-total { font-size: 19px; }
  .global-barra .boton { width: 100%; min-height: 44px; font-size: 15px; }
}
