Washington (CNN) For President Barack Obama, Donald Trump's presidential victory is nothing less than a nightmare.

His longstanding vision for progressive change faced sharp and unexpected repudiation Tuesday night from voters still fuming at their perceived diminished prospects. By Obama's own admission, the major pieces of his presidential legacy are now subject to a gutting by a successor he resents deeply.

But the President insisted to his supporters and Democrats Wednesday this is not the end.

"The sun is up, and I know everybody had a long night. I did as well," Obama said in the White House Rose Garden.

Obama will likely leave office with an approval rating of over 50%, and it's a truism of American politics that ex-presidents get more popular after they leave the White House.

Nothing, however, can paper over the fact that the first African-American president will stand on the inaugural platform next to Donald Trump, who stoked divisions and preyed on people's racist fears, including through lies and insinuations about Obama himself.

JUST WATCHED White House: Democrats not responsible for Trump Replay More Videos ... MUST WATCH White House: Democrats not responsible for Trump 04:44

Obama's efforts on Hillary Clinton's behalf over the past month, unprecedented for a modern sitting president, reflected not only a desire to elect his former secretary of state. It was a chance to sell, again, his vision of a hopeful America and the progress inherent in a nation ready to elect its first African-American president.

The US electorate affirmed that vision in 2008, and gave Obama more time to fulfill it in 2012. But voters now leave Obama with little hope of salvaging a presidential legacy that depended heavily on his successor.

Trump and Obama will meet Thursday, and the President said the White House will cooperate with the incoming administration, citing the example President George W. Bush set in 2008.

"Everybody is sad when their side loses an election, but the day after we have to remember that we're actually all on one team," Obama said. "This is an intramural scrimmage. We're not Democrats first. We're not Republicans first. We are Americans first. We're patriots first. We all want what's best for this country. That's what i heard in Mr. Trump's remarks last night. That's what I heard when I spoke to him directly. And i was heartened by that. That's what the country needs. A sense of unity, a sense of inclusion, a respect for our institutions, our way of life, rule of law, and a respect for each other. I hope that he maintains that spirit throughout this transition, and I certainly hope that's how his presidency has a chance to begin."

But the sting of Trump's victory will last well beyond the transition period as the framework of Obama's presidential legacy comes under siege by Republicans who fought him tooth and nail for eight years and who, in January, will control the White House and both chambers of Congress.

During rally after rally on Clinton's behalf, Obama cautioned voters that electing Trump would mean watching his accomplishments on jobs, health care, foreign policy, climate change and equality go "down the drain."

He warned his coalition of African-Americans and young people that he would "consider it a personal insult -- an insult to my legacy" if they didn't propel Clinton to the type of electoral victory they helped him achieve. Those voters did not turn out in the same levels they did for Obama, despite his aggressive overtures.

During every battleground rally or radio phone-in, he declared Trump "uniquely unqualified" to hold his office, warning against allowing the brash billionaire near the nuclear codes. He spent the last 18 months reassuring his foreign counterparts that Trump's proclamations about America don't reflect the country's real values.

Like all Democrats, Obama faces a reckoning about the true makeup of the American electorate, and his party's prospects going forward. But he also awakens Wednesday with the bitter responsibly of handing the US government to the man whose actions he openly fears.

"This is somebody who would do damage to our democracy," Obama said of Trump in Florida last week, adding Trump made him "fear for the Republic."

Readying assault on Obama priorities

Trump has promised to scrap Obama's signature health care law, which has become increasingly fragile as costs spike and insurers withdraw from exchanges. The fixes that Obama insists will reinforce the Affordable Care Act now appear to have little chance of moving forward.

Trump's transition team has been developing plans to reverse the patchwork of executive actions that Obama devised to skirt a Republican Congress on immigration and climate change. That includes Obama's unilateral moves easing deportation enforcement and his regulations on power plants.

Even before Obama leaves office, those actions remain mired in legal challenges and haven't yet taken effect. Proponents of the moves had claimed if they eventually did take hold, their positive impact on society would make it difficult for future presidents to reverse them. Having never taken full effect, there's little expectation now those actions will ever be realized.

Photos: Election Day in America Photos: Election Day in America President-elect Donald Trump delivers his acceptance speech at his election night event in New York City on Wednesday, November 9. "Every single American will have the opportunity to realize his or her fullest potential," the Republican said. "The forgotten men and women of our country will be forgotten no longer." Hide Caption 1 of 58 Photos: Election Day in America Trump, on stage with his family, acknowledges the crowd at the New York Hilton Midtown Hotel. He was gracious toward his opponent, Hillary Clinton, and called for unity. "We owe (Clinton) a very major debt of gratitude to her for her service to our country," Trump said. "I say it is time for us to come together as one united people." Hide Caption 2 of 58 Photos: Election Day in America Trump supporters cheer election returns in New York. Hide Caption 3 of 58 Photos: Election Day in America A person sits at the Javits Center, the site of Clinton's election night event in New York. Hide Caption 4 of 58 Photos: Election Day in America Trump's victory is projected onto the Empire State Building in New York. Hide Caption 5 of 58 Photos: Election Day in America Clinton supporters react to results at the Javits Center. Hide Caption 6 of 58 Photos: Election Day in America Clinton's campaign chairman, John Podesta, takes the stage to speak at the Javits Center. He told the crowd that Clinton would not be speaking. At the time, Clinton was behind in the Electoral College with several states still too close to call. She later conceded in a phone call to Trump. Hide Caption 7 of 58 Photos: Election Day in America A woman attends a watch party at the rooftop bar 230 Fifth in New York. Hide Caption 8 of 58 Photos: Election Day in America Trump supporters cheer during his election night event in New York. Hide Caption 9 of 58 Photos: Election Day in America A man reacts as he watches voting results at the Javits Center. Hide Caption 10 of 58 Photos: Election Day in America Republicans in Newport Beach, California, erupt in celebration as Trump's victory in Florida is announced. Hide Caption 11 of 58 Photos: Election Day in America Clinton supporters react to election results at the Javits Center. Hide Caption 12 of 58 Photos: Election Day in America Marta Lunez prays at the Javits Center. Hide Caption 13 of 58 Photos: Election Day in America A Trump supporter in New York reacts as Ohio is called for Trump. Hide Caption 14 of 58 Photos: Election Day in America Clinton supporters watch the voting results at the Javits Center. Hide Caption 15 of 58 Photos: Election Day in America Trump supporters cheer during his election night event in New York. Hide Caption 16 of 58 Photos: Election Day in America People watch election results from Manuel's Tavern in Atlanta. Hide Caption 17 of 58 Photos: Election Day in America An emotional Gerardo Ruiz watches the election results from Clinton's headquarters in east Los Angeles. Hide Caption 18 of 58 Photos: Election Day in America Trump supporters cheer during his election night event in New York. Hide Caption 19 of 58 Photos: Election Day in America Clinton supporters watch results from the Javits Center. Hide Caption 20 of 58 Photos: Election Day in America Claire Shea, dressed as Clinton, cheers during an election night party at Wellesley College in Wellesley, Massachusetts. Wellesley College is Clinton's alma mater. Hide Caption 21 of 58 Photos: Election Day in America People watch voting results at the Javits Center in New York. Hide Caption 22 of 58 Photos: Election Day in America Buttons decorate a Clinton supporter at the Javits Center. Hide Caption 23 of 58 Photos: Election Day in America Diane LaRaia watches election results at a party for Trump supporters in Braintree, Massachusetts. Hide Caption 24 of 58 Photos: Election Day in America An American flag hangs above the media at the Javits Center. Hide Caption 25 of 58 Photos: Election Day in America Boxes containing mail-in ballots sit waiting to be sorted at the San Francisco City Hall polling location. Hide Caption 26 of 58 Photos: Election Day in America Kathleen Lundy eyes her ballot in Salt Lake City. Hide Caption 27 of 58 Photos: Election Day in America A man in Philadelphia hangs a sign reminding people to vote. Hide Caption 28 of 58 Photos: Election Day in America A man snaps a selfie with his child as he waits to vote in Brooklyn, New York. Hide Caption 29 of 58 Photos: Election Day in America Harvey Erwin, a 94-year-old World War II veteran, votes with his 3-year old great-granddaughter in Joplin, Missouri. Fellow voters applauded Erwin as he walked to the front of the voting line. "People turned and started clapping all the way to the front of line and saying 'Thank you for your service,' " his daughter, Janine Erwin Johnson, told CNN. "It made tears stream down my face because of the recognition to my sweet dad." Hide Caption 30 of 58 Photos: Election Day in America A man votes in the bakery department of an Austin, Texas, grocery store. Hide Caption 31 of 58 Photos: Election Day in America "I voted" stickers are placed at the gravesite of Susan B. Anthony in Rochester, New York. Anthony, a social reformer who died in 1906, played a major role in the women's suffrage movement. Hide Caption 32 of 58 Photos: Election Day in America Democratic presidential nominee Hillary Clinton and her husband, former U.S. President Bill Clinton, greet supporters after voting in Chappaqua, New York. Hide Caption 33 of 58 Photos: Election Day in America Republican presidential nominee Donald Trump looks at his wife, Melania, as they cast their votes in New York. Hide Caption 34 of 58 Photos: Election Day in America Voters cast their ballots at a Chicago laundromat on November 8. Hide Caption 35 of 58 Photos: Election Day in America Penn State students stand in line inside the Student Union, called The Hub, waiting to cast their ballots in State College, Pennsylvania. Hide Caption 36 of 58 Photos: Election Day in America John and Colleen Kramer vote at the Caplinger Mills Trading Post in Caplinger Mills, Missouri. Hide Caption 37 of 58 Photos: Election Day in America Voters fill out ballots at the Mount Vernon Center in Alexandria, Virginia. Hide Caption 38 of 58 Photos: Election Day in America A hand-painted message appears on a billboard in Columbiana County, Ohio. Hide Caption 39 of 58 Photos: Election Day in America People cast their votes at the Echo Park Pool in Los Angeles. Hide Caption 40 of 58 Photos: Election Day in America A legal observer with the American Civil Liberties Union of Nevada stands at the entrance of a polling location in North Las Vegas. Hide Caption 41 of 58 Photos: Election Day in America A tourist takes her "misfortune" slip from The All-Seeing Trump, a machine set up across the street from the New York Hilton Midtown Manhattan Hotel. Hide Caption 42 of 58 Photos: Election Day in America Trump's running mate, Indiana Gov. Mike Pence, votes in Indianapolis. Hide Caption 43 of 58 Photos: Election Day in America Clinton's running mate, U.S. Sen. Tim Kaine, votes with his wife, Anne Holton, in Richmond, Virginia. Hide Caption 44 of 58 Photos: Election Day in America Denise Richardson votes at the Chua Phat To Gotama Temple in Long Beach, California. Hide Caption 45 of 58 Photos: Election Day in America U.S. Sen. John McCain and his wife, Cindy, arrive at a polling place to cast their votes in Phoenix. Hide Caption 46 of 58 Photos: Election Day in America People line up to cast their ballots at an elementary school in Chesterfield, Virginia. Hide Caption 47 of 58 Photos: Election Day in America Democratic polling judge John Ramirez is reflected in a mirror as he helps a voter at a beauty salon in Chicago. Hide Caption 48 of 58 Photos: Election Day in America With sitar players performing next to him, Efrem Harkham meditates after voting at the Luxe Hotel polling station in Los Angeles. Hide Caption 49 of 58 Photos: Election Day in America Voters cast their ballots in a polling location inside Mike's TV and Appliance November 8, 2016 in State College, Pennsylvania. Hide Caption 50 of 58 Photos: Election Day in America A woman reads over a ballot while waiting to vote in Brooklyn. Hide Caption 51 of 58 Photos: Election Day in America A voter drops his ballot into a voting box in Sutherlin, Oregon. Hide Caption 52 of 58 Photos: Election Day in America People vote at the Los Angeles Lifeguard station in Venice Beach, California. Hide Caption 53 of 58 Photos: Election Day in America Trump's son Eric signs in to vote at the 53rd Street Library in New York. Hide Caption 54 of 58 Photos: Election Day in America A voter casts a ballot inside the Halloran Skating Rink in Cleveland. Hide Caption 55 of 58 Photos: Election Day in America A line stretches down the street in New York as voters wait for a polling site to open. Hide Caption 56 of 58 Photos: Election Day in America Voters look at a sample ballot at a polling location in Independence, Missouri. Hide Caption 57 of 58 Photos: Election Day in America Voters in Dixville Notch, New Hampshire, cast their ballots shortly after midnight. The small town south of the Canadian border continued its tradition of voting early, with Clinton winning four votes to Trump's two. Libertarian candidate Gary Johnson picked up one vote, while Mitt Romney, the 2012 GOP nominee, received a surprise write-in vote. Hide Caption 58 of 58

Trump has committed to withdrawing the US from trade agreements, including the pending Trans Pacific Partnership that Obama has championed. So, too, has Trump said he would remove the US from the agreement with Iran to curb its nuclear ambitions and from a global climate accord signed in Paris last year.

The fate of the Supreme Court, with a GOP Senate now under no pressure to take up Obama's nomination of Merrick Garland, is likely sealed. Trump has named several conservatives as potential justices; it's likely he'll have multiple seats to fill as the court's older members approach retirement.

Tone of final months

In the coming weeks, administration officials are expected to work on cementing what elements of Obama's unfinished agenda they can, either through new executive orders or action in the lame duck Congress.

Obama himself is expected to deliver a major address on democracy next week in Greece -- the ancient birthplace of that type of government -- and to meet for a final time with close US allies. Those meetings are now expected to center on shoring up shared priorities as trans-Atlantic alliances face an uncertain future.

But even as Obama works in his final weeks to salvage what he can of his agenda, there's little doubt that his message of hopefulness has suffered a deep setback.

The tone of the just-concluded presidential contest is perhaps the best reflection of his inability to improve the tenor of American political life. When he announced his presidential run in 2007, Obama decried the "the smallness of our politics" and vowed to reform Washington.

Eight years later, the race to succeed devolved into one of the darkest national election races in memory, a bitter and ugly fight between two deeply unpopular candidates.

"It's one of the few regrets of my presidency that the rancor and suspicion between the parties has gotten worse instead of better," Obama said in his final State of the Union address earlier this year.