India's inexplicable middle-order collapse ensured that fine half-centuries from Shikhar Dhawan and Virat Kohli did not count for much as the team was handed a 31-run defeat by a resolute South Africa in the opening ODI at Boland Park, Paarl on Wednesday.