Margin confused me at first too. I thought it was the most I could lose, like a deposit that gets used up. But actually, it’s just a small amount the broker locks while losses come from your full account balance.
Margin is based on your position size and leverage, usually notional value divided by leverage. It’s just there to let you open bigger trades, not to limit your risk. That’s why a stop loss is so important, or else your trade can eat up your whole balance.