I have a daughter and the 13-14 year age is awful no matter what is going on. According to my daughter, I was suddenly an idiot and I embarrassed her all the time. I managed to get through it. The hardest is to insist on respectful communication. They must be called out whenever they show no respect.. roll their eyes, etc. Won't be easy.
As far as pulling the "I will go to dad" card, I had a friend with this situation. Her daughter chose to leave and live with dad because he gave her what she wanted. My friend was sad, but realized what she was doing. She used to say to me that she had her for 13 years and was glad for that time.
However, as her daughter became an adult, she realized how shallow dad had been. My friend now has a great relationship with her daughter. It is built on love and respect.
Just keep loving her and giving her boundaries. She will fight it, but I think her security rests in knowing someone will love her enough to discipline her. If she wants to threaten you and say she will leave, be honest. Let her know it will hurt you, but you still love her.
I hope all works out okay. I am sorry you have had this happen.