Excellent question, and one which (unfortunately) is growing more common as young adults grow, on average, more out of control. Sorry to hear your daughter has been hooked by one of these men, as the process of removing him from her life is going to be an extremely difficult one for you.
In general, most girls go through a phase where they find the "bad boys" at least marginally attractive. But usually those with real dependency needs (because of father abandonment issues, overbearing parents, or outright rebellion, etc) find themselves entwined with these guys - and fall back on the excuse of, "But I LOVE him!" to justify continuing down a self-destructive path. In fact, I highly recommend the book But I Love Him! Protecting Your Teen Daughter from Controlling, Abusive Dating Relationships, by Jill Murray for an excellent overview of both the dynamics which lead to the attraction and ideas for shedding the abusive jerky boyfriend.
But in the short run... We have to get down to brass tacks - but walk the line of being loving and accepting (a tough, tough combo). The rules have to apply, regardless of the anger she will demonstrate. Curfew will be enforced, after school hours will be accounted for, the phone and computer will be on a short leash - all of the rigidity that she hates from her mother will be enforced in the short run. And shift your focus from trying to find a consequence that will work (as she ages, consequences grow more inconsequential... pardon the pun) toward the idea that she will "earn" time for adhering to the rules. In other words, you can only "take away" so much stuff... but if she earns time with him or time on the computer or on the phone, etc. by complying and adhering to the house rules, then she alone is in control of her destiny. If she does not comply, then she does not go out next weekend, etc. and use technology to build avenues of trust - if she is out, have her periodically (you can control randomizing this request) send you pictures from her phone of where she is, who she is with, etc. She cannot alter the time stamp on the photos, so she can help you feel as though you have better tabs on her this way.
Now... a natural extension of this idea is, "But what about if she sneaks out, doesn't comply, etc?" In those cases, do not hesitate to call the police and get them involved. I know many parents do not like for the police to do their family business for them, but if you are losing control of your daughter, then establishing boundaries is going to be a necessary step in the short run. Let her know that legal action is on on the table, and that you will not hesitate to use it if she forces your hand.
And now the tricky part... on the other side of the coin, you do have to reinforce and "love" the positive behavior from her. I don't know if dad is still around (I am guessing not?) then maybe even eliciting the aid of a healthy adult male in her life (an uncle, granddad, family friend, etc) who can step in and create an atmosphere of acceptance and love from a male who can "re-teach" her to seek a more appropriate attention and relationship from guys her age. She also needs support from her mother, which is why the concept of "catch her being good" is so important.
Obviously, this is not going to be a panacea for all that ails your relationship with her, but it is a start for you to begin thinking about boundaries and structure in the home. I urge you to seek therapy for yourself (at the very least) or for the two of you (ideally) to have a counselor evaluate the entirety of the situation and help to support YOU through this process. It is difficult to give a completely thorough answer with such a short burst of information, and an on-site therapist can take all of your family's dynamics into account. The goal initially of counseling should not be to "fix" anything straight out - rather, the initial goal should be to stabilize the family so that progress can be made.
I hope this has been a helpful first step. You are facing a tough spot with your daughter, and her emotional lability is going to make the situation worse before it gets better, so seek some outside help, okay? If you are satisfied with the response, please hit "Accept." That is the only way I can receive credit for my answer. Thanks-