/* Небольшие дополнения к стилям облачного справочника.
   Основная вёрстка — их main.css, здесь только то, чего в нём нет
   (значки счётчиков, флаги-эмодзи, обёртка приложения React). */

html,
body {
  margin: 0;
  padding: 0;
  font-family: 'Rubik', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: #1f2d3d;
  background: #fff;
}

#root {
  min-height: 100vh;
}

/* Счётчик в верхнем меню */
.h-nav-link__qty {
  margin-left: 6px;
  min-width: 22px;
  padding: 1px 6px;
  border-radius: 10px;
  background: #00838f;
  color: #fff;
  font-size: 11px;
  line-height: 15px;
  text-align: center;
  vertical-align: middle;
}

/* Компактные отступы в боковом меню.
   В исходном main.css между пунктами 24–32 px, из-за этого список «разъезжается». */
.i-nav__item:not(:last-child) {
  margin-bottom: 6px;
}

.i-nav-link {
  gap: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 14px;
}

.i-nav-link__cover {
  margin-right: 0;
}

/* Счётчик — обычный блок справа, а не абсолютное позиционирование из их CSS. */
.i-nav-link__qty {
  position: static;
  margin-left: auto;
  transform: none;
  min-width: 26px;
  padding: 2px 7px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 16px;
  text-align: center;
  font-weight: 500;
  background: #00838f;
  color: #fff;
}

.i-nav-link.active {
  box-shadow: none;
  background-color: rgba(0, 131, 143, 0.1);
}

.i-nav__action {
  margin: 10px 0 14px;
}

/* Подсветка пункта с заявками */
.i-nav-link--has-items .i-nav-link__qty {
  background: #e64646;
}

.i-nav__item {
  list-style: none;
}

.i-nav__list {
  margin: 0;
  padding: 0;
}

.i-nav__action .btn {
  width: 100%;
}

/* Таблетки-подсказки в списке заявок */
.rec-pill {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 9px;
  font-size: 12px;
  line-height: 18px;
  white-space: nowrap;
}

.rec-pill--easy {
  background: #e3f4e8;
  color: #1f7a3d;
}

.rec-pill--amb {
  background: #fff2d9;
  color: #8a5b00;
}

.rec-pill--weak {
  background: #f1f1f1;
  color: #5a5a5a;
}

.rec-pill--none {
  background: #f6e7e7;
  color: #a33;
}

/* Строка списка заявок: клик по всей строке */
.p-tbl__item-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

/* Карточка заявки */
.app-top__title {
  font-size: 26px;
  line-height: 1.25;
  margin: 12px 0 8px;
  text-transform: uppercase;
}

.app-top__manufacturer {
  color: #5b6b7b;
  display: flex;
  align-items: center;
  gap: 6px;
}

.app-top__line {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  color: #5b6b7b;
  font-size: 13px;
}

.app-top__col {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Блок «Распознано парсером» — три колонки */
.parser-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.parser-card {
  background: #eaf6f7;
  border-radius: 6px;
  padding: 8px 10px;
}

.parser-card__label {
  font-size: 11px;
  letter-spacing: 0.4px;
  color: #5b6b7b;
  text-transform: uppercase;
}

.parser-card__value {
  margin-top: 2px;
  font-size: 14px;
  line-height: 1.25;
  font-weight: 500;
  color: #00838f;
}

/* Рекомендации */
.rec-card {
  border: 1px solid #e3e8ee;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
}

.rec-card--chosen {
  border-color: #00838f;
  box-shadow: 0 0 0 1px #00838f inset;
}

.rec-card__head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.rec-card__title {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.25;
}

.rec-card__sub {
  color: #5b6b7b;
  font-size: 12px;
  margin-top: 2px;
  line-height: 1.3;
}

.rec-card__score {
  margin-left: auto;
  text-align: right;
}

.rec-card__score-num {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.1;
  color: #00838f;
}

.rec-card__score-label {
  font-size: 10px;
  color: #5b6b7b;
}

/* Таблица сравнения «эталон / в заявке / баллы» — плотные строки */
.cmp-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.25;
}

.cmp-table th {
  text-align: left;
  font-weight: 500;
  color: #8a99a8;
  font-size: 11px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 3px 8px;
}

.cmp-table td {
  padding: 2px 8px;
  border-top: 1px solid #eef1f4;
  vertical-align: top;
  line-height: 1.3;
}

.cmp-table__param {
  color: #5b6b7b;
  width: 22%;
}

.cmp-table__score {
  width: 70px;
  text-align: right;
  font-weight: 600;
}

.cmp-table__score--pos {
  color: #1f7a3d;
}

.cmp-table__score--neg {
  color: #c33;
}

.cmp-table__score--zero {
  color: #b0b8c0;
}

/* Подсветка ячеек сравнения: зелёный — совпало, розовый — различается */
.cmp-table__value--match {
  background: #e8f5e9;
  color: #1f6b36;
}

.cmp-table__value--mismatch {
  background: #fdeaea;
  color: #b3261e;
}

/* Модалка сравнения МДМ — разметка и стили их (main.css), здесь только таблица */
.mdm-cmp {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.mdm-cmp th,
.mdm-cmp td {
  padding: 8px 10px;
  border-bottom: 1px solid #eef1f4;
  vertical-align: top;
  text-align: left;
}

.mdm-cmp th {
  font-size: 12px;
  color: #5b6b7b;
  font-weight: 500;
}

.mdm-cmp__field {
  width: 160px;
  color: #8a99a8;
}

.mdm-cmp__col {
  width: calc((100% - 160px) / 2);
}

.mdm-cmp__row--diff td {
  background: #fdf6e3;
}

.mdm-cmp__code {
  font-family: 'Rubik', monospace;
}

.mdm-modal__actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 16px;
}

/* Колонка «Совпадений» в списке заявок */
.p-tbl__matches {
  flex: 0 0 96px;
  max-width: 96px;
  text-align: center;
}

/* Колонки таблицы заявок: не даём длинным названиям распирать строку
   и уводить «Поставщика», «Дату» и «Штрихкод» за край. */
.p-tbl--cb .p-tbl__info {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  padding-right: 12px;
}

.p-tbl--cb .tbl-info__name {
  white-space: normal;
  overflow-wrap: anywhere;
}

.p-tbl--cb .tbl-info__extra {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.p-tbl--cb .tbl-info__manufacturer {
  max-width: 320px;
}

.p-tbl--cb .p-tbl__row {
  align-items: flex-start;
  padding-top: 8px;
  padding-bottom: 8px;
}

.matches-count {
  display: inline-block;
  min-width: 30px;
  padding: 2px 8px;
  border-radius: 10px;
  background: #eef1f4;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
}

.p-tbl__item-link--ok .matches-count {
  background: #e3f4e8;
  color: #1f7a3d;
}

/* Пункт меню со счётчиком не должен выглядеть выбранным:
   в исходном CSS он мигает и красится так же, как активный. */
.i-nav-link--has-items {
  animation: none;
  background: none;
  box-shadow: none;
  font-weight: 500;
}

/* ---- МДМ: фильтры, список групп и окно сравнения ---- */
.mdm-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 16px;
}

.mdm-filters__field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 180px;
}

.mdm-filters__check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  padding-bottom: 8px;
  white-space: nowrap;
}

.mdm-list {
  font-size: 13px;
}

.mdm-list th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #8a99a8;
  font-weight: 500;
}

.mdm-list__row {
  cursor: pointer;
}

.mdm-list__row:hover td {
  background: #f4fbfb;
}

.mdm-pct {
  font-weight: 600;
}

.mdm-pct--ok {
  color: #1f7a3d;
}

.mdm-pct--mid {
  color: #c77700;
}

.mdm-pct--bad {
  color: #c33;
}

.mdm-link {
  color: #00838f;
  text-decoration: underline;
}

.mdm-reason-cell {
  max-width: 300px;
  color: #5b6b7b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mdm-cmp__cell--same {
  background: #e8f5e9;
}

.mdm-cmp__cell--diff {
  background: #fdecea;
  color: #b3261e;
}

.mdm-cmp__empty {
  color: #b0b8c0;
}

.mdm-cmp__id {
  font-weight: 600;
  color: #00838f;
}

.mdm-gold {
  margin-left: 8px;
  padding: 1px 6px;
  border-radius: 8px;
  background: #fff3cd;
  color: #8a6d00;
  font-size: 11px;
  font-weight: 600;
}

.mdm-reason,
.mdm-history {
  margin-top: 16px;
}

.mdm-reason__title {
  font-size: 11px;
  letter-spacing: 0.5px;
  color: #8a99a8;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 6px;
}

.mdm-reason__line {
  font-size: 13px;
  color: #3c4a58;
}

.mdm-modal__counter {
  font-weight: 600;
  color: #1f2d3d;
}

/* Плотнее блоки карточки заявки: в их CSS между блоками 36 px */
.app-item__top {
  margin-bottom: 14px;
}

.app-item__extra {
  margin-top: 14px;
}

.app-card__body {
  padding-top: 2px;
}

.app-card__head {
  margin-bottom: 2px;
}

.app-card__hint {
  font-size: 12px;
  color: #8a99a8;
  margin-bottom: 8px;
  line-height: 1.3;
}

/* Шапка: имя и роль оператора не должны слипаться */
.header__extra {
  display: flex;
  align-items: baseline;
  gap: 10px;
  white-space: nowrap;
}

.app-top__line {
  gap: 16px;
}

/* Коды в окне сравнения: каждый ШК/GTIN отдельной строкой */
.mdm-codes {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mdm-code {
  position: relative;
  padding-right: 18px;
  line-height: 1.3;
}

.mdm-code__value {
  font-family: 'Rubik', monospace;
  color: #1f2d3d;
}

.mdm-code__link {
  color: #00838f;
  text-decoration: underline;
}

.mdm-code__link:hover {
  color: #00a3b0;
}

.mdm-code__count {
  margin-left: 4px;
  color: #8a99a8;
  font-size: 12px;
}

.mdm-code__tag {
  margin-left: 4px;
  padding: 0 4px;
  border-radius: 4px;
  background: #e3f4e8;
  color: #1f7a3d;
  font-size: 11px;
}

.mdm-code__sub {
  color: #8a99a8;
  font-size: 12px;
}

.mdm-code__del {
  position: absolute;
  right: 0;
  top: 0;
  border: 0;
  background: transparent;
  color: #b0b8c0;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0 2px;
}

.mdm-code__del:hover {
  color: #c33;
}

.mdm-cmp__cell--codes {
  vertical-align: top;
}

/* Ряд «Входит в GOLD»: галочки выбора карточек для переноса */
.mdm-gold-row th {
  background: #f7f8fa;
  border-bottom: 1px solid #e5e7eb;
}

.mdm-gold-check {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.mdm-gold-check input {
  cursor: pointer;
}

.mdm-gold-check input:disabled {
  cursor: default;
}

.mdm-gold-star {
  padding: 1px 6px;
  border-radius: 8px;
  background: #fff3cd;
  color: #8a6d00;
  font-size: 11px;
  font-weight: 600;
}

.mdm-cmp__col--pick {
  cursor: pointer;
}

.mdm-cmp__col--pick:hover {
  background: #f4fbfb;
}

/* Обёртка содержимого: в их CSS класса .content нет, задаём отступ сами */
.content {
  padding: 0 12px;
  min-width: 0;
}

.content__wrap {
  min-width: 0;
}

/* ---- Экран редактирования карточки товара («Общие данные») ---- */
.drug-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 10px;
}

.drug-head__avatar {
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #eef1f4;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  color: #c4ccd4;
  font-weight: 300;
}

.drug-head__id {
  color: #8a99a8;
  font-size: 12px;
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.drug-head__view {
  border: 1px solid #d7dee4;
  background: #fff;
  border-radius: 12px;
  padding: 0 8px;
  font-size: 11px;
  color: #00838f;
  cursor: pointer;
}

.drug-head__view:hover {
  border-color: #00838f;
}

.drug-head__title {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 600;
  color: #1f2d3d;
}

.drug-tabs {
  display: flex;
  gap: 3px;
  border-bottom: 1px solid #dfe1e5;
  margin: 8px 0 12px;
  flex-wrap: wrap;
}

.drug-tabs__item {
  padding: 6px 12px;
  border-radius: 6px 6px 0 0;
  font-size: 13px;
  color: #1f2d3d;
  text-decoration: none;
}

.drug-tabs__item.is-active {
  background: #00838f;
  color: #fff;
  font-weight: 500;
}

.drug-tabs__item--disabled {
  color: #8a99a8;
}

.drug-form {
  max-width: 1100px;
}

.drug-form .row {
  display: grid;
  gap: 12px 16px;
}

.drug-form .row--2 {
  grid-template-columns: 1fr 1fr;
}

.drug-form .form-group {
  margin-bottom: 10px;
}

.drug-form .form-label {
  display: block;
  font-size: 11px;
  color: #8a99a8;
  margin-bottom: 2px;
  line-height: 1.2;
}

.drug-form .form-control {
  width: 100%;
  box-sizing: border-box;
  padding: 5px 9px;
  border: 1px solid #e3e6ea;
  border-radius: 5px;
  background: #f4f5f7;
  font: inherit;
  font-size: 13px;
  line-height: 1.25;
  color: #1f2d3d;
}

.drug-form textarea.form-control {
  resize: vertical;
}

.drug-form .form-control:focus {
  outline: none;
  border-color: #00838f;
  background: #fff;
}

.input-with-btn {
  display: flex;
}

.input-with-btn .form-control {
  border-radius: 6px 0 0 6px;
}

.input-with-btn__btn {
  border: 1px solid #e3e6ea;
  border-left: 0;
  background: #eef1f4;
  border-radius: 0 6px 6px 0;
  padding: 0 14px;
  cursor: pointer;
  font-size: 14px;
  color: #3c4a58;
}

.input-with-unit {
  display: flex;
  gap: 8px;
}

.input-with-unit__unit {
  flex: 0 0 90px;
}

.drug-switches {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 4px 0 18px;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
}

.switch input {
  display: none;
}

.switch__track {
  position: relative;
  width: 38px;
  height: 20px;
  border-radius: 10px;
  background: #cfd8e0;
  transition: background 0.15s;
  flex-shrink: 0;
}

.switch__track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: left 0.15s;
}

.switch input:checked + .switch__track {
  background: #00838f;
}

.switch input:checked + .switch__track::after {
  left: 20px;
}

.code-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  max-width: 640px;
}

.code-row__link {
  font-size: 13px;
  color: #00838f;
  white-space: nowrap;
}

.code-row__del {
  border: 0;
  background: transparent;
  color: #b0b8c0;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.code-row__del:hover {
  color: #c33;
}

.code-add {
  display: flex;
  gap: 8px;
  max-width: 640px;
  margin-top: 6px;
  align-items: center;
}

/* Поля ввода одной высоты с кнопками: компактно, кнопки шире, но не выше полей */
.drug-form input.form-control,
.drug-form select.form-control,
.code-add input.form-control {
  height: 26px;
  min-height: 26px;
  padding: 2px 8px;
  line-height: 20px;
}

/* Штрихкоды — сеткой по три в строке; GTIN — по одному с составным наименованием */
.codes-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 12px;
  align-items: center;
}

.code-pair {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.code-input {
  width: 100%;
  min-width: 0;
  font-family: 'Rubik', monospace;
  font-variant-numeric: tabular-nums;
}

.code-line {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.code-line .code-input {
  width: 260px;
  flex: 0 0 260px;
}

.code-line__name {
  color: #6b7a8a;
  font-size: 12.5px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.code-add__link {
  background: none;
  border: none;
  color: #00838f;
  cursor: pointer;
  padding: 0 2px;
  font: inherit;
  font-size: 13px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.code-add__link:disabled {
  color: #a9b6c2;
  cursor: default;
}

.code-add__icon {
  letter-spacing: -2px;
  font-size: 14px;
}

.drug-form textarea.form-control {
  min-height: 64px;
  padding: 5px 8px;
}

.code-add .btn,
.drug-form .btn {
  height: 26px;
  min-width: 168px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  font-size: 13px;
  line-height: 1;
}

.drug-package {
  border: 1px solid #e3e6ea;
  border-radius: 10px;
  padding: 14px 16px 4px;
  margin: 8px 0 18px;
}

.drug-package__title {
  font-size: 15px;
  font-weight: 600;
  color: #5b6b7b;
  margin-bottom: 12px;
}

.drug-actions {
  position: sticky;
  bottom: 0;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  background: #fff;
  border-top: 1px solid #e3e6ea;
  padding: 8px 0;
  margin-top: 6px;
}

/* Поиск эталонного товара (когда карточка — дубль) */
.etalon-selected {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid #b7e0e3;
  background: #f2fbfb;
  border-radius: 6px;
  margin-bottom: 10px;
}

.etalon-selected__id {
  font-weight: 600;
  color: #00838f;
}

.etalon-selected__name {
  flex: 1;
}

.etalon-search {
  position: relative;
  max-width: 640px;
}

.etalon-search .form-control {
  padding-right: 36px;
}

.etalon-search__icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #00838f;
  font-size: 18px;
}

.etalon-list {
  margin-top: 12px;
  background: #f4f5f7;
  border-radius: 10px;
  padding: 12px;
  max-width: 1100px;
}

.etalon-list__empty {
  padding: 12px;
  color: #8a99a8;
  font-size: 13px;
}

.etalon-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid #eceef1;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 8px;
}

.etalon-row:last-child {
  margin-bottom: 0;
}

.etalon-row__avatar {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #eef1f4;
}

.etalon-row__main {
  flex: 1;
  min-width: 0;
}

.etalon-row__name {
  font-size: 14px;
  font-weight: 500;
  color: #1f2d3d;
  overflow-wrap: anywhere;
}

.etalon-row__sub {
  font-size: 12px;
  color: #8a99a8;
  display: flex;
  align-items: center;
  gap: 6px;
}

.etalon-row__pick {
  border: 0;
  background: transparent;
  color: #00838f;
  cursor: pointer;
  font-size: 13px;
  white-space: nowrap;
}

.etalon-row__pick:hover {
  text-decoration: underline;
}

.etalon-row__id {
  width: 80px;
  text-align: right;
  color: #3c4a58;
  font-size: 13px;
}

/* Выбор тегов карточки */
.tag-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 1100px;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid #e3e6ea;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  background: #fff;
}

.tag-pill input {
  display: none;
}

.tag-pill--on {
  border-color: #00838f;
  background: #e6f4f5;
  color: #00646c;
}

.tag-pill__type {
  color: #8a99a8;
  font-size: 11px;
}

/* Секции формы поставщика */
.form-section {
  margin-bottom: 12px;
}

.form-section__title {
  font-size: 15px;
  font-weight: 500;
  color: #b0b8c0;
  letter-spacing: 0.3px;
  margin-bottom: 6px;
}

.drug-form .form-group--wide {
  grid-column: 1 / -1;
}

/* Метка сортировки в заголовке таблицы */
.sort-mark {
  font-size: 9px;
  margin-left: 4px;
  color: #8a99a8;
}

/* Плитка раздела «Настройки» */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.settings-card {
  display: block;
  padding: 14px 16px;
  border: 1px solid #e3e8ee;
  border-radius: 10px;
  color: #1f2d3d;
  text-decoration: none;
  background: #fff;
  transition: 0.15s;
}

.settings-card:hover {
  border-color: #00838f;
  background: #f4fbfb;
}

/* Заглушка для разделов, которых пока нет */
.stub-box {
  padding: 32px;
  border: 1px dashed #cfd8e0;
  border-radius: 12px;
  text-align: center;
  color: #5b6b7b;
}

.flag-emoji {
  font-size: 15px;
  line-height: 1;
}

/* Интерфейс читают люди: базовые размеры текста +2 пункта (13px -> 15px) */
body {
  font-size: 15px;
}

.i-nav-link,
.topnav__item,
.top-nav__link {
  font-size: 15px;
}

.drug-tabs__item {
  font-size: 15px;
}

.drug-form .form-control,
.drug-form input.form-control,
.drug-form select.form-control,
.code-add input.form-control {
  font-size: 15px;
}

.drug-form .form-label {
  font-size: 13px;
}

.form-section__title {
  font-size: 17px;
}

.drug-head__title {
  font-size: 24px;
}

.code-line__name,
.gtin-card__value {
  font-size: 13.5px;
}

/* Таблицы и кнопки MUI: текст на два пункта крупнее стандартного */
.MuiTableCell-root {
  font-size: 14px;
}

.MuiButton-root {
  font-size: 14px;
}

/* Кликабельный код в справочниках */
.dt-link {
  background: none;
  border: 0;
  padding: 0;
  color: #00838f;
  cursor: pointer;
  font: inherit;
  font-family: monospace;
}

.dt-link:hover {
  text-decoration: underline;
}

/* Карточка GTIN: поля в две колонки */
.gtin-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 24px;
}

.gtin-card__row {
  display: flex;
  gap: 10px;
  border-bottom: 1px solid #f1f3f6;
  padding: 3px 0;
}

.gtin-card__label {
  flex: 0 0 46%;
  color: #6b7a8a;
  font-size: 12.5px;
  line-height: 1.25;
}

.gtin-card__value {
  flex: 1;
  font-size: 13px;
  line-height: 1.3;
  word-break: break-word;
}

/* Флаги стран — SVG из облачного справочника, один стиль для всех списков */
.flag-img {
  width: 20px;
  height: 15px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06);
  vertical-align: -2px;
}

.flag-emoji {
  font-size: 15px;
  line-height: 1;
  vertical-align: -1px;
}

/* Иконки групп маркировки */
.mg-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1.2;
}

.mg-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex-shrink: 0;
}

/* Иконка группы в колонке каталога */
.marking-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Окно «Удалённые коды карточки» */
.code-deleted {
  margin: 4px 0 12px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 30, 40, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1200;
}

.modal-window {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
  width: min(860px, 92vw);
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-window__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #e6e9ef;
  font-weight: 600;
  font-size: 15px;
}

.modal-window__close {
  background: none;
  border: none;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: #6b7a8a;
}

.modal-window__body {
  padding: 12px 16px 18px;
  overflow-y: auto;
}

.modal-window__title {
  font-weight: 600;
  color: #374151;
  margin: 10px 0 6px;
}

.modal-window__empty {
  color: #8a99a8;
  font-size: 13px;
  padding: 4px 0 8px;
}

.modal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.modal-table th,
.modal-table td {
  text-align: left;
  border-bottom: 1px solid #f0f2f5;
  padding: 5px 8px;
}

.modal-table th {
  color: #6b7a8a;
  font-weight: 600;
  background: #fafbfc;
}

/* Компактные отступы в формах: поля стоят плотнее (в 2+ раза) */
.drug-form .form-group {
  margin-bottom: 4px;
}

.drug-form .row {
  gap: 5px 14px;
}

.drug-form .form-label {
  margin-bottom: 1px;
}

.form-section {
  margin-bottom: 8px;
}

.form-section__title {
  margin-bottom: 4px;
}

/* Пространства кодов поставщика */
.codespace-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 4px;
  min-height: 26px;
}

.codespace-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #00838f;
  color: #fff;
  border-radius: 4px;
  padding: 2px 6px 2px 10px;
  font-size: 13px;
}

.codespace-chip__del {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  padding: 0 2px;
}

.codespace-empty {
  color: #8a99a8;
  font-size: 13px;
}

/* Вкладка «Товары» в карточке пространства кодов */
.codespace-search {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.codespace-search .form-control {
  max-width: 420px;
  height: 26px;
  min-height: 26px;
  padding: 2px 8px;
  font-size: 15px;
  border: 1px solid #e3e6ea;
  border-radius: 5px;
  background: #f4f5f7;
}

.codespace-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #495057;
}

.codespace-goods td,
.codespace-goods th {
  font-size: 13.5px;
}

.codespace-pager {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  font-size: 13px;
  color: #6b7a8a;
}

/* Вкладка «Товары»: строка товара поставщика как в оригинале */
.codespace-search {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.codespace-search .form-control {
  max-width: 420px;
  height: 28px;
  min-height: 28px;
  padding: 3px 10px;
  font-size: 15px;
  border: 1px solid #e3e6ea;
  border-radius: 5px;
  background: #f4f5f7;
}

/* Кнопка-переключатель: нажата / не нажата */
.codespace-toggle {
  height: 28px;
  padding: 0 14px;
  border-radius: 5px;
  border: 1px solid #cfd6dd;
  background: #fff;
  color: #495057;
  font: inherit;
  font-size: 13.5px;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1;
}

.codespace-toggle.is-on {
  background: #00838f;
  border-color: #00666f;
  color: #fff;
}

.goods-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.goods-row {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 12px;
  align-items: center;
  border: 1px solid #e6e9ef;
  border-radius: 8px;
  background: #fff;
  padding: 8px 12px;
}

.goods-photo {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #eef1f4;
}

.goods-main {
  min-width: 0;
}

.goods-line {
  display: flex;
  gap: 8px;
  line-height: 1.35;
}

.goods-label {
  color: #8a99a8;
  font-size: 12.5px;
  white-space: nowrap;
}

.goods-value {
  color: #1f2d3d;
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
}

.goods-ids {
  display: flex;
  gap: 28px;
  text-align: right;
}

.goods-id {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.goods-id__value {
  font-size: 14px;
  color: #1f2d3d;
}

/* Подписи в строке товара — в общей колонке, значения выровнены */
.goods-line {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 8px;
}

/* Объединённая колонка «Наименование» в справочнике Medsi */
.medsi-name {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.medsi-name .goods-line {
  grid-template-columns: 84px 1fr;
  gap: 6px;
}

.medsi-name .goods-value {
  font-weight: 400;
  white-space: normal;
  line-height: 1.3;
}

/* Реестр цен ЖНВЛП */
.jv-table td,
.jv-table th {
  font-size: 12.5px;
  vertical-align: top;
}

.jv-table .jv-form,
.jv-table .jv-producer {
  max-width: 320px;
}

.jv-table .jv-price {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

/* Ссылка на цены ЖНВЛП в карточке — отдельной строкой под переключателями */
.jv-links {
  margin: 2px 0 8px;
  line-height: 1.4;
}

/* Прокрутка внутри таблицы справочника: верхушка и боковое меню остаются на месте */
.dict-scroll {
  max-height: calc(100vh - 260px);
  overflow: auto;
  overscroll-behavior: contain;
}

.dict-scroll table {
  border-collapse: separate;
  border-spacing: 0;
}

.dict-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
  box-shadow: inset 0 -1px 0 #e3e8ee;
}

/* Прокрутка в таблицах справочников: заголовок и меню не уезжают */
.dict-scroll--page {
  max-height: calc(100vh - 300px);
  overflow: auto;
  overscroll-behavior: contain;
}

.dict-scroll--page table {
  border-collapse: separate;
  border-spacing: 0;
}

.dict-scroll--page thead th,
.dict-scroll--page thead td {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #fff;
  box-shadow: inset 0 -1px 0 #e3e8ee;
}

/* Карточка производителя: блок merge */
.merge-box {
  border: 1px solid #f0d9c8;
  background: #fdf5ef;
  color: #8a5a2b;
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 12px;
  font-size: 14px;
}

.merge-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.merge-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 4px;
}

.merge-list__item {
  text-align: left;
  background: #fff;
  border: 1px solid #e3e8ee;
  border-radius: 4px;
  padding: 4px 8px;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
}

.merge-list__item:hover {
  background: #eef6f7;
}

/* Перенесённые (отключённые) товары в каталоге — как в облачном справочнике */
.drug-row--disabled td {
  color: #b0b8c1 !important;
}

.drug-row--disabled td img,
.drug-row--disabled td svg {
  opacity: 0.45;
  filter: grayscale(1);
}

/* Пейджер внутри прокручиваемого справочника — всегда виден внизу */
.dict-scroll .dict-pager {
  position: sticky;
  bottom: 0;
  z-index: 3;
  background: #fff;
  border-top: 1px solid #e3e8ee;
  padding: 6px 8px;
  margin: 0 !important;
}

/* Производитель в карточке: поле с подсказками */
.form-group--mfr {
  position: relative;
}

.mfr-suggest {
  position: absolute;
  z-index: 30;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 260px;
  overflow: auto;
  background: #fff;
  border: 1px solid #dfe4ea;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.mfr-suggest__item {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 5px 10px;
  font: inherit;
  font-size: 13.5px;
  cursor: pointer;
}

.mfr-suggest__item:hover {
  background: #eef6f7;
}

.mfr-suggest__country {
  color: #8a99a8;
}

.mfr-suggest__empty {
  padding: 8px 10px;
  color: #8a99a8;
  font-size: 13px;
}

/* Поиск в справочниках на всю ширину — чтобы подсказка влезала целиком */
.codespace-search .form-control {
  max-width: 720px;
  flex: 1 1 520px;
}

/* Даты и цена в реестре ЖНВЛП — на 2 пункта крупнее остальных колонок */
.jv-table td.jv-num,
.jv-table th.jv-num {
  font-size: 14.5px;
}

/* Окно цен ЖНВЛП в карточке: текст крупнее, цена слева */
.jv-modal-table td,
.jv-modal-table th {
  font-size: 14.5px;
  text-align: left;
}

/* Цена в окне цен по штрихкоду — по правому краю */
.jv-modal-table th.jv-modal-price,
.jv-modal-table td.jv-modal-price {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ---------- Светлое оформление справочников ---------- */
.dict-card {
  background: #ffffff !important;
  border: 1px solid #eef1f5 !important;
  border-radius: 12px !important;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 24px rgba(16, 24, 40, 0.04);
}

.dict-card table {
  background: #ffffff;
}

/* шапка таблицы: белая, мелкий серый капс */
.dict-card thead th,
.dict-card thead td {
  background: #ffffff !important;
  color: #667085 !important;
  font-weight: 600 !important;
  font-size: 12px !important;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border-bottom: 1px solid #eef1f5 !important;
  padding-top: 10px !important;
  padding-bottom: 10px !important;
}

/* строки: чистый белый, тонкие разделители */
.dict-card tbody td {
  background: #ffffff;
  color: #1d2939;
  font-size: 13.5px;
  border-bottom: 1px solid #f4f6f8 !important;
  padding-top: 7px !important;
  padding-bottom: 7px !important;
}

.dict-card tbody tr:hover td {
  background: #f7fbfb !important;
}

/* иконки действий мягче */
.dict-card tbody .MuiIconButton-root {
  color: #98a2b3;
}

.dict-card tbody .MuiIconButton-root:hover {
  color: #00838f;
  background: #eaf6f7;
}

/* Белый фон страницы вместо серого */
html,
body {
  background: #ffffff !important;
}

/* Зебра + контраст «главное / второстепенное» в справочниках */
.dict-card tbody tr:nth-child(even) td {
  background: #fafbfc;
}

.dict-card tbody tr:hover td {
  background: #f2fafa !important;
}

.dict-card tbody td.dict-cell--main {
  font-size: 14px;
  color: #101828;
}

.dict-card tbody td.dict-cell--secondary {
  font-size: 12.5px;
  color: #98a2b3;
  font-variant-numeric: tabular-nums;
}

/* Полоса-итог под таблицей */
.dict-total {
  margin-top: 8px;
  padding: 6px 10px;
  font-size: 12.5px;
  color: #667085;
  background: #fafbfc;
  border-radius: 6px;
  display: inline-block;
}

/* Цветные метки статуса производителя */
.status-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.status-badge--ok {
  background: #e7f6ec;
  color: #137333;
}

.status-badge--warn {
  background: #fff4d6;
  color: #946200;
}

.status-badge--muted {
  background: #eef1f4;
  color: #5f6b7a;
}

/* ---------- Поля ввода на белом фоне: лёгкая обводка и тень ---------- */
.form-control,
.drug-form input.form-control,
.drug-form select.form-control,
.drug-form textarea.form-control,
.code-add input.form-control,
.codespace-search .form-control {
  background: #ffffff !important;
  border: 1px solid #e2e7ee !important;
  border-radius: 6px !important;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  transition: border-color 0.12s, box-shadow 0.12s;
}

.form-control:hover,
.drug-form input.form-control:hover,
.drug-form select.form-control:hover,
.drug-form textarea.form-control:hover {
  border-color: #cfd8e3 !important;
}

.form-control:focus,
.drug-form input.form-control:focus,
.drug-form select.form-control:focus,
.drug-form textarea.form-control:focus,
.code-add input.form-control:focus,
.codespace-search .form-control:focus {
  border-color: #00838f !important;
  box-shadow: 0 0 0 3px rgba(0, 131, 143, 0.12) !important;
  outline: none !important;
}

/* Выпадающие списки MUI в справочниках — та же лёгкая обводка */
.dict-card .MuiOutlinedInput-root {
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.dict-card .MuiOutlinedInput-root:hover .MuiOutlinedInput-notchedOutline {
  border-color: #cfd8e3;
}

.dict-card .MuiOutlinedInput-root.Mui-focused .MuiOutlinedInput-notchedOutline {
  border-color: #00838f;
  border-width: 1px;
}

/* Подписи не должны наезжать на поля: нормальный отступ и высота строки */
.drug-form .form-group {
  margin-bottom: 8px !important;
}

.drug-form .form-label {
  display: block;
  margin-bottom: 3px !important;
  line-height: 1.3;
}

.drug-form .row {
  gap: 6px 14px !important;
}

/* Блок «Упаковка»: подпись и поле — в одной колонке, без наложений */
.drug-form .pkg-block .form-label,
.drug-form .form-group--stack .form-label {
  position: static;
}

/* Аптеки: фильтры в одну строку */
.outlet-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.outlet-filters .form-control {
  min-height: 30px;
  height: 30px;
  padding: 3px 10px;
  font-size: 13.5px;
}

.outlet-filters input.form-control {
  flex: 1 1 320px;
  max-width: 420px;
}

.outlet-filters select.form-control {
  flex: 0 0 190px;
}

.outlets-table td,
.outlets-table th {
  font-size: 13.5px;
}

/* Аптеки: счётчик строк на вкладках */
.outlets-tab-count {
  margin-left: 14px;
  align-self: center;
  font-size: 12.5px;
  color: #667085;
}

/* Аптеки: кнопка экспорта */
.outlet-actions {
  margin-top: 8px;
}

.outlet-actions .btn {
  display: inline-block;
  text-decoration: none;
}

/* Аптеки: колонка суммы */
.outlet-sum {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* Сумма в аптеках — по правому краю (перебиваем .modal-table td) */
.outlets-table td.outlet-sum,
.outlets-table th.outlet-sum {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* Аптеки: сумма справа от количества строк */
.outlets-tab-count {
  margin-left: auto;
  align-self: center;
  font-size: 12.5px;
  color: #667085;
}

.outlets-tab-sum {
  margin-left: 16px;
  font-weight: 600;
  color: #00838f;
  font-variant-numeric: tabular-nums;
}

/* Бренды производителей: чипы производителей */
.brand-chip-box {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid #e2e7ee;
  border-radius: 6px;
  background: #fff;
  margin-bottom: 8px;
}

.brand-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #eef4f8;
  border: 1px solid #dbe6ee;
  color: #1f2d3d;
  border-radius: 4px;
  padding: 2px 6px 2px 8px;
  font-size: 13px;
}

.brand-chip__del {
  background: none;
  border: none;
  color: #7b8794;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  padding: 0 2px;
}

.brand-chip__del:hover {
  color: #c02626;
}

.btn--danger {
  background: #c02626;
  color: #fff;
  border: 1px solid #a91f1f;
}

.btn--danger:hover {
  background: #a91f1f;
}

/* MDM: ссылка «открыть карточку» рядом с ID */
.mdm-cmp__open {
  display: inline-block;
  margin-left: 4px;
  color: #00838f;
  text-decoration: none;
  font-size: 14px;
  line-height: 1;
  padding: 0 3px;
  border-radius: 3px;
}

.mdm-cmp__open:hover {
  background: #e6f4f5;
}

/* Производственный календарь */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.cal-month {
  border: 1px solid #e2e7ee;
  border-radius: 8px;
  padding: 8px 10px 10px;
  background: #fff;
}

.cal-month__title {
  font-size: 13px;
  font-weight: 600;
  color: #00838f;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 6px;
}

.cal-week,
.cal-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}

.cal-dow {
  font-size: 11px;
  color: #8a99a8;
  text-align: center;
}

.cal-day {
  font-size: 12.5px;
  text-align: center;
  padding: 3px 0;
  border-radius: 4px;
  color: #1f2d3d;
}

.cal-day--empty {
  visibility: hidden;
}

.cal-day--work {
  background: #f7f9fb;
}

.cal-day--off {
  background: #f2f4f7;
  color: #98a2b3;
}

.cal-day--holiday {
  background: #fdecec;
  color: #c02626;
  font-weight: 600;
}

/* МДМ: галочка «Только ЛС» — рисуем свой чекбокс, чтобы не зависеть от общих стилей */
.mdm-filters__check {
  cursor: pointer;
  user-select: none;
}

.mdm-filters__check input[type="checkbox"] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  box-sizing: border-box;
  width: 16px;
  height: 16px;
  min-width: 16px;
  margin: 0 2px 0 0;
  border: 1px solid #8a99a8;
  border-radius: 3px;
  background: #fff;
  display: inline-block;
  position: relative;
  cursor: pointer;
  flex: 0 0 auto;
  vertical-align: middle;
}

.mdm-filters__check input[type="checkbox"]:hover {
  border-color: #00838f;
}

.mdm-filters__check input[type="checkbox"]:checked {
  background: #00838f;
  border-color: #00838f;
}

.mdm-filters__check input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 4px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.mdm-filters__check input[type="checkbox"]:focus-visible {
  outline: 2px solid rgba(0, 131, 143, 0.35);
  outline-offset: 1px;
}

/* Заявки: ряд галочек раздела GTIN */
.gtin-filters {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 8px 0 12px;
  flex-wrap: wrap;
}

.gtin-filters .mdm-filters__check {
  padding-bottom: 0;
}

/* Заявки: уровень подсказки стоит слева от названия, по одной линии с текстом */
.p-tbl__item .tbl-info__name {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.p-tbl__item .tbl-info__name .rec-pill {
  flex: 0 0 auto;
  align-self: baseline;
  margin-right: 0;
}

/* Заявки: название тянется за пилюлей, не оставляя её одну в строке */
.p-tbl__item .tbl-info__name {
  flex-wrap: nowrap;
}

.p-tbl__item .tbl-info__name-text {
  flex: 1 1 auto;
  min-width: 0;
  display: block;
}

/* Пункт с заявками: убираем «мигание» и сдвиг счётчика из исходных стилей.
   Красный счётчик остаётся, но анимации (glow/pulse) отключены — из-за них
   бейдж прыгал выше строки и пульсировал. */
.i-nav-link--has-items,
.i-nav-link--has-items .i-nav-link__qty {
  animation: none !important;
}

.i-nav-link--has-items {
  font-weight: 500;
}

.i-nav-link--has-items .i-nav-link__qty {
  position: static;
  transform: none;
  margin-left: auto;
  min-width: 26px;
  padding: 2px 7px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 16px;
  text-align: center;
  vertical-align: middle;
}

/* Счётчик всегда по центру строки, независимо от подсветки */
.i-nav-link {
  align-items: center;
}

.i-nav-link__qty {
  align-self: center;
}

/* Постраничный переход: «« 1 2 3 … 45 46 »» */
.pager {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 14px 0 6px;
  flex-wrap: wrap;
}

.pager__page,
.pager__arrow {
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border: 1px solid #dbe1e8;
  border-radius: 8px;
  background: #fff;
  color: #00838f;
  font-size: 13.5px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.pager__page:hover,
.pager__arrow:hover:not(:disabled) {
  background: #eef7f8;
  border-color: #b7dfe3;
}

.pager__page.is-active {
  background: #00838f;
  border-color: #00838f;
  color: #fff;
  font-weight: 600;
  cursor: default;
}

.pager__arrow:disabled {
  color: #c3ccd6;
  cursor: default;
}

.pager__dots {
  min-width: 24px;
  text-align: center;
  color: #8a99a8;
}

.pager__total {
  margin-left: 10px;
  font-size: 12.5px;
  color: #8a99a8;
}

/* Карточка заявки: компактнее по вертикали — меньше воздуха между блоками */
.app-top__wrap {
  padding: 10px 14px;
}

.app-top__title {
  font-size: 20px;
  line-height: 1.2;
  margin: 6px 0 4px;
}

.app-top__line {
  gap: 16px;
  font-size: 12.5px;
}

.app-top__info {
  margin-top: 4px;
  line-height: 1.35;
}

.app-card {
  padding: 10px 12px;
  margin-bottom: 10px;
}

.app-card__hint {
  margin-bottom: 4px;
}

.app-card__title {
  font-size: 14px;
  line-height: 1.25;
}

.parser-grid {
  gap: 6px;
  margin-top: 6px;
}

.parser-card {
  padding: 6px 8px;
}

.parser-card__value {
  font-size: 13px;
}

.rec-card {
  padding: 8px 10px;
  margin-bottom: 6px;
}

.rec-card__head {
  gap: 8px;
}

.cmp-table {
  margin-top: 4px;
  font-size: 12.5px;
}

.cmp-table td {
  padding: 1px 6px;
}

.cmp-table th {
  padding: 2px 6px;
}

/* Заголовки секций «Распознанное название» и «Рекомендации» — без лишних отступов */
.req-section-title,
.req-block__title {
  margin: 10px 0 4px;
  font-size: 13px;
}

/* Строки списка заявок: компактнее по высоте */
.p-tbl__item:not(:last-child) {
  margin-bottom: 6px;
}

.p-tbl__row {
  min-height: 0;
  align-items: center;
  padding: 2px 0;
}

.p-tbl__col {
  padding: 4px 8px;
}

.p-tbl__item .tbl-info__name {
  font-size: 13px;
  line-height: 1.3;
}

/* Название не выше двух строк — длинные хвосты обрезаем многоточием */
.p-tbl__item .tbl-info__name-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.p-tbl__item .tbl-info__extra {
  margin-top: 1px;
  font-size: 11.5px;
  line-height: 1.25;
}

.p-tbl__item .rec-pill {
  padding: 0 6px;
  line-height: 16px;
  font-size: 11px;
}

/* Дата и время в одну строку */
.p-tbl__date-time {
  white-space: nowrap;
  font-size: 12.5px;
}

.p-tbl__item .p-tbl__matches .matches-count {
  font-size: 12px;
  line-height: 20px;
}

.p-tbl__item .p-tbl__pharma,
.p-tbl__item .p-tbl__barcodes {
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Карточка заявки: убираем пустоты, кнопки — внутри шапки, шрифты на 2 pt крупнее */
.app-item__top {
  margin-bottom: 6px;
}

.app-item__extra {
  margin-top: 6px;
}

.app-card {
  padding: 8px 12px 10px;
  margin-bottom: 8px;
}

/* Кнопки «✎ E Я V» держим в шапке блока, а не выносим за карточку */
.app-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 2px;
}

.app-card__tools {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.btn-icon {
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border: 1px solid #dfe5ec;
  border-radius: 6px;
  background: #fff;
  color: #5b6b7b;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

.btn-icon:hover {
  border-color: #00838f;
  color: #00838f;
}

/* Шрифты крупнее, как в оригинале */
.app-top__title {
  font-size: 22px;
  line-height: 1.22;
  margin: 4px 0 2px;
}

.app-card__title {
  font-size: 15px;
}

.app-card__body .app-top__title {
  font-size: 20px !important;
  margin: 4px 0 10px !important;
}

.app-card__subtitle {
  font-size: 13px;
  margin: 8px 0 4px;
}

.parser-card__label {
  font-size: 12px;
}

.parser-card__value {
  font-size: 15px;
  margin-top: 1px;
}

.gtin-wrap__additional-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-top: 4px;
}

.gtin-wrap__additional-info-wrap {
  display: flex;
  gap: 6px;
  font-size: 13px;
  line-height: 1.35;
}

.gtin-wrap__additional-info-wrap-name {
  color: #5b6b7b;
}

.rec-card__title {
  font-size: 17px;
}

.cmp-table {
  font-size: 13px;
}

.cmp-table th {
  font-size: 12px;
}

/* Ещё плотнее: без зазоров внутри блоков карточки заявки */
.parser-grid {
  margin-bottom: 0;
}

.app-card__body {
  padding-bottom: 0;
}

.app-card {
  padding-bottom: 6px;
}

/* «Распознано парсером» ближе к названию */
.app-card__subtitle {
  margin: 4px 0 4px;
}

/* Кнопки-ссылки поиска (E/Я/V) выглядят как кнопки */
a.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

/* Плитки парсера: пустые поля бледнее, кнопка «Показать пустые поля» */
.parser-card--empty {
  background: #f7f9fb;
  border: 1px dashed #e2e7ee;
}

.parser-card--empty .parser-card__value {
  color: #a9b4c0;
}

.parser-toggle {
  margin-top: 6px;
  padding: 4px 10px;
  border: 1px solid #dbe1e8;
  border-radius: 6px;
  background: #fff;
  color: #1f2d3d;
  font-size: 12.5px;
  cursor: pointer;
}

.parser-toggle:hover {
  border-color: #00838f;
  color: #00838f;
}

/* Сетка парсера: до 5 плиток в ряд, как в оригинале */
.parser-grid {
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

/* Таблица сравнения в рекомендациях: шрифт крупнее на 2 пт */
.cmp-table {
  font-size: 15px;
}

.cmp-table td {
  padding: 3px 8px;
  line-height: 1.3;
}

.cmp-table th {
  font-size: 13px;
  padding: 4px 8px;
}

.cmp-table__param {
  color: #5b6b7b;
}

/* Страница «Команды» */
.commands-table td,
.commands-table th {
  font-size: 13px;
  vertical-align: top;
}

.cmd-tag {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 4px;
  background: #e3f4e8;
  color: #1f7a3d;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.cmd-desc {
  color: #5b6b7b;
  max-width: 720px;
  line-height: 1.35;
}

.cmd-status {
  font-size: 11.5px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 4px;
}

.cmd-status--ok {
  background: #e3f4e8;
  color: #1f7a3d;
}

.cmd-status--error {
  background: #fdecec;
  color: #c02626;
}

.cmd-status--running {
  background: #fff3cd;
  color: #946200;
}

.cmd-status--skipped {
  background: #f1f3f5;
  color: #5f6368;
}

.cmd-run {
  white-space: nowrap;
  font-size: 12.5px;
  padding: 4px 10px;
}

/* Центр эффективности */
.rep-toolbar {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.rep-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 280px;
}

.rep-field--sm {
  min-width: 150px;
}

.rep-toolbar .form-control {
  height: 32px;
  padding: 4px 10px;
  font-size: 13.5px;
}

.rep-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.rep-card {
  border: 1px solid #e2e7ee;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
}

.rep-card__label {
  font-size: 11.5px;
  color: #8a99a8;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.rep-card__value {
  font-size: 22px;
  font-weight: 600;
  margin-top: 2px;
}

.rep-card__value--ok {
  color: #1f7a3d;
}

.rep-card__value--warn {
  color: #c02626;
}

.rep-table td,
.rep-table th {
  font-size: 13px;
}

.rep-total td {
  font-weight: 600;
  border-top: 2px solid #dbe1e8;
}

.rep-empty {
  padding: 16px;
  color: #8a99a8;
  text-align: center;
}

.rep-block {
  border: 1px solid #e2e7ee;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
  background: #fff;
}

.rep-block__title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}

.rep-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 160px;
}

.rep-bars__col {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  height: 100%;
}

.rep-bars__bar {
  width: 100%;
  background: #00838f;
  border-radius: 2px 2px 0 0;
  min-height: 1px;
}

.rep-bars__label {
  font-size: 9.5px;
  color: #8a99a8;
  margin-top: 2px;
}

.rep-heat__row {
  display: grid;
  grid-template-columns: 34px repeat(24, 1fr);
  gap: 2px;
  margin-bottom: 2px;
}

.rep-heat__hour,
.rep-heat__dow {
  font-size: 10px;
  color: #8a99a8;
  text-align: center;
}

.rep-heat__cell {
  height: 18px;
  border-radius: 2px;
  font-size: 9.5px;
  color: #fff;
  text-align: center;
  line-height: 18px;
}

/* Заявки: колонка «Код поставщика» */
.p-tbl__code {
  width: 130px;
  flex: 0 0 130px;
  font-size: 12.5px;
  color: #5b6b7b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Кнопки обработки карточки заявки: всегда видны, поверх контента */
.app-item__bottom {
  position: sticky;
  bottom: 0;
  z-index: 30;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px 16px;
  margin-top: 16px;
  background: #fff;
  border-top: 1px solid #e2e7ee;
  box-shadow: 0 -6px 16px rgba(16, 35, 55, 0.08);
  border-radius: 0 0 8px 8px;
}

/* Карточка заявки: данные товара поставщика закреплены сверху при прокрутке */
.app-item__top {
  position: sticky;
  top: 0;
  z-index: 25;
  background: #f4f6f8;
  padding-top: 6px;
  box-shadow: 0 6px 14px rgba(16, 35, 55, 0.07);
}

.app-item__top .app-top {
  margin-bottom: 0;
}

/* Карточка товара (редактирование): шрифты как в оригинале, крупнее */
.drug-head__title,
.drug-head__name {
  font-size: 28px;
  line-height: 1.25;
  font-weight: 600;
}

.drug-form .form-label,
.drug-form label.form-label {
  font-size: 14px;
  color: #6b7a89;
  margin-bottom: 6px;
  display: block;
}

.drug-form .form-control,
.drug-form textarea.form-control,
.drug-form select.form-control {
  font-size: 15px;
  line-height: 1.35;
  padding: 9px 12px;
  min-height: 42px;
}

.drug-form .input-with-btn__btn {
  font-size: 15px;
}

.drug-tabs,
.drug-tabs__item,
.drug-tabs a {
  font-size: 14.5px;
}

.drug-form .form-group {
  margin-bottom: 18px;
}

/* Ссылки на карточки товаров: код открывает карточку в новой вкладке */
.rec-card__id-link,
.rec-card__id-link:visited {
  color: #00838f;
  text-decoration: none;
  border-bottom: 1px dashed rgba(0, 131, 143, 0.45);
}

.rec-card__id-link:hover {
  color: #00646d;
  border-bottom-style: solid;
}

/* Фото товара в шапке карточки */
.drug-head__photo {
  width: 86px;
  height: 86px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #e2e7ee;
  padding: 4px;
}

/* Миниатюры товаров в каталоге */
.drug-thumb {
  width: 34px;
  height: 34px;
  object-fit: contain;
  border-radius: 4px;
  background: #fff;
  border: 1px solid #eceff3;
  display: inline-block;
}

.drug-thumb--empty {
  background: #f4f6f8;
}

/* Вкладка «Фотографии» в карточке товара */
.drug-photos-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.drug-photos-grid img {
  width: 150px;
  height: 150px;
  object-fit: contain;
  background: #fff;
  border: 1px solid #e2e7ee;
  border-radius: 8px;
  padding: 6px;
}

/* Загрузка фото в карточке товара */
.drug-photo-upload {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
  font-size: 14px;
}

.drug-photo-upload input[type='file'] {
  font-size: 13.5px;
}

/* Фото в карточке: крестик удаления */
.drug-photo-item {
  position: relative;
  display: inline-block;
}

.drug-photo-item__del {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  background: rgba(192, 38, 38, 0.92);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s;
}

.drug-photo-item:hover .drug-photo-item__del {
  opacity: 1;
}

/* Плитки фотографий в карточке */
.drug-photo-count {
  margin-top: 14px;
  font-size: 14px;
  color: #1f2d3d;
}

.drug-photo-hint {
  font-size: 12.5px;
  color: #8a99a8;
  margin-top: 2px;
}

.drug-photos-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 14px;
}

.drug-photo-card {
  width: 200px;
  border: 1px solid #e2e7ee;
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.drug-photo-card--main {
  border-color: #00838f;
}

.drug-photo-card__img {
  display: block;
  height: 150px;
}

.drug-photo-card__img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.drug-photo-card__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 13px;
}

.drug-photo-card__radio {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.drug-photo-card__del {
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 15px;
  color: #8a99a8;
}

.drug-photo-card__del:hover {
  color: #c02626;
}

.drug-photo-upload-tile {
  width: 200px;
  min-height: 196px;
  border: 1px dashed #cfd6de;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  color: #6b7a89;
  font-size: 13px;
  text-align: center;
  padding: 10px;
}

.drug-photo-upload-tile input {
  display: none;
}

.drug-photo-upload-tile__icon {
  font-size: 22px;
}

.drug-photo-upload-tile:hover {
  border-color: #00838f;
  color: #00838f;
}

/* Причина отвязки в карточке заявки */
.request-reason {
  background: #fdecec;
  border: 1px solid #f5c6c6;
  color: #b3261e;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 14px;
  margin-bottom: 14px;
}

/* Счётчик на кнопке «Запустить авто-связку» */
.i-nav__action-count {
  margin-left: 6px;
  color: #6b7a89;
  font-size: 12.5px;
}

/* Ссылки на карточки в МДМ */
.mdm-id-link {
  color: #00838f;
  text-decoration: none;
  border-bottom: 1px dashed rgba(0, 131, 143, 0.45);
}

.mdm-id-link:hover {
  color: #00646d;
  border-bottom-style: solid;
}

/* Связанные товары: галочки, названия и блок перепривязки */
.goods-check {
  margin-right: 8px;
}

.goods-title {
  color: #00838f;
  font-weight: 600;
  text-decoration: none;
}

.goods-title:hover {
  text-decoration: underline;
}

.goods-line--muted {
  color: #6b7a89;
  font-size: 12.5px;
}

.relink-block {
  border: 1px solid #e2e7ee;
  border-radius: 8px;
  padding: 16px;
  margin-top: 16px;
  background: #fff;
}

.relink-block__title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 10px;
}

.relink-block__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}

.relink-block__item {
  text-align: left;
  border: 1px solid #dbe1e8;
  border-radius: 6px;
  padding: 8px 12px;
  background: #fff;
  cursor: pointer;
  font-size: 13.5px;
}

.relink-block__item:hover:not(:disabled) {
  border-color: #00838f;
  color: #00838f;
}

.relink-block__hint {
  color: #8a99a8;
  font-size: 13px;
}

/* Связанные товары: таблица с чекбоксами */
.linked-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid #e2e7ee;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 8px;
  background: #fff;
}

.linked-row__check {
  margin-top: 4px;
}

.linked-row__photo {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  background: #f1f3f5;
  border: 1px solid #eceff3;
  flex: 0 0 44px;
}

.linked-row__main {
  flex: 1 1 auto;
  min-width: 0;
}

.linked-row__title {
  font-size: 14.5px;
  font-weight: 600;
  color: #1f2d3d;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.linked-row__sub {
  font-size: 12.5px;
  color: #6b7a89;
}

.linked-row__ids {
  display: flex;
  gap: 24px;
  flex: 0 0 auto;
}

.linked-row__label {
  display: block;
  font-size: 11.5px;
  color: #8a99a8;
}

.linked-row__value {
  font-size: 13.5px;
  color: #1f2d3d;
}

/* ЖНВЛП: последний файл и журнал обновлений */
.jv-lastfile {
  font-size: 13px;
  color: #6b7a89;
  margin-bottom: 10px;
}

.jv-runs {
  margin-top: 22px;
}

.jv-runs__title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
}

.jv-runs__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.jv-runs__table th {
  text-align: left;
  color: #8a99a8;
  font-weight: 500;
  padding: 6px 8px;
  border-bottom: 1px solid #e2e7ee;
}

.jv-runs__table td {
  padding: 6px 8px;
  border-bottom: 1px solid #f1f4f8;
}

/* Страница входа */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f4f7fa;
}

.login-card {
  width: 360px;
  background: #fff;
  border: 1px solid #e2e7ee;
  border-radius: 10px;
  padding: 28px 26px;
  box-shadow: 0 6px 24px rgba(15, 40, 60, 0.06);
}

.login-card__brand {
  color: #00838f;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.login-card__title {
  font-size: 20px;
  font-weight: 600;
  margin: 6px 0 18px;
}

.login-field {
  display: block;
  margin-bottom: 12px;
}

.login-field span {
  display: block;
  font-size: 12.5px;
  color: #6b7a89;
  margin-bottom: 4px;
}

.login-field input {
  width: 100%;
  height: 38px;
  border: 1px solid #d5dde6;
  border-radius: 6px;
  padding: 0 10px;
  font-size: 14px;
}

.login-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #4a5b6b;
  margin: 6px 0 14px;
}

.login-error {
  background: #fdecec;
  border: 1px solid #f5c6c6;
  color: #b3261e;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 13px;
  margin-bottom: 12px;
}

.login-submit {
  width: 100%;
  height: 40px;
}

.login-hint {
  margin-top: 12px;
  font-size: 12px;
  color: #8a99a8;
  line-height: 1.4;
}

/* Часть «Style» в названии бренда — светлее основного */
.logo__style {
  font-weight: 400;
  color: #4fa8b3;
  margin-left: 2px;
}
