/* Дооформление элементов таблиц в DE */

/* Поля по типам */
th.tbl_select { width: 20px; min-width: 20px; max-width: 20px; }

th.tbl_integer {
    width: 20px;
    min-width: 20px;
    max-width: 20px;
    padding-left: 2px !important;
    padding-right: 2px !important;
}
th.tbl_short {
    width: 90px;
    min-width: 90px;
    max-width: 90px;
}
.int-list-count {
    display: inline-block;
    min-width: 1.75em;
    padding: 1px 6px;
    border: 1px solid currentColor;
    border-radius: 4px;
    line-height: 1.35;
    cursor: help;
}
th.tbl_filesize {
    width: 80px;
    min-width: 70px;
    max-width: 80px;
}
th.tbl_integer .dt-column-order {
    max-width: 4px;
    transform: scaleX(0.7);
}
th.tbl_icon {
    width: 15px;
    min-width: 15px;
    max-width: 15px;
    padding-left: 1px !important;
    padding-right: 1px !important;
}
th.tbl_icon .dt-column-order {
    max-width: 4px;
    transform: scaleX(0.7);
}
th.tbl_icon .dt-column-title {
    max-width: 10px;
    transform: scaleX(0.8);
}
th.tbl_date {
    width: 110px;
    min-width: 110px;
    max-width: 110px;
}
th.tbl_datetime {
    width: 130px;
    min-width: 130px;
    max-width: 130px;
}
th.tbl_act {
    width: 97px;
    min-width: 97px;
    max-width: 97px;
}
table.act-4 th.tbl_act,
table.act-4 tfoot th.tbl_act {
    width: 132px;
    min-width: 132px;
    max-width: 132px;
}
table.act-4 .actions {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    white-space: nowrap;
    gap: 2px;
}
th.tbl_status {
    width: 140px;
    min-width: 140px;
    max-width: 140px;
}
pre.json-preview {
    max-height: 40vh;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    text-align: left;
    margin: 0;
    font-size: 12px;
}
.formula-preview-block {
    margin-bottom: 16px;
}
.formula-preview-block h5 {
    margin: 0 0 8px;
    font-size: 14px;
}
.formula-preview-vid {
    margin: 0 0 8px;
}
.formula-preview-actions {
    margin: 0;
    padding-left: 18px;
}
tr.time_up td{
    color: red !important;
}
tr.fixed-row td{
    background-color: var(--ra-amber) !important;
}
tr.fixed-row.disabled td{
    color: #FFF !important;
    text-shadow: 0 0 4px rgba(0, 0, 0, 0.85), 0 0 8px rgba(0, 0, 0, 0.55);
}
tr.fixed-row.disabled td a {
    text-shadow: none !important;
}
tr.fixed-row.time_up.disabled td {
    color: #ffb3b3 !important;
    text-shadow: 0 0 4px rgba(0, 0, 0, 0.85), 0 0 8px rgba(0, 0, 0, 0.55);
}
tr.fixed-row.time_up.disabled td a {
    text-shadow: none !important;
}
.fa-user.author-admin-glow {
    text-shadow: 0 0 4px rgba(220, 53, 69, 0.85), 0 0 8px rgba(220, 53, 69, 0.55);
}
.fa-user.user-icon-colored {
    color: var(--user-icon-color, inherit) !important;
}
.tooltip-inner .fa-user {
    -webkit-text-stroke: 0.7px #fff;
    paint-order: stroke fill;
}
tr.personal td.clients_access i {
    /* text-shadow: 4px 4px 5px rgba(56, 209, 0, 0.8); */
    -webkit-text-stroke: 1px rgb(0, 147, 49, 0.8);
    border-radius: 5px; /* Радиус скругления углов */
    margin: -5px;
    padding: 5px; /* Отступ внутри ячейки */
    background-color: #74f98f; /* Цвет фона */
}
tr.admin_file td{
    font-style: italic !important;
}
tr.disabled td{
    color: rgb(158, 158, 158) !important;
}
tr.deleted td{
    text-decoration: line-through !important;
    color: rgb(151, 151, 151) !important;
    background-color: #636363 !important;
}
tr.subscribed > td:nth-child(2) {
    box-shadow: inset 3px 0 0 #996633;
}
tr.found-outside td {
    background-color: #fff3cd !important;
}
tr.found-outside td:first-child {
    box-shadow: inset 4px 0 0 #c47a00;
}
tr.disabled.time_up td{
    color: rgb(255, 150, 150) !important;
}
table tr th {
  background-color: var(--de-table-search) !important;
}
.datatable {
    border: var(--de-table-border) solid 1px;
    width: 100%;
    min-width: 100%;
} 
table tr:first-child th {
  background-color: var(--de-table-bgr-head) !important;
  color: var(--de-tbl-head-font);
}

/* Поиск и поля ввода */
.highlight_search {
    background-color: var(--ra-amber);
    color: var(--ra-indigo);
}
.datatable .search_field {
    border: solid 1px;
    border-radius: 4px;
    margin-left: 6px;
    width: calc(100% - 23px);
}
.search_icon {
    line-height: 18px;
    display: inline-block;
    width: 16px;
    color: var(--de-font-black);
}
.search_number > .fa-search,
.search_number .input_number .fa-search {
    color: var(--de-font-black);
}
.search_button {
    display: inline-block;
    position: relative;
    line-height: 21px;
    border: solid 1px;
    margin: 0px;
    margin-left: 6px;
    padding-left: 5px;
    width: calc(100% - 23px);
    border-radius: 4px;
    background-color: var(--bs-body-bg);
    user-select: none;
    font-weight: lighter;
}
.search_button:hover {
    background-color: var(--bs-body-bg);
}
.search_button > .select_box {
    background-color: var(--bs-body-bg);
    z-index: 1000;
    width: 99%;
    min-height: 30px;
    background-color: #FFFFFF;
    position: absolute;
    top: 30px;
    left: 1px;
    display: none;
    border: 1px solid var(--adp-border-color-inline);
    border-radius: 4px;
    overflow: hidden;
}
.search_button > .select_box > ul {
    margin: 0;
    padding: 0;
}
.search_button > .select_box > ul > li {
    background-color: var(--bs-body-bg);
    width: 100%;
    background-color: #FFFFFF;
    list-style: none;
    padding-left: 10px;
    padding-right: 5px;
    padding-top: 3px;
    
}
.search_button > .select_box > ul > li > label {
    width: 100%;
}
.search_button > .select_box > ul > li > label > span {
    padding-left: 5px;
}
.search_button > .select_box > ul > li:hover {
    background-color: var(--ra-amber);
}
.search_number {
    display: inline-block;
    position: relative;
    line-height: 21px;
    border: solid 1px;
    margin: 0px;
    margin-left: -4px;
    margin-right: -4px;
    width: 100%;
    min-width: 20px;
    border-radius: 4px;
    background-color: var(--bs-body-bg);
    user-select: none;
    font-weight: lighter;
}
.search_number:hover {
    background-color: var(--bs-body-bg);
}
.search_number > .input_number {
    background-color: var(--bs-body-bg);
    z-index: 1000;
    width: 150px;
    min-height: 40px;
    padding: 10px 0px;
    background-color: #b2b2b2;
    position: absolute;
    top: 30px;
    left: 1px;
    display: none;
    border: 1px solid var(--adp-border-color-inline);
    border-radius: 4px;
    overflow: hidden;
}
.search_button.highlight_search, .search_number.highlight_search {
    background-color: var(--ra-amber);
}
/* Поиск и поля ввода конец */

/* Сортировка */
table.dataTable thead>tr>th.dt-orderable-asc .dt-column-header,
table.dataTable thead>tr>th.dt-orderable-desc .dt-column-header
{  
   flex-direction: row-reverse;
   text-align: left;
}
table.dataTable thead>tr>th.dt-orderable-asc span.dt-column-order:before,
table.dataTable thead>tr>th.dt-orderable-asc span.dt-column-order:after,
table.dataTable thead>tr>th.dt-orderable-desc span.dt-column-order:before,
table.dataTable thead>tr>th.dt-orderable-desc span.dt-column-order:after
{   opacity: .4;    }
table.dataTable thead>tr>th.dt-ordering-asc span.dt-column-order:before, table.dataTable thead>tr>th.dt-ordering-desc span.dt-column-order:after
{   opacity: 1;     }
/* Сортировка конец */

.table>:not(caption)>*>* {
    padding: .3rem .3rem;
}
/* Поправка положения чекбокса */
table.dataTable input.dt-select-checkbox {
    margin-bottom: 5px;
    margin-left: -5px;
}
.btn.primary {
    background-color: var(--ra-indigo) !important;
}
.btn.primary:hover {
    background-color: var(--ra-amber) !important;
}
.datatable tbody tr:hover td:not(.no_select) {
    background: var(--de-table-select);
    cursor: pointer;
    color: #000;
}

.datatable a {
    border-radius: 5px;
    border: solid 1px var(--de-link);
    padding: 4px 6px;
    background: var(--de-yellow);
    cursor: default;
}
.datatable a:hover {
    background: var(--ra-amber);
}

/* Select date interval */
.date_select {
    display: flex;
    flex-direction: row;
}
.dates {
    margin-left: 10px;
    display: flex;
    flex-direction: column;
    padding-left: 5px;
    font-size: 0.8em;
    line-height: 1em;
    flex-grow: 1;
    border-radius: 4px;
    border: solid 1px;
    height: 23px;
    background-color: var(--bs-body-bg);
    user-select: none;
}
.dates:hover {
    background-color: var(--bs-body-bg);
}
.dates > .date_box {
    z-index: 1000;
    width: calc(100%+ 5px);
    min-height: 40px;
    position: absolute;
    display: none;
    margin-left: -35px;
    margin-top: 30px;
    font-size: 0.1em;
}
.date_select input {
    display: none;
}
.date_select .dates .min_date {
    width: 100%;
    text-align: center;
}
.date_select .dates .max_date {
    width: 100%;
    text-align: center;
}
.date_select .dates .min_date span {
    position: static;
    align-self: start;
    text-align: left;
    margin-left: -4px;
    font-size: 1.2em;
    font-weight: lighter;
    line-height: 1.7em;
}
.dates.highlight_search {
    background-color: var(--ra-amber);
}
.air-datepicker {
    --adp-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    --adp-font-size: 10px;
    --adp-width: 140px;
    --adp-z-index: 100;
    --adp-padding: 3px;
    --adp-grid-areas: "nav" "body" "timepicker" "buttons";
    --adp-transition-duration: .3s;
    --adp-transition-ease: ease-out;
    --adp-transition-offset: 8px;
    --adp-background-color: #fff;
    --adp-background-color-hover: #f0f0f0;
    --adp-background-color-active: #eaeaea;
    --adp-background-color-in-range: rgba(92, 196, 239, .1);
    --adp-background-color-in-range-focused: rgba(92, 196, 239, .2);
    --adp-background-color-selected-other-month-focused: #8ad5f4;
    --adp-background-color-selected-other-month: #a2ddf6;
    --adp-color: #4a4a4a;
    --adp-color-secondary: #9c9c9c;
    --adp-accent-color: #4eb5e6;
    --adp-color-current-date: var(--adp-accent-color);
    --adp-color-other-month: #dedede;
    --adp-color-disabled: #aeaeae;
    --adp-color-disabled-in-range: #939393;
    --adp-color-other-month-hover: #c5c5c5;
    --adp-border-color: #dbdbdb;
    --adp-border-color-inner: #efefef;
    --adp-border-radius: 4px;
    --adp-border-color-inline: #d7d7d7;
    --adp-nav-height: 24px;
    --adp-nav-arrow-color: var(--adp-color-secondary);
    --adp-nav-action-size: 24px;
    --adp-nav-color-secondary: var(--adp-color-secondary);
    --adp-day-name-color: #ff9a19;
    --adp-day-name-color-hover: #8ad5f4;
    --adp-day-cell-width: 1fr;
    --adp-day-cell-height: 22px;
    --adp-month-cell-height: 42px;
    --adp-year-cell-height: 56px;
    --adp-pointer-size: 10px;
    --adp-poiner-border-radius: 2px;
    --adp-pointer-offset: 14px;
    --adp-cell-border-radius: 4px;
    --adp-cell-background-color-hover: var(--adp-background-color-hover);
    --adp-cell-background-color-selected: #5cc4ef;
    --adp-cell-background-color-selected-hover: #45bced;
    --adp-cell-background-color-in-range: rgba(92, 196, 239, 0.1);
    --adp-cell-background-color-in-range-hover: rgba(92, 196, 239, 0.2);
    --adp-cell-border-color-in-range: var(--adp-cell-background-color-selected);
    --adp-btn-height: 24px;
    --adp-btn-color: var(--adp-accent-color);
    --adp-btn-color-hover: var(--adp-color);
    --adp-btn-border-radius: var(--adp-border-radius);
    --adp-btn-background-color-hover: var(--adp-background-color-hover);
    --adp-btn-background-color-active: var(--adp-background-color-active);
    --adp-time-track-height: 1px;
    --adp-time-track-color: #dedede;
    --adp-time-track-color-hover: #b1b1b1;
    --adp-time-thumb-size: 12px;
    --adp-time-padding-inner: 10px;
    --adp-time-day-period-color: var(--adp-color-secondary);
    --adp-mobile-font-size: 16px;
    --adp-mobile-nav-height: 40px;
    --adp-mobile-width: 320px;
    --adp-mobile-day-cell-height: 38px;
    --adp-mobile-month-cell-height: 48px;
    --adp-mobile-year-cell-height: 64px
}
.air-datepicker .selected {
    background-color: var(--adp-cell-background-color-selected);
    color: #fff;
}

.buttons-colvis.has_hidden {
    color: var(--ra-amber);
}
table.project_access th.control {
    min-width: 230px;
}
table .pc_api {
    display: none;
}
.api table .pc_api {
    display: inline-block;
}
table.dataTable th.dt-right, table.dataTable td.dt-right {
    text-align: left !important;
}
div.dt-container {
    scrollbar-width: thin;
    scrollbar-color: var(--de-scroll-1) var(--de-scroll-2);
    overflow-y: visible !important;
    overflow-x: auto !important;
    width: 100%;
}
.justify-content-between {
    margin-right: 0;
}
.no_readed {
    font-weight: bold;
}
.no_readed .status,
.no_readed .status_wrap {
    font-weight: 400;
}
/* Диалог (продление срока / запрос продления) */
.dialog {
    width: 220px;
    height: 240px;
    display: flex;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    border: 1px solid var(--de-line, #D9DEE4);
    background-color: var(--de-bgr-panel, #ffffff);
    border-radius: 5px;
    box-shadow: 0 10px 28px rgba(23, 45, 68, 0.28);
    user-select: none;
    overflow: hidden;
    flex-direction: column;
    color: var(--de-font-light, #2A3F54);
}
.dialog .header {
    min-width: 100%;
    min-height: 46px;
    height: auto;
    /* Шапка всегда navy — светлый текст, не --de-font-inv (в dark это почти чёрный) */
    background-color: var(--de-bgr-nav-title, #2A3F54);
    color: #E6E9ED;
    border-bottom: 2px solid var(--ra-amber, #F5A800);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
    padding: 0 4px 0 6px;
}
.dialog .header div,
.dialog .header a {
    display: flex;
    width: auto;
    align-items: center;
    padding: 12px 10px;
    color: inherit;
}
.dialog .header > div {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 0.01em;
}
.dialog .header a {
    cursor: pointer;
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1;
    opacity: 0.85;
    border-radius: 4px;
}
.dialog .header a:hover {
    opacity: 1;
    color: var(--ra-amber, #F5A800);
    background-color: rgba(255, 255, 255, 0.06);
}
.dialog .content {
    width: 100%;
    height: 100%;
    background-color: var(--de-bgr-panel, #ffffff);
    display: flex;
    box-sizing: border-box;
}
.dialog .date_select {
    width: 100%;
}
.dialog .air-datepicker.-inline- {
    position: relative;
    width: 100%;
    --adp-width: 100%;
    --adp-font-size: 13px;
    --adp-background-color: var(--de-bgr-panel, #ffffff);
    --adp-color: var(--de-font-light, #2A3F54);
    --adp-color-secondary: var(--de-font-dark, #73879C);
    /* Название месяца / текущая дата — текст панели, не цвет выделения */
    --adp-accent-color: var(--de-font-light, #2A3F54);
    --adp-color-current-date: var(--ra-amber, #F5A800);
    --adp-border-color: var(--de-sep-panel, #E6E9ED);
    --adp-border-color-inline: var(--de-sep-panel, #E6E9ED);
    --adp-border-color-inner: var(--de-sep-panel, #E6E9ED);
    --adp-day-name-color: var(--ra-amber, #F5A800);
    --adp-day-name-color-hover: var(--ra-amber, #F5A800);
    /* Выделение даты — amber, отдельно от названия месяца */
    --adp-cell-background-color-selected: var(--ra-amber, #F5A800);
    --adp-cell-background-color-selected-hover: #ffc107;
    --adp-background-color-selected-other-month: #e0a800;
    --adp-background-color-selected-other-month-focused: #ffc107;
    --adp-background-color-hover: color-mix(in srgb, var(--de-font-light, #2A3F54) 12%, transparent);
    --adp-background-color-active: color-mix(in srgb, var(--de-font-light, #2A3F54) 18%, transparent);
    --adp-color-other-month: color-mix(in srgb, var(--de-font-light, #2A3F54) 35%, transparent);
    --adp-color-other-month-hover: color-mix(in srgb, var(--de-font-light, #2A3F54) 55%, transparent);
    --adp-btn-color: var(--de-font-light, #2A3F54);
    --adp-nav-arrow-color: var(--de-font-dark, #73879C);
    box-shadow: none;
    border-radius: 4px;
}
.dialog .air-datepicker-cell.-selected-,
.dialog .air-datepicker-cell.-selected-.-focus- {
    color: #172D44;
    font-weight: 700;
}
.dialog .air-datepicker-nav--title {
    color: var(--de-font-light, #2A3F54);
    font-weight: 600;
}
.dialog.request_extend_dialog {
    width: 320px;
    height: auto;
    min-height: 0;
}
.dialog.request_extend_dialog .content {
    flex-direction: column;
    gap: 12px;
    padding: 14px 14px 12px;
    height: auto;
}
.dialog.request_extend_dialog .request_extend_field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.dialog.request_extend_dialog .request_extend_field label {
    font-size: 13px;
    font-weight: 600;
    color: var(--de-font-light, #2A3F54);
}
.dialog.request_extend_dialog .request_extend_message {
    width: 100%;
    resize: vertical;
    min-height: 72px;
    border: 1px solid var(--de-line, #D9DEE4);
    border-radius: 4px;
    padding: 8px 10px;
    box-sizing: border-box;
    background-color: var(--de-input, #F7F7F7);
    color: var(--de-font-black, #2A3F54);
    font-size: 13px;
    line-height: 1.4;
}
.dialog.request_extend_dialog .request_extend_message:focus {
    outline: none;
    background-color: var(--de-input-focus, #ffffff);
    border-color: var(--de-table-border, #73879C);
}
.dialog.request_extend_dialog .request_extend_message::placeholder {
    color: var(--de-font-dark, #73879C);
}
.dialog.request_extend_dialog .request_extend_buttons {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 4px;
    padding-top: 12px;
    border-top: 1px solid var(--de-sep-panel, #E6E9ED);
}
.dialog.request_extend_dialog .btn-cancel {
    color: var(--de-font-light, #2A3F54);
    background-color: transparent;
    border: 1px solid var(--de-sep-panel, #E6E9ED);
}
.dialog.request_extend_dialog .btn-cancel:hover {
    color: var(--de-font-light, #2A3F54);
    background-color: color-mix(in srgb, var(--de-font-light, #2A3F54) 10%, transparent);
    border-color: var(--de-font-dark, #73879C);
}
.fixed_link_button {
    width: 28px;
    text-align: center;
    padding-left: 0px !important;
    padding-right: 0px !important;
}
.invoice-icon {
    margin-right: 2px;
    cursor: help;
}
td.cell-editable {
    position: relative;
    overflow: hidden;
}
table.datatable.has-editable-cells,
table.datatable.has-text-cells {
    width: 100%;
    min-width: 100%;
    table-layout: fixed;
}
table.datatable tbody td.cell-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
table.datatable th.cell-text,
table.datatable td.cell-text {
    min-width: 150px !important;
    width: auto;
    max-width: none;
}
.cell-edit-wrap {
    display: flex;
    align-items: center;
    gap: 3px;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}
.cell-edit-icon {
    flex: 0 0 auto;
    font-size: 11px;
    line-height: 1;
    color: var(--ra-indigo, #002856);
    cursor: pointer;
}
.cell-edit-icon:hover {
    color: var(--ra-amber, #F5A800);
}
.cell-edit-text {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
td.cell-editing {
    overflow: hidden;
}
td.cell-editing .cell-edit-wrap {
    visibility: hidden;
}
.cell-edit-input {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 0 6px;
    border: none;
    outline: none;
    box-shadow: none;
    background: #fff;
    color: #111;
    font: inherit;
    z-index: 3;
    min-width: 0;
    overflow: hidden;
}
body.full-cell-text .cell-edit-wrap,
.full-cell-text .cell-edit-wrap {
    align-items: flex-start;
    overflow: visible;
}
body.full-cell-text .cell-edit-icon,
.full-cell-text .cell-edit-icon {
    margin-top: 0.25em;
}
body.full-cell-text .cell-edit-text,
.full-cell-text .cell-edit-text {
    white-space: pre-wrap;
    overflow: visible;
    text-overflow: unset;
    overflow-wrap: anywhere;
    word-break: break-word;
}
body.full-cell-text .cell-edit-input,
.full-cell-text .cell-edit-input {
    white-space: pre-wrap;
    overflow: auto;
    resize: none;
    line-height: inherit;
    padding: 4px 6px;
}
body.full-cell-text table.datatable,
.full-cell-text table.datatable {
    width: 100%;
    min-width: 100%;
    table-layout: fixed;
}
body.full-cell-text table.datatable tbody td.cell-text,
.full-cell-text table.datatable tbody td.cell-text {
    white-space: pre-wrap;
    overflow: visible;
    overflow-wrap: anywhere;
    word-break: break-word;
}
body.full-cell-text table.datatable tbody td.cell-text a,
.full-cell-text table.datatable tbody td.cell-text a {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
}