/* Проект дизайнера (project-ui.js, 09.11.2026): окно #dlgProject - файл, листы, лист с найденным и таблица помещений.
   На телефоне окно во весь экран, картинка листа над таблицей. */
.dlg.pj { width: min(1200px, 96vw); }
.dlg.pj .dlg-head { gap: 10px; }
.dlg.pj .dlg-head h2 { flex: 0 0 auto; }
.pj-tag { flex: 1; font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pj-svc { font-size: 13px; color: var(--warn); margin-bottom: 10px; }
.pj-pick { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 28px 12px; border: 2px dashed var(--line2); border-radius: var(--r-lg); cursor: pointer; text-align: center; }
.pj-prog { display: flex; align-items: center; gap: 8px; margin: 12px 0; font-size: 14px; }
.pj-prog .spin { width: 14px; height: 14px; border: 2px solid var(--line2); border-top-color: var(--accent, #2a8cf0); border-radius: 50%; animation: pj-spin 0.9s linear infinite; }
@keyframes pj-spin { to { transform: rotate(360deg); } }
.pj-pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin: 10px 0; }
.pj-page { display: flex; flex-direction: column; gap: 4px; padding: 8px; border: 1px solid var(--line2); border-radius: var(--r-md, 8px); background: var(--card, transparent); color: inherit; text-align: left; cursor: pointer; font: inherit; }
.pj-page:hover { border-color: var(--accent, #2a8cf0); }
.pj-page.best { border: 2px solid var(--ok, #1b9e5a); }
.pj-page img, .pj-noimg { display: block; width: 100%; aspect-ratio: 1.41; object-fit: contain; background: #fff; border-radius: 4px; }
.pj-page span { font-size: 12px; color: var(--muted); }
.pj-badges { display: flex; flex-wrap: wrap; gap: 4px; }
.pj-badges i { font-style: normal; font-size: 11px; padding: 1px 6px; border-radius: 9px; background: var(--line, rgba(127, 127, 127, 0.15)); color: inherit; }
.pj-badges i.rec { background: var(--ok, #1b9e5a); color: #fff; }
.pj-wrap { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, 1fr); gap: 14px; align-items: start; }
.pj-pic { position: relative; line-height: 0; background: #fff; border-radius: var(--r-sm, 6px); overflow: hidden; }
.pj-pic img { display: block; width: 100%; height: auto; user-select: none; -webkit-user-drag: none; }
.pj-pic svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.pj-zone { fill: rgba(42, 140, 240, 0.06); stroke: #2a8cf0; stroke-width: 3; stroke-dasharray: 12 7; }
.pj-zl { fill: #2a8cf0; font: 700 34px Segoe UI, sans-serif; text-anchor: middle; paint-order: stroke; stroke: #fff; stroke-width: 6px; }
.pj-dot { fill: rgba(255, 255, 255, 0.35); stroke-width: 4; }
.pj-off { fill: none; stroke: #999; stroke-width: 3; stroke-dasharray: 4 4; }
.pj-line { fill: none; stroke-width: 6; stroke-linejoin: round; stroke-linecap: round; opacity: 0.85; }
.pj-side { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.pj-rows { width: 100%; border-collapse: collapse; font-size: 13px; }
.pj-rows th { text-align: left; font-weight: 600; color: var(--muted); padding: 4px 6px; border-bottom: 1px solid var(--line2); }
.pj-rows td { padding: 6px; border-bottom: 1px solid var(--line, rgba(127, 127, 127, 0.15)); vertical-align: top; }
.pj-rows select { width: 100%; min-width: 150px; }
.pj-what { font-size: 12px; color: var(--muted); margin-top: 2px; }
.pj-warn { font-size: 12px; color: var(--warn); margin-top: 3px; }
.pj-or { white-space: nowrap; }
.pj-skip { font-size: 12px; }
.pj-chk { display: flex; gap: 6px; align-items: center; font-size: 13px; }
/* режимы (11.11.2026): «Построить потолки по проекту» / «Поставить в помещения объекта» */
.pj-mode { display: flex; flex-wrap: wrap; gap: 0; margin: 0 0 12px; border: 1px solid var(--line2); border-radius: var(--r-md, 8px); overflow: hidden; width: max-content; max-width: 100%; }
.pj-mode button { flex: 1 1 auto; padding: 7px 14px; border: 0; background: transparent; color: inherit; font: inherit; font-size: 14px; cursor: pointer; }
.pj-mode button + button { border-left: 1px solid var(--line2); }
.pj-mode button.on { background: var(--accent, #2a8cf0); color: #fff; font-weight: 600; }
.pj-zone.off { fill: none; stroke: #9aa3ad; stroke-width: 2; }
.pj-build td:first-child { width: 22px; padding-top: 8px; }
.pj-build tr.off td:not(:first-child) { opacity: 0.5; }
.pj-cont { width: 96px; }
.pj-mini { display: block; width: 84px; height: 58px; }
.pj-mini polygon { fill: rgba(42, 140, 240, 0.12); stroke: #2a8cf0; stroke-width: 1.6; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.pj-note { margin: 0 0 10px; }
.pj-done { font-size: 12px; color: var(--ok-ink, var(--ok)); }
@media (max-width: 860px) {
  .pj-wrap { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .pj-mode { width: 100%; flex-direction: column; }
  .pj-mode button { padding: 7px 8px; font-size: 13px; }
  .pj-mode button + button { border-left: 0; border-top: 1px solid var(--line2); }
}
