Spain pip Portugal to Nations League finals as Czechs go down