Not sure if you are on Aurora or Classic but briefly looking at the docs it looks like they are the same when it comes to badge rules.
So, you can award a badge based on sign in date like this signin_date > "2025-05-01"
But you only want users that have been inactive for a long time too which I don't think you can do directly, so I would use a role for that. Export a list of users who have not logged in since whatever cutoff date you had in mind and import the list with a role like "Inactive" for example. (hopefully you can do that in Aurora if that's what you are on)
Then you can chain them together like this
signin_date > "2025-05-01" AND user.role.name in [‘Inactive’]
I have never done this so I would test first but I think that should work.