/* Ticket workspaces use the same list and detail components for both roles. */
.ticket-center {min-width:0;max-width:1500px;margin-inline:auto}
.ticket-center[data-view="detail"] {max-width:1060px}
.ticket-center[data-view="compose"] {max-width:clamp(70rem,86vw,108rem)}
.ticket-center-heading {display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;margin-bottom:16px}
.ticket-center-heading h2 {margin:0;font-size:25px;line-height:1.4;color:#28354c}
.ticket-center-heading[hidden],.ticket-center .ticket-page-surface [hidden] {display:none!important}
.ticket-center-tabs {display:flex;align-items:center;gap:3px;background:#efeff8;border:1px solid #e0e3ef;border-radius:11px;padding:3px}
.ticket-center-tab {display:flex;align-items:center;justify-content:center;gap:7px;border:0;border-radius:8px;background:transparent;color:#53617a;font:inherit;font-size:13px;font-weight:600;min-height:36px;padding:7px 15px;cursor:pointer}
.ticket-center-tab.selected {background:white;color:#5e43bf;box-shadow:0 1px 4px #29365b1c}
.ticket-center-tab svg {width:15px;height:15px}
.ticket-center-layout,.ticket-center-stage,.ticket-center-workspace {min-width:0}
.ticket-center[data-view="compose"] .ticket-center-layout {display:grid;grid-template-columns:minmax(0,1fr);grid-template-areas:"nav" "stage" "guide";gap:14px}
.ticket-center-stage {grid-area:stage}
.ticket-center-nav {grid-area:nav;min-width:0;border:1px solid #dfe4ef;border-radius:14px;background:#fff}
.ticket-group-bar {display:flex;flex-wrap:wrap;gap:4px;padding:6px;border-bottom:1px solid #e7eaf2}
.ticket-group-button {display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:42px;padding:8px 20px;border:0;border-radius:8px;background:transparent;color:#48566e;font:inherit;font-size:15px;font-weight:650;cursor:pointer}
.ticket-group-button svg {width:18px;height:18px;flex:none}
.ticket-group-button[aria-pressed="true"] {color:#5235a8;background:#ede8fb}
.ticket-project-row {display:flex;align-items:baseline;gap:14px;padding:10px 16px}
.ticket-project-options {display:flex;align-items:center;flex-wrap:wrap;gap:4px 6px}
.ticket-project-options[hidden] {display:none}
.ticket-center-category {min-height:35px;padding:6px 12px;text-align:start;border:1px solid transparent;border-radius:8px;font:inherit;font-size:14px;color:#48566e;background:transparent;cursor:pointer}
.ticket-center-category:hover,.ticket-center-tab:hover,.ticket-group-button:hover {background:#f4f2fb}
.ticket-center-category.selected {color:#5735b4;border-color:#cdc0ee;font-weight:600}
.ticket-center :is(.ticket-group-button,.ticket-center-category,.ticket-center-tab,summary):focus-visible {outline:2px solid #7857d9;outline-offset:2px}
.ticket-center-mobile-select {display:none}
.ticket-center .ticket-create-business {padding:0;border:0;border-radius:0;background:transparent;gap:8px}
.ticket-center .ticket-create-business :is(.ticket-customer-state,.ticket-business-note):empty,.ticket-center .ticket-title-preview .hint:empty {display:none}
.ticket-center .ticket-customer-search {align-items:end}
.ticket-center .ticket-binding-lookup-hint,.ticket-center .ticket-business-note {margin:0;padding:0;background:transparent;border:0;font-size:13px;color:#596880;line-height:1.6}
.ticket-center .ticket-title-preview {display:flex;flex-flow:row wrap;align-items:baseline;gap:4px 10px;padding:9px 12px;border:0;border-radius:8px;background:#f7f8fc}
.ticket-center .ticket-title-preview>span {font-size:13px;color:#65728a}
.ticket-center .ticket-title-preview :is(p,strong) {margin:0}
.ticket-center-guide {grid-area:guide;display:flex;align-items:start;justify-content:space-between;gap:12px;padding:0 4px 10px}
.ticket-center-guide-card {font-size:13px;color:#526078;min-width:0}
.ticket-center-guide-card summary {cursor:pointer;font-weight:600;padding:8px 0}
.ticket-center-guide-card h3 {font-size:14px;margin:8px 0}
.ticket-center-guide-card ol {margin:0;padding-inline-start:22px;line-height:1.8}
.ticket-center .ticket-page-surface {display:block!important;position:static;inset:auto;width:100%!important;max-width:none!important;max-height:none!important;overflow:visible!important;height:auto;box-sizing:border-box;margin:0;padding:0;border:1px solid #dfe4ef;border-radius:16px;background:#fff;box-shadow:0 3px 14px #23375c05}
.ticket-page-heading {padding:20px 24px;border-bottom:1px solid #e7eaf2}
.ticket-page-heading h3 {margin:0;color:#32415b;font-size:20px;line-height:1.45}
.ticket-page-heading p {font-size:13px;color:#63718a;line-height:1.7;margin:5px 0 0}
/* The project picker already identifies the active form. Retain a heading for assistive navigation. */
.ticket-page-heading-context {position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);padding:0!important;border:0!important}
.ticket-page-surface .ticket-page-body {display:block;padding:clamp(16px,2.4vw,28px);max-height:none;overflow:visible}
.ticket-page-surface .dialog-actions {position:static;display:flex;justify-content:flex-end;flex-wrap:wrap;gap:8px;padding:16px 0 0;margin-top:12px;border-top:1px solid #e7eaf2;background:none}
.ticket-page-surface .dialog-actions>.btn {min-height:40px}
.ticket-page-surface .form-grid {grid-template-columns:repeat(2,minmax(0,1fr))}
.ticket-page-surface .ticket-file-input {display:none}
.ticket-center-detail-back {margin-bottom:12px}
.ticket-center[data-view="detail"] .ticket-page-surface:has(.ticket-detail-banner)>.ticket-page-heading {display:none}
.ticket-detail-banner {display:flex;align-items:flex-start;justify-content:space-between;flex-wrap:wrap;gap:12px}
.ticket-detail-banner .ticket-detail-summary {min-width:0;flex:1 1 350px}
.ticket-detail-number {color:#65728b;font-size:12px;line-height:1.6;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.ticket-detail-surface .ticket-detail-summary h3 {font-size:clamp(20px,2.4vw,26px);margin:3px 0 9px;line-height:1.4;color:#28354c}
.ticket-detail-surface .ticket-detail-meta {gap:7px 12px;color:#57657d}
.ticket-detail-tools {display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.ticket-detail-surface .ticket-manage {padding:0;border:0;background:none;margin:16px 0 0}
.ticket-detail-surface .ticket-manage:empty {display:none}
.ticket-conversation {margin-top:20px;padding-top:18px;border-top:1px solid #e4e8f1}
.ticket-conversation>h4 {display:flex;align-items:baseline;gap:8px;margin:0;color:#34415a;font-size:16px}
.ticket-conversation>h4 span {font-size:12px;color:#65728a;font-weight:500}
.ticket-detail-surface .ticket-thread {margin:12px 0 20px;gap:10px}
.ticket-detail-surface .ticket-message {width:fit-content;max-width:min(100%,78ch);min-width:min(100%,280px);box-sizing:border-box;align-self:flex-start;padding:12px 16px;border-radius:5px 14px 14px 14px}
.ticket-detail-surface .ticket-message.ticket-message-support {align-self:flex-end;border-radius:14px 5px 14px 14px}
.ticket-detail-surface .ticket-message header {gap:6px 9px}
.ticket-detail-surface .ticket-message time {color:#65718a}
.ticket-detail-surface .ticket-message p {font-size:14px;line-height:1.7;margin-top:7px}
.ticket-detail-surface .ticket-message .ticket-attachments {display:flex;flex-wrap:wrap;margin-top:10px;max-width:100%}
.ticket-detail-surface .ticket-message .ticket-attachments>.ticket-attachment {width:min(190px,100%);max-width:100%}
.ticket-detail-surface .ticket-message :is(pre,table) {max-width:100%;overflow-x:auto}
.ticket-detail-surface .ticket-compose .ticket-textarea {min-height:115px}
.ticket-detail-surface .ticket-mail-panel {margin:16px 0 0}
.ticket-center .ticket-filter-bar {display:grid;grid-template-columns:minmax(14rem,2fr) minmax(9rem,1fr) minmax(9rem,1fr) auto auto;align-items:end;gap:10px;padding:16px}
.ticket-center .ticket-filter-bar>.field:nth-child(n) {width:auto;min-width:0}
.ticket-center .ticket-filter-bar>.field:first-child {grid-column:auto}
.ticket-center .ticket-filter-bar>.btn {grid-column:auto}
.ticket-list-context {display:flex;align-items:center;flex-wrap:wrap;gap:8px 15px;padding:8px 16px;font-size:12px;color:#5c6981}
.ticket-list-context .ticket-scope-hint,.ticket-list-context .ticket-reply-status {margin:0;min-height:0}
.ticket-list-context>.btn {margin-inline-start:auto}
.ticket-center-list-subject,.ticket-center-list-progress,.ticket-center-list-update {display:grid;align-content:start;gap:5px;min-width:0;overflow-wrap:anywhere}
.ticket-center-list-progress {justify-items:start}
.ticket-center-list-subject .ticket-list-reason {min-width:0;max-width:34ch;font-size:12px}
.ticket-center-list-update small {font-size:12px;color:#69768f}
.ticket-center .ticket-table td:last-child {white-space:nowrap}
@media(max-width:1150px) {
  .ticket-center .ticket-filter-bar {grid-template-columns:repeat(2,minmax(0,1fr)) auto auto}
  .ticket-center .ticket-filter-bar>.field:first-child {grid-column:1/-1}
}
@media(max-width:760px) {
  .ticket-group-bar {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:2px;padding:4px}
  .ticket-group-button {min-height:44px;gap:4px;padding:6px 2px;font-size:14px}
  .ticket-group-button svg {width:15px;height:15px}
  .ticket-project-row {align-items:center;gap:10px;padding:8px 12px}
  .ticket-project-list {display:none}
  .ticket-center-mobile-select {display:block;flex:1;min-width:0}
  .ticket-center-heading h2 {font-size:22px}
  .ticket-center-tab,.ticket-center-detail-back .btn,.ticket-detail-tools .btn {min-height:42px}
  .ticket-page-heading {padding:16px}
  .ticket-page-surface .ticket-page-body {padding:15px}
  .ticket-page-surface .form-grid,.ticket-center .ticket-business-summary {grid-template-columns:minmax(0,1fr)}
  .ticket-page-surface :is(.input,.select,.ticket-textarea),.ticket-center-mobile-select {font-size:16px;max-width:100%;box-sizing:border-box}
  .ticket-page-surface .dialog-actions>.btn {min-height:44px}
  .ticket-center .ticket-filter-bar {grid-template-columns:repeat(2,minmax(0,1fr));padding:12px}
  .ticket-center-list-subject .ticket-list-title {min-width:0}
  .ticket-center-list-subject .ticket-list-reason {max-width:none}
  .ticket-detail-surface .ticket-message {min-width:min(100%,15rem);max-width:100%;padding:11px 12px}
  .ticket-detail-surface .ticket-message time {width:auto;margin-inline-start:auto}
  .ticket-center .ticket-business-actions {flex-wrap:wrap}
  .ticket-center .ticket-list-context {padding-inline:12px}
  .ticket-center .ticket-filter-bar>.btn {grid-column:auto;width:100%}
}

.ticket-parties {display:flex;flex-wrap:wrap;gap:12px 28px;margin:12px 0 0}
.ticket-parties dt {font-size:.8rem;color:#596780}
.ticket-parties dd {display:grid;gap:2px;margin:3px 0 0;font-weight:600;overflow-wrap:anywhere}
.ticket-parties small,.ticket-parties .agent-identity small {color:#596780;font-weight:400}

.ticket-center[data-view=compose]:not(.finance-ticket-center) .ticket-center-layout {
  gap:0;border:1px solid var(--line,#dce1ec);border-radius:16px;background:#fff;
}
.ticket-center[data-view=compose] .ticket-center-nav {
  border:0;border-bottom:1px solid var(--line,#dce1ec);border-radius:16px 16px 0 0;box-shadow:none;
}
.ticket-center[data-view=compose]:not(.finance-ticket-center) .ticket-page-surface {
  border:0;background:transparent;box-shadow:none;border-radius:0;
}
.ticket-center[data-view=compose] .ticket-group-bar {padding:7px 12px;gap:6px}
.ticket-center[data-view=compose] .ticket-project-row {background:#f7f8fc;padding:8px 12px}
.ticket-center[data-view=compose] .ticket-center-category.selected {color:#4d319b;background:#fff;border-color:#bba9ed}
.ticket-center[data-view=compose] .ticket-center-guide {
  padding:8px clamp(15px,2.4vw,28px);border-top:1px solid var(--line,#dce1ec);align-items:baseline;
}
.ticket-center .ticket-compose {gap:14px}
.ticket-center .ticket-compose > [role=status]:empty {display:none}
.ticket-center .ticket-compose .ticket-image-composer {
  padding:8px 0;background:transparent;border:0;border-radius:0;
}
.ticket-center .ticket-compose .ticket-image-toolbar {justify-content:flex-start;flex-wrap:wrap;gap:6px 12px}
.ticket-center .ticket-image-toolbar .hint {flex:1 1 210px;color:var(--muted,#637087);line-height:1.5;margin:0}
.ticket-center .ticket-image-count {margin-inline-start:auto;color:var(--muted,#637087);font-variant-numeric:tabular-nums}
.ticket-center .ticket-compose > .dialog-actions {margin:0;padding-top:14px}
.ticket-subject-edit {color:var(--text,#253047);min-width:0;font-size:13px}
.ticket-subject-edit summary {cursor:pointer;line-height:1.6;padding:9px 0;border-top:1px solid var(--line,#dce1ec)}
.ticket-subject-text {margin-inline-start:12px;color:var(--muted,#637087);overflow-wrap:anywhere}
.ticket-subject-edit[open]>.field {margin-top:10px}
@media (max-width:760px) {
  .ticket-center[data-view=compose] .ticket-group-bar {padding:4px;gap:2px}
  .ticket-center[data-view=compose] .ticket-project-row {padding:8px 12px}
  .ticket-project-short .ticket-project-list {display:block}
  .ticket-project-short .ticket-center-mobile-select {display:none}
  .ticket-project-short .ticket-center-category {min-height:44px}
  .ticket-center .ticket-customer-confirm,.ticket-center .ticket-customer-buttons {flex-wrap:wrap}
  .ticket-center .ticket-image-toolbar .hint {order:2;flex-basis:100%}
  .ticket-center .ticket-image-drafts {grid-template-columns:repeat(auto-fill,minmax(80px,1fr))}
}
