:root {
  --tinta: #172a4a;
  --tinta-suave: #4a5b78;
  --azul: #1f4e9e;
  --azul-hondo: #163b7a;
  --oro: #b8892b;
  --fondo: #eef2f8;
  --papel: #ffffff;
  --linea: #d3dbe7;
  --error: #b42318;
  --error-fondo: #fdecea;
  --ok: #1e7b4f;
  --ok-fondo: #e6f4ec;
  --radio: 10px;
  --fuente: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--fuente); font-size: 17px; line-height: 1.55; color: var(--tinta); background: var(--fondo); }
a { color: var(--azul); }
h1, h2 { line-height: 1.2; margin: 0 0 .6em; }
h2 { font-size: 1.15rem; color: var(--azul-hondo); }
p { margin: 0 0 .9em; }
:focus-visible { outline: 3px solid var(--oro); outline-offset: 2px; }

/* Marca: replica el logotipo espaciado del formulario impreso */
.marca { margin: 0 0 .35rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; font-size: .95rem; }

/* ---------- Formulario público ---------- */
.encabezado { background: var(--azul); color: #fff; padding: 1.6rem 1.25rem 1.4rem; border-bottom: 4px solid var(--oro); text-align: center; }
.encabezado h1 { font-size: 1.75rem; margin-bottom: .3rem; font-weight: 700; }
.encabezado .marca { margin-bottom: .45rem; }
.logo-encabezado { display: block; width: min(250px, 72%); height: auto; margin: 0 auto; }
.logo-barra { display: block; height: 20px; width: auto; }
.logo-copia { display: block; height: 26px; width: auto; }
.lema { margin: 0 0 .9rem; font-size: .78rem; letter-spacing: .08em; color: #c9d6ee; }
.encabezado .evento { margin: 0; color: #dce6f6; font-size: .98rem; }
.publico main { max-width: 640px; margin: 0 auto; padding: 1.25rem 1rem 2rem; }

.bloque { background: var(--papel); border: 1px solid var(--linea); border-radius: var(--radio); padding: 1.25rem 1.1rem .6rem; margin-bottom: 1rem; }
.bloque.texto { font-size: .95rem; color: var(--tinta-suave); }
.bloque.texto h2 { color: var(--azul-hondo); }
.legal + .legal { margin-top: 1.4rem; }
.aviso { border-left: 4px solid var(--oro); background: #fbf6ea; padding: .8rem .9rem .1rem; margin: 0 0 .9em; color: var(--tinta); }

.campo { margin-bottom: 1rem; }
.campo label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .3rem; }
.opcional { font-weight: 400; color: var(--tinta-suave); }
input[type=text], input[type=email], input[type=tel], input[type=date], input[type=password], input:not([type]), select, textarea {
  width: 100%; font: inherit; color: inherit; background: #fff; border: 1.5px solid var(--linea); border-radius: 8px; padding: .7rem .75rem; min-height: 48px;
}
input:focus, select:focus, textarea:focus { border-color: var(--azul); outline: none; box-shadow: 0 0 0 3px rgba(31, 78, 158, .18); }
input.corto { max-width: 9rem; text-transform: uppercase; }
.fila { display: grid; grid-template-columns: 1fr 1fr; gap: 0 .8rem; }
@media (max-width: 340px) { .fila { grid-template-columns: 1fr; } }
.nota { font-size: .88rem; color: var(--tinta-suave); margin-top: -.6rem; }

.casilla { margin-bottom: 1rem; }
.casilla label { display: flex; gap: .7rem; align-items: flex-start; cursor: pointer; }
.casilla input { width: 24px; height: 24px; flex: none; margin: .1rem 0 0; accent-color: var(--azul); }

.con-error input, .con-error.firma { border-color: var(--error); }
.error { color: var(--error); font-size: .9rem; font-weight: 600; margin: .35rem 0 0; }
.oculto { display: none; }
.aviso-error { background: var(--error-fondo); color: var(--error); border-radius: 8px; padding: .8rem 1rem; font-weight: 600; }
.aviso-ok { background: var(--ok-fondo); color: var(--ok); border-radius: 8px; padding: .8rem 1rem; font-weight: 600; }
.trampa { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Sugerencia de corrección del correo */
.sugerencia { margin: -.6rem 0 1rem; padding: .55rem .75rem; background: #fbf6ea; border-left: 3px solid var(--oro); border-radius: 6px; font-size: .92rem; }
.sugerencia.oculto { display: none; }
.sugerencia .enlace { font-size: .92rem; font-weight: 600; }

/* Teléfono con código de país */
.telefono-fila { display: grid; grid-template-columns: minmax(0, 10rem) 1fr; gap: .5rem; }
@media (max-width: 420px) { .telefono-fila { grid-template-columns: 7.8rem 1fr; } }
.estado-wa { font-size: .9rem; margin: .35rem 0 0; color: var(--tinta-suave); }
.estado-wa:empty { display: none; }
.estado-wa.wa-si { color: var(--ok); font-weight: 600; }
.estado-wa.wa-si::before { content: "✓ "; }
.estado-wa.wa-no { color: #8a5a00; font-weight: 600; }
.estado-wa.wa-invalido { color: var(--error); font-weight: 600; }
.con-error select { border-color: var(--error); }

/* La firma: el elemento central del formulario */
.firma { position: relative; border: 1.5px solid var(--linea); border-radius: var(--radio); background: #fff; margin-top: .4rem; }
.firma canvas { display: block; width: 100%; height: 190px; touch-action: none; cursor: crosshair; border-radius: var(--radio); }
.firma .linea { position: absolute; left: 1.4rem; right: 1.4rem; bottom: 2.6rem; border-bottom: 2px solid var(--oro); pointer-events: none; }
.firma .linea::before { content: "×"; position: absolute; left: -.2rem; bottom: .15rem; color: var(--oro); font-size: 1.4rem; line-height: 1; }
.firma #borrar { position: absolute; right: .8rem; bottom: .5rem; }
.firma .indicacion { position: absolute; left: 0; right: 0; top: 38%; text-align: center; color: #a3afc2; font-size: .95rem; pointer-events: none; }
.firma.firmado .indicacion { display: none; }
.firma .bloqueo { display: none; position: absolute; left: 1rem; right: 1rem; top: 38%; text-align: center; color: var(--tinta-suave); font-weight: 600; font-size: .95rem; pointer-events: none; }
.firma.bloqueada { background: #f2f4f8; border-style: dashed; }
.firma.bloqueada canvas { cursor: not-allowed; }
.firma.bloqueada .bloqueo { display: block; }
.firma.bloqueada .indicacion, .firma.bloqueada #borrar, .firma.bloqueada .linea { display: none; }
.firma.avisar { border-color: var(--oro); box-shadow: 0 0 0 3px rgba(184, 137, 43, .25); }
.campos-legal { color: var(--tinta); font-size: 1rem; margin: .4rem 0 .9rem; }
.aviso .campos-legal { margin-bottom: .8rem; }
.fecha-firma { margin-top: .7rem; color: var(--tinta-suave); font-size: .92rem; }

button { font: inherit; cursor: pointer; }
.principal { display: block; width: 100%; background: var(--azul); color: #fff; border: 0; border-radius: var(--radio); padding: 1rem; font-weight: 700; font-size: 1.05rem; min-height: 54px; }
.principal:hover { background: var(--azul-hondo); }
.principal:disabled { opacity: .6; cursor: progress; }
.enlace { background: none; border: 0; padding: .2rem; color: var(--azul); text-decoration: underline; font-size: .92rem; }
.boton { display: inline-block; background: #fff; color: var(--azul); border: 1.5px solid var(--azul); border-radius: 8px; padding: .55rem .9rem; font-weight: 600; font-size: .92rem; text-decoration: none; white-space: nowrap; }
.boton:hover { background: #f0f4fb; }

.pie { text-align: center; font-size: .82rem; color: var(--tinta-suave); padding: 0 1rem 2rem; }
.pie p { margin: 0 0 .35rem; }
.pie a { color: var(--tinta-suave); margin: 0 .4rem; }
.centrado { text-align: center; }

/* ---------- Copia firmada ---------- */
.acciones { display: flex; flex-direction: column; align-items: center; gap: .6rem; margin-bottom: 1.2rem; }
.copia { background: var(--papel); border: 1px solid var(--linea); border-radius: var(--radio); padding: 1.4rem 1.2rem; font-size: .95rem; }
.copia > header { border-bottom: 3px solid var(--oro); margin-bottom: 1rem; }
.copia > header .marca { color: var(--azul); }
.copia .texto { color: var(--tinta-suave); margin: 1rem 0; }
.datos { display: grid; grid-template-columns: minmax(8rem, 40%) 1fr; gap: .35rem .9rem; margin: 0 0 1rem; }
.datos dt { color: var(--tinta-suave); font-size: .9rem; }
.datos dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.firma-copia { margin: 1rem 0 0; }
.firma-copia img { display: block; max-width: 100%; max-height: 160px; border-bottom: 2px solid var(--oro); }
.firma-copia figcaption { font-size: .85rem; color: var(--tinta-suave); margin-top: .3rem; }

@media print {
  body { background: #fff; font-size: 12pt; }
  .no-imprimir, .pie { display: none; }
  .publico main { max-width: none; padding: 0; }
  .copia { border: 0; padding: 0; }
}

/* ---------- Panel ---------- */
.panel { font-size: 15px; }
.barra { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1.5rem; background: var(--azul); color: #fff; padding: .8rem 1.25rem; border-bottom: 3px solid var(--oro); }
.barra .marca { margin: 0; display: flex; align-items: center; gap: .55rem; }
.barra .marca .sub { font-weight: 500; letter-spacing: .04em; text-transform: none; color: #c9d6ee; }
.acciones-fila { display: flex; gap: .5rem; justify-content: flex-end; }
.acciones-fila form { margin: 0; }
.barra nav { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem 1.1rem; }
.barra nav a, .barra .enlace { color: #dce6f6; text-decoration: none; font-weight: 600; font-size: .95rem; }
.barra nav a[aria-current] { color: #fff; border-bottom: 2px solid var(--oro); }
.salir { margin: 0; }
.contenido { max-width: 1180px; margin: 0 auto; padding: 1.5rem 1.25rem 3rem; }
.contenido h1 { font-size: 1.5rem; }
.cuenta { color: var(--tinta-suave); font-weight: 400; font-size: 1.05rem; margin-left: .3rem; }
.titulo-fila { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .6rem 1rem; }
.titulo-fila form { margin: 0; }
.titulo-con-boton { align-items: center; flex-wrap: nowrap; }
.boton-redondo { flex: 0 0 auto; width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--azul); color: #fff; font-size: 1.9rem; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(16, 32, 74, .2); }
.boton-redondo:hover { background: var(--azul-hondo); }
.boton-redondo:focus-visible { outline: 3px solid var(--oro); outline-offset: 2px; }
.boton-redondo[aria-expanded="true"] { background: #fff; color: var(--azul); border: 1.5px solid var(--azul); box-shadow: none; }

.filtros { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .4rem 1rem; margin-bottom: 1.2rem; }
.filtros .campo { margin-bottom: .4rem; min-width: 11rem; }
.filtros .crece { flex: 1 1 16rem; }
.filtros .principal { width: auto; padding: .7rem 1.2rem; min-height: 48px; margin-bottom: .4rem; }
.filtros .boton { margin-bottom: .4rem; min-height: 48px; }
.filtros .quitar { margin-bottom: 1.1rem; }
.filtros [hidden] { display: none; }
/* iOS Safari da a los campos de fecha un ancho propio que ignora width: 100% y se salen del recuadro */
input[type=date] { -webkit-appearance: none; appearance: none; display: block; width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; text-align: left; }
input[type=date]::-webkit-date-and-time-value { text-align: left; }
input[type=date]::-webkit-datetime-edit { padding: 0; }
#resultados[aria-busy=true] { opacity: .55; transition: opacity .15s; }
/* Lista de registros: búsqueda siempre visible y los demás filtros tras el botón desplegable */
.filtros-vivos { margin-bottom: 1rem; }
.fila-busqueda { display: flex; align-items: flex-end; gap: .6rem; }
.fila-busqueda .campo { flex: 1 1 auto; min-width: 0; margin: 0; }
.boton-desplegar { position: relative; flex: 0 0 auto; width: 48px; height: 48px; padding: 0; border: 1.5px solid var(--azul); border-radius: 8px; background: #fff; color: var(--azul); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.boton-desplegar:hover { background: #f5f8fd; }
.boton-desplegar:focus-visible { outline: 3px solid var(--oro); outline-offset: 2px; }
.boton-desplegar svg { transition: transform .2s ease; }
.boton-desplegar[aria-expanded="true"] { background: #eef3fb; }
.boton-desplegar[aria-expanded="true"] svg { transform: rotate(180deg); }
.boton-desplegar .insignia { position: absolute; top: -8px; right: -8px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--azul); color: #fff; border: 2px solid var(--fondo); font-size: .72rem; font-weight: 700; line-height: 16px; text-align: center; box-sizing: border-box; }
.boton-desplegar .insignia[hidden] { display: none; }
.mas-filtros { margin: .8rem 0 0; }
.mas-filtros[hidden] { display: none; }
.acciones-filtros { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; margin-top: .5rem; }
.acciones-filtros .boton, .acciones-filtros .quitar { margin: 0; }
.acciones-filtros:not(:has(> :not([hidden]))) { display: none; }
@media (max-width: 640px) {
  .mas-filtros { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 .7rem; }
  .mas-filtros .campo { min-width: 0; margin-bottom: .6rem; }
  .filtros-vivos input, .filtros-vivos select { height: 48px; min-height: 0; padding-top: 0; padding-bottom: 0; }
  .panel input, .panel select { font-size: 16px; }
}

.tabla-envoltura { overflow-x: auto; background: var(--papel); border: 1px solid var(--linea); border-radius: var(--radio); }
.tabla { width: 100%; border-collapse: collapse; }
.tabla th, .tabla td { text-align: left; padding: .6rem .8rem; border-bottom: 1px solid var(--linea); white-space: nowrap; }
.tabla th { font-size: .82rem; color: var(--tinta-suave); font-weight: 600; background: #f7f9fc; }
.tabla tbody tr:hover { background: #f5f8fd; }
.tabla tbody tr:last-child td { border-bottom: 0; }
.paginas { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: 1rem; }
.paginas a { padding: .35rem .65rem; border-radius: 6px; text-decoration: none; }
.paginas a[aria-current] { background: var(--azul); color: #fff; }
.vistas { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1.4rem 0 1rem; }
.vistas a { display: inline-flex; align-items: center; gap: .4rem; min-height: 40px; padding: .35rem .85rem; border: 1.5px solid var(--linea, #d5dceb); border-radius: 999px; background: #fff; color: var(--tinta); text-decoration: none; font-weight: 600; font-size: .92rem; }
.vistas a[aria-current] { background: var(--azul); border-color: var(--azul); color: #fff; }
.vistas .num { font-weight: 400; opacity: .75; }
@media (max-width: 640px) {
  .vistas { gap: .25rem; flex-wrap: nowrap; overflow-x: auto; }
  .vistas a { flex: 0 0 auto; padding: .3rem .5rem; font-size: .84rem; gap: .25rem; }
}
.vacio { background: var(--papel); border: 1px dashed var(--linea); border-radius: var(--radio); padding: 2rem; text-align: center; color: var(--tinta-suave); }

.tarjeta { background: var(--papel); border: 1px solid var(--linea); border-radius: var(--radio); padding: 1.2rem 1.25rem; margin-bottom: 1rem; }
.tarjeta h2 + .datos { margin-top: .2rem; }
.tarjeta form + h2 { margin-top: 1.6rem; }
.tarjeta.inactivo { opacity: .65; }
.dos-columnas { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }
@media (max-width: 860px) { .dos-columnas { grid-template-columns: 1fr; } }
.partir { overflow-wrap: anywhere; font-size: .9rem; }
details summary { cursor: pointer; color: var(--azul); font-weight: 600; margin: .4rem 0; }
details .texto { font-size: .9rem; color: var(--tinta-suave); }

.qr-fila { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.4rem; }
.qr { display: flex; flex-direction: column; align-items: flex-start; gap: .5rem; }
.qr svg { width: 180px; height: 180px; border: 1px solid var(--linea); border-radius: 6px; }
.qr .botones { display: flex; gap: .5rem; flex-wrap: wrap; }
.qr-ampliar { display: block; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 6px; }
.qr-ampliar:focus-visible { outline: 3px solid var(--oro); outline-offset: 3px; }
.desplegable > summary { list-style: none; display: inline-flex; cursor: pointer; margin-bottom: .2rem; }
.desplegable > summary::-webkit-details-marker { display: none; }
.desplegable[open] > summary { margin-bottom: 1rem; }
.desplegable .si-abierto, .desplegable[open] .si-cerrado { display: none; }
.desplegable[open] .si-abierto { display: inline; }
html.sin-scroll { overflow: hidden; }
.qr-pantalla[open] { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: max(1rem, env(safe-area-inset-top)) 1rem 1rem; border: 0; background: #fff; color: var(--tinta); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; box-sizing: border-box; }
.qr-pantalla::backdrop { background: #fff; }
.qrp-cerrar { position: absolute; top: max(.6rem, env(safe-area-inset-top)); right: .6rem; width: 48px; height: 48px; border: 0; border-radius: 50%; background: var(--fondo); color: var(--tinta); font-size: 2rem; line-height: 1; cursor: pointer; }
.qrp-titulo { margin: 0 2.8rem .2rem; font-size: clamp(1.4rem, 6vw, 2.2rem); font-weight: 800; color: var(--azul); line-height: 1.2; }
.qrp-sub { margin: 0 0 1rem; font-size: 1.1rem; color: var(--tinta-suave); }
.qrp-codigo svg { shape-rendering: crispEdges; display: block; width: min(92vw, calc(100vh - 13rem)); height: auto; aspect-ratio: 1; }
.qrp-url { margin: .8rem 0 0; font-size: .85rem; color: var(--tinta-suave); word-break: break-all; }

.caja-login { max-width: 380px; margin: 3rem auto; background: var(--papel); border: 1px solid var(--linea); border-radius: var(--radio); padding: 1.6rem 1.4rem; }
.caja-login h1 { font-size: 1.35rem; }
.sin-barra .caja-login { margin-top: max(2rem, 12vh); padding-top: 2rem; border-top: 4px solid var(--oro); text-align: center; }
.logo-login { display: block; width: 100%; max-width: 280px; height: auto; margin: 0 auto 1.6rem; }
.sin-barra .caja-login .aviso-error { text-align: left; }
.nota-inline { color: var(--tinta-suave); font-weight: 400; font-size: .85rem; }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
.boton-bloque { display: block; text-align: center; text-decoration: none; margin-top: 1rem; }

/* MonicorBalancing: columna de check en la lista y casilla en el detalle */
.tabla .col-scan { width: 2.6rem; text-align: center; padding-left: .5rem; padding-right: .3rem; }
.tabla .col-scan abbr { text-decoration: none; cursor: help; }
.tabla .check { display: inline-flex; align-items: center; justify-content: center; width: 1.15rem; height: 1.15rem; border-radius: 50%; background: var(--azul); color: #fff; font-weight: 800; font-size: .7rem; }   /* v1.27.15: más chico y azul Monicor */
.tabla .sin-check { display: inline-block; width: 1.15rem; height: 1.15rem; border-radius: 50%; border: 1.5px dashed var(--linea); box-sizing: border-box; }
.casilla-mb { margin: .4rem 0 1rem; padding: .75rem .9rem; border: 1.5px solid var(--linea); border-radius: 8px; background: #fff; }
.casilla-mb { transition: border-color .3s, background-color .3s; }
.casilla-mb.guardado { border-color: #1f7a4d; background: #eef8f2; }

/* Preferencia de contacto (formulario) */
fieldset.contacto { border: 0; padding: 0; margin: 0 0 1.2rem; min-width: 0; }
/* v1.22.37: asistentes del evento */
fieldset.asistentes { border: 0; padding: 0; margin: 0; min-width: 0; flex-basis: 100%; }
fieldset.asistentes legend { font-weight: 700; padding: 0; margin-bottom: .5rem; }
fieldset.asistentes .casilla, .asistentes-evento .casilla { margin-bottom: .5rem; }
.asistentes-evento { margin-top: .7rem; }
fieldset.contacto legend { font-weight: 700; padding: 0; margin-bottom: .6rem; }
fieldset.contacto legend .opcional { display: block; font-weight: 400; }
.opcion-contacto { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; margin: 0 .6rem .4rem 0; padding: .35rem .85rem; border: 1.5px solid var(--linea); border-radius: 999px; background: #fff; cursor: pointer; }
.opcion-contacto input { width: 22px; height: 22px; margin: 0; accent-color: var(--azul); }
.opcion-contacto:has(input:checked) { border-color: var(--azul); background: #eef3fb; }
fieldset.contacto.con-error .opcion-contacto { border-color: var(--error, #b42318); }

/* ---------- Sesiones (v1.9) ---------- */
.caja-nueva { margin: .6rem 0 1rem; padding-bottom: .4rem; border-bottom: 1px solid var(--linea); }
.lista-sesiones { list-style: none; padding: 0; margin: .4rem 0 0; display: grid; gap: .7rem; }
.lista-sesiones li { border: 1px solid var(--linea); border-radius: 8px; background: #fff; }
.lista-sesiones a { display: grid; gap: .15rem; padding: .75rem .9rem; border-radius: 8px; color: var(--tinta); text-decoration: none; }
.lista-sesiones a:hover { background: #f5f8fd; }
.lista-sesiones li:hover { border-color: var(--azul); }
.ses-cabeza { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; }
.ses-cabeza strong { color: var(--azul); }
.ses-fecha { color: var(--tinta-suave); font-size: .92rem; white-space: nowrap; }
.ses-notas { font-size: .92rem; overflow-wrap: anywhere; }
.ses-fotos { font-size: .82rem; color: var(--tinta-suave); }
.opcion-contacto.inhabilitada { opacity: .5; cursor: not-allowed; }
.meta-sesion { margin: .9rem 0 0; }
.form-borrar { margin: .5rem 0 0; }
.enlace.peligro { color: var(--error); }

.aviso.aviso-fotos { padding: .7rem .9rem; font-size: .92rem; }
.subir-fotos { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin: .4rem 0 1rem; }
.subir-fotos[hidden] { display: none; }
.boton-subir { position: relative; display: inline-flex; align-items: center; min-height: 48px; cursor: pointer; }
.boton-subir:focus-within { outline: 3px solid var(--oro); outline-offset: 2px; }
.archivo-oculto { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 0; }
.subiendo .boton-subir { opacity: .55; pointer-events: none; }
.estado-subida { margin: 0; }
.fotos { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 1.1rem .8rem; }
.foto { display: flex; flex-direction: column; gap: .4rem; min-width: 0; }
.foto-miniatura { display: block; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--fondo); border: 1px solid var(--linea); cursor: zoom-in; }
.foto-miniatura img { display: block; width: 100%; height: 100%; object-fit: cover; }
.foto-comentario label { display: block; font-size: .82rem; font-weight: 600; margin-bottom: .2rem; }
.foto-comentario textarea { font-size: .92rem; padding: .5rem .6rem; }
.foto-acciones { display: flex; align-items: center; gap: .6rem; margin-top: .35rem; }
.boton.boton-chico { padding: .35rem .8rem; min-height: 38px; cursor: pointer; }
.guardado-ok { color: var(--ok); font-weight: 600; font-size: .85rem; }
.visor-foto[open] { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: max(3.6rem, env(safe-area-inset-top)) .6rem 1rem; border: 0; background: #0d1320; display: flex; flex-direction: column; align-items: center; justify-content: center; box-sizing: border-box; }
.visor-foto::backdrop { background: #0d1320; }
.visor-foto img { display: block; max-width: 100%; max-height: calc(100vh - 8rem); object-fit: contain; }
.visor-comentario { color: #fff; max-width: 40rem; margin: .8rem 1rem 0; text-align: center; font-size: .95rem; white-space: pre-line; }
.visor-comentario[hidden] { display: none; }

/* ---------- v1.10: firmas, cierre de sesiones, Interest y PDF ---------- */
.etiqueta { display: inline-block; padding: .05rem .5rem; border-radius: 999px; background: #eef3fb; color: var(--azul-hondo); font-size: .78rem; font-weight: 600; vertical-align: middle; }
.etiqueta.cerrada { background: #f1ede4; color: #6b5420; }
h1 .etiqueta { font-size: .85rem; margin-left: .3rem; }
.ses-pie { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .5rem; }
.aviso-cerrada { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; background: #f7f4ec; border-left: 4px solid var(--oro); border-radius: 8px; padding: .7rem 1rem; margin-bottom: 1rem; }
.aviso-cerrada p { margin: 0; }
.aviso-cerrada form { margin: 0; }
.acciones-sesion { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--linea); }
.acciones-sesion form { margin: 0; }
.acciones-sesion .boton { cursor: pointer; min-height: 44px; }
h3.sub { font-size: .92rem; color: var(--tinta-suave); margin: .2rem 0 .3rem; }
.notas-leer { white-space: normal; overflow-wrap: anywhere; background: #f7f9fc; border: 1px solid var(--linea); border-radius: 8px; padding: .7rem .8rem; }
.comentario-leer { margin: 0; font-size: .9rem; overflow-wrap: anywhere; }
fieldset.intereses { margin-bottom: 1rem; }
.archivo-pdf { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; padding: .6rem; text-decoration: none; color: var(--tinta); background: #fff; cursor: pointer; text-align: center; }
.pdf-icono { display: inline-flex; align-items: center; justify-content: center; width: 3.2rem; height: 4rem; border-radius: 4px 14px 4px 4px; background: var(--error); color: #fff; font-weight: 800; font-size: .9rem; letter-spacing: .03em; }
.pdf-nombre { font-size: .82rem; font-weight: 600; overflow-wrap: anywhere; line-height: 1.25; max-height: 3.8em; overflow: hidden; }
.pdf-tamano { font-size: .75rem; color: var(--tinta-suave); }
.firma-hist { border-top: 1px solid var(--linea); padding: .5rem 0; }
.firma-hist:first-of-type { border-top: 0; }
.firma-hist > summary { color: var(--tinta); font-weight: 600; }
.firma-hist .firma-copia { margin: .6rem 0 .8rem; }
details.interior { margin: .2rem 0 .4rem; }
details.interior > summary { font-size: .9rem; }

/* ---------- v1.11: grabaciones de audio de la sesión ---------- */
.grabadora { margin: .4rem 0 1rem; }
.grabadora[hidden], .grab-activa[hidden], .grab-recuperar[hidden] { display: none; }
.boton-grabar { display: inline-flex; align-items: center; gap: .55rem; min-height: 48px; cursor: pointer; }
.boton-grabar:disabled { opacity: .55; cursor: default; }
.boton-grabar[hidden] { display: none; }
.punto-rec { display: inline-block; width: .8rem; height: .8rem; border-radius: 50%; background: var(--error); flex: none; }
.grab-activa { border: 1.5px solid var(--error); border-radius: var(--radio); background: var(--error-fondo); padding: .8rem 1rem; }
.grabadora.pausada .grab-activa { border-color: var(--linea); background: #f7f9fc; }
.grab-indicador { display: flex; align-items: center; gap: .6rem; margin: 0 0 .7rem; font-weight: 600; }
.grabando .grab-indicador .punto-rec { animation: latido 1.2s ease-in-out infinite; }
.pausada .grab-indicador .punto-rec { background: var(--tinta-suave); animation: none; }
.grab-tiempo { font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--tinta); }
@keyframes latido { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .grabando .grab-indicador .punto-rec { animation: none; } }
.botones-fila { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; }
.botones-fila .boton { min-height: 48px; cursor: pointer; }
.principal.boton-auto { display: inline-block; width: auto; min-height: 48px; padding: .6rem 1.3rem; font-size: 1rem; cursor: pointer; }
.principal:disabled, .boton:disabled { opacity: .55; cursor: default; }
.estado-grab { margin: .7rem 0 0; }
.dialogo[open] { max-width: 26rem; width: calc(100% - 2rem); border: 0; border-top: 4px solid var(--oro); border-radius: var(--radio); padding: 1.3rem 1.25rem 1.2rem; color: var(--tinta); background: var(--papel); box-sizing: border-box; }
.dialogo::backdrop { background: rgba(13, 19, 32, .55); }
.dialogo h3 { margin: 0 0 .5rem; color: var(--azul-hondo); font-size: 1.1rem; }
.dialogo p { margin: 0 0 1.1rem; font-size: 1.05rem; }
.grab-recuperar { border-left: 4px solid var(--oro); background: #fbf6ea; border-radius: 8px; padding: .8rem 1rem; margin: .4rem 0 1rem; }
.grab-recuperar p:first-child { margin-top: 0; }
.grabacion { border: 1px solid var(--linea); border-radius: 8px; padding: .9rem .9rem .8rem; margin-top: .7rem; }
.grab-cabeza { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .9rem; margin-bottom: .6rem; }
.grab-cabeza strong { color: var(--azul); }
.grab-audio { display: block; width: 100%; max-width: 32rem; margin: 0 0 .8rem; }
.aviso.aviso-grab { padding: .7rem .9rem; font-size: .92rem; }
.aviso.aviso-grab p { margin: 0 0 .4rem; }
.aviso.aviso-grab p:last-child { margin-bottom: 0; }
.grab-procesando { color: var(--azul-hondo); font-weight: 600; }
.resumen-ia { margin-bottom: .4rem; }
.transcripcion { font-size: .9rem; max-height: 24rem; overflow-y: auto; }
.meta-grab { margin: .5rem 0 0; }
.editar-resumen textarea { font-size: .95rem; }
.acciones-grab { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; margin-top: .8rem; }
.acciones-grab .form-borrar { margin: 0; }

/* ---------- v1.12: autorización de viva voz ---------- */
.dialogo p.nota-dialogo { margin: -.4rem 0 1.1rem; font-size: .9rem; }
.aviso-leer { margin: .8rem 0 0; }
.aviso-leer[hidden] { display: none; }
.consentimiento-voz { display: flex; align-items: center; gap: .45rem; margin: 0 0 .8rem; font-size: .92rem; font-weight: 600; color: var(--ok); }
.check-voz { display: inline-flex; align-items: center; justify-content: center; width: 1.3rem; height: 1.3rem; border-radius: 50%; background: #1f7a4d; color: #fff; font-size: .78rem; font-weight: 800; }

/* ---------- v1.14: compartir video y brochure ---------- */
.compartir { margin: .4rem 0 1.2rem; padding: .7rem .8rem; border: 1px solid var(--linea); border-radius: 8px; background: #f7f9fc; }
.compartir-titulo { margin: 0 0 .5rem; font-size: .88rem; color: var(--tinta-suave); }
.compartir-botones { display: flex; flex-wrap: wrap; gap: .5rem; }
.boton-material { cursor: pointer; min-height: 38px; display: inline-flex; align-items: center; }
.boton-material.cargando { opacity: .55; cursor: progress; }
.nota-alerta { margin: .5rem 0 0; font-size: .82rem; color: #6b5420; }
.estado-compartir { margin: .4rem 0 0; }
.estado-compartir:empty { display: none; }
.estado-grab:empty { display: none; }
.grabar-arriba { margin: 0 0 1rem; }
.grabar-arriba .grabadora, .grabar-arriba .grab-recuperar { margin: 0 0 .6rem; }

/* ---------- v1.15: confirmaciones, MonicorBalancing por sesión, acciones al pie ---------- */
.principal.peligro { background: var(--error); }
.principal.peligro:hover { background: #8f1c13; }
.confirmar-texto { color: var(--tinta-suave); }
.acciones-pie { margin: 1.4rem 0 2rem; padding: 1rem 0 0; border-top: 1px solid var(--linea); }
form .casilla-mb { margin: 0 0 1.2rem; }
.etiqueta.etiqueta-mb { background: #e6f4ec; color: var(--ok); }
.grab-inicio { display: flex; align-items: center; gap: .5rem 1rem; }
.grab-inicio[hidden] { display: none; }
.grab-inicio .boton-grabar { flex: none; }
.grab-leyenda { margin: 0; font-size: .85rem; line-height: 1.4; color: var(--tinta-suave); max-width: 34rem; }
.nota.nota-campo { margin: .35rem 0 0; }

/* ---------- v1.15.6: ordenar la lista desde los encabezados ---------- */
.tabla th a.ordenar { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: .3rem; }
.tabla th a.ordenar:hover { color: var(--azul); }
.tabla th a.ordenar.activo { color: var(--azul-hondo); }
.tabla th .flecha { font-size: .7rem; }

/* ---------- v1.16: medidor de nivel y contactos inactivos ---------- */
.medidor { display: inline-flex; align-items: center; gap: 3px; margin-left: auto; height: 1.3rem; }
.medidor[hidden] { display: none; }
.medidor i { display: block; width: 5px; height: 100%; border-radius: 3px; background: rgba(23, 42, 74, .16); transition: background-color .08s; }
.medidor i.on { background: var(--azul); }
.aviso.aviso-inactivo { padding: .7rem .9rem; font-size: .92rem; }

/* ---------- v1.16.1: un solo Save al pie y aviso de cambios sin guardar ---------- */
.guardar-pie { margin: 1.4rem 0 0; }
.guardar-pie + .acciones-pie { margin-top: 1rem; }
.botones-columna { flex-direction: column; align-items: stretch; }
.botones-columna .principal.boton-auto, .botones-columna .boton { width: 100%; text-align: center; }

/* ---------- v1.16.2: guardado automático ---------- */
.estado-guardado { font-size: .85rem; color: var(--tinta-suave); white-space: nowrap; }
.estado-guardado.ok { color: var(--ok); }
.estado-guardado.error { color: var(--error); font-weight: 600; white-space: normal; }

/* ---------- v1.16.3: navegador legible en la firma ---------- */
.ua-crudo { display: block; margin-top: .2rem; font-size: .75rem; color: var(--tinta-suave); }

/* ---------- v1.16.4: editar correo y teléfono ---------- */
.boton-redondo.boton-lapiz svg { display: block; }

/* ---------- v1.16.7: botón de envío deshabilitado hasta completar ---------- */
.principal.incompleto, .principal.incompleto:hover { background: #a7b0c2; color: #fff; cursor: pointer; }
#enviar-nota { margin-top: .6rem; }

/* ---------- v1.16.8: fecha de nacimiento escrita o con calendario ---------- */
.fecha-calendario { position: relative; }
.fecha-calendario input[type=text] { padding-right: 3.4rem; }
.boton-calendario { position: absolute; top: 0; right: 0; bottom: 0; width: 3rem; display: flex; align-items: center; justify-content: center; color: var(--azul); border-left: 1.5px solid var(--linea); }
.boton-calendario input[type=date] { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; padding: 0; margin: 0; border: 0; opacity: 0; cursor: pointer; }
.boton-calendario input[type=date]::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }

/* v1.18: alta manual de contactos */
.botones-titulo { display: flex; flex-wrap: wrap; gap: .5rem; }
.tarjeta-angosta { max-width: 46rem; }
.con-error textarea { border-color: var(--error); }
@media (max-width: 560px) { .fila.fila-contacto { grid-template-columns: 1fr; } }

/* v1.18.1: sugerencias de estado de EE. UU. y valores fijos en el panel */
.estado-envoltura { position: relative; }
.sugerencias-estado { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: .25rem 0; list-style: none; background: var(--papel, #fff); border: 1px solid var(--linea); border-radius: 8px; box-shadow: 0 6px 18px rgba(16, 32, 74, .14); max-height: 16rem; overflow-y: auto; }
.sugerencias-estado li { padding: .7rem .9rem; cursor: pointer; min-height: 44px; box-sizing: border-box; }
.sugerencias-estado li[aria-selected="true"], .sugerencias-estado li:hover { background: #eef3fb; color: var(--azul-hondo); }
.valor-fijo { margin: 0; min-height: 48px; display: flex; align-items: center; padding: 0 .9rem; border: 1px dashed var(--linea); border-radius: 8px; color: var(--tinta-suave); }

/* v1.19: ventas */
.visualmente-oculto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.comision { border: 1px solid var(--linea); border-radius: 8px; padding: .8rem .9rem .2rem; margin-bottom: .8rem; }
.comision .form-borrar { margin: 0 0 .6rem; }
.lista-ventas .ses-monto { font-weight: 700; }

/* v1.19.1: contactos de prueba (solo Admin) */
.etiqueta-prueba { background: #fbf3e2; color: #8a6418; border: 1px solid #e3c98f; }

/* v1.19.3: una nota justo después de un título con botón no se encima (eventos en el celular) */
.titulo-fila + .nota { margin-top: .5rem; }
/* v1.20: estado del correo y contacto sin datos (rojo suave), eventos del contacto */
.etiqueta-correo { background: var(--error-fondo); color: var(--error); }
.lista-eventos-contacto { list-style: none; padding: 0; margin: .4rem 0 0; display: grid; gap: .5rem; }
.lista-eventos-contacto li { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .6rem; padding: .55rem .8rem; border: 1px solid var(--linea); border-radius: 8px; background: #fff; }
.lista-eventos-contacto .ev-nombre { font-weight: 600; }
.lista-eventos-contacto .ev-dato { color: var(--tinta-suave); font-size: .88rem; }
.lista-eventos-contacto .ev-quitar { margin-left: auto; }
.lista-eventos-contacto .ev-quitar button { min-height: 0; padding: 0; font-size: .88rem; }
/* v1.20.3: lista de ventas y salida discreta */
.tabla .num { text-align: right; font-variant-numeric: tabular-nums; }
.boton-salir { display: inline-flex; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #dce6f6; cursor: pointer; }
.boton-salir:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.boton-salir:focus-visible { outline: 2px solid var(--oro); outline-offset: 2px; }

/* v1.21: conceptos, pagos, estado y datos por confirmar de la venta */
.renglon { border: 1px solid var(--linea); border-radius: 8px; padding: .8rem .9rem .2rem; margin-bottom: .8rem; }
.renglon .form-borrar { margin: 0 0 .6rem; }
.renglon-esperado { border-style: dashed; background: #fbfcfe; }
.renglon-total { margin: .1rem 0 .6rem; color: var(--tinta-suave); }
.renglon-total strong { color: var(--tinta); font-variant-numeric: tabular-nums; }
.venta-suma { margin: .2rem 0 .8rem; font-size: 1.05rem; }
.venta-suma strong { font-variant-numeric: tabular-nums; }
.venta-saldo { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; margin: .2rem 0 .9rem; }
.venta-saldo div { display: flex; flex-direction: column; }
.venta-saldo dt { font-size: .82rem; color: var(--tinta-suave); }
.venta-saldo dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.agregar-fila { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.agregar-fila select { width: auto; min-width: 10rem; }
.estado-venta.estado-preorder { background: #fbf3e2; color: #8a6418; }
.estado-venta.estado-paid { background: #eef3fb; color: var(--azul-hondo); }
.estado-venta.estado-shipped { background: #e9f1fb; color: #24548f; }
.estado-venta.estado-delivered, .estado-venta.estado-trained { background: #e6f4ec; color: var(--ok); }
.estado-venta.estado-cancelled { background: #f1ede4; color: #6b5420; }
.etiqueta-confirmar { background: #fdecea; color: #a1322a; text-decoration: none; }
.aviso-confirmar a { color: inherit; text-decoration: none; }
.pregunta { border-left: 3px solid #e3a33b; padding: .3rem 0 .2rem .8rem; margin: 0 0 1rem; }
.pregunta.respondida { border-left-color: var(--ok); opacity: .9; }
.pregunta-texto { margin: 0 0 .2rem; font-weight: 600; }
.pregunta-de { margin: 0 0 .2rem; }
.pregunta-respuesta { margin: .2rem 0; }
.pregunta .nota { margin: 0 0 .4rem; }
.pregunta-responder .campo { margin-bottom: .4rem; }
.lista-preguntas { max-width: 48rem; }
.nueva-pregunta summary { cursor: pointer; font-weight: 600; color: var(--azul); margin: .4rem 0; }
details.nueva-pregunta.tarjeta { max-width: 48rem; }
@media (max-width: 480px) { #payments .renglon .fila { grid-template-columns: 1fr; } }

/* Mapa del sistema (admin/mapa.php) */
.mapa { --m-nodo: #e8eef8; --m-nodo-borde: #1f4e9e; --m-nodo-texto: #163b7a; --m-nodo-sub: #4a5b78; --m-entrada: #f4f6fa; --m-entrada-borde: #8a97ad; --m-plan: #fbf6ea; --m-flecha: #8a97ad; }
.mapa-cuerpo { display: grid; grid-template-columns: minmax(0, 720px) minmax(280px, 1fr); gap: 1.4rem; align-items: start; margin-top: 1rem; }
.mapa-lienzo { background: var(--papel); border: 1px solid var(--linea); border-radius: 10px; padding: 1rem; }
.mapa svg { display: block; width: 100%; height: auto; }
.mapa .nodo { cursor: pointer; outline: none; }
.mapa .nodo rect { fill: var(--m-nodo); stroke: var(--m-nodo-borde); stroke-width: 1; transition: fill .15s; }
.mapa .nodo.entrada rect { fill: var(--m-entrada); stroke: var(--m-entrada-borde); }
.mapa .nodo.plan rect { fill: var(--m-plan); stroke: var(--oro); stroke-dasharray: 5 4; }
.mapa .nodo .t { fill: var(--m-nodo-texto); font-weight: 700; font-size: 14px; }
.mapa .nodo .s { fill: var(--m-nodo-sub); font-size: 12px; }
.mapa .nodo:hover rect { stroke-width: 2; }
.mapa .nodo:focus-visible rect { stroke: var(--oro); stroke-width: 3; }
.mapa .nodo.activo rect { fill: var(--azul); stroke: var(--oro); stroke-width: 2.5; stroke-dasharray: none; }
.mapa .nodo.activo .t { fill: #fff; }
.mapa .nodo.activo .s { fill: #d9e4f7; }
.mapa .nodo.ligado rect { stroke-width: 2.2; }
.mapa .arista { stroke: var(--m-flecha); stroke-width: 1.2; fill: none; transition: stroke .15s, stroke-width .15s; }
.mapa .arista.plan { stroke-dasharray: 5 4; }
.mapa .arista.activa { stroke: var(--oro); stroke-width: 2.4; }
.mapa .contenedor { fill: none; stroke: var(--linea); stroke-width: 1; stroke-dasharray: 5 4; }
.mapa .rotulo { fill: var(--tinta-suave); font-size: 12px; }
.mapa .leyenda { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; margin: .8rem .2rem 0; font-size: .85rem; color: var(--tinta-suave); }
.mapa .leyenda span { display: inline-flex; align-items: center; gap: .45rem; }
.mapa .leyenda i { display: inline-block; width: 18px; height: 13px; border-radius: 3px; border: 1px solid; }
.mapa-detalle { background: var(--papel); border: 1px solid var(--linea); border-top: 3px solid var(--oro); border-radius: 10px; padding: 1.1rem 1.3rem 1.2rem; position: sticky; top: 1rem; max-height: calc(100vh - 2rem); overflow-y: auto; }
.mapa-detalle h2 { margin: 0 0 .2rem; font-size: 1.25rem; color: var(--azul-hondo); }
.mapa-detalle .donde { margin: 0 0 .8rem; color: var(--tinta-suave); font-size: .9rem; }
.mapa-detalle h3 { margin: 1rem 0 .3rem; font-size: .95rem; color: var(--azul-hondo); }
.mapa-detalle p { margin: .3rem 0; }
.mapa-detalle ul { margin: .3rem 0; padding-left: 1.15rem; }
.mapa-detalle li { margin: .25rem 0; }
.mapa-detalle .estado { display: inline-block; font-size: .8rem; font-weight: 600; padding: .1rem .55rem; border-radius: 999px; margin-left: .4rem; vertical-align: middle; }
.mapa-detalle .estado.uso { background: #e6f4ec; color: #1e7b4f; }
.mapa-detalle .estado.plan { background: #fbf3e2; color: #8a6418; }
.mapa-detalle .estado.entrada { background: #eef2f8; color: #4a5b78; }
.mapa-detalle .ligas { display: flex; flex-wrap: wrap; gap: .4rem; margin: .3rem 0; }
.mapa-detalle .ligas button { font: inherit; font-size: .85rem; border: 1px solid var(--linea); background: var(--fondo); color: var(--azul); border-radius: 999px; padding: .2rem .7rem; cursor: pointer; min-height: 32px; }
.mapa-detalle .ligas button:hover, .mapa-detalle .ligas button:focus-visible { border-color: var(--azul); outline: none; }
.mapa-detalle .vacio { color: var(--tinta-suave); font-size: .9rem; }
@media (max-width: 960px) { .mapa-cuerpo { grid-template-columns: 1fr; } .mapa-detalle { position: static; max-height: none; } }
@media (prefers-reduced-motion: reduce) { .mapa .nodo rect, .mapa .arista { transition: none; } }

/* v1.21.1: resumen de la lista de ventas (lo filtrado) */
.resumen-ventas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; margin: 0 0 1rem; }
.resumen-ventas div { background: var(--papel); border: 1px solid var(--linea); border-radius: 10px; padding: .75rem 1rem .8rem; }
.resumen-ventas dt { font-size: .82rem; font-weight: 600; color: var(--tinta-suave); }
.resumen-ventas dd { margin: .15rem 0 0; font-size: 1.45rem; font-weight: 700; color: var(--azul-hondo); font-variant-numeric: tabular-nums; line-height: 1.2; }
.resumen-ventas .por-cobrar { border-color: #e7c98a; background: #fdf8ec; }
.resumen-ventas .por-cobrar dd { color: #8a6418; }
@media (max-width: 640px) { .resumen-ventas { gap: .5rem; } .resumen-ventas div { padding: .6rem .7rem; } .resumen-ventas dd { font-size: 1.05rem; } }

/* v1.21.2: aviso de guardado de cada respuesta */
.estado-respuesta { font-weight: 400; font-size: .85rem; color: var(--tinta-suave); margin-left: .4rem; }
.estado-respuesta.ok { color: var(--ok); }
.estado-respuesta.error { color: var(--error); }

/* Comisiones (v1.22): tabla por persona y mes, con la primera columna fija al desplazar */
.vistas-fila { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; margin: 1.2rem 0 0; }
.vistas-fila .vistas { margin: 0; }
.nota-vista { margin: .6rem 0 .8rem; }
.tabla-comisiones th, .tabla-comisiones td { padding: .6rem .6rem; }
.tabla-comisiones th:first-child { padding-left: .9rem; }
.nota-tabla { margin-top: .6rem; }
.aviso-confirmar a { color: var(--azul); }
.tabla-comisiones th[scope="row"] { position: sticky; left: 0; z-index: 1; background: var(--papel); color: var(--tinta); font-size: .92rem; font-weight: 600; box-shadow: 1px 0 0 var(--linea); }
.tabla-comisiones thead th:first-child { position: sticky; left: 0; z-index: 2; box-shadow: 1px 0 0 var(--linea); }
.tabla-comisiones thead a { color: inherit; text-decoration: none; }
.tabla-comisiones thead a:hover { color: var(--azul); }
.tabla-comisiones td a { color: var(--tinta); text-decoration: none; border-bottom: 1px dotted #9fb0cc; }
.tabla-comisiones td a:hover { color: var(--azul); border-bottom-color: var(--azul); }
.tabla-comisiones td a[aria-current] { color: var(--azul-hondo); font-weight: 700; border-bottom: 2px solid var(--oro); }
.tabla-comisiones .cero { color: #b3bccb; }
.tabla-comisiones td.total { font-weight: 700; background: #f7f9fc; box-shadow: inset -1px 0 0 var(--linea); }
.tabla-comisiones tfoot th, .tabla-comisiones tfoot td { border-top: 2px solid var(--linea); font-weight: 700; background: #f7f9fc; }
.tabla-comisiones tfoot th[scope="row"] { background: #f7f9fc; }
.tabla-comisiones tfoot td a { font-weight: 700; }
.filas-referidos th[scope="row"] { padding-left: 1.7rem; font-weight: 400; color: var(--tinta-suave); }
.filas-referidos td { font-size: .92rem; }
.desplegar-grupo { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: .45rem; font-weight: 600; }
.desplegar-grupo::before { content: ''; width: .42rem; height: .42rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s; }
.desplegar-grupo[aria-expanded="true"]::before { transform: rotate(45deg); }
.desplegar-grupo:focus-visible { outline: 3px solid var(--oro); outline-offset: 2px; border-radius: 4px; }
.cuentas-detalle { display: flex; flex-wrap: wrap; gap: .4rem 1.8rem; margin: .2rem 0 1rem; }
.cuentas-detalle dt { font-size: .82rem; font-weight: 600; color: var(--tinta-suave); }
.cuentas-detalle dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--azul-hondo); }
.tabla-detalle-comisiones .base-calculo { white-space: normal; min-width: 13rem; }
.comisiones-venta { width: 100%; border-collapse: collapse; margin: .2rem 0 .6rem; }
.comisiones-venta th, .comisiones-venta td { text-align: left; padding: .45rem 0; border-bottom: 1px solid var(--linea); vertical-align: top; }
.comisiones-venta th { font-weight: 600; padding-right: .8rem; }
.comisiones-venta td.num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.comisiones-venta tr:last-child th, .comisiones-venta tr:last-child td { border-bottom: 0; }
@media (prefers-reduced-motion: reduce) { .desplegar-grupo::before { transition: none; } }
.nota-campo { margin: -.5rem 0 .8rem; font-size: .84rem; }
.tabla-ventas .col-referido { white-space: normal; min-width: 9rem; max-width: 16rem; font-size: .9rem; }
.tabla-ventas .referido-monto { font-weight: 600; white-space: nowrap; }
.resumen-ventas.resumen-cuatro { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.resumen-ventas dd a { color: inherit; }
@media (max-width: 640px) { .resumen-ventas.resumen-cuatro { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Menú del panel (v1.22.5): con más de tres opciones, en el celular se pliega tras el botón de hamburguesa. admin.js muestra el botón y pone .con-menu en la barra. */
.salir-texto { display: none; }
.boton-menu { display: none; align-items: center; justify-content: center; width: 2.75rem; height: 2.75rem; padding: 0; border: 0; border-radius: 8px; background: transparent; color: #fff; cursor: pointer; }
.boton-menu:hover, .boton-menu[aria-expanded="true"] { background: rgba(255, 255, 255, .14); }
.boton-menu:focus-visible { outline: 2px solid var(--oro); outline-offset: 2px; }
@media (max-width: 760px) {
  .barra.con-menu { flex-wrap: wrap; }
  .barra.con-menu .boton-menu { display: inline-flex; }
  .barra.con-menu nav.menu-plegable { display: none; flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 0; margin: .2rem -1.25rem -.8rem; padding: .25rem 0 .4rem; border-top: 1px solid rgba(255, 255, 255, .22); }
  .barra.con-menu nav.menu-plegable.abierto { display: flex; }
  .barra.con-menu nav.menu-plegable a { display: flex; align-items: center; min-height: 2.9rem; padding: 0 1.25rem; font-size: 1.02rem; border-bottom: 0; border-left: 4px solid transparent; }
  .barra.con-menu nav.menu-plegable a[aria-current] { border-bottom: 0; border-left-color: var(--oro); background: rgba(255, 255, 255, .1); }
  .barra.con-menu nav.menu-plegable .salir { border-top: 1px solid rgba(255, 255, 255, .22); margin-top: .25rem; padding-top: .25rem; }
  .barra.con-menu nav.menu-plegable .boton-salir { width: 100%; height: auto; min-height: 2.9rem; justify-content: flex-start; gap: .6rem; padding: 0 1.25rem 0 calc(1.25rem + 4px); border-radius: 0; font: inherit; font-weight: 600; font-size: 1.02rem; }
  .barra.con-menu nav.menu-plegable .salir-texto { display: inline; }
}
/* Ajuste manual de comisión (v1.22.6) */
.etiqueta-manual { background: #fdf3d7; color: #7a5200; }
.ajuste-manual { margin-top: 1rem; padding-top: .9rem; border-top: 1px solid var(--linea); }
.ajuste-manual h3 { margin: 0 0 .3rem; font-size: 1rem; }
.ajuste-fila { padding: .5rem 0 .6rem; border-bottom: 1px solid var(--linea); }
.ajuste-fila p { margin: 0 0 .2rem; }
.ajuste-fila .form-borrar { margin: 0; }
.ajuste-form { margin-top: .8rem; }
.ajuste-form .boton { cursor: pointer; min-height: 44px; margin-top: .3rem; }

/* Catálogos de ventas (v1.22.7): la casilla «Merge» junto a los botones del referidor */
.acciones-fila .casilla { margin: 0 auto 0 0; }
.acciones-fila { align-items: center; flex-wrap: wrap; }
#commissions .agregar-fila { margin-bottom: 1.2rem; }

/* Tablas anchas (v1.22.8): la tabla se desplaza dentro de su propio marco, que nunca es más alto que la pantalla; así la barra horizontal
   queda siempre a la vista y los encabezados se quedan fijos arriba. En Sales y Pre-orders también se quedan fijas las dos primeras columnas. */
.tabla-envoltura { overflow: auto; max-height: 70vh; }   /* admin.js lo ajusta al espacio libre real de la ventana */
.tabla-envoltura .tabla thead th { position: sticky; top: 0; z-index: 2; box-shadow: inset 0 -1px 0 var(--linea); }
.tabla-ventas th { white-space: normal; vertical-align: bottom; line-height: 1.25; }

/* Detalle de Commissions (v1.22.9): encabezados en dos líneas y nombre del referido con salto */
.tabla-detalle-comisiones th { white-space: normal; vertical-align: bottom; line-height: 1.25; }
.tabla-detalle-comisiones .col-referido { white-space: normal; min-width: 9rem; max-width: 16rem; font-size: .9rem; }
.resumen-ventas.resumen-una { grid-template-columns: minmax(0, 22rem); }
.resumen-ventas.resumen-dos { grid-template-columns: repeat(2, minmax(0, 22rem)); }   /* v1.22.36: Sales, Total y Units */

/* Expenses en Commissions (v1.22.11) */
.tabla-gastos .campo-tabla { width: 7.5rem; padding: .35rem .5rem; text-align: right; font: inherit; border: 1.5px solid var(--linea); border-radius: 6px; background: #fff; }
.tabla-gastos .campo-tabla.campo-nota { width: 14rem; text-align: left; }
.tabla-gastos .col-referido { white-space: normal; min-width: 8rem; max-width: 16rem; }
.tabla-gastos .adjuntar { display: inline-block; }
.tabla-gastos .adjuntar summary { cursor: pointer; color: var(--azul); font-size: .9rem; }
.tabla-gastos .adjuntar form { display: flex; gap: .4rem; align-items: center; margin-top: .4rem; }
.tabla-gastos .acciones-fila { flex-wrap: nowrap; }

/* Aviso de versión nueva (v1.22.12): barra azul bajo la barra del panel */
.aviso-version { display: flex; gap: .9rem; align-items: center; justify-content: center; flex-wrap: wrap; padding: .55rem 1rem; background: #0082fc; color: #fff; font-weight: 600; }
.aviso-version[hidden] { display: none; }
.aviso-version button { font: inherit; font-weight: 700; color: #0082fc; background: #fff; border: 0; border-radius: 999px; padding: .3rem 1.1rem; cursor: pointer; }
.aviso-version button:hover, .aviso-version button:focus-visible { background: #e6f2ff; }

/* Ventana para autorizar un gasto (v1.22.13) */
.dialogo-gasto[open] { max-width: 30rem; }
.dialogo-gasto .dg-resumen { font-weight: 600; color: var(--tinta); margin-bottom: .9rem; }
.dialogo-gasto .campo { margin-bottom: .5rem; }
.dialogo-gasto p.nota-campo { margin: 0 0 .9rem; font-size: .9rem; }
.dialogo-gasto .botones-fila { flex-wrap: wrap; }
.dialogo-gasto .dg-borrar { margin-top: 1.1rem; padding-top: .8rem; border-top: 1px solid var(--linea); }
.dialogo-gasto [hidden] { display: none !important; }
.etiqueta-rechazado { background: #f3e3e3; color: #8a2323; }
.dialogo-gasto .dg-sin-guardar { margin-top: 1rem; padding: .8rem .9rem; border: 1.5px solid #e7c98a; border-radius: 8px; background: #fdf8ec; }
.dialogo-gasto .dg-sin-guardar p { margin: 0 0 .7rem; font-size: .98rem; font-weight: 600; }
.dialogo-gasto p.dg-archivo { margin: -.4rem 0 .9rem; font-size: .98rem; }
.dialogo-gasto p.dg-archivo a { font-weight: 600; }
.dialogo-gasto .fila { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.dialogo-gasto input[type=file] { width: 100%; font: inherit; }
#expenses .titulo-con-boton h2 { margin: 0; }
.dialogo-gasto input[type=month] { width: 100%; box-sizing: border-box; padding: .6rem .7rem; font: inherit; color: inherit; background: #fff; border: 1.5px solid var(--linea); border-radius: 8px; min-height: 2.9rem; }

/* Botón «+» (v1.22.17): el signo se dibuja con dos barras, centrado exacto en el círculo (el «+» de la fuente quedaba descentrado);
   al abrir su formulario gira a «×». El botón del lápiz conserva su icono. Más aire entre el botón y lo que sigue. */
.boton-redondo { text-decoration: none; }
.boton-redondo:not(.boton-lapiz) { position: relative; font-size: 0; }
.boton-redondo:not(.boton-lapiz)::before, .boton-redondo:not(.boton-lapiz)::after { content: ""; position: absolute; left: 50%; top: 50%; width: 20px; height: 3px; border-radius: 2px; background: currentColor; transform: translate(-50%, -50%); transition: transform .15s; }
.boton-redondo:not(.boton-lapiz)::after { transform: translate(-50%, -50%) rotate(90deg); }
.boton-redondo:not(.boton-lapiz)[aria-expanded="true"]::before { transform: translate(-50%, -50%) rotate(45deg); }
.boton-redondo:not(.boton-lapiz)[aria-expanded="true"]::after { transform: translate(-50%, -50%) rotate(-45deg); }
.titulo-con-boton { margin-bottom: 1rem; }
.tarjeta > .titulo-con-boton { margin-bottom: 1.1rem; }
.tarjeta > .titulo-con-boton h2 { margin: 0; }
.botones-titulo { align-items: center; }
.reclasificar { margin-top: .7rem; }
.reclasificar summary { cursor: pointer; color: var(--azul); font-size: .92rem; }
.reclasificar .filtros { margin-top: .5rem; }

/* Ventana «Download Excel» de Commissions (v1.22.22) */
.dialogo-descarga .campo { margin-bottom: .5rem; }
.dialogo-descarga select { width: 100%; }
.dialogo-descarga p.nota-campo { margin: 0 0 .9rem; font-size: .9rem; }
/* Contacto visible solo para Admin (v1.22.23) */
.etiqueta-admin { background: #eef2fb; color: #1f4e9e; border: 1px solid #b9c8e8; }
/* Acciones al pie de la ficha del contacto (v1.22.24): en fila, con separación; «Delete contact» a la derecha */
.acciones-contacto { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.acciones-contacto form { margin: 0; }
.acciones-contacto .boton { cursor: pointer; min-height: 44px; }
.acciones-contacto .accion-borrar { margin-left: auto; }
/* Regla de comisión de cada fuente (v1.22.25) */
.regla-fuente { margin: 0; display: flex; gap: .4rem; align-items: center; }
.regla-fuente select { min-width: 14rem; }
/* Periodo del Excel de Commissions (v1.22.26) */
.dialogo-descarga .dd-periodo { border: 0; margin: .4rem 0 .6rem; padding: 0; }
.dialogo-descarga .dd-periodo legend { font-weight: 600; margin-bottom: .3rem; padding: 0; }
.dialogo-descarga .dd-periodo .casilla { margin: .2rem 0; }
.dialogo-descarga .dd-meses { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin-top: .4rem; }
.dialogo-descarga .dd-meses[hidden] { display: none; }
.dialogo-descarga input[type=month] { width: 100%; box-sizing: border-box; padding: .6rem .7rem; font: inherit; color: inherit; background: #fff; border: 1.5px solid var(--linea); border-radius: 8px; min-height: 2.9rem; }
/* Referido por defecto de cada fuente (v1.22.28) */
.referido-fuente { margin: 0; display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.referido-fuente select { min-width: 12rem; }
.referido-fuente input[name=amount] { width: 6rem; }
/* v1.22.40: el registro de pagos vive dentro de la tarjeta Payments */
.nuevo-pago { max-width: 46rem; border: 1px solid var(--linea); border-radius: 10px; padding: 1rem 1.1rem; margin: 0 0 1.2rem; }
.nuevo-pago .sub { margin-top: 0; }
.renglon-titulo { margin: 0 0 .5rem; }   /* v1.22.47: equipo de la venta */

/* v1.22.48: cada equipo es un registro de lectura con su lápiz (solo Admin) */
.renglon.equipo { padding-bottom: .4rem; }
.renglon.equipo > .titulo-con-boton { margin-bottom: .5rem; align-items: center; }
.renglon.equipo .renglon-titulo { margin: 0; }
.renglon.equipo .datos { margin-bottom: .5rem; }
.renglon.equipo .vacio { margin: 0 0 .5rem; }
.renglon.equipo .caja-nueva { margin-top: .6rem; }

/* v1.22.49: la venta como registros de lectura. Cada registro (concepto, pago, referido, nota, ajuste) con su lápiz chico; «Last change» al pie de la tarjeta. */
.renglon.registro { padding-bottom: .4rem; }
.renglon.registro > .titulo-con-boton, .renglon.equipo > .titulo-con-boton { margin-bottom: .5rem; align-items: center; }
.renglon.registro .renglon-titulo { margin: 0; }
.renglon.registro .datos { margin-bottom: .5rem; }
.renglon.registro .caja-nueva { margin-top: .6rem; }
.renglon .boton-redondo, .archivo-pie .boton-redondo { width: 36px; height: 36px; }
.renglon .boton-redondo.boton-lapiz svg, .archivo-pie .boton-redondo.boton-lapiz svg { width: 18px; height: 18px; }
.renglon .boton-redondo:not(.boton-lapiz)::before, .renglon .boton-redondo:not(.boton-lapiz)::after,
.archivo-pie .boton-redondo:not(.boton-lapiz)::before, .archivo-pie .boton-redondo:not(.boton-lapiz)::after { width: 15px; }
.titulo-con-boton h3, .titulo-con-boton h3.sub { margin: 0; }
#referrals.titulo-con-boton { margin-top: 1.4rem; }
.ajuste-manual > .titulo-con-boton { margin-top: 1rem; }
.archivo-pie { margin: .35rem 0 0; align-items: flex-start; flex-wrap: nowrap; }
.nota-venta .notas-leer { margin-bottom: .5rem; }
.ultimo-cambio { margin: .7rem 0 0; font-size: .8rem; color: var(--tinta-suave); }
#comisiones-calculadas > h3.sub:first-child, #legacy { margin-top: 1.4rem; }

/* v1.22.50: la «×» de cerrar se dibuja con dos barras centradas (no con el carácter ×, que la fuente deja descentrado y delgado).
   El lápiz abierto oculta su icono y muestra la misma «×» que el «+»; el cierre de los visores (QR, fotos) también. */
.boton-redondo.boton-lapiz { position: relative; font-size: 0; }
.boton-redondo.boton-lapiz[aria-expanded="true"] svg { display: none; }
.boton-redondo.boton-lapiz[aria-expanded="true"]::before, .boton-redondo.boton-lapiz[aria-expanded="true"]::after,
.qrp-cerrar::before, .qrp-cerrar::after { content: ""; position: absolute; left: 50%; top: 50%; width: 20px; height: 3px; border-radius: 2px; background: currentColor; }
.boton-redondo.boton-lapiz[aria-expanded="true"]::before, .qrp-cerrar::before { transform: translate(-50%, -50%) rotate(45deg); }
.boton-redondo.boton-lapiz[aria-expanded="true"]::after, .qrp-cerrar::after { transform: translate(-50%, -50%) rotate(-45deg); }
.qrp-cerrar { font-size: 0; }
.renglon .boton-redondo.boton-lapiz[aria-expanded="true"]::before, .renglon .boton-redondo.boton-lapiz[aria-expanded="true"]::after,
.archivo-pie .boton-redondo.boton-lapiz[aria-expanded="true"]::before, .archivo-pie .boton-redondo.boton-lapiz[aria-expanded="true"]::after { width: 15px; }
.etiqueta-campo { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .3rem; }

/* v1.22.51: garantías extendidas dentro de cada equipo */
.garantias-titulo { margin: .9rem 0 .4rem; padding-top: .8rem; border-top: 1px solid var(--linea); align-items: center; }
.garantia { padding: .6rem 0 .1rem; border-top: 1px dashed var(--linea); }
.garantia > .titulo-con-boton { margin-bottom: .4rem; align-items: center; }
.garantia .datos { margin-bottom: .4rem; }

/* v1.22.52: Devices */
tr.fila-enlace { cursor: pointer; }
.lista-equipos { list-style: none; margin: 0; padding: 0; }
.lista-equipos li { border: 1px solid var(--linea); border-radius: 8px; padding: .7rem .9rem; margin-bottom: .6rem; }
.lista-equipos .datos { margin: .4rem 0 0; }

/* v1.22.53: referido del evento */
.referido-evento { margin: .2rem 0 .4rem; align-items: center; }
.referido-evento .nota { margin: 0; }
.referido-evento .boton-redondo { width: 36px; height: 36px; }
.referido-evento .boton-redondo.boton-lapiz svg { width: 18px; height: 18px; }
.referido-evento .boton-redondo.boton-lapiz[aria-expanded="true"]::before, .referido-evento .boton-redondo.boton-lapiz[aria-expanded="true"]::after { width: 15px; }

/* v1.22.54: el evento muestra asistentes y referido en lectura; un solo lápiz (Admin) los edita */
.datos-evento { margin: .5rem 0 .8rem; }
.tarjeta > .titulo-fila .botones-titulo { gap: .6rem; flex-wrap: nowrap; }

/* v1.22.56 Sesión en modo lectura: el lápiz muestra el formulario, los comentarios y la edición de resúmenes */
.sesion-cuerpo:not(.editando) .solo-edicion, .sesion-cuerpo.editando .solo-lectura { display: none; }
.historial-sesion { margin-top: .75rem; }
.historial { list-style: none; margin: .5rem 0 0; padding: 0; }
.historial > li { padding: .4rem 0; border-top: 1px solid var(--linea); }
/* v1.22.57: cada cambio del historial en una línea */
.historial-linea { margin: 0; font-size: .92rem; overflow-wrap: anywhere; }
.historial-linea > summary { cursor: pointer; }
.historial .antes { color: var(--tinta-suave); text-decoration: line-through; }
/* v1.22.59: el texto largo de una línea del historial se abre completo debajo */
.historial-texto { margin: .4rem 0 .2rem; }
/* v1.22.60: venta histórica (registro de Anne 2021–2025) */
.etiqueta-historica { background: #eef1f6; color: #3d4f6b; border: 1px solid #c9d2e0; }
.aviso.aviso-historica { padding: .7rem .9rem; font-size: .92rem; border-left-color: #8a9bb5; background: #f3f5f9; }

/* v1.22.61: sugerencia de la IA en la ficha del contacto y botón en línea */
.aviso.sugerencia-ia { padding: .7rem .9rem .6rem; margin-bottom: 1rem; }
.aviso.sugerencia-ia p { margin: 0 0 .3rem; }
.aviso.sugerencia-ia form { margin: 0; }
form.en-linea { display: inline; margin: 0 0 0 .4rem; }
.aviso-sugerencias { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; }

/* v1.22.67: formulario del participante con los párrafos justificados y, al final, el brochure y el video para descargar */
.publico .bloque p { text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
.publico .bloque p.centrado { text-align: center; }
.publico .materiales-publicos { margin-top: 1.4rem; }
.botones-materiales { display: flex; flex-wrap: wrap; gap: .7rem; margin-bottom: .7rem; }
.botones-materiales .boton { flex: 1 1 12rem; text-align: center; padding: .8rem 1rem; min-height: 48px; font-size: 1rem; }

/* v1.23.0: etapas del pipeline */
.etiqueta.etapa-new { background: #eef3fb; color: var(--azul-hondo); }
.etiqueta.etapa-trial { background: #dce7f8; color: #163b7a; }
.etiqueta.etapa-negotiating { background: #fbf1dc; color: #7a5712; }
.etiqueta.etapa-preorder { background: #ece8fb; color: #3f3285; }
.etiqueta.etapa-customer { background: var(--ok-fondo); color: var(--ok); }
.etiqueta.etapa-lost { background: #f1ede4; color: #5f5a4e; }
.etiqueta.etapa-inactive { background: #eceef1; color: #55606f; }
.etiqueta.etapa-none { background: transparent; color: var(--tinta-suave); border: 1px dashed var(--linea); }
.etiqueta-aviso { background: #fbf1dc; color: #7a5712; }

/* v1.23.0: tarjeta Follow-ups del contacto */
.boton-chico { padding: .3rem .7rem; font-size: .85rem; min-height: 36px; }
.boton-redondo.boton-mini { width: 36px; height: 36px; box-shadow: none; }
.boton-redondo.boton-mini svg { width: 18px; height: 18px; }
.etapa-fila { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem .8rem; padding: .5rem 0 .7rem; border-bottom: 1px solid var(--linea); margin-bottom: .6rem; }
.etapa-dato { font-weight: 600; display: inline-flex; flex-wrap: wrap; align-items: center; gap: .3rem .45rem; }
.pildoras-etapa { display: flex; flex-wrap: wrap; gap: .4rem; }
.pildora-etapa { display: inline-flex; align-items: center; gap: .35rem; min-height: 40px; padding: .3rem .8rem; border: 1.5px solid var(--linea); border-radius: 999px; background: #fff; font-weight: 600; font-size: .9rem; cursor: pointer; }
.pildora-etapa input { width: 18px; height: 18px; margin: 0; accent-color: var(--azul); }
.pildora-etapa:has(input:checked) { border-color: var(--azul); background: #eef3fb; }
.pildora-etapa.correccion { border-style: dashed; font-weight: 500; color: var(--tinta-suave); }
fieldset.campo, fieldset.siguiente { border: 0; padding: 0; margin: 0 0 .9rem; }
fieldset.campo legend, fieldset.siguiente legend { font-weight: 600; font-size: .92rem; margin-bottom: .35rem; padding: 0; }
fieldset.siguiente { border-top: 1px dashed var(--linea); padding-top: .7rem; }
.lista-seguimientos { list-style: none; padding: 0; margin: .4rem 0 .6rem; display: grid; gap: .6rem; }
.seguimiento { border: 1px solid var(--linea); border-left: 4px solid var(--linea); border-radius: 8px; background: #fff; padding: .6rem .8rem; }
.seguimiento.hoy { border-left-color: var(--azul); }
.seguimiento.vencido { border-left-color: var(--error); }
.seguimiento.hecho { border-left-color: var(--ok); background: #fbfcfe; }
.seg-cabeza { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .2rem .8rem; }
.seg-cabeza strong { color: var(--tinta); }
.seg-vence { font-size: .85rem; color: var(--tinta-suave); white-space: nowrap; }
.seguimiento.vencido .seg-vence { color: var(--error); font-weight: 600; }
.seguimiento.hoy .seg-vence { color: var(--azul); font-weight: 600; }
.seg-pie { margin: .15rem 0 0; font-size: .85rem; color: var(--tinta-suave); }
.seg-resultado { margin: .25rem 0 0; font-size: .92rem; white-space: normal; }
.seg-acciones { display: flex; align-items: center; gap: .5rem; margin-top: .45rem; }
.seg-borrar { margin: -.4rem 0 .6rem; }
.mas-seguimientos .lista-seguimientos { margin-top: .5rem; }
.vacio.vacio-chico { padding: .9rem 1rem; font-size: .92rem; }
.aviso-incompleto { padding-bottom: .7rem; }
.sig-fu.vencido { color: var(--error); font-weight: 600; }
.sig-fu.hoy { color: var(--azul); font-weight: 600; }

/* v1.23.0: Home */
.vistas-home { margin: .6rem 0 1rem; }
.home-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; margin: 0 0 .4rem; }
.kpi { background: var(--papel); border: 1px solid var(--linea); border-radius: 10px; padding: .75rem 1rem .8rem; }
.kpi dt { font-size: .82rem; font-weight: 600; color: var(--tinta-suave); }
.kpi dd { margin: .15rem 0 0; font-size: 1.7rem; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.kpi dd a { color: var(--azul-hondo); text-decoration: none; }
.kpi dd a:hover { text-decoration: underline; }
.kpi.kpi-alerta { border-color: #f0b8b2; background: var(--error-fondo); }
.kpi.kpi-alerta dd a { color: var(--error); }
.kpi.kpi-aviso { border-color: #e7c98a; background: #fdf8ec; }
.kpi.kpi-aviso dd a { color: #8a6418; }
.nota-kpis { margin: 0 0 1rem; }
/* v1.23.3: tres tarjetas en dos columnas sin huecos: la gráfica va justo debajo de los follow-ups y el pipeline ocupa la columna derecha */
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto 1fr; grid-template-areas: "seg pipe" "graf pipe"; column-gap: 1rem; align-items: start; }
.home-grid > .tarjeta { margin-bottom: 1rem; }
.home-seguimientos { grid-area: seg; }
.home-pipeline { grid-area: pipe; }
.home-fuentes { grid-area: graf; }
.lista-home { list-style: none; padding: 0; margin: .4rem 0 .8rem; }
.lista-home li { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "nombre vence" "tarea accion"; gap: .1rem .8rem; align-items: center; padding: .55rem .2rem .55rem .7rem; border-bottom: 1px solid var(--linea); border-left: 3px solid transparent; }
.lista-home li:last-child { border-bottom: 0; }
.lista-home li.vencido { border-left-color: var(--error); }
.lista-home li.hoy { border-left-color: var(--azul); }
.lista-home li.sin-seguimiento { border-left-color: var(--oro); }
.lh-nombre { grid-area: nombre; font-weight: 600; text-decoration: none; }
.lh-nombre:hover { text-decoration: underline; }
.lh-tarea { grid-area: tarea; font-size: .9rem; color: var(--tinta); }
.lh-vence { grid-area: vence; font-size: .82rem; color: var(--tinta-suave); text-align: right; white-space: nowrap; }
.lista-home li.vencido .lh-vence { color: var(--error); font-weight: 600; }
.lista-home li.hoy .lh-vence { color: var(--azul); font-weight: 600; }
.lista-home .boton-chico { grid-area: accion; justify-self: end; }
.lista-home li > .etiqueta { grid-area: nombre; justify-self: end; margin-right: 0; }
.pipeline-barras { list-style: none; padding: 0; margin: .5rem 0 .4rem; display: grid; gap: .35rem; }
.pipeline-barras a { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr) 3rem; align-items: center; gap: .6rem; padding: .4rem .5rem; border-radius: 8px; color: var(--tinta); text-decoration: none; }
.pipeline-barras a:hover { background: #f5f8fd; }
.pipeline-barras a[aria-current] { background: #eef3fb; box-shadow: inset 3px 0 0 var(--oro); }
.pb-nombre { font-weight: 600; font-size: .92rem; }
.pb-pista { display: block; height: 22px; }
.pb-barra { display: block; height: 100%; min-width: 0; background: var(--azul); border-radius: 0 4px 4px 0; }
.pb-n { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.pipeline-cerradas { display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; margin: .2rem 0 .8rem; padding: .5rem .5rem 0; border-top: 1px solid var(--linea); font-size: .9rem; }
.pipeline-cerradas a { color: var(--tinta-suave); text-decoration: none; }
.pipeline-cerradas a:hover { color: var(--azul); }
.pipeline-cerradas strong { color: var(--tinta); }
.leyenda-grafica { list-style: none; display: flex; flex-wrap: wrap; gap: .3rem 1rem; padding: 0; margin: .2rem 0 .6rem; font-size: .85rem; color: var(--tinta-suave); }
.leyenda-grafica i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: .35rem; vertical-align: -1px; }
/* v1.23.2: gráfica en HTML/CSS a todo el ancho de la tarjeta */
.graf { display: grid; grid-template-columns: 2.2rem minmax(0, 1fr); grid-template-rows: 230px auto; column-gap: .5rem; margin: 1.6rem 0 1rem; }
.graf-eje { position: relative; grid-row: 1; grid-column: 1; }
.graf-eje span { position: absolute; right: 0; transform: translateY(50%); font-size: .75rem; color: var(--tinta-suave); font-variant-numeric: tabular-nums; }
.graf-area { position: relative; grid-row: 1; grid-column: 2; display: flex; align-items: flex-end; border-bottom: 1px solid #b9c4d6; }
.graf-rejilla { position: absolute; left: 0; right: 0; height: 0; border-top: 1px solid #e6ebf3; }
.graf-col { position: relative; flex: 1 1 0; height: 100%; display: flex; align-items: flex-end; justify-content: center; }
.graf-pila { position: relative; width: min(64px, 56%); display: flex; flex-direction: column; }
.graf-total { position: absolute; left: 0; right: 0; bottom: 100%; padding-bottom: .2rem; text-align: center; font-size: .82rem; font-weight: 700; color: var(--tinta); font-variant-numeric: tabular-nums; }
.graf-barra { flex: 1; display: flex; flex-direction: column-reverse; border-radius: 4px 4px 0 0; overflow: hidden; }
.graf-seg { display: block; min-height: 2px; }
.graf-seg + .graf-seg { border-bottom: 2px solid var(--papel); }
.graf-seg:hover { opacity: .85; }
.graf-meses { grid-row: 2; grid-column: 2; display: flex; padding-top: .35rem; }
.graf-meses span { flex: 1 1 0; text-align: center; font-size: .78rem; color: var(--tinta-suave); white-space: nowrap; }
.tabla-numeros td, .tabla-numeros th { text-align: right; }
.tabla-numeros th:first-child, .tabla-numeros th[scope="row"] { text-align: left; }
@media (max-width: 860px) {
  .home-grid { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-template-areas: "seg" "pipe" "graf"; }
  .home-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
  .kpi dd { font-size: 1.35rem; }
}
@media (max-width: 480px) {
  .pipeline-barras a { grid-template-columns: 5.6rem minmax(0, 1fr) 2.4rem; gap: .4rem; }
}
@media (max-width: 560px) { .graf { grid-template-rows: 190px auto; } .graf-meses span { font-size: .7rem; } }
/* v1.23.6: acomodo del Dashboard por altura (admin.js); sin JavaScript queda la cuadrícula de v1.23.3 */
.home-grid.acomodado { display: flex; align-items: flex-start; gap: 1rem; }
.home-grid.acomodado .home-col { flex: 1 1 0; min-width: 0; }
/* v1.23.7: el logo de la barra lleva al Dashboard */
.marca-enlace { display: inline-flex; align-items: center; border-radius: 4px; }
.marca-enlace:focus-visible { outline: 3px solid var(--oro); outline-offset: 3px; }
/* v1.24.0: Dashboard de negocio (Admin) */
.tablero-grid { grid-template-rows: none; grid-template-areas: none; }
.tablero-kpis .kpi dd + dd { margin-top: .1rem; font-size: .82rem; font-weight: 400; line-height: 1.35; color: var(--tinta-suave); }
.tablero-kpis .kpi dd.kpi-sub { margin-top: .05rem; }
.kpi-cmp { display: inline-block; }
.kpi-cmp.sube { color: var(--ok); }
.kpi-cmp.baja { color: var(--error); }
.embudo { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; padding: 0; margin: .4rem 0 .5rem; }
.embudo li { background: #f5f8fd; border-radius: 8px; padding: .5rem .7rem; position: relative; }
.embudo li + li::before { content: "›"; position: absolute; left: -.45rem; top: 50%; transform: translateY(-50%); color: var(--tinta-suave); font-weight: 700; }
.emb-n { display: block; font-size: 1.4rem; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; color: var(--azul-hondo); }
.emb-t { display: block; font-size: .85rem; color: var(--tinta-suave); }
.emb-t strong { color: var(--tinta); }
.dato-grande { display: flex; align-items: baseline; gap: .8rem; margin: .8rem 0 .2rem; padding-top: .6rem; border-top: 1px solid var(--linea); }
.dato-grande dt { font-size: .92rem; font-weight: 600; color: var(--tinta-suave); }
.dato-grande dd { margin: 0; font-size: 1.4rem; font-weight: 700; color: var(--azul-hondo); font-variant-numeric: tabular-nums; }
.lista-cifras { list-style: none; padding: 0; margin: .3rem 0 .6rem; }
.lista-cifras li { border-bottom: 1px solid var(--linea); border-left: 3px solid transparent; }
.lista-cifras li:last-child { border-bottom: 0; }
.lista-cifras li.aviso { border-left-color: var(--oro); background: #fdf8ec; }
.lista-cifras a { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .55rem .5rem .55rem .7rem; color: var(--tinta); text-decoration: none; }
.lista-cifras a:hover { background: #f5f8fd; }
.lista-cifras strong { font-size: 1.1rem; font-variant-numeric: tabular-nums; color: var(--azul-hondo); white-space: nowrap; }
.lista-cifras li.aviso strong { color: #8a6418; }
.lista-cifras .nota-inline { display: block; }
.lista-atrasos { margin-top: 0; }
.lista-atrasos li { grid-template-areas: "nombre vence" "tarea vence"; }
.lista-atrasos li.vencido { border-left-color: var(--oro); }
.lista-atrasos li.vencido .lh-vence { color: #8a6418; }
.tabla-compacta th, .tabla-compacta td { padding: .4rem .5rem; font-size: .9rem; }
.tabla-compacta thead th { font-size: .78rem; white-space: normal; vertical-align: bottom; }
.tabla-compacta tfoot th, .tabla-compacta tfoot td { font-weight: 700; border-bottom: 0; }
.tabla-compacta td .nota-inline, .tabla-compacta th .nota-inline { display: block; font-size: .75rem; }
.cifra-alerta { color: var(--error); font-weight: 700; }
@media (max-width: 560px) { .embudo { grid-template-columns: minmax(0, 1fr); } .embudo li + li::before { content: none; } }
.tablero-grid .tabla-envoltura { margin-bottom: .6rem; }
.graf-12 .graf-meses span { font-size: .72rem; line-height: 1.15; }
.graf-meses small { display: block; font-size: .68rem; color: var(--tinta-suave); }
.lista-atrasos li.mas { display: block; border-left-color: transparent; padding: .45rem .7rem; }
.lista-atrasos li.mas a { font-size: .88rem; }
.graf-12 .graf-meses span { overflow: hidden; } @media (max-width: 560px) { .graf-12 .graf-meses span { font-size: .6rem; } .graf-meses small { font-size: .58rem; } }
/* v1.24.0: campana de posibles duplicados (Contacts) y su página */
.campana { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; color: #8a6418; background: #fdf8ec; border: 1.5px solid #e7c98a; text-decoration: none; }
.campana:hover { background: #fbefd2; }
.campana .insignia { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--oro); color: #fff; border: 2px solid var(--fondo); font-size: .72rem; font-weight: 700; line-height: 16px; text-align: center; box-sizing: border-box; }
.par-duplicado { margin-bottom: 1rem; }
.par-lados { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; }
.par-lado { margin: 0; }
.par-lado dt.par-nombre { font-weight: 700; font-size: 1.05rem; margin-bottom: .3rem; }
.par-lado dd { margin: 0; display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: .5rem; padding: .2rem 0; border-bottom: 1px solid var(--linea); font-size: .92rem; overflow-wrap: anywhere; }
.par-lado dd span { color: var(--tinta-suave); font-size: .82rem; }
.par-acciones { margin: .8rem 0 0; text-align: right; }
@media (max-width: 640px) { .par-lados { grid-template-columns: minmax(0, 1fr); } .par-lado + .par-lado { padding-top: .6rem; border-top: 2px solid var(--linea); } }
.par-lado dd > .etiqueta { justify-self: start; }
/* v1.25.0: lista abierta desde el Dashboard */
.aviso-tablero { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem 1rem; margin: 0 0 .8rem; padding: .6rem .9rem; border-radius: 8px; background: #eef3fb; border-left: 3px solid var(--azul); font-size: .92rem; }
.aviso-tablero a { font-weight: 600; white-space: nowrap; }
a.graf-seg { display: block; min-height: 3px; }
a.graf-total { color: var(--tinta); text-decoration: none; }
a.graf-total:hover { color: var(--azul); text-decoration: underline; }
.embudo li a { display: block; color: inherit; text-decoration: none; margin: -.5rem -.7rem; padding: .5rem .7rem; border-radius: 8px; }
.embudo li a:hover { background: #e6eefb; }
.tablero-grid .tabla-numeros td a, .tablero-kpis .kpi dd a { color: inherit; }
.tablero-grid .tabla-numeros td a { text-decoration: none; border-bottom: 1px dotted currentColor; }
.tablero-grid .tabla-numeros td a:hover { color: var(--azul); }
.tablero-kpis .kpi dd + dd a { text-decoration: none; }
.tablero-kpis .kpi dd + dd a:hover { text-decoration: underline; }
.nota-kpis a { color: inherit; }
/* v1.25.1: rol Sales en Sales, Pre-orders, Devices y Commissions: solo lectura (el servidor además rechaza cualquier envío) */
.solo-lectura main form[method="post"], .solo-lectura main .boton-redondo, .solo-lectura main .adjuntar { display: none !important; }
.form-rol { display: flex; gap: .4rem; align-items: center; margin: 0; }
.form-rol select { min-width: 6.5rem; padding: .3rem .4rem; }
.periodo-titulo { font-size: .7em; font-weight: 600; color: var(--tinta-suave); }
.form-rol button:disabled { opacity: .4; cursor: default; }
.form-rol.por-guardar button { background: var(--azul); color: #fff; border-color: var(--azul); }
/* v1.26.0: Events & QR: el título se acomoda en uno, dos o tres renglones; el botón y el lápiz siempre a la derecha */
.cabeza-evento { flex-wrap: nowrap; align-items: flex-start; }
.cabeza-evento h2 { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; margin-right: .2rem; }
.cabeza-evento .botones-titulo { flex: 0 0 auto; display: flex; align-items: center; gap: .5rem; }
.cabeza-evento .botones-titulo form { margin: 0; }
.boton-whatsapp { border-color: #1f9d55; color: #157a41; }
/* v1.26.0: Contacts en el celular: título, campana, descarga y «+» en una sola línea (la descarga se vuelve un botón redondo con icono) */
.boton-descarga { display: inline-flex; align-items: center; gap: .4rem; }
.boton-descarga svg { flex: none; }
@media (max-width: 560px) {
  .titulo-fila:has(.boton-descarga) { flex-wrap: nowrap; align-items: center; }
  .titulo-fila:has(.boton-descarga) h1 { flex: 1 1 auto; min-width: 0; }
  .titulo-fila:has(.boton-descarga) .botones-titulo { flex: none; flex-wrap: nowrap; gap: .45rem; }
  .boton-descarga { width: 44px; height: 44px; padding: 0; justify-content: center; border-radius: 50%; }
  .boton-descarga span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
/* v1.26.0: listas resumen con lápiz (Sources & referrers, Users). Todo a la vista, sin scroll horizontal; se edita en una ventana. */
.lista-resumen { list-style: none; margin: .4rem 0 0; padding: 0; }
.lista-resumen > li { display: flex; align-items: center; gap: .8rem; padding: .75rem 0; border-top: 1px solid var(--linea); scroll-margin-top: 5rem; transition: background .4s; }
.lista-resumen > li:first-child { border-top: 0; }
.lista-resumen > li.recien { background: #fdf8ec; }
.lista-resumen > li.oculto-cat .lr-nombre { color: var(--gris, #6b7280); }
.lista-resumen .lr-texto { flex: 1 1 auto; min-width: 0; }
.lista-resumen .lr-nombre { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.lista-resumen .lr-datos { margin: .15rem 0 0; font-size: .9rem; color: var(--gris, #5b6472); display: flex; flex-wrap: wrap; gap: .1rem .9rem; }
.lista-resumen .lr-datos span { overflow-wrap: anywhere; }
.lista-resumen .lr-nota { flex-basis: 100%; font-style: italic; }
.lista-resumen .boton-lapiz { width: 40px; height: 40px; background: #fff; color: var(--azul); border: 1.5px solid var(--azul); box-shadow: none; }
.lista-resumen .boton-lapiz:hover { background: #eef3fb; }
.lista-resumen .boton-lapiz svg { width: 18px; height: 18px; }
.etiqueta.etiqueta-gris { background: #eceef1; color: #4b5563; }
.dialogo-edicion[open] { max-width: 30rem; max-height: calc(100vh - 2rem); overflow-y: auto; }
.dialogo-edicion .campo { margin-bottom: .6rem; }
.dialogo-edicion .fila { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
@media (max-width: 420px) { .dialogo-edicion .fila { grid-template-columns: 1fr; } }
.dialogo-edicion select, .dialogo-edicion input[type=text], .dialogo-edicion input[type=email], .dialogo-edicion input:not([type]) { width: 100%; box-sizing: border-box; }
.dialogo-edicion p.nota-campo { margin: .3rem 0 0; font-size: .88rem; }
.dialogo-edicion .botones-fila { display: flex; justify-content: flex-end; gap: .6rem; margin-top: .9rem; flex-wrap: wrap; }
.dialogo-edicion button[disabled] { opacity: .45; cursor: not-allowed; }
.dialogo-edicion .reclasificar { margin-top: 1rem; padding-top: .7rem; border-top: 1px solid var(--linea); }
.dialogo-edicion .acciones-extra { margin-top: 1rem; padding-top: .8rem; border-top: 1px solid var(--linea); display: flex; flex-wrap: wrap; gap: .6rem; }
.titulo-fila.titulo-con-boton h2 { margin: 0; }
.dialogo-edicion .botones-fila > button { flex: 1 1 7rem; width: auto; }
/* v1.26.1: brochure y video en la pantalla de gracias, arriba y en una sola línea */
.materiales-gracias { margin: 0 0 1.3rem; text-align: center; }
.materiales-gracias h2 { margin: 0 0 .6rem; font-size: 1.15rem; color: var(--azul-hondo); }
.materiales-gracias .botones-materiales { flex-wrap: nowrap; margin-bottom: 0; }
.materiales-gracias .botones-materiales .boton { flex: 1 1 0; min-width: 0; }
/* v1.26.2: en todas las tablas la primera columna es el nombre (Name, Contact, Customer, Owner) y es la única fija al desplazarse a los lados */
.tabla .col-nombre { position: sticky; left: 0; z-index: 1; background: var(--papel); box-shadow: inset -1px 0 0 var(--linea), inset 0 -1px 0 var(--linea); min-width: 9rem; max-width: 14rem; white-space: normal; overflow-wrap: anywhere; }
.tabla thead th.col-nombre { z-index: 3; }
@media (max-width: 760px) { .tabla .col-nombre { min-width: 7.5rem; max-width: 9.5rem; } }
/* v1.26.2: en Commissions el nombre y «Expenses» van en dos renglones, para que la columna fija Who no se ensanche */
.tabla-comisiones th[scope="row"] { white-space: normal; min-width: 7rem; max-width: 11rem; line-height: 1.3; }
.tabla-comisiones th[scope="row"] .nota-inline { font-weight: 400; }
@media (max-width: 760px) { .tabla-comisiones th[scope="row"] { min-width: 6rem; max-width: 8.5rem; } }
.tabla thead th.col-nombre { background: #f7f9fc; }
/* v1.26.3: en el resumen de Commissions la etiqueta Who queda por encima de las etiquetas de los meses al desplazarse (antes los meses, con el mismo z-index y después en el código, se pintaban encima) */
.tabla-envoltura .tabla-comisiones thead th:first-child { left: 0; z-index: 3; box-shadow: 1px 0 0 var(--linea), inset 0 -1px 0 var(--linea); }
/* v1.27.0: merge de contactos. Una fila por dato que difiere: el dato, la opción del que queda y la del que se inactiva */
.form-unir h2 { margin-top: 1.2rem; }
.form-unir h2:first-of-type { margin-top: 0; }
.unir-tabla { margin: .4rem 0 .6rem; }
.unir-fila { display: grid; grid-template-columns: 11rem minmax(0, 1fr) minmax(0, 1fr); gap: .6rem; align-items: stretch; margin: 0; padding: .55rem 0; border: 0; border-bottom: 1px solid var(--linea); min-width: 0; }
.unir-fila legend { float: left; padding: .55rem 0 0; font-weight: 600; font-size: .92rem; color: var(--tinta); }
.unir-cabeza { font-size: .82rem; font-weight: 600; color: var(--tinta-suave); padding-bottom: .3rem; }
.unir-opcion { display: flex; gap: .55rem; align-items: flex-start; padding: .55rem .7rem; border: 1px solid var(--linea); border-radius: 8px; cursor: pointer; background: var(--papel); overflow-wrap: anywhere; font-size: .95rem; }
.unir-opcion input { margin: .2rem 0 0; flex: none; width: auto; min-height: 0; }
.unir-opcion:has(input:checked) { border-color: var(--azul); background: #eef3fb; box-shadow: inset 0 0 0 1px var(--azul); }
.unir-opcion.vacio-opcion { color: var(--tinta-suave); }
.unir-lado { display: none; }
.lista-simple { margin: .3rem 0 .6rem; padding-left: 1.2rem; }
.lista-simple li { margin: .2rem 0; }
@media (max-width: 640px) {
  .unir-fila { grid-template-columns: minmax(0, 1fr); gap: .4rem; }
  .unir-fila legend { padding: 0 0 .1rem; }
  .unir-cabeza { display: none; }
  .unir-lado { display: inline-block; min-width: 3.2rem; font-size: .8rem; color: var(--tinta-suave); font-weight: 600; }
}
.unir-movido { margin-top: .9rem; }
.form-en-titulo { margin: 0; display: flex; }
/* v1.27.6: «View as»: barra fija arriba mientras un Admin ve el panel como otra persona */
.barra-ver-como { position: sticky; top: 0; z-index: 60; display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .55rem 1rem; background: #fff4d6; border-bottom: 2px solid #c98a00; color: #4a3500; font-size: .92rem; }
.barra-ver-como p { margin: 0; }
.barra-ver-como form { margin: 0; flex: none; }
.ver-como-aviso { color: #a3290f; font-weight: 600; }
.form-ver-como { margin: 0 .5rem 0 0; align-self: center; }

/* v1.27.12: teléfono con WhatsApp comprobado */
.icono-wa { display: inline-flex; vertical-align: -3px; color: #25d366; margin-left: 4px; }
.col-telefono { white-space: nowrap; }
a.icono-wa { text-decoration: none; }
a.icono-wa:hover, a.icono-wa:focus-visible { color: #128c7e; }
.par-lado dd .icono-wa { color: #25d366; font-size: inherit; }

/* v1.27.18: campana de datos distintos del formulario (Contact details) */
.boton-campana { position: relative; background: #fff; color: var(--azul); border: 1.5px solid var(--azul); box-shadow: none; }
.boton-campana:hover { background: #eef3fb; }
.boton-campana .insignia { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--error); color: #fff; border: 2px solid var(--fondo); font-size: .72rem; font-weight: 700; line-height: 16px; text-align: center; box-sizing: border-box; }
.dialogo-datos .dato-fila { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .5rem; margin: 0 0 .8rem; padding: 0; border: 0; min-width: 0; }
.dialogo-datos .dato-fila legend { padding: 0 0 .35rem; font-weight: 600; font-size: .92rem; }
@media (max-width: 480px) { .dialogo-datos .dato-fila { grid-template-columns: minmax(0, 1fr); } }
.boton-redondo.boton-campana::before, .boton-redondo.boton-campana::after { content: none; }   /* sin la «+» de los botones redondos */
.titulo-con-boton .boton-campana { margin-left: auto; margin-right: .6rem; }   /* junto al «+» o al lápiz, no al centro */
