I merely pointed out her own senses of dress may not been seen to others as appropriate, which is more or less what she did to my dd.
That's the problem, though, isn't it? You treated her as though she were a peer. You did exactly what she had done, only with the extra aggressive heft of your status as an adult. You modelled that bullying is okay, and the biggest one wins.
What your niece was doing was horrible, and it's shocking her mother did nothing about it. She needed an extremely firm telling off - a force ten bollocking - over what a nasty, shallow, spiteful and unpleasant little person she is developing into. But reference to the way asking why she is choosing to be unkind and cruel to someone - her own cousin, at that - instead of choosing to be a decent person? That's what you do, as an adult, if a child is really this far over the line.
A friend I know asked her daughter, after overhearing her being this nasty about another girl (who wasn't present - it was a bitching session between her and a friend), if she realised she was an Ugly Stepsister and not Cinderella (they'd been to see the new film, which she'd loved). You needed to focus on how wrong it is to think the way someone dresses defines who they are, and how horrible it is to choose to be nasty to someone, especially without any reason or justification. Not support that by attacking how they, themselves, dress.
If your daughter had said all this to her cousin, I would support you in backing her up. She has a right to defend herself, and her cousin would have got what she asked for. But they are children, and you are an adult, and you reacted as if she were a peer. You weren't making any points other than 1) it's okay to shred someone over how they dress, 2) the person who can be nastiest and most aggressive is the winner in any row, and 3) it's okay for adult women to slut-shame anyone, even very small girls.
None of that is really very supportive of your own daughter, really.