* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    display: flex;
    min-height: 100vh;
    background: #fff;
    -webkit-font-smoothing: antialiased;
}

.auth-aside {
    flex:
        0
        0
        clamp(
            320px,
            36vw,
            460px
        );

    width: auto;
    min-width: 0;

    background: linear-gradient(
        160deg,
        #4A0B52 0%,
        #5B126B 55%,
        #741484 100%
    );

    padding: 3rem 2.75rem;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    position: relative;

    overflow: hidden;
}

.auth-aside::before {
    content: '';
    position: absolute;
    top: -110px;
    right: -90px;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    background: rgba(180, 85, 183, 0.14);
}

.auth-aside::after {
    content: '';
    position: absolute;
    bottom: -90px;
    left: -70px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: rgba(227, 63, 145, 0.12);
}

.auth-brand {
    position: relative;
    z-index: 1;
}

.auth-logo {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.6rem;
}

.auth-logo svg {
    width: 28px;
    height: 28px;
    stroke: #fff;
}

.auth-name {
    font-family: 'Sora', sans-serif;
    font-size: 2.05rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    letter-spacing: -0.02em;
}

.auth-tagline {
    font-size: 0.84rem;
    color: rgba(255, 255, 255, 0.62);
    margin-top: 0.5rem;
    font-weight: 300;
}

.auth-quote {
    position: relative;
    z-index: 1;
}

.auth-quote-line {
    width: 38px;
    height: 3px;
    background: var(--pink);
    border-radius: 3px;
    margin-bottom: 1.1rem;
}

.auth-quote p {
    font-family: 'Sora', sans-serif;
    font-size: 1.12rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    font-weight: 300;
}

.auth-quote span {
    display: block;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.45);
    margin-top: 0.85rem;
    letter-spacing: 0.04em;
}

.auth-dots {
    display: flex;
    gap: 7px;
    position: relative;
    z-index: 1;
}

.auth-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    transition: all 0.3s;
}

.auth-dot.active {
    background: #fff;
    width: 24px;
    border-radius: 4px;
}

.auth-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem;
    background: #fff;
    overflow-y: auto;
}

.auth-form {
    width: 100%;
    max-width: 400px;
}

.auth-form.wide {
    max-width: 520px;
}

.auth-title {
    font-family: 'Sora', sans-serif;
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.35rem;
    letter-spacing: -0.02em;
    text-align: center;
}

.auth-subtitle {
    font-size: 0.88rem;
    color: var(--text2);
    margin-bottom: 2rem;
    text-align: center;
}

.pw-wrap {
    position: relative;
}

.pw-wrap .form-input {
    padding-right: 46px;
}

.pw-eye {
    position: absolute;
    right: 13px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text3);
    padding: 0;
    display: flex;
    align-items: center;
}

.pw-eye svg {
    width: 18px;
    height: 18px;
    stroke-width: 1.8;
}

.pw-eye:hover {
    color: var(--primary);
}

.auth-link-inline {
    display: block;
    text-align: center;
    font-size: 0.8rem;
    color: var(--primary);
    margin-top: 0.9rem;
    font-weight: 500;
    transition: opacity var(--transition);
}

.auth-link-inline:hover {
    opacity: 0.7;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 13px;
    margin: 1.35rem 0;
}

.auth-divider-line {
    flex: 1;
    height: 1px;
    background: #ede9f5;
}

.auth-divider-text {
    font-size: 0.72rem;
    color: var(--text3);
}

.btn-google {
    width: 100%;
    padding: 12px;
    background: #fff;
    border: 1.5px solid #e8e2f0;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    color: var(--dark);
    transition: all var(--transition);
}

.btn-google:hover {
    border-color: #d0c8e0;
    box-shadow: var(--shadow-sm);
}

.auth-foot {
    text-align: center;
    font-size: 0.82rem;
    color: var(--text2);
    margin-top: 1.25rem;
}

.auth-foot a {
    color: var(--primary);
    font-weight: 500;
}

.auth-foot a:hover {
    text-decoration: underline;
}

.strength-wrap {
    margin-top: 7px;
}

.strength-bar {
    height: 4px;
    background: #ede9f5;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 4px;
}

.strength-fill {
    height: 100%;
    border-radius: 4px;
    width: 0;
    transition: width 0.3s, background 0.3s;
}

.strength-text {
    font-size: 0.7rem;
    color: var(--text3);
}

.pw-hint {
    font-size: 0.7rem;
    color: var(--text3);
    margin-top: 5px;
    line-height: 1.5;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: var(--radius);
    padding: 2.5rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
}

.auth-card-icon {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.3rem;
}

.auth-card-icon svg {
    width: 26px;
    height: 26px;
    stroke-width: 1.8;
}

.auth-card-icon.purple {
    background: rgba(116, 20, 132, 0.08);
    color: var(--primary);
}

.auth-card-icon.green {
    background: rgba(10, 140, 77, 0.1);
    color: var(--green);
}

.auth-card-title {
    font-family: 'Sora', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dark);
    text-align: center;
    margin-bottom: 0.4rem;
}

.auth-card-sub {
    font-size: 0.82rem;
    color: var(--text2);
    text-align: center;
    line-height: 1.6;
    margin-bottom: 1.6rem;
}

.info-box {
    background: rgba(10, 140, 77, 0.06);
    border: 1px solid rgba(10, 140, 77, 0.15);
    border-radius: var(--radius-sm);
    padding: 0.9rem 1rem;
    margin-bottom: 1.3rem;
    font-size: 0.8rem;
    color: var(--text2);
    line-height: 1.6;
}

.info-box strong {
    color: var(--green);
    font-weight: 600;
}
/*
|--------------------------------------------------------------------------
| Imagen de marca
|--------------------------------------------------------------------------
*/

.auth-brand-image {
    width: 100%;
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.auth-brand-logo {
    width: 100%;
    max-width: 430px;
    height: auto;
    display: block;
    object-fit: contain;
    object-position: left center;
    filter: drop-shadow(
        0 8px 18px rgba(0, 0, 0, 0.16)
    );
}

/*
|--------------------------------------------------------------------------
| Marca compacta móvil
|--------------------------------------------------------------------------
*/

.auth-mobile-brand {
    display: none;
}

.auth-mobile-brand-logo {
    display: block;

    width: 100%;
    max-width: 220px;
    height: auto;

    object-fit: contain;
}


.field-error {
    display: none;
    font-size: 0.74rem;
    color: var(--red);
    margin-top: 5px;
    line-height: 1.4;
}

.field-error.show {
    display: block;
    animation: fadeUp 0.2s ease;
}

.form-input.input-error,
.form-select.input-error {
    border-color: var(--red);
}

.form-input.input-error:focus,
.form-select.input-error:focus {
    box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.1);
}

.form-input.input-ok,
.form-select.input-ok {
    border-color: var(--green);
}

.form-input.input-ok:focus,
.form-select.input-ok:focus {
    box-shadow: 0 0 0 3px rgba(10, 140, 77, 0.1);
}

.pw-checklist {
    list-style: none;
    margin: 0.7rem 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px 14px;
}

.pw-checklist li {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.72rem;
    color: var(--text3);
    transition: color 0.2s;
}

.pw-check-dot {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    border: 1.5px solid #d2cae0;
    flex-shrink: 0;
    position: relative;
    transition: all 0.2s;
}

.pw-checklist li.done {
    color: var(--green);
}

.pw-checklist li.done .pw-check-dot {
    background: var(--green);
    border-color: var(--green);
}

.pw-checklist li.done .pw-check-dot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -55%) rotate(45deg);
    width: 3px;
    height: 6px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
}

/*
|--------------------------------------------------------------------------
| Login + footer
|--------------------------------------------------------------------------
*/

.auth-main-login {
    flex-direction: column;

    min-width: 0;
    min-height: 100vh;

    padding-bottom: 0;
}

.auth-form-login {
    margin:
        auto
        0;
}

.auth-footer {
    width: 100%;

    margin-top: 1.5rem;
}


/*
|--------------------------------------------------------------------------
| Registro
|--------------------------------------------------------------------------
*/

.auth-main-register {
    flex-direction: column;

    min-width: 0;
    min-height: 100vh;

    padding-bottom: 0;
}

.auth-form-register {
    margin:
        2.5rem
        auto;
}

.auth-main-register
.auth-footer {
    margin-top: auto;
}

/*
|--------------------------------------------------------------------------
| Pantallas de autenticación compactas
|--------------------------------------------------------------------------
*/

.auth-main-compact {
    flex-direction: column;

    min-width: 0;
    min-height: 100vh;

    padding-bottom: 0;
}

.auth-form-compact {
    width: 100%;
    max-width: 420px;

    margin:
        auto
        0;
}

.auth-main-compact
.auth-footer {
    width: 100%;

    margin-top: auto;
}

/*
|--------------------------------------------------------------------------
| Tablet
|--------------------------------------------------------------------------
*/

@media (
    min-width: 701px
) and (
    max-width: 1100px
) {

    .auth-aside {
        padding:
            2.25rem
            1.75rem;
    }

    .auth-brand-image {
        justify-content: center;
    }

    .auth-brand-logo {
        max-width: 300px;

        object-position: center;
    }

    .auth-quote p {
        font-size: 0.95rem;
        line-height: 1.55;
    }

    .auth-main {
        padding:
            2rem
            2.2rem;
    }

    .auth-form {
        max-width: 420px;
    }

    .auth-form.wide {
        max-width: 520px;
    }
    .auth-main-compact {
        padding:
            0
            2.2rem;
    }

    .auth-form-compact {
        max-width: 420px;

        margin:
            auto
            0;
    }

    .auth-main-compact
    .auth-footer {
        width:
            calc(
                100% + 4.4rem
            );

        margin:
            auto
            -2.2rem
            0;
    }


    /*
    |--------------------------------------------------------------------------
    | Registro tablet
    |--------------------------------------------------------------------------
    */

    .auth-main-register {
        justify-content: flex-start;

        padding:
            0
            2rem;
    }

    .auth-form-register {
        width: 100%;
        max-width: 560px;

        margin:
            2.25rem
            auto;
    }

    .auth-main-register
    .auth-footer {
        width:
            calc(
                100% + 4rem
            );

        margin:
            auto
            -2rem
            0;
    }
}


/*
|--------------------------------------------------------------------------
| Móvil
|--------------------------------------------------------------------------
*/

@media (max-width: 700px) {

    body {
        width: 100%;

        min-height: 100vh;
        min-height: 100dvh;

        overflow-x: hidden;

        background: #fff;
    }

    /*
    |--------------------------------------------------------------------------
    | Panel institucional
    |--------------------------------------------------------------------------
    */

    .auth-aside {
        display: none;
    }


    /*
    |--------------------------------------------------------------------------
    | Elementos comunes
    |--------------------------------------------------------------------------
    */

    .auth-title {
        font-size: 1.5rem;
        line-height: 1.25;
    }

    .auth-subtitle {
        margin-bottom: 1.6rem;

        font-size: 0.86rem;
        line-height: 1.55;
    }

    .form-input,
    .form-select {
        /*
         * Evita zoom automático de Safari
         * al enfocar campos en iPhone.
         */
        font-size: 16px;
    }

    .btn-full {
        min-height: 46px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .auth-link-inline {
        margin-top: 0.85rem;

        font-size: 0.82rem;
    }

    .auth-foot {
        margin-top: 1rem;

        font-size: 0.8rem;
        line-height: 1.5;
    }

    .pw-checklist {
        grid-template-columns: 1fr;
    }


    /*
    |--------------------------------------------------------------------------
    | Marca móvil
    |--------------------------------------------------------------------------
    */

    .auth-mobile-brand {
        display: flex;
        align-items: center;
        justify-content: center;

        width: 100%;

        margin-bottom: 1.6rem;

        padding: 0;
    }

    .auth-mobile-brand-logo {
        display: block;

        width: min(
            210px,
            62vw
        );

        max-width: 210px;
        height: auto;

        object-fit: contain;
    }


    /*
    |--------------------------------------------------------------------------
    | Footer móvil
    |--------------------------------------------------------------------------
    */

    .auth-footer {
        flex-shrink: 0;

        padding:
            0.65rem
            1rem;
    }

    .auth-footer
    .app-footer-inner {
        flex-direction: column;

        gap: 0.35rem;

        text-align: center;
    }

    .auth-footer
    .app-footer-text {
        font-size: 0.65rem;
        line-height: 1.4;
    }

    .auth-footer
    .app-footer-logo {
        height: 25px;
    }


    /*
    |--------------------------------------------------------------------------
    | Login móvil
    |--------------------------------------------------------------------------
    */

    .auth-main-login {
        display: flex;
        flex-direction: column;

        width: 100%;

        min-height: 100vh;
        min-height: 100dvh;

        padding:
            0
            1.25rem;

        overflow: visible;
    }

    .auth-form-login {
        width: 100%;
        max-width: 420px;

        /*
         * Centra logo + formulario
         * dentro del espacio disponible.
         */
        margin:
            auto
            auto;

        padding:
            1.5rem
            0;
    }

    .auth-main-login
    .auth-footer {
        width:
            calc(
                100% + 2.5rem
            );

        margin:
            0
            -1.25rem;
    }


    /*
    |--------------------------------------------------------------------------
    | Registro móvil
    |--------------------------------------------------------------------------
    */

    .auth-main-register {
        display: flex;
        flex-direction: column;

        width: 100%;

        min-height: 100vh;
        min-height: 100dvh;

        padding:
            0
            1.25rem;

        overflow: visible;
    }

    .auth-form-register {
        width: 100%;
        max-width: 440px;

        /*
         * El registro es largo.
         * Debe comenzar desde arriba,
         * no centrarse verticalmente.
         */
        margin:
            0
            auto;

        padding:
            1.5rem
            0
            2rem;
    }

    .auth-form-register
    .auth-mobile-brand {
        margin-bottom: 1.25rem;
    }

    .auth-form-register
    .auth-mobile-brand-logo {
        width: min(
            190px,
            58vw
        );
    }

    .auth-main-register
    .auth-title,
    .auth-main-register
    .auth-subtitle {
        text-align: center;
    }

    .auth-main-register
    .auth-footer {
        width:
            calc(
                100% + 2.5rem
            );

        margin:
            auto
            -1.25rem
            0;

        padding:
            0.7rem
            1rem;
    }

     /*
    |--------------------------------------------------------------------------
    | Pantallas compactas móvil
    |--------------------------------------------------------------------------
    */

    .auth-main-compact {
        display: flex;
        flex-direction: column;

        width: 100%;

        min-height: 100vh;
        min-height: 100dvh;

        padding:
            0
            1.25rem;

        overflow: visible;
    }

    .auth-form-compact {
        width: 100%;
        max-width: 420px;

        margin:
            auto
            auto;

        padding:
            1.5rem
            0;
    }

    .auth-form-compact
    .auth-mobile-brand {
        margin-bottom: 1.35rem;
    }

    .auth-form-compact
    .auth-mobile-brand-logo {
        width: min(
            190px,
            58vw
        );
    }

    .auth-main-compact
    .auth-footer {
        width:
            calc(
                100% + 2.5rem
            );

        margin:
            0
            -1.25rem;
    }
}


/*
|--------------------------------------------------------------------------
| Teléfonos pequeños
|--------------------------------------------------------------------------
*/

@media (max-width: 420px) {

    .auth-mobile-brand-logo {
        width: min(
            190px,
            62vw
        );
    }

    auth-main-compact {
        padding:
            0
            1rem;
    }

    .auth-form-compact {
        padding:
            1.25rem
            0;
    }

    .auth-main-compact
    .auth-footer {
        width:
            calc(
                100% + 2rem
            );

        margin:
            0
            -1rem;
    }


    /*
    |--------------------------------------------------------------------------
    | Login
    |--------------------------------------------------------------------------
    */

    .auth-main-login {
        padding:
            0
            1rem;
    }

    .auth-form-login {
        padding:
            1.25rem
            0;
    }

    .auth-main-login
    .auth-footer {
        width:
            calc(
                100% + 2rem
            );

        margin:
            0
            -1rem;
    }


    /*
    |--------------------------------------------------------------------------
    | Registro
    |--------------------------------------------------------------------------
    */

    .auth-main-register {
        padding:
            0
            1rem;
    }

    .auth-form-register {
        padding:
            1.25rem
            0
            1.75rem;
    }

    .auth-main-register
    .auth-footer {
        width:
            calc(
                100% + 2rem
            );

        margin:
            auto
            -1rem
            0;
    }


    /*
    |--------------------------------------------------------------------------
    | Tipografía
    |--------------------------------------------------------------------------
    */

    .auth-title {
        font-size: 1.4rem;
    }

    .auth-subtitle {
        margin-bottom: 1.4rem;
    }
}