.search-mobile {
    display: none;
}

/* Заголовки страницы напоминаний /bills/notification/index — пропорциональное уменьшение на узких экранах */
.bill-index h1.notification-index-title {
    font-size: clamp(1.1rem, 5vw, 2rem);
}
.bill-index h3.notification-index-title {
    font-size: clamp(1rem, 4vw, 1.4rem);
}

.d-flex{
    display: flex;
}

.wrap {
    flex-wrap: wrap;
}

.wrap .btn {
    margin-left: 0!important;
}

.gap-5 {
    gap: 5px;
}

.gap-10 {
    gap: 10px;
}

.gap-20 {
    gap: 20px;
}

.gap-30 {
    gap: 30px;
}
.input-group .help-block{
    display: none!important;
}
/* ========== /bills/bill/index ========== */
/* На больших экранах (≥768px) строка фильтров в шапке грида отображается как обычно. */

@media (min-width: 768px) {
    .bill-index .bill-index-mobile-filter {
        display: none !important;
    }

    .bill-index .bill-mobile-detail,
    .bill-index .bill-col-more,
    .bill-index .bill-mobile-more-row,
    .bill-index .bill-mobile-actions-row,
    .bill-index .bill-mobile-solution-row,
    .bill-index .big-grid-container .kv-grid-table thead th.bill-col-more,
    .bill-index .big-grid-container .kv-grid-table tbody td.bill-col-more {
        display: none !important;
    }

    .product-index .product-mobile-actions-row,
    .product-index .product-mobile-more-row,
    .product-index .product-mobile-detail,
    .product-index .product-grid-table thead th.product-col-more,
    .product-index .product-grid-table tbody td.product-col-more {
        display: none !important;
    }

    .contractor-index .contractor-mobile-detail,
    .contractor-index .contractor-mobile-more-row,
    .contractor-index .contractor-mobile-actions-row,
    .contractor-index .contractor-col-more,
    .contractor-index .contractor-grid-container .contractor-grid-table thead th.contractor-col-more,
    .contractor-index .contractor-grid-container .contractor-grid-table tbody td.contractor-col-more {
        display: none !important;
    }

    .provider-index .provider-mobile-detail,
    .provider-index .provider-mobile-more-row,
    .provider-index .provider-mobile-actions-row {
        display: none !important;
    }

    /* /bills/requisites/index — desktop: скрываем mobile-строки и колонку «Подробнее» */
    .requisites-index .requisites-mobile-detail,
    .requisites-index .requisites-mobile-more-row,
    .requisites-index .requisites-mobile-actions-row,
    .requisites-index .requisites-col-more {
        display: none !important;
    }

    /* /bills/provider/view — адаптив таблица «Контактные лица» */
    .provider-view-contacts-index .provider-contacts-mobile-detail,
    .provider-view-contacts-index .provider-contact-col-more,
    .provider-view-contacts-index .provider-contacts-mobile-more-row,
    .provider-view-contacts-index .provider-contacts-mobile-actions-row {
        display: none !important;
    }

    /* /bills/config/index — desktop: скрываем mobile-строки и колонку «Подробнее» */
    .config-index .config-mobile-detail,
    .config-index .config-col-more,
    .config-index .config-mobile-more-row,
    .config-index .config-mobile-actions-row {
        display: none !important;
    }

    /* /bills/setting/index — desktop: скрываем mobile-строки и колонку «Подробнее» */
    .setting-index .setting-mobile-detail,
    .setting-index .setting-col-more,
    .setting-index .setting-mobile-more-row,
    .setting-index .setting-mobile-actions-row {
        display: none !important;
    }

    /* /bills/product-units/index — desktop: скрываем mobile-строки и колонку «Подробнее» */
    .product-units-index .product-units-mobile-detail,
    .product-units-index .product-units-col-more,
    .product-units-index .product-units-mobile-more-row,
    .product-units-index .product-units-mobile-actions-row {
        display: none !important;
    }

    /* /bills/delivery/index — desktop: скрываем mobile-строки и колонку «Подробнее» */
    .delivery-index .delivery-mobile-detail,
    .delivery-index .delivery-col-more,
    .delivery-index .delivery-mobile-more-row,
    .delivery-index .delivery-mobile-actions-row {
        display: none !important;
    }

    /* /bills/bill-status/index — desktop: скрываем mobile-строки и колонку «Подробнее» */
    .bill-status-index .bill-status-mobile-detail,
    .bill-status-index .bill-status-col-more,
    .bill-status-index .bill-status-mobile-more-row,
    .bill-status-index .bill-status-mobile-actions-row {
        display: none !important;
    }

    /* /tasks/task/index — desktop: скрываем mobile-строки и колонку «Подробнее» */
    .task-index .task-mobile-detail,
    .task-index .task-col-more,
    .task-index .task-mobile-more-row,
    .task-index .task-mobile-actions-row {
        display: none !important;
    }

    /* /employees/employee/index — desktop: скрываем mobile-строки и колонку «Подробнее» */
    .employee-index .employee-mobile-detail,
    .employee-index .employee-col-more,
    .employee-index .employee-mobile-more-row,
    .employee-index .employee-mobile-actions-row {
        display: none !important;
    }

    /* /bills/mail-template/index — desktop: скрываем mobile-строки и колонку «Подробнее» */
    .mail-template-index .mail-template-mobile-detail,
    .mail-template-index .mail-template-col-more,
    .mail-template-index .mail-template-mobile-more-row,
    .mail-template-index .mail-template-mobile-actions-row {
        display: none !important;
    }

    /* /bills/delivery-mail-template/index — desktop: скрываем mobile-строки и колонку «Подробнее» */
    .delivery-mail-template-index .delivery-mail-template-mobile-detail,
    .delivery-mail-template-index .delivery-mail-template-col-more,
    .delivery-mail-template-index .delivery-mail-template-mobile-more-row,
    .delivery-mail-template-index .delivery-mail-template-mobile-actions-row {
        display: none !important;
    }

    /* /bills/notification-rules/index — desktop: mobile-строки и «Подробнее» (вторая таблица) */
    .notification-rules-index .nf-po-mobile-actions-row,
    .notification-rules-index .nf-rule-mobile-detail,
    .notification-rules-index .nf-rule-col-more,
    .notification-rules-index .nf-rule-mobile-more-row,
    .notification-rules-index .nf-rule-mobile-actions-row {
        display: none !important;
    }

    /* /bills/mail-notification-rule/index — desktop: скрываем mobile-строки и колонку «Подробнее» */
    .mail-notification-rule-index .mnr-mobile-detail,
    .mail-notification-rule-index .mnr-col-more,
    .mail-notification-rule-index .mnr-mobile-more-row,
    .mail-notification-rule-index .mnr-mobile-actions-row {
        display: none !important;
    }

    /* /bills/delete-reasons/index — desktop: скрываем mobile-строки и колонку «Подробнее» */
    .delete-reasons-index .dr-mobile-detail,
    .delete-reasons-index .dr-col-more,
    .delete-reasons-index .dr-mobile-more-row,
    .delete-reasons-index .dr-mobile-actions-row {
        display: none !important;
    }

    /* /bills/bill-files/index — desktop: скрываем mobile-строки и колонку «Подробнее» */
    .bill-files-index .bff-mobile-detail,
    .bill-files-index .bff-col-more,
    .bill-files-index .bff-mobile-more-row,
    .bill-files-index .bff-mobile-actions-row {
        display: none !important;
    }

    /* /bills/contractor-files/index — desktop: скрываем mobile-строки и колонку «Подробнее» */
    .contractor-files-index .cff-mobile-detail,
    .contractor-files-index .cff-col-more,
    .contractor-files-index .cff-mobile-more-row,
    .contractor-files-index .cff-mobile-actions-row {
        display: none !important;
    }

    /* /pricelists/currency/index — desktop: скрываем mobile-строки и колонку «Подробнее» */
    .pricelist-currency-index .plc-mobile-detail,
    .pricelist-currency-index .plc-col-more,
    .pricelist-currency-index .plc-mobile-more-row,
    .pricelist-currency-index .plc-mobile-actions-row {
        display: none !important;
    }

    /* /admin/user/index — desktop: скрываем mobile-строки и колонку «Подробнее» */
    .user-index .user-mobile-detail,
    .user-index .user-col-more,
    .user-index .user-mobile-more-row,
    .user-index .user-mobile-actions-row {
        display: none !important;
    }

    /* /bills/site/index — desktop: скрываем mobile-строку действий */
    .site-index .site-mobile-actions-row {
        display: none !important;
    }
}

@media (max-width: 767px) {
    .mt-5 {
        margin-top: 5px;
    }

    .navbar-collapse.collapse.in {
        display: flex !important;
        flex-direction: column !important;
    }

    ul.navbar-nav.nav {
        margin-left: 0 !important;
    }

    .search-mobile {
        display: block;
        margin-bottom: 10px;
    }

    .search-mobile form {
        display: flex;
        gap: 10px;
    }

    .search-mobile .control-label,
    .search-mobile .help-block,
    .bill-index .text-right,
    .bill-index .widescreen-search-btn,
    .bills-control-panel-right .personal-settings-btn {
        display: none;
    }

    .search-mobile .control-label,
    .search-mobile .field-billsearch-search {
        margin: 0;
    }

    .bill-index .bills-control-panel, .bill-index .pay-all-form {
        display: flex;
        gap: 10px;
    }

    .bill-index .bills-control-panel {
        justify-content: space-between;
    }

    .bill-index .bill-action-buttons {
        display: flex;
        flex-direction: column;
    }

    .bill-index .big-grid-container .kv-grid-table tbody td.bill-col-actions {
        vertical-align: top!important;
    }

    /* Убрать горизонтальную прокрутку в мобильном виде */
    .container:has(.bill-index) {
        overflow-x: hidden;
        max-width: 100%;
    }
    .bill-index {
        overflow-x: hidden;
        max-width: 100%;
    }
    /* Контейнер грида: переопределить overflow-x: visible из index.php (#w1-container) */
    .bill-index [id$="-container"],
    .bill-index #w1-container,
    .bill-index .big-grid-container,
    .bill-index .big-grid-container .kv-grid-panel,
    .bill-index .big-grid-container .kv-grid-container,
    .bill-index .big-grid-container .table-responsive {
        overflow-x: hidden !important;
        max-width: 100%;
        box-sizing: border-box;
    }
    /* Таблица не должна растягивать контейнер по ширине */
    .bill-index .big-grid-container .kv-grid-table,
    .bill-index .big-grid-container .table-responsive .kv-grid-table {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box;
    }

    /* Строка фильтров в шапке — скрыть на малых экранах (максимальная специфичность) */
    body .bill-index .big-grid-container thead tr.filters,
    body .bill-index .big-grid-container thead tr.skip-export,
    body .bill-index .big-grid-container thead tr:nth-child(2),
    body .bill-index .big-grid-container .floatThead-wrapper thead tr.filters,
    body .bill-index .big-grid-container .floatThead-wrapper thead tr.skip-export,
    body .bill-index .big-grid-container .floatThead-wrapper thead tr:nth-child(2),
    body .bill-index .big-grid-container .kv-grid-panel thead tr.filters,
    body .bill-index .big-grid-container .kv-grid-panel thead tr:nth-child(2),
    body .bill-index .big-grid-container .kv-grid-table thead tr.filters,
    body .bill-index .big-grid-container .kv-grid-table thead tr:nth-child(2) {
        display: none !important;
    }

    /* Скрыть блок мобильного фильтра на десктопе уже выше; здесь показываем кнопку и форму */
    .bill-index .bill-index-mobile-filter {
        margin-bottom: 15px;
    }

    .bill-index .bill-index-mobile-filter-fields {
        margin-top: 10px;
        padding: 12px;
        border: 1px solid #ddd;
        border-radius: 4px;
        background: #f9f9f9;
    }

    .bill-index .bill-index-mobile-filter-form .form-group {
        display: block;
        margin-bottom: 12px;
    }

    .bill-index .bill-index-mobile-filter-form .control-label {
        display: block;
        margin-bottom: 4px;
    }

    .bill-index .bill-index-mobile-filter-form .form-control {
        width: 100%;
    }

    .bill-index .bill-index-mobile-filter-form .btn-primary {
        margin-top: 8px;
    }

    /* Кнопка «Подробнее» перенесена под строку через JS — скрываем пустую ячейку в строке данных */
    .bill-index .big-grid-container .kv-grid-table tbody tr:not(.bill-mobile-detail):not(.bill-mobile-more-row) td.bill-col-more {
        display: none !important;
    }

    /* Строка с кнопкой «Подробнее» под каждой строкой — отступы слева и справа */
    .bill-index .big-grid-container .kv-grid-table .bill-mobile-more-row td {
        padding: 8px 12px;
        border-top: none;
        background: #f9f9f9;
        border-bottom: 1px solid #ddd;
        box-sizing: border-box;
    }

    .bill-index .big-grid-container .kv-grid-table .bill-more-btn-wrap {
        width: 100%;
        display: block;
    }
    .bill-index .big-grid-container .kv-grid-table .bill-mobile-more-row .js-bill-row-more {
        display: block;
        width: 100%;
        box-sizing: border-box;
        font-size: 12px;
    }

    /* Строка с действиями над «Подробнее»: во всю ширину, иконки в один горизонтальный ряд */
    .bill-index .big-grid-container .kv-grid-table .bill-mobile-actions-row td {
        padding: 6px 12px;
        border-top: none;
        background: #f5f5f5;
        border-bottom: 1px solid #eee;
        box-sizing: border-box;
        vertical-align: middle;
    }
    .bill-index .big-grid-container .kv-grid-table .bill-mobile-actions-wrap {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-start;
        gap: 4px 12px;
    }
    .bill-index .big-grid-container .kv-grid-table .bill-mobile-actions-wrap a,
    .bill-index .big-grid-container .kv-grid-table .bill-mobile-actions-wrap input[type="checkbox"] {
        display: inline-block;
        padding: 4px 6px;
    }

    /* Унификация внешнего вида action-кнопок в mobile-строках (как на /bills/bill/index) */
    .product-mobile-actions-wrap a,
    .contractor-mobile-actions-wrap a,
    .provider-mobile-actions-wrap a,
    .provider-contacts-mobile-actions-wrap a,
    .config-mobile-actions-wrap a,
    .setting-mobile-actions-wrap a,
    .product-units-mobile-actions-wrap a,
    .delivery-mobile-actions-wrap a,
    .bill-status-mobile-actions-wrap a,
    .user-mobile-actions-wrap a,
    .requisites-mobile-actions-wrap a,
    .task-mobile-actions-wrap a,
    .site-action-buttons a,
    .nf-po-mobile-actions-wrap a,
    .nf-rule-mobile-actions-wrap a,
    .mnr-mobile-actions-wrap a,
    .dr-mobile-actions-wrap a,
    .bff-mobile-actions-wrap a,
    .cff-mobile-actions-wrap a,
    .plc-mobile-actions-wrap a {
        display: inline-block !important;
        padding: 4px 6px !important;
        margin: 0 !important;
    }

    .product-mobile-actions-wrap input[type="checkbox"],
    .contractor-mobile-actions-wrap input[type="checkbox"],
    .provider-mobile-actions-wrap input[type="checkbox"],
    .provider-contacts-mobile-actions-wrap input[type="checkbox"],
    .config-mobile-actions-wrap input[type="checkbox"],
    .setting-mobile-actions-wrap input[type="checkbox"],
    .product-units-mobile-actions-wrap input[type="checkbox"],
    .delivery-mobile-actions-wrap input[type="checkbox"],
    .bill-status-mobile-actions-wrap input[type="checkbox"],
    .user-mobile-actions-wrap input[type="checkbox"],
    .requisites-mobile-actions-wrap input[type="checkbox"],
    .task-mobile-actions-wrap input[type="checkbox"],
    .nf-po-mobile-actions-wrap input[type="checkbox"],
    .nf-rule-mobile-actions-wrap input[type="checkbox"],
    .mnr-mobile-actions-wrap input[type="checkbox"],
    .dr-mobile-actions-wrap input[type="checkbox"],
    .bff-mobile-actions-wrap input[type="checkbox"],
    .cff-mobile-actions-wrap input[type="checkbox"],
    .plc-mobile-actions-wrap input[type="checkbox"] {
        padding: 4px 6px !important;
        margin: 0 !important;
    }

    /* Точная унификация размеров/отступов иконок внутри контейнеров *-action-buttons */
    [class$='-action-buttons'] {
        font-size: 0;
    }

    [class$='-action-buttons'] a {
        display: inline-block;
        padding: 0 !important;
        margin: 0 !important;
        font-size: 12px !important;
        line-height: 17px !important;
    }

    /* Строка «Решение проблемы» (кнопка «Решена») — над действиями и «Подробнее» на странице напоминаний */
    .bill-index .big-grid-container .kv-grid-table .bill-mobile-solution-row td {
        padding: 6px 12px;
        border-top: none;
        background: #e8f5e9;
        border-bottom: 1px solid #c8e6c9;
        box-sizing: border-box;
        vertical-align: middle;
    }
    .bill-index .big-grid-container .kv-grid-table .bill-mobile-solution-wrap {
        display: block;
    }
    .bill-index .big-grid-container .kv-grid-table .bill-mobile-solution-wrap .btn {
        width: 100%;
        box-sizing: border-box;
    }

    /* Колонка «Решение проблемы» в таблице скрыта на мобильном — контент вынесен в .bill-mobile-solution-row */
    .bill-index .big-grid-container .kv-grid-table thead th.bill-col-notification-solution,
    .bill-index .big-grid-container .kv-grid-table tbody tr:not(.bill-mobile-solution-row) td.bill-col-notification-solution,
    .bill-index .big-grid-container .table-responsive .kv-grid-table thead th.bill-col-notification-solution,
    .bill-index .big-grid-container .table-responsive .kv-grid-table tbody tr:not(.bill-mobile-solution-row) td.bill-col-notification-solution {
        display: none !important;
        width: 0 !important;
        min-width: 0 !important;
        max-width: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        border: none !important;
    }

    /* В шапке колонку «Подробнее» не показываем — кнопка под строкой */
    .bill-index .big-grid-container .kv-grid-table thead tr:first-child th.bill-col-more {
        display: none !important;
    }

    /* Скрыть все колонки грида, кроме: Счет, Сумма счета, Наименование, Организация, Стадия, Поставщик, Действия */
    .bill-index .big-grid-container .kv-grid-table .bill-col-user,
    .bill-index .big-grid-container .kv-grid-table .bill-col-site,
    .bill-index .big-grid-container .kv-grid-table .bill-col-payment,
    .bill-index .big-grid-container .kv-grid-table .bill-col-delivery-address,
    .bill-index .big-grid-container .kv-grid-table .bill-col-delivery-datetime,
    .bill-index .big-grid-container .kv-grid-table .bill-col-delivery-cost,
    .bill-index .big-grid-container .kv-grid-table .bill-col-delivery,
    .bill-index .big-grid-container .kv-grid-table .bill-col-status-comment,
    .bill-index .big-grid-container .kv-grid-table .bill-col-ready,
    .bill-index .big-grid-container .kv-grid-table .bill-col-pp-number,
    .bill-index .big-grid-container .kv-grid-table .bill-col-pp-date,
    .bill-index .big-grid-container .kv-grid-table .bill-col-provider-payment-number,
    .bill-index .big-grid-container .kv-grid-table .bill-col-provider-payment-amount,
    .bill-index .big-grid-container .kv-grid-table .bill-col-provider-payment-date,
    .bill-index .big-grid-container .kv-grid-table .bill-col-profit,
    .bill-index .big-grid-container .kv-grid-table .bill-col-comment {
        display: none !important;
    }

    /* Явно показываем колонку «Действия» в адаптиве (на случай скрытия через .kv-grid-hide или другие правила) */
    .bill-index .big-grid-container .kv-grid-table thead th.bill-col-actions,
    .bill-index .big-grid-container .kv-grid-table tbody td.bill-col-actions,
    .bill-index .big-grid-container .table-responsive .kv-grid-table thead th.bill-col-actions,
    .bill-index .big-grid-container .table-responsive .kv-grid-table tbody td.bill-col-actions,
    .bill-index #w1-container .kv-grid-table thead th.bill-col-actions,
    .bill-index #w1-container .kv-grid-table tbody td.bill-col-actions,
    .bill-index .kv-grid-table thead th.bill-col-actions.kv-grid-hide,
    .bill-index .kv-grid-table tbody td.bill-col-actions.kv-grid-hide {
        display: table-cell !important;
    }
    .bill-index .big-grid-container .floatThead-wrapper .kv-grid-table thead th.bill-col-actions,
    .bill-index #w1-container .floatThead-wrapper .kv-grid-table thead th.bill-col-actions {
        display: table-cell !important;
    }
    /* На мобильном действия вынесены в отдельную строку — скрываем колонку в таблице (включая клон шапки floatThead) */
    .bill-index .big-grid-container .kv-grid-table thead th.bill-col-actions,
    .bill-index .big-grid-container .kv-grid-table tbody tr:not(.bill-mobile-actions-row) td.bill-col-actions,
    .bill-index .big-grid-container .table-responsive .kv-grid-table thead th.bill-col-actions,
    .bill-index .big-grid-container .table-responsive .kv-grid-table tbody tr:not(.bill-mobile-actions-row) td.bill-col-actions,
    .bill-index #w1-container .kv-grid-table thead th.bill-col-actions,
    .bill-index #w1-container .kv-grid-table tbody tr:not(.bill-mobile-actions-row) td.bill-col-actions,
    .bill-index .big-grid-container .floatThead-wrapper .kv-grid-table thead th.bill-col-actions,
    .bill-index #w1-container .floatThead-wrapper .kv-grid-table thead th.bill-col-actions {
        display: none !important;
        width: 0 !important;
        min-width: 0 !important;
        max-width: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        border: none !important;
    }
    .bill-index .big-grid-container .table-responsive,
    .bill-index .big-grid-container .kv-grid-panel .table-responsive {
        max-width: 100%;
        overflow-x: hidden;
    }

    .bill-index .big-grid-container .kv-grid-table {
        table-layout: fixed;
        width: 100%;
        max-width: 100%;
    }

    /* Доли ширины видимых колонок (в сумме 100%); шапка без «Подробнее» */
    .bill-index .big-grid-container .kv-grid-table thead tr:first-child th.bill-col-number,
    .bill-index .big-grid-container .kv-grid-table tbody td.bill-col-number { width: 12%; }

    .bill-index .big-grid-container .kv-grid-table thead tr:first-child th.bill-col-amount,
    .bill-index .big-grid-container .kv-grid-table tbody td.bill-col-amount { width: 10%; }

    .bill-index .big-grid-container .kv-grid-table thead tr:first-child th.bill-col-product,
    .bill-index .big-grid-container .kv-grid-table tbody td.bill-col-product { width: 22%; }

    .bill-index .big-grid-container .kv-grid-table thead tr:first-child th.bill-col-contractor,
    .bill-index .big-grid-container .kv-grid-table tbody td.bill-col-contractor { width: 17%; }

    .bill-index .big-grid-container .kv-grid-table thead tr:first-child th.bill-col-status,
    .bill-index .big-grid-container .kv-grid-table tbody td.bill-col-status { width: 12%; }

    .bill-index .big-grid-container .kv-grid-table thead tr:first-child th.bill-col-provider,
    .bill-index .big-grid-container .kv-grid-table tbody td.bill-col-provider { width: 15%; }

    .bill-index .big-grid-container .kv-grid-table thead tr:first-child th.bill-col-actions,
    .bill-index .big-grid-container .kv-grid-table tbody td.bill-col-actions { width: 12%; min-width: 0; }

    /* Шапка: перенос по словам, при невозможности — overflow (обрезка) */
    .bill-index .big-grid-container .kv-grid-table thead tr:first-child th.bill-col-number,
    .bill-index .big-grid-container .kv-grid-table thead tr:first-child th.bill-col-amount,
    .bill-index .big-grid-container .kv-grid-table thead tr:first-child th.bill-col-product,
    .bill-index .big-grid-container .kv-grid-table thead tr:first-child th.bill-col-contractor,
    .bill-index .big-grid-container .kv-grid-table thead tr:first-child th.bill-col-status,
    .bill-index .big-grid-container .kv-grid-table thead tr:first-child th.bill-col-provider,
    .bill-index .big-grid-container .kv-grid-table thead tr:first-child th.bill-col-actions {
        overflow: hidden;
        white-space: normal;
        word-break: normal;
        overflow-wrap: break-word;
        word-wrap: break-word;
        max-width: 0;
    }

    /* Перенос по словам; длинные слова — перенос/обрезка, без выхода за границы */
    .bill-index .big-grid-container .kv-grid-table tbody td.bill-col-number,
    .bill-index .big-grid-container .kv-grid-table tbody td.bill-col-amount,
    .bill-index .big-grid-container .kv-grid-table tbody td.bill-col-product,
    .bill-index .big-grid-container .kv-grid-table tbody td.bill-col-contractor,
    .bill-index .big-grid-container .kv-grid-table tbody td.bill-col-status,
    .bill-index .big-grid-container .kv-grid-table tbody td.bill-col-provider {
        overflow: hidden;
        white-space: normal;
        word-break: normal;
        overflow-wrap: break-word;
        word-wrap: break-word;
        max-width: 0;
    }

    /* Колонка действий — иконки в одну строку, компактно */
    .bill-index .big-grid-container .kv-grid-table tbody td.bill-col-actions {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: clip;
        vertical-align: middle;
        padding-left: 4px;
        padding-right: 4px;
    }
    .bill-index .big-grid-container .kv-grid-table tbody td.bill-col-actions a {
        display: inline-block;
        padding: 2px 4px;
        margin: 0 1px;
    }

    /* Раскрытый блок деталей — на всю ширину (ширина задаётся в JS при вставке) */
    .bill-index .big-grid-container .kv-grid-table .bill-mobile-detail {
        display: block;
    }
    .bill-index .big-grid-container .kv-grid-table .bill-mobile-detail td {
        display: block;
        width: 100% !important;
        min-width: 100%;
        max-width: 100%;
        padding: 12px;
        background: #f5f5f5;
        border-top: none;
        border-bottom: 2px solid #ddd;
        vertical-align: top;
        box-sizing: border-box;
    }

    .bill-index .bill-mobile-detail-blocks {
        display: flex;
        flex-wrap: wrap;
        gap: 12px 20px;
        width: 100%;
        min-width: 100%;
        box-sizing: border-box;
    }

    .bill-index .bill-mobile-detail-block {
        min-width: 140px;
        flex: 1 1 180px;
        max-width: 100%;
    }

    .bill-index .bill-mobile-detail-block-title {
        font-weight: bold;
        font-size: 11px;
        color: #666;
        margin-bottom: 4px;
    }

    .bill-index .bill-mobile-detail-block-value {
        font-size: 13px;
    }

    /* ========== /bills/product/index — адаптив таблицы по аналогии с /bills/ ========== */
    .product-index {
        overflow-x: hidden;
        max-width: 100%;
    }
    .product-index .product-grid-container,
    .product-index .grid-view,
    .product-index .grid-view .table-responsive,
    .product-index .product-grid-table {
        overflow-x: hidden !important;
        max-width: 100%;
    }
    .product-index .grid-view thead tr.filters,
    .product-index .grid-view thead tr:nth-child(2) {
        display: none !important;
    }
    .product-index .product-grid-table thead th.product-col-serial,
    .product-index .product-grid-table tbody td.product-col-serial,
    .product-index .product-grid-table thead th.product-col-id,
    .product-index .product-grid-table tbody td.product-col-id,
    .product-index .product-grid-table thead th.product-col-unit,
    .product-index .product-grid-table tbody td.product-col-unit {
        display: none !important;
    }
    .product-index .product-grid-table thead th.product-col-actions,
    .product-index .product-grid-table tbody tr:not(.product-mobile-actions-row) td.product-col-actions,
    .product-index .product-grid-table thead th.product-col-more,
    .product-index .product-grid-table tbody tr:not(.product-mobile-more-row) td.product-col-more {
        display: none !important;
        width: 0 !important;
        min-width: 0 !important;
        max-width: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        border: none !important;
    }
    .product-index .product-grid-table {
        table-layout: fixed;
        width: 100%;
        max-width: 100%;
    }
    .product-index .product-grid-table thead tr:first-child th.product-col-name,
    .product-index .product-grid-table tbody td.product-col-name { width: 40%; }
    .product-index .product-grid-table thead tr:first-child th.product-col-code,
    .product-index .product-grid-table tbody td.product-col-code { width: 25%; }
    .product-index .product-grid-table thead tr:first-child th.product-col-price,
    .product-index .product-grid-table tbody td.product-col-price { width: 35%; }
    .product-index .product-grid-table thead tr:first-child th.product-col-name,
    .product-index .product-grid-table thead tr:first-child th.product-col-code,
    .product-index .product-grid-table thead tr:first-child th.product-col-price {
        overflow: hidden;
        white-space: normal;
        word-break: break-word;
        overflow-wrap: break-word;
    }
    .product-index .product-grid-table tbody td.product-col-name,
    .product-index .product-grid-table tbody td.product-col-code,
    .product-index .product-grid-table tbody td.product-col-price {
        overflow: hidden;
        white-space: normal;
        word-break: break-word;
    }
    .product-index .product-grid-table .product-mobile-actions-row td {
        padding: 6px 12px;
        border-top: none;
        background: #f5f5f5;
        border-bottom: 1px solid #eee;
        box-sizing: border-box;
        vertical-align: middle;
    }
    .product-index .product-grid-table .product-mobile-actions-wrap {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-start;
        gap: 4px 12px;
    }
    .product-index .product-grid-table .product-mobile-actions-wrap a {
        display: inline-block;
        padding: 4px 8px;
    }
    .product-index .product-grid-table .product-mobile-more-row td {
        padding: 8px 12px;
        border-top: none;
        background: #fff;
        border-bottom: 1px solid #eee;
        box-sizing: border-box;
    }
    .product-index .product-grid-table .product-more-btn-wrap {
        width: 100%;
        display: block;
    }
    .product-index .product-grid-table .product-mobile-more-row .js-product-row-more {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }
    .product-index .product-grid-table .product-mobile-detail {
        display: table-row;
    }
    .product-index .product-grid-table .product-mobile-detail td {
        display: block;
        width: 100% !important;
        min-width: 100%;
        max-width: 100%;
        padding: 12px;
        background: #f5f5f5;
        border-top: none;
        border-bottom: 2px solid #ddd;
        box-sizing: border-box;
    }
    .product-index .product-mobile-detail-blocks {
        display: flex;
        flex-wrap: wrap;
        gap: 12px 20px;
    }
    .product-index .product-mobile-detail-block-title {
        font-weight: bold;
        font-size: 11px;
        color: #666;
        margin-bottom: 4px;
    }
    .product-index .product-mobile-detail-block-value {
        font-size: 13px;
    }

    /* /bills/product/index-stock — на мобильном оставляем видимыми только Наименование и Количество */
    .product-index.product-stock-index .product-grid-table thead th.product-col-code,
    .product-index.product-stock-index .product-grid-table tbody td.product-col-code {
        display: none !important;
        width: 0 !important;
        min-width: 0 !important;
        max-width: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        border: none !important;
    }

    /* Перераспределяем доли ширины под оставшиеся колонки */
    .product-index.product-stock-index .product-grid-table thead tr:first-child th.product-col-name,
    .product-index.product-stock-index .product-grid-table tbody td.product-col-name { width: 60%; }

    .product-index.product-stock-index .product-grid-table thead tr:first-child th.product-col-price,
    .product-index.product-stock-index .product-grid-table tbody td.product-col-price { width: 40%; }

    /* ========== /bills/contractor/index — адаптив таблицы по аналогии с /bills/ ========== */
    .contractor-index {
        overflow-x: hidden;
        max-width: 100%;
    }
    .contractor-index .contractor-grid-container,
    .contractor-index .grid-view,
    .contractor-index .grid-view .table-responsive,
    .contractor-index .contractor-grid-table {
        overflow-x: hidden !important;
        max-width: 100%;
    }
    .contractor-index .grid-view thead tr.filters,
    .contractor-index .grid-view thead tr:nth-child(2) {
        display: none !important;
    }

    .contractor-index .contractor-grid-table {
        table-layout: fixed;
        width: 100%;
        max-width: 100%;
    }

    .contractor-index .contractor-grid-table thead tr:first-child th.contractor-col-organization,
    .contractor-index .contractor-grid-table tbody td.contractor-col-organization { width: 60%; }
    .contractor-index .contractor-grid-table thead tr:first-child th.contractor-col-name,
    .contractor-index .contractor-grid-table tbody td.contractor-col-name { width: 40%; }

    /* На мобильном скрываем все колонки кроме «Компания» и «Контактное лицо» */
    .contractor-index .contractor-grid-table thead th.contractor-col-phone,
    .contractor-index .contractor-grid-table tbody td.contractor-col-phone,
    .contractor-index .contractor-grid-table thead th.contractor-col-mobile-phone,
    .contractor-index .contractor-grid-table tbody td.contractor-col-mobile-phone,
    .contractor-index .contractor-grid-table thead th.contractor-col-email,
    .contractor-index .contractor-grid-table tbody td.contractor-col-email,
    .contractor-index .contractor-grid-table thead th.contractor-col-address,
    .contractor-index .contractor-grid-table tbody td.contractor-col-address,
    .contractor-index .contractor-grid-table thead th.contractor-col-inn,
    .contractor-index .contractor-grid-table tbody td.contractor-col-inn,
    .contractor-index .contractor-grid-table thead th.contractor-col-kpp,
    .contractor-index .contractor-grid-table tbody td.contractor-col-kpp {
        display: none !important;
    }

    /* «Подробнее» и «Действия» — вынесены в отдельные строки через JS */
    .contractor-index .contractor-grid-table thead th.contractor-col-actions,
    .contractor-index .contractor-grid-table tbody tr:not(.contractor-mobile-actions-row) td.contractor-col-actions,
    .contractor-index .contractor-grid-table thead th.contractor-col-more,
    .contractor-index .contractor-grid-table tbody tr:not(.contractor-mobile-more-row) td.contractor-col-more {
        display: none !important;
        width: 0 !important;
        min-width: 0 !important;
        max-width: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        border: none !important;
    }

    /* Перенос по словам для «Компания» */
    .contractor-index .contractor-grid-table thead th.contractor-col-organization,
    .contractor-index .contractor-grid-table tbody td.contractor-col-organization {
        overflow-wrap: break-word;
        word-break: break-word;
        white-space: normal;
    }

    /* Строка с действиями над «Подробнее» */
    .contractor-index .contractor-grid-container .contractor-grid-table .contractor-mobile-actions-row td {
        padding: 6px 12px;
        border-top: none;
        background: #f5f5f5;
        border-bottom: 1px solid #eee;
        box-sizing: border-box;
        vertical-align: middle;
    }
    .contractor-index .contractor-grid-container .contractor-grid-table .contractor-mobile-actions-wrap {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-start;
        gap: 4px 12px;
    }
    .contractor-index .contractor-grid-container .contractor-grid-table .contractor-mobile-actions-wrap a,
    .contractor-index .contractor-grid-container .contractor-grid-table .contractor-mobile-actions-wrap input[type="checkbox"] {
        display: inline-block;
        padding: 4px 6px;
    }

    /* Строка «Подробнее» */
    .contractor-index .contractor-grid-container .contractor-grid-table .contractor-mobile-more-row td {
        padding: 8px 12px;
        border-top: none;
        background: #fff;
        border-bottom: 1px solid #eee;
        box-sizing: border-box;
    }
    .contractor-index .contractor-grid-container .contractor-grid-table .contractor-more-btn-wrap {
        width: 100%;
        display: block;
    }
    .contractor-index .contractor-grid-container .contractor-grid-table .contractor-mobile-more-row .js-contractor-row-more {
        display: block;
        width: 100%;
        box-sizing: border-box;
        font-size: 12px;
    }

    /* Раскрытый блок деталей */
    .contractor-index .contractor-grid-container .contractor-grid-table .contractor-mobile-detail {
        display: block;
    }
    .contractor-index .contractor-grid-container .contractor-grid-table .contractor-mobile-detail td {
        display: block;
        width: 100% !important;
        min-width: 100%;
        max-width: 100%;
        padding: 12px;
        background: #f5f5f5;
        border-top: none;
        border-bottom: 2px solid #ddd;
        vertical-align: top;
        box-sizing: border-box;
    }
    .contractor-index .contractor-mobile-detail-blocks {
        display: flex;
        flex-wrap: wrap;
        gap: 12px 20px;
        width: 100%;
        min-width: 100%;
        box-sizing: border-box;
    }
    .contractor-index .contractor-mobile-detail-block {
        min-width: 140px;
        flex: 1 1 180px;
        max-width: 100%;
    }
    .contractor-index .contractor-mobile-detail-block-title {
        font-weight: bold;
        font-size: 11px;
        color: #666;
        margin-bottom: 4px;
    }
    .contractor-index .contractor-mobile-detail-block-value {
        font-size: 13px;
    }

    /* ========== /bills/provider/index — адаптив таблицы по аналогии с /bills/ ========== */
    .provider-index {
        overflow-x: hidden;
        max-width: 100%;
    }
    .provider-index .provider-grid-container,
    .provider-index .grid-view,
    .provider-index .grid-view .table-responsive,
    .provider-index .provider-grid-table {
        overflow-x: hidden !important;
        max-width: 100%;
    }

    .provider-index .grid-view thead tr.filters,
    .provider-index .grid-view thead tr:nth-child(2) {
        display: none !important;
    }

    .provider-index .provider-grid-table {
        table-layout: fixed;
        width: 100%;
        max-width: 100%;
    }

    /* Видимые колонки на мобилке: Название + Адрес склада */
    .provider-index .provider-grid-table thead th.provider-col-name,
    .provider-index .provider-grid-table tbody td.provider-col-name { width: 50%; }

    .provider-index .provider-grid-table thead th.provider-col-stock-address,
    .provider-index .provider-grid-table tbody td.provider-col-stock-address { width: 50%; }

    .provider-index .provider-grid-table thead th.provider-col-name,
    .provider-index .provider-grid-table tbody td.provider-col-name {
        overflow-wrap: break-word;
        word-break: break-word;
        white-space: normal;
    }

    /* Скрываем остальные колонки (всё, что не Название/Адрес склада) */
    .provider-index .provider-grid-table thead th.provider-col-contact-name,
    .provider-index .provider-grid-table tbody td.provider-col-contact-name,
    .provider-index .provider-grid-table thead th.provider-col-serial,
    .provider-index .provider-grid-table tbody td.provider-col-serial,
    .provider-index .provider-grid-table thead th.provider-col-breaf-name,
    .provider-index .provider-grid-table tbody td.provider-col-breaf-name,
    .provider-index .provider-grid-table thead th.provider-col-stock-time,
    .provider-index .provider-grid-table tbody td.provider-col-stock-time,
    .provider-index .provider-grid-table thead th.provider-col-office-address,
    .provider-index .provider-grid-table tbody td.provider-col-office-address,
    .provider-index .provider-grid-table thead th.provider-col-office-time,
    .provider-index .provider-grid-table tbody td.provider-col-office-time,
    .provider-index .provider-grid-table thead th.provider-col-site,
    .provider-index .provider-grid-table tbody td.provider-col-site,
    .provider-index .provider-grid-table thead th.provider-col-login,
    .provider-index .provider-grid-table tbody td.provider-col-login,
    .provider-index .provider-grid-table thead th.provider-col-password,
    .provider-index .provider-grid-table tbody td.provider-col-password,
    .provider-index .provider-grid-table thead th.provider-col-min-order,
    .provider-index .provider-grid-table tbody td.provider-col-min-order {
        display: none !important;
    }

    /* «Подробнее» и колонка действий вынесены в отдельные строки через JS */
    .provider-index .provider-grid-table thead th.provider-col-actions,
    .provider-index .provider-grid-table tbody tr:not(.provider-mobile-actions-row) td.provider-col-actions,
    .provider-index .provider-grid-table thead th.provider-col-more,
    .provider-index .provider-grid-table tbody tr:not(.provider-mobile-more-row) td.provider-col-more {
        display: none !important;
        width: 0 !important;
        min-width: 0 !important;
        max-width: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        border: none !important;
    }

    /* Строка с действиями над «Подробнее» */
    .provider-index .provider-grid-container .provider-grid-table .provider-mobile-actions-row td {
        padding: 6px 12px;
        border-top: none;
        background: #f5f5f5;
        border-bottom: 1px solid #eee;
        box-sizing: border-box;
        vertical-align: middle;
    }
    .provider-index .provider-grid-container .provider-grid-table .provider-mobile-actions-wrap {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-start;
        gap: 4px 12px;
    }
    .provider-index .provider-grid-container .provider-grid-table .provider-mobile-actions-wrap a,
    .provider-index .provider-grid-container .provider-grid-table .provider-mobile-actions-wrap input[type="checkbox"] {
        display: inline-block;
        padding: 4px 6px;
    }

    /* Строка «Подробнее» */
    .provider-index .provider-grid-container .provider-grid-table .provider-mobile-more-row td {
        padding: 8px 12px;
        border-top: none;
        background: #fff;
        border-bottom: 1px solid #eee;
        box-sizing: border-box;
    }
    .provider-index .provider-grid-container .provider-grid-table .provider-more-btn-wrap {
        width: 100%;
        display: block;
    }
    .provider-index .provider-grid-container .provider-grid-table .provider-mobile-more-row .js-provider-row-more {
        display: block;
        width: 100%;
        box-sizing: border-box;
        font-size: 12px;
    }

    /* Раскрытый блок деталей */
    .provider-index .provider-grid-container .provider-grid-table .provider-mobile-detail {
        display: block;
    }
    .provider-index .provider-grid-container .provider-grid-table .provider-mobile-detail td {
        display: block;
        width: 100% !important;
        min-width: 100%;
        max-width: 100%;
        padding: 12px;
        background: #f5f5f5;
        border-top: none;
        border-bottom: 2px solid #ddd;
        vertical-align: top;
        box-sizing: border-box;
    }
    .provider-index .provider-mobile-detail-blocks {
        display: flex;
        flex-wrap: wrap;
        gap: 12px 20px;
        width: 100%;
        min-width: 100%;
        box-sizing: border-box;
    }
    .provider-index .provider-mobile-detail-block {
        min-width: 140px;
        flex: 1 1 180px;
        max-width: 100%;
    }
    .provider-index .provider-mobile-detail-block-title {
        font-weight: bold;
        font-size: 11px;
        color: #666;
        margin-bottom: 4px;
    }
    .provider-index .provider-mobile-detail-block-value {
        font-size: 13px;
    }

    /* ========== /bills/provider/view — «Контактные лица» ========== */
    .provider-view-contacts-index .provider-contacts-grid-table {
        table-layout: fixed;
        width: 100%;
        max-width: 100%;
    }

    /* Видимая часть на мобилке: ФИО + Должность */
    .provider-view-contacts-index .provider-contacts-grid-table thead th.provider-contact-col-name,
    .provider-view-contacts-index .provider-contacts-grid-table tbody td.provider-contact-col-name { width: 50%; }

    .provider-view-contacts-index .provider-contacts-grid-table thead th.provider-contact-col-position,
    .provider-view-contacts-index .provider-contacts-grid-table tbody td.provider-contact-col-position { width: 50%; }

    /* Перенос по словам для «ФИО», чтобы длинные значения не ломали адаптив */
    .provider-view-contacts-index .provider-contacts-grid-table thead th.provider-contact-col-name,
    .provider-view-contacts-index .provider-contacts-grid-table tbody td.provider-contact-col-name {
        overflow-wrap: break-word;
        word-break: break-word;
        white-space: normal;
    }

    /* Скрываем лишние колонки в основном ряду */
    .provider-view-contacts-index .provider-contacts-grid-table thead th.provider-contact-col-serial,
    .provider-view-contacts-index .provider-contacts-grid-table tbody td.provider-contact-col-serial,
    .provider-view-contacts-index .provider-contacts-grid-table thead th.provider-contact-col-phone,
    .provider-view-contacts-index .provider-contacts-grid-table tbody td.provider-contact-col-phone,
    .provider-view-contacts-index .provider-contacts-grid-table thead th.provider-contact-col-mobile-phone,
    .provider-view-contacts-index .provider-contacts-grid-table tbody td.provider-contact-col-mobile-phone,
    .provider-view-contacts-index .provider-contacts-grid-table thead th.provider-contact-col-email,
    .provider-view-contacts-index .provider-contacts-grid-table tbody td.provider-contact-col-email,
    .provider-view-contacts-index .provider-contacts-grid-table thead th.provider-contact-col-icq,
    .provider-view-contacts-index .provider-contacts-grid-table tbody td.provider-contact-col-icq,
    .provider-view-contacts-index .provider-contacts-grid-table thead th.provider-contact-col-skype,
    .provider-view-contacts-index .provider-contacts-grid-table tbody td.provider-contact-col-skype {
        display: none !important;
    }

    /* «Подробнее» и колонка действий вынесены в mobile-строки — скрываем ячейки в основном ряду */
    .provider-view-contacts-index .provider-contacts-grid-table thead th.provider-contact-col-actions,
    .provider-view-contacts-index .provider-contacts-grid-table tbody tr:not(.provider-contacts-mobile-actions-row) td.provider-contact-col-actions,
    .provider-view-contacts-index .provider-contacts-grid-table thead th.provider-contact-col-more,
    .provider-view-contacts-index .provider-contacts-grid-table tbody tr:not(.provider-contacts-mobile-more-row) td.provider-contact-col-more {
        display: none !important;
        width: 0 !important;
        min-width: 0 !important;
        max-width: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        border: none !important;
    }

    /* Строка с действиями над «Подробнее» */
    .provider-view-contacts-index .provider-contacts-grid-table .provider-contacts-mobile-actions-row td {
        padding: 6px 12px;
        border-top: none;
        background: #f5f5f5;
        border-bottom: 1px solid #eee;
        box-sizing: border-box;
        vertical-align: middle;
    }
    .provider-view-contacts-index .provider-contacts-grid-table .provider-contacts-mobile-actions-wrap {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-start;
        gap: 4px 12px;
    }
    .provider-view-contacts-index .provider-contacts-grid-table .provider-contacts-mobile-actions-wrap a {
        display: inline-block;
        padding: 2px 4px;
        margin: 0 1px;
    }

    /* Строка «Подробнее» */
    .provider-view-contacts-index .provider-contacts-grid-table .provider-contacts-mobile-more-row td {
        padding: 8px 12px;
        border-top: none;
        background: #fff;
        border-bottom: 1px solid #eee;
        box-sizing: border-box;
    }
    .provider-view-contacts-index .provider-contacts-grid-table .provider-contacts-mobile-more-row .js-provider-contact-row-more {
        display: block;
        width: 100% !important;
        box-sizing: border-box;
        font-size: 12px;
    }

    /* Раскрытый блок деталей */
    .provider-view-contacts-index .provider-contacts-grid-table .provider-contacts-mobile-detail {
        display: block;
    }
    .provider-view-contacts-index .provider-contacts-grid-table .provider-contacts-mobile-detail td {
        display: block;
        width: 100% !important;
        min-width: 100%;
        max-width: 100%;
        padding: 12px;
        background: #f5f5f5;
        border-top: none;
        border-bottom: 2px solid #ddd;
        vertical-align: top;
        box-sizing: border-box;
    }
    .provider-view-contacts-index .provider-contacts-mobile-detail-blocks {
        display: flex;
        flex-wrap: wrap;
        gap: 12px 20px;
        width: 100%;
        min-width: 100%;
        box-sizing: border-box;
    }
    .provider-view-contacts-index .provider-contacts-mobile-detail-block {
        min-width: 140px;
        flex: 1 1 180px;
        max-width: 100%;
    }
    .provider-view-contacts-index .provider-contacts-mobile-detail-block-title {
        font-weight: bold;
        font-size: 11px;
        color: #666;
        margin-bottom: 4px;
    }
    .provider-view-contacts-index .provider-contacts-mobile-detail-block-value {
        font-size: 13px;
    }

    /* ========== /bills/config/index — адаптив таблицы (Имя + Значение) ========== */
    .config-index {
        overflow-x: hidden;
        max-width: 100%;
    }
    .config-index .config-grid-container,
    .config-index .grid-view,
    .config-index .grid-view .table-responsive,
    .config-index .config-grid-table {
        overflow-x: hidden !important;
        max-width: 100%;
    }
    .config-index .grid-view thead tr.filters,
    .config-index .grid-view thead tr:nth-child(2) {
        display: none !important;
    }

    .config-index .config-grid-table {
        table-layout: fixed;
        width: 100%;
        max-width: 100%;
    }

    /* Видимые колонки на мобилке: Имя + Значение */
    .config-index .config-grid-table thead th.config-col-name,
    .config-index .config-grid-table tbody td.config-col-name { width: 50%; }
    .config-index .config-grid-table thead th.config-col-value,
    .config-index .config-grid-table tbody td.config-col-value { width: 50%; }

    /* Перенос по словам, чтобы не ломать адаптив */
    .config-index .config-grid-table thead th.config-col-name,
    .config-index .config-grid-table tbody td.config-col-name,
    .config-index .config-grid-table thead th.config-col-value,
    .config-index .config-grid-table tbody td.config-col-value {
        overflow-wrap: break-word;
        word-break: break-word;
        white-space: normal;
    }

    /* Скрываем остальные колонки в основном ряду */
    .config-index .config-grid-table thead th.config-col-serial,
    .config-index .config-grid-table tbody td.config-col-serial,
    .config-index .config-grid-table thead th.config-col-id,
    .config-index .config-grid-table tbody td.config-col-id,
    .config-index .config-grid-table thead th.config-col-slug,
    .config-index .config-grid-table tbody td.config-col-slug,
    .config-index .config-grid-table thead th.config-col-actions,
    .config-index .config-grid-table thead th.config-col-more,
    .config-index .config-grid-table tbody tr:not(.config-mobile-actions-row) td.config-col-actions,
    .config-index .config-grid-table tbody tr:not(.config-mobile-more-row) td.config-col-more {
        display: none !important;
    }

    /* Действия над «Подробнее» (выносятся JS) */
    .config-index .config-grid-container .config-grid-table .config-mobile-actions-row td {
        padding: 6px 12px;
        border-top: none;
        background: #f5f5f5;
        border-bottom: 1px solid #eee;
        box-sizing: border-box;
        vertical-align: middle;
    }
    .config-index .config-grid-container .config-grid-table .config-mobile-actions-wrap {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-start;
        gap: 4px 12px;
    }
    .config-index .config-grid-container .config-grid-table .config-mobile-actions-wrap a {
        display: inline-block;
        padding: 2px 4px;
        margin: 0 1px;
    }

    /* Строка «Подробнее» */
    .config-index .config-grid-container .config-grid-table .config-mobile-more-row td {
        padding: 8px 12px;
        border-top: none;
        background: #fff;
        border-bottom: 1px solid #eee;
        box-sizing: border-box;
    }
    .config-index .config-grid-container .config-grid-table .config-more-btn-wrap {
        width: 100%;
        display: block;
    }
    .config-index .config-grid-container .config-grid-table .config-mobile-more-row .js-config-row-more {
        display: block;
        width: 100% !important;
        box-sizing: border-box;
        font-size: 12px;
    }

    /* Раскрытый блок деталей */
    .config-index .config-grid-container .config-grid-table .config-mobile-detail {
        display: block;
    }
    .config-index .config-grid-container .config-grid-table .config-mobile-detail td {
        display: block;
        width: 100% !important;
        min-width: 100%;
        max-width: 100%;
        padding: 12px;
        background: #f5f5f5;
        border-top: none;
        border-bottom: 2px solid #ddd;
        vertical-align: top;
        box-sizing: border-box;
    }
    .config-index .config-mobile-detail-blocks {
        display: flex;
        flex-wrap: wrap;
        gap: 12px 20px;
        width: 100%;
        min-width: 100%;
        box-sizing: border-box;
    }
    .config-index .config-mobile-detail-block {
        min-width: 140px;
        flex: 1 1 180px;
        max-width: 100%;
    }
    .config-index .config-mobile-detail-block-title {
        font-weight: bold;
        font-size: 11px;
        color: #666;
        margin-bottom: 4px;
    }
    .config-index .config-mobile-detail-block-value {
        font-size: 13px;
    }

    /* ========== /bills/setting/index — адаптив таблицы (Имя + Значение) ========== */
    .setting-index {
        overflow-x: hidden;
        max-width: 100%;
    }
    .setting-index .setting-grid-container,
    .setting-index .grid-view,
    .setting-index .grid-view .table-responsive,
    .setting-index .setting-grid-table {
        overflow-x: hidden !important;
        max-width: 100%;
    }
    .setting-index .grid-view thead tr.filters,
    .setting-index .grid-view thead tr:nth-child(2) {
        display: none !important;
    }

    .setting-index .setting-grid-table {
        table-layout: fixed;
        width: 100%;
        max-width: 100%;
    }

    /* Видимые колонки на мобилке: Имя + Значение */
    .setting-index .setting-grid-table thead th.setting-col-name,
    .setting-index .setting-grid-table tbody td.setting-col-name { width: 50%; }
    .setting-index .setting-grid-table thead th.setting-col-value,
    .setting-index .setting-grid-table tbody td.setting-col-value { width: 50%; }

    /* Перенос по словам для «Имя» */
    .setting-index .setting-grid-table thead th.setting-col-name,
    .setting-index .setting-grid-table tbody td.setting-col-name,
    .setting-index .setting-grid-table thead th.setting-col-value,
    .setting-index .setting-grid-table tbody td.setting-col-value {
        overflow-wrap: break-word;
        word-break: break-word;
        white-space: normal;
    }

    /* Скрываем id и индекс, показываем только Имя и Значение */
    .setting-index .setting-grid-table thead th.setting-col-serial,
    .setting-index .setting-grid-table tbody td.setting-col-serial,
    .setting-index .setting-grid-table thead th.setting-col-id,
    .setting-index .setting-grid-table tbody td.setting-col-id,
    .setting-index .setting-grid-table thead th.setting-col-slug,
    .setting-index .setting-grid-table tbody td.setting-col-slug,
    .setting-index .setting-grid-table thead th.setting-col-actions,
    .setting-index .setting-grid-table thead th.setting-col-more,
    .setting-index .setting-grid-table tbody tr:not(.setting-mobile-actions-row) td.setting-col-actions,
    .setting-index .setting-grid-table tbody tr:not(.setting-mobile-more-row) td.setting-col-more {
        display: none !important;
        width: 0 !important;
        min-width: 0 !important;
        max-width: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        border: none !important;
    }

    /* Строка с действиями над «Подробнее» */
    .setting-index .setting-grid-container .setting-grid-table .setting-mobile-actions-row td {
        padding: 6px 12px;
        border-top: none;
        background: #f5f5f5;
        border-bottom: 1px solid #eee;
        box-sizing: border-box;
        vertical-align: middle;
    }
    .setting-index .setting-grid-container .setting-grid-table .setting-mobile-actions-wrap {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-start;
        gap: 4px 12px;
    }
    .setting-index .setting-grid-container .setting-grid-table .setting-mobile-actions-wrap a {
        display: inline-block;
        padding: 2px 4px;
        margin: 0 1px;
    }

    /* Строка «Подробнее» */
    .setting-index .setting-grid-container .setting-grid-table .setting-mobile-more-row td {
        padding: 8px 12px;
        border-top: none;
        background: #fff;
        border-bottom: 1px solid #eee;
        box-sizing: border-box;
    }
    .setting-index .setting-grid-container .setting-grid-table .setting-more-btn-wrap {
        width: 100%;
        display: block;
    }
    .setting-index .setting-grid-container .setting-grid-table .setting-mobile-more-row .js-setting-row-more {
        display: block;
        width: 100% !important;
        box-sizing: border-box;
        font-size: 12px;
    }

    /* Раскрытый блок деталей */
    .setting-index .setting-grid-container .setting-grid-table .setting-mobile-detail {
        display: block;
    }
    .setting-index .setting-grid-container .setting-grid-table .setting-mobile-detail td {
        display: block;
        width: 100% !important;
        min-width: 100%;
        max-width: 100%;
        padding: 12px;
        background: #f5f5f5;
        border-top: none;
        border-bottom: 2px solid #ddd;
        vertical-align: top;
        box-sizing: border-box;
    }
    .setting-index .setting-mobile-detail-blocks {
        display: flex;
        flex-wrap: wrap;
        gap: 12px 20px;
        width: 100%;
        min-width: 100%;
        box-sizing: border-box;
    }
    .setting-index .setting-mobile-detail-block {
        min-width: 140px;
        flex: 1 1 180px;
        max-width: 100%;
    }
    .setting-index .setting-mobile-detail-block-title {
        font-weight: bold;
        font-size: 11px;
        color: #666;
        margin-bottom: 4px;
    }
    .setting-index .setting-mobile-detail-block-value {
        font-size: 13px;
    }

    /* ========== /bills/product-units/index — адаптив таблицы (Название + Код) ========== */
    .product-units-index {
        overflow-x: hidden;
        max-width: 100%;
    }

    .product-units-index .product-units-grid-container,
    .product-units-index .grid-view,
    .product-units-index .grid-view .table-responsive,
    .product-units-index .product-units-grid-table {
        overflow-x: hidden !important;
        max-width: 100%;
    }

    .product-units-index .grid-view thead tr.filters,
    .product-units-index .grid-view thead tr:nth-child(2) {
        display: none !important;
    }

    .product-units-index .product-units-grid-table {
        table-layout: fixed;
        width: 100%;
        max-width: 100%;
    }

    /* Видимые колонки на мобилке: Название + Код */
    .product-units-index .product-units-grid-table thead th.product-units-col-name,
    .product-units-index .product-units-grid-table tbody td.product-units-col-name { width: 50%; }

    .product-units-index .product-units-grid-table thead th.product-units-col-code,
    .product-units-index .product-units-grid-table tbody td.product-units-col-code { width: 50%; }

    /* Перенос по словам для «Название» и «Код» */
    .product-units-index .product-units-grid-table thead th.product-units-col-name,
    .product-units-index .product-units-grid-table tbody td.product-units-col-name,
    .product-units-index .product-units-grid-table thead th.product-units-col-code,
    .product-units-index .product-units-grid-table tbody td.product-units-col-code {
        overflow-wrap: break-word;
        word-break: break-word;
        white-space: normal;
    }

    /* Скрываем id и индекс, показываем только Название и Код */
    .product-units-index .product-units-grid-table thead th.product-units-col-serial,
    .product-units-index .product-units-grid-table tbody td.product-units-col-serial,
    .product-units-index .product-units-grid-table thead th.product-units-col-id,
    .product-units-index .product-units-grid-table tbody td.product-units-col-id {
        display: none !important;
        width: 0 !important;
        min-width: 0 !important;
        max-width: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        border: none !important;
    }

    /* «Подробнее» и колонка действий вынесены в отдельные строки через JS */
    .product-units-index .product-units-grid-table thead th.product-units-col-actions,
    .product-units-index .product-units-grid-table tbody tr:not(.product-units-mobile-actions-row) td.product-units-col-actions,
    .product-units-index .product-units-grid-table thead th.product-units-col-more,
    .product-units-index .product-units-grid-table tbody tr:not(.product-units-mobile-more-row) td.product-units-col-more {
        display: none !important;
        width: 0 !important;
        min-width: 0 !important;
        max-width: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        border: none !important;
    }

    /* Строка с действиями над «Подробнее» */
    .product-units-index .product-units-grid-container .product-units-grid-table .product-units-mobile-actions-row td {
        padding: 6px 12px;
        border-top: none;
        background: #f5f5f5;
        border-bottom: 1px solid #eee;
        box-sizing: border-box;
        vertical-align: middle;
    }

    .product-units-index .product-units-grid-container .product-units-grid-table .product-units-mobile-actions-wrap {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-start;
        gap: 4px 12px;
    }

    .product-units-index .product-units-grid-container .product-units-grid-table .product-units-mobile-actions-wrap a,
    .product-units-index .product-units-grid-container .product-units-grid-table .product-units-mobile-actions-wrap input[type="checkbox"] {
        display: inline-block;
        padding: 4px 6px;
    }

    /* Строка «Подробнее» */
    .product-units-index .product-units-grid-container .product-units-grid-table .product-units-mobile-more-row td {
        padding: 8px 12px;
        border-top: none;
        background: #fff;
        border-bottom: 1px solid #eee;
        box-sizing: border-box;
    }

    .product-units-index .product-units-grid-container .product-units-grid-table .product-units-more-btn-wrap {
        width: 100%;
        display: block;
    }

    .product-units-index .product-units-grid-container .product-units-grid-table .product-units-mobile-more-row .js-product-units-row-more {
        display: block;
        width: 100% !important;
        box-sizing: border-box;
        font-size: 12px;
    }

    /* Раскрытый блок деталей */
    .product-units-index .product-units-grid-container .product-units-grid-table .product-units-mobile-detail {
        display: block;
    }

    .product-units-index .product-units-grid-container .product-units-grid-table .product-units-mobile-detail td {
        display: block;
        width: 100% !important;
        min-width: 100%;
        max-width: 100%;
        padding: 12px;
        background: #f5f5f5;
        border-top: none;
        border-bottom: 2px solid #ddd;
        vertical-align: top;
        box-sizing: border-box;
    }

    .product-units-index .product-units-mobile-detail-blocks {
        display: flex;
        flex-wrap: wrap;
        gap: 12px 20px;
        width: 100%;
        min-width: 100%;
        box-sizing: border-box;
    }

    .product-units-index .product-units-mobile-detail-block {
        min-width: 140px;
        flex: 1 1 180px;
        max-width: 100%;
    }

    .product-units-index .product-units-mobile-detail-block-title {
        font-weight: bold;
        font-size: 11px;
        color: #666;
        margin-bottom: 4px;
    }

    .product-units-index .product-units-mobile-detail-block-value {
        font-size: 13px;
    }

    /* ========== /bills/delivery/index — адаптив таблицы (Название + Цвет) ========== */
    .delivery-index {
        overflow-x: hidden;
        max-width: 100%;
        width: 100% !important;
    }

    .delivery-index:not(.bill-history,.bill-history-contractor) .delivery-grid-container,
    .delivery-index:not(.bill-history,.bill-history-contractor) .grid-view,
    .delivery-index:not(.bill-history,.bill-history-contractor) .grid-view .table-responsive,
    .delivery-index:not(.bill-history,.bill-history-contractor) .delivery-grid-table {
        overflow-x: hidden !important;
        max-width: 100%;
    }

    .delivery-index .grid-view thead tr.filters,
    .delivery-index .grid-view thead tr:nth-child(2) {
        display: none !important;
    }

    .delivery-index .delivery-grid-table {
        table-layout: fixed;
        width: 100%;
        max-width: 100%;
    }

    /* Видимые колонки на мобилке: Название + Цвет */
    .delivery-index .delivery-grid-table thead th.delivery-col-name,
    .delivery-index .delivery-grid-table tbody td.delivery-col-name { width: 60%; }

    .delivery-index .delivery-grid-table thead th.delivery-col-color,
    .delivery-index .delivery-grid-table tbody td.delivery-col-color { width: 40%; }

    /* Перенос по словам для «Название» чтобы длинные значения не ломали адаптив */
    .delivery-index .delivery-grid-table thead th.delivery-col-name,
    .delivery-index .delivery-grid-table tbody td.delivery-col-name {
        overflow-wrap: break-word;
        word-break: break-word;
        white-space: normal;
    }

    /* Скрываем id и «Краткое название» на мобилке */
    .delivery-index .delivery-grid-table thead th.delivery-col-serial,
    .delivery-index .delivery-grid-table tbody td.delivery-col-serial,
    .delivery-index .delivery-grid-table thead th.delivery-col-id,
    .delivery-index .delivery-grid-table tbody td.delivery-col-id,
    .delivery-index .delivery-grid-table thead th.delivery-col-breaf-name,
    .delivery-index .delivery-grid-table tbody td.delivery-col-breaf-name {
        display: none !important;
        width: 0 !important;
        min-width: 0 !important;
        max-width: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        border: none !important;
    }

    /* «Подробнее» и колонка действий вынесены в отдельные строки через JS */
    .delivery-index .delivery-grid-table thead th.delivery-col-actions,
    .delivery-index .delivery-grid-table tbody tr:not(.delivery-mobile-actions-row) td.delivery-col-actions,
    .delivery-index .delivery-grid-table thead th.delivery-col-more,
    .delivery-index .delivery-grid-table tbody tr:not(.delivery-mobile-more-row) td.delivery-col-more {
        display: none !important;
        width: 0 !important;
        min-width: 0 !important;
        max-width: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        border: none !important;
    }

    /* Строка с действиями над «Подробнее» */
    .delivery-index .delivery-grid-container .delivery-grid-table .delivery-mobile-actions-row td {
        padding: 6px 12px;
        border-top: none;
        background: #f5f5f5;
        border-bottom: 1px solid #eee;
        box-sizing: border-box;
        vertical-align: middle;
    }

    .delivery-index .delivery-grid-container .delivery-grid-table .delivery-mobile-actions-wrap {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-start;
        gap: 4px 12px;
    }

    .delivery-index .delivery-grid-container .delivery-grid-table .delivery-mobile-actions-wrap a,
    .delivery-index .delivery-grid-container .delivery-grid-table .delivery-mobile-actions-wrap input[type="checkbox"] {
        display: inline-block;
        padding: 4px 6px;
    }

    /* Строка «Подробнее» */
    .delivery-index .delivery-grid-container .delivery-grid-table .delivery-mobile-more-row td {
        padding: 8px 12px;
        border-top: none;
        background: #fff;
        border-bottom: 1px solid #eee;
        box-sizing: border-box;
    }

    .delivery-index .delivery-grid-container .delivery-grid-table .delivery-more-btn-wrap {
        width: 100%;
        display: block;
    }

    .delivery-index .delivery-grid-container .delivery-grid-table .delivery-mobile-more-row .js-delivery-row-more {
        display: block;
        width: 100% !important;
        box-sizing: border-box;
        font-size: 12px;
    }

    /* Раскрытый блок деталей */
    .delivery-index .delivery-grid-container .delivery-grid-table .delivery-mobile-detail {
        display: block;
    }

    .delivery-index .delivery-grid-container .delivery-grid-table .delivery-mobile-detail td {
        display: block;
        width: 100% !important;
        min-width: 100%;
        max-width: 100%;
        padding: 12px;
        background: #f5f5f5;
        border-top: none;
        border-bottom: 2px solid #ddd;
        vertical-align: top;
        box-sizing: border-box;
    }

    .delivery-index .delivery-mobile-detail-blocks {
        display: flex;
        flex-wrap: wrap;
        gap: 12px 20px;
        width: 100%;
        min-width: 100%;
        box-sizing: border-box;
    }

    .delivery-index .delivery-mobile-detail-block {
        min-width: 140px;
        flex: 1 1 180px;
        max-width: 100%;
    }

    .delivery-index .delivery-mobile-detail-block-title {
        font-weight: bold;
        font-size: 11px;
        color: #666;
        margin-bottom: 4px;
    }

    .delivery-index .delivery-mobile-detail-block-value {
        font-size: 13px;
    }

    /* ========== /bills/bill-status/index — адаптив таблицы (Название + Цвет) ========== */
    .bill-status-index {
        overflow-x: hidden;
        max-width: 100%;
        width: 100% !important;
    }

    .bill-status-index .bill-status-grid-container,
    .bill-status-index .grid-view,
    .bill-status-index .grid-view .table-responsive,
    .bill-status-index .bill-status-grid-table {
        overflow-x: hidden !important;
        max-width: 100%;
    }

    .bill-status-index .grid-view thead tr.filters,
    .bill-status-index .grid-view thead tr:nth-child(2) {
        display: none !important;
    }

    .bill-status-index .bill-status-grid-table {
        table-layout: fixed;
        width: 100%;
        max-width: 100%;
    }

    /* Видимые колонки на мобилке: Название + Цвет */
    .bill-status-index .bill-status-grid-table thead th.bill-status-col-name,
    .bill-status-index .bill-status-grid-table tbody td.bill-status-col-name { width: 60%; }

    .bill-status-index .bill-status-grid-table thead th.bill-status-col-color,
    .bill-status-index .bill-status-grid-table tbody td.bill-status-col-color { width: 40%; }

    /* Перенос по словам для «Название», чтобы длинные значения не ломали адаптив */
    .bill-status-index .bill-status-grid-table thead th.bill-status-col-name,
    .bill-status-index .bill-status-grid-table tbody td.bill-status-col-name {
        overflow-wrap: break-word;
        word-break: break-word;
        white-space: normal;
    }

    /* Скрываем остальные колонки в основном ряду */
    .bill-status-index .bill-status-grid-table thead th.bill-status-col-color2,
    .bill-status-index .bill-status-grid-table tbody td.bill-status-col-color2,
    .bill-status-index .bill-status-grid-table thead th.bill-status-col-sort,
    .bill-status-index .bill-status-grid-table tbody td.bill-status-col-sort,
    .bill-status-index .bill-status-grid-table thead th.bill-status-col-actions,
    .bill-status-index .bill-status-grid-table tbody tr:not(.bill-status-mobile-actions-row) td.bill-status-col-actions,
    .bill-status-index .bill-status-grid-table thead th.bill-status-col-more,
    .bill-status-index .bill-status-grid-table tbody tr:not(.bill-status-mobile-more-row) td.bill-status-col-more {
        display: none !important;
        width: 0 !important;
        min-width: 0 !important;
        max-width: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        border: none !important;
    }

    /* Строка с действиями над «Подробнее» */
    .bill-status-index .bill-status-grid-container .bill-status-grid-table .bill-status-mobile-actions-row td {
        padding: 6px 12px;
        border-top: none;
        background: #f5f5f5;
        border-bottom: 1px solid #eee;
        box-sizing: border-box;
        vertical-align: middle;
    }

    .bill-status-index .bill-status-grid-container .bill-status-grid-table .bill-status-mobile-actions-wrap {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-start;
        gap: 4px 12px;
    }

    .bill-status-index .bill-status-grid-container .bill-status-grid-table .bill-status-mobile-actions-wrap a,
    .bill-status-index .bill-status-grid-container .bill-status-grid-table .bill-status-mobile-actions-wrap input[type="checkbox"] {
        display: inline-block;
        padding: 4px 6px;
    }

    /* Строка «Подробнее» */
    .bill-status-index .bill-status-grid-container .bill-status-grid-table .bill-status-mobile-more-row td {
        padding: 8px 12px;
        border-top: none;
        background: #fff;
        border-bottom: 1px solid #eee;
        box-sizing: border-box;
    }

    .bill-status-index .bill-status-grid-container .bill-status-grid-table .bill-status-more-btn-wrap {
        width: 100%;
        display: block;
    }

    .bill-status-index .bill-status-grid-container .bill-status-grid-table .bill-status-mobile-more-row .js-bill-status-row-more {
        display: block;
        width: 100% !important;
        box-sizing: border-box;
        font-size: 12px;
    }

    /* Раскрытый блок деталей */
    .bill-status-index .bill-status-grid-container .bill-status-grid-table .bill-status-mobile-detail {
        display: block;
    }

    .bill-status-index .bill-status-grid-container .bill-status-grid-table .bill-status-mobile-detail td {
        display: block;
        width: 100% !important;
        min-width: 100%;
        max-width: 100%;
        padding: 12px;
        background: #f5f5f5;
        border-top: none;
        border-bottom: 2px solid #ddd;
        vertical-align: top;
        box-sizing: border-box;
    }

    .bill-status-index .bill-status-mobile-detail-blocks {
        display: flex;
        flex-wrap: wrap;
        gap: 12px 20px;
        width: 100%;
        min-width: 100%;
        box-sizing: border-box;
    }

    .bill-status-index .bill-status-mobile-detail-block {
        min-width: 140px;
        flex: 1 1 180px;
        max-width: 100%;
    }

    .bill-status-index .bill-status-mobile-detail-block-title {
        font-weight: bold;
        font-size: 11px;
        color: #666;
        margin-bottom: 4px;
    }

    .bill-status-index .bill-status-mobile-detail-block-value {
        font-size: 13px;
    }

    /* ========== /admin/user/index — адаптив таблицы (Email + Права доступа) ========== */
    .user-index {
        overflow-x: hidden;
        max-width: 100%;
        width: 100% !important;
    }

    .user-index .user-grid-container,
    .user-index .grid-view,
    .user-index .grid-view .table-responsive,
    .user-index .user-grid-table {
        overflow-x: hidden !important;
        max-width: 100%;
    }

    .user-index .grid-view thead tr.filters,
    .user-index .grid-view thead tr:nth-child(2) {
        display: none !important;
    }

    .user-index .user-grid-table {
        table-layout: fixed;
        width: 100%;
        max-width: 100%;
    }

    /* Видимые колонки на мобилке: Email + Права доступа */
    .user-index .user-grid-table thead th.user-col-email,
    .user-index .user-grid-table tbody td.user-col-email { width: 60%; }

    .user-index .user-grid-table thead th.user-col-role,
    .user-index .user-grid-table tbody td.user-col-role { width: 40%; }

    /* Перенос по словам */
    .user-index .user-grid-table thead th.user-col-email,
    .user-index .user-grid-table tbody td.user-col-email,
    .user-index .user-grid-table thead th.user-col-role,
    .user-index .user-grid-table tbody td.user-col-role {
        overflow-wrap: break-word;
        word-break: break-word;
        white-space: normal;
    }

    /* Скрываем serial/id в основном ряду */
    .user-index .user-grid-table thead th.user-col-serial,
    .user-index .user-grid-table tbody td.user-col-serial,
    .user-index .user-grid-table thead th.user-col-id,
    .user-index .user-grid-table tbody td.user-col-id {
        display: none !important;
        width: 0 !important;
        min-width: 0 !important;
        max-width: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        border: none !important;
    }

    /* «Подробнее» и колонка действий вынесены в отдельные строки через JS */
    .user-index .user-grid-table thead th.user-col-actions,
    .user-index .user-grid-table tbody tr:not(.user-mobile-actions-row) td.user-col-actions,
    .user-index .user-grid-table thead th.user-col-more,
    .user-index .user-grid-table tbody tr:not(.user-mobile-more-row) td.user-col-more {
        display: none !important;
        width: 0 !important;
        min-width: 0 !important;
        max-width: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        border: none !important;
    }

    /* Строка с действиями над «Подробнее» */
    .user-index .user-grid-container .user-grid-table .user-mobile-actions-row td {
        padding: 6px 12px;
        border-top: none;
        background: #f5f5f5;
        border-bottom: 1px solid #eee;
        box-sizing: border-box;
        vertical-align: middle;
    }

    .user-index .user-grid-container .user-grid-table .user-mobile-actions-wrap {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-start;
        gap: 4px 12px;
    }

    .user-index .user-grid-container .user-grid-table .user-mobile-actions-wrap a,
    .user-index .user-grid-container .user-grid-table .user-mobile-actions-wrap input[type="checkbox"] {
        display: inline-block;
        padding: 4px 6px;
    }

    /* Строка «Подробнее» */
    .user-index .user-grid-container .user-grid-table .user-mobile-more-row td {
        padding: 8px 12px;
        border-top: none;
        background: #fff;
        border-bottom: 1px solid #eee;
        box-sizing: border-box;
    }

    .user-index .user-grid-container .user-grid-table .user-more-btn-wrap {
        width: 100%;
        display: block;
    }

    .user-index .user-grid-container .user-grid-table .user-mobile-more-row .js-user-row-more {
        display: block;
        width: 100% !important;
        box-sizing: border-box;
        font-size: 12px;
    }

    /* Раскрытый блок деталей */
    .user-index .user-grid-container .user-grid-table .user-mobile-detail {
        display: block;
    }

    .user-index .user-grid-container .user-grid-table .user-mobile-detail td {
        display: block;
        width: 100% !important;
        min-width: 100%;
        max-width: 100%;
        padding: 12px;
        background: #f5f5f5;
        border-top: none;
        border-bottom: 2px solid #ddd;
        vertical-align: top;
        box-sizing: border-box;
    }

    .user-index .user-mobile-detail-blocks {
        display: flex;
        flex-wrap: wrap;
        gap: 12px 20px;
        width: 100%;
        min-width: 100%;
        box-sizing: border-box;
    }

    .user-index .user-mobile-detail-block {
        min-width: 140px;
        flex: 1 1 180px;
        max-width: 100%;
    }

    .user-index .user-mobile-detail-block-title {
        font-weight: bold;
        font-size: 11px;
        color: #666;
        margin-bottom: 4px;
    }

    .user-index .user-mobile-detail-block-value {
        font-size: 13px;
    }

    /* ========== /bills/site/index — адаптив (действия отдельной строкой) ========== */
    .site-index {
        overflow-x: hidden;
        max-width: 100%;
        width: 100% !important;
    }

    .site-index .site-grid-table {
        table-layout: fixed;
        width: 100%;
        max-width: 100%;
    }

    /* На мобайле скрываем исходную ячейку действий */
    .site-index .site-grid-table thead th.site-col-actions {
        display: none !important;
        width: 0 !important;
        min-width: 0 !important;
        max-width: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        border: none !important;
    }

    /* Fallback: иногда у th не проставляется класс — прячем последнюю колонку */
    .site-index .site-grid-table thead th:last-child,
    .site-index .site-grid-table thead tr.filters td:last-child {
        display: none !important;
        width: 0 !important;
        min-width: 0 !important;
        max-width: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        border: none !important;
    }

    .site-index .site-grid-table tbody tr:not(.site-mobile-actions-row) td.site-col-actions {
        display: none !important;
        width: 0 !important;
        min-width: 0 !important;
        max-width: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        border: none !important;
    }

    /* Строка с действиями */
    .site-index .site-grid-table .site-mobile-actions-row td {
        padding: 6px 12px;
        border-top: none;
        background: #f5f5f5;
        border-bottom: 1px solid #eee;
        box-sizing: border-box;
        vertical-align: middle;
    }

    .site-index .site-grid-table .site-action-buttons {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
    }

    /* ========== /tasks/task/index — адаптив таблицы (Заказчик + Название + Статус) ========== */
    .task-index {
        overflow-x: hidden;
        max-width: 100%;
        width: 100% !important;
    }

    .task-index .task-grid-container,
    .task-index .grid-view,
    .task-index .grid-view .table-responsive,
    .task-index .task-grid-table {
        overflow-x: hidden !important;
        max-width: 100%;
    }

    .task-index .grid-view thead tr.filters,
    .task-index .grid-view thead tr:nth-child(2) {
        display: none !important;
    }

    .task-index .task-grid-table {
        table-layout: fixed;
        width: 100%;
        max-width: 100%;
    }

    /* Видимые колонки на мобилке: Заказчик + Название + Статус */
    .task-index .task-grid-table thead th.task-col-user,
    .task-index .task-grid-table tbody td.task-col-user { width: 35%; }

    .task-index .task-grid-table thead th.task-col-name,
    .task-index .task-grid-table tbody td.task-col-name { width: 40%; }

    .task-index .task-grid-table thead th.task-col-status,
    .task-index .task-grid-table tbody td.task-col-status { width: 25%; }

    /* Перенос по словам для видимых колонок */
    .task-index .task-grid-table thead th.task-col-user,
    .task-index .task-grid-table tbody td.task-col-user,
    .task-index .task-grid-table thead th.task-col-name,
    .task-index .task-grid-table tbody td.task-col-name,
    .task-index .task-grid-table thead th.task-col-status,
    .task-index .task-grid-table tbody td.task-col-status {
        overflow-wrap: break-word;
        word-break: break-word;
        white-space: normal;
    }

    /* Скрываем остальные колонки в основном ряду */
    .task-index .task-grid-table thead th.task-col-serial,
    .task-index .task-grid-table tbody td.task-col-serial,
    .task-index .task-grid-table thead th.task-col-price,
    .task-index .task-grid-table tbody td.task-col-price,
    .task-index .task-grid-table thead th.task-col-start-date,
    .task-index .task-grid-table tbody td.task-col-start-date,
    .task-index .task-grid-table thead th.task-col-before-date,
    .task-index .task-grid-table tbody td.task-col-before-date {
        display: none !important;
        width: 0 !important;
        min-width: 0 !important;
        max-width: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        border: none !important;
    }

    /* «Подробнее» и колонка действий вынесены в отдельные строки через JS */
    .task-index .task-grid-table thead th.task-col-actions,
    .task-index .task-grid-table tbody tr:not(.task-mobile-actions-row) td.task-col-actions,
    .task-index .task-grid-table thead th.task-col-more,
    .task-index .task-grid-table tbody tr:not(.task-mobile-more-row) td.task-col-more {
        display: none !important;
        width: 0 !important;
        min-width: 0 !important;
        max-width: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        border: none !important;
    }

    /* Строка с действиями над «Подробнее» */
    .task-index .task-grid-table .task-mobile-actions-row td {
        padding: 6px 12px;
        border-top: none;
        background: #f5f5f5;
        border-bottom: 1px solid #eee;
        box-sizing: border-box;
        vertical-align: middle;
    }

    .task-index .task-grid-table .task-mobile-actions-wrap {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-start;
        gap: 4px 12px;
    }

    /* Строка «Подробнее» */
    .task-index .task-grid-table .task-mobile-more-row td {
        padding: 8px 12px;
        border-top: none;
        background: #fff;
        border-bottom: 1px solid #eee;
        box-sizing: border-box;
    }

    .task-index .task-grid-table .task-more-btn-wrap {
        width: 100%;
        display: block;
    }

    .task-index .task-grid-table .task-mobile-more-row .js-task-row-more {
        display: block;
        width: 100% !important;
        box-sizing: border-box;
        font-size: 12px;
    }

    /* Раскрытый блок деталей */
    .task-index .task-grid-table .task-mobile-detail {
        display: block;
    }

    .task-index .task-grid-table .task-mobile-detail td {
        display: block;
        width: 100% !important;
        min-width: 100%;
        max-width: 100%;
        padding: 12px;
        background: #f5f5f5;
        border-top: none;
        border-bottom: 2px solid #ddd;
        vertical-align: top;
        box-sizing: border-box;
    }

    .task-index .task-mobile-detail-blocks {
        display: flex;
        flex-wrap: wrap;
        gap: 12px 20px;
        width: 100%;
        min-width: 100%;
        box-sizing: border-box;
    }

    .task-index .task-mobile-detail-block {
        min-width: 140px;
        flex: 1 1 180px;
        max-width: 100%;
    }

    .task-index .task-mobile-detail-block-title {
        font-weight: bold;
        font-size: 11px;
        color: #666;
        margin-bottom: 4px;
    }

    .task-index .task-mobile-detail-block-value {
        font-size: 13px;
    }

    /* ========== /employees/employee/index — адаптив таблицы (Только ФИО + Подробнее) ========== */
    .employee-index {
        overflow-x: hidden;
        max-width: 100%;
        width: 100% !important;
    }

    .employee-index .employee-grid-container,
    .employee-index .grid-view,
    .employee-index .grid-view .table-responsive,
    .employee-index .employee-grid-table {
        overflow-x: hidden !important;
        max-width: 100%;
    }

    .employee-index .grid-view thead tr.filters,
    .employee-index .grid-view thead tr:nth-child(2) {
        display: none !important;
    }

    .employee-index .employee-grid-table {
        table-layout: fixed;
        width: 100%;
        max-width: 100%;
    }

    /* Видимая колонка на мобилке: ФИО */
    .employee-index .employee-grid-table thead th.employee-col-fio,
    .employee-index .employee-grid-table tbody td.employee-col-fio {
        width: 100%;
    }

    /* Перенос по словам для «ФИО» */
    .employee-index .employee-grid-table thead th.employee-col-fio,
    .employee-index .employee-grid-table tbody td.employee-col-fio {
        overflow-wrap: break-word;
        word-break: break-word;
        white-space: normal;
    }

    /* Скрываем все остальные колонки в основном ряду */
    .employee-index .employee-grid-table thead th.employee-col-serial,
    .employee-index .employee-grid-table tbody td.employee-col-serial,
    .employee-index .employee-grid-table thead th.employee-col-id,
    .employee-index .employee-grid-table tbody td.employee-col-id,
    .employee-index .employee-grid-table thead th.employee-col-phone-mobile,
    .employee-index .employee-grid-table tbody td.employee-col-phone-mobile,
    .employee-index .employee-grid-table thead th.employee-col-phone-home,
    .employee-index .employee-grid-table tbody td.employee-col-phone-home,
    .employee-index .employee-grid-table thead th.employee-col-phone-work,
    .employee-index .employee-grid-table tbody td.employee-col-phone-work,
    .employee-index .employee-grid-table thead th.employee-col-agreement-date,
    .employee-index .employee-grid-table tbody td.employee-col-agreement-date,
    .employee-index .employee-grid-table thead th.employee-col-actions,
    .employee-index .employee-grid-table tbody tr:not(.employee-mobile-actions-row) td.employee-col-actions,
    .employee-index .employee-grid-table thead th.employee-col-more,
    .employee-index .employee-grid-table tbody tr:not(.employee-mobile-more-row) td.employee-col-more {
        display: none !important;
        width: 0 !important;
        min-width: 0 !important;
        max-width: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        border: none !important;
    }

    /* Строка с действиями над «Подробнее» */
    .employee-index .employee-grid-container .employee-grid-table .employee-mobile-actions-row td {
        padding: 6px 12px;
        border-top: none;
        background: #f5f5f5;
        border-bottom: 1px solid #eee;
        box-sizing: border-box;
        vertical-align: middle;
    }

    .employee-index .employee-grid-container .employee-grid-table .employee-mobile-actions-wrap {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-start;
        gap: 4px 12px;
    }

    .employee-index .employee-grid-container .employee-grid-table .employee-mobile-actions-wrap a,
    .employee-index .employee-grid-container .employee-grid-table .employee-mobile-actions-wrap input[type="checkbox"] {
        display: inline-block;
        padding: 4px 6px;
    }

    /* Строка «Подробнее» */
    .employee-index .employee-grid-container .employee-grid-table .employee-mobile-more-row td {
        padding: 8px 12px;
        border-top: none;
        background: #fff;
        border-bottom: 1px solid #eee;
        box-sizing: border-box;
    }

    .employee-index .employee-grid-container .employee-grid-table .employee-more-btn-wrap {
        width: 100%;
        display: block;
    }

    .employee-index .employee-grid-container .employee-grid-table .employee-mobile-more-row .js-employee-row-more {
        display: block;
        width: 100% !important;
        box-sizing: border-box;
        font-size: 12px;
    }

    /* Раскрытый блок деталей */
    .employee-index .employee-grid-container .employee-grid-table .employee-mobile-detail {
        display: block;
    }

    .employee-index .employee-grid-container .employee-grid-table .employee-mobile-detail td {
        display: block;
        width: 100% !important;
        min-width: 100%;
        max-width: 100%;
        padding: 12px;
        background: #f5f5f5;
        border-top: none;
        border-bottom: 2px solid #ddd;
        vertical-align: top;
        box-sizing: border-box;
    }

    .employee-index .employee-mobile-detail-blocks {
        display: flex;
        flex-wrap: wrap;
        gap: 12px 20px;
        width: 100%;
        min-width: 100%;
        box-sizing: border-box;
    }

    .employee-index .employee-mobile-detail-block {
        min-width: 140px;
        flex: 1 1 180px;
        max-width: 100%;
    }

    .employee-index .employee-mobile-detail-block-title {
        font-weight: bold;
        font-size: 11px;
        color: #666;
        margin-bottom: 4px;
    }

    .employee-index .employee-mobile-detail-block-value {
        font-size: 13px;
    }

    /* ========== /bills/mail-template/index — адаптив таблицы (Наименование + Тема письма) ========== */
    .mail-template-index {
        overflow-x: hidden;
        max-width: 100%;
        width: 100% !important;
    }

    .mail-template-index .mail-template-grid-container,
    .mail-template-index .grid-view,
    .mail-template-index .grid-view .table-responsive,
    .mail-template-index .mail-template-grid-table {
        overflow-x: hidden !important;
        max-width: 100%;
    }

    .mail-template-index .grid-view thead tr.filters,
    .mail-template-index .grid-view thead tr:nth-child(2) {
        display: none !important;
    }

    .mail-template-index .mail-template-grid-table {
        table-layout: fixed;
        width: 100%;
        max-width: 100%;
    }

    /* Видимые колонки на мобилке: Наименование + Тема письма */
    .mail-template-index .mail-template-grid-table thead th.mail-template-col-name,
    .mail-template-index .mail-template-grid-table tbody td.mail-template-col-name { width: 50%; }

    .mail-template-index .mail-template-grid-table thead th.mail-template-col-subject,
    .mail-template-index .mail-template-grid-table tbody td.mail-template-col-subject { width: 50%; }

    /* Перенос по словам */
    .mail-template-index .mail-template-grid-table thead th.mail-template-col-name,
    .mail-template-index .mail-template-grid-table tbody td.mail-template-col-name,
    .mail-template-index .mail-template-grid-table thead th.mail-template-col-subject,
    .mail-template-index .mail-template-grid-table tbody td.mail-template-col-subject {
        overflow-wrap: break-word;
        word-break: break-word;
        white-space: normal;
    }

    /* Скрываем остальные колонки в основном ряду */
    .mail-template-index .mail-template-grid-table thead th.mail-template-col-serial,
    .mail-template-index .mail-template-grid-table tbody td.mail-template-col-serial,
    .mail-template-index .mail-template-grid-table thead th.mail-template-col-index,
    .mail-template-index .mail-template-grid-table tbody td.mail-template-col-index,
    .mail-template-index .mail-template-grid-table thead th.mail-template-col-body,
    .mail-template-index .mail-template-grid-table tbody td.mail-template-col-body,
    .mail-template-index .mail-template-grid-table thead th.mail-template-col-actions,
    .mail-template-index .mail-template-grid-table tbody tr:not(.mail-template-mobile-actions-row) td.mail-template-col-actions,
    .mail-template-index .mail-template-grid-table thead th.mail-template-col-more,
    .mail-template-index .mail-template-grid-table tbody tr:not(.mail-template-mobile-more-row) td.mail-template-col-more {
        display: none !important;
        width: 0 !important;
        min-width: 0 !important;
        max-width: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        border: none !important;
    }

    /* Строка с действиями над «Подробнее» */
    .mail-template-index .mail-template-grid-container .mail-template-grid-table .mail-template-mobile-actions-row td {
        padding: 6px 12px;
        border-top: none;
        background: #f5f5f5;
        border-bottom: 1px solid #eee;
        box-sizing: border-box;
        vertical-align: middle;
    }

    .mail-template-index .mail-template-grid-container .mail-template-grid-table .mail-template-mobile-actions-wrap {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-start;
        gap: 4px 12px;
    }

    .mail-template-index .mail-template-grid-container .mail-template-grid-table .mail-template-mobile-actions-wrap a,
    .mail-template-index .mail-template-grid-container .mail-template-grid-table .mail-template-mobile-actions-wrap input[type="checkbox"] {
        display: inline-block;
        padding: 4px 6px;
    }

    /* Строка «Подробнее» */
    .mail-template-index .mail-template-grid-container .mail-template-grid-table .mail-template-mobile-more-row td {
        padding: 8px 12px;
        border-top: none;
        background: #fff;
        border-bottom: 1px solid #eee;
        box-sizing: border-box;
    }

    .mail-template-index .mail-template-grid-container .mail-template-grid-table .mail-template-more-btn-wrap {
        width: 100%;
        display: block;
    }

    .mail-template-index .mail-template-grid-container .mail-template-grid-table .mail-template-mobile-more-row .js-mail-template-row-more {
        display: block;
        width: 100% !important;
        box-sizing: border-box;
        font-size: 12px;
    }

    /* Раскрытый блок деталей */
    .mail-template-index .mail-template-grid-container .mail-template-grid-table .mail-template-mobile-detail {
        display: block;
    }

    .mail-template-index .mail-template-grid-container .mail-template-grid-table .mail-template-mobile-detail td {
        display: block;
        width: 100% !important;
        min-width: 100%;
        max-width: 100%;
        padding: 12px;
        background: #f5f5f5;
        border-top: none;
        border-bottom: 2px solid #ddd;
        vertical-align: top;
        box-sizing: border-box;
    }

    .mail-template-index .mail-template-mobile-detail-blocks {
        display: flex;
        flex-wrap: wrap;
        gap: 12px 20px;
        width: 100%;
        min-width: 100%;
        box-sizing: border-box;
    }

    .mail-template-index .mail-template-mobile-detail-block {
        min-width: 140px;
        flex: 1 1 180px;
        max-width: 100%;
    }

    .mail-template-index .mail-template-mobile-detail-block-title {
        font-weight: bold;
        font-size: 11px;
        color: #666;
        margin-bottom: 4px;
    }

    .mail-template-index .mail-template-mobile-detail-block-value {
        font-size: 13px;
    }

    /* ========== /bills/delivery-mail-template/index — адаптив таблицы (Метод доставки + Подробнее) ========== */
    .delivery-mail-template-index {
        overflow-x: hidden;
        max-width: 100%;
        width: 100% !important;
    }

    .delivery-mail-template-index .delivery-mail-template-grid-container,
    .delivery-mail-template-index .grid-view,
    .delivery-mail-template-index .grid-view .table-responsive,
    .delivery-mail-template-index .delivery-mail-template-grid-table {
        overflow-x: hidden !important;
        max-width: 100%;
    }

    .delivery-mail-template-index .grid-view thead tr.filters,
    .delivery-mail-template-index .grid-view thead tr:nth-child(2) {
        display: none !important;
    }

    .delivery-mail-template-index .delivery-mail-template-grid-table {
        table-layout: fixed;
        width: 100%;
        max-width: 100%;
    }

    /* Видимая колонка на мобилке: Метод доставки */
    .delivery-mail-template-index .delivery-mail-template-grid-table thead th.delivery-mail-template-col-delivery-name,
    .delivery-mail-template-index .delivery-mail-template-grid-table tbody td.delivery-mail-template-col-delivery-name {
        width: 100%;
    }

    /* Перенос по словам для «Метод доставки» */
    .delivery-mail-template-index .delivery-mail-template-grid-table thead th.delivery-mail-template-col-delivery-name,
    .delivery-mail-template-index .delivery-mail-template-grid-table tbody td.delivery-mail-template-col-delivery-name {
        overflow-wrap: break-word;
        word-break: break-word;
        white-space: normal;
    }

    /* Скрываем остальные колонки в основном ряду */
    .delivery-mail-template-index .delivery-mail-template-grid-table thead th.delivery-mail-template-col-serial,
    .delivery-mail-template-index .delivery-mail-template-grid-table tbody td.delivery-mail-template-col-serial,
    .delivery-mail-template-index .delivery-mail-template-grid-table thead th.delivery-mail-template-col-id,
    .delivery-mail-template-index .delivery-mail-template-grid-table tbody td.delivery-mail-template-col-id,
    .delivery-mail-template-index .delivery-mail-template-grid-table thead th.delivery-mail-template-col-order,
    .delivery-mail-template-index .delivery-mail-template-grid-table tbody td.delivery-mail-template-col-order,
    .delivery-mail-template-index .delivery-mail-template-grid-table thead th.delivery-mail-template-col-name,
    .delivery-mail-template-index .delivery-mail-template-grid-table tbody td.delivery-mail-template-col-name,
    .delivery-mail-template-index .delivery-mail-template-grid-table thead th.delivery-mail-template-col-template,
    .delivery-mail-template-index .delivery-mail-template-grid-table tbody td.delivery-mail-template-col-template,
    .delivery-mail-template-index .delivery-mail-template-grid-table thead th.delivery-mail-template-col-actions,
    .delivery-mail-template-index .delivery-mail-template-grid-table tbody tr:not(.delivery-mail-template-mobile-actions-row) td.delivery-mail-template-col-actions,
    .delivery-mail-template-index .delivery-mail-template-grid-table thead th.delivery-mail-template-col-more,
    .delivery-mail-template-index .delivery-mail-template-grid-table tbody tr:not(.delivery-mail-template-mobile-more-row) td.delivery-mail-template-col-more {
        display: none !important;
        width: 0 !important;
        min-width: 0 !important;
        max-width: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        border: none !important;
    }

    /* Строка с действиями над «Подробнее» */
    .delivery-mail-template-index .delivery-mail-template-grid-container .delivery-mail-template-grid-table .delivery-mail-template-mobile-actions-row td {
        padding: 6px 12px;
        border-top: none;
        background: #f5f5f5;
        border-bottom: 1px solid #eee;
        box-sizing: border-box;
        vertical-align: middle;
    }

    .delivery-mail-template-index .delivery-mail-template-grid-container .delivery-mail-template-grid-table .delivery-mail-template-mobile-actions-wrap {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-start;
        gap: 4px 12px;
    }

    .delivery-mail-template-index .delivery-mail-template-grid-container .delivery-mail-template-grid-table .delivery-mail-template-mobile-actions-wrap a,
    .delivery-mail-template-index .delivery-mail-template-grid-container .delivery-mail-template-grid-table .delivery-mail-template-mobile-actions-wrap input[type="checkbox"] {
        display: inline-block;
        padding: 4px 6px;
    }

    /* Строка «Подробнее» */
    .delivery-mail-template-index .delivery-mail-template-grid-container .delivery-mail-template-grid-table .delivery-mail-template-mobile-more-row td {
        padding: 8px 12px;
        border-top: none;
        background: #fff;
        border-bottom: 1px solid #eee;
        box-sizing: border-box;
    }

    .delivery-mail-template-index .delivery-mail-template-grid-container .delivery-mail-template-grid-table .delivery-mail-template-more-btn-wrap {
        width: 100%;
        display: block;
    }

    .delivery-mail-template-index .delivery-mail-template-grid-container .delivery-mail-template-grid-table .delivery-mail-template-mobile-more-row .js-delivery-mail-template-row-more {
        display: block;
        width: 100% !important;
        box-sizing: border-box;
        font-size: 12px;
    }

    /* Раскрытый блок деталей */
    .delivery-mail-template-index .delivery-mail-template-grid-container .delivery-mail-template-grid-table .delivery-mail-template-mobile-detail {
        display: block;
    }

    .delivery-mail-template-index .delivery-mail-template-grid-container .delivery-mail-template-grid-table .delivery-mail-template-mobile-detail td {
        display: block;
        width: 100% !important;
        min-width: 100%;
        max-width: 100%;
        padding: 12px;
        background: #f5f5f5;
        border-top: none;
        border-bottom: 2px solid #ddd;
        vertical-align: top;
        box-sizing: border-box;
    }

    .delivery-mail-template-index .delivery-mail-template-mobile-detail-blocks {
        display: flex;
        flex-wrap: wrap;
        gap: 12px 20px;
        width: 100%;
        min-width: 100%;
        box-sizing: border-box;
    }

    .delivery-mail-template-index .delivery-mail-template-mobile-detail-block {
        min-width: 140px;
        flex: 1 1 180px;
        max-width: 100%;
    }

    .delivery-mail-template-index .delivery-mail-template-mobile-detail-block-title {
        font-weight: bold;
        font-size: 11px;
        color: #666;
        margin-bottom: 4px;
    }

    .delivery-mail-template-index .delivery-mail-template-mobile-detail-block-value {
        font-size: 13px;
    }

    /* ========== /bills/notification-rules/index — две таблицы ========== */

    /* --- Таблица 1: Настройки всплывающих окон (Название + Значение, без «Подробнее») --- */
    .notification-rules-index .nf-popup-order-settings-section {
        overflow-x: hidden;
        max-width: 100%;
        width: 100% !important;
    }

    .notification-rules-index .nf-popup-order-settings-grid-container,
    .notification-rules-index .nf-popup-order-settings-section .grid-view,
    .notification-rules-index .nf-popup-order-settings-section .grid-view .table-responsive,
    .notification-rules-index .nf-popup-order-settings-grid-table {
        overflow-x: hidden !important;
        max-width: 100%;
    }

    .notification-rules-index .nf-popup-order-settings-section .grid-view thead tr.filters,
    .notification-rules-index .nf-popup-order-settings-section .grid-view thead tr:nth-child(2) {
        display: none !important;
    }

    .notification-rules-index .nf-popup-order-settings-grid-table {
        table-layout: fixed;
        width: 100%;
        max-width: 100%;
    }

    .notification-rules-index .nf-popup-order-settings-grid-table thead th.nf-po-col-name,
    .notification-rules-index .nf-popup-order-settings-grid-table tbody td.nf-po-col-name {
        width: 50%;
    }

    .notification-rules-index .nf-popup-order-settings-grid-table thead th.nf-po-col-value,
    .notification-rules-index .nf-popup-order-settings-grid-table tbody td.nf-po-col-value {
        width: 50%;
    }

    .notification-rules-index .nf-popup-order-settings-grid-table thead th.nf-po-col-name,
    .notification-rules-index .nf-popup-order-settings-grid-table tbody td.nf-po-col-name,
    .notification-rules-index .nf-popup-order-settings-grid-table thead th.nf-po-col-value,
    .notification-rules-index .nf-popup-order-settings-grid-table tbody td.nf-po-col-value {
        overflow-wrap: break-word;
        word-break: break-word;
        white-space: normal;
    }

    .notification-rules-index .nf-popup-order-settings-grid-table thead th.nf-po-col-serial,
    .notification-rules-index .nf-popup-order-settings-grid-table tbody td.nf-po-col-serial,
    .notification-rules-index .nf-popup-order-settings-grid-table thead th.nf-po-col-id,
    .notification-rules-index .nf-popup-order-settings-grid-table tbody td.nf-po-col-id,
    .notification-rules-index .nf-popup-order-settings-grid-table thead th.nf-po-col-actions,
    .notification-rules-index .nf-popup-order-settings-grid-table tbody tr:not(.nf-po-mobile-actions-row) td.nf-po-col-actions {
        display: none !important;
        width: 0 !important;
        min-width: 0 !important;
        max-width: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        border: none !important;
    }

    .notification-rules-index .nf-popup-order-settings-grid-container .nf-popup-order-settings-grid-table .nf-po-mobile-actions-row td {
        padding: 6px 12px;
        border-top: none;
        background: #f5f5f5;
        border-bottom: 1px solid #eee;
        box-sizing: border-box;
        vertical-align: middle;
    }

    .notification-rules-index .nf-popup-order-settings-grid-container .nf-popup-order-settings-grid-table .nf-po-mobile-actions-wrap {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-start;
        gap: 4px 12px;
    }

    .notification-rules-index .nf-popup-order-settings-grid-container .nf-popup-order-settings-grid-table .nf-po-mobile-actions-wrap a,
    .notification-rules-index .nf-popup-order-settings-grid-container .nf-popup-order-settings-grid-table .nf-po-mobile-actions-wrap input[type="checkbox"] {
        display: inline-block;
        padding: 4px 6px;
    }

    /* --- Таблица 2: Правила уведомлений (только Заголовок + «Подробнее») --- */
    .notification-rules-index .nf-rules-list-section {
        overflow-x: hidden;
        max-width: 100%;
        width: 100% !important;
    }

    .notification-rules-index .nf-rules-list-grid-container,
    .notification-rules-index .nf-rules-list-section .grid-view,
    .notification-rules-index .nf-rules-list-section .grid-view .table-responsive,
    .notification-rules-index .nf-rules-list-grid-table {
        overflow-x: hidden !important;
        max-width: 100%;
    }

    .notification-rules-index .nf-rules-list-section .grid-view thead tr.filters,
    .notification-rules-index .nf-rules-list-section .grid-view thead tr:nth-child(2) {
        display: none !important;
    }

    .notification-rules-index .nf-rules-list-grid-table {
        table-layout: fixed;
        width: 100%;
        max-width: 100%;
    }

    .notification-rules-index .nf-rules-list-grid-table thead th.nf-rule-col-title,
    .notification-rules-index .nf-rules-list-grid-table tbody td.nf-rule-col-title {
        width: 100%;
    }

    .notification-rules-index .nf-rules-list-grid-table thead th.nf-rule-col-title,
    .notification-rules-index .nf-rules-list-grid-table tbody td.nf-rule-col-title {
        overflow-wrap: break-word;
        word-break: break-word;
        white-space: normal;
    }

    .notification-rules-index .nf-rules-list-grid-table thead th.nf-rule-col-serial,
    .notification-rules-index .nf-rules-list-grid-table tbody td.nf-rule-col-serial,
    .notification-rules-index .nf-rules-list-grid-table thead th.nf-rule-col-id,
    .notification-rules-index .nf-rules-list-grid-table tbody td.nf-rule-col-id,
    .notification-rules-index .nf-rules-list-grid-table thead th.nf-rule-col-rules,
    .notification-rules-index .nf-rules-list-grid-table tbody td.nf-rule-col-rules,
    .notification-rules-index .nf-rules-list-grid-table thead th.nf-rule-col-actions,
    .notification-rules-index .nf-rules-list-grid-table tbody tr:not(.nf-rule-mobile-actions-row) td.nf-rule-col-actions,
    .notification-rules-index .nf-rules-list-grid-table thead th.nf-rule-col-more,
    .notification-rules-index .nf-rules-list-grid-table tbody tr:not(.nf-rule-mobile-more-row) td.nf-rule-col-more {
        display: none !important;
        width: 0 !important;
        min-width: 0 !important;
        max-width: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        border: none !important;
    }

    .notification-rules-index .nf-rules-list-grid-container .nf-rules-list-grid-table .nf-rule-mobile-actions-row td {
        padding: 6px 12px;
        border-top: none;
        background: #f5f5f5;
        border-bottom: 1px solid #eee;
        box-sizing: border-box;
        vertical-align: middle;
    }

    .notification-rules-index .nf-rules-list-grid-container .nf-rules-list-grid-table .nf-rule-mobile-actions-wrap {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-start;
        gap: 4px 12px;
    }

    .notification-rules-index .nf-rules-list-grid-container .nf-rules-list-grid-table .nf-rule-mobile-actions-wrap a,
    .notification-rules-index .nf-rules-list-grid-container .nf-rules-list-grid-table .nf-rule-mobile-actions-wrap input[type="checkbox"] {
        display: inline-block;
        padding: 4px 6px;
    }

    .notification-rules-index .nf-rules-list-grid-container .nf-rules-list-grid-table .nf-rule-mobile-more-row td {
        padding: 8px 12px;
        border-top: none;
        background: #fff;
        border-bottom: 1px solid #eee;
        box-sizing: border-box;
    }

    .notification-rules-index .nf-rules-list-grid-container .nf-rules-list-grid-table .nf-rule-more-btn-wrap {
        width: 100%;
        display: block;
    }

    .notification-rules-index .nf-rules-list-grid-container .nf-rules-list-grid-table .nf-rule-mobile-more-row .js-nf-rule-row-more {
        display: block;
        width: 100% !important;
        box-sizing: border-box;
        font-size: 12px;
    }

    .notification-rules-index .nf-rules-list-grid-container .nf-rules-list-grid-table .nf-rule-mobile-detail {
        display: block;
    }

    .notification-rules-index .nf-rules-list-grid-container .nf-rules-list-grid-table .nf-rule-mobile-detail td {
        display: block;
        width: 100% !important;
        min-width: 100%;
        max-width: 100%;
        padding: 12px;
        background: #f5f5f5;
        border-top: none;
        border-bottom: 2px solid #ddd;
        vertical-align: top;
        box-sizing: border-box;
    }

    .notification-rules-index .nf-rule-mobile-detail-blocks {
        display: flex;
        flex-wrap: wrap;
        gap: 12px 20px;
        width: 100%;
        min-width: 100%;
        box-sizing: border-box;
    }

    .notification-rules-index .nf-rule-mobile-detail-block {
        min-width: 140px;
        flex: 1 1 180px;
        max-width: 100%;
    }

    .notification-rules-index .nf-rule-mobile-detail-block-title {
        font-weight: bold;
        font-size: 11px;
        color: #666;
        margin-bottom: 4px;
    }

    .notification-rules-index .nf-rule-mobile-detail-block-value {
        font-size: 13px;
    }

    /* ========== /bills/mail-notification-rule/index — только Название + Подробнее ========== */
    .mail-notification-rule-index {
        overflow-x: hidden;
        max-width: 100%;
        width: 100% !important;
    }

    .mail-notification-rule-index .mnr-grid-container,
    .mail-notification-rule-index .grid-view,
    .mail-notification-rule-index .grid-view .table-responsive,
    .mail-notification-rule-index .mnr-grid-table {
        overflow-x: hidden !important;
        max-width: 100%;
    }

    .mail-notification-rule-index .grid-view thead tr.filters,
    .mail-notification-rule-index .grid-view thead tr:nth-child(2) {
        display: none !important;
    }

    .mail-notification-rule-index .mnr-grid-table {
        table-layout: fixed;
        width: 100%;
        max-width: 100%;
    }

    .mail-notification-rule-index .mnr-grid-table thead th.mnr-col-name,
    .mail-notification-rule-index .mnr-grid-table tbody td.mnr-col-name {
        width: 100%;
    }

    .mail-notification-rule-index .mnr-grid-table thead th.mnr-col-name,
    .mail-notification-rule-index .mnr-grid-table tbody td.mnr-col-name {
        overflow-wrap: break-word;
        word-break: break-word;
        white-space: normal;
    }

    .mail-notification-rule-index .mnr-grid-table thead th.mnr-col-serial,
    .mail-notification-rule-index .mnr-grid-table tbody td.mnr-col-serial,
    .mail-notification-rule-index .mnr-grid-table thead th.mnr-col-id,
    .mail-notification-rule-index .mnr-grid-table tbody td.mnr-col-id,
    .mail-notification-rule-index .mnr-grid-table thead th.mnr-col-actions,
    .mail-notification-rule-index .mnr-grid-table tbody tr:not(.mnr-mobile-actions-row) td.mnr-col-actions,
    .mail-notification-rule-index .mnr-grid-table thead th.mnr-col-more,
    .mail-notification-rule-index .mnr-grid-table tbody tr:not(.mnr-mobile-more-row) td.mnr-col-more {
        display: none !important;
        width: 0 !important;
        min-width: 0 !important;
        max-width: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        border: none !important;
    }

    .mail-notification-rule-index .mnr-grid-container .mnr-grid-table .mnr-mobile-actions-row td {
        padding: 6px 12px;
        border-top: none;
        background: #f5f5f5;
        border-bottom: 1px solid #eee;
        box-sizing: border-box;
        vertical-align: middle;
    }

    .mail-notification-rule-index .mnr-grid-container .mnr-grid-table .mnr-mobile-actions-wrap {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-start;
        gap: 4px 12px;
    }

    .mail-notification-rule-index .mnr-grid-container .mnr-grid-table .mnr-mobile-actions-wrap a,
    .mail-notification-rule-index .mnr-grid-container .mnr-grid-table .mnr-mobile-actions-wrap input[type="checkbox"] {
        display: inline-block;
        padding: 4px 6px;
    }

    .mail-notification-rule-index .mnr-grid-container .mnr-grid-table .mnr-mobile-more-row td {
        padding: 8px 12px;
        border-top: none;
        background: #fff;
        border-bottom: 1px solid #eee;
        box-sizing: border-box;
    }

    .mail-notification-rule-index .mnr-grid-container .mnr-grid-table .mnr-more-btn-wrap {
        width: 100%;
        display: block;
    }

    .mail-notification-rule-index .mnr-grid-container .mnr-grid-table .mnr-mobile-more-row .js-mnr-row-more {
        display: block;
        width: 100% !important;
        box-sizing: border-box;
        font-size: 12px;
    }

    .mail-notification-rule-index .mnr-grid-container .mnr-grid-table .mnr-mobile-detail {
        display: block;
    }

    .mail-notification-rule-index .mnr-grid-container .mnr-grid-table .mnr-mobile-detail td {
        display: block;
        width: 100% !important;
        min-width: 100%;
        max-width: 100%;
        padding: 12px;
        background: #f5f5f5;
        border-top: none;
        border-bottom: 2px solid #ddd;
        vertical-align: top;
        box-sizing: border-box;
    }

    .mail-notification-rule-index .mnr-mobile-detail-blocks {
        display: flex;
        flex-wrap: wrap;
        gap: 12px 20px;
        width: 100%;
        min-width: 100%;
        box-sizing: border-box;
    }

    .mail-notification-rule-index .mnr-mobile-detail-block {
        min-width: 140px;
        flex: 1 1 180px;
        max-width: 100%;
    }

    .mail-notification-rule-index .mnr-mobile-detail-block-title {
        font-weight: bold;
        font-size: 11px;
        color: #666;
        margin-bottom: 4px;
    }

    .mail-notification-rule-index .mnr-mobile-detail-block-value {
        font-size: 13px;
    }

    /* ========== /bills/delete-reasons/index — только Наименование + Подробнее ========== */
    .delete-reasons-index {
        overflow-x: hidden;
        max-width: 100%;
        width: 100% !important;
    }

    .delete-reasons-index .dr-grid-container,
    .delete-reasons-index .grid-view,
    .delete-reasons-index .grid-view .table-responsive,
    .delete-reasons-index .dr-grid-table {
        overflow-x: hidden !important;
        max-width: 100%;
    }

    .delete-reasons-index .grid-view thead tr.filters,
    .delete-reasons-index .grid-view thead tr:nth-child(2) {
        display: none !important;
    }

    .delete-reasons-index .dr-grid-table {
        table-layout: fixed;
        width: 100%;
        max-width: 100%;
    }

    .delete-reasons-index .dr-grid-table thead th.dr-col-name,
    .delete-reasons-index .dr-grid-table tbody td.dr-col-name {
        width: 100%;
    }

    .delete-reasons-index .dr-grid-table thead th.dr-col-name,
    .delete-reasons-index .dr-grid-table tbody td.dr-col-name {
        overflow-wrap: break-word;
        word-break: break-word;
        white-space: normal;
    }

    .delete-reasons-index .dr-grid-table thead th.dr-col-serial,
    .delete-reasons-index .dr-grid-table tbody td.dr-col-serial,
    .delete-reasons-index .dr-grid-table thead th.dr-col-id,
    .delete-reasons-index .dr-grid-table tbody td.dr-col-id,
    .delete-reasons-index .dr-grid-table thead th.dr-col-actions,
    .delete-reasons-index .dr-grid-table tbody tr:not(.dr-mobile-actions-row) td.dr-col-actions,
    .delete-reasons-index .dr-grid-table thead th.dr-col-more,
    .delete-reasons-index .dr-grid-table tbody tr:not(.dr-mobile-more-row) td.dr-col-more {
        display: none !important;
        width: 0 !important;
        min-width: 0 !important;
        max-width: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        border: none !important;
    }

    .delete-reasons-index .dr-grid-container .dr-grid-table .dr-mobile-actions-row td {
        padding: 6px 12px;
        border-top: none;
        background: #f5f5f5;
        border-bottom: 1px solid #eee;
        box-sizing: border-box;
        vertical-align: middle;
    }

    .delete-reasons-index .dr-grid-container .dr-grid-table .dr-mobile-actions-wrap {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-start;
        gap: 4px 12px;
    }

    .delete-reasons-index .dr-grid-container .dr-grid-table .dr-mobile-actions-wrap a,
    .delete-reasons-index .dr-grid-container .dr-grid-table .dr-mobile-actions-wrap input[type="checkbox"] {
        display: inline-block;
        padding: 4px 6px;
    }

    .delete-reasons-index .dr-grid-container .dr-grid-table .dr-mobile-more-row td {
        padding: 8px 12px;
        border-top: none;
        background: #fff;
        border-bottom: 1px solid #eee;
        box-sizing: border-box;
    }

    .delete-reasons-index .dr-grid-container .dr-grid-table .dr-more-btn-wrap {
        width: 100%;
        display: block;
    }

    .delete-reasons-index .dr-grid-container .dr-grid-table .dr-mobile-more-row .js-dr-row-more {
        display: block;
        width: 100% !important;
        box-sizing: border-box;
        font-size: 12px;
    }

    .delete-reasons-index .dr-grid-container .dr-grid-table .dr-mobile-detail {
        display: block;
    }

    .delete-reasons-index .dr-grid-container .dr-grid-table .dr-mobile-detail td {
        display: block;
        width: 100% !important;
        min-width: 100%;
        max-width: 100%;
        padding: 12px;
        background: #f5f5f5;
        border-top: none;
        border-bottom: 2px solid #ddd;
        vertical-align: top;
        box-sizing: border-box;
    }

    .delete-reasons-index .dr-mobile-detail-blocks {
        display: flex;
        flex-wrap: wrap;
        gap: 12px 20px;
        width: 100%;
        min-width: 100%;
        box-sizing: border-box;
    }

    .delete-reasons-index .dr-mobile-detail-block {
        min-width: 140px;
        flex: 1 1 180px;
        max-width: 100%;
    }

    .delete-reasons-index .dr-mobile-detail-block-title {
        font-weight: bold;
        font-size: 11px;
        color: #666;
        margin-bottom: 4px;
    }

    .delete-reasons-index .dr-mobile-detail-block-value {
        font-size: 13px;
    }

    /* ========== /bills/bill-files/index — Номер документа + Тип файла + Подробнее ========== */
    .bill-files-index {
        overflow-x: hidden;
        max-width: 100%;
        width: 100% !important;
    }

    .bill-files-index .bff-grid-container,
    .bill-files-index .grid-view,
    .bill-files-index .grid-view .table-responsive,
    .bill-files-index .bff-grid-table {
        overflow-x: hidden !important;
        max-width: 100%;
    }

    .bill-files-index .grid-view thead tr.filters,
    .bill-files-index .grid-view thead tr:nth-child(2) {
        display: none !important;
    }

    .bill-files-index .bff-grid-table {
        table-layout: fixed;
        width: 100%;
        max-width: 100%;
    }

    .bill-files-index .bff-grid-table thead th.bff-col-number,
    .bill-files-index .bff-grid-table tbody td.bff-col-number {
        width: 50%;
    }

    .bill-files-index .bff-grid-table thead th.bff-col-type,
    .bill-files-index .bff-grid-table tbody td.bff-col-type {
        width: 50%;
    }

    .bill-files-index .bff-grid-table thead th.bff-col-number,
    .bill-files-index .bff-grid-table tbody td.bff-col-number,
    .bill-files-index .bff-grid-table thead th.bff-col-type,
    .bill-files-index .bff-grid-table tbody td.bff-col-type {
        overflow-wrap: break-word;
        word-break: break-word;
        white-space: normal;
    }

    .bill-files-index .bff-grid-table thead th.bff-col-serial,
    .bill-files-index .bff-grid-table tbody td.bff-col-serial,
    .bill-files-index .bff-grid-table thead th.bff-col-file,
    .bill-files-index .bff-grid-table tbody td.bff-col-file,
    .bill-files-index .bff-grid-table thead th.bff-col-created-at,
    .bill-files-index .bff-grid-table tbody td.bff-col-created-at,
    .bill-files-index .bff-grid-table thead th.bff-col-actions,
    .bill-files-index .bff-grid-table tbody tr:not(.bff-mobile-actions-row) td.bff-col-actions,
    .bill-files-index .bff-grid-table thead th.bff-col-more,
    .bill-files-index .bff-grid-table tbody tr:not(.bff-mobile-more-row) td.bff-col-more {
        display: none !important;
        width: 0 !important;
        min-width: 0 !important;
        max-width: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        border: none !important;
    }

    .bill-files-index .bff-grid-container .bff-grid-table .bff-mobile-actions-row td {
        padding: 6px 12px;
        border-top: none;
        background: #f5f5f5;
        border-bottom: 1px solid #eee;
        box-sizing: border-box;
        vertical-align: middle;
    }

    .bill-files-index .bff-grid-container .bff-grid-table .bff-mobile-actions-wrap {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-start;
        gap: 4px 12px;
    }

    .bill-files-index .bff-grid-container .bff-grid-table .bff-mobile-actions-wrap a,
    .bill-files-index .bff-grid-container .bff-grid-table .bff-mobile-actions-wrap input[type="checkbox"] {
        display: inline-block;
        padding: 4px 6px;
    }

    .bill-files-index .bff-grid-container .bff-grid-table .bff-mobile-more-row td {
        padding: 8px 12px;
        border-top: none;
        background: #fff;
        border-bottom: 1px solid #eee;
        box-sizing: border-box;
    }

    .bill-files-index .bff-grid-container .bff-grid-table .bff-more-btn-wrap {
        width: 100%;
        display: block;
    }

    .bill-files-index .bff-grid-container .bff-grid-table .bff-mobile-more-row .js-bff-row-more {
        display: block;
        width: 100% !important;
        box-sizing: border-box;
        font-size: 12px;
    }

    .bill-files-index .bff-grid-container .bff-grid-table .bff-mobile-detail {
        display: block;
    }

    .bill-files-index .bff-grid-container .bff-grid-table .bff-mobile-detail td {
        display: block;
        width: 100% !important;
        min-width: 100%;
        max-width: 100%;
        padding: 12px;
        background: #f5f5f5;
        border-top: none;
        border-bottom: 2px solid #ddd;
        vertical-align: top;
        box-sizing: border-box;
    }

    .bill-files-index .bff-mobile-detail-blocks {
        display: flex;
        flex-wrap: wrap;
        gap: 12px 20px;
        width: 100%;
        min-width: 100%;
        box-sizing: border-box;
    }

    .bill-files-index .bff-mobile-detail-block {
        min-width: 140px;
        flex: 1 1 180px;
        max-width: 100%;
    }

    .bill-files-index .bff-mobile-detail-block-title {
        font-weight: bold;
        font-size: 11px;
        color: #666;
        margin-bottom: 4px;
    }

    .bill-files-index .bff-mobile-detail-block-value {
        font-size: 13px;
    }

    /* ========== /bills/contractor-files/index — только Номер документа + Подробнее ========== */
    .contractor-files-index {
        overflow-x: hidden;
        max-width: 100%;
        width: 100% !important;
    }

    .contractor-files-index .cff-grid-container,
    .contractor-files-index .grid-view,
    .contractor-files-index .grid-view .table-responsive,
    .contractor-files-index .cff-grid-table {
        overflow-x: hidden !important;
        max-width: 100%;
    }

    .contractor-files-index .grid-view thead tr.filters,
    .contractor-files-index .grid-view thead tr:nth-child(2) {
        display: none !important;
    }

    .contractor-files-index .cff-grid-table {
        table-layout: fixed;
        width: 100%;
        max-width: 100%;
    }

    .contractor-files-index .cff-grid-table thead th.cff-col-number,
    .contractor-files-index .cff-grid-table tbody td.cff-col-number {
        width: 100%;
    }

    .contractor-files-index .cff-grid-table thead th.cff-col-number,
    .contractor-files-index .cff-grid-table tbody td.cff-col-number {
        overflow-wrap: break-word;
        word-break: break-word;
        white-space: normal;
    }

    .contractor-files-index .cff-grid-table thead th.cff-col-serial,
    .contractor-files-index .cff-grid-table tbody td.cff-col-serial,
    .contractor-files-index .cff-grid-table thead th.cff-col-file-path,
    .contractor-files-index .cff-grid-table tbody td.cff-col-file-path,
    .contractor-files-index .cff-grid-table thead th.cff-col-date,
    .contractor-files-index .cff-grid-table tbody td.cff-col-date,
    .contractor-files-index .cff-grid-table thead th.cff-col-actions,
    .contractor-files-index .cff-grid-table tbody tr:not(.cff-mobile-actions-row) td.cff-col-actions,
    .contractor-files-index .cff-grid-table thead th.cff-col-more,
    .contractor-files-index .cff-grid-table tbody tr:not(.cff-mobile-more-row) td.cff-col-more {
        display: none !important;
        width: 0 !important;
        min-width: 0 !important;
        max-width: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        border: none !important;
    }

    .contractor-files-index .cff-grid-container .cff-grid-table .cff-mobile-actions-row td {
        padding: 6px 12px;
        border-top: none;
        background: #f5f5f5;
        border-bottom: 1px solid #eee;
        box-sizing: border-box;
        vertical-align: middle;
    }

    .contractor-files-index .cff-grid-container .cff-grid-table .cff-mobile-actions-wrap {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-start;
        gap: 4px 12px;
    }

    .contractor-files-index .cff-grid-container .cff-grid-table .cff-mobile-actions-wrap a,
    .contractor-files-index .cff-grid-container .cff-grid-table .cff-mobile-actions-wrap input[type="checkbox"] {
        display: inline-block;
        padding: 4px 6px;
    }

    .contractor-files-index .cff-grid-container .cff-grid-table .cff-mobile-more-row td {
        padding: 8px 12px;
        border-top: none;
        background: #fff;
        border-bottom: 1px solid #eee;
        box-sizing: border-box;
    }

    .contractor-files-index .cff-grid-container .cff-grid-table .cff-more-btn-wrap {
        width: 100%;
        display: block;
    }

    .contractor-files-index .cff-grid-container .cff-grid-table .cff-mobile-more-row .js-cff-row-more {
        display: block;
        width: 100% !important;
        box-sizing: border-box;
        font-size: 12px;
    }

    .contractor-files-index .cff-grid-container .cff-grid-table .cff-mobile-detail {
        display: block;
    }

    .contractor-files-index .cff-grid-container .cff-grid-table .cff-mobile-detail td {
        display: block;
        width: 100% !important;
        min-width: 100%;
        max-width: 100%;
        padding: 12px;
        background: #f5f5f5;
        border-top: none;
        border-bottom: 2px solid #ddd;
        vertical-align: top;
        box-sizing: border-box;
    }

    .contractor-files-index .cff-mobile-detail-blocks {
        display: flex;
        flex-wrap: wrap;
        gap: 12px 20px;
        width: 100%;
        min-width: 100%;
        box-sizing: border-box;
    }

    .contractor-files-index .cff-mobile-detail-block {
        min-width: 140px;
        flex: 1 1 180px;
        max-width: 100%;
    }

    .contractor-files-index .cff-mobile-detail-block-title {
        font-weight: bold;
        font-size: 11px;
        color: #666;
        margin-bottom: 4px;
    }

    .contractor-files-index .cff-mobile-detail-block-value {
        font-size: 13px;
    }

    /* ========== /pricelists/currency/index — Наименование + Курс + Подробнее ========== */
    .pricelist-currency-index {
        overflow-x: hidden;
        max-width: 100%;
        width: 100% !important;
    }

    .pricelist-currency-index .plc-grid-container,
    .pricelist-currency-index .grid-view,
    .pricelist-currency-index .grid-view .table-responsive,
    .pricelist-currency-index .plc-grid-table {
        overflow-x: hidden !important;
        max-width: 100%;
    }

    .pricelist-currency-index .grid-view thead tr.filters,
    .pricelist-currency-index .grid-view thead tr:nth-child(2) {
        display: none !important;
    }

    .pricelist-currency-index .plc-grid-table {
        table-layout: fixed;
        width: 100%;
        max-width: 100%;
    }

    .pricelist-currency-index .plc-grid-table thead th.plc-col-name,
    .pricelist-currency-index .plc-grid-table tbody td.plc-col-name {
        width: 50%;
    }

    .pricelist-currency-index .plc-grid-table thead th.plc-col-rate,
    .pricelist-currency-index .plc-grid-table tbody td.plc-col-rate {
        width: 50%;
    }

    .pricelist-currency-index .plc-grid-table thead th.plc-col-name,
    .pricelist-currency-index .plc-grid-table tbody td.plc-col-name,
    .pricelist-currency-index .plc-grid-table thead th.plc-col-rate,
    .pricelist-currency-index .plc-grid-table tbody td.plc-col-rate {
        overflow-wrap: break-word;
        word-break: break-word;
        white-space: normal;
    }

    .pricelist-currency-index .plc-grid-table thead th.plc-col-serial,
    .pricelist-currency-index .plc-grid-table tbody td.plc-col-serial,
    .pricelist-currency-index .plc-grid-table thead th.plc-col-id,
    .pricelist-currency-index .plc-grid-table tbody td.plc-col-id,
    .pricelist-currency-index .plc-grid-table thead th.plc-col-format,
    .pricelist-currency-index .plc-grid-table tbody td.plc-col-format,
    .pricelist-currency-index .plc-grid-table thead th.plc-col-actions,
    .pricelist-currency-index .plc-grid-table tbody tr:not(.plc-mobile-actions-row) td.plc-col-actions,
    .pricelist-currency-index .plc-grid-table thead th.plc-col-more,
    .pricelist-currency-index .plc-grid-table tbody tr:not(.plc-mobile-more-row) td.plc-col-more {
        display: none !important;
        width: 0 !important;
        min-width: 0 !important;
        max-width: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        border: none !important;
    }

    .pricelist-currency-index .plc-grid-container .plc-grid-table .plc-mobile-actions-row td {
        padding: 6px 12px;
        border-top: none;
        background: #f5f5f5;
        border-bottom: 1px solid #eee;
        box-sizing: border-box;
        vertical-align: middle;
    }

    .pricelist-currency-index .plc-grid-container .plc-grid-table .plc-mobile-actions-wrap {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-start;
        gap: 4px 12px;
    }

    .pricelist-currency-index .plc-grid-container .plc-grid-table .plc-mobile-actions-wrap a,
    .pricelist-currency-index .plc-grid-container .plc-grid-table .plc-mobile-actions-wrap input[type="checkbox"] {
        display: inline-block;
        padding: 4px 6px;
    }

    .pricelist-currency-index .plc-grid-container .plc-grid-table .plc-mobile-more-row td {
        padding: 8px 12px;
        border-top: none;
        background: #fff;
        border-bottom: 1px solid #eee;
        box-sizing: border-box;
    }

    .pricelist-currency-index .plc-grid-container .plc-grid-table .plc-more-btn-wrap {
        width: 100%;
        display: block;
    }

    .pricelist-currency-index .plc-grid-container .plc-grid-table .plc-mobile-more-row .js-plc-row-more {
        display: block;
        width: 100% !important;
        box-sizing: border-box;
        font-size: 12px;
    }

    .pricelist-currency-index .plc-grid-container .plc-grid-table .plc-mobile-detail {
        display: block;
    }

    .pricelist-currency-index .plc-grid-container .plc-grid-table .plc-mobile-detail td {
        display: block;
        width: 100% !important;
        min-width: 100%;
        max-width: 100%;
        padding: 12px;
        background: #f5f5f5;
        border-top: none;
        border-bottom: 2px solid #ddd;
        vertical-align: top;
        box-sizing: border-box;
    }

    .pricelist-currency-index .plc-mobile-detail-blocks {
        display: flex;
        flex-wrap: wrap;
        gap: 12px 20px;
        width: 100%;
        min-width: 100%;
        box-sizing: border-box;
    }

    .pricelist-currency-index .plc-mobile-detail-block {
        min-width: 140px;
        flex: 1 1 180px;
        max-width: 100%;
    }

    .pricelist-currency-index .plc-mobile-detail-block-title {
        font-weight: bold;
        font-size: 11px;
        color: #666;
        margin-bottom: 4px;
    }

    .pricelist-currency-index .plc-mobile-detail-block-value {
        font-size: 13px;
    }

    /* ========== /pricelists/pricelist/index — широкая таблица: горизонтальная прокрутка (Bootstrap .table-responsive) ========== */
    .container:has(.pricelist-index) {
        overflow-x: visible;
        max-width: 100%;
    }
    .pricelist-index {
        overflow-x: visible;
        max-width: 100%;
    }
    .pricelist-index .pricelist-index-main-col,
    .pricelist-index .grid-view {
        overflow-x: visible;
        max-width: 100%;
    }
    .pricelist-index .pricelist-index-items-scroll {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 12px;
    }
    .pricelist-index .pricelist-index-grid-table {
        margin-bottom: 0;
    }

    /* ========== /statistics/statistic/index — вертикальный зазор между рядами графиков (сетка: col-xs-12 / col-sm-6) ========== */
    .statistic-index > .container:last-of-type > .row {
        margin-bottom: 20px;
    }
    .statistic-index > .container:last-of-type > .row:last-child {
        margin-bottom: 0;
    }

    /* ========== /statistics/user-manager/index — зазор между таблицей и графиком при стеке col-xs-12 ========== */
    .user-manager-index .user-manager-chart-split-row {
        margin-bottom: 16px;
    }

    /* Горизонтальная прокрутка широких таблиц (Bootstrap .table-responsive) */
    .container:has(.user-manager-index) {
        overflow-x: visible;
        max-width: 100%;
    }
    .user-manager-index {
        overflow-x: visible;
        max-width: 100%;
    }
    .user-manager-index .container {
        overflow-x: visible;
        max-width: 100%;
    }
    .user-manager-index .user-manager-table-scroll {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .user-manager-index .user-manager-table-scroll .table {
        margin-bottom: 0;
    }

    /* ========== /statistics/bill-status/index — стек блоков + прокрутка таблиц ========== */
    .bill-status-index .bill-status-chart-split-row {
        margin-bottom: 16px;
    }
    .container:has(.bill-status-index) {
        overflow-x: visible;
        max-width: 100%;
    }
    .bill-status-index {
        overflow-x: visible;
        max-width: 100%;
    }
    .bill-status-index .container {
        overflow-x: visible;
        max-width: 100%;
    }
    .bill-status-index .bill-status-table-scroll {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .bill-status-index .bill-status-table-scroll .table {
        margin-bottom: 0;
    }

    /* ========== /statistics/bill-provider/index — стек + прокрутка таблиц ========== */
    .bill-provider-index .bill-provider-chart-split-row,
    .bill-provider-index .bill-provider-largest-chart-split-row {
        margin-bottom: 16px;
    }
    .container:has(.bill-provider-index) {
        overflow-x: visible;
        max-width: 100%;
    }
    .bill-provider-index {
        overflow-x: visible;
        max-width: 100%;
    }
    .bill-provider-index .container {
        overflow-x: visible;
        max-width: 100%;
    }
    .bill-provider-index .bill-provider-table-scroll {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .bill-provider-index .bill-provider-table-scroll .table {
        margin-bottom: 0;
    }

    /* ========== /statistics/bill-contractor/index — стек + прокрутка таблиц ========== */
    .bill-contractor-index .bill-contractor-chart-split-row {
        margin-bottom: 16px;
    }
    .container:has(.bill-contractor-index) {
        overflow-x: visible;
        max-width: 100%;
    }
    .bill-contractor-index {
        overflow-x: visible;
        max-width: 100%;
    }
    .bill-contractor-index .container {
        overflow-x: visible;
        max-width: 100%;
    }
    .bill-contractor-index .bill-contractor-table-scroll {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .bill-contractor-index .bill-contractor-table-scroll .table {
        margin-bottom: 0;
    }

    /* ========== /statistics/bill-product/index — стек + прокрутка таблиц ========== */
    .bill-product-index .bill-product-chart-split-row {
        margin-bottom: 16px;
    }
    .container:has(.bill-product-index) {
        overflow-x: visible;
        max-width: 100%;
    }
    .bill-product-index {
        overflow-x: visible;
        max-width: 100%;
    }
    .bill-product-index .container {
        overflow-x: visible;
        max-width: 100%;
    }
    .bill-product-index .bill-product-table-scroll {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .bill-product-index .bill-product-table-scroll .table {
        margin-bottom: 0;
    }

    /* ========== /statistics/bill-shop/index — стек + прокрутка таблиц ========== */
    .bill-shop-index .bill-shop-chart-split-row {
        margin-bottom: 16px;
    }
    .container:has(.bill-shop-index) {
        overflow-x: visible;
        max-width: 100%;
    }
    .bill-shop-index {
        overflow-x: visible;
        max-width: 100%;
    }
    .bill-shop-index .container {
        overflow-x: visible;
        max-width: 100%;
    }
    .bill-shop-index .bill-shop-table-scroll {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .bill-shop-index .bill-shop-table-scroll .table {
        margin-bottom: 0;
    }

    /* ========== /statistics/bill-delivery/index — стек + прокрутка таблиц ========== */
    .bill-delivery-index .bill-delivery-chart-split-row {
        margin-bottom: 16px;
    }
    .container:has(.bill-delivery-index) {
        overflow-x: visible;
        max-width: 100%;
    }
    .bill-delivery-index {
        overflow-x: visible;
        max-width: 100%;
    }
    .bill-delivery-index .container {
        overflow-x: visible;
        max-width: 100%;
    }
    .bill-delivery-index .bill-delivery-table-scroll {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .bill-delivery-index .bill-delivery-table-scroll .table {
        margin-bottom: 0;
    }

    /* ========== /bills/requisites/index — адаптив таблицы (Название + ИНН) ========== */
    .requisites-index {
        overflow-x: hidden;
        max-width: 100%;
        width: 100% !important;
    }
    .requisites-index .requisites-grid-container,
    .requisites-index .grid-view,
    .requisites-index .grid-view .table-responsive,
    .requisites-index .requisites-grid-table {
        overflow-x: hidden !important;
        max-width: 100%;
    }

    .requisites-index .grid-view thead tr.filters,
    .requisites-index .grid-view thead tr:nth-child(2) {
        display: none !important;
    }

    .requisites-index .requisites-grid-table {
        table-layout: fixed;
        width: 100%;
        max-width: 100%;
    }

    /* Видимые колонки на мобилке: Название + ИНН */
    .requisites-index .requisites-grid-table thead th.requisites-col-organization-name,
    .requisites-index .requisites-grid-table tbody td.requisites-col-organization-name { width: 50%; }
    .requisites-index .requisites-grid-table thead th.requisites-col-inn,
    .requisites-index .requisites-grid-table tbody td.requisites-col-inn { width: 50%; }

    /* Перенос по словам для «Название организации», чтобы не ломать адаптив */
    .requisites-index .requisites-grid-table thead th.requisites-col-organization-name,
    .requisites-index .requisites-grid-table tbody td.requisites-col-organization-name,
    .requisites-index .requisites-grid-table thead th.requisites-col-inn,
    .requisites-index .requisites-grid-table tbody td.requisites-col-inn {
        overflow-wrap: break-word;
        word-break: break-word;
        white-space: normal;
    }

    /* Скрываем остальные колонки в основном ряду */
    .requisites-index .requisites-grid-table thead th.requisites-col-serial,
    .requisites-index .requisites-grid-table tbody td.requisites-col-serial,
    .requisites-index .requisites-grid-table thead th.requisites-col-id,
    .requisites-index .requisites-grid-table tbody td.requisites-col-id,
    .requisites-index .requisites-grid-table thead th.requisites-col-directors-fio,
    .requisites-index .requisites-grid-table tbody td.requisites-col-directors-fio,
    .requisites-index .requisites-grid-table thead th.requisites-col-shipping-number,
    .requisites-index .requisites-grid-table tbody td.requisites-col-shipping-number,
    .requisites-index .requisites-grid-table thead th.requisites-col-is-default,
    .requisites-index .requisites-grid-table tbody td.requisites-col-is-default,
    .requisites-index .requisites-grid-table thead th.requisites-col-actions,
    .requisites-index .requisites-grid-table tbody td.requisites-col-actions,
    .requisites-index .requisites-grid-table thead th.requisites-col-more,
    .requisites-index .requisites-grid-table tbody td.requisites-col-more {
        display: none !important;
        width: 0 !important;
        min-width: 0 !important;
        max-width: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        border: none !important;
    }

    /* Строка с действиями над «Подробнее» */
    .requisites-index .requisites-grid-container .requisites-grid-table .requisites-mobile-actions-row td {
        padding: 6px 12px;
        border-top: none;
        background: #f5f5f5;
        border-bottom: 1px solid #eee;
        box-sizing: border-box;
        vertical-align: middle;
    }
    .requisites-index .requisites-grid-container .requisites-grid-table .requisites-mobile-actions-wrap {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-start;
        gap: 4px 12px;
    }
    .requisites-index .requisites-grid-container .requisites-grid-table .requisites-mobile-actions-wrap a {
        display: inline-block;
        padding: 2px 4px;
        margin: 0 1px;
    }

    /* Строка «Подробнее» */
    .requisites-index .requisites-grid-container .requisites-grid-table .requisites-mobile-more-row td {
        padding: 8px 12px;
        border-top: none;
        background: #fff;
        border-bottom: 1px solid #eee;
        box-sizing: border-box;
    }
    .requisites-index .requisites-grid-container .requisites-grid-table .requisites-more-btn-wrap {
        width: 100%;
        display: block;
    }
    .requisites-index .requisites-grid-container .requisites-grid-table .requisites-mobile-more-row .js-requisites-row-more {
        display: block;
        width: 100% !important;
        box-sizing: border-box;
        font-size: 12px;
    }

    /* Раскрытый блок деталей */
    .requisites-index .requisites-grid-container .requisites-grid-table .requisites-mobile-detail {
        display: block;
    }
    .requisites-index .requisites-grid-container .requisites-grid-table .requisites-mobile-detail td {
        display: block;
        width: 100% !important;
        min-width: 100%;
        max-width: 100%;
        padding: 12px;
        background: #f5f5f5;
        border-top: none;
        border-bottom: 2px solid #ddd;
        vertical-align: top;
        box-sizing: border-box;
    }
    .requisites-index .requisites-mobile-detail-blocks {
        display: flex;
        flex-wrap: wrap;
        gap: 12px 20px;
        width: 100%;
        min-width: 100%;
        box-sizing: border-box;
    }
    .requisites-index .requisites-mobile-detail-block {
        min-width: 140px;
        flex: 1 1 180px;
        max-width: 100%;
    }
    .requisites-index .requisites-mobile-detail-block-title {
        font-weight: bold;
        font-size: 11px;
        color: #666;
        margin-bottom: 4px;
    }
    .requisites-index .requisites-mobile-detail-block-value {
        font-size: 13px;
    }

    .mail-topline-actions{
        justify-content: start;
        margin-top: 10px;
        flex-flow: row-reverse wrap-reverse;
    }

    .mail-topline-settings-btn {
        margin-left: 0;
    }

    .mail-topline-search-form input[type=text]{
        width: auto;
    }

    .mail-settings-filters-table{
        margin-top: 10px;
    }

    .create-template-btn{
        margin-top: 10px;
        text-align: left;
    }

    .show-date-field{
        margin-top: 20px;
    }
}

/* Экран ≤482px — уменьшенный шрифт и отступы */
@media (max-width: 482px) {
    .bill-index .big-grid-container .kv-grid-table {
        font-size: 12px;
    }
    /* Кнопка «Подробнее» — не уменьшать, оставить на всю ширину и прежний размер */
    .bill-index .big-grid-container .kv-grid-table .bill-mobile-more-row,
    .bill-index .big-grid-container .kv-grid-table .bill-mobile-more-row .js-bill-row-more {
        font-size: 12px;
    }
    .bill-index .big-grid-container .kv-grid-table .bill-mobile-more-row .js-bill-row-more {
        width: 100% !important;
    }
    .bill-index .big-grid-container .kv-grid-table tbody td.bill-col-number,
    .bill-index .big-grid-container .kv-grid-table tbody td.bill-col-amount,
    .bill-index .big-grid-container .kv-grid-table tbody td.bill-col-product,
    .bill-index .big-grid-container .kv-grid-table tbody td.bill-col-contractor,
    .bill-index .big-grid-container .kv-grid-table tbody td.bill-col-status,
    .bill-index .big-grid-container .kv-grid-table tbody td.bill-col-provider,
    .bill-index .big-grid-container .kv-grid-table tbody td.bill-col-actions {
        padding: 6px 8px;
    }
}

/* Меньше 467px — шрифт ещё на 20% меньше (80% от текущего) */
@media (max-width: 466px) {
    .bill-index .big-grid-container .kv-grid-table {
        font-size: 80%;
    }
    /* Кнопка «Подробнее» — не уменьшать, как при 482px: на всю ширину, тот же размер */
    .bill-index .big-grid-container .kv-grid-table .bill-mobile-more-row,
    .bill-index .big-grid-container .kv-grid-table .bill-mobile-more-row .js-bill-row-more {
        font-size: 12px;
    }
    .bill-index .big-grid-container .kv-grid-table .bill-mobile-more-row .js-bill-row-more {
        width: 100% !important;
    }
}

@media (max-width: 350px) {
    .bill-index .big-grid-container .kv-grid-table {
        font-size: 11px;
    }
    /* Кнопка «Подробнее» — без уменьшения, на всю ширину */
    .bill-index .big-grid-container .kv-grid-table .bill-mobile-more-row,
    .bill-index .big-grid-container .kv-grid-table .bill-mobile-more-row .js-bill-row-more {
        font-size: 12px;
    }
    .bill-index .big-grid-container .kv-grid-table .bill-mobile-more-row .js-bill-row-more {
        width: 100% !important;
    }
}

/* ≤349px — шрифт ещё на 30% меньше (70% от 11px ≈ 8px) */
@media (max-width: 349px) {
    .bill-index .big-grid-container .kv-grid-table {
        font-size: 8px;
    }
    /* Кнопка «Подробнее» — без уменьшения */
    .bill-index .big-grid-container .kv-grid-table .bill-mobile-more-row,
    .bill-index .big-grid-container .kv-grid-table .bill-mobile-more-row .js-bill-row-more {
        font-size: 12px;
    }
    .bill-index .big-grid-container .kv-grid-table .bill-mobile-more-row .js-bill-row-more {
        width: 100% !important;
    }
}

/* ========== /bills/bill/update — Товары и Почта ========== */
@media (max-width: 767px) {
    .bill-products-block #products-table thead { display: none; }
    .bill-products-block #products-table tbody tr {
        display: block;
        border: 1px solid #ddd;
        border-radius: 8px;
        padding: 12px;
        margin-bottom: 12px;
        background: #fff;
        box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    }
    .bill-products-block #products-table tbody td {
        display: block;
        width: 100%;
        border: none;
        padding: 8px 0;
        margin: 0;
    }
    .bill-products-block #products-table tbody td::before {
        font-weight: bold;
        display: block;
        margin-bottom: 4px;
        color: #555;
        font-size: 12px;
    }
    .bill-products-block #products-table tbody td:nth-child(1)::before { content: "Код"; }
    .bill-products-block #products-table tbody td:nth-child(1) .billProduct-shortName { margin-top: 10px; }
    .bill-products-block #products-table tbody td:nth-child(1) .billProduct-shortName::before {
        content: "Краткое наименование";
        font-weight: bold;
        display: block;
        margin-bottom: 4px;
        color: #555;
        font-size: 12px;
    }
    .bill-products-block #products-table tbody td:nth-child(2)::before { content: "Наименование"; }
    .bill-products-block #products-table tbody td:nth-child(3)::before { content: "ГТД"; }
    .bill-products-block #products-table tbody td:nth-child(3).billProduct-gtd::before { display: none; }
    .bill-products-block #products-table tbody td:nth-child(3) .gtd-mobile-header {
        font-weight: bold;
        margin-bottom: 4px;
        color: #555;
        font-size: 12px;
        cursor: pointer;
        padding: 6px 0;
        user-select: none;
    }
    .bill-products-block #products-table tbody td:nth-child(3) .gtd-mobile-header-toggle { color: #337ab7; margin-left: 8px; }
    .bill-products-block #products-table tbody td:nth-child(4)::before { content: "Кол-во"; }
    .bill-products-block #products-table tbody td:nth-child(5)::before { content: "Ед. изм."; }
    .bill-products-block #products-table tbody td:nth-child(6)::before { content: "Цена"; }
    .bill-products-block #products-table tbody td:nth-child(7)::before { content: "Сумма"; }
    .bill-products-block #products-table tbody td:nth-child(7) .product-table-sum { font-weight: bold; }
    .bill-products-block #products-table tbody td:nth-child(8)::before { content: ""; }
    .bill-products-block #products-table tbody td:nth-child(8) { padding-top: 12px; border-top: 1px solid #eee; }
    .bill-products-block #products-table tbody td:nth-child(8) .billProduct-trash { width: 100%; }
    .bill-products-block #products-table .billProduct-code,
    .bill-products-block #products-table .billProduct-shortName,
    .bill-products-block #products-table .billProduct-name,
    .bill-products-block #products-table .billProduct-count,
    .bill-products-block #products-table .billProduct-unit,
    .bill-products-block #products-table .billProduct-price {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    .bill-products-block .bill-products-actions { display: flex; flex-direction: column; gap: 8px; }
    .bill-products-block .bill-products-actions .btn { width: 100%; }
    #modal-search-product.modal .modal-dialog-product-search { width: 100%; max-width: none; margin: 0; height: 100vh; }
    #modal-search-product.modal .modal-content { height: 100%; border-radius: 0; }
    #modal-search-product.modal .modal-body { max-height: calc(100vh - 120px); overflow-y: auto; }
    #modal-search-product.modal #product-search-result thead { display: none; }
    #modal-search-product.modal #product-search-result tbody tr {
        display: block;
        border: 1px solid #eee;
        padding: 10px;
        margin-bottom: 8px;
        border-radius: 4px;
    }
    #modal-search-product.modal #product-search-result tbody td { display: block; border: none; padding: 4px 0; }
    #modal-search-product.modal #product-search-result tbody td:nth-child(1)::before { content: "Код: "; font-weight: bold; }
    #modal-search-product.modal #product-search-result tbody td:nth-child(2)::before { content: "Наименование: "; font-weight: bold; }
    #modal-search-product.modal #product-search-result tbody td:nth-child(3)::before { content: "Цена: "; font-weight: bold; }
    #modal-search-product.modal #product-search-result tbody td:nth-child(4) { margin-top: 8px; }
    #modal-search-product.modal #product-search-result tbody td:nth-child(4) .btn { width: 100%; }
    .bill-update .compact-mail-iframe-container #mail-split-iframe { min-height: 70vh; height: 80vh; }

    /* Модальное окно «Отправить запрос поставщику» — блок Товары в блочном виде */
    .modal .mail-provider-products-panel .multiple-input-list {
        table-layout: fixed;
        width: 100%;
    }
    .modal .mail-provider-products-panel .multiple-input-list thead {
        display: none;
    }
    .modal .mail-provider-products-panel .multiple-input-list tfoot {
        display: none;
    }
    .modal .mail-provider-products-panel .multiple-input-list tbody tr {
        display: block;
        border: 1px solid #ddd;
        border-radius: 8px;
        padding: 12px;
        margin-bottom: 12px;
        background: #fff;
        box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    }
    .modal .mail-provider-products-panel .multiple-input-list tbody td {
        display: block;
        width: 100%;
        border: none;
        padding: 8px 0;
        margin: 0;
    }
    .modal .mail-provider-products-panel .multiple-input-list tbody td::before {
        font-weight: bold;
        display: block;
        margin-bottom: 4px;
        color: #555;
        font-size: 12px;
    }
    .modal .mail-provider-products-panel .multiple-input-list tbody td.list-cell__sending::before { content: "Отправляем"; }
    .modal .mail-provider-products-panel .multiple-input-list tbody td.list-cell__code::before { content: "Код"; }
    .modal .mail-provider-products-panel .multiple-input-list tbody td.list-cell__name::before { content: "Наименование"; }
    .modal .mail-provider-products-panel .multiple-input-list tbody td.list-cell__count::before { content: "Количество"; }
    .modal .mail-provider-products-panel .multiple-input-list tbody td.list-cell__unit::before { content: "Ед. изм."; }
    .modal .mail-provider-products-panel .multiple-input-list tbody td.list-cell__button::before { content: ""; }
    .modal .mail-provider-products-panel .multiple-input-list tbody td.list-cell__button {
        padding-top: 12px;
        border-top: 1px solid #eee;
    }

    /* ========== /mail/settings/filters — таблица правил ========== */
    .mail-settings-filters-table thead {
        display: none;
    }
    .mail-settings-filters-table tbody tr {
        display: block;
        border: 1px solid #ddd;
        border-radius: 8px;
        padding: 12px;
        margin-bottom: 12px;
        background: #fff;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    }
    .mail-settings-filters-table tbody td {
        display: block;
        width: 100%;
        border: none;
        padding: 8px 0;
        margin: 0;
    }
    .mail-settings-filters-table tbody td::before {
        font-weight: bold;
        display: block;
        margin-bottom: 4px;
        color: #555;
        font-size: 12px;
    }
    .mail-settings-filters-table tbody td.mail-settings-filters-cell-conditions::before {
        content: "Условия";
    }
    .mail-settings-filters-table tbody td.mail-settings-filters-cell-folder::before {
        content: "Папка назначения";
    }
    .mail-settings-filters-table tbody td.mail-settings-filters-cell-actions::before {
        content: "";
    }
    .mail-settings-filters-table tbody td.mail-settings-filters-cell-actions {
        padding-top: 12px;
        margin-top: 8px;
        border-top: 1px solid #eee;
        text-align: left;
    }
    .mail-settings-filters-table tbody td.mail-settings-filters-cell-actions a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 44px;
        min-height: 44px;
        margin-right: 8px;
        padding: 10px 14px;
        font-size: 18px;
        border: 1px solid #ccc;
        border-radius: 4px;
        background: #fff;
        color: #333;
        text-decoration: none;
    }
    .mail-settings-filters-table tbody td.mail-settings-filters-cell-actions a:hover {
        background: #f5f5f5;
        border-color: #adadad;
    }
    .mail-settings-filters-table tbody td.mail-settings-filters-cell-actions a.glyphicon-trash {
        color: #a94442;
    }
    .mail-settings-filters-table tbody td.mail-settings-filters-cell-actions a.glyphicon-trash:hover {
        background: #f2dede;
        border-color: #a94442;
    }

    /* ========== /mail/settings/templates — таблица шаблонов ========== */
    .mail-settings-templates-table thead {
        display: none;
    }
    .mail-settings-templates-table tbody tr {
        display: block;
        border: 1px solid #ddd;
        border-radius: 8px;
        padding: 12px;
        margin-bottom: 12px;
        background: #fff;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    }
    .mail-settings-templates-table tbody td {
        display: block;
        width: 100%;
        border: none;
        padding: 8px 0;
        margin: 0;
    }
    .mail-settings-templates-table tbody td::before {
        font-weight: bold;
        display: block;
        margin-bottom: 4px;
        color: #555;
        font-size: 12px;
    }
    .mail-settings-templates-table tbody td.mail-settings-templates-cell-name::before {
        content: "Название шаблона";
    }
    .mail-settings-templates-table tbody td.mail-settings-templates-cell-keywords::before {
        content: "Ключевые слова";
    }
    .mail-settings-templates-table tbody td.mail-settings-templates-cell-actions::before {
        content: "";
    }
    .mail-settings-templates-table tbody td.mail-settings-templates-cell-keywords {
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        max-width: none!important;
    }
    .mail-settings-templates-table tbody td.mail-settings-templates-cell-keywords .label {
        display: inline-block;
        max-width: 100%;
        white-space: normal;
    }
    .mail-settings-templates-table tbody td.mail-settings-templates-cell-actions {
        padding-top: 12px;
        margin-top: 8px;
        border-top: 1px solid #eee;
        text-align: left;
    }
    .mail-settings-templates-table tbody td.mail-settings-templates-cell-actions a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 44px;
        min-height: 44px;
        margin-right: 8px;
        padding: 10px 14px;
        font-size: 18px;
        border: 1px solid #ccc;
        border-radius: 4px;
        background: #fff;
        color: #333;
        text-decoration: none;
    }
    .mail-settings-templates-table tbody td.mail-settings-templates-cell-actions a:hover {
        background: #f5f5f5;
        border-color: #adadad;
    }
    .mail-settings-templates-table tbody td.mail-settings-templates-cell-actions a.glyphicon-trash {
        color: #a94442;
    }
    .mail-settings-templates-table tbody td.mail-settings-templates-cell-actions a.glyphicon-trash:hover {
        background: #f2dede;
        border-color: #a94442;
    }

    /* ========== /mail/settings/user-settings — таблица папок ========== */
    .mail-settings-user-table thead {
        display: none;
    }
    .mail-settings-user-table tbody tr {
        display: block;
        border: 1px solid #ddd;
        border-radius: 8px;
        padding: 12px;
        margin-bottom: 12px;
        background: #fff;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    }
    .mail-settings-user-table tbody td {
        display: block;
        width: 100%;
        border: none;
        padding: 8px 0;
        margin: 0;
    }
    /* Подписи колонок в карточках здесь не нужны — скрываем их */
    .mail-settings-user-table tbody td::before {
        display: none;
    }
    .mail-settings-user-table tbody td.mail-settings-user-cell-checkbox {
        padding-bottom: 4px;
    }
    .mail-settings-user-table tbody td.mail-settings-user-cell-checkbox input[type="checkbox"] {
        width: 24px;
        height: 24px;
    }
    /* Статус видимости рядом с чекбоксом, 4‑ю колонку скрываем на мобилках */
    .mail-settings-user-visibility-mobile {
        display: inline-block;
        margin-left: 10px;
        font-size: 15px;
        font-weight: 600;
    }
    .mail-settings-user-table tbody td.mail-settings-user-cell-visibility {
        display: none;
    }
    .mail-settings-user-table tbody td.mail-settings-user-cell-name .folder-name-container {
        padding-left: 0 !important;
    }
    .mail-settings-user-table tbody tr.folder-level-0 .mail-settings-user-cell-name .folder-name-container {
        padding-left: 0 !important;
    }
    .mail-settings-user-table tbody tr.folder-child .mail-settings-user-cell-name .folder-name-container {
        padding-left: 20px !important;
    }

    /* ========== /mail/settings/index — дата начала загрузки писем ========== */
    .mail-settings-start-date-group {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    .mail-settings-start-date-group > .form-control {
        width: 100% !important;
        max-width: 100%;
        box-sizing: border-box;
        margin-bottom: 8px;
    }
    .mail-settings-start-date-group .input-group-btn {
        width: 100%;
        display: block;
    }
    .mail-settings-start-date-group .input-group-btn .btn {
        width: 100%;
        white-space: normal;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
}

