I have been in your shoes, and have never felt a pain like the kind I suffered when my 15 year old son was going through the same thing. Most of the time he wouldn't even speak to us, and when he did he was rude and disrespectful. I would go into his room at night while he was asleep to give him a kiss. (Aren't I just pathetic?) But his grades were good, and most importantly, his friends were good.
For whatever reason, some teenagers just have to go through this thing, whatever it is, and you have to maintain your rules, but choose your battles, and love her, love her, love her.