/* ux-20.css — замечания владельца 20.10.2026 (public/ux-20.js). Отдельный файл, подключается последним;
   тёмная тема написана явно (theme-dark.css собирается из style.css и этот файл не видит). */

/* Сообщения вверху справа — поверх любых окон (окна 2000–2400), иначе по ним не нажать. */
#toast-container { z-index: 5000; }
.toast-link { cursor: pointer; padding-right: 30px; position: relative; }
.toast-link::after { content: "↗"; position: absolute; right: 11px; top: 50%; transform: translateY(-50%); opacity: .85; font-weight: 700; }
.toast-link:hover, .toast-link:focus-visible { outline: 2px solid rgba(255,255,255,.75); outline-offset: -2px; filter: brightness(1.08); }

/* Подсветка поля или блока, к которому привело сообщение */
.ux-flash { animation: ux-flash 2.2s ease-out; border-radius: 8px; }
@keyframes ux-flash {
  0%, 35% { box-shadow: 0 0 0 3px #f5b400, 0 0 0 7px rgba(245,180,0,.28); background-color: rgba(255, 236, 170, .55); }
  100% { box-shadow: 0 0 0 0 rgba(245,180,0,0); }
}

/* Подсказка при наведении */
#ux-tip {
  position: fixed; z-index: 6000; max-width: min(340px, calc(100vw - 16px)); padding: 7px 10px; border-radius: 7px;
  background: #1f2937; color: #fff; font-size: 13px; line-height: 1.35; box-shadow: 0 6px 18px rgba(0,0,0,.22);
  pointer-events: none; opacity: 0; transform: translateY(-2px); transition: opacity .12s, transform .12s; white-space: pre-line;
}
#ux-tip.show { opacity: 1; transform: none; }
html[data-theme="dark"] #ux-tip { background: #e5e7eb; color: #111827; }

/* «Глазик» в поле пароля */
.ux-pass { position: relative; display: block; }
.ux-pass > input { width: 100%; padding-right: 44px; box-sizing: border-box; }
.ux-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 36px; height: 34px; min-height: 0; margin: 0; padding: 0;
  display: inline-flex; align-items: center; justify-content: center; border: none; background: none; color: #6b7280; cursor: pointer; border-radius: 6px; }
.ux-eye:hover { color: #1769aa; background: rgba(23,105,170,.08); }
.ux-eye .ux-eye-off { display: none; }
.ux-eye.on .ux-eye-off { display: inline; }
.ux-eye.on { color: #1769aa; }

/* Окна ux-20 */
.ux-modal .ux-box { max-width: 560px; max-height: calc(100vh - 32px); overflow: auto; }
.ux-modal .ux-box.ux-wide { max-width: 760px; }
.ux-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.ux-head h3 { margin: 0; font-size: 18px; }
.ux-x { min-width: 34px; }
.ux-body .hint { display: block; }

/* «Кому передать заявку» */
.ux-psearch { width: 100%; margin: 6px 0 10px; box-sizing: border-box; }
.ux-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 8px; margin: 8px 0; }
.ux-person { box-sizing: border-box; min-width: 0; max-width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; width: 100%; margin: 0; padding: 9px 10px; border: 1px solid var(--border, #d9dee5);
  border-radius: 10px; background: var(--surface, #fff); color: inherit; cursor: pointer; font: inherit; min-height: 54px; }
.ux-person:hover { border-color: #1769aa; background: rgba(23,105,170,.05); }
.ux-person.sel { border-color: #1769aa; box-shadow: 0 0 0 2px #1769aa inset; background: rgba(23,105,170,.09); }
.ux-person[hidden] { display: none; }
.ux-avatar { flex: 0 0 34px; height: 34px; border-radius: 50%; background: #dbeafe; color: #1e3a8a; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }
.ux-pname { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ux-pname b { white-space: normal; line-height: 1.25; overflow-wrap: anywhere; }
.ux-pname .hint { font-size: 12px; white-space: normal; }
.ux-pload { font-size: 12px; white-space: nowrap; color: #146c43; }
.ux-pload.hot { color: #b45309; font-weight: 700; }
.ux-others { margin: 6px 0; }
.ux-note-l { display: block; margin-top: 10px; }
.ux-note { width: 100%; box-sizing: border-box; margin-top: 4px; }
html[data-theme="dark"] .ux-avatar { background: #1e3a8a; color: #dbeafe; }

/* Заявки: фильтр и «В работе» */
.o-filters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0 4px; }
.o-filters #of-q { flex: 1 1 180px; min-width: 140px; }
.o-filters select { flex: 0 1 auto; max-width: 210px; }
.o-filters.active { padding: 4px; border-radius: 8px; background: rgba(23,105,170,.07); }
.of-dates { display: inline-flex; align-items: center; gap: 4px; }
.of-dates[hidden] { display: none; }
.of-dates input { width: 140px; }
.o-team { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin: 2px 0 6px; font-size: 13px; }
.o-team[hidden] { display: none; }
.ux-chip { margin: 0; padding: 3px 9px; min-height: 0; border: 1px solid var(--border, #d9dee5); border-radius: 999px; background: var(--surface, #fff); color: inherit; font: inherit; font-size: 13px; cursor: pointer; }
.ux-chip:hover { border-color: #1769aa; }
.ux-chip.on { background: #1769aa; border-color: #1769aa; color: #fff; }
.oc-openby { font-size: 12px; color: #b45309; font-weight: 600; }

/* «Кто чем занят» */
.ux-board { display: flex; flex-direction: column; gap: 8px; }
.ux-brow { display: grid; grid-template-columns: minmax(170px, 1fr) minmax(170px, 1.2fr) 2fr; gap: 8px 14px; align-items: start; padding: 8px 10px; border: 1px solid var(--border, #d9dee5); border-radius: 10px; }
.ux-bwho { display: flex; flex-direction: column; }
.ux-bwho .hint { font-size: 12px; }
.ux-now { color: #146c43; font-weight: 600; }
.ux-bwork .ux-chip { margin: 2px 2px 0 0; }
@media (max-width: 700px) { .ux-brow { grid-template-columns: 1fr; } }

/* «Из 1С» */
.ux-1c-btn { white-space: nowrap; }
.clm-unp-row .ux-1c-btn, .cs-inline .ux-1c-btn { margin-left: 4px; }
.ux-1c-inline { display: flex; gap: 6px; align-items: center; }
.ux-1c-inline > input { flex: 1; min-width: 0; }
.ux-rq { width: 100%; box-sizing: border-box; margin: 6px 0 8px; }
.ux-rres { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow: auto; }
.ux-ritem { display: flex; flex-direction: column; align-items: flex-start; text-align: left; width: 100%; margin: 0; padding: 8px 10px; border: 1px solid var(--border, #d9dee5); border-radius: 8px; background: var(--surface, #fff); color: inherit; font: inherit; cursor: pointer; }
.ux-ritem:hover { border-color: #1769aa; background: rgba(23,105,170,.05); }
.ux-ritem .hint { font-size: 12px; }
.ux-filled { box-shadow: 0 0 0 2px #22c55e; transition: box-shadow .4s; }

/* Счёт ↔ 1С в окне заявки */
.inv1c { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin: 8px 0; padding: 7px 10px; border-radius: 8px; background: rgba(23,105,170,.06); font-size: 14px; }
.inv1c .hint { display: inline; font-size: 13px; }
.inv1c-ok { color: #146c43; font-weight: 600; }
.inv1c-warn { color: #b45309; font-weight: 600; }
.inv1c-file { margin-left: auto; }

/* Документы клиента */
.clm-docs { margin: 12px 0; }
.clm-docs[hidden] { display: none; }
.ux-docs-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ux-docs-h h3 { margin: 0; }
.ux-doc-groups { display: flex; flex-wrap: wrap; gap: 5px; margin: 6px 0; }
.ux-docs td { vertical-align: middle; }
.ux-dk { width: 30px; text-align: center; font-size: 15px; }
.ux-doc-order { margin-left: 6px; padding: 1px 7px; font-size: 12px; min-height: 0; }

/* Напоминания в стопке справа снизу */
.notice-personal { border-left-color: #f59e0b; cursor: pointer; }
.notice-personal:hover, .notice-personal:focus-visible { border-color: #f59e0b; box-shadow: 0 10px 28px rgba(245, 158, 11, .25); outline: none; }

/* Шапка раздела закреплена (замечание 20.10): карточка товара — шапка карточки внутри общей шапки */
.view-head .card-headline { position: static; margin: 6px 0 2px; }
.view-head .tabs { margin-bottom: 4px; }
#detail-view .view-head { padding-bottom: 0; }
/* Вкладки, которые раздел рисует заново (Строительство, Снабжение, Офис, Агенты, справочник
   сотрудников), — закреплены сразу под шапкой раздела (её высота — --vhh, ux-20.js). */
#constr-view .cs-tabs, #supply-view .sp-tabs, #office-view .of-tabs, #agents-view .ag-head, #users-view .sd-tabs {
  position: sticky; top: calc(var(--topbar-h, 96px) + var(--vhh, 0px)); z-index: 5; background: var(--surface, #fff); padding-top: 4px;
}
#structure-view .sd-tabs { background: var(--bg); }
/* Заявки на узком экране (колонки друг под другом): вкладки и фильтр заявок не уезжают. */
@media (max-width: 1200px) {
  #orders-block .orders-tabs { position: sticky; top: var(--topbar-h, 96px); z-index: 5; background: var(--surface, #fff); margin-top: 0; padding-top: 6px; }
}

@media (max-width: 600px) {
  .o-filters select { max-width: none; flex: 1 1 45%; }
  .of-dates input { width: 120px; }
  .ux-people { grid-template-columns: minmax(0, 1fr); }
}

/* Телефон: «overflow-x: hidden» у #app (style.css) делал его самостоятельной прокручиваемой рамкой,
   и закреплённые шапки разделов уезжали вместе со страницей. «clip» так же не даёт странице
   ездить вбок, но рамкой прокрутки не становится — шапки держатся. */
@media (max-width: 760px) {
  .shell-body #app { overflow-x: clip; }
}
.clm-unp-row > button { white-space: nowrap; }

/* 2026-10-19k (№261019-АИ-2): ⚙ Настройки → «Разделы» (public/sections-settings.js) */
.secset-block { border: 1px solid var(--border, #d9dee5); border-radius: 10px; padding: 10px 14px; margin: 10px 0; max-width: 1100px; box-sizing: border-box; }
.secset-block h4 { margin: 0 0 6px; font-size: 16px; }
.secset-thr { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0 4px; }
.secset-thr input { width: 110px; }
.secset-block .of-orgs { margin: 6px 0 8px; }
.secset-block .of-table-wrap { overflow-x: auto; }
.secset-block .of-table td { white-space: normal; overflow-wrap: anywhere; }
