*{
    box-sizing:border-box;
}

body{
    margin:0;
    font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
    background:#0b0d12;
    color:#fff;
    display:flex;
    justify-content:center;
    align-items:center;
    height:100vh;
}

.auth-box{
    width:100%;
    max-width:420px;
    padding:40px;
    background:#12151c;
    border-radius:16px;
    box-shadow:0 20px 60px rgba(0,0,0,0.7);
    text-align:center;
}

.logo{
    margin-bottom:25px;
}

.logo img{
    width:42px;
}

h1{
    margin-bottom:25px;
    font-size:22px;
    font-weight:600;
}

input{
    width:100%;
    padding:14px;
    margin-bottom:15px;
    border:none;
    border-radius:10px;
    background:#0b0d12;
    color:#fff;
    font-size:14px;
}

input:focus{
    outline:none;
    box-shadow:0 0 0 1px #6aa8ff;
}

button{
    width:100%;
    padding:14px;
    border:none;
    border-radius:10px;
    background:#6aa8ff;
    color:#fff;
    font-weight:600;
    cursor:pointer;
    transition:0.2s;
}

button:hover{
    opacity:0.9;
}

#msg{
    margin-top:12px;
    color:#ff6a6a;
    font-size:14px;
}

.fade{
    animation:fade 0.3s ease;
}

@keyframes fade{
    from{opacity:0; transform:translateY(10px);}
    to{opacity:1; transform:translateY(0);}
}

.code-inputs{
    display:flex;
    gap:10px;
    justify-content:center;
    margin-bottom:20px;
}

.code-inputs input{
    width:50px;
    height:55px;
    text-align:center;
    font-size:20px;
    border-radius:10px;
    background:#0b0d12;
    border:none;
    color:#fff;
}

.code-inputs input:focus{
    outline:none;
    box-shadow:0 0 0 1px #6aa8ff;
}


/* 📱 Мобильные устройства */
@media (max-width: 600px){

    body{
    padding: 15px;
    display: flex;
    justify-content: center;   /* по горизонтали по центру */
    align-items: flex-start;   /* прижать к верху */
    min-height: 100vh;
    }

    .auth-box{
        width:100%;
        max-width:100%;
        padding:25px 20px;
        border-radius:14px;
    }

    h1{
        font-size:20px;
        margin-bottom:20px;
    }

    input{
        padding:16px;
        font-size:16px; /* важно для iOS чтобы не было zoom */
    }

    button{
        padding:16px;
        font-size:16px;
    }

    .logo img{
        width:36px;
    }

    /* 🔢 код ячейки */
    .code-inputs{
        gap:8px;
    }

    .code-inputs input{
        width:42px;
        height:52px;
        font-size:20px;
    }

}

@media (max-width: 380px){

    .auth-box{
        padding:20px 15px;
    }

    .code-inputs input{
        width:46px;
        height:48px;
        font-size:18px;
    }

}