After five years of painful efforts to climb back from the edge of bankruptcy, New York finds itself facing new horrors, perhaps more dreadful than any it has encountered before.

The 11-day mass transit strike that ended late Friday cost the city about $3 million a day in police overtime and lost taxes, while private businesses lost roughly $100 million a day, officials estimated.

Yet, difficult as those losses may be, the national economic outlook portends that, for New York, the worst is yet to come.

In the bleakest scenario for New Yorkers -- and for citizens of other older cities like Chicago, Cleveland, Detroit, Boston and Washington, which also face financial woes -- the 1980s promise to undo all their best efforts and make bankruptcy again a real threat.

Inflation is pushing up New York's costs. Record interest rates and a paralyzed bond market impair the city's borrowing power, and an impending recession will trigger layoffs and sales declines in a city that needs every worker-tax and sales-tax dollar it can get.

Even labor settlements that would be considered moderate in the private sector -- such as the 17 percent over two years tentatively agreed to by the bus and subway workers -- threaten the budget.

Moreover, even if the city were able to get its fiscal house in order this year and next, overriding economic and social trends across the country spell renewed woes.

The decade ahead promises an accelerated shift of resources from the cold, old industrial states to the sunny, energy-rich parts of the nation.

Felix Rohatyn, the investment banker who for five years has worked to bail out New York and whose advice is now sought by Washington, Cleveland and Chicago, speaks of a disaster that could lead to class struggle and civil war.

A year ago Rohtyn was confident that if politicians were willing to take tough, unpopular cost-cutting actions, the city would get its budget truly in balance and be able to rally forth to borrow on its own rather than using financially sound New York State to borrow for it.

But in an interview last week he said:

"If you ask me what can be done and still keep the city a place people will want to work and live in, I don't know. I don't know if it is doable."

New York City's budget deficit for this year, for example, was once projected at about $400 million. The Municipal Assistance Corp., which Rohatyn heads, won't have a new figure until next month, but he said he fears it could be as high as $1 billion.

After the crisis burst upon New York in 1975, the city's deficit has been reduced from $2 billion to $400 million. A series of modest 4 percent labor settlements had helped keep costs down, the city had pared much of its spending, about $6 billion of short-term debt was refinanced, and $4 billion in new money had been raised.

Inflation and the decline of the dollar helped New York initially. Inflation pushed up tax revenues while the cheap dollar made the city attractive to foreign businesses and tourists. Dozens of new headquarters opened here during the late 1970s. After losing 600,000 jobs between 1968 and 1978, New York gained back almost 100,000 in the last two years.

But the numbers are starting to turn sour again. And the federal government, which reluctantly helped out in 1975 and again in 1978, is so concerned about its own budget problems that the city probably will not be able to get any help when federal loan guarantees expire in 1981. Indeed, city and state planners are worried that frenetic cost-cutting in Congress and other federal funds they had planned on receiving next year.

Mayor Edward Koch, constant optimist, concedes that New York is far from out of the woods, but expresses confidence that there will be a happy ending. "It will take 12 years to turn this city around," says the mayor, who hopes to preside at City Hall for those 12 years.

In the days of his predecessors, John V. Lindsay and Abraham Beame, "people ripped flesh off the city like an elephant carcass," Koch said in an interview. Some of those doing the ripping, he quickly makes clear, were the unions.

In the first year of labor negotiations in 1978, Koch achieved relatively inexpensive settlements with the 33,600 transit workers and the 238,000 municipal workers. Fears about the city's financial stability and the future of their pensions undoubtedly contributed to the workers' moderation.

But three years of severe inflation have ravaged incomes, making rank-and-file union members militant. Their leaders -- many of them facing severe internal challenges -- have not adopted their 1978 posture, even though they recognize that big labor settlements threaten to push the city's shaky budget irretrievably into the red.

The transit strike was the opening of Koch's second round of bargaining (although transit workers technically are state employees), and in June the city will have to negotiate with its own unions: fire, police and municipal.

The city has budgeted a 4 percent annual increase. But the transit workers, whose package of last week will be a goal for municipal unions, settled for 9 percent in the first and 8 percent in the second. Each percentage-point increase in the city wages costs City Hall $45 million.

Koch was outraged at the transit workers' settlement and accused the state transit authority and Gov. Hugh Carey of "caving in." He said a similar settlement for city workers in June would bankrupt the city.

One factor Koch has going for him when he enteres negotiations is that the financial crisis has drawn the unions into a new role -- bankers for the city. The unions put up large chunks of their pension funds to help keep New York from bankruptcy. They are partners in the city treasury.

In exchange for federal loan guarantees that helped New York survive the 1970s, the city promised to have a balanced budget by fiscal year 1982, beginning July 1, 1981.

But with costs skyrocketing and militant workers sure to push a labor settlement above hoped-for levels, the chances of meeting the 1982 goal are slim. Koch already has proposed millions of dollars of unpopular new taxes for a citizenry that carries one of the heaviest burdens in the nation. More taxes may impel an accelerated exodus of middle-income taxpayers, on whom New York, like all cities, relies for the bulk of its income.

The city has pared its workforce sharply in the last five years and Koch plans further cutbacks by attrition -- that is, by not replacing workers who retire or otherwise leave the payroll. But the city's ability to deliver services would be severely impaired if Koch were forced to accelerate his layoffs from 4 percent to, say, 8 percent.

New York State, which has been financially sound and has played a major role in keeping the city aloat, is beginning to face financial difficulties of its own. The state's ability to help the city is reduced, and would be reduced even more in a recession.

Even if the city meets its 1982 goal and can go back to the bond markets for borrowing, it is unlikely that the bond markets will respond. The major rating services still decline to give New York the nod, and the bond markets themselves have been so decimated by sky-high interest rates and waning confidence in the economy that all but the most impeccable municipalities will have trouble raising money.