Naomi Osaka moved into the Brisbane International semi-finals after recovering from a set down to beat Anastasija Sevastova 3-6, 6-0, 6-4.