Excited-states dynamics and electronic structure theory in complex systems