This can happen because the game shows rounded numbers on the screen.

The upgrade requires a specific amount of cash or reputation.
However, the numbers shown in the interface are rounded, so while it may display a whole number (for example, 100), your actual value might be slightly lower - like 99.8.

Because of these hidden decimals, it can look like you have enough currency even when you technically don’t.

What to do:
Simply collect a little more cash or reputation. Once your total exceeds the real required amount, the upgrade button will become available.