﻿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;
}

.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;
}

