Wiktionary
smart cookie
n. (context informal English) An individual regarded as clever, astute, or judicious.
Usage examples of "smart cookie".
It was the first time that I actually saw The Man eat something and, like the smart cookie he was, he complimented Carol at length in what I assume was faultless Japanese, then chatted to her again afterwards while the rest of us did the dishes.
Janice is a smart cookie, as you know, but arithmetic throws her into catalepsy.