/* === Login Card — Responsive === */
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

.card {
    width: 100%;
    max-width: 420px;
    background: #142338;
    border: 1px solid #2f4764;
    border-radius: 16px;
    padding: clamp(20px, 5vw, 36px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, .45);
    box-sizing: border-box;
}

.title {
    margin: 0 0 8px 0;
    font-size: clamp(18px, 5vw, 24px);
    letter-spacing: .2px;
    font-weight: 700;
}

.sub {
    margin: 0 0 20px 0;
    color: #9eb6d3;
    font-size: 13px;
    line-height: 1.5;
}

.row {
    margin-bottom: 14px;
}

.row label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    color: #adc0d7;
    font-weight: 600;
    letter-spacing: .3px;
}

.row input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #385678;
    border-radius: 10px;
    background: #0f1d31;
    color: #ebf2ff;
    padding: 12px 14px;
    font-size: 15px;
    transition: border-color .2s, box-shadow .2s;
    outline: none;
}

.row input:focus {
    border-color: #4ea1ff;
    box-shadow: 0 0 0 3px rgba(78, 161, 255, .15);
}

#btn-login {
    width: 100%;
    margin-top: 8px;
    padding: 13px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 10px;
    background: linear-gradient(135deg, #1a6bb5, #0f4d8a);
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background .2s, transform .1s;
    letter-spacing: .3px;
}

#btn-login:hover {
    background: linear-gradient(135deg, #2180d0, #1362a8);
}

#btn-login:active {
    transform: scale(.98);
}

.err {
    margin-top: 12px;
    min-height: 18px;
    color: #ff9aa4;
    font-size: 13px;
}

.hint {
    margin-top: 14px;
    font-size: 12px;
    color: #a3b8d2;
    line-height: 1.5;
}

/* Small phones — reduce padding further */
@media (max-width: 360px) {
    .card {
        border-radius: 12px;
    }

    .title {
        font-size: 17px;
    }
}

/* === Input states === */
.row input.input-success {
    border-color: #3fbf7f;
    box-shadow: 0 0 0 3px rgba(63, 191, 127, .22), 0 0 12px rgba(63, 191, 127, .18);
    transition: border-color .25s, box-shadow .25s;
}

.row input.input-error {
    border-color: #ff5c5c;
    box-shadow: 0 0 0 3px rgba(255, 92, 92, .22), 0 0 12px rgba(255, 92, 92, .15);
    transition: border-color .25s, box-shadow .25s;
}

/* Shake animation */
@keyframes loginShake {
    0% {
        transform: translateX(0);
    }

    18% {
        transform: translateX(-7px);
    }

    36% {
        transform: translateX(7px);
    }

    54% {
        transform: translateX(-5px);
    }

    72% {
        transform: translateX(5px);
    }

    88% {
        transform: translateX(-2px);
    }

    100% {
        transform: translateX(0);
    }
}

.row input.input-shake {
    animation: loginShake .45s ease;
}

/* Error message — styled as small red badge below inputs */
.err {
    margin-top: 14px;
    min-height: 0;
    font-size: 13px;
    color: #ff9aa4;
    background: rgba(255, 92, 92, .10);
    border: 1px solid rgba(255, 92, 92, .28);
    border-radius: 8px;
    padding: 8px 12px;
    display: none;
    line-height: 1.4;
}

.err:not(:empty) {
    display: block;
}