/* ============================================================
   Pantallas de acceso de los portales de Ecountia (distribuidores,
   facturación y firma transaccional). Mismo lenguaje visual que la
   landing. Los colores son variables: la marca blanca de un tenant
   las reemplaza (ver --ax-* en .ax).
   ============================================================ */

.ax {
    --ax-fondo: #0a1533;
    --ax-brillo-1: #2e53b7;
    --ax-brillo-2: #00c2cc;
    --ax-acento: #00c2cc;
    --ax-boton: #0a1533;
    --ax-boton-hover: #162d69;
    --ax-boton-texto: #ffffff;
    --ax-enlace: #2e53b7;
    min-height: 100vh;
    display: flex;
    background: #eef1f6;
    color: #141a28;
    font-family: 'Inter', sans-serif;
}
.ax *, .ax *::before, .ax *::after { box-sizing: border-box; }
.ax h1, .ax h2 { color: inherit; font-weight: 700; }
.ax a, .ax a:hover, .ax button { text-decoration: none; }
.ax-h { font-family: 'Sora', 'Inter', sans-serif; letter-spacing: -0.02em; }

/* ---------- Panel de marca ---------- */
.ax-panel { position: relative; overflow: hidden; flex: 1 1 55%; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; padding: 40px 56px; color: #ffffff; background: var(--ax-fondo); }
.ax-panel > * { position: relative; }
.ax-puntos { position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(rgba(255,255,255,0.18) 1.2px, transparent 1.2px); background-size: 26px 26px; -webkit-mask-image: radial-gradient(ellipse at 40% 60%, #000 15%, transparent 70%); mask-image: radial-gradient(ellipse at 40% 60%, #000 15%, transparent 70%); }
.ax-glow { position: absolute; border-radius: 50%; filter: blur(90px); pointer-events: none; }
.ax-glow--1 { width: 520px; height: 520px; left: -160px; bottom: -120px; opacity: .55; background: var(--ax-brillo-1); }
.ax-glow--2 { width: 380px; height: 380px; right: -100px; top: -60px; opacity: .3; background: var(--ax-brillo-2); }
.ax-anillos { position: absolute !important; right: -150px; top: 50%; width: 640px; height: auto; transform: translateY(-50%); pointer-events: none; }
.ax-anillos .pulso { fill: none; stroke: var(--ax-acento); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 70 2400; animation: ax-pulso 7s linear infinite; }
.ax-anillos .pulso.p2 { animation-duration: 9s; animation-delay: -3s; }
@keyframes ax-pulso { to { stroke-dashoffset: -2470; } }

.ax-marca { display: flex; align-items: center; gap: 12px; }
.ax-marca img { height: 40px; width: auto; max-width: 220px; object-fit: contain; display: block; }
.ax-chip { padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; color: #ffffff; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.14); }
.ax-glass { background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.14); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }

.ax-mensaje { max-width: 520px; }
.ax-etiqueta { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--ax-acento); }
.ax-titulo { margin: 16px 0 0; font-size: clamp(36px, 3.6vw, 48px); line-height: 1.06; }
.ax-titulo span { color: var(--ax-acento); }
.ax-lead { margin: 18px 0 0; font-size: 17px; line-height: 1.6; color: rgba(255,255,255,0.75); }
.ax-beneficios { margin-top: 32px; display: flex; flex-direction: column; gap: 14px; }
.ax-beneficio { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 18px; }
.ax-beneficio > i { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--ax-acento); color: var(--ax-fondo); font-size: 18px; }
.ax-beneficio strong { display: block; font-size: 15px; }
.ax-beneficio span { font-size: 13px; color: rgba(255,255,255,0.72); }

.ax-panel__pie { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; color: rgba(255,255,255,0.65); }
.ax-panel__pie > span { display: inline-flex; align-items: center; gap: 8px; }
.ax-panel__pie > span i { color: var(--ax-acento); }
.ax-flotante { padding: 12px 16px; border-radius: 16px; display: flex; align-items: center; gap: 10px; animation: ax-flotar 6s ease-in-out infinite; }
.ax-flotante > i { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--ax-acento); color: var(--ax-fondo); }
.ax-flotante strong { display: block; color: #ffffff; font-size: 13px; }
.ax-flotante small { font-size: 12px; }
@keyframes ax-flotar { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* ---------- Formulario ---------- */
.ax-lado { flex: 1 1 45%; min-width: 0; display: flex; flex-direction: column; padding: 32px 40px; }
.ax-lado__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.ax-volver { display: inline-flex; align-items: center; gap: 8px; border: 0; background: transparent; padding: 6px 0; font: 600 14px 'Inter', sans-serif; color: #4f5b71; cursor: pointer; }
.ax-marca-movil { display: none; align-items: center; gap: 10px; }
.ax-marca-movil img { height: 32px; width: auto; max-width: 160px; object-fit: contain; }
.ax-marca-movil span { font-size: 12px; font-weight: 600; color: var(--ax-enlace); }
.ax-centro { flex: 1; display: grid; place-items: center; padding: 32px 0; }
.ax-caja { width: 100%; max-width: 420px; }
.ax-encabezado { display: flex; align-items: center; gap: 14px; }
.ax-encabezado > i { flex: none; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--ax-fondo); color: var(--ax-acento); font-size: 22px; }
.ax-encabezado h2 { margin: 0; font-size: 30px; }
.ax-encabezado p { margin: 4px 0 0; color: #4f5b71; font-size: 14px; }

.ax-formulario { margin-top: 32px; display: flex; flex-direction: column; gap: 18px; }
.ax-campo label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 600; color: #232b3d; }
.ax-input { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 16px; border-radius: 14px; border: 1.5px solid #dde3ec; background: #ffffff; color: #6c7a91; transition: border-color .2s ease, box-shadow .2s ease; }
.ax-input:focus-within { border-color: var(--ax-enlace); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ax-enlace) 14%, transparent); }
.ax-input input, .ax-input .ds-input { flex: 1; min-width: 0; height: 100%; border: 0 !important; outline: 0; box-shadow: none !important; padding: 0 !important; background: transparent !important; font: 500 15px 'Inter', sans-serif; color: #141a28; }
.ax-input__ojo { border: 0; background: transparent; color: #6c7a91; cursor: pointer; padding: 4px; font-size: 18px; }
.ax-opciones { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 14px; }
.ax-opciones label { display: inline-flex; align-items: center; gap: 8px; color: #4f5b71; }
.ax a.ax-enlace, .ax-enlace { font-weight: 600; color: var(--ax-enlace); }
.ax-boton { width: 100%; height: 52px; margin-top: 4px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 0; border-radius: 999px; background: var(--ax-boton); color: var(--ax-boton-texto); font: 600 15px 'Inter', sans-serif; cursor: pointer; transition: transform .2s ease, background .2s ease; }
.ax-boton:disabled { opacity: .7; cursor: progress; }
.ax-boton:active:not(:disabled) { transform: scale(.98); }
.ax-sin-cuenta { margin: 4px 0 0; text-align: center; font-size: 14px; color: #4f5b71; }
.ax-aviso { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 13px; color: #9a5b00; }
.ax-alerta { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: #fdecec; color: #8a1c1c; font-size: 14px; }

.ax-registro { margin: 24px 0 0; text-align: center; font-size: 14px; color: #4f5b71; }
.ax .ax-registro a { font-weight: 700; color: var(--ax-enlace); }
.ax-legal { margin: 0; font-size: 12px; line-height: 1.5; color: #6c7a91; text-align: center; }
.ax-caja .ds-field__hint { display: block; margin-top: 6px; font-size: 12px; color: #6c7a91; }
.ax-otros { margin-top: 36px; padding-top: 24px; border-top: 1px solid #dde3ec; }
.ax-otros > span { display: block; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #6c7a91; }
.ax-otros div { margin-top: 12px; display: flex; gap: 10px; flex-wrap: wrap; }
.ax a.ax-portal { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; border: 1px solid #dde3ec; background: #ffffff; color: #232b3d; font: 600 13px 'Inter', sans-serif; transition: border-color .2s ease, transform .2s ease; }
.ax-portal i { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: #0a1533; color: #00c2cc; font-size: 14px; }
.ax-lado__pie { display: flex; justify-content: center; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: #6c7a91; }
.ax-lado__pie img { width: 16px; height: 16px; }
.ax a.ax-lado__pie-link { color: #6c7a91; }

.ax-entra { animation: ax-entra .5s cubic-bezier(.2,.8,.2,1) both; }
.ax-entra--1 { animation-delay: .06s; } .ax-entra--2 { animation-delay: .12s; } .ax-entra--3 { animation-delay: .18s; }
@keyframes ax-entra { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

@media (hover: hover) and (pointer: fine) {
    .ax-boton:hover:not(:disabled) { background: var(--ax-boton-hover); transform: translateY(-2px); }
    .ax-volver:hover { color: #141a28; }
    .ax a.ax-portal:hover { border-color: var(--ax-enlace); transform: translateY(-2px); color: #232b3d; }
    .ax a.ax-enlace:hover { filter: brightness(.85); }
}

@media (max-width: 900px) {
    .ax-panel { display: none; }
    .ax-marca-movil { display: flex; }
    .ax-lado { padding: 20px 16px; }
}
@media (prefers-reduced-motion: reduce) {
    .ax-anillos .pulso, .ax-flotante, .ax-entra { animation: none; }
}

/* ---------- Transición entre pantallas (js/landingTransicion.js) ---------- */
.lx-cortina { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; background: var(--lx-cortina-fondo, #0a1533); pointer-events: none; clip-path: inset(100% 0 0 0); }
/* Mismo fondo que el héroe de la landing: navy, brillo azul y cian, y retícula de puntos. */
.lx-cortina::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 15% 75%, rgba(46,83,183,0.5), transparent 45%), radial-gradient(circle at 88% 15%, rgba(0,194,204,0.2), transparent 40%), radial-gradient(rgba(128,232,235,0.2) 1.2px, transparent 1.2px) 0 0 / 26px 26px; }
.lx-cortina img { position: relative; width: 64px; height: 64px; object-fit: contain; opacity: 0; transform: scale(.85); transition: opacity .25s ease, transform .4s cubic-bezier(.2,.8,.2,1); }
.lx-cortina.is-entrando { pointer-events: all; clip-path: inset(0 0 0 0); transition: clip-path .42s cubic-bezier(.7,0,.3,1); }
.lx-cortina.is-entrando img { opacity: 1; transform: scale(1); transition-delay: .15s; animation: lx-latido-logo 1.2s ease-in-out .4s infinite; }
.lx-cortina.is-saliendo { clip-path: inset(0 0 100% 0); transition: clip-path .52s cubic-bezier(.7,0,.3,1); }
.lx-cortina.is-saliendo img { opacity: 0; transform: translateY(-20px); transition-delay: 0s; }
@keyframes lx-latido-logo { 50% { transform: scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .lx-cortina, .lx-cortina img { transition: none; animation: none; } }

/* ---------- FirmaTransaccional ---------- */


/* Marca blanca: el panel usa la paleta del tenant (MarcaCss genera --primary-* y --accent-*) y no lleva el
   patrón de anillos, que es propio de Ecountia. */
.ax--tenant {
    --ax-fondo: var(--primary-900);
    --ax-brillo-1: var(--primary-500);
    --ax-brillo-2: var(--accent-500);
    --ax-acento: var(--accent-400);
    --ax-boton: var(--primary-600);
    --ax-boton-hover: var(--primary-700);
    --ax-enlace: var(--primary-600);
}
.ax-placa { display: inline-flex; padding: 8px 12px; border-radius: 12px; background: #ffffff; }
.ax-placa img { height: 32px; }
.ax-nombre { font: 700 20px 'Sora', 'Inter', sans-serif; }
.ax-icono-estado { display: block; margin-bottom: 18px; font-size: 44px; color: var(--ax-enlace); }

/* Las páginas pasan campos y botones del design system: aquí toman el estilo de la pantalla de acceso. */
.ax-caja form { margin-top: 28px; display: flex; flex-direction: column; gap: 18px; }
.ax-caja .ds-field { margin: 0; }
.ax-caja .ds-field__label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 600; color: #232b3d; }
.ax-caja .ds-input { height: 52px; padding: 0 16px; border-radius: 14px; border: 1.5px solid #dde3ec; background: #ffffff; font: 500 15px 'Inter', sans-serif; color: #141a28; transition: border-color .2s ease, box-shadow .2s ease; }
.ax-caja .ds-input:focus { border-color: var(--ax-enlace); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ax-enlace) 14%, transparent); outline: 0; }
.ax-caja .ds-btn--primary { height: 52px; border-radius: 999px; border: 0; background: var(--ax-boton); color: var(--ax-boton-texto); font: 600 15px 'Inter', sans-serif; transition: transform .2s ease, background .2s ease; }
.ax-caja .acceso__opciones { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 14px; }
.ax-caja .acceso__opciones a, .ax-caja form a { font-weight: 600; color: var(--ax-enlace); }
.ax-caja .acceso__opciones label { display: inline-flex; align-items: center; gap: 8px; color: #4f5b71; }
.ax-caja input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--ax-enlace); }
.ax-caja .ds-alert { border-radius: 14px; }
@media (hover: hover) and (pointer: fine) {
    .ax-caja .ds-btn--primary:hover:not(:disabled) { background: var(--ax-boton-hover); transform: translateY(-2px); }
}
