/* =====================================================================
   EVA, la asistente de Effic (EvaAsistente.razor + assets/js/Eva3D.js)
   Mismo lenguaje que el Dashboard: tarjetas blancas de radio 16, borde
   #eef0f4, azul de marca #4088BD y los degradados de las tarjetas de
   arranque. z-index por debajo de 1001 (popups de Radzen) y de los
   modales propios (99990): el vídeo que abre EVA sale por encima.
   Excepción: la presentación y el recorrido (30000+), que tapan cabecera y
   menú porque mientras duran no se toca la página.
   ===================================================================== */

/* ---------- Contenedor flotante ---------- */
.eva-asis {
    position: fixed;
    right: 22px;
    bottom: 18px;
    z-index: 990;
    font-family: 'Poppins', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    pointer-events: none;
}
.eva-asis > * { pointer-events: auto; }

/* ---------- EVA de cuerpo entero (lanzador cerrada; junto al chat abierta) ---------- */
.eva-escenario {
    position: relative;
    width: 116px;
    height: 156px;
    cursor: pointer;
    outline: none;
    border-radius: 24px;
    transition: transform .18s ease;
    animation: evaEntra .5s cubic-bezier(.2, .9, .3, 1.3) both;
}
.eva-asis:not(.eva-asis--abierto) .eva-escenario:hover { transform: translateY(-3px) scale(1.03); }
.eva-escenario:focus-visible { outline: 3px solid rgba(64, 136, 189, .45); outline-offset: 2px; }
.eva-escenario__img {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.eva-escenario__img img { width: 100%; height: 100%; object-fit: contain; object-position: center bottom; }
.eva-escenario__3d { position: absolute; inset: 0; }
.eva-escenario__3d canvas.eva-3d { width: 100%; height: 100%; display: block; }
/* En cuanto el 3D está listo, fuera la foto */
.eva-escenario:has(.eva-3d--listo) .eva-escenario__img { display: none; }

/* Abierta: de pie a la izquierda de la ventana, apoyada en su borde */
.eva-asis--abierto .eva-escenario {
    position: absolute;
    right: calc(100% - 38px);
    bottom: -8px;
    width: 210px;
    height: 280px;
    z-index: 2;
    cursor: default;
    animation: none;
}
/* Se mete 38px en la ventana: en esa franja el ratón pasa a la ventana (si no, la flecha
   izquierda de las sugerencias y el borde del campo no respondían). El resto de EVA sigue
   respondiendo al clic y al botón derecho gracias a la capa ::after. */
.eva-asis--abierto .eva-escenario { pointer-events: none; }
.eva-asis--abierto .eva-escenario::after {
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    right: 46px;
    pointer-events: auto;
}
.eva-lanzador__aviso {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #f0842f;
    border: 2px solid #fff;
    box-shadow: 0 0 0 0 rgba(240, 132, 47, .6);
    animation: evaLatido 1.8s ease-out infinite;
}
@keyframes evaLatido { 0% { box-shadow: 0 0 0 0 rgba(240, 132, 47, .55); } 100% { box-shadow: 0 0 0 12px rgba(240, 132, 47, 0); } }
@keyframes evaEntra { from { opacity: 0; transform: translateY(24px) scale(.8); } to { opacity: 1; transform: none; } }

/* ---------- Bocadillo de saludo ---------- */
.eva-burbuja {
    position: relative;
    max-width: 250px;
    margin-right: 18px;
    background: #fff;
    border: 1px solid #eef0f4;
    border-radius: 16px 16px 4px 16px;
    box-shadow: 0 12px 30px rgba(16, 24, 40, .14);
    padding: 12px 34px 12px 14px;
    font-size: 13px;
    line-height: 1.45;
    color: #475467;
    display: flex;
    flex-direction: column;
    gap: 3px;
    animation: evaEntra .4s ease both;
}
.eva-burbuja strong { color: #1f2937; font-size: 14px; }
.eva-burbuja__cerrar {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #98a2b3;
    cursor: pointer;
}
.eva-burbuja__cerrar:hover { background: #f2f4f7; color: #475467; }
.eva-burbuja__cta {
    align-self: flex-start;
    margin-top: 6px;
    border: 0;
    border-radius: 999px;
    background: #4088BD;
    color: #fff;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 13px;
    cursor: pointer;
}
.eva-burbuja__cta:hover { background: #2E6DA4; }

/* ---------- Ventana ---------- */
.eva-panel {
    position: relative;
    width: 400px;
    height: min(660px, calc(100vh - 110px));
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 24px 60px rgba(16, 24, 40, .22), 0 2px 8px rgba(16, 24, 40, .06);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: evaAbre .28s cubic-bezier(.2, .9, .3, 1.1) both;
    transform-origin: bottom right;
}
@keyframes evaAbre { from { opacity: 0; transform: translateY(16px) scale(.94); } to { opacity: 1; transform: none; } }

/* Cabecera: el degradado azul de «Configura tu empresa» */
.eva-cab {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 12px 12px 14px;
    color: #fff;
    background: linear-gradient(135deg, #1f4e79 0%, #2E6DA4 55%, #4088BD 100%);
    flex-shrink: 0;
}
.eva-cab__brillo {
    position: absolute;
    right: -40px;
    top: -60px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, .3), rgba(255, 255, 255, 0) 70%);
    pointer-events: none;
}
.eva-cab__muneco {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .35);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
}

.eva-cab__muneco img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.eva-cab__titulo { display: flex; flex-direction: column; min-width: 0; flex: 1; position: relative; }
.eva-cab__titulo strong { font-size: 1.15rem; font-weight: 800; line-height: 1.1; }
.eva-cab__titulo span { font-size: .74rem; opacity: .92; display: flex; align-items: center; gap: 6px; }
.eva-cab__punto { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 2px rgba(74, 222, 128, .3); display: inline-block; }
.eva-cab__botones { display: flex; gap: 4px; position: relative; }
.eva-icono {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 10px;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .9rem;
    transition: background .12s;
}
.eva-icono:hover { background: rgba(255, 255, 255, .28); }
.eva-icono--on { background: #fff; color: #1f4e79; }
.eva-icono--on:hover { background: #fff; }
.eva-icono--cerrar { background: #e5484d; }
.eva-icono--cerrar:hover { background: #c93a3f; }

/* Contexto: pantalla y licencia */
.eva-contexto {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    padding: 8px 14px;
    background: #fff;
    border-bottom: 1px solid #eef0f4;
    flex-shrink: 0;
}
.eva-ctx {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .7rem;
    font-weight: 700;
    color: #35597a;
    background: #eef3f8;
    border-radius: 999px;
    padding: 4px 10px;
    white-space: nowrap;
}
.eva-ctx i { font-size: .68rem; }
.eva-ctx--ok { color: #1f6e3c; background: #e7f8ee; }
.eva-ctx--ojo { color: #9a5b00; background: #fef4e3; }
.eva-ctx--mal { color: #b42318; background: #fdecea; }

/* Conversación */
.eva-mensajes {
    flex: 1;
    overflow-y: auto;
    padding: 14px 14px 6px;
    background: #f6f8fb;
    display: flex;
    flex-direction: column;
    gap: 10px;
    scroll-behavior: smooth;
}
.eva-msg { display: flex; gap: 8px; align-items: flex-end; max-width: 100%; animation: evaMsg .25s ease both; }
.eva-msg--yo { justify-content: flex-end; }
@keyframes evaMsg { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.eva-msg__avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #e3eef8;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
}
.eva-msg__avatar img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.eva-msg__cuerpo { display: flex; flex-direction: column; gap: 8px; min-width: 0; max-width: calc(100% - 38px); }
.eva-msg__burbuja {
    background: #fff;
    border: 1px solid #eef0f4;
    border-radius: 4px 16px 16px 16px;
    padding: 9px 12px;
    font-size: 13px;
    line-height: 1.5;
    color: #1f2937;
    box-shadow: 0 2px 6px rgba(16, 24, 40, .04);
    overflow-wrap: anywhere;
}
.eva-msg__burbuja strong { color: #1f4e79; }
.eva-msg--yo .eva-msg__cuerpo { max-width: 85%; }
.eva-msg--yo .eva-msg__burbuja {
    background: linear-gradient(135deg, #2E6DA4, #4088BD);
    color: #fff;
    border: 0;
    border-radius: 16px 4px 16px 16px;
}
.eva-msg--yo .eva-msg__burbuja strong { color: #fff; }

/* Escribiendo… */
.eva-escribiendo { display: inline-flex; gap: 4px; padding: 12px 14px; }
.eva-escribiendo i { width: 7px; height: 7px; border-radius: 50%; background: #9fb6cc; animation: evaPunto 1s infinite ease-in-out; }
.eva-escribiendo i:nth-child(2) { animation-delay: .15s; }
.eva-escribiendo i:nth-child(3) { animation-delay: .3s; }
@keyframes evaPunto { 0%, 80%, 100% { transform: translateY(0); opacity: .5; } 40% { transform: translateY(-4px); opacity: 1; } }

/* Tarjeta de la licencia */
.eva-lic {
    background: #fff;
    border: 1px solid #eef0f4;
    border-radius: 16px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    box-shadow: 0 4px 14px rgba(16, 24, 40, .05);
}
.eva-lic__cab { display: flex; align-items: center; gap: 10px; padding-bottom: 8px; border-bottom: 1px dashed #e6e9ee; }
.eva-lic__cab > div { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.eva-lic__ico {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #fef4e3;
    color: #f59e0b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.eva-lic__eti { font-size: .66rem; font-weight: 700; color: #8a94a6; text-transform: uppercase; letter-spacing: .03em; }
.eva-lic__plan { font-size: 1.05rem; font-weight: 800; color: #1f2937; line-height: 1.2; }
.eva-lic__vence { font-size: .68rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; text-align: right; }
.eva-lic__vence--ok { color: #1f6e3c; background: #e7f8ee; }
.eva-lic__vence--ojo { color: #9a5b00; background: #fef4e3; }
.eva-lic__vence--mal { color: #b42318; background: #fdecea; }
.eva-lic__mods { display: flex; flex-wrap: wrap; gap: 6px; }
.eva-lic__vacio { font-size: .78rem; color: #98a2b3; }
.eva-mod {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .74rem;
    font-weight: 700;
    color: var(--c);
    background: color-mix(in srgb, var(--c) 12%, #fff);
    border: 1px solid color-mix(in srgb, var(--c) 28%, #fff);
    padding: 4px 9px;
    border-radius: 999px;
}
.eva-lic__plazas { display: flex; justify-content: space-between; align-items: baseline; font-size: .75rem; color: #475467; margin-top: 2px; }
.eva-lic__plazas small { color: #98a2b3; }
.eva-lic__plazas b { color: #1f2937; }
.eva-barra { height: 6px; border-radius: 999px; background: #eef0f4; overflow: hidden; }
.eva-barra i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #4088BD, #60a5fa); }

.eva-enlace {
    align-self: flex-start;
    border: 0;
    background: none;
    color: #2E6DA4;
    font: inherit;
    font-size: .76rem;
    font-weight: 700;
    padding: 2px 0;
    cursor: pointer;
}
.eva-enlace:hover { text-decoration: underline; }
.eva-enlace i { font-size: .68rem; margin-left: 3px; }

/* Módulos que puede añadir */
.eva-ofertas { display: flex; flex-direction: column; gap: 8px; }
.eva-oferta {
    position: relative;
    background: #fff;
    border: 1px solid #eef0f4;
    border-left: 4px solid var(--c);
    border-radius: 14px;
    padding: 10px 12px;
    display: grid;
    grid-template-columns: 36px 1fr;
    gap: 4px 10px;
    box-shadow: 0 3px 10px rgba(16, 24, 40, .04);
    transition: transform .12s, box-shadow .12s;
}
.eva-oferta:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(16, 24, 40, .08); }
.eva-oferta__ico {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--c);
    background: color-mix(in srgb, var(--c) 12%, #fff);
    font-size: 1rem;
}
.eva-oferta__txt { display: flex; flex-direction: column; min-width: 0; }
.eva-oferta__txt strong { font-size: .86rem; color: #1f2937; }
.eva-oferta__txt span { font-size: .74rem; color: #667085; line-height: 1.4; }
.eva-oferta__pie { grid-column: 2; display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.eva-oferta__precio { font-size: .78rem; font-weight: 800; color: #1f2937; }
.eva-oferta__nota { font-size: .7rem; color: #98a2b3; }
.eva-btn {
    border: 0;
    border-radius: 999px;
    background: var(--c, #4088BD);
    color: #fff;
    font: inherit;
    font-size: .74rem;
    font-weight: 700;
    padding: 5px 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: filter .12s;
}
.eva-btn:hover { filter: brightness(.92); }

/* Botones de acción bajo una respuesta */
.eva-acciones { display: flex; flex-wrap: wrap; gap: 6px; }
.eva-accion {
    border: 1px solid #cfe0ef;
    background: #fff;
    color: #2E6DA4;
    border-radius: 999px;
    font: inherit;
    font-size: .74rem;
    font-weight: 700;
    padding: 5px 11px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background .12s, border-color .12s;
}
.eva-accion:hover { background: #eef3f8; border-color: #4088BD; }

/* Sugerencias rápidas */
.eva-sugerencias {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 8px 14px;
    scroll-behavior: smooth;
    scrollbar-width: none;
}
.eva-sugerencias::-webkit-scrollbar { display: none; }

/* Una sola fila con flechas a los lados: ocupa poco y se ven todas las opciones */
.eva-carril { position: relative; background: #f6f8fb; flex-shrink: 0; }
.eva-carril__flecha {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid #e3e8ef;
    background: #fff;
    color: #2E6DA4;
    font-size: .72rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(16, 24, 40, .12);
    transition: opacity .15s, background .12s;
}
.eva-carril__flecha:hover { background: #eef3f8; }
.eva-carril__flecha--izq { left: 6px; }
.eva-carril__flecha--der { right: 6px; }
/* Difuminado bajo las flechas para que se note que hay más */
.eva-carril::before, .eva-carril::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 44px;
    z-index: 1;
    pointer-events: none;
    transition: opacity .15s;
}
.eva-carril::before { left: 0; background: linear-gradient(90deg, #f6f8fb 40%, rgba(246, 248, 251, 0)); }
.eva-carril::after { right: 0; background: linear-gradient(270deg, #f6f8fb 40%, rgba(246, 248, 251, 0)); }
.eva-carril[data-inicio="1"] .eva-carril__flecha--izq,
.eva-carril[data-inicio="1"]::before,
.eva-carril[data-fin="1"] .eva-carril__flecha--der,
.eva-carril[data-fin="1"]::after { opacity: 0; pointer-events: none; }
.eva-sug {
    flex-shrink: 0;
    border: 1px solid #e3e8ef;
    background: #fff;
    color: #35597a;
    border-radius: 999px;
    font: inherit;
    font-size: .74rem;
    font-weight: 600;
    padding: 6px 11px;
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: border-color .12s, color .12s, background .12s;
}
.eva-sug i { color: #4088BD; }
.eva-sug:hover:not(:disabled) { border-color: #4088BD; color: #1f4e79; background: #f4f9fd; }
.eva-sug:disabled { opacity: .5; cursor: default; }

/* Escribir */
.eva-escribir {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    padding: 10px 12px 6px;
    border-top: 1px solid #eef0f4;
    background: #fff;
    flex-shrink: 0;
}
.eva-escribir textarea {
    flex: 1;
    resize: none;
    border: 1px solid #e3e8ef;
    border-radius: 14px;
    padding: 9px 12px;
    font-family: 'Open Sans', 'Poppins', sans-serif;
    font-size: 13.5px;
    line-height: 1.4;
    color: #1f2937;
    max-height: 120px;
    min-height: 40px;
    outline: none;
    background: #f9fafb;
    transition: border-color .12s, box-shadow .12s, background .12s;
}
.eva-escribir textarea:focus { border-color: #4088BD; background: #fff; box-shadow: 0 0 0 3px rgba(64, 136, 189, .14); }
.eva-enviar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: .95rem;
    transition: filter .12s, background .12s;
}
.eva-enviar { background: linear-gradient(135deg, #2E6DA4, #4088BD); color: #fff; box-shadow: 0 6px 14px rgba(46, 109, 164, .3); }
.eva-enviar:hover:not(:disabled) { filter: brightness(1.06); }
.eva-enviar:disabled { background: #d0d5dd; box-shadow: none; cursor: default; }
.eva-pie { text-align: center; font-size: .64rem; color: #98a2b3; padding: 0 12px 8px; background: #fff; flex-shrink: 0; }

/* ---------- Móvil ---------- */
/* Sin sitio a la izquierda del chat: EVA se queda en la cabecera */
@media (max-width: 760px) {
    .eva-asis--abierto .eva-escenario { display: none; }
}

@media (max-width: 600px) {
    .eva-asis { right: 12px; bottom: 12px; left: 12px; }
    .eva-panel { width: 100%; height: calc(100vh - 90px); height: calc(100dvh - 90px); border-radius: 18px; }
    .eva-burbuja { max-width: 230px; }
}

@media (prefers-reduced-motion: reduce) {
    .eva-escenario, .eva-panel, .eva-msg, .eva-burbuja, .eva-lanzador__aviso { animation: none !important; transition: none !important; }
}

/* ---------- Ajustes de EVA (engranaje de la cabecera) ---------- */
.eva-ajustes {
    position: absolute;
    top: 82px;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
    background: #f6f8fb;
    display: flex;
    flex-direction: column;
    animation: evaMsg .2s ease both;
}
.eva-ajustes__cab {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #fff;
    border-bottom: 1px solid #eef0f4;
}
.eva-ajustes__cab strong { font-size: .92rem; color: #1f2937; display: inline-flex; align-items: center; gap: 8px; }
.eva-ajustes__cab strong i { color: #4088BD; }
.eva-ajustes__listo {
    border: 0;
    border-radius: 999px;
    background: #4088BD;
    color: #fff;
    font: inherit;
    font-size: .76rem;
    font-weight: 700;
    padding: 6px 14px;
    cursor: pointer;
}
.eva-ajustes__listo:hover { background: #2E6DA4; }
.eva-ajustes__cuerpo { flex: 1; overflow-y: auto; padding: 12px 14px 16px; display: flex; flex-direction: column; gap: 10px; }

.eva-aj {
    background: #fff;
    border: 1px solid #eef0f4;
    border-radius: 14px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.eva-aj__titulo { font-size: .68rem; font-weight: 700; color: #8a94a6; text-transform: uppercase; letter-spacing: .03em; display: flex; justify-content: space-between; }
.eva-aj__titulo b { color: #1f2937; text-transform: none; letter-spacing: 0; }
.eva-aj__ayuda { font-size: .72rem; color: #667085; line-height: 1.45; }
.eva-aj__ayuda b { color: #1f4e79; }

/* Opciones excluyentes (modo, velocidad) */
.eva-seg { display: flex; background: #eef3f8; border-radius: 12px; padding: 3px; gap: 3px; }
.eva-seg__op {
    flex: 1;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #35597a;
    font: inherit;
    font-size: .74rem;
    font-weight: 600;
    padding: 7px 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
    transition: background .12s, color .12s, box-shadow .12s;
}
.eva-seg__op:hover { color: #1f4e79; }
.eva-seg__op.on { background: #fff; color: #1f4e79; box-shadow: 0 2px 6px rgba(16, 24, 40, .1); }

/* Voces: elegir y escuchar */
.eva-voces { display: flex; flex-direction: column; gap: 6px; }
.eva-voz {
    display: flex;
    align-items: center;
    border: 1px solid #e3e8ef;
    border-radius: 12px;
    overflow: hidden;
    transition: border-color .12s, background .12s;
}
.eva-voz.on { border-color: #4088BD; background: #f4f9fd; }
.eva-voz__elegir {
    flex: 1;
    border: 0;
    background: transparent;
    font: inherit;
    text-align: left;
    padding: 8px 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}
.eva-voz__elegir > i { color: #c0cad6; font-size: .95rem; }
.eva-voz.on .eva-voz__elegir > i { color: #4088BD; }
.eva-voz__elegir span { display: flex; flex-direction: column; }
.eva-voz__elegir strong { font-size: .8rem; color: #1f2937; }
.eva-voz__elegir small { font-size: .7rem; color: #667085; }
.eva-voz__probar {
    width: 36px;
    height: 36px;
    margin-right: 6px;
    border: 0;
    border-radius: 50%;
    background: #eef3f8;
    color: #2E6DA4;
    cursor: pointer;
    font-size: .74rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.eva-voz__probar:hover { background: #4088BD; color: #fff; }

/* Volumen */
.eva-volumen { display: flex; align-items: center; gap: 10px; color: #8a94a6; }
.eva-volumen input[type="range"] { flex: 1; accent-color: #4088BD; height: 4px; cursor: pointer; }

/* Interruptores */
.eva-interruptor {
    border: 0;
    background: transparent;
    font: inherit;
    padding: 4px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    text-align: left;
}
.eva-interruptor + .eva-interruptor { border-top: 1px dashed #eef0f4; padding-top: 10px; }
.eva-interruptor span { display: flex; flex-direction: column; font-size: .8rem; font-weight: 600; color: #1f2937; }
.eva-interruptor small { font-size: .7rem; font-weight: 400; color: #667085; }
.eva-interruptor i {
    position: relative;
    flex-shrink: 0;
    width: 40px;
    height: 22px;
    border-radius: 999px;
    background: #d0d5dd;
    transition: background .15s;
}
.eva-interruptor i::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(16, 24, 40, .25);
    transition: transform .15s;
}
.eva-interruptor[aria-checked="true"] i { background: #23915f; }
.eva-interruptor[aria-checked="true"] i::after { transform: translateX(18px); }

/* Acciones */
.eva-aj__boton {
    border: 1px solid #e3e8ef;
    border-radius: 12px;
    background: #fff;
    color: #35597a;
    font: inherit;
    font-size: .78rem;
    font-weight: 600;
    padding: 9px 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background .12s, border-color .12s;
}
.eva-aj__boton:hover { background: #f4f9fd; border-color: #4088BD; }
.eva-aj__boton--peligro { color: #b42318; }
.eva-aj__boton--peligro:hover { background: #fdecea; border-color: #e5484d; }

/* La cara de EVA en el menú de usuario («Activar EVA») */
.hdr-menu__item .hdr-menu__eva {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    align-self: center;      /* el botón del menú estira a sus hijos: sin esto medía 20×40 */
    border-radius: 50%;
    object-fit: cover;
    object-position: center 30%;
    background: #e3eef8;
}

/* ---------- «Solo voz»: ventana pequeña (cabecera, opciones y barra de escribir) ---------- */
.eva-panel--voz { height: auto; }
.eva-panel--voz.eva-panel--ajustes { height: min(660px, calc(100vh - 110px)); }
.eva-acciones--voz { padding: 10px 14px 0; background: #f6f8fb; }
.eva-cab__punto--pensando { background: #f7c548; box-shadow: 0 0 0 2px rgba(247, 197, 72, .35); animation: evaPunto 1s infinite ease-in-out; }
/* Sin sitio a la izquierda y en «Solo voz»: EVA de pie ENCIMA de la ventana pequeña (es ella quien habla) */
@media (max-width: 760px) {
    .eva-asis--abierto.eva-asis--voz .eva-escenario {
        display: block;
        right: 18px;
        bottom: calc(100% - 12px);
        width: 150px;
        height: 200px;
    }
}

/* ---------- Recorrido guiado por EVA (assets/js/EvaTour.js) ----------
   Por encima de TODO, como la presentación: la cabecera y el menú lateral van a z 1000 y,
   con la capa a 985, quedaban sin oscurecer y tapando la tarjeta (4-oct-2026). Durante el
   recorrido no se toca la página (la capa recoge los clics), así que no hay popups de Radzen
   que respetar. Orden: capa 30000 · foco (oscurece) 30001 · EVA 30002 · tarjeta 30003. */
.eva-tour__capa { position: fixed; inset: 0; z-index: 30000; background: transparent; }
body.eva-recorriendo .eva-asis { z-index: 30002; }
/* Durante el recorrido EVA no recoge clics (estaba de pie encima del botón «Guardar» y no dejaba
   pulsarlo) y, si tapa lo que se explica, se desvanece mientras dura ese paso. */
body.eva-recorriendo .eva-escenario, body.eva-recorriendo .eva-escenario * { pointer-events: none !important; }
body.eva-recorriendo .eva-asis { transition: opacity .25s ease; }
body.eva-tour-aparta .eva-asis { opacity: 0; }
/* Misiones: con «pulsa» se puede tocar lo iluminado (la capa deja pasar el ratón); con «libre»
   ni se oscurece, solo el halo, para que el usuario rellene a gusto. */
.eva-tour--pulsa .eva-tour__capa, .eva-tour--libre .eva-tour__capa { pointer-events: none; }
/* Para rellenar se oscurece menos (sigue viéndose el resto) y se puede tocar todo: la sombra no recoge clics. */
.eva-tour--libre .eva-tour__foco { box-shadow: 0 0 0 9999px rgba(10, 18, 35, .38); }
/* Lo que hay que HACER (pulsar o rellenar) va en el naranja de la marca, más grueso y latiendo;
   lo que solo se explica, en azul. Pegada al foco, la etiqueta «Pulsa aquí» / «Rellena aquí». */
.eva-tour--libre .eva-tour__foco::before, .eva-tour--pulsa .eva-tour__foco::before {
    border-width: 3px;
    border-color: #F0A028;
    box-shadow: 0 0 0 4px rgba(240, 160, 40, .25), 0 0 22px rgba(240, 160, 40, .55);
}
.eva-tour--libre .eva-tour__foco::after, .eva-tour--pulsa .eva-tour__foco::after { border-color: rgba(240, 160, 40, .7); }
.eva-tour__marca {
    position: absolute;
    left: 0;
    top: -40px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px;
    border-radius: 999px;
    background: #F0A028;
    color: #0b1220;
    font-family: 'Poppins', sans-serif;
    font-size: 13.5px;
    font-weight: 800;
    white-space: nowrap;
    box-shadow: 0 8px 20px rgba(240, 160, 40, .45);
    animation: evaMarca 1.2s ease-in-out infinite;
}
.eva-tour__foco--arriba .eva-tour__marca { top: 10px; left: 10px; }
/* Al rellenar, la tarjeta se aparta a la izquierda: la etiqueta, a la derecha, para que no la tape. */
.eva-tour--libre .eva-tour__marca { left: auto; right: 0; }
.eva-tour--libre .eva-tour__foco--arriba .eva-tour__marca { left: auto; right: 10px; }
@keyframes evaMarca { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .eva-tour__marca { animation: none; } }
/* En «pulsa» se avanza pulsando lo iluminado (p. ej. «Guardar»), no con «Siguiente», que se saltaría lo escrito. */
.eva-tour--pulsa .eva-tour__btn--sig { display: none; }
/* Ahí el teclado es del usuario: fuera la ayuda «← → para moverte · Esc para salir». */
.eva-tour--pulsa .eva-tour__tarjeta::after, .eva-tour--libre .eva-tour__tarjeta::after { display: none; }
.eva-tour__foco {
    position: fixed;
    z-index: 30001;
    border-radius: 16px;
    box-shadow: 0 0 0 9999px rgba(10, 18, 35, .62);
    pointer-events: none;
    transition: left .35s cubic-bezier(.22,.85,.25,1), top .35s cubic-bezier(.22,.85,.25,1),
                width .35s cubic-bezier(.22,.85,.25,1), height .35s cubic-bezier(.22,.85,.25,1);
}
/* Halo que late alrededor de lo que se explica */
.eva-tour__foco::before, .eva-tour__foco::after {
    content: "";
    position: absolute;
    inset: -3px;
    border-radius: 18px;
    border: 2px solid rgba(96, 165, 250, .95);
}
.eva-tour__foco::after { inset: -3px; border-color: rgba(96, 165, 250, .6); animation: evaHalo 1.8s ease-out infinite; }
@keyframes evaHalo { 0% { inset: -3px; opacity: 1; } 100% { inset: -16px; opacity: 0; } }

.eva-tour__tarjeta {
    position: fixed;
    z-index: 30003;
    width: min(360px, calc(100vw - 24px));
    background: rgba(255, 255, 255, .94);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
    backdrop-filter: blur(16px) saturate(1.4);
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: 22px;
    box-shadow: 0 30px 70px rgba(10, 18, 35, .35), 0 2px 8px rgba(10, 18, 35, .08);
    padding: 18px 18px 14px;
    font-family: 'Poppins', sans-serif;
    overflow: hidden;
    transition: left .35s cubic-bezier(.22,.85,.25,1), top .35s cubic-bezier(.22,.85,.25,1);
}
/* Franja de color de la marca arriba */
.eva-tour__tarjeta::before {
    content: "";
    position: absolute;
    left: 0; right: 0; top: 0;
    height: 4px;
    background: linear-gradient(90deg, #2E6DA4, #4088BD 45%, #60a5fa 70%, #f0842f);
}
.eva-tour__tarjeta--entra { animation: evaTarjeta .35s cubic-bezier(.22,.85,.25,1) both; }
@keyframes evaTarjeta { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
.eva-tour__cab { display: flex; align-items: center; gap: 12px; }
.eva-tour__cab img {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 30%;
    background: #e3eef8;
    flex-shrink: 0;
    padding: 2px;
    background-image: conic-gradient(from 200deg, #4088BD, #60a5fa, #f0842f, #4088BD);
    background-origin: border-box;
    box-shadow: 0 4px 12px rgba(46, 109, 164, .3);
}
.eva-tour__titulos { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.eva-tour__titulos small {
    align-self: flex-start;
    font-size: .64rem;
    font-weight: 700;
    color: #2E6DA4;
    background: #eaf3fb;
    border-radius: 999px;
    padding: 2px 8px;
    letter-spacing: .02em;
}
.eva-tour__titulos strong { font-size: 1rem; font-weight: 800; color: #111827; line-height: 1.25; }
.eva-tour__x {
    align-self: flex-start;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #98a2b3;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    transition: background .12s, color .12s;
}
.eva-tour__x:hover { background: #fdecea; color: #b42318; }
.eva-tour__texto { margin: 12px 0 14px; font-size: .88rem; line-height: 1.6; color: #344054; }
.eva-tour__pie { display: flex; align-items: center; gap: 8px; }
/* Progreso como barra continua */
.eva-tour__puntos { flex: 1; display: flex; gap: 4px; }
.eva-tour__puntos i { flex: 1; max-width: 26px; height: 4px; border-radius: 999px; background: #e4e7ec; transition: background .25s; }
.eva-tour__puntos i.on { background: linear-gradient(90deg, #4088BD, #60a5fa); }
.eva-tour__btn {
    border: 0;
    border-radius: 999px;
    background: #f2f4f7;
    color: #35597a;
    font: inherit;
    font-size: .78rem;
    font-weight: 700;
    padding: 8px 14px;
    cursor: pointer;
    transition: background .12s, transform .12s, box-shadow .12s;
}
.eva-tour__btn:hover:not(:disabled) { background: #e4e7ec; }
.eva-tour__btn:disabled { opacity: .35; cursor: default; }
.eva-tour__btn--sig {
    background: linear-gradient(135deg, #2E6DA4, #4088BD);
    color: #fff;
    box-shadow: 0 6px 16px rgba(46, 109, 164, .35);
}
.eva-tour__btn--sig:hover:not(:disabled) { background: linear-gradient(135deg, #285f90, #3a7cad); transform: translateY(-1px); }
.eva-tour__tarjeta::after {
    content: "← → para moverte · Esc para salir";
}
/* Web en inglés (App.razor pone <html lang="en">). */
html[lang="en"] .eva-tour__tarjeta::after {
    content: "← → to move · Esc to exit";
}
.eva-tour__tarjeta::after {
    display: block;
    margin-top: 10px;
    font-size: .62rem;
    color: #98a2b3;
    text-align: right;
}
@media (hover: none) { .eva-tour__tarjeta::after { display: none; } }

/* ---------- Presentación de EVA la primera vez (evaPresentacion, EvaTour.js) ---------- */
/* Durante la presentación el fondo tapa TODO, también la cabecera y el menú (llegan a z 20000),
   y no se puede tocar nada hasta pulsar «¡Empezamos!»; EVA y su bocadillo van por encima.
   Siempre por debajo de los modales (99980+). La clase del body la pone evaPresentacion. */
.eva-pres__fondo {
    position: fixed;
    inset: 0;
    z-index: 30000;
    background: radial-gradient(circle at 50% 42%, rgba(46, 109, 164, .55), rgba(10, 18, 35, .82) 65%);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    animation: evaFundido .5s ease both;
}
.eva-pres__fondo--sale { animation: evaFundidoSale .8s ease both; }
@keyframes evaFundido { from { opacity: 0; } to { opacity: 1; } }
@keyframes evaFundidoSale { from { opacity: 1; } to { opacity: 0; } }
/* EVA en grande, a la izquierda del centro (la clase la pone y quita evaPresentacion) */
.eva-asis .eva-escenario.eva-escenario--centro {
    position: fixed;
    left: calc(50% - 210px);
    top: 50%;
    width: min(320px, 40vw);
    height: min(430px, 60vh);
    transform: translate(-50%, -50%);
    pointer-events: none;
    animation: evaAparece .7s cubic-bezier(.2, .9, .3, 1.2) both;
}
@keyframes evaAparece { from { opacity: 0; transform: translate(-50%, -40%) scale(.6); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }

/* Lo que dice EVA: un bocadillo de diálogo a su lado, con el pico apuntándole */
.eva-pres__tarjeta {
    position: fixed;
    left: calc(50% - 20px);
    top: 41%;          /* el pico queda a la altura de su cara */
    transform: translateY(-50%);
    z-index: 30002;
    box-sizing: border-box;
    width: min(440px, calc(50vw + 4px));     /* nunca se sale por la derecha (16px de margen) */
    text-align: left;
    background: #fff;
    border-radius: 26px;
    padding: 22px 24px 18px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .32);
    font-family: 'Poppins', sans-serif;
    /* Animación propia: la genérica acaba en «transform: none» y perdía la colocación. */
    animation: evaPresTarjeta .5s .3s cubic-bezier(.22,.85,.25,1) both;
}
.eva-pres__tarjeta::before {
    content: "";
    position: absolute;
    left: -16px;
    top: 50%;
    margin-top: -4px;
    border-style: solid;
    border-width: 12px 18px 12px 0;
    border-color: transparent #fff transparent transparent;
    filter: drop-shadow(-3px 2px 2px rgba(0, 0, 0, .08));
}
@keyframes evaPresTarjeta { from { opacity: 0; transform: translate(-14px, -50%) scale(.94); } to { opacity: 1; transform: translate(0, -50%) scale(1); } }
.eva-pres__tarjeta--sale { animation: evaFundidoSale .3s ease both; }
.eva-pres__tarjeta .eva-pres__pie { justify-content: flex-start; }

/* Pantalla estrecha: EVA arriba y el bocadillo debajo, con el pico hacia arriba */
@media (max-width: 760px) {
    .eva-asis .eva-escenario.eva-escenario--centro {
        left: 50%;
        top: 34%;
        width: min(220px, 56vw);
        height: min(290px, 38vh);
    }
    .eva-pres__tarjeta {
        left: 50%;
        top: auto;
        bottom: 6vh;
        width: min(420px, calc(100vw - 32px));
        transform: translateX(-50%);
        text-align: center;
        animation-name: evaPresTarjetaMovil;
    }
    .eva-pres__tarjeta::before {
        left: 50%;
        top: -16px;
        margin: 0 0 0 -12px;
        border-width: 0 12px 18px 12px;
        border-color: transparent transparent #fff transparent;
    }
    .eva-pres__tarjeta .eva-pres__pie { justify-content: center; }
}
@keyframes evaPresTarjetaMovil { from { opacity: 0; transform: translate(-50%, 12px) scale(.96); } to { opacity: 1; transform: translate(-50%, 0) scale(1); } }

.eva-pres__chip {
    display: inline-block;
    font-size: .68rem;
    font-weight: 700;
    color: #c2571f;
    background: #fff1e6;
    border-radius: 999px;
    padding: 3px 10px;
    margin-bottom: 8px;
}
.eva-pres__tarjeta h2 { margin: 0 0 6px; font-size: 1.45rem; font-weight: 800; color: #111827; }
.eva-pres__tarjeta p { margin: 0 0 16px; font-size: .92rem; line-height: 1.6; color: #475467; }
.eva-pres__pie { display: flex; justify-content: center; align-items: center; gap: 14px; }
.eva-pres__btn {
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #2E6DA4, #4088BD);
    color: #fff;
    font: inherit;
    font-size: .9rem;
    font-weight: 700;
    padding: 11px 24px;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(46, 109, 164, .4);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform .12s, box-shadow .12s;
}
.eva-pres__btn:hover { transform: translateY(-1px); box-shadow: 0 14px 28px rgba(46, 109, 164, .45); }
.eva-pres__saltar { border: 0; background: none; color: #98a2b3; font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer; }
.eva-pres__saltar:hover { color: #475467; text-decoration: underline; }
/* La primera vez en una pantalla: el nombre de la pantalla puede ser largo y «Saltar» pesa más. */
.eva-pres__tarjeta--pantalla h2 { font-size: 1.25rem; line-height: 1.3; }
.eva-pres__tarjeta--pantalla .eva-pres__saltar {
    padding: 9px 16px; border: 1px solid #d0d5dd; border-radius: 999px; color: #475467; font-size: .85rem;
}
.eva-pres__tarjeta--pantalla .eva-pres__saltar:hover { background: #f2f4f7; text-decoration: none; }

/* Bocadillo que ofrece el recorrido de una pantalla nueva */
.eva-burbuja__botones { display: flex; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.eva-burbuja__botones .eva-burbuja__cta { margin-top: 0; }
.eva-burbuja__luego {
    border: 0;
    background: none;
    color: #667085;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 4px;
    cursor: pointer;
}
.eva-burbuja__luego:hover { color: #1f2937; text-decoration: underline; }

/* ---------- Menú del botón derecho sobre EVA ---------- */
.eva-menu__fondo { position: fixed; inset: 0; z-index: 994; }
.eva-menu {
    position: fixed;
    z-index: 995;
    width: 230px;
    background: rgba(255, 255, 255, .97);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border: 1px solid #eef0f4;
    border-radius: 16px;
    box-shadow: 0 18px 44px rgba(16, 24, 40, .22);
    padding: 6px;
    font-family: 'Poppins', sans-serif;
    animation: evaTarjeta .18s ease both;
}
.eva-menu__cab { display: flex; align-items: center; gap: 8px; padding: 6px 8px 8px; border-bottom: 1px solid #f2f4f7; margin-bottom: 4px; }
.eva-menu__cab img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; object-position: center 30%; background: #e3eef8; }
.eva-menu__cab strong { font-size: .85rem; color: #1f2937; }
.eva-menu__op {
    width: 100%;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #35597a;
    font: inherit;
    font-size: .8rem;
    font-weight: 600;
    text-align: left;
    padding: 8px 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}
.eva-menu__op i { width: 16px; text-align: center; color: #4088BD; }
.eva-menu__op:hover { background: #eef3f8; color: #1f4e79; }
.eva-menu__op--peligro, .eva-menu__op--peligro i { color: #b42318; }
.eva-menu__op--peligro:hover { background: #fdecea; color: #b42318; }
.eva-menu__sep { height: 1px; background: #f2f4f7; margin: 4px 6px; }

body.eva-presentando .eva-asis { z-index: 30001; }
/* Con EVA en el centro o explicando, ningún bocadillo a la vez. */
body.eva-presentando .eva-burbuja, body.eva-recorriendo .eva-burbuja { display: none; }
