/* Окно «Задачи и заметки» (ТЗ TZ_TASKS_2026-10-21, T1.5). Вёрстка — по одобренному макету
   Docs/Concepts/tasks_concept_2026-10-21.html; каркас окна — как у окна почты (mail-client.css):
   плавающее, тянется и разворачивается, сворачивается в фишку. Палитра — переменные --mc-* app.html,
   кнопки ≤ 7px без контура, без вложенных заливок, без теней у кнопок, тёмной темы нет.
   Все классы — с префиксом ptk-. */

/* палитра — и у меню, тоста: они лежат вне окна (в body), без неё у полей меню не было рамок */
.ptk-overlay, .ptk-pop, .ptk-toast, .ptk-adddlg {
    --ptk-text: var(--mc-text, #1f1f1f); --ptk-muted: var(--mc-muted, #6f6f6f); --ptk-faint: var(--mc-faint, #9b9b9b);
    --ptk-line: var(--mc-line, #e6e6e6); --ptk-soft: var(--mc-soft, #f3f3f3); --ptk-soft2: var(--mc-soft2, #e9e9e9);
    --ptk-canvas: var(--mc-canvas, #f6f6f5); --ptk-surface: #fff;
    --ptk-red: #d4493f; --ptk-green: #2e9d63; --ptk-amber: #c98a1b; --ptk-blue: #5b84b1;
}
.ptk-overlay {
    position: fixed; z-index: 8990; display: none; flex-direction: column;
    min-width: 720px; min-height: 460px; overflow: hidden;
    background: var(--ptk-canvas); color: var(--ptk-text);
    border: 1px solid var(--ptk-line); border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .10), 0 1px 3px rgba(0, 0, 0, .05);
    font: 14px/1.5 var(--mc-font, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif);
}
.ptk-overlay *, .ptk-pop *, .ptk-toast *, .ptk-adddlg * { box-sizing: border-box; }
/* сброс кнопок — самое слабое правило (:where без веса): иначе он перебивал поля, фон и цвет любого класса кнопки задачника
   (у пунктов слева не было полей, у .ptk-mini — фона; .ptk-chk и .ptk-sw обходили его через !important) */
:where(.ptk-overlay, .ptk-pop, .ptk-toast, .ptk-adddlg) button { font: inherit; color: inherit; border: none; background: none; cursor: pointer; padding: 0; }
.ptk-overlay input, .ptk-overlay select, .ptk-overlay textarea, .ptk-adddlg input, .ptk-adddlg select { font: inherit; color: inherit; }
/* развёрнутое — на всю рабочую область правее левого рельса (--rail из style.css): рельс — рамка страницы, окна его не закрывают */
/* на 1px на рельс: своя рамка ложится на рамку рельса — одна линия, без щели при дробном масштабе */
.ptk-overlay.ptk-max { left: calc(var(--rail, 0px) - 1px) !important; top: 0 !important; width: calc(100vw - var(--rail, 0px) + 1px) !important; height: 100vh !important; min-width: 0; border-radius: 0; border: none; border-left: 1px solid var(--ptk-line); box-shadow: none; }
.ptk-ic { display: block; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ptk-overlay ::-webkit-scrollbar { width: 8px; height: 8px; }
.ptk-overlay ::-webkit-scrollbar-track { background: transparent; }
.ptk-overlay ::-webkit-scrollbar-thumb { background: rgba(19, 52, 59, .18); border-radius: 4px; }
.ptk-overlay ::-webkit-scrollbar-thumb:hover { background: rgba(19, 52, 59, .30); }

/* шапка окна */
.ptk-head { display: flex; align-items: center; gap: 10px; cursor: move; user-select: none; padding: 8px 12px 8px 16px;
    background: var(--ptk-surface); border-bottom: 1px solid var(--ptk-line); }
.ptk-max .ptk-head { cursor: default; }
.ptk-title { font-size: 15px; font-weight: 600; }
.ptk-crumb { color: var(--ptk-muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ptk-head .ptk-sp { flex: 1; }
.ptk-sync { font-size: 12px; color: var(--ptk-faint); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.ptk-sync i { width: 6px; height: 6px; border-radius: 50%; background: var(--ptk-faint); }
.ptk-sync.ok i { background: var(--ptk-green); }
.ptk-sync.busy i { animation: ptk-pulse 1.2s ease-in-out infinite; }
.ptk-sync.warn { color: #8f6210; } .ptk-sync.warn i { background: var(--ptk-amber); }
.ptk-sync.err { color: var(--ptk-red); } .ptk-sync.err i { background: var(--ptk-red); }
@keyframes ptk-pulse { 50% { opacity: .35; } }
.ptk-icon { width: 30px; height: 30px; border-radius: 7px; color: var(--ptk-muted); font-size: 18px; line-height: 30px; text-align: center; transition: background 150ms ease; }
.ptk-icon:hover { background: var(--ptk-soft); color: var(--ptk-text); }
.ptk-icon[data-act="window-reset"] { font-size: 14px; }
.ptk-tsep { width: 1px; height: 18px; background: var(--ptk-line); margin: 0 2px; }
.ptk-rs { position: absolute; z-index: 6; }
.ptk-rs-e { top: 48px; right: 0; bottom: 14px; width: 6px; cursor: ew-resize; }
.ptk-rs-s { left: 0; right: 14px; bottom: 0; height: 6px; cursor: ns-resize; }
.ptk-rs-se { right: 0; bottom: 0; width: 16px; height: 16px; cursor: nwse-resize;
    background: linear-gradient(135deg, transparent 0 55%, #b8b8b8 55% 62%, transparent 62% 72%, #b8b8b8 72% 79%, transparent 79%); }
.ptk-max .ptk-rs { display: none; }
.ptk-resizing { user-select: none; }
.ptk-restore-chip { position: fixed; right: 12px; bottom: 104px; z-index: 9001; height: 32px; padding: 0 14px; border: 1px solid var(--mc-line, #e6e6e6);
    border-radius: 7px; background: #fff; color: var(--mc-text, #1f1f1f); cursor: pointer; font: 500 13px var(--mc-font, sans-serif); }

/* три колонки задачника */
.ptk-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 252px minmax(0, 1fr) var(--ptk-dt-w, 588px); }
.ptk-body > * { min-height: 0; }
.ptk-body.ptk-nodetail { grid-template-columns: 252px minmax(0, 1fr) 0; }
.ptk-body.ptk-nodetail .ptk-dt { display: none; }
.ptk-body.ptk-calv { grid-template-columns: 252px minmax(0, 1fr) 0; }
.ptk-body.ptk-calv .ptk-dt { position: absolute; right: 0; top: 0; bottom: 0; width: var(--ptk-dt-w, 588px); z-index: 5; box-shadow: -20px 0 40px -30px rgba(0, 0, 0, .3); }
.ptk-body.ptk-calv:not(.ptk-calopen) .ptk-dt { display: none; }
.ptk-body { position: relative; }
.ptk-narrow .ptk-body { grid-template-columns: 210px minmax(0, 1fr) 0; }
.ptk-narrow .ptk-body .ptk-dt { position: absolute; right: 0; top: 0; bottom: 0; width: 360px; z-index: 5; box-shadow: -20px 0 40px -30px rgba(0, 0, 0, .3); }

/* левая колонка */
.ptk-sb { border-right: 1px solid var(--ptk-line); background: var(--ptk-surface); overflow-y: auto; padding: 14px 10px 40px; }
.ptk-prj { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 7px; width: 100%; text-align: left; }
.ptk-prj:hover { background: var(--ptk-soft); }
.ptk-prj b { font-weight: 600; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ptk-prj .ptk-pico { width: 24px; height: 24px; border-radius: 6px; background: var(--ptk-text); color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ptk-scope { display: flex; margin: 6px 8px 10px; }
.ptk-sb-search { display: flex; align-items: center; gap: 6px; margin: 0 2px 12px; padding: 0 10px; height: 34px; border-radius: 7px; background: var(--ptk-soft); color: var(--ptk-faint); }
.ptk-sb-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 13px; color: var(--ptk-text); }
.ptk-sb-h { display: flex; align-items: center; justify-content: space-between; font-size: 11.5px; color: var(--ptk-faint); text-transform: uppercase; letter-spacing: .05em; padding: 20px 14px 6px; }
.ptk-sb-h button { color: var(--ptk-faint); border-radius: 5px; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; }
.ptk-sb-h button:hover { background: var(--ptk-soft); color: var(--ptk-text); }
.ptk-nav { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 34px; padding: 7px 14px; border-radius: 7px;   /* поля внутри заливки — чтобы она не прилегала к значку и числу (владелец 22.10) */ text-align: left; color: #3a3a3a; font-size: 14px; line-height: 1.35; }
.ptk-nav:hover { background: var(--ptk-soft); }
.ptk-nav.on { background: var(--ptk-soft2); color: var(--ptk-text); font-weight: 500; }
.ptk-nav > span:not(.ptk-n):not(.ptk-hash) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ptk-nav .ptk-n { margin-left: auto; font-size: 12px; color: var(--ptk-faint); font-variant-numeric: tabular-nums; }
.ptk-nav .ptk-n.red { color: var(--ptk-red); font-weight: 600; }
.ptk-nav svg { color: var(--ptk-muted); }
.ptk-nav .ptk-hash { width: 16px; text-align: center; color: var(--ptk-faint); font-weight: 600; flex-shrink: 0; }
.ptk-nav.drop { background: var(--ptk-soft2); }
/* перетаскивание списка: черта — куда он встанет */
.ptk-nav.ins-before { box-shadow: inset 0 2px 0 var(--ptk-text); }
.ptk-nav.ins-after { box-shadow: inset 0 -2px 0 var(--ptk-text); }
.ptk-nav.dragging { opacity: .45; }
.ptk-sb-foot { margin-top: 20px; border-top: 1px solid var(--ptk-line); padding-top: 12px; }
.ptk-sb-empty { font-size: 12.5px; color: var(--ptk-faint); padding: 4px 14px 6px; }

/* общие */
.ptk-seg { display: inline-flex; background: var(--ptk-soft); border-radius: 7px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.ptk-seg button { font-size: 13px; padding: 4px 11px; border-radius: 6px; color: var(--ptk-muted); display: inline-flex; align-items: center; gap: 6px; }
.ptk-seg button.on { background: #fff; color: var(--ptk-text); font-weight: 500; }
.ptk-scope .ptk-seg button { font-size: 12px; padding: 3px 9px; }
.ptk-ib { width: 30px; height: 30px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; color: var(--ptk-muted); flex-shrink: 0; }
.ptk-ib:hover { background: var(--ptk-soft); color: var(--ptk-text); }
.ptk-ib.on { background: var(--ptk-soft2); color: var(--ptk-text); }
.ptk-mini { font-size: 12.5px; padding: 4px 9px; border-radius: 7px; background: var(--ptk-soft); color: var(--ptk-text); display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.ptk-mini:hover { background: var(--ptk-soft2); }
.ptk-mini.dark { background: var(--ptk-text); color: #fff; }
.ptk-mini.dark:hover { background: #383838; }
.ptk-mini:disabled { opacity: .55; cursor: default; }
.ptk-mini.ok { color: var(--ptk-green); }
.ptk-btn { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 13px; border-radius: 7px; font-size: 13.5px; font-weight: 500; background: var(--ptk-soft); white-space: nowrap; }
.ptk-btn:hover { background: var(--ptk-soft2); }
.ptk-btn.dark { background: var(--ptk-text); color: #fff; }
.ptk-btn.dark:hover { background: #383838; }
.ptk-btn:disabled { opacity: .55; cursor: default; }
.ptk-inp { height: 32px; border: 1px solid var(--ptk-line); border-radius: 7px; padding: 0 10px; font-size: 13.5px; background: #fff; outline: 0; }
.ptk-inp:focus { border-color: #9b9b9b; }
.ptk-empty { color: var(--ptk-faint); font-size: 13px; padding: 22px 4px; text-align: center; }
.ptk-note { font-size: 12.5px; color: var(--ptk-muted); background: var(--ptk-soft); border-radius: 7px; padding: 10px 12px; margin-top: 10px; display: flex; gap: 8px; }
kbd.ptk-kbd { font: 11px/1 var(--mc-font, sans-serif); padding: 2px 5px; border-radius: 4px; background: var(--ptk-soft2); color: var(--ptk-muted); }

/* центр */
.ptk-ct { display: flex; flex-direction: column; min-width: 0; overflow: hidden; --ptk-ct-r: 22px; }
/* панель свойств лежит поверх календаря: шапка, строка ввода и полоса выбора — слева от неё, иначе их правый край (вид, «…», «Заметка») под панелью */
.ptk-body.ptk-calv.ptk-calopen .ptk-ct { --ptk-ct-r: calc(var(--ptk-dt-w, 588px) + 22px); }
/* и сетка недели — левее панели: иначе выбранная задача в правых днях оказывалась под панелью (владелец 23.10); не влезает — прокрутка вбок */
.ptk-body.ptk-calv.ptk-calopen .ptk-ct-b { padding-right: var(--ptk-ct-r); }
.ptk-ct-h { display: flex; align-items: center; gap: 10px; padding: 12px var(--ptk-ct-r) 8px 22px; flex-wrap: wrap; }
.ptk-ct-h h1 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -.01em; }
.ptk-ct-h .ptk-sub { color: var(--ptk-faint); font-size: 13px; }
.ptk-ct-h .ptk-sp { flex: 1; }
.ptk-qa { margin: 2px var(--ptk-ct-r) 6px 22px; background: var(--ptk-surface); border: 1px solid var(--ptk-line); border-radius: 10px; padding: 4px 6px 4px 12px; }
.ptk-qa:focus-within { border-color: #cfcfcf; }
.ptk-qa-row { display: flex; align-items: center; gap: 8px; }
.ptk-qa-row > svg { color: var(--ptk-faint); }
.ptk-qa input { flex: 1; border: 0; outline: 0; height: 36px; font-size: 14px; background: transparent; min-width: 0; }
.ptk-qa input::placeholder { color: var(--ptk-faint); }
.ptk-qa-chips { display: flex; gap: 4px; flex-wrap: wrap; padding: 0 0 6px; }
.ptk-qa-chips:empty { display: none; }
.ptk-qch { font-size: 12px; padding: 2px 8px; border-radius: 6px; background: var(--ptk-soft); display: inline-flex; align-items: center; gap: 5px; }
.ptk-qch.warn { background: #fbf0d9; color: #8f6210; }
.ptk-qa-hint { font-size: 12px; color: var(--ptk-faint); margin: 0 var(--ptk-ct-r) 8px 22px; display: flex; gap: 12px; flex-wrap: wrap; }
.ptk-qa-hint b { color: var(--ptk-muted); font-weight: 500; }
.ptk-bulk { display: none; margin: 2px var(--ptk-ct-r) 8px 22px; background: var(--ptk-text); color: #fff; border-radius: 10px; padding: 6px 8px 6px 14px; align-items: center; gap: 6px; flex-wrap: wrap; }
.ptk-bulk.on { display: flex; }
.ptk-bulk b { font-weight: 600; margin-right: 6px; }
.ptk-bulk button { color: #e6e6e6; font-size: 13px; padding: 5px 9px; border-radius: 7px; }
.ptk-bulk button:hover { background: #3a3a3a; color: #fff; }
.ptk-ct-b { flex: 1; min-height: 0; overflow-y: auto; padding: 0 22px 60px; }

/* строки */
.ptk-grp { margin-top: 10px; }
.ptk-grp-h { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--ptk-muted); padding: 6px 2px; border-bottom: 1px solid var(--ptk-line); cursor: pointer; user-select: none; }
.ptk-grp-h .ptk-c { font-weight: 400; color: var(--ptk-faint); }
.ptk-grp-h svg { transition: transform .15s; color: var(--ptk-faint); }
.ptk-grp.closed .ptk-grp-h svg { transform: rotate(-90deg); }
.ptk-grp.closed .ptk-rows { display: none; }
.ptk-grp-h.red { color: var(--ptk-red); }
.ptk-grp-h .ptk-sp { flex: 1; }
.ptk-grp-h .ptk-act { font-weight: 400; color: var(--ptk-faint); font-size: 12px; padding: 2px 6px; border-radius: 5px; display: inline-flex; align-items: center; gap: 4px; }
.ptk-grp-h .ptk-act:hover { background: var(--ptk-soft); color: var(--ptk-text); }
.ptk-row { display: flex; gap: 10px; align-items: flex-start; padding: 8px; border-bottom: 1px solid var(--ptk-line); cursor: pointer; position: relative; }
.ptk-row:hover { background: #fafafa; }
.ptk-row.sel { background: #f1f1f0; }
.ptk-row.multi { background: #ebebea; }
.ptk-row.ptk-dragover { box-shadow: inset 0 2px 0 var(--ptk-text); }
.ptk-chk { width: 18px; height: 18px; border-radius: 50%; border: 1.7px solid #c4c4c4 !important; flex-shrink: 0; margin-top: 1px; display: flex; align-items: center; justify-content: center; color: transparent !important; transition: background .12s; background: #fff !important; }
.ptk-chk:hover { background: var(--ptk-soft) !important; }
.ptk-chk.p3 { border-color: var(--ptk-red) !important; } .ptk-chk.p3:hover { background: #fbeceb !important; }
.ptk-chk.p2 { border-color: var(--ptk-amber) !important; } .ptk-chk.p2:hover { background: #fbf3e3 !important; }
.ptk-chk.p1 { border-color: var(--ptk-blue) !important; } .ptk-chk.p1:hover { background: #edf2f8 !important; }
.ptk-done .ptk-chk, .ptk-sub.d .ptk-chk { background: #bdbdbd !important; border-color: #bdbdbd !important; color: #fff !important; }
.ptk-nt-ic { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; color: var(--ptk-faint); display: flex; align-items: center; justify-content: center; }
.ptk-row .ptk-bd { flex: 1; min-width: 0; }
.ptk-row .ptk-tt { font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
.ptk-done .ptk-tt { color: var(--ptk-faint); text-decoration: line-through; }
.ptk-mt { display: flex; flex-wrap: wrap; gap: 3px 10px; font-size: 12px; color: var(--ptk-faint); margin-top: 2px; align-items: center; }
.ptk-mt span { display: inline-flex; align-items: center; gap: 4px; }
.ptk-mt .od { color: var(--ptk-red); }
.ptk-mt .td { color: var(--ptk-green); }
.ptk-mt .tg { color: var(--ptk-muted); }
.ptk-nprev { font-size: 12.5px; color: var(--ptk-muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ptk-row .ptk-ra { display: flex; gap: 2px; opacity: 0; transition: opacity .1s; }
.ptk-row:hover .ptk-ra { opacity: 1; }
.ptk-row .ptk-ra .ptk-ib { width: 26px; height: 26px; }
.ptk-proj-tag { font-size: 11.5px; color: var(--ptk-muted); background: var(--ptk-soft); border-radius: 5px; padding: 0 6px; }

/* доска */
.ptk-bbar { display: flex; gap: 8px; align-items: center; margin: 6px 0 2px; font-size: 12.5px; color: var(--ptk-muted); flex-wrap: wrap; }
.ptk-board { display: flex; gap: 12px; align-items: flex-start; padding-top: 8px; overflow-x: auto; padding-bottom: 12px; }
.ptk-col { flex: 0 0 252px; background: var(--ptk-soft); border-radius: 10px; padding: 8px; }
.ptk-col.drop { background: var(--ptk-soft2); }
.ptk-col-h { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 2px 4px 8px; }
.ptk-col-h .ptk-c { color: var(--ptk-faint); font-weight: 400; }
.ptk-card { background: var(--ptk-surface); border-radius: 8px; padding: 9px 10px; margin-bottom: 6px; cursor: pointer; border: 1px solid transparent; }
.ptk-card:hover { border-color: #d9d9d9; }
.ptk-card.sel { border-color: var(--ptk-text); }
.ptk-card .ptk-tt { font-size: 13.5px; display: flex; gap: 8px; align-items: flex-start; line-height: 1.35; }
.ptk-card .ptk-tt .ptk-chk { width: 16px; height: 16px; }
.ptk-card .ptk-mt { font-size: 11.5px; margin: 5px 0 0 24px; }
.ptk-col-add { width: 100%; text-align: left; font-size: 13px; color: var(--ptk-muted); padding: 6px; border-radius: 7px; display: flex; gap: 6px; align-items: center; }
.ptk-col-add:hover { background: var(--ptk-soft2); color: var(--ptk-text); }

/* календарь */
.ptk-cal-wrap { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 14px; padding-top: 8px; }
.ptk-cal-side { background: var(--ptk-surface); border: 1px solid var(--ptk-line); border-radius: 10px; padding: 10px 10px 12px; align-self: start; position: sticky; top: 0; }
.ptk-cal-side h3 { font-size: 13px; margin: 0 0 2px; }
.ptk-cal-side p { font-size: 12px; color: var(--ptk-faint); margin: 0 0 8px; }
.ptk-dragit { font-size: 13px; padding: 6px 8px; border-radius: 7px; background: var(--ptk-soft); margin-bottom: 4px; cursor: grab; display: flex; gap: 6px; align-items: center; }
.ptk-cal-src { margin-top: 12px; border-top: 1px solid var(--ptk-line); padding-top: 8px; font-size: 12.5px; }
.ptk-cal-src label { display: flex; gap: 7px; align-items: center; padding: 3px 0; color: #3a3a3a; }
.ptk-cal-src input { accent-color: #1f1f1f; }
.ptk-sw8 { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.ptk-cal-nav { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; font-size: 13px; }
.ptk-cal { background: var(--ptk-surface); border: 1px solid var(--ptk-line); border-radius: 10px; overflow: hidden; min-width: 640px; }
.ptk-cal-hd, .ptk-cal-ad, .ptk-cal-bd { display: grid; grid-template-columns: 48px repeat(7, minmax(0, 1fr)); }
.ptk-cal-hd { border-bottom: 1px solid var(--ptk-line); }
.ptk-cal-hd div { padding: 7px 6px; font-size: 12px; color: var(--ptk-faint); text-align: center; }
.ptk-cal-hd div b { display: block; font-size: 16px; color: var(--ptk-text); font-weight: 500; }
.ptk-cal-hd .today b { background: var(--ptk-text); color: #fff; border-radius: 7px; width: 30px; margin: 0 auto; }
.ptk-cal-ad { border-bottom: 1px solid var(--ptk-line); min-height: 30px; }
.ptk-cal-ad > div { padding: 3px; border-left: 1px solid var(--ptk-line); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ptk-cal-ad > div:first-child { border-left: 0; font-size: 10.5px; line-height: 1.15; text-align: right; color: var(--ptk-faint); align-items: flex-end; justify-content: center; padding-right: 6px; }
.ptk-cal-bd { position: relative; padding-top: 8px; }
.ptk-cal-hrs div { height: 40px; font-size: 11px; color: var(--ptk-faint); text-align: right; padding-right: 6px; transform: translateY(-7px); }
.ptk-cal-day { position: relative; border-left: 1px solid var(--ptk-line); background-image: linear-gradient(var(--ptk-line) 1px, transparent 1px); background-size: 100% 40px; }
.ptk-cal-day.drop { background-color: #fafaf7; }
.ptk-blk { position: absolute; left: 3px; right: 3px; border-radius: 6px; padding: 3px 6px; font-size: 11.5px; line-height: 1.25; overflow: hidden; cursor: pointer; }
.ptk-blk.cev { background: var(--ptk-soft2); color: #3a3a3a; cursor: default; }
.ptk-blk.cev small { color: var(--ptk-faint); }
.ptk-blk.tk { background: #fff; border: 1.5px solid var(--ptk-text); font-weight: 500; }
.ptk-blk.tk.p3 { border-color: var(--ptk-red); }
.ptk-blk.tk.done { opacity: .5; text-decoration: line-through; }
.ptk-blk.plan { border-style: dashed; }
/* перенос и растяжка блока задачи мышью: края — изменить начало / конец, время «с — по» на блоке */
.ptk-blk.tk { cursor: grab; user-select: none; touch-action: none; }
.ptk-blk.tk::before, .ptk-blk.tk::after { content: ""; position: absolute; left: 0; right: 0; height: 6px; cursor: ns-resize; }
.ptk-blk.tk::before { top: -1px; } .ptk-blk.tk::after { bottom: -1px; }
.ptk-blk-tm { font-weight: 400; color: var(--ptk-muted); font-variant-numeric: tabular-nums; }
.ptk-blk.tall .ptk-blk-tm { display: block; }
.ptk-blk.drag { z-index: 6; box-shadow: 0 6px 18px -6px rgba(0, 0, 0, .3); opacity: .95; }
.ptk-blk.drag.away { opacity: .25; }
/* середина карточки — здесь всплывает подсказка с названием и временем; края и остальное — для переноса и растяжки без неё */
.ptk-blk-hit { position: absolute; left: 30%; right: 30%; top: 30%; bottom: 30%; min-height: 6px; }
.ptk-caldrag .ptk-blk-hit { display: none; }
/* выбранная задача в календаре и колонке; подсветка после перехода к ней */
.ptk-blk.tk.sel { box-shadow: 0 0 0 2px var(--ptk-text); }
.ptk-adt.sel { box-shadow: 0 0 0 1.5px var(--ptk-text); }
.ptk-blk.tk.flash, .ptk-adt.flash { animation: ptkFlash 1.2s ease both; }
@keyframes ptkFlash { 0%, 40% { background: #fff3c4; } 100% { background: #fff; } }
.ptk-dragit.sel { background: var(--ptk-soft2); box-shadow: inset 0 0 0 1px var(--ptk-text); }
.ptk-dragit > span { display: flex; flex-direction: column; min-width: 0; }
.ptk-dragit small { color: var(--ptk-faint); font-size: 11.5px; }
.ptk-cal-side h3.ptk-cal-side-h2 { margin-top: 14px; }
.ptk-blk.ghost { border-style: dashed; opacity: .85; pointer-events: none; z-index: 5; }
.ptk-caldrag-move, .ptk-caldrag-move * { cursor: grabbing !important; }
.ptk-caldrag-top, .ptk-caldrag-top *, .ptk-caldrag-bottom, .ptk-caldrag-bottom * { cursor: ns-resize !important; }
.ptk-cal-tip { position: absolute; left: 3px; z-index: 7; padding: 2px 7px; border-radius: 6px; background: var(--ptk-text); color: #fff; font-size: 11.5px; line-height: 18px; white-space: nowrap; pointer-events: none; font-variant-numeric: tabular-nums; }
.ptk-cal-ad .drop { background: var(--ptk-soft); }
.ptk-adt { font-size: 11.5px; padding: 1px 6px; border-radius: 5px; background: #fff; border: 1px solid var(--ptk-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.ptk-adt.cev { border-color: transparent; background: var(--ptk-soft2); cursor: default; }
.ptk-adt.done { opacity: .45; text-decoration: line-through; }
.ptk-nowl { position: absolute; left: 0; right: 0; height: 0; border-top: 1.5px solid var(--ptk-red); z-index: 3; }
.ptk-nowl::before { content: ""; position: absolute; left: -4px; top: -4.5px; width: 7px; height: 7px; border-radius: 50%; background: var(--ptk-red); }
.ptk-cal-st { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--ptk-muted); margin: 10px 2px 0; align-items: center; }
.ptk-ok-t { color: var(--ptk-green); display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.ptk-ok-t i { width: 6px; height: 6px; border-radius: 50%; background: var(--ptk-green); }
.ptk-warn-t { color: #8f6210; }

/* матрица */
.ptk-mx-lead { font-size: 12.5px; color: var(--ptk-muted); margin: 6px 0 0; }
.ptk-mx { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding-top: 8px; }
.ptk-q { background: var(--ptk-surface); border: 1px solid var(--ptk-line); border-radius: 10px; padding: 12px 14px; min-height: 200px; }
.ptk-q.drop { background: #fafaf7; }
.ptk-q h3 { margin: 0; font-size: 14px; display: flex; gap: 8px; align-items: center; }
.ptk-q h3 i { width: 8px; height: 8px; border-radius: 50%; }
.ptk-q p { margin: 2px 0 6px; font-size: 12px; color: var(--ptk-faint); }
.ptk-q .ptk-row { padding: 6px 4px; }

/* детали */
.ptk-dt { border-left: 1px solid var(--ptk-line); background: var(--ptk-surface); overflow-y: auto; padding: 10px 18px 60px; }
.ptk-dt-top { display: flex; align-items: center; gap: 4px; margin-bottom: 10px; }
.ptk-dt-top .ptk-sp { flex: 1; }
.ptk-dt-title { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px; }
.ptk-dt-title .ptk-chk { width: 20px; height: 20px; margin-top: 4px; }
.ptk-dt-title .ptk-nt-ic { width: 20px; height: 20px; margin-top: 5px; }
.ptk-dt-title [contenteditable] { flex: 1; font-size: 18px; font-weight: 600; line-height: 1.35; outline: 0; border-radius: 5px; padding: 1px 3px; margin: -1px -3px; overflow-wrap: anywhere; }
.ptk-dt-title [contenteditable]:focus { background: var(--ptk-soft); }
.ptk-dt-title.done [contenteditable] { color: var(--ptk-faint); text-decoration: line-through; }
.ptk-props { border-top: 1px solid var(--ptk-line); border-bottom: 1px solid var(--ptk-line); padding: 4px 0; margin-bottom: 12px; }
.ptk-prop { display: grid; grid-template-columns: 24px 104px 1fr; align-items: center; min-height: 36px; gap: 0 4px; }
.ptk-prop > svg { color: var(--ptk-faint); }
.ptk-prop .ptk-pl { font-size: 13px; color: var(--ptk-muted); }
.ptk-prop .ptk-pv { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; min-width: 0; }
.ptk-pb { font-size: 13px; padding: 4px 8px; border-radius: 7px; display: inline-flex; align-items: center; gap: 5px; }
.ptk-pb:hover { background: var(--ptk-soft); }
.ptk-pb.ph { color: var(--ptk-faint); }
.ptk-pb.od { color: var(--ptk-red); }
.ptk-rem { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 3px 4px 3px 8px; border-radius: 7px; background: var(--ptk-soft); }
.ptk-rem .ptk-chs { display: inline-flex; gap: 2px; }
.ptk-rem .ptk-chs button { width: 22px; height: 22px; border-radius: 5px; display: flex; align-items: center; justify-content: center; color: #bdbdbd; }
.ptk-rem .ptk-chs button.on { color: var(--ptk-text); background: #fff; }
.ptk-rem .ptk-ib { width: 20px; height: 20px; }
.ptk-flags { display: inline-flex; gap: 2px; }
.ptk-flags button { width: 28px; height: 26px; border-radius: 6px; display: flex; align-items: center; justify-content: center; color: #cfcfcf; }
.ptk-flags button:hover { background: var(--ptk-soft); }
.ptk-flags button.on { background: var(--ptk-soft2); }
.ptk-flags .f3 { color: var(--ptk-red); } .ptk-flags .f2 { color: var(--ptk-amber); } .ptk-flags .f1 { color: var(--ptk-blue); } .ptk-flags .f0 { color: #9b9b9b; }
.ptk-tagc { font-size: 12.5px; padding: 2px 4px 2px 8px; border-radius: 6px; background: var(--ptk-soft); color: #3a3a3a; display: inline-flex; align-items: center; gap: 2px; }
.ptk-tagc button { width: 16px; height: 16px; border-radius: 4px; color: var(--ptk-faint); display: inline-flex; align-items: center; justify-content: center; }
.ptk-tagc button:hover { color: var(--ptk-text); }
.ptk-tag-in { width: 110px; height: 26px; border: 1px solid var(--ptk-line); border-radius: 6px; padding: 0 6px; font-size: 12.5px; outline: 0; }
.ptk-calst { font-size: 12.5px; color: var(--ptk-muted); display: inline-flex; gap: 6px; align-items: center; }
.ptk-sec { font-size: 12px; font-weight: 600; color: var(--ptk-muted); text-transform: uppercase; letter-spacing: .04em; margin: 16px 0 6px; display: flex; align-items: center; gap: 8px; }
.ptk-sec .ptk-c { font-weight: 400; color: var(--ptk-faint); text-transform: none; letter-spacing: 0; }
.ptk-sec .ptk-sp { flex: 1; }
.ptk-sec .ptk-lnk { display: inline-flex; align-items: center; gap: 4px; font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--ptk-muted); font-size: 12.5px; padding: 2px 6px; border-radius: 5px; }
.ptk-sec .ptk-lnk:hover { background: var(--ptk-soft); color: var(--ptk-text); }
.ptk-sec .ptk-lnk:disabled { opacity: .55; cursor: default; }
.ptk-link { display: flex; gap: 10px; align-items: center; padding: 7px 8px; border-radius: 7px; background: var(--ptk-soft); margin-bottom: 4px; }
.ptk-link .ptk-li { width: 28px; height: 28px; border-radius: 7px; background: #fff; display: flex; align-items: center; justify-content: center; color: #555; flex-shrink: 0; }
.ptk-link .ptk-lb { flex: 1; min-width: 0; }
.ptk-link .ptk-lb b { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ptk-link .ptk-lb span { font-size: 12px; color: var(--ptk-muted); }
.ptk-link .ptk-mini { background: #fff; }
.ptk-desc { min-height: 56px; font-size: 13.5px; color: #3a3a3a; outline: 0; padding: 6px 8px; margin: 0 -8px; border-radius: 7px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.ptk-desc:focus { background: var(--ptk-soft); }
.ptk-desc:empty::before { content: attr(data-ph); color: var(--ptk-faint); }
.ptk-notebody { min-height: 140px; font-size: 14px; white-space: normal; }
.ptk-notebody p { margin: 0 0 8px; }
.ptk-sub { display: flex; gap: 9px; align-items: center; padding: 5px 0; font-size: 13.5px; }
.ptk-sub .ptk-chk { width: 16px; height: 16px; border-radius: 4px; }
.ptk-sub.d span { color: var(--ptk-faint); text-decoration: line-through; }
.ptk-sub span { flex: 1; overflow-wrap: anywhere; outline: 0; border-radius: 4px; }
.ptk-sub span:focus { background: var(--ptk-soft); }
.ptk-sub .ptk-ib { width: 24px; height: 24px; opacity: 0; }
.ptk-sub:hover .ptk-ib { opacity: 1; }
.ptk-sub-add { display: flex; gap: 9px; align-items: center; padding: 5px 0; color: var(--ptk-faint); font-size: 13.5px; }
.ptk-sub-add input { border: 0; outline: 0; flex: 1; background: transparent; }
.ptk-ai { display: flex; flex-wrap: wrap; gap: 4px; }
.ptk-log { font-size: 12px; color: var(--ptk-faint); padding: 3px 0; display: flex; gap: 8px; }
.ptk-log::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #d0d0d0; margin-top: 6px; flex-shrink: 0; }
.ptk-conv { background: var(--ptk-soft); border-radius: 8px; padding: 10px 12px; font-size: 12.5px; color: var(--ptk-muted); margin-top: 8px; }
.ptk-conv b { color: var(--ptk-text); font-weight: 600; }
.ptk-conv .ptk-ai { margin-top: 6px; }
.ptk-conv .ptk-mini:not(.dark) { background: #fff; }

/* всплывающие меню, выбор даты, тост */
.ptk-pop { position: fixed; z-index: 9100; background: #fff; border: 1px solid var(--mc-line, #e6e6e6); border-radius: 10px; box-shadow: 0 14px 40px -12px rgba(0, 0, 0, .25);
    padding: 6px; min-width: 220px; max-width: 320px; display: none; color: var(--mc-text, #1f1f1f); font: 14px/1.5 var(--mc-font, sans-serif); max-height: 80vh; overflow-y: auto; }
.ptk-pop.on { display: block; }
.ptk-pop .pi { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; padding: 6px 8px; border-radius: 7px; font-size: 13px; }
.ptk-pop .pi:hover { background: var(--mc-soft, #f3f3f3); }
.ptk-pop .pi .k { margin-left: auto; font-size: 12px; color: var(--mc-faint, #9b9b9b); }
.ptk-pop .pi.dg { color: #d4493f; }
.ptk-pop .pi.on { font-weight: 500; }
.ptk-pop .pi svg { color: var(--mc-muted, #6f6f6f); }
.ptk-pop .ps { height: 1px; background: var(--mc-line, #e6e6e6); margin: 5px 2px; }
.ptk-pop .ph { font-size: 11.5px; color: var(--mc-faint, #9b9b9b); padding: 6px 8px 2px; text-transform: uppercase; letter-spacing: .04em; }
.ptk-pop form { margin: 0; }
.ptk-mcal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; padding: 4px 4px 2px; font-size: 12px; text-align: center; }
.ptk-mcal .wd { color: var(--mc-faint, #9b9b9b); font-size: 11px; padding: 2px 0; }
.ptk-mcal button { height: 28px; border-radius: 6px; font-size: 12.5px; }
.ptk-mcal button:hover { background: var(--mc-soft, #f3f3f3); }
.ptk-mcal button.t { box-shadow: inset 0 0 0 1px #1f1f1f; }
.ptk-mcal button.s { background: #1f1f1f; color: #fff; }
.ptk-mcal button.o { color: #cfcfcf; }
.ptk-mcal-h { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 0; font-size: 13px; font-weight: 600; }
.ptk-mcal-h button { width: 24px; height: 24px; border-radius: 6px; }
.ptk-mcal-h button:hover { background: var(--mc-soft, #f3f3f3); }
.ptk-pop-row { display: flex; gap: 6px; padding: 6px 6px 4px; align-items: center; font-size: 12px; color: var(--mc-faint, #9b9b9b); }
.ptk-pop-row .ptk-inp { height: 30px; width: 84px; text-align: center; }
.ptk-pop-row .ptk-inp.wide { width: 100%; text-align: left; }
/* время: у поля свой значок часов браузера — свой рядом не ставим; ширина — чтобы минуты не обрезались (часы, минуты и значок) */
.ptk-overlay input[type="time"].ptk-inp, .ptk-pop input[type="time"].ptk-inp { min-width: 104px; font-variant-numeric: tabular-nums; }
.ptk-pop-time { gap: 12px; flex-wrap: wrap; }
.ptk-pop-time label { display: flex; align-items: center; gap: 6px; color: var(--mc-muted, #6f6f6f); font-size: 12.5px; }
.ptk-pop-time .ptk-inp[type="time"] { width: 104px; text-align: left; padding: 0 6px 0 8px; }
.ptk-inp-suf { display: inline-flex; align-items: center; gap: 4px; color: var(--mc-faint, #9b9b9b); }
.ptk-pop-time .ptk-inp[type="number"] { width: 60px; padding: 0 6px; -moz-appearance: textfield; }
.ptk-pop-time .ptk-inp[type="number"]::-webkit-inner-spin-button, .ptk-pop-time .ptk-inp[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.ptk-toast { position: fixed; left: 50%; bottom: 64px; transform: translateX(-50%) translateY(20px); background: #1f1f1f; color: #fff; border-radius: 9px;
    padding: 9px 10px 9px 14px; font: 13px/1.4 var(--mc-font, sans-serif); display: flex; gap: 12px; align-items: center; opacity: 0; pointer-events: none;
    transition: opacity .2s, transform .2s; z-index: 9200; max-width: min(640px, calc(100vw - 32px)); }
.ptk-toast.on { opacity: 1; transform: translateX(-50%); pointer-events: auto; }
.ptk-toast button { color: #fff; background: #3a3a3a; padding: 4px 10px; border-radius: 7px; font-size: 12.5px; white-space: nowrap; }
.ptk-toast button:hover { background: #4a4a4a; }

/* окна внутри задачника: настройки, импорт, разбор текста */
.ptk-modal-bg { position: absolute; inset: 0; background: rgba(31, 31, 31, .18); z-index: 20; display: flex; align-items: center; justify-content: center; }
.ptk-modal { background: #fff; border-radius: 12px; border: 1px solid var(--ptk-line); box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .4);
    width: min(94%, 1320px); height: min(86%, 900px); display: flex; flex-direction: column; overflow: hidden; }
.ptk-modal.sm { width: min(94%, 640px); height: auto; max-height: 86%; }
.ptk-modal-h { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--ptk-line); }
.ptk-modal-h b { font-size: 15px; flex: 1; }
.ptk-modal-b { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 18px; }
.ptk-modal-f { display: flex; gap: 8px; justify-content: flex-end; align-items: center; padding: 10px 16px; border-top: 1px solid var(--ptk-line); }
.ptk-modal-f .ptk-sp { flex: 1; font-size: 12.5px; color: var(--ptk-muted); }
/* окно «В задачи» из чата и «Клиентов» — над страницей: задачник в эту минуту может быть закрыт; ниже тоста (9200) */
.ptk-adddlg { position: fixed; inset: 0; z-index: 9150; background: rgba(31, 31, 31, .18); display: flex; align-items: center; justify-content: center; padding: 16px;
    color: var(--ptk-text); font: 14px/1.5 var(--mc-font, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif); }
.ptk-adddlg .ptk-modal { width: min(100%, 600px); height: auto; max-height: 100%; }
.ptk-add-proj { font-size: 12.5px; color: var(--ptk-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }
.ptk-add-f { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 4px 12px; align-items: center; margin-bottom: 10px; }
.ptk-add-f > label { font-size: 13px; color: var(--ptk-muted); align-self: start; padding-top: 6px; }
.ptk-add-f > .ptk-inp { width: 100%; }
.ptk-add-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ptk-add-row .ptk-inp:disabled { opacity: .5; }
.ptk-add-hint { grid-column: 2; font-size: 12px; color: var(--ptk-faint); }
.ptk-add-prev { max-height: 200px; overflow-y: auto; border: 1px solid var(--ptk-line); border-radius: 7px; padding: 6px 10px; font-size: 13px; }
.ptk-add-prev .ptk-desc { margin: 0; padding: 0; min-height: 0; }
.ptk-rr-lead { color: #6f6f6f; font-size: 13px; line-height: 1.5; margin: 0 0 14px; }
.ptk-rr-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; align-items: start; }
.ptk-rr-rail { display: flex; flex-direction: column; gap: 10px; position: sticky; top: 0; }
.ptk-rr-group { display: flex; flex-direction: column; gap: 1px; padding: 4px; background: #f6f6f5; border: 1px solid #f3f3f3; border-radius: 7px; }
.ptk-rr-group-title { font-size: 11px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: #1f1f1f; padding: 4px 8px 3px; }
.ptk-rr-item { display: block; width: 100%; text-align: left; border-radius: 7px; padding: 7px 10px; font-size: 13px; line-height: 1.35; transition: background 150ms ease; }
.ptk-rr-item:hover { background: rgba(255, 255, 255, .65); }
.ptk-rr-item.active { background: #fff; box-shadow: inset 0 0 0 1px rgba(31, 31, 31, .40); }
.ptk-rr-main { min-width: 0; border: 1px solid rgba(31, 31, 31, .083); border-radius: 7px; padding: 14px 16px; background: #fff; }
.ptk-rr-pane-title { margin: 0 0 6px; font-size: 14.5px; font-weight: 600; }
.ptk-rr-pane-lead { color: #6f6f6f; font-size: 13px; line-height: 1.55; margin: 0 0 14px; }
.ptk-srow { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--ptk-line); flex-wrap: wrap; }
.ptk-srow:first-of-type { border-top: 0; }
.ptk-srow .ptk-rn { flex: 1; min-width: 220px; }
.ptk-srow .ptk-rn b { font-weight: 600; font-size: 13.5px; display: block; }
.ptk-srow .ptk-rn span { font-size: 12.5px; color: var(--ptk-muted); }
.ptk-st { font-size: 12px; color: var(--ptk-faint); min-width: 70px; }
.ptk-st.ok { color: var(--ptk-green); }
.ptk-st.err { color: var(--ptk-red); }
.ptk-sw { width: 36px; height: 20px; border-radius: 10px; background: #d3d3d3 !important; position: relative; flex-shrink: 0; transition: background .15s; }
.ptk-sw::after { content: ""; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; }
.ptk-sw.on { background: var(--ptk-text) !important; }
.ptk-sw.on::after { left: 18px; }
.ptk-cbx { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; }
.ptk-cbx label { display: flex; gap: 6px; align-items: center; }
.ptk-cbx input { accent-color: #1f1f1f; }
.ptk-alarm { background: #fbeceb; color: #8c2a22; border-radius: 7px; padding: 10px 12px; font-size: 13px; margin: 8px 0; }
.ptk-prev { border: 1px solid var(--ptk-line); border-radius: 8px; max-height: 50vh; overflow-y: auto; }
.ptk-prev label { display: flex; gap: 8px; align-items: flex-start; padding: 7px 10px; border-top: 1px solid var(--ptk-line); font-size: 13px; }
.ptk-prev label:first-child { border-top: 0; }
.ptk-prev input[type="checkbox"] { accent-color: #1f1f1f; margin-top: 3px; }
.ptk-prev .ptk-pt { flex: 1; outline: 0; border-radius: 4px; }
.ptk-prev .ptk-pt:focus { background: var(--ptk-soft); }
.ptk-prev .ptk-pt.done { color: var(--ptk-faint); text-decoration: line-through; }
.ptk-prev small { color: var(--ptk-faint); white-space: nowrap; }
@media (max-width: 640px) {
    .ptk-rr-layout { grid-template-columns: 1fr; }
    .ptk-rr-rail { position: static; }
}

/* кнопка рельса и «Приложения»: счётчик числом (как бейдж .top-apps-badge, но это число задач) */
#rail .rail-btn[data-rail="notes"] { position: relative; }
.ptk-rail-cnt { position: absolute; top: 3px; right: 2px; min-width: 16px; height: 16px; border-radius: 8px; padding: 0 4px;
    background: var(--mc-ink, #1f1f1f); color: #fff; font-size: 10px; font-weight: 600; line-height: 16px; text-align: center; pointer-events: none; }
.ptk-rail-cnt.red { background: #d4493f; }
.ptk-rail-cnt[hidden] { display: none; }

/* карточка задачи в чате (инструмент модели, T4.3) и строка-предложение под ответом (T4.1) */
.ptk-tcard { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border: 1px solid var(--mc-line, #e6e6e6); border-radius: 10px; max-width: 520px; margin: 8px 0 4px; background: #fff; font: 13px/1.4 var(--mc-font, sans-serif); color: var(--mc-text, #1f1f1f); }
.ptk-tcard .ptk-bd { flex: 1; min-width: 0; }
.ptk-tcard b { font-size: 13.5px; display: block; }
.ptk-tcard span { font-size: 12px; color: var(--mc-muted, #6f6f6f); }
.ptk-tcard.undone { opacity: .55; }
.ptk-tcard button, .ptk-offer button { font: 12.5px/1.4 var(--mc-font, sans-serif); padding: 4px 9px; border-radius: 7px; background: var(--mc-soft, #f3f3f3); color: var(--mc-text, #1f1f1f); border: none; cursor: pointer; white-space: nowrap; }
.ptk-tcard button:hover, .ptk-offer button:hover { background: var(--mc-soft2, #e9e9e9); }
.ptk-offer { display: flex; gap: 8px; align-items: center; font: 13px/1.4 var(--mc-font, sans-serif); color: var(--mc-muted, #6f6f6f); padding: 8px 0 0; border-top: 1px dashed var(--mc-line, #e6e6e6); margin-top: 8px; flex-wrap: wrap; }
.ptk-offer.done { color: var(--ptk-green, #2e9d63); }

/* ── граница списка и деталей: перетаскивается, ширина помнится (владелец 22.10) ── */
.ptk-dt-split { position: absolute; top: 0; bottom: 0; right: var(--ptk-dt-w, 588px); width: 8px; margin-right: -4px; cursor: col-resize; z-index: 6; }
.ptk-dt-split::after { content: ''; position: absolute; top: 0; bottom: 0; left: 3px; width: 2px; background: transparent; transition: background .12s; }
.ptk-dt-split:hover::after, .ptk-dt-split.on::after { background: var(--ptk-line-strong, #cfcfcf); }
.ptk-body.ptk-nodetail .ptk-dt-split, .ptk-body.ptk-calv:not(.ptk-calopen) .ptk-dt-split, .ptk-narrow .ptk-dt-split { display: none; }

/* ── оформление текста задачи и заметки ── */
.ptk-edbar { display: flex; align-items: center; gap: 2px; margin: 2px -6px 2px; flex-wrap: wrap; }
.ptk-edbar button, .ptk-edimg { height: 28px; min-width: 30px; padding: 0 7px; border-radius: 7px; color: var(--ptk-muted); font-size: 13px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; cursor: pointer; }
.ptk-edbar button:hover, .ptk-edimg:hover { background: var(--ptk-soft); color: var(--ptk-text); }
.ptk-edst { font-size: 12px; color: var(--ptk-faint); margin-left: 6px; }
.ptk-edst.ok { color: #2f7d4f; } .ptk-edst.err { color: var(--ptk-red); }
.ptk-desc ul, .ptk-desc ol { margin: 4px 0; padding-left: 22px; white-space: normal; }
.ptk-desc li { margin: 2px 0; }
.ptk-desc ul.ptk-cl { list-style: none; padding-left: 24px; }
.ptk-desc ul.ptk-cl > li { position: relative; }
.ptk-desc ul.ptk-cl > li::before { content: ''; position: absolute; left: -22px; top: .2em; width: 14px; height: 14px; border: 1.5px solid #b9b9b9; border-radius: 4px; background: #fff; cursor: pointer; }
.ptk-desc ul.ptk-cl > li[data-done="1"] { color: var(--ptk-faint); text-decoration: line-through; }
.ptk-desc ul.ptk-cl > li[data-done="1"]::before { background: var(--ptk-text); border-color: var(--ptk-text); }
.ptk-desc ul.ptk-cl > li[data-done="1"]::after { content: ''; position: absolute; left: -17px; top: calc(.2em + 3px); width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); pointer-events: none; }
.ptk-desc img { max-width: 100%; height: auto; border-radius: 6px; display: block; margin: 6px 0; }
.ptk-desc a { color: #2b5fb8; text-decoration: underline; cursor: pointer; }
.ptk-desc p { margin: 0 0 4px; }
.ptk-desc table { border-collapse: collapse; white-space: normal; }
.ptk-desc td, .ptk-desc th { border: 1px solid var(--ptk-line); padding: 3px 6px; }

/* окно, придвинутое к рельсу (watchDock → app-win-dock-l): своя рамка на рамке рельса, тени слева нет, левые углы прямые —
   иначе у стыка двойная рамка и тень на рельсе («полоса у рельса», владелец 25.10) */
.ptk-overlay.app-win-dock-l { border-top-left-radius: 0; border-bottom-left-radius: 0; clip-path: inset(-64px -64px -64px 0); translate: -1px 0; }
