Facing a midnight deadline, the White House and Congress are working furiously to break a budget deadlock and prevent a federal government shutdown that would idle hundreds of thousands of workers.