/* Ticketsystem: Unterhaltung, Anhänge, Bewertung, Support-Ansicht. Farben nur über Tokens aus base.css. */
.tk-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--s5); align-items: start; }
.tk-side { display: flex; flex-direction: column; gap: var(--s4); min-width: 0; }
.tk-main { display: flex; flex-direction: column; gap: var(--s4); min-width: 0; }
.tk-thread { display: flex; flex-direction: column; gap: var(--s3); }
.tk-thread .item { align-items: flex-start; }
.tk-thread .bubble.me { background: color-mix(in srgb, var(--blue) 10%, var(--grouped2)); }
.tk-thread .bubble.internal { background: color-mix(in srgb, var(--orange) 14%, var(--grouped2)); }
.tk-thread .bubble.system { background: var(--fill4); }
.tk-thread .bubble.system .bbody { padding: 8px 16px; color: var(--label2); font-size: var(--fs-sub); }
.tk-thread .bhead .who { font-weight: 600; }
.tk-thread .bhead .when { color: var(--label2); margin-left: auto; font-size: var(--fs-foot); }
.tk-thread .avatar.me { background: var(--blue); } .tk-thread .avatar.staff { background: var(--green); } .tk-thread .avatar.customer { background: var(--indigo); } .tk-thread .avatar.system { background: var(--gray); }
.tk-live { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-cap); color: var(--label2); }
.tk-live i { width: 8px; height: 8px; border-radius: 50%; background: var(--gray); display: inline-block; }
.tk-live.on i { background: var(--green); } .tk-live.off i { background: var(--orange); }
.md { overflow-wrap: anywhere; line-height: 1.5; }
.md > * + * { margin-top: 8px; }
.md p, .md ul, .md ol, .md blockquote, .md pre { margin: 0; }
.md ul, .md ol { padding-left: 1.4em; }
.md code { font: 400 .875em var(--mono); background: var(--fill3); padding: 1px 5px; border-radius: 6px; }
.md pre { background: var(--fill4); padding: 10px 12px; border-radius: 12px; overflow-x: auto; font: 400 .875rem/1.45 var(--mono); white-space: pre; }
.md pre code { background: none; padding: 0; }
.md blockquote { border-left: 3px solid var(--separator); padding-left: 12px; color: var(--label2); }
.md a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 2px; }
.tk-atts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.tk-att { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; background: var(--fill3); border-radius: var(--r-pill); font-size: var(--fs-foot); color: var(--label); text-decoration: none; max-width: 100%; }
.tk-att span.n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.tk-att .sz { color: var(--label2); }
.tk-att button { border: 0; background: none; cursor: pointer; padding: 0 0 0 2px; color: var(--label2); font-size: 1rem; line-height: 1; }
.tk-img { display: block; max-width: min(100%, 360px); max-height: 240px; border-radius: 12px; margin-top: 10px; background: var(--fill4); }
.tk-composer { display: flex; flex-direction: column; gap: var(--s3); }
.tk-composer textarea { min-height: 120px; }
.tk-stars { display: inline-flex; gap: 4px; }
.tk-stars button { border: 0; background: none; font-size: 2rem; line-height: 1; cursor: pointer; color: var(--label4); padding: 2px; transition: transform .2s var(--spring), color .2s var(--ease); }
.tk-stars button.on { color: var(--yellow); }
.tk-stars button:hover { transform: scale(1.15); }
.tk-stars.ro button { cursor: default; } .tk-stars.ro button:hover { transform: none; }
.tk-prio { font-weight: 600; font-size: var(--fs-cap); }
.tk-prio.p0 { color: var(--label2); } .tk-prio.p2 { color: var(--warn-text); } .tk-prio.p3 { color: var(--bad-text); }
.tk-sla.overdue { color: var(--bad-text); font-weight: 600; } .tk-sla.ok { color: var(--label2); } .tk-sla.met { color: var(--ok-text); } .tk-sla.breached { color: var(--warn-text); }
.tk-filters { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }
.tk-filters select { max-width: 200px; }
.tk-filters .search { flex: 1 1 220px; max-width: 360px; }
.tk-row-sub { font-size: var(--fs-cap); color: var(--label2); }
.tk-props .field { margin: 0; }
.tk-pager { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); }
.tk-chk { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-sub); }
@media (max-width: 900px) {
  .tk-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .tk-thread .item > .avatar { display: none; }
  .tk-filters select { max-width: none; flex: 1 1 140px; }
  .tk-att span.n { max-width: 150px; }
}
.tk-filters .cndd { width: auto; flex: 1 1 170px; max-width: 230px; }
.tk-filters .cndd-btn { min-height: 40px; }
.tk-composer .rowflex .cndd { width: auto; flex: 1 1 220px; max-width: 280px; }
.tk-composer > .between .cndd { width: auto; flex: 0 1 260px; }
.tk-props .cndd-btn { min-height: 40px; }
@media (max-width: 560px) { .tk-filters .cndd { max-width: none; flex: 1 1 140px; } }
