/* ========================================
   LOGIN PAGE - DISEÑO UX PROFESIONAL
   ======================================== */

/* Reset y configuración base */
.login-page {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
    position: relative;
}

/* Partículas de fondo animadas */
.particles-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    animation: particlesFloat 20s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes particlesFloat {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(30px, -30px); }
    66% { transform: translate(-20px, 20px); }
}

/* Container principal */
.login-container {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* ========================================
   PANEL IZQUIERDO - BRANDING
   ======================================== */
.login-brand {
    flex: 1;
    background: linear-gradient(180deg, #ffffff 0%, #f8f9ff 15%, #667eea 50%, #764ba2 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    position: relative;
    overflow: hidden;
}

.login-brand::before {
    content: '';
    position: absolute;
    bottom: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(118, 75, 162, 0.2) 0%, transparent 70%);
    animation: brandPulse 15s ease-in-out infinite;
}

@keyframes brandPulse {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(180deg); }
}

.brand-content {
    max-width: 600px;
    text-align: center;
    position: relative;
    z-index: 1;
}

/* Logo */
.brand-logo {
    margin-bottom: 30px;
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.logo-img {
    max-width: 280px;
    height: auto;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.05);
}

/* Títulos del brand */
.brand-title {
    font-size: 36px;
    font-weight: 700;
    color: #2d3748;
    margin: 0 0 15px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    line-height: 1.2;
}

.brand-subtitle {
    font-size: 18px;
    color: #4a5568;
    margin: 0 0 50px 0;
    font-weight: 400;
}

/* Grid de características */
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin-top: 40px;
}

.feature-item {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    padding: 25px 20px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.feature-item:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 24px;
    color: white;
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3);
}

.feature-item h3 {
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
    margin: 0 0 8px 0;
}

.feature-item p {
    font-size: 13px;
    color: #718096;
    margin: 0;
    line-height: 1.4;
}

/* ========================================
   PANEL DERECHO - FORMULARIO
   ======================================== */
.login-form-panel {
    flex: 0 0 500px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    box-shadow: -10px 0 50px rgba(0, 0, 0, 0.1);
}

.login-box {
    width: 100%;
    max-width: 420px;
}

.login-header {
    text-align: center;
    margin-bottom: 35px;
}

.login-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: #2d3748;
    margin: 0 0 10px 0;
}

.login-header p {
    font-size: 15px;
    color: #718096;
    margin: 0;
}

/* Formulario */
.login-form {
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 8px;
}

.form-group label i {
    margin-right: 8px;
    color: #667eea;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    transition: all 0.3s ease;
    background: #f7fafc;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Botón de login */
.btn-primary {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Alertas */
.alert {
    padding: 14px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-error {
    background: #fee;
    color: #c53030;
    border: 1px solid #fc8181;
}

.alert-error i {
    font-size: 18px;
}

/* Footer del login */
.login-footer {
    text-align: center;
    padding-top: 25px;
    border-top: 1px solid #e2e8f0;
    margin-top: 25px;
}

.login-footer p {
    font-size: 13px;
    color: #a0aec0;
    margin: 5px 0;
}

.version {
    font-weight: 600;
    color: #667eea !important;
}

/* ========================================
   RESPONSIVE
   ======================================== */

/* Tablets */
@media (max-width: 1024px) {
    .login-brand {
        padding: 40px 30px;
    }
    
    .brand-title {
        font-size: 30px;
    }
    
    .features-grid {
        gap: 20px;
    }
    
    .login-form-panel {
        flex: 0 0 450px;
        padding: 30px;
    }
}

/* Móviles */
@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
    }
    
    .login-brand {
        padding: 40px 20px;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        min-height: auto;
    }
    
    .brand-content {
        max-width: 100%;
    }
    
    .logo-img {
        max-width: 200px;
    }
    
    .brand-title {
        font-size: 24px;
    }
    
    .brand-subtitle {
        font-size: 16px;
        margin-bottom: 30px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .feature-item {
        padding: 20px 15px;
    }
    
    .feature-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .login-form-panel {
        flex: 1;
        padding: 30px 20px;
        box-shadow: none;
    }
    
    .login-header h2 {
        font-size: 26px;
    }
}

/* Móviles pequeños */
@media (max-width: 480px) {
    .login-brand {
        padding: 30px 15px;
    }
    
    .logo-img {
        max-width: 160px;
    }
    
    .brand-title {
        font-size: 20px;
    }
    
    .brand-subtitle {
        font-size: 14px;
    }
    
    .login-form-panel {
        padding: 25px 15px;
    }
    
    .login-header h2 {
        font-size: 24px;
    }
    
    .form-group input {
        padding: 12px 14px;
        font-size: 14px;
    }
    
    .btn-primary {
        padding: 14px;
        font-size: 15px;
    }
}
