Towards thermodynamics of quantum systems away from equilibrium