Krishna speaks12.18

समः शत्रौ च मित्रे च तथा मानापमानयोः।शीतोष्णसुखदुःखेषु समः सङ्गविवर्जितः॥

samaḥ śatrau ca mitre ca tathā mānāpamānayoḥśītoṣṇa-sukha-duḥkheṣu samaḥ saṅga-vivarjitaḥ

Word by word
samaḥ — alikeśatrau — to a foeca — andmitre — to a friendca tathā — as well asmāna-apamānayoḥ — in honor and dishonorśīta-uṣṇa — in cold and heatsukha-duḥkheṣu — in joy and sorrowsamaḥ — equipoisedsaṅga-vivarjitaḥ — free from all unfavorable association

The verse says

The same toward enemy and friend, the same in honour and dishonour, the same in cold and heat, in pleasure and pain, free of clinging —

In plain words

The first pair is the hard one.

Same toward an enemy and a friend — said to a man who is about to fight people he loves.

The pairs that follow get easier: honour and dishonour, cold and heat. The list starts with the cost.

Where you've felt this · in friendship

A good umpire gives a decision against the side he has supported since he was nine, and gives it without a flicker. He has not stopped supporting them. He has simply never once confused the two things, and everybody on the field knows it.

Going deeper

Being the same toward enemy and friend does not mean feeling the same about them, and that distinction carries the whole verse.

The word is sama — even, level. It describes conduct and regard rather than emotion. Chapter 5 used it for the wise person who sees a learned brahmin and an outcaste equally, and nothing there suggested the sage felt nothing. What is level is what each one is owed.

The same applies to the enemy. Krishna has just told Arjuna to fight without enmity, which only makes sense if evenness and indifference are different things.

For a reader the demand is smaller than it sounds and harder than it looks. You are not asked to like the person who has wronged you. You are asked to let what you owe them stay the same as it was, which is the part most people quietly adjust.