.custom-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.25);
    backdrop-filter: blur(8px); /* 🔥 блюр */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.custom-popup {
    width: 420px;
    background: #f5f5f7;
    border-radius: 20px;
    padding: 30px;
    position: relative;
    font-family: sans-serif;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    border: none;
    background: transparent;
    font-size: 22px;
    cursor: pointer;
    color: #7c3aed;
}

.custom-popup h2 {
    font-size: 26px;
    margin-bottom: 10px;
    margin-left: 130px;
}

/* 📱 мобилка */
@media (max-width: 768px) {
    .custom-popup h2 {
        margin-left: 120px;
    }
}


.popup-subtitle {
    font-size: 14px;
    margin-bottom: 20px;
    color: #555;
}

.custom-popup input {
    width: 100%;
    padding: 14px;
    margin-bottom: 15px;
    border-radius: 12px;
    border: none;
    background: #eaeaea;
    font-size: 14px;
}

.popup-submit {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 30px;
    background: linear-gradient(135deg, #7c3aed, #9333ea);
    color: white;
    font-size: 16px;
    cursor: pointer;
    margin-top: 10px;
}

.popup-policy {
    font-size: 12px;
    margin-top: 15px;
    text-align: center;
}

.popup-policy a {
    color: #7c3aed;
    text-decoration: none;
}

/*стили глазка пароля*/

.password-field {
    position: relative;
}

.password-field input {
    width: 100%;
    padding-right: 40px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 40%;
    transform: translateY(-50%);
    cursor: pointer;
    opacity: 0.6;
}

.popup-links {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
    font-size: 13px;
}

.popup-links span {
    cursor: pointer;
    color: #7a00df;
}

.password-title {
    font-size: 14px;
    margin: 10px 0 5px;
    font-weight: 600;
}
/*стили глазка пароля*/

/*стили ошибок инпута*/
.input-error {
    border: 1px solid #ff4d4f !important;
    background: #fff0f0 !important;
}
/*стили ошибок инпута*/


.input-error-text {
    font-size: 12px;
    color: #ff4d4f;
    margin-top: -8px;
    margin-bottom: 10px;
    display: none;
}

.input-error {
    border: 1px solid #ff4d4f !important;
    background: #fff0f0 !important;
}

.field {
    margin-bottom: 12px;
}

/*стили селекта с ИНН в форме регистрации*/
/* обертка поля */
.field {
    position: relative;
}

/* сам input */
.field input {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: none;
    background: #eaeaea;
    font-size: 14px;
    transition: all 0.2s ease;
}

/* когда открыт dropdown */
.field.has-dropdown input {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

/* dropdown */
.inn-result {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;

    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;

    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    border-top: 1px solid rgba(0,0,0,0.05);

    overflow: hidden;
    z-index: 10;
}

/* вариант */
.inn-option {
    padding: 12px 14px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.inn-option:hover {
    background: #f6f0ff;
}

/* текст */
.inn-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 2px;
}

.inn-address {
    font-size: 12px;
    color: #777;
}

/* ошибка */
.inn-error {
    padding: 12px;
    font-size: 12px;
    color: #ff4d4f;
}
/*стили селекта с ИНН в форме регистрации*/


/*стили анимированного текста кнопки входа/реги*/
.loading-dots::after {
    content: "";
    animation: dots 1.2s infinite;
}

@keyframes dots {
    0%   { content: ""; }
    33%  { content: "."; }
    66%  { content: ".."; }
    100% { content: "..."; }
}

/*стили анимированного текста кнопки входа/реги*/


/*стили верификации почты при регистрации*/

/*стили верификации почты при регистрации*/

/* ===== EMAIL FIELD BLOCK ===== */

.custom-popup .email-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}


/* ===== INPUT EMAIL ===== */

.custom-popup .email-field input[type="email"],
.custom-popup .email-code-block input {
    width: 100%;
    padding: 12px 14px;

    border-radius: 12px;
    border: none;

    background: #eaeaea;
    font-size: 14px;

    outline: none;
    transition: 0.2s;
}

.custom-popup .email-field input:focus {
    background: #e0e0e0;
}


/* ===== ERROR TEXT ===== */

.custom-popup .input-error-text {
    font-size: 12px;
    color: #ff4d4f;
    display: none;
}


/* ===== VERIFY BUTTON ===== */

.custom-popup .email-verify-btn {
    width: 100%;
    padding: 12px;

    border-radius: 15px;
    border: none;

    background: linear-gradient(135deg,#7a00df,#9b51e0);
    color: #fff;

    font-size: 14px;
    font-weight: 400;

    cursor: pointer;
    transition: all 0.2s ease;
}

/* hover */
.custom-popup .email-verify-btn:hover {
    opacity: 0.95;
}

/* disabled */
.custom-popup .email-verify-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}


/* ===== CODE BLOCK ===== */

.custom-popup .email-code-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
}


/* ===== CODE INPUT ===== */

.custom-popup #emailCode {
    width: 100%;
    padding: 12px;

    border-radius: 12px;
    border: none;

    background: #eaeaea;
    font-size: 14px;
}


/* ===== SUBMIT CODE BUTTON ===== */

.custom-popup .email-code-submit {
    width: 100%;
    padding: 12px;

    border-radius: 12px;
    border: none;

    background: linear-gradient(135deg,#7a00df,#9b51e0);
    color: #fff;

    font-size: 14px;
    font-weight: 600;

    cursor: pointer;
    transition: all 0.2s ease;
}

.custom-popup .email-code-submit:hover {
    opacity: 0.95;
}


/* ===== SUCCESS (если подтвердилась почта) ===== */

.custom-popup input[readonly] {
    background: #e6f9ec;
    border: 1px solid #4caf50;
}

/* ошибка формы */
.form-error {
    margin-bottom: 10px;
    font-size: 13px;
    color: #ff4d4f;
}

/* success текст */
.success-text {
    text-align: center;
    margin-bottom: 20px;
    font-size: 14px;
    color: #333;
}


.session-overlay-block {
    position: fixed;
    inset: 0;
    z-index: 99999;

    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);

    display: flex;
    align-items: flex-start;
    justify-content: center;

    pointer-events: all; /* 🔥 блокирует клики */
}

.session-banner {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);

    background: #111;
    color: #fff;

    padding: 12px 18px;
    border-radius: 10px;

    font-size: 14px;
    font-weight: 500;

    box-shadow: 0 10px 30px rgba(0,0,0,0.25);

    opacity: 0;
    transition: all 0.3s ease;

    z-index: 9999;

    max-width: 90%;
    width: max-content;
    text-align: center;
}

/* показ */
.session-banner.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

@media (max-width: 480px) {
    .session-banner {
        top: 12px;

        width: calc(100% - 24px);
        max-width: 100%;

        border-radius: 12px;

        padding: 14px;
        font-size: 14px;

        left: 50%;
        transform: translateX(-50%) translateY(-20px);
    }

    .session-banner.show {
        transform: translateX(-50%) translateY(0);
    }
}

/*ховер кнопки сохранения новой организации*/
.is--save-new {
    color: #16a34a;
    border: 1px solid #16a34a;
    text-decoration: none;

    display: flex;
    padding: 12px 20px;
    border-radius: 999px;

    font-weight: 500;
    transition: all 0.2s ease;
}

/* 🔥 лёгкий hover */
.is--save-new:hover {
    background: rgba(22, 163, 74, 0.08);
    border-color: #15803d;
    color: #15803d;
}
/*стили disbled селекта организаций*/
select[data-name="org-name"]:disabled {
    border: 3px solid #f7f7f7;
    background: #f4f6ff;
    color: #333;

    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/*тестим закреп кнопок формы профиля*/
/* база (десктоп) */
.profile-form__buttons {
    display: flex;
    gap: 10px;
}

.profile-form__buttons .profile-form__btn {
    flex: 1;
}

/* фиксированное состояние */
.profile-form__buttons.is-fixed {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1000;

    background: #fff;
    padding: 12px 250px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}


/* 📱 МОБИЛКА */
@media (max-width: 768px) {

    /* 📱 нижнее меню */
    .foot-mobile__menu {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        z-index: 1000;
        background: #fff;
        border-top: 1px solid #eee;
    }

    /* 📱 кнопки */
    .profile-form__buttons {
        display: flex;
        flex-direction: column;
        gap: 6px;
        padding: 8px;
    }

    .profile-form__buttons .profile-form__btn {
        width: 100%;
        height: 38px;
        font-size: 13px;

        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
    }

    .profile-form__btn svg {
        width: 14px;
        height: 14px;
    }

    /* 📌 фикс (над меню) */
    .profile-form__buttons.is-fixed {
        position: fixed;
        bottom: 64px; /* 🔥 подогнано под реальную высоту меню */
        left: 0;
        width: 100%;
        z-index: 1001;
        padding: 12px 16px;

        background: #fff;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
    }

    /* 🔥 чтобы форма не уезжала под кнопки + меню */
    [data-name="profile-form"] {
        padding-bottom: 130px;
    }
}

.profile-form__buttons.is-fixed {
    backdrop-filter: blur(6px);
    background: rgba(255,255,255,0.9);
}

.orders__item-rows.is-hidden {
    display: none;
}

.orders__item {
    transition: all 0.25s ease;
    overflow: hidden;
}

.orders__item.is-hidden {
    opacity: 0;
    transform: translateY(-10px);
    max-height: 0;
    margin: 0;
    padding: 0;
}

/* база */
.orders__filter-input.is-number {
    /*width: 100%;*/
    position: relative;
}

/* сам input */
.orders__filter-real-input {
    width: 35%;
    /*padding: 10px 35px 10px; !* справа место под иконку *!*/
    font-size: 14px;
}

/* иконка справа */
.orders__filter-input svg {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    padding: .625rem 1rem;
}

/* placeholder */
.orders__filter-text {
    position: absolute;
    font-size: 13px;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #999;
    transition: 0.2s;
}

/* когда есть текст */
.orders__filter-input.has-value .orders__filter-text {
    opacity: 0;
}


.profile-form__select-wrap.no-arrow:after {
    display: none;
}

.profile-sidebar__wr {
    display: none;
}

.profile-sidebar__wr.lk-visible {
    display: flex !important;
}

/*.accunt__wr {*/
/*    display: none;*/
/*}*/

/*.accunt__wr.is-open {*/
/*    display: flex;*/
/*}*/

.section {
    opacity: 1;
    transition: opacity 0.2s;
}
.section.hidden {
    opacity: 0;
    pointer-events: none;
}

/* КНОПКА ОПЛАТЫ */

.pay-btn {
    width: 100%;
    margin-top: 1px;
    padding: 10px;
    border-radius: 30px;
    background: #8438ff;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: block;

}

.pay-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(108, 92, 255, 0.3);

}

.pay-btn:active {
    transform: scale(0.98);
}

.pay-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;

}

/* РАДИО */

.payment-method {
    margin-top: 16px;
}

.payment-title {
    font-size: 14px;
    margin-bottom: 8px;
    color: #666;
}

.payment-option {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    cursor: pointer;
}

.payment-option input {
    cursor: pointer;
}

/* ОШИБКА */

.payment-method.error {
    border: 1px solid red;
    padding: 10px;
    border-radius: 8px;
}

/*конец кнопки оплаты*/


/*стили оплаты в заказах ЛК*/
/*.orders__item-payment {*/
/*    display: flex;*/
/*    flex-direction: column;*/
/*    align-items: flex-end;*/
/*    margin-top: 4px;*/
/*    gap: 4px;*/
/*}*/

/*!* статус *!*/
/*.orders__item-status {*/
/*    font-size: 12px;*/
/*    font-weight: 500;*/
/*}*/

/*.orders__item-status.is--unpaid {*/
/*    color: #e57373; !* мягкий красный *!*/
/*}*/

/*!* кнопка *!*/
/*.orders__item-pay-btn {*/
/*    font-size: 12px;*/
/*    padding: 4px 8px;*/
/*    border-radius: 6px;*/
/*    border: none;*/
/*    background: #f5f5f5;*/
/*    cursor: pointer;*/
/*    transition: 0.2s;*/
/*    margin: 0 15px;*/
/*}*/

/*.orders__item-pay-btn:hover {*/
/*    background: #e0e0e0;*/
/*}*/

/*.orders__item-date-wr {*/
/*    display: flex;*/
/*    align-items: center;*/
/*    gap: 10px;*/
/*}*/

/*!* 📱 МОБИЛКА *!*/
/*@media (max-width: 600px) {*/
/*    .orders__item-date-wr {*/
/*        flex-direction: column;*/
/*        align-items: flex-start; !* ← чтобы всё было слева *!*/
/*        gap: 6px;*/
/*    }*/

/*    .orders__item-payment {*/
/*        width: 100%;*/

/*    }*/

/*    .orders__item-pay-btn {*/
/*        width: auto; !* или 100% если хочешь во всю ширину *!*/
/*        font-size: 18px*/
/*    }*/
/*}*/
/*.orders__item-payment-row {*/
/*    display: flex;*/
/*    align-items: center;*/
/*    !*justify-content: space-between; !* ← кнопка слева, стрелка справа *!*!*/
/*    gap: 8px; !* вместо space-between *!*/
/*    width: 100%;*/
/*    margin-top: 8px;*/
/*    margin-left: auto;*/

/*}*/
/*.orders__item-date {*/

/*    white-space: nowrap;   !* запрещаем перенос *!*/

/*    flex-shrink: 0;        !* запрещаем сжатие *!*/

/*}*/

/*@media (max-width: 600px) {*/
/*    .orders__item-payment-row {*/
/*        width: 100%;*/
/*        justify-content: flex-start; !* ← влево *!*/
/*        margin-left: 0;              !* убрать авто-отступ *!*/
/*    }*/

/*    .orders__item-pay-btn {*/
/*        margin-left: 0;*/
/*    }*/
/*}*/



/*!* оплачено *!*/

/*.orders__item-pay-btn.is--paid {*/
/*    background: #4caf50;*/
/*    color: white;*/
/*    cursor: default;*/
/*}*/
/*!* статус неизвестно *!*/
/*.orders__item-pay-btn.is--undefined {*/
/*    background: #5c5c5c;*/
/*    color: white;*/
/*    cursor: default;*/
/*}*/
/*КОНЕЦ стили оплаты в заказах ЛК*/

/*стили инфо блока в заказах ЛК*/
.orders__section-hint {
    font-size: 13px;
    color: #666;
    background: #ffffff;
    padding: 8px 12px;
    border-radius: 15px;
    margin-bottom: 20px;
}
/*КОНЕЦ стили инфо блока в заказах ЛК*/

.orders__section-alert {
    padding: 12px 14px;
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
}

.orders__list {
    overflow: visible !important;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.orders__list-wrap {
    overflow: visible !important;
}

/* ===== Светлая палитра карточек заявок ===== */

.orders__item {
    position: relative;
    background: #FFFFFF;
    border: 1px solid #E7E2D8;
    border-radius: 20px;
    box-shadow: 0 1px 2px rgba(33,28,20,0.04), 0 8px 24px rgba(33,28,20,0.04);
    overflow: hidden;
    padding-top: 0;
    margin-top: 0;
}

.orders__item-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 24px;
    flex-wrap: wrap;
}

.orders__item-row[data-order-toggle] {
    cursor: pointer;
}

.orders__pill {
    display: inline-flex;
    align-items: center;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    padding: 7px 14px;
    border-radius: 999px;
    white-space: nowrap;
    border: 1px solid transparent;
    flex-shrink: 0;
}

.orders__pill.is-pending {
    background: #FCF1D8;
    color: #B8841B;
    border-color: #EBD49B;
}

.orders__pill.is-processing {
    background: #EFEDE7;
    color: #6F6A5E;
    border-color: #E7E2D8;
}

.orders__pill.is-delivered {
    background: #E7F3EC;
    color: #2E7D4F;
    border-color: #CDE8D8;
}

.orders__pill.is-unknown {
    background: #F2F1ED;
    color: #918C7E;
    border-color: #E7E2D8;
}

.orders__pill.is-transport {
    background: #EAF2FF;
    color: #1A5FB4;
    border-color: #B6D4F7;
}

.orders__pill.is-barcode-uploaded {
    background: #E7F3EC;
    color: #2E7D4F;
    border-color: #CDE8D8;
}

.orders__item-num {
    font-size: 16px;
    font-weight: 700;
    color: #211C14;
    line-height: 1;
    flex-shrink: 0;
}

.orders__item-type {
    font-size: 14.5px;
    color: #6F6A5E;
    line-height: 1;
    flex-shrink: 0;
}

.orders__item-spacer {
    flex: 1;
    min-width: 8px;
}

.orders__item-date {
    font-size: 13.5px;
    color: #A7A192;
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1;
}

.orders__item-arrow {
    width: 16px;
    height: 16px;
    color: #A7A192;
    transition: transform .2s ease, color .2s ease, opacity .2s ease;
    flex-shrink: 0;
    margin-left: 2px;
}

.orders__item-arrow.is--up {
    transform: rotate(180deg);
    color: #6F6A5E;
}

.orders__item-arrow.is--empty {
    opacity: 0;
    pointer-events: none;
}

.orders__item-wr {
    padding: 0 24px 20px;
}

.orders__item-rows {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.orders__info-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.orders__comment-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 11px 16px;
    background: #FBFAF7;
    border: 1px solid #ECE8DF;
    border-radius: 12px;
}

.orders__comment-label {
    font-size: 13.5px;
    color: #8C8779;
    flex-shrink: 0;
}

.orders__comment-value {
    font-size: 14.5px;
    font-weight: 600;
    color: #211C14;
    text-align: right;
}

.orders__item-pay-btn {
    padding: 7px 16px;
    border-radius: 999px;
    border: 1px solid #EBD49B;
    background: #FCF1D8;
    color: #B8841B;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}
.orders__item-pay-btn:hover {
    background: #FAEAC2;
}
.orders__item-pay-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ===== Группа: штрихкод + данные водителя ===== */

.orders__barcode-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.orders__driver-card {
    background: #FCF1D8;
    border: 1px solid #EBD49B;
    border-radius: 14px;
    padding: 14px 16px;
}

.orders__driver-head {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 12px;
}

.orders__driver-icon {
    width: 18px;
    height: 18px;
    color: #B8841B;
    flex-shrink: 0;
    margin-top: 2px;
}

.orders__driver-title {
    font-size: 14px;
    font-weight: 700;
    color: #7A5614;
    margin-bottom: 3px;
}

.orders__driver-text {
    font-size: 12.5px;
    color: #8B6A28;
    line-height: 1.4;
}

.orders__driver-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.orders__driver-box {
    background: #FFFDF6;
    border: 1px solid #EBD49B;
    border-radius: 10px;
    padding: 10px 12px;
    min-width: 0;
}

.orders__driver-box-label {
    font-size: 12px;
    color: #A4852D;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.orders__driver-box-value {
    font-size: 14px;
    font-weight: 700;
    color: #4A3710;
    word-break: break-word;
    overflow-wrap: break-word;
}

@media (max-width: 600px) {
    .orders__driver-grid {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }
}

/* ===== Блок загрузки штрихкода поставки ===== */

.orders__upload {
    border: 1.5px dashed #D9D2C2;
    border-radius: 14px;
    background: #FCFBF9;
}

.orders__upload-empty {
    padding: 22px 18px;
    text-align: center;
}

.orders__upload-empty.is-hidden {
    display: none;
}

.orders__upload-icon {
    width: 22px;
    height: 22px;
    color: #A7A192;
    margin: 0 auto 10px;
    display: block;
}

.orders__upload-title {
    font-size: 14.5px;
    font-weight: 700;
    color: #211C14;
    margin-bottom: 3px;
}

.orders__upload-hint {
    font-size: 12.5px;
    color: #A7A192;
    margin-bottom: 14px;
}

.orders__upload-btn {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 10px;
    border: 1px solid #E7E2D8;
    background: #fff;
    font-size: 13.5px;
    font-weight: 600;
    color: #211C14;
    cursor: pointer;
}

.orders__upload-btn:hover {
    background: #FBFAF7;
}

.orders__upload-btn.is-loading {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.orders__upload-error {
    margin-top: 10px;
    font-size: 12.5px;
    color: #C0392B;
}

.orders__upload-error.is-hidden {
    display: none;
}

.orders__upload-done {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
}

.orders__upload-done.is-hidden {
    display: none;
}

.orders__upload-done-icon {
    width: 22px;
    height: 22px;
    color: #2E7D4F;
    flex-shrink: 0;
}

.orders__upload-done-text {
    flex: 1;
    min-width: 0;
}

.orders__upload-done-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #211C14;
}

.orders__upload-done-name {
    font-size: 12.5px;
    color: #8C8779;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.orders__upload-replace {
    flex-shrink: 0;
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid #E7E2D8;
    background: #fff;
    color: #211C14;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
}

.orders__upload-replace:hover {
    background: #FBFAF7;
}

@media (max-width: 600px) {
    .orders__list {
        gap: 10px;
    }

    .orders__item {
        border-radius: 14px !important;
    }

    /* ===== Шапка карточки: две строки вместо хаотичного переноса ===== */
    .orders__item-row {
        padding: 12px 14px !important;
        gap: 0 8px !important;
        align-items: center !important;
        flex-wrap: wrap !important;
    }

    /* строка 1: статус ... шеврон */
    .orders__pill {
        order: 1 !important;
        font-size: 12px !important;
        padding: 5px 11px !important;
    }

    .orders__item-arrow {
        order: 2 !important;
        margin-left: auto !important;
    }

    /* принудительный перенос на новую строку перед номером/типом/датой */
    .orders__item-spacer {
        order: 3 !important;
        flex: 0 0 100% !important;
        width: 100% !important;
        height: 0 !important;
    }

    /* строка 2: номер + тип слева, дата отдельной строкой под ними справа */
    .orders__item-num {
        order: 4 !important;
        margin-top: 8px !important;
        font-size: 14.5px !important;
    }

    .orders__item-type {
        order: 5 !important;
        margin-top: 8px !important;
        font-size: 13px !important;
    }

    .orders__item-date {
        order: 6 !important;
        flex: 0 0 100% !important;
        width: 100% !important;
        margin-left: 0 !important;
        margin-top: 2px !important;
        text-align: left !important;
        font-size: 12px !important;
    }

    /* кнопка "Оплатить" — отдельной строкой на всю ширину */
    .orders__item-pay-btn {
        order: 7 !important;
        flex: 0 0 100% !important;
        width: 100% !important;
        margin-top: 10px !important;
        padding: 10px 16px !important;
        text-align: center !important;
        font-size: 13.5px !important;
    }

    .orders__item-wr {
        padding: 0 14px 14px !important;
    }

    .orders__item-rows {
        gap: 10px !important;
    }

    /* ===== Данные заявки: лейбл над значением — надёжнее на узких экранах ===== */
    .orders__comment-row {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 4px !important;
        padding: 10px 12px !important;
    }

    .orders__comment-label {
        font-size: 12px !important;
    }

    .orders__comment-value {
        font-size: 14px !important;
        text-align: left !important;
        width: 100% !important;
    }

    /* ===== Карточка водителя — компактнее, без лишнего воздуха ===== */
    .orders__driver-card {
        padding: 12px !important;
        border-radius: 12px !important;
    }

    .orders__driver-head {
        gap: 8px !important;
        margin-bottom: 10px !important;
    }

    .orders__driver-icon {
        width: 16px !important;
        height: 16px !important;
        margin-top: 1px !important;
    }

    .orders__driver-title {
        font-size: 13px !important;
        margin-bottom: 2px !important;
    }

    .orders__driver-text {
        font-size: 11.5px !important;
        line-height: 1.35 !important;
    }

    .orders__driver-grid {
        gap: 6px !important;
    }

    .orders__driver-box {
        padding: 8px 10px !important;
    }

    .orders__driver-icon {
        display: none !important;
    }

    .orders__driver-head {
        gap: 0 !important;
    }

    .orders__driver-box-label {
        font-size: 11px !important;
    }

    .orders__driver-box-value {
        font-size: 13px !important;
    }

    /* ===== Зона загрузки штрихкода ===== */
    .orders__barcode-group {
        gap: 8px !important;
    }

    .orders__upload-empty {
        padding: 18px 12px !important;
    }

    .orders__upload-icon {
        width: 20px !important;
        height: 20px !important;
        margin-bottom: 8px !important;
    }

    .orders__upload-title {
        font-size: 13.5px !important;
    }

    .orders__upload-hint {
        font-size: 11.5px !important;
        margin-bottom: 12px !important;
    }

    .orders__upload-btn {
        display: block !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 11px 16px !important;
        text-align: center !important;
        font-size: 13.5px !important;
    }

    .orders__upload-done {
        flex-wrap: wrap !important;
        gap: 8px !important;
        padding: 12px 14px !important;
    }

    .orders__upload-done-text {
        flex: 1 1 100% !important;
    }

    .orders__upload-replace {
        width: 100% !important;
        box-sizing: border-box !important;
        text-align: center !important;
        padding: 9px 14px !important;
    }

    /* ===== Меньше пустых полей по бокам страницы на мобиле ===== */
    .container-100 {
        padding-left: 12px;
        padding-right: 12px;
    }

    .orders__wr {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .orders-center__wr {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .orders__card {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

.payment-popup {
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: none;
    align-items: center;
    justify-content: center;
}

.payment-popup.is-open {
    display: flex;
}

.payment-popup__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.45);
    backdrop-filter: blur(4px);
}

.payment-popup__content {
    position: relative;
    z-index: 2;

    width: 100%;
    max-width: 420px;

    background: #fff;
    border-radius: 24px;

    padding: 28px;
    box-sizing: border-box;

    box-shadow: 0 20px 60px rgba(0,0,0,.15);
}

.payment-popup__close {
    position: absolute;
    top: 16px;
    right: 16px;

    border: none;
    background: transparent;

    cursor: pointer;

    font-size: 18px;
}

.payment-popup__title {
    font-size: 26px;
    font-weight: 700;

    margin-bottom: 24px;

    color: #1c1c1c;
}

.payment-popup__buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.payment-popup__btn {
    height: 52px;

    border-radius: 14px;
    border: none;

    font-size: 16px;
    font-weight: 600;

    cursor: pointer;

    transition: .2s;
}

.payment-popup__btn:hover {
    transform: translateY(-1px);
}

.payment-popup__btn.is--online {
    background: #1c1c1c;
    color: white;
}

.payment-popup__btn.is--invoice {
    background: #f3f3f3;
    color: #1c1c1c;
}

@media (max-width: 600px) {
    .payment-popup__content {
        width: calc(100% - 24px);
        padding: 22px;
        border-radius: 20px;
    }

    .payment-popup__title {
        font-size: 22px;
    }

    .payment-popup__btn {
        height: 48px;
        font-size: 15px;
    }
}

.payment-popup {
    display: none;
}

.payment-popup.is-open {
    display: flex;
}

.payment-popup__invoice {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}
.payment-popup__invoice.is-hidden {
    display: none;
}
.payment-popup__qr {
    width: 220px;
    height: 220px;
    object-fit: contain;
}
.payment-popup__download-btn {
    height: 48px;
    padding: 0 20px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
}

.payment-popup__invoice-text {
    font-size: 13px;
    line-height: 1.4;
    text-align: center;
    color: #666;
}

.payment-popup__amount {
    margin-bottom: 24px;

    padding: 18px;

    border-radius: 18px;

    background: linear-gradient(
            135deg,
            #f7f7f7 0%,
            #ffffff 100%
    );

    border: 1px solid #ececec;
}

.payment-popup__amount-label {
    font-size: 13px;
    color: #777;

    margin-bottom: 8px;
}

.payment-popup__amount-value {
    font-size: 34px;
    line-height: 1;

    font-weight: 700;

    color: #1c1c1c;

    letter-spacing: -1px;
}

.payment-popup__amount-value span {
    font-size: 16px;
    font-weight: 600;

    color: #888;

    margin-left: 4px;
}

@media (max-width: 600px) {

    .payment-popup__amount {
        padding: 16px;
        border-radius: 16px;
    }

    .payment-popup__amount-value {
        font-size: 28px;
    }

    .payment-popup__amount-value span {
        font-size: 14px;
    }
}