You may want to enlist your daughter in a little bit of social work... as a volunteer mentor.
People have many agendas for their lives and some of them include making it possible for other people to see the shiny happy hidden parts they see in their (uncomfortable) friend choices. That may be what is going on for your daughter.
You may want to have a conversation with your daughter about standards (and why she gets to follow them, regardless of the behaviour choices of her friends), and how she might like to help her friend be more socially-acceptable and more successful in her life by coaching her in this realm. Her friend doesn't need to know it's happening, but it may help your daughter clarify what it is she's hoping to get from the friendship, or what it is she is actually capable of giving.
No one can 'fix' this girl's life, but her friend may have a lot of influence over the choices and habits she's developing.
I do, though, strongly recommend a rigourousness when she's around -- no one speaks to our family like that, no one needs to hear that kind of language, no one needs to know everything you think about anyone else, it is better to develop your own opinions about people rather than making up your mind based on gossip or other people's interpretations -- those kinds of statements have a lot of power.
And, I believe that one of the reasons it's frowned upon for 14yos to have their own apartments is because they still need hands-on guidance from adults who care about them, yeah? That means you need to do some guidance -- out loud, while the friend is present and while she isn't.