I needed to override the background, and it was this solution that helped. It works in all modern browsers:
input:-webkit-autofill {
/* some other styles */
/* background-color: white !important; */
/* -webkit-text-fill-color: black !important; */
box-shadow: 0 0 0px 1000px white inset !important;
}