Bernarda Pera stunned top-seeded Anett Kontaveit 6-2, 6-4 to win the Hamburg European Open for her second title in seven days.