/* Мелкие правки поверх Bootstrap. */

body { font-size: 0.925rem; }

.navbar-brand { font-weight: 600; }

.table > :not(caption) > * > * { padding: 0.4rem 0.5rem; }

.js-items input,
.js-items select { min-width: 80px; }

.form-text { font-size: 0.75rem; }

.modal-body .table thead th { font-weight: 600; font-size: 0.8rem; }

.toast-container { z-index: 1090; }

/* Кнопки операций на складе — только значок. */
.btn-op {
  width: 42px;
  height: 38px;
  font-size: 1.15rem;
  line-height: 1;
  padding: 0;
}

/* Маркер сворачивания в дереве номенклатуры. */
#tree .toggle { width: 14px; text-decoration: none; }
#tree .toggle .tw { font-family: monospace; font-weight: 700; }
#tree .toggle:disabled .tw { color: var(--bs-secondary-color); }


/* Дерево номенклатуры: фон задаём ячейкам — Bootstrap красит именно их,
   поэтому правило на <tr> не проявляется. */
#tree tbody tr.group-row > td { background-color: var(--bs-tertiary-bg); }
#tree tbody tr.selected > td { background-color: rgba(13, 110, 253, .22); }
#tree tbody tr.selected.group-row > td { background-color: rgba(13, 110, 253, .32); }
#tree tr.js-row { cursor: default; }

/* Колонка кода: артикул позиции и код группы, выровненные по левому краю. */
#tree td.rowcode {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .78rem;
  color: var(--bs-secondary-color);
  white-space: nowrap;
}

/* Длинные таблицы: прокрутка внутри карточки, шапка остаётся на виду.
   Обычный .table-responsive для этого не годится — он создаёт свой контейнер
   прокрутки, и sticky в нём липнет не к тому. */
.table-scroll {
  max-height: calc(100vh - 250px);
  overflow: auto;
}

/* Панель групповых операций висит поверх страницы, поэтому пока она открыта
   область прокрутки становится ниже: иначе последние строки дерева уходят
   под панель и до них не добраться. Высоту панели подставляет скрипт —
   она зависит от ширины окна, на узком экране кнопки переносятся. */
body.bulk-open .table-scroll {
  max-height: calc(100vh - 250px - var(--bulk-height, 0px));
}

.table-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background-color: var(--bs-tertiary-bg);
  box-shadow: inset 0 -1px 0 var(--bs-border-color);
}

.table-scroll tfoot th {
  position: sticky;
  bottom: 0;
  z-index: 2;
  background-color: var(--bs-tertiary-bg);
  box-shadow: inset 0 1px 0 var(--bs-border-color);
}

/* Логотип в шапке и в настройках. */
.brand-logo {
  height: 28px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
}

/* Карточка позиции: вкладки и подложка следуют теме. */
.bg-body-tertiary { background-color: var(--bs-tertiary-bg) !important; }
