Overstayed for Residence Permit

Me and my family came to Ankara, Turkey, from Afghanistan, through a tourist visa.
The visa is for 90 days. From 12th Oct, 2017 to 12th Jan, 2018. We decided that during this period, we apply for a short-term residence permit. We printed out the application form, collected all the documents, including the insurance and one for proof of financial capacity etc. But all this took well over a month. It required much struggle.
The appointment was dated on 29th, December, 2017. When we got there, the first thing they pointed out to us was the duration of our stay, which was for about 30 days only.
We really had no clue of that. We came here on 8th Nov, so according to that we were allowed to stay here till 8th Dec and not until 12th Jan, when the visa expires. If so, then it means we have overstayed for about 25 days. In which case we'd have to pay a fee as well, which i've just learned.
But we had to stay for the appointment which was dated out of our “duration of stay”
Isn't it possible for us to apply for the residence permit now?

This is a specific case and i think that instead of getting suggestions from random individuals, you'll have to ask the same department for correct information.

Your exact message is duplicated in TripAdvisor. I gave you a reply please check again.