.otp-field {
    flex-direction: row;
    column-gap: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.otp-field input {
    height: 45px;
    width: 42px;
    border-radius: 6px;
    outline: none;
    font-size: 1.125rem;
    text-align: center;
    border: 1px solid #ddd;
}

.otp-field input:focus {
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
}

.otp-field input::-webkit-inner-spin-button,
.otp-field input::-webkit-outer-spin-button {
    display: none;
}

.resend {
    font-size: 12px;
}

.login-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background:
        radial-gradient(circle at 12% 10%, rgba(30, 58, 138, .08), transparent 30%),
        #f7f9fc;
}

.login-logo {
    width: 190px;
    max-width: 54vw;
    margin-bottom: 32px;
}

#profile-choice,
#validate-code {
    width: min(100%, 620px);
}

.login-panel {
    width: 100%;
    padding: clamp(26px, 5vw, 46px);
    border: 1px solid #dce3ef;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 18px 48px rgba(30, 58, 138, .1);
}

.login-panel h1 {
    margin: 0;
    color: #13213c;
    font-size: clamp(1.65rem, 4vw, 2.15rem);
    font-weight: 750;
    letter-spacing: -.035em;
}

.login-panel h1 + p {
    margin: 10px auto 28px;
    color: #68758a;
    line-height: 1.55;
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px;
    margin-bottom: 30px;
}

.profile-button {
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 12px 15px;
    border: 1px solid #d5ddea;
    border-radius: 11px;
    background: #fff;
    color: #17233c;
    font: inherit;
    font-weight: 700;
    text-align: left;
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.profile-button:hover,
.profile-button:focus-visible {
    border-color: var(--blue);
    box-shadow: 0 8px 22px rgba(30, 58, 138, .12);
    transform: translateY(-1px);
    outline: 0;
}

.profile-button > i {
    margin-left: auto;
    color: var(--blue);
    font-size: .8rem;
}

.profile-avatar {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #e9effb;
    color: var(--blue);
    font-size: .9rem;
    font-weight: 800;
}

.login-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 9px;
    margin: 24px 0 32px;
    padding: 28px;
    border-radius: 12px;
    background: #f2f5fa;
    color: #69758a;
    text-align: center;
}

.login-empty-state i {
    margin-bottom: 4px;
    color: var(--blue);
    font-size: 1.5rem;
}

.login-empty-state strong {
    color: #17233c;
}

.otp-panel {
    position: relative;
}

.back-to-profiles {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0 auto 22px 0;
    padding: 0;
    border: 0;
    background: none;
    color: var(--blue);
    font: inherit;
    font-size: .83rem;
    font-weight: 700;
}

.verify-code-button {
    min-width: 160px;
    min-height: 46px;
    font-weight: 700;
}

.resend button {
    padding: 0;
    border: 0;
    background: none;
    color: var(--blue);
    font: inherit;
    font-weight: 700;
    text-decoration: underline;
}

.login-modal-open {
    overflow: hidden;
}

.login-email-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-modal-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgba(15, 24, 43, .58);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}

.login-email-dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 500px);
    padding: clamp(28px, 5vw, 42px);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(9, 19, 40, .28);
}

.login-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: #f0f3f8;
    color: #536077;
    font-size: 1.4rem;
    line-height: 1;
}

.login-modal-icon {
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    margin-bottom: 20px;
    border-radius: 13px;
    background: #e9effb;
    color: var(--blue);
}

.login-email-dialog h2 {
    margin: 0;
    color: #13213c;
    font-size: clamp(1.5rem, 4vw, 1.9rem);
    font-weight: 750;
    letter-spacing: -.03em;
}

.login-email-dialog h2 + p {
    margin: 9px 0 24px;
    color: #68758a;
}

.login-email-dialog .form-label {
    font-weight: 700;
}

.login-email-dialog .form-control {
    min-height: 52px;
    border-color: #bfc9da;
    border-radius: 8px;
}

.login-email-dialog .form-control:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(30, 58, 138, .1);
}

.login-email-error {
    margin-top: 10px;
    color: var(--red);
    font-size: .84rem;
    font-weight: 650;
}

.login-modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 22px;
}

.login-email-submit,
.login-email-cancel {
    min-height: 46px;
    padding: 10px 18px;
    font-weight: 700;
}

.login-email-submit {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    background: var(--blue);
    color: #fff;
}

.login-email-submit:hover,
.login-email-submit:focus-visible {
    background: var(--bluehovered);
    color: #fff;
}

.login-email-cancel {
    background: #e9edf3;
    color: #38445a;
}

@media (max-width: 560px) {
    .login-page {
        justify-content: flex-start;
        padding-top: 28px;
    }

    .profile-grid {
        grid-template-columns: 1fr;
    }

    .otp-field {
        column-gap: 6px;
    }

    .otp-field input {
        width: clamp(38px, 12vw, 42px);
    }

    .login-modal-actions {
        flex-direction: column;
    }
}
