The shift is pending (red) even though clients and staff ratios are correct because of below reasons:
"Staff confirmation required" is ticked. Shift will remain red until allocated staff accepts the shift. You can also choose not to tick this box. In that case shift will be green.
Staff is doubled booked: Shift will red if staff is booked in another program. Second program saved will show "Pending" status. When you go inside the shift you will find double booked staff in red. (as illustrated in image below)
Staff is on Leave. Once staff's leave gets approved, all his shifts will automatically turn red.