/* ============================================================================
   ANDERCODE — AUTENTICACIÓN
   Login y registro con una misma experiencia visual.
============================================================================ */

:root {
    --auth-primary: #7c3aed;
    --auth-primary-dark: #5b21b6;
    --auth-primary-soft: #f5f0ff;
    --auth-ink: #18181b;
    --auth-muted: #6b6875;
    --auth-border: #e9e5f0;
    --auth-soft: #faf9fc;
    --auth-dark: #17141f;
    --auth-radius-lg: 30px;
    --auth-radius-md: 18px;
    --auth-shadow: 0 24px 70px rgba(35, 26, 54, .10);
}

.auth-page {
    position: relative;
    min-height: calc(100vh - 150px);
    padding: 4.5rem 0;
    background:
        radial-gradient(circle at 88% 12%, rgba(124, 58, 237, .15), transparent 28%),
        radial-gradient(circle at 10% 90%, rgba(99, 102, 241, .08), transparent 30%),
        linear-gradient(180deg, #fbfaff 0%, #ffffff 100%);
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(460px, 1.1fr);
    max-width: 1080px;
    min-height: 620px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: var(--auth-radius-lg);
    background: #fff;
    border: 1px solid var(--auth-border);
    box-shadow: var(--auth-shadow);
}

.auth-brand-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100%;
    padding: 2.6rem;
    color: #fff;
    overflow: hidden;
    background:
        radial-gradient(circle at 85% 10%, rgba(124, 58, 237, .52), transparent 31%),
        radial-gradient(circle at 5% 95%, rgba(99, 102, 241, .22), transparent 34%),
        var(--auth-dark);
}

.auth-brand-panel::after {
    content: "</>";
    position: absolute;
    right: -1.2rem;
    bottom: -2.4rem;
    color: rgba(255,255,255,.035);
    font-size: 11rem;
    font-weight: 900;
    line-height: 1;
    pointer-events: none;
}

.auth-brand-logo {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    width: fit-content;
    color: #fff;
    font-size: 1.25rem;
    font-weight: 850;
    letter-spacing: -.025em;
}

.auth-brand-logo:hover {
    color: #fff;
    text-decoration: none;
}

.auth-brand-logo i {
    color: #c4b5fd;
}

.auth-brand-copy {
    position: relative;
    z-index: 1;
    margin: 3rem 0;
}

.auth-brand-kicker {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    margin-bottom: 1rem;
    padding: .45rem .68rem;
    border-radius: 999px;
    color: #d8ccff;
    background: rgba(196,181,253,.11);
    border: 1px solid rgba(196,181,253,.12);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.auth-brand-copy h1 {
    margin-bottom: 1rem;
    color: #fff;
    font-size: clamp(2.25rem, 4vw, 3.65rem);
    line-height: 1.02;
    letter-spacing: -.05em;
    font-weight: 900;
}

.auth-brand-copy p {
    max-width: 470px;
    margin-bottom: 0;
    color: rgba(255,255,255,.68);
    line-height: 1.75;
}

.auth-benefits {
    position: relative;
    z-index: 1;
    display: grid;
    gap: .85rem;
    margin-top: 1.6rem;
}

.auth-benefit {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    color: rgba(255,255,255,.76);
    font-size: .88rem;
    line-height: 1.5;
}

.auth-benefit i {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    border-radius: 10px;
    color: #c4b5fd;
    background: rgba(255,255,255,.07);
}

.auth-brand-foot {
    position: relative;
    z-index: 1;
    color: rgba(255,255,255,.38);
    font-size: .76rem;
}

.auth-form-panel {
    display: flex;
    align-items: center;
    padding: 3rem clamp(2rem, 5vw, 4.3rem);
}

.auth-form-wrap {
    width: 100%;
    max-width: 470px;
    margin: 0 auto;
}

.auth-form-kicker {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    margin-bottom: .8rem;
    color: var(--auth-primary);
    font-size: .76rem;
    font-weight: 850;
    letter-spacing: .065em;
    text-transform: uppercase;
}

.auth-form-title {
    margin-bottom: .65rem;
    color: var(--auth-ink);
    font-size: clamp(2rem, 4vw, 2.85rem);
    line-height: 1.08;
    letter-spacing: -.045em;
    font-weight: 900;
}

.auth-form-lead {
    margin-bottom: 1.8rem;
    color: var(--auth-muted);
    line-height: 1.65;
}

.auth-field {
    margin-bottom: 1.05rem;
}

.auth-label {
    display: block;
    margin-bottom: .45rem;
    color: #37323d;
    font-size: .85rem;
    font-weight: 750;
}

.auth-input-wrap {
    position: relative;
}

.auth-input-icon {
    position: absolute;
    top: 50%;
    left: 1rem;
    z-index: 2;
    transform: translateY(-50%);
    color: #9a96a3;
    pointer-events: none;
}

.auth-control {
    min-height: 50px;
    padding: .75rem 1rem .75rem 2.75rem;
    border-radius: 13px;
    border: 1px solid var(--auth-border);
    color: var(--auth-ink);
    background: #fff;
    box-shadow: none;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.auth-control:focus {
    border-color: rgba(124,58,237,.5);
    box-shadow: 0 0 0 .22rem rgba(124,58,237,.08);
}

.auth-control.is-invalid {
    border-color: #dc3545;
}

.auth-password-control {
    padding-right: 3rem;
}

.auth-password-toggle {
    position: absolute;
    top: 50%;
    right: .65rem;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    color: #8b8792;
    background: transparent;
    transform: translateY(-50%);
}

.auth-password-toggle:hover {
    color: var(--auth-primary);
    background: var(--auth-primary-soft);
}

.auth-error {
    display: block;
    margin-top: .4rem;
    color: #dc3545;
    font-size: .78rem;
}

.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: .2rem 0 1.35rem;
}

.auth-check {
    display: flex;
    align-items: center;
    gap: .5rem;
    color: var(--auth-muted);
    font-size: .84rem;
}

.auth-check input {
    width: 17px;
    height: 17px;
    accent-color: var(--auth-primary);
}

.auth-submit {
    min-height: 52px;
    width: 100%;
    border: 0;
    border-radius: 13px;
    color: #fff;
    background: linear-gradient(135deg, var(--auth-primary), #6930d8);
    font-weight: 800;
    box-shadow: 0 12px 24px rgba(124,58,237,.18);
    transition: transform .2s ease, box-shadow .2s ease;
}

.auth-submit:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(124,58,237,.24);
}

.auth-switch {
    margin-top: 1.5rem;
    padding-top: 1.35rem;
    border-top: 1px solid var(--auth-border);
    text-align: center;
    color: var(--auth-muted);
    font-size: .88rem;
}

.auth-switch a {
    color: var(--auth-primary-dark);
    font-weight: 800;
}

.auth-switch a:hover {
    color: var(--auth-primary);
}

.auth-trust-note {
    display: flex;
    align-items: flex-start;
    gap: .55rem;
    margin-top: 1.15rem;
    color: #918d98;
    font-size: .75rem;
    line-height: 1.5;
}

.auth-trust-note i {
    margin-top: .15rem;
    color: var(--auth-primary);
}

@media (max-width: 991.98px) {
    .auth-page {
        padding: 3.5rem 0;
    }

    .auth-shell {
        grid-template-columns: 1fr;
        max-width: 680px;
        min-height: 0;
    }

    .auth-brand-panel {
        min-height: auto;
        padding: 2rem;
    }

    .auth-brand-copy {
        margin: 2rem 0 1rem;
    }

    .auth-benefits {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .auth-brand-foot {
        display: none;
    }

    .auth-form-panel {
        padding: 2.6rem 2rem;
    }
}

@media (max-width: 575.98px) {
    .auth-page {
        padding: 1.5rem 0 2.5rem;
    }

    .auth-shell {
        margin-left: .75rem;
        margin-right: .75rem;
        border-radius: 22px;
    }

    .auth-brand-panel {
        padding: 1.5rem;
    }

    .auth-brand-copy h1 {
        font-size: 2.25rem;
    }

    .auth-brand-copy p {
        font-size: .9rem;
    }

    .auth-benefits {
        grid-template-columns: 1fr;
    }

    .auth-form-panel {
        padding: 2rem 1.35rem;
    }

    .auth-form-title {
        font-size: 2rem;
    }
}
