/* ===== LOGIN MODERNO CON CARRUSEL MEJORADO ===== */

/* Body del login moderno */
.login-body-moderno {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* Contenedor principal */
.login-moderno-container {
    display: flex;
    min-height: 100vh;
    background: white;
    box-shadow: var(--shadow-xl);
}

/* ===== LADO IZQUIERDO - CARRUSEL ===== */
.login-carrusel {
    flex: 1;
    position: relative;
    background-color: #1a1a1a;
    overflow: hidden;
}

.carrusel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.85) 0%, rgba(118, 75, 162, 0.85) 100%);
    z-index: 1;
}

.loginSwiper {
    width: 100%;
    height: 100%;
}

.swiper-slide {
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    position: relative;
}

.slide-content {
    text-align: center;
    color: white;
    z-index: 2;
    padding: 2rem 2.5rem;
    max-width: 500px;
    width: 85%;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(15px);
    border-radius: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.25);
    position: absolute;
    bottom: 12%;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.slide-content i {
    font-size: 3rem;
    margin-bottom: 0.75rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.slide-content h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.slide-content p {
    font-size: 1rem;
    opacity: 0.95;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    margin: 0;
}

/* Paginación del carrusel */
.swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: white;
    opacity: 0.5;
    transition: all 0.3s;
}

.swiper-pagination-bullet-active {
    opacity: 1;
    background: white;
    transform: scale(1.2);
}

/* Botones de navegación */
.swiper-button-next,
.swiper-button-prev {
    color: white;
    background: rgba(255, 255, 255, 0.2);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    transition: all 0.3s;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.swiper-button-next::after,
.swiper-button-prev::after {
    font-size: 1rem;
}

/* Crédito del carrusel */
.carrusel-credito {
    position: absolute;
    bottom: 1.5rem;
    left: 0;
    right: 0;
    z-index: 3;
    color: white;
    font-size: 0.8rem;
    font-weight: 500;
    text-align: center;
    background: rgba(0, 0, 0, 0.5);
    padding: 0.5rem;
    backdrop-filter: blur(5px);
}

.carrusel-credito p {
    margin: 0;
    opacity: 0.8;
}

/* ===== LADO DERECHO - FORMULARIO ===== */
.login-moderno-form {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem;
    background: white;
    overflow-y: auto;
}

.login-moderno-header {
    text-align: center;
    margin-bottom: 2rem;
}

/* Logo - MÁS GRANDE Y CON ANIMACIÓN */
.login-moderno-logo {
    width: 140px;
    height: 140px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: transparent;
    animation: floatLogo 3s ease-in-out infinite;
}

.logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Animación flotante para el logo */
@keyframes floatLogo {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0px);
    }
}

.login-moderno-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-800);
    margin: 0 0 0.5rem 0;
}

.login-moderno-header p {
    font-size: 0.95rem;
    color: var(--gray-500);
    margin: 0;
}

/* Formulario */
.login-moderno-form-element {
    max-width: 380px;
    margin: 0 auto;
    width: 100%;
}

/* Grupos de formulario */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.form-label i {
    color: var(--primary);
    margin-right: 0.25rem;
}

/* Input wrapper - CORREGIDO (solo un botón) */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    transition: all 0.2s;
    background-color: white;
    padding-right: 3rem;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-alpha);
}

/* Toggle password - UN SOLO BOTÓN */
.password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0.5rem;
    font-size: 1rem;
    transition: color 0.2s;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    color: var(--primary);
}

/* Asegurar que solo haya un botón de toggle password */
.input-wrapper .password-toggle {
    display: flex;
}

/* Eliminar cualquier otro botón fantasma */
.input-wrapper button:not(.password-toggle) {
    display: none;
}

/* Opciones del formulario */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Checkbox personalizado */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--gray-600);
}

.checkbox-input {
    display: none;
}

.checkbox-custom {
    width: 1rem;
    height: 1rem;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-sm);
    position: relative;
    transition: all 0.2s;
}

.checkbox-input:checked + .checkbox-custom {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-color: var(--primary);
}

.checkbox-input:checked + .checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.7rem;
}

.checkbox-text {
    font-size: 0.85rem;
}

/* Link de olvidé contraseña */
.forgot-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.forgot-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Botón de login moderno */
.login-moderno-button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 1.5rem;
}

.login-moderno-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.login-moderno-button i {
    font-size: 0.95rem;
}

/* Versión */
.login-moderno-version {
    text-align: center;
    font-size: 0.75rem;
    color: var(--gray-400);
    margin-top: 1.5rem;
}

/* Alertas */
.alerta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    animation: slideIn 0.3s ease-out;
    max-width: 380px;
    margin-left: auto;
    margin-right: auto;
}

.alerta.error {
    background: linear-gradient(135deg, var(--danger-light) 0%, #fee2e2 100%);
    border-left: 4px solid var(--danger);
}

.alerta i {
    font-size: 1rem;
}

.alerta.error i {
    color: var(--danger);
}

.alerta p {
    color: var(--gray-700);
    font-size: 0.85rem;
    margin: 0;
}

/* ===== ANIMACIONES ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================= */
/* 📱 RESPONSIVE - ADAPTACIÓN A DISPOSITIVOS     */
/* ============================================= */

/* TABLET PEQUEÑA: 769px - 968px */
@media (max-width: 968px) and (min-width: 769px) {
    .login-moderno-container {
        flex-direction: row;
    }
    
    .login-carrusel {
        flex: 0.9;
        min-height: auto;
        height: auto;
    }
    
    .login-moderno-form {
        flex: 1.1;
        padding: 2rem;
    }
    
    .slide-content {
        padding: 1.5rem;
        width: 85%;
        bottom: 10%;
    }
    
    .slide-content i {
        font-size: 2.5rem;
    }
    
    .slide-content h3 {
        font-size: 1.3rem;
    }
    
    .slide-content p {
        font-size: 0.85rem;
    }
    
    .swiper-button-next,
    .swiper-button-prev {
        display: none;
    }
    
    .login-moderno-logo {
        width: 100px;
        height: 100px;
    }
}

/* ========================================== */
/* 📱 CELULAR: Pantallas menores a 768px */
/* ========================================== */
@media (max-width: 768px) {
    
    /* Fondo con gradiente para que se vea bonito */
    .login-body-moderno {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 20px;
    }
    
    /* Contenedor principal - ahora es como una tarjeta */
    .login-moderno-container {
        flex-direction: column;
        min-height: auto;
        border-radius: 20px;
        overflow: hidden;
        max-width: 450px;
        width: 100%;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    }
    
    /* ❌ OCULTAR CARRUSEL COMPLETAMENTE EN CELULAR */
    .login-carrusel {
        display: none !important;
    }
    
    /* ✅ FORMULARIO OCUPA TODO EL ESPACIO */
    .login-moderno-form {
        flex: 1;
        padding: 2.5rem 2rem;
        justify-content: center;
        min-height: auto;
        border-radius: 20px;
    }
    
    /* Logo más pequeño */
    .login-moderno-logo {
        width: 100px;
        height: 100px;
        margin-bottom: 1rem;
    }
    
    .login-moderno-header {
        margin-bottom: 1.5rem;
    }
    
    .login-moderno-header h1 {
        font-size: 1.8rem;
    }
    
    .login-moderno-header p {
        font-size: 0.9rem;
    }
    
    /* Formulario ocupa todo el ancho disponible */
    .login-moderno-form-element {
        max-width: 100%;
    }
    
    /* Inputs más grandes para facilitar el toque con dedos */
    .form-input {
        padding: 0.85rem 1rem;
        font-size: 1rem;
        border-radius: 10px;
    }
    
    /* Botón de toggle password más grande */
    .password-toggle {
        right: 1rem;
        padding: 0.6rem;
        font-size: 1.1rem;
    }
    
    /* Botón de login más grande */
    .login-moderno-button {
        padding: 0.9rem;
        font-size: 1.05rem;
        border-radius: 10px;
        margin-bottom: 1rem;
    }
    
    /* Checkbox y opciones */
    .form-options {
        margin-bottom: 1.5rem;
    }
    
    .checkbox-label {
        font-size: 0.9rem;
    }
    
    .forgot-link {
        font-size: 0.9rem;
    }
    
    /* Alerta de error */
    .alerta {
        max-width: 100%;
        margin-bottom: 1.5rem;
    }
    
    /* Versión */
    .login-moderno-version {
        margin-top: 1rem;
        font-size: 0.7rem;
    }
}

/* ========================================== */
/* 📱 CELULAR PEQUEÑO: Menos de 480px */
/* ========================================== */
@media (max-width: 480px) {
    
    /* Menos padding en el body */
    .login-body-moderno {
        padding: 10px;
        align-items: flex-start;
        padding-top: 20px;
    }
    
    /* Contenedor ocupa todo el ancho */
    .login-moderno-container {
        max-width: 100%;
        border-radius: 16px;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    }
    
    /* Menos padding en el formulario */
    .login-moderno-form {
        padding: 2rem 1.5rem;
    }
    
    /* Logo aún más pequeño */
    .login-moderno-logo {
        width: 80px;
        height: 80px;
        margin-bottom: 0.75rem;
    }
    
    /* Textos más compactos */
    .login-moderno-header {
        margin-bottom: 1.25rem;
    }
    
    .login-moderno-header h1 {
        font-size: 1.5rem;
    }
    
    .login-moderno-header p {
        font-size: 0.85rem;
    }
    
    /* Inputs adaptados */
    .form-input {
        padding: 0.8rem 0.9rem;
        font-size: 0.95rem;
    }
    
    /* Opciones en columna */
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    /* Botón de login */
    .login-moderno-button {
        padding: 0.85rem;
        font-size: 1rem;
    }
    
    /* Menos espacio entre grupos */
    .form-group {
        margin-bottom: 1rem;
    }
    
    /* Versión más pequeña */
    .login-moderno-version {
        margin-top: 0.75rem;
        font-size: 0.65rem;
    }
}

/* ========================================== */
/* 💻 ESCRITORIO GRANDE: Más de 1400px */
/* ========================================== */
@media (min-width: 1400px) {
    
    .login-moderno-form {
        padding: 4rem;
    }
    
    .login-moderno-logo {
        width: 160px;
        height: 160px;
    }
    
    .login-moderno-header h1 {
        font-size: 2.2rem;
    }
    
    .slide-content {
        padding: 2.5rem 3rem;
        max-width: 600px;
    }
    
    .slide-content i {
        font-size: 3.5rem;
    }
    
    .slide-content h3 {
        font-size: 2rem;
    }
}