Democrats captured Senate and House majorities, flipping Republican strongholds as voters punished Trump over economic pressures, rising fuel costs and the Iran war.