Cost-optimal renewable microgrids with second-life EV batteries: evidence from Puglia, Italy | Synapse