/* Таймери відправки й ескалація з кімнати (frontend/shared/timerhistory.js) — «Клієнти» й «Постачальники» (Іван 27.10).
   Кольори — токени обох застосунків із запасом (у «Постачальниках» інші імена: --txt, --muted, --bg3, --line). */
.th-strip { display: flex; flex-direction: column; gap: 4px; padding: 4px 0; }
.th-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.th-pill, .th-task {
    display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-width: 0; padding: 2px 9px; border-radius: 999px;
    font: inherit; font-size: 12px; line-height: 1.5; cursor: pointer; text-align: left;
    border: 1px solid var(--line, rgba(255, 255, 255, .12)); background: var(--bg-hover, var(--bg3, rgba(255, 255, 255, .05)));
    color: var(--text, var(--txt, #e6ecf3));
}
.th-pill span, .th-task span { overflow-wrap: anywhere; }
.th-pill i, .th-task i { flex: none; font-size: 11px; opacity: .85; }
.th-pill.th-fired { color: #f0a35b; border-color: rgba(240, 163, 91, .45); background: rgba(240, 163, 91, .10); }
.th-pill.th-armed { color: var(--accent-strong, var(--accent2, #6ab3f3)); border-color: rgba(106, 179, 243, .4); }
.th-pill.th-quiet { color: var(--text-dim, var(--muted, #8b98a5)); }
/* ескалація, яку ніхто не взяв (Іван 27.10, задача №376: «ескалації нема» — бо її не було видно) */
.th-task.th-untaken { color: #ef8a8a; border-color: rgba(239, 138, 138, .55); background: rgba(239, 138, 138, .12); font-weight: 600; }
.th-pill:hover, .th-task:hover { filter: brightness(1.15); }
.th-other { font-size: 11.5px; color: var(--text-dim, var(--muted, #8b98a5)); }

/* вікно історії */
.modal-card.th-modal, .imodal-card.th-modal { width: min(760px, 96vw); height: auto; max-height: 92vh; }
.th-hist { padding: 12px 16px 18px; color: var(--text, var(--txt, #e6ecf3)); font-size: 13px; }
.th-sec { margin-bottom: 18px; }
.th-sec-h { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.th-sub { margin: 10px 0 4px; font-size: 11px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase;
    color: var(--text-dim, var(--muted, #8b98a5)); }
.th-taskrow {
    display: flex; align-items: flex-start; gap: 8px; width: 100%; box-sizing: border-box; margin-bottom: 4px; padding: 6px 8px;
    border-radius: 8px; border: 1px solid var(--line, rgba(255, 255, 255, .1)); background: none; cursor: pointer;
    font: inherit; text-align: left; color: inherit;
}
.th-taskrow i { flex: none; margin-top: 3px; font-size: 12px; opacity: .8; }
.th-taskrow:hover { background: var(--bg-hover, var(--bg3, rgba(255, 255, 255, .05))); }
.th-taskrow.th-untaken { border-color: rgba(239, 138, 138, .55); background: rgba(239, 138, 138, .08); }
.th-taskrow.th-done { opacity: .65; }
.th-tr-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.th-tr-title { font-weight: 600; overflow-wrap: anywhere; }
.th-tr-meta { font-size: 12px; color: var(--text-dim, var(--muted, #8b98a5)); overflow-wrap: anywhere; }
.th-timer { padding: 8px 10px; margin-bottom: 6px; border-radius: 8px; border-left: 3px solid var(--line, rgba(255, 255, 255, .15));
    background: var(--bg-hover, var(--bg3, rgba(255, 255, 255, .03))); }
.th-timer.th-st-fired { border-left-color: #f0a35b; }
.th-timer.th-st-armed, .th-timer.th-st-pending { border-left-color: var(--accent-strong, var(--accent2, #6ab3f3)); }
.th-t-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.th-t-title { font-weight: 600; overflow-wrap: anywhere; }
.th-badge { flex: none; padding: 0 7px; border-radius: 999px; font-size: 11px; font-weight: 700; line-height: 1.6;
    background: rgba(255, 255, 255, .08); color: var(--text-dim, var(--muted, #8b98a5)); }
.th-b-fired { color: #f0a35b; background: rgba(240, 163, 91, .14); }
.th-b-armed, .th-b-pending { color: var(--accent-strong, var(--accent2, #6ab3f3)); background: rgba(106, 179, 243, .14); }
.th-t-when { margin-top: 2px; font-size: 12px; color: var(--text-dim, var(--muted, #8b98a5)); }
.th-q { margin-top: 4px; font-size: 12.5px; }
.th-q summary { cursor: pointer; color: var(--text-dim, var(--muted, #8b98a5)); overflow-wrap: anywhere; }
.th-q-full { margin-top: 4px; white-space: pre-wrap; overflow-wrap: anywhere; }
.th-t-res { margin-top: 6px; }
.th-closed { display: flex; align-items: baseline; gap: 7px; }
.th-closed i { flex: none; width: 14px; text-align: center; color: var(--text-dim, var(--muted, #8b98a5)); }
.th-closed.th-by-agent i { color: #b18cf2; }
.th-closed.th-by-supplier i { color: #7fd38f; }
.th-reason { margin: 3px 0 0 21px; padding-left: 8px; border-left: 2px solid rgba(177, 140, 242, .5); font-size: 12.5px;
    color: var(--text, var(--txt, #e6ecf3)); overflow-wrap: anywhere; }
.th-decision { font-size: 12.5px; color: #f0a35b; }
.th-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.th-link { display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px; border-radius: 6px; cursor: pointer; font: inherit;
    font-size: 12px; background: none; color: var(--accent-strong, var(--accent2, #6ab3f3));
    border: 1px solid color-mix(in srgb, var(--accent-strong, var(--accent2, #6ab3f3)) 40%, transparent); }
.th-link:hover { background: var(--bg-hover, var(--bg3, rgba(255, 255, 255, .06))); }
.th-run { font-size: 12px; color: var(--text-dim, var(--muted, #8b98a5)); }
.th-note { margin-top: 8px; font-size: 11.5px; color: var(--text-muted, var(--muted2, #76808a)); line-height: 1.45; }
