This is just an idea based on something similar with my 3 series M sport - total power loss, nada.
On upper side of passenger footwell that's where my fuse box is [behind glove box], see if you can get yr hand in underneath and feel the cables and give them a gentle wiggle. I called a BMW guy out and this is what he did to get the car started. It was all repaired by the dealer FOC as there was a call-in notice on my model.
From your brief description your total power failure symptoms seem similar, although your car is 5 series. Might be worth checking the above, and also see if your battery connections have loosened. Not sure on yours if they're in the boot.
Failing this, call your dealership and get it recovered. Pricey I know, but it'll get you out of this hole.