/* =====================================================================
   INDEX · Estudio de Compensación — Inicio de sesión
   ---------------------------------------------------------------------
   Pantalla completa oscura con destellos turquesa, mensaje de
   bienvenida a la izquierda y tarjeta de acceso a la derecha.
   Usa los tokens de index-theme.css (se carga antes que este archivo).
   ===================================================================== */

:root {
    --ixl-bg: #141B1B;
    --ixl-bg-2: #1B2626;
    --ixl-on-dark: #FFFFFF;
    --ixl-on-dark-muted: rgba(255, 255, 255, .74);   /* ~10:1 sobre el fondo */
    --ixl-glass: rgba(255, 255, 255, .06);
    --ixl-glass-border: rgba(255, 255, 255, .12);
}

html, body.ixl { height: 100%; }

body.ixl {
    margin: 0;
    min-height: 100vh;
    background: var(--ixl-bg) !important;
    color: var(--ixl-on-dark);
    overflow-x: hidden;
}

/* ---------------------------------------------------------------------
   Fondo: destellos + cuadrícula
   --------------------------------------------------------------------- */
.ixl-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background:
        radial-gradient(1200px 600px at 10% -10%, rgba(67, 193, 192, .18), transparent 60%),
        linear-gradient(160deg, var(--ixl-bg-2) 0%, var(--ixl-bg) 55%, #0F1414 100%);
    pointer-events: none;
}
.ixl-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: .55;
    will-change: transform;
    animation: ixl-drift 22s ease-in-out infinite alternate;
}
.ixl-blob.b1 { width: 520px; height: 520px; left: -120px; top: 18%; background: #2FA09D; }
.ixl-blob.b2 { width: 420px; height: 420px; left: 38%; top: -160px; background: #43C1C0; opacity: .35; animation-duration: 26s; animation-delay: -6s; }
.ixl-blob.b3 { width: 460px; height: 460px; right: -140px; bottom: -160px; background: #8EDBD9; opacity: .22; animation-duration: 30s; animation-delay: -12s; }

.ixl-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(ellipse at 30% 40%, #000 0%, transparent 70%);
            mask-image: radial-gradient(ellipse at 30% 40%, #000 0%, transparent 70%);
}

@keyframes ixl-drift {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to   { transform: translate3d(60px, -40px, 0) scale(1.12); }
}

/* ---------------------------------------------------------------------
   Estructura
   --------------------------------------------------------------------- */
.ixl-shell {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(380px, 460px);
    align-items: center;
    gap: clamp(32px, 6vw, 96px);
    max-width: 1240px;
    min-height: 100vh;
    margin: 0 auto;
    padding: 48px clamp(20px, 5vw, 64px);
    box-sizing: border-box;
}

/* ---------------------------------------------------------------------
   Mensaje de bienvenida (lado oscuro)
   --------------------------------------------------------------------- */
.ixl-hero { min-width: 0; }

.ixl-wordmark {
    display: flex;
    width: fit-content;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 40px;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--ixl-on-dark);
}
.ixl-wordmark .ixl-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--ix-primary);
    box-shadow: 0 0 0 4px rgba(67, 193, 192, .25);
    transform: translateY(-2px);
}
.ixl-wordmark small {
    font-size: 15px;
    font-weight: 600;
    color: var(--ix-secondary);
    letter-spacing: 0;
}

.ixl-eyebrow {
    display: flex;
    width: fit-content;
    align-items: center;
    gap: 8px;
    margin: 0 0 18px;
    padding: 6px 12px;
    border: 1px solid var(--ixl-glass-border);
    border-radius: 999px;
    background: var(--ixl-glass);
    color: var(--ix-secondary);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.ixl-title {
    margin: 0 0 18px;
    max-width: 14ch;
    color: var(--ixl-on-dark) !important;
    font-size: clamp(36px, 4.6vw, 58px);
    font-weight: 700;
    line-height: 1.04;
    letter-spacing: -.035em;
}
.ixl-title span {
    background: linear-gradient(90deg, #8EDBD9 0%, #43C1C0 55%, #2FA09D 100%);
    -webkit-background-clip: text;
            background-clip: text;
    color: transparent;
}

.ixl-lead {
    margin: 0 0 32px;
    max-width: 46ch;
    color: var(--ixl-on-dark-muted);
    font-size: 17px;
    line-height: 1.6;
}

.ixl-points {
    display: grid;
    gap: 14px;
    margin: 0 0 40px;
    padding: 0;
    list-style: none;
}
.ixl-points li {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--ixl-on-dark);
    font-size: 15px;
    font-weight: 500;
}
.ixl-points svg {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    padding: 7px;
    box-sizing: border-box;
    border-radius: 10px;
    background: rgba(67, 193, 192, .16);
    color: var(--ix-secondary);
}

/* Ilustración: mini panel de resultados (decorativa) */
.ixl-preview {
    position: relative;
    max-width: 520px;
    padding: 20px 22px 18px;
    border: 1px solid var(--ixl-glass-border);
    border-radius: 18px;
    background: var(--ixl-glass);
    -webkit-backdrop-filter: blur(12px);
            backdrop-filter: blur(12px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, .25);
}
.ixl-preview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}
.ixl-preview-title { font-size: 14px; font-weight: 600; color: var(--ixl-on-dark); }
.ixl-legend { display: flex; gap: 14px; font-size: 12px; color: var(--ixl-on-dark-muted); }
.ixl-legend i { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 2px; }
.ixl-legend .l1 { background: var(--ix-primary); }
.ixl-legend .l2 { background: rgba(255, 255, 255, .35); }

.ixl-bars {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: end;
    gap: 18px;
    height: 120px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--ixl-glass-border);
}
.ixl-bars > div { display: flex; align-items: flex-end; justify-content: center; gap: 5px; height: 100%; }
.ixl-bars span {
    display: block;
    width: 14px;
    border-radius: 5px 5px 2px 2px;
    transform-origin: bottom;
    animation: ixl-grow .9s cubic-bezier(.2, .8, .2, 1) both;
}
.ixl-bars span:first-child { background: linear-gradient(180deg, #8EDBD9, #2FA09D); }
.ixl-bars span:last-child { background: rgba(255, 255, 255, .28); }
.ixl-bars > div:nth-child(2) span { animation-delay: .08s; }
.ixl-bars > div:nth-child(3) span { animation-delay: .16s; }
.ixl-bars > div:nth-child(4) span { animation-delay: .24s; }
.ixl-bars > div:nth-child(5) span { animation-delay: .32s; }
.ixl-axis {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 18px;
    margin-top: 8px;
    color: var(--ixl-on-dark-muted);
    font-size: 11px;
    text-align: center;
}

@keyframes ixl-grow {
    from { transform: scaleY(0); }
    to   { transform: scaleY(1); }
}

/* ---------------------------------------------------------------------
   Tarjeta de acceso
   --------------------------------------------------------------------- */
.ixl-card {
    position: relative;
    padding: 40px 36px 32px;
    border-radius: 24px;
    background: var(--ix-light);
    color: var(--ix-text);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, .6) inset,
        0 40px 80px rgba(0, 0, 0, .35),
        0 0 0 1px rgba(255, 255, 255, .08);
    animation: ixl-rise .5s cubic-bezier(.2, .8, .2, 1) both;
}
.ixl-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 36px;
    right: 36px;
    height: 4px;
    border-radius: 0 0 6px 6px;
    background: linear-gradient(90deg, #8EDBD9, #43C1C0, #2FA09D);
}

@keyframes ixl-rise {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: none; }
}

.ixl-logo { display: block; height: 44px; width: auto; margin-bottom: 28px; }

.ixl-card h1 {
    margin: 0 0 6px;
    color: var(--ix-dark);
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -.02em;
}
.ixl-card .ixl-sub { margin: 0 0 28px; color: var(--ix-muted); font-size: 15px; }

.ixl-field { margin-bottom: 18px; }
.ixl-field > label,
.ixl-field-top label {
    display: block;
    margin: 0 0 8px;
    color: var(--ix-dark);
    font-size: 14px;
    font-weight: 600;
}
.ixl-field-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.ixl-field-top a { font-size: 13px; font-weight: 600; color: var(--ix-ink); }
.ixl-field-top a:hover { color: var(--ix-dark); text-decoration: underline; }

.ixl-input { position: relative; }
.ixl-input > svg {
    position: absolute;
    top: 50%;
    left: 14px;
    width: 18px;
    height: 18px;
    margin-top: -9px;
    color: #7A8485;
    pointer-events: none;
    transition: color .15s ease;
}
.ixl-input .form-control {
    width: 100% !important;
    height: 52px;
    padding: 12px 14px 12px 44px !important;
    border-radius: 12px !important;
    border: 1px solid #C6CDCD !important;
    background: #FAFBFB;
    font-size: 16px;   /* evita el zoom automático en iOS */
}
.ixl-input .form-control:hover { border-color: var(--ix-border-input) !important; }
.ixl-input .form-control:focus {
    background: var(--ix-light);
    border-color: var(--ix-accent) !important;
    box-shadow: 0 0 0 4px rgba(67, 193, 192, .22) !important;
}
.ixl-input:focus-within > svg { color: var(--ix-ink); }
.ixl-input.has-toggle .form-control { padding-right: 52px !important; }

.ixl-toggle {
    position: absolute;
    top: 50%;
    right: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-top: -22px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #6B7475;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}
.ixl-toggle:hover { background: var(--ix-tint); color: var(--ix-ink); }
.ixl-toggle svg { width: 20px; height: 20px; }
.ixl-toggle .eye-off { display: none; }
.ixl-toggle[aria-pressed="true"] .eye { display: none; }
.ixl-toggle[aria-pressed="true"] .eye-off { display: block; }

.ixl-hint-caps {
    display: none;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    color: #8A5A00;
    font-size: 13px;
    font-weight: 600;
}
.ixl-hint-caps.is-on { display: flex; }
.ixl-hint-caps svg { width: 16px; height: 16px; }

.ixl-error { display: block; margin-top: 8px; color: var(--ix-danger); font-size: 13px; font-weight: 600; }

.ixl-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 20px;
    padding: 12px 14px;
    border: 1px solid #F5C2BD;
    border-radius: 12px;
    background: var(--ix-danger-tint);
    color: var(--ix-danger);
    font-size: 14px;
    font-weight: 600;
}
.ixl-alert svg { flex: 0 0 18px; width: 18px; height: 18px; margin-top: 1px; }
.ixl-alert:not(:has(.ixl-alert-text:not(:empty))) { display: none; }

.ixl-submit {
    position: relative;
    width: 100%;
    height: 52px;
    margin-top: 8px;
    border-radius: 12px !important;
    font-size: 16px !important;
    letter-spacing: .01em;
}
.ixl-submit-wrap { position: relative; }
.ixl-submit-wrap .ixl-spinner {
    position: absolute;
    top: 50%;
    right: 18px;
    width: 18px;
    height: 18px;
    margin-top: -5px;
    border: 2px solid rgba(34, 34, 34, .25);
    border-top-color: var(--ix-dark);
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
    animation: ixl-spin .7s linear infinite;
}
.ixl-submit-wrap.is-loading .ixl-spinner { opacity: 1; }
.ixl-submit-wrap.is-loading .ixl-submit { pointer-events: none; opacity: .85; }

@keyframes ixl-spin { to { transform: rotate(360deg); } }

.ixl-secure {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 24px 0 0;
    padding-top: 20px;
    border-top: 1px solid var(--ix-border);
    color: var(--ix-muted);
    font-size: 13px;
}
.ixl-secure svg { width: 16px; height: 16px; color: var(--ix-ink); }

.ixl-footer {
    position: relative;
    z-index: 1;
    padding: 0 20px 24px;
    color: rgba(255, 255, 255, .6);
    font-size: 12px;
    text-align: center;
}

/* ---------------------------------------------------------------------
   Responsivo
   --------------------------------------------------------------------- */
@media (max-width: 1023.98px) {
    .ixl-shell {
        grid-template-columns: 1fr;
        align-content: start;
        gap: 28px;
        max-width: 560px;
        min-height: 0;
        padding-top: 32px;
    }
    .ixl-wordmark { margin-bottom: 24px; }
    .ixl-title { max-width: none; font-size: clamp(30px, 7vw, 42px); }
    .ixl-lead { margin-bottom: 0; font-size: 16px; }
    .ixl-points, .ixl-preview { display: none; }
}

@media (max-width: 480px) {
    .ixl-shell { padding: 24px 16px 32px; }
    .ixl-eyebrow { margin-bottom: 14px; }
    .ixl-card { padding: 32px 22px 24px; border-radius: 20px; }
    .ixl-card::before { left: 22px; right: 22px; }
    .ixl-card h1 { font-size: 23px; }
    .ixl-blob { filter: blur(60px); }
}

@media (prefers-reduced-motion: reduce) {
    .ixl-blob, .ixl-bars span, .ixl-card { animation: none !important; }
}
