/* всегда отображаю скроллбар */
body {
    overflow-y: scroll;
}

table {
    background: #fff;
    --bs-table-striped-color: none !important;
}

#dashboard-section {
    gap: 0 1rem;
}

#dashboard-section .col-6 {
    min-width: calc(50% - 0.5rem);
    width: 100%;
    flex: 1 0 33.33%;
}

@media (min-width: 768px) {
    #dashboard-section .col-md-6 {
        min-width: calc(50% - 0.5rem);
        width: 100%;
        flex: 1 0 33.33%;
    }
    #dashboard-section .col-md-4 {
        min-width: calc(33.33% - 0.667rem);
        max-width: calc(50% - 0.5rem);
        width: 100%;
        flex: 1 0 25%;
    }
}

select, option {
    font: -moz-pull-down-menu;
    font-size: inherit;
}
.sidebar-wrapper {
    z-index: 100000;
}
.sidebar-wrapper .sidebar-header img {
    height: 4rem;
}
.sidebar-wrapper .menu {
    margin-top: 0;
}
.sidebar-wrapper .sidebar-toggler.x {
    position: absolute;
    right: 0;
    top: 0;
    display: block;
    padding: 5px;
    opacity: 0.8;
}

.sidebar-toggler {
    position: fixed;
    padding: 10px;
    z-index: 1;
    opacity: 0.4;
}

.sidebar-toggler:hover {
    opacity: 1;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='rgba(0, 0, 0, 0.7)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E")
}

.navbar {
    z-index: -1;
}

.login-header {
    list-style: none;
    display: inline-block;
    position: fixed;
    right: 0;
    z-index: 1;
    opacity: 0.4;
}

.login-header:hover {
    opacity: 1;
}

.login-header li {
    display: inline-block;
    padding-right: 10px;
}

.login-header a {
    color: #000;
}

.swipe-area {
    position: fixed;
    width: 20px;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 100000;
}

#main .main-content {
    padding: 50px 1rem 1rem 1rem;
}
#main.nomenu {
    margin-left: 0;
}
.navbar {
    height: 50px;
    background-color: #f7faff;
    box-shadow: #000 0px 0px 5px;
    padding: 1rem;
}
.navbar-toggler-icon {
    width:2em;
    height:2em;
}
.page-title {
    margin-bottom: 1rem;
}
.sidebar-wrapper .menu .submenu li a {
    padding:.5rem 1.8rem;
    font-size:.85rem;
}
.sidebar-wrapper .menu .sidebar-link {
    align-items: flex-start;
}
.sidebar-link .bi {
    font-size: 1.2rem;
    line-height: 1.2rem;
}
.accordion-button.collapsed {
    background-color: #e7f1ff;
}
.form-control:read-only {
    background-color: #fff;
}
.form-control:disabled {
    background-color: #f2f4f4;
}
.submenu.active li.active:not(.has-sub) {
    background-color: #f7f7f7;
}

/* right modal */
.modal.right_modal{
    position: fixed;
    z-index: 99999;
}
.modal.right_modal .modal-dialog {
    position: fixed;
    margin: auto;
    /*width: 32%;*/
    min-width: 75%;
    height: 100%;
    -webkit-transform: translate3d(0%, 0, 0);
    -ms-transform: translate3d(0%, 0, 0);
    -o-transform: translate3d(0%, 0, 0);
    transform: translate3d(0%, 0, 0);
}
.modal-dialog {
    /* max-width: 100%; */
    margin: 1.75rem auto;
}
@media (min-width: 576px)
{
    .right_modal .modal-dialog {
        /*max-width: 100%; */
    }
}
.modal.right_modal .modal-content {
    /*overflow-y: auto;
    overflow-x: hidden;*/
    height: 100vh !important;
}
.modal.left_modal .modal-body,
.modal.right_modal .modal-body {
padding: 15px 15px 100px;
}
.modal-backdrop {
    /*display: none;*/
}
.modal.right_modal.fade .modal-dialog {
    right: -50%;
    -webkit-transition: opacity 0.3s linear, right 0.3s ease-out;
    -moz-transition: opacity 0.3s linear, right 0.3s ease-out;
    -o-transition: opacity 0.3s linear, right 0.3s ease-out;
    transition: opacity 0.3s linear, right 0.3s ease-out;
}
.modal.right_modal.fade.show .modal-dialog {
    right: 0;
    box-shadow: 0px 0px 19px rgba(0,0,0,.5);
}
.modal-content {
    border-radius: 0;
    border: none;
}
.modal-header.right_modal {
    padding: 10px 15px; 
    border-bottom-color: #EEEEEE;
    background-color: #FAFAFA;
}
.modal_outer .modal-body {
    /*height:90%;*/
    overflow-y: auto;
    overflow-x: hidden;
    height: 91vh;
}
/* right modal */

/*
.modal-backdrop.show:nth-child(2n+1) {
    z-index: 100199 !important;
}
*/
/*.modal_sub {
    z-index: 100200 !important;
}*/
.modal_sub .modal-body {
    height: auto;
}

.swal2-container {
    z-index: 100300 !important;
}
.swal2-title {
    padding: 2em 2em 0 !important;
    font-size: 1em !important;
    font-weight: normal !important;
}
.swal2-styled {
    padding: .5rem 1.5rem !important;
    font-size: .9rem !important;
}

.ss-main .ss-single-selected,
.ss-main .ss-multi-selected {
    padding: .170rem .6rem !important;
    min-height: 37px !important;
}

.fancybox-container {
    z-index: 100500 !important;
}

.table-responsive {
    z-index: 9;
}


.loader {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0,0,0,0.7);
    z-index: 100400;
}

.loader span {
    width: 50px;
    height: 50px;
    display: inline-block;
    padding: 0px;
    border-radius: 100%;
    border: 2px solid;
    border-top-color: rgba(255,255,255, 0.65);
    border-bottom-color: rgba(255,255,255, 0.15);
    border-left-color: rgba(255,255,255, 0.65);
    border-right-color: rgba(255,255,255, 0.15);
    -webkit-animation: preloader 0.8s linear infinite;
    animation: preloader 0.8s linear infinite;
    position: absolute;
    top: calc(50% - 25px);
    left: calc(50% - 25px);
}

#loader.loader {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    color: #fff;
    text-transform: uppercase;
}

#loader.loader span {
    position: initial;
}

.loader.mini {
    position: relative;
}

.loader.mini span {
    width: 20px;
    height: 20px;
    top: calc(50% - 10px);
    left: 100%;
}

.loader.black span {
    border-top-color: rgba(0,0,0, 0.65);
    border-bottom-color: rgba(0,0,0, 0.15);
    border-left-color: rgba(0,0,0, 0.65);
    border-right-color: rgba(0,0,0, 0.15);
}

@keyframes preloader {
   from {transform: rotate(0deg);}
   to {transform: rotate(360deg);}
}
@-webkit-keyframes preloader {
   from {-webkit-transform: rotate(0deg);}
   to {-webkit-transform: rotate(360deg);}
}


.daterangepicker {
    z-index: 100010 !important;
}
.daterangepicker td.disabled {
    /*visibility: hidden;*/
}

.ss-content .ss-list .ss-option.ss-disabled {
    display: none;
}

.popover {
    box-shadow: 0 .5rem 1rem rgba(0,0,0,.15)!important;
    z-index: 100010 !important;
}
.tooltip {
    z-index: 100010 !important;
}

.pseudo {
    border-bottom: 1px dashed;
}

.question_image {
    max-height: 250px;
}

.sortable-placeholder {
  border: dashed 2px #888;
  min-height: 50px;
  margin-bottom: 15px;
}
table td.attention-orange {
    background: orange!important;
}
table td.attention-blue {
    background: rgba(135, 206, 235, 0.88)!important;
}
table td.attention-red {
    background: red!important;
}
.td_sticky_shop {
    position: sticky;
    left: 1px;
    /*min-width: 180px;*/
    outline: 1px solid #dfe3e7;
    z-index: 1;
    white-space: nowrap;
}
.td_sticky_staff {
    position: sticky;
    left: 181px;
    outline: 1px solid #dfe3e7;
    z-index: 1;
}
.workschedule .td_sticky_staff {
    left: 0;
}
.td_sticky_staff input,
.td_sticky_staff.selected button,
.td_sticky_staff:not(.selected) span {
    display: none;
}
td[data-action="select_shop"] input,
td[data-action="select_shop"].selected button,
td[data-action="select_shop"]:not(.selected) span {
    display: none;
}
.td_sticky_staff span.weekDaysCount,
.td_sticky_staff span[data-metro] {
    display: block;
    font-size: 80%;
}
.td_sticky_check {
    position: sticky;
    left: 1px;
    min-width: 30px;
    outline: 1px solid #dfe3e7;
    z-index: 1;
}
.td_sticky_check .form-check-input {
    width: 1.5em;
    height: 1.5em;
}
.td_sticky_check button {
    padding: 0.5em;
}
tr.active .td_sticky_check button {
    background: #21ca21;
}
tr:not(.active.edit) .td_sticky_check button .bi-check2,
tr:not(.active.edit) .td_staff i,
tr.active.edit .td_sticky_check button .bi-pen {
    display: none;
}
.td_sticky_shop_tu {
    left: 0px;
}
.td_sticky_staff_tu {
    left: 8em;
}
.td_sticky_tu_ppd {
    left: 46px;
    min-width: 150px;
}
.td_sticky_staff_ppd {
    left: 197px;
    min-width: 200px;
}
.td_sticky_btn {
    position: sticky;
    left: 1px;
    min-width: 45px;
    outline: 1px solid #dfe3e7;
    z-index: 1;
}
.ts_sticky_head,
.ts_sticky_head th {
    position: sticky;
    top: 1px;
    z-index: 2;
    outline: 1px solid #dfe3e7;
}
.ts_sticky_head.td_sticky_check,
.ts_sticky_head.td_sticky_btn,
.ts_sticky_head.td_sticky_shop,
.ts_sticky_head.td_sticky_staff {
    z-index: 3 !important;
}
.td_sticky_os {
    position: sticky;
    right: 41px;
    min-width: 40px;
    outline: 1px solid #aaa;
}
.td_sticky_ns {
    position: sticky;
    right: 1px;
    min-width: 40px;
    outline: 1px solid #aaa;
}
@media (max-width:768px) {
    .td_sticky_shop,
    .td_sticky_staff,
    .td_sticky_check,
    .td_sticky_btn,
    .td_sticky_os,
    .td_sticky_ns {
        position: initial !important;
        outline: none !important;
    }
    
    .ts_sticky_head.td_sticky_check,
    .ts_sticky_head.td_sticky_btn,
    .ts_sticky_head.td_sticky_shop,
    .ts_sticky_head.td_sticky_staff {
        position: sticky !important;
        outline: 1px solid #aaa !important;
        top: 1px;
        left: auto;
    }
    
    .ts_sticky_head.td_sticky_os,
    .ts_sticky_head.td_sticky_ns {
        position: sticky !important;
        outline: 1px solid #aaa !important;
        top: 1px;
        right: auto;
    }
}
.legenda-button {
    border: 1px solid #ccc;
    border-bottom: 0;
    border-right: 0;
    border-top-left-radius: 0.5em;
    padding: 0 0.5em;
    position: absolute;
    bottom: 0;
    right: 0;
    opacity: 0.7;
}
.legenda-button:hover {
    cursor: pointer;
    opacity: 1;
}

#filters .form-group {
    max-width: 256px;
    min-width: 128px;
}

.overflow-scroll {
    overflow: auto !important;
}

#saved-filters .ss-single-selected {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    height: 38px;
}

/* Глобально */
    .ss-main .ss-single-selected.ss-disabled {
        background-color: #f2f4f4 !important;
        color: #999 !important;
    }
    .dataTables_wrapper .row > *,
    .dataTables_wrapper > .row {
        padding: 0 !important;
        margin: 0 !important;
    }

/* Информация о клиенте */

    #сustomer-info table td,
    #сustomer-info table th {
        width: 100%;
        padding: 0 0.5em;
    }

    #сustomer-info .tags ul {
        margin: 0;
        padding: 0;
        display: inline-block;
        list-style: none;
    }

    #сustomer-info .tags ul li {
        display: inline-block;
    }

    #сustomer-info .tags ul li:hover {
        cursor: pointer;
        text-decoration: underline;
    }

    #сustomer-info .tags ul li[data-tag-is-active="true"] {
        font-weight: bold;
    }

    #сustomer-info .tags ul li[data-tag-is-active="false"] {
        opacity: 0.5;
    }

    #сustomer-info .tags ul li[data-tag-is-active="false"]:after {
        content: '❌';
    }

    #сustomer-info .tags ul li[data-tag-is-active="true"]:after {
        content: '✅';
    }

    #сustomer-info .tags ul li:not(:last-child)[data-tag-is-active="false"]:after {
        content: '❌, ';
        margin-right: 6px;
    }

    #сustomer-info .tags ul li:not(:last-child)[data-tag-is-active="true"]:after {
        content: '✅, ';
        margin-right: 6px;
    }

/* Сегментация */

    .segments table {
        background-color: white;
        max-width: calc(100% - 2px);
    }

    .segments table td[count]:hover {
        cursor: pointer;
        text-decoration: underline;
    }

    .segments table [process].in-process i,
    .segments table [process]:not(.in-process) .loader {
        display: none;
    }

    .segments table [process].in-process .loader {
        margin-right: 18px;
        margin-left: -2px;
    }

    .segments table [process].in-process {
        pointer-events: none;
        cursor: not-allowed;
        background: rgb(185, 185, 185);
        border: rgb(185, 185, 185);
    }

    .filters-form .group {
        padding: 1em;
        border: 1px solid #ccc;
        background: #eee;
        position: relative;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }

    .filters-form .group > .line,
    .filters-form .rule > .line {
        width: 18px;
        position: absolute;
        border: 1px solid #888;
        border-right: 0;
        border-top: 0;
        border-bottom-left-radius: 8px;
        top: 0;
        left: -19px;
        box-sizing: content-box;
    }

    .filters-form .group > .line {
        left: -20px;
    }

    .filters-form .group > div:not(.buttons, .line) {
        width: calc(100% - 2em);
        margin-left: 2em;
        margin-top: 1em;
        position: relative;
    }

    .filters-form .group > .get-result {
        order: 1;
        margin-top: 1em;
        display: none;
    }

    .filters-form .buttons {
        display: flex;
        justify-content: space-between;
        width: 100%;
    }

    .filters-form button {
        min-width: 100px;
        border: none;
        color: white;
        text-align: center;
        text-decoration: none;
        display: inline-block;
        /*border-radius: 0.5em;*/
        transition: 0.5s;
        background: #00646c;
        cursor: pointer;
    }

    .filters-form button.delete {
        background: rgb(204, 0, 0);
        border-color: rgb(204, 0, 0) !important;
    }

    .filters-form .buttons .block-type-buttons {
        border: 2px solid #00646c;
        overflow: hidden;
    }

    .filters-form .buttons .block-type-buttons button {
        min-width: 50px;
    }

    .filters-form .buttons .block-type-buttons button.and {
        border-top-right-radius: 0;
        border-bottom-right-radius: 0;
    }

    .filters-form .buttons .block-type-buttons button.or {
        border-top-left-radius: 0;
        border-bottom-left-radius: 0;
    }

    .filters-form .buttons .block-type-buttons button:not(.active),
    .filters-form .buttons .block-type-buttons:hover button {
        background: #858585;
    }

    .filters-form .buttons .block-type-buttons button:hover {
        background: #00646c;
    }

    .filters-form .buttons .manage-buttons {
        display: flex;
        gap: 1em;
    }

    .filters-form .buttons .manage-buttons button {
        border: 2px solid #00646c;
    }

    .filters-form .buttons .manage-buttons button:hover {
        background: #006c3c;
    }

    .filters-form .buttons .manage-buttons button[disabled] {
        background: gray;
        border: gray;
        cursor: not-allowed;
    }

    .filters-form .rule {
        display: flex;
        padding: 1em;
        border: 1px solid #ccc;
        justify-content: space-between;
        background: #fff;
    }

    .filters-form .rule button.delete {
        min-width: 30px;
        margin-left: 1em;
    }

    .filters-form .rule .filters {
        display: flex;
        gap: 1em;
        flex-grow: 1;
        flex-wrap: wrap;
    }

    .filters-form .rule .filters > div {
        flex: 1;
        min-width: 100px;
    }

    .filters-form .rule .filters input:not([readonly]) {
        padding: 6px;
        border: 1px solid #dcdee2;
        border-radius: 4px;
        outline: 0;
        width: 100%;
        height: 100%;
    }

    .filters-form .rule .filters input::placeholder {
        color: #dedede;
    }

    [show-on-click]:hover {
        cursor: pointer;
        background: #eee;
    }

/* Увольнения */

    .dismissal table {
        background-color: white;
        max-width: calc(100% - 2px);
    }
    
    .dismissal span.status-true,
    .dismissal span.status-false {
        display: inline-block;
        width: 4px;
        height: 8px;
        border-radius: 2px;
        opacity: 0.8;
        background: green;
    }

    .dismissal span.status-false {
        background: red;
    }

/* ЕГАИС */
    #doc-products input {
        border: 0;
        outline: none;
        width: 100%;
        text-align: center;
    }
    #doc-products input:not([disabled]) {
        border: 1px solid green;
    }
    #egais [data-showField] {
        cursor: pointer;
    }
    #egais-system-report {
        display: flex;
        flex-flow: row wrap;
    }
    #egais-system-report > div {
        flex: 1 0 30%;
        max-width: 33.33%;
        min-width: 200px;
    }
    @media (max-width:565px) {
        #egais-system-report > div {
            max-width: 100%;
        }
    }

/* видже движение средств */
    #cash-settlements *:not(input) {
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        -khtml-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }

    #cash-settlements tr[show-on-click]:hover,
    #cash-settlements .cash-settlement-segment-details > tr:hover {
        cursor: pointer;
        background: #eee;
        user-select: none;
    }

    #cash-settlements .cash-settlement-segment-details {
        font-size: 95%;
        overflow: auto;
        margin-left: 20px;
        width: calc(100% - 20px);
    }

    #cash-settlements td {
        white-space: nowrap;
    }

    #cash-settlements th span {
        font-weight: normal;
        font-size: 75%;
        font-style: italic;
        display: block;
        line-height: 6px;
    }

/* виджет мобильных клиентов */
    #mob-clients [show-shops]:hover {
        text-decoration: underline;
        cursor: pointer;
    }

    #mob-clients table[shops] thead tr th {
        border-color: #475f7b !important;
    }

    #mob-clients tbody tr:hover {
        background: #eee;
    }

.swal2-html-container #checklist_form {
    text-align: left;
}
/* отчёт чек-листов*/
    #checklists-report .points {
        width: 60px;
        text-align: center;
    }

    #checklists-report tr.date td {
        min-width: 200px;
        width: 200px;
    }

    #checklists-report td {
        word-break: break-all;
    }

    #checklists-report tfoot td {
        border-top: 2px solid #000;
        font-weight: bold;
    }

/* ЗП-проект */
    #sp-detailed-info .manage i {
        cursor: pointer;
    }
    #sp-detailed-info .manage i[data-edit]:hover {
        color: green;
    }
    #sp-detailed-info .manage i[data-remove]:hover {
        color: red;
    }
    #sp-detailed-info .manage i[data-history]:hover {
        color: darkviolet;
    }
    #sp-detailed-info tr[data-deleted="1"] {
        text-decoration: line-through;
    }
    .salary-report tr[data-deleted="1"] {
        display: none;
    }
    #salary-project-mass-editing input[data-id] {
        max-width: 100px;
        text-align: center;
    }
    #salary-project-mass-editing tr.mass-edit-selected td {
        background-color: #e0f7ff;
    }

/* Recoverable Input */
    [data-recoverable-input].changed {
        border-color: red;
    }
    .recoverable-input {
        display: flex;
        white-space: nowrap;
        align-items: center;
        line-height: 1.4;
    }
    [data-recoverable-input-restore] {
        cursor: pointer;
        transition: transform 0.5s ease-out;
    }
    [data-recoverable-input-restore]:hover {
        transform: rotate(90deg);
    }

/* Исправление отображения таблицы при закреплении шапки */
    .overflow-scroll > table.table-bordered>:not(caption)>*>* {
        border-width: 0;
    }
    .overflow-scroll > table.table-sm.table-bordered {
        border-collapse: separate;
        border-spacing: 0;
        --border-def: 0.35px solid #ccc;
    }
    .overflow-scroll > table.table-sm.table-bordered th {
        border-top: var(--border-def);
    }
    .overflow-scroll > table.table-sm.table-bordered th,
    .overflow-scroll > table.table-sm.table-bordered td {
        border-bottom: var(--border-def);
        border-right: var(--border-def);
        background-color: #fff;
    }
    .overflow-scroll > table.table-sm.table-bordered th:first-child,
    .overflow-scroll > table.table-sm.table-bordered td:first-child {
        border-left: var(--border-def);
    }

/* Модуль отзывов */
    #feedback_chat_history p {
        padding: 0;
        margin: 0;
    }
    #head .d-flex{
        width: 70px;
        margin-left: auto;
        margin-right: auto;
    }

    #head [data-input-from] input, #head [data-input-to] input {
        max-width: 50px;
        min-width: 30px;
        padding: 0 2px;
    }
    #head [data-select] select{
        padding-top: 3px;
        padding-bottom: 2px;
        margin-top: 10px;
    }
    td.highlight {
        background-color: #0000000d !important;
    }

    .task_onlyview {
        user-select: none;
        pointer-events: none;
    }
     .task_onlyview .ss-multi-selected,  .task_onlyview input[type=text],  .task_onlyview input[type=date],.task_onlyview input[type=time],.task_onlyview textarea, .task_onlyview .ss-single-selected {
        background-color: #f2f4f4!important
     }
     .ul_addBl li {
        background-color:aliceblue;
    }
    .checklist_add_task {
        border-bottom: 1px dashed;
    }
    .checklist_add_task:hover {
        border-bottom: 0;
    }

/* Ограничение высоты списка slimselect */
    .ss-main .ss-multi-selected {
        max-height: 100px;
        overflow: auto;
    }
    .ss-single-selected .select-hidden {
        display: none!important;
    }


    .docs-item-card {
        border: 1px solid var(--doc-border);
        border-radius: var(--doc-radius);
        background: #fff;
        box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.04);
        /* не hidden — палитры/выпадашки Quill не обрезаются */
        overflow: visible;
        padding: 1rem;
    }
    /*
     * Тулбар выше .ql-container: иначе z-index у контейнера перекрывает выпадашки
     * цвета/фона/шрифта (они рисуются поверх области редактора).
     */
    #doc-item-editor-wrap .ql-toolbar.ql-snow {
        flex-wrap: wrap;
        border-top-left-radius: 0.25rem;
        border-top-right-radius: 0.25rem;
        position: relative;
        z-index: 20;
    }
    #doc-item-editor-wrap .ql-toolbar .ql-picker-options {
        z-index: 25;
    }
    #doc-item-editor-wrap .ql-container.ql-snow {
        border-bottom-left-radius: 0.25rem;
        border-bottom-right-radius: 0.25rem;
        min-height: 280px;
        position: relative;
        z-index: 1;
    }
    /* quill-resize-module: поверх контента; выше тулбара (активная рамка картинки) */
    #doc-item-editor-wrap .ql-resize-overlay,
    #doc-item-editor-wrap .ql-resize-toolbar,
    #doc-item-editor-wrap .ql-resize-display,
    #doc-item-editor-wrap .ql-resize-handle {
        z-index: 1040;
    }
    .docs-item-actions {
        display: flex;
        justify-content: flex-end;
        gap: 0.5rem;
        margin-bottom: 1rem;
    }

    /*
     * Контент документа (просмотр): типографика + Quill-блоки.
     * ql-editor: чтобы подтянуть списки/отступы/выравнивание из quill.snow.css.
     */
    #doc-item-view.doc-item-view {
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        overflow: visible !important;
        cursor: default;
        font-size: 1.05rem;
        line-height: 1.65;
        color: var(--bs-body-color, #212529);

    white-space: normal;
   
    }

    #doc-item-view.doc-item-view > * {
        cursor: inherit;
    }

    #doc-item-view h1 {
        font-size: 2rem;
        font-weight: 700;
        line-height: 1.2;
        letter-spacing: -0.02em;
        margin: 0 0 0.65em !important;
        padding-top: 0.35em;
        color: #1a1d21;
    }

    #doc-item-view h2 {
        font-size: 1.6rem;
        font-weight: 650;
        line-height: 1.25;
        margin: 1.35em 0 0.55em !important;
        padding-bottom: 0.2em;
        border-bottom: 1px solid rgba(0, 0, 0, 0.07);
        color: #25282d;
    }

    #doc-item-view h3 {
        font-size: 1.3rem;
        font-weight: 600;
        line-height: 1.3;
        margin: 1.25em 0 0.45em !important;
        color: #2c3035;
    }

    #doc-item-view h4 {
        font-size: 1.12rem;
        font-weight: 600;
        margin: 1.1em 0 0.4em !important;
        color: #343a40;
    }

    #doc-item-view h5 {
        font-size: 1rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        margin: 1.1em 0 0.35em !important;
        color: #495057;
    }

    #doc-item-view h6 {
        font-size: 0.9rem;
        font-weight: 600;
        margin: 1em 0 0.35em !important;
        color: #6c757d;
    }

    #doc-item-view p {
        margin: 0 0 1em !important;
    }

    #doc-item-view p:last-child {
        margin-bottom: 0 !important;
    }

    #doc-item-view a {
        color: var(--bs-primary, #0d6efd);
        text-decoration: underline;
        text-underline-offset: 3px;
        text-decoration-thickness: 1px;
    }

    #doc-item-view a:hover {
        opacity: 0.88;
    }

    #doc-item-view strong,
    #doc-item-view b {
        font-weight: 650;
        color: #1a1d21;
    }

    #doc-item-view em,
    #doc-item-view i {
        font-style: italic;
    }

    #doc-item-view u {
        text-decoration-thickness: 1px;
        text-underline-offset: 2px;
    }

    #doc-item-view s,
    #doc-item-view strike {
        color: #6c757d;
    }

    #doc-item-view sup,
    #doc-item-view sub {
        font-size: 0.8em;
        line-height: 0;
    }

    #doc-item-view blockquote {
        margin: 1.15rem 0 !important;
        padding: 0.85rem 1.15rem 0.85rem 1.25rem !important;
        border-left: 4px solid var(--bs-primary, #0d6efd);
        background: rgba(13, 110, 253, 0.06);
        border-radius: 0 10px 10px 0;
        color: #334155;
    }

    #doc-item-view blockquote p:last-child {
        margin-bottom: 0 !important;
    }

    #doc-item-view hr {
        border: 0;
        height: 1px;
        margin: 1.5rem 0;
        background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.12), transparent);
    }

    /* Код: блок и инлайн */
    #doc-item-view .ql-code-block-container {
        margin: 1.15rem 0 !important;
        padding: 0.95rem 1.15rem !important;
        background: #1e2936;
        color: #e8ecf1;
        border-radius: 10px;
        font-size: 0.92em;
        line-height: 1.5;
        overflow-x: auto;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    }

    #doc-item-view .ql-code-block-container code {
        font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
        background: none;
        color: inherit;
        padding: 0;
    }

    #doc-item-view pre:not(.ql-code-block-container) {
        margin: 1.15rem 0 !important;
        padding: 0.95rem 1.15rem;
        background: #f1f3f5;
        border: 1px solid #e9ecef;
        border-radius: 10px;
        overflow-x: auto;
        font-size: 0.9em;
    }

    #doc-item-view code:not(.ql-code-block-container code) {
        font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
        font-size: 0.9em;
        padding: 0.15em 0.4em;
        background: rgba(0, 0, 0, 0.06);
        border-radius: 4px;
    }

    /* Списки: база + вложенность */
    #doc-item-view ol,
    #doc-item-view ul {
        margin: 0 0 1em !important;
        padding-left: 0;
    }

    #doc-item-view li {
        margin-bottom: 0.35em;
    }

    #doc-item-view li::marker {
        color: #6c757d;
    }

    /* Таблицы (в т.ч. quill-table-better) */
    #doc-item-view .ql-table-block,
    #doc-item-view [class*="ql-table"] {

        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 8px;
    }

    #doc-item-view table {
        width: 100%;
        border-collapse: collapse;
        font-size: 0.95em;
        background: #fff;
        border: 1px solid #dee2e6;
        border-radius: 8px;
        overflow: hidden;
        table-layout: auto !important;
    }

    #doc-item-view th,
    #doc-item-view td {
        border: 1px solid #e9ecef;
        padding: 0.55rem 0.75rem;
        text-align: left;
        vertical-align: top;
    }

    #doc-item-view thead th,
    #doc-item-view tr:first-child th {
        background: linear-gradient(180deg, #f8f9fa 0%, #eef1f4 100%);
        font-weight: 600;
        color: #343a40;
    }

    #doc-item-view tbody tr:nth-child(even) {
        background: #fafbfc;
    }

    #doc-item-view tbody tr:hover {
        background: rgba(13, 110, 253, 0.04);
    }

    /* Изображения и видео */
    #doc-item-view img {
        max-width: 100%;
        height: auto;
        display: block;
       /* margin: 1.15rem auto;
        border-radius: 10px;
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);*/
    }

    #doc-item-view .ql-video {
        margin: 1.25rem 0;
        border-radius: 10px;
        overflow: hidden;
        box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
        background: #000;
    }

    #doc-item-view .ql-video iframe {
        display: block;
        width: 100%;
        min-height: 320px;
        border: 0;
    }

    /* Пустое состояние */
    #doc-item-view .doc-item-empty {
        margin: 0 !important;
        padding: 2.5rem 1rem;
        text-align: center;
        color: #868e96;
        font-size: 1rem;
        background: transparent;
    }
    .form-select-sm-custom{
        padding: 0;
        margin-top: 10px;
    }

    .form-select-sm-custom   .ss-multi-selected .ss-values .ss-value{
        font-size: 10px !important;
        background: darkgoldenrod!important;
    }
    .form-select-sm-custom .ss-list .ss-option{
        font-size: 10px !important;
    }
    .form-select-sm-custom .ss-single-selected, .form-select-sm-custom  .ss-multi-selected{
        min-height: 27px !important;
    }
    .table-with-selects th{
        padding: 0.25rem 0.5rem !important;
        padding-right: 0.5rem !important;
        cursor: default;
    }
    table.dataTable.dt-icon-sort > thead > tr > th,
    table.dataTable.dt-icon-sort > thead > tr > td {
        padding-right: 0.5rem !important;
        position: relative;
    }
    table.dataTable.dt-icon-sort > thead .sorting,
    table.dataTable.dt-icon-sort > thead .sorting_asc,
    table.dataTable.dt-icon-sort > thead .sorting_desc,
    table.dataTable.dt-icon-sort > thead .sorting_asc_disabled,
    table.dataTable.dt-icon-sort > thead .sorting_desc_disabled,
    .table-with-selects th.sorting,
    .table-with-selects th.sorting_asc,
    .table-with-selects th.sorting_desc,
    .table-with-selects th.sorting_asc_disabled,
    .table-with-selects th.sorting_desc_disabled {
        cursor: default;
        background-image: none !important;
    }
    table.dataTable.dt-icon-sort > thead .sorting:before,
    table.dataTable.dt-icon-sort > thead .sorting:after,
    table.dataTable.dt-icon-sort > thead .sorting_asc:before,
    table.dataTable.dt-icon-sort > thead .sorting_asc:after,
    table.dataTable.dt-icon-sort > thead .sorting_desc:before,
    table.dataTable.dt-icon-sort > thead .sorting_desc:after,
    table.dataTable.dt-icon-sort > thead .sorting_asc_disabled:before,
    table.dataTable.dt-icon-sort > thead .sorting_asc_disabled:after,
    table.dataTable.dt-icon-sort > thead .sorting_desc_disabled:before,
    table.dataTable.dt-icon-sort > thead .sorting_desc_disabled:after,
    .table-with-selects th.sorting:before,
    .table-with-selects th.sorting:after,
    .table-with-selects th.sorting_asc:before,
    .table-with-selects th.sorting_asc:after,
    .table-with-selects th.sorting_desc:before,
    .table-with-selects th.sorting_desc:after,
    .table-with-selects th.sorting_asc_disabled:before,
    .table-with-selects th.sorting_asc_disabled:after,
    .table-with-selects th.sorting_desc_disabled:before,
    .table-with-selects th.sorting_desc_disabled:after {
        display: none !important;
        content: none !important;
    }
    .dt-sort-btn {
        position: relative;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 20px;
        height: 20px;
        margin-left: 4px;
        padding: 0;
        border: none;
        border-radius: 4px;
        background: transparent;
        vertical-align: middle;
        cursor: pointer;
        line-height: 1;
        transition: background-color 0.15s ease;
        background: azure;
        position: absolute;
        right: 5px;
        top: 5px;
    }
    .dt-sort-btn[data-sort-priority]:not([data-sort-priority=""])::after {
        content: attr(data-sort-priority);
        position: absolute;
        top: -4px;
        right: -5px;
        min-width: 12px;
        height: 12px;
        padding: 0 2px;
        border-radius: 6px;
        background: var(--bs-primary, #0d6efd);
        color: #fff;
        font-size: 8px;
        font-weight: 700;
        line-height: 12px;
        text-align: center;
       
    }
    .table-with-selects th .dt-sort-btn {
        white-space: nowrap;
        flex-shrink: 0;
    }
    .dt-sort-btn:hover {
        background-color: rgba(13, 110, 253, 0.08);
    }
    .dt-sort-btn:focus {
        outline: none;
        box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.25);
    }
    .dt-sort-icon {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        line-height: 0;
    }
    .dt-sort-icon__up,
    .dt-sort-icon__down {
        width: 0;
        height: 0;
        border-left: 4px solid transparent;
        border-right: 4px solid transparent;
        transition: border-color 0.15s ease, opacity 0.15s ease;
    }
    .dt-sort-icon__up {
        border-bottom: 5px solid #ced4da;
    }
    .dt-sort-icon__down {
        border-top: 5px solid #ced4da;
    }
    .dt-sort-btn--asc .dt-sort-icon__up {
        border-bottom-color: var(--bs-primary, #0d6efd);
    }
    .dt-sort-btn--desc .dt-sort-icon__down {
        border-top-color: var(--bs-primary, #0d6efd);
    }
    .dt-sort-btn--asc .dt-sort-icon__down,
    .dt-sort-btn--desc .dt-sort-icon__up {
        opacity: 0.35;
    }

    .dt-pin-btn {
        position: absolute;
        left: 5px;
        top: 5px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 20px;
        height: 20px;
        padding: 0;
        border: none;
        border-radius: 4px;
        background: azure;
        vertical-align: middle;
        cursor: pointer;
        line-height: 1;
        transition: background-color 0.15s ease, opacity 0.15s ease;
        z-index: 2;
    }
    .dt-pin-btn:hover {
        background-color: rgba(13, 110, 253, 0.08);
    }
    .dt-pin-btn:focus {
        outline: none;
        box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.25);
    }
    .dt-pin-btn--unpinned {
        opacity: 0.35;
    }
    .dt-pin-btn--unpinned:hover {
        opacity: 0.75;
    }
    .dt-pin-btn--pinned {
        opacity: 1;
    }
    .dt-pin-btn--pinned,
    .dt-pin-btn--pinned i {
        color: var(--bs-primary, #0d6efd);
    }
    table.dataTable.dt-col-pin-enabled thead th {
        position: relative;
        padding-left: 28px;
    }
    table.dataTable.dt-col-pin-enabled .dt-col-pinned {
        position: sticky;
        left: var(--dt-pin-left, 0);
        background-clip: padding-box;
        -webkit-box-decoration-break: clone;
        box-decoration-break: clone;
        box-shadow: inset -1px 0 0 #ccc;
    }
    table.dataTable.dt-col-pin-enabled tbody td.dt-col-pinned {
        z-index: calc(1 + var(--dt-pin-order, 0));
    }
    table.dataTable.dt-col-pin-enabled thead th.dt-col-pinned-head {
        top: 0;
        z-index: calc(100 + var(--dt-pin-order, 0));
    }

    .table-responsive-scroll #head{
        position: sticky;
        top: 0;
        z-index: 50;
    }

    .table-responsive-scroll .dataTables_wrapper div:nth-child(2)>.col-sm-12 {
        max-height: 95vh;
        overflow: auto;
    }

    table.dataTable.dt-colresize-enabled thead th {
        overflow: hidden;
        user-select: none;
        -webkit-user-select: none;
    }

    table.dataTable.dt-colresize-enabled thead th.dt-colresizable-hover {
        background-color: #fff;
    }

    table.dataTable.dt-colresize-enabled thead th .dt-colresize-grip {
        position: absolute;
        right: 0;
        bottom: 0;
        width: 14px;
        height: 14px;
        z-index: 4;
        pointer-events: none;
        cursor: col-resize;
        opacity: 0.55;
        transition: opacity 0.15s ease;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='M14 14h-2v-2h2v2zm0-4h-2V8h2v2zm-4 4H8v-2h2v2zm0-4H8V8h2v2zm-4 4H4v-2h2v2z' fill='%23adb5bd'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right bottom;
        background-size: 14px 14px;
    }

    table.dataTable.dt-colresize-enabled thead th.dt-colresizable-hover .dt-colresize-grip {
        opacity: 1;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='M14 14h-2v-2h2v2zm0-4h-2V8h2v2zm-4 4H8v-2h2v2zm0-4H8V8h2v2zm-4 4H4v-2h2v2z' fill='%236c757d'/%3E%3C/svg%3E");
    }

    table.dataTable.dt-colresize-enabled {
        table-layout: fixed;
        width: 100% !important;
    }

    .dt-colresize-reset-wrap {
        margin-bottom: 8px;
    }

    .dt-colresize-reset-link {
        font-size: 12px;
        color: #6c757d;
        text-decoration: none;
    }

    .dt-colresize-reset-link:hover {
        color: #0d6efd;
        text-decoration: underline;
    }

    table.dataTable.dt-colresize-enabled tbody td {
        overflow: hidden;
        max-width: 0;
        white-space: normal !important;
        word-break: break-word;
        overflow-wrap: break-word;
        vertical-align: middle;
    }

    table.dataTable.dt-colresize-enabled tbody td .form-control,
    table.dataTable.dt-colresize-enabled tbody td input:not([type="checkbox"]),
    table.dataTable.dt-colresize-enabled tbody td textarea,
    table.dataTable.dt-colresize-enabled tbody td select {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    table.dataTable.dt-colresize-enabled thead th input,
    table.dataTable.dt-colresize-enabled thead th textarea,
    table.dataTable.dt-colresize-enabled thead th select,
    table.dataTable.dt-colresize-enabled thead th .ss-main {
        user-select: text;
        -webkit-user-select: text;
    }

    table.dataTable.dt-colresize-enabled thead th [data-select],
    table.dataTable.dt-colresize-enabled thead th [data-input-from],
    table.dataTable.dt-colresize-enabled thead th [data-input-to] {
        display: block;
        width: 100%;
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
    }

    table.dataTable.dt-colresize-enabled #head .d-flex {
        width: auto;
        max-width: 100%;
        min-width: 0;
        flex-wrap: wrap;
        gap: 2px;
    }

    table.dataTable.dt-colresize-enabled #head [data-input-from],
    table.dataTable.dt-colresize-enabled #head [data-input-to] {
        flex: 1 1 24px;
        min-width: 0;
    }

    table.dataTable.dt-colresize-enabled thead th [data-select] .ss-main {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }

    table.dataTable.dt-colresize-enabled thead th [data-select] .ss-single-selected,
    table.dataTable.dt-colresize-enabled thead th [data-select] .ss-multi-selected {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        min-height: 24px !important;
        padding: 2px 16px 2px 4px !important;
        box-sizing: border-box;
    }

    table.dataTable.dt-colresize-enabled thead th [data-select] .ss-single-selected .placeholder,
    table.dataTable.dt-colresize-enabled thead th [data-select] .ss-single-selected .ss-disabled,
    table.dataTable.dt-colresize-enabled thead th [data-select] .ss-multi-selected .ss-values {
        min-width: 0 !important;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    table.dataTable.dt-colresize-enabled thead th [data-select] .ss-multi-selected .ss-values {
        width: auto !important;
        flex: 1 1 auto;
    }

    table.dataTable.dt-colresize-enabled thead th [data-select] .ss-multi-selected .ss-values .ss-value {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    table.dataTable.dt-colresize-enabled thead th [data-input-from] input,
    table.dataTable.dt-colresize-enabled thead th [data-input-to] input,
    table.dataTable.dt-colresize-enabled #head [data-input-from] input,
    table.dataTable.dt-colresize-enabled #head [data-input-to] input {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        padding: 0 2px;
        box-sizing: border-box;
    }
    table.dataTable.dt-colresize-enabled thead th  .ss-main .ss-multi-selected .ss-values .ss-disabled {
        white-space: normal;
    }