/* ============================================================
   AEX · piezas propias del demo (red, torre, última milla, reclamos, propuesta)
   ============================================================ */
:root{--disp:"Archivo","Inter",sans-serif;--aex:#4A9FDC}
.g>*,.card,.lienzo-chart{min-width:0}
.wipe{overflow:hidden}
.hub-cab h2,.mod h3,.kpi__val,.pblo b,.hallazgo .num{font-family:var(--disp)}
.hub-cab h2{letter-spacing:-.01em;text-transform:none}
.hub-cab h2 span{color:var(--aex)}
.gate__bg i{background:linear-gradient(90deg,transparent,var(--aex) 40%,var(--aex) 60%,transparent)!important}
.gate__t{text-transform:none}

/* mapa de la red */
.mapa-aex .ruta-aex{fill:none;stroke:var(--rojo);stroke-width:3.5;stroke-linecap:round;stroke-dasharray:1400;stroke-dashoffset:1400;opacity:.55;animation:trazo 1.8s cubic-bezier(.5,0,.2,1) forwards}
@keyframes trazo{to{stroke-dashoffset:0}}
.mapa-aex .pt--hub .nucleo{stroke:var(--aex);stroke-width:5}
.mapa-aex .pt--hub .halo{animation:latido 1.8s ease-out infinite;transform-origin:center;transform-box:fill-box}
@keyframes latido{0%{transform:scale(.6);opacity:.45}100%{transform:scale(1.6);opacity:0}}
.mapa-aex .et{paint-order:stroke;stroke:#fff;stroke-width:7px}
.camioncito{filter:drop-shadow(0 3px 4px rgba(0,0,0,.25))}

/* las 37 ciudades */
.ciudades{display:flex;flex-wrap:wrap;gap:8px}
.ciu{display:inline-flex;align-items:center;gap:8px;padding:6px 6px 6px 12px;border-radius:999px;font-size:12px;font-weight:600;background:var(--fondo-2);color:var(--tinta-45);border:1px solid var(--linea);opacity:0;animation:ciuIn .4s ease forwards;animation-delay:calc(var(--i)*25ms)}
.ciu b{min-width:22px;height:22px;border-radius:50%;display:grid;place-items:center;background:#fff;color:var(--ambar);font-size:11px;border:1px solid var(--linea)}
.ciu--si{background:#E8F3FB;color:#0F4F82;border-color:#BFDDF3}
@keyframes ciuIn{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}

/* auditoría */
.audit{display:flex;flex-direction:column;gap:8px}
.audit__it{display:flex;gap:10px;align-items:flex-start;padding:10px 12px;border-radius:10px;background:var(--fondo);border:1px solid var(--linea)}
.audit__it i{flex:0 0 24px;height:24px;border-radius:50%;display:grid;place-items:center;font-style:normal;font-weight:800;font-size:12px;color:#fff;background:var(--verde)}
.audit__it.no i{background:var(--ambar)}
.audit__it b{display:flex;justify-content:space-between;gap:8px;font-size:12.5px}
.audit__it b small{font-weight:700;color:var(--rojo);white-space:nowrap}
.audit__it span{display:block;font-size:11.5px;color:var(--tinta-45);line-height:1.45}

/* flujo en vivo */
.flujo-aex{margin:16px 0;background:var(--papel);border:1px solid var(--linea);border-radius:var(--r-l);padding:14px 16px 12px;box-shadow:var(--sombra-1);overflow:hidden}
.flujo-aex svg{width:100%;height:auto;display:block}
.fl-base{fill:none;stroke:var(--linea-fuerte);stroke-width:4;stroke-linecap:round}
.fl-run{fill:none;stroke:var(--aex);stroke-width:4;stroke-linecap:round;stroke-dasharray:12 10;animation:fluir 1.2s linear infinite}
@keyframes fluir{to{stroke-dashoffset:-22}}
.fl-n circle{fill:#fff;stroke:var(--rojo);stroke-width:3}
.fl-n{opacity:0;animation:ciuIn .5s ease forwards;animation-delay:calc(var(--i)*.15s)}
.fl-k{font:700 15px var(--sans);fill:var(--rojo);text-anchor:middle}
.fl-t{font:700 16px var(--sans);fill:var(--tinta);text-anchor:middle}
.fl-s{font:500 13px var(--sans);fill:var(--tinta-45);text-anchor:middle}
.fl-caja rect{fill:#C79A66;stroke:#8A6234;stroke-width:1.5}
.fl-caja path{stroke:var(--rojo);stroke-width:2.5;fill:none}
.flujo-aex__pie{font-size:12px;color:var(--tinta-70);text-align:center;margin-top:4px}

/* SLA por zona */
.zonas-sla{display:flex;flex-direction:column;gap:2px}
.zsla{display:block;width:100%;text-align:left;padding:4px 8px;border-radius:8px;border:1px solid transparent}
.zsla:hover{background:var(--fondo)}
.zsla.on{background:var(--rojo-50);border-color:var(--rojo-100)}
tr.fila-alerta>td{background:#FFF6EC}
.t small{color:var(--tinta-45);font-size:11px}

/* ruta */
.ruta-svg{width:100%;height:auto;display:block;margin-top:12px}
.rs-fondo{fill:#EEF3F8}
.rs-calle{fill:none;stroke:#fff;stroke-width:9}
.rs-ruta{fill:none;stroke:var(--aex);stroke-width:3.5;stroke-dasharray:1600;stroke-dashoffset:1600;animation:trazo 2.4s ease forwards}
.rs-cepar rect{fill:var(--negro)}
.rs-cepar text{font:700 8px var(--sans);fill:#fff;text-anchor:middle}
.rs-p circle{fill:#fff;stroke:var(--tinta-25);stroke-width:2}
.rs-p text{font:700 9px var(--sans);text-anchor:middle;fill:var(--tinta-45)}
.rs-p.ok circle{fill:var(--rojo);stroke:var(--rojo)}.rs-p.ok text{fill:#fff}
.rs-p.ko circle{fill:#fff;stroke:var(--ambar);stroke-width:3;stroke-dasharray:3 2}
.rs-moto circle{fill:var(--negro)}.rs-moto path{stroke:var(--aex);stroke-width:2.4}

/* prueba de entrega */
.pod{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.pod>div{background:var(--fondo);border:1px solid var(--linea);border-radius:10px;padding:10px}
.pod svg{width:100%;height:auto;display:block;border-radius:8px}
.pod span{display:block;font-size:11.5px;color:var(--tinta-45);margin-top:6px}
.pod b{font-size:12.5px}
.pod-caja{animation:caer .8s cubic-bezier(.3,1.4,.5,1) both}
@keyframes caer{from{transform:translateY(-40px);opacity:0}to{transform:none;opacity:1}}
.firma{fill:none;stroke:var(--negro);stroke-width:2.4;stroke-linecap:round;stroke-dasharray:400;stroke-dashoffset:400;animation:trazo 2.2s ease .4s forwards}
.pod__firma svg{background:#fff}

/* red */
.ficha-punto{display:grid;gap:8px}
.ficha-punto div{display:flex;justify-content:space-between;gap:12px;font-size:12.5px;border-bottom:1px dashed var(--linea);padding-bottom:6px}
.ficha-punto b{color:var(--tinta-45);font-weight:600}
.ficha-punto span{text-align:right}
.buscador--ciudad{margin-bottom:8px}
.ciu-r{display:flex;flex-direction:column;gap:6px;min-height:60px}
.ciu-it{padding:9px 12px;border-radius:10px;background:var(--rojo-50);border:1px solid var(--rojo-100);animation:ciuIn .3s ease}
.ciu-it b{display:block;font-size:12.5px;color:#0F4F82}
.ciu-it span{font-size:11.5px;color:var(--tinta-70)}
.ciu-vacio{font-size:12px;color:var(--tinta-45)}
.locker{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;background:var(--negro);padding:10px;border-radius:12px}
.lk{position:relative;background:#22364A;border-radius:6px;min-height:calc(var(--h)*1.6px + 40px);padding:8px;overflow:hidden;display:flex;flex-direction:column;justify-content:flex-end;color:#fff}
.lk__fill{position:absolute;left:0;right:0;bottom:0;height:0;background:linear-gradient(0deg,rgba(74,159,220,.55),rgba(74,159,220,.25));animation:llenar 1.4s ease forwards}
@keyframes llenar{to{height:calc(var(--o)*100%)}}
.lk b,.lk span{position:relative;font-size:11px}
.lk span{color:rgba(255,255,255,.8)}

/* panel del vendedor */
.shopify{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.sh-antes,.sh-despues{border-radius:12px;padding:12px;display:flex;flex-direction:column;gap:7px;font-size:12px}
.sh-antes{background:var(--fondo);border:1px solid var(--linea)}
.sh-antes span{display:flex;gap:8px;align-items:center}
.sh-antes i{flex:0 0 20px;height:20px;border-radius:50%;background:var(--ambar);color:#fff;font-style:normal;font-weight:700;font-size:11px;display:grid;place-items:center}
.sh-scopes{display:flex;flex-wrap:wrap;gap:4px;margin-top:4px}
.sh-scopes code{font-size:9.5px;background:#fff;border:1px solid var(--linea);padding:2px 5px;border-radius:4px;word-break:break-all}
.sh-despues{background:var(--rojo-50);border:1px solid var(--rojo-100);justify-content:center;align-items:flex-start}
.sh-estado{color:var(--tinta-70)}
.ctl-tienda .btn{font-size:12px}

/* reclamos: WhatsApp */
.wa{display:flex;flex-direction:column;gap:8px;background:#ECE5DD;border-radius:12px;padding:14px;min-height:300px}
.wa__m{max-width:82%;padding:9px 12px;border-radius:12px;font-size:12.5px;line-height:1.45;opacity:0;animation:ciuIn .4s ease forwards;animation-delay:calc(var(--i)*.55s);box-shadow:0 1px 1px rgba(0,0,0,.08)}
.wa__m--yo{align-self:flex-end;background:#DCF8C6}
.wa__m--bot{align-self:flex-start;background:#fff}

/* propuesta modular */
.modular-reglas{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}
.modular-reglas div{background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.18);border-radius:12px;padding:12px}
.modular-reglas b{display:block;color:#fff;font-size:13px;margin-bottom:4px}
.modular-reglas span{font-size:12px;color:rgba(255,255,255,.85);line-height:1.5}
.modulos-precio{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:14px;margin:16px 0}
.mp{background:var(--papel);border:1px solid var(--linea);border-radius:var(--r-l);padding:18px;box-shadow:var(--sombra-1);display:flex;flex-direction:column;gap:6px;opacity:0;animation:ciuIn .5s ease forwards;animation-delay:calc(var(--i)*.09s);border-top:4px solid var(--aex)}
.mp__cab{display:flex;gap:12px;align-items:center}
.mp__ico{flex:0 0 42px;height:42px;border-radius:12px;background:var(--rojo-50);color:var(--rojo);display:grid;place-items:center}
.mp__ico svg{width:22px;height:22px}
.mp h3{margin:0;font-family:var(--disp);font-size:19px}
.mp__cab span{font-size:11px;color:var(--tinta-45)}
.mp p{margin:4px 0 0;font-size:12.5px;color:var(--tinta-70);line-height:1.5;flex:1}
.mp .pblo b{font-size:24px}
.mp .pblo em{font-style:normal;font-size:10.5px;color:var(--tinta-45)}
.mp__ver{align-self:center}
.cta-modulo{display:flex;gap:18px;align-items:center;justify-content:space-between;background:var(--rojo);color:#fff;border-radius:var(--r-l);padding:20px 22px;margin-bottom:10px;flex-wrap:wrap}
.cta-modulo h3{margin:0 0 4px;font-family:var(--disp);font-size:22px}
.cta-modulo p{margin:0;font-size:13px;max-width:720px;line-height:1.55}
.cta-modulo .btn--rojo{background:#fff;color:var(--rojo);border-color:#fff;font-weight:700}

@media (max-width:1180px){.modular-reglas{grid-template-columns:repeat(2,1fr)}}
@media (max-width:820px){.shopify,.pod{grid-template-columns:1fr}.modular-reglas{grid-template-columns:1fr}.locker{grid-template-columns:repeat(2,1fr)}.fl-s{display:none}}
@media (prefers-reduced-motion:reduce){.ciu,.fl-n,.mp,.wa__m{opacity:1;animation:none}.ruta-aex,.rs-ruta,.firma{stroke-dashoffset:0;animation:none}.fl-run,.lk__fill{animation:none}.lk__fill{height:calc(var(--o)*100%)}}
.card--rojo{background:linear-gradient(135deg,#1B74B8 0%,#0F4F82 100%)!important;border-color:#0F4F82!important}
.wow-kin{font-size:clamp(40px,4.6vw,76px)!important;letter-spacing:0}
@media (max-width:820px){.wow-kin{font-size:clamp(30px,9vw,46px)!important}}
.card--rojo .tabla-env .t{font-size:12px}
.kpi .kpi__spark{position:absolute;right:14px;top:14px;width:84px;height:28px;opacity:.85}
.mp .pblo em{display:block;margin-top:4px;line-height:1.4}
.card--negro+.g,.card--negro+.ctl{margin-top:16px}
.card .mapa-aex{max-height:560px;min-height:0}
.card .mapa-aex svg{max-height:500px}
.mapa-aex .et{font-size:30px;font-weight:700}
@media(max-width:700px){.mapa-aex .et{font-size:40px}}
