/* CRM de Astra. Herramienta interna: prolija, rápida y legible. Claro y oscuro. */
:root {
  color-scheme: light;
  --fondo: #f6f6f4; --superficie: #ffffff; --superficie-2: #f0efec; --hundido: #ebeae6;
  --borde: #e2e1dc; --borde-fuerte: #cfcec8;
  --texto: #141413; --texto-2: #52514e; --texto-3: #74736e;
  --acento: #2459c9; --acento-texto: #ffffff; --acento-suave: #e6edfb;
  --marca: #0b0b0b;
  --wa: #157a46; --wa-suave: #e3f3ea; --wa-texto-suave: #0f5c34;
  --s1: #2a78d6; --s2: #eb6834;
  --ok: #1d7a3e; --ok-fondo: #e2f3e7;
  --azul: #1f5fb8; --azul-fondo: #e4eefb;
  --verde: #23734a; --verde-fondo: #e1f2e8;
  --amarillo: #8a5a00; --amarillo-fondo: #fbefd2;
  --violeta: #5a43c2; --violeta-fondo: #ece8fb;
  --rojo: #b42524; --rojo-fondo: #fbe5e4;
  --neutro: #52514e; --neutro-fondo: #edece8;
  --sombra: 0 1px 2px rgb(0 0 0 / .05), 0 2px 8px rgb(0 0 0 / .04);
  --radio: 10px; --radio-chico: 7px;
  --fuente: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --fondo: #141413; --superficie: #1c1c1b; --superficie-2: #242422; --hundido: #10100f;
    --borde: #31312e; --borde-fuerte: #45443f;
    --texto: #f0efec; --texto-2: #c3c2b7; --texto-3: #9a998f;
    --acento: #5b8cf0; --acento-texto: #0b0b0b; --acento-suave: #1e2a44;
    --wa: #2fb36d; --wa-suave: #173326; --wa-texto-suave: #8be0b2;
    --s1: #3987e5; --s2: #d95926;
    --ok: #6fd38f; --ok-fondo: #183424; --azul: #8db8f5; --azul-fondo: #1b2a42; --verde: #7fd3a4; --verde-fondo: #17322a;
    --amarillo: #f0c165; --amarillo-fondo: #3a2d12; --violeta: #b4a8f5; --violeta-fondo: #2a2445; --rojo: #f19b9a; --rojo-fondo: #3d1d1d;
    --neutro: #c3c2b7; --neutro-fondo: #2a2a28;
    --sombra: 0 1px 2px rgb(0 0 0 / .4);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --fondo: #141413; --superficie: #1c1c1b; --superficie-2: #242422; --hundido: #10100f;
  --borde: #31312e; --borde-fuerte: #45443f;
  --texto: #f0efec; --texto-2: #c3c2b7; --texto-3: #9a998f;
  --acento: #5b8cf0; --acento-texto: #0b0b0b; --acento-suave: #1e2a44;
  --wa: #2fb36d; --wa-suave: #173326; --wa-texto-suave: #8be0b2;
  --s1: #3987e5; --s2: #d95926;
  --ok: #6fd38f; --ok-fondo: #183424; --azul: #8db8f5; --azul-fondo: #1b2a42; --verde: #7fd3a4; --verde-fondo: #17322a;
  --amarillo: #f0c165; --amarillo-fondo: #3a2d12; --violeta: #b4a8f5; --violeta-fondo: #2a2445; --rojo: #f19b9a; --rojo-fondo: #3d1d1d;
  --neutro: #c3c2b7; --neutro-fondo: #2a2a28;
  --sombra: 0 1px 2px rgb(0 0 0 / .4);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fondo); color: var(--texto); font: 15px/1.45 var(--fuente); }
a { color: var(--acento); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.6rem; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 1.05rem; margin: 0 0 .6rem; }
h3 { font-size: .92rem; margin: 1rem 0 .5rem; color: var(--texto-2); }
code, pre { font: .85em/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; background: var(--superficie-2); border-radius: 4px; padding: .05em .3em; }
pre.codigo { padding: .7rem; overflow-x: auto; white-space: pre-wrap; word-break: break-all; }
:focus-visible { outline: 2px solid var(--acento); outline-offset: 2px; }
input, select, textarea, button { font: inherit; color: inherit; }
input:where(:not([type=checkbox]):not([type=radio]):not([type=range])), select, textarea {
  background: var(--superficie); border: 1px solid var(--borde-fuerte); border-radius: var(--radio-chico);
  padding: .5rem .65rem; min-height: 40px; width: 100%;
}
textarea { resize: vertical; line-height: 1.45; }
input.mini { width: 70px; min-height: 32px; padding: .25rem .4rem; }
.sub { color: var(--texto-2); font-size: .88rem; }
.ayuda { color: var(--texto-3); font-size: .86rem; margin: .2rem 0 .7rem; }
.error-texto { color: var(--rojo); font-size: .9rem; }
.rojo { color: var(--rojo); }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- botones ---------- */
.boton { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; min-height: 40px; padding: .45rem .9rem;
  border-radius: var(--radio-chico); border: 1px solid var(--borde-fuerte); background: var(--superficie); cursor: pointer; font-weight: 550; white-space: nowrap; text-decoration: none !important; color: var(--texto); }
.boton:hover { background: var(--superficie-2); }
.boton:disabled { opacity: .55; cursor: default; }
.boton.primario { background: var(--acento); border-color: var(--acento); color: var(--acento-texto); }
.boton.primario:hover { filter: brightness(1.08); }
.boton.suave { background: transparent; }
.boton.chico { min-height: 32px; padding: .2rem .6rem; font-size: .86rem; }
.boton.grande { min-height: 46px; width: 100%; font-size: 1rem; }
.boton.wa { background: var(--wa); border-color: var(--wa); color: #fff; }
.boton.wa:hover { filter: brightness(1.1); }
.boton.wa-suave { background: var(--wa-suave); border-color: transparent; color: var(--wa-texto-suave); }
.boton.peligro { background: var(--rojo); border-color: var(--rojo); color: #fff; }
.boton.peligro-suave { background: transparent; border-color: var(--rojo-fondo); color: var(--rojo); }
.icono { background: none; border: 0; cursor: pointer; font-size: 1.1rem; padding: .3rem .5rem; border-radius: 6px; color: var(--texto-2); min-width: 40px; min-height: 40px; }
.enlace { background: none; border: 0; color: var(--acento); cursor: pointer; padding: .2rem .3rem; font-size: .88rem; }
.fila-botones { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .6rem; }
.fila-botones.chicos .boton { min-height: 34px; padding: .25rem .7rem; font-size: .88rem; }
.fila-botones.chicos select { width: auto; min-height: 34px; padding: .2rem .5rem; font-size: .88rem; }
.chip { border: 1px solid var(--borde-fuerte); background: var(--superficie); border-radius: 999px; padding: .35rem .8rem; cursor: pointer; font-size: .88rem; color: var(--texto-2); min-height: 36px; }
.chip:hover { border-color: var(--acento); color: var(--texto); }

/* ---------- insignias ---------- */
.insignia { display: inline-flex; align-items: center; gap: .25rem; padding: .08rem .5rem; border-radius: 999px; font-size: .78rem; font-weight: 600; white-space: nowrap;
  background: var(--neutro-fondo); color: var(--neutro); }
.insignia.azul { background: var(--azul-fondo); color: var(--azul); }
.insignia.verde { background: var(--verde-fondo); color: var(--verde); }
.insignia.amarillo { background: var(--amarillo-fondo); color: var(--amarillo); }
.insignia.violeta { background: var(--violeta-fondo); color: var(--violeta); }
.insignia.rojo { background: var(--rojo-fondo); color: var(--rojo); }
.insignia.ok { background: var(--ok-fondo); color: var(--ok); }

/* ---------- marco ---------- */
.marco { display: grid; grid-template-columns: 228px 1fr; min-height: 100vh; }
.lateral { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 2px; padding: 0 .6rem .8rem; background: var(--superficie); border-right: 1px solid var(--borde); overflow-y: auto; }
.marca { display: flex; align-items: center; gap: .6rem; background: var(--marca); color: #fff; margin: 0 -.6rem .7rem; padding: 1rem 1.1rem; font-weight: 600; letter-spacing: .06em; font-size: .8rem; }
.marca img { display: block; }
.marca span { opacity: .75; border-left: 1px solid rgb(255 255 255 / .3); padding-left: .6rem; }
.lateral .item { display: flex; align-items: center; gap: .65rem; padding: .55rem .7rem; border-radius: var(--radio-chico); color: var(--texto-2); font-weight: 520; text-decoration: none; min-height: 40px; }
.lateral .item:hover { background: var(--superficie-2); color: var(--texto); }
.lateral .item.activo { background: var(--acento-suave); color: var(--acento); }
.lateral-pie { margin-top: auto; display: flex; justify-content: space-between; align-items: center; padding: .6rem .5rem 0; border-top: 1px solid var(--borde); color: var(--texto-2); font-size: .9rem; }
.contenido { min-width: 0; }
.abajo { display: none; }
.pagina { max-width: 1040px; margin: 0 auto; padding: 1.6rem 1.6rem 4rem; }
.pagina.ancha { max-width: none; }
.cabeza { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.cabeza .sub { margin: .2rem 0 0; }
.cabeza-acciones { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.cabeza-acciones input[type=search], .cabeza-acciones input[type=month] { width: auto; min-width: 160px; }
.miga { margin: 0 0 .2rem; font-size: .85rem; }
.interruptor { display: inline-flex; align-items: center; gap: .4rem; font-size: .9rem; color: var(--texto-2); cursor: pointer; min-height: 40px; }
.check { display: flex; align-items: center; gap: .5rem; font-size: .92rem; min-height: 36px; }
.tarjeta { background: var(--superficie); border: 1px solid var(--borde); border-radius: var(--radio); padding: 1rem 1.1rem; box-shadow: var(--sombra); }
section.tarjeta { margin-bottom: 1.1rem; }
.seccion-cabeza { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .5rem; }
.seccion-cabeza h2 { margin: 0; }
.cargando { padding: 3rem 1rem; text-align: center; color: var(--texto-3); }
.vacio { padding: 2rem 1rem; text-align: center; color: var(--texto-2); border: 1px dashed var(--borde-fuerte); border-radius: var(--radio); background: var(--superficie); }
.vacio strong { display: block; color: var(--texto); margin-bottom: .3rem; }
.vacio p { margin: 0; }
.vacio-chico { padding: .9rem 1rem; color: var(--texto-2); }

/* ---------- formularios ---------- */
.form { display: flex; flex-direction: column; gap: .8rem; }
.rejilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .75rem; }
.rejilla .todo, .campo.todo { grid-column: 1 / -1; }
.campo { display: flex; flex-direction: column; gap: .3rem; }
.campo > span { font-size: .84rem; font-weight: 600; color: var(--texto-2); }
.campo small { color: var(--texto-3); font-size: .78rem; }
.junto { display: flex; gap: .4rem; }
.junto select { width: 90px; flex: none; }
.fila-form { display: flex; gap: .5rem; flex-wrap: wrap; margin: .6rem 0; }
.fila-form > * { flex: 1 1 130px; width: auto; }
.fila-form > .boton { flex: none; }
.ancho-total { width: 100%; }

/* ---------- modal y avisos ---------- */
.velo { position: fixed; inset: 0; background: rgb(0 0 0 / .45); display: grid; place-items: center; padding: 1rem; z-index: 50; }
.modal { background: var(--superficie); border-radius: 14px; width: min(560px, 100%); max-height: calc(100vh - 2rem); display: flex; flex-direction: column; box-shadow: 0 12px 40px rgb(0 0 0 / .25); }
.modal.ancho { width: min(820px, 100%); }
.modal header { display: flex; justify-content: space-between; align-items: center; padding: .9rem 1.1rem .4rem; }
.modal header h2 { margin: 0; }
.modal-cuerpo { padding: .4rem 1.1rem 1.2rem; overflow-y: auto; }
.avisos { position: fixed; bottom: 1rem; right: 1rem; display: flex; flex-direction: column; gap: .5rem; z-index: 60; }
.aviso { background: var(--texto); color: var(--fondo); padding: .65rem 1rem; border-radius: 9px; box-shadow: var(--sombra); max-width: 360px; font-size: .92rem; }
.aviso.error { background: var(--rojo); color: #fff; }

/* ---------- entrar ---------- */
.entrar { min-height: 100vh; display: grid; place-items: center; padding: 1rem; }
.entrar-caja { width: min(380px, 100%); background: var(--superficie); border: 1px solid var(--borde); border-radius: 14px; overflow: hidden; box-shadow: var(--sombra); }
.entrar-marca { background: var(--marca); color: #fff; padding: 1.4rem 1.4rem; display: flex; align-items: center; gap: .8rem; font-weight: 600; letter-spacing: .08em; }
.entrar-marca span { opacity: .75; border-left: 1px solid rgb(255 255 255 / .3); padding-left: .8rem; font-size: .85rem; }
.entrar-caja .form, .entrar-caja > p, .entrar-caja > .boton { margin: 1.3rem 1.4rem; }
.elegir-usuario { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.elegir-usuario legend { font-size: .84rem; font-weight: 600; color: var(--texto-2); margin-bottom: .4rem; }
.elegir-usuario label { border: 1px solid var(--borde-fuerte); border-radius: var(--radio-chico); padding: .6rem; text-align: center; cursor: pointer; font-weight: 600; min-height: 44px; }
.elegir-usuario label.activo { border-color: var(--acento); background: var(--acento-suave); color: var(--acento); }
.elegir-usuario input { position: absolute; opacity: 0; pointer-events: none; }

/* ---------- hoy ---------- */
.bloque-hoy { margin-bottom: 1.6rem; }
.bloque-hoy h2 { display: flex; align-items: center; gap: .5rem; }
.cuenta { background: var(--superficie-2); color: var(--texto-2); border-radius: 999px; padding: 0 .5rem; font-size: .8rem; font-weight: 600; }
.lista-hoy { list-style: none; margin: 0; padding: 0; background: var(--superficie); border: 1px solid var(--borde); border-radius: var(--radio); box-shadow: var(--sombra); }
.fila-hoy + .fila-hoy { border-top: 1px solid var(--borde); }
.fila-hoy-cabeza { display: flex; align-items: center; gap: .6rem; padding-right: .9rem; }
.fila-hoy-toggle { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: .1rem; background: none; border: 0; padding: .75rem .9rem; text-align: left; cursor: pointer; min-height: 52px; }
.fila-hoy-titulo { font-weight: 600; }
.fila-hoy-sub { color: var(--texto-2); font-size: .86rem; }
.fila-hoy-insignias { display: flex; gap: .35rem; flex-wrap: wrap; justify-content: flex-end; }
.fila-hoy.abierta { background: var(--superficie-2); }
.fila-hoy-cuerpo { padding: 0 .9rem .9rem; }
.mensaje-wa { background: var(--superficie); border: 1px solid var(--borde); border-radius: var(--radio); padding: .7rem; margin-top: .6rem; }
.mensaje-tipo { font-size: .8rem; color: var(--texto-3); margin-bottom: .4rem; }
.mensaje-wa textarea { border-color: var(--borde); }
.sin-tel { color: var(--texto-3); font-size: .88rem; }

/* ---------- tablero ---------- */
.pestanas { display: inline-flex; background: var(--hundido); border-radius: 9px; padding: 3px; gap: 2px; }
.pestanas button { border: 0; background: transparent; padding: .45rem .95rem; border-radius: 7px; cursor: pointer; font-weight: 600; color: var(--texto-2); min-height: 36px; }
.pestanas button.activa { background: var(--superficie); color: var(--texto); box-shadow: var(--sombra); }
.pestanas.chicas button { padding: .25rem .6rem; font-size: .85rem; min-height: 30px; }
.tablero { display: flex; gap: .8rem; overflow-x: auto; padding-bottom: 1rem; scroll-snap-type: x proximity; align-items: flex-start; }
.columna { flex: 0 0 272px; background: var(--hundido); border-radius: var(--radio); padding: .6rem; scroll-snap-align: start; min-height: 140px; border: 2px solid transparent; }
.columna.sobre { border-color: var(--acento); }
.columna.aparte { opacity: .85; }
.columna > header { display: flex; align-items: center; gap: .4rem; padding: .1rem .2rem .55rem; }
.columna h3 { margin: 0; font-size: .88rem; color: var(--texto); }
.columna .total { margin-left: auto; color: var(--texto-3); font-size: .8rem; }
.columna-tarjetas { display: flex; flex-direction: column; gap: .5rem; }
.columna-vacia { color: var(--texto-3); text-align: center; margin: .6rem 0; }
.tarjeta-op { background: var(--superficie); border: 1px solid var(--borde); border-radius: 9px; padding: .6rem .7rem; cursor: grab; box-shadow: var(--sombra); }
.tarjeta-op.vencida { border-left: 3px solid var(--rojo); }
.tarjeta-op-titulo { font-weight: 600; color: var(--texto); display: block; }
.tarjeta-op-datos { display: flex; flex-wrap: wrap; gap: .15rem .6rem; font-size: .8rem; color: var(--texto-2); margin: .25rem 0 .45rem; }
.tarjeta-op-pie { display: flex; align-items: center; gap: .4rem; }
.tarjeta-op-pie .mover { margin-left: auto; width: auto; max-width: 118px; min-height: 30px; padding: .1rem .3rem; font-size: .78rem; background: var(--superficie-2); border-color: var(--borde); }

/* ---------- contactos ---------- */
.filtros { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.filtros input[type=search] { flex: 1 1 260px; width: auto; }
.filtros select { width: auto; }
.lista-contactos { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .45rem; }
.contacto-fila { display: flex; justify-content: space-between; align-items: center; gap: 1rem; color: var(--texto); padding: .7rem 1rem; text-decoration: none !important; }
.contacto-fila:hover { border-color: var(--borde-fuerte); }
.contacto-fila-principal { display: flex; flex-direction: column; min-width: 0; }
.contacto-fila-insignias { display: flex; gap: .3rem; flex-wrap: wrap; justify-content: flex-end; }

/* ---------- ficha ---------- */
.ficha { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.2rem; align-items: start; }
.ficha-principal > section { margin-bottom: 1.6rem; }
.ficha-lado { display: flex; flex-direction: column; gap: 1rem; }
.op { margin-bottom: .8rem; }
.op-cabeza { display: flex; justify-content: space-between; gap: .5rem; align-items: center; margin-bottom: .5rem; }
.datos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .5rem 1rem; margin: 0; }
.datos.columna { grid-template-columns: 1fr; }
.datos dt { font-size: .76rem; color: var(--texto-3); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.datos dd { margin: 0; overflow-wrap: anywhere; }
.datos dd.notas { white-space: pre-wrap; max-height: 11em; overflow-y: auto; font-size: .88rem; color: var(--texto-2); }
.editar-op { margin-top: .8rem; padding-top: .8rem; border-top: 1px solid var(--borde); }
.nota { display: flex; gap: .5rem; margin-bottom: .7rem; }
.historial { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--borde); }
.historial li { display: grid; grid-template-columns: 80px 1fr auto; gap: .6rem; padding: .35rem 0 .35rem .8rem; font-size: .9rem; align-items: baseline; }
.h-tipo { font-size: .76rem; color: var(--texto-3); font-weight: 600; }
.historial time { font-size: .78rem; color: var(--texto-3); white-space: nowrap; }
.h-etapa .h-tipo { color: var(--violeta); } .h-pago .h-tipo { color: var(--ok); } .h-whatsapp .h-tipo { color: var(--wa); } .h-vuelta .h-tipo { color: var(--amarillo); }
.chat { display: flex; flex-direction: column; gap: .35rem; max-height: 420px; overflow-y: auto; background: var(--hundido); border-radius: var(--radio); padding: .7rem; }
.burbuja { max-width: 80%; background: var(--superficie); border-radius: 10px 10px 10px 3px; padding: .45rem .65rem; align-self: flex-start; box-shadow: var(--sombra); white-space: pre-wrap; overflow-wrap: anywhere; }
.burbuja.mia { align-self: flex-end; background: var(--wa-suave); border-radius: 10px 10px 3px 10px; }
.burbuja time { display: block; font-size: .72rem; color: var(--texto-3); margin-top: .15rem; }
.resumen-wa { margin-bottom: .7rem; }
.resumen-wa p { margin: 0 0 .4rem; }
.mant-fila { display: flex; flex-direction: column; gap: .25rem; padding: .4rem 0; border-top: 1px solid var(--borde); }
.mant-fila:first-of-type { border-top: 0; }
.pagos { list-style: none; padding: 0; margin: 0; }
.pagos li { display: flex; align-items: center; gap: .5rem; padding: .35rem 0; border-top: 1px solid var(--borde); font-size: .9rem; }
.pagos li:first-child { border-top: 0; }
.pagos li span { flex: 1; color: var(--texto-2); }
.puntaje { margin-top: .7rem; }
.puntaje summary { cursor: pointer; font-weight: 600; }
.puntaje ul { margin: .4rem 0; padding-left: 1.1rem; font-size: .88rem; }

/* ---------- tablas y métricas ---------- */
.tabla-envoltura { overflow-x: auto; }
.tabla { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tabla th { text-align: left; font-size: .76rem; color: var(--texto-3); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; padding: .4rem .6rem; border-bottom: 1px solid var(--borde); white-space: nowrap; }
.tabla td { padding: .55rem .6rem; border-bottom: 1px solid var(--borde); vertical-align: top; }
.tabla tr:last-child td { border-bottom: 0; }
.tabla th.num, .tabla td.num { text-align: right; }
.tabla.chica td, .tabla.chica th { padding: .3rem .4rem; }
.tabla small { color: var(--texto-3); }
.tabla tr.apagada, .lista-simple li.apagada { opacity: .55; }
.acciones-tabla { display: flex; gap: .35rem; flex-wrap: wrap; justify-content: flex-end; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .8rem; margin-bottom: 1.2rem; }
.tile { background: var(--superficie); border: 1px solid var(--borde); border-radius: var(--radio); padding: .85rem 1rem; display: flex; flex-direction: column; gap: .15rem; box-shadow: var(--sombra); }
.tile span { font-size: .8rem; color: var(--texto-2); font-weight: 600; }
.tile strong { font-size: 1.5rem; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.tile small { color: var(--texto-3); font-size: .8rem; }
.tile.alerta strong { color: var(--rojo); }
.dos-columnas { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.1rem; }
.grafico { margin: 0; }
.leyenda { display: flex; gap: 1rem; font-size: .84rem; color: var(--texto-2); margin-bottom: .4rem; }
.punto { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .35rem; vertical-align: -1px; }
.punto.s1 { background: var(--s1); } .punto.s2 { background: var(--s2); }
.grafico-lienzo { position: relative; }
.grafico svg { width: 100%; height: auto; display: block; overflow: visible; }
.grafico .s1 { fill: var(--s1); } .grafico .s2 { fill: var(--s2); }
.grafico .grilla { stroke: var(--borde); stroke-width: 1; }
.grafico .eje { stroke: var(--borde-fuerte); stroke-width: 1; }
.grafico .tick { fill: var(--texto-3); font-size: 11px; }
.grafico .zona { fill: transparent; cursor: default; outline: none; }
.grafico .zona:hover, .grafico .zona:focus { fill: var(--texto); fill-opacity: .04; }
.tooltip { position: absolute; top: 0; transform: translateX(-50%); background: var(--superficie); border: 1px solid var(--borde-fuerte); border-radius: 8px; padding: .45rem .6rem; font-size: .82rem; box-shadow: 0 4px 16px rgb(0 0 0 / .14); pointer-events: none; display: flex; flex-direction: column; gap: .1rem; white-space: nowrap; z-index: 2; }
.ver-tabla { margin-top: .5rem; font-size: .85rem; color: var(--texto-2); }
.ver-tabla summary { cursor: pointer; }
.embudo { display: flex; flex-direction: column; gap: .45rem; }
.embudo-fila { display: grid; grid-template-columns: 150px 1fr 72px; align-items: center; gap: .6rem; font-size: .88rem; }
.embudo-etapa { color: var(--texto-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.embudo-barra { background: var(--hundido); border-radius: 4px; height: 14px; overflow: hidden; }
.embudo-barra div { height: 100%; background: var(--s1); border-radius: 0 4px 4px 0; }
.embudo-n { text-align: right; font-variant-numeric: tabular-nums; }
.embudo-n small { color: var(--texto-3); }
.gastos summary { cursor: pointer; font-weight: 600; }
.gastos { margin-top: .9rem; box-shadow: none; background: var(--superficie-2); }

/* ---------- prospección ---------- */
.buscador { display: grid; grid-template-columns: 1fr 170px 130px auto; gap: .5rem; margin-bottom: .8rem; }
.buscador-texto { font-size: 1rem; }
.ejemplos { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.2rem; }
.uso { display: flex; flex-direction: column; gap: .2rem; font-size: .8rem; color: var(--texto-2); min-width: 130px; }
.uso-barra { height: 6px; background: var(--hundido); border-radius: 3px; overflow: hidden; }
.uso-barra div { height: 100%; background: var(--s1); }
.barra-acciones { position: sticky; top: 0; z-index: 3; display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; padding: .6rem .8rem; background: var(--superficie); border: 1px solid var(--borde); border-radius: var(--radio); margin-bottom: .8rem; box-shadow: var(--sombra); font-size: .9rem; }
.barra-acciones > span { margin-right: auto; color: var(--texto-2); }
.barra-acciones label { display: flex; align-items: center; gap: .4rem; color: var(--texto-2); }
.candidatos { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: .6rem; }
.candidato { display: flex; gap: .6rem; padding: .75rem .85rem; }
.candidato.elegido { border-color: var(--acento); box-shadow: 0 0 0 1px var(--acento); }
.candidato.cargado { opacity: .6; }
.candidato-check { padding-top: .15rem; }
.candidato-check input { width: 20px; height: 20px; }
.candidato-cuerpo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .3rem; }
.candidato-cabeza { display: flex; justify-content: space-between; gap: .5rem; align-items: flex-start; }
.candidato-insignias { display: flex; flex-wrap: wrap; gap: .3rem; }
.candidato details { font-size: .84rem; color: var(--texto-2); }
.candidato details summary { cursor: pointer; }
.motivos { margin: .3rem 0 0; padding-left: 1.1rem; }
.candidato-links { display: flex; gap: .8rem; font-size: .84rem; color: var(--texto-2); flex-wrap: wrap; }
.aviso-linea { background: var(--amarillo-fondo); color: var(--amarillo); padding: .45rem .7rem; border-radius: 7px; font-size: .88rem; }
.aviso-config { margin-bottom: 1.2rem; }
.aviso-config p { margin: 0 0 .6rem; }
.aviso-config ol { margin: .4rem 0 0; padding-left: 1.2rem; }
.historial-busquedas { margin-top: 2rem; }
.historial-busquedas ul { list-style: none; padding: 0; margin: 0; }
.historial-busquedas li { display: flex; flex-wrap: wrap; gap: .5rem; align-items: baseline; padding: .3rem 0; border-top: 1px solid var(--borde); }

/* ---------- whatsapp y ajustes ---------- */
.cuentas-wa { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: .9rem; }
.cuenta-wa header { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.cuenta-wa header h2 { margin: 0; font-size: 1rem; }
.qr { background: #fff; padding: .7rem; border-radius: 9px; width: min(260px, 100%); margin: .6rem 0; }
.qr svg { width: 100%; height: auto; display: block; }
.ajuste { margin-bottom: .7rem; padding: 0; }
.ajuste > summary { cursor: pointer; padding: .9rem 1.1rem; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.ajuste > summary::after { content: '+'; color: var(--texto-3); font-size: 1.2rem; }
.ajuste[open] > summary::after { content: '−'; }
.ajuste > summary h2 { margin: 0; }
.ajuste-cuerpo { padding: 0 1.1rem 1.1rem; }
.lista-simple { list-style: none; padding: 0; margin: 0 0 .8rem; }
.lista-simple li { display: flex; justify-content: space-between; align-items: center; gap: .6rem; flex-wrap: wrap; padding: .5rem 0; border-top: 1px solid var(--borde); }
.lista-simple li:first-child { border-top: 0; }
.link-alta { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; background: var(--superficie-2); padding: .7rem; border-radius: var(--radio); }
.link-alta p { flex-basis: 100%; margin: 0; }
.link-alta input { flex: 1; }
.lista-mas { display: flex; flex-direction: column; gap: .5rem; }
.fila-mas { display: flex; align-items: center; gap: .8rem; color: var(--texto); font-weight: 550; text-decoration: none !important; text-align: left; cursor: pointer; width: 100%; font-size: 1rem; min-height: 54px; }

/* ---------- celular ---------- */
@media (max-width: 860px) {
  .marco { grid-template-columns: 1fr; }
  .lateral { display: none; }
  .abajo { display: grid; grid-template-columns: repeat(6, 1fr); position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
    background: var(--superficie); border-top: 1px solid var(--borde); padding: .25rem .2rem calc(.25rem + env(safe-area-inset-bottom)); }
  .abajo .item { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .66rem; color: var(--texto-3); padding: .3rem 0; text-decoration: none; min-height: 48px; justify-content: center; }
  .abajo .item.activo { color: var(--acento); }
  .pagina { padding: 1rem 1rem 6rem; }
  h1 { font-size: 1.35rem; }
  .ficha { grid-template-columns: 1fr; }
  .buscador { grid-template-columns: 1fr 1fr; }
  .buscador-texto { grid-column: 1 / -1; }
  .buscador .boton { grid-column: 1 / -1; }
  .columna { flex-basis: 84vw; }
  .tablero { margin: 0 -1rem; padding: 0 1rem 1rem; scroll-snap-type: x mandatory; }
  .historial li { grid-template-columns: 64px 1fr; }
  .historial time { grid-column: 2; }
  .contacto-fila { flex-direction: column; align-items: flex-start; gap: .4rem; }
  .contacto-fila-insignias { justify-content: flex-start; }
  .embudo-fila { grid-template-columns: 110px 1fr 60px; }
  .avisos { left: 1rem; right: 1rem; bottom: 5.5rem; }
  .aviso { max-width: none; }
  .modal { max-height: calc(100vh - 1rem); }
  .velo { padding: .5rem; align-items: end; }
}
@media (prefers-reduced-motion: no-preference) {
  .boton, .tarjeta-op, .chip, .lateral .item { transition: background-color .15s, border-color .15s, filter .15s; }
}
