/* Portal EbuyPlace - hoja de estilos unica. Sin recursos externos. Sin atributos style en las plantillas (CSP estricta).
   Base multi-club: todo color de marca sale de variables --club-* (css/clubes/<club>.css o variables_css de la vista).
   Direccion visual: menu lateral oscuro del club, contenido claro y limpio, acento del club en el boton principal. */

@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("../fonts/plus-jakarta-sans-latin-ext.341687eeeb6a.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("../fonts/plus-jakarta-sans-latin.7660bd9909fb.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  /* respaldo si no llega ningun tema del club */
  --club-primario: #FFD100;
  --club-sobre-primario: #0A0A0A;
  --club-primario-hover: #E6BC00;
  --club-acento: #F5B800;
  --club-acento-suave: #FFF6CC;
  --club-fondo: #000000;
  --club-fondo-2: #141414;
  --club-sobre-fondo: #FFFFFF;

  --texto: #0E0E10;
  --texto-suave: #5B5F66;
  --fondo-pagina: #F4F4F1;
  --tarjeta: #FFFFFF;
  --borde: #E6E6E0;
  --borde-suave: #F0F0EB;
  --enlace: #1D3FCB;
  --foco: #2F5BFF;

  --azul-fondo: #EEF3FF; --azul-texto: #1D3FCB;
  --azul-osc-fondo: #1E2A5E; --azul-osc-texto: #FFFFFF;
  --ambar-fondo: #FFF7E0; --ambar-texto: #8A4B08; --ambar-borde: #F2A516;
  --verde-fondo: #E9F7EE; --verde-texto: #137333; --verde-borde: #34A853;
  --rojo-fondo: #FDEDEB; --rojo-texto: #B42318; --rojo-borde: #E5483A; --rojo-boton: #C8372B;
  --gris-fondo: #EFEFEA; --gris-texto: #4A4D53;
  --gris-osc-fondo: #2B2D31; --gris-osc-texto: #FFFFFF;
  --morado-fondo: #F3EFFE; --morado-texto: #5B34C2;

  --radio: 16px;
  --radio-sm: 12px;
  --radio-lg: 22px;
  --sombra-sm: 0 1px 2px rgba(10, 10, 10, .05);
  --sombra: 0 1px 2px rgba(10, 10, 10, .04), 0 10px 30px -14px rgba(10, 10, 10, .12);
  --sombra-md: 0 2px 4px rgba(10, 10, 10, .04), 0 18px 40px -16px rgba(10, 10, 10, .18);
  --sombra-fuerte: 0 4px 8px rgba(10, 10, 10, .05), 0 28px 60px -20px rgba(10, 10, 10, .32);
  --fuente: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --curva: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.55 var(--fuente); color: var(--texto); background: var(--fondo-pagina); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-variant-numeric: tabular-nums; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5rem; letter-spacing: -.02em; }
h1 { font-size: 1.85rem; font-weight: 800; }
h2 { font-size: 1.25rem; font-weight: 750; }
h3 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0 0 .75rem; }
a { color: var(--enlace); text-underline-offset: 3px; }
a:hover { text-decoration: none; }
img { max-width: 100%; }
table { border-collapse: collapse; width: 100%; }
[hidden] { display: none !important; }

/* Foco visible siempre (AA) */
:focus-visible { outline: 3px solid var(--foco); outline-offset: 2px; }
.sobre-oscuro :focus-visible, .barra-sup :focus-visible, .barra-lateral :focus-visible, .mos-lateral :focus-visible { outline-color: #FFFFFF; }

.solo-lectores { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.saltar { position: absolute; left: -9999px; top: 0; background: #fff; color: #000; padding: .75rem 1rem; z-index: 1000; }
.saltar:focus { left: 8px; top: 8px; }
.texto-suave { color: var(--texto-suave); }
.texto-chico { font-size: .875rem; }
.texto-centro { text-align: center; }
.texto-der { text-align: right; }
.nowrap { white-space: nowrap; }
.mono { font-variant-numeric: tabular-nums; }
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; }

.icono { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.25em; }

/* ---------- Botones (minimo 44 px de alto en el mostrador) ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 44px; padding: .5rem 1.2rem; border: 1px solid var(--borde); border-radius: var(--radio-sm); font: inherit; font-weight: 650; text-decoration: none; cursor: pointer; background: #fff; color: var(--texto); line-height: 1.25; box-shadow: var(--sombra-sm); transition: background .18s var(--curva), border-color .18s var(--curva), transform .18s var(--curva), box-shadow .18s var(--curva); }
.btn:hover { background: #FAFAF7; border-color: #CFCFC8; transform: translateY(-1px); box-shadow: var(--sombra); }
.btn:active { transform: scale(.985); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn--primario { background: var(--club-primario); color: var(--club-sobre-primario); border-color: rgba(0,0,0,.1); box-shadow: 0 1px 2px rgba(0,0,0,.12), inset 0 1px 0 rgba(255,255,255,.35); }
.btn--primario:hover { background: var(--club-primario-hover); border-color: rgba(0,0,0,.16); box-shadow: var(--sombra-md); }
.btn--secundario { background: #fff; color: var(--texto); border-color: #D6D6CF; }
.btn--secundario:hover { background: #F7F7F3; border-color: #A9A9A1; }
.btn--peligro { background: var(--rojo-boton); color: #fff; border-color: var(--rojo-boton); }
.btn--peligro:hover { background: #A52A20; }
.btn--texto { background: transparent; border-color: transparent; color: var(--texto); padding-inline: .6rem; min-height: 40px; text-decoration: underline; text-decoration-color: rgba(14,14,16,.3); text-underline-offset: 4px; box-shadow: none; font-weight: 600; }
.btn--texto:hover { background: rgba(10,10,10,.05); text-decoration-color: currentColor; transform: none; box-shadow: none; border-color: transparent; }
.btn--texto-rojo { color: var(--rojo-boton); }
.btn--grande { min-height: 54px; font-size: 1.05rem; font-weight: 750; padding-inline: 1.75rem; border-radius: var(--radio); }
.btn--bloque { display: flex; width: 100%; }
.btn--chico { min-height: 38px; padding: .3rem .9rem; font-size: .875rem; border-radius: 10px; }
.btn kbd, .kbd { font: inherit; font-size: .75em; font-weight: 700; padding: .05em .45em; border: 1px solid currentColor; border-radius: 6px; opacity: .8; background: rgba(0,0,0,.04); }
.acciones { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.acciones--fin { justify-content: flex-end; }

/* Boton oscuro (acciones secundarias fuertes del mostrador) y amarillo (UNICO principal por vista) */
.btn--oscuro { background: #0A0A0A; color: #fff; border-color: #0A0A0A; }
.btn--oscuro:hover { background: #26262A; border-color: #26262A; }
.btn--amarillo { background: var(--club-primario); color: var(--club-sobre-primario); border-color: rgba(0,0,0,.12); box-shadow: 0 1px 2px rgba(0,0,0,.14), 0 8px 20px -10px color-mix(in srgb, var(--club-primario) 70%, #000); font-weight: 750; }
.btn--amarillo:hover { background: var(--club-primario-hover); border-color: rgba(0,0,0,.2); }
.pagina-mostrador .btn--primario, .pagina-empresa .btn--primario { background: #0A0A0A; color: #fff; border-color: #0A0A0A; box-shadow: var(--sombra-sm); }
.pagina-mostrador .btn--primario:hover, .pagina-empresa .btn--primario:hover { background: #26262A; border-color: #26262A; }

/* ---------- Formularios ---------- */
.campo { margin-bottom: 1.1rem; }
.campo label, .campo .etiqueta-campo { display: block; font-weight: 650; font-size: .9rem; margin-bottom: .4rem; color: var(--texto); }
.campo .ayuda, .ayuda { display: block; font-size: .83rem; color: var(--texto-suave); margin-top: .3rem; }
.campo .error, .error-texto { display: block; font-size: .875rem; color: var(--rojo-texto); font-weight: 650; margin-top: .3rem; }
.campo--error input, .campo--error select, .campo--error textarea { border-color: var(--rojo-borde); box-shadow: 0 0 0 3px rgba(229, 72, 58, .15); }
input[type="text"], input[type="password"], input[type="email"], input[type="tel"], input[type="search"], input[type="number"], input[type="date"], input[type="file"], select, textarea {
  width: 100%; min-height: 46px; padding: .55rem .95rem; font: inherit; color: var(--texto); background: #fff; border: 1px solid #D6D6CF; border-radius: var(--radio-sm); box-shadow: var(--sombra-sm); transition: border-color .15s ease, box-shadow .15s ease; }
input::placeholder { color: #8A8D93; }
input:hover, select:hover, textarea:hover { border-color: #B8B8B0; }
input:focus, select:focus, textarea:focus { outline: none; border-color: #0A0A0A; box-shadow: 0 0 0 4px rgba(47, 91, 255, .18); }
textarea { min-height: 96px; resize: vertical; }
input[readonly] { background: var(--fondo-pagina); color: var(--texto-suave); }
input[type="checkbox"], input[type="radio"] { width: 1.25rem; height: 1.25rem; min-height: 0; accent-color: #0A0A0A; flex: none; cursor: pointer; box-shadow: none; }
.casilla { display: flex; gap: .6rem; align-items: flex-start; margin-bottom: .75rem; }
.casilla label { font-weight: 400; margin: 0; cursor: pointer; }
.campo-clave { position: relative; }
.campo-clave input { padding-right: 5.5rem; }
.campo-clave button { position: absolute; right: 4px; top: 4px; min-height: 38px; }
.contador { font-size: .85rem; color: var(--texto-suave); font-weight: 500; }
.fila-campos { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 1rem; }
fieldset { border: 0; padding: 0; margin: 0 0 1rem; min-width: 0; }
legend { font-weight: 700; padding: 0; margin-bottom: .6rem; }

/* ---------- Tarjetas y estructura ---------- */
.tarjeta { background: var(--tarjeta); border: 1px solid var(--borde); border-radius: var(--radio-lg); box-shadow: var(--sombra); padding: 1.5rem; }
.tarjeta--compacta { padding: 1rem 1.15rem; }
.tarjeta__titulo { font-size: 1.1rem; font-weight: 750; margin-bottom: .9rem; }
.encabezado-pagina { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.5rem; }
.encabezado-pagina h1 { margin-bottom: .2rem; }
.encabezado-pagina p { margin: 0; color: var(--texto-suave); font-size: .95rem; }
.cols-60-40 { display: grid; grid-template-columns: 3fr 2fr; gap: 1.5rem; align-items: start; }
.cols-65-35 { display: grid; grid-template-columns: 13fr 7fr; gap: 1.5rem; align-items: start; }
.cols-55-45 { display: grid; grid-template-columns: 11fr 9fr; gap: 1.5rem; align-items: start; }
.pila > * + * { margin-top: 1.1rem; }
.sobretitulo { font-size: .74rem; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; color: var(--texto-suave); margin: 0 0 .35rem; }

/* ---------- Alertas ---------- */
.alerta { display: flex; gap: .85rem; padding: .95rem 1.15rem; border-radius: 14px; border: 1px solid; border-left-width: 5px; margin-bottom: 1.1rem; box-shadow: var(--sombra-sm); }
.alerta__cuerpo { flex: 1; }
.alerta__cuerpo > :last-child { margin-bottom: 0; }
.alerta__titulo { font-weight: 750; margin: 0 0 .2rem; }
.alerta--ambar { background: var(--ambar-fondo); color: var(--ambar-texto); border-color: #F3D9A0; border-left-color: var(--ambar-borde); }
.alerta--verde { background: var(--verde-fondo); color: var(--verde-texto); border-color: #BDE5C8; border-left-color: var(--verde-borde); }
.alerta--rojo { background: var(--rojo-fondo); color: var(--rojo-texto); border-color: #F5C2BC; border-left-color: var(--rojo-borde); }
.alerta--azul { background: var(--azul-fondo); color: var(--azul-texto); border-color: #CBD8FF; border-left-color: #3B5BDB; }
.alerta--gris { background: var(--gris-fondo); color: var(--gris-texto); border-color: #DADAD3; border-left-color: #9A9A92; }
.alerta a { color: inherit; font-weight: 700; }
.alerta .btn { align-self: center; }

/* ---------- Etiquetas de estado ---------- */
.etiqueta { display: inline-flex; align-items: center; gap: .4rem; padding: .18rem .7rem; border-radius: 999px; font-size: .8rem; font-weight: 700; white-space: nowrap; }
.etiqueta::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.etiqueta--azul { background: var(--azul-fondo); color: var(--azul-texto); }
.etiqueta--azul-oscuro { background: var(--azul-osc-fondo); color: var(--azul-osc-texto); }
.etiqueta--ambar { background: var(--ambar-fondo); color: var(--ambar-texto); }
.etiqueta--verde { background: var(--verde-fondo); color: var(--verde-texto); }
.etiqueta--rojo { background: var(--rojo-fondo); color: var(--rojo-texto); }
.etiqueta--gris { background: var(--gris-fondo); color: var(--gris-texto); }
.etiqueta--gris-oscuro { background: var(--gris-osc-fondo); color: var(--gris-osc-texto); }
.etiqueta--morado { background: var(--morado-fondo); color: var(--morado-texto); }
.etiqueta--extra { margin-left: .25rem; }
.motivo-linea { display: block; font-size: .85rem; color: var(--texto-suave); margin-top: .25rem; white-space: normal; }

/* ---------- Tablas ---------- */
.tabla-envoltorio { overflow-x: auto; background: var(--tarjeta); border: 1px solid var(--borde); border-radius: var(--radio-lg); box-shadow: var(--sombra); }
.tabla th, .tabla td { padding: .85rem 1.1rem; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--borde-suave); }
.tabla thead th { background: #FAFAF7; font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: #64676E; font-weight: 750; white-space: nowrap; position: sticky; top: 0; border-bottom: 1px solid var(--borde); }
.tabla tbody tr:last-child td { border-bottom: 0; }
.tabla tbody tr { transition: background .12s ease; }
.tabla tbody tr:hover { background: #FAFAF7; }
.tabla .num { text-align: right; font-variant-numeric: tabular-nums; }
.tabla tr.fila-propia { background: transparent; }
.tabla tr.fila-propia:hover { background: #FAFAF7; }
.tabla tr.fila-clicable { cursor: pointer; position: relative; }
.tabla tr.fila-clicable:hover { background: #F6F6F1; }
.tabla tr.fila-clicable:focus-visible, .tabla tr.fila-clicable:focus-within { outline: 3px solid var(--foco); outline-offset: -3px; }
.tabla tr.fila-clicable a.fila-enlace::after { content: ""; position: absolute; inset: 0; }
.tabla tr.fila-clicable a.fila-enlace:focus-visible { outline: none; }
.tabla tr.fila-clicable td a:not(.fila-enlace), .tabla tr.fila-clicable td button, .tabla tr.fila-clicable td input, .tabla tr.fila-clicable td select { position: relative; z-index: 1; }
.tabla tr.fila-activa { background: #FFFDE6; box-shadow: inset 4px 0 0 var(--club-primario); }
.tabla a.fila-enlace { color: var(--texto); font-weight: 650; text-decoration: none; }
.tabla a.fila-enlace:hover { text-decoration: underline; }
.tabla caption { text-align: left; padding: .75rem 1rem; font-weight: 700; }
.celda-sub { display: block; font-size: .83rem; color: var(--texto-suave); margin-top: .15rem; }
.tabla-resumen th { width: 40%; color: var(--texto-suave); font-weight: 600; }

/* ---------- Pestanas (segmentadas) ---------- */
.pestanas { display: inline-flex; flex-wrap: wrap; gap: .25rem; margin: 0 0 1.25rem; padding: .3rem; list-style: none; background: #ECECE6; border-radius: 14px; }
.pestanas a { display: block; padding: .5rem 1.05rem; text-decoration: none; color: var(--texto-suave); font-weight: 650; font-size: .9rem; border-radius: 10px; min-height: 40px; line-height: 1.7; transition: color .15s ease, background .15s ease, box-shadow .15s ease; }
.pestanas a:hover { color: var(--texto); }
.pestanas a[aria-current="page"], .pestanas a[aria-selected="true"] { color: var(--texto); background: #fff; box-shadow: 0 1px 2px rgba(10,10,10,.1), 0 4px 10px -4px rgba(10,10,10,.12); font-weight: 750; }
.pestanas .contador-pestana { font-size: .75rem; font-weight: 750; background: #fff; color: var(--gris-texto); border-radius: 999px; padding: .1rem .5rem; margin-left: .35rem; }

.resumen-barra { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; padding: .85rem 1.25rem; background: #FFFFFF; border: 1px solid var(--borde); border-radius: var(--radio); margin-bottom: 1.25rem; font-size: .95rem; box-shadow: var(--sombra-sm); }
.resumen-barra strong { color: var(--texto); }
.resumen-barra .destaque-verde { color: var(--verde-texto); font-weight: 750; }

/* ---------- Filtros ---------- */
.filtros { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: flex-end; margin-bottom: 1.25rem; }
.filtros .campo { margin: 0; min-width: 150px; }
.filtros .campo--ancho { flex: 1 1 280px; }
.filtros--tarjeta { background: #fff; border: 1px solid var(--borde); border-radius: var(--radio-lg); padding: 1rem 1.15rem; box-shadow: var(--sombra-sm); }

/* ---------- Indicadores ---------- */
.indicadores { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1.15rem; margin-bottom: 1.5rem; }
.indicador { background: var(--tarjeta); border: 1px solid var(--borde); border-radius: var(--radio-lg); box-shadow: var(--sombra); padding: 1.3rem 1.4rem; position: relative; overflow: hidden; transition: transform .25s var(--curva), box-shadow .25s var(--curva); }
.indicador:hover { transform: translateY(-2px); box-shadow: var(--sombra-md); }
.indicador::before { content: ""; position: absolute; left: 0; top: 1.3rem; bottom: 1.3rem; width: 4px; border-radius: 0 4px 4px 0; background: var(--club-primario); }
.indicador__titulo { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 750; color: var(--texto-suave); margin: 0; }
.indicador__valor { font-size: 2.5rem; font-weight: 800; line-height: 1.1; margin: .35rem 0 .2rem; font-variant-numeric: tabular-nums; color: var(--texto); letter-spacing: -.03em; }
.indicador__detalle { font-size: .9rem; color: var(--texto-suave); margin: 0 0 .25rem; font-weight: 550; }
.indicador--ambar::before { background: var(--ambar-borde); }
.indicador--verde::before { background: var(--verde-borde); }
.indicador--rojo::before { background: var(--rojo-borde); }
.indicador--morado::before { background: #7C4DFF; }
.indicador--enlace { padding: 0; }
.indicador--enlace > a.indicador__enlace-total { display: block; padding: 1.3rem 1.4rem; color: inherit; text-decoration: none; }
.indicador--enlace > a:hover { background: #FAFAF7; }

/* ---------- Barra de avance (progress nativo, sin estilos en linea) ---------- */
.avance { display: flex; align-items: center; gap: .6rem; min-width: 150px; }
.avance progress { flex: 1; height: 10px; appearance: none; -webkit-appearance: none; border: 0; border-radius: 999px; background: var(--gris-fondo); overflow: hidden; }
.avance progress::-webkit-progress-bar { background: var(--gris-fondo); border-radius: 999px; }
.avance progress::-webkit-progress-value { background: #55585E; border-radius: 999px; }
.avance progress::-moz-progress-bar { background: #55585E; border-radius: 999px; }
.avance--lider progress::-webkit-progress-value { background: var(--club-acento); }
.avance--lider progress::-moz-progress-bar { background: var(--club-acento); }
.avance__texto { font-size: .85rem; color: var(--texto-suave); white-space: nowrap; min-width: 6.5em; font-weight: 650; }

/* ---------- Medallas ---------- */
.medalla { display: inline-flex; align-items: center; justify-content: center; width: 2.1rem; height: 2.1rem; border-radius: 50%; font-weight: 800; font-size: .95rem; background: var(--gris-fondo); color: var(--gris-texto); }
.medalla--1 { background: linear-gradient(145deg, #FFE066, #F2B705); color: #5A3A00; box-shadow: 0 4px 12px -4px rgba(242,183,5,.7); }
.medalla--2 { background: linear-gradient(145deg, #F1F1EE, #CFCFCA); color: #3A3C40; }
.medalla--3 { background: linear-gradient(145deg, #FFD9B8, #E09A5E); color: #6B3410; }

/* ---------- Paginacion ---------- */
.paginacion { display: flex; flex-wrap: wrap; gap: .35rem; justify-content: center; align-items: center; padding: 1rem 0 0; }
.paginacion a, .paginacion span { min-width: 42px; min-height: 42px; display: inline-flex; align-items: center; justify-content: center; padding: 0 .65rem; border: 1px solid var(--borde); border-radius: 12px; text-decoration: none; color: var(--texto); background: #fff; font-weight: 650; }
.paginacion a:hover { background: #F7F7F3; }
.paginacion [aria-current="page"] { background: #0A0A0A; color: #fff; border-color: #0A0A0A; }
.paginacion .inactivo { opacity: .45; }

/* ---------- Estado vacio ---------- */
.vacio { text-align: center; padding: 3rem 1.5rem; background: var(--tarjeta); border: 1.5px dashed #D6D6CF; border-radius: var(--radio-lg); }
.vacio h2, .vacio h3 { margin-bottom: .35rem; }
.vacio p { color: var(--texto-suave); max-width: 46ch; margin-inline: auto; }

/* ---------- Modales (dialog nativo) ---------- */
dialog.modal { border: 0; border-radius: 24px; padding: 0; width: min(560px, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); box-shadow: var(--sombra-fuerte); color: var(--texto); }
dialog.modal--ancho { width: min(760px, calc(100vw - 2rem)); }
dialog.modal::backdrop { background: rgba(10, 10, 10, .55); backdrop-filter: blur(3px); }
.modal__cuerpo { padding: 1.75rem; }
.modal__cuerpo h2 { margin-bottom: .6rem; }
.modal__pie { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: flex-end; margin-top: 1.4rem; }

/* ---------- Estructura del mostrador: menu lateral oscuro + contenido claro ---------- */
.sobre-oscuro { background: var(--club-fondo); color: var(--club-sobre-fondo); }
.marca { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: inherit; }
.marca__logo { height: 34px; width: auto; max-width: 150px; object-fit: contain; flex: none; }
.marca__sigla { width: 40px; height: 40px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--club-primario); color: var(--club-sobre-primario); font-weight: 800; flex: none; }
.marca__texto { line-height: 1.15; }
.marca__texto strong { display: block; }
.marca__texto span { font-size: .8rem; opacity: .85; }
.marca-enlace { color: inherit; text-decoration: none; display: inline-block; }

.mos { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }
.mos-lateral { background: var(--club-fondo); color: var(--club-sobre-fondo); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; padding: 1.6rem 1rem 1.2rem; overflow-y: auto; z-index: 40; }
.mos-lateral__marca { display: block; padding: .15rem .9rem 1.4rem; text-decoration: none; color: inherit; }
.mos-lateral__marca .marca { flex-direction: column; align-items: flex-start; gap: .4rem; }
.mos-lateral__marca .marca__logo { height: auto; width: 150px; max-width: 150px; }
.mos-lateral__marca .marca__texto span { font-size: .78rem; letter-spacing: .02em; color: #A8A8A2; opacity: 1; }
.mos-nav { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.mos-nav a { position: relative; display: flex; align-items: center; gap: .8rem; min-height: 48px; padding: .6rem .9rem; border-radius: 14px; color: #CFCFC9; text-decoration: none; font-weight: 650; font-size: .95rem; transition: background .18s var(--curva), color .18s var(--curva); }
.mos-nav a .icono { width: 1.3rem; height: 1.3rem; stroke-width: 1.7; }
.mos-nav a:hover { background: #151515; color: #fff; }
.mos-nav a[aria-current="page"] { background: #1C1C1C; color: #fff; }
.mos-nav a[aria-current="page"]::before { content: ""; position: absolute; left: -1rem; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: var(--club-primario); }
.mos-nav a[aria-current="page"] .icono { color: var(--club-primario); }
.mos-nav .contador-menu { margin-left: auto; background: var(--club-primario); color: var(--club-sobre-primario); border-radius: 999px; font-size: .75rem; font-weight: 800; padding: 0 .5rem; min-width: 1.5rem; text-align: center; line-height: 1.5rem; }
.mos-nav .pronto { margin-left: auto; font-size: .68rem; font-weight: 700; border: 1px solid #4A4A4A; color: #A8A8A2; border-radius: 999px; padding: 0 .45rem; }
.mos-nav .kbd { margin-left: auto; color: #8E8E88; border-color: #3A3A3A; background: transparent; }
.mos-lateral__pie { margin-top: auto; display: grid; gap: .35rem; padding-top: 1.2rem; }
.mos-ferreteria { display: flex; align-items: center; gap: .75rem; padding: .85rem .9rem; margin-bottom: .6rem; border-radius: 16px; background: #131313; border: 1px solid #232323; }
.mos-ferreteria__icono { width: 38px; height: 38px; border-radius: 12px; background: var(--club-primario); color: var(--club-sobre-primario); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.mos-ferreteria strong { display: block; font-size: .88rem; line-height: 1.25; }
.mos-ferreteria span { font-size: .78rem; color: #A8A8A2; }
.mos-util { display: flex; align-items: center; gap: .75rem; width: 100%; min-height: 44px; padding: .5rem .9rem; border: 0; border-radius: 12px; background: transparent; color: #BDBDB7; font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; text-align: left; transition: background .15s ease, color .15s ease; }
.mos-util:hover { background: #151515; color: #fff; }
.mos-util .icono { width: 1.2rem; height: 1.2rem; }
.mos-principal { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.mos-contenido { flex: 1; width: 100%; max-width: 1640px; margin: 0 auto; padding: 2rem 2.25rem 1.5rem; }
.contenedor { max-width: 1400px; margin: 0 auto; padding: 1.5rem 1.25rem 2rem; }
.pie-marca { text-align: center; font-size: .82rem; color: var(--texto-suave); padding: 1rem 1.25rem 1.6rem; }
.franja-offline { background: #7C2D12; color: #fff; padding: .6rem 1.25rem; display: flex; gap: 1rem; align-items: center; justify-content: center; flex-wrap: wrap; font-weight: 600; }
.franja-offline .btn { min-height: 36px; }
.mos-cabeza { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.mos-cabeza h1 { margin-bottom: .25rem; }
.mos-cabeza p { margin: 0; color: var(--texto-suave); }

/* Barra superior antigua: sigue disponible para otras pantallas sin menu lateral */
.barra-sup { background: var(--club-fondo); color: var(--club-sobre-fondo); position: sticky; top: 0; z-index: 50; }
.barra-sup__fila { max-width: 1400px; margin: 0 auto; padding: .6rem 1.25rem; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; }

/* ---------- Mensajes (django messages) ---------- */
.mensajes { margin-bottom: 1rem; }

/* ---------- Auth: panel de marca + formulario ---------- */
.pagina-auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); grid-template-rows: 1fr auto; background: var(--club-fondo); }
.auth-marca { grid-row: 1 / 3; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 3rem 3.5rem; color: var(--club-sobre-fondo); background: radial-gradient(900px 500px at 15% 110%, color-mix(in srgb, var(--club-primario) 26%, transparent), transparent 60%), var(--club-fondo); }
.auth-marca::after { content: ""; position: absolute; right: -120px; top: -120px; width: 380px; height: 380px; border-radius: 50%; border: 56px solid color-mix(in srgb, var(--club-primario) 14%, transparent); }
.auth-marca .marca__logo { height: 46px; max-width: 220px; }
.auth-marca__titular { position: relative; z-index: 1; max-width: 14ch; font-size: clamp(2.2rem, 3.6vw, 3.4rem); line-height: 1.04; font-weight: 800; letter-spacing: -.035em; margin: 0 0 1rem; }
.auth-marca__titular em { font-style: normal; color: var(--club-primario); }
.auth-marca__texto { position: relative; z-index: 1; max-width: 40ch; color: #B9B9B3; font-size: 1.05rem; margin: 0; }
.auth-marca__lema { position: relative; z-index: 1; margin: 0; max-width: 24ch; font-size: 1.35rem; line-height: 1.35; font-weight: 600; color: #E4E4DF; letter-spacing: -.01em; }
.auth-marca__lista { position: relative; z-index: 1; list-style: none; padding: 0; margin: 1.6rem 0 0; display: grid; gap: .65rem; color: #E4E4DF; font-weight: 600; font-size: .95rem; }
.auth-marca__lista li { display: flex; align-items: center; gap: .65rem; }
.auth-marca__lista .icono { color: var(--club-primario); }
.auth-marca__adorno { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.6rem 2rem; align-items: center; padding-top: 1.75rem; border-top: 1px solid rgba(255,255,255,.1); }
.auth-marca__adorno img { width: 100%; max-width: 118px; max-height: 30px; object-fit: contain; object-position: left center; opacity: .42; pointer-events: none; user-select: none; }
.auth-marca__adorno img[src*="pentax"] { max-height: 36px; }
.auth-marca__adorno img[src*="mondial"], .auth-marca__adorno img[src*="unecol"] { max-width: 124px; max-height: 34px; }
.auth-centro { grid-column: 2; flex: 1; display: flex; align-items: center; justify-content: center; padding: 2rem 1.5rem; background: var(--fondo-pagina); border-radius: 36px 0 0 0; }
.auth-caja { width: min(440px, 100%); background: transparent; padding: 0; }
.auth-caja .marca { color: var(--texto); margin-bottom: 1.25rem; }
.auth-caja h1 { font-size: 2rem; margin-bottom: .35rem; }
.pagina-auth .pie-marca { grid-column: 2; color: var(--texto-suave); background: var(--fondo-pagina); padding-top: 0; }
.pagina-auth .btn--primario { background: var(--club-primario); color: var(--club-sobre-primario); border-color: rgba(0,0,0,.12); }
.lista-valor { padding-left: 1.2rem; margin: 0 0 1rem; }
.lista-valor li { margin-bottom: .35rem; }

/* ---------- Selector de dependiente ---------- */
.selector-dep { border: 2px solid transparent; border-radius: var(--radio); padding: .25rem; }
.selector-dep--resaltado { border-color: var(--ambar-borde); background: var(--ambar-fondo); padding: .85rem; }
.selector-dep__lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: .6rem; }
.selector-dep__op { position: relative; }
.selector-dep__op input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.selector-dep__op label { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 52px; padding: .5rem .85rem; border: 1px solid #D6D6CF; border-radius: 14px; font-size: .98rem; font-weight: 650; background: #fff; cursor: pointer; margin: 0; box-shadow: var(--sombra-sm); transition: background .18s var(--curva), border-color .18s var(--curva), color .18s var(--curva), transform .18s var(--curva); }
.selector-dep__op input:hover + label { background: #F7F7F3; border-color: #A9A9A1; transform: translateY(-1px); }
.selector-dep__op input:checked + label { background: #0A0A0A; color: #fff; border-color: #0A0A0A; font-weight: 700; box-shadow: var(--sombra-md); }
.selector-dep__op input:focus-visible + label { outline: 3px solid var(--foco); outline-offset: 2px; }
.selector-dep__op input:checked + label::before { content: "\2713"; margin-right: .45rem; font-weight: 800; color: var(--club-primario); }
.selector-dep--lista .selector-dep__lista { grid-template-columns: 1fr; max-height: 260px; overflow-y: auto; padding: .35rem; border: 1px solid var(--borde); border-radius: 14px; }
.selector-dep--lista .selector-dep__op label { justify-content: flex-start; min-height: 46px; }
.selector-dep__buscar { margin-bottom: .75rem; }
.selector-dep__sin-resultados { padding: .75rem; color: var(--texto-suave); font-weight: 500; }

/* ---------- Registrar venta: estructura ---------- */
.registro { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 1.5rem; align-items: start; }
.registro__lateral { position: sticky; top: 1.25rem; display: grid; gap: 1.1rem; max-height: calc(100vh - 2.5rem); overflow-y: auto; padding: 2px 4px 6px 2px; margin: -2px -4px -6px -2px; scrollbar-width: thin; }

.stepper { list-style: none; margin: 0 0 1.25rem; padding: .5rem; display: grid; grid-template-columns: repeat(4, 1fr); gap: .25rem; background: #fff; border: 1px solid var(--borde); border-radius: var(--radio-lg); box-shadow: var(--sombra); }
.stepper li { position: relative; display: flex; align-items: center; gap: .7rem; padding: .7rem .9rem; border-radius: 16px; color: var(--texto-suave); font-weight: 650; font-size: .9rem; line-height: 1.25; transition: background .2s var(--curva); }
.stepper__num { width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: .85rem; background: #ECECE6; color: #55585E; flex: none; transition: all .25s var(--curva); }
.stepper__num .icono { width: 1rem; height: 1rem; stroke-width: 3; }
.stepper__etq small { display: block; font-size: .72rem; font-weight: 600; color: #8A8D93; letter-spacing: .01em; }
.stepper li[data-estado="activo"] { background: #F7F7F2; color: var(--texto); }
.stepper li[data-estado="activo"] .stepper__num { background: var(--club-primario); color: var(--club-sobre-primario); box-shadow: 0 0 0 4px color-mix(in srgb, var(--club-primario) 28%, transparent); }
.stepper li[data-estado="listo"] { color: var(--texto); }
.stepper li[data-estado="listo"] .stepper__num { background: #0A0A0A; color: var(--club-primario); }

.paso { background: var(--tarjeta); border: 1px solid var(--borde); border-radius: var(--radio-lg); margin-bottom: 1.1rem; box-shadow: var(--sombra); transition: border-color .25s var(--curva), box-shadow .25s var(--curva); overflow: hidden; }
.paso__cabecera { display: flex; align-items: center; gap: .9rem; padding: 1.15rem 1.5rem; }
.paso__num { width: 2rem; height: 2rem; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: .85rem; background: var(--gris-fondo); color: var(--gris-texto); flex: none; transition: all .2s ease; }
.paso__titulo { margin: 0; font-size: 1.12rem; font-weight: 750; flex: 1; letter-spacing: -.015em; }
.paso__resumen { color: var(--texto-suave); font-size: .9rem; flex: 2; font-weight: 550; text-align: right; }
.paso__cuerpo { padding: 0 1.5rem 1.5rem; }
.paso[data-estado="activo"] { border-color: #0A0A0A; box-shadow: var(--sombra-md); }
.paso[data-estado="activo"] .paso__num { background: #0A0A0A; color: #fff; }
.paso[data-estado="listo"] .paso__num { background: var(--verde-fondo); color: var(--verde-texto); }
.paso[data-estado="listo"] .paso__cuerpo { display: none; }
.paso[data-estado="listo"] .paso__cabecera { padding-block: .85rem; }
.paso[data-estado="futuro"] { opacity: .6; box-shadow: var(--sombra-sm); }
.paso[data-estado="futuro"] .paso__cuerpo { display: none; }
.paso:not([data-estado="listo"]) .paso__resumen, .paso:not([data-estado="listo"]) .paso__cambiar { display: none; }
.bloque-paso + .bloque-paso { margin-top: 1.4rem; padding-top: 1.4rem; border-top: 1px solid var(--borde-suave); }
.bloque-paso h3 { font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--texto-suave); font-weight: 750; margin-bottom: .75rem; }
.campo-lectura { display: flex; gap: .75rem; flex-wrap: wrap; }
.campo-lectura input { flex: 1 1 240px; font-size: 1.1rem; min-height: 52px; }
.campo-lectura .btn { min-height: 52px; }
.visor-camara { position: relative; background: #0A0A0A; border-radius: var(--radio); overflow: hidden; max-width: 520px; box-shadow: var(--sombra-md); }
.visor-camara video { display: block; width: 100%; max-height: 320px; background: #000; }
.visor-camara__guia { position: absolute; inset: 15% 20%; border: 2.5px dashed rgba(255,255,255,.85); border-radius: 14px; pointer-events: none; }
.zona-archivo { border: 2px dashed #CFCFC8; border-radius: var(--radio); padding: 2.25rem 1.25rem; text-align: center; background: #FAFAF7; transition: all .2s ease; }
.zona-archivo.arrastrando { border-color: #0A0A0A; background: var(--club-acento-suave); transform: scale(1.005); }
.zona-archivo p { margin-bottom: .5rem; }
.zona-archivo__icono { width: 54px; height: 54px; border-radius: 16px; background: #fff; border: 1px solid var(--borde); box-shadow: var(--sombra); display: inline-flex; align-items: center; justify-content: center; margin-bottom: .75rem; }
.zona-archivo__icono .icono { width: 26px; height: 26px; }
.sello { display: inline-block; font-size: .78rem; font-weight: 700; padding: .12rem .6rem; border-radius: 999px; }
.sello--ok { background: var(--verde-fondo); color: var(--verde-texto); }
.sello--manual { background: var(--ambar-fondo); color: var(--ambar-texto); }
.franja-gris { background: var(--gris-fondo); color: var(--gris-texto); padding: .85rem 1.1rem; border-radius: 14px; font-weight: 550; }

/* Tarjeta del instalador (identificado o por confirmar) */
.tarjeta-instalador { background: #fff; border: 1px solid var(--borde); border-radius: var(--radio-lg); box-shadow: var(--sombra); padding: 1.35rem 1.5rem 1.5rem; margin-bottom: 1.1rem; position: relative; overflow: hidden; }
.tarjeta-instalador::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--club-primario); }
.instalador__cabeza { display: flex; gap: 1.1rem; align-items: center; }
.avatar { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; background: #ECECE6; color: #3A3C40; display: inline-flex; align-items: center; justify-content: center; font-size: 1.6rem; font-weight: 800; flex: none; border: 3px solid #fff; box-shadow: 0 0 0 2px var(--club-primario), var(--sombra); }
.instalador__datos { flex: 1; min-width: 0; }
.instalador__estado { display: inline-flex; align-items: center; gap: .4rem; font-size: .78rem; font-weight: 750; color: var(--verde-texto); background: var(--verde-fondo); border-radius: 999px; padding: .15rem .65rem .15rem .5rem; margin-bottom: .35rem; }
.instalador__estado .icono { width: .95rem; height: .95rem; stroke-width: 3; }
.tarjeta-instalador__nombre { font-size: 1.45rem; font-weight: 800; margin: 0; color: var(--texto); letter-spacing: -.025em; line-height: 1.15; }
.instalador__codigo { display: inline-block; margin: .25rem 0 0; font-size: .85rem; font-weight: 700; color: var(--texto-suave); letter-spacing: .04em; }
.instalador__acciones { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-left: auto; }
.instalador__pregunta { margin: 1.1rem 0 .6rem; font-weight: 700; }
.instalador__datos-cambio { display: flex; flex-direction: column; align-items: flex-end; gap: .5rem; }
.metricas { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; margin-top: 1.15rem; }
.metrica { display: flex; align-items: center; gap: .8rem; padding: .85rem 1rem; background: #FAFAF7; border: 1px solid var(--borde-suave); border-radius: 16px; min-width: 0; }
.metrica__icono { width: 38px; height: 38px; border-radius: 12px; background: #fff; border: 1px solid var(--borde); display: inline-flex; align-items: center; justify-content: center; flex: none; color: var(--texto); }
.metrica__icono .icono { width: 1.15rem; height: 1.15rem; }
.metrica__rotulo { display: block; font-size: .72rem; font-weight: 700; color: var(--texto-suave); line-height: 1.2; }
.metrica__valor { display: block; font-size: 1.2rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.25; white-space: nowrap; }
.metrica__valor--verde { color: var(--verde-texto); }
.metrica__valor--chico { font-size: 1rem; }
.metrica--carga .metrica__valor { color: #B5B6B1; }

/* ---------- Factura: modos ---------- */
.selector-modo-factura { display: flex; gap: .25rem; background: #ECECE6; padding: .3rem; border-radius: 14px; margin-bottom: 1.25rem; overflow-x: auto; }
.btn-modo-factura { flex: 1 1 auto; min-height: 44px; padding: .5rem 1rem; border: 0; border-radius: 11px; background: transparent; color: var(--texto-suave); font: inherit; font-size: .9rem; font-weight: 650; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; transition: all .18s var(--curva); white-space: nowrap; }
.btn-modo-factura:hover { color: var(--texto); background: rgba(255,255,255,.6); }
.btn-modo-factura.activo { background: #fff; color: var(--texto); box-shadow: 0 1px 2px rgba(10,10,10,.1), 0 4px 10px -4px rgba(10,10,10,.12); font-weight: 750; }
.pie-modo-factura { border-top: 1px solid var(--borde-suave); padding-top: .85rem; margin-top: 1.25rem; }
.enlace-config-lector { display: inline-flex; align-items: center; gap: .45rem; background: none; border: 0; color: var(--texto-suave); font: inherit; font-size: .85rem; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; padding: 0; transition: color .15s ease; }
.enlace-config-lector:hover { color: var(--texto); }
.caja-manual { background: #FAFAF7; border: 1px solid var(--borde); border-radius: var(--radio); padding: 1.15rem; }

/* ---------- Catalogo de productos (paso 3) ---------- */
.buscador { position: relative; }
.buscador .icono { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: #8A8D93; pointer-events: none; }
.buscador input { padding-left: 2.8rem; min-height: 50px; border-radius: 14px; }
.fichas { display: flex; flex-wrap: wrap; gap: .5rem; margin: .85rem 0; }
.ficha { min-height: 38px; padding: .3rem 1rem; border-radius: 999px; border: 1px solid #D6D6CF; background: #fff; font: inherit; font-size: .85rem; font-weight: 650; color: var(--texto); cursor: pointer; transition: all .18s var(--curva); }
.ficha:hover { background: #F7F7F3; border-color: #A9A9A1; transform: translateY(-1px); }
.ficha[aria-pressed="true"] { background: #0A0A0A; color: #fff; border-color: #0A0A0A; }
.catalogo ul { list-style: none; margin: 0; padding: 0; }
.catalogo { border: 1px solid var(--borde); border-radius: var(--radio); overflow: hidden; background: #fff; max-height: 460px; overflow-y: auto; scrollbar-width: thin; }
.catalogo__cab { display: grid; grid-template-columns: 56px minmax(0, 1fr) 110px 90px 112px; gap: 1rem; align-items: center; padding: .6rem 1rem; background: #FAFAF7; border-bottom: 1px solid var(--borde); font-size: .7rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: #64676E; position: sticky; top: 0; z-index: 1; }
.prod { display: grid; grid-template-columns: 56px minmax(0, 1fr) 110px 90px 112px; gap: 1rem; align-items: center; padding: .75rem 1rem; border-bottom: 1px solid var(--borde-suave); transition: background .15s ease; position: relative; }
.prod:last-child { border-bottom: 0; }
.prod:hover { background: #FAFAF7; }
.prod--agregado { background: #F6FBF7; }
.prod--agregado::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: var(--verde-borde); }
.miniatura { width: 56px; height: 56px; border-radius: 14px; background: #F4F4F1; border: 1px solid var(--borde-suave); display: inline-flex; align-items: center; justify-content: center; overflow: hidden; flex: none; color: #7B7E85; font-weight: 800; font-size: 1.15rem; }
.miniatura img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.miniatura--logo img { object-fit: contain; padding: 8px; }
.miniatura--chica { width: 44px; height: 44px; border-radius: 12px; font-size: 1rem; }
.prod__nombre { font-weight: 700; font-size: .95rem; line-height: 1.3; margin: 0; }
.prod__sub { display: block; font-size: .8rem; color: var(--texto-suave); margin-top: .15rem; }
.prod__marca { display: flex; align-items: center; min-height: 28px; font-weight: 700; font-size: .85rem; color: var(--texto-suave); }
.prod__marca img { max-height: 24px; max-width: 96px; object-fit: contain; }
.prod__precio { font-weight: 800; font-size: 1rem; text-align: right; }
.prod__precio small { display: block; font-size: .7rem; font-weight: 600; color: var(--texto-suave); }
.prod__accion { display: flex; align-items: center; justify-content: flex-end; gap: .5rem; }
.prod__cant { min-width: 2rem; height: 2rem; padding: 0 .5rem; border-radius: 999px; background: var(--verde-fondo); color: var(--verde-texto); font-size: .8rem; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.catalogo--sin-precio .catalogo__cab, .catalogo--sin-precio .prod { grid-template-columns: 56px minmax(0, 1fr) 110px 112px; }
.catalogo--sin-precio .prod__precio, .catalogo--sin-precio .catalogo__cab .col-precio { display: none; }

/* ---------- Panel lateral de resumen (registrar venta) ---------- */
.panel-resumen { background: #fff; border: 1px solid var(--borde); border-radius: var(--radio-lg); box-shadow: var(--sombra-md); padding: 1.4rem; }
.panel-resumen__cab { display: flex; align-items: center; justify-content: space-between; margin-bottom: .9rem; }
.panel-resumen .tarjeta__titulo { font-size: 1.1rem; font-weight: 800; letter-spacing: -.02em; margin: 0; }
.resumen-meta { display: grid; gap: .55rem; margin: 0 0 1rem; padding: 0 0 1rem; border-bottom: 1px solid var(--borde-suave); }
.resumen-meta__fila { display: grid; grid-template-columns: 5.4rem 1fr auto; gap: .5rem; align-items: baseline; font-size: .85rem; }
.resumen-meta__fila .rotulo { color: var(--texto-suave); font-weight: 600; }
.resumen-meta__fila .valor { font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.resumen-meta__fila .cambiar { min-height: 28px; padding: 0 .4rem; font-size: .8rem; }
.resumen-lista { list-style: none; padding: 0; margin: 0 0 1rem; }
.lineas-resumen { list-style: none; padding: 0; margin: 0 0 1rem; max-height: 42vh; overflow-y: auto; scrollbar-width: thin; }
.lineas-vacio { text-align: center; padding: 1.2rem .5rem 1.3rem; color: var(--texto-suave); font-size: .88rem; }
.lineas-vacio .icono { width: 28px; height: 28px; display: block; margin: 0 auto .5rem; color: #B5B6B1; }
.linea-resumen { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; grid-template-areas: "mini nom quitar" "mini ctrl ctrl" "mini pie pie"; gap: .35rem .75rem; padding: .85rem 0; border-bottom: 1px solid var(--borde-suave); align-items: center; }
.linea-resumen:last-child { border-bottom: 0; }
.linea-resumen .miniatura { grid-area: mini; align-self: start; }
.linea-resumen__nombre { grid-area: nom; font-weight: 700; font-size: .88rem; line-height: 1.3; margin: 0; }
.linea-resumen__nombre small { display: block; font-weight: 600; color: var(--texto-suave); font-size: .75rem; }
.linea-resumen__quitar { grid-area: quitar; width: 34px; height: 34px; border-radius: 10px; border: 0; background: transparent; color: #8A8D93; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: background .15s ease, color .15s ease; }
.linea-resumen__quitar:hover { background: var(--rojo-fondo); color: var(--rojo-texto); }
.linea-resumen__ctrl { grid-area: ctrl; display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; }
.linea-resumen__pie { grid-area: pie; display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; }
.linea-resumen__subtotal { margin-left: auto; font-weight: 800; font-size: .98rem; }
.linea-resumen__cashback { font-size: .75rem; font-weight: 700; color: var(--verde-texto); }
.resumen-total { display: flex; justify-content: space-between; align-items: baseline; padding: .9rem 0 .2rem; border-top: 1px solid var(--borde); }
.resumen-total .rotulo { font-weight: 700; font-size: .95rem; }
.resumen-total .valor { white-space: nowrap; font-size: 1.7rem; font-weight: 800; letter-spacing: -.03em; }
.resumen-cashback { display: flex; justify-content: space-between; align-items: center; gap: .75rem; margin: .7rem 0 1rem; padding: .85rem 1rem; border-radius: 14px; background: var(--verde-fondo); border: 1px solid #BDE5C8; }
.resumen-cashback .rotulo { color: #0F5C28; font-weight: 700; font-size: .85rem; line-height: 1.25; }
.resumen-cashback .valor { color: var(--verde-texto); font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; }
.panel-resumen #boton-registrar { min-height: 58px; font-size: 1.1rem; border-radius: 16px; }
.panel-resumen__pie { margin: .75rem 0 0; text-align: center; font-size: .78rem; color: var(--texto-suave); }

.ventas-inst { background: #fff; border: 1px solid var(--borde); border-radius: var(--radio-lg); box-shadow: var(--sombra); padding: 1.3rem 1.4rem 1.2rem; }
.ventas-inst__titulo { font-size: 1.02rem; font-weight: 800; letter-spacing: -.02em; margin: 0 0 .9rem; }
.ventas-inst__grid { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-bottom: 1rem; }
.ventas-inst__grid .metrica { padding: .7rem .8rem; }
.ventas-inst__grid .metrica__valor { font-size: 1.05rem; }
.mini-tabla { width: 100%; font-size: .85rem; }
.mini-tabla th { text-align: left; font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: #64676E; font-weight: 750; padding: 0 0 .4rem; }
.mini-tabla th.num, .mini-tabla td.num { text-align: right; }
.mini-tabla td { padding: .5rem 0; border-top: 1px solid var(--borde-suave); font-weight: 650; }
.mini-tabla td.verde { color: var(--verde-texto); font-weight: 800; }
.mini-tabla small { display: block; font-weight: 550; color: var(--texto-suave); font-size: .72rem; }
.ventas-inst__vacio { text-align: center; color: var(--texto-suave); font-size: .88rem; padding: 1rem .5rem; }
.ventas-inst__vacio .icono { width: 28px; height: 28px; display: block; margin: 0 auto .5rem; color: #B5B6B1; }

/* Resumen heredado (pantallas de empresa) */
.resumen-lista li { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: .15rem .75rem; padding: .65rem 0; border-bottom: 1px solid var(--borde-suave); }
.resumen-lista li:last-child { border-bottom: 0; }
.resumen-lista li .rotulo { color: var(--texto-suave); font-size: .85rem; font-weight: 500; }
.resumen-lista li .valor { font-weight: 700; grid-column: 1 / -1; font-size: .95rem; color: var(--texto); }
.resumen-lista li .valor.mono { font-size: 1.1rem; }
.visor-factura__lienzo--xml { height: auto; padding: 1.5rem; background: #fff; align-items: flex-start; }

/* ---------- Controles de cantidad e inputs numericos ---------- */
.cantidad { display: inline-flex; align-items: stretch; border: 1px solid #D6D6CF; border-radius: 12px; background: #FFFFFF; overflow: hidden; box-shadow: var(--sombra-sm); }
.cantidad button { width: 34px; min-height: 36px; border: 0; background: #F7F7F3; color: #0A0A0A; font-size: 1.1rem; font-weight: 700; cursor: pointer; transition: background .12s ease; display: flex; align-items: center; justify-content: center; padding: 0; }
.cantidad button:hover { background: #E8E8E2; }
.cantidad button:active { background: #D6D6CF; }
.cantidad input { width: 3rem; min-height: 36px; border: 0; border-left: 1px solid #E6E6E0; border-right: 1px solid #E6E6E0; text-align: center; font-weight: 750; padding: 0; border-radius: 0; box-shadow: none; font-variant-numeric: tabular-nums; }
.input-precio-unitario { width: 6.4rem; max-width: 120px; min-height: 36px; padding: .25rem .6rem; text-align: right; font-variant-numeric: tabular-nums; font-weight: 650; border: 1px solid #D6D6CF; border-radius: 12px; box-shadow: var(--sombra-sm); }
.valor-subtotal { font-weight: 750; font-variant-numeric: tabular-nums; color: var(--texto); }
.valor-cashback { font-weight: 750; font-variant-numeric: tabular-nums; color: var(--verde-texto); }

/* ---------- Exito de registro ---------- */
.exito { max-width: 760px; margin: 2rem auto 0; text-align: center; padding: 3rem 2.5rem 2.5rem; position: relative; overflow: hidden; }
.exito::before { content: ""; position: absolute; left: 50%; top: -140px; width: 420px; height: 280px; transform: translateX(-50%); background: radial-gradient(closest-side, color-mix(in srgb, var(--club-primario) 38%, transparent), transparent); }
.exito > * { position: relative; }
.exito-icono { width: 88px; height: 88px; border-radius: 50%; background: #0A0A0A; color: var(--club-primario); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 1.25rem; box-shadow: 0 0 0 10px var(--verde-fondo), 0 18px 36px -12px rgba(10,10,10,.45); }
.exito-icono .icono { width: 44px; height: 44px; stroke-width: 2.6; }
.exito h1 { font-size: 2.2rem; }
.caja-frase { border: 1px solid #BDE5C8; background: var(--verde-fondo); border-radius: var(--radio); padding: 1.25rem 1.5rem; font-size: 1.1rem; font-weight: 600; line-height: 1.5; margin: 1.5rem 0; text-align: left; color: #0F4A22; position: relative; }
.exito__datos { display: inline-flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-bottom: 1rem; }
.chip { display: inline-flex; align-items: center; gap: .45rem; padding: .3rem .85rem; border-radius: 999px; background: #F4F4F1; border: 1px solid var(--borde); font-size: .85rem; font-weight: 650; color: var(--gris-texto); }

/* ---------- Inicio del mostrador ---------- */
.heroe { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: 2.1rem 2.4rem; border-radius: 28px; background: var(--club-fondo); color: var(--club-sobre-fondo); position: relative; overflow: hidden; box-shadow: var(--sombra-md); margin-bottom: 1.5rem; }
.heroe::after { content: ""; position: absolute; right: -70px; bottom: -150px; width: 360px; height: 360px; border-radius: 50%; border: 52px solid color-mix(in srgb, var(--club-primario) 16%, transparent); pointer-events: none; }
.heroe > * { position: relative; z-index: 1; }
.heroe .sobretitulo { color: #A8A8A2; }
.heroe h1 { font-size: 2.2rem; margin-bottom: .35rem; }
.heroe p { color: #BDBDB7; margin: 0; }
.heroe__cta { flex: none; }
.heroe__cta .btn { min-height: 60px; padding-inline: 2.2rem; font-size: 1.1rem; border-radius: 18px; }
.heroe__cta .kbd { border-color: rgba(0,0,0,.35); }

.podio-lista { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.podio-fila { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr) auto; gap: .9rem; align-items: center; padding: .75rem .95rem; border-radius: 16px; background: #FAFAF7; border: 1px solid var(--borde-suave); }
.podio-fila:first-child { background: #FFFBDB; border-color: #F1E27A; }
.podio-fila__nombre { font-weight: 750; }
.podio-fila__sub { display: block; font-size: .8rem; color: var(--texto-suave); font-weight: 550; }
.podio-fila__monto { font-weight: 800; font-size: 1.05rem; text-align: right; }
.podio-fila__pos { font-weight: 800; color: var(--texto-suave); text-align: center; }

/* Tarjetas con tabla dentro */
.tarjeta__cab { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: .6rem; }
.tarjeta__cab .tarjeta__titulo { margin: 0; }
.tarjeta--tabla { padding-bottom: .75rem; }
.tabla--plana th, .tabla--plana td { padding-inline: .5rem; }
.tabla--plana thead th { background: transparent; position: static; }
.tabla--plana tbody tr:hover { background: #FAFAF7; }

/* ---------- Panel lateral de detalle (ventas del mostrador) ---------- */
.con-panel { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.con-panel--abierto { grid-template-columns: minmax(0, 1fr) 460px; }
.panel-lateral { position: sticky; top: 1.25rem; background: #fff; border: 1px solid var(--borde); border-radius: var(--radio-lg); box-shadow: var(--sombra-fuerte); padding: 1.5rem; max-height: calc(100vh - 2.5rem); overflow-y: auto; }
.panel-lateral__cabecera { display: flex; justify-content: space-between; align-items: flex-start; gap: .5rem; margin-bottom: .85rem; padding-bottom: .75rem; border-bottom: 1px solid var(--borde-suave); }
.panel-lateral h2 { margin: 0; font-size: 1.2rem; }
.panel-lateral section { margin-top: 1.15rem; }
.panel-lateral h3 { font-size: .95rem; text-transform: none; color: var(--texto-suave); }
.historial { list-style: none; padding: 0; margin: 0; border-left: 3px solid var(--borde); }
.historial li { padding: .35rem 0 .35rem .85rem; position: relative; }
.historial li time { display: block; font-size: .8rem; color: var(--texto-suave); font-weight: 500; }

/* ---------- Empresa: barra lateral ---------- */
.layout-empresa { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 100vh; }
.barra-lateral { background: var(--club-fondo, #0B1120); color: #F8FAFC; display: flex; flex-direction: column; padding: 1.25rem 0; position: sticky; top: 0; height: 100vh; overflow-y: auto; border-right: 1px solid rgba(255,255,255,.08); }
.barra-lateral .marca { padding: 0 1.25rem 1.25rem; border-bottom: 1px solid rgba(255,255,255,.1); margin-bottom: .85rem; }
.barra-lateral nav ul { list-style: none; margin: 0; padding: 0 .75rem; }
.barra-lateral nav a { display: flex; align-items: center; gap: .75rem; min-height: 44px; padding: .55rem .95rem; border-radius: 12px; color: #D0D0CA; text-decoration: none; font-weight: 650; margin-bottom: 3px; transition: all .15s ease; }
.barra-lateral nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.barra-lateral nav a[aria-current="page"] { background: var(--club-primario); color: var(--club-sobre-primario); font-weight: 750; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.barra-lateral .contador-menu { margin-left: auto; background: #fff; color: #111827; border-radius: 999px; font-size: .8rem; font-weight: 800; padding: 0 .55rem; min-width: 1.6rem; text-align: center; }
.barra-lateral .pronto { margin-left: auto; font-size: .72rem; font-weight: 700; border: 1px solid currentColor; border-radius: 999px; padding: 0 .45rem; opacity: .85; }
.barra-lateral__pie { margin-top: auto; padding: 1rem 1.25rem 0; border-top: 1px solid rgba(255,255,255,.1); font-size: .9rem; }
.barra-lateral__pie .rol { opacity: .85; font-size: .8rem; }
.barra-lateral__pie .btn { margin-top: .75rem; background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.barra-lateral__pie .btn:hover { background: rgba(255,255,255,.1); border-color: #fff; }
.contenido-empresa { padding: 1.75rem 2rem 2rem; min-width: 0; }
.visor-factura { background: #1E293B; border-radius: var(--radio-lg); padding: .85rem; position: sticky; top: 1rem; box-shadow: var(--sombra-md); }
.visor-factura__barra { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .75rem; }
.visor-factura__barra .btn { min-height: 38px; }
.visor-factura__lienzo { background: #fff; border-radius: 10px; overflow: auto; height: 70vh; display: flex; align-items: flex-start; justify-content: center; box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); }
.visor-factura__lienzo img { transform-origin: top center; transition: transform .15s; max-width: 100%; }
.visor-factura__lienzo iframe, .visor-factura__lienzo object { width: 100%; height: 100%; border: 0; }
.tabla-lineas td, .tabla-lineas th { padding: .6rem .75rem; }
.pie-calculo { background: #FAFAF7; border: 1px solid var(--borde); border-radius: 14px; padding: 1rem 1.15rem; margin-top: .85rem; }
.pie-calculo p { margin: 0 0 .25rem; display: flex; justify-content: space-between; font-variant-numeric: tabular-nums; }
.pie-calculo p.total { font-weight: 800; font-size: 1.15rem; color: var(--texto); padding-top: .4rem; border-top: 1px solid var(--borde); }
.sello-factura { display: inline-block; padding: .2rem .75rem; border-radius: 999px; font-weight: 700; font-size: .85rem; }
.sello-factura--ok { background: var(--verde-fondo); color: var(--verde-texto); }
.sello-factura--dudoso { background: var(--ambar-fondo); color: var(--ambar-texto); }
.sello-factura--manual { background: var(--gris-fondo); color: var(--gris-texto); }
.reservado { background: var(--gris-fondo); border: 2px dashed #9CA3AF; border-radius: var(--radio); padding: 1.5rem; text-align: center; color: var(--gris-texto); font-weight: 500; }
.fila-edicion td { background: #FFFBEB; }
.fila-edicion input { min-height: 38px; }
.pasos-asistente { display: flex; gap: .5rem; list-style: none; padding: 0; margin: 0 0 1.25rem; }
.pasos-asistente li { flex: 1; padding: .5rem .75rem; border-bottom: 3px solid var(--borde); font-weight: 600; color: var(--texto-suave); font-size: .9rem; transition: all .15s ease; }
.pasos-asistente li[aria-current="step"] { border-bottom-color: #0A0A0A; color: var(--texto); font-weight: 700; }
.desglose { background: #FAFAF7; }

/* ---------- Revision de ventas (empresa): factura grande + decision siempre a mano ---------- */
.revision { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.revision .visor-factura { position: sticky; top: 1rem; height: calc(100vh - 10rem); min-height: 480px; display: flex; flex-direction: column; background: #151517; border-radius: var(--radio-lg); padding: .9rem; }
.revision .visor-factura__lienzo { flex: 1; height: auto; min-height: 0; border-radius: 14px; }
.visor-factura__barra .btn { background: #26262A; color: #fff; border-color: #3A3A3F; box-shadow: none; }
.visor-factura__barra .btn:hover { background: #34343A; }
.decision-barra { position: sticky; bottom: 1rem; z-index: 5; margin-top: 1.1rem; box-shadow: var(--sombra-fuerte); border-color: #D6D6CF; }
.decision-barra .casilla { margin-bottom: .75rem; }
.tarjeta-instalador--compacta { padding: 1rem 1.15rem; margin-bottom: .75rem; display: flex; gap: 1rem; align-items: center; }
.tarjeta-instalador--compacta .avatar { width: 60px; height: 60px; font-size: 1.15rem; }
.tarjeta-instalador--compacta .tarjeta-instalador__nombre { font-size: 1.15rem; }

/* Filtros secundarios plegables y tablas densas */
.filtros-mas { flex-basis: 100%; }
.filtros-mas summary { cursor: pointer; font-weight: 650; color: var(--texto-suave); min-height: 40px; display: inline-flex; align-items: center; }
.filtros-mas[open] summary { margin-bottom: .75rem; }
.filtros-mas .filtros { margin: 0; }
.tabla--densa th, .tabla--densa td { padding: .7rem .8rem; font-size: .9rem; }
.tabla--densa thead th { font-size: .68rem; white-space: normal; line-height: 1.25; }

/* Lista "para atender" */
.lista-atender { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.lista-atender li { display: flex; align-items: center; gap: .75rem; padding: .8rem 1rem; border-radius: 14px; background: var(--ambar-fondo); border: 1px solid #F3D9A0; color: var(--ambar-texto); font-weight: 600; }
.lista-atender a { color: inherit; }

/* Formulario de producto con foto grande */
.form-producto__grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 2rem; align-items: start; }
.foto-producto { position: sticky; top: 1rem; }
.foto-producto__vista { aspect-ratio: 1 / 1; width: 100%; border-radius: var(--radio-lg); background: #F4F4F1; border: 1.5px dashed #CFCFC8; display: flex; align-items: center; justify-content: center; overflow: hidden; margin-bottom: .75rem; }
.foto-producto__vista img { width: 100%; height: 100%; object-fit: contain; }
.foto-producto__vista img[src] { border: 0; }
.foto-producto__vacio { display: flex; flex-direction: column; align-items: center; gap: .4rem; color: #8A8D93; font-weight: 650; }
.foto-producto__vacio .icono { width: 40px; height: 40px; }
.foto-producto input:focus-visible + .ayuda { outline: none; }
@media (max-width: 900px) { .form-producto__grid { grid-template-columns: minmax(0, 1fr); } .foto-producto { position: static; } }

.revision .visor-factura:has(.hoja-factura) { background: #E7E7E1; }
.revision .visor-factura__lienzo:has(.hoja-factura) { background: transparent; box-shadow: none; overflow: auto; align-items: stretch; justify-content: center; }
.revision .visor-factura__lienzo:has(.hoja-factura--corta) { align-items: center; }
.hoja-factura { width: min(760px, 100%); min-height: 100%; display: flex; flex-direction: column; background: #fff; border-radius: 6px; padding: 2.5rem 2.75rem; box-shadow: 0 1px 2px rgba(10,10,10,.08), 0 18px 40px -18px rgba(10,10,10,.28); }
.hoja-factura--corta { min-height: 0; width: min(560px, 100%); }
.hoja-factura__cab { border-bottom: 2px solid #0A0A0A; padding-bottom: 1.25rem; margin-bottom: 1.5rem; }
.hoja-factura__numero { font-size: 1.9rem; font-weight: 800; letter-spacing: -.02em; margin: 0 0 1rem; }
.hoja-factura__meta { display: flex; gap: 2.5rem; flex-wrap: wrap; margin: 0; }
.hoja-factura__meta dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 750; color: var(--texto-suave); }
.hoja-factura__meta dd { margin: .15rem 0 0; font-weight: 700; }
.hoja-factura__lineas { margin-bottom: 1.5rem; }
.hoja-factura__lineas th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--texto-suave); font-weight: 750; padding: .5rem .5rem; border-bottom: 1px solid var(--borde); }
.hoja-factura__lineas td { padding: .75rem .5rem; border-bottom: 1px solid var(--borde-suave); vertical-align: top; overflow-wrap: anywhere; }
.hoja-factura__lineas .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; width: 6.5rem; }
.hoja-factura__totales { margin-top: auto; margin-left: auto; width: min(320px, 100%); padding-top: 1rem; border-top: 2px solid #0A0A0A; }
.hoja-factura__totales p { display: flex; justify-content: space-between; margin: 0 0 .35rem; font-variant-numeric: tabular-nums; }
.hoja-factura__totales .total { font-size: 1.25rem; font-weight: 800; }

/* Tabla de productos de la revision: entra sin scroll en escritorio */
.tabla-lineas { table-layout: fixed; }
.tabla.tabla-lineas thead th { white-space: normal; line-height: 1.25; overflow-wrap: anywhere; }
.tabla-lineas th:nth-child(1), .tabla-lineas td:nth-child(1) { width: 6.25rem; text-align: center; }
.tabla.tabla-lineas thead th:nth-child(1) { overflow-wrap: normal; word-break: keep-all; white-space: nowrap; }
.tabla-lineas th:nth-child(4), .tabla-lineas td:nth-child(4) { width: 4.5rem; }
.tabla-lineas th:nth-child(5), .tabla-lineas td:nth-child(5) { width: 7.5rem; }
.tabla-lineas td { overflow-wrap: anywhere; }
.tabla-lineas td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 1100px) { .tabla-lineas { table-layout: auto; min-width: 640px; } }

/* ---------- Muestras ---------- */
.nota-muestra { background: #1E3A8A; color: #fff; padding: .45rem 1rem; font-size: .85rem; text-align: center; font-weight: 500; }
.nota-muestra a { color: #fff; text-decoration: underline; }

/* ---------- Complementos ---------- */
.alerta--success { background: var(--verde-fondo); color: var(--verde-texto); border-color: #BDE5C8; border-left-color: var(--verde-borde); }
.alerta--error { background: var(--rojo-fondo); color: var(--rojo-texto); border-color: #F5C2BC; border-left-color: var(--rojo-borde); }
.alerta--warning { background: var(--ambar-fondo); color: var(--ambar-texto); border-color: #F3D9A0; border-left-color: var(--ambar-borde); }
.alerta--info { background: var(--azul-fondo); color: var(--azul-texto); border-color: #CBD8FF; border-left-color: #3B5BDB; }
.acciones--centro { justify-content: center; }
.en-linea { display: inline; }
.lista-errores { margin: 0; padding-left: 1.1rem; color: var(--rojo-texto); font-weight: 600; }
.tarjeta-opcion-config { padding: 1.15rem 1.25rem; border: 1px solid var(--borde); border-radius: var(--radio); background: #FAFAF7; display: flex; align-items: flex-start; gap: 1rem; }
.tarjeta-opcion-config:hover { border-color: #A9A9A1; }
.tarjeta-opcion-config input[type="checkbox"] { width: 1.35rem; height: 1.35rem; margin-top: .2rem; flex: none; cursor: pointer; }
.tarjeta-opcion-config label { cursor: pointer; font-size: .95rem; line-height: 1.4; margin: 0; }
.d-block { display: block; }
.mt-05 { margin-top: .35rem; }
.font-weight-bold { font-weight: 700; }

/* Resaltado del boton de registrar venta */
@keyframes pulso-exito {
  0% { transform: scale(1); }
  50% { transform: scale(1.025); box-shadow: 0 0 0 7px color-mix(in srgb, var(--club-primario) 45%, transparent); }
  100% { transform: scale(1); }
}
.resaltar-registro { animation: pulso-exito .6s ease-in-out; }
@keyframes aparecer { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.tarjeta-instalador, .linea-resumen, .prod { animation: aparecer .35s var(--curva) both; }

/* ---------- Responsivo ---------- */
@media (max-width: 1500px) {
  .stepper__etq small { display: none; }
  .registro { grid-template-columns: minmax(0, 1fr) 372px; }
  .mos-contenido { padding: 1.75rem 1.75rem 1.25rem; }
}
@media (max-width: 1280px) {
  .mos { grid-template-columns: 228px minmax(0, 1fr); }
  .registro { grid-template-columns: minmax(0, 1fr) 352px; gap: 1.1rem; }
  .catalogo__cab, .prod { grid-template-columns: 56px minmax(0, 1fr) 88px 104px; }
  .catalogo__cab .col-marca, .prod__marca { display: none; }
  .catalogo--sin-precio .catalogo__cab, .catalogo--sin-precio .prod { grid-template-columns: 56px minmax(0, 1fr) 104px; }
  .stepper li { padding: .6rem .6rem; gap: .5rem; }
  .stepper__etq small { display: none; }
  .metricas { gap: .5rem; }
  .metrica { padding: .7rem .75rem; gap: .55rem; }
  .metrica__icono { width: 32px; height: 32px; }
}
@media (max-width: 1100px) {
  .con-panel--abierto { grid-template-columns: minmax(0, 1fr); }
  .panel-lateral { position: static; max-height: none; }
  .layout-empresa { grid-template-columns: 220px minmax(0, 1fr); }
  .contenido-empresa { padding: 1.25rem; }
  /* Tablet: menu lateral compacto solo con iconos */
  .mos { grid-template-columns: 84px minmax(0, 1fr); }
  .mos-lateral { padding-inline: .7rem; align-items: center; }
  .mos-lateral__marca { padding-inline: 0; }
  .mos-lateral__marca .marca__logo { height: auto; width: 58px; max-width: 58px; object-fit: contain; }
  .mos-lateral__marca .marca__texto { display: none; }
  .mos-nav a { justify-content: center; padding: .6rem; }
  .mos-nav a span.txt, .mos-nav .kbd, .mos-nav .contador-menu, .mos-nav .pronto, .mos-util span.txt, .mos-ferreteria > div { display: none; }
  .mos-nav a[aria-current="page"]::before { left: -.7rem; }
  .mos-ferreteria { padding: .5rem; justify-content: center; }
  .mos-util { justify-content: center; padding: .5rem; }
  .registro { grid-template-columns: minmax(0, 1fr) 330px; }
  .auth-marca { padding: 2.5rem; }
}
@media (max-width: 1100px) {
  .revision { grid-template-columns: minmax(0, 1fr); }
  .revision .visor-factura { position: static; height: 70vh; }
  .decision-barra { bottom: .5rem; }
}
@media (max-width: 900px) {
  .cols-60-40, .cols-65-35, .cols-55-45 { grid-template-columns: minmax(0, 1fr); }
  .registro { grid-template-columns: minmax(0, 1fr); }
  .registro__lateral { position: static; max-height: none; overflow: visible; }
  .visor-factura { position: static; }
  .visor-factura__lienzo { height: 50vh; }
  .heroe { flex-direction: column; align-items: flex-start; }
  .pagina-auth { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr auto; }
  .auth-marca { grid-row: 1; padding: 1.5rem; }
  .auth-marca__titular, .auth-marca__lema, .auth-marca__adorno { display: none; }
  .auth-marca::after { display: none; }
  .auth-centro { grid-column: 1; border-radius: 28px 28px 0 0; }
  .pagina-auth .pie-marca { grid-column: 1; border-radius: 0; }
}
@media (max-width: 700px) {
  h1 { font-size: 1.5rem; }
  .contenedor { padding: 1rem .85rem 1.5rem; }
  .layout-empresa { grid-template-columns: minmax(0, 1fr); }
  .barra-lateral { position: static; height: auto; }
  .mos { grid-template-columns: minmax(0, 1fr); }
  .mos-lateral { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: .75rem; gap: .5rem; }
  .mos-lateral__marca { padding: 0; }
  .mos-lateral__marca .marca__logo { height: 28px; max-width: 120px; object-fit: contain; }
  .mos-nav { grid-auto-flow: column; overflow-x: auto; flex: 1; }
  .mos-lateral__pie { display: none; }
  .mos-contenido { padding: 1rem .85rem 1rem; }
  .stepper { grid-template-columns: repeat(2, 1fr); }
  .metricas { grid-template-columns: 1fr; }
  .paso__cabecera { flex-wrap: wrap; }
  .btn--grande { width: 100%; }
  .exito { padding: 2rem 1.25rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media print { .barra-sup, .mos-lateral, .barra-lateral, .btn { display: none !important; } .mos { display: block; } }
