/* ── Снабжение → «Поставщики и группы материалов» (12.10.2026) ─────────
   Слева — группы по блокам (Электрика, Слаботочка, Общестрой) с числом
   поставщиков, отбор щелчком; справа — поставщики, у каждого плашки групп.
   Цвет плашки — блок; пунктир — группа подобрана по описанию из
   справочника, её надо проверить. */
.sup-pg .pg-head .sup-cnt { font-size: 11px; color: var(--ink3); white-space: nowrap; }
.sup-upl { cursor: pointer; display: inline-flex; align-items: center; flex: none; }
.sup-body { display: flex; min-height: 0; padding: 0 !important; overflow: hidden; }
.sup-main { flex: 1; min-width: 0; overflow: auto; }

/* Цвета блоков: электрика — фирменный, слаботочка — фиолетовый, общестрой — синий. */
.b-el { --blk: var(--brand); }
.b-ss { --blk: var(--viol); }
.b-gen { --blk: var(--info); }
.b-x { --blk: var(--ink3); }

.sup-side {
  flex: none; width: 290px; overflow-y: auto; padding: 10px 8px 16px;
  border-right: 1px solid var(--line2); background: var(--card);
}
.sup-side h4 {
  margin: 14px 8px 4px; font: 600 9.5px var(--sans); letter-spacing: .07em; text-transform: uppercase;
  color: var(--blk, var(--ink3));
}
.sup-si {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 5px 8px; border: 0; border-radius: 7px;
  background: none; font: inherit; font-size: 11.5px; color: var(--ink2); text-align: left; cursor: pointer;
}
.sup-si span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sup-si i { flex: none; font-style: normal; font-size: 10.5px; color: var(--ink3); font-variant-numeric: tabular-nums; }
.sup-si:hover { background: var(--raise); color: var(--ink); }
.sup-si.on { background: color-mix(in srgb, var(--blk, var(--brand)) 12%, var(--card)); color: var(--ink); font-weight: 600; }
.sup-si[class*="b-"]::before {
  content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--blk);
}
.sup-si.warn i { color: var(--warn); }
.sup-si.auto i { color: var(--viol); }
.sup-si-empty { display: block; padding: 4px 8px; font-size: 10.5px; color: var(--ink3); }

.sup-tbl col.c-name { width: 30%; }
.sup-tbl col.c-grp { width: 34%; }
.sup-tbl col.c-who { width: 19%; }
.sup-tbl col.c-def { width: 92px; }
.sup-tbl col.c-dlv { width: 120px; }
.sup-tbl td { vertical-align: top; }
.sup-what, .sup-who, .sup-dlv { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sup-tbl .t-sub { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Плашки — в одну строку: сжимаются с многоточием, «+N» всегда видно. */
.sup-chips { display: flex; flex-wrap: nowrap; gap: 4px; min-width: 0; overflow: hidden; }
.sup-chip {
  flex: 0 1 auto; min-width: 46px; max-width: 220px; padding: 1px 7px; border: 1px solid color-mix(in srgb, var(--blk, var(--ink3)) 35%, transparent);
  border-radius: 999px; background: color-mix(in srgb, var(--blk, var(--ink3)) 9%, var(--card));
  font-size: 10px; line-height: 16px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sup-chip.auto { border-style: dashed; }
.sup-more { flex: none; padding: 1px 6px; font-size: 10px; line-height: 16px; color: var(--ink3); cursor: default; }
.sup-imp-tbl .sup-chips { flex-wrap: wrap; }
.sup-none { font-size: 10.5px; color: var(--warn); }

/* ── карточка поставщика ── */
.pf-crop.sup-card { width: min(1040px, calc(100vw - 32px)); max-height: 92vh; display: flex; flex-direction: column; }
.sup-card-h { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.sup-card-h h3 { margin: 0; }
.sup-auto-note {
  padding: 2px 9px; border: 1px dashed var(--viol); border-radius: 999px; font-size: 10.5px; color: var(--viol);
}
.sup-card-b { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 18px; }
.sup-card-f { overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding-right: 2px; }
.sup-card-f .fld input, .sup-card-f .fld textarea { width: 100%; }
.sup-card-f textarea { resize: vertical; min-height: 44px; }
.sup-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
/* Контакты поставщика — строками: лицо, телефон, почта. */
.sup-cts-h { display: flex; align-items: center; gap: 6px; margin-bottom: 4.5px; font-size: 11px; font-weight: 600; color: var(--ink2); }
.sup-cts-h .grow { flex: 1; }
.sup-ct-add { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 500; }
.sup-ct-add svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 2; }
.sup-cts-l { display: flex; flex-direction: column; gap: 5px; }
.sup-ct { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1.2fr) 25px; gap: 5px; align-items: center; }
.sup-ct:not(:has(.ico)) { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1.2fr); }
.sup-ct input {
  width: 100%; min-width: 0; height: 30.5px; padding: 0 9px; border: 1px solid var(--line); border-radius: 9px;
  background: var(--card); color: var(--ink); font: 400 11.5px var(--sans); outline: none;
}
.sup-ct input:focus { border-color: var(--brand); }
.sup-ct input[readonly] { background: var(--raise); border-color: transparent; }
.sup-ct .ico { margin: 0; }
/* «+2» — сколько ещё контактов; не уходит под многоточие имени. */
.sup-who-l { display: flex; align-items: baseline; gap: 5px; min-width: 0; }
.sup-who-l .sup-who { min-width: 0; }
.sup-ct-n { flex: none; padding: 0 5px; border-radius: 999px; background: var(--raise); font-style: normal;
  font-size: 10px; line-height: 15px; color: var(--ink2); }
.sup-props { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 2px 10px; margin: 2px 0 0;
  padding: 8px 10px; border-radius: 8px; background: var(--raise); font-size: 10.5px; }
.sup-props dt { color: var(--ink3); }
.sup-props dd { margin: 0; color: var(--ink2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sup-card-g { overflow-y: auto; padding: 8px 10px; border: 1px solid var(--line2); border-radius: 10px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; align-content: start; }
.sup-card-gh { grid-column: 1 / -1; font-size: 11px; font-weight: 600; color: var(--ink2); margin-bottom: 2px; }
.sup-gb h4 { margin: 6px 0 3px; font: 600 9.5px var(--sans); letter-spacing: .07em; text-transform: uppercase; color: var(--blk); }
.sup-gb.b-gen { grid-column: 1 / -1; columns: 2; column-gap: 16px; }
.sup-gb.b-gen h4 { column-span: all; }
.sup-gc { display: flex; align-items: flex-start; gap: 6px; padding: 2px 0; font-size: 11px; color: var(--ink2);
  cursor: pointer; break-inside: avoid; }
.sup-gc input { margin-top: 2px; accent-color: var(--blk); flex: none; }
.sup-gc:has(input:checked) { color: var(--ink); }

/* ── группы: редактор ── */
.pf-crop.sup-ge { width: min(1240px, calc(100vw - 32px)); max-height: 92vh; display: flex; flex-direction: column; }
.sup-ge-h { display: flex; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.sup-ge-h h3 { margin: 0; }
.sup-ge-cols { flex: 1; min-height: 0; overflow: auto; display: grid; grid-auto-flow: column;
  grid-auto-columns: minmax(300px, 1fr); gap: 12px; }
.sup-ge-col { display: flex; flex-direction: column; min-height: 0; border: 1px solid var(--line2); border-radius: 10px;
  border-top: 3px solid var(--blk); padding: 8px 8px 10px; }
.sup-ge-col header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.sup-ge-col header i { font-style: normal; font-size: 10.5px; color: var(--ink3); }
.sup-ge-bn { border: 0; background: none; padding: 2px 4px; border-radius: 6px; font: 600 12px var(--sans);
  color: var(--ink); cursor: text; }
.sup-ge-bn:hover { background: var(--raise); }
.sup-ge-col ol { list-style: none; margin: 0; padding: 0; overflow-y: auto; }
.sup-ge-col li { display: flex; align-items: center; gap: 4px; padding: 2px 0; border-bottom: 1px solid var(--line2); }
.sup-ge-col li:last-child { border-bottom: 0; }
.sup-ge-n { flex: 1; min-width: 0; border: 0; background: none; padding: 5px 4px; border-radius: 6px; font: inherit;
  font-size: 11px; color: var(--ink); text-align: left; cursor: text; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; }
.sup-ge-n:hover { background: var(--raise); }
.sup-ge-col li i { flex: none; width: 24px; text-align: right; font-style: normal; font-size: 10.5px; color: var(--ink3); }
.sup-ge-col .ico { width: 24px; height: 24px; }
.sup-ge-col .ico svg { width: 12px; height: 12px; }
.sup-ge-add { margin-top: 6px; align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; }
.sup-ge-add svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 2; }
.sup-menu {
  position: fixed; z-index: 90; width: 240px; padding: 5px; background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; box-shadow: var(--shadow-float);
}
.sup-menu button { display: block; width: 100%; padding: 7px 9px; border: 0; border-radius: 7px; background: none;
  font: inherit; font-size: 11.5px; color: var(--ink); text-align: left; cursor: pointer; }
.sup-menu button:hover { background: var(--raise); }
.sup-menu button.warn { color: var(--bad); }
.pf-crop.sup-pick { width: 420px; max-height: 80vh; display: flex; flex-direction: column; }
.sup-pick-l { flex: 1; min-height: 0; overflow-y: auto; }
.sup-pick-l h4 { margin: 8px 0 3px; font: 600 9.5px var(--sans); letter-spacing: .07em; text-transform: uppercase; color: var(--ink3); }
.sup-pick-l button { display: block; width: 100%; padding: 6px 8px; border: 0; border-radius: 7px; background: none;
  font: inherit; font-size: 11.5px; color: var(--ink); text-align: left; cursor: pointer; }
.sup-pick-l button:hover { background: var(--raise); }

/* ── загрузка справочника ── */
.pf-crop.sup-imp { width: min(1100px, calc(100vw - 32px)); max-height: 92vh; display: flex; flex-direction: column; }
.sup-imp-kpi { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 6px; font-size: 11.5px; color: var(--ink2); }
.sup-imp-kpi b { color: var(--ink); font-size: 13px; }
.sup-imp-kpi .warn b { color: var(--warn); }
.sup-imp-skip { margin-bottom: 8px; }
.sup-imp-body { flex: 1; min-height: 0; overflow: auto; border: 1px solid var(--line2); border-radius: 10px; }
.sup-imp-tbl { min-width: 760px; }
.sup-imp-tbl td { vertical-align: top; }
.sup-imp-tbl .t-sub { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.sup-act { font-size: 10.5px; font-weight: 600; white-space: nowrap; }
.sup-act.new { color: var(--ok); }
.sup-act.upd { color: var(--info); }
.sup-act.grp { color: var(--viol); }
.sup-imp .pf-modal-foot { align-items: center; }
.sup-imp .pf-modal-foot .grow { flex: 1; }

@media (max-width: 900px) {
  .sup-body { flex-direction: column; overflow: auto; }
  .sup-side { width: auto; max-height: 220px; border-right: 0; border-bottom: 1px solid var(--line2); }
  .sup-main { overflow: visible; }
  .sup-card-b { grid-template-columns: minmax(0, 1fr); overflow-y: auto; }
  .sup-card-f, .sup-card-g { overflow: visible; }
  .sup-card-g { grid-template-columns: minmax(0, 1fr); }
  .sup-gb.b-gen { columns: 1; }
  .sup-ge-cols { grid-auto-flow: row; grid-auto-columns: auto; }
}

/* ── проработка: запрос поставщикам по группам ── */
.pf-crop.rq { width: min(1240px, calc(100vw - 32px)); height: min(820px, 92vh); display: flex; flex-direction: column; }
.rq-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.rq-head h3 { margin: 0; }
.rq-body { flex: 1; min-height: 0; display: flex; gap: 14px; }
.rq-side { flex: none; width: 300px; overflow-y: auto; padding-right: 4px; border-right: 1px solid var(--line2); }
.rq-side h4 { margin: 10px 8px 3px; font: 600 9.5px var(--sans); letter-spacing: .07em; text-transform: uppercase;
  color: var(--blk, var(--ink3)); }
.rq-side h4:first-child { margin-top: 0; }
.rq-si { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; border: 0; border-radius: 7px;
  background: none; font: inherit; font-size: 11.5px; color: var(--ink2); text-align: left; cursor: pointer; }
.rq-si span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rq-si i { flex: none; font-style: normal; font-size: 10px; color: var(--ink3); white-space: nowrap; }
.rq-si:hover { background: var(--raise); color: var(--ink); }
.rq-si.on { background: color-mix(in srgb, var(--blk, var(--brand)) 12%, var(--card)); color: var(--ink); font-weight: 600; }
.rq-si[class*="b-"]::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--blk); }
.rq-si.warn i { color: var(--warn); }
.rq-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.rq-gh { flex: none; display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; border-radius: 10px;
  border-left: 3px solid var(--blk, var(--line)); background: var(--raise); }
.rq-gh b { font-size: 12.5px; color: var(--ink); }
.rq-gh span { font-size: 11px; color: var(--ink2); }
.rq-gh.warn { --blk: var(--warn); }
.rq-pos { flex: 1 1 60%; min-height: 120px; overflow: auto; border: 1px solid var(--line2); border-radius: 10px; }
.rq-tbl { --gut: 10px; min-width: 680px; }
.rq-tbl tbody td { padding-top: 4px; padding-bottom: 4px; }
.rq-tbl tr.off td { opacity: .5; }
.rq-tbl .num { text-align: right; white-space: nowrap; }
.rq-nm { display: block; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rq-th-i { font-style: normal; font-weight: 400; color: var(--ink3); }
.rq-g { width: 100%; max-width: 100%; height: 26px; font-size: 11px; }
.rq-g.auto { border-style: dashed; }
.rq-to { flex: 0 1 40%; min-height: 90px; display: flex; flex-direction: column; }
.rq-to h4 { margin: 0 0 4px; font-size: 11px; font-weight: 600; color: var(--ink2); }
.rq-sups { list-style: none; margin: 0; padding: 4px 8px; overflow-y: auto; border: 1px solid var(--line2); border-radius: 10px; }
.rq-sups li { display: flex; align-items: baseline; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--line2); font-size: 11px; }
.rq-sups li:last-child { border-bottom: 0; }
.rq-sups li.off { opacity: .55; }
.rq-sups label { display: inline-flex; align-items: center; gap: 6px; flex: none; max-width: 40%; cursor: pointer; }
.rq-sups label b { font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rq-sup-c { flex: 1; min-width: 0; color: var(--ink3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rq-sup-c em { font-style: normal; color: var(--warn); }
.rq-nosup { padding: 10px 12px; border: 1px dashed var(--line); border-radius: 10px; font-size: 11px; color: var(--ink2); }
.rq .pf-modal-foot { align-items: center; flex-wrap: wrap; }
.rq .pf-modal-foot .grow { flex: 1; }
.rq-bulk { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; color: var(--ink2); }
.rq-bulk select { height: 28px; max-width: 360px; font-size: 11px; }

@media (max-width: 900px) {
  .pf-crop.rq { height: 92vh; }
  .rq-body { flex-direction: column; overflow-y: auto; }
  .rq-side { width: auto; max-height: 200px; border-right: 0; border-bottom: 1px solid var(--line2); }
  .rq-pos, .rq-to { flex: none; }
}
.rq .pf-modal-foot .btn, .rq .pf-modal-foot .btn-ghost { white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; }
.rq .pf-modal-foot svg, .sup-card .pf-modal-foot svg {
  width: 12px; height: 12px; flex: none; fill: none; stroke: currentColor; stroke-width: 2;
}
