/* Стили страницы tickets (KB_TICKETS_DESIGN.md §6.2). Общие компоненты — в css/panel.css. */

/* Таблица: строки 60, «Заявка» не шире 320. */
.tk-table .tk-num { white-space: nowrap; font-variant-numeric: tabular-nums; width: 1%; }
.tk-table td.tk-title { max-width: 320px; }
.tk-table td.tk-title .cell2__a { overflow-wrap: anywhere; }
.tk-cat { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tk-cat .icon { flex: none; color: var(--color-text-2); }
.tk-cat span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-late { display: inline-flex; align-items: center; gap: 4px; color: var(--color-err); font-weight: 600; white-space: nowrap; }
.tk-table td.r { white-space: nowrap; }

/* Шторка. */
.tk-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.tk-drawer { display: contents; }
.tk-sec { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.tk-sec > h3 { font: 600 16px/24px var(--font-display); }
.tk-sub { font: 600 14px/20px var(--font-text); margin-top: 4px; }
.tk-desc { font-size: 16px; line-height: 24px; overflow-wrap: anywhere; white-space: pre-line; }
.tk-hint { color: var(--color-text-2); }
.tk-assign { gap: 16px; }
.tk-ro {
  min-height: 40px; padding: 10px 12px; border-radius: var(--radius-xs); background: var(--color-surface-2);
  overflow-wrap: anywhere; display: flex; flex-direction: column;
}
.tk-ro.is-err { color: var(--color-err); font-weight: 600; }
.tk-phone { color: var(--color-accent-ink); font-variant-numeric: tabular-nums; }

/* Смена исполнителя или приоритета — рамка 2px accent до «Сохранить». */
.field.is-changed .select { border: 2px solid var(--color-accent); padding-left: 11px; padding-right: 35px; }

/* Миниатюры 96 (лента — 72). */
.tk-thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.tk-thumb {
  width: 96px; height: 96px; padding: 0; border: 0; border-radius: var(--radius-sm); overflow: hidden;
  background: var(--color-surface-2); cursor: zoom-in; flex: none;
}
.tk-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tk-thumb:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.tk-thumbs--sm .tk-thumb { width: 72px; height: 72px; }
.tk-full { display: block; width: 100%; max-height: 70vh; object-fit: contain; border-radius: var(--radius-sm); background: var(--color-surface-2); }

/* Лента событий §5.4 в размерах панели. */
.tk-feed { list-style: none; margin: 0; padding: 0; }
.tk-ev { position: relative; display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; padding-bottom: 16px; }
.tk-ev:not(:last-child)::before { content: ""; position: absolute; left: 11px; top: 28px; bottom: 4px; width: 2px; background: var(--color-border); }
.tk-ev__dot { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; }
.tk-ev__dot .icon { width: 16px; height: 16px; }
.tk-ev__main { min-width: 0; }
.tk-ev__head { font-weight: 600; display: flex; flex-wrap: wrap; gap: 0 8px; }
.tk-ev__head time { font-weight: 400; color: var(--color-text-2); font-variant-numeric: tabular-nums; }
.tk-ev__who { color: var(--color-text-2); margin-top: 4px; }
.tk-ev__text { margin-top: 4px; overflow-wrap: anywhere; }
.tk-ev__quote {
  margin-top: 8px; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--color-surface-2);
  overflow-wrap: anywhere; white-space: pre-line;
}
.tk-ev .tk-thumbs { margin-top: 8px; }
.tk-comment .textarea { min-height: 88px; }

@media (max-width: 767px) {
  .tk-assign { grid-template-columns: minmax(0, 1fr); }
}
@media (forced-colors: active) {
  .tk-ev__dot { border: 1px solid CanvasText; }
  .field.is-changed .select { outline: 2px solid Highlight; }
}

/* Тулбар в одну строку на 1440 (§6.6): поиск сжимается до 160, остальное
   не трогаем; перенос второй строкой — с 1280. */
@media (min-width: 1280px) and (max-width: 1535px) {
  .tk-table .toolbar .search { width: auto; flex: 1 1 160px; min-width: 160px; max-width: 280px; }
}
