:root {
    --status-blue: #2F80ED;
    --status-yellow: #EDC12F;
    --status-green: #34C759;
    --status-orange: #FF8C42;
    --status-purple: #9B59B6;
    --status-red: #BF1B1B;
    --card-radius: 10px;
    --muted: #8b8b8b;
    --border: #e6e6e6;
    --bg-page: #f6f7f8;
}

body {
    background: var(--bg-page);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

.button:not([class^=mfp]).bigger,
button:not([class^=mfp]).bigger {
    border-width: 2px;
    padding: 4px 10px;
    text-transform: uppercase;
}

.text-left,
.table-type2 td.text-left:last-child {
    text-align: left;
}

.text-right,
.table-type2 td.text-right:last-child {
    text-align: right;
}

.fw-bold {
    font-weight: bold !important;
}

.text-center,
.table-type2 td.text-center:last-child {
    text-align: center;
}

.form_submit {
    cursor: pointer;
}

.w300 {
    width: 300px;
}

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

.font14 {
    font-size: 14px !important;
}

.mr5 {
    margin-right: 5px;
}

.audit_td {
    padding: 5px 10px !important;
}

.fw_green,
.allowed,
.reserve_allowed,
.allowed a {
    color: #45b114;
}

.not_allowed,
.reserve_not_allowed,
.not_allowed a {
    color: #45b114;
}

.table-type1 tr.selected-row td span.allowed,
.table-type1 tr.selected-row td span.allowed a {
    color: #08ff00 !important;
}

.table-type1 tr.selected-row td span.not_allowed,
.table-type1 tr.selected-row td span.not_allowed a {
    color: #bf1b1b !important;
}

#global-popup-orders-offer-add .not_allowed,
#global-popup-orders-offer-add .not_allowed a {
    color: #ff5c5c !important;
}

.td_small {
    padding: 8px 20px !important;
}

.tr_violet {
    background: #d5e2e8;
}

.report_warehouse_line_hover:hover td {
    background: #fffab5;
}

.report_warehouse_line_yellow {
    background: #fffab5;
}

.report_warehouse_line_yellow sup {
    color: #23a318;
}

.report_warehouse_line_yellow sup.diff_minus {
    color: #bf1b1b;
}

.custom_name_title {
    font-style: italic;
    cursor: pointer;
}

.custom_name_title:hover {
    text-decoration: underline;
}

.custom_name_edit {
    display: none;
}

.custom_name_edit input {
    width: 100%;
    min-width: 120px;
}

.separator_text_value {
    width: 100%;
    min-width: 250px;
}

.offer_add_result_success {
    width: 20px;
    height: 20px;
    border-radius: 20px;
    background: #23a318;
}

.offer_add_result_fail {
    width: 20px;
    height: 20px;
    border-radius: 20px;
    background: #bf1b1b;
}


.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.block_edit {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 10;
    display: none;
}

.notice_message {
    position: fixed;
    z-index: 99999;
    bottom: 0;
    right: 0;
    padding: 15px 30px;
    color: #fff;
    background: #23a318;
    font-size: 14px;
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
    display: none;
}

.notice_text a {
    text-decoration: underline;
    color: var(--bs-link-color);
}

.notice_message.error {
    background: #d9534f;
}

.notice_message.success {
    background-color: green;
}


.info_message {
    position: fixed;
    z-index: 99999;
    bottom: 100px;
    right: 50px;
    padding: 15px 30px;
    color: #fff;
    background: #58ad55;
    font-size: 18px;
    border-radius: 10px;
    display: none;
}

.info_message a {
    text-decoration: underline;
    color: var(--bs-link-color);
}

.infinite {
    font-size: 30px;
}

.incomplete_qnt {
    color: #ff0000 !important;
    padding-left: 10px;
}

.order_add_allow {
    white-space: nowrap;
}

#alert_message .mfp-container {
    height: 300px;
}

.date-time-block.date-time-block-add .input-wrapper {
    width: 150px;
}

.date-time-block.date-time-block-add .input-wrapper input {
    padding: 10px;
}

.date-time-block-add {
    align-items: end;
}

.popup-block {
    box-shadow: 1px 1px 111px 96px rgba(0, 0, 0, 0.26);
    -webkit-box-shadow: 1px 1px 111px 96px rgba(0, 0, 0, 0.26);
    -moz-box-shadow: 1px 1px 111px 96px rgba(0, 0, 0, 0.26);
}

.flex-block {
    display: flex;
    justify-content: space-between;
}

.flex-block-left {
    justify-content: left;
}

.flex-block-align-center {
    align-items: center;
}

.gray_info {
    color: #ccc;
    border: 1px solid #ccc;
}

.tab .variation_title_edit_btn {
    display: none;
}

.tab.active .variation_title_edit_btn {
    display: inline-block;
}

.bitrix_name {
    font-size: 16px;
}

.bitrix_name svg path {
    fill: #34a5e4;
}

.bitrix_name a:hover svg path {
    fill: #fff;
}

.bitrix_name_info {
    font-size: 14px;
    color: #34a5e4;
}

.spinner {
    position: relative;
}

.spinner::before,
.spinner::after {
    content: '';
    border-radius: 50%;
    position: absolute;
    transform: translate(-50%, -50%);
}

.spinner::before {
    width: 6.7px;
    height: 6.7px;
    background: #ffffff;
}

.spinner::after {
    width: 24px;
    height: 24px;
    animation: spinner-y7ej37 1s infinite linear;
    border: 4.8px solid #ffffff;
    border-left-color: transparent;
    border-right-color: transparent;
}

.mt5 {
    margin-top: 5px;
}

.pt5 {
    padding-top: 5px;
}

.logistic_header {
    display: none;
}

.table_report_repair {
    max-height: 600px;
    overflow-y: scroll;
}

.table_report_repair thead th {
    position: sticky;
    top: 0;
    z-index: 99;
    border-bottom: 1px solid #bcc3c8;
}

.color-light-gray {
    color: rgba(187, 187, 187, 0.5) !important;
}

.report_warehouse_line_title {
    width: 300px;
}

.report_warehouse_line_title a {
    white-space: normal;
}

.report_warehouse_line_title_eq {
    width: 600px;
}

.report_warehouse_line_title_eq a {
    white-space: normal;
}

.report_warehouse_line_qnt_dates {
    text-align: center !important;
}

.report_warehouse_line_qnt {
    text-align: center !important;
    position: relative;
    border-right: 1px solid #ccc;
    padding: 0 !important;
    height: 45px;
    width: 120px;
}

.report_warehouse_line_orders {
    text-align: center !important;
    position: relative;
    border-right: 1px solid #ccc;
    padding: 0 !important;
    height: 45px;
    width: 600px;
}

.balance_all {
    position: absolute;
    right: 5px;
    top: 2px;
    font-size: 12px;
}

.balance_div {
    padding: 7px;
    height: 45px;
}

.repair_legend {
    padding: 5px 15px;
}

.repair_div {
    background: #f4cccc !important;
}

.remove_div {
    background: #fff2cc !important;
}

.warehouse_div {
    background: #d9ead3 !important;
}

.warehouse_remove_div {
    background: #d9d2e9 !important;
}

.history_bx24 {
    background: #d9ead3;
    padding: 2px 4px;
    border-radius: 2px;
}

.history_button {
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    border: 1px solid #aeb4b8;
}

.history_status_button {
    background: #aeb4b8;
    color: #3e3c3c;
}

.history_tax_button {
    background: #34a5e4;
    border: 1px solid #34a5e4;
    color: #fff;
}

.line_select {
    padding: 5px 10px;
    background: #fff;
    border: 1px solid rgba(48, 70, 83, .15);
    color: #2a3d47;
    height: 40px;
    border-radius: 6px;
}

@keyframes spinner-y7ej37 {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.sites-circles .site-circle.show-all-circle {
    z-index: unset;
}

.blink_me {
    animation: blinker 1s linear infinite;
}

@keyframes blinker {
    50% {
        opacity: 0;
    }
}

.select_search {
    width: 100%;
    display: block;
    padding: 5px;
    height: 30px;
    margin-bottom: 5px;
}

#manager-styler,
#status_id-styler,
#company-styler {
    display: block;
}


.jq-select-multiple {
    box-sizing: border-box;
    padding: 1px;
    border: 1px solid #CCC;
    border-bottom-color: #B3B3B3;
    border-radius: 4px;
    background: #FFF;
    box-shadow: inset 1px 1px #F1F1F1, 0 1px 2px rgba(0, 0, 0, .1);
    font: 14px/18px Arial, sans-serif;
    color: #333;
    cursor: default;
}

.jq-select-multiple.focused {
    border: 1px solid #5794BF;
}

.jq-select-multiple.disabled {
    border-color: #CCC;
    background: #F5F5F5;
    box-shadow: none;
    color: #888;
}

.jq-select-multiple ul {
    margin: 0;
    padding: 0;
}

.jq-select-multiple li {
    padding: 3px 9px 4px;
    list-style: none;
}

.jq-select-multiple li:first-child {
    border-radius: 3px 3px 0 0;
}

.jq-select-multiple li:last-child {
    border-radius: 0 0 3px 3px;
}

.jq-select-multiple li.selected {
    background: #08C;
    color: #FFF;
}

.jq-select-multiple li.disabled {
    color: #AAA;
}

.jq-select-multiple li.optgroup {
    font-weight: bold;
}

.jq-select-multiple li.option {
    padding-left: 25px;
}

.jq-select-multiple.disabled li.selected,
.jq-select-multiple li.selected.disabled {
    background: #CCC;
    color: #FFF;
}


.combined-data-table {
    width: 100%;
    border-collapse: collapse;
}

.combined-data-table th {
    background-color: #f2f2f2;
    padding: 8px;
    text-align: left;
    border: 1px solid #ddd;
}

.combined-data-table td {
    padding: 8px;
    border: 1px solid #ddd;
    vertical-align: top;
}

.row-history {
    background-color: #f9f9f9;
}

.row-history.order-change {
    background-color: #e6f7ff;
}

.row-history.offer-change {
    background-color: #fff7e6;
}

.row-view {
    background-color: #f0fff0;
}

.tab_order_sum {

    font-size: 12px;
    font-weight: bold;
    color: #87949c;
}


.combined-data-table tr:hover {
    background-color: #f5f5f5;
}


.tabs .tabs__caption .tab {
    background-color: white;
    border: 1px solid #c2c9cc;
}

.tabs .tabs__caption .tab:hover {
    color: black;
}

.tab.wider .tab_order_sum,
.tabs .tabs__caption .tab .label {
    color: black;
}

.tabs .tabs__caption .tab:hover .label {
    color: black;
}

.tabs .tabs__caption .tab:hover {
    background-color: #f4f7f9;
}

.tabs .tabs__caption .add-tab-btn {
    vertical-align: text-top;
}

span.reserved {
    color: gray;
}

span.reserved_separator {
    color: gray;
}

span.reserved.allowed {
    color: gray;

}

span.reserved.not_allowed {
    color: gray;
}

span.sum_info {
    font-size: x-small;
    font-weight: lighter;
}

td.sum_col {
    text-align: end;
}

td.report_offer_first_col_title {
    background-color: #e3ebf0;
    color: #56636a;
}

.table-type1 td {
    padding: 8px 5px;
}

.notices_drop_item {
    padding-left: 10px;
}

.notices_drop_item_all {
    color: #00CC66;
    font-weight: bold;
}

.notices_drop_item_unread {
    color: #e9366c;
}

header .header-top__right .user-info .avatar-wrapper {
    position: relative;
}

.notices_count_label {
    position: absolute;
    background: #e9366c;
    color: #fff;
    font-size: 10px;
    border-radius: 20px;
    padding: 3px;
    top: 0;
    right: 15px;
}

.notices_count_icon {
    animation: bell 2s infinite;
}

@-webkit-keyframes bell {
    0% {
        transform: scale(1); /* scaling to 0 */
    }
    50% {
        transform: scale(1.2); /* increasing the size */
    }
    70% {
        transform: scale(0.65); /* decreasing the size */
    }
    100% {
        transform: scale(1); /* seeting back to initial size */
    }
}


@media (max-width: 1500px) {

    .orders_table_list th,
    .orders_table_list td {
        font-size: 0.9em !important;
        padding: 12px;
    }
}

@media (max-width: 1200px) {

    .orders_table_list th,
    .orders_table_list td {
        font-size: 0.8em !important;
        padding: 10px;
    }
}

.remove-tab-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #FF605C;
    border-radius: 50%;
    width: 15.4px;
    height: 15.4px;
    padding: 0;
    margin: 0;
    position: absolute;
    top: 5px;
    right: 5px;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s ease;
}

.remove-tab-btn svg {
    display: none;
    width: 7.7px;
    height: 7.7px;
}

.remove-tab-btn:hover svg {
    display: block;
}

.remove-tab-btn:hover {
    background-color: #e5514f;
}

.remove-tab-btn svg path {
    stroke: black;
    stroke-width: 1.5;
}

.toggle-order-btn,
.toggle-info-btn {
    width: 28px;
    height: 28px;
    background: #fbfdff;
    border: 1px solid #ccc;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
    position: relative;
}

.toggle-order-btn:hover,
.toggle-info-btn:hover {
    background: #e9f2f9;
}

.toggle-order-btn::before,
.toggle-info-btn::before {
    content: "";
    display: block;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #333;
    transition: transform 0.3s ease;
    transform-origin: center center;
}

.toggle-order-btn.open::before,
.toggle-info-btn.open::before {
    transform: rotate(180deg);
}

.bigger:hover {
    background-color: #34a5e4;
    color: white;
}

.active-btn {
    background-color: #34a5e4 !important;
    color: white !important;
    transition: background-color 0.3s ease;
}

.transport-row,
.person-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.transport-select,
.person-name,
.person-phone,
.person-car,
.person-passport {
    flex: 1;
    padding: 5px;
    font-size: 14px;
}

.transport-qty {
    width: 60px;
    padding: 5px;
    font-size: 14px;
}

.remove-transport-btn,
.remove-person-btn {
    background: red;
    color: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 4px;
}

.add-transport-btn,
.add-person-btn {
    padding: 8px 12px;
    font-size: 16px;
    background-color: #2196f3;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.orders_add_lines select {
    border: 1px solid rgba(48, 70, 83, .15);
    border-radius: 6px;
    color: #2a3d47;
    font-weight: 600;
    height: 40px;
    padding: 10px 14px;
    -webkit-transition: border-color .3s;
    -o-transition: border-color .3s;
    transition: border-color .3s;
}

.delete-all-btn2.open-positioned-modal-block-btn {
    padding: 10px;
}

/*
Блок маржинальности
*/
.expense_block {
    display: inline-block;
}

.expense_content {
    padding: 0 0 10px 0;
    min-height: 57px;
}

#profitability_block {
    padding-bottom: 0;
}

.profitability_value {
    font-weight: bold;
}

.profitability-level.low {
    color: #28a745;
    font-weight: 600;
}

.profitability-level.medium {
    color: #ffc107;
    font-weight: 600;
}

.profitability-level.high {
    color: #28a745;
    font-weight: 600;
}

.profitability-block {
    margin: 5px 0 5px;
}

.profitability-block.sticky {
    position: fixed;
    top: 75px;
    max-width: 300px;
    z-index: 1000;
    animation: slideDown 0.3s ease;
    right: 0;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.accordion-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    background-color: #f8fafc;
    border-radius: 8px;
    cursor: pointer;
    margin: 10px 0;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.accordion-toggle:hover {
    background-color: #edf2f7;
}

.toggle-text {
    font-size: 13px;
    color: #4a5568;
    font-weight: 500;
}

.toggle-icon {
    font-size: 12px;
    color: #718096;
    transition: transform 0.3s ease;
}

.accordion-content {
    max-height: 500px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.accordion-content.collapsed {
    max-height: 0;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
}

.accordion-toggle.active .toggle-icon {
    transform: rotate(180deg);
}

.two-column-content-section > .right {
    margin-left: 10px;
}

.rounded-corners {
    border-radius: 12px;
    overflow: hidden;
}

.block-title {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.block-title {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    text-align: center;
}

.profitability-main {
    margin-bottom: 5px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0px;
    padding: 2px 0;
}

.label {
    font-weight: 400;
    font-size: 14px;
}

.value {
    font-weight: 600;
    font-size: 14px;
}

.profitability-value.low {
    color: #dc3545;
}

.profitability-value.medium {
    color: #FF8C00;
}

.profitability-value.high {
    color: #28a745;
}

.profit-value {
    color: #28a745;
}

.expense-value {
    color: #dc3545;
}

.progress-bar-container {
    width: 100%;
    margin: 0 0 10px 0;
    overflow: hidden;
}

.progress-bar {
    height: 14px;
    background: #f0f0f0;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-bar-container span {
    font-size: 12px;
}

.progress-low {
    background: linear-gradient(90deg, #dc3545, #fd7e14);
}

.progress-medium {
    background: linear-gradient(90deg, #ffc107, #FF8C00);
}

.progress-high {
    background: linear-gradient(90deg, #28a745, #20c997);
}

.breakdown-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    font-size: 14px;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0px;
    padding: 0px 0;
}

.breakdown-label {
    font-weight: 400;
    color: #666;
    font-size: 13px;
}

.breakdown-value {
    font-weight: 500;
    color: #333;
    font-size: 13px;
}

@media (max-width: 768px) {
    .profitability-block.sticky {
        width: calc(100% - 40px);
        max-width: none;
        left: 20px;
        right: 20px;
    }
}

@media (max-width: 480px) {
    .profitability-block {
        padding: 15px;
        margin: 10px 0;
    }

    .info-item {
        margin-bottom: 0px;
        padding: 6px 0;
    }

    .breakdown-item {
        margin-bottom: 6px;
        padding: 4px 0;
    }
}

/*
Поле "Расход"
*/
.expense_value {
    background-color: #45b114;
}

.expense_value:placeholder-shown,
.expense_value[value="0"],
.expense_value[value="0.00"] {
    background-color: white;
}

.expense_value:disabled {
    background-color: inherit;
}

.time-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    justify-content: center;
    align-items: center;
}

.time-popup {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    max-height: 80%;
    overflow-y: auto;
}

.time-matrix {
    display: grid;
    grid-template-columns: repeat(4, 60px);
    gap: 10px;
}

.time-matrix button {
    padding: 10px;
    background: #f0f0f0;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.time-matrix button:hover {
    background: #d0e4ea;
}

.close-popup {
    margin-top: 10px;
    cursor: pointer;
    color: red;
    text-align: center;
    font-weight: bold;
}

.fact-of-payment,
.status-indicator {
    display: inline-flex;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1;
    color: #fff;
    margin-right: 8px;
    vertical-align: middle;
    white-space: nowrap;
    min-width: 60px;
    align-items: center;
    justify-content: center;
}

.status-indicator.logistic-new {
    background-color: var(--status-blue);
}


.status-indicator.logistic-in-progress {
    background-color: var(--status-yellow);
    color: #222;
}

.status-indicator.logistic-done {
    background-color: #45b114;
}

.status-indicator.logistic-zp-ready {
    background-color: red;
    color: #fff;
}

.logistic-order-card-wrapper {
    flex: 1;
}

.logistic-meta-data {
    flex: 0 0 25%;
    text-align: left;
    max-width: 25%;
    background: #fff;
    border: 1px solid #ddd;
    padding: 10px;
    font-size: 14px;
    border-left: none;
}

img.loading {
    filter: blur(2px);
    opacity: 0.7;
}

img.loaded {
    filter: none;
    opacity: 1;
    transition: transform .25s ease;
}

img:hover {
    transform: scale(1.05);
    z-index: 10;
}


.logistic-order-statuses {
    flex: 0 0 20%;
    text-align: left;
    max-width: 20%;
    background: #fff;
    border: 1px solid #ddd;
    padding: 10px;
    font-size: 14px;
    border-left: none;
}

.order-card .card-header {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 4px;
    text-align: left !important;
}

.order-card .ref {
    font-weight: 700;
    font-size: 18px;
    line-height: 1.3;
}

.order-card .meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    color: #444;
    text-align: left;
}

.order-card .meta b {
    font-weight: 600;
    margin-right: 6px;
    min-width: 100px;
    display: inline-block;
}

.order-card .address {
    white-space: normal;
    word-break: break-word;
}

.order-card .comments {
    color: #333;
    white-space: normal;
    word-break: break-word;
}

.order-card .card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-top: 4px;
}

.order-card .updated {
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

.logistic-order-action-btn {
    background: #fff;
    border: 1px solid #ddd !important;
    border-radius: 6px !important;
    color: #000 !important;
    font-size: 14px !important;
    font-weight: 500;
    padding: 8px 14px !important;
    cursor: pointer;
    text-decoration: none;
    margin-bottom: 5px;
    margin-right: 5px;
    transition: background 0.2s, border 0.2s;
    gap: 4px;

}

.logistic-order-action-btn:hover {
    background: #e6e6e6 !important;
    border-color: #ccc !important;
}

.logistic-order-action-btn svg {
    display: inline-block;
    overflow: visible;
    vertical-align: middle;
}

.deal-fields-wrapper {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
}

.deal-column {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.deal-field {
    word-break: break-word;
}

.deal-field strong {
    display: block;
    margin-bottom: 3px;
    font-weight: 600;
    font-size: 13px;
    color: #000;

}

.deal-field-value {
    white-space: pre-wrap;
    line-height: 1.3;
    font-weight: 400;
    color: #222;
}

.deal-field-value.empty {
    color: #888;
}

.deal-field.last-field {
    width: 100%;
    box-sizing: border-box;
}

.logistic-new-wrapper {
    padding: 6px 8px;
    background: transparent;
    border-bottom: none;
}


.logistic-new-item-card {
    display: flex;
    gap: 6px;
    align-items: center;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 5px;
    min-width: 260px;
    flex: 0 1 320px;
    text-align: left;
}


.logistic-new-item-left {
    flex: 1;
    min-width: 0;
}

.logistic-new-name {
    font-size: 14px !important;
    font-weight: 600;
    color: #333;
    text-decoration: none;
}

.logistic-new-name:hover {
    text-decoration: underline;
}

.logistic-new-meta {
    color: #666;
    font-size: 13px;
    margin-top: 4px;
}

.logistic-new-qty {
    white-space: nowrap;
    margin-left: 8px;
    font-weight: 600;
}


.order-card .ready {
    background: #45b114;
    color: #fff;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 12px;
    margin-top: 4px;
    display: inline-block;
}

.card-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.compatibility-row {
    display: none !important;
    background: transparent !important;
}

.compatibility-row td {
    padding: 0 !important;
    border: 0 !important;
    height: 0 !important;
    line-height: 0 !important;
}

.bitrix-progress {
    width: 100%;
    min-width: 600px;
    margin-top: 5px;
}

.progress-stages {
    display: flex;
    gap: 10px;
}

.stage {
    flex: 1;
    position: relative;
    height: 20px;
    background: #e0e0e0;
    cursor: pointer;
    transition: background .2s, box-shadow .2s;
}

.stage::after {
    content: "";
    position: absolute;
    right: -10px;
    top: 0;
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 10px solid #e0e0e0;
    z-index: 3;
}

.stage:not(:first-child)::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 10px solid #fff;
    z-index: 2;
}


.stage:hover {
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.25) inset;
    z-index: 4;
}

.stage.active {
    background: var(--status-blue);
}

.stage.active::after {
    border-left-color: var(--status-blue);
}

.stage[data-status="in_progress"].active {
    background: var(--status-yellow);
}

.stage[data-status="in_progress"].active::after {
    border-left-color: var(--status-yellow);
}

.stage[data-status="done"].active {
    background: #45b114;
}

.stage[data-status="done"].active::after {
    border-left-color: #45b114;
}

.stage[data-status="zp_ready"].active {
    background: red;
}

.stage[data-status="zp_ready"].active::after {
    border-left-color: red;
}


.progress-labels {
    display: flex;
    margin-top: 6px;
}

.stage-label {
    flex: 1;
    text-align: center;
    font-size: 14px;
    color: #000;
    cursor: pointer;
}

.stage-label.active-label {
    font-weight: 600;
    color: #000;
}

.filter-btn.active {
    background-color: #34a5e4;
    color: white;
    border-radius: 4px;
    padding: 5px 10px;
}


.last-field {
    width: 100%;
    display: flex;
    justify-content: flex-end;
}

.last-field strong {
    margin-right: 5px;
}


.export-personnel.ready {
    background-color: #937df4 !important;
    color: white;
}

.status {
    padding: 3px 6px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 13px;
}

.status-green {
    background-color: #d4edda;
    color: #155724;
}

.status-red {
    background-color: #f8d7da;
    color: #721c24;
}

#popup {
    display: none;
    position: absolute;
    background: transparent;
    z-index: 1000;
}

#popup-content {
    background: #fff;
    padding: 20px;
    width: 300 -500px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    position: relative;
    border-radius: 4px;
}


.fact-of-payment.green {
    background: #45b114;
}

.fact-of-payment.yellow {
    background: yellow;
    color: #222;
}

.fact-of-payment.red {
    background: red;
}

.fact-of-payment.gray {
    background: #937df4;
    color: #fff;
}


.status-checkboxes-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 8px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    max-width: 700px;
}

.status-checkbox {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
    justify-content: center;
    text-align: center;
}

.status-checkbox input[type="checkbox"] {
    margin-right: 6px;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.status-checkbox:hover {
    background-color: #e6f0ff;
    border-color: #80b3ff;
}

.status-checkbox input[type="checkbox"]:checked + span {
    font-weight: 600;
    color: #007bff;
}

.item_name_no_sklad {
    color: #ff0000;
}

.warehouse-cards {
    width: 100%;
    margin: 0 auto;
    padding: 10px;
    display: grid;
    gap: 10px;
}

.order-card {
    background: #fff;
    box-shadow: 0 1px 3px rgba(20, 20, 20, 0.04);
    border: 1px solid var(--border);
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
}

.order-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.order-card__title {
    font-weight: 600;
    font-size: 18px;
    color: #222;
    display: flex;
    gap: 8px;
    align-items: center;
}

.order-card__meta {
    color: var(--muted);
    font-size: 12px;
}

.card-controls {
    display: flex;
    gap: 8px;
    align-items: center;
    position: relative;
}

.menu-btn {
    background: none;
    border: 0;
    font-size: 24px;
    cursor: pointer;
    color: black;
    border-radius: 6px;
}

.menu-btn:after {
    content: '\2807';
    font-size: 24px;
}


.menu-dropdown {
    position: absolute;
    right: 0;
    top: 36px;
    min-width: 150px;
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    border-radius: 6px;
    display: none;
    z-index: 40;
}

.menu-dropdown.show {
    display: block;
}

.menu-dropdown .item {
    display: block;
    width: 100%;
    padding: 0;
}

.menu-dropdown .item a,
.menu-dropdown .item button {
    display: block;
    width: 100%;
    padding: 8px 12px;
    font-size: 15px;
    text-align: center;
    border: none;
    background: none;
    color: #222;
    cursor: pointer;
    text-decoration: none;
    box-sizing: border-box;
    font-weight: bold;
}

.menu-dropdown .item a:hover,
.menu-dropdown .item button:hover {
    background: #fafafa;
}

.menu-dropdown .item + .item {
    border-top: 1px solid var(--border);
}


.toggle-triangle {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: #fbfdff;
    position: relative;
    transition: transform 0.18s ease;
}

.toggle-triangle::after {
    content: "";
    display: block;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #333;
    transition: transform 0.18s ease;
}

.toggle-triangle.open::after {
    transform: rotate(180deg);
}

.status-track {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 2px;
}

.status-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
}

.status-dot {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #e0e0e0;
    margin-bottom: 5px;
    position: relative;
    z-index: 2;
    transition: all .2s ease;
    cursor: pointer;
}

.status-dot.current {
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px var(--status-color);
}

.status-line {
    position: absolute;
    top: 12px;
    left: 50%;
    right: -50%;
    height: 5px;
    background: #e0e0e0;
    z-index: 1;
    transition: all .2s ease;
}

.status-item:last-child .status-line {
    display: none;
}

.status-label {
    font-size: 14px;
    color: #999;
    white-space: nowrap;
    transition: color .2s ease, font-weight .2s;
    cursor: pointer;
    user-select: none;
}

.order-card.status-current-1 .status-step:nth-child(1) .dot {
    background: var(--status-blue);
    border-color: var(--status-blue);
}

.order-card.status-current-2 .status-step:nth-child(2) .dot {
    background: var(--status-yellow);
    border-color: var(--status-yellow);
}

.order-card.status-current-3 .status-step:nth-child(3) .dot {
    background: var(--status-green);
    border-color: var(--status-green);
}

.order-card.status-current-4 .status-step:nth-child(4) .dot {
    background: var(--status-orange);
    border-color: var(--status-orange);
}

.order-card.status-current-5 .status-step:nth-child(5) .dot {
    background: var(--status-purple);
    border-color: var(--status-purple);
}

.warehouse-status-normal {
    line-height: normal !important;
    font-size: 1.1em !important;
}

.status-step .label {
    font-size: 11px;
    color: var(--muted);
    white-space: nowrap;
}

.order-items {
    display: none;
    flex-direction: column;
    gap: 8px;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed var(--border);
}

.order-items.open {
    display: flex;
}

.item-card {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 6px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #fff;
}

.item-card__left {
    flex: 1;
    font-weight: 600;
    font-size: 16px;
    color: #222;
}

.item-card__meta {
    font-size: 14px;
    color: var(--muted);
}

.item-card__stock {
    font-size: 14px;
    padding: 4px 8px;
    border-radius: 12px;
}

.stock-high {
    border: 2px solid green;
    color: black;
}

.stock-medium {
    border: 2px solid yellow;
    color: black;
}

.stock-low {
    border: 2px solid red;
    color: black;
}

.item-card__qty {
    font-weight: 700;
    font-size: 18px;
    color: #222;
    min-width: 54px;
    text-align: right;
}

.link-sm {
    font-size: 12px;
    color: #007bff;
    text-decoration: underline;
    cursor: pointer;
}

.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
    z-index: 80;
}

.modal.show {
    display: flex;
}

.modal__box {
    width: 420px;
    max-height: 80vh;
    overflow: auto;
    background: #fff;
    border-radius: 10px;
    padding: 14px;
}

.modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.order-card[data-editable="false"] .status-dot {
    opacity: 0.55;
    cursor: default;
}

.status-dot[data-tooltip],
.status-item[data-tooltip] .status-dot {
    cursor: not-allowed;
}

.status-dot[data-tooltip]:hover::after,
.status-item[data-tooltip]:hover .status-dot::after,
.status-item[data-tooltip] .status-label:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    top: -34px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.78);
    color: #fff;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 120;
    pointer-events: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.status-dot[data-tooltip]:hover::before,
.status-item[data-tooltip]:hover .status-dot::before,
.status-item[data-tooltip] .status-label:hover::before {
    content: "";
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid rgba(0, 0, 0, 0.78);
    z-index: 121;
    pointer-events: none;
}

.status-dot.clickable {
    cursor: pointer;
}

.status-dot.clickable:hover {
    transform: scale(1.12);
}


.image-with-hover-zoom {
    flex-shrink: 0;
    width: 70px;
    height: 35px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-image {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    z-index: 2;
}

.preview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 6px;
    transition: transform 0.18s ease;
}

.zoom-image {
    position: absolute;
    top: 50%;
    left: 100%;
    margin-left: 12px;
    width: 192px;
    height: 192px;
    transform: translateY(-50%) scale(0.96);
    opacity: 0;
    visibility: hidden;
    z-index: 9999;
    pointer-events: none;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
    background: #fff;
    transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
    overflow: hidden;
}

.image-with-hover-zoom:hover .zoom-image {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) scale(1);
}


.zoom-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.image-with-hover-zoom:focus-within .zoom-image {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.image-with-hover-zoom:hover .preview-image img {
    transform: scale(1.03);
}

@media (max-width: 600px) {
    .zoom-image {
        width: 140px;
        height: 140px;
    }
}

.order-extra-info {
    padding-left: 5px;
    margin-bottom: 4px;
    border-radius: 6px;
    background: #fff;
    font-size: 14px;
    color: #333;
    line-height: 1.5;
}

.order-info-line {
    margin-bottom: 2px;
    font-size: 14px;
}

.order-info-line-address {
    max-width: 70%;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

.warehouse-filter-btn {
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    color: #333;
    padding: 5px 10px;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    border-radius: 4px;
}

.warehouse-filter-btn.active[data-filter="all"] {
    background-color: #007bff;
    border-color: #007bff;
    color: #fff;
}

.warehouse-filter-btn.status-1.active {
    background: var(--status-blue);
    border-color: var(--status-blue);
    color: #fff;
}

.warehouse-filter-btn.status-2.active {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #fff;
}

.warehouse-filter-btn.status-3.active {
    background: var(--status-green);
    border-color: var(--status-green);
    color: #fff;
}

.warehouse-filter-btn.status-4.active {
    background: var(--status-orange);
    border-color: var(--status-orange);
    color: #fff;
}

.warehouse-filter-btn.status-5.active {
    background: var(--status-purple);
    border-color: var(--status-purple);
    color: #fff;
}

.btn-logistic {
    border-color: #6a1b9a !important;
    color: #56636a !important;
}

.btn-logistic.active {
    background: #6a1b9a !important;
    color: #fff !important;
}

.btn-warehouses {
    border-color: brown !important;
    color: #56636a !important;
}

.btn-warehouses.active {
    background: brown !important;
    color: #fff !important;
}

.btn-newwarehouses {
    border-color: green !important;
    color: #56636a !important;
}

.btn-newwarehouses.active {
    background: green !important;
    color: #fff !important;
}


.order-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    vertical-align: middle;
    line-height: 1;
}

.order-status.status-current-1 {
    background: var(--status-blue);
    color: #fff;
}

.order-status.status-current-2 {
    background: var(--status-yellow);
    color: #fff;
}

.order-status.status-current-3 {
    background: var(--status-green);
    color: #fff;
}

.order-status.status-current-4 {
    background: var(--status-orange);
    color: #fff;
}

.order-status.status-current-5 {
    background: var(--status-purple);
    color: #fff;
}

.order-status:hover {
    opacity: 0.95;
}


.report_sortable {
    cursor: pointer;
}

.arrow-icon.revert {
    rotate: 180deg;
}

.arrow-icon.active {
    fill: #00CC66;
}

.workload-table {
    width: 100%;
}

.workload-table td.separator {
    border-right: 1px solid #E0E0E0 !important;
}


.workload-table td.has-data.upload {
    border: 2px solid #08ed6a;
    border-radius: 5px;
}

.workload-table td.has-data.return {
    border: 2px solid #206add;
    border-radius: 5px;
}

.workload-table td.has-data.return.has-continued {
    border-bottom: none !important;
}

.workload-table td.has-data.return.continued-only {
    border-top: none !important;
}

.workload-table .transport-item {
    font-size: 14px;
    padding: 2px 0;
}

.workload-table .transport-name {
    color: black;
}

.workload-table .total-transport-count,
.workload-table .transport-count {
    float: left;
    font-weight: 600;
    color: black;
    font-size: 14px;
}

.workload-table td.continued-only {
    min-height: 20px;
}

.workload-table .cell-continued {
    height: 100%;
    width: 100%;
}

table.table-type2.workload-table td.severity-green {
    background-color: #E8F5E9;
}

table.table-type2.workload-table td.severity-orange {
    background-color: #FFF8E1;
}

table.table-type2.workload-table td.severity-red {
    background-color: #FFEBEE;
}

.filters {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 8px;
    padding: 10px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    max-width: 40%;
}

.filter-controls {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-block {
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 8px;

}

.filter-label {
    font-size: 14px;
    color: #222;
    font-weight: 700;
}

.filter-inline {
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-select {
    border: 1px solid #e0e0e0;
    background: #fff;
    font-size: 13px;
    height: 36px !important;
    line-height: 1;
    min-width: 20px !important;
}

.dash {
    color: #666;
    font-weight: 600;
    font-size: 18px;
}

.btn {
    padding: 8px 12px;
    border-radius: 8px;
    border: 0;
    background: #1976d2;
    color: #fff;
    cursor: pointer;
    font-weight: 700;
    height: 36px;
}

.btn:hover {
    opacity: 0.95;
}

.hide-zero-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 13px;
}

.filter-transports {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.transport-grid-title {
    font-size: 13px;
    font-weight: 700;
    color: #333;
}

.transport-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px 12px;
}

.transport-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid #f0f0f0;
    cursor: pointer;
    font-size: 14px;
    transition: background .12s, box-shadow .12s;
}

.transport-label:hover {
    background: #f7fbff;
    box-shadow: 0 2px 6px rgba(25, 118, 210, 0.06);
}

.transport-label input[type="checkbox"].transport-checkbox {
    width: 16px;
    height: 16px;
    margin: 0;
    margin-left: 0;
    margin-right: 6px;
    vertical-align: middle;
    flex: 0 0 16px;
    cursor: pointer;
    -webkit-transform: scale(0.95);
    transform: scale(0.95);
}

.transport-label img {
    width: 40px;
    height: 28px;
    border-radius: 6px;
    background: #eee;
}

.transport-title {
    display: inline-block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
    font-size: 13px;
    color: #222;
}

@media (max-width: 720px) {
    .filter-controls {
        gap: 8px;
    }

    .filter-block {
        width: 100%;
        justify-content: space-between;
    }

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

    .filter-label {
        min-width: 100px;
    }
}

.warehouse-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px 12px;
}

.filter-row {
    display: flex;
    gap: 21px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.warehouses-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, .45);
    z-index: 3000;
    align-items: center;
    justify-content: center;
}

.warehouses-popup {
    width: 500px;
    max-width: 95%;
    background: #fff;
    padding: 10px;
    border-radius: 6px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .2);
}

.warehouses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 5px;
    margin-top: 6px;
}

.warehouse-tile {
    padding: 10px;
    border-radius: 6px;
    text-align: center;
    cursor: pointer;
    user-select: none;
    background: #e0e0e0;
    color: #000;
    font-weight: 600;
    transition: all .15s ease;
}

.warehouse-tile.selected {
    background: #007bff;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 123, 255, .18);
    transform: translateY(-2px);
}

.warehouses-popup .controls {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 16px;
}

.warehouses-popup .close-x {
    position: absolute;
    right: 12px;
    top: 10px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: #ef5350;
    color: #fff;
    cursor: pointer;
}

.warehouse-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0;
}

.warehouse-toggle {
    background: #fff !important;
    border: none;
    cursor: pointer;
    padding: 2px;
    transition: transform 0.2s ease;
}

.warehouse-toggle .arrow {
    display: inline-block;
    transition: transform 0.2s ease;
    font-size: 14px;
    color: #333;
}

.warehouse-toggle .arrow.open {
    transform: rotate(90deg);
}

.warehouse-title {
    font-size: 22px;
    font-weight: 700;
    color: #333;
    margin: 0;
    cursor: pointer;
}

.personnel-adding-form {
    width: 100%;
    padding: 8px;
    margin-top: 5px;
}

.company-photos-block {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.company-photo-row, .company-pdf-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1px solid #e3e6eb;
    border-radius: 8px;
    padding: 8px 12px;
}

.company-name {
    font-weight: 500;
    font-size: 15px;
    color: #333;
    flex: 1;
}


.company-photo-preview {
    --thumb-size: 56px;
    --thumb-scale: 2;
    position: relative;
    width: var(--thumb-size);
    height: var(--thumb-size);
    flex: 0 0 var(--thumb-size);
    border-radius: 6px;
    overflow: visible;
}

.company-photo-thumb {
    width: var(--thumb-size);
    height: var(--thumb-size);
    object-fit: cover;
    border-radius: 6px;
    display: block;
    transition: transform .18s ease, box-shadow .18s ease, opacity .12s ease;
    cursor: default;
    box-shadow: none;
}

.company-photo-preview:hover .company-photo-thumb {
    position: absolute;
    left: 50%;
    top: -8px;
    transform: translateX(-50%) scale(var(--thumb-scale));
    transform-origin: center top;
    z-index: 40;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.company-pdf-row .company-photo-preview .company-pdf-thumb {
    padding-top: 20px;
    display: block;
    color: #34a5e4;
    font-size: 16px;
}

.company-photo-preview:hover .company-pdf-thumb {
    position: absolute;
    left: 50%;
    top: -8px;
    transform: translateX(-50%) scale(var(--thumb-scale));
    transform-origin: center top;
    z-index: 40;
    padding-right: 30px;
    padding-top: 8px;
}

.delete-photo-btn, .delete-pdf-btn {
    display: none;
    position: absolute;
    width: 28px;
    height: 28px;
    border-radius: 50% !important;
    background: #d9534f !important;
    color: #fff !important;
    border: none !important;
    font-weight: 700;
    font-size: 16px;
    line-height: 1;
    text-align: center;
    cursor: pointer;
    padding: 0;
    z-index: 60;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
    align-items: center;
    justify-content: center;
    transition: transform .12s ease, opacity .12s ease;
}


.company-photo-preview:hover .delete-photo-btn,
.company-photo-preview:hover .delete-pdf-btn {
    display: flex;
    left: 50%;
    top: calc(-8px);
    transform: translateX(calc((var(--thumb-size) * var(--thumb-scale) / 2) - 50%));
    opacity: 1;
}

.add-photo-btn, .add-pdf-btn {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    border: 1px dashed #cfd7df;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    color: #666;
}

.summary {
    padding: 15px 20px;

    margin-top: 10px;
    border-radius: 4px;
}

.summary-title {
    font-weight: 600;
    margin-bottom: 5px;
}

.summary-content {
    line-height: 1.5;
}


.summary {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    margin: 10px 0;
    background-color: #f9f9f9;
}

.summary-line {
    margin: 4px 0;
    display: flex;
    align-items: center;
}

.summary-line i {
    width: 25px;
    margin-right: 8px;
    color: #666;
}

.date-large {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.calc-number {
    background-color: #2196F3;
    color: white;
    padding: 3px 10px;
    border-radius: 5px;
    font-weight: 700;
    font-size: 1rem;
    margin-left: 10px;
    min-width: 40px;
    text-align: center;
}

.reserve-number {
    background-color: #FF9800;
    color: white;
    padding: 3px 10px;
    border-radius: 5px;
    font-weight: 700;
    font-size: 1rem;
    margin-left: 10px;
    min-width: 40px;
    text-align: center;
}

.bi-arrow-repeat {
    color: #2196F3;
}

.bi-pin {
    color: #FF9800;
}

.photo-modal-overlay, .pdf-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.photo-modal, .pdf-modal {
    background: #fff;
    padding: 16px;
    border-radius: 8px;
    width: 340px;
    max-width: calc(100% - 40px);
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.photo-modal .modal-photo-preview, .pdf-modal .modal-pdf-preview {
    width: 160px;
    height: 160px;
    margin: 0 auto 12px;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f7f7f7;
    border: 1px solid #e3e6eb;
}

.photo-modal .modal-photo-preview img,
#modalPhotoPreview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 8px;
}

.photo-modal .modal-actions, .pdf-modal .modal-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.client_times .jq-selectbox.jqselect {
    min-width: 80px;
}

.client_times .jq-selectbox__select-text {
    padding: 9px 34px 9px 16px;
}

#client_date-styler .jq-selectbox__select-text,
#client_times_h_select-styler .jq-selectbox__select-text,
#client_times_m_select-styler .jq-selectbox__select-text,
#client_deinstall_times_h_select-styler .jq-selectbox__select-text,
#client_deinstall_times_m_select-styler .jq-selectbox__select-text {
    font-size: 1em;
    padding: 11px 64px 9px 16px;
}

#client_times_h_select-styler .jq-selectbox__dropdown,
#client_deinstall_times_h_select-styler .jq-selectbox__dropdown {
    min-height: 400px;
}

#client_times_m_select-styler .jq-selectbox__dropdown,
#client_deinstall_times_m_select-styler .jq-selectbox__dropdown {
    min-height: 150px;
}

.button-with-search-and-suggestion-block .search-suggestion-block {
    z-index: 1000;
    overflow-y: auto;
}

/*
Кнопка фидбека
*/
#feedback-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.feedback-btn {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
    transition: all 0.3s ease;
    border: none;
}

.feedback-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
    background: linear-gradient(135deg, #0056b3, #004085);
}

.feedback-form {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 500px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: none;
    padding: 20px;
    border: 1px solid #dee2e6;
}

.worktime-container {
    overflow-x: auto;
    overflow-y: auto;
    max-height: 700px;
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    background: #fff;
    border: 1px solid #eaeaea;
    position: relative;
}

.worktime-table {
    border-collapse: collapse;
    width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", Roboto, sans-serif;
    font-size: 14px;
    color: #222;
    --header-height: 22px;
    --subheader-height: 14px;
}

.worktime-table thead th {
    position: sticky;
    top: 0;
    background: #f9f9fb;
    z-index: 5;
    border-bottom: 1px solid #e0e0e0;
    padding: 8px;
    text-align: center;
    font-weight: 600;
    height: var(--header-height);
    box-sizing: border-box;
}

.worktime-table thead tr.worktime-subheader th {
    position: sticky;
    top: var(--header-height);
    background: #fbfbfd;
    z-index: 4;
    font-size: 12px;
    color: #888;
    height: var(--subheader-height);
    box-sizing: border-box;
}

.fixed-col {
    position: sticky;
    left: 0;
    z-index: 3;
    background: #fff;
    text-align: left !important;
    min-width: 200px;
    max-width: 250px;
    white-space: nowrap;
    border-right: 1px solid #eaeaea;
    box-sizing: border-box;
}

.worktime-table thead th.fixed-col {
    left: 0;
    top: 0;
    z-index: 7;
}

.worktime-table thead tr.worktime-subheader th.fixed-col {
    left: 0;
    top: var(--header-height);
    z-index: 7;
}

.worktime-table tbody td.fixed-col,
.worktime-table tbody th.fixed-col {
    left: 0;
    z-index: 6;
}

.worktime-table thead th,
.worktime-table thead tr.worktime-subheader th,
.worktime-table tbody td.fixed-col {
    background-clip: padding-box;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.worktime-department {
    background: #f5f5f7;
    font-weight: 700;
    color: #111;
    border-top: 1px solid #e0e0e0;
}

.worktime-subdepartment {
    background: #fafafa;
    color: #333;
    font-weight: 600;
    font-style: italic;
}

.worktime-table td {
    padding: 6px 8px;
    border-bottom: 1px solid #f0f0f0;
    text-align: left;
    white-space: nowrap;
    box-sizing: border-box;
}

.worktime-employee td:first-child {
    padding-left: 20px;
}

.worktime-table tr:hover td {
    background: #fdfdfd;
}

.worktime-table th,
.worktime-table td {
    border-bottom: 1px solid #ddd;
    padding: 4px 6px;
    text-align: center;
}

.worktime-table th.current-day {
    background-color: #a1ebf5;
    color: #000;
}

.worktime-table td {
    white-space: nowrap;
}

.worktime-employee:hover td {
    background-color: #f9f9f9;
}

.worktime-table th,
.worktime-table td {
    border-bottom: 1px solid #ddd;
    padding: 4px 6px;
    text-align: center;
}

.employee-filter-cell {
    position: relative;
    background: #fff;
    max-width: 100px;
}

.employee-filter {
    font-size: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
    cursor: pointer;
    position: relative;
    z-index: 100;
}

.employee-filter-span .jq-selectbox {
    max-width: 200px !important;
    width: 200px;
    min-width: 200px;
}


.feedback-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #dee2e6;
}

.feedback-form .bi {
    padding: 0 5px;
}

.feedback-form .mb-3 {
    padding: 15px 0;
    /* font-size: larger; */
}

.feedback-form .form-control {
    width: 100%;
}

.feedback-form input, textarea {
    padding: 15px 0;
    height: 60px;
}

@media (max-width: 480px) {
    .feedback-form {
        width: 90vw;
        right: -10px;
    }
}


.panel {
    position: fixed;
    top: 120px;
    right: -400px;
    width: 100%;
    max-width: 400px;
    height: auto;
    max-height: 80vh;
    background-color: rgba(227, 235, 240, 1);
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
    transition: right 0.4s ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    padding: 20px;
    border-radius: 0 0 0 10px;
}

.panel.active {
    right: 0;
}

.vertical-tabs-wrapper.moved {
    right: 400px;
}


.vertical-tabs-wrapper.moved .tab-button.active .bi-caret-up-fill {
    transform: rotate(180deg);
}

@media (max-width: 480px) {
    .panel {
        max-width: 100%;
        right: -100%;
    }

    .vertical-tabs-wrapper.moved {
        right: 100%;
    }

    .tab-button {
        min-height: 100px;
        padding: 12px 8px;
        font-size: 14px;
    }
}

.panel-content {
    display: none;
    flex: 1;
}

.panel-content.active {
    display: block;
}

.panel-content h2 {
    color: #56636a;
    margin: 5px 0;
    font-size: 15px;
    border-bottom: 2px solid #4a6ee0;
    padding-bottom: 5px;
}

.panel-content p {
    text-align: left;
    color: #555;
    line-height: 1.6;
    margin-bottom: 15px;
}

.panel-content ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.panel-content li {
    margin-bottom: 8px;
    color: #555;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    color: #6c757d;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background-color: #f0f0f0;
    color: #333;
}


.table-type1 {
    border-collapse: collapse;
}

.table-type1 tr td {
    padding: 10px 0;
}


.tabs__content .table-type1 tr:hover td {
    background: #e0e0e0;
}

.tabs__content .table-type1 tr.spacer-row:hover td {
    background: white;
}

.table-type1 td:first-child, .table-type1 td:last-child {
    border-radius: unset;
}


.vertical-tabs-wrapper {
    position: fixed;
    top: 120px;
    right: 0;
    display: flex;
    z-index: 1001;
    transition: right 0.4s ease;
}

.vertical-tabs {
    display: flex;
    flex-direction: column;
}

.tab-button {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    padding: 15px 10px;
    background-color: #4a6ee0;
    color: white;
    border: none;
    cursor: pointer;
    margin-bottom: 2px;
    border-radius: 10px 0 0 10px;
    transition: all 0.3s ease;
    font-weight: 600;
    box-shadow: -3px 0 10px rgba(0, 0, 0, 0.2);
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}


.collapse-content .button-with-search-and-suggestion-block .search-suggestion-block {
    position: inherit;
}

.collapsed-summary {
    margin-left: auto;
}

.summary {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    margin: 10px 0;
    background-color: #f9f9f9;
    width: fit-content;
    height: fit-content;
}

.summary-line {
    margin: 4px 0;
    display: flex;
    align-items: center;
}

.summary-line i {
    width: 20px;
    margin-right: 8px;
    color: #666;
}

.vertical-tabs .tab-button {
    background-color: rgba(227, 235, 240, 1);
    border-right: none;
    border: #d7d7d7;
    color: #2a3d47;
    writing-mode: sideways-lr;
    z-index: 5;
    padding: 10px;
    border-radius: 10px 0 0 10px;
    box-shadow: none;
}

.vertical-tabs .tab-button:hover {
    background-color: #f4f7f9;
    color: #2a3d47;
}


/* Стили для блока логистики */
.logistics-status {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.logistics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 1px solid #f1f5f9;
}

.logistics-header:hover {
    background-color: #f8fafc;
}

.logistics-title {
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
}

.logistics-tag {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.logistics-header .toggle-icon {
    font-size: 12px;
    color: #718096;
    transition: transform 0.3s ease;
}

.logistics-header.active .toggle-icon {
    transform: rotate(180deg);
}

.choose-one-from-element-wrapper {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}

.choose-one-from-element {
    display: inline-flex;
    align-items: center;
    margin-bottom: 0;
}

.choose-one-from-element span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
}

.export-personnel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    margin-bottom: 0;
}

.choose-one-from-element-wrapper .choose-one-from-element {
    margin-right: 5px;
}

.warehouses-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 500px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.warehouses-list.collapsed {
    max-height: 0;
    opacity: 0;
    padding: 0 20px;
    transform: translateY(-10px);
    pointer-events: none;
}

.warehouse-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px;
}

.warehouse-name {
    font-size: 14px;
    color: #4a5568;
    font-weight: 500;
}

.warehouse-status {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

/* Статусы */
.status-waiting {
    background: #fed7d7;
    color: #c53030;
}

.status-processing {
    background: #feebcb;
    color: #d69e2e;
}

.status-ready {
    background: #c6f6d5;
    color: #2f855a;
}

.status-shipped {
    background: #bee3f8;
    color: #2b6cb0;
}

.status-delivered {
    background: #e9d8fd;
    color: #6b46c1;
}

.logistics-status.sticky {
    position: fixed;
    top: 540px;
    right: 0;
    margin: 0;
    width: calc(100% - 40px);
    max-width: 400px;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.sticky-placeholder {
    visibility: hidden;
}


/*
Таблица "Итоговый расчет"
*/
.payment-table {
    border: 1px solid #ddd;
    border-radius: 12px;
    background-color: #f9f9f9;
    padding: 15px;
    font-family: Arial, sans-serif;
    width: 300px;
}

.payment-table.sticky {
    position: fixed;
    top: 350px;
    z-index: 1000;
    animation: slideDown 0.3s ease;
    right: 0;
}

.payment-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3px 0;
}

.payment-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.payment-label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.payment-row .discount-circle {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.payment-label .bi {
    flex-shrink: 0;
}

.payment-value {
    font-weight: bold;
}

.table-type1 td.image-col {
    position: relative;
    width: 40px;
    padding: 5px 10px;
}

.expense-row td {
    padding: 5px 10px;
}

.discount-circle {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: inline-block;
}

.discount-positive {
    background-color: #4CAF50;
}

.discount-negative {
    background-color: #f44336;
}

.discount-neutral {
    background-color: #2196F3;
}

.positive {
    color: #4CAF50;
}

.negative {
    color: #f44336;
}

.divider {
    border-top: 1px solid #ccc;
    margin: 8px 0;
}

.panel .fact-of-payment {
    margin-top: 0;
}

.gray {
    color: #999;
}


.inventory-table-container {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    margin: 20px;
    padding: 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.inventory-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
    color: #1c1c1e;
    background-color: #fff;
}

.inventory-table thead th {
    text-align: left;
    padding: 12px 16px;
    font-weight: 600;
    color: #6e6e73;
    border-bottom: 1px solid #e5e5ea;
    background-color: #f9f9fb;
}

.inventory-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f2f2f7;
    vertical-align: middle;
}

.inventory-table tbody tr:hover {
    background-color: #f9f9fb;
    transition: background-color 0.2s ease-in-out;
}

.status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    user-select: none;
}

.status-active {
    background-color: var(--status-green);
    color: #fff;
}

.status-draft {
    background-color: #e4e4e4;
}

.status-v-rabote {
    background-color: var(--status-orange);
    color: #fff;
}

.comment-cell {
    color: #555;
    font-size: 14px;
    line-height: 1.4;
    max-width: 100px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.inv-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.inv-modal-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    max-width: 640px;
    width: 100%;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.inv-modal-title {
    margin: 0 0 12px 0;
    font-size: 18px;
    color: #111;
}

.inv-field {
    display: block;
    margin-bottom: 12px;
}

.inv-field-title {
    font-size: 13px;
    color: #6e6e73;
    margin-bottom: 6px;
}

.inv-field input[type="text"], .inv-field textarea, .inv-field select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #e5e5ea;
    font-size: 14px;
    outline: none;
}

.inv-field-value {
    padding: 10px 12px;
    background: #f8f8fb;
    border-radius: 8px;
    color: #111;
}

.inv-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 12px;
}

.btn {
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: #007aff;
    color: #fff;
}

.btn-secondary {
    background: #f2f2f7;
    color: #111;
}

.comment-cell {
    color: #555;
    font-size: 14px;
    line-height: 1.4;
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.inv-work-card {
    width: 80%;
    max-width: 1000px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.inv-work-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.inv-work-title {
    font-size: 18px;
    font-weight: bold;
    color: #222;
}

.inv-work-search {
    padding: 6px 10px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    width: 250px;
}

.inv-work-body {
    flex: 1;
    min-height: 300px;
    border: 1px dashed #ccc;
    border-radius: 8px;
    padding: 20px;
    background: #fafafa;
    overflow-y: auto;
}

.inv-work-placeholder {
    text-align: center;
    color: #888;
    margin-top: 100px;
}

.inv-offer-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;

    max-height: 300px;
    overflow-y: auto;
    padding-right: 6px;
}

.inv-offer-list::-webkit-scrollbar {
    width: 6px;
}

.inv-offer-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.inv-offer-list::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

.inv-components-list {
    margin-top: 10px;
    background: #f9f9f9;
    border-radius: 6px;
    padding: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.inv-component-item {
    padding: 4px 0;
    font-size: 13px;
    border-bottom: 1px solid #eee;
}


.inv-name-cell {
    min-width: 250px;
    max-width: 300px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: underline;
    color: #34a5e4;
}


.inv-save-bar {
    position: sticky;
    bottom: 0;
    background: #fff;
    padding: 10px 0;
    text-align: right;
    border-top: 1px solid #ddd;
}

.inv-name-cell {
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.inventory-edit-table {
    width: 100%;
    border-collapse: collapse;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
    background-color: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.inventory-edit-table th {
    text-align: left;
    background-color: #f9f9f9;
    color: #1c1c1e;
    font-weight: 600;
    padding: 14px 16px;
    border-bottom: 1px solid #e5e5ea;
    font-size: 15px;
}

.inventory-edit-table td {
    padding: 12px 16px;
    color: #1c1c1e;
    border-bottom: 1px solid #efefef;
    font-size: 15px;
}

.inventory-edit-table tr:last-child td {
    border-bottom: none;
}

.inventory-remont-edit-input,
.inventory-edit-input {
    width: 90px;
    text-align: center;
    border: 1px solid #d1d1d6;
    border-radius: 10px;
    padding: 6px 8px;
    font-size: 15px;
    background-color: #f9f9fb;
    transition: all 0.2s ease-in-out;
    appearance: textfield;
}

.inventory-remont-edit-input:focus,
.inventory-edit-input:focus {
    border-color: #007aff;
    background-color: #fff;
    box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.15);
    outline: none;
}

.inventory-remont-edit-input::-webkit-inner-spin-button,
.inventory-remont-edit-input::-webkit-outer-spin-button,
.inventory-edit-input::-webkit-inner-spin-button,
.inventory-edit-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.inventory-edit-empty {
    text-align: center;
    color: #8e8e93;
    padding: 18px;
    font-size: 15px;
}

.inventory-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 6px 10px;
}

.inventory-filter input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
    cursor: pointer;
}

@media (max-width: 1000px) {
    .inventory-table-container {
        margin: 4px;
        padding: 5px;
        border-radius: 6px;
        width: 100%;
        max-width: 100vw;
        box-shadow: 0 3px 8px rgba(0, 0, 0, 0.04);
        font-size: 13px;
    }

    .inventory-controls {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
        padding: 12px 16px !important;
    }

    #btn-add-inventory {
        width: 20% !important;
        font-size: 14px !important;
        padding: 10px 0 !important;
        border-radius: 8px !important;
        text-align: center !important;
    }

    .inventory-filter {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 10px !important;
        width: 20% !important;
        position: relative !important;
        z-index: 20;
        padding: 8px 0;
    }

    .inventory-filter label {
        font-size: 14px !important;
        font-weight: 500;
        flex-shrink: 0;
    }

    .inventory-filter svg {
        width: 26px;
        height: 26px;
        cursor: pointer;
        flex-shrink: 0;
    }

    #status-form {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 8px !important;
        width: 20% !important;
        position: relative !important;
        z-index: 10;
        padding: 8px 0;
    }

    #status-form select {
        flex: 1;
        font-size: 14px !important;
        padding: 8px 10px !important;
        border-radius: 6px !important;
    }

    #status-form button {
        padding: 8px 12px !important;
        border-radius: 6px !important;
        font-size: 13px !important;
        white-space: nowrap;
    }

    .inventory-table {
        font-size: 11px;
        color: #111;
    }


    .inventory-filter,
    #status-form {
        position: relative !important;
        overflow: visible !important;
        z-index: 1000 !important;
    }

    .ui-datepicker,
    .flatpickr-calendar,
    select {
        position: absolute !important;
        z-index: 9999 !important;
        overflow: visible !important;
    }

    .ui-menu,
    .dropdown-menu {
        z-index: 9999 !important;
    }

    .inventory-table thead th,
    .inventory-table td {
        padding: 6px 8px;
    }

    .inventory-table thead th:nth-child(3),
    .inventory-table thead th:nth-child(6),
    .inventory-table thead th:nth-child(4),
    .inventory-table tbody td:nth-child(3),
    .inventory-table tbody td:nth-child(6),
    .inventory-table tbody td:nth-child(4) {
        display: none;
    }

    .inv-name-cell {
        min-width: 60px;
        max-width: 80px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        cursor: pointer;
        text-decoration: underline;
        color: #34a5e4;
    }

    .comment-cell {
        max-width: 80px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 13px;
    }

    .status {
        padding: 3px 8px;
        font-size: 12px;
        border-radius: 8px;
    }

    .inv-action-buttons {
        gap: 2px;
        display: flex;
        justify-content: center;
        align-items: center;
        flex-wrap: nowrap;
    }

    .inv-action-buttons .inv-start-btn,
    .inv-action-buttons .inv-expand-btn {
        padding: 3px 4px;
        font-size: 10px;
        border-radius: 6px;
        white-space: nowrap;
    }

    .inv-modal-card,
    .inv-work-card {
        max-width: 360px;
        width: calc(100% - 24px);
        padding: 12px;
        border-radius: 10px;
    }

    .inv-modal-title {
        font-size: 16px;
    }

    .inv-work-title {
        font-size: 16px;
    }

    .inv-work-search {
        width: 140px;
        padding: 6px 8px;
        font-size: 13px;
        margin-left: 8px;
    }

    .inv-work-body {
        min-height: 180px;
        padding: 10px;
        border-radius: 8px;
    }


    .inv-offer-list {
        max-height: 180px;
    }

    .inv-modal-actions {
        gap: 8px;
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .inv-modal-actions .btn {
        padding: 8px 10px;
        font-size: 14px;
    }

    .inv-save-bar {
        padding: 8px;
        font-size: 13px;
    }

    .title-section h1 {
        font-size: 16px;
        line-height: 1.2;
    }


    .inv-modal-card[role="dialog"] {
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    }

    .inv-action-buttons button {
        min-width: 0;
    }
}

@media (max-width: 1000px) {

    .inventory-edit-all {
        width: 100%;
        max-width: 100vw !important;
        box-sizing: border-box;
        text-align: left !important;
    }

    .title-section h2 {
        font-size: clamp(14px, 4vw, 18px);
        text-align: center;
        margin: 0 auto 10px;
        line-height: 1.3;
    }

    .inventory-edit-table {
        width: 100%;
        font-size: clamp(12px, 3.5vw, 14px);
        border-radius: 8px;
        border-collapse: collapse;
        box-shadow: none;
    }

    .inventory-edit-table th,
    .inventory-edit-table td {
        padding: clamp(6px, 2vw, 10px);
        word-break: break-word;
        text-align: left;
    }

    .inventory-edit-table th:nth-child(2),
    .inventory-edit-table td:nth-child(2) {
        text-align: center;
        width: 25%;
    }

    .inventory-edit-input {
        width: 100%;
        max-width: 80px;
        font-size: clamp(12px, 3vw, 14px);
        padding: 6px;
        border-radius: 8px;
        box-sizing: border-box;
    }

}

.inv-multi-box {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    background: #f7f7f7;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #ddd;
}

.inv-tag {
    padding: 6px 10px;
    border-radius: 6px;
    background: #ffffff;
    border: 1px solid #aaa;
    cursor: pointer;
    user-select: none;
    font-size: 13px;
}

.inv-tag.active {
    background: #007bff;
    color: #fff;
    border-color: #007bff;
}

.sample-work-body {
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    padding: 0;
}

.inv-results-scroll {
    max-height: 300px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 5px;
}

.inv-bottom-btn {
    border-top: 1px solid #eee;
    padding: 8px 10px;
    background: #fafafa;
    text-align: right;
    position: sticky;
    bottom: 0;
}

.inv-component-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.inv-component-item:hover {
    background: #f4f9ff;
}

.inv-component-item input[type="checkbox"] {
    transform: scale(1.2);
}

.inv-editor-popup {
    position: absolute;
    background: white;
    border: 1px solid #ccc;
    padding: 8px;
    border-radius: 6px;
    z-index: 9999;
    width: 275px;
    max-height: 275px;
    overflow: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.inv-editor-popup .inv-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.inv-editor-popup .inv-tag {
    flex: 1 0 calc(33.333% - 4px);
    box-sizing: border-box;
    text-align: center;
    padding: 6px 0;
    background: #eee;
    border-radius: 4px;
    cursor: pointer;
}

.inv-editor-popup .inv-tag.active {
    background: #007bff;
    color: #fff;
}

.inv-editor-popup button {
    margin-top: 8px;
    width: 100%;
}

.inv-edit-months, .inv-edit-days {
    cursor: pointer;
}


.orders_pickup {
    padding-top: 15px;
    color: #87949c;
}

.orders_pickup input {
    width: auto !important;
    height: auto !important;
    border: 0;
    margin-left: 10px;
}

.change_address_close {
    display: block;
    text-align: right;
    margin-bottom: 20px;
}

.change_address_close svg path {
    fill: #87949c;
}

#gps_coords {
    font-size: 10px;
}

.positioned-modal-block {
    z-index: 99999 !important;
}


.template_item_autosearch {
    display: flex;
    gap: 20px;
    align-items: center;
    width: 100%;
    padding: 10px 20px;
    cursor: pointer;
}

.template_item_autosearch:hover {
    background: #eee;
}

.template_item_autosearch .icon {
    width: 64px;
    height: 64px;
    border-radius: 32px;
}

.template_item_autosearch .icon img {
    width: 100%;
    border-radius: 32px;
}

.template_item_autosearch .title {
    font-size: 20px;
}

#templates_id-styler .jq-selectbox__dropdown {
    min-height: 300px;
}


/*
Переключатель
*/

.toggle-switch {
    position: relative;
    display: inline-block;
}

.toggle-title {
    font-size: 14px;
    color: #87949c;
    white-space: nowrap;
    line-height: 25px;
}

.toggle-checkbox {
    display: none;
}

.toggle-label {
    display: flex;
    align-items: center;
    background: #e0e0e0;
    border-radius: 20px;
    padding: 2px;
    cursor: pointer;
    position: relative;
    transition: background 0.3s;
    min-width: 120px;
    height: 25px;
}


.time-mode-toggle-wrapper .toggle-text {
    font-size: 12px;
    color: #000;
    display: inline-block;
    font-weight: 500;
    width: 60px;
    text-align: center;
}

.toggle-label::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 50%;
    height: calc(100% - 4px);
    background: rgba(52, 165, 228, 0.6);
    border-radius: 18px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s;
}

.toggle-checkbox:checked + .toggle-label::before {
    transform: translateX(100%);
}

/*
Контейнер диапазона времени
*/
.date-time-block.date-time-block-add .range-input-wrapper {
    width: 200px;
}

.time-range-container {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 0;
}

.time-range-container .jq-selectbox.jqselect {
    min-width: 80px;
}

.time-range-container .jq-selectbox__select-text,
#client_times_h_select-styler .jq-selectbox__select-text,
#client_times_m_select-styler .jq-selectbox__select-text,
#client_deinstall_times_h_select-styler .jq-selectbox__select-text,
#client_deinstall_times_m_select-styler .jq-selectbox__select-text {
    padding: 10px 34px 10px 16px;
    font-size: 1em;
    height: 40px;
    line-height: 20px;
    box-sizing: border-box;
}

.time-range-container .jq-selectbox,
.client_times .jq-selectbox {
    min-width: 80px;
    height: 40px;
}

.time-select-group {
    display: flex;
    flex-direction: row;
    gap: 5px;
}

.time-range-selectors {
    display: flex;
    align-items: center;
    gap: 5px;
}

.separator {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-top: 15px;
    display: contents;
}

.selected-range {
    margin-top: 10px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    text-align: center;
    font-weight: bold;
    border: 1px solid #e9ecef;
}

.validation-error {
    color: #dc3545;
    font-size: 12px;
}

.error-highlight .jq-selectbox {
    border: 1px solid #dc3545 !important;
    background-color: rgba(255, 0, 0, 0.1) !important;
}

@media (max-width: 768px) {
    .time-range-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .separator {
        margin-top: 0;
        align-self: center;
    }
}

/*
Флаг в логистике "Натирка посуды"
*/
.dishwashing-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
    margin-left: auto;
    border: 1px solid;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1;
    color: #fff;
    margin-right: 8px;
    min-width: 60px;
}

.dishwashing-needed {
    color: var(--status-red);
}

.dishwashing-not-needed {
    color: var(--status-green);
}

.dishwashing-none {
    display: none;
    color: var(--muted);
}

.dishwashing-unknown {
    color: var(--muted);
}

.dishwashing-text {
    white-space: nowrap;
}

/* Стиль загоолвка натирки */
td:has(.title_part) .custom_name_title {
    text-align: center;
}

/* Стили для переключателя натирки */
.dishwashing-toggle {
    display: flex;
    justify-content: center;
    margin-top: 5px;
}

.dishwashing-toggle .toggle-switch {
    width: 100%;
}

.dishwashing-toggle .toggle-label {
    background: #e0e0e0;
    border-radius: 20px;
    padding: 2px;
    cursor: pointer;
    position: relative;
    transition: background 0.3s;
    min-width: 120px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dishwashing-toggle .toggle-text {
    font-size: 12px;
    color: #000;
    font-weight: 500;
    width: 50%;
    text-align: center;
    z-index: 1;
    position: relative;
}

.dishwashing-toggle .toggle-label::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: calc(50% - 2px);
    height: calc(100% - 4px);
    background: var(--status-green);
    border-radius: 18px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s, background 0.3s;
}

.dishwashing-toggle .toggle-checkbox:checked + .toggle-label::before {
    transform: translateX(100%);
    background: var(--status-red);
}


.routes_calendar{
    z-index: 99;
    right: 50px;
    border-radius: 4px;
    border: 1px solid rgba(86,99,106,.4);
    padding: 2px;
}
.route_hour{
    padding: 3px;
    border-radius: 4px;
    margin: 0 1px;
    min-width: 20px;
    text-align: center;
    font-size: 16px;
}
.route_hour_base{background: #b1ffb6; color: #444;}
.route_hour_green{background: #23a318; color: #fff; cursor: pointer;}
.route_hour_yellow{background: #ffc107; color: #444; cursor: pointer;}
.route_hour_red{background: #bf1b1b; color: #fff; cursor: pointer;}

.routes_calendar_dropdown{
    z-index: 100;
    right: 50px;
    top: 37px;
    border-radius: 4px;
    border: 1px solid rgba(86,99,106,.4);
    background-color: rgba(227, 235, 240, 1);
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.3);
    padding: 20px;
    width: 600px;
    display: none;
}

.routes_calendar_dropdown_header_color{
    border-radius: 4px;
    margin-right: 5px;
    width: 20px;
    display: inline-block;
}
.routes_calendar_dropdown_header_color_green{background: #23a318;}
.routes_calendar_dropdown_header_color_yellow{background: #ffc107;}
.routes_calendar_dropdown_header_color_red{background: #bf1b1b;}

.routes_calendar_dropdown_header{
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 15px;
}

.routes_calendar_dropdown_operations{
    font-size: 18px;
    padding-bottom: 8px;
    margin-bottom: 8px;
    border-bottom: 1px solid #999;
}
.routes_calendar_dropdown_lines{
    gap: 10px;
    flex-direction: column;
}

.routes_calendar_dropdown_order_line_driver{
    font-size: 16px;
}

.routes_calendar_dropdown_order_line_driver_more{
    color: #34a5e4;
    margin-left: 20px;
}

.routes_calendar_dropdown_order_line{font-style: italic; padding-left: 30px;}
.routes_calendar_dropdown_order_line a{font-style: normal; color: #34a5e4}


/* Стили для переключателя тендера */
.tender-toggle {
    display: flex;
    color: #87949c;
    align-items: center;
    gap: 15px;
}

.tender-toggle .toggle-switch {
    width: 100%;
}

.tender-toggle .toggle-label {
    background: #e0e0e0;
    border-radius: 20px;
    padding: 2px;
    cursor: pointer;
    position: relative;
    transition: background 0.3s;
    min-width: 120px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0;
}

.tender-toggle .toggle-text {
    font-size: 12px;
    color: #000;
    font-weight: 500;
    width: 50%;
    text-align: center;
    z-index: 1;
    position: relative;
}

.tender-toggle .toggle-label::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: calc(50% - 2px);
    height: calc(100% - 4px);
    background: var(--status-red);
    border-radius: 18px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s, background 0.3s;
}

.tender-toggle .toggle-checkbox:checked + .toggle-label::before {
    transform: translateX(100%);
    background: var(--status-green);
}

.switch-block {
    padding-top: 15px;
    display: flex;
    gap: 20px;
}

/* Стили для переключателя самовывоза */
.pickup-toggle {
    display: flex;
    color: #87949c;
    align-items: center;
    gap: 15px;
}

.pickup-toggle .toggle-switch {
    width: 100%;
}

.pickup-toggle .toggle-label {
    background: #e0e0e0;
    border-radius: 20px;
    padding: 2px;
    cursor: pointer;
    position: relative;
    transition: background 0.3s;
    min-width: 120px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0;
}

.pickup-toggle .toggle-text {
    font-size: 12px;
    color: #000;
    font-weight: 500;
    width: 50%;
    text-align: center;
    z-index: 1;
    position: relative;
}

.pickup-toggle .toggle-label::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: calc(50% - 2px);
    height: calc(100% - 4px);
    background: var(--status-red);
    border-radius: 18px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s, background 0.3s;
}

.pickup-toggle .toggle-checkbox:checked + .toggle-label::before {
    transform: translateX(100%);
    background: var(--status-green);
}

.switch-block {
    padding-top: 15px;
    display: flex;
    gap: 20px;
}