body:has(.lexio-auth) {
    min-height: 100dvh;
}

body:has(.lexio-auth) main {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.lexio-auth {
    --fs-auth-header: 72px;
    background: #f4f7fb;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: calc(100dvh - var(--fs-auth-header));
    height: calc(100dvh - var(--fs-auth-header));
    padding: 0;
    overflow-x: clip;
}

.lexio-auth__wrap {
    width: 100%;
    max-width: none;
    margin: 0;
    flex: 1 1 auto;
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    background: #fff;
    border: 0;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
    min-height: 100%;
    height: 100%;
}

.lexio-auth__aside {
    position: relative;
    background: #122033;
    color: #fff;
    padding: 56px 56px 64px;
    display: flex;
    align-items: flex-end;
    min-height: 100%;
    height: 100%;
    overflow: hidden;
    isolation: isolate;
}

.lexio-auth__slides {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.lexio-auth__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.9s ease;
}

.lexio-auth__slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    will-change: transform;
}

.lexio-auth__slide--1 {
    opacity: 1;
}
.lexio-auth__slide img {
    animation: none;
}

.lexio-auth__aside::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(
        180deg,
        rgba(18, 32, 51, 0.08) 0%,
        rgba(18, 32, 51, 0.22) 38%,
        rgba(18, 32, 51, 0.72) 68%,
        rgba(18, 32, 51, 0.94) 100%
    );
}

.lexio-auth__aside-inner {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 420px;
}

@keyframes lexioAuthFadeFirst {
    0% { opacity: 1; }
    22% { opacity: 1; }
    28% { opacity: 0; }
    97% { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes lexioAuthFade {
    0% { opacity: 0; }
    6% { opacity: 1; }
    22% { opacity: 1; }
    28% { opacity: 0; }
    100% { opacity: 0; }
}

@keyframes lexioAuthZoomIn {
    0% { transform: scale(1); }
    27% { transform: scale(1.07); }
    100% { transform: scale(1.07); }
}

@keyframes lexioAuthZoomOut {
    0% { transform: scale(1.07); }
    27% { transform: scale(1); }
    100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .lexio-auth__slide,
    .lexio-auth__slide img {
        animation: none !important;
    }
    .lexio-auth__slide--1 {
        opacity: 1;
    }
    .lexio-auth__slide img {
        transform: none;
    }
}

.lexio-auth__brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.lexio-auth__aside-logo {
    height: 40px;
    width: auto;
    flex: none;
}

.lexio-auth__brand span {
    color: #fff;
    font-family: var(--font-heading, "Plus Jakarta Sans", sans-serif);
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.3px;
    line-height: 1.2;
}

.lexio-auth__aside-text {
    margin: 0;
    color: #9aa8ba;
    font-family: var(--font-body, "DM Sans", sans-serif);
    font-size: 18px;
    line-height: 1.7;
}

.lexio-auth__panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(28px, 5vw, 56px) clamp(20px, 4vw, 48px);
    background: #fff;
    min-width: 0;
    min-height: 100%;
    height: 100%;
}

.lexio-auth__card {
    width: 100%;
    max-width: 420px;
    min-width: 0;
}

.lexio-auth__head {
    margin-bottom: 28px;
}

.lexio-auth__title {
    margin: 0 0 8px;
    color: #122033;
    font-family: var(--font-heading, "Plus Jakarta Sans", sans-serif);
    font-size: clamp(28px, 3vw, 36px);
    font-weight: 600;
    letter-spacing: -1px;
    line-height: 1.15;
}

.lexio-auth__subtitle {
    margin: 0;
    color: #64748B;
    font-size: 16px;
    line-height: 1.5;
}

.lexio-auth__alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(220, 53, 69, 0.08);
    border: 1px solid rgba(220, 53, 69, 0.2);
    color: #b02a37;
    font-size: 14px;
    line-height: 1.45;
}

.lexio-auth__alert i {
    margin-top: 2px;
}

.lexio-auth__form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.lexio-auth__field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lexio-auth__field label {
    margin: 0;
    color: #122033;
    font-size: 14px;
    font-weight: 600;
}

.lexio-auth__field input {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid #e3ebf6;
    border-radius: 12px;
    background: #f8fafc;
    color: #122033;
    font-family: var(--font-body, "DM Sans", sans-serif);
    font-size: 16px;
    line-height: 1.4;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.lexio-auth__field input::placeholder {
    color: #94a3b8;
    font-style: normal;
}

.lexio-auth__field input:focus {
    outline: none;
    border-color: #1A6AFF;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(26, 106, 255, 0.12);
}

.lexio-auth__password {
    position: relative;
}

.lexio-auth__password input {
    padding-right: 48px;
}

.lexio-auth__eye {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #64748B;
    cursor: pointer;
}

.lexio-auth__eye:hover,
.lexio-auth__eye:focus-visible {
    color: #1A6AFF;
    background: rgba(26, 106, 255, 0.08);
}

.lexio-auth__actions {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 8px;
}

.lexio-auth__submit {
    width: 100%;
}

.lexio-auth__link {
    text-align: center;
    color: #64748B;
    text-decoration: none;
    font-size: 14px;
}

.lexio-auth__link:hover,
.lexio-auth__link:focus-visible {
    color: #1A6AFF;
}

.lexio-auth__footer {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e3ebf6;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
}

.lexio-auth__footer p {
    margin: 0;
    text-align: center;
    color: #64748B;
    font-size: 14px;
}

.lexio-auth__footer .btn {
    width: 100%;
}

@media (max-width: 991.98px) {
    .lexio-auth {
        height: auto;
        min-height: calc(100dvh - var(--fs-auth-header));
        background: #122033;
    }

    .lexio-auth__wrap {
        position: relative;
        display: block;
        height: auto;
        min-height: calc(100dvh - var(--fs-auth-header));
        background: #122033;
        overflow: hidden;
    }

    .lexio-auth__aside {
        display: flex;
        position: absolute;
        inset: 0;
        z-index: 0;
        padding: 0;
        height: auto;
        min-height: 100%;
        pointer-events: none;
    }

    .lexio-auth__aside-inner {
        display: none;
    }

    .lexio-auth__aside::after {
        background: linear-gradient(
            180deg,
            rgba(18, 32, 51, 0.35) 0%,
            rgba(18, 32, 51, 0.72) 42%,
            rgba(18, 32, 51, 0.94) 100%
        );
    }

    .lexio-auth__panel {
        position: relative;
        z-index: 2;
        padding: 28px 20px 48px;
        align-items: center;
        justify-content: center;
        min-height: calc(100dvh - var(--fs-auth-header));
        height: auto;
        background: transparent;
    }

    .lexio-auth__card {
        max-width: 440px;
        margin: 0 auto;
        width: 100%;
        padding: 28px 24px;
        border-radius: 20px;
        border: 1px solid rgba(154, 168, 186, 0.22);
        background: rgba(255, 255, 255, 0.96);
        backdrop-filter: blur(16px) saturate(1.2);
        -webkit-backdrop-filter: blur(16px) saturate(1.2);
        box-shadow: 0 18px 48px rgba(18, 32, 51, 0.16);
    }

    .lexio-auth__head {
        margin-bottom: 24px;
    }

    .lexio-auth__title {
        font-size: clamp(26px, 7vw, 32px);
        color: #122033;
    }

    .lexio-auth__subtitle {
        font-size: 15px;
        color: #64748b;
    }

    .lexio-auth__field label {
        color: #122033;
    }

    .lexio-auth__field input {
        border-color: #d6deea;
        background: #fff;
        color: #122033;
    }

    .lexio-auth__field input::placeholder {
        color: #94a3b8;
    }

    .lexio-auth__field input:focus {
        border-color: #1A6AFF;
        background: #fff;
        box-shadow: 0 0 0 4px rgba(26, 106, 255, 0.16);
    }

    .lexio-auth__eye {
        color: #64748b;
    }

    .lexio-auth__eye:hover,
    .lexio-auth__eye:focus-visible {
        color: #1a6aff;
        background: rgba(26, 106, 255, 0.08);
    }

    .lexio-auth__link {
        color: #1a6aff;
    }

    .lexio-auth__link:hover,
    .lexio-auth__link:focus-visible {
        color: #0d4fb8;
    }

    .lexio-auth__alert {
        background: rgba(220, 53, 69, 0.08);
        border-color: rgba(220, 53, 69, 0.2);
        color: #b02a37;
    }

    .lexio-auth__footer {
        border-top-color: #e3ebf6;
    }

    .lexio-auth__footer p {
        color: #64748b;
    }

    .lexio-auth__footer .btn-outline-primary {
        color: #1a6aff;
        border-color: #1a6aff;
        background: #fff;
    }

    .lexio-auth__footer .btn-outline-primary:hover,
    .lexio-auth__footer .btn-outline-primary:focus-visible {
        color: #fff;
        border-color: #1a6aff;
        background: #1a6aff;
    }
}

@media (max-width: 575.98px) {
    .lexio-auth__panel {
        padding: 20px 16px 36px;
    }

    .lexio-auth__card {
        padding: 24px 18px;
        border-radius: 18px;
    }

    .lexio-auth__field input {
        font-size: 16px; /* evita zoom iOS */
    }

    .lexio-auth__footer {
        margin-top: 24px;
        padding-top: 20px;
    }
}
