/* ============================================================
   CUSTOMER CARD — REDESIGN
   Источник: erp_desine/project/customer-v2.jsx — двухколоночная карта
   с акцентом на ключевые метаданные, статус-пилюли и dense table_block.
   Аддитивно поверх style.css; PHP-разметку не трогаем.
   ============================================================ */

/* --- Двухколоночный слайдер: с float → на flex --- */
.slider_content_double {
  display: flex !important;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-start;
  width: 100% !important;
}
.slider_content_double > .table_block {
  flex: 1 1 calc(50% - 8px);
  max-width: 100% !important;
  float: none !important;
  margin: 0 !important;
}
.slider_content_double > .erpds-sidebar {
  flex: 0 0 400px !important;
  max-width: 400px !important;
}
.slider_content_double > .erpds-main-content {
  flex: 1 1 0px !important;
  min-width: 0 !important;
  max-width: none !important;
  position: sticky;
  top: 72px;
  align-self: flex-start;
}

/* --- Inventory actions panel (правая колонка) --- */
.erpds-main-content .div_space {
  padding: 2px 0;
}
.erpds-main-content .div_space a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--erpds-radius, 6px);
  border: 1px solid var(--erpds-border, #d9dde3);
  background: var(--erpds-surface, #fff);
  color: var(--erpds-text, #1a1d23);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: background 140ms, border-color 140ms, color 140ms;
  white-space: nowrap;
}
.erpds-main-content .div_space a:hover {
  background: var(--erpds-surface-hover, #f4f5f7);
  border-color: var(--erpds-accent, #3b7de9);
  color: var(--erpds-accent, #3b7de9);
  text-decoration: none;
}

.erpds-inventory-actions {
  padding: 0 !important;
  overflow: hidden;
}

.erpds-inventory-actions__body {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.erpds-inventory-actions .erpds-inventory-image-link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 12px 0;
}

.erpds-inventory-actions .erpds-inventory-image {
  max-width: 100%;
  height: auto;
  border-radius: var(--erpds-radius-sm, 6px);
  border: 1px solid var(--erpds-border-light, #EEF1F5);
  background: var(--erpds-bg-2, #F4F6FA);
}

.erpds-inventory-action-group {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.erpds-inventory-action-group__title {
  color: var(--erpds-text-muted, #525A66);
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.erpds-inventory-action-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 7px;
  min-width: 0;
}

.erpds-inventory-action-item {
  display: flex;
  align-items: stretch;
  min-width: 0;
  padding: 0 !important;
}

.erpds-inventory-action-item--split {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 6px;
}

.erpds-inventory-action-note,
.erpds-inventory-action-item .info_block {
  width: 100%;
  box-sizing: border-box;
  padding: 7px 8px;
  border: 1px solid var(--erpds-border-light, #EEF1F5);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-bg-2, #F4F6FA);
  color: var(--erpds-text-muted, #525A66);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

.erpds-inventory-action,
.erpds-inventory-actions .erpds-inventory-action-item > a,
.erpds-inventory-actions .erpds-inventory-action-item > span > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 32px;
  max-width: 100%;
  box-sizing: border-box;
  padding: 6px 9px !important;
  border: 1px solid var(--erpds-border, #DDE1E8) !important;
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-surface, #fff) !important;
  color: var(--erpds-accent-text, #155aaa) !important;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  white-space: normal;
  overflow-wrap: anywhere;
}

.erpds-inventory-action > span,
.erpds-inventory-actions .erpds-inventory-action-item > a > span,
.erpds-inventory-actions .erpds-inventory-action-item > span > a > span {
  border-bottom: 0;
}

.erpds-inventory-action--primary,
.erpds-inventory-actions .erpds-inventory-action-item > a.erpds-inventory-action--primary {
  border-color: var(--erpds-accent-soft-hover, #cce0ed) !important;
  background: var(--erpds-accent-soft, #deedf5) !important;
  color: var(--erpds-accent-text, #155aaa) !important;
}

.erpds-inventory-action--muted,
.erpds-inventory-actions .erpds-inventory-action-item > a.erpds-inventory-action--muted {
  background: var(--erpds-surface, #fff) !important;
}

.erpds-inventory-action--danger,
.erpds-inventory-action--danger a,
.erpds-inventory-actions .erpds-inventory-action-item > a.erpds-inventory-action--danger {
  border-color: var(--erpds-danger-border, #fecaca) !important;
  background: var(--erpds-danger-soft, #fff1f2) !important;
  color: var(--erpds-danger-text, #991b1b) !important;
}

.erpds-inventory-action:hover,
.erpds-inventory-actions .erpds-inventory-action-item > a:hover,
.erpds-inventory-actions .erpds-inventory-action-item > span > a:hover {
  border-color: var(--erpds-accent-soft-hover, #cce0ed) !important;
  background: var(--erpds-accent-soft, #deedf5) !important;
  color: var(--erpds-accent, #155aaa) !important;
  text-decoration: none;
}

.erpds-inventory-action-group--danger .erpds-inventory-action-list {
  grid-template-columns: 1fr;
}

@media (max-width: 760px) {
  .erpds-inventory-actions__body {
    padding: 10px;
  }

  .erpds-inventory-action-list,
  .erpds-inventory-action-item--split {
    grid-template-columns: 1fr;
  }

  .erpds-inventory-action-item--split {
    gap: 5px;
  }
}

.erpds-inventory-operations,
.erpds-inventory-operation-lazy {
  max-width: 100%;
  box-sizing: border-box;
  margin: 12px 0 0;
  border: 1px solid var(--erpds-border, #DDE1E8);
  border-radius: var(--erpds-radius, 8px);
  background: var(--erpds-surface, #fff);
  box-shadow: var(--erpds-shadow-sm, 0 1px 2px rgba(15,23,42,0.04));
  overflow: hidden;
}

.erpds-inventory-operations--ajax {
  margin-top: 0;
}

.erpds-inventory-operations__head,
.erpds-inventory-operation-lazy__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 9px 12px;
  border-bottom: 1px solid var(--erpds-border-light, #EEF1F5);
  background: var(--erpds-bg-2, #F4F6FA);
}

.erpds-inventory-operations__title,
.erpds-inventory-operation-lazy__title > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: var(--erpds-text, #111827);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.erpds-inventory-operations__count,
.erpds-inventory-operation-lazy__title > strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 22px;
  box-sizing: border-box;
  padding: 0 7px;
  border-radius: var(--erpds-radius-pill, 999px);
  background: var(--erpds-accent-soft, #deedf5);
  color: var(--erpds-accent-text, #155aaa);
  font-size: 11.5px;
  font-weight: 800;
  line-height: 1;
}

.erpds-inventory-operations__body {
  max-height: min(58vh, 560px);
  overflow: auto;
  scrollbar-width: thin;
}

.erpds-inventory-operations__body .table_data,
.erpds-inventory-operations__body .table_list_data {
  width: 100%;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.erpds-inventory-operations__body th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--erpds-bg-2, #F4F6FA);
}

.erpds-inventory-operations__body th:nth-child(3),
.erpds-inventory-operations__body td:nth-child(3) {
  min-width: 118px;
  white-space: nowrap;
}

.erpds-inventory-operation-load {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  box-sizing: border-box;
  margin: 10px 12px 12px;
  padding: 6px 10px !important;
  border: 1px solid var(--erpds-accent-soft-hover, #cce0ed) !important;
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-accent-soft, #deedf5) !important;
  color: var(--erpds-accent-text, #155aaa) !important;
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.3;
  text-decoration: none;
}

.erpds-inventory-operation-load > span {
  border-bottom: 0;
}

.erpds-inventory-operation-load:hover {
  background: var(--erpds-accent-soft-hover, #cce0ed) !important;
  color: var(--erpds-accent, #155aaa) !important;
  text-decoration: none;
}

@media (max-width: 760px) {
  .erpds-inventory-operations__body {
    max-height: none;
  }

  .erpds-inventory-operations__body thead,
  .erpds-inventory-operations__body tr.table_legend {
    display: none !important;
  }

  .erpds-inventory-operations__body tbody,
  .erpds-inventory-operations__body tr.table_item {
    width: 100%;
  }

  .erpds-inventory-operations__body tr.table_item {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 12px;
    box-sizing: border-box;
    padding: 9px 10px;
    border-bottom: 1px solid var(--erpds-border-light, #EEF1F5);
    background: var(--erpds-surface, #fff);
  }

  .erpds-inventory-operations__body tr.table_item:last-child {
    border-bottom: 0;
  }

  .erpds-inventory-operations__body tr.table_item td {
    display: block !important;
    grid-column: 1 / -1;
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box;
    padding: 5px 0 !important;
    border-bottom: 1px solid var(--erpds-border-light, #EEF1F5) !important;
    color: var(--erpds-text, #111827);
    line-height: 1.35;
    text-align: left !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: anywhere;
  }

  .erpds-inventory-operations__body tr.table_item td:last-child {
    border-bottom: 0 !important;
  }

  .erpds-inventory-operations__body tr.table_item td::before {
    content: attr(data-label);
    display: block !important;
    width: auto !important;
    min-width: 0 !important;
    flex-basis: auto !important;
    margin: 0 0 3px;
    color: var(--erpds-text-muted, #525A66);
    font-size: 10.5px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .erpds-inventory-operations__body tr.table_item td[data-label=""] {
    display: none !important;
  }

  .erpds-inventory-operations__body tr.table_item td:nth-child(1),
  .erpds-inventory-operations__body tr.table_item td:nth-child(3),
  .erpds-inventory-operations__body tr.table_item td:nth-child(6),
  .erpds-inventory-operations__body tr.table_item td:nth-child(7) {
    grid-column: auto;
    font-variant-numeric: tabular-nums;
    white-space: normal !important;
  }

  .erpds-inventory-operations__body tr.table_item td:nth-child(1),
  .erpds-inventory-operations__body tr.table_item td:nth-child(3) {
    border-top: 0 !important;
  }

  .erpds-inventory-operations__body tr.table_item td:nth-child(6),
  .erpds-inventory-operations__body tr.table_item td:nth-child(7) {
    border-bottom: 0 !important;
  }
}

.erpds-inventory-page--edit .erpds-inventory-layout {
  align-items: flex-start;
}

.erpds-inventory-page--edit .erpds-inventory-details {
  display: grid !important;
  gap: 0;
  width: 100%;
  box-sizing: border-box;
  padding: 12px !important;
}

.erpds-inventory-page--edit .erpds-inventory-details .item {
  display: grid !important;
  grid-template-columns: minmax(130px, 170px) minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px 0;
  border-bottom: 1px solid var(--erpds-border-light, #EEF1F5);
}

.erpds-inventory-page--edit .erpds-inventory-details .item:last-child {
  border-bottom: 0;
}

.erpds-inventory-page--edit .erpds-inventory-details .item > div {
  min-width: 0;
  padding: 0 !important;
  border-bottom: 0 !important;
  background: transparent !important;
}

.erpds-inventory-page--edit .erpds-inventory-details .left_data {
  width: auto !important;
  min-width: 0 !important;
  color: var(--erpds-text-muted, #525A66) !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  line-height: 1.25;
  letter-spacing: 0.05em;
  text-align: right !important;
  text-transform: uppercase;
  white-space: normal !important;
}

.erpds-inventory-page--edit .erpds-inventory-details input.input_box,
.erpds-inventory-page--edit .erpds-inventory-details select,
.erpds-inventory-page--edit .erpds-inventory-details textarea {
  width: min(720px, 100%) !important;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  margin: 0;
}

.erpds-inventory-page--edit .erpds-inventory-details input.input_box,
.erpds-inventory-page--edit .erpds-inventory-details select {
  height: 32px;
}

.erpds-inventory-page--edit .erpds-inventory-details textarea {
  min-height: 96px;
  max-height: 180px;
  resize: vertical;
}

.erpds-inventory-page--edit .erpds-inventory-form-actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 8px;
  box-sizing: border-box;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--erpds-border, #DDE1E8);
  border-radius: var(--erpds-radius, 8px);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--erpds-shadow-sm, 0 1px 2px rgba(15,23,42,0.04));
}

.erpds-inventory-page--edit .erpds-inventory-form-actions .erpds-btn,
.erpds-inventory-page--edit .erpds-inventory-form-actions input[type="submit"],
.erpds-inventory-page--edit .erpds-inventory-form-actions button[type="submit"] {
  min-height: 32px;
  padding: 6px 14px;
  border-radius: var(--erpds-radius-sm, 6px);
}

@media (max-width: 760px) {
  .erpds-inventory-page--edit .erpds-inventory-details {
    padding: 10px !important;
  }

  .erpds-inventory-page--edit .erpds-inventory-details .item {
    grid-template-columns: 1fr;
    gap: 5px;
    padding: 9px 0;
  }

  .erpds-inventory-page--edit .erpds-inventory-details .left_data {
    text-align: left !important;
  }

  .erpds-inventory-page--edit .erpds-inventory-details input.input_box,
  .erpds-inventory-page--edit .erpds-inventory-details select,
  .erpds-inventory-page--edit .erpds-inventory-details textarea {
    width: 100% !important;
  }

  .erpds-inventory-page--edit .erpds-inventory-form-actions {
    display: grid;
    grid-template-columns: 1fr;
    position: static;
  }
}

/* --- table_block как карточка --- */
@media (min-width: 901px) {
  .table_block {
    background: var(--erpds-surface);
    border: 1px solid var(--erpds-border);
    border-radius: var(--erpds-radius);
    padding: 0;
    box-shadow: var(--erpds-shadow-sm);
    display: table;
    width: 100%;
    box-sizing: border-box;
  }
  .table_block .item {
    display: table-row;
  }
  .table_block .item > div {
    padding: 6px 12px !important;
    border-bottom: 1px solid var(--erpds-border);
    font-size: 13px;
    line-height: 1.4;
    vertical-align: middle;
    transition: var(--erpds-transition, all 0.2s ease);
  }
  .table_block .item:last-child > div {
    border-bottom: none;
  }
  .table_block .item:hover > div {
    background: var(--erpds-bg-2);
  }
  .table_block .left_data {
    font-size: 11px !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--erpds-text-faint) !important;
    text-align: right;
    white-space: nowrap;
    min-width: 130px;
    width: 1%;
  }
}

/* --- Страница добавления клиента: изолируем форму от layout-а карточки просмотра --- */
.erpds-customer-add-page {
  width: 100%;
  max-width: none;
  margin: 0;
  box-sizing: border-box;
}

.erpds-customer-add-page .slider_content {
  box-sizing: border-box;
}

.erpds-customer-add-page .erpds-customer-add-notices {
  display: grid;
  gap: 10px;
  min-width: 0;
  margin: 0 0 12px;
}

.erpds-customer-add-page .erpds-customer-add-notices:empty {
  display: none;
}

.erpds-customer-add-parent-notice {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0 !important;
  padding: 10px 12px !important;
  border: 1px solid var(--erpds-accent-soft-hover, #cce0ed) !important;
  border-radius: var(--erpds-radius, 8px);
  background: var(--erpds-accent-soft, #deedf5) !important;
  color: var(--erpds-text, #111827);
  box-shadow: var(--erpds-shadow-sm, 0 1px 2px rgba(15,23,42,0.04));
  overflow-wrap: anywhere;
}

.erpds-customer-add-parent-notice .caption {
  margin: 0 0 4px;
  color: var(--erpds-accent-text, #155aaa);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.25;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.erpds-customer-add-parent-notice .text {
  margin: 0 0 6px;
  color: var(--erpds-text-muted, #525A66);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.35;
}

.erpds-customer-add-page .erpds-customer-add-body {
  min-width: 0;
}

.erpds-customer-add-tariff-fragment {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.erpds-customer-add-tariff-select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 32px;
  box-sizing: border-box;
  margin: 0;
}

.erpds-customer-add-tariff-empty {
  min-width: 0;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid var(--erpds-border-light, #EEF1F5);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-bg-2, #F4F6FA);
  color: var(--erpds-text-muted, #525A66);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.erpds-customer-building-customer-fragment {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.erpds-customer-building-customer-select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 32px;
  box-sizing: border-box;
  margin: 0;
}

.erpds-customer-fastfind {
  display: grid;
  gap: 7px;
  min-width: 0;
  max-width: 100%;
}

.erpds-customer-fastfind-input,
.erpds-customer-fastfind-select {
  width: 100% !important;
  min-width: 0;
  max-width: 100%;
  height: 32px;
  box-sizing: border-box;
  margin: 0;
}

.erpds-customer-fastfind-results {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.erpds-customer-fastfind-empty {
  display: block;
  min-width: 0;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid var(--erpds-border-light, #EEF1F5);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-bg-2, #F4F6FA);
  color: var(--erpds-text-muted, #525A66);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.erpds-customer-building-task-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  box-sizing: border-box;
  margin: 8px 0 0;
  padding: 7px 9px;
  border: 1px solid var(--erpds-border-light, #EEF1F5);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-bg-2, #F4F6FA);
}

.erpds-customer-building-task-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: var(--erpds-accent-text, #155aaa);
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.25;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.erpds-customer-building-task-link > span {
  border-bottom: 0;
}

.erpds-customer-building-task-link:hover,
.erpds-customer-building-task-link:focus-visible {
  color: var(--erpds-accent, #155aaa);
  text-decoration: none;
}

.erpds-customer-building-task-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 24px;
  height: 22px;
  box-sizing: border-box;
  padding: 0 7px;
  border-radius: var(--erpds-radius-pill, 999px);
  background: var(--erpds-accent-soft, #deedf5);
  color: var(--erpds-accent-text, #155aaa);
  font-size: 11.5px;
  font-weight: 850;
  line-height: 1;
}

.erpds-customer-building-task-target {
  display: none;
  min-width: 0;
  margin: 8px 0 0;
}

.erpds-customer-building-task-target #task_list3_id {
  min-width: 0;
}

.erpds-customer-building-task-panel {
  display: grid;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  padding: 10px;
  border: 1px solid var(--erpds-border-light, #EEF1F5);
  border-radius: var(--erpds-radius, 8px);
  background: var(--erpds-surface, #fff);
  box-shadow: var(--erpds-shadow-sm, 0 1px 2px rgba(15,23,42,0.04));
}

.erpds-customer-building-task-title {
  margin: 0 !important;
  color: var(--erpds-text, #111827);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.25;
}

.erpds-customer-building-task-body {
  min-width: 0;
  max-height: min(50vh, 420px);
  overflow: auto;
  scrollbar-width: thin;
}

.erpds-customer-building-task-body .table_data,
.erpds-customer-building-task-body .table_list_data {
  width: 100%;
  margin: 0;
}

.erpds-customer-building-task-actions {
  display: flex;
  justify-content: flex-start;
  min-width: 0;
  padding-top: 8px;
  border-top: 1px solid var(--erpds-border-light, #EEF1F5);
}

.erpds-customer-building-task-actions a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  box-sizing: border-box;
  padding: 5px 9px;
  border: 1px solid var(--erpds-border, #DDE1E8);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-bg-2, #F4F6FA);
  color: var(--erpds-accent-text, #155aaa);
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.25;
  text-decoration: none;
}

.erpds-customer-building-task-actions a:hover {
  border-color: var(--erpds-accent-soft-hover, #cce0ed);
  background: var(--erpds-accent-soft, #deedf5);
  color: var(--erpds-accent, #155aaa);
  text-decoration: none;
}

.erpds-customer-add-page .slider_content_double {
  display: grid !important;
  grid-template-columns: minmax(720px, 1fr) minmax(380px, 420px);
  align-items: flex-start;
  gap: 16px !important;
}

.erpds-customer-add-page .slider_content_double > .erpds-main-content {
  position: static !important;
  grid-column: 1;
  max-width: none !important;
  width: auto !important;
}

.erpds-customer-add-page .slider_content_double > .erpds-sidebar {
  grid-column: 2;
  max-width: none !important;
  min-width: 0 !important;
  width: auto !important;
}

.erpds-customer-add-page .slider_content_double > .table_block.erpds-card {
  width: 100%;
  margin: 0;
}

.erpds-customer-add-page .slider_content_double > .table_block.erpds-card:empty,
.erpds-customer-add-page .slider_content_double > .table_block.erpds-card:not(:has(.item, .erpds-card-title-row)) {
  display: none !important;
}

.erpds-customer-add-page .slider_content_double:not(:has(> .erpds-sidebar .item, > .erpds-sidebar .erpds-card-title-row)) > .erpds-main-content {
  grid-column: 1 / -1;
}

.erpds-customer-add-page .label_h3_hr {
  display: block;
  clear: both;
  margin: 16px 0 10px !important;
  padding: 0 0 7px;
  border-bottom: 1px solid var(--erpds-border, #dbe3ef);
  color: var(--erpds-text, #0f172a);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}

.erpds-customer-add-page .slider_content_double + .label_h3_hr {
  margin-top: 18px !important;
}

.erpds-customer-add-page .table_block .item input.input_box:not(.iColorPicker),
.erpds-customer-add-page .table_block .item textarea.input_box,
.erpds-customer-add-page .table_block .item textarea.textarea_class {
  width: calc(100% - 4px);
  box-sizing: border-box;
}

.erpds-customer-add-page .table_block .item select {
  max-width: calc(100% - 4px);
  box-sizing: border-box;
}

.erpds-customer-add-page .erpds-sidebar .item input.input_box:not(.iColorPicker),
.erpds-customer-add-page .erpds-sidebar .item select {
  width: 100%;
}

.erpds-customer-add-page .erpds-sidebar.table_block.erpds-card .left_data {
  white-space: normal;
  overflow-wrap: anywhere;
}

.erpds-customer-edit-form {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.erpds-customer-edit-form .slider_content_double {
  display: grid !important;
  grid-template-columns: minmax(620px, 1fr) minmax(300px, 380px);
  align-items: flex-start;
  gap: 12px !important;
  min-width: 0;
  margin: 0 0 12px;
}

.erpds-customer-edit-form .slider_content_double > .erpds-main-content,
.erpds-customer-edit-form .slider_content_double > .erpds-sidebar {
  position: static !important;
  min-width: 0 !important;
  max-width: none !important;
  width: auto !important;
  margin: 0 !important;
}

.erpds-customer-edit-form .slider_content_double > .erpds-main-content {
  grid-column: 1;
}

.erpds-customer-edit-form .slider_content_double > .erpds-sidebar {
  grid-column: 2;
}

.erpds-customer-edit-form .slider_content_double > .table_block.erpds-card {
  padding: 12px !important;
}

.erpds-customer-edit-form .slider_content_double > .table_block.erpds-card:empty,
.erpds-customer-edit-form .slider_content_double > .table_block.erpds-card:not(:has(.item, .erpds-card-title-row)) {
  display: none !important;
}

.erpds-customer-edit-form .slider_content_double:not(:has(> .erpds-sidebar .item, > .erpds-sidebar .erpds-card-title-row)) > .erpds-main-content {
  grid-column: 1 / -1;
}

.erpds-customer-edit-form .label_h3_hr {
  margin: 14px 0 8px !important;
  padding: 0 0 7px;
  border-bottom: 1px solid var(--erpds-border, #DDE1E8);
  color: var(--erpds-text, #111827);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
}

.erpds-customer-edit-form .table_block.erpds-card .item:not([style*="display:none"]):not([style*="display: none"]) {
  align-items: start;
  min-width: 0;
  margin: 0;
  padding: 7px 0;
  border-bottom: 1px solid var(--erpds-border-light, #EEF1F5);
}

.erpds-customer-edit-form .table_block.erpds-card .item:last-child {
  border-bottom: 0;
}

.erpds-customer-edit-form .table_block.erpds-card .left_data {
  width: auto !important;
  min-width: 0;
  color: var(--erpds-text-muted, #525A66);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: normal;
  overflow-wrap: anywhere;
}

.erpds-customer-edit-form .table_block.erpds-card .item > div:last-child {
  min-width: 0;
  color: var(--erpds-text, #111827);
  font-size: 13px;
  line-height: 1.45;
}

.erpds-customer-edit-form .table_block .item input.input_box:not(.iColorPicker),
.erpds-customer-edit-form .table_block .item textarea.input_box,
.erpds-customer-edit-form .table_block .item textarea.textarea_class {
  width: 100% !important;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.erpds-customer-edit-form .table_block .item select {
  max-width: 100%;
  box-sizing: border-box;
}

.erpds-customer-edit-form .table_block .item input.input_box:not(.iColorPicker),
.erpds-customer-edit-form .table_block .item select {
  min-height: 32px;
}

.erpds-customer-edit-form .table_block .item input[type="checkbox"],
.erpds-customer-edit-form .table_block .item input[type="radio"] {
  width: auto !important;
  min-height: 0;
}

.erpds-customer-edit-form .billing-lock,
.erpds-customer-edit-form .erpds-billing-lock,
.erpds-customer-edit-form .info_block {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  box-sizing: border-box;
  margin: 2px 0;
  padding: 4px 7px;
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-bg-2, #F4F6FA);
  color: var(--erpds-text-muted, #525A66);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}

.erpds-customer-edit-form > .div_center {
  display: flex !important;
  align-items: center;
  justify-content: flex-start !important;
  gap: 8px;
  margin: 0 !important;
  padding: 10px 0 0;
  border-top: 1px solid var(--erpds-border, #DDE1E8);
}

.erpds-customer-edit-form > .div_center input[type="submit"],
.erpds-customer-edit-form > .div_center button,
.erpds-customer-edit-form > .div_center a {
  margin: 0 !important;
}

@media (min-width: 901px) {
  .erpds-customer-add-page .table_block.erpds-card .item:not([style*="display:none"]):not([style*="display: none"]) {
    grid-template-columns: minmax(150px, 220px) minmax(0, 1fr);
  }

  .erpds-customer-add-page .erpds-sidebar.table_block.erpds-card .item:not([style*="display:none"]):not([style*="display: none"]) {
    grid-template-columns: minmax(135px, 165px) minmax(0, 1fr);
  }

  .erpds-customer-edit-form .erpds-main-content.table_block.erpds-card .item:not([style*="display:none"]):not([style*="display: none"]) {
    display: grid;
    grid-template-columns: minmax(150px, 220px) minmax(0, 1fr);
    gap: 10px;
  }

  .erpds-customer-edit-form .erpds-sidebar.table_block.erpds-card .item:not([style*="display:none"]):not([style*="display: none"]) {
    display: grid;
    grid-template-columns: minmax(120px, 155px) minmax(0, 1fr);
    gap: 9px;
  }
}

@media (max-width: 1280px) {
  .erpds-customer-add-page .slider_content_double,
  .erpds-customer-edit-form .slider_content_double {
    display: block !important;
  }

  .erpds-customer-add-page .slider_content_double > .erpds-sidebar,
  .erpds-customer-add-page .slider_content_double > .erpds-main-content,
  .erpds-customer-edit-form .slider_content_double > .erpds-sidebar,
  .erpds-customer-edit-form .slider_content_double > .erpds-main-content {
    max-width: 100% !important;
    width: 100% !important;
    margin-top: 12px !important;
  }

  .erpds-customer-edit-form .slider_content_double > .erpds-main-content:first-child,
  .erpds-customer-edit-form .slider_content_double > .erpds-sidebar:first-child {
    margin-top: 0 !important;
  }
}

@media (max-width: 700px) {
  .erpds-customer-edit-form .slider_content_double > .table_block.erpds-card {
    padding: 10px !important;
  }

  .erpds-customer-edit-form .table_block.erpds-card .item:not([style*="display:none"]):not([style*="display: none"]) {
    display: grid;
    gap: 5px;
    padding: 8px 0;
  }

  .erpds-customer-edit-form > .div_center {
    display: grid !important;
    grid-template-columns: 1fr;
    align-items: stretch !important;
  }

  .erpds-customer-edit-form > .div_center input[type="submit"],
  .erpds-customer-edit-form > .div_center button,
  .erpds-customer-edit-form > .div_center a {
    width: 100% !important;
  }
}

/* --- Заголовки секций (label_h2/h3) — типографика прототипа --- */
.label_h2 {
  font-family: var(--erpds-sans);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--erpds-text);
  margin: 12px 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--erpds-border);
}
.label_h3 {
  font-family: var(--erpds-sans);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--erpds-text-muted);
  margin: 8px 0 6px;
  text-transform: none;
}

/* --- Customer ID row — выделить как primary identifier --- */
#customer-card-customer-id .left_data {
  color: var(--erpds-text-faint) !important;
}
#customer-card-customer-id .right_data,
#customer-card-customer-id .item > div:last-child {
  font-family: var(--erpds-mono);
  font-feature-settings: "tnum";
  font-size: 14px;
  font-weight: 600;
  color: var(--erpds-text);
}

/* --- Dialog header (модалки в карточке) --- */
#dialog-box .dialog_header {
  font-family: var(--erpds-sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--erpds-text);
  border-bottom: 1px solid var(--erpds-border);
  background: var(--erpds-surface);
}

/* --- QR dialog: сканирование и печать без пустых переносов --- */
#dialog-box .erpds-qr-dialog {
  width: min(340px, calc(100vw - 32px));
  box-sizing: border-box;
  margin: 0 auto;
  color: var(--erpds-text, #111827);
}

#dialog-box .erpds-qr-dialog__header {
  padding-bottom: 10px;
}

#dialog-box .erpds-qr-body {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 14px 16px 12px;
}

#dialog-box .erpds-qr-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 224px;
  height: 224px;
  box-sizing: border-box;
  padding: 11px;
  border: 1px solid var(--erpds-border, #DDE1E8);
  border-radius: var(--erpds-radius, 8px);
  background: #fff;
  box-shadow: var(--erpds-shadow-sm, 0 1px 2px rgba(15,23,42,0.04));
}

#dialog-box .erpds-qr-image {
  display: block;
  width: 200px;
  height: 200px;
  max-width: 100%;
  object-fit: contain;
  image-rendering: crisp-edges;
}

#dialog-box .erpds-qr-meta {
  display: grid;
  justify-items: center;
  gap: 2px;
  max-width: 100%;
  text-align: center;
}

#dialog-box .erpds-qr-meta span {
  color: var(--erpds-text-muted, #525A66);
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

#dialog-box .erpds-qr-meta strong {
  max-width: 100%;
  color: var(--erpds-text, #111827);
  font-family: var(--erpds-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

#dialog-box .erpds-qr-context {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 9px;
  border: 1px solid color-mix(in srgb, var(--erpds-accent, #155aaa) 14%, var(--erpds-border, #DDE1E8));
  border-radius: var(--erpds-radius, 8px);
  background: color-mix(in srgb, var(--erpds-accent-soft, #deedf5) 48%, var(--erpds-surface, #fff));
  text-align: left;
}

#dialog-box .erpds-qr-context__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-surface, #fff);
  color: var(--erpds-accent, #155aaa);
}

#dialog-box .erpds-qr-context__body {
  display: grid;
  gap: 3px;
  min-width: 0;
}

#dialog-box .erpds-qr-context__meta {
  color: var(--erpds-text-muted, #525A66);
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: uppercase;
}

#dialog-box .erpds-qr-context__title {
  color: var(--erpds-text, #111827);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

#dialog-box .erpds-qr-context__location {
  color: var(--erpds-text-muted, #525A66);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

#dialog-box .erpds-qr-actions {
  display: flex;
  justify-content: flex-end;
  padding: 12px 16px 14px;
  border-top: 1px solid var(--erpds-border-light, #EEF1F5);
}

#dialog-box .erpds-qr-print {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 32px;
  box-sizing: border-box;
  padding: 6px 11px;
  border: 1px solid var(--erpds-border, #DDE1E8);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-surface, #fff);
  color: var(--erpds-accent-text, #155aaa);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
}

#dialog-box .erpds-qr-print > span {
  border-bottom: 0;
}

#dialog-box .erpds-qr-print:hover {
  border-color: var(--erpds-accent-soft-hover, #cce0ed);
  background: var(--erpds-accent-soft, #deedf5);
  color: var(--erpds-accent, #155aaa);
  text-decoration: none;
}

@media (max-width: 380px) {
  #dialog-box .erpds-qr-body {
    padding: 12px 12px 10px;
  }

  #dialog-box .erpds-qr-frame {
    width: 214px;
    height: 214px;
    padding: 8px;
  }

  #dialog-box .erpds-qr-actions {
    padding: 11px 12px 12px;
  }

  #dialog-box .erpds-qr-print {
    width: 100%;
  }
}

/* --- Inventory move dialog: выбор получателя без ощущения технического списка --- */
#dialog-box:has(.erpds-inv-move-dialog) {
  top: 50vh !important;
  left: 50% !important;
  right: auto !important;
  max-width: calc(100vw - 24px);
  box-sizing: border-box;
  transform: translate(-50%, -50%) !important;
}

#dialog-box .erpds-inv-move-dialog {
  width: min(408px, calc(100vw - 28px));
  box-sizing: border-box;
  color: var(--erpds-text, #111827);
}

#dialog-box .erpds-inv-move-dialog--step1 {
  width: min(360px, calc(100vw - 28px));
}

#dialog-box .erpds-inv-move-dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 10px;
}

#dialog-box .erpds-inv-move-dialog--step1 .erpds-inv-move-dialog__header {
  margin-bottom: 10px;
  padding: 14px 18px 10px;
  border-bottom: 1px solid var(--erpds-border, #DDE3EA);
}

#dialog-box .erpds-inv-move-dialog__title {
  min-width: 0;
  color: var(--erpds-text, #111827);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

#dialog-box .erpds-inv-move-dialog__step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  box-sizing: border-box;
  border: 1px solid var(--erpds-accent-soft-hover, #cce0ed);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-accent-soft, #deedf5);
  color: var(--erpds-accent, #155aaa);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

#dialog-box .erpds-inv-move-section {
  display: grid;
  gap: 9px;
  margin: 12px 14px 0;
  padding: 10px 12px 12px;
  border: 1px solid var(--erpds-border-light, #EEF1F5);
  border-radius: var(--erpds-radius-sm, 6px);
  background: color-mix(in srgb, var(--erpds-bg-2, #F4F6FA) 58%, var(--erpds-surface, #fff));
}

#dialog-box .erpds-inv-move-section--recipients {
  gap: 7px;
  margin: 10px 12px 0;
  padding: 8px 10px 10px;
  background: color-mix(in srgb, var(--erpds-bg-2, #F4F6FA) 72%, var(--erpds-surface, #fff));
}

#dialog-box .erpds-inv-move-section__title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--erpds-text, #111827);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}

#dialog-box .erpds-inv-move-section__title::before {
  content: "";
  flex: 0 0 auto;
  width: 4px;
  height: 16px;
  border-radius: 999px;
  background: var(--erpds-accent, #155aaa);
}

#dialog-box .erpds-inv-move-recipient-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(164px, 1fr));
  gap: 7px;
}

#dialog-box .erpds-inv-move-dialog--step1 .erpds-inv-move-recipient-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

#dialog-box .erpds-inv-move-recipient-item {
  min-width: 0;
}

#dialog-box .erpds-inv-move-recipient-item:has(.erpds-inv-move-recipient--danger) {
  grid-column: 1 / -1;
}

#dialog-box .erpds-inv-move-recipient-item--danger {
  position: relative;
  display: grid;
  grid-column: 1 / -1;
  min-width: 0;
  margin-top: 2px;
  padding-top: 8px;
}

#dialog-box .erpds-inv-move-recipient-item--danger::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 1px;
  background: var(--erpds-border-light, #EEF1F5);
  content: "";
}

#dialog-box .erpds-inv-move-recipient,
#dialog-box .erpds-inv-move-recipient-item > a {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 42px;
  box-sizing: border-box;
  margin-left: 0;
  padding: 7px 9px;
  border: 1px solid var(--erpds-border-light, #EEF1F5);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-surface, #fff);
  color: var(--erpds-text, #111827);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
  box-shadow: 0 1px 1px rgba(15, 23, 42, 0.03);
  transition: border-color .14s ease, background-color .14s ease, color .14s ease, box-shadow .14s ease, transform .14s ease;
}

#dialog-box .link_dashed.erpds-inv-move-recipient,
#dialog-box .erpds-inv-move-recipient-item > a.link_dashed {
  margin-left: 0;
  text-decoration: none;
}

#dialog-box button.erpds-inv-move-recipient {
  padding: 7px 9px !important;
  border: 1px solid var(--erpds-border-light, #EEF1F5) !important;
  background: var(--erpds-surface, #fff) !important;
  cursor: pointer !important;
  font: inherit;
  text-align: left;
}

#dialog-box .erpds-inv-move-dialog--step1 .erpds-inv-move-recipient,
#dialog-box .erpds-inv-move-dialog--step1 .erpds-inv-move-recipient-item > a {
  min-height: 38px;
  padding: 6px 8px;
  gap: 7px;
  font-size: 12px;
}

#dialog-box .erpds-inv-move-dialog--step1 button.erpds-inv-move-recipient {
  padding: 6px 8px !important;
}

#dialog-box .erpds-inv-move-recipient > span,
#dialog-box .erpds-inv-move-recipient-item > a > span {
  border-bottom: 0;
}

#dialog-box .erpds-inv-move-recipient:hover,
#dialog-box .erpds-inv-move-recipient-item > a:hover {
  border-color: var(--erpds-accent-soft-hover, #cce0ed);
  background: var(--erpds-accent-soft, #deedf5);
  color: var(--erpds-accent, #155aaa);
  box-shadow: 0 4px 12px rgba(21, 90, 170, 0.1);
  transform: translateY(-1px);
}

#dialog-box button.erpds-inv-move-recipient:hover {
  border-color: var(--erpds-accent-soft-hover, #cce0ed) !important;
  background: var(--erpds-accent-soft, #deedf5) !important;
}

#dialog-box .erpds-inv-move-recipient:focus-visible,
#dialog-box .erpds-inv-move-recipient-item > a:focus-visible {
  outline: 2px solid var(--erpds-accent, #155aaa);
  outline-offset: 2px;
}

#dialog-box .erpds-inv-move-recipient__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  border-radius: var(--erpds-radius-xs, 4px);
  background: var(--erpds-accent-soft, #deedf5);
  color: var(--erpds-accent, #155aaa);
}

#dialog-box .erpds-inv-move-dialog--step1 .erpds-inv-move-recipient__icon {
  flex-basis: 24px;
  width: 24px;
  height: 24px;
}

#dialog-box .erpds-inv-move-recipient:hover .erpds-inv-move-recipient__icon,
#dialog-box .erpds-inv-move-recipient-item > a:hover .erpds-inv-move-recipient__icon {
  background: var(--erpds-surface, #fff);
}

#dialog-box .erpds-inv-move-recipient__label {
  min-width: 0;
  overflow-wrap: anywhere;
}

#dialog-box .erpds-inv-move-recipient--danger,
#dialog-box button.erpds-inv-move-recipient--danger {
  display: grid !important;
  grid-template-columns: 26px minmax(0, 1fr);
  grid-template-areas:
    "icon label"
    "icon hint";
  align-items: center;
  gap: 1px 9px;
  min-height: 48px;
  border-color: var(--erpds-danger-border, #fecaca) !important;
  background: var(--erpds-danger-soft, #fff1f2) !important;
  color: var(--erpds-danger-text, #991b1b) !important;
}

#dialog-box .erpds-inv-move-recipient-item--danger .erpds-inv-move-recipient--danger {
  min-height: 54px;
  border-color: var(--erpds-danger-border, #fecaca) !important;
  background: linear-gradient(180deg, #fff7f7 0%, var(--erpds-danger-soft, #fff1f2) 100%) !important;
  touch-action: manipulation;
}

#dialog-box .erpds-inv-move-recipient--danger .erpds-inv-move-recipient__label {
  grid-area: label;
  flex: 0 1 auto;
}

#dialog-box .erpds-inv-move-recipient--danger .erpds-inv-move-recipient__icon {
  grid-area: icon;
  background: #ffe4e6;
  color: var(--erpds-danger-text, #991b1b);
}

#dialog-box .erpds-inv-move-recipient--danger .erpds-inv-move-recipient__hint {
  grid-area: hint;
  margin-left: 0;
  color: var(--erpds-danger-text, #991b1b);
  font-size: 11px;
  font-weight: 600;
  text-align: left;
}

#dialog-box .erpds-inv-move-recipient--danger:hover,
#dialog-box button.erpds-inv-move-recipient--danger:hover {
  border-color: #fca5a5 !important;
  background: #ffe4e6 !important;
  color: var(--erpds-danger-text, #991b1b) !important;
  box-shadow: 0 4px 12px rgba(153, 27, 27, 0.1);
}

#dialog-box button.erpds-inv-move-recipient--danger:focus-visible {
  outline: 2px solid var(--erpds-danger-text, #991b1b);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(153, 27, 27, 0.14);
}

#dialog-box .erpds-inv-move-recipient__hint {
  margin-left: auto;
  color: var(--erpds-text-faint, #6b7280);
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.25;
  text-align: right;
}

#dialog-box .erpds-inv-move-recipient--disabled {
  color: var(--erpds-text-faint, #6b7280);
  background: var(--erpds-bg-2, #F4F6FA);
  cursor: default;
}

#dialog-box .erpds-inv-move-recipient--disabled:hover {
  border-color: transparent;
  background: var(--erpds-bg-2, #F4F6FA);
  color: var(--erpds-text-faint, #6b7280);
}

#dialog-box .erpds-inv-move-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin: 12px 14px 0;
  padding: 10px 12px;
  border: 1px solid var(--erpds-border-light, #EEF1F5);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-surface, #fff);
}

#dialog-box .erpds-inv-move-note__label {
  color: var(--erpds-text-muted, #525A66);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}

#dialog-box .erpds-inv-move-note__input {
  width: 100% !important;
  min-width: 0;
  height: 34px;
  box-sizing: border-box;
  margin: 0;
  padding: 6px 9px;
  border-radius: var(--erpds-radius-sm, 6px);
}

#dialog-box .erpds-inv-move-note__input:focus-visible {
  border-color: var(--erpds-accent, #155aaa);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--erpds-accent, #155aaa) 14%, transparent);
  outline: none;
}

#dialog-box .erpds-inv-move-dialog--step1 .erpds-inv-move-note {
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin: 10px 12px 0;
  padding: 8px 10px;
}

#dialog-box .erpds-inv-move-dialog--step1 .erpds-inv-move-note__label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

@media (max-width: 340px) {
  #dialog-box .erpds-inv-move-dialog--step1 .erpds-inv-move-note {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 6px;
  }
}

#dialog-box .erpds-inv-move-dialog--step2 {
  width: min(500px, calc(100vw - 32px));
}

#dialog-box .erpds-inv-move-summary {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 12px 16px 0;
  padding: 8px 10px;
  border: 1px solid var(--erpds-border-light, #EEF1F5);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-bg-2, #F4F6FA);
}

#dialog-box .erpds-inv-move-summary__text {
  display: grid;
  gap: 1px;
  min-width: 0;
}

#dialog-box .erpds-inv-move-summary__label {
  color: var(--erpds-text-faint, #6b7280);
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

#dialog-box .erpds-inv-move-summary strong {
  color: var(--erpds-text, #111827);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

#dialog-box .erpds-inv-move-step-body {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 0 16px;
}

#dialog-box .erpds-inv-move-fieldset {
  display: grid !important;
  width: 100%;
  box-sizing: border-box;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

#dialog-box .erpds-inv-move-fieldset--customer {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

#dialog-box .erpds-inv-move-fieldset--warehouse {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  overflow: hidden;
}

#dialog-box .erpds-inv-move-fieldset--warehouse,
#dialog-box .erpds-inv-move-fieldset--employee {
  padding: 9px;
  border: 1px solid var(--erpds-border-light, #EEF1F5);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-surface, #fff);
  box-shadow: 0 1px 1px rgba(15, 23, 42, 0.03);
}

#dialog-box .erpds-inv-move-fieldset--customer > .item:first-child,
#dialog-box .erpds-inv-move-fieldset--customer > .erpds-inv-move-customer-search,
#dialog-box .erpds-inv-move-fieldset--customer > .erpds-inv-move-customer-separator {
  grid-column: 1 / -1;
}

#dialog-box .erpds-inv-move-fieldset--warehouse > .erpds-inv-move-result-list {
  grid-column: 1 / -1;
}

#dialog-box .erpds-inv-move-fieldset--employee .item:first-child {
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 5px;
}

#dialog-box .erpds-inv-move-fieldset .item {
  display: grid;
  grid-template-columns: minmax(110px, 140px) minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
}

#dialog-box .erpds-inv-move-fieldset .left_data {
  width: auto !important;
  min-width: 0 !important;
  padding: 0 !important;
  color: var(--erpds-text-muted, #525A66) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  line-height: 1.25;
  text-align: left !important;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: normal !important;
}

#dialog-box .erpds-inv-move-fieldset .item > div:last-child {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
  padding: 0 !important;
}

#dialog-box .erpds-inv-move-fieldset--customer .erpds-inv-move-customer-manual {
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 5px;
  min-height: 0;
}

#dialog-box .erpds-inv-move-fieldset--warehouse .erpds-inv-move-warehouse-account,
#dialog-box .erpds-inv-move-fieldset--warehouse .erpds-inv-move-warehouse-employee {
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 3px;
  min-width: 0;
}

#dialog-box .erpds-inv-move-fieldset--warehouse .erpds-inv-move-warehouse-account .left_data,
#dialog-box .erpds-inv-move-fieldset--warehouse .erpds-inv-move-warehouse-employee .left_data {
  font-size: 10px !important;
  line-height: 1.15;
  text-align: left !important;
}

#dialog-box .erpds-inv-move-fieldset--warehouse .erpds-inv-move-warehouse-account select,
#dialog-box .erpds-inv-move-fieldset--warehouse .erpds-inv-move-warehouse-employee select {
  height: 30px;
}

#dialog-box .erpds-inv-move-fieldset--warehouse .erpds-inv-move-result-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  min-width: 0;
  max-height: min(220px, calc(100vh - 360px));
  padding-right: 2px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

#dialog-box .erpds-inv-move-fieldset--warehouse .erpds-inv-move-result-list::before {
  content: "Целевой склад";
  grid-column: 1 / -1;
  color: var(--erpds-text-muted, #525A66);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

#dialog-box .erpds-inv-move-fieldset--warehouse .erpds-inv-move-result-link {
  margin: 0 !important;
  min-height: 34px;
  padding: 5px 8px;
  font-size: 11.5px;
  line-height: 1.25;
}

#dialog-box .erpds-inv-move-fieldset--warehouse .erpds-inv-move-result-link span {
  min-width: 0;
  overflow-wrap: anywhere;
}

#dialog-box .erpds-inv-move-fieldset--customer .erpds-inv-move-customer-method {
  align-items: start;
  min-height: 0;
  box-sizing: border-box;
  padding: 8px;
  border: 1px solid var(--erpds-border-light, #EEF1F5);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-surface, #fff);
  box-shadow: 0 1px 1px rgba(15, 23, 42, 0.03);
}

#dialog-box .erpds-inv-move-fieldset--customer .erpds-inv-move-customer-method .left_data {
  padding-top: 7px !important;
  color: var(--erpds-text, #111827) !important;
}

#dialog-box .erpds-inv-move-fieldset--customer .erpds-inv-move-customer-manual .left_data {
  text-align: left !important;
}

#dialog-box .erpds-inv-move-fieldset--customer .erpds-inv-move-customer-search > div:last-child {
  align-items: center;
  min-width: 0;
}

#dialog-box .erpds-inv-move-fieldset--customer .erpds-inv-move-customer-search input.find_box {
  flex: 1 0 100%;
  width: 100% !important;
}

#dialog-box .erpds-inv-move-fieldset--customer .erpds-inv-move-customer-search #ins_user_list_id {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  min-width: 0;
  min-height: 34px;
  margin: 0 !important;
  color: var(--erpds-text-muted, #525A66);
  font-size: 12px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

#dialog-box .erpds-inv-move-fieldset--customer .erpds-inv-move-customer-search #ins_user_list_id:not(:has(select)) {
  min-height: 34px;
  box-sizing: border-box;
  padding: 7px 9px;
  border: 1px dashed var(--erpds-border, #DDE1E8);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-bg-2, #F4F6FA);
}

#dialog-box .erpds-inv-move-fieldset--customer .erpds-inv-move-customer-search #ins_user_list_id:not(:has(select)) + .erpds-inv-move-inline-action {
  border-color: var(--erpds-border, #DDE1E8);
  background: var(--erpds-surface, #fff);
  color: var(--erpds-text-muted, #525A66);
}

#dialog-box .erpds-inv-move-fieldset--customer .erpds-inv-move-customer-search .erpds-inv-move-inline-action {
  flex: 0 0 auto;
  width: auto !important;
  min-width: 86px;
  justify-content: center;
  white-space: nowrap;
}

#dialog-box .erpds-inv-move-fieldset--customer .erpds-inv-move-customer-manual > div:last-child {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 7px;
  min-width: 0;
}

#dialog-box .erpds-inv-move-fieldset--customer .erpds-inv-move-customer-manual input.input_box {
  flex: 1 1 auto;
  width: auto !important;
  min-width: 0;
  font-variant-numeric: tabular-nums;
}

#dialog-box .erpds-inv-move-fieldset--customer .erpds-inv-move-customer-manual .erpds-inv-move-inline-action {
  flex: 0 0 auto;
  width: auto !important;
  min-width: 68px;
  min-height: 44px;
  padding-right: 6px;
  padding-left: 6px;
  justify-content: center;
  font-size: 11.5px;
  white-space: nowrap;
}

#dialog-box .erpds-inv-move-fieldset--employee .erpds-inv-move-employee-target > div:last-child {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 7px;
}

#dialog-box .erpds-inv-move-fieldset--employee .employeeFindSelectorDiv {
  display: contents;
  width: 100% !important;
  min-width: 0;
}

#dialog-box .erpds-inv-move-fieldset--employee .employeeFindSelectorDiv > .div_space {
  grid-column: 1 / -1;
}

#dialog-box .erpds-inv-move-fieldset--employee .employeeFindSelectorDiv .div_space,
#dialog-box .erpds-inv-move-fieldset--employee #employeeListDivId {
  width: 100%;
  min-width: 0;
  margin: 0 !important;
  padding: 0 !important;
}

#dialog-box .erpds-inv-move-fieldset--employee #employeeListDivId {
  grid-column: 1;
}

#dialog-box .erpds-inv-move-fieldset--employee #employeeFindInputId,
#dialog-box .erpds-inv-move-fieldset--employee #employee-id-selector {
  width: 100% !important;
  min-width: 0;
}

#dialog-box .erpds-inv-move-fieldset--employee #employee-id-selector {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

#dialog-box .erpds-inv-move-fieldset--employee #link_trans_inventory_id {
  align-self: end;
  width: auto !important;
  min-width: 86px;
  margin: 0 !important;
  padding: 0 !important;
}

#dialog-box .erpds-inv-move-fieldset--employee #link_trans_inventory_id .erpds-inv-move-result-link {
  min-height: 44px;
  padding: 5px 6px;
  gap: 4px;
  font-size: 11.25px;
  justify-content: center;
}

#dialog-box .erpds-inv-move-task-target > div:last-child {
  flex-wrap: nowrap !important;
}

#dialog-box .erpds-inv-move-task-target input.input_box {
  flex: 1 1 auto;
  width: auto !important;
}

#dialog-box .erpds-inv-move-task-target .erpds-inv-move-inline-action {
  flex: 0 0 auto;
  width: auto !important;
  min-width: 86px;
  justify-content: center;
  white-space: nowrap;
}

#dialog-box .erpds-inv-move-fieldset--search-target,
#dialog-box .erpds-inv-move-fieldset--task {
  gap: 9px;
  padding: 9px;
  border: 1px solid var(--erpds-border-light, #EEF1F5);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-surface, #fff);
  box-shadow: 0 1px 1px rgba(15, 23, 42, 0.03);
}

#dialog-box .erpds-inv-move-fieldset--search-target .item,
#dialog-box .erpds-inv-move-fieldset--task .erpds-inv-move-task-target {
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 5px;
}

#dialog-box .erpds-inv-move-fieldset--search-target .left_data {
  color: var(--erpds-text-muted, #525A66) !important;
  font-size: 10.5px !important;
}

#dialog-box .erpds-inv-move-fieldset--search-target .item > div:last-child,
#dialog-box .erpds-inv-move-fieldset--task .erpds-inv-move-task-target > div:last-child {
  align-items: center;
  flex-wrap: nowrap;
  gap: 7px;
}

#dialog-box .erpds-inv-move-fieldset--search-target .erpds-inv-move-search-row input.input_box,
#dialog-box .erpds-inv-move-fieldset--task input.input_box {
  flex: 1 1 auto;
  width: auto !important;
  min-width: 0;
}

#dialog-box .erpds-inv-move-fieldset--task input.input_box {
  font-variant-numeric: tabular-nums;
}

#dialog-box .erpds-inv-move-fieldset--search-target .erpds-inv-move-inline-action,
#dialog-box .erpds-inv-move-fieldset--task .erpds-inv-move-inline-action {
  flex: 0 0 auto;
  min-width: 58px;
  min-height: 44px;
  justify-content: center;
  padding-right: 7px;
  padding-left: 7px;
  touch-action: manipulation;
}

#dialog-box .erpds-inv-move-fieldset--task .erpds-inv-move-inline-action {
  min-width: 86px;
}

#dialog-box .erpds-inv-move-fieldset--search-target .erpds-inv-move-search-result-row {
  margin-top: -1px;
}

#dialog-box .erpds-inv-move-fieldset--search-target .erpds-inv-move-result {
  min-height: 38px;
  border-color: transparent;
  background: var(--erpds-bg-2, #F4F6FA);
  overflow-wrap: anywhere;
}

#dialog-box .erpds-inv-move-fieldset--search-target .erpds-inv-move-result .info_block {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  color: var(--erpds-text-muted, #525A66);
  font-style: normal;
  line-height: 1.35;
}

#dialog-box .erpds-inv-move-search-account-row select {
  width: 100% !important;
}

#dialog-box .erpds-inv-move-customer-separator {
  grid-template-columns: minmax(0, 1fr) !important;
  min-height: 0;
  padding: 0 !important;
}

#dialog-box .erpds-inv-move-customer-separator .left_data {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100% !important;
  color: var(--erpds-text-faint, #6b7280) !important;
  font-size: 10.5px !important;
  line-height: 1;
  text-align: center !important;
}

#dialog-box .erpds-inv-move-customer-separator .left_data::before,
#dialog-box .erpds-inv-move-customer-separator .left_data::after {
  flex: 1 1 auto;
  height: 1px;
  background: var(--erpds-border-light, #EEF1F5);
  content: "";
}

#dialog-box .erpds-inv-move-customer-separator .left_data + div {
  display: none;
}

#dialog-box .erpds-inv-move-field,
#dialog-box .erpds-inv-move-search-row {
  min-width: 0;
}

#dialog-box .erpds-inv-move-field > label,
#dialog-box .erpds-inv-move-search-row > label {
  color: var(--erpds-text-muted, #525A66);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

#dialog-box .erpds-inv-move-search-row input.input_box,
#dialog-box .erpds-inv-move-fieldset input.input_box,
#dialog-box .erpds-inv-move-fieldset select {
  max-width: 100%;
  min-width: 0;
  height: 32px;
  box-sizing: border-box;
  margin: 0;
}

#dialog-box .erpds-inv-move-search-row input.input_box {
  flex: 1 1 220px;
}

#dialog-box .erpds-inv-move-search-row > div:last-child {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 7px;
  min-width: 0;
}

#dialog-box .erpds-inv-move-fieldset .erpds-inv-move-search-row > div:last-child {
  flex-wrap: nowrap;
}

#dialog-box .erpds-inv-move-search-row .erpds-inv-move-inline-action {
  flex: 0 0 auto;
  width: auto !important;
  min-width: 58px;
  white-space: nowrap;
}

#dialog-box .erpds-inv-move-search-result-row {
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 0;
  min-height: 0;
}

#dialog-box .erpds-inv-move-search-result-row .left_data {
  display: none;
}

#dialog-box .erpds-inv-move-search-result-row .erpds-inv-move-result {
  min-height: 38px;
  padding: 9px 10px;
}

#dialog-box .erpds-inv-move-inline-action,
#dialog-box .erpds-inv-move-back,
#dialog-box .erpds-inv-move-result-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  max-width: 100%;
  box-sizing: border-box;
  padding: 5px 9px;
  border: 1px solid var(--erpds-border, #DDE1E8);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-surface, #fff);
  color: var(--erpds-accent-text, #155aaa);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
}

#dialog-box .erpds-inv-move-inline-action > span,
#dialog-box .erpds-inv-move-back > span,
#dialog-box .erpds-inv-move-result-link > span {
  border-bottom: 0;
}

#dialog-box .erpds-inv-move-inline-action:hover,
#dialog-box .erpds-inv-move-back:hover,
#dialog-box .erpds-inv-move-result-link:hover {
  border-color: var(--erpds-accent-soft-hover, #cce0ed);
  background: var(--erpds-accent-soft, #deedf5);
  color: var(--erpds-accent, #155aaa);
}

#dialog-box .erpds-inv-move-inline-action:focus-visible,
#dialog-box .erpds-inv-move-back:focus-visible,
#dialog-box .erpds-inv-move-result-link:focus-visible,
#dialog-box .erpds-inv-move-dialog--step2 input:focus-visible,
#dialog-box .erpds-inv-move-dialog--step2 select:focus-visible {
  outline: 2px solid var(--erpds-accent, #155aaa);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(21, 90, 170, 0.14);
}

#dialog-box .erpds-inv-move-result {
  width: 100%;
  min-height: 36px;
  box-sizing: border-box;
  padding: 8px;
  border: 1px solid var(--erpds-border-light, #EEF1F5);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-bg-2, #F4F6FA);
}

#dialog-box .erpds-inv-move-result .info_block {
  display: block;
  margin: 0;
  color: var(--erpds-text-muted, #525A66);
  font-size: 12px;
  line-height: 1.35;
}

#dialog-box .erpds-inv-move-result-list {
  display: grid;
  gap: 6px;
  min-width: 0;
}

#dialog-box .erpds-inv-move-result-item {
  min-width: 0;
}

#dialog-box .erpds-inv-move-result-link {
  width: 100%;
  justify-content: flex-start;
}

#dialog-box .erpds-inv-move-find-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

#dialog-box .erpds-inv-move-find-select {
  width: 100%;
  min-width: 0;
  height: 32px;
  box-sizing: border-box;
}

#dialog-box .erpds-inv-move-find-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
}

#dialog-box .erpds-inv-move-empty {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 7px 8px;
  border: 1px dashed var(--erpds-border, #DDE1E8);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-surface, #fff);
  color: var(--erpds-text-muted, #525A66);
  font-size: 12px;
  line-height: 1.35;
}

#dialog-box .erpds-inv-move-trader-result {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

#dialog-box .erpds-inv-move-trader-select {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  height: 32px;
  box-sizing: border-box;
}

#dialog-box .erpds-inv-move-trader-panel {
  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--erpds-border-light, #EEF1F5);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-surface, #fff);
  box-shadow: 0 1px 1px rgba(15, 23, 42, 0.03);
}

#dialog-box .erpds-inv-move-trader-panel .erpds-inv-move-search-row {
  display: grid;
  gap: 5px;
}

#dialog-box .erpds-inv-move-trader-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 7px;
  min-width: 0;
}

#dialog-box .erpds-inv-move-trader-target {
  min-width: 0;
}

#dialog-box .erpds-inv-move-trader-target:empty::before {
  content: "Выберите поставщика";
  display: flex;
  align-items: center;
  min-height: 44px;
  box-sizing: border-box;
  padding: 7px 9px;
  border: 1px dashed var(--erpds-border, #DDE1E8);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-bg-2, #F4F6FA);
  color: var(--erpds-text-muted, #525A66);
  font-size: 12px;
  line-height: 1.35;
}

#dialog-box .erpds-inv-move-trader-panel .erpds-inv-move-result-list {
  display: none;
}

#dialog-box .erpds-inv-move-trader-actions {
  align-self: stretch;
  width: auto !important;
  min-width: 96px;
  margin: 0 !important;
  padding: 0 !important;
}

#dialog-box .erpds-inv-move-trader-actions .erpds-inv-move-result-link {
  justify-content: center;
  min-height: 44px;
  height: 100%;
  padding: 5px 6px;
  gap: 4px;
  font-size: 11.25px;
  touch-action: manipulation;
}

#dialog-box .erpds-inv-move-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin-top: 12px;
  padding: 0 16px;
}

#dialog-box .erpds-inv-move-actions--inline {
  margin-top: 8px;
  padding: 0;
}

@media (max-width: 460px) {
  #dialog-box:has(.erpds-inv-move-dialog) {
    top: 64px !important;
    max-height: calc(100vh - 78px) !important;
    transform: translateX(-50%) !important;
    overflow: hidden !important;
  }

  #dialog-box:has(.erpds-inv-move-dialog) > .dialog-content {
    max-height: calc(100vh - 78px) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  body.has-mobile-tab-bar #dialog-box:has(.erpds-inv-move-dialog) {
    max-height: calc(100vh - 150px) !important;
    overflow: hidden !important;
  }

  body.has-mobile-tab-bar #dialog-box:has(.erpds-inv-move-dialog) > .dialog-content {
    max-height: calc(100vh - 150px) !important;
  }

  #dialog-box:has(.erpds-inv-issue-dialog) {
    top: calc(50vh - 4px) !important;
    max-height: calc(100vh - 120px) !important;
    overflow: auto !important;
  }

  #dialog-box .erpds-inv-move-dialog {
    width: min(380px, calc(100vw - 28px));
  }

  #dialog-box .erpds-inv-move-section {
    gap: 6px;
    margin: 10px 10px 0;
    padding: 8px;
  }

  #dialog-box .erpds-inv-move-recipient-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  #dialog-box .erpds-inv-move-recipient,
  #dialog-box .erpds-inv-move-recipient-item > a {
    min-height: 39px;
    padding: 6px 8px;
    gap: 7px;
    font-size: 12px;
  }

  #dialog-box button.erpds-inv-move-recipient {
    padding: 6px 8px !important;
  }

  #dialog-box .erpds-inv-move-dialog--step2 {
    width: min(430px, calc(100vw - 32px));
  }

  #dialog-box .erpds-inv-move-fieldset--warehouse .erpds-inv-move-warehouse-account,
  #dialog-box .erpds-inv-move-fieldset--warehouse .erpds-inv-move-warehouse-employee {
    grid-column: 1 / -1;
  }

  #dialog-box .erpds-inv-move-fieldset .item {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  #dialog-box .erpds-inv-move-fieldset .item > div:last-child {
    align-items: stretch;
  }

  #dialog-box .erpds-inv-move-fieldset--customer > .erpds-inv-move-customer-manual {
    grid-column: 1 / -1;
  }

  #dialog-box .erpds-inv-move-fieldset input.input_box,
  #dialog-box .erpds-inv-move-fieldset select,
  #dialog-box .erpds-inv-move-search-row input.input_box,
  #dialog-box .erpds-inv-move-inline-action,
  #dialog-box .erpds-inv-move-find-select,
  #dialog-box .erpds-inv-move-trader-select {
    width: 100% !important;
  }

  #dialog-box .erpds-inv-move-search-row > div:last-child {
    align-items: center;
    flex-wrap: nowrap;
  }

  #dialog-box .erpds-inv-move-search-row .erpds-inv-move-inline-action {
    width: auto !important;
  }

  #dialog-box .erpds-inv-move-find-result {
    grid-template-columns: 1fr;
  }

  #dialog-box .erpds-inv-move-trader-result {
    flex-direction: column;
    align-items: stretch;
  }

  #dialog-box .erpds-inv-move-note {
    grid-template-columns: 1fr;
    gap: 6px;
    margin: 10px 10px 0;
    padding: 9px 10px;
  }
}

@media (max-width: 340px) {
  #dialog-box .erpds-inv-move-recipient-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Inventory issue dialog: выдача со склада из карточки абонента --- */
#dialog-box:has(.erpds-inv-issue-dialog) {
  top: 50vh !important;
  left: 50% !important;
  right: auto !important;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px);
  box-sizing: border-box;
  overflow: hidden;
  transform: translate(-50%, -50%) !important;
}

#dialog-box .erpds-inv-issue-dialog {
  display: flex;
  flex-direction: column;
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100vh - 34px);
  box-sizing: border-box;
  color: var(--erpds-text, #111827);
}

#dialog-box .erpds-inv-issue-dialog__header {
  margin-bottom: 12px;
  padding-bottom: 10px;
}

#dialog-box .erpds-inv-issue-summary {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 12px 16px 0;
  padding: 8px 10px;
  border: 1px solid var(--erpds-border-light, #EEF1F5);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-bg-2, #F4F6FA);
}

#dialog-box .erpds-inv-issue-summary__text {
  display: grid;
  gap: 1px;
  min-width: 0;
}

#dialog-box .erpds-inv-issue-summary__label {
  color: var(--erpds-text-faint, #6b7280);
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

#dialog-box .erpds-inv-issue-summary strong {
  color: var(--erpds-text, #111827);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

#dialog-box .erpds-inv-issue-form {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 0;
  min-height: 0;
  margin: 0;
}

#dialog-box .erpds-inv-issue-picker {
  flex: 1 1 auto;
  min-height: 0;
  max-height: min(56vh, 520px);
  margin: 12px 16px 0;
  padding-right: 3px;
  overflow: hidden;
  scrollbar-width: thin;
}

#dialog-box .erpds-inv-issue-dialog #selectedInventoriesId {
  margin-top: 0 !important;
}

#dialog-box .erpds-inv-issue-dialog #fastFindInventoryId {
  display: grid;
  gap: 10px;
  min-width: 0;
}

#dialog-box .erpds-inv-issue-dialog #fastFindInventoryId > .table_block {
  display: grid !important;
  width: 100% !important;
  box-sizing: border-box;
  gap: 8px;
  margin: 0 !important;
  padding: 10px !important;
  border: 1px solid var(--erpds-border-light, #EEF1F5);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-surface, #fff);
  box-shadow: none;
}

#dialog-box .erpds-inv-issue-dialog #fastFindInventoryId .table_block .item {
  display: grid !important;
  grid-template-columns: minmax(120px, 160px) minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

#dialog-box .erpds-inv-issue-dialog #fastFindInventoryId .table_block .item > div {
  padding: 0 !important;
  border-bottom: 0 !important;
}

#dialog-box .erpds-inv-issue-dialog #fastFindInventoryId .left_data {
  width: auto !important;
  min-width: 0 !important;
  color: var(--erpds-text-muted, #525A66) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  line-height: 1.25;
  text-align: left !important;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: normal !important;
}

#dialog-box .erpds-inv-issue-dialog #fastFindInventoryId select,
#dialog-box .erpds-inv-issue-dialog #fastFindInventoryId input.input_box {
  width: 100% !important;
  max-width: 100%;
  min-width: 0;
  height: 32px;
  box-sizing: border-box;
  margin: 0;
}

#dialog-box .erpds-inv-issue-dialog #fastFindInventoryId input.find_box + br {
  display: none;
}

#dialog-box .erpds-inv-issue-dialog #dataSearchResultId {
  min-width: 0;
  max-height: min(42vh, 330px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

#dialog-box .erpds-inv-issue-dialog #dataSearchResultId .table_data,
#dialog-box .erpds-inv-issue-dialog #dataSearchResultId .table_list_data {
  width: 100%;
  max-width: 100%;
}

#dialog-box .erpds-inv-issue-dialog #dataSearchResultId table {
  width: 100% !important;
  max-width: 100%;
  table-layout: auto;
}

#dialog-box .erpds-inv-issue-dialog #dataSearchResultId th {
  padding: 6px 8px;
  background: var(--erpds-bg-2, #F4F6FA);
  color: var(--erpds-text-muted, #525A66);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

#dialog-box .erpds-inv-issue-dialog #dataSearchResultId td {
  padding: 7px 8px;
  color: var(--erpds-text, #111827);
  font-size: 12px;
  line-height: 1.35;
  vertical-align: middle;
  overflow-wrap: anywhere;
}

#dialog-box .erpds-inv-issue-dialog #dataSearchResultId td::before {
  display: none !important;
  content: none !important;
}

#dialog-box .erpds-inv-issue-dialog #dataSearchResultId td:first-child {
  min-width: 0;
  font-weight: 600;
}

#dialog-box .erpds-inv-issue-dialog #dataSearchResultId td:nth-child(2) {
  color: var(--erpds-text-muted, #525A66);
  white-space: nowrap;
}

#dialog-box .erpds-inv-issue-dialog #dataSearchResultId td:last-child {
  white-space: nowrap;
}

#dialog-box .erpds-inv-issue-dialog #dataSearchResultId input.preventEnter {
  width: 56px !important;
  height: 30px;
  box-sizing: border-box;
  margin: 0 6px 0 0;
  text-align: center;
}

#dialog-box .erpds-inv-issue-dialog #dataSearchResultId a[id^="addIff"],
#dialog-box .erpds-inv-issue-dialog #dataSearchResultId a[id^="removeIff"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  box-sizing: border-box;
  border: 1px solid var(--erpds-accent-soft-hover, #cce0ed);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-accent-soft, #deedf5);
  color: var(--erpds-accent-text, #155aaa);
  text-decoration: none;
  touch-action: manipulation;
}

#dialog-box .erpds-inv-issue-dialog #dataSearchResultId a[id^="addIff"]:hover,
#dialog-box .erpds-inv-issue-dialog #dataSearchResultId a[id^="removeIff"]:hover,
#dialog-box .erpds-inv-issue-dialog #dataSearchResultId a[id^="addIff"]:focus-visible,
#dialog-box .erpds-inv-issue-dialog #dataSearchResultId a[id^="removeIff"]:focus-visible {
  background: var(--erpds-accent-soft-hover, #cce0ed);
  color: var(--erpds-accent, #155aaa);
}

#dialog-box .erpds-inv-issue-dialog #dataSearchResultId a[id^="addIff"]:focus-visible,
#dialog-box .erpds-inv-issue-dialog #dataSearchResultId a[id^="removeIff"]:focus-visible {
  outline: 2px solid var(--erpds-accent, #1a73e8);
  outline-offset: 2px;
}

#dialog-box .erpds-inv-issue-dialog #selectedInventoriesId {
  margin-bottom: 10px;
}

#dialog-box .erpds-inv-issue-dialog #selectedInventoriesId table {
  width: 100% !important;
  max-width: 100%;
  table-layout: auto;
  border: 1px solid var(--erpds-ok-border, #86efac);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-ok-soft, #f0fdf4);
  overflow: hidden;
}

#dialog-box .erpds-inv-issue-dialog #selectedInventoriesId th {
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--erpds-text-muted, #525A66);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

#dialog-box .erpds-inv-issue-dialog #selectedInventoriesId td {
  padding: 7px 8px;
  color: var(--erpds-text, #111827);
  font-size: 12px;
  line-height: 1.35;
  vertical-align: middle;
  overflow-wrap: anywhere;
}

#dialog-box .erpds-inv-issue-dialog #selectedInventoriesId td::before {
  display: none !important;
  content: none !important;
}

#dialog-box .erpds-inv-issue-dialog #selectedInventoriesId td:first-child {
  min-width: 0;
  font-weight: 700;
}

#dialog-box .erpds-inv-issue-dialog #selectedInventoriesId td:nth-child(2) {
  color: var(--erpds-text-muted, #525A66);
  white-space: nowrap;
}

#dialog-box .erpds-inv-issue-dialog #selectedInventoriesId td:last-child {
  text-align: right;
  white-space: nowrap;
}

#dialog-box .erpds-inv-issue-dialog #selectedInventoriesId a[id^="removeIff"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--erpds-radius-sm, 6px);
  color: var(--erpds-ok-text, #166534);
  text-decoration: none;
}

#dialog-box .erpds-inv-issue-dialog #selectedInventoriesId a[id^="removeIff"]:hover {
  background: rgba(22, 101, 52, 0.10);
}

#dialog-box .erpds-inv-issue-actions {
  margin-top: 12px;
  padding: 12px 16px 14px;
  border-top: 1px solid var(--erpds-border-light, #EEF1F5);
  background: var(--erpds-surface, #fff);
}

#dialog-box .erpds-inv-issue-actions .div_center {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin: 0;
}

#dialog-box .erpds-inv-issue-actions #submit_or_id1 {
  color: var(--erpds-text-muted, #525A66);
  font-size: 12px;
}

#dialog-box .erpds-inv-issue-actions input[type="submit"],
#dialog-box .erpds-inv-issue-actions .erpds-btn,
#dialog-box .erpds-inv-issue-actions .link_dashed {
  min-height: 30px;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
}

#dialog-box .erpds-inv-issue-actions .link_dashed {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px !important;
  border: 1px solid var(--erpds-border, #DDE1E8) !important;
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-surface, #fff) !important;
  color: var(--erpds-accent-text, #155aaa);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
}

@media (max-width: 560px) {
  #dialog-box .erpds-inv-issue-dialog {
    width: min(430px, calc(100vw - 32px));
  }

  #dialog-box .erpds-inv-issue-dialog #fastFindInventoryId .table_block .item {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  #dialog-box .erpds-inv-issue-actions .div_center {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: stretch;
    gap: 7px;
  }

  #dialog-box .erpds-inv-issue-actions .div_center > input[type="submit"] {
    flex: 1 1 100% !important;
  }

  #dialog-box .erpds-inv-issue-actions .div_center > .link_dashed {
    flex: 1 1 100% !important;
  }

  #dialog-box .erpds-inv-issue-actions input[type="submit"],
  #dialog-box .erpds-inv-issue-actions .erpds-btn,
  #dialog-box .erpds-inv-issue-actions .link_dashed {
    width: 100% !important;
    min-height: 40px;
    justify-content: center;
  }

  #dialog-box .erpds-inv-issue-actions #submit_or_id1 {
    display: none;
  }

  #dialog-box .erpds-inv-issue-dialog #dataSearchResultId table,
  #dialog-box .erpds-inv-issue-dialog #dataSearchResultId tbody {
    display: block;
    width: 100% !important;
  }

  #dialog-box .erpds-inv-issue-dialog #dataSearchResultId thead,
  #dialog-box .erpds-inv-issue-dialog #dataSearchResultId th {
    display: none !important;
  }

  #dialog-box .erpds-inv-issue-dialog #dataSearchResultId tr {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 8px;
    width: 100% !important;
    box-sizing: border-box;
    margin: 0 0 6px;
    padding: 7px 8px;
    border: 1px solid var(--erpds-border-light, #EEF1F5);
    border-radius: var(--erpds-radius-sm, 6px);
    background: var(--erpds-surface, #fff);
  }

  #dialog-box .erpds-inv-issue-dialog #dataSearchResultId td {
    display: block !important;
    width: auto !important;
    box-sizing: border-box;
    padding: 0 !important;
    border: 0 !important;
  }

  #dialog-box .erpds-inv-issue-dialog #dataSearchResultId td:first-child {
    grid-column: 1 / -1;
  }

  #dialog-box .erpds-inv-issue-dialog #dataSearchResultId td:nth-child(2) {
    grid-column: 1;
    color: var(--erpds-text-muted, #525A66);
    font-size: 11.5px;
    white-space: normal;
  }

  #dialog-box .erpds-inv-issue-dialog #dataSearchResultId td:last-child {
    grid-column: 2;
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    white-space: nowrap;
  }

  #dialog-box .erpds-inv-issue-dialog #dataSearchResultId input.preventEnter {
    width: 58px !important;
    height: 36px !important;
    min-height: 36px !important;
    padding: 4px 8px !important;
  }

  #dialog-box .erpds-inv-issue-dialog #dataSearchResultId {
    max-height: min(27vh, 210px);
  }

  #dialog-box .erpds-inv-issue-dialog #selectedInventoriesId table,
  #dialog-box .erpds-inv-issue-dialog #selectedInventoriesId tbody {
    display: block;
    width: 100% !important;
  }

  #dialog-box .erpds-inv-issue-dialog #selectedInventoriesId thead,
  #dialog-box .erpds-inv-issue-dialog #selectedInventoriesId th {
    display: none !important;
  }

  #dialog-box .erpds-inv-issue-dialog #selectedInventoriesId tr {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 5px 8px;
    width: 100% !important;
    box-sizing: border-box;
    padding: 8px;
  }

  #dialog-box .erpds-inv-issue-dialog #selectedInventoriesId td {
    display: block !important;
    width: auto !important;
    box-sizing: border-box;
    padding: 0 !important;
    border: 0 !important;
  }

  #dialog-box .erpds-inv-issue-dialog #selectedInventoriesId td:first-child {
    grid-column: 1 / -1;
  }

  #dialog-box .erpds-inv-issue-dialog #selectedInventoriesId td:nth-child(2) {
    grid-column: 1;
    font-size: 11.5px;
    white-space: normal;
  }

  #dialog-box .erpds-inv-issue-dialog #selectedInventoriesId td:last-child {
    grid-column: 2;
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
  }
}

/* --- Inventory hot replace dialog: быстрая замена без табличной формы --- */
#dialog-box .erpds-inv-hot-replace-dialog {
  width: min(560px, calc(100vw - 32px));
  box-sizing: border-box;
  color: var(--erpds-text, #111827);
}

#dialog-box .erpds-inv-hot-replace-dialog__header {
  margin-bottom: 12px;
  padding-bottom: 10px;
}

#dialog-box .erpds-inv-hot-replace-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  margin: 12px 16px 0;
  padding: 8px 10px;
  border: 1px solid var(--erpds-border-light, #EEF1F5);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-bg-2, #F4F6FA);
}

#dialog-box .erpds-inv-hot-replace-summary__text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

#dialog-box .erpds-inv-hot-replace-summary__flow {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: stretch;
  gap: 7px;
  min-width: 0;
  padding-top: 2px;
}

#dialog-box .erpds-inv-hot-replace-summary__current,
#dialog-box .erpds-inv-hot-replace-summary__new {
  display: grid;
  gap: 3px;
  min-width: 0;
  box-sizing: border-box;
  padding: 7px 8px;
  border: 1px solid var(--erpds-border-light, #EEF1F5);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-surface, #fff);
}

#dialog-box .erpds-inv-hot-replace-summary__new {
  border-color: color-mix(in srgb, var(--erpds-accent, #155aaa) 18%, var(--erpds-border-light, #EEF1F5));
  background: color-mix(in srgb, var(--erpds-accent-soft, #deedf5) 44%, var(--erpds-surface, #fff));
}

#dialog-box .erpds-inv-hot-replace-summary__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  color: var(--erpds-text-muted, #525A66);
}

#dialog-box .erpds-inv-hot-replace-summary__label,
#dialog-box .erpds-inv-hot-replace-field > span {
  color: var(--erpds-text-muted, #525A66);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

#dialog-box .erpds-inv-hot-replace-summary strong {
  color: var(--erpds-text, #111827);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

#dialog-box .erpds-inv-hot-replace-form {
  display: grid;
  gap: 0;
  margin: 0;
}

#dialog-box .erpds-inv-hot-replace-picker {
  display: grid;
  gap: 9px;
  margin: 12px 16px 0;
  min-width: 0;
}

#dialog-box .erpds-inv-hot-replace-field {
  display: grid;
  gap: 5px;
  min-width: 0;
}

#dialog-box .erpds-inv-hot-replace-search {
  display: block;
  min-width: 0;
}

#dialog-box .erpds-inv-hot-replace-dialog #search_id,
#dialog-box .erpds-inv-hot-replace-dialog #commentId,
#dialog-box .erpds-inv-hot-replace-dialog #dataSearchResultId select {
  width: 100% !important;
  max-width: 100%;
  min-width: 0;
  height: 32px;
  box-sizing: border-box;
  margin: 0;
}

#dialog-box .erpds-inv-hot-replace-dialog #dataSearchResultId {
  min-width: 0;
}

#dialog-box .erpds-inv-hot-replace-dialog #dataSearchResultId select {
  display: block;
}

#dialog-box .erpds-inv-hot-replace-selected {
  min-width: 0;
  margin-top: -3px;
  padding: 7px 9px;
  border: 1px solid var(--erpds-border-light, #EEF1F5);
  border-radius: var(--erpds-radius-sm, 6px);
  background: color-mix(in srgb, var(--erpds-accent-soft, #deedf5) 46%, var(--erpds-surface, #fff));
  color: var(--erpds-text, #111827);
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

#dialog-box .erpds-inv-hot-replace-selected:empty,
#dialog-box .erpds-inv-hot-replace-selected[hidden] {
  display: none;
}

#dialog-box .erpds-inv-hot-replace-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--erpds-border-light, #EEF1F5);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-surface, #fff);
  color: var(--erpds-text, #111827);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.35;
}

#dialog-box .erpds-inv-hot-replace-toggle input {
  flex: 0 0 auto;
  margin: 0;
}

#dialog-box .erpds-inv-hot-replace-toggle span {
  min-width: 0;
  overflow-wrap: anywhere;
}

#dialog-box .erpds-inv-hot-replace-actions {
  margin-top: 12px;
  padding: 12px 16px 14px;
  border-top: 1px solid var(--erpds-border-light, #EEF1F5);
  background: var(--erpds-surface, #fff);
}

#dialog-box .erpds-inv-hot-replace-actions .div_center {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin: 0;
}

#dialog-box .erpds-inv-hot-replace-actions #submit_or_id1 {
  color: var(--erpds-text-muted, #525A66);
  font-size: 12px;
}

#dialog-box .erpds-inv-hot-replace-actions .erpds-btn,
#dialog-box .erpds-inv-hot-replace-actions .link_dashed {
  min-height: 30px;
  box-sizing: border-box;
}

#dialog-box .erpds-inv-hot-replace-actions .link_dashed {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px !important;
  border: 1px solid var(--erpds-border, #DDE1E8) !important;
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-surface, #fff) !important;
  color: var(--erpds-accent-text, #155aaa);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
  text-decoration: none;
}

@media (max-width: 460px) {
  #dialog-box:has(.erpds-inv-hot-replace-dialog) {
    top: 60px !important;
    max-height: calc(100dvh - 126px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  #dialog-box .erpds-inv-hot-replace-dialog {
    width: min(430px, calc(100vw - 32px));
  }

  #dialog-box .erpds-inv-hot-replace-dialog__header {
    margin-bottom: 8px;
    padding-bottom: 8px;
  }

  #dialog-box .erpds-inv-hot-replace-summary {
    margin: 8px 12px 0;
    padding: 8px;
  }

  #dialog-box .erpds-inv-hot-replace-picker {
    margin: 9px 12px 0;
    gap: 7px;
  }

  #dialog-box .erpds-inv-hot-replace-actions {
    position: sticky;
    bottom: 0;
    z-index: 2;
    margin-top: 9px;
    padding: 10px 12px;
  }

  #dialog-box .erpds-inv-hot-replace-actions .div_center {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
  }

  #dialog-box .erpds-inv-hot-replace-actions .erpds-btn,
  #dialog-box .erpds-inv-hot-replace-actions .link_dashed {
    width: 100% !important;
    justify-content: center;
  }

  #dialog-box .erpds-inv-hot-replace-actions #submit_or_id1 {
    display: none;
  }
}

/* --- Inventory return dialog: передача ТМЦ на склад без табличной формы --- */
#dialog-box .erpds-inv-return-dialog {
  width: min(460px, calc(100vw - 32px));
  box-sizing: border-box;
  color: var(--erpds-text, #111827);
}

#dialog-box .erpds-inv-return-dialog__header {
  margin-bottom: 12px;
  padding-bottom: 10px;
}

#dialog-box .erpds-inv-return-summary {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 12px 16px 0;
  padding: 8px 10px;
  border: 1px solid var(--erpds-border-light, #EEF1F5);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-bg-2, #F4F6FA);
}

#dialog-box .erpds-inv-return-summary__text {
  display: grid;
  gap: 1px;
  min-width: 0;
}

#dialog-box .erpds-inv-return-summary__label,
#dialog-box .erpds-inv-return-field > span {
  color: var(--erpds-text-muted, #525A66);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

#dialog-box .erpds-inv-return-summary strong {
  color: var(--erpds-text, #111827);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

#dialog-box .erpds-inv-return-form {
  display: grid;
  gap: 0;
  margin: 0;
}

#dialog-box .erpds-inv-return-fields {
  display: grid;
  gap: 9px;
  margin: 12px 16px 0;
  min-width: 0;
}

#dialog-box .erpds-inv-return-field {
  display: grid;
  gap: 5px;
  min-width: 0;
}

#dialog-box .erpds-inv-return-dialog select[name="warehouse_id"],
#dialog-box .erpds-inv-return-dialog #commentId {
  width: 100% !important;
  max-width: 100%;
  min-width: 0;
  height: 32px;
  box-sizing: border-box;
  margin: 0;
}

#dialog-box .erpds-inv-return-actions {
  margin-top: 12px;
  padding: 12px 16px 14px;
  border-top: 1px solid var(--erpds-border-light, #EEF1F5);
  background: var(--erpds-surface, #fff);
}

#dialog-box .erpds-inv-return-actions .div_center {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin: 0;
}

#dialog-box .erpds-inv-return-actions #submit_or_id1 {
  color: var(--erpds-text-muted, #525A66);
  font-size: 12px;
}

#dialog-box .erpds-inv-return-actions .erpds-btn,
#dialog-box .erpds-inv-return-actions .link_dashed {
  min-height: 30px;
  box-sizing: border-box;
}

#dialog-box .erpds-inv-return-actions .link_dashed {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px !important;
  border: 1px solid var(--erpds-border, #DDE1E8) !important;
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-surface, #fff) !important;
  color: var(--erpds-accent-text, #155aaa);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
  text-decoration: none;
}

@media (max-width: 460px) {
  #dialog-box .erpds-inv-return-actions .div_center {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
  }

  #dialog-box .erpds-inv-return-actions .erpds-btn,
  #dialog-box .erpds-inv-return-actions .link_dashed {
    width: 100% !important;
    justify-content: center;
  }

  #dialog-box .erpds-inv-return-actions #submit_or_id1 {
    display: none;
  }
}

/* --- Inventory join dialog: объединение ТМЦ с читаемым списком кандидатов --- */
#dialog-box .erpds-inv-join-dialog {
  width: min(760px, calc(100vw - 32px));
  box-sizing: border-box;
  color: var(--erpds-text, #111827);
}

#dialog-box .erpds-inv-join-dialog__header {
  margin-bottom: 12px;
  padding-bottom: 10px;
}

#dialog-box .erpds-inv-join-summary {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 12px 16px 0;
  padding: 8px 10px;
  border: 1px solid var(--erpds-border-light, #EEF1F5);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-bg-2, #F4F6FA);
}

#dialog-box .erpds-inv-join-summary__text {
  display: grid;
  gap: 1px;
  min-width: 0;
}

#dialog-box .erpds-inv-join-summary__label {
  color: var(--erpds-text-muted, #525A66);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  overflow-wrap: anywhere;
}

#dialog-box .erpds-inv-join-summary strong {
  color: var(--erpds-text, #111827);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

#dialog-box .erpds-inv-join-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  max-width: calc(100% - 32px);
  min-height: 30px;
  box-sizing: border-box;
  margin: 12px 16px 0;
  padding: 5px 10px;
  border: 1px solid var(--erpds-border, #DDE1E8);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-surface, #fff);
  color: var(--erpds-accent-text, #155aaa);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
  text-decoration: none;
}

#dialog-box .erpds-inv-join-toggle > span {
  border-bottom: 0;
}

#dialog-box .erpds-inv-join-toggle:hover {
  border-color: var(--erpds-accent-soft-hover, #cce0ed);
  background: var(--erpds-accent-soft, #deedf5);
  color: var(--erpds-accent, #155aaa);
}

#dialog-box .erpds-inv-join-warning {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 10px 16px 0;
  padding: 8px 10px;
  border: 1px solid var(--erpds-warn-border, #fed7aa);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-warn-soft, #fff7ed);
  color: var(--erpds-warn-text, #9a3412);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

#dialog-box .erpds-inv-join-form {
  display: grid;
  gap: 0;
  margin: 0;
}

#dialog-box .erpds-inv-join-list {
  max-height: min(54vh, 500px);
  margin: 12px 16px 0;
  border: 1px solid var(--erpds-border-light, #EEF1F5);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-surface, #fff);
  overflow: auto;
  scrollbar-width: thin;
}

#dialog-box .erpds-inv-join-list table {
  width: 100% !important;
  max-width: 100%;
  margin: 0;
  table-layout: auto;
}

#dialog-box .erpds-inv-join-list th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 7px 8px;
  background: var(--erpds-bg-2, #F4F6FA);
  color: var(--erpds-text-muted, #525A66);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

#dialog-box .erpds-inv-join-list td {
  padding: 7px 8px;
  color: var(--erpds-text, #111827);
  font-size: 12px;
  line-height: 1.35;
  vertical-align: middle;
  overflow-wrap: anywhere;
}

#dialog-box .erpds-inv-join-list input[type="checkbox"] {
  margin: 0;
}

#dialog-box .erpds-inv-join-actions {
  margin-top: 12px;
  padding: 12px 16px 14px;
  border-top: 1px solid var(--erpds-border-light, #EEF1F5);
  background: var(--erpds-surface, #fff);
}

#dialog-box .erpds-inv-join-actions .div_center {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin: 0;
}

#dialog-box .erpds-inv-join-actions #submit_or_id1 {
  color: var(--erpds-text-muted, #525A66);
  font-size: 12px;
}

#dialog-box .erpds-inv-join-actions .erpds-btn,
#dialog-box .erpds-inv-join-actions .link_dashed {
  min-height: 30px;
  box-sizing: border-box;
}

#dialog-box .erpds-inv-join-actions .link_dashed {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px !important;
  border: 1px solid var(--erpds-border, #DDE1E8) !important;
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-surface, #fff) !important;
  color: var(--erpds-accent-text, #155aaa);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
  text-decoration: none;
}

@media (max-width: 560px) {
  #dialog-box .erpds-inv-join-dialog {
    width: min(430px, calc(100vw - 32px));
  }

  #dialog-box .erpds-inv-join-toggle {
    display: flex;
    width: calc(100% - 32px);
    justify-content: center;
  }

  #dialog-box .erpds-inv-join-list {
    max-height: min(50vh, 420px);
  }

  #dialog-box .erpds-inv-join-list table {
    min-width: 620px;
  }

  #dialog-box .erpds-inv-join-actions .div_center {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
  }

  #dialog-box .erpds-inv-join-actions .erpds-btn,
  #dialog-box .erpds-inv-join-actions .link_dashed {
    width: 100% !important;
    justify-content: center;
  }

  #dialog-box .erpds-inv-join-actions #submit_or_id1 {
    display: none;
  }
}

/* --- Inventory replace dialog: замена ТМЦ без табличной модалки --- */
#dialog-box .erpds-inv-replace-dialog {
  width: min(520px, calc(100vw - 32px));
  box-sizing: border-box;
  color: var(--erpds-text, #111827);
}

#dialog-box .erpds-inv-replace-dialog__header {
  margin-bottom: 12px;
  padding-bottom: 10px;
}

#dialog-box .erpds-inv-replace-summary {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 12px 16px 0;
  padding: 8px 10px;
  border: 1px solid var(--erpds-border-light, #EEF1F5);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-bg-2, #F4F6FA);
}

#dialog-box .erpds-inv-replace-summary__text {
  display: grid;
  gap: 1px;
  min-width: 0;
}

#dialog-box .erpds-inv-replace-summary__label,
#dialog-box .erpds-inv-replace-field > span,
#dialog-box .erpds-inv-replace-picker .left_data {
  color: var(--erpds-text-muted, #525A66) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  line-height: 1.25;
  text-align: left !important;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

#dialog-box .erpds-inv-replace-summary strong {
  color: var(--erpds-text, #111827);
  font-size: 13.5px;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

#dialog-box .erpds-inv-replace-summary__meta {
  color: var(--erpds-text-faint, #6b7280);
  font-size: 11.5px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

#dialog-box .erpds-inv-replace-form {
  display: grid;
  gap: 10px;
  margin: 12px 16px 0;
}

#dialog-box .erpds-inv-replace-picker {
  display: grid;
  gap: 8px;
  min-width: 0;
}

#dialog-box .erpds-inv-replace-picker .table_block {
  display: grid !important;
  width: 100% !important;
  box-sizing: border-box;
  gap: 8px;
  margin: 0 !important;
  padding: 10px !important;
  border: 1px solid var(--erpds-border-light, #EEF1F5);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-surface, #fff);
  box-shadow: none;
}

#dialog-box .erpds-inv-replace-picker .item {
  display: grid !important;
  grid-template-columns: minmax(120px, 150px) minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
}

#dialog-box .erpds-inv-replace-picker .item > div {
  min-width: 0;
  padding: 0 !important;
  border-bottom: 0 !important;
}

#dialog-box .erpds-inv-replace-dialog #inventorySelectorAccountId,
#dialog-box .erpds-inv-replace-dialog #inventoryId,
#dialog-box .erpds-inv-replace-dialog #replaceCommentId {
  width: 100% !important;
  max-width: 100%;
  min-width: 0;
  height: 32px;
  box-sizing: border-box;
  margin: 0;
}

#dialog-box .erpds-inv-replace-field {
  display: grid;
  gap: 5px;
  min-width: 0;
}

#dialog-box .erpds-inv-replace-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
  padding: 12px 16px 14px;
  border-top: 1px solid var(--erpds-border-light, #EEF1F5);
  background: var(--erpds-surface, #fff);
}

#dialog-box .erpds-inv-replace-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 30px;
  max-width: 100%;
  box-sizing: border-box;
  padding: 5px 10px;
  border: 1px solid var(--erpds-border, #DDE1E8);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-surface, #fff);
  color: var(--erpds-accent-text, #155aaa);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
}

#dialog-box .erpds-inv-replace-action > span {
  border-bottom: 0;
}

#dialog-box .erpds-inv-replace-action:hover {
  border-color: var(--erpds-accent-soft-hover, #cce0ed);
  background: var(--erpds-accent-soft, #deedf5);
  color: var(--erpds-accent, #155aaa);
}

@media (max-width: 460px) {
  #dialog-box .erpds-inv-replace-dialog {
    width: min(430px, calc(100vw - 32px));
  }

  #dialog-box .erpds-inv-replace-picker .item {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  #dialog-box .erpds-inv-replace-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  #dialog-box .erpds-inv-replace-action {
    width: 100%;
  }
}

/* --- Inventory split dialog: компактное разделение ТМЦ без табличной формы --- */
#dialog-box .erpds-inv-split-dialog {
  width: min(430px, calc(100vw - 32px));
  box-sizing: border-box;
  color: var(--erpds-text, #111827);
}

#dialog-box .erpds-inv-split-dialog__header {
  margin-bottom: 12px;
  padding-bottom: 10px;
}

#dialog-box .erpds-inv-split-summary {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 12px 16px 0;
  padding: 8px 10px;
  border: 1px solid var(--erpds-border-light, #EEF1F5);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-bg-2, #F4F6FA);
}

#dialog-box .erpds-inv-split-summary__text {
  display: grid;
  gap: 1px;
  min-width: 0;
}

#dialog-box .erpds-inv-split-summary__label,
#dialog-box .erpds-inv-split-row__label,
#dialog-box .erpds-inv-split-row > label,
#dialog-box .erpds-inv-split-secondary__title {
  color: var(--erpds-text-muted, #525A66);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

#dialog-box .erpds-inv-split-summary strong {
  color: var(--erpds-text, #111827);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
}

#dialog-box .erpds-inv-split-form,
#dialog-box .erpds-inv-split-secondary,
#dialog-box .erpds-inv-split-actions {
  display: grid;
  gap: 8px;
  margin: 12px 16px 0;
}

#dialog-box .erpds-inv-split-form {
  padding-bottom: 2px;
}

#dialog-box .erpds-inv-split-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(86px, auto) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

#dialog-box .erpds-inv-split-row--result {
  padding-top: 8px;
  border-top: 1px solid var(--erpds-border-light, #EEF1F5);
}

#dialog-box .erpds-inv-split-input {
  width: 96px !important;
  min-width: 0;
  height: 32px;
  box-sizing: border-box;
  margin: 0;
  text-align: right;
}

#dialog-box .erpds-inv-split-input--small {
  width: 70px !important;
}

#dialog-box .erpds-inv-split-result {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 30px;
  box-sizing: border-box;
  padding: 4px 9px;
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-bg-2, #F4F6FA);
  color: var(--erpds-text, #111827);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
}

#dialog-box .erpds-inv-split-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 30px;
  max-width: 100%;
  box-sizing: border-box;
  padding: 5px 10px;
  border: 1px solid var(--erpds-border, #DDE1E8);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-surface, #fff);
  color: var(--erpds-accent-text, #155aaa);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
}

#dialog-box .erpds-inv-split-action > span {
  border-bottom: 0;
}

#dialog-box .erpds-inv-split-action:hover {
  border-color: var(--erpds-accent-soft-hover, #cce0ed);
  background: var(--erpds-accent-soft, #deedf5);
  color: var(--erpds-accent, #155aaa);
}

#dialog-box .erpds-inv-split-secondary {
  padding-top: 10px;
  border-top: 1px solid var(--erpds-border-light, #EEF1F5);
}

#dialog-box .erpds-inv-split-actions {
  padding-top: 10px;
  border-top: 1px solid var(--erpds-border-light, #EEF1F5);
}

#dialog-box .erpds-inv-split-actions .erpds-inv-split-action {
  width: 100%;
  justify-content: center;
}

@media (max-width: 460px) {
  #dialog-box .erpds-inv-split-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  #dialog-box .erpds-inv-split-input,
  #dialog-box .erpds-inv-split-input--small,
  #dialog-box .erpds-inv-split-action {
    width: 100% !important;
  }

  #dialog-box .erpds-inv-split-result {
    justify-content: flex-start;
    width: 100%;
  }
}

/* --- Tab navigation (ul#navigation) — полный override legacy pill-tabs.
   Прототип: borderBottom 1px container, underline 2px active, fontSize 13.
   Нужны !important против float + background в style.css:5566-5627.

   Важно: overflow-x: auto + overflow-y: visible даёт в ряде браузеров overflow-y: auto
   и «лишний» вертикальный скроллбар — держим overflow-y: hidden на полосе табов.
   ============================================================ */
ul#navigation,
ul#navigation2 {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  gap: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 4px 4px 0 !important;
  border-bottom: 1px solid var(--erpds-border) !important;
  background: var(--erpds-surface) !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 10 !important;
  list-style: none !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scrollbar-width: none;
  -ms-overflow-style: none;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}
ul#navigation::-webkit-scrollbar,
ul#navigation2::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none;
}

/* Десктоп: вкладки по содержимому; если вкладок много — горизонтальная лента без второго скролла. */
@media (min-width: 901px) {
  ul#navigation,
  ul#navigation2 {
    overflow-x: auto !important;
  }
  ul#navigation li,
  ul#navigation2 li {
    flex: 0 0 auto !important;
    min-width: 0 !important;
  }
  ul#navigation li a:link,
  ul#navigation li a:visited,
  ul#navigation2 li a:link,
  ul#navigation2 li a:visited {
    min-width: 92px !important;
    max-width: 220px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
}

ul#navigation li,
ul#navigation2 li {
  flex: 0 0 auto !important;
  min-width: 0 !important;
  float: none !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  min-height: 0 !important;
  scroll-snap-align: start;
}
ul#navigation li a:link,
ul#navigation li a:visited,
ul#navigation2 li a:link,
ul#navigation2 li a:visited {
  display: flex !important;
  flex: 1 1 auto !important;
  justify-content: center !important;
  align-items: center !important;
  float: none !important;
  box-sizing: border-box !important;
  width: 100% !important;
  /* V-004: touch hit-area 44px на pointer:coarse, desktop оставляем 36px */
  min-height: 36px !important;
  line-height: 1.25 !important;
  gap: 6px !important;
  padding: 6px 10px !important;
  font-family: var(--erpds-sans) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: var(--erpds-text-muted) !important;
  text-decoration: none !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  border-radius: 8px 8px 0 0 !important;
  border: none !important;
  border-bottom: 2px solid transparent !important;
  background: transparent !important;
  margin: 0 1px -1px 1px !important;
  white-space: nowrap !important;
  transition: color 0.12s ease, background-color 0.12s ease, border-color 0.12s ease !important;
}
ul#navigation li a:hover,
ul#navigation2 li a:hover {
  color: var(--erpds-text) !important;
  background: var(--erpds-accent-soft) !important;
  border-bottom-color: var(--erpds-border-strong) !important;
}
ul#navigation li a:active,
ul#navigation2 li a:active {
  background: var(--erpds-accent-soft-hover) !important;
}
ul#navigation li.selected a:link,
ul#navigation li.selected a:visited,
ul#navigation2 li.selected a:link,
ul#navigation2 li.selected a:visited {
  color: var(--erpds-accent) !important;
  font-weight: 600 !important;
  background: transparent !important;
  border: none !important;
  border-bottom: 2px solid var(--erpds-accent) !important;
}

.erpds-customer-page ul#navigation {
  top: var(--erpds-customer-navigation-top, 0px) !important;
}

.erpds-customer-page ul#navigation.erpds-customer-navigation-measuring {
  position: static !important;
  top: auto !important;
}

@media (max-width: 900px) {
  ul#navigation,
  ul#navigation2 {
    justify-content: flex-start !important;
    padding: 4px 6px 0 !important;
    scroll-padding-left: 6px;
  }
  ul#navigation li,
  ul#navigation2 li {
    flex: 0 0 auto !important;
    min-width: max-content !important;
  }
  ul#navigation li a:link,
  ul#navigation li a:visited,
  ul#navigation2 li a:link,
  ul#navigation2 li a:visited {
    width: auto !important;
    min-width: 82px !important;
    max-width: 180px !important;
    padding: 8px 12px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
}


/* Заголовок раздела (АБОНЕНТЫ / ФИО) дублирует hero — на карточке скрываем.
   <title> вкладки берётся из тех же pageTitle* и остаётся. */
.main_content_inside:has(.erpds-customer-page) .erpds-page-title { display: none; }

/* --- Customer Hero — точные значения из customer-v2.jsx --- */
.erpds-customer-hero {
  display: flex;
  padding: 12px var(--erpds-grid-padding-x) calc(var(--erpds-grid-padding-y) - 6px);
  gap: 16px;
  align-items: flex-start;
  margin: 0 0 0;
  border-radius: 0;
  border: none;
  border-bottom: 1px solid var(--erpds-border, #DDE1E8);
  box-shadow: none;
  background: var(--erpds-surface, #FFFFFF);
}
.erpds-customer-hero-body {
  min-width: 0;
  flex: 1 1 auto;
}
.erpds-customer-hero-top > div:first-child {
  min-width: 0;
  flex: 1 1 auto;
}
.erpds-customer-hero-avatar {
  width: 64px;
  height: 64px;
  border-radius: var(--erpds-radius-lg);
  font-size: 24px;
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--erpds-text-on-accent, #fff);
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 2px;
}
.erpds-customer-hero-name {
  font-size: 26px;
  font-weight: 600;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.erpds-customer-hero-id {
  font-size: 11.5px;
  overflow-wrap: anywhere;
}
.erpds-customer-hero-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}
.erpds-customer-hero-addr-row {
  margin-top: 4px;
  max-width: 100%;
  font-size: 13px;
}
.erpds-customer-hero-address {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  font-size: 12.5px;
  color: var(--erpds-text-secondary, #6b7280);
  text-decoration: none;
  white-space: normal;
  overflow-wrap: anywhere;
}
a.erpds-customer-hero-address:hover {
  color: var(--erpds-link, #2563eb);
  text-decoration: underline;
}
@media (max-width: 900px) {
  .erpds-customer-hero-address {
    font-size: 13px;
    min-height: 24px;
  }
}

/* --- Stat strip — отступ от hero + боковые поля (customer-v2.jsx: 0 28px 18px) --- */
.erpds-customer-page .erpds-customer-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
  gap: 10px;
  max-width: 100%;
}
@media (min-width: 901px) {
  .erpds-customer-page .erpds-customer-stats {
    padding: var(--erpds-grid-gap, 12px) var(--erpds-grid-padding-x) var(--erpds-grid-padding-y);
    margin: 0 0 16px;
    box-sizing: border-box;
  }
}
.erpds-stat-tile {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--erpds-border, #DDE1E8);
  border-radius: var(--erpds-radius, 8px);
  background: var(--erpds-surface, #fff);
  box-shadow: var(--erpds-shadow-sm, 0 1px 2px rgba(15,23,42,0.04));
}
.erpds-stat-tile .label {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--erpds-text-faint, #6B7280);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  overflow-wrap: anywhere;
}
.erpds-stat-tile .label i {
  flex: 0 0 auto;
  color: var(--erpds-text-muted, #6b7280);
  font-size: 11px;
}
.erpds-stat-tile .value {
  min-width: 0;
  margin-top: 6px;
  color: var(--erpds-text, #111827);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
  font-feature-settings: "tnum";
}
.erpds-stat-tile.tone-ok {
  border-color: var(--erpds-ok-border, #86efac);
  background: var(--erpds-ok-soft, #f0fdf4);
}
.erpds-stat-tile.tone-bad {
  border-color: var(--erpds-bad-border, #fecaca);
  background: var(--erpds-bad-soft, #fef2f2);
}
.erpds-stat-tile.tone-warn {
  border-color: var(--erpds-warn-border, #fde68a);
  background: var(--erpds-warn-soft, #fffbeb);
}
.erpds-stat-tile.tone-ok .value { color: var(--erpds-ok-text, #166534); }
.erpds-stat-tile.tone-bad .value { color: var(--erpds-bad-text, #991b1b); }
.erpds-stat-tile.tone-warn .value { color: var(--erpds-warn-text, #92400e); }

/* ── Sticky customer bar ───────────────────────────────────────── */
.erpds-sticky-bar {
    position: fixed;
    top: 0;
    left: 0; right: 0;
    z-index: 950;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 20px;
    background: var(--erpds-surface, #fff);
    border-bottom: 1px solid var(--erpds-border, #e5e7eb);
    box-shadow: 0 2px 8px rgba(0,0,0,.10);
    transform: translateY(-100%);
    transition: transform 200ms ease;
    pointer-events: none;
    will-change: transform;
}
.erpds-sticky-bar--visible {
    transform: translateY(calc(var(--erpds-nav-h, 40px) + env(safe-area-inset-top, 0px)));
    pointer-events: auto;
}

.erpds-sticky-bar__info {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex-shrink: 0;
}
.erpds-sticky-bar__name {
    font-size: 15px;
    font-weight: 600;
    color: var(--erpds-text, #111827);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
}
.erpds-sticky-bar__id {
    font-size: 12px;
    color: var(--erpds-text-muted, #6b7280);
    white-space: nowrap;
}

.erpds-sticky-bar__tiles {
    display: flex;
    gap: 8px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}
.erpds-sticky-tile {
    display: flex;
    flex-direction: column;
    padding: 4px 10px;
    border-radius: 8px;
    min-width: 0;
    flex: 1 1 80px;
}
.erpds-sticky-tile--clamp .erpds-sticky-tile__val {
    white-space: normal;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.3;
}
.erpds-sticky-tile.tone-ok     { background: var(--erpds-ok-soft, #f0fdf4); }
.erpds-sticky-tile.tone-bad    { background: var(--erpds-bad-soft, #fef2f2); }
.erpds-sticky-tile.tone-warn   { background: var(--erpds-warn-soft, #fffbeb); }
.erpds-sticky-tile.tone-neutral{ background: var(--erpds-bg-2, #f9fafb); }
.erpds-sticky-tile__lbl {
    font-size: 10px;
    color: var(--erpds-text-faint, #6B7280);
    text-transform: uppercase;
    letter-spacing: .4px;
}
.erpds-sticky-tile__val {
    font-size: 13px;
    font-weight: 600;
    color: var(--erpds-text, #111827);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.erpds-sticky-tile.tone-ok  .erpds-sticky-tile__val { color: var(--erpds-ok-text, #166534); }
.erpds-sticky-tile.tone-bad .erpds-sticky-tile__val { color: var(--erpds-bad-text, #991b1b); }
.erpds-sticky-tile.tone-warn .erpds-sticky-tile__val { color: var(--erpds-warn-text, #92400e); }
.erpds-sticky-tile__poll-time {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    font-weight: 400;
    font-family: var(--erpds-mono, monospace);
    color: var(--erpds-text-muted, #9ca3af);
}
.erpds-sticky-tile__poll-time--live {
    color: var(--erpds-ok-text, #166534);
}

.erpds-sticky-bar__actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

/* Tile sub-line */
.erpds-sticky-tile__sub {
    font-size: 10px;
    color: var(--erpds-text-muted, #6b7280);
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.erpds-sticky-tile.tone-ok   .erpds-sticky-tile__sub { color: var(--erpds-ok-text, #166534); }
.erpds-sticky-tile.tone-bad  .erpds-sticky-tile__sub { color: var(--erpds-bad-text, #991b1b); }
.erpds-sticky-tile.tone-warn .erpds-sticky-tile__sub { color: var(--erpds-warn-text, #92400e); }

/* Mini credit progress bar */
.erpds-sticky-tile__bar {
    display: block;
    height: 3px;
    background: var(--erpds-border, #e5e7eb);
    border-radius: 2px;
    margin-top: 4px;
    overflow: hidden;
}
.erpds-sticky-tile__bar-fill {
    display: block;
    height: 100%;
    border-radius: 2px;
    transition: width 300ms ease;
}

/* Contract number pill in sticky id line */
.erpds-sticky-bar__contract {
    display: inline-block;
    padding: 0 5px;
    border-radius: 4px;
    background: var(--erpds-border, #e5e7eb);
    color: var(--erpds-text-secondary, #374151);
    font-size: 11px;
    font-weight: 500;
    margin-left: 2px;
    vertical-align: middle;
}

/* Ghost button color variants */
.erpds-hero-btn--ghost-green {
    color: var(--erpds-ok-text, #166534);
    border-color: var(--erpds-ok-border, #86efac);
}
.erpds-hero-btn--ghost-green:hover {
    background: var(--erpds-ok-soft, #f0fdf4);
    border-color: var(--erpds-ok-border-hover, #4ade80);
}
.erpds-hero-btn--ghost-blue {
    color: var(--erpds-info-text, #1e40af);
    border-color: var(--erpds-info-border, #93c5fd);
}
.erpds-hero-btn--ghost-blue:hover {
    background: var(--erpds-info-soft, #eff6ff);
    border-color: var(--erpds-info-border-hover, #60a5fa);
}

/* Overdue badge button */
.erpds-hero-btn--overdue {
    background: var(--erpds-bad-soft, #fef2f2);
    color: var(--erpds-bad, #dc2626);
    border: 1px solid var(--erpds-err-border, #fca5a5);
    border-radius: 8px;
    padding: 5px 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    animation: erpds-ring-pulse 1.8s ease-in-out infinite;
}
.erpds-hero-btn--overdue:hover {
    background: var(--erpds-bad-soft-hover, #fee2e2);
    border-color: var(--erpds-err-border-hover, #f87171);
}
@keyframes erpds-ring-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(220,38,38,.35); }
    50%       { box-shadow: 0 0 0 5px rgba(220,38,38,0); }
}


/* --- Alert Ribbon --- */
.erpds-alert-ribbon {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px var(--erpds-grid-padding-x);
  font-size: 13px;
  font-weight: 500;
}
.erpds-alert-ribbon--debt {
  background: var(--erpds-warn-bg, #fff8e1);
  color: var(--erpds-warn-text, #7a5c00);
  border-left: 3px solid var(--erpds-warn, #f5a623);
}
.erpds-alert-ribbon--blocked {
  background: var(--erpds-err-bg, #fdecea);
  color: var(--erpds-bad-text, #7a1e1e);
  border-left: 3px solid var(--erpds-bad, #d32f2f);
}

/* === Customer 360 Body Grid === */
.erpds-customer-body {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: var(--erpds-grid-gap, 16px);
  padding: var(--erpds-grid-padding-y) var(--erpds-grid-padding-x) calc(var(--erpds-grid-padding-y) + 6px);
  align-items: start;
}
.erpds-customer-body--full {
  grid-template-columns: 1fr;
}
.erpds-customer-left {
  display: flex;
  flex-direction: column;
  gap: var(--erpds-grid-gap, 14px);
  min-width: 0;
}
.erpds-customer-right {
  display: flex;
  flex-direction: column;
  gap: var(--erpds-grid-gap, 14px);
  min-width: 0;
  position: sticky;
  /* nav-h (40px sticky-bar transform-top) + ~60px высота bar + 12px воздух */
  top: calc(var(--erpds-nav-h, 40px) + 72px);
  /* V-001: defensive против будущей смены align-items на родителе */
  align-self: start;
}

/* === Cards === */
.erpds-card {
  background: var(--erpds-surface, #fff);
  border: 1px solid var(--erpds-border, #e0e0e0);
  border-radius: var(--erpds-radius, 8px);
  padding: 12px;
  box-shadow: var(--erpds-shadow-sm, 0 1px 2px rgba(15,23,42,0.04));
  transition: box-shadow 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.erpds-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10);
  border-color: var(--erpds-border-strong, #C4CAD4);
}
/* Карточки-ссылки (если на корень повешен <a> или [role=link]) — приподнимаем */
a.erpds-card:hover,
.erpds-card[role="button"]:hover,
.erpds-card.is-clickable:hover {
  transform: translateY(-1px);
  cursor: pointer;
}
/* Пустая карточка (нет данных) — визуально легче, без display:none/скрытия содержимого */
.erpds-card--empty {
  padding: 8px 12px;
  box-shadow: none;
}
.erpds-card--empty .erpds-card-header {
  opacity: .55;
  font-size: 12px;
}
.erpds-card--empty .erpds-card-header i {
  opacity: .5;
}
.erpds-card:focus-visible,
.erpds-card a:focus-visible,
.erpds-card button:focus-visible {
  outline: 2px solid var(--erpds-accent, #3B5BDB);
  outline-offset: 2px;
  border-radius: var(--erpds-radius-xs, 4px);
}
@media (prefers-reduced-motion: reduce) {
  .erpds-card,
  a.erpds-card:hover,
  .erpds-card[role="button"]:hover,
  .erpds-card.is-clickable:hover,
  .erpds-card__row {
    transition: none;
    transform: none;
  }
  .erpds-hero-btn--overdue,
  .erpds-sp-overlay,
  .erpds-sp-dialog {
    animation: none;
  }
}
.erpds-ipmac-card,
.erpds-address-card,
.erpds-equip-card,
.erpds-feed-card,
.erpds-links-card {
  padding: 0 !important;
}
.erpds-feed-items {
  max-height: 220px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.erpds-equip-card {
  overflow: hidden;
  container-type: inline-size;
}
.erpds-card__title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--erpds-text-faint, #6B7280);
  margin: 0 0 12px;
}
.erpds-card__row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 8px;
  margin: 0 -8px;
  border-bottom: 1px solid var(--erpds-border, #e0e0e0);
  border-radius: var(--erpds-radius-xs, 4px);
  font-size: 13.5px;
  transition: background-color 0.12s ease;
}
.erpds-card__row:hover {
  background-color: var(--erpds-surface-2, #F6F7F9);
}
.erpds-card__row:last-child {
  border-bottom: none;
}
.erpds-card__label {
  flex: 0 0 110px;
  min-width: 0;
  color: var(--erpds-text-faint, #6B7280);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.erpds-card__value {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--erpds-text, #111827);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.erpds-contacts-card .erpds-card__label {
  flex: 0 0 124px;
  overflow-wrap: normal;
  word-break: normal;
}

@media (max-width: 900px) {
  .erpds-customer-hero {
    gap: 12px;
  }
  .erpds-customer-hero-top {
    flex-direction: column;
  }
  .erpds-hero-actions {
    max-width: 100%;
    justify-content: flex-start;
  }
  .erpds-hero-bottom-row {
    align-items: flex-start;
    flex-direction: column;
  }
  .erpds-hero-billing-row {
    width: 100%;
    margin-left: 0;
    text-align: left;
  }
  .erpds-customer-body {
    grid-template-columns: minmax(0, 1fr);
  }
  .erpds-customer-right {
    position: static;
  }
  .erpds-sticky-bar {
    flex-wrap: wrap;
  }
  .erpds-sticky-bar__info,
  .erpds-sticky-bar__actions {
    flex: 1 1 auto;
  }
  .erpds-sticky-bar__tiles {
    flex-basis: 100%;
    order: 3;
  }
  .erpds-equip-body {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  .erpds-card__row {
    display: block;
  }
  .erpds-card__label {
    display: block;
    margin-bottom: 2px;
  }
  .erpds-card__value {
    display: block;
  }
  .erpds-feed-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
  }
  .erpds-feed-date {
    grid-column: 1 / -1;
    width: auto;
  }
  .erpds-links-item {
    flex-wrap: wrap;
  }
  .erpds-links-badge,
  .erpds-links-until {
    margin-left: 0;
  }
}

/* === CombinedRxBar (ONU signal) === */
.combined-rx-bar { display: flex; flex-direction: column; gap: 0; }
.erpds-rx-bar-title {
  font-size: 11px;
  color: var(--erpds-text-muted, #888);
  margin-bottom: 8px;
}
.erpds-rx-bar-outer {
  position: relative;
  /* extra top padding for floating marker labels */
  padding-top: 16px;
}
.erpds-rx-bar-track2 {
  position: relative;
  height: 14px;
  border-radius: var(--erpds-radius-xs);
  overflow: hidden;       /* clips zone segments */
  display: flex;
  border: 1px solid var(--erpds-border, #e0e0e0);
}
.erpds-rx-bar-track2 > div {
  flex-shrink: 0;
}
/* markers are appended to track but need to escape clip — use outline trick */
.erpds-rx-marker {
  position: absolute;
  top: 16px;          /* aligns with track start (after 16px padding) */
  width: 2px;
  height: 14px;
  transform: translateX(-50%);
  z-index: 10;
  border-radius: 1px;
}
.erpds-rx-marker-tip {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 5px;
  color: var(--erpds-text-on-accent, #fff);
  border-radius: 3px;
  white-space: nowrap;
  font-family: var(--erpds-mono, monospace);
  pointer-events: none;
}
.erpds-rx-bar-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 9.5px;
  color: var(--erpds-text-faint, #6B7280);
  font-family: var(--erpds-mono, monospace);
  gap: 4px;
}
.erpds-rx-zone-labels {
  display: grid;
  grid-template-columns: 1fr .45fr 2.45fr 1fr;
  gap: 4px;
  margin-top: 3px;
  color: var(--erpds-text-muted, #525A66);
  font-size: 9.5px;
  line-height: 1.15;
}
.erpds-rx-zone-labels span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* === Event Feed (right column) === */
.erpds-feed {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.erpds-feed-filters {
  display: flex;
  gap: 6px;
  padding: 8px 14px 6px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--erpds-border, #e0e0e0);
}
.erpds-feed-filter {
  padding: 4px 14px;
  border-radius: 20px;
  border: 1px solid var(--erpds-border, #DDE1E8);
  background: var(--erpds-surface, #FFFFFF);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: var(--erpds-text-muted, #525A66);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.erpds-feed-filter:hover {
  background: var(--erpds-accent-soft, #deedf5);
  border-color: var(--erpds-accent-soft-hover, #cce0ed);
  color: var(--erpds-accent-text, #125d88);
}
.erpds-feed-filter.active {
  background: var(--erpds-accent, #1871a5);
  color: var(--erpds-text-on-accent, #fff);
  border-color: var(--erpds-accent, #1871a5);
}
.erpds-feed-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 8px;
  font-size: 12px;
  border-radius: 6px;
  transition: background 0.15s ease;
}
.erpds-feed-item:hover {
  background: var(--erpds-bg-2, #f9fafb);
}
.erpds-feed-item + .erpds-feed-item {
  border-top: 1px solid var(--erpds-border, #e0e0e0);
}
.erpds-feed-date {
  font-family: 'Courier New', monospace;
  font-size: 11.5px;
  color: var(--erpds-text-faint, #6B7280);
  width: 96px;
  flex-shrink: 0;
  line-height: 1.4;
}
.erpds-feed-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--erpds-text-faint, #6B7280);
}
.erpds-feed-dot--payment           { background: var(--erpds-ok, #2e8540); }
.erpds-feed-dot--payment--income   { background: var(--erpds-ok, #2e8540); }
.erpds-feed-dot--payment--expense  { background: var(--erpds-err, #d32f2f); }
.erpds-feed-dot--task              { background: var(--erpds-info, #1976d2); }
.erpds-feed-dot--log               { background: var(--erpds-text-faint, #6B7280); }
.erpds-feed-text {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--erpds-text, #212121);
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.erpds-feed-link {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--erpds-text, #212121);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.erpds-feed-link:hover { text-decoration: underline; }

/* «Загрузить ещё» — класс на самом <button>, не на обёртке (см. CustomerHtml.php) */
.erpds-feed button.erpds-feed-more,
button.erpds-feed-more#feed-load-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 10px 16px 12px;
  min-height: 44px;
  border: none;
  border-top: 1px solid var(--erpds-border, #dde1e8);
  border-radius: 0 0 calc(var(--erpds-radius, 12px) - 1px) calc(var(--erpds-radius, 12px) - 1px);
  background: var(--erpds-surface-2, #f6f7f9);
  color: var(--erpds-text-muted, #525a66);
  font-family: var(--erpds-sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.3;
  cursor: pointer;
  text-align: center;
  transition: var(--erpds-transition, background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease);
}
.erpds-feed button.erpds-feed-more::after,
button.erpds-feed-more#feed-load-more::after {
  content: "";
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  margin-left: 2px;
  background: currentColor;
  opacity: 0.55;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") center / contain no-repeat;
}
.erpds-feed button.erpds-feed-more:hover,
button.erpds-feed-more#feed-load-more:hover {
  background: var(--erpds-bg-2, #f2f4f7);
  color: var(--erpds-text, #0f172a);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}
.erpds-feed button.erpds-feed-more:hover::after,
button.erpds-feed-more#feed-load-more:hover::after {
  opacity: 0.85;
}
.erpds-feed button.erpds-feed-more:active,
button.erpds-feed-more#feed-load-more:active {
  background: var(--erpds-accent-soft, #e5eafb);
  color: var(--erpds-accent-text, #2d4ac7);
}
.erpds-feed button.erpds-feed-more:focus-visible,
button.erpds-feed-more#feed-load-more:focus-visible {
  outline: 2px solid var(--erpds-accent, #3b5bdb);
  outline-offset: -2px;
  z-index: 1;
  position: relative;
}
.erpds-feed button.erpds-feed-more:disabled,
button.erpds-feed-more#feed-load-more:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}
.erpds-feed-empty {
  color: var(--erpds-text-faint, #6B7280);
  font-size: 12px;
  padding: 14px;
  text-align: center;
}
.erpds-feed-error {
  color: var(--erpds-bad, #d32f2f);
  font-size: 12px;
  padding: 14px;
  text-align: center;
}
.erpds-feed-loading {
  color: var(--erpds-text-faint, #6B7280);
  font-size: 12px;
  padding: 14px;
  text-align: center;
}

/* === Mobile === */

/* === Hero: top row (name+meta / actions) === */
.erpds-customer-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.erpds-hero-actions {
  display: flex;
  gap: 8px;
  flex: 0 1 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  align-self: flex-start;
  margin-top: 2px;
  max-width: 45%;
}

.erpds-hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: var(--erpds-radius-sm);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  font-family: var(--erpds-sans, inherit);
  line-height: 1.4;
  white-space: nowrap;
  transition: var(--erpds-transition, all 0.2s ease);
}
.erpds-hero-btn i { font-size: 11px; }
.erpds-hero-btn:focus-visible,
.erpds-tag-add-btn:focus-visible,
.erpds-action-row a:focus-visible {
  outline: 2px solid var(--erpds-accent, #1a73e8);
  outline-offset: 2px;
  border-radius: var(--erpds-radius-sm, 6px);
}

.erpds-hero-btn--ghost {
  background: transparent;
  border-color: var(--erpds-border, #ddd);
  color: var(--erpds-text-muted, #666);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.15s ease, background 0.15s ease;
}
.erpds-hero-btn--ghost:hover {
  background: var(--erpds-surface-alt, #f3f4f6);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.erpds-hero-btn--primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-color: var(--erpds-accent, #1976d2);
  color: var(--erpds-text-on-accent, #fff);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.erpds-hero-btn--primary:hover {
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.5);
  transform: translateY(-1px);
  opacity: 0.95;
}

/* === Tags row === */
/* Метки выровнены вправо — встают под кнопками действий (Звонок/SMS/Задание),
   образуя правый кластер «действия + ярлыки». Раньше шли слева отдельной
   строкой, тонули между плотной мета-линией и hero-плашками + пустота справа. */
.erpds-hero-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}
@media (max-width: 900px) {
  .erpds-hero-bottom-row {
    align-items: flex-start;
  }
}

.erpds-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.erpds-hero-billing-row {
  display: block;
  font-size: 11px;
  line-height: 1.4;
  color: var(--erpds-text-secondary, #6b7280);
  white-space: normal;
  overflow: visible;
  flex: 1 1 240px;
  min-width: 0;
  text-align: right;
  margin-left: auto;
}
/* Правки для ≤900px должны идти ПОСЛЕ базовых правил выше — иначе они молча перебиваются
   (тот же класс бага, что уже нашли на .erpds-hero-bottom-row: align-items). */
@media (max-width: 900px) {
  .erpds-hero-actions {
    justify-content: flex-start;
  }
  .erpds-hero-billing-row {
    text-align: left;
    margin-left: 0;
  }
}

.erpds-hero-info-item {
  display: inline;
}

.erpds-hero-info-lbl {
  color: var(--erpds-text-muted, #9ca3af);
}

.erpds-hero-info-sep {
  color: var(--erpds-text-muted, #9ca3af);
}

.erpds-hero-info-item--comment {
  /* truncation inherited from row */
}

/* Свёрнутые доп.услуги / комментарий биллинга: <details> вместо инлайн-строки —
   экономит место в hero, раскрывается по клику/тапу (не только hover — тач-устройства). */
.erpds-hero-details {
  display: inline-block;
  position: relative;
}
.erpds-hero-details-summary {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  list-style: none;
  padding: 1px 7px;
  border-radius: 10px;
  background: var(--erpds-accent-soft, #eef2ff);
  border: 1px solid var(--erpds-accent-border, #c7d2fe);
  color: var(--erpds-accent-text, #4338ca);
}
.erpds-hero-details-summary:hover {
  background: var(--erpds-accent-soft-hover, #e0e7ff);
}
.erpds-hero-details-summary .erpds-hero-info-lbl {
  color: inherit;
}
.erpds-hero-details-summary::-webkit-details-marker {
  display: none;
}
.erpds-hero-details-summary::after {
  content: '\25BE';
  font-size: 9px;
  opacity: .8;
}
.erpds-hero-details[open] .erpds-hero-details-summary::after {
  content: '\25B4';
}
.erpds-hero-details-count {
  font-weight: 700;
}
.erpds-hero-details-body {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 20;
  margin-top: 4px;
  padding: 8px 10px;
  min-width: 220px;
  max-width: 360px;
  background: var(--erpds-surface, #fff);
  border: 1px solid var(--erpds-border, #e5e7eb);
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .14);
  font-size: 12px;
  line-height: 1.5;
  text-align: left;
  color: var(--erpds-text, #111827);
  white-space: normal;
}
@media (max-width: 900px) {
  .erpds-hero-details-body {
    right: auto;
    left: 0;
  }
}
.erpds-hero-details-row {
  padding: 5px 0;
}
.erpds-hero-details-row + .erpds-hero-details-row {
  border-top: 1px solid var(--erpds-border, #e5e7eb);
}
.erpds-hero-details-row-main {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.erpds-hero-details-row-name {
  font-weight: 600;
  color: var(--erpds-text, #111827);
}
.erpds-hero-details-row-price {
  flex-shrink: 0;
  color: var(--erpds-text-secondary, #6b7280);
  white-space: nowrap;
}
.erpds-hero-details-row-note {
  margin-top: 2px;
  color: var(--erpds-text-muted, #9ca3af);
  font-style: italic;
}

.erpds-tag {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  padding: 2px 10px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  background: var(--erpds-accent-soft, #deedf5);
  color: var(--erpds-accent-text, #155aaa);
  border: 1px solid var(--erpds-accent-soft-hover, #cce0ed);
  overflow-wrap: anywhere;
}

/* Статус-чипы абонента (потерялся, не в биллинге, потенциальный и т.д.) —
   компактные ярлыки в hero вместо полноширинных полос div_info_block. */
.erpds-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  max-width: 100%;
  padding: 2px 10px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  border: 1px solid transparent;
  cursor: default;
  overflow-wrap: anywhere;
}
.erpds-status-chip--warn {
  background: var(--erpds-warn-soft, #fef3c7);
  color: var(--erpds-warn-text, #92400e);
  border-color: var(--erpds-warn, #f59e0b);
}
.erpds-status-chip--bad {
  background: var(--erpds-bad-soft, #fee2e2);
  color: var(--erpds-bad-text, #991b1b);
  border-color: var(--erpds-bad, #ef4444);
}
.erpds-status-chip--info {
  background: var(--erpds-accent-soft, #dbeafe);
  color: var(--erpds-accent-text, #1e40af);
  border-color: var(--erpds-accent, #3b82f6);
}
.erpds-status-chip--neutral {
  background: var(--erpds-bg-3, #f1f5f9);
  color: var(--erpds-text-strong, #334155);
  border-color: var(--erpds-border, #cbd5e1);
}

/* Цветные метки абонента из yellow_info: компактная лента равных чипов. */
.erpds-customer-page #div_yellow_info:has(.erpds-customer-tag-ribbon) {
  gap: 4px;
  margin: 0 0 4px;
}
.erpds-customer-page .erpds-customer-stats:has(+ #div_yellow_info .erpds-customer-tag-ribbon) {
  margin-bottom: 6px;
}
.erpds-customer-page .erpds-customer-tag-ribbon {
  display: flex;
  align-items: center;
  gap: 5px;
  width: 100%;
  margin: 0;
}
.erpds-customer-page .erpds-customer-tag-ribbon .div_info_block {
  flex: 1 1 0;
  min-width: 0;
  max-width: none;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 3px 8px !important;
  border-left-width: 3px !important;
  border-radius: var(--erpds-radius-sm, 8px) !important;
  margin-bottom: 0 !important;
}
.erpds-customer-page #div_yellow_info .erpds-customer-tag-ribbon .div_info_block .caption {
  min-width: 0;
  margin-bottom: 0 !important;
  font-size: 11px !important;
  line-height: 1.15 !important;
  letter-spacing: 0.03em;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 900px) {
  .erpds-customer-page .erpds-customer-tag-ribbon {
    flex-wrap: wrap;
  }
  .erpds-customer-page .erpds-customer-tag-ribbon .div_info_block {
    flex-basis: calc(50% - 3px);
  }
}
@media (max-width: 560px) {
  .erpds-customer-page .erpds-customer-tag-ribbon .div_info_block {
    flex-basis: calc(50% - 3px);
  }
  .erpds-customer-page #div_yellow_info .erpds-customer-tag-ribbon .div_info_block .caption {
    white-space: nowrap;
  }
}

/* Диалог выбора меток: переиспользует .table_block .item от карточной таблицы,
   где .left_data nowrap+min-width — длинные имена тегов не переносились и
   раздували список за пределы окна (h-overflow, обрезка). Раскладка строкой:
   имя слева (с переносом) + чекбокс справа, по ширине окна. */
/* Десктоп — комфортная ширина списка; мобильный — на всю ширину окна
   (inline max-width нельзя переопределить медиа-запросом, поэтому через класс). */
.erpds-tag-picker-wrap { width: 100%; max-width: 340px; }
@media (max-width: 600px) {
  .erpds-tag-picker-wrap { max-width: 100%; }
}
.erpds-tag-picker.table_block { display: block; }
.erpds-tag-picker .item {
  display: flex !important;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.erpds-tag-picker .item > div {
  padding: 9px 12px !important;
}
.erpds-tag-picker .left_data {
  white-space: normal !important;
  text-align: left !important;
  min-width: 0 !important;
  width: auto !important;
  flex: 1 1 auto;
  text-transform: none !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
  color: var(--erpds-text, #1f2937) !important;
}
.erpds-tag-picker .left_data b {
  font-weight: 400 !important;
}
.erpds-tag-picker .item > div:last-child {
  flex: 0 0 auto;
}
.erpds-tag-picker .item:hover {
  background: var(--erpds-bg-2, #f3f4f6);
}

.erpds-meta-sep::before { content: " · "; color: var(--erpds-text-faint, #6B7280); }
.erpds-meta-sep-dot { color: var(--erpds-text-faint, #6B7280); }
.erpds-meta-icon { font-size: 10px; margin-right: 2px; color: var(--erpds-text-faint, #6B7280); }

/* Свёртка договор/дата/биллинг в id-строке hero — показывается JS-ом только при переполнении */
.erpds-meta-toggle {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 6px;
  padding: 1px 7px;
  border: 1px solid var(--erpds-border, #DDE1E8);
  border-radius: 20px;
  background: var(--erpds-surface, #fff);
  color: var(--erpds-link, #2563eb);
  font-size: 10px;
  font-family: inherit;
  line-height: 1.5;
  cursor: pointer;
  vertical-align: middle;
}
.erpds-meta-toggle:hover { background: var(--erpds-bg-2, #f3f4f6); }
.erpds-meta-toggle .fa { font-size: 9px; }

.erpds-tag-add-btn {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border-radius: var(--erpds-radius-pill);
  font-size: 11px;
  color: var(--erpds-text-muted, #888);
  border: 1px dashed var(--erpds-border-strong, #ccc);
  background: transparent;
  text-decoration: none;
  cursor: pointer;
  transition: var(--erpds-transition, all 0.2s ease);
}
.erpds-tag-add-btn:hover { color: var(--erpds-accent, #1a73e8); border-color: var(--erpds-accent, #1a73e8); }

/* === Stat tile sub-line === */
.erpds-stat-tile .sub {
  font-size: 11px;
  color: var(--erpds-text-faint, #6B7280);
  margin-top: 3px;
  line-height: 1.3;
}
/* Под-строка «В биллинге: Да/Нет» в плитке статуса клиента — читаемее обычного sub */
.erpds-stat-tile .sub .erpds-tile-billing {
  font-size: 12px;
  font-weight: 600;
}
.erpds-stat-tile .sub .erpds-tile-billing--yes { color: var(--erpds-ok-text, #166534); }
.erpds-stat-tile .sub .erpds-tile-billing--no  { color: var(--erpds-bad-text, #991b1b); }

/* Плитка «Статус»: клиент/услуга разошлись — построчный разбор вместо одного числа */
.erpds-stat-tile .value .erpds-status-rows {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: -2px;
}
.erpds-status-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 13px;
  font-weight: 400;
}
.erpds-status-row-lbl {
  color: var(--erpds-text-faint, #6B7280);
  font-size: 11px;
}
.erpds-status-row-val {
  font-weight: 700;
}
.erpds-status-row-val--ok   { color: var(--erpds-ok-text, #166534); }
.erpds-status-row-val--warn { color: var(--erpds-warn-text, #92400e); }
.erpds-status-row-val--bad  { color: var(--erpds-bad-text, #991b1b); }

/* === Card title row === */
.erpds-card__title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  margin-bottom: 8px;
}
.erpds-card__title-row .erpds-card__title,
.erpds-card-header strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* === Notes card === */
.erpds-notes-card {
  padding: 14px;
}
.erpds-notes-text {
  font-size: 13px;
  line-height: 1.55;
  color: var(--erpds-text, #1f2937);
  padding: 10px 14px;
  overflow-wrap: anywhere;
}
.erpds-notes-empty {
  font-size: 12.5px;
  color: var(--erpds-text-muted, #777);
  padding: 10px 12px;
  background: var(--erpds-bg-2, #f5f5f5);
  border-radius: 6px;
  font-style: italic;
}

/* === Связи card === */
.erpds-links-card {
  padding: 0;
}
.erpds-links-card .erpds-card__title-row {
  padding: 12px 14px;
  border-bottom: 1px solid var(--erpds-border, #eee);
  margin-bottom: 0;
}
.erpds-links-section {
  padding: 10px 14px;
  border-bottom: 1px solid var(--erpds-border, #eee);
  min-width: 0;
}
.erpds-links-section:last-child {
  border-bottom: none;
}
.erpds-links-label {
  font-size: 11px;
  color: var(--erpds-text-muted, #888);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.erpds-links-empty {
  font-size: 12px;
  color: var(--erpds-text-faint, #6B7280);
  padding: 2px 0;
}
.erpds-links-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  max-width: 100%;
  padding: 4px 8px;
  margin-top: 6px;
  border: 1px solid var(--erpds-border-light, #EEF1F5);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-surface, #fff);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--erpds-accent-text, #1976d2);
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: var(--erpds-transition, all 0.2s ease);
}
.erpds-links-action:hover {
  background: var(--erpds-accent-soft, #deedf5);
  border-color: var(--erpds-accent-soft-hover, #cce0ed);
  color: var(--erpds-accent, #155aaa);
  text-decoration: none;
}


/* ── Wide stat tile (Оптический сигнал) — равномерное распределение 1fr ── */
.erpds-customer-stats--onu {
  grid-template-columns: repeat(4, 1fr);
}
.erpds-stat-tile--wide {
  background: var(--erpds-surface, #fff);
}

/* ── Equipment card ── */
.erpds-equip-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--erpds-border, #eee);
  font-size: 13px;
  overflow-wrap: anywhere;
}
.erpds-equip-header-title {
  flex: 1 1 180px;
  min-width: 0;
}
.erpds-equip-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--erpds-ok, #22c55e);
  box-shadow: 0 0 0 0 rgba(34, 197, 94, .6);
  animation: erpds-live-pulse 1.8s ease-out infinite;
  flex: 0 0 auto;
}
@keyframes erpds-live-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(34, 197, 94, .55); }
  70%  { box-shadow: 0 0 0 5px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}
.erpds-equip-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  flex: 0 0 auto;
}
.erpds-equip-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  padding: 10px 12px;
}
.erpds-equip-body > * {
  min-width: 0;
}
.erpds-equip-section-label {
  font-size: 10.5px;
  color: var(--erpds-text-muted, #888);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}
.erpds-inv-card-link {
  font-size: 15px;
  font-weight: 600;
  color: var(--erpds-link, #3b82f6);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.erpds-inv-card-link:hover {
  text-decoration: underline;
}
.erpds-equip-model {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 10px;
  overflow-wrap: anywhere;
}
.erpds-equip-device-body {
  padding: 11px 12px 12px;
}
.erpds-equip-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.erpds-equip-device-title {
  color: var(--erpds-text, #111827);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.erpds-equip-device-kind {
  flex: 0 0 auto;
  padding: 3px 7px;
  border: 1px solid var(--erpds-border, #e5e7eb);
  border-radius: var(--erpds-radius-xs, 4px);
  color: var(--erpds-text-muted, #667085);
  background: var(--erpds-bg-2, #f7f8fa);
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.erpds-equip-main {
  min-width: 0;
}
.erpds-equip-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 6px;
  margin: 0 0 8px;
}
.erpds-equip-fact {
  min-width: 0;
  padding: 8px 10px;
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-bg-2, #f7f8fa);
}
.erpds-equip-fact span {
  display: block;
  margin-bottom: 2px;
  color: var(--erpds-text-muted, #667085);
  font-size: 10px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.erpds-equip-fact strong {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  color: var(--erpds-text, #0F172A);
  font-size: 12.5px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.erpds-equip-fact--ip {
  background: var(--erpds-accent-soft, #deedf5);
}
.erpds-equip-fact--serial,
.erpds-equip-fact--mac {
  background: var(--erpds-surface-2, #f8fafc);
}
.erpds-equip-fact--empty {
  grid-column: 1 / -1;
  color: var(--erpds-text-muted, #667085);
}
.erpds-equip-location {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  color: var(--erpds-text-muted, #667085);
  font-size: 11.5px;
  line-height: 1.35;
}
.erpds-equip-location i {
  margin-top: 1px;
  color: var(--erpds-text-faint, #9ca3af);
  flex: 0 0 auto;
}
.erpds-equip-location span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.erpds-equip-grid {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 10px;
  font-size: 12px;
}
.erpds-equip-lbl {
  color: var(--erpds-text-muted, #888);
  white-space: nowrap;
}
.erpds-equip-grid .mono {
  border: none;
  background: none;
  padding: 0;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  color: var(--erpds-text, #1f2937);
  display: inline;
  width: auto;
  overflow-wrap: anywhere;
}
.erpds-equip-val {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}
.erpds-copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  padding: 2px;
  margin-left: 2px;
  border-radius: var(--erpds-radius-xs, 4px);
  cursor: pointer;
  color: var(--erpds-text-faint, #9ca3af);
  font-size: 11px;
  line-height: 1;
  transition: color 0.15s, transform 0.15s;
  flex-shrink: 0;
}
.erpds-copy-btn:hover {
  color: var(--erpds-primary, #1d6fa8);
  background: var(--erpds-accent-soft, #deedf5);
}
.erpds-copy-btn:focus-visible,
.erpds-phone-sms:focus-visible {
  outline: 2px solid var(--erpds-accent, #1a73e8);
  outline-offset: 2px;
}
.erpds-copy-btn.erpds-copied {
  color: var(--erpds-ok, #2E8540);
  transform: scale(1.2);
}
.erpds-phone-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-left: 4px;
  border-radius: var(--erpds-radius-xs, 4px);
  color: var(--erpds-text-faint, #9ca3af);
  font-size: 11px;
  line-height: 1;
  vertical-align: middle;
}
.erpds-phone-delete:hover {
  color: var(--erpds-danger, #c0392b);
  background: rgba(192, 57, 43, 0.08);
}
.erpds-phone-delete:focus-visible {
  outline: 2px solid var(--erpds-danger, #c0392b);
  outline-offset: 2px;
}
.erpds-equip-install-date {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: default;
}
.erpds-equip-install-icon {
  color: var(--erpds-text-faint, #9ca3af);
  font-size: 11px;
}
.erpds-equip-olt {
  min-width: 0;
  padding-left: 14px;
  border-left: 1px solid var(--erpds-border, #e5e7eb);
}
.erpds-equip-olt-name {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--erpds-accent-text, #1976d2);
  margin-bottom: 8px;
  transition: var(--erpds-transition, all 0.2s ease);
  overflow-wrap: anywhere;
}
.erpds-equip-olt-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 8px;
  max-width: 320px;
}
.erpds-equip-olt-fact {
  flex: 1 1 112px;
  min-width: 0;
  padding: 8px 10px;
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-bg-2, #f7f8fa);
}
.erpds-equip-olt-fact span {
  display: block;
  margin-bottom: 2px;
  color: var(--erpds-text-muted, #667085);
  font-size: 10px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.erpds-equip-olt-fact strong {
  display: block;
  min-width: 0;
  color: var(--erpds-text, #0F172A);
  font-size: 12.5px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.erpds-equip-olt-ip {
  background: var(--erpds-accent-soft, #deedf5);
}
.erpds-equip-olt-ip .mono {
  font-size: 13px;
}
.erpds-equip-olt-location {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 11.5px;
  line-height: 1.35;
  color: var(--erpds-text-muted, #888);
  max-width: 360px;
}
.erpds-equip-olt-location i {
  margin-top: 1px;
  color: var(--erpds-text-faint, #9ca3af);
  flex: 0 0 auto;
}
.erpds-equip-olt-location span {
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 900px) {
  .erpds-equip-olt {
    padding: 10px 0 0;
    border-left: 0;
    border-top: 1px solid var(--erpds-border, #e5e7eb);
  }
}

@media (max-width: 720px) {
  .erpds-equip-header-title {
    flex-basis: 100%;
  }
  .erpds-equip-olt-facts,
  .erpds-equip-olt-location {
    max-width: none;
  }
}

@media (max-width: 340px) {
  .erpds-equip-olt-facts {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Optical link section */
.erpds-equip-optical {
  border-top: 1px solid var(--erpds-border, #eee);
  background: var(--erpds-bg-2, #f7f8fa);
  padding: 10px 12px;
  container-type: inline-size;
}
.erpds-equip-optical-header {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}
.erpds-equip-optical-time { font-size: 11.5px; color: var(--erpds-text-muted, #888); margin-left: 8px; }
.erpds-optical-badge {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1;
  padding: 2px 7px;
  border-radius: 20px;
  margin-left: 6px;
  letter-spacing: 0.02em;
}
.erpds-optical-badge--ok   { background: rgba(46,133,64,.12); color: var(--erpds-ok, #2E8540); }
.erpds-optical-badge--warn { background: rgba(240,165,0,.12); color: var(--erpds-warn, #F0A500); }
.erpds-optical-badge--err  { background: rgba(192,57,43,.12); color: var(--erpds-bad, #C0392B); }
.erpds-optical-badge--muted{ background: var(--erpds-bg-2, #f0f0f0); color: var(--erpds-text-muted, #888); }
.erpds-optical-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin: -4px 0 12px;
  padding: 7px 9px;
  border: 1px solid var(--erpds-border-light, #EEF1F5);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-surface, #fff);
}
.erpds-optical-summary__title {
  color: var(--erpds-text, #111827);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.15;
}
.erpds-optical-summary__details {
  color: var(--erpds-text-muted, #525A66);
  font-size: 11.5px;
  line-height: 1.2;
}
.erpds-optical-summary--ok {
  border-left: 4px solid var(--erpds-ok, #2E8540);
}
.erpds-optical-summary--warn {
  border-left: 4px solid var(--erpds-warn, #F0A500);
}
.erpds-optical-summary--err {
  border-left: 4px solid var(--erpds-bad, #C0392B);
}
.erpds-optical-summary--muted {
  border-left: 4px solid var(--erpds-border-strong, #c4cad4);
}
.erpds-optical-trend {
  margin-left: auto;
  color: var(--erpds-accent-text, #155aaa);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
}
.erpds-optical-trend--muted {
  color: var(--erpds-text-muted, #525A66);
}
.erpds-equip-subaccount {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  padding: 3px 9px;
  border-radius: 5px;
  margin-left: 8px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: var(--erpds-warn-soft, #FBEDD9);
  color: var(--erpds-warn-text, #8A4A0A);
  border: 1px solid var(--erpds-warn-border, #EAC99D);
  white-space: nowrap;
}
.erpds-equip-subaccount i {
  font-size: 10px;
  opacity: 0.85;
}
.erpds-equip-card--inv .erpds-equip-header {
  border-bottom: 1px solid var(--erpds-border, #eee);
}
.erpds-equip-inv-list {
  display: flex;
  flex-direction: column;
  padding: 6px 8px;
  gap: 6px;
}
.erpds-equip-inv-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto auto;
  align-items: center;
  gap: 8px 10px;
  padding: 8px 9px;
  border: 1px solid var(--erpds-border, #e5e7eb);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-surface, #fff);
  color: var(--erpds-text, #1a1a1a);
  transition: background-color .12s ease, border-color .12s ease;
}
.erpds-equip-inv-row + .erpds-equip-inv-row {
  border-top: 1px solid var(--erpds-border, #e5e7eb);
}
.erpds-equip-inv-row:hover {
  background: var(--erpds-accent-soft, #deedf5);
  border-color: var(--erpds-accent-soft-hover, #cce0ed);
  text-decoration: none;
}
.erpds-equip-inv-main {
  display: grid;
  min-width: 0;
  gap: 2px;
  color: inherit;
  text-decoration: none;
}
.erpds-equip-inv-main:hover .erpds-equip-inv-name {
  color: var(--erpds-accent-text, #1976d2);
  text-decoration: underline;
}
.erpds-equip-inv-name {
  font-weight: 600;
  font-size: 13px;
  line-height: 1.25;
  min-width: 0;
  overflow-wrap: anywhere;
}
.erpds-equip-inv-facts {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}
.erpds-equip-inv-fact {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 5px 8px;
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-surface-2, #f8fafc);
}
.erpds-equip-inv-fact span {
  color: var(--erpds-text-muted, #667085);
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.erpds-equip-inv-fact strong {
  color: var(--erpds-text, #0F172A);
  font-size: 12px;
  line-height: 1.15;
  white-space: nowrap;
}
.erpds-equip-inv-fact .mono {
  font-family: 'Courier New', monospace;
}
.erpds-equip-inv-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: var(--erpds-radius-xs, 4px);
  color: var(--erpds-accent-text, #1976d2);
  background: var(--erpds-accent-soft, #deedf5);
  font-size: 11px;
}
@media (max-width: 900px) {
  .erpds-equip-inv-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .erpds-equip-inv-row .erpds-equip-subaccount,
  .erpds-equip-inv-facts {
    grid-column: 1 / -1;
    justify-self: start;
  }
  .erpds-equip-inv-open {
    grid-column: 2;
    grid-row: 1;
  }
  .erpds-equip-inv-row .erpds-equipment-move {
    grid-column: 1 / -1;
    justify-self: start;
  }
}
.erpds-equip-optical-header strong {
  font-size: 12px;
}
.erpds-equip-cable-lines i {
  font-size: 11px;
  color: var(--erpds-ok, #2E8540);
}
.erpds-equip-history-link {
  margin-left: auto;
  font-size: 11.5px;
  color: var(--erpds-accent-text, #1976d2);
  text-decoration: none;
  transition: var(--erpds-transition, all 0.2s ease);
}
.erpds-equip-history-link:hover { text-decoration: underline; }
.erpds-equip-endpoints {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px minmax(0, 1fr);
  align-items: stretch;
  gap: 12px;
  padding: 10px 12px 0;
}
.erpds-endpoint {
  padding: 11px 12px 10px;
  min-height: 128px;
  box-sizing: border-box;
  background: var(--erpds-surface, #fff);
  border: 1px solid var(--erpds-border, #e0e0e0);
  border-left: 4px solid transparent;
  border-radius: var(--erpds-radius-sm);
  transition: var(--erpds-transition, all 0.2s ease);
}
.erpds-endpoint--ok {
  border-left-color: var(--erpds-ok, #2E8540);
}
.erpds-endpoint--warn {
  border-left-color: var(--erpds-warn, #F0A500);
}
.erpds-endpoint--err {
  border-left-color: var(--erpds-bad, #C0392B);
}
.erpds-endpoint--muted {
  border-left-color: var(--erpds-border-strong, #c4cad4);
}
.erpds-endpoint:hover {
  border-color: var(--erpds-border-strong, #c4cad4);
  box-shadow: var(--erpds-shadow-sm, 0 1px 2px rgba(15, 23, 42, 0.04));
}
.erpds-endpoint--ok:hover {
  border-left-color: var(--erpds-ok, #2E8540);
}
.erpds-endpoint--warn:hover {
  border-left-color: var(--erpds-warn, #F0A500);
}
.erpds-endpoint--err:hover {
  border-left-color: var(--erpds-bad, #C0392B);
}
.erpds-endpoint--muted:hover {
  border-left-color: var(--erpds-border-strong, #c4cad4);
}
.erpds-endpoint__body {
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-items: stretch;
  gap: 7px;
  height: 100%;
}
.erpds-endpoint__meta {
  min-width: 0;
}
.erpds-endpoint__identity {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding: 4px 7px;
  border-radius: 6px;
  background: var(--erpds-bg-2, #F4F6FA);
}
.erpds-endpoint--ok .erpds-endpoint__identity {
  background: rgba(46, 133, 64, 0.10);
}
.erpds-endpoint--warn .erpds-endpoint__identity {
  background: rgba(240, 165, 0, 0.12);
}
.erpds-endpoint--err .erpds-endpoint__identity {
  background: rgba(192, 57, 43, 0.10);
}
.erpds-endpoint__kind {
  color: var(--erpds-text, #111827);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.erpds-endpoint__title {
  font-size: 10.5px;
  color: var(--erpds-text-muted, #888);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0;
}
.erpds-endpoint__role {
  color: var(--erpds-text-faint, #6B7280);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}
.erpds-endpoint__side {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}
.erpds-endpoint__state {
  display: inline-flex;
  align-items: center;
  min-height: 16px;
  padding: 1px 5px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}
.erpds-endpoint__state--ok {
  background: rgba(46, 133, 64, 0.12);
  color: var(--erpds-ok, #2E8540);
}
.erpds-endpoint__state--warn {
  background: rgba(240, 165, 0, 0.14);
  color: var(--erpds-warn, #F0A500);
}
.erpds-endpoint__state--err {
  background: rgba(192, 57, 43, 0.12);
  color: var(--erpds-bad, #C0392B);
}
.erpds-endpoint__state--muted {
  background: var(--erpds-bg-2, #F4F6FA);
  color: var(--erpds-text-muted, #525A66);
}
.erpds-endpoint__rx-row {
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.erpds-endpoint__rx-row--right { justify-content: flex-end; }
.erpds-endpoint__rx-lbl {
  font-size: 11.5px;
  color: var(--erpds-text-muted, #888);
}
.erpds-endpoint__rx {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--erpds-text, #212121);
}
.erpds-endpoint__rx.erpds-tone-ok   { color: var(--erpds-ok, #2E8540); }
.erpds-endpoint__rx.erpds-tone-warn { color: var(--erpds-warn, #F0A500); }
.erpds-endpoint__rx.erpds-tone-err  { color: var(--erpds-bad, #C0392B); }
.erpds-endpoint__rx.erpds-tone-muted { color: var(--erpds-text-muted, #888); }
.erpds-endpoint__rx-unit {
  font-size: 10.5px;
  color: var(--erpds-text-faint, #6B7280);
}
.erpds-endpoint__signal {
  display: grid;
  grid-template-columns: auto auto;
  align-content: center;
  justify-content: center;
  column-gap: 5px;
  min-width: 0;
  text-align: center;
}
.erpds-endpoint__metric-label {
  grid-column: 1 / -1;
  font-size: 10.5px;
  color: var(--erpds-text-muted, #888);
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.erpds-endpoint__metric-value {
  font-size: 44px;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
}
.erpds-endpoint__metric-unit {
  font-size: 10.5px;
  color: var(--erpds-text-faint, #6B7280);
  align-self: end;
  padding-bottom: 3px;
}
.erpds-endpoint__subline {
  min-height: 15px;
}
.erpds-endpoint__tx-row {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  margin-top: 0;
  font-size: 11px;
  color: var(--erpds-text-faint, #6B7280);
  font-family: var(--erpds-mono, monospace);
}
.erpds-equip-cable {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 128px;
  color: var(--erpds-text-muted, #525A66);
}
.erpds-equip-cable-lines {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
}
.erpds-equip-cable-seg {
  display: block;
  flex: 1 1 auto;
  min-width: 22px;
  height: 2px;
  background: var(--erpds-ok, #2E8540);
  border-radius: 1px;
}
.erpds-equip-cable-lines i {
  color: var(--erpds-ok, #2E8540);
  font-size: 12px;
}
.erpds-equip-cable--warn .erpds-equip-cable-seg {
  background: var(--erpds-warn, #F0A500);
}
.erpds-equip-cable--warn .erpds-equip-cable-lines i {
  color: var(--erpds-warn, #F0A500);
}
.erpds-equip-cable--err .erpds-equip-cable-seg {
  background: var(--erpds-bad, #C0392B);
}
.erpds-equip-cable--err .erpds-equip-cable-lines i {
  color: var(--erpds-bad, #C0392B);
}
.erpds-equip-cable--muted .erpds-equip-cable-seg {
  background: var(--erpds-border-strong, #c4cad4);
}
.erpds-equip-cable--muted .erpds-equip-cable-lines i {
  color: var(--erpds-text-muted, #525A66);
}
.erpds-equip-cable__distance {
  color: var(--erpds-text, #1f2937);
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}
.erpds-equip-cable-label {
  font-size: 10px;
  color: var(--erpds-text-muted, #888);
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
@container (max-width: 520px) {
  .erpds-equip-endpoints {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .erpds-equip-cable {
    min-height: 44px;
    padding: 0;
  }
  .erpds-equip-cable-lines {
    width: 132px;
  }
}

/* === Действия accordion === */
.erpds-actions-card { padding: 0; }
.erpds-actions-summary {
  padding: 8px 12px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--erpds-text, #1a1a1a);
  border-bottom: 1px solid transparent;
  transition: var(--erpds-transition, all 0.2s ease);
}
.erpds-actions-card[open] .erpds-actions-summary {
  border-bottom-color: var(--erpds-border, #e0e0e0);
}
.erpds-actions-summary::-webkit-details-marker { display: none; }
.erpds-actions-icon { color: var(--erpds-text-muted, #888); font-size: 11px; }
.erpds-actions-chevron { margin-left: auto; color: var(--erpds-text-faint, #6B7280); font-weight: 400; font-size: 11px; }
.erpds-actions-list {
  padding: 6px 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.erpds-action-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  padding: 7px 8px;
  border-radius: var(--erpds-radius-sm, 6px);
  font-size: 12.5px;
  color: var(--erpds-accent-text, #1a6fc4);
  text-decoration: none;
  border-bottom: none;
  line-height: 1.35;
  overflow-wrap: anywhere;
  transition: background 0.15s ease, color 0.15s ease;
}
.erpds-action-row:last-child { border-bottom: none; }
.erpds-action-row:hover {
  color: var(--erpds-accent, #155aaa);
  background: var(--erpds-accent-soft, #deedf5);
  text-decoration: none;
}
.erpds-action-row i {
  flex: 0 0 14px;
  margin-top: 2px;
  color: var(--erpds-text-muted, #666);
  text-align: center;
}
.erpds-action-row--danger { color: var(--erpds-bad, #c0392b); }
.erpds-action-row--danger:hover {
  color: var(--erpds-bad-dark, #a93226);
  background: var(--erpds-bad-soft, #fee2e2);
}

/* === Опасные действия footer === */
.erpds-danger-footer {
  padding: 16px var(--erpds-grid-padding-x) var(--erpds-grid-padding-x);
  margin-top: 8px;
  border-top: 1px dashed var(--erpds-border-strong, #ccc);
}
.erpds-danger-details summary { list-style: none; }
.erpds-danger-details summary::-webkit-details-marker { display: none; }
.erpds-danger-summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  color: var(--erpds-text-muted, #888);
  border: 1px solid var(--erpds-border, #e0e0e0);
  border-radius: var(--erpds-radius-sm);
  background: var(--erpds-surface, #fff);
  transition: var(--erpds-transition, all 0.2s ease);
}
.erpds-danger-summary:hover { border-color: var(--erpds-bad, #c0392b); color: var(--erpds-bad, #c0392b); }
.erpds-danger-icon { font-size: 11px; }
.erpds-danger-panel {
  margin-top: 12px;
  padding: 10px 12px;
  background: var(--erpds-surface, #fff);
  border: 1px solid var(--erpds-bad-border-soft, #F5DDD9);
  border-radius: var(--erpds-radius);
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Legacy actions panel — стилизуем как fallback-блок, не скрываем (там критичные действия) */
.erpds-legacy-actions-panel {
  padding: 12px var(--erpds-grid-padding-x) 16px;
  margin-top: 8px;
  border-top: 1px dashed var(--erpds-border-strong, #c8c8c8);
}
.erpds-legacy-actions-panel .div_space {
  padding: 4px 0;
  font-size: 12.5px;
}

/* Скрыть только конкретные дублирующие ссылки «Создать задание» / «Регистрация звонка» — заменены hero-кнопками */
.erpds-customer-page .div_space:has(a[href*="temp_load_task_create"]),
.erpds-customer-page .div_space:has(a[href*="temp_load_callregistr"]) { display: none; }

/* Скрыть из legacy-панели элементы, перенесённые в аккордеон «Действия» или карточку «Связи» */
.erpds-legacy-actions-panel .div_space:has(#linkToPrivateId),
.erpds-legacy-actions-panel .div_space:has(#linkToCorporateId),
.erpds-legacy-actions-panel .div_space:has(#linkToNormalCustomerId),
.erpds-legacy-actions-panel .div_space:has(#linkToExCustomerId),
.erpds-legacy-actions-panel .div_space:has(#linkMergeId),
.erpds-legacy-actions-panel .div_space:has(#linkAddToParentId),
.erpds-legacy-actions-panel .div_space:has(#linkConfirmIndependentId),
.erpds-legacy-actions-panel .div_space:has(a.add[href*="dialog_add"]) { display: none; }

/* «Опасные действия» — details-обёртка в legacy-панели */
.erpds-dangerous-details { margin: 0; }
.erpds-dangerous-summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  color: var(--erpds-text-muted, #666);
  border: 1px solid var(--erpds-border, #e0e0e0);
  border-radius: var(--erpds-radius-sm);
  background: var(--erpds-bg, #fff);
  transition: var(--erpds-transition, all 0.2s ease);
}
.erpds-dangerous-summary::-webkit-details-marker { display: none; }
.erpds-dangerous-summary i { color: var(--erpds-bad, #c0392b); font-size: 11px; }
.erpds-dangerous-caret { margin-left: 4px; font-weight: 400; color: var(--erpds-text-faint, #6B7280); transition: transform 0.2s ease; display: inline-block; }
.erpds-dangerous-details[open] .erpds-dangerous-caret { transform: rotate(180deg); }
.erpds-dangerous-body {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding: 10px;
  background: var(--erpds-bg, #fff);
  border: 1px solid var(--erpds-bad-border-soft, #f0d8d5);
  border-radius: var(--erpds-radius-sm);
  max-width: 680px;
}
.erpds-dangerous-body > br {
  display: none;
}

.erpds-dangerous-body .div_space {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
  box-sizing: border-box;
  padding: 7px 9px;
  border: 1px solid var(--erpds-border-light, #EEF1F5);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-bg-2, #F4F6FA);
  color: var(--erpds-text, #111827);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.erpds-dangerous-body .div_space a,
.erpds-dangerous-body .div_space button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  color: var(--erpds-accent-text, #155aaa) !important;
  font: inherit;
  font-weight: 800;
  line-height: 1.35;
  text-align: left;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.erpds-dangerous-body .div_space a > span,
.erpds-dangerous-body .div_space button > span {
  border-bottom: 0;
}

.erpds-dangerous-body .div_space a:hover,
.erpds-dangerous-body .div_space button:hover,
.erpds-dangerous-body .div_space a:focus-visible,
.erpds-dangerous-body .div_space button:focus-visible {
  color: var(--erpds-accent, #155aaa) !important;
  text-decoration: none;
}

.erpds-dangerous-body .info_block {
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 8px 10px !important;
  border: 1px solid var(--erpds-warning-border, #f5d0a9);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-warning-soft, #fff7ed);
  color: var(--erpds-warning-text, #8a4b0f);
  font-size: 12.5px;
  font-weight: 750;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.erpds-dangerous-body span[id^="formConfirmText"] {
  display: none !important;
}

/* Аккордеон «Действия» в правой колонке */
.erpds-actions-card { padding: 0; }
.erpds-actions-card summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  cursor: pointer;
  list-style: none;
  border-bottom: 1px solid var(--erpds-border, #e0e0e0);
  font-size: 13px;
  transition: var(--erpds-transition, all 0.2s ease);
}
.erpds-actions-card summary::-webkit-details-marker { display: none; }
.erpds-actions-card[open] summary { border-bottom: 1px solid var(--erpds-border, #e0e0e0); }
.erpds-actions-list {
  padding: 6px 8px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.erpds-action-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  padding: 6px 8px;
  border-radius: var(--erpds-radius-sm, 6px);
  font-size: 12.5px;
  color: var(--erpds-text, #222);
  border-bottom: none;
  line-height: 1.35;
  overflow-wrap: anywhere;
  transition: background 0.15s ease, color 0.15s ease;
}
.erpds-action-row:last-child { border-bottom: none; }
.erpds-action-row a { color: inherit; text-decoration: none; }
.erpds-action-row a > span { border-bottom: 0; }
.erpds-action-row a:hover { text-decoration: none; }
.erpds-action-row button {
  display: inline;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: inherit;
  font: inherit;
  line-height: inherit;
  text-align: left;
  cursor: pointer;
  overflow-wrap: anywhere;
}
.erpds-action-row form,
.erpds-action-row span[id^="formConfirmText"] {
  display: none !important;
}
.erpds-action-row:hover { background: var(--erpds-accent-soft, #deedf5); color: var(--erpds-accent, #155aaa); }
.erpds-action-row i {
  flex: 0 0 14px;
  margin-top: 1px;
  color: var(--erpds-text-muted, #666);
  text-align: center;
}

/* Пустое состояние карточки */
.erpds-card__empty {
  padding: 14px 16px;
  font-size: 12px;
  color: var(--erpds-text-muted, #666);
  font-style: italic;
  background: var(--erpds-bg-2, #F4F6FA);
  border-radius: var(--erpds-radius-sm);
  margin: 0;
}
.erpds-card__empty,
.erpds-commutation-empty,
.erpds-links-empty,
.erpds-notes-empty {
  color: var(--erpds-text-muted, #6B7280);
  background: var(--erpds-bg-2, #F4F6FA);
  border: 1px solid var(--erpds-border-light, #EEF1F5);
  border-radius: var(--erpds-radius-sm, 6px);
  font-style: normal;
}
.erpds-commutation-empty,
.erpds-links-empty {
  padding: 7px 9px;
}

/* Карточки IP/MAC и Адрес — общий заголовок */
.erpds-card-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--erpds-border, #e0e0e0);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  min-width: 0;
}
.erpds-card-header strong {
  flex: 1 1 auto;
  font-size: 13px;
  font-weight: 600;
}
.erpds-card-header i {
  color: var(--erpds-text-muted, #666);
  font-size: 12px;
}
.erpds-card-badge {
  margin-left: auto;
  flex: 0 0 auto;
  background: var(--erpds-bg-2, #f0f0f0);
  color: var(--erpds-text-muted, #666);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  padding: 2px 7px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}
.erpds-feed-card-header {
  cursor: pointer;
  user-select: none;
}
.erpds-feed-card-header:hover {
  background: var(--erpds-surface-hover, #f5f5f5);
}
.erpds-feed-toggle-icon {
  transition: transform 200ms ease;
  font-size: 11px !important;
  color: var(--erpds-text-muted, #999) !important;
}
.erpds-feed-card-header--open .erpds-feed-toggle-icon {
  transform: rotate(180deg);
}

.erpds-ipmac-body { padding: 12px 16px; }
.erpds-ipmac__ip {
  display: inline-block;
  max-width: 100%;
  font-size: 14px;
  font-weight: 600;
  color: var(--erpds-accent-text, #2A6AE0);
  text-decoration: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  overflow-wrap: anywhere;
  transition: var(--erpds-transition, all 0.2s ease);
}
.erpds-ipmac__ip:hover {
  color: var(--erpds-accent-hover, #2d4ac7);
  text-decoration: underline;
}
.erpds-ipmac__subnets {
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--erpds-text-muted, #666);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.erpds-ipmac__subnet {
  padding: 1px 6px;
  background: var(--erpds-bg-2, #F4F6FA);
  border-radius: var(--erpds-radius-xs);
  overflow-wrap: anywhere;
}
.erpds-ipmac__subnetline {
  font-size: 11.5px;
  color: var(--erpds-text-muted, #666);
  margin-top: 3px;
  overflow-wrap: anywhere;
}
.erpds-ipmac__macs {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.erpds-ipmac__history {
  margin-top: 8px;
}
.erpds-ipmac__mac-act {
  margin-left: 5px;
  color: var(--erpds-text-muted, #9ca3af);
  text-decoration: none;
}
.erpds-ipmac__mac-act:hover {
  color: var(--erpds-link, #2563eb);
}

/* E-mail в карточке контактов */
.erpds-contacts-email {
  margin-top: 6px;
  font-size: 12.5px;
}

/* SMS-ссылка на телефоне */
.erpds-phone-sms {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-left: 8px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--erpds-link, #2563eb);
  background: var(--erpds-bg-2, #F4F6FA);
  text-decoration: none;
  vertical-align: middle;
  transition: background 0.15s ease, color 0.15s ease;
}
.erpds-phone-sms:hover {
  color: var(--erpds-text-on-accent, #fff);
  background: var(--erpds-link, #2563eb);
}

/* Контактные лица в карточке контактов */
.erpds-contacts-persons {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--erpds-border, #DDE1E8);
}
.erpds-contacts-persons__label {
  font-size: 11px;
  color: var(--erpds-text-muted, #9ca3af);
  margin-bottom: 4px;
}

#dialog-box .erpds-customer-phone-dialog {
  width: min(420px, calc(100vw - 28px));
  box-sizing: border-box;
  padding: 0;
}

#dialog-box .erpds-sms-dialog {
  width: min(520px, calc(100vw - 28px));
  box-sizing: border-box;
  padding: 0;
}

#dialog-box .erpds-sms-dialog__header {
  display: grid;
  gap: 2px;
  min-width: 0;
  margin: 0 0 12px;
  padding: 2px 0 10px;
  border-bottom: 1px solid var(--erpds-border-light, #EEF1F5);
}

#dialog-box .erpds-sms-dialog__title {
  color: var(--erpds-text, #111827);
  font-size: 15px;
  font-weight: 850;
  line-height: 1.2;
}

#dialog-box .erpds-sms-dialog__subtitle {
  color: var(--erpds-text-muted, #525A66);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.3;
}

#dialog-box .erpds-customer-note-dialog {
  width: min(560px, calc(100vw - 28px));
  box-sizing: border-box;
  padding: 0;
}

#dialog-box .erpds-customer-ip-dialog {
  width: min(620px, calc(100vw - 28px));
  box-sizing: border-box;
  padding: 0;
}

#dialog-box .erpds-customer-ipnet-dialog {
  width: min(560px, calc(100vw - 28px));
  box-sizing: border-box;
  padding: 0;
}

#dialog-box .erpds-customer-phone-transfer-dialog {
  width: min(460px, calc(100vw - 28px));
  box-sizing: border-box;
  padding: 0;
}

#dialog-box .erpds-customer-task-transfer-dialog {
  width: min(520px, calc(100vw - 28px));
  box-sizing: border-box;
  padding: 0;
}

#dialog-box .erpds-customer-action-dialog {
  width: min(360px, calc(100vw - 28px));
  box-sizing: border-box;
  padding: 0;
}

#dialog-box .erpds-customer-cable-dialog {
  width: min(360px, calc(100vw - 28px));
  box-sizing: border-box;
  padding: 0;
}

#dialog-box .erpds-customer-mac-history-dialog {
  width: min(520px, calc(100vw - 28px));
  box-sizing: border-box;
  padding: 0;
}

#dialog-box .erpds-customer-mac-vendor-dialog {
  width: min(360px, calc(100vw - 28px));
  box-sizing: border-box;
  padding: 0;
}

#dialog-box .erpds-customer-service-dialog {
  width: min(720px, calc(100vw - 28px));
  box-sizing: border-box;
  padding: 0;
}

#dialog-box .erpds-customer-advert-dialog {
  width: min(480px, calc(100vw - 28px));
  box-sizing: border-box;
  padding: 0;
}

#dialog-box .erpds-customer-tag-dialog {
  width: min(620px, calc(100vw - 28px));
  box-sizing: border-box;
  padding: 0;
}

#dialog-box .erpds-customer-tariff-dialog {
  width: min(520px, calc(100vw - 28px));
  box-sizing: border-box;
  padding: 0;
}

#dialog-box .erpds-customer-tariff-props-dialog {
  width: min(520px, calc(100vw - 28px));
  box-sizing: border-box;
  padding: 0;
}

#dialog-box .erpds-customer-state-dialog {
  width: min(520px, calc(100vw - 28px));
  box-sizing: border-box;
  padding: 0;
}

#dialog-box .erpds-customer-credit-dialog {
  width: min(420px, calc(100vw - 28px));
  box-sizing: border-box;
  padding: 0;
}

#dialog-box .erpds-customer-balance-dialog {
  width: min(560px, calc(100vw - 28px));
  box-sizing: border-box;
  padding: 0;
}

#dialog-box .erpds-customer-password-dialog {
  width: min(420px, calc(100vw - 28px));
  box-sizing: border-box;
  padding: 0;
}

#dialog-box .erpds-customer-merge-dialog {
  width: min(460px, calc(100vw - 28px));
  box-sizing: border-box;
  padding: 0;
}

#dialog-box .erpds-customer-parent-dialog {
  width: min(460px, calc(100vw - 28px));
  box-sizing: border-box;
  padding: 0;
}

#dialog-box .erpds-person-dialog {
  width: min(560px, calc(100vw - 28px));
  box-sizing: border-box;
  padding: 0;
}

#dialog-box .erpds-person-show-dialog {
  width: min(560px, calc(100vw - 28px));
  box-sizing: border-box;
  padding: 0;
}

#dialog-box .erpds-attach-rename-dialog {
  width: min(440px, calc(100vw - 28px));
  box-sizing: border-box;
  padding: 0;
}

#dialog-box .erpds-customer-phone-dialog__header,
#dialog-box .erpds-customer-note-dialog__header,
#dialog-box .erpds-customer-ip-dialog__header,
#dialog-box .erpds-customer-ipnet-dialog__header,
#dialog-box .erpds-customer-phone-transfer-dialog__header,
#dialog-box .erpds-customer-task-transfer-dialog__header,
#dialog-box .erpds-customer-action-dialog__header,
#dialog-box .erpds-customer-cable-dialog__header,
#dialog-box .erpds-customer-mac-history-dialog__header,
#dialog-box .erpds-customer-mac-vendor-dialog__header,
#dialog-box .erpds-customer-service-dialog__header,
#dialog-box .erpds-customer-advert-dialog__header,
#dialog-box .erpds-customer-tag-dialog__header,
#dialog-box .erpds-customer-tariff-dialog__header,
#dialog-box .erpds-customer-tariff-props-dialog__header,
#dialog-box .erpds-customer-state-dialog__header,
#dialog-box .erpds-customer-credit-dialog__header,
#dialog-box .erpds-customer-balance-dialog__header,
#dialog-box .erpds-customer-password-dialog__header,
#dialog-box .erpds-customer-merge-dialog__header,
#dialog-box .erpds-customer-parent-dialog__header,
#dialog-box .erpds-person-dialog__header,
#dialog-box .erpds-person-show-dialog__header,
#dialog-box .erpds-attach-rename-dialog__header {
  margin-bottom: 12px;
}

#dialog-box .erpds-customer-phone-form,
#dialog-box .erpds-customer-phone-fields,
#dialog-box .erpds-customer-note-form,
#dialog-box .erpds-customer-ip-form,
#dialog-box .erpds-customer-ip-fields,
#dialog-box .erpds-customer-ipnet-form,
#dialog-box .erpds-customer-ipnet-fields,
#dialog-box .erpds-customer-phone-transfer-form,
#dialog-box .erpds-customer-task-transfer-form,
#dialog-box .erpds-customer-service-form,
#dialog-box .erpds-customer-advert-form,
#dialog-box .erpds-customer-tag-form,
#dialog-box .erpds-customer-tariff-props-form,
#dialog-box .erpds-customer-credit-form,
#dialog-box .erpds-customer-balance-form,
#dialog-box .erpds-customer-balance-fields,
#dialog-box .erpds-customer-password-form,
#dialog-box .erpds-customer-merge-form,
#dialog-box .erpds-customer-parent-form,
#dialog-box .erpds-person-form,
#dialog-box .erpds-person-fields,
#dialog-box .erpds-attach-rename-form,
#dialog-box .erpds-attach-rename-fields {
  display: grid;
  gap: 10px;
  min-width: 0;
}

#dialog-box .erpds-sms-form {
  display: grid;
  gap: 10px;
  min-width: 0;
}

#dialog-box .erpds-customer-phone-field,
#dialog-box .erpds-customer-note-field,
#dialog-box .erpds-customer-ip-field,
#dialog-box .erpds-customer-ipnet-field,
#dialog-box .erpds-customer-phone-transfer-field,
#dialog-box .erpds-customer-task-transfer-field,
#dialog-box .erpds-customer-service-field,
#dialog-box .erpds-customer-advert-field,
#dialog-box .erpds-customer-tariff-props-field,
#dialog-box .erpds-customer-credit-field,
#dialog-box .erpds-customer-balance-field,
#dialog-box .erpds-customer-password-field,
#dialog-box .erpds-customer-merge-field,
#dialog-box .erpds-customer-parent-field,
#dialog-box .erpds-person-field,
#dialog-box .erpds-attach-rename-field {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--erpds-text-muted, #525A66);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#dialog-box .erpds-sms-field,
#dialog-box .erpds-sms-option {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--erpds-text-muted, #525A66);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#dialog-box .erpds-sms-phone-row,
#dialog-box .erpds-sms-option-control {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

#dialog-box .erpds-sms-phone-row input.input_box,
#dialog-box .erpds-sms-option-control select {
  flex: 1 1 auto;
  width: 100% !important;
  min-width: 0;
  height: 34px;
  box-sizing: border-box;
  margin: 0;
  color: var(--erpds-text, #111827);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

#dialog-box .erpds-sms-icon-button,
#dialog-box .erpds-sms-template-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 30px;
  box-sizing: border-box;
  padding: 5px 8px;
  border: 1px solid var(--erpds-border, #DDE1E8);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-surface, #fff);
  color: var(--erpds-accent-text, #155aaa);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

#dialog-box .erpds-sms-icon-button {
  flex: 0 0 34px;
  width: 34px;
  padding: 0;
}

#dialog-box .erpds-sms-template-link > span {
  border-bottom: 0;
}

#dialog-box .erpds-sms-icon-button:hover,
#dialog-box .erpds-sms-icon-button:focus-visible,
#dialog-box .erpds-sms-template-link:hover,
#dialog-box .erpds-sms-template-link:focus-visible {
  border-color: var(--erpds-accent-soft-hover, #cce0ed);
  background: var(--erpds-accent-soft, #deedf5);
  color: var(--erpds-accent, #155aaa);
  text-decoration: none;
}

#dialog-box .erpds-sms-textarea-wrap {
  display: grid;
  gap: 4px;
  min-width: 0;
}

#dialog-box #sms_leftblock_comment_id {
  width: 100% !important;
  min-width: 0;
  min-height: 128px !important;
  max-height: min(44vh, 260px) !important;
  box-sizing: border-box;
  margin: 0;
  padding: 9px 10px;
  resize: vertical;
  color: var(--erpds-text, #111827);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: 0;
  text-transform: none;
}

#dialog-box .erpds-sms-counter {
  display: block;
  min-height: 16px;
  color: var(--erpds-text-muted, #525A66);
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.25;
  text-align: right;
  letter-spacing: 0;
  text-transform: none;
}

#dialog-box .erpds-sms-options {
  display: grid;
  gap: 8px;
  min-width: 0;
  box-sizing: border-box;
  padding: 9px;
  border: 1px solid var(--erpds-border-light, #EEF1F5);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-bg-2, #F4F6FA);
}

#dialog-box .erpds-sms-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  padding-top: 2px;
}

#dialog-box .erpds-sms-actions .div_center {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 !important;
}

#dialog-box .erpds-sms-pattern-dialog {
  width: min(560px, calc(100vw - 28px));
  min-width: 0;
  box-sizing: border-box;
  padding: 0;
}

#dialog-box .erpds-sms-pattern-list {
  display: grid;
  gap: 7px;
  max-height: min(54vh, 420px);
  min-width: 0;
  overflow: auto;
  scrollbar-width: thin;
}

#dialog-box .erpds-sms-pattern-item {
  display: block;
  width: 100%;
  min-height: 38px;
  min-width: 0;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid var(--erpds-border, #DDE1E8);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-surface, #fff);
  color: var(--erpds-text, #111827);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
  text-align: left;
  letter-spacing: 0;
  text-transform: none;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
}

#dialog-box .erpds-sms-pattern-item > span {
  border-bottom: 0;
}

#dialog-box .erpds-sms-pattern-item:hover,
#dialog-box .erpds-sms-pattern-item:focus-visible {
  border-color: var(--erpds-accent-soft-hover, #cce0ed);
  background: var(--erpds-accent-soft, #deedf5);
  color: var(--erpds-accent, #155aaa);
}

#dialog-box .erpds-sms-pattern-actions {
  margin-top: 10px;
  min-width: 0;
}

#dialog-box .erpds-sms-pattern-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  max-width: 100%;
  box-sizing: border-box;
  padding: 6px 10px;
  border: 1px solid var(--erpds-border, #DDE1E8);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-surface, #fff);
  color: var(--erpds-accent-text, #155aaa);
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.25;
  text-decoration: none;
  overflow-wrap: anywhere;
}

#dialog-box .erpds-sms-pattern-add > span {
  border-bottom: 0;
}

#dialog-box .erpds-sms-pattern-add:hover,
#dialog-box .erpds-sms-pattern-add:focus-visible {
  border-color: var(--erpds-accent-soft-hover, #cce0ed);
  background: var(--erpds-accent-soft, #deedf5);
  color: var(--erpds-accent, #155aaa);
  text-decoration: none;
}

#dialog-box .erpds-sms-staff-dialog {
  width: min(380px, calc(100vw - 28px));
  min-width: 0;
  box-sizing: border-box;
  padding: 0;
}

#dialog-box .erpds-sms-staff-list {
  display: grid;
  gap: 7px;
  max-height: min(58vh, 430px);
  min-width: 0;
  overflow: auto;
  scrollbar-width: thin;
}

#dialog-box .erpds-sms-staff-item {
  display: grid;
  gap: 5px;
  min-width: 0;
  box-sizing: border-box;
  padding: 9px 10px;
  border: 1px solid var(--erpds-border-light, #EEF1F5);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-bg-2, #F4F6FA);
}

#dialog-box .erpds-sms-staff-name {
  min-width: 0;
  color: var(--erpds-text-muted, #525A66);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

#dialog-box .erpds-sms-staff-phone {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: fit-content;
  max-width: 100%;
  min-height: 30px;
  box-sizing: border-box;
  padding: 4px 8px;
  border: 1px solid var(--erpds-border, #DDE1E8);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-surface, #fff);
  color: var(--erpds-accent-text, #155aaa);
  font-size: 13.5px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0;
  text-align: left;
  text-decoration: none;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
}

#dialog-box .erpds-sms-staff-phone:hover,
#dialog-box .erpds-sms-staff-phone:focus-visible {
  border-color: var(--erpds-accent-soft-hover, #cce0ed);
  background: var(--erpds-accent-soft, #deedf5);
  color: var(--erpds-accent, #155aaa);
}

#dialog-box .erpds-check-delete-dialog {
  width: min(560px, calc(100vw - 28px));
  min-width: 0;
  box-sizing: border-box;
  padding: 0;
}

#dialog-box .erpds-check-delete-list {
  display: grid;
  gap: 7px;
  max-height: min(62vh, 520px);
  min-width: 0;
  overflow: auto;
  scrollbar-width: thin;
}

#dialog-box .erpds-check-delete-item {
  display: grid;
  grid-template-columns: minmax(110px, 0.38fr) minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid var(--erpds-border-light, #EEF1F5);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-bg-2, #F4F6FA);
}

#dialog-box .erpds-check-delete-type {
  min-width: 0;
  color: var(--erpds-text-muted, #525A66);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

#dialog-box .erpds-check-delete-link {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: fit-content;
  max-width: 100%;
  min-width: 0;
  min-height: 30px;
  box-sizing: border-box;
  padding: 5px 8px;
  border: 1px solid var(--erpds-border, #DDE1E8);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-surface, #fff);
  color: var(--erpds-accent-text, #155aaa);
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.25;
  text-decoration: none;
  overflow-wrap: anywhere;
}

#dialog-box .erpds-check-delete-link > span {
  border-bottom: 0;
}

#dialog-box .erpds-check-delete-link:hover,
#dialog-box .erpds-check-delete-link:focus-visible {
  border-color: var(--erpds-accent-soft-hover, #cce0ed);
  background: var(--erpds-accent-soft, #deedf5);
  color: var(--erpds-accent, #155aaa);
  text-decoration: none;
}

#dialog-box .erpds-commutation-selector-dialog {
  width: min(620px, calc(100vw - 28px));
  min-width: 0;
  box-sizing: border-box;
  padding: 0;
}

#dialog-box .erpds-commutation-selector-body {
  display: grid;
  gap: 7px;
  max-height: min(68vh, 620px);
  min-width: 0;
  overflow: auto;
  scrollbar-width: thin;
}

#dialog-box .erpds-commutation-selector-body br {
  display: none;
}

#dialog-box .erpds-commutation-selector-body .div_space {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
  box-sizing: border-box;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid var(--erpds-border-light, #EEF1F5);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-bg-2, #F4F6FA);
  color: var(--erpds-text, #111827);
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

#dialog-box .erpds-commutation-selector-body a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 30px;
  max-width: 100%;
  box-sizing: border-box;
  padding: 5px 8px;
  border: 1px solid var(--erpds-border, #DDE1E8);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-surface, #fff);
  color: var(--erpds-accent-text, #155aaa);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  text-decoration: none;
  white-space: normal;
  overflow-wrap: anywhere;
}

#dialog-box .erpds-commutation-selector-body a > span {
  border-bottom: 0;
}

#dialog-box .erpds-commutation-selector-body a:hover,
#dialog-box .erpds-commutation-selector-body a:focus-visible {
  border-color: var(--erpds-accent-soft-hover, #cce0ed);
  background: var(--erpds-accent-soft, #deedf5);
  color: var(--erpds-accent, #155aaa);
  text-decoration: none;
}

#dialog-box .erpds-commutation-selector-body input.input_box {
  flex: 1 1 160px;
  width: auto;
  min-width: 0;
  max-width: 100%;
  height: 32px;
  box-sizing: border-box;
  margin: 0;
}

@media (max-width: 520px) {
  #dialog-box .erpds-commutation-selector-body .div_space {
    align-items: stretch;
  }
  #dialog-box .erpds-commutation-selector-body a {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  #dialog-box .erpds-check-delete-item {
    grid-template-columns: 1fr;
    gap: 5px;
  }
}

#dialog-box .erpds-customer-phone-field input.input_box,
#dialog-box .erpds-customer-note-field textarea.textarea_class,
#dialog-box .erpds-customer-ip-field input.input_box,
#dialog-box .erpds-customer-ipnet-field input.input_box,
#dialog-box .erpds-customer-ipnet-field input.input_field,
#dialog-box .erpds-customer-phone-transfer-field input.input_box,
#dialog-box .erpds-customer-phone-transfer-field select,
#dialog-box .erpds-customer-task-transfer-field input.input_box,
#dialog-box .erpds-customer-task-transfer-field select,
#dialog-box .erpds-customer-service-field input.input_box,
#dialog-box .erpds-customer-service-field select,
#dialog-box .erpds-customer-advert-field select,
#dialog-box .erpds-customer-tariff-props-field input.input_box,
#dialog-box .erpds-customer-credit-field input.input_box,
#dialog-box .erpds-customer-balance-field input.input_box,
#dialog-box .erpds-customer-balance-field select,
#dialog-box .erpds-customer-password-field input.input_box,
#dialog-box .erpds-customer-merge-field input.input_box,
#dialog-box .erpds-customer-merge-field select,
#dialog-box .erpds-customer-parent-field input.input_box,
#dialog-box .erpds-customer-parent-field select,
#dialog-box .erpds-person-field input.input_box,
#dialog-box .erpds-attach-rename-field input.input_box {
  width: 100% !important;
  min-width: 0;
  box-sizing: border-box;
  margin: 0;
  color: var(--erpds-text, #111827);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

#dialog-box .erpds-customer-phone-field input.input_box,
#dialog-box .erpds-customer-ip-field input.input_box,
#dialog-box .erpds-customer-ipnet-field input.input_box,
#dialog-box .erpds-customer-ipnet-field input.input_field,
#dialog-box .erpds-customer-phone-transfer-field input.input_box,
#dialog-box .erpds-customer-phone-transfer-field select,
#dialog-box .erpds-customer-task-transfer-field input.input_box,
#dialog-box .erpds-customer-task-transfer-field select,
#dialog-box .erpds-customer-service-field input.input_box,
#dialog-box .erpds-customer-service-field select,
#dialog-box .erpds-customer-advert-field select,
#dialog-box .erpds-customer-tariff-props-field input.input_box,
#dialog-box .erpds-customer-credit-field input.input_box,
#dialog-box .erpds-customer-balance-field input.input_box,
#dialog-box .erpds-customer-balance-field select,
#dialog-box .erpds-customer-password-field input.input_box,
#dialog-box .erpds-customer-merge-field input.input_box,
#dialog-box .erpds-customer-merge-field select,
#dialog-box .erpds-customer-parent-field input.input_box,
#dialog-box .erpds-customer-parent-field select,
#dialog-box .erpds-person-field input.input_box,
#dialog-box .erpds-attach-rename-field input.input_box {
  height: 34px;
}

#dialog-box .erpds-customer-balance-field textarea.textarea_class {
  width: 100% !important;
  min-width: 0;
  min-height: 92px;
  max-height: min(30vh, 180px);
  box-sizing: border-box;
  margin: 0;
  padding: 9px 10px;
  resize: vertical;
  color: var(--erpds-text, #111827);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: 0;
  text-transform: none;
}

#dialog-box .erpds-customer-note-field textarea.textarea_class {
  min-height: 130px;
  max-height: min(42vh, 260px);
  padding: 9px 10px;
  resize: vertical;
  line-height: 1.45;
}

#dialog-box .erpds-customer-ip-fields {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px 12px;
}

#dialog-box .erpds-customer-ipnet-fields {
  grid-template-columns: minmax(0, 1fr) minmax(120px, 150px);
  align-items: end;
  gap: 10px 12px;
}

#dialog-box .erpds-customer-ip-field {
  align-self: stretch;
}

#dialog-box .erpds-customer-ipnet-field {
  align-self: stretch;
}

#dialog-box .erpds-customer-ip-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  min-width: 0;
}

#dialog-box .erpds-customer-ip-control span[id] {
  display: block;
  min-height: 0;
  color: var(--erpds-text-muted, #525A66);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0;
  text-transform: none;
  overflow-wrap: anywhere;
}

#dialog-box .erpds-customer-ipnet-inline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 58px;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

#dialog-box .erpds-customer-ipnet-slash {
  color: var(--erpds-text-muted, #525A66);
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
}

#dialog-box .erpds-customer-ipnet-mask {
  text-align: center;
}

#dialog-box .erpds-customer-ipnet-color {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

#dialog-box .erpds-customer-ipnet-color input.input_field {
  width: 100% !important;
  max-width: 120px;
}

#dialog-box .erpds-customer-ipnet-preview {
  min-height: 24px;
  box-sizing: border-box;
  padding: 5px 8px;
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-bg-2, #F4F6FA);
  color: var(--erpds-text-muted, #525A66);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
}

#dialog-box .erpds-customer-ipnet-preview:empty {
  display: none;
}

#dialog-box .erpds-customer-phone-transfer-summary,
#dialog-box .erpds-customer-task-transfer-note {
  min-width: 0;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid var(--erpds-border-light, #EEF1F5);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-bg-2, #F4F6FA);
  color: var(--erpds-text-muted, #525A66);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

#dialog-box .erpds-customer-phone-transfer-summary {
  display: grid;
  grid-template-columns: minmax(88px, auto) minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

#dialog-box .erpds-customer-phone-transfer-summary > span {
  color: var(--erpds-text-muted, #525A66);
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#dialog-box .erpds-customer-phone-transfer-summary > strong {
  min-width: 0;
  color: var(--erpds-text, #111827);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

#dialog-box .erpds-customer-phone-transfer-control,
#dialog-box .erpds-customer-task-transfer-control {
  display: grid;
  gap: 6px;
  min-width: 0;
}

#dialog-box .erpds-customer-phone-transfer-control > *,
#dialog-box .erpds-customer-task-transfer-control > * {
  max-width: 100%;
}

#dialog-box .erpds-customer-action-list {
  display: grid;
  gap: 7px;
  min-width: 0;
}

#dialog-box .erpds-customer-action-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 36px;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid var(--erpds-border-light, #EEF1F5);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-bg-2, #F4F6FA);
  color: var(--erpds-accent-text, #155aaa);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
  text-decoration: none;
  overflow-wrap: anywhere;
}

#dialog-box .erpds-customer-action-item:hover {
  border-color: var(--erpds-accent-soft-hover, #cce0ed);
  background: var(--erpds-accent-soft, #deedf5);
  color: var(--erpds-accent, #155aaa);
  text-decoration: none;
}

#dialog-box .erpds-customer-action-item > span {
  border-bottom: 0;
}

#dialog-box .erpds-customer-action-item i {
  flex: 0 0 auto;
  width: 16px;
  color: var(--erpds-text-muted, #525A66);
  text-align: center;
}

#dialog-box .erpds-customer-cable-list {
  display: grid;
  gap: 7px;
  min-width: 0;
  max-height: min(56vh, 480px);
  overflow: auto;
  padding: 2px;
  scrollbar-width: thin;
}

#dialog-box .erpds-customer-cable-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 36px;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid var(--erpds-border-light, #EEF1F5);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-bg-2, #F4F6FA);
  color: var(--erpds-accent-text, #155aaa);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
  text-decoration: none;
  overflow-wrap: anywhere;
}

#dialog-box .erpds-customer-cable-action:hover {
  border-color: var(--erpds-accent-soft-hover, #cce0ed);
  background: var(--erpds-accent-soft, #deedf5);
  color: var(--erpds-accent, #155aaa);
  text-decoration: none;
}

#dialog-box .erpds-customer-cable-action i {
  flex: 0 0 auto;
  width: 16px;
  color: var(--erpds-text-muted, #525A66);
  text-align: center;
}

#dialog-box .erpds-customer-mac-history-body {
  min-width: 0;
  max-height: min(58vh, 520px);
  overflow: auto;
  border: 1px solid var(--erpds-border-light, #EEF1F5);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-surface, #fff);
  scrollbar-width: thin;
}

#dialog-box .erpds-customer-mac-history-table .table_data,
#dialog-box .erpds-customer-mac-history-table .table_list_data {
  width: 100%;
  margin: 0;
  border: 0;
  box-shadow: none;
}

#dialog-box .erpds-customer-mac-history-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--erpds-bg-2, #F4F6FA);
}

#dialog-box .erpds-customer-mac-vendor-result {
  min-width: 0;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid var(--erpds-border-light, #EEF1F5);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-bg-2, #F4F6FA);
  color: var(--erpds-text, #111827);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

#dialog-box .erpds-customer-mac-vendor-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: 10px;
}

#dialog-box .erpds-customer-mac-vendor-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  box-sizing: border-box;
  padding: 5px 9px;
  border: 1px solid var(--erpds-border, #DDE1E8);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-surface, #fff);
  color: var(--erpds-accent-text, #155aaa);
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.25;
  text-decoration: none;
}

#dialog-box .erpds-customer-mac-vendor-actions a > span {
  border-bottom: 0;
}

#dialog-box .erpds-person-extra {
  display: grid;
  gap: 8px;
  min-width: 0;
}

#dialog-box .erpds-person-extra:empty {
  display: none;
}

#dialog-box .erpds-person-extra .table_block {
  width: 100% !important;
  margin: 0 !important;
}

#dialog-box .erpds-person-extra .item > div {
  padding-top: 6px !important;
  padding-bottom: 6px !important;
}

#dialog-box .erpds-person-show-fields {
  display: grid;
  gap: 7px;
  min-width: 0;
}

#dialog-box .erpds-person-show-row {
  display: grid;
  grid-template-columns: minmax(96px, 132px) minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  min-width: 0;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid var(--erpds-border-light, #EEF1F5);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-bg-2, #F4F6FA);
}

#dialog-box .erpds-person-show-label {
  min-width: 0;
  color: var(--erpds-text-muted, #525A66);
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#dialog-box .erpds-person-show-value {
  min-width: 0;
  color: var(--erpds-text, #111827);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

#dialog-box .erpds-person-show-value a {
  color: var(--erpds-accent-text, #155aaa);
  font-weight: 800;
}

#dialog-box .erpds-person-show-extra {
  display: grid;
  gap: 8px;
  min-width: 0;
  margin-top: 10px;
}

#dialog-box .erpds-person-show-extra:empty {
  display: none;
}

#dialog-box .erpds-person-show-extra .table_block {
  width: 100% !important;
  margin: 0 !important;
}

#dialog-box .erpds-person-show-extra .item > div {
  padding-top: 6px !important;
  padding-bottom: 6px !important;
}

#dialog-box .erpds-person-show-attachments {
  min-width: 0;
  margin-top: 10px;
}

#dialog-box .erpds-person-show-attachments .div_space {
  margin: 0 !important;
  padding: 0 !important;
}

#dialog-box .erpds-person-show-actions {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--erpds-border-light, #EEF1F5);
}

#dialog-box .erpds-person-show-actions a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  box-sizing: border-box;
  padding: 5px 9px;
  border: 1px solid var(--erpds-accent-soft-hover, #cce0ed);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-accent-soft, #deedf5);
  color: var(--erpds-accent-text, #155aaa);
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.25;
  text-decoration: none;
}

#dialog-box .erpds-person-show-actions a > span {
  border-bottom: 0;
}

#dialog-box .erpds-customer-service-current {
  min-width: 0;
  max-height: min(42vh, 360px);
  overflow: auto;
  border: 1px solid var(--erpds-border-light, #EEF1F5);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-surface, #fff);
  scrollbar-width: thin;
}

#dialog-box .erpds-customer-service-current .table_data,
#dialog-box .erpds-customer-service-current .table_list_data {
  width: 100%;
  margin: 0;
  border: 0;
  box-shadow: none;
}

#dialog-box .erpds-customer-service-current th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--erpds-bg-2, #F4F6FA);
}

#dialog-box .erpds-customer-service-current input.input_box {
  width: 100% !important;
  min-width: 0;
  box-sizing: border-box;
}

#dialog-box .erpds-customer-service-new {
  display: grid;
  gap: 10px;
  min-width: 0;
  box-sizing: border-box;
  padding: 10px;
  border: 1px solid var(--erpds-border-light, #EEF1F5);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-bg-2, #F4F6FA);
}

#dialog-box .erpds-customer-service-title {
  color: var(--erpds-text, #111827);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
}

#dialog-box .erpds-customer-service-inline {
  display: grid;
  grid-template-columns: minmax(110px, 150px) minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
  align-items: end;
}

#dialog-box .erpds-customer-service-money {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

#dialog-box .erpds-customer-credit-money,
#dialog-box .erpds-customer-balance-money {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

#dialog-box .erpds-customer-service-money > span {
  color: var(--erpds-text-muted, #525A66);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

#dialog-box .erpds-customer-credit-money,
#dialog-box .erpds-customer-balance-money {
  color: var(--erpds-text-muted, #525A66);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

#dialog-box .erpds-customer-merge-warning {
  min-width: 0;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid var(--erpds-warning-border, #fed7aa);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-warning-soft, #fff7ed);
  color: var(--erpds-warning-text, #9a3412);
  font-size: 12.5px;
  font-weight: 750;
  line-height: 1.35;
}

#dialog-box .erpds-customer-merge-control,
#dialog-box .erpds-customer-parent-control {
  display: grid;
  gap: 6px;
  min-width: 0;
}

#dialog-box .erpds-customer-merge-control > *,
#dialog-box .erpds-customer-parent-control > * {
  max-width: 100%;
}

#dialog-box .erpds-customer-tag-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  min-width: 0;
  max-height: min(52vh, 460px);
  overflow: auto;
  padding: 2px;
  scrollbar-width: thin;
}

#dialog-box .erpds-customer-tag-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 34px;
  box-sizing: border-box;
  padding: 7px 9px;
  border: 1px solid var(--erpds-border-light, #EEF1F5);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-bg-2, #F4F6FA);
  color: var(--erpds-text, #111827);
  font-size: 12.5px;
  font-weight: 750;
  line-height: 1.25;
}

#dialog-box .erpds-customer-tag-option input {
  margin: 0;
}

#dialog-box .erpds-customer-tag-option span {
  min-width: 0;
  overflow-wrap: anywhere;
}

#dialog-box .erpds-customer-tariff-list {
  display: grid;
  gap: 7px;
  min-width: 0;
  max-height: min(52vh, 460px);
  overflow: auto;
  padding: 2px;
  scrollbar-width: thin;
}

#dialog-box .erpds-customer-state-list {
  display: grid;
  gap: 7px;
  min-width: 0;
  max-height: min(52vh, 460px);
  overflow: auto;
  padding: 2px;
  scrollbar-width: thin;
}

#dialog-box .erpds-customer-tariff-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  min-height: 34px;
  box-sizing: border-box;
  padding: 7px 10px;
  border: 1px solid var(--erpds-border-light, #EEF1F5);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-bg-2, #F4F6FA);
  color: var(--erpds-accent-text, #155aaa);
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.25;
  text-decoration: none;
  overflow-wrap: anywhere;
}

#dialog-box .erpds-customer-state-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  min-height: 34px;
  box-sizing: border-box;
  padding: 7px 10px;
  border: 1px solid var(--erpds-border-light, #EEF1F5);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-bg-2, #F4F6FA);
  color: var(--erpds-accent-text, #155aaa);
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.25;
  text-decoration: none;
  overflow-wrap: anywhere;
}

#dialog-box .erpds-customer-tariff-option > span {
  min-width: 0;
  border-bottom: 0;
  overflow-wrap: anywhere;
}

#dialog-box .erpds-customer-state-option > span {
  min-width: 0;
  border-bottom: 0;
  overflow-wrap: anywhere;
}

#dialog-box .erpds-customer-tariff-option--current {
  border-color: var(--erpds-success-border, #86efac);
  background: var(--erpds-success-soft, #dcfce7);
  color: var(--erpds-success-text, #166534);
}

#dialog-box .erpds-customer-state-option--current {
  border-color: var(--erpds-success-border, #86efac);
  background: var(--erpds-success-soft, #dcfce7);
  color: var(--erpds-success-text, #166534);
}

#dialog-box .erpds-customer-tariff-empty {
  padding: 10px;
  border: 1px solid var(--erpds-border-light, #EEF1F5);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-bg-2, #F4F6FA);
  color: var(--erpds-text-muted, #525A66);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.35;
}

#dialog-box .erpds-customer-tariff-props-title {
  min-width: 0;
  margin-bottom: 10px;
  padding: 8px 10px;
  border: 1px solid var(--erpds-border-light, #EEF1F5);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-bg-2, #F4F6FA);
  color: var(--erpds-text, #111827);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

#dialog-box .erpds-customer-ip-hint {
  color: var(--erpds-text-muted, #525A66);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0;
  text-transform: none;
}

#dialog-box .erpds-customer-phone-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  min-height: 30px;
  box-sizing: border-box;
  padding: 5px 8px;
  border: 1px solid var(--erpds-border-light, #EEF1F5);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-bg-2, #F4F6FA);
  color: var(--erpds-text, #111827);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}

#dialog-box .erpds-customer-phone-toggle input {
  margin: 0;
}

#dialog-box .erpds-customer-ip-empty {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  align-self: center;
  min-height: 34px;
  max-width: 100%;
  box-sizing: border-box;
  padding: 6px 8px;
  border: 1px solid var(--erpds-border-light, #EEF1F5);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-bg-2, #F4F6FA);
  color: var(--erpds-text, #111827);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
}

#dialog-box .erpds-customer-ip-empty input {
  margin: 0;
}

#dialog-box .erpds-customer-phone-actions,
#dialog-box .erpds-customer-note-actions,
#dialog-box .erpds-customer-ip-actions,
#dialog-box .erpds-customer-ipnet-actions,
#dialog-box .erpds-customer-phone-transfer-actions,
#dialog-box .erpds-customer-task-transfer-actions,
#dialog-box .erpds-customer-service-actions,
#dialog-box .erpds-customer-advert-actions,
#dialog-box .erpds-customer-tag-actions,
#dialog-box .erpds-customer-tariff-actions,
#dialog-box .erpds-customer-tariff-props-actions,
#dialog-box .erpds-customer-state-actions,
#dialog-box .erpds-customer-credit-actions,
#dialog-box .erpds-customer-balance-actions,
#dialog-box .erpds-customer-password-actions,
#dialog-box .erpds-customer-merge-actions,
#dialog-box .erpds-customer-parent-actions,
#dialog-box .erpds-person-actions,
#dialog-box .erpds-attach-rename-actions {
  margin-top: 2px;
}

#dialog-box .erpds-customer-phone-actions .div_center,
#dialog-box .erpds-customer-note-actions .div_center,
#dialog-box .erpds-customer-ip-actions .div_center,
#dialog-box .erpds-customer-ipnet-actions .div_center,
#dialog-box .erpds-customer-phone-transfer-actions .div_center,
#dialog-box .erpds-customer-task-transfer-actions .div_center,
#dialog-box .erpds-customer-service-actions .div_center,
#dialog-box .erpds-customer-advert-actions .div_center,
#dialog-box .erpds-customer-tag-actions .div_center,
#dialog-box .erpds-customer-tariff-props-actions .div_center,
#dialog-box .erpds-customer-credit-actions .div_center,
#dialog-box .erpds-customer-balance-actions .div_center,
#dialog-box .erpds-customer-password-actions .div_center,
#dialog-box .erpds-customer-merge-actions .div_center,
#dialog-box .erpds-customer-parent-actions .div_center,
#dialog-box .erpds-person-actions .div_center,
#dialog-box .erpds-attach-rename-actions .div_center {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 8px;
  margin: 0 !important;
}

#dialog-box .erpds-attach-rename-actions input[type="submit"],
#dialog-box .erpds-attach-rename-actions button[id^="linkCancelId"] {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  box-sizing: border-box;
  margin: 0 !important;
  padding: 7px 12px !important;
  border-radius: var(--erpds-radius-sm, 6px);
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.25;
  text-decoration: none;
}

#dialog-box .erpds-attach-rename-actions button[id^="linkCancelId"] {
  border: 1px solid var(--erpds-border, #DDE1E8) !important;
  background: var(--erpds-surface, #fff) !important;
  color: var(--erpds-text-muted, #525A66);
}

#dialog-box .erpds-customer-ip-secondary {
  margin-top: 10px;
}

#dialog-box .erpds-customer-ip-secondary a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--erpds-accent-text, #155aaa);
  font-size: 12.5px;
  font-weight: 800;
}

#dialog-box .erpds-customer-tariff-actions {
  margin-top: 10px;
}

#dialog-box .erpds-customer-state-actions {
  margin-top: 10px;
}

#dialog-box .erpds-customer-tariff-actions a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  box-sizing: border-box;
  padding: 5px 9px;
  border: 1px solid var(--erpds-border, #DDE1E8);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-surface, #fff);
  color: var(--erpds-accent-text, #155aaa);
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.25;
  text-decoration: none;
}

#dialog-box .erpds-customer-state-actions a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  box-sizing: border-box;
  padding: 5px 9px;
  border: 1px solid var(--erpds-border, #DDE1E8);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-surface, #fff);
  color: var(--erpds-accent-text, #155aaa);
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.25;
  text-decoration: none;
}

#dialog-box .erpds-customer-tariff-actions a > span {
  border-bottom: 0;
}

#dialog-box .erpds-customer-state-actions a > span {
  border-bottom: 0;
}

#dialog-box .erpds-customer-phone-danger {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--erpds-border-light, #EEF1F5);
}

#dialog-box .erpds-customer-ip-danger {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--erpds-border-light, #EEF1F5);
}

#dialog-box .erpds-customer-ipnet-danger {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--erpds-border-light, #EEF1F5);
}

#dialog-box .erpds-person-danger {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--erpds-border-light, #EEF1F5);
}

#dialog-box .erpds-customer-phone-danger a,
#dialog-box .erpds-customer-ip-danger a,
#dialog-box .erpds-customer-ipnet-danger a,
#dialog-box .erpds-person-danger a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--erpds-danger-text, #991b1b);
  font-size: 12.5px;
  font-weight: 800;
}

@media (max-width: 460px) {
  #dialog-box .erpds-customer-phone-dialog,
  #dialog-box .erpds-customer-note-dialog,
  #dialog-box .erpds-customer-ip-dialog,
  #dialog-box .erpds-customer-ipnet-dialog,
  #dialog-box .erpds-customer-phone-transfer-dialog,
  #dialog-box .erpds-customer-task-transfer-dialog,
  #dialog-box .erpds-customer-action-dialog,
  #dialog-box .erpds-customer-cable-dialog,
  #dialog-box .erpds-customer-mac-history-dialog,
  #dialog-box .erpds-customer-mac-vendor-dialog,
  #dialog-box .erpds-customer-service-dialog,
  #dialog-box .erpds-customer-advert-dialog,
  #dialog-box .erpds-customer-tag-dialog,
  #dialog-box .erpds-customer-tariff-dialog,
  #dialog-box .erpds-customer-tariff-props-dialog,
  #dialog-box .erpds-customer-state-dialog,
  #dialog-box .erpds-customer-credit-dialog,
  #dialog-box .erpds-customer-balance-dialog,
  #dialog-box .erpds-customer-password-dialog,
  #dialog-box .erpds-customer-merge-dialog,
  #dialog-box .erpds-customer-parent-dialog,
  #dialog-box .erpds-person-dialog,
  #dialog-box .erpds-person-show-dialog,
  #dialog-box .erpds-attach-rename-dialog {
    width: calc(100vw - 22px);
  }

  #dialog-box .erpds-customer-ip-fields,
  #dialog-box .erpds-customer-ipnet-fields {
    grid-template-columns: minmax(0, 1fr);
  }

  #dialog-box .erpds-customer-service-inline {
    grid-template-columns: minmax(0, 1fr);
  }

  #dialog-box .erpds-customer-phone-transfer-summary {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  #dialog-box .erpds-customer-tag-list {
    grid-template-columns: minmax(0, 1fr);
    max-height: min(58vh, 420px);
  }

  #dialog-box .erpds-person-show-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
    padding: 8px;
  }

  #dialog-box .erpds-customer-ip-empty {
    width: fit-content;
    white-space: normal;
  }

  #dialog-box .erpds-customer-phone-actions .div_center,
  #dialog-box .erpds-customer-note-actions .div_center,
  #dialog-box .erpds-customer-ip-actions .div_center,
  #dialog-box .erpds-customer-ipnet-actions .div_center,
  #dialog-box .erpds-customer-phone-transfer-actions .div_center,
  #dialog-box .erpds-customer-task-transfer-actions .div_center,
  #dialog-box .erpds-customer-service-actions .div_center,
  #dialog-box .erpds-customer-advert-actions .div_center,
  #dialog-box .erpds-customer-tag-actions .div_center,
  #dialog-box .erpds-customer-tariff-props-actions .div_center,
  #dialog-box .erpds-customer-credit-actions .div_center,
  #dialog-box .erpds-customer-balance-actions .div_center,
  #dialog-box .erpds-customer-password-actions .div_center,
  #dialog-box .erpds-customer-merge-actions .div_center,
  #dialog-box .erpds-customer-parent-actions .div_center,
  #dialog-box .erpds-person-actions .div_center,
  #dialog-box .erpds-attach-rename-actions .div_center {
    display: grid !important;
    grid-template-columns: 1fr;
    align-items: stretch !important;
    gap: 8px;
  }

  #dialog-box .erpds-customer-phone-actions #submit_or_id,
  #dialog-box .erpds-customer-phone-actions #submit_or_id1,
  #dialog-box .erpds-customer-note-actions #submit_or_id,
  #dialog-box .erpds-customer-note-actions #submit_or_id1,
  #dialog-box .erpds-customer-ip-actions #submit_or_id,
  #dialog-box .erpds-customer-ip-actions #submit_or_id1,
  #dialog-box .erpds-customer-ipnet-actions #submit_or_id,
  #dialog-box .erpds-customer-ipnet-actions #submit_or_id1,
  #dialog-box .erpds-customer-phone-transfer-actions #submit_or_id,
  #dialog-box .erpds-customer-phone-transfer-actions #submit_or_id1,
  #dialog-box .erpds-customer-task-transfer-actions #submit_or_id,
  #dialog-box .erpds-customer-task-transfer-actions #submit_or_id1,
  #dialog-box .erpds-customer-service-actions #submit_or_id,
  #dialog-box .erpds-customer-service-actions #submit_or_id1,
  #dialog-box .erpds-customer-advert-actions #submit_or_id,
  #dialog-box .erpds-customer-advert-actions #submit_or_id1,
  #dialog-box .erpds-customer-tag-actions #submit_or_id,
  #dialog-box .erpds-customer-tag-actions #submit_or_id1,
  #dialog-box .erpds-customer-tariff-props-actions #submit_or_id,
  #dialog-box .erpds-customer-tariff-props-actions #submit_or_id1,
  #dialog-box .erpds-customer-credit-actions #submit_or_id,
  #dialog-box .erpds-customer-credit-actions #submit_or_id1,
  #dialog-box .erpds-customer-balance-actions #submit_or_id,
  #dialog-box .erpds-customer-balance-actions #submit_or_id1,
  #dialog-box .erpds-customer-password-actions #submit_or_id,
  #dialog-box .erpds-customer-password-actions #submit_or_id1,
  #dialog-box .erpds-customer-merge-actions #submit_or_id,
  #dialog-box .erpds-customer-merge-actions #submit_or_id1,
  #dialog-box .erpds-customer-parent-actions #submit_or_id,
  #dialog-box .erpds-customer-parent-actions #submit_or_id1,
  #dialog-box .erpds-person-actions #submit_or_id,
  #dialog-box .erpds-person-actions #submit_or_id1,
  #dialog-box .erpds-attach-rename-actions #submit_or_id,
  #dialog-box .erpds-attach-rename-actions #submit_or_id1 {
    display: none !important;
  }

  #dialog-box .erpds-customer-phone-actions input[type="submit"],
  #dialog-box .erpds-customer-phone-actions a[id^="linkCancelId"],
  #dialog-box .erpds-customer-note-actions input[type="submit"],
  #dialog-box .erpds-customer-note-actions a[id^="linkCancelId"],
  #dialog-box .erpds-customer-ip-actions input[type="submit"],
  #dialog-box .erpds-customer-ip-actions a[id^="linkCancelId"],
  #dialog-box .erpds-customer-ipnet-actions input[type="submit"],
  #dialog-box .erpds-customer-ipnet-actions a[id^="linkCancelId"],
  #dialog-box .erpds-customer-phone-transfer-actions input[type="submit"],
  #dialog-box .erpds-customer-phone-transfer-actions a[id^="linkCancelId"],
  #dialog-box .erpds-customer-task-transfer-actions input[type="submit"],
  #dialog-box .erpds-customer-task-transfer-actions a[id^="linkCancelId"],
  #dialog-box .erpds-customer-service-actions input[type="submit"],
  #dialog-box .erpds-customer-service-actions a[id^="linkCancelId"],
  #dialog-box .erpds-customer-advert-actions input[type="submit"],
  #dialog-box .erpds-customer-advert-actions a[id^="linkCancelId"],
  #dialog-box .erpds-customer-tag-actions input[type="submit"],
  #dialog-box .erpds-customer-tag-actions a[id^="linkCancelId"],
  #dialog-box .erpds-customer-tariff-props-actions input[type="submit"],
  #dialog-box .erpds-customer-tariff-props-actions a[id^="linkCancelId"],
  #dialog-box .erpds-customer-credit-actions input[type="submit"],
  #dialog-box .erpds-customer-credit-actions a[id^="linkCancelId"],
  #dialog-box .erpds-customer-balance-actions input[type="submit"],
  #dialog-box .erpds-customer-balance-actions a[id^="linkCancelId"],
  #dialog-box .erpds-customer-password-actions input[type="submit"],
  #dialog-box .erpds-customer-password-actions a[id^="linkCancelId"],
  #dialog-box .erpds-customer-merge-actions input[type="submit"],
  #dialog-box .erpds-customer-merge-actions a[id^="linkCancelId"],
  #dialog-box .erpds-customer-parent-actions input[type="submit"],
  #dialog-box .erpds-customer-parent-actions a[id^="linkCancelId"],
  #dialog-box .erpds-person-actions input[type="submit"],
  #dialog-box .erpds-person-actions a[id^="linkCancelId"],
  #dialog-box .erpds-attach-rename-actions input[type="submit"],
  #dialog-box .erpds-attach-rename-actions a[id^="linkCancelId"],
  #dialog-box .erpds-attach-rename-actions button[id^="linkCancelId"] {
    display: inline-flex !important;
    width: 100% !important;
    min-height: 40px !important;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    text-align: center;
  }
}

/* Один источник прокрутки для мобильных ajax-диалогов. Старый стиль
   прокручивал одновременно оболочку и .dialog-content. */
@media (max-width: 640px) {
  #dialog-box {
    overflow: hidden !important;
  }

  /* ajaxWindow задаёт overflow inline для диалогов перемещения; этот вариант
     должен подчиняться тому же единому контейнеру прокрутки. */
  #dialog-box[style*="overflow"] {
    overflow: hidden !important;
  }

  #dialog-box > .dialog-content {
    max-height: calc(100vh - 76px) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    scrollbar-width: thin;
  }

  #dialog-box > .dialog-content .erpds-check-delete-list,
  #dialog-box > .dialog-content .erpds-commutation-selector-body,
  #dialog-box > .dialog-content .erpds-sms-pattern-list,
  #dialog-box > .dialog-content .erpds-sms-staff-list,
  #dialog-box > .dialog-content .erpds-customer-cable-list,
  #dialog-box > .dialog-content .erpds-customer-service-current,
  #dialog-box > .dialog-content .erpds-customer-tag-list,
  #dialog-box > .dialog-content .erpds-customer-tariff-list,
  #dialog-box > .dialog-content .erpds-customer-state-list,
  #dialog-box > .dialog-content .erpds-customer-mac-history-body {
    max-height: none !important;
    overflow: visible !important;
  }

  #dialog-box > .dialog-content .erpds-customer-mac-history-table {
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: thin;
  }
}

/* Карточка «Точка подключения» */
.erpds-commutation-body {
  padding: 12px 16px;
  font-size: 12.5px;
}
.erpds-commutation__act {
  margin-top: 8px;
}
.erpds-commutation-empty {
  display: block;
  font-size: 12px;
  color: var(--erpds-text-muted, #9ca3af);
  font-style: italic;
  margin-bottom: 4px;
}

/* Карточка «Документы» */
.erpds-docs-list {
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.erpds-doc-link {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 6px;
  padding: 5px 7px;
  border-radius: var(--erpds-radius-sm, 6px);
  font-size: 12.5px;
  color: var(--erpds-link, #2563eb);
  text-decoration: none;
}
.erpds-doc-link:hover {
  background: var(--erpds-accent-soft, #deedf5);
  color: var(--erpds-accent, #155aaa);
  text-decoration: none;
}
.erpds-doc-link i {
  flex: 0 0 auto;
  color: var(--erpds-text-muted, #6B7280);
}
.erpds-doc-link:hover i {
  color: currentColor;
}

/* Карточка «Файлы» абонента */
.erpds-files-body {
  padding: 12px 16px;
  overflow-x: auto;
}

.erpds-files-body .c_attach_div {
  display: block;
  width: 100%;
  min-height: 0;
  margin: 0;
}

.erpds-files-body .c_attach_div .c_attach_div_right_new {
  width: 100%;
  min-height: 0;
  padding: 8px;
  border-color: var(--erpds-border-light, #EEF1F5);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-bg-2, #F4F6FA);
  overflow: hidden;
}

.erpds-files-body #link_upload_id_id {
  display: flex;
  justify-content: flex-start;
  min-width: 0;
  margin: 8px 0 0;
  padding: 0;
}

.erpds-files-body #linkAttachFileId {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  max-width: 100%;
  box-sizing: border-box;
  padding: 6px 10px;
  border: 1px solid var(--erpds-border, #DDE1E8);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-surface, #fff);
  color: var(--erpds-accent-text, #155aaa);
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.25;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.erpds-files-body #linkAttachFileId > span {
  border-bottom: 0;
}

.erpds-files-body #linkAttachFileId:hover,
.erpds-files-body #linkAttachFileId:focus-visible {
  border-color: var(--erpds-accent-soft-hover, #cce0ed);
  background: var(--erpds-accent-soft, #deedf5);
  color: var(--erpds-accent, #155aaa);
  text-decoration: none;
}

.erpds-files-task-attachments {
  display: grid;
  gap: 8px;
  min-width: 0;
  margin-top: 10px;
}

.erpds-files-task-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid var(--erpds-border-light, #EEF1F5);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-bg-2, #F4F6FA);
}

.erpds-files-task-toggle a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: var(--erpds-accent-text, #155aaa);
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.25;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.erpds-files-task-toggle a > span {
  border-bottom: 0;
}

.erpds-files-task-toggle a:hover {
  color: var(--erpds-accent, #155aaa);
  text-decoration: none;
}

.erpds-files-task-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 24px;
  height: 22px;
  box-sizing: border-box;
  padding: 0 7px;
  border-radius: var(--erpds-radius-pill, 999px);
  background: var(--erpds-accent-soft, #deedf5);
  color: var(--erpds-accent-text, #155aaa);
  font-size: 11.5px;
  font-weight: 850;
  line-height: 1;
}

.erpds-files-task-panel {
  min-width: 0;
  box-sizing: border-box;
  padding: 8px;
  border: 1px solid var(--erpds-border-light, #EEF1F5);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-bg-2, #F4F6FA);
  overflow: hidden;
}

.erpds-files-task-attachments #customerTaskAttachId2 {
  display: none;
}

.erpds-files-task-panel .c_attach_div {
  margin: 0;
}

.erpds-files-task-panel .erpds-attach-list {
  gap: 6px;
}

.erpds-files-body .nGY2,
.erpds-files-body [data-nanogallery2] {
  display: block !important;
  max-width: 100%;
  min-width: 0;
  margin: 0 0 8px;
  padding: 6px;
  border: 1px solid var(--erpds-border-light, #EEF1F5);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-surface, #fff);
  overflow: hidden;
}

.erpds-files-body .nGY2Gallery,
.erpds-files-body .nGY2GallerySub,
.erpds-files-body .nanoGalleryLBarOff {
  max-width: 100% !important;
  max-height: 132px !important;
  overflow: auto !important;
}

.erpds-files-body .nGY2GallerySub {
  display: flex !important;
  gap: 6px;
  width: 100% !important;
  height: auto !important;
  white-space: nowrap;
  overflow-x: auto !important;
  overflow-y: hidden !important;
}

.erpds-files-body .nGY2GThumbnail {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  flex: 0 0 104px !important;
  width: 104px !important;
  height: 104px !important;
  margin: 0 !important;
}

.erpds-files-body .nGY2GThumbnailImage {
  width: 100px !important;
  height: 100px !important;
}

.erpds-files-body .erpds-attach-list-wrap {
  max-height: 260px !important;
  overflow: auto !important;
  scrollbar-width: thin;
}

.erpds-files-body .erpds-attach-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.erpds-files-body .erpds-attach-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid var(--erpds-border-light, #EEF1F5);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-surface, #fff);
}

.erpds-files-body .erpds-attach-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--erpds-border-light, #EEF1F5);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-bg-2, #F4F6FA);
  overflow: hidden;
}

.erpds-files-body .erpds-attach-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.erpds-files-body .erpds-attach-preview i {
  color: var(--erpds-text-muted, #525A66);
  font-size: 20px;
}

.erpds-files-body .erpds-attach-info {
  min-width: 0;
}

.erpds-files-body .erpds-attach-name {
  display: block;
  color: var(--erpds-accent-text, #155aaa);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.erpds-files-body .erpds-attach-comment,
.erpds-files-body .erpds-attach-meta {
  margin-top: 3px;
  color: var(--erpds-text-muted, #525A66);
  font-size: 11.5px;
  line-height: 1.35;
}

.erpds-files-body .erpds-attach-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.erpds-files-body .erpds-attach-meta-item,
.erpds-files-body .erpds-attach-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.erpds-files-body .erpds-attach-actions {
  grid-column: 1 / -1;
  justify-content: flex-start;
}

.erpds-files-body .erpds-attach-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--erpds-radius-sm, 6px);
  color: var(--erpds-text-muted, #525A66);
  text-decoration: none;
}

.erpds-files-body .erpds-attach-btn:hover {
  background: var(--erpds-accent-soft, #deedf5);
  color: var(--erpds-accent, #155aaa);
}

.erpds-v4 .erpds-files-body .erpds-attach-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.erpds-v4 .erpds-files-body .erpds-attach-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
}

.erpds-v4 .erpds-files-body .erpds-attach-preview {
  width: 42px;
  height: 42px;
}

.erpds-v4 .erpds-files-body .erpds-attach-info {
  min-width: 0;
}

.erpds-v4 .erpds-files-body .erpds-attach-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.erpds-v4 .erpds-files-body .erpds-attach-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.erpds-v4 .erpds-files-body .erpds-attach-actions {
  grid-column: 1 / -1;
  justify-content: flex-start;
}

/* Карточка «Кабельные линии» */
.erpds-cable-body {
  padding: 12px 16px;
  font-size: 12.5px;
}
.erpds-cable__row {
  margin-bottom: 4px;
}
.erpds-cable__act {
  margin-top: 8px;
}

.erpds-equipment-shell {
  display: block;
  margin-bottom: 8px;
}
.erpds-equipment-actions {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  min-width: 0;
  margin-bottom: 6px;
}
.erpds-equipment-issue,
.erpds-equipment-move {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-accent-soft, #deedf5);
  color: var(--erpds-accent-text, #155aaa);
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}
.erpds-equipment-issue {
  background: var(--erpds-ok-soft, #dff3e5);
  color: var(--erpds-ok-text, #1f6b35);
}
.erpds-equipment-issue:hover {
  background: #ccebd6;
  color: var(--erpds-ok, #2E8540);
  text-decoration: none;
}
.erpds-equipment-move {
  background: var(--erpds-accent-soft, #deedf5);
  color: var(--erpds-accent-text, #155aaa);
}
.erpds-equipment-move:hover {
  background: var(--erpds-accent-soft-hover, #cce0ed);
  color: var(--erpds-accent, #155aaa);
  text-decoration: none;
}
.erpds-equipment-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.erpds-equipment-stack > .erpds-equip-card {
  margin-bottom: 0;
}
.erpds-card__link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--erpds-link, #2563eb);
  text-decoration: none;
}
.erpds-card__link:hover {
  text-decoration: underline;
}
.erpds-ipmac__mac {
  font-size: 11.5px;
  color: var(--erpds-text-muted, #666);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  padding: 1px 6px;
  background: var(--erpds-bg-2, #F4F6FA);
  border-radius: var(--erpds-radius-xs);
}

.erpds-address-body {
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}
.erpds-address__left { min-width: 0; }
.erpds-address__right { min-width: 0; }
.erpds-address__main {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}
.erpds-address__sub {
  margin-top: 4px;
  font-size: 12px;
  color: var(--erpds-text-muted, #666);
}
/* Метa-инфо: Координаты / Группа — мини-сетка */
.erpds-address__meta {
  margin-top: 10px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  font-size: 11.5px;
  color: var(--erpds-text-muted, #666);
  align-items: baseline;
}
.erpds-address__meta-label {
  white-space: nowrap;
  color: var(--erpds-text-faint, #6B7280);
}
/* Legacy — строки с разделителем (только вне новой meta) */
.erpds-address__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--erpds-border, #e0e0e0);
  font-size: 12px;
}

/* Кнопка «На карте сети» в хедере карточки адреса */
.erpds-address-map-btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  font-size: 11.5px;
  border-radius: var(--erpds-radius-xs, 6px);
  border: 1px solid var(--erpds-border, #e0e0e0);
  background: transparent;
  color: var(--erpds-text-muted, #666);
  text-decoration: none;
  cursor: pointer;
  transition: var(--erpds-transition, all 0.2s ease);
}
.erpds-address-map-btn:hover {
  background: var(--erpds-bg-2, #F4F6FA);
  color: var(--erpds-accent-text, #2A6AE0);
  border-color: var(--erpds-accent, #2A6AE0);
}

/* Schematic «дом → волокно → OLT» (теперь в правой колонке) */
.erpds-address-schema {
  padding: 12px;
  background: var(--erpds-bg-2, #F4F6FA);
  border-radius: var(--erpds-radius-sm, 8px);
  height: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}
.erpds-address-schema__label {
  font-size: 10.5px;
  color: var(--erpds-text-muted, #666);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}
.erpds-address-schema__row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
}
.erpds-address-schema__node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.erpds-address-schema__node i {
  width: 32px;
  height: 32px;
  border-radius: var(--erpds-radius-sm);
  display: grid;
  place-items: center;
  color: var(--erpds-text-on-accent, #fff);
  font-size: 16px;
}
.erpds-address-schema__node--house i { background: var(--erpds-accent, #2A6AE0); }
.erpds-address-schema__node--olt   i { background: var(--erpds-ink, #1F2630); }
.erpds-address-schema__node span {
  font-size: 10px;
  color: var(--erpds-text-muted, #666);
}
.erpds-address-schema__line {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.erpds-address-schema__line-bar {
  width: 100%;
  height: 2px;
  background: var(--erpds-ok, #2E8540);
  border-radius: 1px;
  position: relative;
}
.erpds-address-schema__line-bar::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -3px;
  width: 8px;
  height: 8px;
  background: var(--erpds-ok, #2E8540);
  border-radius: 50%;
  transform: translateX(-50%);
}
.erpds-address-schema__line-label {
  font-size: 10.5px;
  color: var(--erpds-text-muted, #666);
  margin-top: 4px;
}
.erpds-address-schema__caption {
  text-align: center;
  font-size: 11px;
  color: var(--erpds-text-muted, #666);
  margin-top: 6px;
}
/* Кнопка «Подробнее» в схеме — прижата к низу */
.erpds-address-schema__more {
  margin-top: auto;
  padding-top: 10px;
  text-align: center;
}
.erpds-signal-path-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  font-size: 11.5px;
  border-radius: var(--erpds-radius-xs, 6px);
  border: 1px solid var(--erpds-border, #e0e0e0);
  background: transparent;
  color: var(--erpds-accent-text, #2A6AE0);
  cursor: pointer;
  transition: var(--erpds-transition, all 0.2s ease);
  font-family: inherit;
}
.erpds-signal-path-btn:hover {
  background: var(--erpds-accent-soft, #E8EEFF);
  border-color: var(--erpds-accent, #2A6AE0);
}

/* ============================================================
   SIGNAL PATH OVERLAY (оверлей «Путь сигнала»)
   ============================================================ */
.erpds-sp-overlay {
  position: fixed;
  inset: 0;
  z-index: 9900;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(4px);
  animation: erpdsSpFadeIn 0.18s ease;
}
@keyframes erpdsSpFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.erpds-sp-dialog {
  background: var(--erpds-surface, #fff);
  border-radius: var(--erpds-radius-lg, 14px);
  box-shadow: var(--erpds-shadow-lg, 0 20px 60px rgba(0,0,0,.18));
  width: 100%;
  max-width: 860px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: erpdsSpSlideUp 0.2s ease;
}
@keyframes erpdsSpSlideUp {
  from { transform: translateY(16px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.erpds-sp-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--erpds-border, #e8e8e8);
  flex-shrink: 0;
}
.erpds-sp-header-icon {
  width: 32px; height: 32px;
  border-radius: var(--erpds-radius-sm, 8px);
  background: var(--erpds-accent, #2A6AE0);
  color: var(--erpds-text-on-accent, #fff);
  display: grid;
  place-items: center;
  font-size: 14px;
  flex-shrink: 0;
}
.erpds-sp-header strong { font-size: 14px; }
.erpds-sp-header-meta { font-size: 12px; color: var(--erpds-text-muted, #666); margin-left: 4px; }
.erpds-sp-close {
  margin-left: auto;
  width: 28px; height: 28px;
  border: none; background: none;
  border-radius: var(--erpds-radius-xs, 6px);
  cursor: pointer; font-size: 18px; line-height: 1;
  color: var(--erpds-text-faint, #6B7280);
  display: grid; place-items: center;
  transition: var(--erpds-transition, all 0.2s ease);
}
.erpds-sp-close:hover { background: var(--erpds-bg-2, #F4F6FA); color: var(--erpds-text, #1a1a1a); }
.erpds-sp-body {
  padding: 12px 16px;
  overflow-y: auto;
  flex: 1;
}
/* Цепочка узлов */
.erpds-sp-chain {
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  padding-bottom: 8px;
}
.erpds-sp-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  min-width: 90px;
  max-width: 120px;
}
.erpds-sp-node__icon {
  width: 44px; height: 44px;
  border-radius: var(--erpds-radius-sm, 8px);
  display: grid; place-items: center;
  font-size: 20px; color: var(--erpds-text-on-accent, #fff);
}
.erpds-sp-node__icon--customer { background: var(--erpds-accent, #2A6AE0); }
.erpds-sp-node__icon--cable    { background: var(--erpds-ok, #2E8540); }
.erpds-sp-node__icon--cross    { background: var(--erpds-warn, #E07A1F); }
.erpds-sp-node__icon--splitter { background: var(--erpds-info, #2563B8); }
.erpds-sp-node__icon--device   { background: var(--erpds-ink, #1F2630); }
.erpds-sp-node__icon--extra    { background: var(--erpds-border, #C8CDD6); color: var(--erpds-text-muted, #666) !important; }
.erpds-sp-node--extra          { opacity: .75; }
.erpds-sp-node__name {
  font-size: 11.5px;
  font-weight: 600;
  text-align: center;
  line-height: 1.3;
  word-break: break-word;
}
.erpds-sp-node__detail {
  font-size: 10.5px;
  color: var(--erpds-text-muted, #666);
  text-align: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
/* Линия-коннектор между узлами */
.erpds-sp-connector {
  flex: 1;
  min-width: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}
.erpds-sp-connector__line {
  width: 100%;
  height: 2px;
  background: var(--erpds-ok, #2E8540);
  border-radius: 1px;
  position: relative;
}
.erpds-sp-connector__line::before {
  content: "";
  position: absolute;
  left: 50%; top: -3px;
  width: 8px; height: 8px;
  background: var(--erpds-ok, #2E8540);
  border-radius: 50%;
  transform: translateX(-50%);
}
.erpds-sp-connector__label {
  font-size: 10px;
  color: var(--erpds-text-muted, #666);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: nowrap;
}
/* Загрузка / ошибка */
.erpds-sp-loading, .erpds-sp-error, .erpds-sp-empty {
  text-align: center;
  padding: 24px 20px;
  color: var(--erpds-text-muted, #666);
  font-size: 13px;
}
.erpds-sp-error { color: var(--erpds-bad, #B62A26); }

/* Карточка с правой кнопкой-плюсом в заголовке */
.erpds-card__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: var(--erpds-radius-xs);
  background: var(--erpds-bg-2, #F4F6FA);
  color: var(--erpds-text-muted, #666);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: var(--erpds-transition, all 0.2s ease);
}
.erpds-card__action:hover {
  background: var(--erpds-accent, #2A6AE0);
  color: var(--erpds-text-on-accent, #fff);
}
.erpds-card__action:focus-visible,
.erpds-ping-btn:focus-visible,
.erpds-history-toggle:focus-visible {
  outline: 2px solid var(--erpds-accent, #1a73e8);
  outline-offset: 2px;
}
.erpds-card__action--disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

/* SMS-бейдж согласия */
.erpds-sms-badge {
  margin-top: 10px;
  padding: 8px 10px;
  background: var(--erpds-bg-2, #F4F6FA);
  border-radius: var(--erpds-radius-sm);
  font-size: 11.5px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--erpds-text, #333);
  min-width: 0;
  overflow-wrap: anywhere;
}
.erpds-sms-badge__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.erpds-sms-badge--ok .erpds-sms-badge__dot { background: var(--erpds-ok, #2E8540); }
.erpds-sms-badge--off .erpds-sms-badge__dot { background: var(--erpds-bad, #C0392B); }
.erpds-sms-badge--off { color: var(--erpds-text-muted, #666); }

/* Feed-card обёртка */
.erpds-feed-card .erpds-feed { padding: 0; }

/* Связи: count + items */
.erpds-links-count {
  margin-left: auto;
  flex: 0 0 auto;
  color: var(--erpds-text-faint, #6B7280);
  font-weight: 400;
  font-size: 11px;
}
.erpds-links-label {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.erpds-links-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 5px 0;
  font-size: 12px;
  min-width: 0;
}
.erpds-links-item__id {
  flex: 0 1 auto;
  min-width: 0;
  color: var(--erpds-accent-text, #2A6AE0);
  font-weight: 600;
  text-decoration: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  overflow-wrap: anywhere;
  transition: var(--erpds-transition, all 0.2s ease);
}
.erpds-links-item__name {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
}
.erpds-links-badge {
  flex: 0 0 auto;
  font-size: 10.5px;
  padding: 1px 6px;
  border-radius: var(--erpds-radius-xs);
  white-space: nowrap;
}
.erpds-links-badge--ok    { background: #E6F4EA; color: var(--erpds-ok, #2E8540); }
.erpds-links-badge--info  { background: #E5EEFB; color: var(--erpds-accent, #2A6AE0); }
.erpds-links-badge--muted { background: var(--erpds-bg-2, #F4F6FA); color: var(--erpds-text-muted, #666); }

/* Двухколоночный danger panel */
.erpds-danger-cols {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}
.erpds-danger-col-actions { flex: 1; }
.erpds-danger-col-label {
  font-size: 11px;
  color: var(--erpds-text-faint, #6B7280);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}
.erpds-danger-col-delete { flex: 1.4; }
.erpds-delete-warn {
  padding: 10px 12px;
  background: var(--erpds-warn-soft, #FFF8EC);
  border: 1px solid var(--erpds-warn-border, #F4D9A8);
  border-radius: var(--erpds-radius-sm);
}
.erpds-delete-warn__header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}
.erpds-delete-warn__header strong {
  font-size: 12px;
  color: var(--erpds-hold-text, #7A540B);
}
.erpds-delete-warn__text {
  font-size: 11.5px;
  color: var(--erpds-hold-text, #7A540B);
  line-height: 1.4;
}

/* Ping badge in IP/MAC card */
.erpds-ping-btn {
  margin-left: auto;
  flex: 0 0 auto;
  background: none;
  border: 1px solid var(--erpds-border, #e0e0e0);
  border-radius: var(--erpds-radius-sm);
  padding: 2px 8px;
  cursor: pointer;
  font-size: 11px;
  color: var(--erpds-text-muted, #666);
  transition: var(--erpds-transition, all 0.2s ease);
}
.erpds-ping-btn:hover { background: var(--erpds-surface-alt, #f5f5f5); color: var(--erpds-text, #333); }
.erpds-ping-btn:disabled { opacity: 0.5; cursor: default; transition: none; }
.erpds-ping-result {
  margin-top: 8px;
  padding: 8px 10px;
  background: var(--erpds-surface-alt, #f5f5f5);
  border-radius: var(--erpds-radius-sm);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.erpds-ping-loading { color: var(--erpds-text-muted, #888); }
.erpds-ping-fail { color: var(--erpds-bad, #c0392b); }

/* Доступность (reachability): бейдж + панель «Подробно» */
.erpds-reach { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; font-weight: 600; }
.erpds-reach--ok { background: var(--erpds-ok-bg, #e6f4ea); color: var(--erpds-ok, #2E8540); }
.erpds-reach--warn { background: var(--erpds-warn-bg, #fff4e5); color: var(--erpds-warn, #b15c00); }
.erpds-reach--fail { background: var(--erpds-err-bg, #fde7e7); color: var(--erpds-err, #c52022); }
.erpds-reach--muted { background: var(--erpds-muted-bg, #eef1f4); color: var(--erpds-muted, #5b6770); }
.erpds-reach-chips { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-left: 8px; vertical-align: middle; }
.erpds-reach-chip { display: inline-block; padding: 1px 6px; border-radius: 6px; font-size: 11px; font-weight: 600; line-height: 16px; cursor: help; }
.erpds-reach-chip--ok { background: var(--erpds-ok-bg, #e6f4ea); color: var(--erpds-ok, #2E8540); }
.erpds-reach-chip--fail { background: var(--erpds-err-bg, #fde7e7); color: var(--erpds-err, #c52022); }
.erpds-reach-chip--skip { background: var(--erpds-muted-bg, #eef1f4); color: var(--erpds-muted, #5b6770); }
.erpds-reach-tech { color: var(--erpds-muted, #5b6770); font-size: 11px; opacity: 0.85; }
.erpds-reach-more { margin-left: 6px; font-size: 12px; cursor: pointer; }
.erpds-reach-panel { margin-top: 8px; padding: 8px 10px; border: 1px solid var(--erpds-border, #e1e5ea); border-radius: 8px; font-family: monospace; font-size: 12px; }
.erpds-reach-title { font-weight: 600; margin-bottom: 6px; }
.erpds-reach-row { display: flex; gap: 8px; padding: 1px 0; }
.erpds-reach-name { width: 64px; flex: 0 0 64px; color: var(--erpds-muted, #5b6770); }
.erpds-reach-sym { width: 14px; flex: 0 0 14px; text-align: center; }
.erpds-reach-detail { flex: 1 1 auto; overflow-wrap: anywhere; }
.erpds-ipmac-card .erpds-ping-result .label_wait {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: auto;
  min-height: 28px;
  height: auto;
  margin: 0;
  padding: 5px 9px;
  border: 1px solid var(--erpds-warn-border, #F2D48A);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-warn-soft, #FFF8E5);
  color: var(--erpds-warn-text, #7A4B00);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
}
.erpds-ipmac-card .erpds-ping-result .label_wait .us-icon,
.erpds-ipmac-card .erpds-ping-result .label_wait i {
  color: currentColor;
  font-size: 12px;
}
.erpds-ping-after-mac {
  display: inline-block;
  max-width: 100%;
  margin-top: 8px;
  overflow-wrap: anywhere;
}
.erpds-ping-partial-summary {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.erpds-ping-prefix { color: var(--erpds-text-faint, #9ca3af); }
.erpds-ping-time--ok      { color: var(--erpds-ok, #2e8540); font-weight: 600; }
.erpds-ping-time--neutral { color: var(--erpds-text, #1f2937); font-weight: 600; }
.erpds-ping-time--warn    { color: var(--erpds-warn, #b45309); font-weight: 600; }

/* Hero inline edit button */
.erpds-hero-edit-btn {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  vertical-align: middle;
  color: var(--erpds-text-muted, #999);
  font-size: 13px;
  text-decoration: none;
  opacity: 0.5;
  transition: var(--erpds-transition, all 0.2s ease);
}
.erpds-hero-edit-btn:hover { opacity: 1; color: var(--erpds-accent, #1a73e8); }

/* Связи и кампании — кампании */
.erpds-links-dot { display:inline-block; width:6px; height:6px; border-radius:50%; flex-shrink:0; }
.erpds-links-dot--ok { background:var(--erpds-ok,#2E8540); }
.erpds-links-dot--off { background:var(--erpds-text-muted,#aaa); }
.erpds-links-until {
  margin-left: auto;
  flex: 0 0 auto;
  font-size: 10.5px;
  color: var(--erpds-text-muted,#888);
}
.erpds-links-actions-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.erpds-links-action--warn {
  color: var(--erpds-warn-dark,#c0392b) !important;
  border-color: var(--erpds-warn-border, #F4D9A8);
  background: var(--erpds-warn-soft, #FFF8EC);
}
.erpds-links-action--warn:hover {
  color: var(--erpds-warn-dark,#9A3412) !important;
  background: var(--erpds-warn-soft-hover, #FBEFD8);
}

/* ── История уровней сигнала ONU ─────────────────────────────────────────── */
.erpds-history-toggle {
    background: none;
    border: 1px solid var(--erpds-accent-text, #1976d2);
    padding: 2px 9px;
    border-radius: 20px;
    font-size: 10.5px;
    color: var(--erpds-accent-text, #1976d2);
    cursor: pointer;
    font-family: inherit;
    margin-left: auto;
    line-height: 1.4;
    transition: var(--erpds-transition, all 0.2s ease);
}
.erpds-history-toggle:hover {
    background: var(--erpds-accent-text, #1976d2);
    color: var(--erpds-text-on-accent, #fff);
}
.erpds-signal-history {
    border-top: 1px solid var(--erpds-border, #e0e0e0);
    padding: 12px 16px 14px;
    container-type: inline-size;
}
.erpds-signal-history__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}
.erpds-sh-heading {
    color: var(--erpds-text, #111827);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.25;
    white-space: nowrap;
}
.erpds-signal-history__periods,
.erpds-signal-history__tabs {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px;
    border: 1px solid var(--erpds-border, #e0e0e0);
    border-radius: var(--erpds-radius-sm, 6px);
    background: var(--erpds-bg-2, #f4f6fa);
}
.erpds-sh-period,
.erpds-sh-tab {
    background: none;
    border: 0;
    border-radius: var(--erpds-radius-sm, 6px);
    min-height: 24px;
    padding: 3px 10px;
    font-size: 11px;
    color: var(--erpds-text-muted, #888);
    cursor: pointer;
    font-family: inherit;
    font-weight: 700;
    line-height: 1.25;
    transition: var(--erpds-transition, all 0.2s ease);
}
.erpds-sh-period:hover,
.erpds-sh-tab:hover {
    background: var(--erpds-surface, #fff);
    color: var(--erpds-text, #222);
}
.erpds-sh-period--active,
.erpds-sh-tab--active {
    background: var(--erpds-accent-text, #1976d2);
    color: var(--erpds-text-on-accent, #fff);
    box-shadow: var(--erpds-shadow-sm, 0 1px 2px rgba(15,23,42,0.04));
}
.erpds-sh-summary {
    margin: 0 0 10px;
}
.erpds-sh-stat-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}
.erpds-sh-stat {
    min-width: 0;
    padding: 7px 9px;
    border: 1px solid var(--erpds-border-light, #eef1f5);
    border-radius: var(--erpds-radius-sm, 6px);
    background: var(--erpds-surface, #fff);
}
.erpds-sh-stat__label {
    display: block;
    margin-bottom: 3px;
    color: var(--erpds-text-muted, #525a66);
    font-size: 10px;
    font-weight: 800;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}
.erpds-sh-stat__value {
    display: block;
    color: var(--erpds-text, #111827);
    font-size: 16px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: 0;
    overflow-wrap: anywhere;
    font-variant-numeric: tabular-nums;
}
.erpds-sh-stat__value--ok { color: var(--erpds-ok-text, #166534); }
.erpds-sh-stat__value--warn { color: var(--erpds-warn-text, #92400e); }
.erpds-sh-stat__value--err { color: var(--erpds-err-text, #991b1b); }
.erpds-sh-summary__note {
    margin-top: 7px;
    color: var(--erpds-text-muted, #525a66);
    font-size: 12px;
    line-height: 1.35;
}
.erpds-sh-quality,
.erpds-sh-episodes {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    margin-top: 7px;
    color: var(--erpds-text-muted, #525a66);
    font-size: 11.5px;
    line-height: 1.3;
}
.erpds-sh-quality span,
.erpds-sh-episodes strong {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 2px 8px;
    border: 1px solid var(--erpds-border-light, #eef1f5);
    border-radius: var(--erpds-radius-pill, 999px);
    background: var(--erpds-bg-2, #f4f6fa);
    white-space: nowrap;
}
.erpds-sh-quality strong {
    color: var(--erpds-text, #111827);
    font-weight: 800;
}
.erpds-sh-episodes span {
    color: var(--erpds-text-muted, #525a66);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.erpds-sh-episodes strong {
    color: var(--erpds-text, #111827);
    font-weight: 800;
}
.erpds-sh-chart-frame {
    position: relative;
    min-height: 178px;
    padding: 10px 12px 8px;
    border: 1px solid var(--erpds-border-light, #eef1f5);
    border-radius: var(--erpds-radius, 8px);
    background: var(--erpds-surface, #fff);
    overflow: hidden;
}
.erpds-sh-chart {
    min-height: 150px;
}
.erpds-sh-svg {
    display: block;
    width: 100%;
    height: 150px;
    overflow: visible;
}
.erpds-sh-zone-labels {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    margin: -2px 18px 0 36px;
    color: var(--erpds-text-muted, #525a66);
    font-size: 9.5px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0;
    white-space: nowrap;
}
.erpds-sh-zone-labels span { text-align: center; }
.erpds-sh-point-label {
    fill: var(--erpds-text, #111827);
    font-size: 13px;
    font-weight: 800;
    paint-order: stroke;
    stroke: var(--erpds-surface, #fff);
    stroke-width: 4px;
    stroke-linejoin: round;
}
.erpds-sh-single-note,
.erpds-sh-stats {
    margin: 0 0 6px;
    color: var(--erpds-text-muted, #525a66);
    font-size: 12px;
    line-height: 1.35;
}
.erpds-sh-tooltip {
    position: absolute;
    display: none;
    z-index: 99;
    padding: 4px 8px;
    border-radius: var(--erpds-radius-sm, 6px);
    background: rgba(17, 24, 39, 0.88);
    color: #fff;
    font-size: 11px;
    white-space: nowrap;
    pointer-events: none;
}
.erpds-sh-loading,
.erpds-sh-empty-state {
    display: flex;
    min-height: 128px;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    color: var(--erpds-text-muted, #525a66);
    font-size: 12px;
    line-height: 1.35;
}
.erpds-sh-empty-state strong {
    color: var(--erpds-text, #111827);
    font-size: 14px;
}
.erpds-sh-empty-state--error strong {
    color: var(--erpds-err-text, #991b1b);
}
.erpds-sh-loading, .erpds-sh-empty { font-size: 12px; color: var(--erpds-text-muted, #888); padding: 8px 0; }
.erpds-sh-list {
    margin-top: 10px;
}
.erpds-sh-list-rows {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.erpds-sh-list-row {
    display: grid;
    grid-template-columns: minmax(160px, 1fr) 110px 92px 76px;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid var(--erpds-border-light, #eef1f5);
    border-radius: var(--erpds-radius-sm, 6px);
    background: var(--erpds-surface, #fff);
    font-size: 12px;
}
.erpds-sh-list-row__time {
    min-width: 0;
}
.erpds-sh-list-row__time strong,
.erpds-sh-list-row__time span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.erpds-sh-list-row__time strong {
    color: var(--erpds-text, #111827);
    font-weight: 700;
}
.erpds-sh-list-row__time span,
.erpds-sh-list-row__dur {
    color: var(--erpds-text-muted, #525a66);
    font-size: 11px;
}
.erpds-sh-list-row__rx {
    text-align: right;
    font-size: 16px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}
.erpds-sh-list-row__rx--ok { color: var(--erpds-ok-text, #166534); }
.erpds-sh-list-row__rx--warn { color: var(--erpds-warn-text, #92400e); }
.erpds-sh-list-row__rx--err { color: var(--erpds-err-text, #991b1b); }
.erpds-sh-zone-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 22px;
    padding: 2px 8px;
    border-radius: var(--erpds-radius-pill, 999px);
    font-size: 10.5px;
    font-weight: 800;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.erpds-sh-zone-pill--ok {
    background: var(--erpds-ok-soft, #f0fdf4);
    color: var(--erpds-ok-text, #166534);
}
.erpds-sh-zone-pill--warn {
    background: var(--erpds-warn-soft, #fff7ed);
    color: var(--erpds-warn-text, #92400e);
}
.erpds-sh-zone-pill--err {
    background: var(--erpds-err-soft, #fef2f2);
    color: var(--erpds-err-text, #991b1b);
}
.erpds-sh-list-more {
    align-self: flex-start;
    margin-top: 8px;
    min-height: 28px;
    padding: 4px 10px;
    border: 1px solid var(--erpds-border, #dde1e8);
    border-radius: var(--erpds-radius-sm, 6px);
    background: var(--erpds-surface, #fff);
    color: var(--erpds-accent-text, #155aaa);
    font: inherit;
    font-size: 11.5px;
    font-weight: 800;
    cursor: pointer;
}
.erpds-sh-list-more:hover {
    background: var(--erpds-accent-soft, #deedf5);
    border-color: var(--erpds-accent-soft-hover, #cce0ed);
}
.erpds-sh-table { width: 100%; font-size: 11.5px; border-collapse: collapse; }
.erpds-sh-table th {
    text-align: left;
    font-weight: 600;
    color: var(--erpds-text-muted, #888);
    border-bottom: 1px solid var(--erpds-border, #e0e0e0);
    padding: 3px 6px 4px;
}
.erpds-sh-table td {
    padding: 3px 6px;
    border-bottom: 1px solid var(--erpds-border, #f0f0f0);
    font-family: var(--erpds-mono, monospace);
    white-space: nowrap;
}
.erpds-sh-table tr:last-child td { border-bottom: none; }
/* Rx dBm (последний столбец) — правое выравнивание + tabular-nums для сравнения значений сигнала */
.erpds-sh-table th:last-child,
.erpds-sh-table td:last-child {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

@container (max-width: 560px) {
  .erpds-signal-history__toolbar {
    flex-wrap: wrap;
  }
  .erpds-sh-heading {
    flex-basis: 100%;
  }
  .erpds-signal-history__periods,
  .erpds-signal-history__tabs {
    width: fit-content;
  }
  .erpds-sh-stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .erpds-sh-stat__value {
    font-size: 15px;
  }
  .erpds-sh-stat--rx {
    grid-column: span 2;
  }
  .erpds-sh-list-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .erpds-sh-zone-pill,
  .erpds-sh-list-row__dur {
    justify-self: start;
  }
}

@container (max-width: 360px) {
  .erpds-signal-history__toolbar {
    align-items: stretch;
    flex-direction: column;
  }
}

/* Переходы без токена — отключаем при prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .erpds-dangerous-caret {
    transition: none;
  }
}

/* === V-004: Touch hit-area 44px на pointer:coarse (Apple HIG / Material) ===
   Mouse-устройства точны → 40px tab достаточно. Touch (палец ~10mm) → 44×44 min.
   Аддитивно — применяется только когда основной указатель грубый. */
@media (pointer: coarse) {
  ul#navigation li a:link,
  ul#navigation li a:visited,
  ul#navigation2 li a:link,
  ul#navigation2 li a:visited {
    min-height: 44px !important;
  }
}

/* ============================================================
   EDIT MODE — form UX improvements
   ============================================================ */

/* Нормализация ширины input-ов внутри table_block (override HTML size=).
   color-picker (.iColorPicker) исключён — пара полей цвет/обводка должна
   сохранять компактную ширину size=, а не растягиваться на всю строку. */
.table_block .item input.input_box:not(.iColorPicker),
.table_block .item select.input_box,
.table_block .item textarea.input_box {
  width: calc(100% - 4px);
  box-sizing: border-box;
}

.table_block .item input.input_box.iColorPicker {
  width: auto;
}

/* Заголовок-строка карточки (contacts sidebar, edit mode) */
.erpds-card-title-row {
  display: flex;
  align-items: center;
  padding: 8px 12px 7px;
  border-bottom: 1px solid var(--erpds-border, #e2e8f0);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--erpds-text-faint, #94a3b8);
}

/* Значок «поле контролируется биллингом» */
.erpds-billing-lock {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--erpds-text-faint, #94a3b8);
  background: var(--erpds-bg-2, #f8f9fa);
  border: 1px solid var(--erpds-border, #e2e8f0);
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: 6px;
  vertical-align: middle;
}
.erpds-billing-lock .fa { font-size: 9px; }

/* SMS-переключатель (toggle pill) — edit / new mode */
.erpds-sms-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--erpds-text, #0f172a);
  user-select: none;
}
.erpds-sms-toggle input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 32px;
  height: 18px;
  background: var(--erpds-border, #e2e8f0);
  border-radius: 9px;
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 180ms;
}
.erpds-sms-toggle input[type="checkbox"]::before {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  top: 2px;
  left: 2px;
  transition: left 180ms;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .18);
}
.erpds-sms-toggle input[type="checkbox"]:checked {
  background: var(--erpds-accent, #3b5bdb);
}
.erpds-sms-toggle input[type="checkbox"]:checked::before {
  left: 16px;
}
.erpds-sms-toggle input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--erpds-accent, #3b5bdb);
  outline-offset: 2px;
}

/* Высота multiselect групп — override HTML size="10" */
select[multiple]#groupId {
  height: 130px;
  width: 100%;
  box-sizing: border-box;
}

/* ============================================================
   CUSTOMER CARD TABS — activity / history / support
   ============================================================ */
.erpds-customer-tab {
  min-width: 0;
  padding: var(--erpds-grid-padding-y, 16px) var(--erpds-grid-padding-x, 18px);
  color: var(--erpds-text, #0f172a);
}

.erpds-customer-tab-transition-loading {
  opacity: 0.62;
  pointer-events: none;
  transition: opacity 120ms ease;
}

#dialog_message.erpds-ajax-transition-loading {
  opacity: 0.62;
  pointer-events: none;
  transition: opacity 120ms ease;
}

.erpds-customer-tab .label_h2 {
  display: flex;
  align-items: center;
  min-width: 0;
  margin: 0 0 12px;
  padding: 0;
  color: var(--erpds-text, #0f172a);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.erpds-customer-tab > .div_space,
.erpds-customer-tab .div_space:has(.link_dashed),
.erpds-customer-tab--support > div > .div_space {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
  padding: 0;
  min-width: 0;
}

.erpds-customer-tab .link_dashed,
.erpds-customer-tab .div_space > a,
.erpds-customer-tab .div_space > span > a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid var(--erpds-border, #DDE1E8);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-surface, #fff);
  color: var(--erpds-accent-text, #155aaa);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.erpds-customer-tab .link_dashed:hover,
.erpds-customer-tab .div_space > a:hover,
.erpds-customer-tab .div_space > span > a:hover {
  background: var(--erpds-accent-soft, #deedf5);
  border-color: var(--erpds-accent-soft-hover, #cce0ed);
  color: var(--erpds-accent, #155aaa);
  text-decoration: none;
}

.erpds-customer-tab .link_dashed:focus-visible,
.erpds-customer-tab .div_space > a:focus-visible,
.erpds-customer-tab .div_space > span > a:focus-visible {
  outline: 2px solid var(--erpds-accent, #1a73e8);
  outline-offset: 2px;
}

.erpds-customer-tab table {
  max-width: 100%;
}

.erpds-customer-tab .table_data,
.erpds-customer-tab .table_list_data {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--erpds-border, #DDE1E8);
  border-radius: var(--erpds-radius, 8px);
  background: var(--erpds-surface, #fff);
  box-shadow: var(--erpds-shadow-sm, 0 1px 2px rgba(15,23,42,0.04));
  overflow: hidden;
}

.erpds-customer-tab .table_data th,
.erpds-customer-tab .table_list_data th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 8px 10px;
  background: var(--erpds-bg-2, #F4F6FA);
  color: var(--erpds-text-muted, #525A66);
  border-bottom: 1px solid var(--erpds-border, #DDE1E8);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.erpds-customer-tab .table_data td,
.erpds-customer-tab .table_list_data td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--erpds-border-light, #EEF1F5);
  color: var(--erpds-text, #111827);
  font-size: 12.5px;
  line-height: 1.4;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.erpds-customer-tab .table_data tr:nth-child(even) td,
.erpds-customer-tab .table_list_data tr:nth-child(even) td {
  background: rgba(244, 246, 250, 0.48);
}

.erpds-customer-tab .table_data tr:hover td,
.erpds-customer-tab .table_list_data tr:hover td {
  background: var(--erpds-surface-2, #F6F7F9);
}

.erpds-customer-activity-table {
  position: relative;
  max-width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--erpds-border-light, #EEF1F5);
  overflow: auto !important;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--erpds-radius, 8px);
  background: var(--erpds-surface, #fff);
  scrollbar-width: thin;
}

.erpds-customer-activity-table::after {
  content: "";
  position: sticky;
  right: 0;
  bottom: 0;
  display: block;
  width: 38px;
  height: 1px;
  margin-top: -1px;
  margin-left: auto;
  background: linear-gradient(90deg, rgba(255,255,255,0), var(--erpds-surface, #fff));
  pointer-events: none;
}

.erpds-customer-activity-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  margin: 0 0 10px;
}

.erpds-customer-activity-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  max-width: 100%;
  box-sizing: border-box;
  padding: 6px 10px;
  border: 1px solid var(--erpds-border, #DDE1E8);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-bg-2, #F4F6FA);
  color: var(--erpds-accent-text, #155aaa);
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.25;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.erpds-customer-activity-back > span {
  border-bottom: 0;
}

.erpds-customer-activity-back:hover,
.erpds-customer-activity-back:focus-visible {
  border-color: var(--erpds-accent-soft-hover, #cce0ed);
  background: var(--erpds-accent-soft, #deedf5);
  color: var(--erpds-accent, #155aaa);
  text-decoration: none;
}

.erpds-customer-tab--activity a.link_dashed {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  max-width: 100%;
  box-sizing: border-box;
  padding: 4px 8px;
  border: 1px solid var(--erpds-border, #DDE1E8);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-surface, #fff);
  color: var(--erpds-accent-text, #155aaa);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.erpds-customer-tab--activity a.link_dashed > span {
  border-bottom: 0;
}

.erpds-customer-tab--activity a.link_dashed:hover,
.erpds-customer-tab--activity a.link_dashed:focus-visible {
  border-color: var(--erpds-accent-soft-hover, #cce0ed);
  background: var(--erpds-accent-soft, #deedf5);
  color: var(--erpds-accent, #155aaa);
  text-decoration: none;
}

.erpds-customer-tab--activity .table_data,
.erpds-customer-tab--activity .table_list_data {
  min-width: 1180px;
  table-layout: auto;
}

.erpds-customer-activity-table .table_data,
.erpds-customer-activity-table .table_list_data {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.erpds-customer-tab--activity .table_data td,
.erpds-customer-tab--activity .table_list_data td {
  text-align: center;
  min-width: 28px;
}

.erpds-customer-tab--activity .table_data td.act_color,
.erpds-customer-tab--activity .table_list_data td.act_color {
  width: auto !important;
  min-width: 30px;
  padding: 7px 6px !important;
  position: static;
  color: transparent;
  background: transparent !important;
  overflow: hidden;
}

.erpds-customer-tab--activity .table_data td.act_color.ok,
.erpds-customer-tab--activity .table_list_data td.act_color.ok {
  color: var(--erpds-ok-text, #166534);
  background: var(--erpds-ok-soft, #f0fdf4) !important;
  box-shadow: inset 0 0 0 1px var(--erpds-ok-border, #86efac);
  font-weight: 700;
}

.erpds-customer-tab--activity .table_data td.act_color.bad,
.erpds-customer-tab--activity .table_list_data td.act_color.bad {
  color: transparent;
  background: transparent !important;
  box-shadow: none;
}

.erpds-customer-tab--activity .table_data td.act_color .arrow,
.erpds-customer-tab--activity .table_list_data td.act_color .arrow {
  display: none !important;
}

.erpds-customer-tab--activity .table_data td.act_color::before,
.erpds-customer-tab--activity .table_data td.act_color::after,
.erpds-customer-tab--activity .table_list_data td.act_color::before,
.erpds-customer-tab--activity .table_list_data td.act_color::after {
  display: none !important;
  content: none !important;
}

.erpds-customer-tab--activity .table_data td:first-child,
.erpds-customer-tab--activity .table_list_data td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--erpds-surface, #fff);
  text-align: left;
  width: 128px;
  min-width: 128px;
  font-weight: 600;
  box-shadow: 1px 0 0 var(--erpds-border-light, #EEF1F5);
}

.erpds-customer-tab--activity .table_data th:first-child,
.erpds-customer-tab--activity .table_list_data th:first-child {
  position: sticky;
  left: 0;
  z-index: 3;
  width: 128px;
  min-width: 128px;
  box-shadow: 1px 0 0 var(--erpds-border-light, #EEF1F5);
}

.erpds-customer-tab--activity .table_data td:first-child .link_dashed,
.erpds-customer-tab--activity .table_list_data td:first-child .link_dashed {
  white-space: normal;
}

.erpds-customer-tab--history .table_data td:first-child,
.erpds-customer-tab--history .table_list_data td:first-child {
  width: 150px;
  color: var(--erpds-text-muted, #525A66);
  font-family: var(--erpds-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: 11.5px;
  white-space: nowrap;
}

.erpds-customer-tab--history .table_data,
.erpds-customer-tab--history .table_list_data {
  width: 100%;
  border: 0 !important;
  border-collapse: separate !important;
  border-spacing: 0 6px !important;
  background: transparent !important;
  box-shadow: none !important;
}

.erpds-customer-tab--history .table_data th,
.erpds-customer-tab--history .table_list_data th,
.erpds-customer-tab--history .table_data tr.table_legend td,
.erpds-customer-tab--history .table_list_data tr.table_legend td {
  padding: 5px 10px 7px !important;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  color: var(--erpds-text-muted, #6B7280);
  font-size: 10.5px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.erpds-customer-tab--history .table_data td,
.erpds-customer-tab--history .table_list_data td {
  padding: 8px 10px !important;
  border: 0 !important;
  background: var(--erpds-surface, #fff) !important;
  color: var(--erpds-text, #111827);
  font-size: 12.5px;
  line-height: 1.35;
  vertical-align: top;
}

.erpds-customer-tab--history .table_data tr.table_legend td,
.erpds-customer-tab--history .table_list_data tr.table_legend td {
  border-radius: 0 !important;
}

.erpds-customer-tab--history .table_data tr,
.erpds-customer-tab--history .table_list_data tr {
  background: transparent !important;
}

.erpds-customer-tab--history .table_data tr:not(.table_legend):not(:has(th)) td,
.erpds-customer-tab--history .table_list_data tr:not(.table_legend):not(:has(th)) td {
  box-shadow: 0 1px 0 var(--erpds-border-light, #EEF1F5), 0 -1px 0 var(--erpds-border-light, #EEF1F5);
}

.erpds-customer-tab--history .table_data tr:not(.table_legend):not(:has(th)) td:first-child,
.erpds-customer-tab--history .table_list_data tr:not(.table_legend):not(:has(th)) td:first-child {
  border-radius: var(--erpds-radius-sm, 6px) 0 0 var(--erpds-radius-sm, 6px);
  box-shadow: -1px 0 0 var(--erpds-border-light, #EEF1F5), 0 1px 0 var(--erpds-border-light, #EEF1F5), 0 -1px 0 var(--erpds-border-light, #EEF1F5);
}

.erpds-customer-tab--history .table_data tr:not(.table_legend):not(:has(th)) td:last-child,
.erpds-customer-tab--history .table_list_data tr:not(.table_legend):not(:has(th)) td:last-child {
  border-radius: 0 var(--erpds-radius-sm, 6px) var(--erpds-radius-sm, 6px) 0;
  box-shadow: 1px 0 0 var(--erpds-border-light, #EEF1F5), 0 1px 0 var(--erpds-border-light, #EEF1F5), 0 -1px 0 var(--erpds-border-light, #EEF1F5);
}

.erpds-customer-tab--history .table_data tr:not(.table_legend):not(:has(th)):hover td,
.erpds-customer-tab--history .table_list_data tr:not(.table_legend):not(:has(th)):hover td {
  background: var(--erpds-bg-2, #F4F6FA) !important;
}

.erpds-customer-tab--history .table_data th:first-child,
.erpds-customer-tab--history .table_list_data th:first-child,
.erpds-customer-tab--history .table_data th:nth-child(2),
.erpds-customer-tab--history .table_list_data th:nth-child(2) {
  text-align: left;
}

.erpds-customer-tab--history .table_data td:nth-child(2),
.erpds-customer-tab--history .table_list_data td:nth-child(2) {
  min-width: 220px;
  font-weight: 650;
}

.erpds-customer-tab--history .table_data td:nth-child(3),
.erpds-customer-tab--history .table_list_data td:nth-child(3) {
  color: var(--erpds-text, #111827);
  font-family: var(--erpds-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.erpds-customer-tab--history .table_data td:last-child,
.erpds-customer-tab--history .table_list_data td:last-child {
  color: var(--erpds-text-muted, #525A66);
  line-height: 1.45;
}

.erpds-customer-history-actions {
  display: flex;
  justify-content: flex-start;
  min-width: 0;
  margin: 0 0 10px;
}

.erpds-customer-history-actions + .erpds-customer-history-actions {
  margin-top: -4px;
}

.erpds-customer-history-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  max-width: 100%;
  box-sizing: border-box;
  padding: 6px 10px;
  border: 1px solid var(--erpds-border, #DDE1E8);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-bg-2, #F4F6FA);
  color: var(--erpds-accent-text, #155aaa);
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.25;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.erpds-customer-history-action > span {
  border-bottom: 0;
}

.erpds-customer-history-action:hover,
.erpds-customer-history-action:focus-visible {
  border-color: var(--erpds-accent-soft-hover, #cce0ed);
  background: var(--erpds-accent-soft, #deedf5);
  color: var(--erpds-accent, #155aaa);
  text-decoration: none;
}

.erpds-customer-tab--support > div {
  max-width: 100%;
}

.erpds-customer-tab--support .erpds-support-composer {
  max-width: 860px;
  margin: 0 auto 18px;
  overflow: hidden;
  border: 1px solid var(--erpds-border, #DDE1E8);
  border-radius: var(--erpds-radius, 8px);
  background: var(--erpds-surface, #fff);
  box-shadow: var(--erpds-shadow-sm, 0 1px 2px rgba(15,23,42,0.04));
}

.erpds-customer-tab--support .erpds-support-composer-tabs#navigation2 {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--erpds-border, #DDE1E8);
  background: var(--erpds-bg-2, #F4F6FA);
  list-style: none;
}

.erpds-customer-tab--support .erpds-support-composer-tabs#navigation2 li {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.erpds-customer-tab--support .erpds-support-composer-tabs#navigation2 a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 0;
  border-right: 1px solid var(--erpds-border-light, #EEF1F5);
  background: transparent;
  color: var(--erpds-text-muted, #525A66);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.erpds-customer-tab--support .erpds-support-composer-tabs#navigation2 li:last-child a {
  border-right: 0;
}

.erpds-customer-tab--support .erpds-support-composer-tabs#navigation2 li.selected a {
  background: var(--erpds-surface, #fff);
  color: var(--erpds-accent, #155aaa);
  box-shadow: inset 0 -2px 0 var(--erpds-accent, #1476b8);
}

.erpds-customer-tab--support .erpds-support-composer-content {
  padding: 14px 16px 16px;
}

.erpds-customer-tab--support #slider_content2 {
  max-width: 100%;
  margin: 0;
}

.erpds-customer-tab--support .erpds-support-composer-panel {
  display: grid !important;
  gap: 10px;
  min-width: 0;
  margin: 0;
  text-align: left;
}

.erpds-customer-tab--support .erpds-support-composer-title {
  margin: 0 !important;
  padding: 0;
  color: var(--erpds-text-muted, #525A66);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.erpds-customer-tab--support .erpds-support-composer-form {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.erpds-customer-tab--support .erpds-support-composer-form .item {
  display: grid;
  gap: 5px;
  min-width: 0;
  margin: 0;
}

.erpds-customer-tab--support .erpds-support-composer-form .left_data {
  width: auto !important;
  color: var(--erpds-text-muted, #525A66);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.erpds-customer-tab--support .erpds-support-composer-form select,
.erpds-customer-tab--support .erpds-support-composer-form input.input_box {
  width: 100% !important;
  min-width: 0;
  height: 34px;
  box-sizing: border-box;
  margin: 0;
  color: var(--erpds-text, #111827);
  font-size: 13px;
  font-weight: 600;
}

.erpds-customer-tab--support .erpds-support-composer-form--call {
  gap: 8px;
}

.erpds-customer-tab--support .erpds-support-composer-form--call .erpds-support-call-template {
  padding: 8px;
  border: 1px solid var(--erpds-border-light, #EEF1F5);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-bg-2, #F4F6FA);
}

.erpds-customer-tab--support .erpds-support-composer-form--call .erpds-support-call-template select {
  background: var(--erpds-surface, #fff);
}

.erpds-customer-tab--support .erpds-support-call-or {
  display: flex !important;
  align-items: center;
  gap: 9px;
  margin: 0;
  padding: 0;
  color: var(--erpds-text-muted, #6B7280);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.erpds-customer-tab--support .erpds-support-call-or:before,
.erpds-customer-tab--support .erpds-support-call-or:after {
  content: "";
  height: 1px;
  flex: 1 1 auto;
  background: var(--erpds-border-light, #EEF1F5);
}

.erpds-customer-tab--support .erpds-support-call-or .left_data {
  display: none;
}

.erpds-customer-tab--support .erpds-support-call-or .div_center {
  margin: 0 !important;
  padding: 0;
  white-space: nowrap;
}

.erpds-customer-tab--support .erpds-support-call-comment {
  min-width: 0;
}

.erpds-customer-tab--support .erpds-support-sms-phone,
.erpds-customer-tab--support .erpds-support-sms-manual {
  padding: 8px;
  border: 1px solid var(--erpds-border-light, #EEF1F5);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-bg-2, #F4F6FA);
}

.erpds-customer-tab--support .erpds-support-sms-phone select,
.erpds-customer-tab--support .erpds-support-sms-manual input.input_box {
  background: var(--erpds-surface, #fff);
}

.erpds-customer-tab--support .erpds-support-message-comment {
  min-width: 0;
}

.erpds-customer-tab--support .erpds-support-composer-form--sms textarea.textarea_class {
  height: 132px;
  min-height: 118px;
  max-height: 170px;
}

.erpds-customer-tab--support .erpds-support-composer-form--message textarea.textarea_class {
  height: 190px;
  min-height: 150px;
  max-height: 260px;
}

.erpds-customer-tab--support .erpds-support-task-picker {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.erpds-customer-tab--support #slider_content2 .table_block,
.erpds-customer-tab--support #slider_content2 .table_data,
.erpds-customer-tab--support #slider_content2 .table_list_data {
  width: 100%;
}

.erpds-customer-tab--support #slider_content2 .table_block {
  padding: 12px !important;
}

.erpds-customer-tab--support #slider_content2 .table_block .item > div {
  border-bottom: 0;
}

.erpds-customer-tab--support #slider_content2 textarea.textarea_class,
.erpds-customer-tab--support #slider_content2 textarea.input_box {
  width: 100% !important;
  min-height: 118px;
  max-height: 220px;
  resize: vertical;
  box-sizing: border-box;
  padding: 9px 10px;
  border: 1px solid var(--erpds-border, #DDE1E8);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-surface, #fff);
  color: var(--erpds-text, #111827);
  font: inherit;
  line-height: 1.45;
}

.erpds-customer-tab--support .erpds-support-composer-form--call textarea.textarea_class {
  height: 150px;
  min-height: 132px;
  max-height: 180px;
}

.erpds-customer-tab--support .erpds-support-composer-hint {
  display: block;
  width: auto;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid var(--erpds-border-light, #EEF1F5);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-bg-2, #F4F6FA);
  color: var(--erpds-text-muted, #525A66);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
  text-align: left;
}

.erpds-customer-tab--support .erpds-support-composer-actions {
  display: flex;
  justify-content: center;
  min-width: 0;
}

.erpds-customer-tab--support .erpds-support-composer-actions .div_center {
  display: flex !important;
  align-items: center;
  justify-content: center;
  margin: 0 !important;
}

.erpds-customer-tab--support .erpds-support-task-type-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.erpds-customer-tab--support .erpds-support-task-type-item {
  display: grid !important;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
  width: auto !important;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid var(--erpds-border-light, #EEF1F5);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-bg-2, #F4F6FA);
}

.erpds-customer-tab--support .erpds-support-task-type-list > br {
  display: none;
}

.erpds-customer-tab--support .erpds-support-task-type-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  min-width: 0;
  color: var(--erpds-text-muted, #6B7280);
}

.erpds-customer-tab--support .erpds-support-task-type-icon img {
  width: 20px !important;
  max-height: 20px !important;
  margin: 0 !important;
}

.erpds-customer-tab--support .erpds-support-task-type-body {
  min-width: 0;
}

.erpds-customer-tab--support .erpds-support-task-type-link {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: var(--erpds-accent-text, #155aaa);
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.3;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.erpds-customer-tab--support .erpds-support-task-type-link:hover,
.erpds-customer-tab--support .erpds-support-task-type-link:focus-visible {
  color: var(--erpds-accent, #155aaa);
  text-decoration: underline;
}

.erpds-customer-tab--support #slider_content2 input[type="submit"],
.erpds-customer-tab--support #slider_content2 button[type="submit"] {
  min-height: 32px;
  padding: 6px 14px;
  border-radius: var(--erpds-radius-sm, 6px);
}

.erpds-customer-tab--support br:first-child {
  display: none;
}

.erpds-customer-tab--support div[id^="msg_"][id$="_all"] {
  margin: 0 0 12px;
  min-width: 0;
}

.erpds-customer-support-actions {
  display: flex;
  justify-content: flex-start;
  min-width: 0;
  margin: 10px 0 0;
}

.erpds-customer-support-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  max-width: 100%;
  box-sizing: border-box;
  padding: 6px 10px;
  border: 1px solid var(--erpds-border, #DDE1E8);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-bg-2, #F4F6FA);
  color: var(--erpds-accent-text, #155aaa);
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.25;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.erpds-customer-support-action > span {
  border-bottom: 0;
}

.erpds-customer-support-action:hover,
.erpds-customer-support-action:focus-visible {
  border-color: var(--erpds-accent-soft-hover, #cce0ed);
  background: var(--erpds-accent-soft, #deedf5);
  color: var(--erpds-accent, #155aaa);
  text-decoration: none;
}

.erpds-customer-tab--support .erpds-customer-support-task-index {
  display: flex;
  justify-content: flex-start;
  min-width: 0;
  margin: 0 0 8px;
}

.erpds-customer-tab--support .erpds-customer-support-task-index a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  max-width: 100%;
  box-sizing: border-box;
  padding: 6px 10px;
  border: 1px solid var(--erpds-border, #DDE1E8);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-bg-2, #F4F6FA);
  color: var(--erpds-accent-text, #155aaa);
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.25;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.erpds-customer-tab--support .erpds-customer-support-task-index a > span {
  border-bottom: 0;
}

.erpds-customer-tab--support .erpds-customer-support-task-index a:hover,
.erpds-customer-tab--support .erpds-customer-support-task-index a:focus-visible {
  border-color: var(--erpds-accent-soft-hover, #cce0ed);
  background: var(--erpds-accent-soft, #deedf5);
  color: var(--erpds-accent, #155aaa);
  text-decoration: none;
}

.erpds-customer-tab--support .erpds-customer-support-filterbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
  box-sizing: border-box;
  margin: 0 0 12px;
  padding: 8px;
  border: 1px solid var(--erpds-border-light, #EEF1F5);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-bg-2, #F4F6FA);
}

.erpds-customer-tab--support .erpds-customer-support-filter-toggle {
  display: inline-flex;
  min-width: 0;
}

.erpds-customer-tab--support .erpds-customer-support-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  max-width: 100%;
  box-sizing: border-box;
  padding: 5px 9px;
  border: 1px solid var(--erpds-border, #DDE1E8);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-surface, #fff);
  color: var(--erpds-accent-text, #155aaa);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.erpds-customer-tab--support .erpds-customer-support-filter > span {
  border-bottom: 0;
}

.erpds-customer-tab--support .erpds-customer-support-filter:hover,
.erpds-customer-tab--support .erpds-customer-support-filter:focus-visible {
  border-color: var(--erpds-accent-soft-hover, #cce0ed);
  background: var(--erpds-accent-soft, #deedf5);
  color: var(--erpds-accent, #155aaa);
  text-decoration: none;
}

.erpds-customer-tab--support .erpds-support-history-item {
  display: grid;
  gap: 4px;
  min-width: 0;
  margin: 12px 0;
}

.erpds-customer-tab--support .erpds-support-history-item--operator {
  justify-items: start;
}

.erpds-customer-tab--support .erpds-support-history-item--customer {
  justify-items: end;
}

.erpds-customer-tab--support .erpds-support-history-caption {
  max-width: min(680px, 100%);
  margin: 0 0 2px !important;
  color: var(--erpds-text-muted, #525A66) !important;
  font-size: 10.5px;
  font-weight: 900 !important;
  line-height: 1.25;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.erpds-customer-tab--support .erpds-support-history-caption a {
  color: var(--erpds-accent-text, #155aaa);
  text-decoration: none;
}

.erpds-customer-tab--support .erpds-support-history-caption a:hover,
.erpds-customer-tab--support .erpds-support-history-caption a:focus-visible {
  color: var(--erpds-accent, #155aaa);
  text-decoration: underline;
}

.erpds-customer-tab--support .erpds-support-history-card {
  position: relative;
  width: min(680px, 100%) !important;
  max-width: 100% !important;
  min-height: 0 !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  padding: 12px !important;
  border: 1px solid var(--erpds-border-light, #EEF1F5);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-surface, #fff) !important;
  color: var(--erpds-text, #111827);
  font-size: 12.5px;
  line-height: 1.45;
  box-shadow: var(--erpds-shadow-sm, 0 1px 2px rgba(15,23,42,0.04));
  overflow-wrap: anywhere;
}

.erpds-customer-tab--support .erpds-support-history-item--customer .erpds-support-history-row {
  width: 100% !important;
  justify-content: flex-end !important;
}

.erpds-customer-tab--support .erpds-support-history-item--customer .erpds-support-history-card {
  width: fit-content !important;
  max-width: min(360px, 76%) !important;
  background: var(--erpds-accent-soft, #deedf5) !important;
}

.erpds-customer-tab--support .erpds-support-history-item--sms .erpds-support-history-card,
.erpds-customer-tab--support .erpds-support-history-item--call .erpds-support-history-card {
  font-family: var(--erpds-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-variant-numeric: tabular-nums;
}

.erpds-customer-tab--support .erpds-support-history-card .info_block {
  display: block;
  width: auto;
  max-width: 100%;
  box-sizing: border-box;
  margin: 8px 0 0;
  padding: 7px 8px;
  border: 1px solid var(--erpds-border-light, #EEF1F5);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-bg-2, #F4F6FA);
  color: var(--erpds-text-muted, #525A66);
  font-family: var(--erpds-sans);
  font-size: 11.5px;
  font-weight: 650;
  line-height: 1.35;
}

.erpds-customer-tab--support div[id^="msg_"][style*="align-items: flex-start"],
.erpds-customer-tab--support div[id^="msg_"][style*="align-items: flex-end"] {
  margin-top: 0 !important;
}

.erpds-customer-tab--support .div_color_1,
.erpds-customer-tab--support .div_color_2 {
  display: block !important;
  width: fit-content !important;
  max-width: min(760px, 100%);
  padding: 0 !important;
  margin-bottom: 4px !important;
  border: none !important;
  background: transparent !important;
  color: var(--erpds-text-muted, #525A66);
  font-size: 11px;
  font-weight: 700 !important;
  line-height: 1.35;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  overflow-wrap: anywhere;
}

.erpds-customer-tab--support .div_color_1 {
  margin-left: 0 !important;
}

.erpds-customer-tab--support .div_color_2 {
  margin-left: auto !important;
  text-align: right;
}

.erpds-customer-tab--support div[id^="msg_"][id$="_body"].support_history,
.erpds-customer-tab--support div[id^="msg_"][id$="_body"] > .gray_block,
.erpds-customer-tab--support .support_history.erpds-card {
  width: fit-content !important;
  max-width: min(760px, 86%) !important;
  min-width: min(320px, 100%) !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding: 12px 14px !important;
  border: 1px solid var(--erpds-border, #DDE1E8) !important;
  border-radius: var(--erpds-radius, 8px) !important;
  background: var(--erpds-surface, #fff) !important;
  box-shadow: var(--erpds-shadow-sm, 0 1px 2px rgba(15,23,42,0.04)) !important;
  color: var(--erpds-text, #111827);
  line-height: 1.5;
  overflow-wrap: anywhere;
  box-sizing: border-box;
}

.erpds-customer-tab--support .support_history_task_status_1,
.erpds-customer-tab--support .support_history_task_status_2,
.erpds-customer-tab--support .support_history_task_status_3,
.erpds-customer-tab--support .support_history_task_status_4,
.erpds-customer-tab--support .support_history_task_status_5,
.erpds-customer-tab--support .support_history_task_status_6,
.erpds-customer-tab--support .support_history_task_status_7,
.erpds-customer-tab--support .support_history_task_status_8,
.erpds-customer-tab--support .support_history_task_status_9 {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  max-width: 100%;
  padding: 2px 8px;
  border-radius: var(--erpds-radius-pill, 999px);
  background: var(--erpds-bg-2, #F4F6FA);
  color: var(--erpds-text-muted, #525A66);
  border: 1px solid var(--erpds-border-light, #EEF1F5);
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.erpds-customer-tab--support div[id^="msg_"][id$="_body"].support_history {
  margin-right: 14% !important;
}

.erpds-customer-tab--support div[id^="msg_"][id$="_body"] > .gray_block {
  margin-left: auto;
  background: var(--erpds-accent-soft, #deedf5) !important;
  border-color: var(--erpds-accent-soft-hover, #cce0ed) !important;
}

.erpds-customer-tab--support .gray_block .gray_block {
  max-width: 100% !important;
  margin: 10px 0 0 !important;
  padding: 9px 10px !important;
  background: var(--erpds-bg-2, #F4F6FA) !important;
  color: var(--erpds-text-muted, #525A66) !important;
  font-size: 12px !important;
  line-height: 1.45 !important;
}

.erpds-customer-tab--support .info_block {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin-top: 10px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.erpds-customer-tab--support [id^="msg_set_"] {
  display: inline-flex !important;
  gap: 6px;
}

.erpds-customer-tab--support .c_attach_div {
  display: block;
  width: 100%;
  min-height: 0;
  margin: 10px 0 0;
}

.erpds-customer-tab--support .c_attach_div .c_attach_div_right_new {
  width: 100%;
  min-height: 0;
  padding: 8px;
  border-color: var(--erpds-border-light, #EEF1F5);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-bg-2, #F4F6FA);
  overflow: hidden;
}

.erpds-customer-tab--support div[id^="link_upload"] {
  display: flex;
  justify-content: flex-start;
  min-width: 0;
  margin: 8px 0 0;
  padding: 0;
}

.erpds-customer-tab--support #linkAttachFileId {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  max-width: 100%;
  box-sizing: border-box;
  padding: 6px 10px;
  border: 1px solid var(--erpds-border, #DDE1E8);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-surface, #fff);
  color: var(--erpds-accent-text, #155aaa);
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.25;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.erpds-customer-tab--support #linkAttachFileId > span {
  border-bottom: 0;
}

.erpds-customer-tab--support #linkAttachFileId:hover,
.erpds-customer-tab--support #linkAttachFileId:focus-visible {
  border-color: var(--erpds-accent-soft-hover, #cce0ed);
  background: var(--erpds-accent-soft, #deedf5);
  color: var(--erpds-accent, #155aaa);
  text-decoration: none;
}

.erpds-customer-custom-tab {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--erpds-border, #DDE1E8);
  border-radius: var(--erpds-radius, 8px);
  background: var(--erpds-surface, #fff);
  box-shadow: var(--erpds-shadow-sm, 0 1px 2px rgba(15,23,42,0.04));
  overflow: hidden;
}

.erpds-customer-custom-tab--request {
  padding: 10px;
}

.erpds-customer-custom-tab--html {
  display: block;
  min-width: 0;
  box-sizing: border-box;
  padding: 10px;
  overflow: auto;
  scrollbar-width: thin;
}

.erpds-customer-custom-tab--html table,
.erpds-customer-custom-tab--html .table_data,
.erpds-customer-custom-tab--html .table_list_data {
  max-width: 100%;
}

.erpds-customer-custom-tab--html input,
.erpds-customer-custom-tab--html select,
.erpds-customer-custom-tab--html textarea {
  max-width: 100%;
  box-sizing: border-box;
}

.erpds-customer-custom-tab--iframe {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: min(72dvh, 820px);
  min-height: 520px;
}

.erpds-customer-custom-tab__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 8px 10px;
  border-bottom: 1px solid var(--erpds-border-light, #EEF1F5);
  background: var(--erpds-bg-2, #F4F6FA);
}

.erpds-customer-custom-tab__title {
  min-width: 0;
  color: var(--erpds-text, #111827);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.erpds-customer-custom-tab__open {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 4px 8px;
  border: 1px solid var(--erpds-border, #DDE1E8);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-surface, #fff);
  color: var(--erpds-accent-text, #155aaa);
  font-size: 11.5px;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.erpds-customer-custom-tab__open:hover,
.erpds-customer-custom-tab__open:focus-visible {
  border-color: var(--erpds-accent-soft-hover, #cce0ed);
  background: var(--erpds-accent-soft, #deedf5);
  color: var(--erpds-accent, #155aaa);
  text-decoration: none;
}

.erpds-customer-custom-tab-iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  background: var(--erpds-surface, #fff);
}

.erpds-customer-tab--support .erpds-attach-list-wrap {
  max-height: 260px !important;
  overflow: auto !important;
  scrollbar-width: thin;
}

.erpds-customer-tab--support .nGY2,
.erpds-customer-tab--support [data-nanogallery2] {
  display: block !important;
  max-width: 100%;
  min-width: 0;
  margin: 0 0 8px;
  padding: 6px;
  border: 1px solid var(--erpds-border-light, #EEF1F5);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-surface, #fff);
  overflow: hidden;
}

.erpds-customer-tab--support .nGY2Gallery,
.erpds-customer-tab--support .nGY2GallerySub,
.erpds-customer-tab--support .nanoGalleryLBarOff {
  max-width: 100% !important;
  max-height: 132px !important;
  overflow: auto !important;
}

.erpds-customer-tab--support .nGY2GallerySub {
  display: flex !important;
  gap: 6px;
  width: 100% !important;
  height: auto !important;
  white-space: nowrap;
  overflow-x: auto !important;
  overflow-y: hidden !important;
}

.erpds-customer-tab--support .nGY2GThumbnail {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  flex: 0 0 104px !important;
  width: 104px !important;
  height: 104px !important;
  margin: 0 !important;
}

.erpds-customer-tab--support .nGY2GThumbnailImage {
  width: 100px !important;
  height: 100px !important;
}

.erpds-customer-tab--support .erpds-attach-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.erpds-customer-tab--support .erpds-attach-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid var(--erpds-border-light, #EEF1F5);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-surface, #fff);
}

.erpds-customer-tab--support .erpds-attach-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--erpds-border-light, #EEF1F5);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-bg-2, #F4F6FA);
  overflow: hidden;
}

.erpds-customer-tab--support .erpds-attach-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.erpds-customer-tab--support .erpds-attach-preview i {
  color: var(--erpds-text-muted, #525A66);
  font-size: 20px;
}

.erpds-customer-tab--support .erpds-attach-info {
  min-width: 0;
}

.erpds-customer-tab--support .erpds-attach-name {
  display: block;
  color: var(--erpds-accent-text, #155aaa);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.erpds-customer-tab--support .erpds-attach-comment,
.erpds-customer-tab--support .erpds-attach-meta {
  margin-top: 3px;
  color: var(--erpds-text-muted, #525A66);
  font-size: 11.5px;
  line-height: 1.35;
}

.erpds-customer-tab--support .erpds-attach-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.erpds-customer-tab--support .erpds-attach-meta-item,
.erpds-customer-tab--support .erpds-attach-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.erpds-customer-tab--support .erpds-attach-actions {
  justify-content: flex-end;
}

.erpds-customer-tab--support .erpds-attach-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--erpds-radius-sm, 6px);
  color: var(--erpds-text-muted, #525A66);
  text-decoration: none;
}

.erpds-customer-tab--support .erpds-attach-btn:hover {
  background: var(--erpds-accent-soft, #deedf5);
  color: var(--erpds-accent, #155aaa);
}

.erpds-v4 .erpds-customer-tab--support .erpds-attach-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.erpds-v4 .erpds-customer-tab--support .erpds-attach-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
}

.erpds-v4 .erpds-customer-tab--support .erpds-attach-preview {
  width: 42px;
  height: 42px;
}

.erpds-v4 .erpds-customer-tab--support .erpds-attach-info {
  min-width: 0;
}

.erpds-v4 .erpds-customer-tab--support .erpds-attach-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.erpds-v4 .erpds-customer-tab--support .erpds-attach-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.erpds-v4 .erpds-customer-tab--support .erpds-attach-actions {
  justify-content: flex-end;
}

@media (max-width: 700px) {
  .erpds-customer-tab {
    padding: 12px;
  }
  .erpds-customer-page #slider_content_id:has(.erpds-customer-tab) {
    min-height: max(560px, calc(100dvh - 60px));
    box-sizing: border-box;
  }
  .erpds-customer-tab--history .table_data,
  .erpds-customer-tab--history .table_list_data {
    display: block;
    overflow-x: auto;
    scrollbar-width: thin;
  }
  .erpds-customer-tab--activity .table_data td:first-child,
  .erpds-customer-tab--activity .table_list_data td:first-child,
  .erpds-customer-tab--activity .table_data th:first-child,
  .erpds-customer-tab--activity .table_list_data th:first-child {
    width: 104px;
    min-width: 104px;
  }
  .erpds-customer-tab--activity .table_data,
  .erpds-customer-tab--activity .table_list_data {
    min-width: 760px;
  }
  .erpds-customer-tab--activity .table_data td,
  .erpds-customer-tab--activity .table_list_data td,
  .erpds-customer-tab--activity .table_data th,
  .erpds-customer-tab--activity .table_list_data th {
    min-width: 24px;
    padding: 6px 5px;
    font-size: 11px;
  }
  .erpds-customer-tab--support div[id^="msg_"][id$="_body"].support_history,
  .erpds-customer-tab--support div[id^="msg_"][id$="_body"] > .gray_block,
  .erpds-customer-tab--support .support_history.erpds-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 10px 11px !important;
    font-size: 12.5px;
    line-height: 1.45;
  }
  .erpds-customer-tab--support .div_color_2 {
    margin-left: 0 !important;
    text-align: left;
  }
  .erpds-customer-tab--support #slider_content2 {
    margin-bottom: 12px;
  }
  .erpds-customer-tab--support .erpds-support-composer-tabs#navigation2 {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .erpds-customer-tab--support .erpds-support-composer-tabs#navigation2 a {
    min-width: 0 !important;
    max-width: none !important;
    min-height: 34px;
    border-right: 0;
    border-bottom: 1px solid var(--erpds-border-light, #EEF1F5);
    white-space: normal !important;
  }
  .erpds-customer-tab--support .erpds-support-composer-tabs#navigation2 li:last-child a {
    border-bottom: 0;
  }
  .erpds-customer-tab--support .erpds-support-composer-content {
    padding: 10px;
  }
  .erpds-customer-tab--support .erpds-support-task-type-list {
    grid-template-columns: minmax(0, 1fr);
  }
  .erpds-customer-tab--support #slider_content2 textarea.textarea_class,
  .erpds-customer-tab--support #slider_content2 textarea.input_box {
    min-height: 110px;
    max-height: 150px;
  }
  .erpds-customer-custom-tab--request {
    padding: 8px;
  }
  .erpds-customer-custom-tab--html {
    padding: 8px;
  }
  .erpds-customer-custom-tab--html table,
  .erpds-customer-custom-tab--html .table_data,
  .erpds-customer-custom-tab--html .table_list_data {
    display: block;
    overflow-x: auto;
    scrollbar-width: thin;
  }
  .erpds-customer-custom-tab--iframe {
    height: 70dvh;
    min-height: 420px;
  }
  .erpds-customer-custom-tab__bar {
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 7px 8px;
  }
  .erpds-customer-custom-tab__title {
    flex: 1 1 180px;
  }
  .erpds-customer-custom-tab__open {
    min-height: 24px;
  }
  .erpds-customer-tab--support .erpds-attach-item,
  .erpds-v4 .erpds-customer-tab--support .erpds-attach-item {
    grid-template-columns: 38px minmax(0, 1fr);
  }
  .erpds-customer-tab--support .erpds-attach-actions,
  .erpds-v4 .erpds-customer-tab--support .erpds-attach-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
  .erpds-customer-tab--support .erpds-attach-preview,
  .erpds-v4 .erpds-customer-tab--support .erpds-attach-preview {
    width: 38px;
    height: 38px;
  }
  .erpds-files-body {
    padding: 10px;
  }
  .erpds-files-body .erpds-attach-item,
  .erpds-v4 .erpds-files-body .erpds-attach-item {
    grid-template-columns: 38px minmax(0, 1fr);
  }
  .erpds-files-body .erpds-attach-actions,
  .erpds-v4 .erpds-files-body .erpds-attach-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
  .erpds-files-body .erpds-attach-preview,
  .erpds-v4 .erpds-files-body .erpds-attach-preview {
    width: 38px;
    height: 38px;
  }
}

/* Customer list opened from a device card: keep the source object visible. */
body.erpds-route-customer-device-relation #main_content {
  min-height: calc(100dvh - 170px);
  box-sizing: border-box;
}

body.erpds-route-customer-device-relation .erpds-device-relation-context {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  box-sizing: border-box;
  margin: 0 0 10px;
  padding: 10px 12px;
  border: 1px solid var(--erpds-border, #d9e0ea);
  border-radius: var(--erpds-radius, 8px);
  background: var(--erpds-surface, #fff);
  box-shadow: var(--erpds-shadow-sm, 0 1px 2px rgba(15, 23, 42, 0.06));
}

body.erpds-route-customer-device-relation .erpds-device-relation-context__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-accent-soft, #e8f1ff);
  color: var(--erpds-accent, #155aaa);
}

body.erpds-route-customer-device-relation .erpds-device-relation-context__body {
  display: grid;
  gap: 3px;
  min-width: 0;
  flex: 1 1 auto;
}

body.erpds-route-customer-device-relation .erpds-device-relation-context__title {
  color: var(--erpds-text, #1f2630);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

body.erpds-route-customer-device-relation .erpds-device-relation-context__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 8px;
  min-width: 0;
  color: var(--erpds-text-muted, #525a66);
  font-size: 12px;
  line-height: 1.3;
}

body.erpds-route-customer-device-relation .erpds-device-relation-context__meta a {
  font-weight: 750;
  overflow-wrap: anywhere;
}

body.erpds-route-customer-device-relation .erpds-device-relation-context__port {
  color: var(--erpds-text, #1f2630);
  font-weight: 700;
}

body.erpds-route-customer-device-relation .erpds-device-relation-context__back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 0 0 auto;
  min-height: 34px;
  box-sizing: border-box;
  padding: 7px 10px;
  border: 1px solid var(--erpds-border, #d9e0ea);
  border-radius: var(--erpds-radius-sm, 6px);
  background: var(--erpds-bg-2, #f5f7fa);
  color: var(--erpds-accent-text, #155aaa);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none !important;
  white-space: nowrap;
}

body.erpds-route-customer-device-relation .erpds-device-relation-context__back:hover,
body.erpds-route-customer-device-relation .erpds-device-relation-context__back:focus-visible {
  border-color: var(--erpds-accent, #155aaa);
  background: var(--erpds-accent-soft, #e8f1ff);
  color: var(--erpds-accent, #155aaa);
}

body.erpds-route-customer-device-relation .label_stop {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
  margin: 10px 0 0;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--erpds-accent, #155aaa) 16%, var(--erpds-border, #d9e0ea));
  border-radius: var(--erpds-radius, 8px);
  background: color-mix(in srgb, var(--erpds-accent-soft, #e8f1ff) 72%, var(--erpds-surface, #fff));
  color: var(--erpds-text, #1f2630);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
}

body.erpds-route-customer-device-relation .label_stop .us-icon-danger {
  color: var(--erpds-accent, #155aaa) !important;
}

@media (max-width: 700px) {
  body.erpds-route-customer-device-relation #main_content {
    min-height: calc(100dvh - 170px);
    padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  }

  body.erpds-route-customer-device-relation .erpds-device-relation-context {
    align-items: flex-start;
    gap: 9px;
    margin: 0 0 9px;
    padding: 9px;
  }

  body.erpds-route-customer-device-relation .erpds-device-relation-context__icon {
    flex-basis: 30px;
    width: 30px;
    height: 30px;
  }

  body.erpds-route-customer-device-relation .erpds-device-relation-context__back {
    align-self: flex-start;
    width: 38px;
    min-width: 38px;
    height: 38px;
    min-height: 38px;
    padding: 0;
  }

  body.erpds-route-customer-device-relation .erpds-device-relation-context__back span {
    display: none;
  }

  body.erpds-route-customer-device-relation .erpds-filter-summary {
    margin-bottom: 8px;
  }
}
