We are sorry to hear of your miscarriage.
The 14 days are counted from when you began passing fetal tissue (clumps/clots in the blood). It is not clear from your description if that began on Shabbat or not until Sunday night. If you are in doubt as to when the tissue began passing, you can assume it occurred on Sunday night when you experienced cramping and heavy bleeding.
You should be aware that the duration of bleeding following a miscarriage varies; in some cases it continues for a number of weeks. Thus, in practice, it is not always possible to immerse 14 days after a miscarriage.
Please feel free to get back to us with any further questions.