.tm-auth-page {
    background: #f5f8fd;
}

.tm-auth {
    min-height: calc(100vh - 77px);
    display: grid;
    grid-template-columns: minmax(420px, 1.05fr) minmax(440px, 0.95fr);
}

.tm-auth__visual {
    position: relative;
    padding: 42px clamp(30px, 5vw, 76px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    background:
        linear-gradient(150deg, rgba(10, 37, 64, 0.88), rgba(13, 71, 161, 0.68)),
        url("/app-assets/img/header-bg.jpg") center/cover no-repeat;
}

.tm-auth__visual::after {
    content: "";
    position: absolute;
    right: -160px;
    bottom: -150px;
    width: 380px;
    height: 380px;
    border: 80px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}

.tm-auth__copy {
    position: relative;
    z-index: 1;
    max-width: 610px;
    padding-bottom: 36px;
    color: #fff;
}

.tm-auth__eyebrow {
    color: #8fe8d3;
    font-size: 12px;
    line-height: 1;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-weight: 700;
}

.tm-auth__copy h1 {
    margin: 14px 0 16px;
    color: #fff;
    font-size: clamp(2rem, 4.4vw, 3.55rem);
    line-height: 1.08;
    font-weight: 800;
}

.tm-auth__copy p {
    margin: 0;
    max-width: 54ch;
    color: #dde9f9;
    font-size: 15px;
    line-height: 1.75;
}

.tm-auth__trust {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 28px;
}

.tm-auth__trust span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
}

.tm-auth__trust i {
    width: 23px;
    height: 23px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid rgba(143, 232, 211, 0.5);
    background: rgba(0, 184, 148, 0.22);
    font-style: normal;
}

.tm-auth__panel {
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px clamp(22px, 5vw, 70px);
    background: #fff;
}

.tm-auth__shell {
    width: 100%;
    max-width: 510px;
}

.tm-auth__back,
.tm-auth__link,
.tm-auth__footer-note a {
    color: #0d47a1;
    text-decoration: none;
}

.tm-auth__back {
    display: inline-flex;
    gap: 7px;
    align-items: center;
    margin-bottom: 28px;
    font-size: 12px;
    font-weight: 700;
}

.tm-auth__back:hover,
.tm-auth__link:hover,
.tm-auth__footer-note a:hover {
    text-decoration: underline;
}

.tm-auth__shell h2 {
    margin: 0;
    color: #122744;
    font-size: clamp(1.8rem, 3vw, 2.25rem);
    line-height: 1.15;
    font-weight: 800;
}

.tm-auth__sub {
    margin: 9px 0 22px;
    color: #465468;
    font-size: 13.5px;
    line-height: 1.65;
}

.tm-auth__switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-bottom: 24px;
    padding: 5px;
    border: 1px solid #e3e9f3;
    border-radius: 14px;
    background: #f5f8fd;
}

.tm-auth__switch-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #465468;
    padding: 12px 10px;
    font-size: 13px;
    font-weight: 700;
    transition: 0.2s;
}

.tm-auth__switch-btn svg {
    width: 18px;
    height: 18px;
}

.tm-auth__switch-btn.is-active {
    background: #fff;
    color: #0d47a1;
    box-shadow: 0 5px 16px rgba(10, 37, 64, 0.09);
}

.tm-auth__form {
    display: grid;
    gap: 16px;
}

.tm-auth__field label {
    display: block;
    margin-bottom: 7px;
    color: #122744;
    font-size: 12.5px;
    font-weight: 700;
}

.tm-auth__required {
    color: #b84a00;
}

.tm-auth__input-wrap {
    position: relative;
}

.tm-auth__input-wrap input,
.tm-auth__code-wrap select {
    width: 100%;
    min-height: 48px;
    border: 1px solid #e3e9f3;
    border-radius: 11px;
    background: #fff;
    color: #122744;
    outline: none;
    transition: 0.18s;
    font-size: 14px;
}

.tm-auth__input-wrap input {
    padding: 12px 44px 12px 13px;
}

.tm-auth__code-wrap select {
    padding: 12px 13px;
    appearance: none;
}

.tm-auth__input-wrap input:focus,
.tm-auth__code-wrap select:focus {
    border-color: #0d47a1;
    box-shadow: 0 0 0 3px rgba(13, 71, 161, 0.12);
}

.tm-auth__input-wrap input.is-error,
.tm-auth__code-wrap select.is-error {
    border-color: #b42318;
    box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.1);
}

.tm-auth__input-icon,
.tm-auth__toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #7a8aa3;
}

.tm-auth__input-icon {
    pointer-events: none;
}

.tm-auth__toggle {
    border: 0;
    background: transparent;
    padding: 3px;
}

.tm-auth__phone-row {
    display: grid;
    grid-template-columns: 112px 1fr;
    gap: 10px;
}

.tm-auth__hint,
.tm-auth__error,
.tm-auth__secure,
.tm-auth__meta,
.tm-auth__footer-note {
    font-size: 11px;
    line-height: 1.45;
}

.tm-auth__hint {
    display: block;
    margin-top: 6px;
    color: #7a8aa3;
}

.tm-auth__error {
    display: block;
    margin-top: 6px;
    color: #b42318;
}

.tm-auth__row,
.tm-auth__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.tm-auth__check {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #465468;
    font-size: 12px;
}

.tm-auth__check input {
    accent-color: #0d47a1;
}

.tm-auth__link,
.tm-auth__resend {
    border: 0;
    background: transparent;
    padding: 0;
    font-size: 12px;
    font-weight: 700;
}

.tm-auth__resend:disabled {
    color: #7a8aa3;
    cursor: not-allowed;
}

.tm-auth__primary {
    min-height: 48px;
    border: 0;
    border-radius: 11px;
    background: #0d47a1;
    color: #fff;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    transition: 0.18s;
}

.tm-auth__primary:hover {
    background: #0a3c8d;
    transform: translateY(-1px);
}

.tm-auth__primary:disabled {
    cursor: not-allowed;
    opacity: 0.58;
    transform: none;
}

.tm-auth__notice {
    padding: 11px 13px;
    border: 1px solid #bfe3d6;
    border-radius: 10px;
    background: #e7f6f1;
    color: #08664f;
    font-size: 12px;
    line-height: 1.5;
}

.tm-auth__otp-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 9px;
}

.tm-auth__otp-grid input {
    width: 100%;
    height: 52px;
    border: 1px solid #e3e9f3;
    border-radius: 11px;
    outline: none;
    color: #122744;
    text-align: center;
    font-size: 20px;
    font-weight: 700;
}

.tm-auth__otp-grid input:focus {
    border-color: #0d47a1;
    box-shadow: 0 0 0 3px rgba(13, 71, 161, 0.12);
}

.tm-auth__secure {
    margin: 18px 0 0;
    color: #7a8aa3;
    text-align: center;
}

.tm-auth__secure span {
    color: #087a5b;
    font-weight: 700;
}

.tm-auth__footer-note {
    margin-top: 22px;
    color: #465468;
    text-align: center;
}

.tm-auth__toast {
    position: fixed;
    left: 50%;
    bottom: 25px;
    z-index: 200;
    transform: translate(-50%, 30px);
    visibility: hidden;
    opacity: 0;
    transition: 0.2s;
    border-radius: 11px;
    background: #0a2540;
    color: #fff;
    padding: 12px 18px;
    box-shadow: 0 14px 38px rgba(10, 37, 64, 0.3);
    font-size: 12px;
    font-weight: 600;
}

.tm-auth__toast.is-visible {
    visibility: visible;
    opacity: 1;
    transform: translate(-50%, 0);
}

.is-hidden {
    display: none !important;
}

@media (max-width: 920px) {
    .tm-auth {
        min-height: auto;
        grid-template-columns: 1fr;
    }

    .tm-auth__visual {
        display: none;
    }

    .tm-auth__panel {
        align-items: flex-start;
        padding: 28px 22px 40px;
    }

    .tm-auth__shell {
        max-width: 540px;
    }

    .tm-auth__back {
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .tm-auth__switch-btn {
        font-size: 12px;
    }

    .tm-auth__otp-grid {
        gap: 6px;
    }

    .tm-auth__otp-grid input {
        height: 48px;
        font-size: 18px;
    }

    .tm-auth__row,
    .tm-auth__meta {
        align-items: flex-start;
    }

    .tm-auth__phone-row {
        grid-template-columns: 96px 1fr;
    }
}
