/* =========================================
   ESTILOS DE LOGIN - UAM IZTAPALAPA (Versión Sobria)
   ========================================= */

/* =========================================
   ESTILOS DE LOGIN - UAM IZTAPALAPA (Versión Premium)
   ========================================= */

body {
    /* 1. Fondo de respaldo en caso de que la imagen tarde en cargar */
    background-color: #1e293b; 
    
    /* 2. El degradado oscuro encima de la foto */
    background-image: 
        linear-gradient(rgba(15, 23, 42, 0.6), rgba(15, 23, 42, 0.8)), 
        url('../../img/Fondo1.png'); 
    
    /* 3. Ajustes para que la foto cubra toda la pantalla sin deformarse */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    
    font-family: 'Roboto', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh; /* Fijo exactamente al 100% de la pantalla */
    box-sizing: border-box;
    margin: 0;
    overflow: hidden; /* Evita cualquier scroll invisible que mueva la tarjeta */
}

/* === BOTÓN FLOTANTE 'VOLVER' === */
.btn-back-floating {
    position: absolute;
    top: 20px;
    left: 20px;
    /* Color ajustado para fondo claro */
    color: #6c757d; 
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 15px;
    border-radius: 50px;
    background: #ffffff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-back-floating:hover {
    background: #57A519;
    color: #ffffff;
    border-color: #57A519;
    transform: translateX(-3px);
    box-shadow: 0 4px 8px rgba(87, 165, 25, 0.3);
}

/* === TARJETA DE LOGIN === */
.login-card {
    border: none;
    border-radius: 20px;
    /* Sombra suave para fondo claro */
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
    width: 100%;
    max-width: 400px;
    background: #ffffff;
    position: relative;
    overflow: hidden; /* Mantiene todo dentro de los bordes redondeados */
    animation: slideUpFade 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes slideUpFade {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Decoración superior de la tarjeta (Línea verde) */
.login-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, #57A519, #a3e635);
}

.login-header {
    padding: 45px 30px 20px; /* Un poco más de espacio arriba */
    text-align: center;
}

.logo-img {
    height: 65px;
    width: auto;
    margin-bottom: 15px;
    filter: contrast(1.05); /* Mejora sutil de nitidez */
}

/* === PIE DE TARJETA (Corrección de corte) === */
.login-footer {
    background-color: #f8f9fa;
    padding: 20px; /* Padding generoso para evitar cortes */
    text-align: center;
    border-top: 1px solid #e9ecef;
}

.login-footer span {
    font-size: 0.8rem;
    color: #adb5bd;
    display: block; /* Asegura que ocupe su propia línea */
    line-height: 1.4; /* Mejor espaciado entre líneas si se envuelve */
}

/* === FORMULARIO === */
/* === FORMULARIO === */
.form-control {
    padding: 12px 15px;
    font-size: 1rem;
    border: 1px solid #ced4da;
    border-radius: 10px;
    background-color: #fcfcfc;
    transition: all 0.3s;
}

/* Quitamos la sombra individual que rompía el diseño */
.form-control:focus {
    box-shadow: none; 
    outline: none;
}

.input-group-text {
    background-color: #f8f9fa;
    border: 1px solid #ced4da;
    border-right: none;
    color: #6c757d;
    border-radius: 10px 0 0 10px;
    transition: all 0.3s; /* Añadimos transición al ícono también */
}

.input-group .form-control {
    border-left: none;
    border-radius: 0 10px 10px 0;
}

/* ¡LA MAGIA! Iluminamos TODA la caja (Ícono + Input) junta al hacer clic */
.input-group:focus-within {
    box-shadow: 0 0 0 4px rgba(87, 165, 25, 0.15);
    border-radius: 10px;
}

.input-group:focus-within .input-group-text,
.input-group:focus-within .form-control {
    border-color: #57A519;
    background-color: #fff;
}

/* Botón Principal */
.btn-login {
    background: #57A519;
    border: none;
    padding: 14px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 10px;
    width: 100%;
    color: white;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(87, 165, 25, 0.2);
}

.btn-login:hover {
    background: #468c12;
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(87, 165, 25, 0.3);
}

/* Enlace Olvidé contraseña */
.forgot-link {
    color: #6c757d;
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.2s;
}

.forgot-link:hover {
    color: #57A519;
}

/* === MODAL === */
.modal-content { border-radius: 15px; border: none; }
.modal-header { border-bottom: 1px solid #f0f0f0; background-color: #fff; border-radius: 15px 15px 0 0; }