Judge orders Border Patrol to improve detention conditions