How smart tech ended Brazil’s power theft crisis