Bhagavad Gita · 6.9
सुहृन्मित्रार्युदासीनमध्यस्थद्वेष्यबन्धुषु।साधुष्वपि च पापेषु समबुद्धिर्विशिष्यते॥
suhṛn-mitrāry-udāsīna-madhyastha-dveṣhya-bandhuṣhu sādhuṣhv api cha pāpeṣhu sama-buddhir viśhiṣhyate
One who is even-minded toward well-wishers, friends, enemies, the neutral, mediators, the hateful, and relatives — and equally toward the righteous and the sinful — is distinguished among all.
— Bhagavad Gita 6.9
Source: Sacred-Texts.com (Sanskrit) + Bhagavad-Gita.io (translations)