I do it a bit odd, but it works. I do the nails first, plenty of oil and towel the excess off. Then I do the tan and then I do the polish/topcoat/nailart, after giving the nails a good but careful wipe with remover to remove the oil and tan. This way you dont affect the tan if you are areful, and you don't have to wai forever to tan. Also you won't get any nasty staining on the polish.
Same goes with toes. If i'm doing a minipedi, I do all the prep, file, buff, cuticles etc, then oil, towel off the excess, then paint the toes after the tan. A little trick with toes is, Put a basecoat on before tanning, doesn't matter if its wet still, tan, then you take it off carefully after and reapply a fresh basecoat. This way any overspray clings to the basecoat, and you can just (carefully) wipe the whole lot off. I've found if tan settles on barenaked toenails, even after moisturiser, it really settles in all the little grooves and dings there always is on toes.
Hth x x