.otp-input__field:focus {
    background-color: #e5e7eb;
}
.otp-input__field
{
    border: 1px solid #cecece;
    border-radius: 8px;
    color: #000;
    height: 48px;
    margin-right: 16px;
    outline: 2px solid transparent;
    outline-offset: 2px;
    text-align: center;
    width: 40px;
    text-shadow: 0 0 0 gray;
    font-size: 24px;
}

.modal-auth {
    --auth-accent: #E15114;
    --auth-accent-hover: #E0621F;
    --auth-accent-hover2: #9E3700;
    --auth-accent-active: #c74d0b;
    --auth-accent-muted: #efa76f;   /* «Повторное смс» во время отсчёта */
    --auth-accent-soft: #E0621F;    /* фон ghost-кнопки при наведении */
    --auth-accent-soft-color: #fff;
    --auth-heading: #101010;
    --auth-text: #202020;
    --auth-muted: #8a8a8a;
    --auth-placeholder: #202020;
    --auth-input-bg: #ffffff;
    --auth-input-border: var(--auth-accent);
    --auth-input-error: #e5484d;
    --auth-error-bg: #fef2f2;
    --auth-digit-bg: #f5f0e9;
    --auth-digit-placeholder: #b9afa4;
    --auth-tg: #29a9e1;
    --auth-vk: #0878f9;
    --auth-max: #4430ff;
    --auth-radius-card: 10px;
    --auth-radius-btn: 10px;
    --auth-radius-input: 5px;
    --auth-control-height: 40px;
    --auth-field-height: 41px;
    --auth-banner-bg: #161616;
    --auth-content-width: 360px;
    --auth-dialog-width: 360px;
    --auth-dialog-banner-width: 800px;
    --auth-focus-ring: 0 0 0 3px rgba(238, 101, 25, 0.25);
}

.modal-auth *,
.modal-auth *::before,
.modal-auth *::after {
    box-sizing: border-box;
}

.modal-auth [hidden] {
    display: none !important;
}

/* --- Каркас окна ------------------------------------------------------------ */
.modal-auth .uk-modal-dialog.modal-auth__dialog {
    width: min(100%, var(--auth-dialog-width));
    margin: 0 auto;
    border-radius: 0;
    background: transparent;
}

.modal-auth .uk-modal-dialog.modal-auth__dialog--with-banner {
    width: min(100%, var(--auth-dialog-banner-width));
}

.modal-auth__body {
    display: flex;
    min-height: 560px;
    padding: 0;
    border-radius: var(--auth-radius-card);
    overflow: hidden;
}

.modal-auth__content {
    position: relative;
    width: var(--auth-content-width);
    flex: 0 0 var(--auth-content-width);
    min-width: 0;
    padding: 74px 50px 42px;
    background: #fff;
}

.modal-auth__title {
    margin: 0 0 29px;
    color: var(--auth-heading);
    font-size: 23px;
    font-weight: 700;
    line-height: 1.2;
}

/* --- Форма ------------------------------------------------------------------ */
.modal-auth__form {
    position: relative;
}

.modal-auth__field {
    position: relative;
    margin-bottom: 10px;
}

.modal-auth__field .form-auth__label {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    color: var(--auth-muted);
    font-size: 14px;
    line-height: 1.2;
    pointer-events: none;
    transition: top 0.15s ease-in-out, transform 0.15s ease-in-out,
    font-size 0.15s ease-in-out, color 0.15s ease-in-out;
}

.modal-auth__field .form-auth__input {
    display: block;
    width: 100%;
    height: var(--auth-field-height);
    padding: 0 12px;
    border: 1px solid transparent;
    border-radius: var(--auth-radius-input);
    background: var(--auth-digit-bg);
    color: var(--auth-text);
    font-family: inherit;
    font-size: 14px;
    line-height: 1.2;
    transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}

.modal-auth__field .form-auth__input:focus,
.modal-auth__field .form-auth__input:not(:placeholder-shown) {
    padding: 15px 12px 3px;
    border-color: var(--auth-input-border);
    background: var(--auth-input-bg);
}

.modal-auth__field .form-auth__input:focus {
    outline: none;
    box-shadow: var(--auth-focus-ring);
}

.modal-auth__field .form-auth__input:focus ~ .form-auth__label,
.modal-auth__field .form-auth__input:not(:placeholder-shown) ~ .form-auth__label {
    top: 4px;
    transform: none;
    font-size: 10px;
}

.modal-auth__field .form-auth__input.form-auth__input--error,
.modal-auth__field .form-auth__input.form-auth__input--error:focus {
    border-color: var(--auth-input-error);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(229, 72, 77, 0.2);
}

.form-auth__error {
    margin-bottom: 10px;
    padding: 8px 12px;
    border-radius: var(--auth-radius-input);
    background: var(--auth-error-bg);
    color: var(--auth-input-error);
    font-size: 12px;
    line-height: 1.4;
    text-align: center;
}

.modal-auth__action {
    margin-top: 10px;
}

.form-auth__fields {
    border: 0;
    padding: 0;
}

.form-auth__button {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
    min-height: var(--auth-control-height);
    padding: 0 16px;
    border: 0;
    border-radius: var(--auth-radius-btn);
    background: var(--auth-accent);
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.2;
    text-align: left;
    cursor: pointer;
    transition: none;
}

.form-auth__button svg {
    flex: 0 0 20px;
}

.form-auth__button:hover,
.form-auth__button:focus {
    background: linear-gradient(90deg, var(--auth-accent-hover) 20%, var(--auth-accent-hover2) 100%);
    color: #fff;
}

.form-auth__button:active {
    background: var(--auth-accent-active);
}

.form-auth__button:focus-visible {
    outline: none;
    box-shadow: var(--auth-focus-ring);
}

.form-auth__button:disabled {
    /*background: #ccc;
    color: #888;*/
    background: var(--auth-accent);
    color: #fff;
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.form-auth__loading {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 5;
    background: rgba(255, 255, 255, 0.8);
}

.form-auth__spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 26px;
    height: 26px;
    margin: -13px 0 0 -13px;
    border: 3px solid rgba(238, 101, 25, 0.25);
    border-top-color: var(--auth-accent);
    border-radius: 50%;
    animation: form-auth-spin 0.8s linear infinite;
}

@keyframes form-auth-spin {
    to {
        transform: rotate(360deg);
    }
}

.form-auth__submit {
    display: none;
}

/* --- Экран ввода кода --------------------------------------------------------- */
.modal-auth__field .form-auth__edit {
    position: absolute;
    z-index: 2;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    padding: 4px 0 4px 8px;
    background: #fff;
    color: var(--auth-accent);
    font-size: 12px;
    line-height: 1;
    text-decoration: underline;
}

.modal-auth__field .form-auth__edit:hover,
.modal-auth__field .form-auth__edit:focus {
    color: var(--auth-accent-hover);
}

.modal-auth__field.modal-auth__field--locked .form-auth__input {
    padding: 15px 78px 3px 12px;
    border-color: var(--auth-input-border);
    background: var(--auth-input-bg);
}

.modal-auth__field.modal-auth__field--locked .form-auth__label {
    top: 4px;
    transform: none;
    font-size: 10px;
}

.form-auth__code-caption {
    margin: 18px 0 10px;
    color: var(--auth-text);
    font-size: 14px;
    line-height: 1.25;
}

.form-auth__code-group {
    display: flex;
    gap: 10px;
}

.form-auth__digit {
    width: 46px;
    height: 42px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 8px;
    background: var(--auth-digit-bg);
    color: var(--auth-text);
    font-family: inherit;
    font-size: 18px;
    line-height: 1;
    text-align: center;
}

.form-auth__digit::placeholder {
    color: var(--auth-digit-placeholder);
    opacity: 1;
    animation: auth-digit-placeholder 1.6s ease-in-out infinite;
}

.form-auth__digit:focus::placeholder,
.form-auth__digit.has-value::placeholder {
    opacity: 0;
    animation: none;
}

@keyframes auth-digit-placeholder {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.35;
    }
}

.form-auth__digit:focus,
.form-auth__digit.has-value {
    outline: none;
    background: #fff;
    border-color: var(--auth-accent);
}

.form-auth__digit:focus {
    box-shadow: var(--auth-focus-ring);
}

.form-auth__button--sms:disabled,
.form-auth__button--sms:disabled:hover,
.form-auth__button--sms:disabled:focus {
    /*background: var(--auth-accent-muted);*/
    color: #fff;
    cursor: default;
    pointer-events: none;
}

/* Кнопка «Выбрать другой способ» */
.form-auth__button--ghost {
    gap: 20px;
    border: 1px solid var(--auth-accent);
    background: #fff;
    color: var(--auth-accent);
}

.form-auth__button--ghost svg {
    flex: 0 0 20px;
}

.form-auth__button--ghost:hover,
.form-auth__button--ghost:focus,
.form-auth__button--ghost:active {
    border-color: var(--auth-accent-soft);
    background:  var(--auth-accent-soft);
    color: var(--auth-accent-soft-color);
}

/* --- Соцсети -------------------------------------------------------------------- */
.modal-auth__social {
    margin-top: 21px;
}

.modal-auth__social-title {
    margin: 0 0 18px;
    color: var(--auth-text);
    font-size: 14px;
    line-height: 1.2;
}

.modal-auth__social-button {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: var(--auth-control-height);
    margin-top: 10px;
    padding: 0 12px;
    border-radius: var(--auth-radius-btn);
    color: #fff;
    font-size: 14px;
    line-height: 1.2;
    text-decoration: none;
    /*transition: filter 0.15s ease-in-out;*/
}

.modal-auth__social-button:hover,
.modal-auth__social-button:focus {
    color: #fff;
    text-decoration: none;
    filter: none;
}

.modal-auth__social-button[aria-disabled="true"],
.modal-auth__social-button.disabled {
    pointer-events: none;
    opacity: 0.4;
    filter: none;
    /*filter: grayscale(100%);*/
}

.modal-auth__social-button--telegram {
    background: var(--auth-tg);
}

.modal-auth__social-button.modal-auth__social-button--telegram:hover,
.modal-auth__social-button.modal-auth__social-button--telegram:focus {
    background: linear-gradient(90deg, #29AAEC 20%, #0087C9 100%);
}

.modal-auth__social-button--vk {
    background: var(--auth-vk);
}

.modal-auth__social-button.modal-auth__social-button--vk:hover,
.modal-auth__social-button.modal-auth__social-button--vk:focus {
    background: linear-gradient(90deg, #0077FF 20.19%, #0964CC 100%);
}

.modal-auth__social-button--max {
    background: var(--auth-max);
}

.modal-auth__social-button.modal-auth__social-button--max:hover,
.modal-auth__social-button.modal-auth__social-button--max:focus {
    background: linear-gradient(90deg, #3B2EFE 20%, #6E0EEA 100%);
}

.modal-auth__social-icon {
    display: inline-flex;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    margin-right: 16px;
}

.modal-auth__social-button--max .modal-auth__social-icon {
    flex-basis: 20px;
    width: 20px;
    height: 20px;
    margin-left: 5px;
    margin-right: 21px;
}

.modal-auth__social-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

/* --- Согласие ---------------------------------------------------------------------- */
.modal-auth__agreement {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    margin-top: 17px;
    color: #888;
    font-size: 12px;
    line-height: 17px;
    cursor: pointer;
}

.modal-auth__agreement a {
    color: var(--auth-accent);
    text-decoration: underline;
}

.modal-auth__agreement a:hover,
.modal-auth__agreement a:focus {
    color: var(--auth-accent-hover);
}

.form-auth__checkbox {
    appearance: none;
    -webkit-appearance: none;
    flex: 0 0 auto;
    width: 12px;
    height: 12px;
    margin: 3px 0 0;
    padding: 0;
    border: 1px solid #b5b5b5;
    border-radius: 3px;
    background-color: #fff;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}

.form-auth__checkbox:checked {
    border-color: var(--auth-accent);
    background-color: var(--auth-accent);
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M2.5 6.5l2.5 2.5 4.5-5'/%3E%3C/svg%3E");
    background-position: center;
    background-repeat: no-repeat;
    background-size: 8px;
}

.form-auth__checkbox:focus-visible {
    outline: none;
    box-shadow: var(--auth-focus-ring);
}

/* --- Баннер -------------------------------------------------------------------------- */
.modal-auth__banner {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    background: var(--auth-banner-bg);
}

.modal-auth__banner img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- Кнопка закрытия ------------------------------------------------------------------- */
.modal-auth .uk-close.modal-auth__close {
    top: 10px;
    right: 0;
    z-index: 2;
    color: #fff;
    transform: translateX(calc(100% + 8px));
}

.modal-auth .uk-close.modal-auth__close svg {
    width: 22px;
    height: 22px;
}

.modal-auth .uk-close.modal-auth__close:hover,
.modal-auth .uk-close.modal-auth__close:focus {
    color: #fff;
    opacity: 0.65;
}

.modal-auth .uk-close.modal-auth__close.modal-auth__close--mobile {
    display: none;
}

/* --- Адаптив ------------------------------------------------------------------------------ */
@media (max-width: 809px) {
    .modal-auth .uk-modal-dialog.modal-auth__dialog--with-banner {
        width: min(100%, var(--auth-content-width));
    }

    .modal-auth .uk-modal-dialog.modal-auth__dialog--with-banner .modal-auth__body {
        flex-direction: column;
    }

    .modal-auth__banner {
        width: var(--auth-content-width);
        order: -1;
    }

    .modal-auth .uk-close.modal-auth__close {
        display: none;
    }

    .modal-auth .uk-close.modal-auth__close.modal-auth__close--mobile {
        display: block;
        margin-left: auto;
    }

    .modal-auth__title {
        display: flex;
        align-items: center;
    }

    .modal-auth .uk-close.modal-auth__close.modal-auth__close--mobile {
        top: 44px;
        right: 26px;
        transform: none;
        color: var(--auth-heading);
    }

    .modal-auth .uk-close.modal-auth__close.modal-auth__close--mobile:hover,
    .modal-auth .uk-close.modal-auth__close.modal-auth__close--mobile:focus {
        color: var(--auth-heading);
    }
}

@media (max-width: 360px) {
    .modal-auth {
        padding: 0;
    }

    .modal-auth .uk-modal-dialog.modal-auth__dialog,
    .modal-auth .uk-modal-dialog.modal-auth__dialog--with-banner {
        width: 100%;
        max-width: 100%;
        margin: 0;
    }

    .modal-auth__body {
        flex-direction: column;
        /*min-height: 100vh;*/
        /*min-height: 100dvh;*/
    }

    .modal-auth__banner {
        display: block;
        flex: 0 0 auto;
        width: 100%;
        height: 205px;
    }

    .modal-auth__content {
        width: 100%;
        flex-basis: auto;
        padding: 42px 30px 36px;
    }
}