/* ============================================================
   ПЕЧАТЬ ПОСТАВЩИКОВ — КОНСТРУКТОР v481 (08.10.2026).
   Лист на экране — бумага: белый в любой теме, шрифты печати.
   spp- — слайд PowerPoint (размеры в процентах от слайда и cqw),
   spd- — страница Word (миллиметры × 3 пикселя, уменьшается целиком).
   Код — frontend/portal/36-supplier-print.js.
   ============================================================ */
@font-face { font-family: "SP Roboto Condensed"; font-weight: 400; font-display: block;
  src: url("/api/suppliers/print-asset/roboto-400.woff2") format("woff2"); }
@font-face { font-family: "SP Roboto Condensed"; font-weight: 700; font-display: block;
  src: url("/api/suppliers/print-asset/roboto-700.woff2") format("woff2"); }
@font-face { font-family: "SP Circe Bold"; font-weight: 400; font-display: block;
  src: url("/api/suppliers/print-asset/circe-700.woff2") format("woff2"); }

.sp-page { position: relative; }
.sp-page .slim { min-height: 30px; padding: 0 12px; font-size: 12.5px; }
.sp-status { color: var(--muted); font-size: 12px; }
.sp-status.is-error { color: #b42318; font-weight: 600; }
.sp-page .afisha-chip { border: 0; font: inherit; font-size: 12px; }
button.afisha-chip { cursor: pointer; }
.sp-texts label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.sp-texts input[type="text"] { width: 240px; max-width: 100%; padding: 4px 8px; }

/* ---- выбор шаблона ---- */
.sp-tpls { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.sp-tpl { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1.5px solid var(--line);
  border-radius: 14px; background: var(--surface); color: var(--text); text-align: left; cursor: pointer; }
.sp-tpl b { display: block; font-size: 14px; }
.sp-tpl small { display: block; color: var(--muted); font-size: 12px; line-height: 1.35; }
.sp-tpl.is-on { border-color: var(--brand); background: var(--surface-selected, #fdf2f6); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent); }
.sp-tpl:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.sp-tpl-thumb { flex: 0 0 auto; display: flex; flex-direction: column; gap: 2px; width: 34px; height: 46px; padding: 9px 4px 4px;
  border: 1px solid #c9d1dc; border-radius: 3px; background: #fff; }
.sp-tpl-thumb i { display: block; height: 4px; border-radius: 1px; background: #cfe5dc; }
.sp-tpl-thumb.is-pptx { border-color: #469d83; }
.sp-tpl-thumb.is-pptx i:first-child { background: #9ccbb8; }
.sp-tpl-thumb.is-docx { width: 34px; padding-top: 7px; }
.sp-tpl-thumb.is-docx i { height: 3px; background: #e2e2e2; }
.sp-tpl-thumb.is-docx i:nth-child(2) { background: #b5b5b5; }
.sp-tpl-thumb.is-docx i:first-child { background: #b0566f; height: 4px; }

/* ---- листы ---- */
.sp-sheets { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 18px; align-items: start; }
.sp-sheets.is-docx { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); }
.sp-sheet { display: grid; gap: 8px; padding: 12px; border: 1.5px solid var(--line); border-radius: 16px; background: var(--surface-card); }
.sp-sheet.is-tight { border-color: #f0a83c; }
.sp-sheet.is-over { border-color: #d9483b; }
.sp-sheet-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.sp-sheet-head b { font-size: 14px; }
.sp-sheet-head span { color: var(--muted); font-size: 12px; }
.sp-sheet-head em { font-style: normal; font-size: 11.5px; color: var(--muted); }
.sp-sheet-head em.sp-forced { color: #b45309; font-weight: 600; }
.sp-type-btn { margin-left: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); padding: 2px 8px; font-size: 12px; cursor: pointer; }
.sp-type-btn.is-own { border-color: var(--brand); color: var(--brand); font-weight: 700; }
.sp-sheet-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.sp-fill { flex: 1 1 120px; height: 5px; border-radius: 3px; background: var(--surface-2, #eef1f6); overflow: hidden; }
.sp-fill > div { height: 100%; background: #2f9e6f; border-radius: 3px; }
.sp-sheet.is-tight .sp-fill > div { background: #f0a83c; }
.sp-sheet.is-over .sp-fill > div { background: #d9483b; }

/* ---- слайд PowerPoint ---- */
.spp-slide { position: relative; width: 100%; container-type: inline-size; overflow: hidden; background: #fff; color: #282525;
  border-radius: 4px; box-shadow: 0 1px 3px rgba(20, 30, 50, .16); font-family: "SP Circe Bold", "Circe", "Arial", sans-serif; }
.spp-logo { position: absolute; left: 4.3%; top: 4.4%; width: 17.4%; height: auto; max-width: none; }
.spp-title { position: absolute; left: 1.6%; right: 1.6%; top: 13.8%; text-align: center; color: #790e3c; font-size: 6.05cqw; line-height: 1.1; white-space: nowrap; }
.spp-subtitle { position: absolute; left: 1.6%; right: 1.6%; top: 18.3%; text-align: center; font-size: 2.2cqw; line-height: 1.1; }
.spp-table { position: absolute; display: flex; flex-direction: column; border: 1.5px solid #469d83; border-radius: 1.6cqw;
  background: #f1f8f5; overflow: hidden; font-family: "Arial Narrow", "SP Roboto Condensed", sans-serif; }
.spp-head, .spp-row { display: grid; grid-template-columns: var(--sp-cols); flex: 0 0 auto; align-items: center; }
.spp-head { background: #d4ebe1; font-size: 2.02cqw; font-weight: 700; }
.spp-head span, .spp-row span { padding: 0 .5cqw; text-align: center; overflow: hidden; line-height: 1.15; overflow-wrap: anywhere; }
.spp-row { width: 100%; padding: 0; border: 0; border-top: 1px solid rgba(70, 157, 131, .35); background: transparent; color: inherit;
  font: inherit; font-size: calc(1.85cqw * var(--sp-font, 1)); cursor: pointer; text-align: center; overflow: hidden; }
.spp-row:hover { background: #fff3d6; }
.spp-row:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.spp-row span.is-strong { font-weight: 700; }

/* ---- страница Word ---- */
.spd-frame { position: relative; width: 100%; overflow: hidden; background: #fff; border-radius: 4px; box-shadow: 0 1px 3px rgba(20, 30, 50, .16); }
.spd-paper { position: absolute; left: 0; top: 0; box-sizing: border-box; transform-origin: 0 0; background: #fff; color: #000;
  font-family: "SP Roboto Condensed", "Roboto Condensed", "Arial Narrow", sans-serif; text-align: left; }
.sp-measure { position: absolute; left: -40000px; top: 0; visibility: hidden; pointer-events: none; }
.sp-measure .spd-paper { position: static; transform: none; }
.spd-paper p { margin: 0; padding: 0; color: inherit; }
.spd-title-block p { text-align: center; font-family: "SP Circe Bold", "Circe", sans-serif; font-weight: 400; line-height: 1.474; }
.spd-title { color: #800036; }
.spd-title .is-district { color: #165849; }
.spd-subtitle { color: #000; }
.spd-paper .spd-table { width: 100%; margin: 0; border-collapse: collapse; table-layout: fixed; background: #fff; }
.spd-paper .spd-table th, .spd-paper .spd-table td { border: .5px solid #000; padding: var(--sp-cell-v) var(--sp-cell-h);
  font-family: inherit; font-size: var(--sp-body); line-height: 1.2; font-weight: 400; color: #000; background: #fff;
  text-align: center; vertical-align: middle; text-transform: none; letter-spacing: 0; overflow-wrap: break-word; white-space: normal; }
.spd-paper .spd-table th, .spd-paper .spd-table td.is-strong { font-weight: 700; }
.spd-paper .spd-section td { background: #d9d9d9; font-weight: 700; }
.spd-frame .spd-row { cursor: pointer; }
.spd-frame .spd-row:hover td { background: #fff3d6; }
.spd-frame .spd-section { cursor: pointer; }
.spd-frame .spd-row.is-break td { border-top: 3px solid #c2410c; }
.spd-foot-block { font-family: "SP Circe Bold", "Circe", sans-serif; line-height: 1.474; }
.spd-note { text-align: left; }
.spd-foot { display: grid; grid-template-columns: var(--logo) minmax(0, 1fr); align-items: center;
  padding: var(--sp-cell-v) 0; }
.spd-foot img { display: block; max-width: none; margin-left: var(--sp-cell-h); }
.spd-foot > div { padding: 0 var(--sp-cell-h); text-align: right; }
.spd-foot .is-site { color: #ff0000; }

/* ---- разделы ---- */
.sp-sections { margin-bottom: 16px; padding-top: 12px; padding-bottom: 12px; }
.sp-sections summary { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; cursor: pointer; list-style: none; }
.sp-sections summary::-webkit-details-marker { display: none; }
.sp-sections summary::before { content: "▸"; color: var(--muted); transition: transform .15s; }
.sp-sections[open] summary::before { transform: rotate(90deg); }
.sp-sections summary b { font-size: 15px; }
.sp-sections summary span { flex: 1 1 260px; min-width: 0; color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-sections summary em { font-style: normal; color: var(--brand); font-size: 12.5px; font-weight: 600; }
.sp-sections[open] summary span { display: none; }
.sp-sections > .hint { margin: 8px 0 10px; }
.sp-sections ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); gap: 6px; margin: 0; padding: 0; list-style: none; }
.sp-sections li { display: grid; gap: 6px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 12px; }
.sp-sec-main { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sp-sec-main input[type="text"] { flex: 1 1 160px; min-width: 0; min-height: 32px; height: 32px; padding: 3px 8px; font-weight: 600; font-size: 13.5px; }
.sp-sec-main em { font-style: normal; color: var(--muted); font-size: 12px; min-width: 58px; }
.sp-sec-main button { min-width: 32px; min-height: 32px; height: 32px; padding: 0 8px; }
.sp-sec-main select { max-width: 170px; min-height: 32px; height: 32px; padding: 2px 6px; font-size: 12.5px; }
.sp-sec-main button:disabled { opacity: .35; cursor: default; }
.sp-sec-sources { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; color: var(--muted); font-size: 12px; }
.sp-sec-sources span { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 8px; border-radius: 8px; background: var(--surface-2, #eef1f6); color: var(--text); }
.sp-sec-sources button { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 0 4px; font-size: 12px; }

/* ---- окна ---- */
.sp-menu { display: grid; gap: 8px; margin: 12px 0; }
.sp-menu button { justify-content: flex-start; text-align: left; }
.sp-menu .danger { color: #b42318; border-color: #f0b8b2; }
.sp-removed { display: grid; gap: 6px; margin: 10px 0; padding: 0; list-style: none; }
.sp-removed li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; }

@media (max-width: 720px) {
  .sp-sheets, .sp-sheets.is-docx { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .sp-sheet { padding: 10px; }
  .sp-texts label { display: grid; width: 100%; }
  .sp-texts input[type="text"] { width: 100%; }
  .sp-sec-main select { max-width: 100%; flex: 1 1 100%; }
}
.sp-page .afisha-type-bar input[placeholder] { width: 96px; }
