/* Loaded after styles.css to keep current mobile layouts deterministic. */
.supply-catalog-row.supply-stock-row { padding: 0; overflow: hidden; }
.supply-catalog-row .supply-catalog-button {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 74px;
  padding: 12px 14px;
  border: 0;
  background: transparent;
  text-align: left;
}

.supply-catalog-row .supply-catalog-button > div { min-width: 0; }
.supply-catalog-row .item-title { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-height: 1.22; }
.supply-catalog-row .item-meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Шапка и группировка разделов: единый бренд во всех кабинетах.
   Колонка = размер .sidebar-logo (64px), иначе лого перекрывает текст. */
.sidebar-brand {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.sidebar-brand > div { min-width: 0; }

/* Sidebar menu: flat list without section dividers or group headings. */
.sidebar .tabs .tab-group,
.sidebar .tab-group,
.sidebar .tab-group-indicators,
.sidebar .tab-group-training,
.sidebar .tab-group-extra {
  border: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.sidebar .tab-group-label,
.sidebar .rc-menu-divider {
  display: none !important;
}

.sidebar .tab.rc-menu-section-break,
.sidebar .tab.rc-menu-divider-before {
  border-top: 0 !important;
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.good-deed-delete-button {
  display: grid;
  width: 34px;
  height: 34px;
  min-height: 34px;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  font-size: 23px;
  font-weight: 400;
  line-height: 1;
}

@media (max-width: 760px) {
  .sidebar-brand {
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
  }

  .sidebar-brand .sidebar-logo {
    width: 56px;
    height: 56px;
  }

  .sidebar-brand strong {
    font-size: 24px;
    line-height: 1.05;
  }

  .sidebar-brand span {
    margin-top: 3px;
    font-size: 14px;
    line-height: 1.2;
  }

  .mobile-bottom-nav {
    right: 12px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    left: 12px;
    min-height: 72px;
    padding: 7px 4px;
    border-radius: 25px;
  }

  .mobile-bottom-nav-item {
    grid-template-rows: 34px 13px;
    min-height: 56px;
    padding: 2px 0;
    gap: 1px;
    font-size: 9px;
    line-height: 13px;
  }

  .mobile-bottom-nav-icon {
    width: 34px;
    height: 34px;
  }

  .mobile-bottom-nav-icon svg {
    width: 28px;
    height: 28px;
  }

  .mobile-bottom-nav-label {
    display: block;
    justify-self: stretch;
    overflow: visible;
    text-align: center;
    text-overflow: clip;
  }

  body.mobile-keyboard-open .mobile-bottom-nav {
    display: none;
  }

  .supply-catalog-row .supply-catalog-button {
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    min-height: 72px;
    padding: 11px 12px;
  }

  .supply-catalog-row .supply-stock-values {
    grid-column: 2;
    justify-items: start;
    text-align: left;
  }
}

/* Setup wizard: checkbox + department name in one line */
#setupWizard .setup-department-presets .setup-department-preset {
  display: inline-flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 8px !important;
  width: auto !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  grid-template-columns: none !important;
}
#setupWizard .setup-department-presets .setup-department-preset__box {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
  margin: 0 !important;
  flex: 0 0 18px !important;
}
#setupWizard .setup-department-presets .setup-department-preset__name {
  white-space: nowrap !important;
}

#tab-warnings.warnings-employee-view #warningsFilterForm,
#tab-warnings.warnings-employee-view form#warningsFilterForm,
#tab-warnings.warnings-employee-view #warningsFilterForm.warnings-filter-form,
#tab-warnings.warnings-employee-view #warningsFilterForm.form-grid-4 {
  display: none !important;
}
