Your strategy of doubling the bet each time you lose so that eventually when you win you recoup all your losses suffers from a fundamental flaw - namely that you must have infinite wealth for this to work. Suppose you first bet $2, then if you lose you next bet $4, then $8, etc. If you lose 12 in a row then you've already lost $8190 and your next bet requires 2^13 = $8192. The odds of losing this many in a row are long, but when it does happen if you don't have the cash you must quit and you are wiped out. There's also the practical aspect that casinos have limits on the size of the bet you're allowed to make, so the strategy gets cut short.
As for the mathematics: your example of losing 12 in a row does not require precisely 24 spins - that's the minimum number of spins to lose 12 times, but it may actually involve more (if there are multiple reds in a row). The upshot is that the odds of losing 12 in a row is actually (1/2)^12 = 1/4096 , not one in 16 million. And keep in mind that once you've lost, say, 5 in a row the odds of getting to 12 is now (1/2)^7 = 1/128. So as your losses mount the odds of a catastrophic wipeout gets higher.