/* ===== VIBE - Login ===== */

* {
    box-sizing: border-box;
}

/* El fondo lo hereda de main.css (auroras). Solo definimos el contenedor central */
.login-page {
    min-height: calc(100vh - 100px); /* Restamos el navbar */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    z-index: 10;
}

/* ---------- Tarjeta principal ---------- */

.login-card {
    width: 100%;
    max-width: 1040px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: transparent;
    border: none;
    border-radius: 28px;
    overflow: visible;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
}

/* ---------- Panel del formulario ---------- */

.login-card__form {
    padding: 60px 56px;
    color: white;
    display: flex;
    flex-direction: column;
}

.login-card__title {
    margin: 0 0 12px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 44px;
    line-height: 1.02;
    letter-spacing: 0.02em;
    color: white;
}

.login-card__subtitle {
    margin: 0 0 36px;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.6);
}

.login-link {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-weight: 400;
    margin-left: 4px;
    transition: color 0.2s;
}

.login-link:hover {
    color: white;
    text-decoration: underline;
}

/* Formulario */

.login-form {
    display: flex;
    flex-direction: column;
    margin-top: auto;
}

.login-form__label {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.8);
}

.login-form__input {
    width: 100%;
    padding: 14px 18px;
    margin-bottom: 24px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.3);
    color: white;
    font-family: 'DM Sans', Arial, sans-serif;
    font-size: 15px;
    letter-spacing: 0.5px;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
}

.login-form__input:focus {
    border-color: #8b93f8;
    background: rgba(0, 0, 0, 0.5);
}

.login-form__password-wrapper {
    position: relative;
    width: 100%;
}

.login-form__toggle-password {
    position: absolute;
    right: 16px;
    top: 14px;
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.5);
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-form__toggle-password:hover {
    color: white;
}

.login-form__toggle-password.is-visible {
    color: #8b93f8;
}

.login-form__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    margin-top: -8px;
    font-size: 13px;
}

.login-form__remember {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.7);
    user-select: none;
}

/* Ocultar el checkbox nativo */
.login-form__remember input[type="checkbox"] {
    display: none;
}

/* Toggle switch custom */
.login-form__remember .toggle-track {
    width: 38px;
    height: 20px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    transition: background 0.3s, border-color 0.3s;
    flex-shrink: 0;
}

.login-form__remember .toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transition: transform 0.3s, background 0.3s;
}

.login-form__remember input[type="checkbox"]:checked ~ .toggle-track {
    background: hsl(var(--vibe-hue, 200deg), 80%, 55%);
    border-color: hsl(var(--vibe-hue, 200deg), 80%, 55%);
}

.login-form__remember input[type="checkbox"]:checked ~ .toggle-track .toggle-thumb {
    transform: translateX(18px);
    background: white;
}

/* ¿Olvidaste tu contraseña? - mismo color que el texto */
.login-form__row .login-link {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-weight: 400;
    margin-left: 4px;
    transition: color 0.2s;
}
.login-form__row .login-link:hover {
    color: white;
    text-decoration: underline;
}

/* Botón principal */

.login-form__submit {
    width: 100%;
    padding: 14px 32px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg,
        hsl(var(--vibe-hue, 200deg), 75%, 50%) 0%,
        hsl(calc(var(--vibe-hue-raw, 200) * 1deg + 40deg), 70%, 40%) 100%);
    color: #ffffff;
    font-size: 1em;
    letter-spacing: 2px;
    font-family: 'Bebas Neue', sans-serif;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.4s ease;
    box-shadow: 0 8px 24px hsla(var(--vibe-hue, 200deg), 80%, 60%, 0.25);
}

.login-form__submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px hsla(var(--vibe-hue, 200deg), 80%, 60%, 0.4);
}

/* Aurora APAGADO: mismo oscuro que la página, borde sutil */
body.aurora-off .login-form__submit {
    background: #1D1D1D;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.75);
    box-shadow: none;
}
body.aurora-off .login-form__submit:hover {
    background: rgba(255, 255, 255, 0.06);
    box-shadow: none;
    transform: translateY(-1px);
}

.login-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 30px 4px 20px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 12px;
}
.login-divider::before, .login-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}
.login-divider span {
    display: none; /* Podemos ocultar el span y dejar solo las líneas, o mantenerlo */
}
.login-divider span {
    display: block;
}

/* Botones sociales */

.login-social {
    display: flex;
    gap: 12px;
}

.login-social__btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 8px;
    border-radius: 14px;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.2);
    color: white;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.login-social__btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
}

/* ---------- Panel visual ---------- */

.login-card__visual {
    position: relative;
    padding: 48px;
    background: transparent;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    border-left: none;
}

.login-illustration {
    width: 100%;
    max-width: 320px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 20px 30px rgba(0,0,0,0.5));
}

.login-card__visual-content {
    position: static;
    width: 100%;
    text-align: center;
    margin-top: auto;
}

.login-card__visual-btn {
    display: inline-block;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    padding: 15px;
    border-radius: 999px;
    background: #6dd5b0;
    color: #08110d;
    font-weight: 800;
    font-size: 14px;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.login-card__visual-btn:hover {
    background: #7fe0bd;
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(109, 213, 176, 0.3);
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
    .login-card {
        grid-template-columns: 1fr;
        max-width: 500px;
    }
    
    .login-card__visual {
        display: none;
    }
    
    .login-card__form {
        padding: 40px 32px;
    }
}

@media (max-width: 480px) {
    .login-card__form {
        padding: 28px 22px 32px;
    }

    .login-social__btn span {
        display: none;
    }
}








/* ===== BENTO VACÍO MODAL (Regístrate) ===== */
.bento-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.bento-modal-overlay.activo {
    opacity: 1;
    pointer-events: auto;
}

/* Cuadro bento vacío — mismo estilo que nth-child(2) del grid de búsqueda */
.bento-modal-card {
    position: relative;
    width: 600px;
    height: auto; max-height: 90vh; overflow-y: auto;
    max-width: 92vw;
    border-radius: 10px;
    padding: 1.4rem;
    overflow-x: hidden;
    /* Aurora activo: usa el color dinámico del aurora */
    background: linear-gradient(135deg,
        hsl(var(--vibe-hue, 200deg), 75%, 40%) 0%,
        hsl(calc(var(--vibe-hue-raw, 200) * 1deg + 40deg), 70%, 28%) 100%);
    box-shadow:
        0 30px 60px -12px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.08),
        0 0 60px -10px hsla(var(--vibe-hue, 200deg), 80%, 60%, 0.35);
    transform: scale(0.88) translateY(28px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                background 0.4s ease,
                box-shadow 0.4s ease;
}
.bento-modal-overlay.activo .bento-modal-card {
    transform: scale(1) translateY(0);
}

/* Aurora APAGADO: mismo fondo oscuro exacto que la página (#1D1D1D) */
body.aurora-off .bento-modal-card {
    background: #1D1D1D;
    box-shadow:
        0 30px 60px rgba(0, 0, 0, 0.8),
        0 0 0 1px rgba(255, 255, 255, 0.05);
}

/* X para cerrar */
.bento-modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    width: auto;
    height: auto;
    border-radius: 0;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    font-size: 2rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: color 0.2s, transform 0.2s;
    outline: none;
}
.bento-modal-close:hover {
    background: transparent;
    color: white;
    transform: scale(1.1);
}

/* ===== ESTILOS DEL FORMULARIO BENTO (REGISTRO) ===== */
.bento-modal-card--register {
    width: 480px;
    height: auto;
    max-height: 90vh;
    overflow-y: auto;
    padding: 40px 32px;
}

.bento-register__header {
    text-align: center;
    margin-bottom: 28px;
    font-family: 'Bebas Neue', sans-serif;
}

.bento-register__title {
    font-size: 36px;
    color: white;
    margin: 0 0 8px;
    letter-spacing: 1px;
}

.bento-register__sub {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    font-family: 'Bebas Neue', sans-serif;
    letter-spacing: 1px;
}

.bento-register__form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bento-register__field {
    display: flex;
    flex-direction: column;
}

/* Scrollbar personalizado para el modal */
.bento-modal-card::-webkit-scrollbar {
    width: 6px;
}
.bento-modal-card::-webkit-scrollbar-track {
    background: transparent;
}
.bento-modal-card::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}
.bento-modal-card::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}
.bento-register__form .login-form__label {
    font-family: 'DM Sans', Arial, sans-serif;
    font-size: 15px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.bento-register__form .login-form__input {
    font-family: 'DM Sans', Arial, sans-serif;
    font-size: 15px;
    letter-spacing: 1px;
}

.bento-register__form .login-form__input::placeholder {
    font-family: 'Bebas Neue', sans-serif;
    text-transform: uppercase;
}

/* ===== MENSAJE DE ERROR FLOTANTE ===== */
.login-error-msg {
    color: #ff4d4d;
    text-align: center;
    font-family: 'DM Sans', Arial, sans-serif;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
    height: 0;
    overflow: hidden;
}
.login-error-msg.show {
    opacity: 1;
    height: auto;
}
