/* В духе плоской палитры Bitrix24 (светлая сетка, ссылки) */
.b24-page {
  margin: 0;
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  color: #333;
  background: #eef2f4;
  height: 100vh;
  overflow: hidden;
}

.b24-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  max-width: none;
  margin: 0;
  padding: 12px;
  box-sizing: border-box;
}

.b24-card {
  background: #fff;
  border: 1px solid #dfe3e6;
  border-radius: 8px;
  overflow: hidden;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.b24-tabs-bar {
  --tab-bar-bg: #e8ecef;
  --tab-active-bg: #fff;
  --tab-curve: 10px;
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px 0;
  background: var(--tab-bar-bg);
  border-bottom: 1px solid #dfe3e6;
  flex: 0 0 auto;
  box-sizing: border-box;
}

.b24-tabs-bar__tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0;
  min-width: 0;
  flex: 1 1 auto;
}

.b24-tab-btn {
  position: relative;
  z-index: 1;
  font: inherit;
  font-weight: 500;
  font-size: 13px;
  line-height: 1.25;
  padding: 8px 14px 9px;
  margin: 0;
  border: none;
  background: transparent;
  color: #5f6368;
  cursor: pointer;
  border-radius: 0;
  transition: color 0.15s ease;
}

.b24-tab-btn[hidden] {
  display: none !important;
}

.b24-tab-btn:not(.b24-tab-btn--active):hover {
  color: #202124;
}

.b24-tab-btn--active,
.b24-tab-btn--active:hover {
  z-index: 2;
  color: #2066b0;
  font-weight: 600;
  background: var(--tab-active-bg);
  margin-bottom: -1px;
  padding-bottom: 10px;
  border-radius: var(--tab-curve) var(--tab-curve) 0 0;
}

.b24-tab-btn--active::before,
.b24-tab-btn--active::after {
  content: "";
  position: absolute;
  bottom: 0;
  width: var(--tab-curve);
  height: var(--tab-curve);
  background: var(--tab-bar-bg);
  pointer-events: none;
}

.b24-tab-btn--active::before {
  left: calc(-1 * var(--tab-curve));
  border-bottom-right-radius: var(--tab-curve);
  box-shadow: 5px 0 0 0 var(--tab-active-bg);
}

.b24-tab-btn--active::after {
  right: calc(-1 * var(--tab-curve));
  top: auto;
  width: var(--tab-curve);
  height: var(--tab-curve);
  background: var(--tab-bar-bg);
  border-bottom-left-radius: var(--tab-curve);
  box-shadow: -5px 0 0 0 var(--tab-active-bg);
}

.b24-tab-btn:focus {
  outline: none;
}

.b24-tab-panel {
  padding: 16px;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
}

.b24-tab-panel[hidden] {
  display: none !important;
}

.b24-tab-panel__inner {
  padding: 0;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.b24-registry-root,
.b24-sites-root,
.b24-ecolife-sites-root,
.b24-pickups-root,
.b24-orders-root,
.b24-bins-root,
.b24-benefits-root,
.b24-tariffs-root,
.b24-docs-root {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.b24-registry-root .b24-section-chrome,
.b24-sites-root .b24-section-chrome,
.b24-ecolife-sites-root .b24-section-chrome,
.b24-mkd-root .b24-section-chrome,
.b24-pickups-root .b24-section-chrome,
.b24-orders-root .b24-section-chrome,
.b24-bins-root .b24-section-chrome,
.b24-benefits-root .b24-section-chrome,
.b24-tariffs-root .b24-section-chrome {
  flex: 0 0 auto;
  z-index: 40;
  overflow: visible;
}

.b24-registry-root .b24-section-chrome .b24-err,
.b24-sites-root .b24-section-chrome .b24-err,
.b24-ecolife-sites-root .b24-section-chrome .b24-err,
.b24-mkd-root .b24-section-chrome .b24-err,
.b24-pickups-root .b24-section-chrome .b24-err,
.b24-orders-root .b24-section-chrome .b24-err,
.b24-bins-root .b24-section-chrome .b24-err,
.b24-benefits-root .b24-section-chrome .b24-err,
.b24-tariffs-root .b24-section-chrome .b24-err {
  margin: 0 0 8px;
}

.b24-registry-root .b24-toolbar,
.b24-sites-root .b24-toolbar,
.b24-ecolife-sites-root .b24-toolbar,
.b24-mkd-root .b24-toolbar,
.b24-pickups-root .b24-toolbar,
.b24-orders-root .b24-toolbar,
.b24-bins-root .b24-toolbar,
.b24-benefits-root .b24-toolbar,
.b24-tariffs-root .b24-toolbar {
  margin-bottom: 12px;
  overflow: visible;
}

/* Тулбар «Клиентов» плотнее остальных: кнопок много, а шрифт и отступы — как у b24-btn-sm. */
.b24-registry-root .b24-toolbar .b24-btn {
  height: 32px;
  padding: 0 12px;
  font-size: 12px;
}

.b24-registry-root .b24-toolbar .b24-btn-icon {
  width: 32px;
  min-width: 32px;
  padding: 0;
}

.b24-registry-root .b24-toolbar .b24-input,
.b24-registry-root .b24-toolbar .b24-select {
  height: 32px;
  font-size: 13px;
}

/* Счётчик выделенных строк: галочки в таблице «Клиентов» задают выборку для экспорта и массового редактирования. */
.b24-registry-selection {
  font-weight: 600;
  color: #2066b0;
}

.b24-note_selection {
  color: #2066b0;
}

.b24-sites-root .b24-col-chk {
  user-select: none;
}

.b24-registry-root .b24-section-body,
.b24-sites-root .b24-section-body,
.b24-ecolife-sites-root .b24-section-body,
.b24-mkd-root .b24-section-body,
.b24-pickups-root .b24-section-body,
.b24-orders-root .b24-section-body,
.b24-bins-root .b24-section-body,
.b24-benefits-root .b24-section-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

/* Несколько таблиц подряд: скроллится вся область, а не одна таблица на 100% высоты. */
.b24-tariffs-root .b24-section-body,
.b24-tariffs-root.b24-registry-root .b24-section-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.b24-registry-root .b24-table-wrap,
.b24-sites-root .b24-table-wrap,
.b24-ecolife-sites-root .b24-table-wrap,
.b24-mkd-root .b24-table-wrap,
.b24-pickups-root .b24-table-wrap,
.b24-orders-root .b24-table-wrap,
.b24-bins-root .b24-table-wrap,
.b24-benefits-root .b24-table-wrap {
  height: 100%;
  max-height: none;
  border-radius: 2px 2px 0 0;
}

.b24-tariffs-root .b24-table-wrap,
.b24-tariffs-root.b24-registry-root .b24-table-wrap {
  height: auto;
  max-height: none;
}

.b24-registry-root .b24-table thead th,
.b24-sites-root .b24-table thead th,
.b24-ecolife-sites-root .b24-table thead th,
.b24-mkd-root .b24-table thead th,
.b24-pickups-root .b24-table thead th,
.b24-orders-root .b24-table thead th,
.b24-bins-root .b24-table thead th,
.b24-benefits-root .b24-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f5f7f8;
  box-shadow: 0 1px 0 #dfe3e6;
}

.b24-registry-root .b24-section-footer,
.b24-sites-root .b24-section-footer,
.b24-ecolife-sites-root .b24-section-footer,
.b24-mkd-root .b24-section-footer,
.b24-pickups-root .b24-section-footer,
.b24-orders-root .b24-section-footer,
.b24-bins-root .b24-section-footer {
  flex: 0 0 auto;
  z-index: 2;
  margin-top: 0;
  padding: 10px 16px 12px;
  background: #fff;
  border: 1px solid #dfe3e6;
  border-top: none;
  border-radius: 0 0 2px 2px;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.06);
}

.b24-loader {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}

.b24-loader[hidden] {
  display: none !important;
}

.b24-loader__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(238, 242, 244, 0.72);
}

.b24-loader__box {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: #fff;
  border: 1px solid #dfe3e6;
  border-radius: 4px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  font-size: 14px;
  color: #333;
}

.b24-loader__spinner {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border: 2px solid #d3d9de;
  border-top-color: #2fc6f6;
  border-radius: 50%;
  animation: b24-spin 0.7s linear infinite;
}

.b24-inline-loader {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #525c69;
  font-size: 13px;
}

.b24-inline-loader::before {
  content: '';
  width: 14px;
  height: 14px;
  border: 2px solid #d3d9de;
  border-top-color: #2fc6f6;
  border-radius: 50%;
  animation: b24-spin 0.7s linear infinite;
}

html.is-theme-nocturne .b24-loader__backdrop,
body.is-theme-nocturne .b24-loader__backdrop {
  background: rgba(22, 24, 38, 0.72);
}

html.is-theme-nocturne .b24-loader__box,
body.is-theme-nocturne .b24-loader__box {
  background: var(--noct-surface, #1e2030);
  border-color: color-mix(in srgb, var(--noct-text, #e9e9ed) 14%, transparent);
  color: var(--noct-text, #e9e9ed);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

html.is-theme-nocturne .b24-inline-loader,
body.is-theme-nocturne .b24-inline-loader {
  color: var(--noct-neutral-400, #a0a3b1);
}

html.is-theme-nocturne .b24-inline-loader::before,
body.is-theme-nocturne .b24-inline-loader::before {
  border-color: color-mix(in srgb, var(--noct-text, #e9e9ed) 22%, transparent);
  border-top-color: var(--noct-accent, #2fc6f6);
}

@keyframes b24-spin {
  to {
    transform: rotate(360deg);
  }
}

.b24-title {
  font-size: 26px;
  font-weight: 600;
  color: #333;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}

.b24-lead,
.b24-note {
  line-height: 1.55;
  color: #525c69;
  margin: 0 0 12px;
}

.b24-note {
  font-size: 13px;
}

.b24-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.b24-toolbar__filters {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  position: relative;
  overflow: visible;
}

.b24-toolbar > .b24-meta {
  margin-left: auto;
}

.b24-col-picker-wrap,
.b24-filter-picker-wrap {
  position: relative;
}

.b24-btn-filter {
  min-width: 120px;
  justify-content: space-between;
}

.b24-btn-filter.is-active {
  border-color: #2fc6f6;
  background: #e8f7fc;
  color: #2066b0;
}

.b24-btn-filter.is-active:hover {
  background: #dff3fa;
  border-color: #2fc6f6;
  color: #2066b0;
}

.b24-btn-stats-toggle.is-active {
  border-color: #2fc6f6;
  background: #e8f7fc;
  color: #2066b0;
}

.b24-btn-stats-toggle.is-active:hover {
  background: #dff3fa;
  border-color: #2fc6f6;
  color: #2066b0;
}

.b24-filter-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 60;
  min-width: 240px;
  max-width: 320px;
  max-height: 280px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #d3d9de;
  border-radius: 2px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.b24-filter-panel[hidden] {
  display: none !important;
}

.b24-filter-panel__toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  flex-shrink: 0;
}

.b24-input-filter-search {
  width: 100%;
  min-width: 0;
  margin-bottom: 8px;
  flex-shrink: 0;
  box-sizing: border-box;
}

.b24-filter-panel_stages {
  min-width: 280px;
  max-width: 360px;
  max-height: 360px;
}

.b24-checklist_filter {
  overflow: auto;
  max-height: 220px;
}

.b24-filter-panel_stages .b24-checklist_filter {
  max-height: 260px;
}

.b24-columns-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 50;
  min-width: 220px;
  max-width: 280px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #d3d9de;
  border-radius: 2px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.b24-columns-panel[hidden] {
  display: none !important;
}

/* positionAnchoredPanel (mkd.js) вешает is-fixed и ставит координаты
   относительно вьюпорта — без position: fixed панель улетает за экран.
   Правило пришло из биллинга вместе с МКД (styles.css биллинга). */
.b24-columns-panel.is-fixed {
  position: fixed;
  top: auto;
  left: auto;
  right: auto;
  z-index: 200;
}

.b24-columns-panel__title {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  color: #525c69;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.b24-columns-panel__hint {
  margin: 0 0 8px;
  font-size: 12px;
  color: #868d95;
}

.b24-columns-order-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 320px;
  overflow-y: auto;
}

.b24-col-order-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
  border-radius: 2px;
  cursor: default;
  user-select: none;
}

.b24-col-order-item--dragging {
  opacity: 0.45;
}

.b24-col-order-item--over {
  background: rgba(47, 198, 246, 0.12);
}

.b24-col-order-handle {
  flex: 0 0 auto;
  width: 18px;
  padding: 2px 0;
  color: #a8adb4;
  font-size: 12px;
  line-height: 1;
  cursor: grab;
  letter-spacing: -2px;
  touch-action: none;
}

.b24-col-order-handle:active {
  cursor: grabbing;
}

.b24-col-order-item label {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-size: 13px;
}

.b24-col-order-item--locked .b24-col-order-label {
  color: #525c69;
}

.b24-toolbar-search {
  flex: 1 1 200px;
  min-width: 160px;
  max-width: 420px;
}

.b24-toolbar__meta {
  margin-left: auto;
  white-space: nowrap;
}

.b24-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  height: 36px;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  background: #2fc6f6;
  color: #fff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
}

.b24-btn:hover {
  background: #25b0e0;
}

.b24-btn:active {
  transform: translateY(1px);
}

.b24-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.b24-btn-ghost {
  background: #fff;
  color: #2b76b8;
  border: 1px solid #d3d9de;
  box-shadow: none;
}

.b24-btn-ghost:hover {
  background: #f5f7f8;
}

.b24-btn-mini {
  height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.b24-btn-danger {
  color: #c0392b;
  border-color: #e8b4ae;
}

.b24-btn-danger:hover {
  background: #fdf2f0;
  border-color: #d98c84;
  color: #a93226;
}

.b24-input,
.b24-select {
  height: 36px;
  border: 1px solid #d3d9de;
  border-radius: 2px;
  padding: 0 10px;
  font: inherit;
  color: #333;
  background: #fff;
}

.b24-filter-panel_saved {
  min-width: 260px;
  max-width: 320px;
}

.b24-saved-filters__list {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  max-height: 220px;
  overflow: auto;
  margin-top: 4px;
}

.b24-saved-filters__empty {
  font-size: 13px;
  padding: 4px 2px;
}

.b24-saved-filter-chip {
  display: flex;
  align-items: stretch;
  width: 100%;
  min-height: 32px;
  border: 1px solid #d3d9de;
  border-radius: 2px;
  background: #f5f7f8;
  overflow: hidden;
  box-sizing: border-box;
}

.b24-saved-filter-chip:hover {
  border-color: #a8b4be;
  background: #eef5fb;
}

.b24-saved-filter-chip.is-active {
  border-color: #2fc6f6;
  background: #e8f7fc;
}

.b24-saved-filter-chip__apply {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  padding: 6px 10px;
  border: 0;
  background: transparent;
  color: #333;
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.b24-saved-filter-chip.is-active .b24-saved-filter-chip__apply {
  color: #2066b0;
}

.b24-saved-filter-chip__delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 28px;
  width: 28px;
  padding: 0;
  border: 0;
  border-left: 1px solid #d3d9de;
  background: transparent;
  color: #868d95;
  font: inherit;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.b24-saved-filter-chip__delete:hover {
  color: #a94442;
  background: #fdf2f0;
}

.b24-input-block {
  display: block;
  width: 100%;
  min-width: 0;
  margin-top: 6px;
  box-sizing: border-box;
}

.b24-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #dfe3e6;
  border-radius: 2px;
}

.b24-filters__search {
  flex: 1 1 320px;
  width: 320px;
  min-width: 240px;
  max-width: 480px;
}

.b24-toolbar > .b24-filters__search {
  flex: 1 1 320px;
  min-width: 260px;
  max-width: 520px;
}

.b24-filters-menu-wrap {
  flex: 0 0 auto;
}

.b24-btn-icon {
  position: relative;
  width: 36px;
  min-width: 36px;
  padding: 0;
  color: #525c69;
}

.b24-btn-icon:hover {
  color: #2066b0;
}

.b24-btn-icon[aria-expanded='true'] {
  color: #2066b0;
  background: #eef5fb;
  box-shadow: inset 0 0 0 1px #b8d4ee;
}

.b24-btn-icon__svg,
.b24-ico-svg {
  display: block;
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
}

.b24-btn-icon .b24-ico-svg {
  width: 17px;
  height: 17px;
}

.b24-filters-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #2fc6f6;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  box-sizing: border-box;
}

.b24-filters-badge[hidden] {
  display: none !important;
}

.b24-filters-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: auto;
  z-index: 70;
  width: min(760px, calc(100vw - 32px));
  max-height: min(82vh, 780px);
  padding: 0;
  background: #fff;
  border: 1px solid #d3d9de;
  border-radius: 2px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.14);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.b24-filters-dropdown.is-fixed {
  position: fixed;
  margin: 0;
}

.b24-filters-dropdown[hidden] {
  display: none !important;
}

.b24-filters-dropdown__head {
  flex: 0 0 auto;
  padding: 12px 14px 8px;
  font-size: 12px;
  font-weight: 600;
  color: #525c69;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid #eef0f2;
}

.b24-filters-dropdown__body {
  flex: 1 1 auto;
  overflow: auto;
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: min(72vh, 680px);
}

.b24-filters-dropdown__row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}

.b24-filters-dropdown__row_pickers {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 10px;
}

.b24-filters-dropdown__row_selects {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 10px;
}

.b24-filters-dropdown__row_selects .b24-select-filter {
  flex: 1 1 180px;
  max-width: none;
}

.b24-filters-dropdown .b24-btn-filter {
  min-width: 0;
  width: 100%;
}

.b24-filters-dropdown .b24-filter-picker-wrap {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  flex: 1 1 220px;
  min-width: 200px;
}

.b24-filters-dropdown .b24-filter-picker-wrap_block {
  flex: 1 1 100%;
}

.b24-filters-dropdown .b24-filter-panel {
  position: static;
  top: auto;
  left: auto;
  z-index: auto;
  width: 100%;
  min-width: 0;
  max-width: none;
  max-height: 280px;
  margin: 0;
  box-shadow: none;
  border-radius: 2px;
}

.b24-filters-dropdown .b24-filter-panel_stages,
.b24-filters-dropdown .b24-filter-panel_saved {
  max-height: 320px;
}

.b24-input {
  min-width: 200px;
}

.b24-input-sm {
  min-width: 140px;
}

.b24-input-date {
  width: 132px;
  min-width: 0;
  max-width: 132px;
  padding-left: 8px;
  padding-right: 6px;
  box-sizing: border-box;
}

.b24-select-filter {
  min-width: 0;
  width: auto;
  max-width: 160px;
}

.b24-filter-panel_numeric,
.b24-filter-panel_period {
  min-width: 280px;
  padding-bottom: 12px;
  /* Строк больше, чем влезает в базовые 280px — иначе низ обрезается без скролла */
  overflow-y: auto;
}

.b24-filters-dropdown .b24-filter-panel_numeric,
.b24-filters-dropdown .b24-filter-panel_period {
  min-width: 0;
  /* Внутри выпадающего списка фильтров скроллится сам __body — панель растёт по содержимому */
  max-height: none;
}

.b24-filter-panel_period .b24-filter-range__inputs {
  flex-wrap: nowrap;
}

.b24-filter-range {
  margin-top: 10px;
}

.b24-filter-range:first-of-type {
  margin-top: 4px;
}

.b24-filter-range__label {
  display: block;
  font-size: 12px;
  color: #525c69;
  margin-bottom: 6px;
}

.b24-filter-range__inputs {
  display: flex;
  align-items: center;
  gap: 8px;
}

.b24-input-range {
  min-width: 0;
  width: 100px;
  flex: 1 1 100px;
}

.b24-filter-range__sep {
  color: #a8adb4;
  flex-shrink: 0;
}

.b24-filter-none-option {
  display: block;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eef1f3;
  font-weight: 500;
}

.b24-filter-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 13px;
  color: #333;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

.b24-filter-check input {
  margin: 0;
  cursor: pointer;
}

.b24-segmented {
  display: inline-flex;
  align-items: stretch;
  height: 36px;
  border: 1px solid #d3d9de;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.b24-segmented__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0 12px;
  height: 100%;
  font-size: 13px;
  color: #525c69;
  white-space: nowrap;
  border-right: 1px solid #d3d9de;
  background: #fff;
  cursor: pointer;
  user-select: none;
}

.b24-segmented__item:last-child {
  border-right: 0;
}

.b24-segmented__item input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.b24-segmented__item:has(input:checked) {
  background: #e8f7fc;
  color: #2066b0;
  box-shadow: inset 0 0 0 1px #2fc6f6;
  z-index: 1;
}

.b24-segmented__item:hover {
  background: #f5f7f8;
}

.b24-segmented__item:has(input:checked):hover {
  background: #e8f7fc;
}

.b24-meta {
  font-size: 13px;
  color: #868d95;
}

.b24-err {
  background: #fdeaea;
  border: 1px solid #f5c6cb;
  color: #a94442;
  padding: 12px 14px;
  border-radius: 2px;
  margin-bottom: 16px;
  font-size: 13px;
}

.b24-table-wrap {
  background: #fff;
  border: 1px solid #dfe3e6;
  border-radius: 2px;
  overflow: auto;
  max-height: calc(100vh - 260px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.b24-table-wrap.is-loading-more {
  scroll-behavior: smooth;
}

tr.b24-row-sentinel td {
  text-align: center;
  color: #868d95;
  font-size: 13px;
  padding: 14px;
  background: #f8fafb;
}

.b24-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1100px;
}

.b24-table thead th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #868d95;
  background: #f5f7f8;
  border-bottom: 1px solid #dfe3e6;
  padding: 12px 14px;
  white-space: nowrap;
}

.b24-table thead th[data-sort],
.b24-table thead th.b24-th-sort,
.b24-table thead th.b24-mkd-th-sort {
  cursor: pointer;
  user-select: none;
}

.b24-th-sort-mark,
.b24-mkd-th-sort__mark {
  display: inline;
  margin-left: 0.35em;
  font-size: 1em;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
  opacity: 1;
}

.b24-col-label {
  position: relative;
  display: inline-block;
}

.b24-col-label:has(.b24-col-help) {
  padding-right: 13px;
}

.b24-col-help {
  position: absolute;
  top: -6px;
  right: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 12px;
  color: #a2abb3;
  cursor: help;
  z-index: 2;
}

.b24-col-help .b24-ico {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.b24-col-help:hover,
.b24-col-help:focus {
  color: #2066b0;
  outline: none;
}

.b24-table thead th:has(.b24-col-help:hover),
.b24-table thead th:has(.b24-col-help:focus) {
  z-index: 4;
}

.b24-col-help::after {
  content: attr(data-hint);
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  z-index: 20;
  width: max-content;
  max-width: 280px;
  padding: 8px 10px;
  border-radius: 6px;
  background: #3e4348;
  color: #fff;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0;
  text-transform: none;
  white-space: normal;
  text-align: left;
  opacity: 0;
  pointer-events: none;
}

.b24-col-help:hover::after,
.b24-col-help:focus::after {
  opacity: 1;
}

/* Ручная ширина столбцов: точные ширины соблюдаются только при fixed-раскладке,
   а длинные значения тогда должны переноситься, а не распирать столбец. */
.b24-table_fixed-cols {
  table-layout: fixed;
  min-width: 0;
}

.b24-table_fixed-cols thead th,
.b24-table_fixed-cols tbody td {
  white-space: normal;
  overflow-wrap: anywhere;
}

.b24-table_fixed-cols tbody td.b24-cell-nowrap,
.b24-table_fixed-cols thead th.b24-col-chk,
.b24-table_fixed-cols tbody td.b24-col-chk {
  white-space: nowrap;
}

/* Sticky-столбцы МКД/статистики задают min/max-width — при ручных ширинах
   их снимаем, иначе перетаскивание упирается в потолок CSS. */
.b24-table_fixed-cols .b24-col-sticky,
.b24-table_fixed-cols .b24-stats-col-sticky {
  min-width: 0;
  max-width: none;
}

.b24-table_fixed-cols th.b24-num,
.b24-table_fixed-cols td.b24-num {
  width: auto;
}

.b24-stats-table.b24-table_fixed-cols th,
.b24-stats-table.b24-table_fixed-cols td {
  white-space: normal;
  overflow-wrap: anywhere;
}

.b24-table thead th {
  position: relative;
}

.b24-col-resizer {
  position: absolute;
  top: 0;
  right: -3px;
  width: 7px;
  height: 100%;
  cursor: col-resize;
  user-select: none;
  z-index: 3;
}

.b24-col-resizer::after {
  content: '';
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 3px;
  width: 1px;
  background: #b8c2cc;
}

.b24-col-resizer:hover::after {
  background: #2fc6f6;
  width: 2px;
}

/* Во время перетаскивания курсор col-resize держим на всём документе. */
body.is-col-resizing-drag {
  cursor: col-resize;
  user-select: none;
}

.b24-columns-panel__mode {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid #e6eaed;
}

.b24-columns-panel__mode-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  cursor: pointer;
}

/* .b24-link-btn задаёт display: inline-block и перебивает [hidden]. */
.b24-columns-panel__mode .b24-link-btn[hidden] {
  display: none;
}

.b24-registry-root.is-theme-nocturne .b24-columns-panel__mode {
  border-bottom-color: var(--noct-divider);
}

.b24-registry-root.is-theme-nocturne .b24-col-resizer::after {
  background: var(--noct-divider);
}

.b24-registry-root.is-theme-nocturne .b24-col-resizer:hover::after {
  background: var(--noct-accent);
}

.b24-table thead th[data-sort]:hover,
.b24-table thead th.b24-th-sort:hover,
.b24-table thead th.b24-mkd-th-sort:hover {
  color: #2066b0;
  background: #eef5fb;
}

.b24-table thead th.is-sorted,
.b24-table thead th[data-sort].is-sorted,
.b24-table thead th.b24-th-sort.is-sorted,
.b24-table thead th.b24-mkd-th-sort.is-sorted {
  color: #2066b0;
  background: #e8f2fb;
}

.b24-table tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid #eef0f2;
  vertical-align: top;
  color: #333;
}

.b24-table tbody td.is-sorted,
.b24-table tfoot td.is-sorted {
  background: #eef5fb;
}

.b24-table tbody tr:hover td,
.b24-table tbody tr:has(> td:first-child input[type="checkbox"]:checked) td,
.b24-table tbody tr.b24-row-selected td {
  background: #f8fafb;
}

.b24-table tbody tr:hover td.is-sorted,
.b24-table tbody tr:has(> td:first-child input[type="checkbox"]:checked) td.is-sorted,
.b24-table tbody tr.b24-row-selected td.is-sorted {
  background: #e3eef8;
}

body.is-theme-nocturne .b24-table thead th[data-sort]:hover,
body.is-theme-nocturne .b24-table thead th.b24-th-sort:hover,
body.is-theme-nocturne .b24-table thead th.b24-mkd-th-sort:hover {
  color: var(--noct-accent);
  background: color-mix(in srgb, var(--noct-accent) 12%, transparent);
}

body.is-theme-nocturne .b24-table thead th.is-sorted,
body.is-theme-nocturne .b24-table thead th[data-sort].is-sorted,
body.is-theme-nocturne .b24-table thead th.b24-th-sort.is-sorted,
body.is-theme-nocturne .b24-table thead th.b24-mkd-th-sort.is-sorted {
  color: var(--noct-accent);
  background: color-mix(in srgb, var(--noct-accent) 18%, transparent);
}

body.is-theme-nocturne .b24-table tbody td.is-sorted,
body.is-theme-nocturne .b24-table tfoot td.is-sorted {
  background: color-mix(in srgb, var(--noct-accent) 14%, transparent);
}

body.is-theme-nocturne .b24-table tbody tr:hover td.is-sorted,
body.is-theme-nocturne .b24-table tbody tr:has(> td:first-child input[type="checkbox"]:checked) td.is-sorted,
body.is-theme-nocturne .b24-table tbody tr.b24-row-selected td.is-sorted {
  background: color-mix(in srgb, var(--noct-accent) 22%, transparent);
}

.b24-table tbody tr:last-child td {
  border-bottom: none;
}

.b24-table th[data-col="companyLegalAddress"],
.b24-table td[data-col="companyLegalAddress"],
.b24-table th[data-col="company"],
.b24-table td[data-col="company"],
.b24-table th[data-col="contact"],
.b24-table td[data-col="contact"],
.b24-table th[data-col="deal"],
.b24-table td[data-col="deal"] {
  min-width: 25ch;
}

/* Клиенты: по умолчанию колонки держат ширину заголовка и значения.
   Перенос — только в режиме правки ширины (table-layout: fixed), иначе
   overflow-wrap: anywhere схлопывает столбец до одной буквы и таблица разъезжается. */
#registry-table th[data-col="partyType"],
#registry-table td[data-col="partyType"] {
  min-width: 7.5rem;
  white-space: nowrap;
}

#registry-table th[data-col="contractNumber"],
#registry-table td[data-col="contractNumber"] {
  min-width: 11rem;
  white-space: nowrap;
}

#registry-table th[data-col="stageName"],
#registry-table td[data-col="stageName"] {
  min-width: 16rem;
  white-space: nowrap;
}

#registry-table th[data-col="categoryName"],
#registry-table td[data-col="categoryName"] {
  min-width: 16rem;
  white-space: nowrap;
}

#registry-table.b24-table_fixed-cols th[data-col="partyType"],
#registry-table.b24-table_fixed-cols td[data-col="partyType"],
#registry-table.b24-table_fixed-cols th[data-col="contractNumber"],
#registry-table.b24-table_fixed-cols td[data-col="contractNumber"],
#registry-table.b24-table_fixed-cols th[data-col="stageName"],
#registry-table.b24-table_fixed-cols td[data-col="stageName"],
#registry-table.b24-table_fixed-cols th[data-col="categoryName"],
#registry-table.b24-table_fixed-cols td[data-col="categoryName"] {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Площадки: объём короткий («0,12 м³»), в фиксированной раскладке
   overflow-wrap: anywhere иначе режет значение посередине. */
#sites-table td[data-col="containerVolume"] {
  white-space: nowrap;
  overflow-wrap: normal;
}

.b24-doc-channel-select {
  min-width: 8.5rem;
  max-width: 12rem;
  padding: 4px 6px;
  font-size: 13px;
}

.b24-addr {
  min-width: 25ch;
}

/* ---- Высота строк списка ----
   Длинный текст в ячейке обрезается по числу строк, чтобы соседние записи
   оставались сравнимыми глазом. Разворачивает всю таблицу сразу кнопка
   «Развернуть» (row_clamp.js — файл одинаковый в биллинге и реестре). */

.b24-clamp {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  word-break: break-word;
}

.b24-clamp_2 {
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.is-rows-expanded .b24-clamp {
  display: block;
  overflow: visible;
  -webkit-line-clamp: unset;
  line-clamp: unset;
}

button.b24-clamp {
  text-align: left;
}

/* Полный текст обрезанной ячейки: тот же вид, что у подсказки столбца
   (.b24-col-help), но элемент живёт на body — иначе overflow таблицы его режет. */
.b24-cell-overflow-hint {
  position: fixed;
  z-index: 1200;
  max-width: min(420px, calc(100vw - 24px));
  max-height: min(40vh, 320px);
  overflow: hidden;
  padding: 8px 10px;
  border-radius: 6px;
  background: #3e4348;
  color: #fff;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0;
  text-transform: none;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  text-align: left;
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.b24-cell-overflow-hint[hidden] {
  display: none !important;
}

html.is-theme-nocturne .b24-cell-overflow-hint,
body.is-theme-nocturne .b24-cell-overflow-hint {
  background: #2a2c3b;
  color: #e9e9ed;
  border: 1px solid color-mix(in srgb, #e9e9ed 16%, transparent);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* Юрадрес пришёл к тому же механизму раньше остальных: сохраняем перенос
   строк из исходника, всё прочее — общие правила .b24-clamp. */
.b24-addr__text {
  white-space: pre-line;
}

.b24-addr__more {
  display: inline;
  margin-top: 2px;
  padding: 0;
  border: 0;
  background: none;
  color: #2066b0;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  text-decoration: none;
}

.b24-addr__more:hover {
  text-decoration: underline;
}

.b24-pager {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.b24-link {
  color: #2066b0;
  text-decoration: none;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  font: inherit;
}

.b24-link:hover {
  text-decoration: underline;
  color: #1056a0;
}

.b24-muted {
  color: #a8adb4;
  font-style: italic;
}

.b24-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 2px;
  background: #e3f6fd;
  color: #0b6f91;
}

.b24-badge_ok {
  background: #e8f5e9;
  color: #2e7d32;
}

.b24-badge_warn {
  background: #fff8e1;
  color: #8a6d00;
}

.b24-badge_off {
  background: #f2f3f5;
  color: #6a737d;
}

.b24-badge_party-individual {
  background: #e3f6fd;
  color: #0b6f91;
  font-weight: 500;
}

.b24-badge_party-legal {
  background: #eef0f4;
  color: #525c69;
  font-weight: 700;
}

.b24-badge_party-budget {
  background: #e8f5e9;
  color: #2e7d32;
  font-weight: 600;
}

code {
  font-size: 12px;
  background: #eef1f4;
  padding: 1px 6px;
  border-radius: 2px;
}

.b24-btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 12px;
}

.b24-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.b24-modal[hidden] {
  display: none !important;
}

.b24-modal_over {
  z-index: 1100;
}

.b24-modal__panel_confirm {
  max-width: 420px;
}

.b24-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}

.b24-modal__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  overflow: auto;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  padding: 20px 22px 18px;
}

.b24-modal__title {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 600;
}

.b24-modal__toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.b24-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.b24-checklist {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 280px;
  overflow-y: auto;
  padding: 8px 10px;
  border: 1px solid #d3d9de;
  border-radius: 2px;
  background: #f8fafb;
}

.b24-checklist label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: #333;
}

.b24-checklist input {
  flex-shrink: 0;
}

.b24-rebuild-progress {
  margin: 10px 0 0;
  line-height: 1.45;
}

.b24-modal__panel_wide {
  max-width: 620px;
}

#client-card-modal .b24-modal__panel_client-card {
  width: min(96vw, 780px);
  max-width: 780px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#client-card-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

#client-card-modal .b24-form-grid {
  flex: none;
  min-height: 0;
  overflow: visible;
  margin-bottom: 0;
}

#client-card-modal .b24-client-card-assign {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #e6eaee;
}

#client-card-modal .b24-client-card-assign h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

#client-card-modal .b24-client-card-assign h3:not(:first-child) {
  margin-top: 18px;
}

#client-card-modal .b24-client-card-assign__actions {
  margin: 8px 0 0;
}

#client-card-modal .b24-client-card-assign label.b24-form-field {
  flex-direction: column;
  align-items: stretch;
}

#client-card-modal .b24-client-card-assign .b24-form-field__label {
  padding-top: 0;
}

#client-card-modal .b24-client-card-assign .b24-table-wrap {
  max-height: 36vh;
  overflow: auto;
}

body.is-theme-nocturne #client-card-modal .b24-client-card-assign {
  border-top-color: rgba(255, 255, 255, 0.12);
}

#client-card-modal .b24-modal__actions {
  flex: 0 0 auto;
  margin-top: 12px;
  padding-top: 4px;
}

#client-card-modal .b24-form-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 0;
}

#client-card-modal .b24-form-field:has(.b24-client-card__textarea) {
  align-items: flex-start;
}

#client-card-modal .b24-form-field:has(.b24-client-card__textarea) .b24-form-field__label {
  padding-top: 8px;
}

#client-card-modal .b24-form-field .b24-input,
#client-card-modal .b24-form-field .b24-client-card__control,
#client-card-modal .b24-form-field .b24-client-card__party-select {
  flex: 1 1 auto;
  min-width: 0;
}

#client-card-modal .b24-client-card__textarea {
  height: auto;
  min-height: 56px;
  padding-top: 8px;
  padding-bottom: 8px;
  resize: none;
  line-height: 1.35;
}

#client-card-modal .b24-client-card__control {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 36px;
  padding: 4px 10px;
  border: 1px solid #d3d9de;
  border-radius: 2px;
  background: #fff;
  box-sizing: border-box;
}

#client-card-modal .b24-client-card__control .b24-clamp {
  display: inline;
  -webkit-line-clamp: unset;
  line-clamp: unset;
  overflow: visible;
  white-space: normal;
}

#registry-table tbody tr[data-ls] {
  cursor: pointer;
}

#registry-table tbody tr.b24-row-active {
  box-shadow: inset 4px 0 0 #2f80ed;
  outline: 1px solid rgba(47, 128, 237, 0.35);
  outline-offset: -1px;
}

#registry-table tbody tr.b24-row-active:not(.b24-row-selected) td {
  background: rgba(47, 128, 237, 0.05);
}

body.is-theme-nocturne #client-card-modal .b24-client-card__control {
  background: var(--noct-bg);
  border-color: var(--noct-divider);
  border-radius: var(--noct-radius-md);
}

body.is-theme-nocturne #registry-table tbody tr.b24-row-active {
  box-shadow: inset 4px 0 0 var(--noct-accent);
  outline-color: color-mix(in srgb, var(--noct-accent) 45%, transparent);
}

body.is-theme-nocturne #registry-table tbody tr.b24-row-active:not(.b24-row-selected) td {
  background: color-mix(in srgb, var(--noct-accent) 10%, transparent);
}

@media (max-width: 720px) {
  #client-card-modal .b24-form-field {
    flex-direction: column;
    align-items: stretch;
  }

  #client-card-modal .b24-form-field__label {
    min-width: 0;
  }
}

@media (max-width: 720px) {
  #client-card-modal .b24-form-field {
    flex-direction: column;
    align-items: stretch;
  }

  #client-card-modal .b24-form-field__label {
    min-width: 0;
  }
}

.b24-export-filters {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 14px;
}

.b24-export-filter-block__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.b24-export-filter-block__tools {
  display: flex;
  gap: 6px;
}

.b24-export-filter-block .b24-input-filter-search {
  width: 100%;
  margin-bottom: 6px;
  box-sizing: border-box;
}

.b24-export-dates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
}

.b24-export-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: #525c69;
}

.b24-select-block {
  width: 100%;
}

.b24-mass-edit-value {
  margin-top: 10px;
}

.b24-mass-edit-clear {
  display: block;
  margin-bottom: 10px;
  cursor: pointer;
}

.b24-mass-edit-clear input {
  margin-right: 6px;
}

.b24-mass-edit-value.is-clear .b24-input-block,
.b24-mass-edit-value.is-clear .b24-select-block {
  opacity: 0.45;
  pointer-events: none;
}

.b24-mass-edit-value .b24-input-block,
.b24-mass-edit-value .b24-select-block {
  margin-top: 6px;
}

.b24-export-cols-toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.b24-checklist_export {
  max-height: 220px;
}

/* ================================================================
   Nocturne palette (colors/background only)
   Start small: scope to registry "Clients" block (.b24-registry-root)
   ================================================================ */
.b24-registry-root.is-theme-nocturne {
  background: var(--noct-bg);
  color: var(--noct-text);
  font-family: var(--noct-font);
  border-radius: var(--noct-radius-md);
  overflow: hidden;
  /* Как у Вывозов/Нарядов: тулбар и таблица не прижаты к краям панели.
     Класс вешается и на остальные вкладки (Площадки, Баки, Статистика). */
  padding: 8px 12px 0;
  box-sizing: border-box;
}

.b24-registry-root.is-theme-nocturne .b24-section-footer {
  background: var(--noct-surface);
  border-color: var(--noct-divider);
  box-shadow: none;
}

.b24-registry-root.is-theme-nocturne .b24-input,
.b24-registry-root.is-theme-nocturne .b24-select {
  background: var(--noct-surface);
  border-color: var(--noct-divider);
  color: var(--noct-text);
  border-radius: var(--noct-radius-md);
}

.b24-registry-root.is-theme-nocturne .b24-input::placeholder {
  color: color-mix(in srgb, var(--noct-text) 55%, transparent);
}

/* Иерархия кнопок из дизайна: primary — акцентная рамка и акцентный текст,
   secondary (.b24-btn-ghost) — нейтральная рамка и обычный текст. */
.b24-registry-root.is-theme-nocturne .b24-btn {
  background: transparent;
  color: var(--noct-accent);
  border: 1px solid var(--noct-accent);
  box-shadow: none;
  border-radius: var(--noct-radius-md);
  font-weight: var(--noct-font-heading-weight);
}

.b24-registry-root.is-theme-nocturne .b24-btn:hover {
  background: color-mix(in srgb, var(--noct-accent) 12%, transparent);
}

.b24-registry-root.is-theme-nocturne .b24-btn:active {
  background: color-mix(in srgb, var(--noct-accent) 22%, transparent);
}

.b24-registry-root.is-theme-nocturne .b24-btn-ghost {
  background: transparent;
  color: var(--noct-text);
  border: 1px solid var(--noct-divider);
  box-shadow: none;
}

.b24-registry-root.is-theme-nocturne .b24-btn-ghost:hover {
  background: color-mix(in srgb, var(--noct-text) 7%, transparent);
}

.b24-registry-root.is-theme-nocturne .b24-btn-ghost:active {
  background: color-mix(in srgb, var(--noct-text) 14%, transparent);
}

.b24-registry-root.is-theme-nocturne .b24-btn-filter.is-active {
  border-color: var(--noct-accent);
  background: color-mix(in srgb, var(--noct-accent) 16%, transparent);
  color: var(--noct-text);
}

.b24-registry-root.is-theme-nocturne .b24-btn-filter.is-active:hover {
  background: color-mix(in srgb, var(--noct-accent) 22%, transparent);
}

.b24-registry-root.is-theme-nocturne .b24-btn-stats-toggle.is-active {
  border-color: var(--noct-accent);
  background: color-mix(in srgb, var(--noct-accent) 16%, transparent);
  color: var(--noct-text);
}

.b24-registry-root.is-theme-nocturne .b24-btn-stats-toggle.is-active:hover {
  background: color-mix(in srgb, var(--noct-accent) 22%, transparent);
}

.b24-registry-root.is-theme-nocturne .b24-filters-badge {
  background: var(--noct-accent);
  color: #fff;
}

.b24-registry-root.is-theme-nocturne .b24-filter-panel,
.b24-registry-root.is-theme-nocturne .b24-columns-panel,
.b24-registry-root.is-theme-nocturne .b24-filters-dropdown {
  background: var(--noct-surface);
  border-color: var(--noct-divider);
  box-shadow: var(--noct-shadow-md);
  border-radius: var(--noct-radius-md);
}

.b24-registry-root.is-theme-nocturne .b24-filters-dropdown__head {
  color: var(--noct-neutral-500);
  border-bottom-color: color-mix(in srgb, var(--noct-text) 8%, transparent);
}

.b24-registry-root.is-theme-nocturne .b24-filter-panel__toolbar,
.b24-registry-root.is-theme-nocturne .b24-filter-panel__title {
  color: var(--noct-neutral-500);
}

.b24-registry-root.is-theme-nocturne .b24-filter-range__label {
  color: var(--noct-neutral-500);
}

.b24-registry-root.is-theme-nocturne .b24-muted {
  color: var(--noct-neutral-500);
}

.b24-registry-root.is-theme-nocturne .b24-meta {
  color: var(--noct-neutral-500);
}

.b24-registry-root.is-theme-nocturne .b24-link {
  color: var(--noct-accent);
}

.b24-registry-root.is-theme-nocturne .b24-link:hover {
  color: var(--noct-accent);
}

.b24-registry-root.is-theme-nocturne .b24-link-btn {
  color: #b8aef0;
}

.b24-registry-root.is-theme-nocturne .b24-link-btn:hover {
  color: #d4ccff;
}

.b24-registry-root.is-theme-nocturne .b24-table-wrap {
  background: var(--noct-surface);
  border-color: var(--noct-divider);
  box-shadow: none;
  border-radius: 10px 10px 0 0;
}

.b24-registry-root.is-theme-nocturne .b24-table thead th {
  background: var(--noct-surface);
  color: var(--noct-neutral-500);
  border-bottom-color: color-mix(in srgb, var(--noct-text) 12%, transparent);
  box-shadow: none;
}

.b24-registry-root.is-theme-nocturne .b24-table thead th[data-sort]:hover,
.b24-registry-root.is-theme-nocturne .b24-table thead th.b24-th-sort:hover,
.b24-registry-root.is-theme-nocturne .b24-table thead th.b24-mkd-th-sort:hover {
  color: var(--noct-accent);
  background: color-mix(in srgb, var(--noct-accent) 12%, transparent);
}

.b24-registry-root.is-theme-nocturne .b24-col-help {
  color: var(--noct-neutral-500);
}

.b24-registry-root.is-theme-nocturne .b24-col-help:hover,
.b24-registry-root.is-theme-nocturne .b24-col-help:focus {
  color: var(--noct-accent);
}

.b24-registry-root.is-theme-nocturne .b24-col-help::after {
  background: #2a2c3b;
  color: #e9e9ed;
  border: 1px solid color-mix(in srgb, #e9e9ed 16%, transparent);
}

.b24-registry-root.is-theme-nocturne .b24-table thead th.is-sorted,
.b24-registry-root.is-theme-nocturne .b24-table thead th[data-sort].is-sorted,
.b24-registry-root.is-theme-nocturne .b24-table thead th.b24-th-sort.is-sorted {
  color: var(--noct-accent);
  background: color-mix(in srgb, var(--noct-accent) 18%, transparent);
}

.b24-registry-root.is-theme-nocturne .b24-table tbody td {
  color: var(--noct-text);
  border-bottom-color: color-mix(in srgb, var(--noct-text) 8%, transparent);
}

.b24-registry-root.is-theme-nocturne .b24-table tbody td.is-sorted,
.b24-registry-root.is-theme-nocturne .b24-table tfoot td.is-sorted {
  background: color-mix(in srgb, var(--noct-accent) 14%, transparent);
}

.b24-registry-root.is-theme-nocturne .b24-table tbody tr:hover td,
.b24-registry-root.is-theme-nocturne .b24-table tbody tr:has(> td:first-child input[type="checkbox"]:checked) td,
.b24-registry-root.is-theme-nocturne .b24-table tbody tr.b24-row-selected td {
  background: color-mix(in srgb, var(--noct-text) 4%, transparent);
}

.b24-registry-root.is-theme-nocturne .b24-table tbody tr:hover td.is-sorted,
.b24-registry-root.is-theme-nocturne .b24-table tbody tr:has(> td:first-child input[type="checkbox"]:checked) td.is-sorted,
.b24-registry-root.is-theme-nocturne .b24-table tbody tr.b24-row-selected td.is-sorted {
  background: color-mix(in srgb, var(--noct-accent) 22%, transparent);
}

.b24-registry-root.is-theme-nocturne tr.b24-row-sentinel td {
  color: var(--noct-neutral-500);
  background: color-mix(in srgb, var(--noct-text) 3%, transparent);
}

/* Бейджи собраны ниже, в блоке «Бейджи: цвет отвечает за смысл». */

.b24-registry-root.is-theme-nocturne .b24-segmented {
  background: var(--noct-surface);
  border-color: var(--noct-divider);
  border-radius: var(--noct-radius-md);
}

.b24-registry-root.is-theme-nocturne .b24-segmented__item {
  background: transparent;
  color: var(--noct-neutral-500);
  border-right-color: color-mix(in srgb, var(--noct-text) 12%, transparent);
}

.b24-registry-root.is-theme-nocturne .b24-segmented__item:hover {
  background: color-mix(in srgb, var(--noct-text) 6%, transparent);
}

.b24-registry-root.is-theme-nocturne .b24-segmented__item:has(input:checked) {
  background: color-mix(in srgb, var(--noct-accent) 16%, transparent);
  color: var(--noct-text);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--noct-accent) 60%, transparent);
}

.b24-registry-root.is-theme-nocturne .b24-filters-dropdown__body {
  gap: 16px;
}

.b24-registry-root.is-theme-nocturne .b24-filter-check {
  color: var(--noct-text);
}

.b24-registry-root.is-theme-nocturne .b24-checklist,
.b24-registry-root.is-theme-nocturne .b24-checklist_filter,
.b24-registry-root.is-theme-nocturne .b24-checklist_export,
.b24-registry-root.is-theme-nocturne .b24-columns-order-list {
  background: color-mix(in srgb, var(--noct-text) 4%, transparent);
  border-color: var(--noct-divider);
}

.b24-registry-root.is-theme-nocturne .b24-columns-panel .b24-checklist,
.b24-registry-root.is-theme-nocturne .b24-columns-panel .b24-columns-order-list {
  background: transparent;
  border-color: transparent;
  padding-left: 0;
  padding-right: 0;
}

.b24-registry-root.is-theme-nocturne .b24-checklist label,
.b24-registry-root.is-theme-nocturne .b24-col-order-item label {
  color: var(--noct-text);
}

.b24-registry-root.is-theme-nocturne .b24-columns-panel__hint {
  color: var(--noct-neutral-500);
}

.b24-registry-root.is-theme-nocturne .b24-col-order-handle {
  color: var(--noct-neutral-500);
}

.b24-registry-root.is-theme-nocturne .b24-col-order-item--locked .b24-col-order-label {
  color: var(--noct-neutral-500);
}

.b24-registry-root.is-theme-nocturne .b24-col-order-item--over {
  background: color-mix(in srgb, var(--noct-accent) 16%, transparent);
}

.b24-registry-root.is-theme-nocturne .b24-saved-filter-chip {
  background: color-mix(in srgb, var(--noct-text) 4%, transparent);
  border-color: var(--noct-divider);
}

.b24-registry-root.is-theme-nocturne .b24-saved-filter-chip:hover {
  background: color-mix(in srgb, var(--noct-text) 8%, transparent);
  border-color: color-mix(in srgb, var(--noct-accent) 35%, transparent);
}

.b24-registry-root.is-theme-nocturne .b24-saved-filter-chip.is-active {
  border-color: var(--noct-accent);
  background: color-mix(in srgb, var(--noct-accent) 16%, transparent);
}

.b24-registry-root.is-theme-nocturne .b24-saved-filter-chip__apply {
  color: var(--noct-text);
}

.b24-registry-root.is-theme-nocturne .b24-saved-filter-chip.is-active .b24-saved-filter-chip__apply {
  color: var(--noct-accent);
}

.b24-registry-root.is-theme-nocturne .b24-saved-filter-chip__delete {
  border-left-color: var(--noct-divider);
  color: var(--noct-neutral-500);
}

.b24-registry-root.is-theme-nocturne .b24-saved-filter-chip__delete:hover {
  color: #f5a8a8;
  background: rgba(210, 80, 80, 0.12);
}

.b24-registry-root.is-theme-nocturne .b24-accruals-filter-field__label {
  color: var(--noct-neutral-500);
}

.b24-registry-root.is-theme-nocturne .b24-columns-panel__title {
  color: var(--noct-neutral-500);
}

.b24-registry-root.is-theme-nocturne .b24-btn-icon[aria-expanded='true'],
.b24-registry-root.is-theme-nocturne .b24-btn-ghost[aria-expanded='true'] {
  color: var(--noct-text);
  background: color-mix(in srgb, var(--noct-accent) 16%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--noct-accent) 45%, transparent);
}

/* Nocturne scrollbar (remove "system" look) */
.b24-registry-root.is-theme-nocturne .b24-table-wrap,
.b24-registry-root.is-theme-nocturne .b24-filter-panel,
.b24-registry-root.is-theme-nocturne .b24-columns-panel,
.b24-registry-root.is-theme-nocturne .b24-filters-dropdown__body,
.b24-registry-root.is-theme-nocturne .b24-checklist,
.b24-registry-root.is-theme-nocturne .b24-checklist_filter,
.b24-registry-root.is-theme-nocturne .b24-checklist_export,
.b24-registry-root.is-theme-nocturne .b24-columns-order-list,
.b24-registry-root.is-theme-nocturne .b24-saved-filters__list,
.b24-registry-root.is-theme-nocturne .b24-col-order-list {
  scrollbar-width: thin; /* Firefox */
  scrollbar-color: color-mix(in srgb, var(--noct-accent) 55%, transparent) color-mix(in srgb, var(--noct-surface) 35%, transparent);
}

.b24-registry-root.is-theme-nocturne .b24-table-wrap::-webkit-scrollbar,
.b24-registry-root.is-theme-nocturne .b24-filter-panel::-webkit-scrollbar,
.b24-registry-root.is-theme-nocturne .b24-columns-panel::-webkit-scrollbar,
.b24-registry-root.is-theme-nocturne .b24-filters-dropdown__body::-webkit-scrollbar,
.b24-registry-root.is-theme-nocturne .b24-checklist::-webkit-scrollbar,
.b24-registry-root.is-theme-nocturne .b24-checklist_filter::-webkit-scrollbar,
.b24-registry-root.is-theme-nocturne .b24-checklist_export::-webkit-scrollbar,
.b24-registry-root.is-theme-nocturne .b24-columns-order-list::-webkit-scrollbar,
.b24-registry-root.is-theme-nocturne .b24-saved-filters__list::-webkit-scrollbar,
.b24-registry-root.is-theme-nocturne .b24-col-order-list::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.b24-registry-root.is-theme-nocturne .b24-table-wrap::-webkit-scrollbar-track,
.b24-registry-root.is-theme-nocturne .b24-filter-panel::-webkit-scrollbar-track,
.b24-registry-root.is-theme-nocturne .b24-columns-panel::-webkit-scrollbar-track,
.b24-registry-root.is-theme-nocturne .b24-filters-dropdown__body::-webkit-scrollbar-track,
.b24-registry-root.is-theme-nocturne .b24-checklist::-webkit-scrollbar-track,
.b24-registry-root.is-theme-nocturne .b24-checklist_filter::-webkit-scrollbar-track,
.b24-registry-root.is-theme-nocturne .b24-checklist_export::-webkit-scrollbar-track,
.b24-registry-root.is-theme-nocturne .b24-columns-order-list::-webkit-scrollbar-track,
.b24-registry-root.is-theme-nocturne .b24-saved-filters__list::-webkit-scrollbar-track,
.b24-registry-root.is-theme-nocturne .b24-col-order-list::-webkit-scrollbar-track {
  background: color-mix(in srgb, var(--noct-surface) 15%, transparent);
  border-radius: 999px;
}

.b24-registry-root.is-theme-nocturne .b24-table-wrap::-webkit-scrollbar-thumb,
.b24-registry-root.is-theme-nocturne .b24-filter-panel::-webkit-scrollbar-thumb,
.b24-registry-root.is-theme-nocturne .b24-columns-panel::-webkit-scrollbar-thumb,
.b24-registry-root.is-theme-nocturne .b24-filters-dropdown__body::-webkit-scrollbar-thumb,
.b24-registry-root.is-theme-nocturne .b24-checklist::-webkit-scrollbar-thumb,
.b24-registry-root.is-theme-nocturne .b24-checklist_filter::-webkit-scrollbar-thumb,
.b24-registry-root.is-theme-nocturne .b24-checklist_export::-webkit-scrollbar-thumb,
.b24-registry-root.is-theme-nocturne .b24-columns-order-list::-webkit-scrollbar-thumb,
.b24-registry-root.is-theme-nocturne .b24-saved-filters__list::-webkit-scrollbar-thumb,
.b24-registry-root.is-theme-nocturne .b24-col-order-list::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--noct-accent) 40%, transparent);
  border: 2px solid color-mix(in srgb, var(--noct-surface) 25%, transparent);
  border-radius: 999px;
}

.b24-registry-root.is-theme-nocturne .b24-table-wrap::-webkit-scrollbar-thumb:hover,
.b24-registry-root.is-theme-nocturne .b24-filter-panel::-webkit-scrollbar-thumb:hover,
.b24-registry-root.is-theme-nocturne .b24-columns-panel::-webkit-scrollbar-thumb:hover,
.b24-registry-root.is-theme-nocturne .b24-filters-dropdown__body::-webkit-scrollbar-thumb:hover,
.b24-registry-root.is-theme-nocturne .b24-checklist::-webkit-scrollbar-thumb:hover,
.b24-registry-root.is-theme-nocturne .b24-checklist_filter::-webkit-scrollbar-thumb:hover,
.b24-registry-root.is-theme-nocturne .b24-checklist_export::-webkit-scrollbar-thumb:hover,
.b24-registry-root.is-theme-nocturne .b24-columns-order-list::-webkit-scrollbar-thumb:hover,
.b24-registry-root.is-theme-nocturne .b24-saved-filters__list::-webkit-scrollbar-thumb:hover,
.b24-registry-root.is-theme-nocturne .b24-col-order-list::-webkit-scrollbar-thumb:hover {
  background: color-mix(in srgb, var(--noct-accent) 60%, transparent);
}

/* Nocturne: страница без светлого обрамления вокруг карточки */
.b24-page.is-theme-nocturne {
  background: #161826;
}

.b24-wrap.is-theme-nocturne {
  padding: 0;
}

/* Nocturne tabs coloring (все вкладки Реестра) */
.b24-card.is-theme-nocturne {
  background: var(--noct-surface);
  border: none;
  border-radius: 0;
}

.b24-card.is-theme-nocturne .b24-tabs-bar {
  --tab-bar-bg: var(--noct-surface);
  --tab-active-bg: var(--noct-bg);
  background: var(--noct-surface);
  border-bottom-color: color-mix(in srgb, var(--noct-text) 12%, transparent);
}

.b24-card.is-theme-nocturne .b24-tab-btn,
.b24-wrap.is-theme-nocturne .b24-tab-btn {
  color: var(--noct-neutral-400);
}

.b24-card.is-theme-nocturne .b24-tab-btn:not(.b24-tab-btn--active):hover,
.b24-wrap.is-theme-nocturne .b24-tab-btn:not(.b24-tab-btn--active):hover {
  color: var(--noct-text);
}

.b24-card.is-theme-nocturne .b24-tab-btn--active,
.b24-card.is-theme-nocturne .b24-tab-btn--active:hover,
.b24-wrap.is-theme-nocturne .b24-tab-btn--active,
.b24-wrap.is-theme-nocturne .b24-tab-btn--active:hover {
  color: var(--noct-accent);
  background: var(--noct-bg);
}

/* Small theme toggle (in tabs bar, right side) */
.b24-style-toggle {
  position: static;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  padding: 4px 0 4px 8px;
  cursor: pointer;
  user-select: none;
  flex: 0 0 auto;
}

.b24-style-toggle__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  color: #868d95;
  line-height: 0;
}

.b24-style-toggle__icon--sun {
  display: none;
}

.b24-style-toggle:has(input:checked) .b24-style-toggle__icon--moon {
  display: none;
}

.b24-style-toggle:has(input:checked) .b24-style-toggle__icon--sun {
  display: inline-flex;
}

.b24-wrap.is-theme-nocturne .b24-style-toggle__icon {
  color: var(--noct-neutral-500);
}

.b24-style-toggle__svg {
  display: block;
  font-size: 17px;
}

.b24-style-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.b24-style-toggle__track {
  width: 36px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--noct-text) 22%, transparent);
  background: color-mix(in srgb, var(--noct-surface) 65%, transparent);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  position: relative;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.b24-style-toggle__thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--noct-text);
  position: absolute;
  top: 1px;
  left: 1px;
  transition: transform 0.15s ease;
}

.b24-style-toggle:has(input:checked) .b24-style-toggle__track {
  background: color-mix(in srgb, var(--noct-accent) 25%, transparent);
  border-color: color-mix(in srgb, var(--noct-accent) 60%, transparent);
}

.b24-style-toggle:has(input:checked) .b24-style-toggle__track .b24-style-toggle__thumb {
  transform: translateX(16px);
}

/* Stats deck (clients + contracts) */
.b24-registry-stats-panel[hidden] {
  display: none !important;
}

.b24-registry-stats-panel {
  margin-bottom: 12px;
}

.b24-registry-stats__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
}

.b24-registry-stats__card {
  flex: 1 1 160px;
  min-width: 140px;
  background: #fff;
  border: 1px solid #e6eaed;
  border-radius: 8px;
  padding: 12px 14px;
  box-sizing: border-box;
}

.b24-registry-stats__kicker {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #868d95;
}

.b24-registry-stats__value {
  font-size: 22px;
  margin-top: 2px;
  font-weight: 700;
  color: #333;
}

.b24-registry-stats__sub {
  margin-top: 2px;
  font-size: 11px;
  color: #868d95;
}

.b24-registry-stats__value-ok {
  color: #1a9e5c;
}

.b24-registry-stats__value-warn {
  color: #c48a00;
}

.b24-registry-stats__value-err {
  color: #d64545;
}

/* Nocturne palette overrides (scoped to registry clients block) */
.b24-registry-root.is-theme-nocturne .b24-registry-stats__card {
  background: var(--noct-surface);
  border-color: var(--noct-divider);
}

.b24-registry-root.is-theme-nocturne .b24-registry-stats__kicker {
  color: var(--noct-neutral-500);
}

.b24-registry-root.is-theme-nocturne .b24-registry-stats__sub {
  color: var(--noct-neutral-500);
}

.b24-registry-root.is-theme-nocturne .b24-registry-stats__value {
  color: var(--noct-text);
}

.b24-registry-root.is-theme-nocturne .b24-registry-stats__value-ok {
  color: var(--noct-ok);
}

.b24-registry-root.is-theme-nocturne .b24-registry-stats__value-warn {
  color: var(--noct-warn);
}

.b24-registry-root.is-theme-nocturne .b24-registry-stats__value-err {
  color: var(--noct-err);
}

/* ================================================================
   Nocturne: модальные окна (вне .b24-registry-root, на body)
   ================================================================ */
body.is-theme-nocturne .b24-modal__backdrop {
  background: rgba(0, 0, 0, 0.62);
}

body.is-theme-nocturne .b24-modal__panel {
  background: var(--noct-surface);
  color: var(--noct-text);
  border: 1px solid var(--noct-divider);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
  border-radius: var(--noct-radius-lg);
  color-scheme: dark;
}

body.is-theme-nocturne .b24-modal__title {
  color: var(--noct-text);
}

body.is-theme-nocturne .b24-modal .b24-note,
body.is-theme-nocturne .b24-modal .b24-lead {
  color: var(--noct-neutral-500);
}

body.is-theme-nocturne .b24-modal .b24-muted,
body.is-theme-nocturne .b24-modal .b24-meta,
body.is-theme-nocturne .b24-modal .b24-export-label,
body.is-theme-nocturne .b24-modal .b24-rebuild-progress {
  color: var(--noct-neutral-500);
}

body.is-theme-nocturne .b24-modal .b24-checklist,
body.is-theme-nocturne .b24-modal .b24-checklist_export {
  background: color-mix(in srgb, var(--noct-text) 4%, transparent);
  border-color: var(--noct-divider);
}

body.is-theme-nocturne .b24-modal .b24-checklist label,
body.is-theme-nocturne .b24-modal .b24-mass-edit-clear,
body.is-theme-nocturne .b24-modal .b24-filter-check {
  color: var(--noct-text);
}

body.is-theme-nocturne .b24-modal .b24-columns-panel__title {
  color: var(--noct-neutral-500);
}

body.is-theme-nocturne .b24-modal .b24-input,
body.is-theme-nocturne .b24-modal .b24-select {
  background: var(--noct-bg);
  border-color: var(--noct-divider);
  color: var(--noct-text);
  border-radius: var(--noct-radius-md);
}

body.is-theme-nocturne .b24-modal .b24-input::placeholder {
  color: color-mix(in srgb, var(--noct-text) 55%, transparent);
}

body.is-theme-nocturne .b24-modal .b24-btn {
  background: color-mix(in srgb, var(--noct-accent) 22%, transparent);
  color: var(--noct-text);
  border: 1px solid color-mix(in srgb, var(--noct-accent) 55%, transparent);
  box-shadow: none;
  border-radius: var(--noct-radius-md);
  font-weight: 500;
}

body.is-theme-nocturne .b24-modal .b24-btn:hover {
  background: color-mix(in srgb, var(--noct-accent) 32%, transparent);
}

body.is-theme-nocturne .b24-modal .b24-btn:disabled {
  opacity: 0.45;
}

body.is-theme-nocturne .b24-modal .b24-btn-ghost {
  background: transparent;
  color: var(--noct-accent);
  border: 1px solid var(--noct-divider);
  box-shadow: none;
}

body.is-theme-nocturne .b24-modal .b24-btn-ghost:hover {
  background: color-mix(in srgb, var(--noct-text) 6%, transparent);
}

body.is-theme-nocturne .b24-modal .b24-btn-danger {
  color: #e8a39c;
  border-color: color-mix(in srgb, #e07070 60%, transparent);
  background: transparent;
}

body.is-theme-nocturne .b24-modal .b24-btn-danger:hover {
  background: color-mix(in srgb, #e07070 16%, transparent);
}

body.is-theme-nocturne .b24-modal .b24-link-btn {
  color: #b8aef0;
}

body.is-theme-nocturne .b24-modal .b24-link-btn:hover {
  color: #d4ccff;
}

body.is-theme-nocturne .b24-modal .b24-err {
  color: #f5a8a8;
}

body.is-theme-nocturne .b24-modal .b24-link-btn {
  color: #b8aef0;
}

body.is-theme-nocturne .b24-modal .b24-link-btn:hover {
  color: #d4ccff;
}

body.is-theme-nocturne .b24-modal__panel,
body.is-theme-nocturne .b24-modal .b24-checklist,
body.is-theme-nocturne .b24-modal .b24-checklist_export {
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--noct-accent) 55%, transparent) color-mix(in srgb, var(--noct-surface) 35%, transparent);
}

body.is-theme-nocturne .b24-modal__panel::-webkit-scrollbar,
body.is-theme-nocturne .b24-modal .b24-checklist::-webkit-scrollbar,
body.is-theme-nocturne .b24-modal .b24-checklist_export::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

body.is-theme-nocturne .b24-modal__panel::-webkit-scrollbar-track,
body.is-theme-nocturne .b24-modal .b24-checklist::-webkit-scrollbar-track,
body.is-theme-nocturne .b24-modal .b24-checklist_export::-webkit-scrollbar-track {
  background: color-mix(in srgb, var(--noct-surface) 15%, transparent);
  border-radius: 999px;
}

body.is-theme-nocturne .b24-modal__panel::-webkit-scrollbar-thumb,
body.is-theme-nocturne .b24-modal .b24-checklist::-webkit-scrollbar-thumb,
body.is-theme-nocturne .b24-modal .b24-checklist_export::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--noct-accent) 40%, transparent);
  border: 2px solid color-mix(in srgb, var(--noct-surface) 25%, transparent);
  border-radius: 999px;
}

body.is-theme-nocturne .b24-modal__panel::-webkit-scrollbar-thumb:hover,
body.is-theme-nocturne .b24-modal .b24-checklist::-webkit-scrollbar-thumb:hover,
body.is-theme-nocturne .b24-modal .b24-checklist_export::-webkit-scrollbar-thumb:hover {
  background: color-mix(in srgb, var(--noct-accent) 60%, transparent);
}

body.is-theme-nocturne .b24-modal .b24-table-wrap,
body.is-theme-nocturne .b24-modal .b24-table-wrap_modal {
  background: var(--noct-bg);
  border-color: var(--noct-divider);
  box-shadow: none;
}

body.is-theme-nocturne .b24-modal .b24-table thead th {
  background: var(--noct-bg);
  color: var(--noct-neutral-500);
  border-bottom-color: color-mix(in srgb, var(--noct-text) 12%, transparent);
  box-shadow: none;
}

body.is-theme-nocturne .b24-modal .b24-table thead th[data-sort]:hover,
body.is-theme-nocturne .b24-modal .b24-table thead th.b24-th-sort:hover,
body.is-theme-nocturne .b24-modal .b24-table thead th.b24-mkd-th-sort:hover {
  color: var(--noct-accent);
  background: color-mix(in srgb, var(--noct-accent) 12%, transparent);
}

body.is-theme-nocturne .b24-modal .b24-table thead th.is-sorted,
body.is-theme-nocturne .b24-modal .b24-table thead th[data-sort].is-sorted {
  color: var(--noct-accent);
  background: color-mix(in srgb, var(--noct-accent) 18%, transparent);
}

body.is-theme-nocturne .b24-modal .b24-table tbody td {
  color: var(--noct-text);
  border-bottom-color: color-mix(in srgb, var(--noct-text) 8%, transparent);
}

body.is-theme-nocturne .b24-modal .b24-table tbody tr:hover td,
body.is-theme-nocturne .b24-modal .b24-table tbody tr:has(> td:first-child input[type="checkbox"]:checked) td,
body.is-theme-nocturne .b24-modal .b24-table tbody tr.b24-row-selected td {
  background: color-mix(in srgb, var(--noct-text) 6%, transparent);
}

body.is-theme-nocturne .b24-modal .b24-table tbody td.is-sorted,
body.is-theme-nocturne .b24-modal .b24-table tfoot td.is-sorted {
  background: color-mix(in srgb, var(--noct-accent) 14%, transparent);
}

body.is-theme-nocturne .b24-modal .b24-table tbody tr:hover td.is-sorted,
body.is-theme-nocturne .b24-modal .b24-table tbody tr:has(> td:first-child input[type="checkbox"]:checked) td.is-sorted,
body.is-theme-nocturne .b24-modal .b24-table tbody tr.b24-row-selected td.is-sorted {
  background: color-mix(in srgb, var(--noct-accent) 22%, transparent);
}

body.is-theme-nocturne .b24-modal .b24-table tbody td.b24-col-chk:first-child,
body.is-theme-nocturne .b24-modal .b24-table tbody td.b24-col-sticky,
body.is-theme-nocturne .b24-modal .b24-table thead th.b24-col-chk,
body.is-theme-nocturne .b24-modal .b24-table thead th.b24-col-sticky {
  background: var(--noct-bg);
}

body.is-theme-nocturne .b24-modal .b24-table tbody tr:hover td.b24-col-chk:first-child,
body.is-theme-nocturne .b24-modal .b24-table tbody tr:hover td.b24-col-sticky,
body.is-theme-nocturne .b24-modal .b24-table tbody tr:has(> td:first-child input[type="checkbox"]:checked) td.b24-col-chk:first-child,
body.is-theme-nocturne .b24-modal .b24-table tbody tr:has(> td:first-child input[type="checkbox"]:checked) td.b24-col-sticky,
body.is-theme-nocturne .b24-modal .b24-table tbody tr.b24-row-selected td.b24-col-chk:first-child,
body.is-theme-nocturne .b24-modal .b24-table tbody tr.b24-row-selected td.b24-col-sticky {
  background: color-mix(in srgb, var(--noct-text) 6%, transparent);
}

body.is-theme-nocturne .b24-modal .b24-form-field__label,
body.is-theme-nocturne .b24-modal .b24-field__label {
  color: var(--noct-neutral-500);
}

body.is-theme-nocturne .b24-modal .b24-columns-panel,
body.is-theme-nocturne .b24-modal .b24-menu-panel {
  background: var(--noct-surface);
  border-color: var(--noct-divider);
  box-shadow: var(--noct-shadow-md);
}

body.is-theme-nocturne .b24-modal .b24-menu-panel__item {
  color: var(--noct-text);
}

body.is-theme-nocturne .b24-modal .b24-menu-panel__item:hover:not(:disabled) {
  background: color-mix(in srgb, var(--noct-accent) 12%, transparent);
}

body.is-theme-nocturne .b24-modal .b24-menu-panel__item:disabled {
  color: var(--noct-neutral-500);
}

body.is-theme-nocturne .b24-modal .b24-table-wrap,
body.is-theme-nocturne .b24-modal .b24-table-wrap_modal {
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--noct-accent) 55%, transparent) color-mix(in srgb, var(--noct-surface) 35%, transparent);
}

body.is-theme-nocturne .b24-modal .b24-table-wrap::-webkit-scrollbar,
body.is-theme-nocturne .b24-modal .b24-table-wrap_modal::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

body.is-theme-nocturne .b24-modal .b24-table-wrap::-webkit-scrollbar-track,
body.is-theme-nocturne .b24-modal .b24-table-wrap_modal::-webkit-scrollbar-track {
  background: color-mix(in srgb, var(--noct-surface) 15%, transparent);
  border-radius: 999px;
}

body.is-theme-nocturne .b24-modal .b24-table-wrap::-webkit-scrollbar-thumb,
body.is-theme-nocturne .b24-modal .b24-table-wrap_modal::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--noct-accent) 40%, transparent);
  border: 2px solid color-mix(in srgb, var(--noct-surface) 25%, transparent);
  border-radius: 999px;
}

body.is-theme-nocturne .b24-modal .b24-table-wrap::-webkit-scrollbar-thumb:hover,
body.is-theme-nocturne .b24-modal .b24-table-wrap_modal::-webkit-scrollbar-thumb:hover {
  background: color-mix(in srgb, var(--noct-accent) 60%, transparent);
}


/* ================================================================
   Nocturne polish
   Всё ниже действует только внутри темы Nocturne — светлая тема
   не затрагивается.
   ================================================================ */

/* Токены темы на корне документа. Класс ставится ранним скриптом в <head>
   (чтобы не мигало светлой темой при загрузке) и далее синхронизируется
   из applyNocturneTheme() в app.js. */
/* Токены живут в nocturne-tokens.css (общий файл трёх приложений). */
html.is-theme-nocturne {
  background: var(--noct-bg);
}

/* Фон страницы тёмный ещё до того, как отработает app.js */
html.is-theme-nocturne body.b24-page {
  background: var(--noct-bg);
  color: var(--noct-text);
}

/* ---- Нативные контролы: чекбоксы, календарь input[type=date],
   выпадающий список select, системная прокрутка ---- */
html.is-theme-nocturne,
body.is-theme-nocturne {
  color-scheme: dark;
  accent-color: var(--noct-accent);
}

/* ---- Видимый фокус с клавиатуры (в теме его не было вовсе) ---- */
body.is-theme-nocturne :focus-visible {
  outline: 2px solid var(--noct-accent);
  outline-offset: 2px;
}

body.is-theme-nocturne .b24-input:focus-visible,
body.is-theme-nocturne .b24-select:focus-visible,
body.is-theme-nocturne .b24-tab-btn:focus-visible {
  outline-offset: -1px;
}

/* ---- Таблица: липкая шапка отделяется от тела ---- */
.b24-registry-root.is-theme-nocturne .b24-table thead th {
  background: var(--noct-header);
  border-bottom-color: color-mix(in srgb, var(--noct-text) 14%, transparent);
  box-shadow:
    0 1px 0 color-mix(in srgb, var(--noct-text) 12%, transparent),
    0 8px 12px -10px rgba(0, 0, 0, 0.9);
}

/* Состояния шапки — непрозрачные: th липкий, прозрачность даёт просвет */
.b24-registry-root.is-theme-nocturne .b24-table thead th[data-sort]:hover,
.b24-registry-root.is-theme-nocturne .b24-table thead th.b24-th-sort:hover,
.b24-registry-root.is-theme-nocturne .b24-table thead th.b24-mkd-th-sort:hover {
  background: #36374e;
}

.b24-registry-root.is-theme-nocturne .b24-table thead th.is-sorted,
.b24-registry-root.is-theme-nocturne .b24-table thead th[data-sort].is-sorted,
.b24-registry-root.is-theme-nocturne .b24-table thead th.b24-th-sort.is-sorted {
  background: #3d3c57;
}

/* ---- Строки: наведение и выделение больше не совпадают ---- */
.b24-registry-root.is-theme-nocturne .b24-table tbody tr:hover td {
  background: var(--noct-hover);
}

.b24-registry-root.is-theme-nocturne .b24-table tbody tr:has(> td:first-child input[type="checkbox"]:checked) td,
.b24-registry-root.is-theme-nocturne .b24-table tbody tr.b24-row-selected td {
  background: var(--noct-selected);
}

.b24-registry-root.is-theme-nocturne .b24-table tbody td.is-sorted,
.b24-registry-root.is-theme-nocturne .b24-table tfoot td.is-sorted {
  background: #35364c;
}

.b24-registry-root.is-theme-nocturne .b24-table tbody tr:hover td.is-sorted {
  background: #3a3b54;
}

.b24-registry-root.is-theme-nocturne .b24-table tbody tr:has(> td:first-child input[type="checkbox"]:checked) td.is-sorted,
.b24-registry-root.is-theme-nocturne .b24-table tbody tr.b24-row-selected td.is-sorted {
  background: #3d3c57;
}

.b24-registry-root.is-theme-nocturne .b24-table tbody tr:has(> td:first-child input[type="checkbox"]:checked) td:first-child,
.b24-registry-root.is-theme-nocturne .b24-table tbody tr.b24-row-selected td:first-child {
  box-shadow: inset 3px 0 0 0 var(--noct-accent);
}

/* ---- Бейджи: цвет отвечает за смысл ---- */

/* У базового бейджа тема переопределяла только текст, фон оставался
   светло-голубым из светлой палитры — светлый текст на нём не читался. */
/* Заливка — 15 % от цвета статуса, текст тем же цветом, без рамки:
   ровно как бейджи в дизайне. Базовый бейдж нейтральный — раньше тема
   переопределяла только текст, а фон оставался светло-голубым из светлой
   палитры, и светлый текст на нём не читался. */
.b24-registry-root.is-theme-nocturne .b24-badge,
.b24-benefits-root.is-theme-nocturne .b24-badge,
body.is-theme-nocturne .b24-modal .b24-badge {
  background: var(--noct-neutral-800);
  border: 0;
  color: var(--noct-neutral-300);
  border-radius: var(--noct-radius-badge);
  font-size: 11px;
  font-weight: var(--noct-font-heading-weight);
  line-height: 1.2;
  padding: 2px 8px;
}

.b24-registry-root.is-theme-nocturne .b24-badge_ok,
.b24-benefits-root.is-theme-nocturne .b24-badge_ok,
body.is-theme-nocturne .b24-modal .b24-badge_ok {
  background: var(--noct-ok-bg);
  color: var(--noct-ok);
}

.b24-registry-root.is-theme-nocturne .b24-badge_warn,
body.is-theme-nocturne .b24-modal .b24-badge_warn {
  background: var(--noct-warn-bg);
  color: var(--noct-warn);
}

.b24-registry-root.is-theme-nocturne .b24-badge_off,
.b24-benefits-root.is-theme-nocturne .b24-badge_off,
body.is-theme-nocturne .b24-modal .b24-badge_off {
  background: var(--noct-err-bg);
  color: var(--noct-err);
}

.b24-registry-root.is-theme-nocturne .b24-badge_party-individual,
body.is-theme-nocturne .b24-modal .b24-badge_party-individual {
  background: var(--noct-accent-bg);
  color: var(--noct-accent-300);
}

.b24-registry-root.is-theme-nocturne .b24-badge_party-legal,
body.is-theme-nocturne .b24-modal .b24-badge_party-legal {
  background: var(--noct-neutral-800);
  color: var(--noct-neutral-300);
}

.b24-registry-root.is-theme-nocturne .b24-badge_party-budget,
body.is-theme-nocturne .b24-modal .b24-badge_party-budget {
  background: rgba(46, 125, 50, 0.22);
  color: #9ccc65;
}

/* ----- Наряды: кликабельные строки и вложенный вид маршрута ----- */

.b24-orders-root tbody tr.b24-orders-row_clickable {
  cursor: pointer;
}

.b24-orders-root tbody tr.b24-orders-row_clickable:hover td {
  background: rgba(43, 129, 251, 0.06);
}

.b24-orders-root tbody tr.b24-orders-row_clickable:hover td.is-sorted {
  background: #e3eef8;
}

.b24-registry-root.is-theme-nocturne.b24-orders-root tbody tr.b24-orders-row_clickable:hover td.is-sorted {
  background: #3a3b54;
}

#orders-view-list,
#orders-view-route {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

#orders-view-list[hidden],
#orders-view-route[hidden] {
  display: none !important;
}

.b24-orders-root > #orders-view-list > .b24-section-chrome,
.b24-orders-root > #orders-view-route > .b24-section-chrome {
  overflow: visible;
  position: relative;
  z-index: 30;
}

/* Тулбар вида «Маршрут»: кнопки и заголовок по центру, без flex-end от фильтров списка. */
.b24-toolbar_route {
  align-items: center;
}

.b24-orders-route-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 46ch;
}

/* .b24-filter-check задаёт display: inline-flex и перебивает [hidden] —
   возвращаем скрытие для управления картой, которое нужно только в режиме «Карта». */
#orders-route-line-wrap[hidden],
#orders-route-provider-wrap[hidden] {
  display: none !important;
}

.b24-orders-route-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 8px;
}

.b24-orders-route-wrap {
  overflow: auto;
}

#orders-route-table tr.is-current td {
  background: rgba(43, 129, 251, 0.1);
}

body.is-theme-nocturne .b24-orders-route-wrap .b24-table th,
body.is-theme-nocturne .b24-orders-route-wrap .b24-table td {
  background: transparent;
  color: var(--noct-neutral-200, #d5d9e0);
  border-color: var(--noct-neutral-800, #2a2f3a);
}

body.is-theme-nocturne #orders-route-table tr.is-current td {
  background: rgba(94, 155, 255, 0.14);
}

/* ----- Карты: маршрут наряда и вкладка «Баки» ----- */

.b24-bins-map-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin: 10px 0 4px;
}

.b24-bins-map-controls[hidden] {
  display: none !important;
}

.b24-map-view-toggle {
  display: inline-flex;
  gap: 0;
}

.b24-map-view-toggle .b24-btn {
  border-radius: 0;
}

.b24-map-view-toggle .b24-btn:first-child {
  border-radius: 8px 0 0 8px;
}

.b24-map-view-toggle .b24-btn:last-child {
  border-radius: 0 8px 8px 0;
  margin-left: -1px;
}

.b24-map-view-toggle .b24-btn.is-active {
  background: #2b81fb;
  border-color: #2b81fb;
  color: #fff;
}

.b24-map-provider-field select {
  width: auto;
  min-width: 150px;
}

.b24-map-container {
  position: relative;
  width: 100%;
  height: 55vh;
  min-height: 320px;
  border: 1px solid #d3d9de;
  border-radius: 3px;
  overflow: hidden;
  background: #f2f4f6;
}

.b24-map-container[hidden] {
  display: none !important;
}

.b24-bins-map {
  height: calc(100vh - 260px);
  min-height: 380px;
}

/* Карта маршрута занимает всю высоту тела раздела, как и таблица. */
.b24-orders-route-map {
  height: 100%;
  min-height: 320px;
}

.b24-map-message {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  color: #6b7075;
  font-size: 13px;
  line-height: 1.5;
}

/* Leaflet: не даём всплывашкам вылезать поверх панелей фильтров и модалок. */
.b24-map-container .leaflet-pane,
.b24-map-container .leaflet-control {
  z-index: 5;
}

.b24-map-container .leaflet-top,
.b24-map-container .leaflet-bottom {
  z-index: 6;
}

body.is-theme-nocturne .b24-map-container {
  border-color: var(--noct-neutral-800, #2a2f3a);
  background: var(--noct-neutral-900, #171a21);
}

body.is-theme-nocturne .b24-map-message {
  color: var(--noct-neutral-400, #9aa3af);
}

body.is-theme-nocturne .b24-map-view-toggle .b24-btn.is-active {
  background: var(--noct-accent-500, #2b81fb);
  border-color: var(--noct-accent-500, #2b81fb);
  color: #fff;
}

/* --- Перетаскивание вкладок (только администраторы портала) --- */
.b24-tab-btn--draggable {
  cursor: grab;
}

.b24-tab-btn--draggable:active {
  cursor: grabbing;
}

.b24-tabs-bar__tabs.is-tabs-reordering .b24-tab-btn {
  transition: none;
}

.b24-tab-btn.is-tab-dragging {
  opacity: 0.45;
}

/* ------------------------------------------------------------ Доступ к вкладкам (tab_access.js) */
/* Блок одинаковый в биллинге и реестре: правки переносите в оба styles.css. */

.b24-tab-btn--access-denied {
  display: none !important;
}

.b24-modal__panel_tab-access {
  width: min(640px, calc(100vw - 32px));
}

.b24-tab-access-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 10px 0;
  max-height: 60vh;
  overflow-y: auto;
}

.b24-tab-access-row {
  border: 1px solid #e3e8ee;
  border-radius: 8px;
  padding: 8px 10px;
}

.b24-tab-access-row__head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.b24-tab-access-row__name {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.b24-tab-access-row__toggle {
  flex: 0 0 auto;
}

.b24-tab-access-row__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.b24-tab-access-row__users,
.b24-tab-access-row__results {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.b24-tab-access-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 6px 2px 10px;
  border: 1px solid #e3e8ee;
  border-radius: 999px;
  background: #f4f6f8;
  font-size: 13px;
}

.b24-tab-access-chip__remove {
  border: 0;
  background: none;
  padding: 0 4px;
  font: inherit;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  color: #8a94a6;
}

.b24-tab-access-chip__remove:hover {
  color: #d64541;
}

body.is-theme-nocturne .b24-tab-access-row,
body.is-theme-nocturne .b24-tab-access-chip {
  border-color: var(--noct-divider);
}

body.is-theme-nocturne .b24-tab-access-chip {
  background: var(--noct-surface);
}


/* ---- Ресайз столбцов списка вывозов ----
   Ручка у правой кромки th: тянем — меняется ширина, двойной клик — сброс.
   th в этих таблицах липкий (position: sticky), то есть уже позиционирован,
   поэтому absolute-ручка привязывается к нему. */

.b24-col-resizer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 7px;
  cursor: col-resize;
  user-select: none;
  z-index: 3;
}

.b24-col-resizer:hover,
.b24-col-resizer.is-active {
  background: rgba(32, 102, 176, 0.35);
}

/* Пока тянут ручку — курсор ресайза на всей странице и без выделения текста */
body.b24-col-resizing,
body.b24-col-resizing * {
  cursor: col-resize !important;
  user-select: none !important;
}

/* Суженный вручную заголовок не должен наезжать на соседний */
#pickups-table thead th {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- Русский выбор месяца (ru_month_input.js) ----
   Нативный <input type="month"> прячется, его место занимает кнопка с
   подписью «Август 2026» и панель на базе .b24-filter-panel — она уже
   оформлена и в светлой теме, и в «Ноктюрне». */

.b24-month {
  position: relative;
  display: inline-flex;
}

.b24-month__btn {
  min-width: 9.5rem;
  text-align: left;
  cursor: pointer;
}

.b24-month__btn.is-empty {
  color: #868d95;
}

.b24-month__pop {
  min-width: 15rem;
  max-width: none;
  max-height: none;
  padding: 8px;
  gap: 6px;
}

.b24-month__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.b24-month__year {
  font-weight: 600;
  font-size: 13px;
}

.b24-month__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}

.b24-month__cell {
  width: 100%;
  justify-content: center;
}

/* Выбранный месяц: в «Ноктюрне» правила .b24-btn-ghost специфичнее, поэтому
   тему перекрываем отдельным селектором такой же длины (и ниже по файлу). */
.b24-month__pop .b24-month__cell.is-active {
  background: #2066b0;
  border-color: #2066b0;
  color: #fff;
}

.b24-registry-root.is-theme-nocturne .b24-month__pop .b24-month__cell.is-active,
.b24-pickups-root.is-theme-nocturne .b24-month__pop .b24-month__cell.is-active {
  background: var(--noct-accent, #2066b0);
  border-color: var(--noct-accent, #2066b0);
  color: #fff;
}

.b24-month__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

/* Переключение видов внутри вкладки «Площадки»: у .b24-tab-panel__inner свой
   display: flex, поэтому атрибут hidden без !important не срабатывает
   (как у #orders-view-list / #orders-view-route во вкладке «Наряды»). */
#sites-root[hidden],
#ecolife-sites-root[hidden] {
  display: none !important;
}

/* Подраздел «Площадки из EcoLife»: прогресс синхронизации и архивные баки. */
.b24-ecolife-sites-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.b24-ecolife-sites-progress[hidden] {
  display: none !important;
}

.b24-ecolife-sites-progress__bar {
  position: relative;
  flex: 0 0 220px;
  height: 6px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.b24-ecolife-sites-progress__bar > span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 3px;
  background: #2fc6f6;
  transition: width 0.2s ease;
}

.b24-ecolife-sites-progress__bar > span.is-indeterminate {
  animation: b24-ecolife-sites-pulse 1.2s ease-in-out infinite;
}

@keyframes b24-ecolife-sites-pulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}

.b24-ecolife-sites-root .b24-row-muted td {
  opacity: 0.55;
}

.b24-ecolife-sites-root.is-theme-nocturne .b24-ecolife-sites-progress__bar {
  background: color-mix(in srgb, var(--noct-text) 12%, transparent);
}

.b24-ecolife-sites-root.is-theme-nocturne .b24-ecolife-sites-progress__bar > span {
  background: var(--noct-accent);
}

/* ---- Выдвижная панель справа (справочник льгот и т.п.) ---- */
.b24-modal_drawer {
  padding: 0;
  align-items: stretch;
  justify-content: flex-end;
  overflow: hidden;
}

.b24-modal_drawer .b24-modal__panel {
  width: min(460px, 100%);
  max-width: 100%;
  min-width: 0;
  flex: 0 1 460px;
  max-height: none;
  height: 100%;
  box-sizing: border-box;
  border-radius: 0;
  padding: 18px 20px 0;
  overflow-x: hidden;
  overflow-y: auto;
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.18);
}

.b24-modal_drawer .b24-modal__panel > .b24-modal__actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin: 16px -20px 0;
  padding: 12px 20px 14px;
  background: #fff;
  box-shadow: 0 -6px 12px -10px rgba(0, 0, 0, 0.3);
}

.b24-modal_drawer label.b24-form-field {
  flex-direction: column;
  align-items: stretch;
  margin-bottom: 0;
}

.b24-modal_drawer .b24-form-field__label {
  min-width: 0;
}

.b24-modal_drawer .b24-input,
.b24-modal_drawer .b24-select,
.b24-modal_drawer select.b24-input {
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

.b24-modal_drawer .b24-form-grid {
  margin-bottom: 0;
}

body.is-theme-nocturne .b24-modal_drawer .b24-modal__panel {
  border-radius: 0;
}

body.is-theme-nocturne .b24-modal_drawer .b24-modal__panel > .b24-modal__actions {
  background: var(--noct-surface);
}

/* Справка раздела «Льготы» — модалка с объяснением расчёта */
.b24-help {
  line-height: 1.6;
}

.b24-help__section {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #e6eaee;
}

.b24-help__section:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.b24-help__h {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
  color: #1f2a37;
}

.b24-help p {
  margin: 0 0 8px;
}

.b24-help__note {
  padding: 8px 10px;
  background: #f4f7f9;
  border-left: 3px solid #c3ccd4;
  border-radius: 0 3px 3px 0;
  color: #525c69;
  font-size: 13px;
}

.b24-help__formula {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  margin-bottom: 10px;
  background: #f4f7f9;
  border-radius: 4px;
  font-size: 13px;
}

.b24-help__term {
  font-weight: 600;
  color: #1f2a37;
}

.b24-help__cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin-bottom: 10px;
}

.b24-help__col {
  padding: 12px 14px;
  border: 1px solid #dfe3e6;
  border-radius: 4px;
  background: #fff;
}

.b24-help__col_accent {
  border-color: #b5d7ef;
  background: #f5fafd;
}

.b24-help__col-h {
  margin-bottom: 6px;
  font-weight: 600;
  color: #1f2a37;
}

.b24-help__list {
  font-size: 12px;
  color: #525c69;
}

.b24-help__example {
  padding: 10px 12px;
  margin-bottom: 8px;
  border: 1px solid #dfe3e6;
  border-radius: 4px;
  font-size: 13px;
}

.b24-help__example-h {
  margin-bottom: 6px;
  font-weight: 600;
  color: #1f2a37;
}

.b24-help__result {
  margin: 6px 0 0 !important;
  padding-top: 6px;
  border-top: 1px dashed #dfe3e6;
  color: #1f2a37;
}

body.is-theme-nocturne .b24-help__section {
  border-top-color: var(--noct-divider);
}

body.is-theme-nocturne .b24-help__h,
body.is-theme-nocturne .b24-help__col-h,
body.is-theme-nocturne .b24-help__example-h,
body.is-theme-nocturne .b24-help__term,
body.is-theme-nocturne .b24-help__result {
  color: var(--noct-text);
}

body.is-theme-nocturne .b24-help__note,
body.is-theme-nocturne .b24-help__formula {
  background: color-mix(in srgb, var(--noct-text) 6%, transparent);
  color: var(--noct-neutral-400);
}

body.is-theme-nocturne .b24-help__note {
  border-left-color: color-mix(in srgb, var(--noct-accent) 55%, transparent);
}

body.is-theme-nocturne .b24-help__col,
body.is-theme-nocturne .b24-help__example {
  background: transparent;
  border-color: var(--noct-divider);
}

body.is-theme-nocturne .b24-help__col_accent {
  border-color: color-mix(in srgb, var(--noct-accent) 45%, transparent);
  background: color-mix(in srgb, var(--noct-accent) 8%, transparent);
}

body.is-theme-nocturne .b24-help__list {
  color: var(--noct-neutral-500);
}

body.is-theme-nocturne .b24-help__result {
  border-top-color: var(--noct-divider);
}
