/* Layout compartido para login y registro. */
html,
body {
    min-height: 100%;
}

body {
    height: auto;
    min-height: 100vh;
    min-height: 100svh;
    overflow-x: hidden;
}

.auth-shell {
    height: auto;
    min-height: 100vh;
    min-height: 100svh;
}

.auth-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.left,
.right {
    flex: 1 1 50%;
    height: auto;
    min-height: 100vh;
    min-height: 100svh;
    min-width: 0;
}

.left {
    padding: clamp(1.5rem, 4vw, 4rem);
}

.form-box {
    width: min(70%, 34rem);
}

.right {
    padding: clamp(1.5rem, 4vw, 3rem);
}

.right h1 {
    font-size: clamp(2.4rem, 5vw, 3.75rem);
    line-height: 1.1;
}

.illustration {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
}

.illustration img {
    display: block;
    width: min(600px, 100%);
    height: auto;
    max-height: 45vh;
    object-fit: contain;
}

.input-group > input:not([type='checkbox']):not([type='hidden']),
.input-group > select {
    flex: 1 1 0%;
    min-width: 0;
}

@media (max-width: 900px) {
    .auth-shell {
        flex-direction: column;
    }

    .right {
        order: -1;
        flex: 0 0 auto;
        width: 100%;
        min-height: 64px;
        padding: 14px 20px;
        overflow: visible;
    }

    .right h1 {
        margin: 0;
        font-size: clamp(1rem, 3vw, 1.3rem);
        letter-spacing: 0.12em;
    }

    .right h1 br,
    .illustration {
        display: none;
    }

    .left {
        flex: 1 0 auto;
        width: 100%;
        min-height: calc(100vh - 64px);
        min-height: calc(100svh - 64px);
        padding: clamp(1.5rem, 5vw, 2.75rem) clamp(1rem, 5vw, 2rem);
        align-items: flex-start;
    }

    .form-box {
        width: min(100%, 30rem);
        margin: auto;
    }

    .description {
        margin-bottom: 1.5rem;
        line-height: 1.5;
    }

    .options {
        align-items: center;
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .options label {
        display: flex;
        align-items: center;
        gap: 0.4rem;
    }

    .options a {
        margin-left: auto;
    }
}

@media (max-width: 600px) {
    .right {
        min-height: 56px;
        padding: 12px 16px;
    }

    .left {
        min-height: calc(100vh - 56px);
        min-height: calc(100svh - 56px);
        padding: 24px 16px calc(24px + env(safe-area-inset-bottom, 0px));
    }

    .form-box {
        width: 100%;
    }

    .description {
        margin-bottom: 1.25rem;
        font-size: 0.93rem;
    }

    h3 {
        margin-bottom: 1rem;
        font-size: 1.4rem;
    }

    .input-group {
        min-height: 48px;
        margin-bottom: 12px;
    }

    .options {
        align-items: flex-start;
    }

    .btn {
        min-height: 48px;
    }

    .register {
        line-height: 1.5;
    }
}

@media (max-width: 380px) {
    .options {
        align-items: flex-start;
        flex-direction: column;
    }

    .options a {
        margin-left: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .form-box,
    .illustration img {
        animation: none;
        transition: none;
    }
}
