Where in any islamic scripture it is written that all khalifa should be from quraysh ?
The Prophet (ﷺ) said, "Authority of ruling will remain with Quraish, even if only two of them remained." (Bukhari)
The Caliphate will remain among the Quraish even if only two persons are left (on the earth), (Muslim)
If we call anyone else Khalifa we would be saying the opposite of what the Prophet (SAW) said: "Caliphate does not have to remain with the Quraysh" when the Prophet (SAW) said it will. We would basically be, NaOzobiAllah, calling him a liar when he cannot be a liar, so we would have to call the person claiming a non-Quraishi is a Khalifah a liar instead.
So, since no one can truthfully claim a non-Quraishi is a Khalifah, they cannot be a rightful Khalifah.