/* Login rediseñado */
.auth-body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Figtree', system-ui, sans-serif;
    background: #f4f1fa;
    color: #1c2430;
}

.auth-body #page-loader {
    background: rgba(244, 241, 250, .9);
}

.auth-body #page-loader .spinner {
    border-top-color: #4b3c8c;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
}

.auth-visual {
    position: relative;
    min-height: 100vh;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.auth-visual__overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(145deg, rgba(36, 28, 69, .88) 0%, rgba(75, 60, 140, .78) 55%, rgba(36, 28, 69, .9) 100%);
}

.auth-visual__content {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 3.5rem;
    color: #fff;
    max-width: 520px;
}

.auth-visual__logo {
    width: 64px;
    height: auto;
    margin-bottom: 1.5rem;
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .22);
    background: rgba(255, 255, 255, .12);
}

.auth-visual__eyebrow {
    margin: 0 0 .6rem;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    opacity: .85;
}

.auth-visual__title {
    margin: 0 0 .85rem;
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.1;
}

.auth-visual__text {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.55;
    opacity: .92;
    max-width: 28rem;
}

.auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.5rem;
    background:
        radial-gradient(circle at top right, rgba(75, 60, 140, .08), transparent 40%),
        #f7f5fc;
}

.auth-panel__inner {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border: 1px solid #e6e1f2;
    border-radius: 22px;
    box-shadow: 0 18px 40px rgba(36, 28, 69, .08);
    padding: 2rem 1.75rem 1.5rem;
}

.auth-panel__inner--wide {
    max-width: 460px;
}

.auth-back {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    color: #4b3c8c;
    font-weight: 600;
    font-size: .9rem;
    text-decoration: none !important;
    margin-bottom: 1.4rem;
}

.auth-back:hover {
    color: #3a2e6d;
}

.auth-panel__head {
    margin-bottom: 1.5rem;
}

.auth-badge {
    display: inline-flex;
    align-items: center;
    background: #eeeaf8;
    color: #4b3c8c;
    border-radius: 999px;
    padding: .3rem .7rem;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    margin-bottom: .75rem;
}

.auth-panel__head h2 {
    margin: 0 0 .35rem;
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -.02em;
    color: #1c2430;
}

.auth-panel__head p {
    margin: 0;
    color: #5b6777;
    font-size: .95rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-field label {
    display: block;
    margin-bottom: .4rem;
    font-size: .82rem;
    font-weight: 700;
    color: #3a2e6d;
}

.auth-input {
    display: flex;
    align-items: center;
    gap: .65rem;
    border: 1px solid #e3e8ee;
    background: #fbfafe;
    border-radius: 12px;
    padding: 0 .9rem;
    min-height: 48px;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.auth-input i {
    color: #4b3c8c;
    width: 16px;
    text-align: center;
}

.auth-input input {
    border: 0;
    outline: 0;
    background: transparent;
    width: 100%;
    height: 46px;
    font-size: .98rem;
    color: #1c2430;
    font-family: inherit;
}

.auth-eye {
    border: 0;
    background: transparent;
    color: #4b3c8c;
    cursor: pointer;
    padding: .25rem;
    line-height: 1;
}

.auth-eye:hover {
    color: #3a2e6d;
}

.auth-alert {
    border-radius: 12px;
    padding: .9rem 1rem;
    margin-bottom: 1rem;
    font-size: .9rem;
    line-height: 1.45;
}

.auth-alert strong {
    display: block;
    margin-bottom: .25rem;
}

.auth-alert p {
    margin: 0;
}

.auth-alert--ok {
    background: #ecfdf5;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.auth-alert--warn {
    background: #fff7ed;
    color: #9a3412;
    border: 1px solid #fed7aa;
}

.auth-check--policy {
    align-items: flex-start;
    line-height: 1.4;
}

.auth-check--policy input {
    margin-top: .15rem;
}

.auth-input:focus-within {
    border-color: #4b3c8c;
    background: #fff;
    box-shadow: 0 0 0 .2rem rgba(75, 60, 140, .12);
}

.auth-field.is-invalid .auth-input {
    border-color: #dc2626;
}

.auth-error {
    display: block;
    margin-top: .35rem;
    color: #dc2626;
    font-size: .8rem;
    font-weight: 600;
}

.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    flex-wrap: wrap;
}

.auth-check {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    margin: 0;
    font-size: .88rem;
    color: #5b6777;
    font-weight: 500;
    cursor: pointer;
}

.auth-check input {
    width: 16px;
    height: 16px;
    accent-color: #4b3c8c;
}

.auth-link {
    color: #4b3c8c;
    font-weight: 700;
    font-size: .88rem;
    text-decoration: none !important;
}

.auth-link:hover {
    color: #3a2e6d;
    text-decoration: underline !important;
}

.auth-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    width: 100%;
    border: 0;
    border-radius: 999px;
    min-height: 48px;
    background: linear-gradient(120deg, #4b3c8c, #3a2e6d);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    font-family: inherit;
    box-shadow: 0 10px 22px rgba(75, 60, 140, .28);
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
}

.auth-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(75, 60, 140, .34);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: .75rem;
    color: #8a93a3;
    font-size: .8rem;
    font-weight: 600;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e6e1f2;
}

.auth-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    width: 100%;
    min-height: 46px;
    border-radius: 999px;
    border: 2px solid #4b3c8c;
    color: #4b3c8c !important;
    background: #fff;
    font-weight: 700;
    text-decoration: none !important;
    transition: background .2s ease, color .2s ease;
}

.auth-secondary:hover {
    background: #4b3c8c;
    color: #fff !important;
}

.auth-foot {
    margin-top: 1.35rem;
    text-align: center;
    color: #8a93a3;
    font-size: .8rem;
}

.auth-link-btn {
    background: none;
    border: 0;
    padding: 0;
    color: #4b3c8c;
    font: inherit;
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
}

body.auth-modal-open {
    overflow: hidden;
}

.auth-modal[hidden] {
    display: none !important;
}

.auth-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.auth-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 16, 40, .55);
}

.auth-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(720px, 100%);
    max-height: min(86vh, 820px);
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(20, 16, 40, .28);
    overflow: hidden;
}

.auth-modal__head,
.auth-modal__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: 1rem 1.25rem;
    background: #faf9fd;
    border-bottom: 1px solid #ebe7f5;
}

.auth-modal__foot {
    border-bottom: 0;
    border-top: 1px solid #ebe7f5;
    justify-content: flex-end;
}

.auth-modal__head h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    color: #3a2e6d;
}

.auth-modal__close {
    border: 0;
    background: transparent;
    font-size: 1.6rem;
    line-height: 1;
    color: #6b7280;
    cursor: pointer;
}

.auth-modal__body {
    padding: 1.1rem 1.25rem 1.4rem;
    overflow: auto;
    color: #374151;
    font-size: .92rem;
    line-height: 1.55;
}

.auth-modal__body h4 {
    margin: 1.1rem 0 .45rem;
    font-size: .95rem;
    font-weight: 800;
    color: #4b3c8c;
}

.auth-modal__body p,
.auth-modal__body ul {
    margin: 0 0 .75rem;
}

.auth-modal__body ul {
    padding-left: 1.2rem;
}

.auth-submit--compact {
    width: auto;
    min-width: 140px;
    padding: .7rem 1.2rem;
}

@media (max-width: 991.98px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-visual {
        min-height: 34vh;
    }

    .auth-visual__content {
        padding: 1.75rem;
        justify-content: flex-end;
    }

    .auth-visual__title {
        font-size: 1.7rem;
    }

    .auth-visual__text {
        font-size: .95rem;
    }

    .auth-panel {
        padding: 1.25rem 1rem 2rem;
        align-items: flex-start;
    }

    .auth-panel__inner {
        border-radius: 18px;
        padding: 1.5rem 1.2rem 1.25rem;
    }
}
