/* =========================================
   ESTILOS DE LOGIN - UAM IZTAPALAPA (Versión Sobria)
   ========================================= */

body {
    /* Fondo sobrio: Gris claro con patrón de puntos sutil */
    background-color: #F4F6F9;
    background-image: radial-gradient(#dee2e6 1px, transparent 1px);
    background-size: 20px 20px;
    
    font-family: 'Roboto', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px; /* Un poco de margen para pantallas pequeñas */
    overflow: auto; /* Permite scroll si la altura es insuficiente */
}

/* === 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 === */
.form-control {
    padding: 12px 15px;
    font-size: 1rem;
    border: 1px solid #ced4da;
    border-radius: 10px;
    background-color: #fcfcfc;
    transition: all 0.3s;
}

.form-control:focus {
    background-color: #fff;
    border-color: #57A519;
    box-shadow: 0 0 0 4px rgba(87, 165, 25, 0.15);
}

.input-group-text {
    background-color: #f8f9fa;
    border: 1px solid #ced4da;
    border-right: none;
    color: #6c757d;
    border-radius: 10px 0 0 10px;
}

.input-group .form-control {
    border-left: none;
    border-radius: 0 10px 10px 0;
}

/* 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; }