/* =====================================================================
   Pantallas de acceso (Login / Registro) - morado + blanco
   ===================================================================== */

:root {
    --primary: #6c2bd9;
    --primary-dark: #4b1ca8;
    --primary-darker: #35127a;
    --primary-light: #8f5de8;
    --white: #ffffff;
    --background: #f7f5fc;
    --text: #241b3a;
    --text-muted: #6b6180;
    --border: #e4dcf7;
    --danger: #d9455f;
}

* {
    box-sizing: border-box;
}

body.auth-body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    font-family: "Segoe UI", Roboto, Tahoma, Geneva, Verdana, sans-serif;
    background: radial-gradient(circle at top left, var(--primary-light), transparent 55%),
                radial-gradient(circle at bottom right, var(--primary-dark), transparent 55%),
                linear-gradient(135deg, var(--primary-darker), var(--primary-dark));
    background-attachment: fixed;
}

.auth-wrapper {
    width: 100%;
    max-width: 960px;
    background: var(--white);
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(28, 10, 66, .35);
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1fr;
    animation: fadeIn .5s ease;
}

.auth-wrapper.single {
    grid-template-columns: 1fr;
    max-width: 460px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-side {
    background: linear-gradient(160deg, var(--primary-dark), var(--primary));
    color: var(--white);
    padding: 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

    .auth-side::before {
        content: "";
        position: absolute;
        width: 220px;
        height: 220px;
        border-radius: 50%;
        background: rgba(255, 255, 255, .08);
        top: -60px;
        right: -60px;
    }

    .auth-side .brand-icon {
        width: 54px;
        height: 54px;
        border-radius: 14px;
        background: rgba(255, 255, 255, .18);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.6rem;
        margin-bottom: 1.5rem;
    }

    .auth-side h2 {
        font-weight: 800;
        font-size: 1.6rem;
        margin-bottom: .75rem;
    }

    .auth-side p {
        color: rgba(255, 255, 255, .85);
        margin-bottom: 0;
    }

.auth-form {
    padding: 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

    .auth-form h4 {
        font-weight: 800;
        color: var(--text);
        margin-bottom: .3rem;
    }

    .auth-form .auth-subtitle {
        color: var(--text-muted);
        margin-bottom: 1.75rem;
    }

    .auth-form label {
        font-weight: 600;
        color: var(--text);
        margin-bottom: .35rem;
        display: block;
    }

    .auth-form .form-control {
        border-radius: 9px;
        border: 1px solid var(--border);
        padding: .65rem .9rem;
    }

        .auth-form .form-control:focus {
            border-color: var(--primary-light);
            box-shadow: 0 0 0 .2rem rgba(108, 43, 217, .15);
            outline: none;
        }

.btn-auth {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    border: none;
    color: var(--white);
    font-weight: 700;
    padding: .7rem 1rem;
    border-radius: 9px;
    transition: filter .15s ease, transform .15s ease;
}

    .btn-auth:hover {
        filter: brightness(1.08);
        transform: translateY(-1px);
        color: var(--white);
    }

.btn-loading {
    pointer-events: none;
    opacity: 0.75;
}

.auth-link {
    text-align: center;
    margin-top: 1.25rem;
    color: var(--text-muted);
}

    .auth-link a {
        color: var(--primary-dark);
        font-weight: 700;
        text-decoration: none;
    }

        .auth-link a:hover {
            text-decoration: underline;
        }

.auth-back {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    color: rgba(255, 255, 255, .85);
    text-decoration: none;
    font-size: .9rem;
    margin-top: 2rem;
}

    .auth-back:hover {
        color: var(--white);
    }

.validation-summary-errors {
    background: #fdeef0;
    border: 1px solid #f6c6cf;
    color: var(--danger);
    border-radius: 9px;
    padding: .75rem 1rem;
    margin-bottom: 1.25rem;
    font-size: .9rem;
}

    .validation-summary-errors ul {
        margin: 0;
        padding-left: 1.1rem;
    }

.field-validation-error,
.text-danger {
    color: var(--danger);
    font-size: .85rem;
    display: block;
    margin-top: .25rem;
}

@media (max-width: 767.98px) {
    .auth-wrapper {
        grid-template-columns: 1fr;
    }

    .auth-side {
        display: none;
    }

    .auth-form {
        padding: 2.25rem 1.5rem;
    }
}
