when I put div.main as a separated condition the code doesn't work
<div class="user-panel main">
<input type="text" name="login">
</div>
document.querySelector("div.user-panel.main input[name='login']").style.backgroundColor = "red"; // this code works
document.querySelector("div.user-panel div.main input[name='login']").style.backgroundColor = "red"; // this code doesn't work