I just had sex with my husband!!!

I just have sex with my husband, I was spotty dark brown & I totally was thinking in my mind that it would be the messy because it's almost gone... But I forgot the this was completely different than just a period!!! I had a miscarriage last Sunday. I remember that I could've sex until my next period. But it was too late I found my self sitting on the with red blood.😰 now what should I do? I didn't had any pain but I didn't use any protection.