KABUL — U.S. Defense Secretary Chuck Hagel arrived in the Afghan capital Saturday for an unannounced visit that comes as Washington and President Hamid Karzai remain at loggerheads over the terms of a plan that would keep American troops in the country beyond the end of next year.