body {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
    background: url('../assets/bg2.png') center/cover no-repeat;
    animation: backgroundChange 10s infinite;
}

@keyframes backgroundChange {
    0% {
        background-image: url('../assets/bg2.png');
    }
    33% {
        background-image: url('../assets/bg3.png');
    }
    66% {
        background-image: url('../assets/bg4.png');
    }
}

.container {
    max-width: 400px;
    width: 100%;
    background: rgba(255, 255, 255, 0.8);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.login-content img {
    margin-bottom: 15px;
}

.login-content h2 {
    color: #333;
    font-size: 24px;
    margin-bottom: 20px;
}

.input-div {
    position: relative;
    margin: 25px 0;
}

.input-div .i {
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    color: #1a3b5d;
    font-size: 18px;
}

.input-div .input {
    width: 100%;
    padding: 15px 15px 15px 50px;
    border: 1px solid #ccc;
    border-radius: 25px;
    outline: none;
    transition: border 0.3s;
    box-sizing: border-box;
}

.input-div .input:focus {
    border-color: #1a3b5d;
}

.input-div label {
    position: absolute;
    left: 50px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: #1a3b5d;
    transition: 0.3s;
}

.input-div .input:focus + label,
.input-div .input:not(:placeholder-shown) + label {
    top: -10px;
    font-size: 16px;
    font-weight: bold;
    color: #1a3b5d;
}

.btn {
    width: 100%;
    padding: 10px;
    background: linear-gradient(to right, #1a3b5d, #000000);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn:hover {
    background: linear-gradient(to right, #000000, #1a3b5d);
}

.forgot-password {
    display: block;
    margin: 10px 0;
    color: #1a3b5d;
    text-decoration: none;
    font-size: 14px;
}

.forgot-password:hover {
    text-decoration: underline;
}

/* =============================
    BANNER DE ALERTA SIN CONEXIÓN (Estilo Error/Toast)
   ============================= */

.connection-alert {
    /* Posicionamiento de Toast */
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    
    /* Colorimetría de Error */
    background-color: #f8d7da; /* Fondo rojo pálido */
    color: #721c24; /* Texto rojo oscuro */
    border: 1px solid #f5c6cb; /* Borde rojo */
    
    /* Layout y Estilo General */
    display: flex;
    align-items: center; /* Centrar verticalmente */
    padding: 12px 15px;
    border-radius: 6px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); /* Sombra de toast */
    max-width: 400px;
    width: 90%;
    box-sizing: border-box;
    
    /* Animación */
    animation: slideInFromRight 0.4s ease-out;
}

.connection-alert span {
     flex: 1;
     font-size: 14px;
     font-weight: 500;
     line-height: 1.4;
}

.close-alert-btn {
    background: transparent;
    border: none;
    color: #721c24; /* Color del banner rojo */
    font-size: 22px;
    font-weight: bold;
    cursor: pointer;
    opacity: 0.7;
    padding: 0 0 0 15px; /* Espacio a la izquierda */
    line-height: 1;
}

.close-alert-btn:hover {
    opacity: 1;
}

/* Animación de entrada */
@keyframes slideInFromRight {
    from {
        transform: translateX(110%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Estilos adicionales para el icono de ojo */
        .password-container {
            position: relative;
            width: 100%;
        }
        
        .toggle-password {
            position: absolute;
            right: 15px;
            top: 50%;
            transform: translateY(-50%);
            cursor: pointer;
            color: #1a3b5d;
            transition: all 0.3s ease-in-out;
            z-index: 2;
            background: none;
            border: none;
            padding: 0;
            width: 20px;
            height: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .toggle-password:hover {
            color: #333;
            transform: translateY(-50%) scale(1.1);
        }
        
        .toggle-password:active {
            transform: translateY(-50%) scale(0.95);
        }
        
        .input-div.pass input {
            padding-right: 45px !important;
        }
        
        /* Asegurarnos que el icono de candado aparezca */
        .input-div.pass .i {
            position: absolute;
            left: 15px;
            top: 50%;
            transform: translateY(-50%);
            color: #1a3b5d;
            z-index: 2;
        }
        
        .input-div.pass {
            position: relative;
        }
        
        /* Estilos para la animación del ojo */
        .eye-icon {
            position: relative;
            display: inline-block;
            transition: transform 0.3s ease-in-out;
        }
        
        .eye-slash {
            opacity: 0;
            transform: scale(0.8);
            transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
        }
        
        .eye-open {
            opacity: 1;
            transform: scale(1);
            transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
        }