/* Estilos generales */
:root {
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --accent-color: #4cc9f0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --success-color: #4bb543;
    --error-color: #ff3333;
    --border-radius: 8px;
    --box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Contenedor principal */
.login-container {
    display: flex;
    max-width: 1000px;
    width: 100%;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    min-height: 600px;
}

/* Sección del formulario */
.login-box {
    flex: 1;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-title {
    font-size: 1.75rem;
    color: var(--dark-color);
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 700;
    position: relative;
    padding-bottom: 10px;
}

.login-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* Sección de la imagen */
.login-desc {
    flex: 1;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.login-desc::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
    transform: rotate(45deg);
}

.login-desc .title {
    position: relative;
    z-index: 1;
}

/* Estilos para el logo */
.logo-container .logo {
    max-width: 180px;  /* Aumentado de 120px */
    height: auto;
    margin: 0 auto 1.5rem;
    display: block;
}

/* Estilos para la imagen de fondo */
.login-desc img {
    max-width: 60%;  /* Reducido de 80% */
    height: auto;
    max-height: 160px;  /* Reducido de 200px */
    margin: 1rem auto;  /* Reducido el margen superior e inferior */
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.2));
    object-fit: contain;
}

/* Formulario */
.form-login {
    width: 100%;
}

.group {
    margin-bottom: 1.5rem;
    position: relative;
}

group:last-child {
    margin-bottom: 0;
}

.group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #555;
    font-weight: 500;
    transition: var(--transition);
}

.group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    background-color: #f8f9fa;
}

.group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
    background-color: white;
}

/* Botón */
button[type="submit"] {
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1px;
}

button[type="submit"]:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

button[type="submit"]:active {
    transform: translateY(0);
}

/* Enlace de registro */
.no-register {
    text-align: center;
    margin-top: 2rem;
    color: #666;
}

.no-register a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.no-register a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Efectos de carga */
.loader {
    display: none;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

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

/* Mensajes de error/éxito */
.message {
    padding: 12px;
    margin-bottom: 20px;
    border-radius: var(--border-radius);
    font-weight: 500;
    text-align: center;
    display: none;
}

.message.error {
    background-color: #ffebee;
    color: var(--error-color);
    border-left: 4px solid var(--error-color);
}

.message.success {
    background-color: #e8f5e9;
    color: var(--success-color);
    border-left: 4px solid var(--success-color);
}

/* Responsive */
@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
        max-width: 500px;
    }
    
    .login-desc {
        display: none;
    }
    
    .login-box {
        padding: 30px 20px;
    }
}

/* Animaciones */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-box {
    animation: fadeIn 0.6s ease-out;
}

/* Estilos para el checkbox de recordar sesión */
.remember-me {
    display: flex;
    align-items: center;
    margin: 0.5rem 0 1.5rem;
}

.remember-me input[type="checkbox"] {
    margin: 0 8px 0 0;
    width: auto;
    height: auto;
}

.remember-me label {
    margin: 0;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
    color: #555;
}

/* Efecto de olas */
.wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.2" d="M0,192L48,197.3C96,203,192,213,288,229.3C384,245,480,267,576,250.7C672,235,768,181,864,181.3C960,181,1056,235,1152,234.7C1248,235,1344,181,1392,154.7L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
    background-size: cover;
    background-repeat: no-repeat;
    z-index: 0;
}
