/* ================= AUTH MODAL ================= */

.auth-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .35s ease;
    z-index: 9999;
    padding-top: 60px;
}

.auth-modal.active {
    opacity: 1;
    pointer-events: auto;
}

/* CAJA */
.auth-box {
    background: #fff;
    width: 360px;
    max-width: 92%;
    border-radius: 14px;
    padding: 52px 22px 26px 22px;
    position: relative;
    transform: translateY(-40px);
    opacity: 0;
    transition: transform .45s cubic-bezier(.2,.8,.3,1), opacity .35s ease;
    box-shadow: 0 20px 40px rgba(0,0,0,.25);
}

.auth-modal.active .auth-box {
    transform: translateY(0);
    opacity: 1;
}

/* CERRAR */
.auth-close {
    position: absolute;
    right: 14px;
    top: 12px;
    border: none;
    background: none;
    font-size: 20px;
    cursor: pointer;
    opacity: .6;
}

.auth-close:hover {
    opacity: 1;
}

/* TABS */
.auth-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 18px;
}

.auth-tab {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    border: none;
    background: #f1f1f1;
    cursor: pointer;
    font-weight: 600;
    transition: all .25s ease;
}

.auth-tab.active {
    background: var(--color-secundario);
    color: #fff;
}

/* FORMULARIOS */
.auth-form {
    display: none;
    animation: fadeIn .3s ease;
}

.auth-form.active {
    display: block;
}

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

/* INPUTS */
.auth-form input {
    width: 100%;
    padding: 12px 14px;
    margin-bottom: 12px;
    border-radius: 10px;
    border: 1px solid #ddd;
    font-size: 14px;
    transition: border .25s ease, box-shadow .25s ease;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--color-secundario);
    box-shadow: 0 0 0 3px rgba(100,100,255,.15);
}

/* BOTÓN */
.auth-form button {
    width: 100%;
    padding: 12px;
    margin-top: 5px;
    border-radius: 10px;
    border: none;
    background: var(--color-secundario);
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease;
}

.auth-form button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(0,0,0,.2);
}

/* MENSAJE */
.auth-msg {
    margin-top: 8px;
    font-size: 13px;
    color: #d33;
    text-align: center;
}

/* ================= MOBILE ================= */
@media (max-width: 600px) {

    .auth-modal {
        align-items: flex-end;
        padding-top: 0;
    }

    .auth-box {
        width: 100%;
        border-radius: 16px 16px 0 0;
        transform: translateY(100%);
    }

    .auth-modal.active .auth-box {
        transform: translateY(0);
    }
}

