.customer-chat{display:grid;grid-template-columns:minmax(230px,310px) minmax(0,1fr);border:1px solid var(--line,#dde4e7);border-radius:20px;background:var(--surface,#fff);overflow:hidden;min-height:60vh}.customer-chat>aside{border-right:1px solid var(--line,#dde4e7);padding:12px;overflow:auto;max-height:75vh}.customer-chat-entry{display:flex;flex-direction:column;gap:7px;padding:16px;border-radius:12px;color:inherit;text-decoration:none;border-bottom:1px solid var(--line,#dde4e7)}.customer-chat-entry:hover,.customer-chat-entry:focus-visible{background:var(--surface-soft,#eff6f5)}.customer-chat-person{display:flex;justify-content:space-between;gap:10px;font-weight:700}.customer-chat-badge{border-radius:20px;padding:2px 8px;background:#126b66;color:#fff;font-size:12px}.customer-chat-preview{overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;font-size:13px}.customer-chat-thread{display:flex;flex-direction:column;min-width:0}.customer-chat-thread>header{padding:20px;border-bottom:1px solid var(--line,#dde4e7)}.customer-chat-thread h2{font-size:18px;margin:0 0 7px}.customer-chat-history{height:52vh;min-height:240px;overflow:auto;padding:22px;background:var(--surface-soft,#f7faf9)}[data-chat-messages]{display:flex;flex-direction:column;gap:14px}.customer-chat-bubble{align-self:flex-start;max-width:85%;padding:12px 16px;border-radius:16px;background:var(--surface,#fff);box-shadow:0 1px 3px #0000000a}.customer-chat-bubble.mine{align-self:flex-end;background:#e2f1ec;color:#173e38}.customer-chat-bubble p{white-space:pre-wrap;overflow-wrap:anywhere;margin:0 0 7px}.customer-chat-bubble time{font-size:11px;opacity:.7}.customer-chat-thread form{padding:18px}.customer-chat-thread form label{display:block;font-size:13px;margin-bottom:8px}.customer-chat-compose{display:flex;gap:12px;align-items:flex-end}.customer-chat-compose textarea{width:100%;resize:vertical;min-height:55px;max-height:180px;border:1px solid var(--line,#ccd8d6);border-radius:12px;padding:12px;background:var(--surface,#fff);color:inherit;font:inherit}.customer-chat-error{color:#a92727;margin:0;padding:0 18px}.customer-chat-error:not(:empty){padding-top:12px}[data-chat-earlier]{margin:0 auto 18px}[data-chat-earlier][hidden]{display:none}@media(max-width:760px){.customer-chat{grid-template-columns:1fr}.customer-chat>aside{max-height:200px;border-right:0;border-bottom:1px solid var(--line,#dde4e7)}.customer-chat-history{height:50vh}.customer-chat-compose{gap:8px}.customer-chat-bubble{max-width:92%}}

.customer-chat-bubble.role-customer{background:#e1f0ff;color:#183b61}.customer-chat-bubble.role-broker{background:#daf2e8;color:#164c3a}.customer-chat-bubble.role-staff{background:#efe5ff;color:#4b2774}.customer-chat-bubble strong{display:block;font-size:12px;margin-bottom:7px}.customer-chat-bubble.joined{align-self:center;text-align:center;max-width:95%;border:1px solid #cab0ec}.customer-chat-bubble.joined strong{display:none}[data-chat-join]{margin-bottom:12px}

/* Shared inbox: a quiet list, bounded history and a composer that stays in view. */
.support-tabs{display:flex;gap:8px;margin:0 0 20px;border-bottom:1px solid var(--line);overflow:auto}.support-tabs a{padding:13px 18px;min-height:44px;color:var(--muted);text-decoration:none;border-bottom:3px solid transparent;white-space:nowrap;font-weight:650}.support-tabs a[aria-current=page]{color:var(--brand);border-color:var(--brand)}.support-hub{display:grid;grid-template-columns:minmax(290px,350px) minmax(0,1fr);height:calc(100dvh - 250px);min-height:520px;max-height:1000px;border:1px solid var(--line);border-radius:20px;overflow:hidden;background:var(--surface)}.support-inbox{min-height:0;display:flex;flex-direction:column;border-right:1px solid var(--line)}.support-filter{padding:18px;border-bottom:1px solid var(--line)}.support-filter label,.support-filter-row label{display:flex;flex-direction:column;gap:6px;font-size:12px;font-weight:600}.support-search{display:flex;align-items:center;border:1px solid var(--line);border-radius:12px;background:var(--surface);margin:7px 0 12px}.support-search input{border:0;background:transparent!important;padding:12px;min-width:0;width:100%;font:inherit;color:inherit;box-shadow:none!important}.support-search:focus-within{outline:2px solid var(--brand);outline-offset:1px}.support-icon{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;border:0;border-radius:12px;background:transparent;color:var(--muted);cursor:pointer}.support-icon:hover:not(:disabled),.support-icon[aria-pressed=true]{background:var(--brand-soft);color:var(--brand)}.support-icon:focus-visible{outline:2px solid var(--brand);outline-offset:2px}.support-icon:disabled{opacity:.45;cursor:default}.support-filter-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}.support-filter select,.support-filter input[type=date]{min-width:0;width:100%;min-height:42px;background:var(--surface);color:inherit;border:1px solid var(--line);border-radius:9px;padding:8px;font:inherit}.support-more-filters{margin-top:12px}.support-more-filters summary{display:flex;align-items:center;gap:7px;min-height:34px;color:var(--muted);font-size:12px;cursor:pointer}.support-more-filters[open] summary{margin-bottom:12px}.support-check{display:flex!important;flex-direction:row!important;align-items:center;gap:10px!important;min-height:44px;font-size:14px!important}.support-check input{width:18px;height:18px;flex-shrink:0;accent-color:var(--brand)}.support-inbox-count{font-size:11px;color:var(--muted);margin:0;padding:12px 18px}.support-inbox-list{flex:1;min-height:0;overflow:auto;padding:0 8px 8px}.support-entry{display:flex;align-items:flex-start;gap:12px;padding:16px 10px;border-radius:12px;text-decoration:none;color:var(--ink);border-bottom:1px solid var(--line)}.support-entry:hover,.support-entry.selected{background:var(--brand-soft)}.support-avatar{width:40px;height:40px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;background:var(--brand-soft);color:var(--brand);font-size:13px;font-weight:750;flex-shrink:0}.support-entry-copy{display:flex;flex-direction:column;gap:7px;min-width:0;flex:1}.support-entry-line{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0}.support-entry-line strong{font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.support-entry-line time,.support-entry-copy small{font-size:11px;color:var(--muted)}.support-entry-line time{flex-shrink:0}.support-preview{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;font-size:12px;color:var(--muted)}.support-status{display:inline-flex;align-items:center;white-space:nowrap;border-radius:20px;padding:3px 8px;font-size:10px;font-weight:650;background:var(--surface-soft);color:var(--muted)}.support-status.pending{background:#fff0cd;color:#835900}.support-status.active{background:#e2f4ed;color:#186a46}.support-status.closed{background:var(--surface-soft);color:var(--muted)}.support-thread{display:flex;flex-direction:column;min-width:0;min-height:0}.support-thread>header{display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap;padding:16px 20px;border-bottom:1px solid var(--line)}.support-thread-identity{display:flex;align-items:center;gap:12px;min-width:0}.support-thread-identity h2{margin:0 0 4px;font-size:17px;line-height:1.3;overflow-wrap:anywhere}.support-thread-identity p{margin:0;font-size:12px;color:var(--muted)}.support-thread-actions{display:flex;gap:6px;align-items:center;flex-wrap:wrap}.support-thread-actions .btn{font-size:12px;min-height:40px;padding:9px 12px}.support-mobile-back{display:none!important}.support-history{flex:1;min-height:150px;overflow:auto;overscroll-behavior:contain;padding:22px;background:var(--surface-soft,#f7faf9)}[data-support-messages]{display:flex;flex-direction:column;gap:16px}.support-history>.btn{margin:0 auto 18px;display:flex}.support-history>.btn[hidden]{display:none}.support-message-top{display:flex;align-items:center;justify-content:space-between;gap:12px}.support-message-top .support-icon{height:32px;width:32px;color:inherit;opacity:.65}.support-message-top strong{margin-bottom:0}.support-message-top+p{margin-top:6px}.support-pinned{background:var(--brand-soft);font-size:13px;max-height:200px;overflow:auto}.support-pinned summary{display:flex;align-items:center;gap:8px;padding:10px 20px;cursor:pointer}.support-pinned article{padding:12px 20px;border-top:1px solid var(--line)}.support-pinned p{white-space:pre-wrap;overflow-wrap:anywhere}.support-composer{padding:14px 18px;background:var(--surface);border-top:1px solid var(--line)}.support-composer textarea{width:100%;display:block;min-height:58px;max-height:160px;resize:vertical;padding:12px 14px;font:inherit;font-size:14px;color:var(--ink);background:var(--surface);border:1px solid var(--line);border-radius:14px}.support-composer textarea:focus{outline:2px solid var(--brand);outline-offset:1px}.support-compose-note,.support-file-hint{font-size:11px;color:var(--muted);line-height:1.5;margin:0 0 9px}.support-file-hint{margin:7px 0 0}.support-composer-tools{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:7px}.support-composer-tools>div{display:flex;align-items:center;gap:3px}.support-character-count{font-size:10px;color:var(--muted);margin-left:5px}.support-send{border-radius:25px;min-height:44px}.support-error{font-size:13px;color:#b42332;line-height:1.5;margin:0;padding:0 16px}.support-error:not(:empty){padding-top:10px;padding-bottom:10px}.support-composer .support-error{padding-left:0;padding-right:0}.support-attachment{display:flex;flex-direction:column;gap:7px;margin:10px 0;min-width:0;max-width:320px}.support-attachment>a{display:flex;align-items:center;gap:8px;color:inherit;overflow-wrap:anywhere;font-size:13px}.support-attachment>a>span{min-width:0}.support-attachment small{display:block;font-size:10px;opacity:.7}.support-attachment img{max-width:100%;max-height:230px;border-radius:10px;object-fit:contain}.support-attachment audio,.support-draft-file audio{width:100%;max-width:300px;height:42px}.support-draft-files{display:flex;gap:10px;overflow:auto}.support-draft-file{position:relative;flex:0 0 180px;padding:10px 38px 10px 10px;margin-bottom:10px;border:1px solid var(--line);border-radius:12px;background:var(--surface-soft);min-width:0;font-size:12px}.support-draft-file>img{max-width:100%;height:80px;border-radius:6px;object-fit:contain;display:block;margin-bottom:5px}.support-draft-file>a{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--brand)}.support-draft-file>small{display:block;font-size:10px;color:var(--muted);margin-top:5px}.support-draft-file>.support-icon{position:absolute;right:2px;top:2px;width:32px;height:32px}.support-emojis{display:flex;gap:4px;flex-wrap:wrap;padding:8px 0}.support-emojis[hidden],.support-recording[hidden]{display:none}.support-emojis button{font-size:23px;width:44px;height:44px;border:1px solid var(--line);border-radius:10px;background:var(--surface);cursor:pointer}.support-recording{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:12px;background:var(--surface-soft);border-radius:12px;font-size:12px}.support-recording>span{flex:1;min-width:120px}.support-department-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:20px}.support-department-card{padding:24px}.support-department-card header{display:flex;align-items:center;justify-content:space-between}.support-department-card h2{font-size:20px;margin:18px 0 8px}.support-department-card p,.support-management-note{font-size:14px;line-height:1.6;color:var(--muted)}.support-management-note{margin:0 0 22px;max-width:75ch}.support-department-card .btn{margin-top:10px}.support-member-picker{border:1px solid var(--line);border-radius:12px;padding:16px;margin:20px 0;max-height:310px;overflow:auto}.support-member-picker legend{font-weight:650;font-size:14px}.support-member-picker .support-check{border-bottom:1px solid var(--line);padding:8px 0}.support-member-picker small{display:block;color:var(--muted);font-size:12px;margin-top:3px}[data-department-form]>label:not(.support-check),[data-transfer]>label{display:flex;flex-direction:column;gap:8px;margin:16px 0;font-size:14px;font-weight:600}[data-department-form] input:not([type=checkbox]),[data-transfer] select{min-height:46px;border:1px solid var(--line);border-radius:10px;padding:10px 12px;background:var(--surface);color:var(--ink);font:inherit}
[data-theme=dark] .support-status.pending{background:#403720;color:#f3cf83}[data-theme=dark] .support-status.active{background:#203d32;color:#a0e4c4}[data-theme=dark] .customer-chat-bubble.role-customer{background:#213b54;color:#d4e8ff}[data-theme=dark] .customer-chat-bubble.role-broker{background:#203e33;color:#c1f0d9}[data-theme=dark] .customer-chat-bubble.role-staff{background:#3c2d51;color:#ead8ff}[data-theme=dark] .support-error{color:#ff9aa5}
@media(max-width:1050px){.support-hub{grid-template-columns:300px minmax(0,1fr)}.support-thread-actions .btn{font-size:11px}.support-thread>header{padding:14px}.support-history{padding:16px}.support-character-count{display:none}}
@media(max-width:760px){.support-hub{display:flex;flex-direction:column;height:calc(100dvh - 225px);min-height:480px;border-radius:15px}.support-inbox{flex:1;border:0}.support-hub:not(.has-thread) .support-thread{display:none}.support-hub.has-thread .support-inbox{display:none}.support-hub.has-thread .support-thread{flex:1}.support-mobile-back{display:inline-flex!important;min-height:44px!important;font-size:12px;padding:6px!important}.support-mobile-back span{display:none}.support-thread-identity{gap:8px;width:100%}.support-thread-identity h2{font-size:16px}.support-thread-actions{width:100%;gap:4px}.support-thread-actions .btn{min-height:44px!important;font-size:11px;padding:8px}.support-thread>header{gap:8px}.support-history{padding:14px}.support-composer{padding:10px 12px}.support-composer textarea{min-height:50px}.support-composer .support-file-hint{display:none}.support-send{padding:10px 14px}.support-tabs a{padding:12px;font-size:13px}.support-thread .customer-chat-bubble{max-width:95%}.support-attachment{max-width:250px}.support-department-grid{grid-template-columns:1fr}.support-character-count{display:none}}
@media(max-height:650px) and (min-width:761px){.support-hub{height:650px;max-height:none}}
@media(prefers-reduced-motion:reduce){.support-hub *{scroll-behavior:auto!important}}
