A positive story for you- when DD was 14 she got in with a difficult crowd. There was vaping, drinking, anti-social behaviour and trouble at school. We suspect their were drugs and one night we discovered she had left the house in the middle of the night and we had to report her as missing. She was brought home by the police at 4am and we were told the gang she was hanging round with included a lad accused of rape, dealing and assault. Constant detentions at school and the group were bunking off/running out of school.
2 years later and she's a different child. Working hard at school and an absolute pleasure to be around. A couple of things helped- she got a referral to a charity who worked with girls at risk who were fab. They gave the group a safe place to be and had people close to their age who they could relate to who could talk about risks. Both us and school had strict rules and reward systems. It was important not to lock her down completely (although we did have alarms installed on the doors to prevent future midnight flits). Curfews were set tightly and geographical restrictions in place, but if she came home on time and stuck to what was agreed, they would be increased slowly. Even a minute late and they went down. Always kept saying and showing that we loved her even when we were setting the boundaries. She's in scouts and they did the same (she was caught with vapes on a camp) she was banned from off site activities due to that but they offered to let her do DoE despite that ban as they felt it would do her good. It did (but every inch of her and her belongings was searched by us before she got on the van)
DH vehemently disagreed with me, but I did install tracking software on her phone secretly so I could see who she was talking to and what was being said. This helped me gently avoid tricky situations and understand more about how she was feeling.
What really did it was the group splintering. Four of the other girls tried to attack DD and film it. DD fought back and they actually came off worse. From that day she refused to have anything to do with them but it was really hard as she had alienated everyone else in school so had no friends and of course the gang were picking on her mercilessly. It was a real fight getting her in to school- I had to drop off and pick up every day while there were tears and panic attacks. The school introduced her to a new set of girls who had also experienced bullying and they took her under their wing. She's now firm friends with them and they are lovely girls.
She's only friends with one of the ex-group now- ironically the one all the other mothers kept warning me about- the school refuser from outside our naice middle class village who they said was leading the group astray. She was so appalled by the attack on DD she also left the gang. Turns out she's a loyal, funny, hard working girl who struggles with school.
It was such a hard time so have a gentle hug from someone who has been there. Might be worth asking if there is any support available for you, not just DD. It helps to have a space to let it all out so you can hold it together at home.