Following Balotelli's after-game red card, I have a silly question: When is a match actually over? Discussed this with a friend of mine today, and even though we both have been playing football since childhood, we couldn't answer this. 

I've heard about red cards been given in the players tunnel. But is there a rule for, when the referee no longer can give a red card to a player? Just curious, as it of course makes sense that the ref can't give a red on the way to his card etc., but when is the match officially over?