By Martin Baccardax Tesla managed to post improved profit margins, as well as record first quarter revenues, despite a surge in input costs and a late March shutdown at its Shanghai gigafactory. Updated at 4:29 pm EST Tesla (TSLA) – Get Tesla Inc Report posted stronger-than-expected first quarter earnings Wednesday, with record revenues and a big jump in profit margins, as the clean-energy carmaker continues to defy the global shortfall in semiconductor supplies and the surging input costs hammering rivals around the world. Tesla said adjusted earnings for the three months ending in March were…