Entropy pair functional theory: Direct entropy evaluation spanning phase transitions