Quantum detailed balance conditions with time reversal: the finite-dimensional case