Five years in total. Time already spent in L-1A counts toward an overall seven-year ceiling, so a later promotion into a managerial role restarts nothing. Extensions in the meantime are decided on evidence that the specialized work is still what the employee actually does.
Two ceilings, one clock
Hypothetical example: Ilana goes to an East Ferris company's American affiliate as commissioning lead on L-1B, and after three years the affiliate wants to promote her to run the department. The promotion is possible, and it buys no time. A change to L-1A requires her to meet the managerial or executive test on its own merits, and the years already spent in L-1B count against the seven-year maximum that applies across both classifications.
Planning follows from that arithmetic. If permanent residence is the long intention, the immigrant process has its own requirements and its own queue and should begin while years remain, not in the last of them. Extensions are decided on current facts, so if her role has drifted into general supervision the filing has to describe work she no longer performs.
Keep the job description current, and keep travel records, since time spent outside the United States may be recapturable.