#link-orders div {
    display: inline-block;
    border-radius: 12px;
    padding: 6px 8px;
    margin: 4px;
    background: rgb(240, 240, 240);
    border: 1px solid rgb(240, 240, 240);
    color: #3C4858;
    font-size: 13px;
    line-height: 14px;
    text-align: center;
}

#link-orders div small {
    font-size: 10px;
    color: rgb(160, 160, 160);
}

#link-orders .selected {
    border: 1px solid black;
    font-weight: bold;
}

#link-orders div:hover {
    border: 1px solid rgb(210, 210, 210);
    cursor: pointer;
}

.orderBlockContent {
    background: rgb(250, 250, 250);
    padding: 0 !important;
    margin-top: 0 !important;
    margin-left: -24px !important;
    margin-right: -24px !important;
    border-radius: 0 0 6px 6px;
}

.orderBlockContent .dateDelete {
    color: rgb(180, 180, 180);
    float: right;
}

.orderBlockContent .dateDelete:hover {
    color: rgb(70, 70, 70);
    cursor: pointer;
}

.orderBlockContent .labelCheckbox {
    font-size: 13px;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* Left block */

.orderBlockContentLeft {
    font-size: 13px;
    padding-left: 8px !important;
    padding-right: 8px !important;
}

.orderBlockContentLeft .fastCopy {
    cursor: pointer;
}

.orderBlockContentLeft table {
    width: 100%;
    padding: 0 !important;
    margin: 0 !important;
}

.orderBlockContentLeft .tdIcon {
    vertical-align: top;
    width: 12px !important;
    font-weight: bold;
    padding: 0 !important;
}

.orderBlockContentLeft .tdIcon span {
    margin-right: 0 !important;
}

.orderBlockContentLeft .orderBlockEmpty {
    text-align: center;
    color: rgb(120, 120, 120);
    margin-bottom: 12px;
}

.orderBlockContentLeft .orderBlockSeparator {
    height: 1px;
    background: rgb(240, 240, 240);
    margin: 12px 6px;
}

.orderBlockContentLeft textarea {
    width: 100%;
    font-weight: lighter !important;
    color: #3C4858 !important;
    box-sizing: border-box !important;
    resize: none !important;
    min-height: 3em !important;
}

.orderBlockContentLeft select {
    width: 100% !important;
}

/*.orderBlockContentLeft .select2-search__field {*/
/*    font-size: 12px !important;*/
/*}*/

.orderBlockContentLeft .fieldFastEditValue {
    padding: 2px !important;
    margin: 0 !important;
    line-height: 16px;
    font-size: 12px;
    font-weight: lighter;
    color: #3C4858;
    text-decoration: underline;
    text-decoration-color: #829dad;
    text-decoration-style: dashed;
    cursor: pointer;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
}

.orderBlockContentLeft .fieldFastEditInput {
    display: none;
    padding: 2px !important;
    margin: 0 !important;
    line-height: 13px;
    border-width: 1px !important;
    border-color: rgb(210, 210, 210) !important;
    border-radius: 4px;
}

.orderBlockContentLeft .fieldFastEditInput--select {
    display: block;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    position: relative;
}

/* ---------------------------------------
 * Fast-edit Select2 (заказ, левая колонка)
 * ------------------------------------- */
#modalAjaxOrder .orderBlockContentLeft .fieldFastEditInput .select2-container {
    width: 100% !important;
}

#modalAjaxOrder .orderBlockContentLeft .fieldFastEditInput--select .select2-container--default .select2-selection--single {
    height: 34px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    box-shadow: none;
}

#modalAjaxOrder .orderBlockContentLeft .fieldFastEditInput--select .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 32px;
    padding-left: 10px;
    padding-right: 30px;
    color: #111827;
    font-size: 13px;
    font-weight: 600;
}

#modalAjaxOrder .orderBlockContentLeft .fieldFastEditInput--select .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 32px;
    right: 6px;
}

#modalAjaxOrder .orderFastSelectDropdown.select2-dropdown {
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

#modalAjaxOrder .orderFastSelectDropdown .select2-search--dropdown {
    padding: 8px;
}

#modalAjaxOrder .orderFastSelectDropdown .select2-search--dropdown .select2-search__field {
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    font-size: 13px;
    outline: none;
}

#modalAjaxOrder .orderFastSelectDropdown .select2-results__options {
    max-height: 320px;
}

#modalAjaxOrder .orderFastSelectDropdown .select2-results__option {
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.35;
    white-space: normal;
}

#modalAjaxOrder .orderFastSelectDropdown .select2-results__option--highlighted[aria-selected] {
    background: #4c66ff;
    color: #fff;
}

/* DateTimePicker в модалке: поверх блоков и без "уезда" */
#modalAjaxOrder .bootstrap-datetimepicker-widget {
    z-index: 1065;
}

#modalAjaxOrder .bootstrap-datetimepicker-widget.dropdown-menu {
    max-width: calc(100vw - 24px);
}

.orderBlockContentLeft .orderBlock {
    background: #fff;
    padding: 4px 8px;
    margin: 8px 0 8px 0;
    box-shadow: 0 1px 12px rgb(0 0 0 / 8%);
    border-radius: 8px;
    /*overflow: hidden;*/
}

.orderBlockContentRight .orderBlock {
    /*background: #fff;*/
    padding: 0 8px 4px 8px;
    margin: 8px 0 8px 0;
    /*box-shadow: 0 1px 12px rgb(0 0 0 / 8%);*/
    border-radius: 8px;
    /*overflow: hidden;*/
}

.orderBlockContentLeft .orderBlock .orderBlockTitle {
    font-weight: bold;
    margin-bottom: 8px;
}

.orderBlockContentLeft .orderBlock .orderBlockSubtitle {
    font-weight: bold;
    margin-top: 6px;
    margin-bottom: 0;
}

.orderBlockContentLeft .orderBlock .orderBlockTitle .material-icons {
    font-size: 15px;
    color: rgb(160, 160, 160);
}

.orderBlockContentLeft .orderBlock .orderBlockTitle .material-icons:hover {
    color: rgb(90, 90, 90);
}

.orderBlockContentLeft .orderBlock .orderBlockItem {
    padding-bottom: 6px;
    margin-bottom: 6px;
    border-bottom: 1px solid rgb(240, 240, 240);
}

.orderBlockContentLeft .orderBlock .orderBlockItem:last-child {
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: 0;
}

.orderBlockContentLeft .orderBlockFirst .material-icons {
    font-size: 14px !important;
    margin-right: 6px;
}

.orderBlockContentLeft .orderBlockFirst .orderInfoIcon .material-icons {
    font-size: 16px !important;
    margin-right: 0;
}

.orderBlockContentLeft .orderBlockFirst .orderActionsBar .material-icons {
    font-size: 18px !important;
    margin-right: 0;
}

.orderBlockContentLeft .orderBlockFirst .orderInfoHeaderDate .material-icons {
    font-size: 16px !important;
    margin-right: 0;
}

.orderBlockContentLeft .orderBlockFirst .orderCheckboxGroup .material-icons {
    font-size: 16px !important;
    margin-right: 0;
}

.orderBlockContentLeft .orderBlockFirst .avatarMini {
    width: 30px;
    height: 30px;
    margin: 4px 0 4px 4px;
    -webkit-border-radius: 100%;
    -moz-border-radius: 100%;
    border-radius: 100%;
    text-align: center;
    display: inline-block;
    line-height: 30px;
    font-weight: bold;
    font-size: 14px;
}

.orderBlockContentLeft .orderBlockStats .orderBlockTitle {
    margin-top: 6px;
    margin-bottom: 0;
}

.orderBlockContentLeft .orderBlockStats .orderBlockSeparator {
    margin-top: 4px;
    margin-bottom: 4px;
}

.orderBlockContentLeft .orderBlockPayment .material-icons {
    font-size: 14px !important;
}

.orderBlockContentLeft .orderBlockBonuses .material-icons {
    font-size: 14px !important;
    margin-right: 6px;
}

.orderBlockContentLeft .orderBlockAccrual .material-icons {
    font-size: 14px !important;
}

.orderBlockContentLeft .orderBlockExpense .material-icons {
    font-size: 14px !important;
}

.orderBlockContentLeft .orderBlockContact .material-icons {
    font-size: 14px !important;
}

/* Right block */

.orderBlockContentRight .orderBlock {
    font-size: 13px;
}

.orderBlockContentRight .orderBlockRow .col {
    margin: 0 !important;
    padding: 0 !important;
}

.orderBlock .orderBlockLeft {
    background: #fff; box-shadow: 0 1px 12px rgb(0 0 0 / 8%); border-radius: 8px;
    margin-right: 4px;
    padding: 4px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.orderBlock .orderBlockRight {
    background: #fff; box-shadow: 0 1px 12px rgb(0 0 0 / 8%); border-radius: 8px;
    margin-left: 4px;
    padding: 4px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.orderBlockContentRight .orderBlockActive {
    box-shadow: 0 1px 6px rgb(192, 57, 43);
}

.orderBlockContentRight .orderBlockButtons {
    display: none;
    text-align: center;
    /*border-top: 6px solid rgb(245, 245, 245);*/
    padding-top: 4px;
    margin: 8px -8px 0 -8px;
}

.orderBlockContentRight .orderBlockDescription {
    font-size: 13px;
    background: #fff;
    padding: 4px 8px;
    margin: 16px 0 8px 0;
    box-shadow: 0 1px 12px rgb(0 0 0 / 6%);
    border-radius: 8px;
    opacity: 0.5;
}

.orderBlockContentRight .orderBlockDescription:hover {
    opacity: 1;
}

.orderBlockContentRight .orderBlockDescription table {
    width: 100%;
}

.orderBlockContentRight .orderBlockDescription .orderBlockDescriptionIcon {
    padding-right: 5px;
    text-align: center;
}

.orderBlockContentRight .orderBlockDescription .orderBlockDescriptionText {
    text-align: left;
}

/* Калькулятор заказа: верхний блок + синхронизация карточек (локально для orderBlock) */
.orderBlock[data-order-work] .orderCalculate {
    display: flex;
    flex-direction: column;
}

.orderBlock[data-order-work] .orderCalculate .orderCalcTop {
    flex: 0 0 auto;
}

.orderBlock[data-order-work] .orderCalculate .orderCalcTop > .orderBlockTitle {
    font-size: 14px;
    font-weight: 600;
    color: rgb(30 41 59);
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgb(226 232 240);
}

/* Кругляши "синхрон" (в шапке и у продуктов) */
.orderBlock[data-order-work] .orderSyncBadge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    text-decoration: none;
    cursor: pointer;
    user-select: none;
    border: 1px solid rgba(15, 23, 42, 0.06);
    background: #f3f4f6;
    margin-right: 6px;
}

.orderBlock[data-order-work] .orderSyncBadge i.material-icons {
    font-size: 14px;
    line-height: 14px;
}

.orderBlock[data-order-work] .orderSyncBadge.is-on {
    background: #dcfce7;
}

.orderBlock[data-order-work] .orderSyncBadge.is-on i.material-icons {
    color: #16a34a;
}

.orderBlock[data-order-work] .orderSyncBadge.is-off i.material-icons {
    color: #9ca3af;
}

.orderBlock[data-order-work] .orderSyncBadge:hover {
    filter: brightness(0.98);
}

.orderBlock[data-order-work] .orderCalculate .orderCalcTop > .orderBlockTitle .orderSyncBadge {
    margin-right: 0;
}

.orderBlock[data-order-work] .orderCalculate #orderCustomerProducts,
.orderBlock[data-order-work] .orderCalculate #orderPerformerProducts {
    margin-top: 10px;
}

.orderBlock[data-order-work] .orderCalculate .orderProductGroupWrap {
    min-width: 0;
}

/* Секции калькулятора: даты и оплата — современный вид */
.orderBlock[data-order-work] .orderCalcTop .orderCalcSection {
    margin-bottom: 0;
    padding: 12px 10px 10px;
    background: rgb(248 250 252);
    border-radius: 8px;
    border: 1px solid rgb(226 232 240);
}

.orderBlock[data-order-work] .orderCalcTop .orderCalcSection + .orderCalcSection {
    margin-top: 10px;
}

.orderBlock[data-order-work] .orderCalcTop .orderCalcSection .row.rowNoSpacing {
    margin-left: -6px;
    margin-right: -6px;
}

.orderBlock[data-order-work] .orderCalcTop .orderCalcSection .row.rowNoSpacing .col {
    padding-left: 6px;
    padding-right: 6px;
}

.orderBlock[data-order-work] .orderCalcTop .orderCalcLabel {
    font-size: 12px;
    font-weight: 500;
    color: rgb(71 85 105);
    margin-bottom: 4px;
    display: block;
}

.orderBlock[data-order-work] .orderCalcTop .orderCalcSection .form-group {
    margin-bottom: 0;
}

.orderBlock[data-order-work] .orderCalcTop .orderCalcSection .main-input {
    border-radius: 6px;
    border: 1px solid rgb(203 213 225);
    padding: 6px 10px;
    font-size: 13px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.orderBlock[data-order-work] .orderCalcTop .orderCalcSection .main-input:focus {
    border-color: rgb(59 130 246);
    outline: none;
    box-shadow: 0 0 0 2px rgb(59 130 246 / 0.2);
}

/* Оплата по счету у исполнителя: чекбокс + подпись НДС + поле в одну линию */
.orderBlock[data-order-work] .orderCalcTop .orderCalcPaymentByInvoice {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px 16px;
}

.orderBlock[data-order-work] .orderCalcTop .orderCalcPaymentByInvoice .labelCheckbox {
    margin-bottom: 0;
    flex-shrink: 0;
}

.orderBlock[data-order-work] .orderCalcTop .orderCalcPaymentByInvoice .orderCalcLabel--inline {
    margin-bottom: 0;
    flex-shrink: 0;
    width: auto;
}

.orderBlock[data-order-work] .orderCalcTop .orderCalcPaymentByInvoice .main-input {
    max-width: 70px;
}

.orderBlockContentRight .orderBlockPayment {
    background: #fff; box-shadow: 0 1px 12px rgb(0 0 0 / 8%); border-radius: 8px;
    margin-right: 4px;
    padding: 4px;
}

.orderBlockContentRight .rowNoSpacing {
    padding: 0 !important;
    margin: 0 !important;
}

.orderBlockContentRight .rowNoSpacing .col {
    padding: 0 6px !important;
    margin: 0 !important;
}

.orderBlockContentRight .rowNoSpacing .col .control-label {
    font-size: 13px;
    line-height: 1;
    margin-bottom: 0;
}

.orderBlockContentRight .orderBlock .orderBlockTitle {
    font-weight: bold;
    margin-bottom: 0;
}

.orderBlockContentRight .orderBlock .row {
    margin-left: -8px;
    margin-right: -8px;
}

.orderBlockContentRight .payBlock {
    background: #fff;
    padding: 4px 8px;
    margin: 8px 0 8px 0;
    box-shadow: 0 1px 12px rgb(0 0 0 / 6%);
    border-radius: 8px;
    font-size: 14px;
}

.orderBlockContentRight .payBlock .material-icons {
    font-size: 14px !important;
    color: rgb(160, 160, 160);
}

.orderBlockContentRight .payBlock .material-icons {
    font-size: 14px !important;
    margin-right: 6px;
    color: rgb(90, 90, 90);
}

.orderBlockContentLeft .orderBlock .main-input {
    border: 0 !important;
    border-radius: 0 !important;
    border-bottom: 1px dashed #829dad !important;
    padding: 0 2px !important;
    margin: 5px 0 !important;
    font-size: 13px;
}

.orderBlockContentRight .orderBlock .main-input {
    border: 0 !important;
    border-radius: 0 !important;
    border-bottom: 1px dashed #829dad !important;
    padding: 0 2px !important;
    margin: 5px 0 !important;
}

.orderBlockContentRight .orderBlock .main-input-gray {
    opacity: 0.6;
}

.orderBlockContentRight .orderBlock .main-input-right {
    text-align: right !important;
}

.orderBlockContentRight .orderBlock .main-input:disabled {
    border-radius: 4px !important;
    border-bottom: 1px solid rgb(235, 235, 235) !important;
}

.orderBlockContentRight .orderBlock .main-input-total {
    border: 0 !important;
    border-radius: 0 !important;
    border-bottom: 1px dashed #fff !important;
    padding: 0 2px !important;
    margin: 2px 0 0 0 !important;
    font-weight: bold;
    color: #3C4858;
}

.orderBlockContentRight .orderBlock .main-input-total:focus {
    border-bottom: 1px dashed #829dad !important;
}

.orderBlockContentRight .not_visible .main-input {
    background: rgb(235, 235, 235) !important;
    border-radius: 4px !important;
    border-bottom: 1px solid rgb(235, 235, 235) !important;
}

.orderBlockContentRight .orderBlockSeparator {
    background: rgb(245, 245, 245);
    height: 6px;
    margin: 4px -4px 4px -4px;
}

.orderBlockContentRight .orderBlockSeparatorSecond {
    background: rgb(240, 240, 240);
    height: 1px;
    margin: 4px 0 4px 0;
}

.orderBlockContentRight .orderBlockBtnIcon i {
    font-size: 13px;
    color: rgb(160, 160, 160);
    margin-left: 8px;
}

.orderBlockContentRight .orderBlockBtnIcon:hover i {
    color: rgb(90, 90, 90);
}

.orderBlockContentRight .backTypeLink {
    font-size: 13px;
    color: rgb(160, 160, 160);
}

.orderBlockContentRight .backTypeLink:hover, .orderBlockContentRight .backTypeLinkActive {
    font-size: 13px;
    color: rgb(40, 40, 40);
    font-weight: bold;
}

/* Индикаторы наличия доставки/переработки в родительской строке */
.orderProductIndicators {
    display: inline-block;
    vertical-align: middle;
}

.orderProductIndicators span {
    display: inline-block;
    font-weight: 600;
    font-size: 10px;
    line-height: 1.2;
}

/* Группа инпутов для О+Д+П в родительской строке */
.orderProductCountGroup {
    min-width: 0;
}

.orderProductCountGroup input {
    border: 1px solid #ddd;
    border-radius: 3px;
    text-align: right;
}

.orderProductCountGroup input:focus {
    border-color: #4CAF50;
    outline: none;
}

/* ---------------------------------------
 * Order калькулятор: UI "как в 1С" (дерево)
 * ------------------------------------- */
.orderCalculate .orderProductTreeHeader {
    margin: 6px 0 8px 0;
    padding: 6px 8px;
    background: #f7f7f9;
    border: 1px solid #eee;
    border-radius: 6px;
}

.orderCalculate .orderProductTreeHeaderTitle {
    font-weight: 600;
    color: #3C4858;
    font-size: 12px;
}

.orderCalculate .orderProductTreeHeaderCell {
    font-size: 11px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding-top: 2px;
    text-align: center;
}

.orderCalculate .orderProductInlineMarkupInfo {
    font-size: 11px;
    color: #666;
    margin-top: 2px;
    margin-bottom: 2px;
    text-align: right;
}

/* ---------------------------------------
 * Источник расчёта (последнее редактируемое поле)
 * ------------------------------------- */
.orderCalculate .orderTruthLine {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 2px;
}

.orderCalculate .orderTruthLabel {
    font-size: 11px;
    color: #6b7280;
}

.orderCalculate .orderTruthHelpIcon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #6b7280;
    font-size: 11px;
    font-weight: 600;
    cursor: help;
    position: relative;
    transition: background-color 0.2s, color 0.2s;
}

.orderCalculate .orderTruthHelpIcon:hover {
    background: #3b82f6;
    color: #ffffff;
}

.orderCalculate .orderTruthHelpIcon {
    position: relative;
}

.orderCalculate .orderTruthHelpIcon[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    right: 0;
    padding: 10px 12px;
    background: #1f2937;
    color: #ffffff;
    font-size: 11px;
    line-height: 1.5;
    border-radius: 6px;
    white-space: normal;
    width: 280px;
    z-index: 10000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    pointer-events: none;
    text-align: left;
}

.orderCalculate .orderTruthHelpIcon[data-tooltip]:hover::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    right: 8px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #1f2937;
    z-index: 10001;
    pointer-events: none;
}

.orderCalculate .orderTruthBadge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    color: #374151;
    white-space: nowrap;
}

.orderCalculate .orderTruthDetailsLink {
    font-size: 11px;
    color: #6b7280;
    text-decoration: underline;
    text-decoration-style: dashed;
    text-underline-offset: 2px;
    margin-left: 6px;
    white-space: nowrap;
}

.orderCalculate .orderTruthDetailsLink:hover {
    color: #111827;
}

.orderCalculate .orderTruthBadge.isTax {
    background: #ecfeff;
    border-color: #a5f3fc;
    color: #155e75;
}

.orderCalculate .orderTruthBadge.isBase {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

.orderCalculate .orderTruthHint {
    font-size: 11px;
    color: #6b7280;
    margin-top: 4px;
    text-align: right;
}

.orderCalculate input.orderTruthFieldTruth {
    border-color: #93c5fd !important;
    box-shadow: 0 0 0 2px rgb(147 197 253 / 20%);
    background: #fff;
}

.orderCalculate input.orderTruthFieldDerived {
    background: #f9fafb;
}

/* ---------------------------------------
 * "Подробнее" по расчёту (SweetAlert2)
 * ------------------------------------- */
.swal2-html-container .orderCalcDetails {
    text-align: left;
    font-size: 12px;
    line-height: 1.4;
    color: #374151;
}

.swal2-html-container .orderCalcDetailsMeta {
    margin-bottom: 10px;
    color: #111827;
}

.swal2-html-container .orderCalcDetailsSummary {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
    margin-bottom: 10px;
}

.swal2-html-container .orderCalcDetailsSummaryRow {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 8px;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    background: #fafafa;
}

.swal2-html-container .orderCalcDetailsTableWrap {
    overflow: auto;
    border: 1px solid #f0f0f0;
    border-radius: 10px;
    margin-bottom: 10px;
}

.swal2-html-container table.orderCalcDetailsTable {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.swal2-html-container table.orderCalcDetailsTable th,
.swal2-html-container table.orderCalcDetailsTable td {
    padding: 6px 8px;
    border-bottom: 1px solid #f0f0f0;
    white-space: nowrap;
}

.swal2-html-container table.orderCalcDetailsTable th {
    position: sticky;
    top: 0;
    background: #ffffff;
    z-index: 1;
    font-weight: 700;
    color: #111827;
}

.swal2-html-container .orderCalcDetailsStepsTitle {
    margin: 8px 0 6px 0;
    color: #111827;
}

.swal2-html-container .orderCalcDetailsStep {
    border: 1px solid #f0f0f0;
    border-radius: 10px;
    padding: 8px;
    background: #ffffff;
    margin-bottom: 6px;
}

.swal2-html-container .orderCalcDetailsStepTitle {
    font-weight: 700;
    margin-bottom: 4px;
    color: #111827;
}

.swal2-html-container .orderCalcDetailsStepFormula {
    font-size: 11px;
    color: #6b7280;
    margin-bottom: 4px;
}

.swal2-html-container .orderCalcDetailsHint {
    margin-top: 8px;
    font-size: 11px;
    color: #6b7280;
}

.swal2-html-container details.orderCalcDetailsFormulas {
    margin-top: 10px;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    padding: 10px;
    background: #ffffff;
}

.swal2-html-container details.orderCalcDetailsFormulas summary {
    cursor: pointer;
    user-select: none;
    color: #111827;
    font-size: 13px;
    font-weight: 700;
    outline: none;
}

.swal2-html-container details.orderCalcDetailsFormulas summary::-webkit-details-marker {
    display: none;
}

.swal2-html-container .orderCalcDetailsFormulasBody {
    margin-top: 8px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
}

.swal2-html-container .orderCalcDetailsFormulaBlockTitle {
    margin-top: 6px;
    color: #111827;
}

.swal2-html-container .orderCalcDetailsFormulaLine code {
    display: block;
    padding: 8px;
    border-radius: 10px;
    border: 1px solid #f0f0f0;
    background: #f9fafb;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 11px;
    color: #111827;
    white-space: normal;
    word-break: break-word;
}

/* ---------------------------------------
 * Упрощенный режим: "смешанная" цена внутри строки (распределение копеек)
 * ------------------------------------- */
.orderCalculate .orderMixedUnitMark {
    color: #9ca3af;
    margin-left: 4px;
    font-weight: 700;
    cursor: help;
}

.orderCalculate .orderMixedUnitMark:hover {
    color: #6b7280;
}

/* ---------------------------------------
 * Итоги / Надбавка: современный блок (2025)
 * ------------------------------------- */
.orderCalculate .orderTotalsCard,
.orderCalculate .orderMarkupCard {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 1px 12px rgb(0 0 0 / 6%);
}

.orderCalculate .orderTotalsHeader {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.orderCalculate .orderTotalsTitle {
    font-size: 14px;
    font-weight: 700;
    color: #1f2937;
    letter-spacing: 0.2px;
}

.orderCalculate .orderTotalsHint {
    font-size: 12px;
    color: #6b7280;
    line-height: 14px;
}

.orderCalculate .orderTotalsSummaryGrid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.orderCalculate .orderTotalsSummaryItem {
    border: 1px solid #f0f0f0;
    border-radius: 10px;
    padding: 10px;
    background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
}

.orderCalculate .orderTotalsSummaryLabel {
    font-size: 11px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 6px;
}

.orderCalculate .orderTotalsSummaryValue {
    font-size: 18px;
    font-weight: 800;
    color: #111827;
    line-height: 20px;
}

.orderCalculate .orderTotalsSummarySub {
    margin-top: 6px;
    font-size: 12px;
    color: #374151;
}

.orderCalculate .orderTotalsSummarySub span {
    color: #6b7280;
}

.orderCalculate .orderTotalsDetails {
    margin-top: 10px;
    border-top: 1px solid #f0f0f0;
    padding-top: 10px;
}

.orderCalculate .orderTotalsDetails summary {
    cursor: pointer;
    user-select: none;
    font-size: 13px;
    color: #374151;
    font-weight: 600;
    outline: none;
}

.orderCalculate .orderTotalsDetails summary::-webkit-details-marker {
    display: none;
}

.orderCalculate .orderTotalsDetails summary:before {
    content: "▸";
    display: inline-block;
    margin-right: 8px;
    color: #6b7280;
}

.orderCalculate .orderTotalsDetails[open] summary:before {
    content: "▾";
}

.orderCalculate .orderTotalsBreakdown {
    margin-top: 10px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
}

.orderCalculate .orderTotalsRow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 8px;
    border-radius: 8px;
    background: #fafafa;
    border: 1px solid #f2f2f2;
}

.orderCalculate .orderTotalsRowLabel {
    font-size: 12px;
    color: #374151;
    font-weight: 600;
}

.orderCalculate .orderTotalsRowMeta {
    font-size: 12px;
    color: #6b7280;
}

.orderCalculate .orderTotalsRowValue {
    font-size: 12px;
    color: #111827;
    font-weight: 700;
    text-align: right;
}

.orderCalculate .orderTotalsRowValue b {
    font-weight: 800;
}

.orderCalculate .orderMarkupGrid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 8px;
}

.orderCalculate .orderMarkupRow {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.orderCalculate .orderMarkupRow label {
    font-size: 12px;
    color: #6b7280;
    margin: 0;
}

.orderCalculate .orderMarkupCard select.main-input,
.orderCalculate .orderMarkupCard input.main-input {
    font-size: 13px;
    color: #111827;
    padding: 6px 10px !important;
    border-radius: 6px !important;
    border: 1px solid rgb(203 213 225) !important;
    border-bottom-color: rgb(203 213 225) !important;
    background: rgb(248 250 252) !important;
    min-height: 34px;
    box-shadow: none !important;
    outline: none;
}

.orderCalculate .orderMarkupCard select.main-input:disabled,
.orderCalculate .orderMarkupCard input.main-input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.orderCalculate .orderMarkupFooter {
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.orderCalculate .orderMarkupFooter label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #374151;
    margin: 0;
    cursor: pointer;
}

/* Справа блок «Надбавка» только для просмотра (симметрия с левой колонкой) */
.orderCalculate .orderMarkupCard--readonly .orderMarkupCard-readonlyValue {
    font-size: 13px;
    color: #111827;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid rgb(203 213 225);
    background: rgb(248 250 252);
    min-height: 34px;
    display: flex;
    align-items: center;
}

.orderCalculate .orderMarkupCard--readonly .orderMarkupFooter label.orderMarkupCard-readonlyCheckbox {
    cursor: default;
}

@media (max-width: 900px) {
    .orderCalculate .orderTotalsSummaryGrid,
    .orderCalculate .orderMarkupGrid {
        grid-template-columns: 1fr;
    }
}

.orderCalculate .orderProductMarkupHint {
    font-size: 11px;
    color: #8a8a8a;
    margin-top: 2px;
    line-height: 12px;
    text-align: right;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.orderCalculate .orderProductMarkupHint b {
    color: #555;
    font-weight: 600;
}

.orderCalculate .orderProductMarkupHintsRow {
    margin-top: -6px;
    margin-bottom: 6px;
}

.orderCalculate .orderProductGroup {
    margin-bottom: 2px;
}

.orderCalculate .orderProductParentRow {
    padding: 6px 6px 4px 6px;
    background: #fbfbfc;
    border: 1px solid #eee;
    border-radius: 8px;
}

.orderCalculate .orderProductToggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-right: 6px;
    color: #666;
    text-decoration: none;
    border-radius: 4px;
}

.orderCalculate .orderProductToggle:hover {
    background: rgba(0, 0, 0, 0.06);
    color: #333;
}

.orderCalculate .orderProductToggle i.material-icons {
    font-size: 18px;
    line-height: 18px;
}

.orderCalculate .orderProductGroupChildren {
    margin-left: 14px;
    padding-left: 10px;
    border-left: 2px solid #eee;
}

.orderCalculate .orderProductChildRow {
    padding: 2px 0;
}

/* Выделение полей с разными ценами (когда is_simple = 0) */
.orderCalculate input.orderProductPriceDifferent {
    background-color: #fff3cd !important;
    border-bottom-color: #ffc107 !important;
}

.orderCalculate input.orderProductPriceDifferent:focus {
    background-color: #ffe69c !important;
    border-bottom-color: #ff9800 !important;
}

/* ---------------------------------------
 * Заказ (легаси модалка): заголовок в header
 * ------------------------------------- */
#modalAjaxOrder .modal-header {
    display: flex;
    align-items: center;
}

#modalAjaxOrder .modal-header > span {
    display: block;
    width: 100%;
}

#modalAjaxOrder .modal-header h4.modalAjaxTitle {
    margin: 0;
    padding: 12px 52px 12px 18px;
    font-weight: 700;
    line-height: 20px;
}

/* =======================================
 * Модалка редактирования заказа (2026)
 * ======================================= */

/* --- Заголовок модалки --- */
.orderModalHeader {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 2px 0;
    padding: 0;
}

.orderModalHeader b {
    font-weight: 800;
}

.orderModalHeader #orderStatus {
    margin-left: 4px;
}

/* --- Info block: полная переработка --- */

.orderBlockFirst {
    position: relative;
}

/* Шапка info-блока: дата + кнопки действий */
.orderInfoHeader {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.orderInfoHeaderLeft {
    flex: 1;
    min-width: 0;
}

.orderInfoHeaderDate {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
}

.orderInfoHeaderDate .material-icons {
    font-size: 16px;
    color: #64748b;
}

.orderInfoHeaderDateCreate {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 2px;
}

/* Панель кнопок-действий (copy/share/lock/trade) */
.orderActionsBar {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

.orderActionsBar .orderActionIcon,
.orderActionsBar .orderBtnBlock {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    color: #64748b;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    cursor: pointer;
    flex: 0 0 auto;
    overflow: hidden;
}

.orderActionsBar .orderActionIcon:hover,
.orderActionsBar .orderBtnBlock:hover,
.orderActionsBar .orderActionIcon:focus,
.orderActionsBar .orderBtnBlock:focus {
    background: #f1f5f9;
    color: #334155;
    outline: none;
}

.orderActionsBar .material-icons {
    font-size: 18px;
    line-height: 18px;
}

.orderActionsBar .orderBlocked {
    color: #ef4444;
}

.orderActionsBar .orderBlocked:hover {
    background: #fef2f2;
    color: #dc2626;
}

/* --- Секции внутри info-блока --- */
.orderInfoSection {
    padding: 8px 10px;
    margin-bottom: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.orderInfoSectionTitle {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #94a3b8;
    margin-bottom: 6px;
}

/* Строка info: иконка + контент */
.orderInfoRow {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 3px 0;
    font-size: 13px;
    color: #334155;
    line-height: 1.4;
}

.orderInfoRow + .orderInfoRow {
    border-top: 1px solid #f1f5f9;
}

.orderInfoIcon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-top: 1px;
}

.orderInfoIcon .material-icons {
    font-size: 16px;
    color: #94a3b8;
}

.orderInfoIcon svg {
    width: 14px;
    height: 14px;
}

.orderInfoIcon .material-icons.fastCopy,
.orderInfoIcon svg.fastCopy {
    cursor: pointer;
    transition: color 0.15s;
}

.orderInfoIcon .material-icons.fastCopy:hover {
    color: #3b82f6;
}

.orderInfoContent {
    flex: 1;
    min-width: 0;
    word-break: break-word;
}

/* fieldFastEdit в новом контексте */
.orderInfoContent .fieldFastEdit {
    text-decoration: underline;
    text-decoration-color: #cbd5e1;
    text-decoration-style: dashed;
    cursor: pointer;
    transition: color 0.15s;
}

.orderInfoContent .fieldFastEdit.fieldFastEdit--editing {
    text-decoration: none;
    cursor: default;
}

.orderInfoContent .fieldFastEditEditor {
    position: relative;
}

.orderInfoContent .fieldFastEditEditor .fieldFastEditInput {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    padding-right: 72px; /* место под кнопки */
    line-height: 1.35;
    min-height: 120px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
    resize: vertical;
}

.orderInfoContent .fieldFastEditActions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 6px;
}

.orderInfoContent .fieldFastEditAction {
    width: 28px;
    height: 28px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: none;
}

.orderInfoContent .fieldFastEditAction .material-icons {
    font-size: 18px;
    line-height: 18px;
}

.orderInfoContent .fieldFastEditAction--save {
    color: #16a34a;
}

.orderInfoContent .fieldFastEditAction--cancel {
    color: #ef4444;
}

.orderInfoContent .fieldFastEditAction:hover {
    border-color: #cbd5e1;
    background: #fff;
}

.fieldFastAddressSuggest {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
    margin: 0;
    padding: 0;
    list-style: none;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    display: none;
}

.fieldFastAddressSuggest .autocomplete-list-item {
    padding: 6px 10px;
    font-size: 12px;
    color: #334155;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
}

.fieldFastAddressSuggest .autocomplete-list-item:last-child {
    border-bottom: none;
}

.fieldFastAddressSuggest .autocomplete-list-item:hover {
    background: #eff6ff;
    color: #1e40af;
}

.orderInfoContent .fieldFastEdit:hover {
    color: #1e293b;
    text-decoration-color: #3b82f6;
}

/* Со-ответственные */
.orderInfoResponsibles {
    cursor: pointer;
    text-decoration: underline;
    text-decoration-style: dashed;
    text-decoration-color: #cbd5e1;
    transition: color 0.15s;
}

.orderInfoResponsibles:hover {
    color: #3b82f6;
    text-decoration-color: #3b82f6;
}

.orderInfoResponsiblesEmpty {
    cursor: pointer;
    color: #8b5cf6;
    font-weight: 500;
}

.orderInfoResponsiblesEmpty:hover {
    color: #7c3aed;
}

.orderInfoResponsiblesBlock .orderInfoTagsList {
    margin-bottom: 4px;
}

.orderInfoResponsiblesBlock .orderInfoTagAddRow {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.orderInfoResponsiblesBlock .orderInfoTagSelectWrap {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    min-width: 0;
    position: relative;
}

.orderInfoResponsiblesBlock .orderInfoTagSelectWrap .select2-container {
    min-width: 140px;
    flex: 1;
}

/* --- Теги --- */
.orderInfoTags {
    padding: 6px 10px;
    margin-bottom: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    transition: border-color 0.15s;
}

.orderInfoTagsLabel {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #94a3b8;
    margin-bottom: 4px;
}

.orderInfoTagsList {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 4px;
}

.orderInfoTag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 12px;
    color: #334155;
    font-weight: 500;
    line-height: 18px;
}

.orderInfoTagExisting .orderInfoTagRemove {
    font-size: 14px;
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.15s;
    vertical-align: middle;
}

.orderInfoTagExisting .orderInfoTagRemove:hover {
    color: #ef4444;
}

.orderInfoTagAdd {
    color: #8b5cf6;
    border-color: #c4b5fd;
    background: #f5f3ff;
    cursor: pointer;
}

.orderInfoTagAddRow {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.orderInfoTagSelectWrap {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    min-width: 0;
    position: relative;
}

.orderInfoTagSelectWrap .select2-container {
    min-width: 140px;
    flex: 1;
}

.orderInfoTagAction {
    border: none;
    background: none;
    padding: 2px;
    cursor: pointer;
    line-height: 1;
    border-radius: 4px;
}

.orderInfoTagAction .material-icons {
    font-size: 18px;
}

.orderInfoTagAction--save .material-icons {
    color: #22c55e;
}

.orderInfoTagAction--save:hover .material-icons {
    color: #16a34a;
}

.orderInfoTagAction--cancel .material-icons {
    color: #94a3b8;
}

.orderInfoTagAction--cancel:hover .material-icons {
    color: #ef4444;
}

/* --- Группа чекбоксов --- */
.orderCheckboxGroup {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 10px;
    margin-bottom: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.orderCheckboxGroup label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #475569;
    cursor: pointer;
    padding: 3px 0;
    margin: 0;
    transition: color 0.15s;
    font-weight: 500;
}

.orderCheckboxGroup label:hover {
    color: #1e293b;
}

.orderCheckboxGroup label input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: #3b82f6;
    cursor: pointer;
    flex-shrink: 0;
}

.orderCheckboxGroup label .material-icons {
    font-size: 16px;
}

/* --- Финансовая сводка --- */
.orderFinanceSummary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 8px;
}

.orderFinanceCard {
    padding: 8px 10px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    text-align: center;
}

.orderFinanceValue {
    font-size: 16px;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.2;
}

.orderFinanceLabel {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

/* Дата закрывающего документа */
.orderInfoCloseDoc {
    padding: 8px 10px;
    margin-bottom: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    box-sizing: border-box;
}

.orderInfoCloseDoc .main-input,
.orderInfoCloseDoc .form-group,
.orderInfoCloseDoc .input-group,
.orderInfoCloseDoc input {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.orderInfoCloseDocLabel {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #94a3b8;
    margin-bottom: 4px;
}

/* --- Hints --- */
.orderInfoHint {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    padding: 3px 0;
    font-size: 12px;
}

.orderInfoHint .material-icons {
    font-size: 16px;
    margin-top: 1px;
}

.orderInfoHintGreen {
    color: #16a34a;
}

.orderInfoHintRed {
    color: #dc2626;
}

/* Подсказка для пользователя */
.orderInfoTip {
    font-size: 11px;
    color: #94a3b8;
    line-height: 1.4;
    padding: 6px 0;
}

/* Причина отклонения */
.orderInfoRefused {
    padding: 6px 10px;
    margin-bottom: 8px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    font-size: 12px;
    color: #991b1b;
}

.orderInfoRefused b {
    font-weight: 700;
}

/* --- Блоки левой колонки: единый стиль заголовков --- */
.orderBlockContentLeft .orderBlock .orderBlockTitle {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}

.orderBlockTitleIcon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 5px;
    background: #f1f5f9;
    flex-shrink: 0;
}

.orderBlockTitleIcon .material-icons {
    font-size: 14px !important;
    color: #64748b !important;
}

.orderBlockTitleText {
    flex: 1;
    min-width: 0;
}

.orderBlockTitleActions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 2px;
}

.orderBlockTitleActions a,
.orderBlockTitleActions .material-icons {
    font-size: 16px !important;
    color: #94a3b8 !important;
    transition: color 0.15s;
}

.orderBlockTitleActions a:hover .material-icons,
.orderBlockTitleActions a:hover {
    color: #475569 !important;
}

/* --- Пустое состояние блоков --- */
.orderBlockContentLeft .orderBlockEmpty {
    text-align: center;
    color: #94a3b8;
    font-size: 12px;
    padding: 8px 4px;
    font-style: italic;
}

/* --- Элементы списка в блоках --- */
.orderBlockContentLeft .orderBlock .orderBlockItem {
    padding: 6px 0;
    margin-bottom: 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13px;
    line-height: 1.5;
}

.orderBlockContentLeft .orderBlock .orderBlockItem:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

/* --- Pay detail table polish --- */
.orderPayDetailTable {
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    margin-bottom: 12px;
}

.orderPayDetailTable > .table {
    border-radius: 10px;
    margin: 0;
}

.orderPayDetailTable thead tr:first-child th:first-child {
    border-radius: 9px 0 0 0;
}

.orderPayDetailTable thead tr:first-child th:last-child {
    border-radius: 0 9px 0 0;
}

.orderPayDetailTable tbody tr:last-child td:first-child {
    border-radius: 0 0 0 9px;
}

.orderPayDetailTable tbody tr:last-child td:last-child {
    border-radius: 0 0 9px 0;
}

.orderPayDetailTable .dropdown-menu {
    z-index: 10660;
}

.orderBlockContentLeft {
    position: relative;
    z-index: 2;
}

.orderPayDetailTable thead tr {
    background: #f8fafc;
}

.orderPayDetailTable thead th {
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    border-bottom: 1px solid #e2e8f0;
    padding: 8px 10px;
}

.orderPayDetailTable tbody td {
    font-size: 13px;
    padding: 8px 10px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.orderPayDetailTable tbody tr:last-child td {
    border-bottom: none;
}

/* Payment section header */
.orderPaymentSectionHeader {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.orderPaymentSectionTitle {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

/* Bonus detail link */
.orderBonusDetailLink {
    display: inline-block;
    font-size: 11px;
    color: #7c3aed;
    cursor: pointer;
    margin-top: 2px;
    transition: color .15s;
}
.orderBonusDetailLink:hover {
    color: #5b21b6;
    text-decoration: underline;
}

/* Bonus detail modal */
.bonusDetailModal {
    font-size: 13px;
    color: #334155;
    line-height: 1.5;
}
.bonusDetailHeader {
    margin-bottom: 14px;
}
.bonusDetailTitle {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
}
.bonusDetailMeta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: #64748b;
}
.bonusDetailType {
    background: #f1f5f9;
    border-radius: 4px;
    padding: 2px 8px;
}
.bonusDetailComment {
    margin-top: 6px;
    font-size: 12px;
    color: #94a3b8;
    font-style: italic;
}
.bonusDetailManual {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 13px;
    color: #92400e;
    margin-bottom: 12px;
}
.bonusDetailSection {
    margin-bottom: 14px;
}
.bonusDetailSectionTitle {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 6px;
}
.bonusDetailConditions {
    list-style: disc;
    margin: 0 0 0 18px;
    padding: 0;
    font-size: 13px;
}
.bonusDetailConditions li {
    margin-bottom: 2px;
}
.bonusDetailTable {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
.bonusDetailTable th {
    text-align: left;
    font-weight: 600;
    color: #64748b;
    padding: 6px 8px;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
}
.bonusDetailTable td {
    padding: 6px 8px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: top;
}
.bonusDetailTable tr:last-child td {
    border-bottom: none;
}
.bonusDetailStepLimits {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 2px;
}
.bonusDetailOrderSums {
    margin-top: 8px;
    font-size: 12px;
    color: #475569;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 0;
}
.bonusDetailProfitLink {
    margin-left: 16px;
    color: #6366f1;
    cursor: pointer;
    font-weight: 500;
}
.bonusDetailProfitLink:hover {
    text-decoration: underline;
}
.bonusDetailExtra {
    font-size: 13px;
    margin-bottom: 6px;
    color: #475569;
}
.bonusDetailTotals {
    border-top: 2px solid #e2e8f0;
    padding-top: 10px;
    margin-top: 10px;
}
.bonusDetailTotalRow {
    display: flex;
    justify-content: space-between;
    padding: 3px 0;
    font-size: 13px;
}
.bonusDetailLimit {
    color: #94a3b8;
    font-size: 12px;
}
.bonusDetailFinal {
    font-weight: 700;
    font-size: 14px;
    color: #1e293b;
}
.bonusDetailTotalLabel {
    color: #64748b;
}
.bonusDetailTotalValue {
    font-weight: 600;
}
.bonusDetailDiff {
    margin-top: 8px;
    padding: 8px 12px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    font-size: 12px;
    color: #991b1b;
}

/* Profit detail modal */
.profitDetailModal {
    font-size: 13px;
    color: #334155;
    line-height: 1.5;
}
.profitDetailSummary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}
.profitDetailSummaryCard {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 14px;
    text-align: center;
}
.profitDetailSummaryValue {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
}
.profitDetailSummaryLabel {
    font-size: 11px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: .3px;
    margin-top: 2px;
}
.profitDetailSummaryProfit {
    background: #f0fdf4;
    border-color: #bbf7d0;
}
.profitDetailSummaryProfitability {
    background: #faf5ff;
    border-color: #e9d5ff;
}
.profitDetailTaxHint {
    font-size: 12px;
    font-weight: 400;
    color: #64748b;
}
.profitDetailFormula {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 12px;
    color: #475569;
    margin-bottom: 16px;
}
.profitDetailFormulaLabel {
    font-weight: 600;
    color: #64748b;
}
.profitDetailSection {
    margin-bottom: 14px;
}
.profitDetailSectionTitle {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 6px;
}
.profitDetailTable {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
.profitDetailTable th {
    text-align: left;
    font-weight: 600;
    color: #64748b;
    padding: 6px 6px;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
}
.profitDetailTable td {
    padding: 5px 6px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: top;
}
.profitDetailTable tr:last-child td {
    border-bottom: none;
}
.profitDetailMainRow {
    background: #f8fafc;
}
.profitDetailBadge {
    display: inline-block;
    font-size: 10px;
    background: #e0e7ff;
    color: #4338ca;
    border-radius: 3px;
    padding: 1px 5px;
    margin-left: 4px;
    vertical-align: middle;
}
.profitDetailMarkupRow {
    padding: 6px 0;
    font-size: 13px;
    border-bottom: 1px solid #f1f5f9;
}
.profitDetailMarkupRow:last-child {
    border-bottom: none;
}
.profitDetailMarkupSide {
    font-weight: 600;
    color: #475569;
}
.profitDetailMarkupAffects {
    font-size: 11px;
    color: #16a34a;
}
.profitDetailMarkupNoAffects {
    font-size: 11px;
    color: #94a3b8;
}
.profitDetailExpense {
    font-size: 14px;
    font-weight: 600;
    color: #dc2626;
}
.profitDetailCalcTable {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}
.profitDetailCalcRow {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 8px 14px;
    font-size: 13px;
    border-bottom: 1px solid #f1f5f9;
}
.profitDetailCalcRow:last-child {
    border-bottom: none;
}
.profitDetailCalcDeduction {
    background: #fef2f2;
    color: #991b1b;
    font-size: 12px;
}
.profitDetailCalcEmp {
    color: #94a3b8;
    font-size: 11px;
}
.profitDetailDeductionVal {
    font-weight: 600;
    white-space: nowrap;
}
.profitDetailCalcNoAffect {
    color: #94a3b8;
    border-left: 3px solid #e2e8f0;
    padding-left: 10px;
}
.profitDetailCalcNoAffectHint {
    font-size: 11px;
    font-style: italic;
    color: #b0b8c4;
}
.profitDetailNoAffectVal {
    white-space: nowrap;
    color: #94a3b8;
}
.profitDetailCalcTotal {
    background: #f0fdf4;
    border-top: 2px solid #bbf7d0;
    font-size: 14px;
    font-weight: 600;
    color: #166534;
}

