Diego Costa popped up with a late winner as Atletico Madrid established the upper hand with a 1-0 win in their Champions League last-16 tie with AC Milan.