The smart and breezy but surprisingly formulaic “Late Night” is a rom-com in which there’s not a whole lot of “rom” but more than enough “com” to keep us entertained.

It’s a movie about bucking traditions and shaking up the old boys’ network and a woman finding a place at the table. And yet for all its modern sensibilities and up-to-the-minute social commentary, the style and tone are reminiscent of light, last-decade fare such as “Legally Blonde” (2001) and “The Devil Wears Prada” (2006).

Nothing wrong with that! Writer/co-producer/star Mindy Kaling and director Nisha Ganatra have delivered a sweet and funny and insightful confection of a film in which the enormously likable Kaling plays to her strengths as a comedic lead and mixes it up beautifully with the formidable but always game Emma Thompson, who has that great ability to make us laugh even as she’s behaving quite horribly to her fellow human beings.

No doubt inspired by Kaling’s experiences on “The Office” as a diversity initiative hire on the writing staff, “Late Night” is a behind-the-curtains workplace comedy in which the workplace is “Tonight With Katherine Newbury,” a traditional, long-running, New York-based broadcast television talk show. The legendary Ms. Newbury (Thompson) has been hosting the show for some 30 years, has more Emmys than most people have drinking glasses, and hasn’t been relevant to the younger generation for at least a decade.

Nobody can remember the last time Katherine has left the cushy confines of her office and the studio to tape a bit with people on the streets. She doesn’t even know the names of most of the writers on her staff. The prospect of interviewing a social media “influencer” on her show has her recoiling in horror. (Gender of the host aside, the parallels to the last years of David Letterman’s late-night reign are clear and myriad.)

Katherine is a greatly respected woman who doesn’t much care for women. She has no female friends, and has never even had a woman on her writing staff.

EMILY ARAGONES / AMAZON STUDIOS Emma Thompson in a scene from “Late Night.”

Enter Kaling’s Molly, who has early Mary Tyler Moore-level enthusiasm, a quick wit — and ZERO writing experience (her last job was doing quality control at a chemical plant) but is nonetheless added to the writing staff as a diversity hire.

Not that Molly is taken seriously by Katherine, or by the condescending male writers, who are awfully smug given the fact ratings have been in the tank for years and “Tonight” is a buzz-free, viral-free, dated product watched mostly by moms and grandmothers.

And yet the irrepressible Molly persists, reciting inspirational poetry by Yeats out loud and piping up with suggestions that Katherine incorporate some political commentary into her monologue and actually talk about herself, which of course horrifies the elitist, oh-so-British Katherine.

We know where the story is going from the get-go, although “Late Night” does toss a couple of nifty curveballs our way, e.g., Molly’s evolving relationship with Reid Scott’s Tom, a “legacy hire” from a privileged background. The relatively thin main story is given some heft by subplots involving a crass, massively popular, Dane Cook-like comic (Ike Barinholtz), who is poised to take over “Tonight” from Katherine; the network’s new president (Amy Ryan), who immediately butts heads with Katherine and has no qualms about forcing her out in the name of ratings, and Katherine’s kind and gentle husband (John Lithgow), a brilliant musician battling Parkinson’s.

These plotlines — in particular the story of the hardly perfect but lasting and loving relationship between Katherine and her husband — help “Late Night” rise above the admittedly funny but sometimes predictable sitcom antics behind the scenes and on camera at the talk show.

The best moments in “Late Night” are when Kaling and Thompson are bouncing one-liners off each other — sometimes as partners in comedic crime, sometimes as polar opposites with almost nothing in common except that one giant thing: They’re women working in a male-dominated profession.

Katherine has known about that battle, has fought that battle in her own way, for decades. Molly is just beginning to navigate that unfairly stacked journey.

But humor can be a great equalizer, and Thompson and Kaling are terrific as two women who are funny as hell and should never be underestimated.

“LATE NIGHT”

  • Grade:
  • Starring: Emma Thompson, Mindy Kaling
  • Rated: R for language throughout and some sexual references
  • Running time: 102 minutes