/* Reset y configuración base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #ff1212 0%, #e2dede 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Contenedor principal */
.login-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    max-width: 1000px;
    width: 100%;
    min-height: 600px;
    position: relative;
}

/* Panel izquierdo - Branding */
.branding-panel {
    flex: 1;
    background: 
        
        url('https://images.unsplash.com/photo-1481627834876-b7833e8f5570?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1000&q=80');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    overflow: hidden;
}

/* Overlay oscuro para mejor legibilidad */
.branding-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.6) 100%);
    z-index: 1;
}

/* Overlay con contenido */
.branding-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    max-width: 400px;
    background: rgba(0, 0, 0, 0.3);
    padding: 40px 30px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.branding-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    color: #ffffff;
}

.branding-content .subtitle {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.95;
    font-weight: 500;
}

.branding-content .description {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 40px;
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.branding-content .signin-link {
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 12px 24px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 25px;
    transition: all 0.3s ease;
    display: inline-block;
    background: rgba(220, 38, 38, 0.2);
    backdrop-filter: blur(5px);
}

.branding-content .signin-link:hover {
    background: rgba(220, 38, 38, 0.4);
    border-color: rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Panel derecho - Formulario */
.form-panel {
    flex: 1;
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: white;
}

.form-panel h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 30px;
    text-align: center;
}

/* Grupos de formulario */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-group input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fafbfc;
}

.form-group input:focus {
    outline: none;
    border-color: #dc2626;
    background: white;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-group input::placeholder {
    color: #a0a0a0;
}

/* Checkbox para mostrar contraseña */
.password-toggle {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    font-size: 0.9rem;
    color: #666;
}

.password-toggle input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
    accent-color: #dc2626;
}

/* Botón principal */
.submit-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 25px;
    position: relative;
    overflow: hidden;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(220, 38, 38, 0.3);
}

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

/* Separador - Eliminado ya que no hay botón de Google */

/* Enlaces */
.links {
    text-align: center;
    margin-top: 30px;
}

.links a {
    color: #dc2626;
    text-decoration: none;
    font-size: 0.95rem;
    display: block;
    margin-bottom: 10px;
    transition: color 0.3s ease;
}

.links a:hover {
    color: #b91c1c;
    text-decoration: underline;
}

/* Mensaje de error */
.error-message {
    background: #fee;
    color: #c33;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #c33;
    font-size: 0.9rem;
}

/* Logo */
.logo {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 3;
}

.logo img {
    height: 50px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Animaciones - Eliminadas las de flotación para ambiente institucional */

/* Responsive Design */
@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
        max-width: 400px;
        margin: 20px;
    }
    
    .branding-panel {
        min-height: 200px;
        padding: 30px 20px;
    }
    
    .branding-content h1 {
        font-size: 2rem;
    }
    
    .form-panel {
        padding: 40px 30px;
    }
    
    .logo {
        position: static;
        text-align: center;
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .login-container {
        margin: 10px;
        border-radius: 15px;
    }
    
    .form-panel {
        padding: 30px 20px;
    }
    
    .branding-content h1 {
        font-size: 1.8rem;
    }
    
    .branding-content .subtitle {
        font-size: 1rem;
    }
    
    .branding-content .description {
        font-size: 0.9rem;
    }
}

/* Efectos adicionales */
.form-panel {
    position: relative;
}

.form-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #dc2626, #b91c1c, #ef4444);
}

/* Mejoras de accesibilidad */
input:focus,
button:focus {
    outline: 2px solid #dc2626;
    outline-offset: 2px;
}

/* Transiciones suaves */
* {
    transition: all 0.3s ease;
}

/* Efecto de carga en botón */
.submit-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.submit-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}
