Short Grammar Questions (Part 1)

So I am just studying the use of まま and I came across this sentence:

手がきたないままではいけないよ。はやく洗って。

And I think I get the meaning (something like your hands are still dirty. Wash them quickly) but I don’t understand why there is ではいけない after まま。All I know so far is てはいけない as an ender to say don’t do this. But then we’d need a verb with a te form right? But kitanai is not a verb and not in the te form either.

Can somebody help me out? Thanks