/* Support workspaces: shared TDesk foundations, quieter reading and denser lists. */
.ticket-heading { display: flex; justify-content: space-between; align-items: center; gap: 40px; }
.ticket-heading h1 { max-width: 20ch; font-size: clamp(34px, 4.25vw, 56px); font-weight: 650; line-height: 1.15; }
.ticket-heading p { max-width: 55ch; margin-top: 20px; color: var(--td-muted); }
.ticket-heading > .td-button { flex-shrink: 0; }
.ticket-section-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 24px; }
.ticket-section-heading h2 { font-size: 28px; font-weight: 650; }
.ticket-summary { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 16px; margin-bottom: 40px; }
.td-page .ticket-stat { display: flex; align-items: center; gap: 16px; padding: 22px 20px; border: 1px solid var(--td-line); border-radius: 16px; text-align: left; font-size: 13px; color: var(--td-muted); background: white; }
.ticket-stat strong { display: block; margin-top: 3px; color: var(--td-ink); font-size: 28px; line-height: 1.3; font-weight: 650; }
.td-page .ticket-stat:hover { background: #f8faff; border-color: #bdcbee; }
.td-page .ticket-stat[aria-pressed="true"] { border-color: var(--td-blue); box-shadow: 0 0 0 1px var(--td-blue); }
.stat-icon { display: inline-grid; width: 44px; height: 48px; flex: 0 0 auto; place-items: center; border-radius: 13px; color: var(--td-ink); font-size: 19px; }
.stat-icon--blue { background: #e6edff; color: var(--td-blue); }
.stat-icon--slate { background: #eff2f6; }
.stat-icon--lavender { background: var(--td-lavender); }
.stat-icon--peach { background: var(--td-peach); }
.stat-icon--mint { background: #def3e9; }
.ticket-list-panel { border: 1px solid var(--td-line); border-radius: 20px; padding: 0 28px; }
.ticket-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 24px 0; }
.ticket-all-filter { display: flex; align-items: center; gap: 9px; min-height: 44px; padding: 4px 8px; margin-left: -8px; font-size: 17px; font-weight: 650; border: 1px solid transparent; border-radius: 10px; }
.ticket-all-filter span { display: inline-grid; width: 26px; height: 26px; place-items: center; background: var(--td-mist); color: var(--td-blue); border-radius: 8px; font-size: 12px; }
.ticket-all-filter[aria-pressed="true"] { color: var(--td-blue); }
.ticket-toolbar-actions { display: flex; align-items: center; gap: 12px; }
.ticket-search { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 16px; border: 1px solid var(--td-line); border-radius: 12px; color: var(--td-muted); }
.ticket-search:focus-within { outline: 3px solid rgb(40 85 232 / 18%); border-color: var(--td-blue); }
.ticket-search input { min-width: 0; width: 230px; padding: 10px 0; border: 0; outline: none !important; background: transparent; color: var(--td-ink); font-size: 16px; }
.ticket-filters { display: flex; align-items: end; gap: 16px; padding: 0 0 24px; }
.ticket-filters .field-group { flex: 1; margin: 0; }
.ticket-filters label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 600; }
.ticket-filters .form-select { min-height: 46px; border-color: var(--td-line); border-radius: 10px; font-size: 14px; }
.ticket-table { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 1.6; }
.ticket-table th { padding: 14px 12px; border-bottom: 1px solid var(--td-line); background: #f8faff; font-size: 12px; font-weight: 500; color: var(--td-muted); }
.ticket-table th:first-child { border-radius: 10px 0 0 10px; }
.ticket-table th:last-child { border-radius: 0 10px 10px 0; }
.ticket-table td { padding: 22px 12px; border-bottom: 1px solid var(--td-line); vertical-align: middle; }
.ticket-table td:first-child { width: 40%; }
.ticket-table td:nth-child(2) { width: 20%; }
.ticket-table td:last-child { white-space: nowrap; }
.ticket-table tbody tr:last-child td { border-bottom: none; }
.ticket-table tbody tr:hover { background: #fafbfe; }
.ticket-id-label { color: var(--td-muted); font-size: 11px; margin-bottom: 4px; }
.td-page .ticket-subject { color: var(--td-ink); font-size: 14px; font-weight: 600; line-height: 1.65; }
.td-page .ticket-subject:hover { color: var(--td-blue); text-decoration: underline; text-underline-offset: 3px; }
.ticket-row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-top: 8px; color: var(--td-muted); font-size: 11px; }
.reply-state { display: inline-flex; align-items: center; gap: 5px; }
.ticket-status { display: inline-flex; justify-content: center; align-items: center; min-height: 29px; padding: 3px 11px; border-radius: 8px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.ticket-status--open { color: #2856a3; background: #e9efff; }
.ticket-status--closed { color: #526178; background: #edf0f4; }
.ticket-agent { display: flex; align-items: center; gap: 9px; font-size: 12px; line-height: 1.4; }
.ticket-agent small { display: block; margin-top: 4px; color: var(--td-muted); font-size: 10px; }
.agent-initial,.agent-pair > span { display: grid; flex: 0 0 auto; width: 30px; height: 32px; place-items: center; background: var(--td-lavender); border-radius: 10px; font-size: 9px; font-weight: 650; }
.agent-pair { display: flex; flex: 0 0 auto; }
.agent-pair > span + span { margin-left: -12px; border: 2px solid white; background: var(--td-peach); }
.agent-unassigned { color: var(--td-muted); }
.ticket-pagination { display: flex; align-items: center; gap: 20px; padding: 20px 0; border-top: 1px solid var(--td-line); }
.ticket-page-size { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--td-muted); }
.ticket-page-size .form-select { width: 76px; min-height: 44px; border: 1px solid var(--td-line); border-radius: 10px; color: var(--td-ink); font-size: 12px; }
.ticket-pagination > p { margin-left: auto; font-size: 12px; color: var(--td-muted); }
.ticket-page-buttons { display: flex; align-items: center; gap: 6px; padding: 3px; background: #f2f4f7; border-radius: 12px; font-size: 12px; }
.ticket-page-buttons .btn { width: 40px; height: 40px; border: 0; border-radius: 9px; }
.ticket-page-buttons .btn[aria-disabled="true"] { color: #8893a5; cursor: default; }
.ticket-page-buttons .btn:not([aria-disabled="true"]):hover { background: white; }
.ticket-empty { padding: 48px 24px; text-align: center; }
.ticket-empty > .stat-icon { margin-bottom: 20px; }
.ticket-empty h3 { font-size: 22px; margin-bottom: 12px; }
.ticket-empty p { color: var(--td-muted); margin-inline: auto; font-size: 14px; }
.ticket-empty .td-button { margin-top: 20px; }
.ticket-bottom-help { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 36px; padding: 28px 32px; border-radius: 18px; background: var(--td-mist); }
.ticket-bottom-help h3 { font-size: 18px; }
.ticket-bottom-help p { margin-top: 8px; color: var(--td-muted); font-size: 13px; }
.ticket-heading-meta { display: flex; gap: 12px 20px; align-items: center; flex-wrap: wrap; margin-top: 24px; color: var(--td-muted); font-size: 12px; }
.ticket-detail-hero .ticket-heading h1 { font-size: clamp(30px,3.3vw,44px); max-width: 26ch; }
.ticket-detail-layout { display: grid; grid-template-columns: minmax(0,1fr) 288px; align-items: start; gap: 48px; }
.ticket-conversation { min-width: 0; }
.ticket-detail-layout.ticket-not-found { grid-template-columns: minmax(0,1fr); }
.ticket-not-found .ticket-conversation { width: 100%; max-width: 720px; margin-inline: auto; }
.conversation-count { color: var(--td-muted); font-size: 12px; }
.conversation-message { padding: 28px; border: 1px solid var(--td-line); border-radius: 18px; }
.conversation-message + .conversation-message { margin-top: 20px; }
.message-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.message-avatar { display: grid; width: 42px; height: 46px; flex: 0 0 auto; place-items: center; border-radius: 14px 14px 6px 14px; background: var(--td-lavender); font-size: 13px; font-weight: 650; }
.message-avatar--agent { background: var(--td-mint); }
.message-heading h3 { font-size: 14px; letter-spacing: -.015em; }
.message-heading h3 span { margin-left: 7px; padding: 3px 7px; border-radius: 5px; color: #28654b; background: #d9efdf; font-size: 10px; font-weight: 500; letter-spacing: 0; }
.message-heading p { margin-top: 6px; color: var(--td-muted); font-size: 11px; }
.message-content { color: var(--td-muted); font-size: 14px; line-height: 1.9; overflow-wrap: anywhere; }
.message-content h4 { margin-bottom: 12px; font-size: 18px; }
.message-content strong { color: var(--td-ink); font-weight: 600; }
.message-attachments { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--td-line); }
.message-attachments h4 { margin-bottom: 12px; font-size: 12px; font-weight: 600; letter-spacing: 0; }
.message-attachments h4 span { margin-left: 4px; color: var(--td-muted); font-weight: 400; }
.attachment-list { display: flex; flex-wrap: wrap; gap: 8px; }
.td-page .attachment-button { display: inline-flex; gap: 8px; align-items: center; min-height: 42px; padding: 9px 12px; border: 1px solid var(--td-line); border-radius: 9px; color: var(--td-muted); background: white; font-size: 11px; overflow-wrap: anywhere; text-align: left; }
.td-page .attachment-button:hover { color: var(--td-blue); border-color: #bdcbee; }
.attachment-button i { font-size: 15px; }
.agent-message { background: #f6f9ff; border-color: #e3eaf8; }
.ticket-activity { display: flex; gap: 13px; align-items: start; margin: 28px 0; padding: 0 16px; color: var(--td-muted); font-size: 11px; line-height: 1.8; }
.activity-avatar { display: grid; width: 28px; height: 30px; flex-shrink: 0; place-items: center; background: #eff2f5; border-radius: 10px; font-size: 8px; font-weight: 600; }
.ticket-activity strong { color: var(--td-ink); font-weight: 500; }
.ticket-activity span:not(.activity-avatar) { display: block; margin-top: 5px; color: var(--td-muted); font-size: 10px; }
.reply-rating { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 16px; margin-top: 22px; padding-top: 18px; border: 0; border-top: 1px solid var(--td-line); }
.reply-rating legend { float: none; width: auto; margin: 0; color: var(--td-muted); font-size: 11px; }
.rating-options { display: flex; }
.rating-options input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rating-options label { display: grid; width: 35px; height: 44px; place-items: center; color: #8b97ab; cursor: pointer; border-radius: 6px; }
.rating-options label.is-selected { color: #c78100; }
.rating-options label:hover { background: #e8eefc; }
.rating-options input:focus-visible + label { outline: 3px solid var(--td-blue); outline-offset: 1px; }
.reply-rating .ticket-action-message { width: 100%; }
.reply-composer { margin-top: 44px; scroll-margin-top: 30px; }
.reply-composer h2 { font-size: 25px; }
.reply-composer .ticket-section-heading { margin-bottom: 12px; }
.reply-intro { margin-bottom: 24px !important; font-size: 14px; color: var(--td-muted); }
.td-inner .add-reply-body .jodit-container { border-radius: 12px; font-family: var(--td-font); }
.td-inner .add-reply-body .jodit-toolbar__box { border-radius: 12px 12px 0 0; }
.td-inner .add-reply-body .jodit-status-bar { border-radius: 0 0 12px 12px; }
.reply-attachment { display: flex; align-items: start; gap: 14px; margin-top: 16px; padding: 20px; border: 1px dashed #c4cfe1; border-radius: 12px; }
.reply-attachment > i { margin-top: 4px; color: var(--td-blue); font-size: 20px; }
.reply-attachment > div { min-width: 0; width: 100%; }
.reply-attachment label { font-size: 13px; font-weight: 600; }
.reply-attachment p { margin-top: 4px; font-size: 12px; color: var(--td-muted); }
.reply-attachment input { margin-top: 12px; max-width: 100%; border-color: var(--td-line); font-size: 12px; }
.reply-attachment.dragover { border-color: var(--td-blue); background: var(--td-mist); }
.selected-files { margin-top: 12px; color: var(--td-muted); font-size: 12px; overflow-wrap: anywhere; }
.selected-files .btn { min-height: 44px; margin-left: 8px; color: var(--td-blue); font-size: 12px; }
.reply-form-actions { display: flex; justify-content: space-between; align-items: center; gap: 28px; margin-top: 24px; }
.reply-form-actions p { max-width: 34ch; color: var(--td-muted); font-size: 11px; }
.reply-form-actions .td-button { flex-shrink: 0; }
.ticket-sidebar { display: grid; gap: 24px; }
.ticket-sidebar .ticket-details { padding: 28px; }
.ticket-sidebar h2 { font-size: 18px; letter-spacing: -.025em; }
.ticket-details dl { margin: 24px 0 28px; }
.ticket-details dl > div + div { margin-top: 20px; }
.ticket-details dt { color: var(--td-muted); font-size: 11px; font-weight: 400; }
.ticket-details dd { margin: 5px 0 0; font-size: 13px; font-weight: 500; }
.ticket-details dd > span:not(.ticket-status) { display: block; margin-top: 3px; color: var(--td-muted); font-size: 11px; font-weight: 400; }
.close-ticket { width: 100%; }
.ticket-sidebar-help .help-icon { display: grid; width: 42px; height: 44px; margin-bottom: 20px; place-items: center; background: white; border-radius: 14px; color: var(--td-blue); font-size: 20px; }
.ticket-sidebar-help p { margin-top: 12px; color: var(--td-muted); font-size: 13px; line-height: 1.9; }
.ticket-sidebar-help .td-link { margin-top: 16px; font-size: 12px; }
.ticket-back-link { justify-content: center; font-size: 12px; }
.td-page .ticket-action-message { margin-top: 16px; padding: 14px 16px; border-radius: 10px; background: var(--td-mist); color: var(--td-ink); font-size: 12px; line-height: 1.8; }
@media (max-width:1100px) {
 .ticket-summary { gap: 10px; }
 .td-page .ticket-stat { gap: 10px; padding: 18px 12px; }
 .ticket-stat .stat-icon { width: 34px; height: 40px; font-size: 16px; }
 .ticket-detail-layout { gap: 28px; grid-template-columns: minmax(0,1fr) 255px; }
 .ticket-list-panel { padding-inline: 18px; }
 .ticket-agent { flex-direction: column; align-items: start; }
}
@media (max-width:800px) {
 .ticket-heading { align-items: start; flex-direction: column; gap: 24px; }
 .ticket-summary { grid-template-columns: repeat(3,minmax(0,1fr)); }
 .ticket-detail-layout { grid-template-columns: minmax(0,1fr); }
 .ticket-sidebar { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
 .ticket-back-link { grid-column: 1 / -1; }
 .ticket-table { display: block; }
 .ticket-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
 .ticket-table tbody { display: block; }
 .ticket-table tr { display: grid; grid-template-columns: 1fr 1fr; column-gap: 24px; row-gap: 10px; padding: 24px 0; border-top: 1px solid var(--td-line); }
 .ticket-table td { display: block; padding: 0; border: 0; font-size: 12px; }
 .ticket-table td:first-child { grid-column: 1 / -1; width: 100%; padding-bottom: 10px; }
 .ticket-table td:nth-child(2) { width: auto; }
 .ticket-table td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 5px; color: var(--td-muted); font-size: 10px; }
 .ticket-agent { flex-direction: row; align-items: center; }
 .ticket-agent .agent-initial,.ticket-agent .agent-pair { display: none; }
 .ticket-agent small { display: inline; margin: 0 0 0 3px; }
 .ticket-bottom-help { flex-direction: column; align-items: start; gap: 12px; }
}
@media (max-width:600px) {
 .ticket-heading h1 { font-size: 35px; }
 .ticket-heading p { font-size: 14px; }
 .ticket-section-heading h2 { font-size: 24px; }
 .ticket-section-heading .td-link { font-size: 12px; }
 .ticket-summary { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-bottom: 28px; }
 .td-page .ticket-stat { padding: 16px 14px; gap: 12px; }
 .ticket-stat strong { font-size: 24px; }
 .ticket-stat:last-child { grid-column: 1 / -1; }
 .ticket-stat:last-child > span:last-child { display: flex; align-items: center; flex: 1; justify-content: space-between; }
 .ticket-stat:last-child strong { margin: 0; }
 .ticket-list-panel { padding-inline: 18px; }
 .ticket-toolbar { flex-direction: column; align-items: stretch; gap: 16px; }
 .ticket-all-filter { align-self: start; }
 .ticket-toolbar-actions { gap: 8px; }
 .ticket-search { min-width: 0; flex: 1; padding: 0 12px; gap: 8px; }
 .ticket-search input { width: 100%; }
 .ticket-toolbar-actions .td-button { padding: 10px; font-size: 12px; gap: 6px; }
 .ticket-filters { flex-direction: column; align-items: stretch; }
 .ticket-pagination { flex-wrap: wrap; gap: 14px; }
 .ticket-pagination > p { margin: 0; order: 3; flex: 1 0 100%; text-align: center; font-size: 11px; }
 .ticket-page-buttons { margin-left: auto; }
 .ticket-page-size { gap: 8px; font-size: 11px; }
 .ticket-page-size .form-select { width: 66px; }
 .ticket-page-buttons .btn { width: 34px; height: 40px; }
 .ticket-bottom-help { padding: 24px; }
 .ticket-bottom-help .td-link { font-size: 12px; }
 .ticket-detail-hero .ticket-heading h1 { font-size: 32px; }
 .ticket-detail-hero .ticket-heading h1 br { display: none; }
 .ticket-heading-meta { margin-top: 20px; gap: 10px 14px; }
 .conversation-message { padding: 22px 20px; }
 .message-content { font-size: 13px; }
 .message-heading { gap: 10px; margin-bottom: 20px; }
 .message-heading h3 { font-size: 13px; }
 .message-heading p { font-size: 10px; }
 .message-avatar { width: 36px; height: 40px; font-size: 11px; }
 .ticket-activity { padding-inline: 4px; }
 .reply-rating { display: block; }
 .rating-options { margin-top: 8px; }
 .reply-form-actions { flex-direction: column; align-items: stretch; gap: 16px; }
 .reply-form-actions p { max-width: 100%; }
 .reply-attachment { padding: 16px; gap: 10px; }
 .ticket-sidebar { grid-template-columns: minmax(0,1fr); }
 .ticket-sidebar .ticket-details { padding: 24px; }
 .ticket-details dl { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
 .ticket-details dl > div + div { margin-top: 0; }
 .ticket-conversation .ticket-section-heading { gap: 10px; }
 .conversation-count { font-size: 11px; white-space: nowrap; }
}
