Take her to the Vet and have her blood tested for thyroid disorders...it is VERY common in older cats (12 is older), especially females. If that is the problem, a pill twice day is all she needs to correct. Mine were on the pills for 5 years before having other problems.
Unfortunately, the other thing I suggest they test for is kidney function (looking for renal failure). Sadly, one of my two died in October of renal failure, and the other is on her way as I type. Granted, she is going to be 17 in April, so has lived a long and happy life. If it is renal failure, and you want to try to keep her a while longer, putting her box in a more open area helps. For some reason they don't like to go in enclosed spaces with this problem. Also, she would be peeing copiously, so you need to change the litter a lot more often (they won't step in their own pee).
Note - the two disorders can have similar symptoms, so do get her checked for both.
Hope that helps, good luck.
K.