There's your mistake. It's one thing to keep your ideas separate from your work (there are contracts that insist that any idea you have belongs to who you work for), but it's another to tell your company about your ideas. As soon as you tell them, they can make an argument about who owns the idea.
That said, they sound pretty incompetent. If you're serious about your idea, you probably need a lawyer at this point. If not, cut your losses, be done with them, and move on. I can't actually give you advice on your idea, it might be good to let that go as well if you want to avoid future legal problems. If you think it's worth fighting for, get a lawyer.
In the future, keep your ideas separate from your work if you're entrepreneurial. By that I mean only work on them in your own time on your own equipment, including your smart phone.