Democrats and Republicans on Tuesday produced competing stopgap budgets and education measures as the clock ticks to a July 1 deadline — but top legislative leaders ended the day speaking of “progress” and optimism after a lengthy meeting with Gov. Bruce Rauner.

The two Democratic and two GOP legislative leaders spent more than two hours with the Republican governor, ahead of Wednesday’s House and Senate sessions.

House Speaker Mike Madigan left Rauner’s Springfield office Tuesday evening and called the day “productive.”

“I’m optimistic that we can settle a whole host of problems, and a lot of good will be done for the state of Illinois,” Madigan said.

House Republican Leader Jim Durkin too said “progress” was made and the leaders would be meeting with the governor Wednesday morning.

The day began with what appeared to be a continuation of bipartisan bickering over a nearly yearlong budget fight, but ended with careful words and the hope that both a stopgap and education bill could be finalized soon to ensure government operations stay running and schools open on time.

A new Republican sponsored stopgap measure, supported by Rauner, was filed Tuesday by Durkin. It includes hefty funding for higher education and more money for MAP grants and human services in an effort to get Democrats on board.

A separate Republican sponsored House education bill was also filed by Durkin Tuesday. Rauner continues to support the bill he’s been touting for weeks that would include an increase of $240 million for a total of $7 billion statewide. Schools won’t lose money, but it doesn’t include a “bailout” for Chicago Public Schools.

Meanwhile, Senate Democrats filed five bills, sponsored by Sen. Donne Trotter, D-Chicago, and Sen. Heather Steans, D-Chicago. Democrats filed individual bills for K-12 education, state operations, higher education, human services and Illinois Department of Transportation construction and local gas tax revenue sharing.

Sources said lawmakers would make a big push to get the construction bill passed by Wednesday to ensure road construction isn’t affected by the July 1 deadline.

The Senate education bill would include a $760 million increase in state aid and an equity grant, with no school district losing money. It would also fully fund the foundation level and would include a $75 million increase to early childhood education, which is the amount Rauner supported in a Republican-sponsored bill.

Chicago Public Schools would get a total of $286 million more in 2017 compared with 2016, a 30 percent bump in the general state aid formula. It would also get $112 million to pay for teacher pensions in 2017. In 2016, CPS received $12 million from the state to pay for pensions.

Democratic sources said the Senate bills were crafted by members of the working groups who wanted to see their progress in writing. Those bills were distributed to members days ago.

But Rauner’s administration has already dubbed the Senate education bill a “backdoor bailout.”

Rauner on Tuesday urged Democrats to pass his six-month stopgap budget, while pointing the finger at Democratic leaders for trying to get more money for cash-strapped CPS.

Gov. Bruce Rauner speaks to reporters about the state budget and education funding, in his office at the Illinois State Capitol Monday, June 27, 2016, in Springfield. (AP File Photo/Seth Perlman)

Gov. Bruce Rauner speaks to reporters about the state budget and education funding, in his office at the Illinois State Capitol Monday, June 27, 2016, in Springfield. (AP File Photo/Seth Perlman)

“While we have essentially reached agreement on a six-month stopgap budget, the super majority is focused on passing a school funding bill that forces suburban and downstate taxpayers to pay for a massive bailout of the severely mismanaged Chicago Public Schools system,” Rauner said in a statement.

The governor advocated three options for CPS: changes in the teachers contract, allowing the school district to declare bankruptcy or enacting Senate President John Cullerton’s pension reform proposal for teacher pensions.

“If Mayor Emanuel would join with his friend, President Cullerton, and lead in the effort for reforms along with Republican legislators, then together we could protect students, teachers and taxpayers in the city and the state, creating a better future for everyone,” Rauner said in the statement.

Emanuel shot back at the governor, saying Rauner has “wasted 18 months of his term holding the entire state hostage in the name of workers’ compensation and right to work.”

“After all that time, Bruce Rauner is doubling down on the failed formula that rewards wealthy children who grow up in elite communities and penalizes poor children in Chicago and across the state, and he is standing behind Illinois’ ignominious distinction of being 48th in the nation for education funding,” Emanuel said in a statement. “That is the real tragedy.”

July 1 is a critical date for state operations. It’s when appropriations made under consent decrees and court orders will cease without a state budget, affecting everything from social services, road construction and essential state services.

Democrats had asked Rauner for additional money for MAP grants, human services and higher education. And the governor’s plan includes those additions sans extra money

Rauner’s bills — one with K-12 funding and the other with all other funding — would provide a full year of funding for elementary and high schools, road construction, federal programs, as well as enough money to support six months of operations for higher education, state-operated prisons. It also includes money for core operations and programs for public safety, health and welfare, according to a Rauner administration memo.

Higher education would get $1 billion on top of $600 million already approved for this year. About $680 million of that amount comes from the Education Assistance Fund.

The school bill includes $151 million for MAP grants for spring semester 2016 for all students awarded the grants in both public and private colleges.

Human services would be funded at $650 million from the Commitment to Human Services Fund. That plan would cover critical services that aren’t currently covered under consent decrees or court orders.