/* public/win.css — растягивание за края и сворачивание окон (2026-10-19t, public/win.js) */
.win-frame { position: absolute; pointer-events: none; z-index: 5; box-sizing: border-box; }
.win-rs { position: absolute; pointer-events: auto; touch-action: none; }
.win-rs-n, .win-rs-s { left: 10px; right: 10px; height: 8px; cursor: ns-resize; }
.win-rs-n { top: -4px; } .win-rs-s { bottom: -4px; }
.win-rs-e, .win-rs-w { top: 10px; bottom: 10px; width: 8px; cursor: ew-resize; }
.win-rs-e { right: -4px; } .win-rs-w { left: -4px; }
.win-rs-ne, .win-rs-nw, .win-rs-se, .win-rs-sw { width: 14px; height: 14px; }
.win-rs-ne { top: -5px; right: -5px; cursor: nesw-resize; } .win-rs-sw { bottom: -5px; left: -5px; cursor: nesw-resize; }
.win-rs-nw { top: -5px; left: -5px; cursor: nwse-resize; } .win-rs-se { bottom: -5px; right: -5px; cursor: nwse-resize; }
.win-rs-se::after { content: ''; position: absolute; right: 6px; bottom: 6px; width: 8px; height: 8px; border-right: 2px solid rgba(100, 110, 125, .55); border-bottom: 2px solid rgba(100, 110, 125, .55); }
.win-frame.win-noresize .win-rs { display: none; }
.win-min { position: absolute; pointer-events: auto; top: -26px; right: 0; height: 24px; min-height: 24px; padding: 0 10px; font-size: 12px; line-height: 22px; border-radius: 8px 8px 0 0; border: 1px solid rgba(255,255,255,.5); border-bottom: 0; background: rgba(255, 255, 255, .92); color: #1f2937; cursor: pointer; box-shadow: 0 -2px 8px rgba(0,0,0,.12); }
.win-min:hover { background: #fff; }
body.win-resizing { user-select: none; cursor: grabbing; }
body.win-resizing iframe { pointer-events: none; }
.win-box { box-sizing: border-box; }
.win-box::-webkit-scrollbar { width: 12px; height: 12px; }
.win-box::-webkit-scrollbar-thumb { background: #b7bec9; border-radius: 6px; border: 3px solid transparent; background-clip: padding-box; }
.win-box::-webkit-scrollbar-track { background: transparent; }
.win-box { scrollbar-width: auto; }
/* закладки свёрнутых окон — внизу по центру (слева — плашки свёрнутых заявок 15d) */
.win-dock { position: fixed; left: 50%; transform: translateX(-50%); bottom: 12px; z-index: 1900; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: calc(100vw - 240px); }
.win-dock[hidden] { display: none; }
.win-chip-open { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-height: 36px; padding: 6px 12px; border-radius: 10px; border: 1px solid var(--border, #cfd5dd); background: var(--surface, #fff); color: var(--text, #1f2937); box-shadow: 0 4px 14px rgba(0,0,0,.18); cursor: pointer; font-size: 13px; }
.win-chip-open:hover { border-color: var(--accent-btn, #1769aa); }
html[data-theme="dark"] .win-min { background: rgba(30, 36, 46, .95); color: #e5e7eb; border-color: #3a4352; }
html[data-theme="dark"] .win-chip-open { background: #1f2630; color: #e5e7eb; border-color: #3a4352; }
html[data-theme="dark"] .win-box::-webkit-scrollbar-thumb { background: #4b5563; background-clip: padding-box; border: 3px solid transparent; }
@media (max-width: 600px) {
  .win-min { height: 26px; min-height: 26px; }
  .win-dock { left: 8px; right: 8px; transform: none; max-width: none; justify-content: flex-start; }
  body.win-docked .om-dock { bottom: 64px; }
  .win-chip-open { min-height: 40px; max-width: 70vw; }
}

/* Карточка сотрудника (владелец 21.10): окно по центру — шире и ниже, с прокруткой */
.staff-drawer { justify-content: center; align-items: center; padding: 16px; }
.sdw-panel { width: min(1100px, 96vw); height: min(720px, 82vh); border-radius: 12px; overflow-y: auto; box-shadow: 0 18px 48px rgba(16, 24, 40, .28); }
.sdw-head { top: -12px; }
@media (max-width: 600px) { .staff-drawer { padding: 0; } .sdw-panel { width: 100vw; height: 100%; border-radius: 0; } }
/* окно у верхнего края экрана (боковые панели, окна во весь экран) — «Свернуть» узким язычком по центру
   верхней кромки, в поле отступа окна, чтобы не закрывать заголовок */
.win-frame.win-min-in .win-min { top: 0; right: auto; left: 50%; transform: translateX(-50%); height: 18px; min-height: 18px; line-height: 16px; font-size: 11px; padding: 0 10px; border-radius: 0 0 8px 8px; border: 1px solid var(--border, #dcdfe4); border-top: 0; box-shadow: 0 2px 6px rgba(0,0,0,.10); }

/* 19v: «Предложить списки», «предложено», ↓ и «Заменить» в списках сопутствующих (public/related.js) */
#rel-propose { margin-bottom: 8px; }
.rel-prop { flex: 0 0 auto; font-size: 11px; padding: 1px 6px; border-radius: 8px; background: #fff4d6; color: #7a5300; }
.rel-chip .rel-swap { font-size: 12px; padding: 2px 8px; min-height: 26px; }
html[data-theme="dark"] .rel-prop { background: #4a3a10; color: #ffe2a0; }

/* 27.10.2026: окна двигаются за заголовок (public/win.js, startMove) */
.win-box > :is(h1, h2, h3, header, .modal-head, .ch-modal-h, .sdw-head, .om-head),
.win-box > :first-child:is([class$="-head"]) { cursor: move; }
body.win-moving { user-select: none; cursor: move; }
body.win-moving iframe { pointer-events: none; }

/* №261110-ЗК-1 (10.11.2026): на компьютере «Свернуть» внутри шапки окна, в ряду с заголовком, слева от ×.
   Положение (top/right) считает public/win.js (placeMin); здесь — вид и место под кнопку у заголовка. */
:root .win-frame.win-min-head .win-min { top: 8px; right: 20px; left: auto; transform: none; height: 36px; min-height: 36px; padding: 0 12px; line-height: 34px; font-size: 13px; white-space: nowrap; border-radius: 8px; border: 1px solid var(--border, #cfd5dd); background: var(--surface, #fff); color: var(--text, #1f2937); box-shadow: none; }
:root .win-frame.win-min-head .win-min:hover { border-color: var(--accent-btn, #1769aa); }
html[data-theme="dark"] .win-frame.win-min-head .win-min { background: #1f2630; color: #e5e7eb; border-color: #3a4352; }
.win-box > .win-min-res { padding-right: var(--win-min-res, 120px) !important; box-sizing: border-box; }
.win-box > h1.win-min-res, .win-box > h2.win-min-res, .win-box > h3.win-min-res, .win-box .win-min-res-in { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.win-box .win-min-gap { margin-left: var(--win-min-res, 120px) !important; flex-shrink: 0; }
