HTML (React JS) form input text color for autocomplete

As shown in the video attached, when the credentials are filled automatically. The text color is not as when it is while typing. Can anyone please help me to customize it?

Video Link

Code Link

Thank you.

According to the :autofill MDN article browsers may use !important on their internal stylesheet. You might have to use something other than background color and color, or some JS hack (read the links at the bottom).

Here is a CSS tricks article that uses -webkit-text-fill-color and a box-shadow. I only tested it with an email autofill but that did work.