There is an existing thread for this: SEF documentation for residency extensions counting towards 5-year citizenship timeline. You will eventually need a letter from SEF called a ‘contagem do tempo’ and it is important in order to cover the periods where your card was invalid.
2 Likes