﻿body {

}

/* Set padding to keep content from hitting the edges */
/*.body-content {
    padding-left: 25px;
    padding-right: 25px;
}
*/
/* Override the default bootstrap behavior where horizontal description lists 
   will truncate terms that are too long to fit in the left column 
*/
.dl-horizontal dt {
    white-space: normal;
}

.table > :not(caption) > * > * {
    padding: 0.2rem 0.2rem;
}

/* Set width on the form input elements since they're 100% wide by default */
input,
select,
textarea {
    max-width: 280px;
}

.tr-header {
    background-color: #d2d2d2;
    text-align: center;
    vertical-align: baseline;
}

/* Сортируемые заголовки грида (GridSort) */
.js-sort-th {
    cursor: pointer;
    user-select: none;
}

.js-sort-th:hover {
    filter: brightness(0.96);
}

.js-sort-th .sort-ind {
    margin-left: 4px;
    font-size: 9px;
    color: var(--bs-primary, #0d6efd);
}

.td-select {
    background-color: #9dbd035e;
}


footer {
    color: #606060;
    font-size: 12px;
    line-height: 1;
    text-align: center;
}


.show {
    display: block;
}

.hide{
    display: none;
}


.head-1 {
    font-size: 20px;
    color: #606060;
}

.head-2 {
    font-size: 12px;
}

.error-text {
    font-size: 12px;
    color: red;
}

#ID {
    background: #dddddd;

}

#info-alert {
    display: none;
}

#main_tbl {
    font-size: 12px;
    padding: 3px;
}

#sub_tbl {
    font-size: 12px;
    padding: 3px;    
}

#row_div {
    /*height: 18px;*/
    overflow-y: clip;
}

.row_div_small {
    height: 18px;    
}

.row_div_big {    
    height: 100%;    
}

.btn-params {    
    font-size: 11px;
    padding: 3px;
    height: 25px;
    margin: 0px;
}

.pd-b-10 {
    padding-bottom: 10px;
}

.size-sm {
    height: 25px;
    font-size: 12px;
}

header{
    -webkit-box-shadow: 4px 4px 8px 0px rgba(34, 60, 80, 0.2);
    -moz-box-shadow: 4px 4px 8px 0px rgba(34, 60, 80, 0.2);
    box-shadow: 4px 4px 8px 0px rgba(34, 60, 80, 0.2);
}

/* Прячем скроллбар для всех браузеров, сохраняя рабочую прокрутку */
.hide-scrollbar::-webkit-scrollbar {
    display: none; /* Safari и Chrome */
}

.hide-scrollbar {
    -ms-overflow-style: none; /* IE и Edge */
    scrollbar-width: none; /* Firefox */
}


.table-menu {
    padding: 0.1rem;
}


/* Задаем фиксированную высоту контейнеру таблицы и включаем прокрутку */
.table-responsive-fixed {
    max-height: 400px;
    overflow-y: auto;
    overflow-x: auto;
}

/* Фиксируем шапку таблицы наверху при прокрутке */
.table-responsive-fixed table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    /* Берём фоновый цвет из переменных Bootstrap 5 / AdminLTE 4 для поддержки тёмной и светлой тем */
    background-color: var(--bs-body-bg);
    /* Добавляем нижнюю границу, чтобы шапка визуально отделялась */
    box-shadow: inset 0 -1px 0 var(--bs-border-color);
}




.megamenu{    
    background: #ebffff;
    box-shadow: 8px 8px 24px -11px rgba(255, 255, 255, 1);
    padding: 5px;        
}

.megamenu-title{
    font-weight: bold;
    color: #888;
}

.megamenu-link {
    color:#606060;
    transition: all 0.5s ease;
}

.megamenu-link:hover {
    color:#000000;
	background: #00881c29;
	cursor: pointer;
}

.dropdown-mega{
    display: grid;
}

/* ============ desktop view ============ */
@media all and (min-width: 992px) {
  .navbar .has-megamenu {
    position: static !important;
  }
  .navbar .megamenu {
    left: 0;
    right: 0;
    width: 100%;
    margin-top: 0;
  }
    .dropdown-mega{
        grid-template-columns: 1fr 1fr 1fr;
        font-size: 1rem;
    }
}
/* ============ desktop view .end// ============ */

/* ============ Tablet view ============ */
@media (max-width: 991px) {
  .navbar.fixed-top .navbar-collapse,
  .navbar.sticky-top .navbar-collapse {
    overflow-y: auto;
    max-height: 90vh;
    margin-top: 10px;
  }

    .navbar .megamenu {
      padding: 0.1rem;
    }

    .dropdown-mega{
        grid-template-columns: 1fr 1fr;
        font-size: 0.7rem;
    }
}


/* ============ mobile view ============ */
@media (max-width: 370px) {
  .navbar.fixed-top .navbar-collapse,
  .navbar.sticky-top .navbar-collapse {
    overflow-y: auto;
    max-height: 90vh;
    margin-top: 10px;
  }

    .navbar .megamenu {
      padding: 0.1rem;
    }

    .dropdown-mega{
        grid-template-columns: 1fr;
        font-size: 0.7rem;
    }
}





[data-bs-theme="light"] .app-header {
    background-color: #ffffff !important;
}

[data-bs-theme="dark"] .app-header {
    background-color: #212529 !important;
}


[data-bs-theme="light"] .bi {
    opacity: 0.8;
}

[data-bs-theme="dark"] .bi {
    opacity: 1;
}




/* Базовый сброс списков для разметки, которую генерирует хелпер */
.custom-button-pagination ul.pagination {
    display: inline-flex !important;
    /* ИЗМЕНЕНО: Запрещаем перенос строк для списка */
    flex-wrap: nowrap !important;
    gap: 2px !important; /* Минимальный зазор между маленькими кнопками */
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.custom-button-pagination .page-item {
    margin: 0 !important;
    padding: 0 !important;
    /* ДОБАВЛЕНО: Запрещаем элементам списка сжиматься */
    flex-shrink: 0 !important;
}

/* Превращаем каждую ссылку и спан в ультра-компактную кнопочку */
.custom-button-pagination .page-link,
.custom-button-pagination a,
.custom-button-pagination span {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    
    height: 20px; /* Уменьшено: минимальная высота кнопок */
    padding: 0 4px !important; /* Минимальные внутренние отступы */
    font-size: 12px !important; /* Жестко фиксируем размер шрифта 12px */
    line-height: 1 !important;
    text-decoration: none !important;
    border-radius: 3px !important; /* Слегка уменьшено скругление для маленьких кнопок */
    transition: all 0.15s ease-in-out;
    /* Стиль кнопок по умолчанию (адаптивный под тему) */

    border: 1px solid var(--bs-border-color) !important;
    box-shadow: var(--bs-box-shadow-sm) !important;
    /* ДОБАВЛЕНО: Дополнительная защита от сплющивания текста внутри кнопок */
    flex-shrink: 0 !important;
}

    /* Эффект наведения мыши на доступные для клика кнопки */
    .custom-button-pagination a:hover {
        background-color: var(--bs-secondary-bg) !important;
        border-color: var(--bs-border-color-translucent) !important;
        color: var(--bs-primary) !important;
    }

/* ДОБАВЛЕНО: Настройка самого контейнера для красивого скролла */
.custom-button-pagination {
    flex-wrap: nowrap !important; /* Запрет переноса на уровне контейнера */
    overflow-x: auto !important; /* Включаем горизонтальный скролл */
    -webkit-overflow-scrolling: touch; /* Плавный скролл на смартфонах */
    padding-bottom: 4px; /* Небольшой отступ снизу, чтобы скроллбар не перекрывал кнопки */
}

    /* ДОБАВЛЕНО: Тонкий аккуратный скроллбар, чтобы он не выглядел громоздким */
    .custom-button-pagination::-webkit-scrollbar {
        height: 4px;
    }

    .custom-button-pagination::-webkit-scrollbar-thumb {
        background-color: var(--bs-border-color);
        border-radius: 4px;
    }




.vsplit {
    height: calc(100vh - 160px);
    min-height: 500px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.vsplit-pane {
    min-height: 0;
}

.top-pane {
    /*flex: 0 0 520px;*/
    min-height: 180px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.bottom-pane {
    flex: 1 1 auto;
    min-height: 120px;
    overflow: auto;
}

.top-pane > .row:first-child {
    flex: 1 1 auto;
    min-height: 0;
}

    .top-pane > .row:first-child > .col-12 {
        height: 100%;
        min-height: 0;
        display: flex;
        flex-direction: column;
    }

#table-scroll-container {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: auto;
    max-height: none !important;
}

.vertical-splitter {
    flex: 0 0 10px;
    cursor: row-resize;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    user-select: none;
    /* Разрешает перетаскивание по вертикали на тач-экранах */
    touch-action: none;
}

.vertical-splitter-line {
    width: 100%;
    height: 4px;
    border-radius: 999px;
    background: var(--bs-border-color, #ced4da);
    transition: background-color 0.15s ease, height 0.15s ease;
}

.vertical-splitter:hover .vertical-splitter-line,
.vertical-splitter.dragging .vertical-splitter-line {
    height: 6px;
    background: var(--bs-primary, #0d6efd);
}

body.resizing-vertical {
    cursor: row-resize;
    user-select: none;
}

/* СТИЛИ ИСКЛЮЧИТЕЛЬНО ДЛЯ СМАРТФОНОВ И ПЛАНШЕТОВ */
@media (max-width: 768px) {
    .vertical-splitter {
        /* Увеличиваем невидимую зону клика до 20px, чтобы легко попадать пальцем */
        flex: 0 0 20px;
    }

    .vertical-splitter-line {
        /* Делаем саму полоску чуть заметнее на экранах телефонов */
        height: 6px;
        width: 90%;
    }

    .vertical-splitter.dragging .vertical-splitter-line {
        height: 8px;
    }
}





/* Lookup-modal */
.lookup-modal-body {
    background-color: var(--bs-body-bg);
    padding: 1rem;
}

.lookup-modal-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.lookup-filter-form {
    border: 1px solid var(--bs-border-color);
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    background-color: var(--bs-body-bg);
    font-size: 0.8rem;
}

.lookup-filter-form .row > [class*="col"] {
    padding-top: 0.15rem;
    padding-bottom: 0.15rem;
}

.lookup-filter-form label {
    font-size: 0.75rem;
    margin-bottom: 0.15rem;
}

.lookup-filter-form .form-control,
.lookup-filter-form .form-select {
    font-size: 0.8rem;
    padding: 0.15rem 0.35rem;
    height: 30px;
}

.lookup-table-scroll {
    border: 1px solid var(--bs-border-color);
    border-radius: 0.5rem;
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.05);
    overflow: auto;
    max-height: 60vh;
    background-color: var(--bs-body-bg);
}

    .lookup-table-scroll table {
        font-size: 0.8rem;
        white-space: nowrap;
    }

.table-compact-container table {
    font-size: 0.8rem !important;
}

.table-compact-container th,
.table-compact-container td {
    padding: 2px 6px !important;
    white-space: nowrap !important;
}

.lookup-table-scroll::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}

.lookup-table-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.lookup-table-scroll::-webkit-scrollbar-thumb {
    background: #c7c7c7;
    border-radius: 4px;
}

    .lookup-table-scroll::-webkit-scrollbar-thumb:hover {
        background: #a3a3a3;
    }
/* Управляем элементами ТАБЛИЦЫ через её родительский DIV */
.table-compact-container table {
    font-size: 0.8rem !important; /* Уменьшаем шрифт текста во всей таблице */
}

.table-compact-container th,
.table-compact-container td {
    padding: 0px 2px !important; /* Минимальные отступы внутри ячеек */
    white-space: nowrap !important; /* Гарантированный запрет переноса строк */
}

/* Настройка аккуратной тонкой полосы прокрутки для этого контейнера */
.table-compact-container::-webkit-scrollbar {
    height: 6px;
}

.table-compact-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.table-compact-container::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.table-compact-container::-webkit-scrollbar-thumb:hover {
    background: #999;
}




.style-btn-close {
    opacity: 0.5;
    transition: opacity 0.15s ease-in-out, transform 0.15s ease-in-out;
}

    .style-btn-close:hover {
        opacity: 1;
        transform: rotate(90deg);
    }

.edit-form-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--bs-secondary-color);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.edit-form-group {
    margin-bottom: 0;
}

.edit-fields-columns {
    column-count: 1;
    column-gap: 1rem;
}

.edit-fields-columns > .edit-field {
    break-inside: avoid;
    margin-bottom: .5rem;
}

@media (min-width: 576px) {
    .edit-fields-columns {
        column-count: 2;
    }

    .edit-fields-columns > .edit-field {
        margin-bottom: 1rem;
    }
}

@media (min-width: 992px) {
    .edit-fields-columns {
        column-count: 3;
    }
}

.edit-readonly-value {
    font-size: 13px;
    min-height: 31px;
    display: flex;
    align-items: center;
    padding: 4px 8px;
    word-break: break-word;
}

@media (max-width: 575.98px) {
    .edit-header-title {
        font-size: 16px !important;
    }

    .edit-badge {
        font-size: 10px !important;
    }

    .edit-form-container {
        padding: 12px !important;
    }

    .edit-footer .btn {
        width: 100%;
    }

    .edit-footer {
        flex-direction: column;
    }
}


/*<!-- Стили для выделения строки -->*/
.js-main-row.table-active-selected {
    background-color: rgba(var(--bs-primary-rgb), 0.15) !important;
}

.js-main-row:hover {
    cursor: pointer;
}

.js-main-row.table-active-selected > td,
.js-sub-row.table-active-selected > td {
    background-color: rgba(var(--bs-primary-rgb), 0.15) !important;
}

.js-main-row:hover,
.js-sub-row:hover {
    cursor: pointer;
}

.js-main-row:focus,
.js-main-row:focus-visible,
.js-main-row:focus-within,
.js-main-row:focus > td,
.js-main-row:focus-visible > td,
.js-sub-row:focus,
.js-sub-row:focus-visible,
.js-sub-row:focus > td,
.js-sub-row:focus-visible > td,
.main-row-selected:focus,
.main-row-selected:focus-visible,
.main-row-selected:focus > td,
.main-row-selected:focus-visible > td {
    outline: none !important;
    box-shadow: none !important;
}




.js-sub-row.sub-row-selected > td {
    background-color: rgba(var(--bs-primary-rgb), 0.15) !important;
}

.js-sub-row:hover {
    cursor: pointer;
}

.subtables-header {
    flex-wrap: nowrap;
}

.subtables-tabs-holder {
    min-width: 0;
}

.subtables-mobile-select {
    width: 100%;
    min-width: 0;
}

    .subtables-mobile-select .form-select {
        width: 100%;
        min-width: 0;
    }

.subtables-actions {
    white-space: nowrap;
}

@media (max-width: 767.98px) {
    .subtables-header {
        display: flex;
        flex-direction: row;
        align-items: center;
        flex-wrap: nowrap;
        width: 100%;
    }

    .subtables-tabs-holder {
        flex: 1 1 auto;
        width: auto;
        min-width: 0;
    }

    .subtables-actions {
        flex: 0 0 auto;
        margin-left: auto;
    }

    #sub-tab-content {
        border-radius: var(--bs-border-radius) !important;
    }
}

/* Рабочие экраны: визуальный язык Login без изменения размеров Bootstrap-компонентов. */
.workspace-glass {
    --work-text: #17243e;
    --work-muted: #485b79;
    --work-line: #ccd7ec;
    --work-surface: rgba(250, 252, 255, .88);
    --work-solid: #f8faff;
    --work-glass: linear-gradient(135deg, rgba(255, 255, 255, .93), rgba(239, 243, 255, .81));
    --work-shadow: 0 10px 28px rgba(35, 48, 102, .09), inset 1px 1px 0 rgba(255, 255, 255, .9);
    --work-selected: #d9e6ff;
    color: var(--work-text);
    background: #f1f4fc !important;
}

[data-bs-theme="dark"] .workspace-glass {
    --work-text: #e8eeff;
    --work-muted: #b9c6e1;
    --work-line: #465677;
    --work-surface: rgba(30, 40, 65, .94);
    --work-solid: #202b44;
    --work-glass: linear-gradient(135deg, rgba(42, 53, 81, .96), rgba(29, 38, 63, .9));
    --work-shadow: 0 10px 28px rgba(0, 0, 0, .25), inset 1px 1px 0 rgba(255, 255, 255, .1);
    --work-selected: #344d79;
    background: #141e32 !important;
}

.workspace-glass .app-wrapper {
    background: radial-gradient(ellipse at 18% 9%, rgba(105, 130, 255, .15), transparent 49%),
        radial-gradient(ellipse at 84% 82%, rgba(153, 105, 235, .13), transparent 48%);
}

.workspace-glass .app-main,
.workspace-glass .app-content {
    background: transparent;
}

.workspace-glass .sidebar-wrapper {
    height: calc(100vh - 3.5rem);
    overflow-y: auto;
    overflow-x: hidden;
}

.workspace-glass .sidebar-wrapper::-webkit-scrollbar {
    width: 6px;
}

.workspace-glass .sidebar-wrapper::-webkit-scrollbar-thumb {
    background-color: var(--work-line);
    border-radius: 4px;
}

.workspace-glass .app-header,
.workspace-glass .app-main {
    transition: margin-left .3s ease-in-out, margin-right .3s ease-in-out;
}

.workspace-glass .app-header,
.workspace-glass .app-sidebar,
.workspace-glass .app-footer {
    color: var(--work-text);
    background: var(--work-glass) !important;
    border-color: var(--work-line) !important;
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    backdrop-filter: blur(18px) saturate(140%);
}

.workspace-glass .app-header {
    box-shadow: 0 4px 18px rgba(41, 60, 130, .08);
}

.workspace-glass .app-sidebar {
    box-shadow: -8px 0 26px rgba(41, 60, 130, .1) !important;
}

.workspace-glass .sidebar-brand,
.workspace-glass .brand-link {
    color: var(--work-text);
    text-decoration: none;
}

.workspace-glass .sidebar-brand {
    background: transparent;
    border-color: var(--work-line);
}

.workspace-glass .sidebar-menu .nav-link {
    color: var(--work-text);
}

.workspace-glass .sidebar-menu .nav-link:hover:not(.active) {
    color: var(--work-text);
    background: rgba(90, 115, 225, .12);
}

.workspace-glass .sidebar-menu .nav-link.active {
    color: #fff !important;
    background: linear-gradient(115deg, #4169d9, #7556ce) !important;
    box-shadow: 0 4px 12px rgba(67, 95, 193, .2);
}

.workspace-glass .content-wrapper-padding {
    padding: 0;
}

.workspace-glass .table td,
.workspace-glass .table th {
    vertical-align: middle;
}

.workspace-glass .header-responsive-title {
    font-size: 13px;
    max-width: 110px;
}

@media (min-width: 400px) {
    .workspace-glass .header-responsive-title { max-width: 140px; }
}

@media (min-width: 576px) {
    .workspace-glass .header-responsive-title { font-size: 1rem; max-width: 300px; }
}

.workspace-glass .toast-container {
    z-index: 1055;
}

/* Стекло — только на оболочке: данные таблиц остаются на плотной подложке. */
.workspace-glass .workspace-toolbar,
.workspace-glass .workspace-filters,
.workspace-glass .workspace-table-panel,
.workspace-glass .workspace-subtables #sub-tab-content,
.workspace-glass .workspace-dialog,
.workspace-glass .workspace-form-panel {
    color: var(--work-text);
    background: var(--work-glass) !important;
    border-color: var(--work-line) !important;
    box-shadow: var(--work-shadow) !important;
    -webkit-backdrop-filter: blur(14px) saturate(130%);
    backdrop-filter: blur(14px) saturate(130%);
}

.workspace-glass .workspace-toolbar.card-outline,
.workspace-glass .workspace-filters.card-outline {
    border-top-color: #647ce4 !important;
}

.workspace-glass .workspace-filters .card-header,
.workspace-glass .workspace-dialog .modal-header,
.workspace-glass .workspace-dialog .modal-footer {
    color: var(--work-text);
    background: rgba(115, 134, 216, .07) !important;
    border-color: var(--work-line) !important;
}

.workspace-glass .workspace-filters .card-header .text-secondary,
.workspace-glass .workspace-edit-heading .text-secondary-emphasis {
    color: var(--work-muted) !important;
}

.workspace-glass .workspace-table-panel .table,
.workspace-glass .workspace-subtables .table,
.workspace-glass .workspace-dialog .table {
    --bs-table-bg: var(--work-solid);
    --bs-table-color: var(--work-text);
    --bs-table-border-color: var(--work-line);
    --bs-table-hover-bg: var(--work-selected);
}

.workspace-glass #main_tbl thead th,
.workspace-glass .workspace-subtables thead th {
    color: var(--work-text) !important;
    background: var(--work-solid) !important;
    border-color: var(--work-line);
    cursor: pointer;
}

.workspace-glass .main-row-selected > td,
.workspace-glass .js-main-row.table-active-selected > td,
.workspace-glass .js-sub-row.table-active-selected > td,
.workspace-glass .js-sub-row.sub-row-selected > td {
    background-color: var(--work-selected) !important;
    color: var(--work-text) !important;
}

.workspace-glass .js-main-row:focus-visible > td,
.workspace-glass .js-sub-row:focus-visible > td {
    box-shadow: inset 0 2px #516fea, inset 0 -2px #516fea !important;
}

.workspace-glass .vertical-splitter-line {
    background: #889cda;
    box-shadow: 0 1px 4px rgba(50, 73, 153, .13);
}

.workspace-glass .workspace-subtables .nav-link,
.workspace-glass .workspace-form-panel .nav-link {
    color: var(--work-text);
    background: rgba(255, 255, 255, .1);
    border-color: transparent;
}

.workspace-glass .workspace-subtables .nav-link.active,
.workspace-glass .workspace-form-panel .nav-link.active {
    color: #314eac;
    background: var(--work-solid);
    border-color: var(--work-line);
}

[data-bs-theme="dark"] .workspace-glass .workspace-subtables .nav-link.active,
[data-bs-theme="dark"] .workspace-glass .workspace-form-panel .nav-link.active {
    color: #b7c8ff;
}

.workspace-glass .workspace-subtables .nav-link:focus-visible,
.workspace-glass .workspace-form-panel .nav-link:focus-visible,
.workspace-glass .btn:focus-visible {
    outline: 2px solid #5875e8;
    outline-offset: 2px;
}

.workspace-glass .workspace-subtables .js-sub-card + .js-sub-card {
    box-shadow: inset 0 1px var(--work-line);
}

.workspace-glass .workspace-edit-heading {
    color: var(--work-text);
}

.workspace-glass .workspace-edit-heading .border-bottom,
.workspace-glass .workspace-form-panel .border-top {
    border-color: var(--work-line) !important;
}

.workspace-glass .workspace-form-panel .edit-form-label {
    color: var(--work-muted);
}

.workspace-glass .workspace-form-panel .edit-readonly-value {
    color: var(--work-text);
    background-color: var(--work-solid);
    box-shadow: inset 0 0 0 1px var(--work-line);
}

.workspace-glass .lookup-filter-form,
.workspace-glass .lookup-table-scroll,
.workspace-glass .lookup-modal-body {
    color: var(--work-text);
    background: var(--work-solid);
    border-color: var(--work-line);
}

.workspace-glass .pagination .page-link {
    color: var(--work-text);
    background: var(--work-solid);
    border-color: var(--work-line);
}

.workspace-glass .pagination .active .page-link {
    color: #fff;
    background: #4968ce;
    border-color: #4968ce;
}

.workspace-glass .alert {
    border-color: var(--work-line);
    box-shadow: inset 0 1px rgba(255, 255, 255, .5), 0 3px 10px rgba(35, 48, 102, .06);
}

.workspace-glass .workspace-form-panel .form-control,
.workspace-glass .workspace-form-panel .form-select,
.workspace-glass .workspace-filters .form-control,
.workspace-glass .workspace-filters .form-select,
.workspace-glass .workspace-subtables .form-select,
.workspace-glass .workspace-dialog .form-control,
.workspace-glass .workspace-dialog .form-select {
    color: var(--work-text);
    background-color: var(--work-solid);
    border-color: var(--work-line);
}

.workspace-glass .workspace-form-panel .form-control:focus,
.workspace-glass .workspace-form-panel .form-select:focus,
.workspace-glass .workspace-filters .form-control:focus,
.workspace-glass .workspace-filters .form-select:focus,
.workspace-glass .workspace-dialog .form-control:focus {
    border-color: #6982e8;
    box-shadow: 0 0 0 .2rem rgba(93, 118, 229, .18);
}

.workspace-glass .workspace-form-panel .form-control::placeholder,
.workspace-glass .workspace-dialog .form-control::placeholder {
    color: var(--work-muted);
}

.workspace-glass .workspace-filters .input-group-text,
.workspace-glass .workspace-form-panel .input-group-text {
    color: var(--work-text);
    background: var(--work-surface);
    border-color: var(--work-line);
}

.workspace-glass .btn-primary,
.workspace-glass .btn-success {
    color: #fff;
    background-image: linear-gradient(125deg, rgba(255, 255, 255, .15), transparent);
    box-shadow: inset 0 1px rgba(255, 255, 255, .25), 0 3px 9px rgba(49, 71, 143, .15);
}

.workspace-glass .btn-outline-primary,
.workspace-glass .btn-outline-secondary,
.workspace-glass .btn-light {
    background-color: var(--work-surface);
}

.workspace-glass .btn-outline-secondary,
.workspace-glass .btn-light {
    color: var(--work-text);
    border-color: var(--work-line);
}

.workspace-glass .btn-outline-primary:hover,
.workspace-glass .btn-outline-secondary:hover,
.workspace-glass .btn-light:hover {
    color: #fff;
    background: #4968ce;
    border-color: #4968ce;
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .workspace-glass .app-header,
    .workspace-glass .app-sidebar,
    .workspace-glass .app-footer,
    .workspace-glass .workspace-toolbar,
    .workspace-glass .workspace-filters,
    .workspace-glass .workspace-table-panel,
    .workspace-glass .workspace-subtables #sub-tab-content,
    .workspace-glass .workspace-dialog,
    .workspace-glass .workspace-form-panel {
        background: var(--work-solid) !important;
    }
}

@media (max-width: 575.98px) {
    .workspace-glass .app-header,
    .workspace-glass .app-sidebar,
    .workspace-glass .workspace-toolbar,
    .workspace-glass .workspace-filters,
    .workspace-glass .workspace-table-panel,
    .workspace-glass .workspace-dialog,
    .workspace-glass .workspace-form-panel {
        -webkit-backdrop-filter: blur(8px);
        backdrop-filter: blur(8px);
    }
}

/* Общая фактура кнопки входа: Bootstrap определяет цвет и геометрию каждого действия. */
.workspace-glass .btn:not(.btn-link) {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    box-shadow: inset 0 1px rgba(255, 255, 255, .38), 0 4px 12px rgba(37, 53, 103, .15);
    transition: transform .2s, box-shadow .2s, filter .2s, background-color .2s, border-color .2s;
}

.workspace-glass .btn:not(.btn-link)::before,
.workspace-glass .btn:not(.btn-link)::after {
    content: "";
    position: absolute;
    pointer-events: none;
}

.workspace-glass .btn:not(.btn-link)::before {
    inset: 0 0 50%;
    background: linear-gradient(rgba(255, 255, 255, .28), transparent);
}

.workspace-glass .btn:not(.btn-link)::after {
    top: 0;
    left: -130%;
    width: 65%;
    height: 100%;
    background: linear-gradient(110deg, transparent, rgba(255, 255, 255, .42), transparent);
    transform: skewX(-20deg);
    transition: left .7s ease;
}

.workspace-glass .btn:not(.btn-link):active:not(:disabled):not(.disabled) {
    transform: scale(.98);
}

.workspace-glass .btn:not(.btn-link):focus-visible {
    box-shadow: 0 0 0 4px rgba(93, 118, 229, .25), 0 4px 12px rgba(37, 53, 103, .15);
}

/* Не заменяем зелёный/красный/серый цвет Bootstrap синим при наведении. */
.workspace-glass .btn-outline-primary:hover,
.workspace-glass .btn-outline-secondary:hover,
.workspace-glass .btn-light:hover {
    color: var(--bs-btn-hover-color);
    background: var(--bs-btn-hover-bg);
    border-color: var(--bs-btn-hover-border-color);
}

.workspace-glass .btn-close {
    box-shadow: inset 1px 1px rgba(255, 255, 255, .65), 0 2px 8px rgba(37, 53, 103, .15);
}

.workspace-glass .app-header button.btn-link {
    position: relative;
    overflow: hidden;
    background: var(--work-surface);
    box-shadow: inset 0 1px rgba(255, 255, 255, .65);
}

.workspace-glass .nav-tabs button.nav-link {
    position: relative;
    overflow: hidden;
    background-image: linear-gradient(rgba(255, 255, 255, .26), transparent);
    box-shadow: inset 0 1px rgba(255, 255, 255, .55);
    transition: filter .2s, box-shadow .2s;
}

.workspace-glass .nav-tabs button.nav-link:hover:not(.active) {
    filter: brightness(.95);
    box-shadow: inset 0 1px rgba(255, 255, 255, .7), 0 4px 10px rgba(37, 53, 103, .12);
}

@media (hover: hover) and (pointer: fine) {
    .workspace-glass .btn:not(.btn-link):hover:not(:disabled):not(.disabled) {
        transform: translateY(-1px);
        filter: brightness(1.04);
        box-shadow: inset 0 1px rgba(255, 255, 255, .38), 0 8px 18px rgba(37, 53, 103, .19);
    }

    .workspace-glass .btn:not(.btn-link):hover:not(:disabled):not(.disabled)::after {
        left: 150%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .workspace-glass .btn:not(.btn-link),
    .workspace-glass .btn:not(.btn-link)::after,
    .workspace-glass .nav-tabs button.nav-link {
        transition: none;
    }

    .workspace-glass .btn:not(.btn-link)::after {
        display: none;
    }
}

/* Стеклянная поверхность меню видна отдельно от фона, без изменения положения sidebar. */
.workspace-glass {
    --work-sidebar-glass: rgba(247, 250, 255, .64);
    --work-field-glass: rgba(255, 255, 255, .83);
}

[data-bs-theme="dark"] .workspace-glass {
    --work-sidebar-glass: rgba(28, 39, 67, .76);
    --work-field-glass: rgba(38, 51, 80, .92);
}

.workspace-glass .app-sidebar {
    isolation: isolate;
    background: var(--work-sidebar-glass) !important;
    -webkit-backdrop-filter: blur(22px) saturate(165%);
    backdrop-filter: blur(22px) saturate(165%);
    box-shadow: 8px 0 28px rgba(39, 57, 118, .15), inset -1px 0 rgba(255, 255, 255, .68) !important;
}

.workspace-glass .app-sidebar::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: radial-gradient(ellipse at 15% 5%, rgba(255, 255, 255, .65), transparent 55%),
        linear-gradient(165deg, rgba(103, 141, 244, .12), rgba(147, 103, 225, .11) 65%, rgba(255, 255, 255, .1));
    box-shadow: inset 2px 2px rgba(255, 255, 255, .7), inset -1px -1px rgba(255, 255, 255, .48);
}

.workspace-glass .app-sidebar .sidebar-brand,
.workspace-glass .app-sidebar .sidebar-wrapper {
    position: relative;
    z-index: 1;
}

/* Убираем прокрутку внешней панели; широкие данные прокручиваются в .table-responsive. */
.workspace-glass .app-main,
.workspace-glass .app-content,
.workspace-glass .vsplit,
.workspace-glass #bottom-pane,
.workspace-glass #sub_tables {
    min-width: 0;
}

.workspace-glass #bottom-pane {
    max-width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
}

.workspace-glass #bottom-pane > .row,
.workspace-glass #sub_tables,
.workspace-glass #subtables-wrapper,
.workspace-glass #sub-tab-content,
.workspace-glass #sub-tab-content .tab-pane,
.workspace-glass #sub-tab-content .js-sub-card,
.workspace-glass #sub-tab-content .js-sub-table-body {
    min-width: 0;
    max-width: 100%;
}

.workspace-glass #sub_tables .table-responsive {
    max-width: 100%;
}

/* EditAction: та же слоистость и контраст, что у Login, без высоты floating-полей. */
.workspace-glass .workspace-form-panel {
    position: relative;
    isolation: isolate;
    background: linear-gradient(135deg, rgba(255, 255, 255, .84), rgba(239, 243, 255, .68)) !important;
    box-shadow: 0 10px 30px rgba(31, 41, 90, .09), 0 25px 50px -20px rgba(31, 41, 90, .2),
        inset 2px 2px rgba(255, 255, 255, .85), inset -1px -1px rgba(255, 255, 255, .6) !important;
}

.workspace-glass .workspace-form-panel::before {
    content: "";
    position: absolute;
    inset: 0 0 55%;
    pointer-events: none;
    border-radius: inherit;
    background: linear-gradient(rgba(255, 255, 255, .16), transparent);
}

.workspace-glass .workspace-edit-heading .edit-header-title {
    color: var(--work-text) !important;
    text-shadow: 0 1px rgba(255, 255, 255, .6);
}

.workspace-glass .workspace-form-panel .edit-form-label {
    color: var(--work-muted);
}

.workspace-glass .workspace-form-panel .form-control,
.workspace-glass .workspace-form-panel .form-select {
    background-color: var(--work-field-glass);
    border-color: var(--work-line);
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, .06), 0 1px rgba(255, 255, 255, .6);
    transition: background-color .2s, border-color .2s, box-shadow .2s;
}

.workspace-glass .workspace-form-panel .edit-form-group > .form-control,
.workspace-glass .workspace-form-panel .edit-form-group > .form-select {
    border-radius: 12px;
}

.workspace-glass .workspace-form-panel .form-control:focus,
.workspace-glass .workspace-form-panel .form-select:focus {
    border-color: #6982e8;
    box-shadow: 0 0 0 4px rgba(79, 124, 255, .15), inset 0 1px 2px rgba(15, 23, 42, .04);
}

.workspace-glass .workspace-form-panel .form-control[readonly],
.workspace-glass .workspace-form-panel .form-control:disabled,
.workspace-glass .workspace-form-panel .form-select:disabled {
    background-color: var(--work-surface);
    color: var(--work-muted);
}

.workspace-glass .workspace-form-panel .edit-readonly-value {
    background-color: var(--work-field-glass);
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, .06), inset 0 0 0 1px var(--work-line);
}

.workspace-glass .workspace-form-panel .input-group-text {
    background: var(--work-field-glass);
    box-shadow: inset 0 1px rgba(255, 255, 255, .6);
}

.workspace-glass .workspace-form-panel .form-check-input {
    background-color: var(--work-field-glass);
    border-color: var(--work-line);
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, .08);
}

.workspace-glass .workspace-form-panel .form-check-input:checked {
    background-color: #4f7cff;
    border-color: #4f7cff;
}

.workspace-glass .workspace-form-panel .form-check-input:focus-visible {
    border-color: #6982e8;
    box-shadow: 0 0 0 4px rgba(79, 124, 255, .15);
}

.workspace-glass .workspace-form-panel .nav-tabs .nav-link {
    background-image: linear-gradient(rgba(255, 255, 255, .24), transparent);
    box-shadow: inset 0 1px rgba(255, 255, 255, .5);
}

.workspace-glass .workspace-form-panel .nav-tabs .nav-link.active {
    box-shadow: inset 0 2px #6982e8, inset 0 1px rgba(255, 255, 255, .7);
}

.workspace-glass .workspace-form-panel .alert {
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

[data-bs-theme="dark"] .workspace-glass .workspace-form-panel {
    background: linear-gradient(135deg, rgba(42, 53, 81, .95), rgba(29, 38, 63, .87)) !important;
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .workspace-glass .app-sidebar,
    .workspace-glass .workspace-form-panel {
        background: var(--work-solid) !important;
    }
}

@media (max-width: 575.98px) {
    .workspace-glass .app-sidebar {
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
    }
}

/* AdminLTE управляет положением sidebar через margin-left: анимируем это же свойство. */
.workspace-glass .app-sidebar {
    transition: min-width .35s cubic-bezier(.2, .8, .2, 1),
        max-width .35s cubic-bezier(.2, .8, .2, 1),
        margin-left .35s cubic-bezier(.2, .8, .2, 1),
        margin-right .35s cubic-bezier(.2, .8, .2, 1),
        box-shadow .35s ease;
}

.workspace-glass .app-sidebar::before {
    opacity: .45;
    transform: translateX(-12px);
    transition: opacity .35s ease, transform .35s cubic-bezier(.2, .8, .2, 1);
}

.workspace-glass:not(.sidebar-collapse) .app-sidebar::before,
.workspace-glass.sidebar-open .app-sidebar::before {
    opacity: 1;
    transform: none;
}

body.workspace-glass:not(.app-loaded) .app-sidebar::before {
    transition: none;
}

/* Bootstrap продолжает анимировать высоту collapse; содержимое и стрелка двигаются отдельно. */
.workspace-glass .workspace-filters #filter-toggle-icon {
    transition: transform .35s cubic-bezier(.2, .8, .2, 1);
}

.workspace-glass .workspace-filters .card-header[aria-expanded="true"] #filter-toggle-icon {
    transform: rotate(180deg);
}

.workspace-glass .workspace-filters .card-header[aria-expanded="true"] + #filterCollapse.collapsing .card-body {
    animation: workspace-filter-in .35s ease both;
}

.workspace-glass .workspace-filters .card-header[aria-expanded="false"] + #filterCollapse.collapsing .card-body {
    animation: workspace-filter-out .35s ease both;
}

@keyframes workspace-filter-in {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: none; }
}

@keyframes workspace-filter-out {
    from { opacity: 1; transform: none; }
    to { opacity: 0; transform: translateY(-6px); }
}

/* При нажатии блик сжимается вместе с кнопкой; цвета Bootstrap не меняются. */
.workspace-glass .btn:not(.btn-link):active:not(:disabled):not(.disabled) {
    transform: scale(.96);
    filter: brightness(.96);
    box-shadow: inset 0 3px 9px rgba(15, 23, 42, .16), 0 1px 4px rgba(37, 53, 103, .12);
}

@media (hover: hover) and (pointer: fine) {
    .workspace-glass .btn:not(.btn-link):hover:active:not(:disabled):not(.disabled) {
        transform: scale(.96);
        filter: brightness(.96);
        box-shadow: inset 0 3px 9px rgba(15, 23, 42, .16), 0 1px 4px rgba(37, 53, 103, .12);
    }
}

/* В отличие от column-count, изменение высоты поля не перераспределяет соседние колонки. */
.workspace-glass .edit-fields-columns.edit-fields-stable {
    column-count: initial;
    display: grid;
    grid-template-columns: repeat(var(--edit-field-columns, 1), minmax(0, 1fr));
    column-gap: 1rem;
}

.workspace-glass .edit-fields-stable > .edit-fields-column {
    min-width: 0;
}

.workspace-glass .edit-fields-stable > .edit-fields-column > .edit-field {
    margin-bottom: .5rem;
}

@media (min-width: 576px) {
    .workspace-glass .edit-fields-stable > .edit-fields-column > .edit-field {
        margin-bottom: 1rem;
    }
}

/* Оба вида EditAction используют один #modal-edit, включая закрытие через Bootstrap. */
.workspace-glass #modal-edit.fade .modal-dialog {
    opacity: 0;
    transform: translateY(18px) scale(.985);
    transition: opacity .32s ease, transform .32s cubic-bezier(.2, .8, .2, 1);
}

.workspace-glass #modal-edit.show .modal-dialog {
    opacity: 1;
    transform: none;
}

@media (max-width: 575.98px) {
    .workspace-glass #modal-edit.fade .modal-dialog {
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .workspace-glass .app-sidebar,
    .workspace-glass .app-sidebar::before,
    .workspace-glass .app-header,
    .workspace-glass .app-main,
    .workspace-glass .workspace-filters #filter-toggle-icon,
    .workspace-glass #modal-edit.fade .modal-dialog {
        transition: none;
    }

    .workspace-glass .workspace-filters .collapsing .card-body {
        animation: none !important;
    }

    .workspace-glass .btn:not(.btn-link):active:not(:disabled):not(.disabled) {
        transform: none;
    }
}

