/* ==========================================================================
   «Поставить себе задачу» — личные задачи с напоминанием (Нури 01.12.2026, Izi.CRM #5433), строит self-tasks.js (window.STK).
   Колонка «Мои задачи» канбана и блок «Моего дня» (внутри .myc — токены кабинета), окно задачи, меню «Перенести» и «Ещё»,
   всплывашка напоминания (в углу вместе с отметками коллег, .chm-pop), список задач в чате (бывший мини-планер «Заметки»),
   кнопки в шапке чата и у пузыря, счётчик на «Моём кабинете». Цвета — палитра кабинета (синий ИЗИ #1F4E9C), просрочено —
   красным, сегодня — синим; цветных меток слева нет (правило «ровной планки» соблюдать при добавлении). Тёмная тема — body[data-theme="dark"].
   ========================================================================== */
body {
    --stk-accent: #1F4E9C; --stk-accent-h: #193f80; --stk-accent-bg: #e8eef9; --stk-accent-line: #c9d6ef; --stk-ring: rgba(31, 78, 156, .16);
    --stk-ink: #10233f; --stk-text: #1f2a37; --stk-muted: #5f6b7a; --stk-faint: #8a94a3;
    --stk-card: #ffffff; --stk-soft: #f6f8fb; --stk-line: #e3e7ee; --stk-line2: #edf0f4;
    --stk-bad: #c4302b; --stk-bad-bg: #fde9e8; --stk-bad-line: #f5c4c1;
    --stk-warn: #b45309; --stk-warn-bg: #fdf3e3; --stk-warn-line: #f3d6ad;
    --stk-ok: #1b7f45; --stk-ok-bg: #e5f4ea;
    --stk-alarm: #c2620e; --stk-alarm-bg: #fdf0e2;
    --stk-shadow: 0 1px 2px rgba(16, 35, 63, .05), 0 1px 3px rgba(16, 35, 63, .04);
    --stk-shadow-lg: 0 18px 48px rgba(18, 30, 55, .2), 0 3px 10px rgba(18, 30, 55, .07);
}
body[data-theme="dark"] {
    --stk-accent: #6f9cf0; --stk-accent-h: #8bb0f5; --stk-accent-bg: rgba(111, 156, 240, .14); --stk-accent-line: rgba(111, 156, 240, .35); --stk-ring: rgba(111, 156, 240, .26);
    --stk-ink: #e9eef7; --stk-text: #e2e7ef; --stk-muted: #a3adbb; --stk-faint: #7d8796;
    --stk-card: #1d2635; --stk-soft: #19212e; --stk-line: #2c3646; --stk-line2: #263040;
    --stk-bad: #f58d87; --stk-bad-bg: rgba(245, 141, 135, .14); --stk-bad-line: rgba(245, 141, 135, .34);
    --stk-warn: #f3b366; --stk-warn-bg: rgba(243, 168, 90, .13); --stk-warn-line: rgba(243, 168, 90, .32);
    --stk-ok: #5ad58c; --stk-ok-bg: rgba(90, 213, 140, .13);
    --stk-alarm: #f3a85a; --stk-alarm-bg: rgba(243, 168, 90, .14);
    --stk-shadow: 0 1px 2px rgba(0, 0, 0, .3);
    --stk-shadow-lg: 0 18px 48px rgba(0, 0, 0, .55), 0 3px 10px rgba(0, 0, 0, .3);
}
.stk-i { display: block; flex: none; }

/* ---------------------------------------------------------------- кнопка «Поставить себе задачу» в кабинете */
.myc-btn.stk-trigger { gap: 7px; border-color: var(--stk-accent-line); background: var(--stk-accent-bg); color: var(--stk-accent); }
.myc-btn.stk-trigger:hover:not(:disabled) { border-color: var(--stk-accent); background: var(--stk-accent); color: #fff; }
body[data-theme="dark"] .myc-btn.stk-trigger:hover:not(:disabled) { color: #0e1622; }
.myc-btn.stk-trigger:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--stk-ring); }
/* на канбане — рядом с фильтрами (скрин Нури): тот же рост, что у пилюль фильтра, отбивка от них */
.myc-pills .stk-trigger { height: 34px; margin-left: 6px; border-radius: 999px; padding: 0 15px 0 13px; font-size: 13px; }
.myc-pills .stk-sep { width: 1px; align-self: stretch; margin: 6px 2px 6px 4px; background: var(--myc-line, #e3e7ee); }

/* ---------------------------------------------------------------- колонка «Мои задачи» на канбане */
.myc-board.has-tasks { grid-template-columns: repeat(6, minmax(198px, 1fr)) minmax(232px, 1.12fr); }
.myc-body.myc-body--wide { max-width: 2080px; }
.myc-col.tasks { background: linear-gradient(180deg, var(--stk-accent-bg), transparent 160px), var(--myc-col, #edf0f5); border-color: var(--stk-accent-line); }
.myc-col.tasks.drop-ok { border-color: var(--stk-accent); box-shadow: 0 0 0 3px var(--stk-ring); }
.stk-col-ic { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 6px; background: var(--stk-accent); color: #fff; flex: none; }
body[data-theme="dark"] .stk-col-ic { color: #0e1622; }
.stk-col-ic .stk-i { width: 13px; height: 13px; }
.stk-col-add { display: inline-flex; align-items: center; justify-content: center; gap: 7px; width: 100%; min-height: 36px; padding: 7px 10px; border: 1px dashed var(--stk-accent-line); border-radius: 10px;
    background: var(--stk-card); background: color-mix(in srgb, var(--stk-card) 70%, transparent); color: var(--stk-accent); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: background .12s, border-color .12s, color .12s; }
.stk-col-add:hover { border-style: solid; border-color: var(--stk-accent); background: var(--stk-accent-bg); }
.stk-col-add:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--stk-ring); }
.stk-col-add.sm { min-height: 32px; font-size: 12.5px; margin-top: 2px; }
.stk-grp-h { display: flex; align-items: center; gap: 6px; padding: 6px 4px 0; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--stk-muted); }
.stk-grp-h span { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--stk-line2); color: var(--stk-muted); font-size: 11px; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.stk-grp-h.is-late { color: var(--stk-bad); }
.stk-grp-h.is-late span { background: var(--stk-bad-bg); color: var(--stk-bad); }
.stk-grp-h.is-today { color: var(--stk-accent); }
.stk-grp-h.is-today span { background: var(--stk-accent-bg); color: var(--stk-accent); }
.stk-col-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 10px 14px; text-align: center; color: var(--stk-muted); font-size: 12.5px; line-height: 1.45; }
.stk-col-empty .stk-i { color: var(--stk-accent); opacity: .85; }
.stk-col-empty b { color: var(--stk-ink); font-size: 13.5px; }
.stk-done-toggle { display: flex; align-items: center; gap: 7px; width: 100%; padding: 8px 6px 4px; border: 0; background: none; color: var(--stk-muted); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; text-align: left; }
.stk-done-toggle .stk-i:first-child { color: var(--stk-ok); }
.stk-done-toggle span { flex: 1; }
.stk-done-toggle:hover { color: var(--stk-ink); }
.stk-done-chev { transition: transform .15s; }
.stk-done-toggle[aria-expanded="true"] .stk-done-chev { transform: rotate(180deg); }

/* ---------------------------------------------------------------- карточка задачи (канбан) */
.stk-card { display: flex; flex-direction: column; gap: 7px; padding: 11px 11px 9px; border-radius: 10px; background: var(--stk-card); border: 1px solid var(--stk-line); box-shadow: var(--stk-shadow);
    transition: border-color .12s, box-shadow .12s, opacity .2s; animation: stk-in .18s ease-out; }
.stk-card:hover { border-color: var(--stk-accent-line); box-shadow: 0 3px 12px rgba(16, 35, 63, .09); }
.stk-card.is-late { border-color: var(--stk-bad-line); }
.stk-card.is-done { opacity: .66; box-shadow: none; }
.stk-card.is-other { background: var(--stk-soft); }
.stk-card-top { display: flex; align-items: flex-start; gap: 9px; }
.stk-title { flex: 1; min-width: 0; padding: 0; border: 0; background: none; color: var(--stk-ink); font: inherit; font-size: 13.5px; font-weight: 700; line-height: 1.35; text-align: left; cursor: pointer;
    overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.stk-title:hover { color: var(--stk-accent); }
.stk-title:focus-visible { outline: none; border-radius: 4px; box-shadow: 0 0 0 3px var(--stk-ring); }
.is-done > .stk-card-top .stk-title, .stk-row.is-done .stk-title { text-decoration: line-through; color: var(--stk-muted); font-weight: 600; }
.stk-comment { font-size: 12.5px; line-height: 1.4; color: var(--stk-muted); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; }
.stk-comment.one { -webkit-line-clamp: 1; }
.stk-card .stk-chips, .stk-card .stk-comment { margin-left: 27px; }
.stk-card-foot { display: flex; align-items: center; gap: 6px; margin-left: 27px; min-width: 0; }
.stk-card-foot .stk-when { min-width: 0; }

/* кружок «Выполнено» */
.stk-check { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 18px; height: 18px; margin-top: 1px; padding: 0; border: 1.6px solid #b6bdc8; border-radius: 50%; background: var(--stk-card); color: transparent; cursor: pointer;
    transition: background .15s, border-color .15s, color .15s, transform .1s; }
body[data-theme="dark"] .stk-check { border-color: #5b6576; }
.stk-check .stk-i { width: 11px; height: 11px; }
.stk-check:hover { border-color: var(--stk-ok); color: var(--stk-ok); background: var(--stk-ok-bg); }
.stk-check:active { transform: scale(.86); }
.stk-check:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(27, 127, 69, .25); }
.stk-check.on { background: var(--stk-ok); border-color: var(--stk-ok); color: #fff; }
body[data-theme="dark"] .stk-check.on { color: #0e1622; }
.stk-check.is-ro { cursor: default; opacity: .55; }
.stk-check.is-ro:hover { border-color: #b6bdc8; background: var(--stk-card); color: transparent; }

/* чипы: клиент, чат, чья задача */
.stk-chips { display: flex; flex-wrap: wrap; gap: 5px; min-width: 0; }
.stk-chip { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; height: 22px; padding: 0 8px 0 6px; border: 0; border-radius: 6px; background: var(--stk-accent-bg); color: var(--stk-accent);
    font: inherit; font-size: 11.5px; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; }
.stk-chip span { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.stk-chip .stk-i { width: 12px; height: 12px; }
.stk-chip:hover { filter: brightness(.96); text-decoration: none; }
body[data-theme="dark"] .stk-chip:hover { filter: brightness(1.15); }
.stk-chip:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--stk-ring); }
.stk-chip.is-chat { background: var(--stk-ok-bg); color: var(--stk-ok); }
.stk-chip.is-owner { background: var(--stk-warn-bg); color: var(--stk-warn); cursor: default; }
.stk-chip.is-muted { background: var(--stk-line2); color: var(--stk-muted); cursor: default; }
.stk-chip.is-owner:hover, .stk-chip.is-muted:hover { filter: none; }

/* когда напомнить — кнопка «Перенести» */
.stk-when { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px 0 7px; border: 1px solid transparent; border-radius: 7px; background: var(--stk-line2); color: var(--stk-muted);
    font: inherit; font-size: 12px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.stk-when span { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.stk-when .stk-i { width: 13px; height: 13px; }
button.stk-when { cursor: pointer; transition: border-color .12s, background .12s, color .12s; }
button.stk-when:hover, button.stk-when[aria-expanded="true"] { border-color: var(--stk-accent-line); background: var(--stk-accent-bg); color: var(--stk-accent); }
button.stk-when:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--stk-ring); }
.stk-when-chev { width: 10px !important; height: 10px !important; opacity: .6; margin-left: 1px; }
.stk-when.is-today { background: var(--stk-accent-bg); color: var(--stk-accent); }
.stk-when.is-late { background: var(--stk-bad-bg); color: var(--stk-bad); }
button.stk-when.is-late:hover, button.stk-when.is-late[aria-expanded="true"] { border-color: var(--stk-bad-line); background: var(--stk-bad-bg); color: var(--stk-bad); }
.stk-when.is-done { background: var(--stk-ok-bg); color: var(--stk-ok); }
.stk-when.is-none { background: transparent; border-color: var(--stk-line); color: var(--stk-faint); font-weight: 500; }
.stk-more { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 26px; height: 26px; margin-left: auto; padding: 0; border: 1px solid transparent; border-radius: 7px; background: none; color: var(--stk-faint); cursor: pointer; transition: background .12s, color .12s, border-color .12s; }
.stk-more:hover, .stk-more[aria-expanded="true"] { background: var(--stk-accent-bg); color: var(--stk-accent); border-color: var(--stk-accent-line); }
.stk-more:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--stk-ring); }

/* ---------------------------------------------------------------- строка задачи (Мой день, обход, список в чате) */
.stk-row { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-top: 1px solid var(--stk-line2); min-width: 0; animation: stk-in .18s ease-out; }
.stk-row:first-child { border-top: 0; }
.stk-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.stk-row-main .stk-title { font-size: 13.5px; font-weight: 600; -webkit-line-clamp: 2; }
.stk-row-end { display: flex; align-items: center; gap: 4px; flex: none; }
.stk-row.is-done { opacity: .62; }
.stk-row.is-other .stk-check { margin-top: 2px; }
@keyframes stk-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* «Мой день» — блок «Мои задачи» */
.stk-day .myc-card-h { padding-bottom: 4px; }
.stk-day .myc-card-t { display: inline-flex; align-items: center; gap: 8px; }
.stk-day .stk-trigger { gap: 6px; }
.stk-count { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--stk-accent-bg); color: var(--stk-accent); font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stk-count.is-late { background: var(--stk-bad); color: #fff; }
body[data-theme="dark"] .stk-count.is-late { color: #1d0f0e; }
.stk-day-body { padding: 0 18px 8px; }
.stk-sec { padding: 2px 0 4px; }
.stk-sec + .stk-sec { border-top: 1px solid var(--stk-line2); padding-top: 8px; }
.stk-sec-h { display: flex; align-items: center; gap: 6px; padding: 4px 0 0; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--stk-muted); }
.stk-sec-h span { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--stk-line2); font-size: 11px; letter-spacing: 0; }
.stk-sec.is-late .stk-sec-h { color: var(--stk-bad); }
.stk-sec.is-late .stk-sec-h span { background: var(--stk-bad-bg); }
.stk-sec.is-today .stk-sec-h { color: var(--stk-accent); }
.stk-sec.is-today .stk-sec-h span { background: var(--stk-accent-bg); }
.stk-sec-h + .stk-row { border-top: 0; }
.stk-sec-more { display: block; width: 100%; padding: 6px 0 2px; border: 0; background: none; color: var(--stk-accent); font: inherit; font-size: 12.5px; font-weight: 600; text-align: left; cursor: pointer; }
.stk-sec-more:hover { text-decoration: underline; text-underline-offset: 3px; }
.stk-day-empty { display: flex; align-items: flex-start; gap: 12px; padding: 6px 0 12px; color: var(--stk-muted); font-size: 12.5px; line-height: 1.45; }
.stk-day-empty > .stk-i { color: var(--stk-accent); margin-top: 2px; }
.stk-day-empty b { display: block; margin-bottom: 2px; color: var(--stk-ink); font-size: 13.5px; }
.stk-day-foot { display: flex; align-items: center; justify-content: center; gap: 6px; width: calc(100% - 24px); margin: 0 12px 12px; padding: 8px 10px; border: 1px dashed var(--stk-line); border-radius: 10px; background: transparent; color: var(--stk-accent); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.stk-day-foot:hover { background: var(--stk-accent-bg); border-color: var(--stk-accent-line); }

/* обход: «Мои задачи по клиенту» */
.stk-client[hidden] { display: none !important; }
.stk-client { gap: 8px !important; border-color: var(--stk-accent-line) !important; }
.stk-client-h .myc-card-t { display: inline-flex; align-items: center; gap: 8px; }
.stk-client .stk-card { box-shadow: none; background: var(--stk-soft); }
.stk-client .stk-card + .stk-card { margin-top: 2px; }

/* скелетон и ошибка */
.stk-skel { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 10px; background: var(--stk-card); border: 1px solid var(--stk-line); }
.stk-skel i { display: block; height: 12px; border-radius: 6px; background: var(--stk-line2); animation: stk-pulse 1.2s ease-in-out infinite; }
.stk-skel i:last-child { width: 55%; }
.stk-row + .stk-skel, .stk-skel + .stk-skel { margin-top: 8px; }
@keyframes stk-pulse { 50% { opacity: .45; } }
.stk-err { display: flex; align-items: flex-start; gap: 6px; padding: 8px 10px; border-radius: 9px; background: var(--stk-bad-bg); color: var(--stk-bad); font-size: 12px; }

/* ---------------------------------------------------------------- счётчик на «Моём кабинете» */
.stk-nav-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 6px; border-radius: 999px; background: #dc2626; color: #fff;
    font-size: 11px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; animation: stk-badge .3s ease-out; }
.stk-nav-badge[hidden] { display: none; }
@keyframes stk-badge { from { transform: scale(.6); } to { transform: none; } }

/* ---------------------------------------------------------------- чат: кнопка шапки, значок у пузыря, пункт меню */
.chat-header-tool-btn.stk-chat-btn { position: relative; }
.stk-chat-dot { position: absolute; top: 2px; right: 1px; display: inline-flex; align-items: center; justify-content: center; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--stk-accent); color: #fff;
    font-size: 10px; font-weight: 700; line-height: 1; box-shadow: 0 0 0 2px var(--wa-head, #f0f2f5); pointer-events: none; }
.stk-chat-dot.is-late { background: #dc2626; }
.stk-chat-dot[hidden] { display: none; }
body[data-theme="dark"] .stk-chat-dot { color: #0e1622; box-shadow: 0 0 0 2px var(--wa-head, #202c33); }
.chat-bubble-stk { display: inline-flex; align-items: center; justify-content: center; padding: 0; margin-right: 5px; border: 0; background: none; line-height: 0; vertical-align: middle; cursor: pointer;
    color: var(--wa-muted, #667781); opacity: 0; transition: opacity .15s, color .15s, transform .1s; }
.chat-bubble-stk .stk-i { width: 14px; height: 14px; }
.chat-bubble:hover .chat-bubble-stk { opacity: .55; }
.chat-bubble-stk:hover { opacity: 1 !important; color: var(--stk-accent); }
.chat-bubble-stk:active { transform: scale(.82); }
.chat-bubble-stk.is-set { opacity: 1; color: var(--stk-alarm); }
@media (hover: none) { .chat-bubble-stk { opacity: .55; } }
body[data-theme="dark"] .chat-bubble-stk { color: rgba(233, 237, 239, .6); }
body[data-theme="dark"] .chat-bubble-stk:hover { color: #8bb0f5; }
body[data-theme="dark"] .chat-bubble-stk.is-set { color: var(--stk-alarm); }
.chat-conv-menu button.chat-ctx-ico .stk-i { flex: none; color: var(--wa-icon, #54656f); }

/* ---------------------------------------------------------------- список задач в чате (бывший мини-планер «Заметки») */
#chatNotesList .stk-card { flex: none; padding: 10px 10px 8px 12px; border-radius: 12px; border-color: var(--wa-sep, var(--border-color)); background: var(--wa-app-bg, var(--bg-color)); box-shadow: none; }
#chatNotesList .stk-card:hover { border-color: rgba(217, 119, 6, .45); box-shadow: 0 2px 6px rgba(0, 0, 0, .05); }
#chatNotesList .stk-card.is-late { border-color: var(--stk-bad-line); }
#chatNotesList .stk-card .stk-title { font-weight: 600; font-size: 13px; color: var(--text-color, var(--stk-text)); -webkit-line-clamp: 4; }
#chatNotesList .stk-card .stk-title:hover { color: var(--stk-accent); }
#chatNotesList .stk-card.is-done .stk-title { color: var(--text-muted, var(--stk-muted)); }
#chatNotesList .stk-when { height: 22px; font-size: 11.5px; }
.stk-pl-div.is-late { color: var(--stk-bad); }
.stk-pl-div.is-today { color: var(--stk-accent); }
.stk-pl-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.stk-pl-empty .stk-i { color: #d97706; margin-bottom: 4px; }
.stk-pl-empty b { color: var(--text-color); font-size: 14px; }
.stk-pl-empty span { max-width: 300px; }
#chatNotesCount.stk-due { background: #dc2626; color: #fff; }
.chat-notes-remind-btn { width: 38px; min-width: 38px; height: 38px; border: 1px solid rgba(217, 119, 6, .35); border-radius: 10px; cursor: pointer; color: #b45309; background: #fffbeb;
    display: inline-flex; align-items: center; justify-content: center; transition: background .15s, border-color .15s, transform .15s; }
.chat-notes-remind-btn:hover { background: #fef3c7; border-color: #d97706; }
.chat-notes-remind-btn:active { transform: scale(.94); }
body[data-theme="dark"] .chat-notes-remind-btn { background: rgba(245, 158, 11, .12); border-color: rgba(245, 158, 11, .35); color: #fbbf24; }

/* ---------------------------------------------------------------- всплывашка напоминания (в углу, вместе с отметками коллег) */
.chm-pop.stk-pop { --chm-accent: var(--stk-alarm); --chm-accent-soft: var(--stk-alarm-bg); }
.stk-pop .stk-pop-icon { background: var(--stk-alarm-bg); color: var(--stk-alarm); }
.stk-pop .stk-pop-icon .stk-i { animation: stk-ring 1.1s ease-in-out 2; transform-origin: 50% 12%; }
@keyframes stk-ring { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(14deg); } 30% { transform: rotate(-12deg); } 45% { transform: rotate(9deg); } 60% { transform: rotate(-6deg); } 75% { transform: rotate(3deg); } }
.stk-pop-t { margin-top: 3px; font-size: 13.5px; font-weight: 700; line-height: 1.35; color: var(--wa-text, #111b21); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.chm-pop-chat.stk-pop-chip { background: var(--stk-accent-bg); color: var(--stk-accent); }
.stk-pop .chm-pop-btn { display: inline-flex; align-items: center; gap: 5px; }
.stk-pop .chm-pop-btn .stk-i { width: 13px; height: 13px; }
.stk-pop .chm-pop-btn:not(.is-ghost) { background: var(--stk-ok); }
body[data-theme="dark"] .stk-pop .chm-pop-btn:not(.is-ghost) { color: #0b141a; }
.stk-pop-list { display: flex; flex-direction: column; gap: 3px; margin-top: 6px; font-size: 12.5px; color: var(--wa-text, #111b21); }
.stk-pop-list span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stk-pop-list span::before { content: ''; display: inline-block; width: 5px; height: 5px; margin: 0 7px 2px 1px; border-radius: 50%; background: var(--stk-alarm); vertical-align: middle; }
.stk-pop-list .more { color: var(--wa-muted, #667781); }
.stk-pop-list .more::before { display: none; }
@media (prefers-reduced-motion: reduce) { .stk-pop .stk-pop-icon .stk-i { animation: none; } }

/* ---------------------------------------------------------------- меню «Перенести» и «Ещё» (как меню выпадашек, ui-polish) */
.stk-menu { position: fixed; z-index: 10060; padding: 6px; border: 1px solid var(--stk-line); border-radius: 12px; background: var(--stk-card); color: var(--stk-text);
    box-shadow: 0 12px 36px rgba(18, 30, 55, .16), 0 2px 8px rgba(18, 30, 55, .06); opacity: 0; transform: translateY(4px) scale(.98); transform-origin: top right; transition: opacity .14s ease, transform .14s ease; }
.stk-menu.on { opacity: 1; transform: none; }
body[data-theme="dark"] .stk-menu { box-shadow: 0 14px 40px rgba(0, 0, 0, .55); }
.stk-menu-h { padding: 6px 10px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--stk-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stk-menu-sep { height: 1px; margin: 4px 6px; background: var(--stk-line2); }
.stk-mi { display: flex; align-items: flex-start; gap: 10px; width: 100%; margin-top: 1px; padding: 7px 10px; border: 0; border-radius: 8px; background: none; color: var(--stk-text); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.stk-mi:hover, .stk-mi:focus-visible { outline: none; background: var(--stk-accent-bg); }
.stk-mi-ic { display: inline-flex; flex: none; margin-top: 1px; color: var(--stk-accent); }
.stk-mi-t { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.stk-mi-t b { font-weight: 600; color: var(--stk-ink); }
.stk-mi-t small { font-size: 11.5px; color: var(--stk-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stk-mi.is-danger .stk-mi-ic, .stk-mi.is-danger b { color: var(--stk-bad); }
.stk-mi.is-danger:hover, .stk-mi.is-danger:focus-visible { background: var(--stk-bad-bg); }

/* ---------------------------------------------------------------- подсказка внизу с «Вернуть» */
.stk-toasts { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 10070; display: flex; flex-direction: column; gap: 8px; align-items: center; width: min(520px, calc(100vw - 24px)); pointer-events: none; }
.stk-toast { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 10px 10px 16px; border-radius: 12px; background: #13213a; color: #fff; box-shadow: var(--stk-shadow-lg); font-size: 13px; pointer-events: auto; animation: stk-toast-in .22s ease-out; }
body[data-theme="dark"] .stk-toast { background: #2a3548; }
.stk-toast.out { animation: stk-toast-out .2s ease forwards; }
.stk-toast-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stk-toast button { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 1px solid rgba(255, 255, 255, .35); border-radius: 8px; background: rgba(255, 255, 255, .08); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.stk-toast button:hover { background: rgba(255, 255, 255, .18); }
@keyframes stk-toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes stk-toast-out { to { opacity: 0; transform: translateY(10px); } }

/* ---------------------------------------------------------------- окно задачи */
.stk-modal { position: fixed; inset: 0; z-index: 10050; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(12, 20, 33, .48); opacity: 0; transition: opacity .14s ease; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }
.stk-modal.on { opacity: 1; }
.stk-modal *, .stk-modal *::before, .stk-modal *::after { box-sizing: border-box; }
.stk-dlg { width: 580px; max-width: 100%; max-height: calc(100vh - 32px); display: flex; flex-direction: column; background: var(--stk-card); color: var(--stk-text); border: 1px solid var(--stk-line); border-radius: 16px; box-shadow: var(--stk-shadow-lg); overflow: hidden;
    transform: translateY(8px) scale(.985); transition: transform .16s cubic-bezier(.2, .8, .3, 1); font-size: 13.5px; }
.stk-modal.on .stk-dlg { transform: none; }
.stk-dlg-h { display: flex; align-items: center; gap: 12px; padding: 16px 16px 12px 18px; border-bottom: 1px solid var(--stk-line2); flex: none; }
.stk-dlg-ic { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; flex: none; border-radius: 11px; background: var(--stk-accent-bg); color: var(--stk-accent); }
.stk-dlg-ht { flex: 1; min-width: 0; }
.stk-dlg-ht h3 { margin: 0; font-size: 16.5px; font-weight: 700; color: var(--stk-ink); letter-spacing: -.005em; }
.stk-dlg-ht p { margin: 2px 0 0; font-size: 12.5px; color: var(--stk-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stk-x { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex: none; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--stk-muted); cursor: pointer; }
.stk-x:hover { background: var(--stk-line2); color: var(--stk-ink); }
.stk-x:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--stk-ring); }
.stk-x.sm { width: 26px; height: 26px; }
.stk-dlg-b { padding: 14px 18px 16px; overflow-y: auto; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.stk-lbl { display: flex; align-items: baseline; gap: 6px; margin: 14px 0 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--stk-muted); }
.stk-lbl:first-child, .stk-ctx + .stk-lbl { margin-top: 2px; }
.stk-lbl span { font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--stk-faint); }
.stk-modal .stk-ta { display: block; width: 100%; min-height: 44px; max-height: 220px; resize: none; padding: 10px 12px; border: 1px solid var(--stk-line); border-radius: 11px; background: var(--stk-card); color: var(--stk-text);
    font: inherit; font-size: 14px; line-height: 1.45; outline: none; transition: border-color .15s, box-shadow .15s; }
.stk-modal .stk-ta.stk-ta-title { font-weight: 600; color: var(--stk-ink); }
.stk-modal .stk-ta:focus { border-color: var(--stk-accent); box-shadow: 0 0 0 3px var(--stk-ring); }
.stk-modal .stk-ta::placeholder { color: var(--stk-faint); font-weight: 400; }

/* откуда задача: чат / сообщение — цитата «ровной планкой» */
.stk-ctx { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; padding: 10px 12px; border-radius: 12px; background: var(--stk-soft); border: 1px solid var(--stk-line2); }
.stk-ctx-ic { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; flex: none; border-radius: 9px; background: var(--stk-ok-bg); color: var(--stk-ok); }
.stk-ctx-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.stk-ctx-t { font-size: 13px; font-weight: 600; color: var(--stk-ink); overflow-wrap: anywhere; }
.stk-ctx-t span { font-weight: 500; color: var(--stk-muted); }
.stk-ctx-s { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; color: var(--stk-muted); }
.stk-quote { position: relative; padding: 6px 10px 6px 12px; border-radius: 8px; background: var(--stk-card); font-size: 12.5px; line-height: 1.45; color: var(--stk-text); overflow-wrap: anywhere;
    display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.stk-quote::before { content: ''; position: absolute; left: 0; top: 6px; bottom: 6px; width: 3px; border-radius: 0 3px 3px 0; background: var(--stk-ok); pointer-events: none; }
.stk-link { display: inline-flex; align-items: center; gap: 5px; padding: 0; border: 0; background: none; color: var(--stk-accent); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.stk-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* клиент: поиск и выбранный */
.stk-search { position: relative; }
.stk-search > .stk-i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--stk-faint); pointer-events: none; }
.stk-modal .stk-search input { width: 100%; height: 40px; padding: 0 12px 0 38px; border: 1px solid var(--stk-line); border-radius: 11px; background: var(--stk-card); color: var(--stk-text); font: inherit; font-size: 13.5px; outline: none; transition: border-color .15s, box-shadow .15s; }
.stk-modal .stk-search input:focus { border-color: var(--stk-accent); box-shadow: 0 0 0 3px var(--stk-ring); }
.stk-modal .stk-search input::placeholder { color: var(--stk-faint); }
.stk-sug { margin-top: 6px; max-height: 236px; overflow-y: auto; padding: 4px; border: 1px solid var(--stk-line); border-radius: 12px; background: var(--stk-card); box-shadow: 0 8px 24px rgba(18, 30, 55, .1); }
.stk-sug[hidden] { display: none; }
.stk-sug-it { display: flex; flex-direction: column; gap: 1px; width: 100%; padding: 7px 10px; border: 0; border-radius: 8px; background: none; color: var(--stk-text); font: inherit; text-align: left; cursor: pointer; }
.stk-sug-it:hover, .stk-sug-it.hl { background: var(--stk-accent-bg); }
.stk-sug-n { font-size: 13px; font-weight: 600; color: var(--stk-ink); overflow-wrap: anywhere; }
.stk-sug-n em { font-style: normal; font-weight: 500; font-size: 11.5px; color: var(--stk-warn); margin-left: 4px; }
.stk-sug-s { font-size: 11.5px; color: var(--stk-muted); }
.stk-sug-empty { padding: 10px 12px; font-size: 12.5px; color: var(--stk-muted); }
.stk-client-chip { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 10px; border: 1px solid var(--stk-accent-line); border-radius: 11px; background: var(--stk-accent-bg); }
.stk-cc-ic { display: inline-flex; color: var(--stk-accent); }
.stk-cc-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.stk-cc-t b { font-size: 13.5px; color: var(--stk-ink); overflow-wrap: anywhere; }
.stk-cc-t small { font-size: 11.5px; color: var(--stk-muted); }
.stk-same { display: flex; align-items: flex-start; gap: 6px; margin-top: 6px; font-size: 12px; line-height: 1.45; color: var(--stk-muted); }
.stk-same .stk-i { margin-top: 2px; color: var(--stk-accent); }
.stk-same b { font-weight: 600; color: var(--stk-text); }

/* когда напомнить */
.stk-presets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stk-pre { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 52px; padding: 8px 11px; border: 1px solid var(--stk-line); border-radius: 11px; background: var(--stk-card); color: var(--stk-text);
    font: inherit; text-align: left; cursor: pointer; transition: border-color .14s, background .14s, box-shadow .14s; }
.stk-pre b { font-size: 13px; font-weight: 600; }
.stk-pre span { font-size: 11.5px; color: var(--stk-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.stk-pre:hover { border-color: var(--stk-accent-line); }
.stk-pre:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--stk-ring); }
.stk-pre.on { border-color: var(--stk-accent); background: var(--stk-accent-bg); box-shadow: inset 0 0 0 1px var(--stk-accent); }
.stk-pre.on b { color: var(--stk-accent); }
.stk-when-f { display: grid; grid-template-columns: minmax(0, 1fr) 124px; gap: 8px; margin-top: 8px; transition: opacity .15s; }
.stk-when-f.is-off { opacity: .45; }
.stk-field { position: relative; display: block; }
.stk-field-ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); z-index: 1; display: flex; color: var(--stk-muted); pointer-events: none; }
.stk-modal .stk-in { width: 100%; height: 40px; margin: 0; padding: 0 12px 0 36px; border: 1px solid var(--stk-line); border-radius: 11px; background: var(--stk-card); color: var(--stk-text);
    font: inherit; font-size: 13.5px; font-variant-numeric: tabular-nums; cursor: pointer; outline: none; transition: border-color .15s, box-shadow .15s; }
.stk-modal .stk-field.is-time .stk-in { cursor: text; font-weight: 600; letter-spacing: .02em; }
.stk-modal .stk-in:hover { border-color: var(--stk-accent-line); }
.stk-modal .stk-in:focus, .stk-modal .stk-in.active { border-color: var(--stk-accent); box-shadow: 0 0 0 3px var(--stk-ring); }
.stk-sum { display: flex; align-items: flex-start; gap: 10px; margin-top: 10px; padding: 10px 12px; border-radius: 11px; background: var(--stk-accent-bg); color: var(--stk-accent); }
.stk-sum > .stk-i { margin-top: 1px; }
.stk-sum > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stk-sum b { font-size: 13.5px; font-weight: 600; }
.stk-sum span { font-size: 12.5px; color: var(--stk-muted); }
.stk-sum .stk-sum-off { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 2px; color: var(--stk-warn); font-weight: 600; }
.stk-sum .stk-sum-off .stk-link { color: var(--stk-warn); text-decoration: underline; text-underline-offset: 3px; }
.stk-sum.is-warn { background: var(--stk-warn-bg); color: var(--stk-warn); }
.stk-sum.is-err { background: var(--stk-bad-bg); color: var(--stk-bad); }
.stk-sum.is-err span { color: var(--stk-bad); opacity: .9; }
.stk-sum.is-muted { background: var(--stk-soft); color: var(--stk-muted); }
.stk-opts { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px; }
.stk-opt { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--stk-text); cursor: pointer; user-select: none; }
.stk-opt input { margin: 0; }
.stk-opt span { display: inline-flex; align-items: center; gap: 6px; }
.stk-opt span .stk-i { color: var(--stk-muted); }
.stk-dlg-f { display: flex; align-items: center; gap: 8px; padding: 12px 18px 14px; border-top: 1px solid var(--stk-line2); background: var(--stk-soft); flex: none; }
.stk-dlg-f .grow { flex: 1; }
.stk-hint { font-size: 12px; color: var(--stk-faint); }
.stk-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 15px; border: 1px solid var(--stk-line); border-radius: 10px; background: var(--stk-card); color: var(--stk-ink);
    font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: border-color .12s, background .12s, color .12s, opacity .12s; }
.stk-btn:hover:not(:disabled) { border-color: var(--stk-accent); color: var(--stk-accent); }
.stk-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--stk-ring); }
.stk-btn.primary { background: var(--stk-accent); border-color: var(--stk-accent); color: #fff; }
.stk-btn.primary:hover:not(:disabled) { background: var(--stk-accent-h); border-color: var(--stk-accent-h); color: #fff; }
body[data-theme="dark"] .stk-btn.primary, body[data-theme="dark"] .stk-btn.primary:hover:not(:disabled) { color: #0e1622; }
.stk-btn.ghost { border-color: transparent; background: none; color: var(--stk-muted); padding: 0 10px; }
.stk-btn.ghost.danger:hover:not(:disabled) { background: var(--stk-bad-bg); color: var(--stk-bad); border-color: transparent; }
.stk-btn:disabled, .stk-btn.is-busy { opacity: .6; pointer-events: none; }
/* задача сотрудника у руководителя */
.stk-view-t { margin-bottom: 10px; font-size: 16px; font-weight: 700; line-height: 1.35; color: var(--stk-ink); overflow-wrap: anywhere; }
.stk-kv { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px; padding: 9px 0; border-top: 1px solid var(--stk-line2); font-size: 13px; }
.stk-kv > span { color: var(--stk-muted); }
.stk-kv a { color: var(--stk-accent); font-weight: 600; }
.stk-late-t { color: var(--stk-bad); font-weight: 700; }

/* ---------------------------------------------------------------- узкие экраны и телефон */
@media (max-width: 760px) {
    .myc-board.has-tasks { grid-template-columns: repeat(6, 252px) 272px; }
    .myc-pills .stk-trigger { margin-left: 0; }
    .myc-pills .stk-sep { display: none; }
    .stk-modal { align-items: flex-end; padding: 8px; }
    .stk-dlg { max-height: calc(100vh - 16px); border-radius: 16px; }
    .stk-dlg-h { padding: 14px 12px 10px 14px; }
    .stk-dlg-b { padding: 12px 14px 14px; }
    .stk-dlg-f { padding: 10px 14px 12px; flex-wrap: wrap; }
    .stk-dlg-f .stk-btn:not(.ghost) { flex: 1 1 auto; }
    .stk-hint { display: none; }
    .stk-presets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stk-when-f { grid-template-columns: minmax(0, 1fr) 108px; }
    .stk-day-body { padding: 0 14px 6px; }
    .stk-row { flex-wrap: wrap; }
    .stk-row-main { flex-basis: calc(100% - 30px); }
    .stk-row-end { width: 100%; padding-left: 28px; justify-content: space-between; }
    .stk-client .stk-row-end, #chatNotesList .stk-row-end { flex-direction: row; align-items: center; }
    .stk-kv { grid-template-columns: 96px minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
    .stk-modal, .stk-dlg, .stk-menu, .stk-card, .stk-row { transition: none; animation: none; }
}

/* кабинет без закреплённых клиентов: «Мои задачи» под пояснением, по ширине — как правая колонка «Моего дня» */
.myc-empty-tasks { max-width: 720px; }
