/* por-panel.css — porucheniya inline <style> scoped under #tab-tasks for shell merge (L1).
   — Selectors prefixed; :root / * / body / html + chrome classes dropped (covered by app.css). */

#tab-tasks .wrap { max-width: 960px; margin: 0 auto; padding: 20px 18px 60px; }
#tab-tasks h1 { font-size: 22px; margin: 14px 0 6px; }
#tab-tasks .desc { color: var(--muted); font-size: 14px; margin: 0 0 18px; }
/* Тумблер уведомлений (push.js): подписка/отписка Web Push или локальный fallback. */
#tab-tasks .notify-enable { display: inline-block; margin: 0 0 6px; border: 0; background: var(--primary); color: #fff; border-radius: 12px; padding: 10px 16px; font-size: 14px; font-weight: 700; cursor: pointer; }
#tab-tasks .notify-enable:hover { filter: brightness(1.06); }
#tab-tasks .notify-enable:disabled { opacity: .6; cursor: default; }
#tab-tasks .notify-hint { margin: 0 0 16px; color: #57606a; font-size: 13px; line-height: 1.4; }
#tab-tasks .notify-hint:empty { display: none; }
#tab-tasks .card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; margin: 0 0 18px; }
#tab-tasks .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
#tab-tasks .grid > div { min-width: 0; } /* иначе date-инпут (интринсик-ширина iOS) распирает ячейку и вылезает за модалку */
@media (max-width: 560px) { #tab-tasks .grid { grid-template-columns: 1fr; } }
#tab-tasks input[type=date] { max-width: 100%; -webkit-appearance: none; appearance: none; } /* не вылезать; ru-формат — lang="ru" на инпуте (где поддерживается) */
#tab-tasks label { display: block; margin: 10px 0 4px; font-size: 13px; color: #374151; font-weight: 600; }
/* Скрепка ленты комментариев (.tc-attach-btn) — тоже <label>, поэтому #tab-tasks label выше навязывает ей И margin (10/4 → съезд
   контейнера), И display:block (перебивает её собственный display:flex по спецификости 1,0,1 > 0,1,0 → align/justify не действуют,
   эмодзи 📎 прижат вверх по baseline). Перебиваем оба (1,1,0 > 1,0,1): margin 0 + вернуть flex-центрирование → и контейнер, и эмодзи вровень с textarea/➤ (все 38px). */
#tab-tasks .tc-attach-btn { margin: 0; display: inline-flex; align-items: center; justify-content: center; }
/* .ts-check — тоже <label> (чек-лист, task-steps.css). #tab-tasks label выше навязывает ей display:block (перебивает её flex
   по 1,0,1 > 0,1,0 → чекбокс встаёт НАД текстом, съезд к центру) + margin/шрифт (13px/600 наследуется в .ts-text). Возвращаем
   эталон адресно (1,1,0 > 1,0,1), как для .tc-attach-btn выше; task-steps.css не трогаем. font:inherit → .ts-text снова 14px/normal. */
#tab-tasks .ts-check { display: flex; margin: 0; font: inherit; }
/* Пара к правилу выше, но для чекбокса: formfields-блок ниже (#tab-tasks input) навязывает ему width:100% (+box-sizing:border-box,
   padding, border) по 1,0,1 > 0,1,1 → чекбокс растянут на всю строку, .ts-text сжат в 0 (буквы в столбик). Возвращаем нативные
   16×16 адресно (1,1,1 > 1,0,1); margin/flex/cursor из task-steps.css formfields не трогает — их не перекрываем. */
#tab-tasks .ts-check input { width: 16px; height: 16px; padding: 0; border: 0; }
#tab-tasks .card > label:first-child, #tab-tasks .grid > div > label { margin-top: 0; }
#tab-tasks .req { color: var(--danger); }
#tab-tasks select, #tab-tasks input, #tab-tasks textarea { width: 100%; box-sizing: border-box; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; font-family: inherit; color: var(--text); }
#tab-tasks .btn { border: 0; border-radius: 12px; padding: 9px 16px; font-size: 14px; font-weight: 700; cursor: pointer; background: var(--primary); color: #fff; }
#tab-tasks .btn:hover { filter: brightness(1.06); }
#tab-tasks .btn:disabled { opacity: .55; cursor: not-allowed; }
#tab-tasks .btn--secondary { background: #e2e8f0; color: var(--text); }
#tab-tasks .msg { display: none; margin: 10px 0 0; padding: 9px 12px; border-radius: 9px; font-size: 14px; }
#tab-tasks .msg--ok { display: block; background: #eafaf0; color: var(--success); }
#tab-tasks .msg--error { display: block; background: #fdecee; color: var(--danger); }
/* Панель фильтров списка: поиск + чипы статуса (образец partner-cabinet .controls / .btn.is-active). */
#tab-tasks .controls { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0 0 14px; }
#tab-tasks .controls input[type=search] { flex: 1; min-width: 200px; }
#tab-tasks .chips { display: flex; gap: 6px; flex-wrap: wrap; }
/* .chip переехал в app.css как ОБЩИЙ компонент (тот же вид был скопирован сюда, в zay-panel.css и
   planner-panel.css). Здесь его больше нет: правка вида в одной панели молча расходилась с остальными. */
#tab-tasks table { width: 100%; border-collapse: collapse; }
#tab-tasks th, #tab-tasks td { text-align: left; padding: 10px 8px; font-size: 14px; border-bottom: 1px solid #f0f2f7; vertical-align: top; }
#tab-tasks th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
#tab-tasks tbody tr:hover { background: #fafbff; }
#tab-tasks tbody tr:last-child td { border-bottom: 0; }
#tab-tasks .muted { color: var(--muted); font-size: 13px; }
#tab-tasks .por-sort { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; margin-left: auto; }
#tab-tasks .por-sort select { width: auto; padding: 6px 10px; }
#tab-tasks .cal-group td { padding: 14px 10px 4px; font-weight: 700; font-size: 13px; color: #57606a; border: 0; }
#tab-tasks .cal-group--overdue td { color: var(--danger); }
#tab-tasks .overdue { color: var(--danger); }
#tab-tasks .await { color: var(--success); font-weight: 600; }
#tab-tasks .accepted { color: var(--success); }
#tab-tasks .empty { color: var(--muted); font-size: 14px; padding: 8px 2px; }
#tab-tasks .actions-cell { text-align: right; white-space: nowrap; }
#tab-tasks .actions-cell .btn { padding: 6px 12px; margin-left: 4px; }

/* Мобильный адаптив (PWA шаг 1): на узком экране таблица поручений превращается в карточки, контролы стекаются.
   thead скрыт; каждая строка — карточка; ячейки с data-label получают подпись «Исполнитель:/Срок:/Статус:». */
@media (max-width: 560px) {
    #tab-tasks .wrap { padding: 14px 12px 48px; }
    #tab-tasks .controls { flex-wrap: wrap; }
    #tab-tasks .controls input[type=search] { min-width: 0; flex: 1 1 100%; }
    #tab-tasks thead { display: none; }
    #tab-tasks table, #tab-tasks tbody, #tab-tasks tr, #tab-tasks td { display: block; width: 100%; box-sizing: border-box; }
    #tab-tasks tbody tr:not(.por-descr) { border: 1px solid var(--border); border-radius: 12px; margin: 0 0 10px; padding: 10px 12px; background: #fff; }
    #tab-tasks tbody tr:not(.por-descr) td { border: none; padding: 3px 0; text-align: left; white-space: normal; }
    #tab-tasks tbody tr:not(.por-descr) td:first-child { font-size: 15px; padding-bottom: 6px; }
    #tab-tasks td[data-label]::before { content: attr(data-label) ": "; font-weight: 600; color: var(--muted); }
    #tab-tasks td.actions-cell { text-align: left; padding-top: 8px; }
    #tab-tasks td.actions-cell .btn { margin: 4px 6px 0 0; }
    #tab-tasks tr.por-descr { margin: -6px 0 12px; padding: 0 10px; }
    #tab-tasks tr.por-descr td { padding: 0 0 10px; }
}
/* Модалка «Новое поручение» — своя (ui-dialogs.js умеет только одно поле). Образец — .inv-modal из partner-cabinet.php. */
#tab-tasks .por-ov { position: fixed; inset: 0; z-index: 9500; display: none; align-items: center; justify-content: center; background: rgba(27,31,36,.5); padding: 16px; }
#tab-tasks .por-ov.is-open { display: flex; }
/* ⚠️ overflow-x: hidden + touch-action: pan-y — ТОТ ЖЕ дефект, что в planner-panel.css: overflow-x явно не
   задан, поэтому из-за overflow-y:auto браузер вычислял его как auto и модалку на телефоне таскало вбок.
   Селектор здесь свой (#tab-tasks), правило планировщика на поручения не влияет и наоборот. Широкого
   контента, которому нужен горизонтальный скролл, в этих модалках нет — только поля формы. */
#tab-tasks .por-modal { background: #fff; border-radius: 14px; max-width: 480px; width: 100%; box-shadow: 0 12px 40px rgba(0,0,0,.25); max-height: 92vh; overflow-y: auto; overflow-x: hidden; touch-action: pan-y; }
#tab-tasks .por-modal__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid #eaeef2; font-weight: 700; font-size: 16px; }
#tab-tasks .por-modal__close { background: none; border: 0; font-size: 24px; line-height: 1; color: var(--muted); cursor: pointer; padding: 0 2px; }
#tab-tasks .por-modal__body { padding: 16px 20px 20px; }
#tab-tasks .por-modal__actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
/* Появление модалки: overlay честно display:none→flex по .is-open (как fade вкладок) → animation играет без JS. .por-modal
   входит в дерево вместе с .por-ov → её animation тоже триггерится. Закрытие (remove .is-open → display:none) НЕ анимируем
   (мгновенно; плавное закрытие требует JS-задержки — асимметрия как у slide детали). ЖИВЁТ здесь, не в porucheniya.php inline. */
@keyframes porOvIn    { from { opacity: 0; } to { opacity: 1; } }
@keyframes porModalIn { from { transform: translateY(12px) scale(.98); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }
#tab-tasks .por-ov.is-open { animation: porOvIn 320ms ease-out; }
#tab-tasks .por-ov.is-open .por-modal { animation: porModalIn 440ms ease-out; }
@media (prefers-reduced-motion: reduce) { #tab-tasks .por-ov.is-open, #tab-tasks .por-ov.is-open .por-modal { animation: none; } }
/* Галка «Подключить ассистента» (модель C). input:auto — перебить глобальную input{width:100%}. */
#tab-tasks .por-ai-check { display: flex; align-items: center; gap: 8px; margin: 14px 0 2px; font-size: 14px; font-weight: 600; color: var(--text); cursor: pointer; }
#tab-tasks .por-ai-check input { width: auto; margin: 0; }
#tab-tasks .por-ai-hint { font-size: 12px; margin: 0 0 4px; }
#tab-tasks .por-files-hint { font-size: 12px; margin: -2px 0 6px; }
#tab-tasks .por-collab-opt { font-weight: 400; font-size: 12px; }
#tab-tasks .por-collab-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 6px; }
#tab-tasks .por-collab-chip { display: inline-flex; align-items: center; gap: 6px; background: #eef2ff; color: #3730a3; border-radius: 20px; padding: 3px 10px; font-size: 13px; }
#tab-tasks .por-collab-x { width: auto; border: 0; background: none; color: #6366f1; cursor: pointer; font-size: 12px; line-height: 1; padding: 0; }
#tab-tasks .por-collab-pick { margin-top: 2px; }
/* Поле-typeahead (исполнитель/соисполнители): input + выпадашка со скроллом. Клик=все, ввод=фильтр. Список 200+ — max-height. */
#tab-tasks .por-typ { position: relative; }
#tab-tasks .por-typ-drop { display: none; position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; max-height: 260px; overflow-y: auto; -webkit-overflow-scrolling: touch; background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 10px 28px rgba(15,23,42,.16); }
#tab-tasks .por-typ-drop.is-open { display: block; }
#tab-tasks .por-typ-item { display: flex; flex-direction: column; gap: 1px; width: 100%; text-align: left; border: 0; background: none; padding: 10px 12px; cursor: pointer; font-family: inherit; }
#tab-tasks .por-typ-item + .por-typ-item { border-top: 1px solid #f0f2f7; }
#tab-tasks .por-typ-item:hover { background: #f3f4f6; }
#tab-tasks .por-typ-name { font-size: 14px; color: var(--text); }
#tab-tasks .por-typ-sub { font-size: 12px; color: var(--muted); }
#tab-tasks .por-typ-empty { padding: 10px 12px; font-size: 13px; color: var(--muted); }
/* Файловый инпут — нативный вид скрыт, свой стиль-кнопка «Выбрать файлы» (как .task__attach-btn у сотрудника). */
#tab-tasks .por-attach-btn { display: inline-flex; align-items: center; gap: 6px; margin: 4px 0 2px; padding: 8px 14px; background: var(--card); border: 1px solid var(--border); border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--primary); cursor: pointer; }
#tab-tasks .por-attach-btn:hover { background: #f5f3ff; }
#tab-tasks .por-pick, #tab-tasks .por-exist { display: flex; align-items: center; gap: 8px; padding: 5px 9px; border: 1px solid #eaeef2; border-radius: 8px; margin: 4px 0; font-size: 13px; }
#tab-tasks .por-pick__name, #tab-tasks .por-exist a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#tab-tasks .por-exist a { color: #0969da; text-decoration: none; }
#tab-tasks .por-pick__meta { font-size: 12px; white-space: nowrap; }
#tab-tasks .por-pick__del, #tab-tasks .por-att-del { cursor: pointer; color: var(--danger); font-weight: 700; padding: 0 4px; flex: 0 0 auto; }
#tab-tasks .por-att-cap { font-size: 12px; font-weight: 600; color: #57606a; margin: 10px 0 2px; }
#tab-tasks .por-result-text { font-size: 13px; color: #24292f; line-height: 1.5; white-space: pre-wrap; margin: 2px 0 4px; }
#tab-tasks .por-steps { margin-top: 12px; padding-top: 10px; border-top: 1px solid #eaeef2; }
#tab-tasks .por-comments { margin-top: 12px; padding-top: 10px; border-top: 1px solid #eaeef2; }
/* Чек-лист в модалке «Новое поручение» (ручные пункты постановщика → steps[] при создании). */
#tab-tasks .por-cl-items { display: flex; flex-direction: column; gap: 6px; margin: 2px 0 8px; }
#tab-tasks .por-cl-item { display: flex; align-items: center; gap: 8px; background: #f6f8fa; border: 1px solid #eaeef2; border-radius: 8px; padding: 6px 10px; font-size: 14px; }
#tab-tasks .por-cl-num { flex: 0 0 auto; color: var(--muted); font-weight: 700; font-size: 13px; }
#tab-tasks .por-cl-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
#tab-tasks .por-cl-del { flex: 0 0 auto; width: auto; cursor: pointer; color: var(--danger); font-weight: 700; padding: 0 4px; background: none; border: 0; font-size: 16px; line-height: 1; }
#tab-tasks .por-cl-add { display: flex; gap: 8px; align-items: center; }
#tab-tasks .por-cl-input { flex: 1; min-width: 0; }
#tab-tasks .por-cl-addbtn { flex: 0 0 auto; width: auto; padding: 8px 14px; background: var(--card); border: 1px solid var(--border); border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--primary); cursor: pointer; }
#tab-tasks .por-cl-addbtn:hover { background: #f5f3ff; }
#tab-tasks .por-atts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
#tab-tasks .por-att { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; text-decoration: none; color: #0969da; }
#tab-tasks .por-att--img { padding: 0; }
/* Превью — фикс. квадрат 84px (object-fit:cover): скелетон виден пока грузится + единый вид сетки миниатюр. */
#tab-tasks .por-att--img img { width: 84px; height: 84px; object-fit: cover; border-radius: 8px; border: 1px solid #eaeef2; display: block; background: linear-gradient(90deg,#eef0f4 25%,#e4e8f0 37%,#eef0f4 63%); background-size: 400% 100%; animation: attShimmer 1.4s ease infinite; }
@keyframes attShimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
#tab-tasks .por-att-fb { width: 84px; height: 84px; display: flex; align-items: center; justify-content: center; background: #f4f6fb; border: 1px solid #eaeef2; border-radius: 8px; font-size: 24px; color: #9ca3af; } /* превью не вышло → иконка (файл есть) */

/* ── Мобильный паттерн «список → деталь» (ЕДИНЫЙ стиль с employee-home): плоские строки, пилюля срока, чипы, поиск внизу. ── */
#tab-tasks .ic { vertical-align: -2px; flex: none; }
#tab-tasks .eh-head { display: flex; align-items: center; gap: 10px; margin: 8px 0 14px; }
#tab-tasks .eh-head__t { flex: 1; min-width: 0; }
#tab-tasks .eh-title { font-size: 18px; font-weight: 500; margin: 0; }
#tab-tasks .eh-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
#tab-tasks .eh-icon { flex: none; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
#tab-tasks .eh-icon:hover { background: #eef0f4; color: var(--text); }
#tab-tasks .eh-add { flex: none; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 2px 6px rgba(79,70,229,.28); transition: transform .08s ease; }
#tab-tasks .eh-add:hover { filter: brightness(1.06); }
#tab-tasks .eh-add:active { transform: scale(.92); } /* тактильный отклик: «+» сжимается при тапе */
/* Голосовая постановка: микрофон рядом с «+» (тап-старт/тап-стоп); во время записи — красный пульс. */
#tab-tasks .eh-mic { flex: none; width: 40px; height: 40px; border: 0; border-radius: 50%; background: #eef0f4; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
#tab-tasks .eh-mic:hover { background: #e2e6ec; color: var(--text); }
#tab-tasks .eh-mic.is-recording { background: var(--danger); color: #fff; animation: ehMicPulse 1.3s ease-in-out infinite; }
#tab-tasks .eh-mic.is-busy { opacity: .55; pointer-events: none; }
@keyframes ehMicPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(209,36,47,.5); } 50% { box-shadow: 0 0 0 9px rgba(209,36,47,0); } }
/* Индикатор записи/распознавания — пилюля снизу по центру (над нижним баром), с отменой крестиком. */
#tab-tasks .por-voice-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--bnav-h, 56px) + 28px); z-index: 55; display: none; align-items: center; gap: 10px; padding: 10px 14px; background: #111827; color: #fff; border-radius: 999px; box-shadow: 0 10px 30px rgba(15,23,42,.28); font-size: 13px; max-width: calc(100vw - 32px); }
#tab-tasks .por-voice-bar.is-open { display: inline-flex; }
#tab-tasks .por-voice-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: #ff5a5f; animation: ehMicPulse 1.3s ease-in-out infinite; }
#tab-tasks .por-voice-txt { min-width: 0; }
#tab-tasks .por-voice-cancel { flex: none; border: 0; background: rgba(255,255,255,.16); color: #fff; width: 24px; height: 24px; border-radius: 50%; cursor: pointer; font-size: 16px; line-height: 1; }
#tab-tasks .por-voice-cancel:hover { background: rgba(255,255,255,.3); }
/* Вкладки верхнего уровня — крупнее фильтров, radius 8, активная акцентная. */
#tab-tasks .eh-tabs { display: flex; gap: 6px; margin: 0 0 14px; }
#tab-tasks .eh-tab { flex: 1; border: 1px solid var(--border); background: #fff; color: var(--text); border-radius: 8px; padding: 9px 12px; font-size: 14px; font-weight: 500; cursor: pointer; font-family: inherit; }
#tab-tasks .eh-tab.is-active { background: var(--primary); color: #fff; border-color: var(--primary); }
/* Чипы-фильтры (горизонтальный скролл на узком экране, без полосы). */
#tab-tasks .por-chips { display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 6px; padding-bottom: 2px; }
#tab-tasks .por-chips::-webkit-scrollbar { display: none; }
/* Прежнее `.por-chips .chip { white-space: nowrap }` снято: nowrap теперь в общем .chip (app.css). Здесь он был
   единственным местом, где поручения его задавали, — у заявок и планировщика он стоял прямо в их копиях правила. */
/* Плоские строки списка (как у сотрудника): полоска приоритета, три уровня, шеврон. */
#tab-tasks .eh-empty { color: #57606a; font-size: 15px; padding: 12px 2px; }
#tab-tasks .eh-rows { display: flex; flex-direction: column; gap: 10px; } /* зазор между карточками — фон страницы виден в промежутке */
#tab-tasks .eh-row { display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: #fff; border-radius: 12px; box-shadow: 0 1px 4px rgba(15,23,42,0.10), 0 1px 2px rgba(15,23,42,0.06); overflow: hidden; text-decoration: none; color: inherit; position: relative; } /* каждое поручение — отдельная карточка с мягкой тенью; overflow скругляет левую полоску ::before */
#tab-tasks .eh-row:hover { background: #fafbff; }
#tab-tasks .eh-row--dim { opacity: .62; }
#tab-tasks .eh-row::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: transparent; }
#tab-tasks .eh-row--danger::before { background: var(--danger); }
#tab-tasks .eh-row--warning::before { background: #d97706; }
#tab-tasks .eh-row__c { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
#tab-tasks .eh-row__t { font-size: 14px; font-weight: 500; line-height: 1.35; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#tab-tasks .eh-row__m { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 12px; color: var(--muted); min-width: 0; }
#tab-tasks .eh-mi, #tab-tasks .eh-due { display: inline-flex; align-items: center; gap: 3px; }
#tab-tasks .eh-who { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#tab-tasks .eh-arrow { margin: 0 6px; color: var(--muted); } /* стрелка постановщик → исполнитель (кто кому поставил) */
#tab-tasks .due--danger { color: var(--danger); }
#tab-tasks .due--warning { color: #b45309; }
#tab-tasks .due--muted { color: var(--muted); }
#tab-tasks .eh-pill { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; border-radius: 999px; padding: 2px 8px; background: #eef2ff; color: #4338ca; }
#tab-tasks .eh-pill--review { background: #fef3c7; color: #92400e; }
#tab-tasks .eh-pill--done { background: #ecfdf5; color: #047857; }
#tab-tasks .eh-pill--muted { background: #eef0f4; color: #57606a; }
/* Дата постановки («от 29.07.2026») — первый чип статусной строки. БЕЛЫЙ фон + ЧЁРНЫЙ текст, в отличие от
   статус-чипов (просрочка красная, приёмка жёлтая). Класс НАМЕРЕННО отдельный, не .eh-pill: правило
   .task__detail-head .eh-pill (:281) перекрашивает чипы в белый-на-фиолетовом, а этот обязан остаться
   тёмным текстом в обоих местах. Рамка нужна для списка: карточка .eh-row тоже белая (:187), без неё
   чип слился бы с фоном; на фиолетовой шапке рамка не видна и не мешает. */
/* ⚠️ font-weight: 400 ЯВНО, а не отсутствием свойства: соседние чипы строки (.eh-pill :208, .task__due-pill :276)
   объявлены с 600, и без явного значения этот легко «догнали» бы при копипасте. Дата — справочная, не акцент. */
#tab-tasks .task__posted { display: inline-flex; align-items: center; font-size: 11px; font-weight: 400; border-radius: 999px; padding: 2px 8px; background: #fff; color: var(--text); border: 1px solid var(--border); }
#tab-tasks .task__due .task__posted { font-size: 12px; padding: 3px 10px; border-radius: 12px; } /* в детали — размер соседних .task__due-pill (:273) */
#tab-tasks .eh-row__chev { color: #c4c8d0; flex: none; display: flex; align-items: center; }
#tab-tasks .eh-row__chev svg { width: 17px; height: 17px; }
/* C1/C2: массовый выбор — галочка в строке (кастомный span) + панель действий снизу. */
#tab-tasks .eh-check { flex: none; width: 22px; height: 22px; border: 2px solid #c4c8d0; border-radius: 6px; background: #fff; display: flex; align-items: center; justify-content: center; color: #fff; cursor: pointer; transition: background .12s, border-color .12s; }
#tab-tasks .eh-check:hover { border-color: var(--primary); }
#tab-tasks .eh-check.is-on { background: var(--primary); border-color: var(--primary); }
#tab-tasks .eh-row.is-selected { background: #eef2ff; }
#tab-tasks .eh-row.is-selected:hover { background: #e6ebff; }
#tab-tasks .por-massbar { background: #fff; border: 1px solid #d1d5db; border-radius: 16px; box-shadow: 0 6px 20px rgba(15,23,42,.14); padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
#tab-tasks .por-massbar__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
#tab-tasks .por-massbar__count { font-size: 14px; font-weight: 600; color: var(--text); }
#tab-tasks .por-massbar__clear { border: 0; background: none; color: var(--primary); font-size: 13px; font-family: inherit; cursor: pointer; padding: 4px 6px; border-radius: 8px; }
#tab-tasks .por-massbar__clear:hover { background: #eef2ff; }
#tab-tasks .por-massbar__actions { display: flex; flex-direction: column; gap: 8px; }
#tab-tasks .por-massbar__actions:empty { display: none; }
#tab-tasks .por-mass-hint { font-size: 12px; color: var(--muted); }
#tab-tasks .por-mass-btns { display: flex; flex-wrap: wrap; gap: 8px; }
#tab-tasks .por-mass-btn { flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 14px; font-size: 14px; }
#tab-tasks #porList { padding-bottom: 64px; } /* запас под закреплённый снизу поиск — последние строки не подныривают */
body.has-notify-banner #tab-tasks #porList { padding-bottom: 128px; } /* L1-fix: состояние на <body>, цель в панели (мех. префикс дал #tab-tasks body — не матчит) */
/* Баннер «включите уведомления» (перенос из employee-home): акцентный, компактный, крестик; над поиском в .eh-bottom.
   Виден ТОЛЬКО пока не включены; granted/закрыт(localStorage)/недоступно → JS прячет. */
#tab-tasks .notify-banner { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--primary); color: #fff; border-radius: 12px; box-shadow: 0 6px 18px rgba(79,70,229,.28); }
#tab-tasks .notify-banner__ic { flex: none; opacity: .95; }
#tab-tasks .notify-banner__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
#tab-tasks .notify-banner__t { font-size: 13px; font-weight: 500; }
#tab-tasks .notify-banner__s { font-size: 11px; color: rgba(255,255,255,.85); }
#tab-tasks .notify-banner__btn { flex: none; border: 0; border-radius: 8px; padding: 6px 14px; background: #fff; color: var(--primary); font-size: 13px; font-weight: 700; cursor: pointer; font-family: inherit; }
#tab-tasks .notify-banner__btn:hover { filter: brightness(.97); }
#tab-tasks .notify-banner__x { flex: none; border: 0; background: none; color: rgba(255,255,255,.85); cursor: pointer; font-size: 14px; line-height: 1; padding: 2px 4px; }
#tab-tasks .notify-banner__x:hover { color: #fff; }
/* Поиск внизу (iOS-стиль, sticky у нижнего края). */
#tab-tasks .eh-bottom { position: sticky; bottom: 8px; z-index: 5; margin-top: 8px; display: flex; flex-direction: column; gap: 8px; }
#tab-tasks .eh-search { display: flex; align-items: center; gap: 8px; padding: 9px 14px; background: #fff; border: 1px solid #d1d5db; border-radius: 20px; color: var(--muted); } /* заметнее фона: белый фон + мягкая граница (не хайрлайн) */
#tab-tasks .eh-search input { width: auto; flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 15px; font-family: inherit; color: var(--text); -webkit-appearance: none; padding: 0; }
#tab-tasks .eh-search input::placeholder { color: #9aa1ab; }
/* Крестик очистки поиска: виден только при тексте (JS .is-visible); flex-элемент справа — инпут (flex:1) сам оставляет место, текст не залезает. */
#tab-tasks .eh-search-x { flex: none; display: none; align-items: center; justify-content: center; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%; background: #e2e6ec; color: var(--muted); font-size: 12px; line-height: 1; cursor: pointer; }
#tab-tasks .eh-search-x.is-visible { display: inline-flex; }
#tab-tasks .eh-search-x:hover { background: #d3d8e0; color: var(--text); }
/* Экран деталей: назад-ссылка; на деталях прячем шапку/вкладки/чипы/поиск (только поручение). */
#tab-tasks .eh-detail-back { display: inline-flex; align-items: center; gap: 4px; margin: 8px 0 12px; color: var(--primary); font-size: 15px; font-weight: 500; text-decoration: none; cursor: pointer; background: none; border: 0; padding: 0; font-family: inherit; }
body.is-detail #tab-tasks #porList { padding-bottom: 0; }
/* L1-fix: детальный вид por прячет свою обвязку. Было в сдропнутом правиле c chrome .app-header (chrome общий — НЕ прячем);
   панельные части (шапка списка/вкладки/чипы/поиск) восстановлены заскоупленно. */
body.is-detail #tab-tasks .eh-head,
body.is-detail #tab-tasks .eh-tabs,
body.is-detail #tab-tasks #porFilters,
body.is-detail #tab-tasks #porBottom { display: none; }
/* Анимация ВХОДА в деталь (slide-in справа): .por-detail-anim создаётся заново в renderDetail (porucheniya.php) → новый
   DOM-узел = надёжный триггер animation. .is-entering — ТОЛЬКО при входе (не при sync/pull-refresh → там не дёргается).
   Возврат (renderList) — .por-detail-anim не рендерится. GPU: transform/opacity. ⚠️ ЖИВЁТ ЗДЕСЬ, а не в porucheniya.php
   inline <style> (тот в shell не выводится — embed отдаёт только тело-панель; стили детали грузятся из этого файла). */
@keyframes detailSlideIn { from { transform: translateX(28px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
#tab-tasks .por-detail-anim.is-entering { animation: detailSlideIn 500ms ease-out; }
@media (prefers-reduced-motion: reduce) { #tab-tasks .por-detail-anim.is-entering { animation: none; } }
/* ── Экран ДЕТАЛЕЙ поручения (owner_task_detail_mobile): пилюля срока, зоны с аккуратными подписями, приёмка, оценки. ── */
#tab-tasks .por-detail-topbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
#tab-tasks .por-edit-btn { flex: none; width: 38px; height: 38px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
#tab-tasks .por-edit-btn:hover { background: #eef0f4; color: var(--text); }
#tab-tasks .task--detail { border: 0; margin: 0; background: none; }
/* Вариант A (карточки): шапка — индиго-градиент; заголовок/описание/пилюли белым (правила ниже). */
#tab-tasks .task__detail-head { background: linear-gradient(135deg, #4f46e5, #4338ca); border-radius: 16px; padding: 18px 18px 20px; margin: 0 0 12px; box-shadow: 0 4px 16px rgba(79,70,229,.25); }
#tab-tasks .task__due { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; }
#tab-tasks .task__due-pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; }
#tab-tasks .task__due-pill.due--danger { background: #fef2f2; color: var(--danger); }
#tab-tasks .task__due-pill.due--warning { background: #fef3c7; color: #92400e; }
#tab-tasks .task__due-pill.due--muted { background: var(--bg); color: var(--muted); }
#tab-tasks .task__title { font-size: 19px; font-weight: 600; line-height: 1.35; margin: 0; color: #fff; }
#tab-tasks .task__descr { font-size: 14px; color: #475569; line-height: 1.5; white-space: pre-wrap; margin: 8px 0 0; }
#tab-tasks .task__detail-head .task__descr { color: rgba(255,255,255,.85); } /* описание в индиго-шапке — белым-полупрозрачным (вторично к заголовку); если описания нет — правило просто не применяется */
/* Пилюли статуса/срока в индиго-шапке: полупрозрачный белый; danger («просрочено») — белый фон/красный текст (акцент опасности). */
#tab-tasks .task__detail-head .eh-pill,
#tab-tasks .task__detail-head .task__due-pill { background: rgba(255,255,255,.2); color: #fff; }
#tab-tasks .task__detail-head .task__due-pill.due--danger { background: #fff; color: var(--danger); }
#tab-tasks .task__sec { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--text); margin: 0 0 12px; }
#tab-tasks .task__sec .ic { flex: none; width: 28px; height: 28px; padding: 6px; box-sizing: border-box; background: #eef2ff; border-radius: 8px; color: var(--primary); } /* иконка секции — в индиго-пилюле (CSS-размер перебивает inline width/height у svg) */
#tab-tasks .task__sec--strong { font-size: 15px; font-weight: 700; color: var(--text); }
/* Зона СДАЧИ (я исполнитель): результат + файлы + «Готово» — порт из кабинета сотрудника (employee-home). */
#tab-tasks .task__zone-sub { font-size: 12px; font-weight: 600; color: var(--muted); margin: 0 0 6px; }
#tab-tasks .task__result-field { margin-bottom: 10px; }
#tab-tasks .task__result-lbl { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
#tab-tasks .task__req { color: var(--danger); }
#tab-tasks .task__result-text { width: 100%; box-sizing: border-box; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; font-family: inherit; resize: vertical; }
#tab-tasks .task__result-err { font-size: 12px; color: var(--danger); margin-top: 4px; }
#tab-tasks .task__result-body { font-size: 14px; color: var(--text); line-height: 1.5; white-space: pre-wrap; margin-bottom: 8px; }
#tab-tasks .task__result-files { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
#tab-tasks .task__result-row { display: flex; align-items: center; gap: 8px; padding: 6px 9px; background: var(--card); border: 1px solid var(--border); border-radius: 8px; }
#tab-tasks .task__result-link { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: #0969da; text-decoration: none; }
#tab-tasks .task__result-del { flex: none; border: 0; background: none; color: var(--danger); cursor: pointer; font-size: 13px; line-height: 1; padding: 2px 5px; }
#tab-tasks .task__result-del:hover { opacity: .8; }
#tab-tasks .task__result-add { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
#tab-tasks .task__attach-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; background: var(--card); border: 1px solid var(--border); border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--primary); cursor: pointer; }
#tab-tasks .task__attach-btn:hover { background: #f5f3ff; }
#tab-tasks .task__attach-note { font-size: 12px; color: var(--muted); }
#tab-tasks .task__done-btn { border: 0; border-radius: 12px; padding: 9px 16px; font-size: 14px; font-weight: 700; cursor: pointer; background: var(--primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
#tab-tasks .task__done-btn:hover { filter: brightness(1.06); }
#tab-tasks .task__done-btn.is-marked { background: #e2e8f0; color: var(--text); }
#tab-tasks .task__done-btn:disabled { opacity: .55; cursor: not-allowed; filter: none; }
#tab-tasks .task__zone--submit .task__done-btn { width: 100%; margin-top: 4px; }
/* Зоны детали — Вариант A: белые карточки (без линий-разделителей), мягкая тень, на светлой подложке body (--bg #f4f6fb). */
#tab-tasks .por-zone { background: #fff; border-radius: 14px; padding: 16px; margin: 0 0 12px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
#tab-tasks .por-ai-zone:has(.air:empty) { display: none; } /* нет оценок → зону не показываем (модуль оставляет .air пустым) */
/* Сворачивание блока оценок (аккордеон): grid-ряд .air схлопывается 1fr→0fr (плавно, без magic-height). Дефолт — свёрнут
   (разметка без .is-open); клик по .task__sec (bindDetail) тогглит .is-open. Пустая зона скрыта целиком выше (:has,
   спецификость 1,3,0 > 1,1,0) → grid только у наполненной. Карточка (.por-zone: фон/padding/тень) не схлопывается — только .air-ряд. */
#tab-tasks .por-ai-zone { display: grid; grid-template-rows: auto 1fr; transition: grid-template-rows .28s ease; }
#tab-tasks .por-ai-zone:not(.is-open) { grid-template-rows: auto 0fr; }
#tab-tasks .por-ai-zone:not(.is-open) .task__sec { margin-bottom: 0; } /* свёрнуто — без зазора под заголовком */
#tab-tasks .por-ai-zone .air { overflow: hidden; min-height: 0; }
/* Стрелка-индикатор (::after, без правки разметки): ▸ свёрнут → ▾ раскрыт. .task__sec — flex, margin-left:auto уводит вправо. */
#tab-tasks .por-ai-zone .task__sec { cursor: pointer; }
#tab-tasks .por-ai-zone .task__sec::after { content: ''; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform .2s; }
#tab-tasks .por-ai-zone.is-open .task__sec::after { transform: rotate(45deg); }
/* Капсовые заголовки модулей скрыты — свои аккуратные подписи .task__sec (sentence case + иконка) даёт detailHtml. */
#tab-tasks .air-title, #tab-tasks .ts-title { display: none; }
#tab-tasks .air-total { margin-top: 0; }
/* Исполнитель (аватар-инициалы) + соисполнители. */
#tab-tasks .por-assignee { display: flex; align-items: center; gap: 10px; }
#tab-tasks .por-ava { flex: none; width: 42px; height: 42px; border-radius: 50%; background: #eef2ff; color: #3730a3; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; }
#tab-tasks .por-assignee-name { font-size: 15px; font-weight: 500; color: var(--text); }
#tab-tasks .por-assignee-role { font-size: 12px; color: var(--muted); }
#tab-tasks .por-sec-sub { font-size: 12px; font-weight: 600; color: var(--muted); margin: 12px 0 6px; }
#tab-tasks .por-collab-row { display: flex; flex-wrap: wrap; gap: 6px; }
#tab-tasks .por-collab-chip2 { display: inline-flex; align-items: center; gap: 4px; background: #eef2ff; color: #3730a3; border-radius: 20px; padding: 3px 10px; font-size: 13px; }
/* Приёмка — акцентный блок между результатом и оценками. */
#tab-tasks .por-accept-block { display: flex; flex-direction: column; gap: 10px; }
#tab-tasks .por-accept-hint { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--success); }
/* Кнопки приёмки — на всю ширину поровну: одна → вся ширина, две → пополам (макет owner_task_detail_mobile). */
#tab-tasks .por-accept-btns { display: flex; gap: 10px; }
#tab-tasks .por-accept-btns .btn { flex: 1; min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 12px 16px; font-size: 15px; }
#tab-tasks .por-btn-ok { background: var(--success); }
#tab-tasks .por-btn-danger { background: #fff; color: var(--danger); border: 1px solid #f3c6c6; } /* удаление поручения — красная (аутлайн), необратимо */
#tab-tasks .por-btn-danger:hover { background: #fef2f2; filter: none; }
#tab-tasks .por-delete-row { margin-top: 10px; }
#tab-tasks .por-delete-row .btn { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 12px 16px; font-size: 15px; }

/* ── Модалка ПРОСМОТРА вложений (перенос из employee-home): картинка+зум / pdf в iframe / карточка прочего файла. ── */
#tab-tasks .attm[hidden] { display: none; }
#tab-tasks .attm { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; }
#tab-tasks .attm__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.85); }
#tab-tasks .attm__x { position: absolute; top: 12px; right: 12px; z-index: 2; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255,255,255,.16); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
#tab-tasks .attm__x:hover { background: rgba(255,255,255,.28); }
#tab-tasks .attm__count { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 2; padding: 4px 12px; border-radius: 999px; background: rgba(0,0,0,.5); color: #fff; font-size: 13px; font-weight: 600; } /* индикатор «2 / 5» при листании */
#tab-tasks .attm__content { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; }
#tab-tasks .attm__stage { width: 100vw; height: 100vh; height: 100dvh; display: flex; align-items: center; justify-content: center; overflow: hidden; touch-action: none; }
#tab-tasks .attm__img { max-width: 94vw; max-height: 88vh; object-fit: contain; transform-origin: center center; will-change: transform; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
#tab-tasks .attm__doc { display: flex; flex-direction: column; width: 96vw; max-width: 900px; height: 92vh; height: 92dvh; background: #fff; border-radius: 12px; overflow: hidden; }
#tab-tasks .attm__frame { flex: 1; width: 100%; border: 0; background: #fff; }
#tab-tasks .attm__bar { flex: none; display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-top: 1px solid var(--border); }
#tab-tasks .attm__docname { flex: 1; min-width: 0; font-size: 13px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#tab-tasks .attm__file { width: 88vw; max-width: 360px; background: var(--card); border-radius: 16px; padding: 28px 22px; text-align: center; }
#tab-tasks .attm__file-ic { display: inline-flex; color: var(--muted); margin-bottom: 12px; }
#tab-tasks .attm__file-name { font-size: 15px; font-weight: 500; color: var(--text); word-break: break-word; }
#tab-tasks .attm__file-sub { font-size: 13px; color: var(--muted); margin-top: 4px; }
#tab-tasks .attm__btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 18px; border-radius: 12px; font-size: 14px; font-weight: 600; text-decoration: none; background: #eef0f4; color: var(--text); cursor: pointer; }
#tab-tasks .attm__btn--primary { background: var(--primary); color: #fff; }
#tab-tasks .attm__btn:hover { filter: brightness(.98); }
#tab-tasks .attm__file .attm__btn { margin-top: 16px; }

/* ── Сводка по сотрудникам (owner_stats_mobile): карточка на сотрудника; ВСЕ метрики — плитки 2-в-ряд + строки под ними. ── */
#tab-tasks .stat-card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 14px; margin: 0 0 12px; }
#tab-tasks .stat-head { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; }
#tab-tasks .stat-name { font-size: 15px; font-weight: 500; color: var(--text); }
#tab-tasks .stat-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
#tab-tasks .stat-tile { background: var(--bg); border-radius: 10px; padding: 10px 12px; }
#tab-tasks .stat-val { font-size: 20px; font-weight: 600; color: var(--text); line-height: 1.2; }
#tab-tasks .stat-val.stat-ok { color: var(--success); }
#tab-tasks .stat-val.stat-warn { color: #b45309; }
#tab-tasks .stat-val .overdue { font-size: 12px; font-weight: 600; }
#tab-tasks .stat-lbl { font-size: 12px; color: var(--muted); margin-top: 2px; }
#tab-tasks .stat-rows { margin-top: 12px; display: flex; flex-direction: column; gap: 7px; }
#tab-tasks .stat-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 13px; }
#tab-tasks .stat-row-lbl { color: var(--muted); }
#tab-tasks .stat-row-val { color: var(--text); font-weight: 500; text-align: right; }
#tab-tasks .stat-note { color: var(--muted); font-weight: 400; font-size: 11px; }
/* Сводка по поручениям (Д2): цифры-карточки (кликабельные) + проблемные-ссылки + сотрудники. */
#tab-tasks .sum { display: flex; flex-direction: column; }
#tab-tasks .sum-head { font-size: 14px; color: var(--muted); margin: 0 0 10px; }
#tab-tasks .sum-nums { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
#tab-tasks .sum-num { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--card); cursor: pointer; font-family: inherit; text-align: left; transition: box-shadow .12s, border-color .12s; }
#tab-tasks .sum-num:hover { border-color: var(--primary); box-shadow: 0 2px 10px rgba(15,23,42,.08); }
#tab-tasks .sum-num-v { font-size: 26px; font-weight: 700; line-height: 1.1; color: var(--text); }
#tab-tasks .sum-num-l { font-size: 13px; color: var(--muted); }
#tab-tasks .sum-num--danger .sum-num-v { color: var(--danger); }
#tab-tasks .sum-num--warn .sum-num-v { color: #b45309; }
#tab-tasks .sum-num--ok .sum-num-v { color: var(--success); }
#tab-tasks .sum-sec { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .02em; margin: 18px 0 8px; }
#tab-tasks .sum-probs { display: flex; flex-direction: column; gap: 8px; }
#tab-tasks .sum-prob { display: flex; flex-direction: column; gap: 5px; padding: 12px 14px; background: var(--card); border: 1px solid var(--border); border-left-width: 3px; border-radius: 12px; text-decoration: none; color: inherit; }
#tab-tasks .sum-prob:hover { background: #fafbff; }
#tab-tasks .sum-prob--danger { border-left-color: var(--danger); }
#tab-tasks .sum-prob--warn { border-left-color: #d97706; }
#tab-tasks .sum-prob-t { font-size: 14px; font-weight: 500; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#tab-tasks .sum-prob-m { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 12px; color: var(--muted); }
#tab-tasks .sum-prob-who { display: inline-flex; align-items: center; gap: 3px; }
#tab-tasks .sum-badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; }
#tab-tasks .sum-badge--danger { background: #fef2f2; color: var(--danger); }
#tab-tasks .sum-badge--warn { background: #fff7e6; color: #b45309; }
#tab-tasks .sum-emps { display: flex; flex-direction: column; gap: 8px; }
#tab-tasks .sum-emp { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; }
#tab-tasks .sum-emp-c { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
#tab-tasks .sum-emp-n { font-size: 14px; font-weight: 500; color: var(--text); }
#tab-tasks .sum-emp-s { font-size: 12px; color: var(--muted); }
#tab-tasks .sum-red { color: var(--danger); font-weight: 600; }

/* Клиренс под нижним нав-баром (общий партиал bottom_nav.php, fixed bottom:0) — контент/поиск подняты над баром на всех
   ширинах и для ВСЕХ ролей (бар теперь у всех, chrome-lite-исключение снято). Сам бар и его CSS — в bottom_nav.php. */
#tab-tasks .wrap { padding-bottom: calc(var(--bnav-h, 56px) + 12px); }   /* запас под фикс-бар */
#tab-tasks .eh-bottom { bottom: calc(var(--bnav-h, 56px) + 8px); }   /* липкий поиск/баннер — над баром */

#tab-tasks .profile-shell { position: relative; flex: 0 0 auto; }

/* ── Офлайн-очередь закрытия (por-queue.js): бейджи синка на карточке/детали + верхний баннер + плашка stale-кэша. ── */
#tab-tasks .por-q-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
#tab-tasks .por-q-badge--queued { background: #fef3c7; color: #92400e; }   /* ⏳ ожидает отправки */
#tab-tasks .por-q-badge--syncing { background: #dbeafe; color: #1e40af; }  /* 🔄 синхронизируется */
#tab-tasks .por-q-badge--error { background: #fee2e2; color: #b91c1c; }     /* ⚠️ ошибка */
#tab-tasks .por-q-actions { display: inline-flex; gap: 4px; margin-left: 6px; }
#tab-tasks .por-q-actions button { border: 0; background: none; font-size: 12px; font-weight: 600; cursor: pointer; padding: 2px 6px; border-radius: 6px; font-family: inherit; }
#tab-tasks .por-q-retry { color: var(--primary); }
#tab-tasks .por-q-retry:hover { background: #eef2ff; }
#tab-tasks .por-q-discard { color: var(--danger); }
#tab-tasks .por-q-discard:hover { background: #fef2f2; }
/* Верхний офлайн-баннер (над списком) — показывается при офлайне ИЛИ непустой очереди. */
#tab-tasks .por-offline-banner { display: none; align-items: center; gap: 8px; padding: 9px 14px; background: #111827; color: #fff; font-size: 13px; font-weight: 500; border-radius: 10px; margin: 0 0 10px; box-shadow: 0 4px 14px rgba(15,23,42,.18); }
#tab-tasks .por-offline-banner.is-on { display: flex; }
#tab-tasks .por-offline-banner .por-ob-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #fbbf24; }
/* Плашка «данные на HH:MM» — когда список отрисован из офлайн-кэша (taskcache). */
/* Офлайн-плашка актуальности списка — согласована с .por-offline-plate/.por-offline-banner (тот же янтарный язык #fef3c7/#92400e, радиусы). */
#tab-tasks .por-stale-note { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: #fef3c7; border: 0.5px solid #fcd34d; border-radius: 12px; margin: 0 0 10px; }
#tab-tasks .por-stale-note .por-sn-icon { flex: none; width: 36px; height: 36px; border-radius: 50%; background: #fff; color: #92400e; display: inline-flex; align-items: center; justify-content: center; }
#tab-tasks .por-stale-note .por-sn-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
#tab-tasks .por-stale-note .por-sn-title { font-size: 14px; font-weight: 500; color: #92400e; }
#tab-tasks .por-stale-note .por-sn-sub { font-size: 13px; color: #b45309; }

/* Офлайн-СОЗДАНИЕ: бейдж «Создаётся офлайн» (индиго, как queued). */
#tab-tasks .por-q-badge--creating { background: #e0e7ff; color: #3730a3; }
/* Плашка «нет сети» для разделов, которые офлайн не работают (ассистент/уведомления/заявки/сообщения — список
   в shell.php: updateOfflinePlate) — БЕЗ #tab-tasks scope: она живёт вне панели поручений. */
.por-offline-plate { position: fixed; left: 0; right: 0; top: 0; bottom: calc(var(--bnav-h, 56px) + 8px); z-index: 40; background: var(--bg, #f4f6fb); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 48px 24px; text-align: center; color: var(--muted, #6b7280); }
.por-offline-plate .por-op-icon { width: 56px; height: 56px; border-radius: 50%; background: #fef3c7; color: #92400e; display: flex; align-items: center; justify-content: center; font-size: 26px; }
.por-offline-plate .por-op-title { font-size: 17px; font-weight: 600; color: var(--text, #111827); }
.por-offline-plate .por-op-sub { font-size: 14px; max-width: 320px; line-height: 1.45; }

/* Планировщик: статус привязанного события в детали поручения (кнопка «Запланировать встречу» использует .btn). */
#tab-tasks .por-sched-status { font-size: 13px; margin: 0 0 8px; color: #57606a; }
#tab-tasks .por-sched-when { font-weight: 600; color: var(--text, #111827); }
#tab-tasks .por-sched-state { display: inline-flex; font-size: 11px; font-weight: 600; border-radius: 999px; padding: 2px 8px; }
#tab-tasks .por-sched-state--confirmed { background: #ecfdf5; color: #047857; }
#tab-tasks .por-sched-state--proposed { background: #fef3c7; color: #92400e; }
#tab-tasks .por-sched-state--cancelled { background: #eef0f4; color: #57606a; }
#tab-tasks .por-sched-none { color: #9ca3af; }
