/* Acceso de Evolvere: landing, login y pantallas de cuenta.
   Estilo shadcn: superficies planas, líneas de 1px, foco con anillo, todo a pantalla completa.
   El color fuerte sale del logo (los cuatro brazos): viaja por los haces y pinta las historias. */

:root {
    --ev-bg: #f7f8fb;
    --ev-card: #ffffff;
    --ev-fg: #141a2e;
    --ev-muted: #f2f4f8;
    --ev-muted-fg: #5f6882;
    --ev-border: #e3e6ee;
    --ev-border-strong: #d3d8e4;
    --ev-input: #d9dde8;
    --ev-brand: #5c6ca1;
    --ev-ring: rgba(92, 108, 161, .28);
    --ev-primary: #1f2847;
    --ev-primary-hover: #2c3760;
    --ev-primary-fg: #ffffff;
    --ev-danger: #c0262d;
    --ev-warn: #9a6700;
    --ev-warn-soft: #fdf7e8;
    --ev-ok: #12805c;
    --ev-c1: #0071bc;
    --ev-c2: #ed1660;
    --ev-c3: #00bcf1;
    --ev-c4: #7cbde9;
    --ev-shadow: 0 1px 2px rgba(20, 26, 46, .05), 0 8px 24px -12px rgba(20, 26, 46, .12);
    --ev-ease: cubic-bezier(.22, .61, .36, 1);
    --ev-spring: cubic-bezier(.34, 1.56, .64, 1);
    color-scheme: light;
}

html.dark {
    --ev-bg: #0b0e17;
    --ev-card: #111522;
    --ev-fg: #eef0f7;
    --ev-muted: #161b2b;
    --ev-muted-fg: #98a0b8;
    --ev-border: #232a3d;
    --ev-border-strong: #2f374d;
    --ev-input: #2c3449;
    --ev-brand: #9aa8de;
    --ev-ring: rgba(154, 168, 222, .3);
    --ev-primary: #eef0f7;
    --ev-primary-hover: #ffffff;
    --ev-primary-fg: #121729;
    --ev-danger: #f0736f;
    --ev-warn: #e8b64c;
    --ev-warn-soft: rgba(232, 182, 76, .1);
    --ev-ok: #4fd1a1;
    --ev-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px -14px rgba(0, 0, 0, .6);
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }

body.ev {
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--ev-bg);
    color: var(--ev-fg);
    font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
:where(.ev) a { color: inherit; }
.ev svg { flex-shrink: 0; }

/* ---------- Marca ---------- */
.ev-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 800;
    font-size: 16px;
    letter-spacing: -.01em;
    border-radius: 8px;
}
.ev-brand img {
    width: 32px;
    height: 32px;
    padding: 4px;
    border-radius: 9px;
    background: #fff;
    border: 1px solid var(--ev-border);
    transition: transform .3s var(--ev-ease);
}
.ev-brand:hover img { transform: rotate(-8deg) scale(1.06); }

/* ---------- Botones ---------- */
.ev-btn {
    --h: 44px;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: var(--h);
    padding: 0 18px;
    border-radius: 10px;
    border: 1px solid transparent;
    font: inherit;
    font-size: 14.5px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .15s ease, box-shadow .2s ease;
}
.ev-btn:active { transform: scale(.98); }
.ev-btn:focus-visible,
.ev-icon-btn:focus-visible,
.ev-link:focus-visible,
.ev-brand:focus-visible,
.ev-node:focus-visible,
.evs-play:focus-visible,
.evs-bar:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--ev-ring);
}
.ev-btn-primary {
    background: var(--ev-primary);
    color: var(--ev-primary-fg);
    box-shadow: 0 1px 2px rgba(20, 26, 46, .2);
}
.ev-btn-primary:hover { background: var(--ev-primary-hover); }
.ev-btn-outline {
    background: var(--ev-card);
    color: var(--ev-fg);
    border-color: var(--ev-border-strong);
}
.ev-btn-outline:hover { background: var(--ev-muted); }
.ev-btn-block { width: 100%; }
.ev-btn-xl {
    --h: 58px;
    padding: 0 34px;
    font-size: 17px;
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(20, 26, 46, .2), 0 14px 30px -14px rgba(31, 40, 71, .55);
}
html.dark .ev-btn-xl { box-shadow: 0 14px 30px -14px rgba(0, 0, 0, .8); }
.ev-btn .ev-arrow { transition: transform .25s var(--ev-ease); }
.ev-btn:hover .ev-arrow { transform: translateX(4px); }

.ev-btn .ev-spin {
    position: absolute;
    inset: 0;
    margin: auto;
    opacity: 0;
    animation: ev-spin .8s linear infinite;
}
.ev-btn.is-loading { pointer-events: none; }
.ev-btn.is-loading > :not(.ev-spin) { opacity: 0; }
.ev-btn.is-loading .ev-spin { opacity: 1; }
@keyframes ev-spin { to { transform: rotate(360deg); } }

.ev-icon-btn {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid var(--ev-border-strong);
    background: var(--ev-card);
    color: var(--ev-fg);
    cursor: pointer;
    transition: background-color .2s ease;
}
.ev-icon-btn:hover { background: var(--ev-muted); }
.ev-theme .ev-sun { display: none; }
html.dark .ev-theme .ev-sun { display: block; }
html.dark .ev-theme .ev-moon { display: none; }
.ev-theme svg { transition: transform .5s var(--ev-ease); }
.ev-theme:hover svg { transform: rotate(-20deg); }

::view-transition-old(root),
::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

.ev-link {
    font-size: 13px;
    font-weight: 700;
    color: var(--ev-brand);
    text-decoration: none;
    border-radius: 4px;
    background-image: linear-gradient(currentColor, currentColor);
    background-size: 0 1px;
    background-position: 0 100%;
    background-repeat: no-repeat;
    transition: background-size .3s var(--ev-ease), color .2s ease;
}
.ev-link:hover { background-size: 100% 1px; }

/* =========================================================
   Haces: las empresas convergen en Evolvere (solo landing)
   ========================================================= */
.ev-beam {
    --vw: 960; --vh: 300; --nw: 176; --nh: 72; --cs: 116; --cx: 480; --cy: 150;
    position: relative;
    width: 100%;
    aspect-ratio: var(--vw) / var(--vh);
}
.ev-beam .ev-beam-lines.is-m { display: none; }
.ev-beam svg.ev-beam-lines {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}
.ev-track {
    fill: none;
    stroke: var(--ev-border-strong);
    stroke-width: 1.25;
    stroke-dasharray: 100;
    stroke-dashoffset: 0;
    vector-effect: non-scaling-stroke;
    transition: stroke .3s ease;
}
.ev-track.is-hot { stroke: var(--c); }
.ev-pulse {
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-dasharray: 16 140;
    stroke-dashoffset: 16;
    opacity: 0;
    vector-effect: non-scaling-stroke;
}
.ev-pulse.is-running { animation: ev-pulse .68s cubic-bezier(.45, .05, .35, 1) both; }
@keyframes ev-pulse {
    0% { stroke-dashoffset: 16; opacity: 0; }
    12% { opacity: 1; }
    88% { opacity: 1; }
    100% { stroke-dashoffset: -100; opacity: 0; }
}

.ev-node {
    position: absolute;
    --nx: var(--x);
    --ny: var(--y);
    left: calc(var(--nx) / var(--vw) * 100%);
    top: calc(var(--ny) / var(--vh) * 100%);
    width: calc(var(--nw) / var(--vw) * 100%);
    aspect-ratio: var(--nw) / var(--nh);
    transform: translate(-50%, -50%);
    overflow: hidden;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid var(--ev-border);
    box-shadow: var(--ev-shadow);
    transition: transform .35s var(--ev-ease), border-color .25s ease, box-shadow .3s ease;
    z-index: 2;
}
html.dark .ev-node { border-color: #2f374d; }
.ev-node img {
    position: absolute;
    left: 9%;
    top: 14%;
    width: 82%;
    height: 72%;
    object-fit: contain;
    display: block;
    pointer-events: none;
}
.ev-node:hover,
.ev-node:focus-visible {
    transform: translate(-50%, -50%) translateY(-3px);
    border-color: var(--c);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 18%, transparent), var(--ev-shadow);
}

.ev-core {
    position: absolute;
    left: calc(var(--cx) / var(--vw) * 100%);
    top: calc(var(--cy) / var(--vh) * 100%);
    width: calc(var(--cs) / var(--vw) * 100%);
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    z-index: 3;
}
.ev-core-disc {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--ev-card);
    border: 1px dashed var(--ev-border-strong);
    transition: border-color .4s ease, box-shadow .5s ease;
}
.ev-core-disc img {
    width: 62%;
    height: 62%;
    object-fit: contain;
    opacity: 0;
    transform: scale(.4) rotate(-90deg);
    filter: blur(4px);
}
.ev-core-ripple {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    border: 1px solid var(--ev-brand);
    opacity: 0;
    pointer-events: none;
}

.js .ev-beam .ev-node { opacity: 0; transform: translate(-50%, -50%) scale(.85); filter: blur(4px); }
.js .ev-beam .ev-track { stroke-dashoffset: 100; }
.js .ev-beam .ev-core { opacity: 0; transform: translate(-50%, -50%) scale(.8); }

.ev-beam.is-in .ev-node {
    opacity: 1;
    filter: none;
    transform: translate(-50%, -50%);
    transition:
        opacity .3s ease calc(var(--i) * 40ms),
        filter .3s ease calc(var(--i) * 40ms),
        transform .4s var(--ev-ease) calc(var(--i) * 40ms),
        border-color .25s ease,
        box-shadow .3s ease;
}
.ev-beam.is-in .ev-node:hover,
.ev-beam.is-in .ev-node:focus-visible {
    transform: translate(-50%, -50%) translateY(-3px);
    transition: transform .35s var(--ev-ease), border-color .25s ease, box-shadow .3s ease;
}
.ev-beam.is-in .ev-core {
    opacity: 1;
    transform: translate(-50%, -50%);
    transition: opacity .3s ease, transform .4s var(--ev-ease);
}
.ev-beam.is-drawn .ev-track {
    stroke-dashoffset: 0;
    transition: stroke-dashoffset .45s cubic-bezier(.65, 0, .35, 1) calc(var(--i) * 40ms), stroke .3s ease;
}
.ev-beam.is-lit .ev-core-disc {
    border-style: solid;
    border-color: var(--ev-border);
    box-shadow: 0 0 0 7px color-mix(in srgb, var(--ev-brand) 9%, transparent), var(--ev-shadow);
}
.ev-beam.is-lit .ev-core-disc img {
    opacity: 1;
    transform: none;
    filter: none;
    transition: opacity .3s ease, transform .55s var(--ev-spring), filter .3s ease;
}
.ev-beam.is-lit .ev-core-ripple { animation: ev-ripple 1.5s var(--ev-ease) both; }
.ev-beam.is-lit .ev-core-ripple + .ev-core-ripple { animation-delay: .22s; }
@keyframes ev-ripple {
    0% { opacity: .55; transform: scale(1); }
    100% { opacity: 0; transform: scale(2.1); }
}
.ev-core.is-absorb .ev-core-disc { animation: ev-absorb .45s var(--ev-spring); }
@keyframes ev-absorb {
    0% { transform: scale(1); }
    40% { transform: scale(1.07); }
    100% { transform: scale(1); }
}

/* =========================================================
   Landing: a pantalla completa, sin barra ni marco
   ========================================================= */
.evl {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}
.evl-hero {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(28px, 5vh, 64px) clamp(16px, 4vw, 64px) 24px;
    text-align: center;
}
.evl-hero .ev-beam {
    width: min(1080px, 100%);
    margin-bottom: clamp(24px, 4vh, 44px);
}
.evl-title {
    margin: 0;
    font-size: clamp(2.6rem, 6.4vw, 5rem);
    line-height: 1;
    font-weight: 800;
    letter-spacing: -.04em;
}
.evl-title .ev-w { display: inline-block; }
.evl-title .ev-w-accent { color: var(--ev-brand); }
.evl-lead {
    max-width: 560px;
    margin: 18px auto 0;
    font-size: clamp(1.02rem, 1.6vw, 1.2rem);
    color: var(--ev-muted-fg);
    text-wrap: balance;
}
.evl-cta { margin-top: clamp(24px, 4vh, 36px); }
.evl-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px clamp(16px, 4vw, 40px);
    font-size: 13.5px;
    color: var(--ev-muted-fg);
}
.evl-foot-r { display: flex; align-items: center; gap: 14px; }
.evl-site {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 700;
    text-decoration: none;
    color: var(--ev-fg);
}
.evl-site svg { transition: transform .25s var(--ev-ease); }
.evl-site:hover svg { transform: translate(2px, -2px); }

/* El texto y el botón entran enseguida: el que está apurado no espera la animación. */
.js .ev-reveal { opacity: 0; transform: translateY(8px); filter: blur(5px); animation: ev-reveal .5s var(--ev-ease) both; animation-delay: calc(var(--d, 0) * 1ms); }
@keyframes ev-reveal {
    to { opacity: 1; transform: none; filter: none; }
}

@media (max-width: 640px) {
    .evl-hero { padding: 24px 16px 16px; }
    .evl-hero .ev-beam { width: min(420px, 100%); margin-bottom: 28px; }
    .ev-beam { --vw: 360; --vh: 330; --nw: 156; --nh: 64; --cs: 104; --cx: 180; --cy: 165; }
    .ev-beam .ev-beam-lines.is-d { display: none; }
    .ev-beam .ev-beam-lines.is-m { display: block; }
    .ev-beam .ev-node { --nx: var(--xm); --ny: var(--ym); border-radius: 12px; }
    .evl-title { font-size: clamp(2.5rem, 12vw, 3.2rem); }
    .evl-lead { max-width: 300px; }
    .evl-cta, .evl-cta .ev-btn { width: 100%; }
    .evl-foot { flex-direction: column-reverse; gap: 10px; padding-bottom: max(18px, env(safe-area-inset-bottom)); }
}

/* =========================================================
   Pantallas de acceso: formulario + historias a toda la altura
   ========================================================= */
.eva {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    min-height: 100vh;
    min-height: 100dvh;
}
.eva-side {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 0 clamp(20px, 4vw, 56px);
    background: var(--ev-card);
}
.eva-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 24px 0;
}
.eva-in {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 16px 0 32px;
}
.eva-in > * { animation: eva-up .35s var(--ev-ease) both; }
.eva-in > :nth-child(2) { animation-delay: .04s; }
.eva-in > :nth-child(3) { animation-delay: .08s; }
.eva-in > :nth-child(n+4) { animation-delay: .12s; }
@keyframes eva-up {
    0% { opacity: 0; transform: translateY(6px); }
    100% { opacity: 1; transform: none; }
}
.eva-bottom {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 20px 0 24px;
    font-size: 12.5px;
    color: var(--ev-muted-fg);
}
.eva-bottom a { text-decoration: none; font-weight: 700; }
.eva-bottom a:hover { color: var(--ev-fg); }

.eva-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 22px;
    font-size: 13px;
    font-weight: 700;
    color: var(--ev-muted-fg);
    text-decoration: none;
    border-radius: 6px;
    align-self: flex-start;
}
.eva-back svg { transition: transform .25s var(--ev-ease); }
.eva-back:hover { color: var(--ev-fg); }
.eva-back:hover svg { transform: translateX(-3px); }

.eva-tile {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    margin-bottom: 18px;
    border-radius: 13px;
    border: 1px solid var(--ev-border);
    background: var(--ev-muted);
    color: var(--ev-fg);
}
.eva-tile svg { animation: eva-tile .7s var(--ev-spring) .1s both; }
@keyframes eva-tile {
    0% { transform: scale(.5) rotate(-25deg); opacity: 0; }
    100% { transform: none; opacity: 1; }
}
.eva-title {
    margin: 0;
    font-size: clamp(26px, 2.6vw, 32px);
    line-height: 1.12;
    font-weight: 800;
    letter-spacing: -.03em;
}
.eva-hand { display: inline-block; transform-origin: 70% 80%; animation: eva-wave 1.4s ease .3s 1 both; }
@keyframes eva-wave {
    0%, 100% { transform: rotate(0); }
    15%, 45% { transform: rotate(16deg); }
    30%, 60% { transform: rotate(-8deg); }
}
.eva-sub {
    margin: 10px 0 28px;
    font-size: 15px;
    color: var(--ev-muted-fg);
}

.eva-fields { display: grid; gap: 16px; }
.eva-field { display: grid; gap: 7px; }
.eva-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.eva-field label { font-size: 13.5px; font-weight: 700; }
.eva-input { position: relative; display: flex; align-items: center; }
.eva-input > svg {
    position: absolute;
    left: 13px;
    color: var(--ev-muted-fg);
    pointer-events: none;
    transition: color .2s ease;
}
.eva-input input {
    width: 100%;
    height: 48px;
    padding: 0 12px 0 40px;
    border: 1px solid var(--ev-input);
    border-radius: 11px;
    background: var(--ev-card);
    color: var(--ev-fg);
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(20, 26, 46, .04);
    transition: border-color .2s ease, box-shadow .2s ease;
}
.eva-input input::placeholder { color: var(--ev-muted-fg); opacity: .7; font-weight: 500; }
.eva-input input:hover { border-color: var(--ev-border-strong); }
.eva-input input:focus { outline: none; border-color: var(--ev-brand); box-shadow: 0 0 0 3px var(--ev-ring); }
.eva-input:focus-within > svg { color: var(--ev-fg); }
.eva-input.has-eye input { padding-right: 46px; }
.eva-input input[aria-invalid="true"] { border-color: var(--ev-danger); }
.eva-input input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--ev-danger) 22%, transparent); }
.eva-input input:-webkit-autofill {
    -webkit-text-fill-color: var(--ev-fg);
    -webkit-box-shadow: 0 0 0 40px var(--ev-card) inset;
    caret-color: var(--ev-fg);
}
.eva-eye {
    position: absolute;
    right: 5px;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--ev-muted-fg);
    cursor: pointer;
}
.eva-eye:hover { color: var(--ev-fg); background: var(--ev-muted); }
.eva-eye:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ev-ring); }
.eva-eye .ev-eye-off { display: none; }
.eva-eye[aria-pressed="true"] .ev-eye-on { display: none; }
.eva-eye[aria-pressed="true"] .ev-eye-off { display: block; }

.eva-error {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--ev-danger);
    animation: eva-shake .4s ease;
}
@keyframes eva-shake {
    0%, 100% { transform: none; }
    25% { transform: translateX(-3px); }
    75% { transform: translateX(3px); }
}

.eva-check {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
}
.eva-check input {
    appearance: none;
    -webkit-appearance: none;
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    margin: 0;
    border: 1px solid var(--ev-border-strong);
    border-radius: 5px;
    background: var(--ev-card);
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease;
}
.eva-check input::after {
    content: "";
    width: 10px;
    height: 10px;
    background: var(--ev-primary-fg);
    clip-path: polygon(14% 52%, 0 66%, 38% 100%, 100% 24%, 86% 10%, 38% 72%);
    transform: scale(0);
    transition: transform .2s var(--ev-spring);
}
.eva-check input:checked { background: var(--ev-primary); border-color: var(--ev-primary); }
.eva-check input:checked::after { transform: scale(1); }
.eva-check input:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ev-ring); }

.eva-actions { display: grid; gap: 12px; margin-top: 22px; }
.eva-actions .ev-btn { --h: 50px; font-size: 15.5px; border-radius: 12px; }
.eva-alt { margin: 22px 0 0; text-align: center; font-size: 13.5px; color: var(--ev-muted-fg); }

.eva-alert {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 18px;
    padding: 11px 12px;
    border: 1px solid var(--ev-border);
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 600;
}
.eva-alert svg { margin-top: 1px; }
.eva-alert-warn { color: var(--ev-warn); background: var(--ev-warn-soft); border-color: color-mix(in srgb, var(--ev-warn) 30%, transparent); }
.eva-alert-ok { color: var(--ev-ok); border-color: color-mix(in srgb, var(--ev-ok) 30%, transparent); }

.eva-data {
    margin: 0 0 20px;
    padding: 14px 16px;
    border: 1px solid var(--ev-border);
    border-radius: 12px;
    background: var(--ev-muted);
}
.eva-data-title { margin: 0 0 10px; font-size: 13px; font-weight: 800; }
.eva-data dl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin: 0; }
.eva-data dl > div { min-width: 0; }
.eva-data .is-wide { grid-column: 1 / -1; }
.eva-data dt { font-size: 12px; color: var(--ev-muted-fg); font-weight: 600; }
.eva-data dd { margin: 0; font-size: 13.5px; font-weight: 700; overflow-wrap: anywhere; }

.eva-meter { display: grid; gap: 8px; }
.eva-meter-bars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.eva-meter-bars i { height: 4px; border-radius: 99px; background: var(--ev-border); transition: background-color .3s ease; }
.eva-meter[data-score="1"] .eva-meter-bars i:nth-child(-n+1) { background: var(--ev-danger); }
.eva-meter[data-score="2"] .eva-meter-bars i:nth-child(-n+2) { background: var(--ev-warn); }
.eva-meter[data-score="3"] .eva-meter-bars i:nth-child(-n+3) { background: var(--ev-c1); }
.eva-meter[data-score="4"] .eva-meter-bars i:nth-child(-n+4) { background: var(--ev-ok); }
.eva-meter-label { font-size: 12.5px; font-weight: 700; color: var(--ev-muted-fg); }
.eva-rules { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.eva-rules li { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--ev-muted-fg); transition: color .2s ease; }
.eva-rules li svg { opacity: .45; transition: opacity .2s ease, transform .3s var(--ev-spring); }
.eva-rules li.is-ok { color: var(--ev-ok); }
.eva-rules li.is-ok svg { opacity: 1; transform: scale(1.1); }

/* =========================================================
   Historias: lo que se hace en la plataforma, escena por escena
   ========================================================= */
.evs {
    --sc: #0b5fa5;
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 28px clamp(24px, 3.4vw, 52px) 26px;
    background: var(--sc);
    color: #fff;
    overflow: hidden;
    transition: background-color .6s ease;
    isolation: isolate;
}
.evs-bars { position: relative; z-index: 3; display: flex; gap: 6px; }
.evs-bar {
    position: relative;
    flex: 1;
    height: 4px;
    padding: 0;
    border: 0;
    border-radius: 99px;
    background: rgba(255, 255, 255, .28);
    overflow: hidden;
    cursor: pointer;
}
.evs-bar::before { content: ""; position: absolute; inset: -8px 0; }
.evs-bar i { position: absolute; inset: 0; background: #fff; transform-origin: left; transform: scaleX(0); }
.evs-bar i.is-full { transform: scaleX(1); }
.evs-bar i.is-run { animation: evs-fill var(--dur, 5000ms) linear both; }
@keyframes evs-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.evs.is-paused .evs-bar i.is-run,
.evs.is-paused .evs-scene.is-on *,
.evs.is-hidden-tab .evs-bar i.is-run { animation-play-state: paused; }

.evs-stage { position: relative; flex: 1; min-height: 0; margin: 36px 0 20px; }
.evs-scene {
    position: absolute;
    inset: 0;
    display: none;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 28px;
}
.evs-scene.is-on, .evs-scene.is-out { display: grid; }
.evs-scene.is-out { pointer-events: none; animation: evs-out .35s ease both; }
.evs-scene.is-out.to-r { animation-name: evs-out-r; }
@keyframes evs-out { to { opacity: 0; transform: translateX(-36px); } }
@keyframes evs-out-r { to { opacity: 0; transform: translateX(36px); } }
.evs-scene.is-on.from-r { animation: evs-in-r .45s var(--ev-ease) both; }
.evs-scene.is-on.from-l { animation: evs-in-l .45s var(--ev-ease) both; }
@keyframes evs-in-r { from { opacity: 0; transform: translateX(40px); } }
@keyframes evs-in-l { from { opacity: 0; transform: translateX(-40px); } }

.evs-k {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .16);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.evs-t {
    margin: 14px 0 0;
    max-width: 560px;
    font-size: clamp(28px, 3vw, 40px);
    line-height: 1.07;
    font-weight: 800;
    letter-spacing: -.03em;
    text-wrap: balance;
}
.evs-d { margin: 12px 0 0; max-width: 500px; font-size: 16px; color: rgba(255, 255, 255, .86); }
.evs-copy > * { animation: evs-rise .55s var(--ev-ease) both; }
.evs-copy > :nth-child(2) { animation-delay: .07s; }
.evs-copy > :nth-child(3) { animation-delay: .14s; }
@keyframes evs-rise { from { opacity: 0; transform: translateY(14px); filter: blur(6px); } }
.evs-art {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 0;
    animation: evs-pop .7s var(--ev-ease) .18s both;
}
@keyframes evs-pop { from { opacity: 0; transform: translateY(18px) scale(.96); } }

.evs-nav {
    position: absolute;
    top: 70px;
    bottom: 80px;
    z-index: 2;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
}
.evs-nav.prev { left: 0; width: 33%; }
.evs-nav.next { right: 0; width: 67%; }
.evs-nav span {
    position: absolute;
    top: 50%;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-top: -22px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .16);
    opacity: 0;
    transition: opacity .25s ease, transform .25s var(--ev-ease);
}
.evs-nav.prev span { left: 14px; transform: translateX(6px); }
.evs-nav.next span { right: 14px; transform: translateX(-6px); }
.evs-nav:hover span, .evs-nav:focus-visible span { opacity: 1; transform: none; }
.evs-nav:focus-visible { outline: none; }
.evs-nav:disabled { cursor: default; }
.evs-nav:disabled span { display: none; }

.evs-foot {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
    font-weight: 700;
    color: rgba(255, 255, 255, .85);
}
.evs-brand { display: inline-flex; align-items: center; gap: 9px; }
.evs-brand img { width: 26px; height: 26px; padding: 3px; border-radius: 8px; background: #fff; }
.evs-play {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 34px;
    padding: 0 14px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .16);
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color .2s ease;
}
.evs-play:hover { background: rgba(255, 255, 255, .26); }
.evs-play .evs-i-play, .evs.is-paused .evs-play .evs-i-pause, .evs.is-done .evs-play .evs-i-pause { display: none; }
.evs.is-paused .evs-play .evs-i-play, .evs.is-done .evs-play .evs-i-play { display: block; }

/* Piezas blancas de las escenas */
.evs-paper {
    position: relative;
    width: min(380px, 100%);
    padding: 18px 20px 20px;
    border-radius: 18px;
    background: #fff;
    color: #141a2e;
    box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .5);
}
.evs-paper-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.evs-paper-h b { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--sc); }
.evs-paper-h span { font-size: 12px; font-weight: 700; color: #6b7390; font-variant-numeric: tabular-nums; }
.evs-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 999px;
    background: #fff;
    color: var(--sc);
    font-size: 14px;
    font-weight: 800;
    box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .45);
    animation: evs-chip .5s var(--ev-spring) both;
    animation-delay: var(--at, 2s);
}
@keyframes evs-chip { from { opacity: 0; transform: translateY(10px) scale(.85); } }
.evs-art-stack { display: grid; justify-items: center; gap: 20px; width: 100%; }

/* Compras: los pasos de la orden se van completando */
.evs-steps { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.evs-steps li { display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid #e8ebf2; font-size: 14px; font-weight: 700; }
.evs-steps li:first-child { border-top: 0; }
.evs-steps li em { font-style: normal; font-size: 12px; font-weight: 600; color: #6b7390; }
.evs-dot {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    border: 2px solid #d6dbe7;
    color: #fff;
    animation: evs-check .35s var(--ev-spring) both;
    animation-delay: calc(.7s + var(--n) * .42s);
}
.evs-dot svg { opacity: 0; animation: evs-fade .2s ease both; animation-delay: calc(.8s + var(--n) * .42s); }
@keyframes evs-check { to { background: var(--sc); border-color: var(--sc); transform: scale(1); } from { transform: scale(.7); } }
@keyframes evs-fade { to { opacity: 1; } }

/* Contabilidad: la factura se controla fila por fila y recibe el sello */
.evs-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid #e8ebf2; font-size: 14px; font-weight: 600; }
.evs-row > span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: #e8ebf2; color: transparent; animation: evs-ok .3s ease both; animation-delay: calc(.7s + var(--n) * .32s); }
@keyframes evs-ok { to { background: #12805c; color: #fff; } }
.evs-scan { position: absolute; left: 0; right: 0; top: 0; height: 3px; border-radius: 3px; background: var(--sc); box-shadow: 0 0 16px 3px color-mix(in srgb, var(--sc) 60%, transparent); animation: evs-scan 1.3s ease-in-out .35s both; }
@keyframes evs-scan { 0% { top: 6%; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { top: 92%; opacity: 0; } }
.evs-stamp {
    position: absolute;
    right: 14px;
    bottom: -16px;
    padding: 7px 13px;
    border-radius: 10px;
    border: 3px solid #12805c;
    background: #fff;
    color: #12805c;
    font-size: 12.5px;
    font-weight: 900;
    letter-spacing: .05em;
    transform: rotate(-5deg);
    animation: evs-stamp .45s var(--ev-spring) both 2.5s;
}
@keyframes evs-stamp { from { opacity: 0; transform: rotate(-5deg) scale(1.8); } }

/* Flota: el recorrido se dibuja y el vehículo lo sigue */
.evs-map { width: min(520px, 100%); overflow: visible; }
.evs-route { stroke-dasharray: 100; animation: evs-draw 2.4s var(--ev-ease) .4s both; }
@keyframes evs-draw { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }
.evs-stop { transform-box: fill-box; transform-origin: center; animation: evs-stop .4s var(--ev-spring) both; animation-delay: calc(.6s + var(--n) * .45s); }
@keyframes evs-stop { from { opacity: 0; transform: scale(0); } }
.evs-truck { offset-path: path('M40 180 C 110 180, 100 70, 170 80 S 260 170, 300 120 S 360 40, 390 50'); offset-rotate: 0deg; animation: evs-truck 2.4s var(--ev-ease) .4s both; }
@keyframes evs-truck { from { offset-distance: 0%; } to { offset-distance: 82%; } }

/* Eladis: pregunta, escribe y responde con un gráfico que crece */
.evs-chat { display: grid; gap: 10px; width: min(400px, 100%); }
.evs-msg { max-width: 86%; padding: 11px 14px; border-radius: 16px; font-size: 14.5px; font-weight: 600; line-height: 1.4; box-shadow: 0 18px 40px -20px rgba(0, 0, 0, .5); }
.evs-msg.me { justify-self: end; background: rgba(255, 255, 255, .2); color: #fff; border-bottom-right-radius: 5px; animation: evs-rise .4s var(--ev-ease) .5s both; }
.evs-msg.bot { justify-self: start; background: #fff; color: #141a2e; border-bottom-left-radius: 5px; animation: evs-rise .45s var(--ev-ease) 1.9s both; }
.evs-typing { justify-self: start; display: inline-flex; gap: 4px; padding: 12px 14px; border-radius: 16px; background: #fff; animation: evs-typing-life 1.9s ease both; }
.evs-typing i { width: 7px; height: 7px; border-radius: 99px; background: #9aa3bd; animation: evs-bounce .9s ease-in-out infinite; }
.evs-typing i:nth-child(2) { animation-delay: .15s; }
.evs-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes evs-bounce { 0%, 60%, 100% { transform: none; } 30% { transform: translateY(-4px); } }
@keyframes evs-typing-life {
    0%, 40% { opacity: 0; transform: translateY(8px); }
    50%, 92% { opacity: 1; transform: none; }
    100% { opacity: 0; height: 0; padding: 0; margin: -10px 0 0; }
}
.evs-msg.bot b { color: var(--sc); }
.evs-bars-chart { display: flex; align-items: flex-end; gap: 7px; height: 64px; margin-top: 10px; }
.evs-bars-chart i { flex: 1; height: var(--h); border-radius: 5px 5px 2px 2px; background: color-mix(in srgb, var(--sc) 30%, #fff); transform-origin: bottom; animation: evs-grow .6s var(--ev-ease) both; animation-delay: calc(2.2s + var(--n) * 70ms); }
.evs-bars-chart i:last-child { background: var(--sc); }
@keyframes evs-grow { from { transform: scaleY(0); } }

/* Cierre: el logo se arma y queda el mensaje */
.evs-scene.evs-end { flex-direction: column; justify-content: center; }
.evs-scene.evs-end.is-on, .evs-scene.evs-end.is-out { display: flex; }
.evs-end-logo {
    display: grid;
    place-items: center;
    width: 96px;
    height: 96px;
    padding: 16px;
    border-radius: 26px;
    background: #fff;
    box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .55);
    animation: evs-logo .9s var(--ev-spring) both;
}
.evs-end-logo img { width: 100%; height: 100%; object-fit: contain; animation: evs-logo-spin 1s var(--ev-ease) .1s both; }
@keyframes evs-logo { from { opacity: 0; transform: scale(.4); } }
@keyframes evs-logo-spin { from { transform: rotate(-180deg) scale(.5); opacity: 0; } }
.evs-end .evs-t { font-size: clamp(32px, 3.6vw, 46px); margin-top: 26px; }
.evs-end .evs-t, .evs-end .evs-d { animation: evs-rise .6s var(--ev-ease) both .35s; }
.evs-end .evs-d { animation-delay: .45s; }
.evs-logos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.evs-logos span {
    position: relative;
    width: 132px;
    height: 54px;
    overflow: hidden;
    border-radius: 11px;
    background: #fff;
    animation: evs-chip .45s var(--ev-spring) both;
    animation-delay: calc(.7s + var(--n) * 90ms);
}
.evs-logos img { position: absolute; inset: 9px 14px; width: calc(100% - 28px); height: calc(100% - 18px); object-fit: contain; }

/* Toasts (al estilo Sonner) */
.ev-toasts {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 100;
    display: grid;
    gap: 8px;
    width: min(360px, calc(100vw - 32px));
}
.ev-toast {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 13px 14px;
    border-radius: 12px;
    border: 1px solid var(--ev-border);
    background: var(--ev-card);
    color: var(--ev-fg);
    box-shadow: 0 12px 32px -12px rgba(20, 26, 46, .35);
    font-size: 13.5px;
    font-weight: 600;
    animation: ev-toast-in .45s var(--ev-ease) both;
}
.ev-toast.is-out { animation: ev-toast-out .3s ease both; }
.ev-toast[data-type="success"] svg { color: var(--ev-ok); }
.ev-toast[data-type="warning"] svg { color: var(--ev-warn); }
.ev-toast[data-type="error"] svg { color: var(--ev-danger); }
@keyframes ev-toast-in { 0% { opacity: 0; transform: translateY(12px) scale(.97); } }
@keyframes ev-toast-out { to { opacity: 0; transform: translateY(8px) scale(.97); } }

/* ---------- Tablet y celular: las historias arriba, el ingreso como hoja ---------- */
@media (max-width: 1023px) {
    .eva { display: flex; flex-direction: column-reverse; }
    .eva-side {
        position: relative;
        z-index: 2;
        flex: 1;
        margin-top: -22px;
        border-radius: 22px 22px 0 0;
        box-shadow: 0 -10px 30px -18px rgba(0, 0, 0, .35);
    }
    .eva-top { padding: 18px 0 4px; }
    .eva-in { justify-content: flex-start; padding-top: 18px; }
    .evs { height: 248px; padding: 18px 20px 40px; }
    .evs-stage { margin: 20px 0 0; }
    .evs-scene { grid-template-rows: auto; gap: 0; }
    .evs-art, .evs-d, .evs-logos, .evs-end-logo { display: none; }
    .evs-t { font-size: clamp(24px, 6.4vw, 32px); }
    .evs-end .evs-t { margin-top: 0; font-size: clamp(26px, 7vw, 34px); }
    .evs-foot { position: absolute; left: 20px; right: 20px; bottom: 34px; justify-content: flex-end; }
    .evs-brand { display: none; }
    .evs-nav { top: 40px; bottom: 30px; }
    .evs-nav span { display: none; }
}
@media (min-width: 641px) and (max-width: 1023px) and (min-height: 760px) {
    .evs { height: min(470px, 52vh); }
    .evs-art { display: grid; transform: scale(.78); transform-origin: top center; margin-top: -6px; }
    .evs-scene { grid-template-rows: auto minmax(0, 1fr); gap: 14px; }
}
@media (max-width: 640px) {
    .eva-side { padding: 0 18px; }
    .eva-bottom { flex-direction: column; align-items: center; gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        transition-delay: 0s !important;
        animation-delay: 0s !important;
    }
    .evs-bar i.is-run { animation: none !important; transform: scaleX(1); }
}

/* Logos: transparentes en claro, versión aclarada en oscuro (sin el recuadro blanco del PNG) */
.ev-lg-d { display: none !important; }
html.dark .ev-lg-l { display: none !important; }
html.dark .ev-lg-d { display: block !important; }
html.dark .ev-node { background: var(--ev-card); }
html.dark .ev-brand img { background: transparent; border-color: transparent; }
.evs-logos span { background: rgba(255, 255, 255, .08); }
.evs-brand img, .evs-end-logo { background: rgba(255, 255, 255, .1); }
