.cc-catalog-photo{display:block;max-width:100%;max-height:min(320px,40vh);width:auto;height:auto;object-fit:contain;margin:0 auto}
[hidden]{display:none!important}.sidebar a.nav{text-decoration:none;color:inherit}.cc-tabs{display:flex;gap:8px;border-bottom:1px solid #d9d9d4;margin:0 0 18px;padding-bottom:10px;overflow:auto}.cc-tabs button{white-space:nowrap;background:transparent}.cc-tabs button.selected{background:#1c1c1b;color:#fff}.cc-grid{display:grid;grid-template-columns:minmax(240px,30%) minmax(0,1fr);gap:18px;align-items:start}.cc-inbox{padding:12px}.cc-inbox form{display:grid;gap:8px}.cc-chat{display:block;text-align:left;width:100%;padding:17px 10px;border:0;border-bottom:1px solid #eee;background:transparent;border-radius:0}.cc-chat.selected{background:#f2f3dd;border-left:4px solid #c0ce23}.cc-chat strong,.cc-chat span{display:block}.cc-chat span{font-size:13px;font-weight:400;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:5px;color:#6a6a64}.cc-chat small{display:block;font-weight:400;margin-top:7px}.cc-thread{min-height:490px;overflow:hidden}.cc-thread-head{display:flex;gap:12px;justify-content:space-between;align-items:center;padding:18px;border-bottom:1px solid #e5e5df}.cc-thread-head h2{margin:0;font-size:20px}.cc-thread-head p{font-size:13px;color:#6a6a64;margin:7px 0 0}.cc-actions{display:flex;flex-wrap:wrap;gap:6px}.cc-actions button{font-size:13px;padding:9px}.cc-messages{padding:20px;max-height:55vh;min-height:260px;overflow:auto;display:flex;flex-direction:column;gap:14px;scroll-behavior:auto}.cc-bubble{max-width:85%;padding:12px 15px;border-radius:14px;background:#f1f1eb;align-self:flex-start;overflow-wrap:anywhere}.cc-bubble.out{align-self:flex-end;background:#f0f3cc}.cc-bubble p{white-space:pre-wrap;margin:5px 0 8px;font-size:15px;line-height:1.5}.cc-bubble small{font-size:11px;color:#67675f}.cc-bubble img{max-width:100%;max-height:230px;object-fit:contain;display:block;border-radius:8px;margin-top:8px}.cc-bubble .cc-error{display:block;color:#8f3d25;font-size:12px}#composer{padding:18px;border-top:1px solid #e5e5df}#composer textarea{resize:vertical;min-height:80px;width:100%}.cc-compose-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-top:10px}.cc-file{font-size:13px}.cc-file input{font-size:12px;max-width:220px;display:block}#send-help{font-size:12px;margin-bottom:0}.cc-attachments{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:16px}.cc-attachment{padding:18px}.cc-attachment img{width:100%;height:170px;object-fit:contain;background:#f6f6f1;border-radius:10px}.cc-attachment h3{font-size:17px;margin:14px 0 8px}.cc-attachment p{font-size:13px;color:#68685f}.cc-attachment button{width:100%;margin-top:8px}.cc-detail-image{max-height:300px;max-width:100%;object-fit:contain;display:block;margin:0 auto 18px}.cc-fields{display:grid;grid-template-columns:minmax(110px,1fr) minmax(0,2fr);gap:8px;font-size:14px;margin:18px 0}.cc-fields dt{color:#68685f}.cc-fields dd{margin:0;overflow-wrap:anywhere}.cc-review{border-top:1px solid #ddd;padding-top:18px;display:grid;gap:14px}.cc-review label{display:block}.cc-review input,.cc-review select,.cc-review textarea{width:100%}.cc-paging{display:flex;justify-content:space-between}.cc-file-help{font-size:13px;color:#68685f}#cc-dialog{width:min(720px,calc(100% - 24px))}#dialog-body{padding:20px}#notice{font-size:14px}#connection{font-size:12px}#new-test{margin-top:12px;width:100%}
@media(max-width:1050px){.cc-grid{grid-template-columns:240px minmax(0,1fr)}.cc-thread-head{display:block}.cc-actions{margin-top:12px}.heading{gap:12px;flex-wrap:wrap}}
@media(max-width:760px){.cc-grid{grid-template-columns:1fr}.cc-inbox{max-height:300px;overflow:auto}.cc-inbox form{grid-template-columns:1fr 1fr}.cc-inbox form input{grid-column:1/-1}.cc-messages{max-height:55vh;padding:14px}.cc-bubble{max-width:94%}.cc-thread{min-height:300px}.topbar{padding:14px;gap:10px}.topbar>a{font-size:13px}.cc-tabs button{font-size:13px;padding:10px}#workspace{padding:18px 14px}.heading h1{font-size:28px}.cc-compose-actions{align-items:start}.cc-file input{max-width:190px}.cc-attachments{grid-template-columns:1fr}.cc-inbox .cc-chat{padding:12px 8px}}

.cc-audio{width:100%;max-width:100%}.cc-ocr{white-space:pre-wrap;overflow-wrap:anywhere}

/* Inbox and thread scroll independently; composer always remains available. */
.conversations-page .heading{flex-wrap:nowrap}
.conversations-page .cc-tabs{margin:0 0 10px;padding-bottom:8px;gap:6px;flex-shrink:0}
.cc-tabs button{font-size:13px;min-height:35px;padding:6px 12px}
.cc-grid{grid-template-columns:minmax(270px,29%) minmax(0,1fr);gap:12px;align-items:stretch}
.cc-grid>.panel{margin:0;min-width:0}
.cc-inbox{padding:0;display:flex;flex-direction:column;min-height:0}
.cc-inbox form{padding:10px;grid-template-columns:minmax(0,1fr) auto;gap:6px;flex-shrink:0;border-bottom:1px solid #e5e9e3}
.cc-inbox form input{grid-column:1 / -1;min-width:0;font-size:14px}
.cc-inbox form select{min-width:0;font-size:13px}.cc-inbox form button{font-size:13px}
#chats{overflow-y:auto;overscroll-behavior:contain;flex:1;min-height:0}
.cc-chat{padding:9px 12px;line-height:1.4;min-height:76px;border-left:3px solid transparent;min-width:0}
.cc-chat.selected{background:#e5f3ef;border-left:3px solid #258d88}
.cc-chat:hover{background:#f1f7f3}.cc-chat strong{font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cc-chat.requires-attention{background:#fff3dc;border-left-color:#cf8618}
.cc-chat.requires-attention:hover,.cc-chat.requires-attention.selected{background:#ffebc3;border-left-color:#a46409}
.cc-chat.requires-attention .cc-mode{color:#7b4806;font-weight:700}
.cc-tabs [data-conversation-count]{display:inline-flex;align-items:center;justify-content:center;min-width:22px;border-radius:7px;background:#a85b12;color:#fff;font-size:11px;line-height:1.4;padding:2px 5px;margin-left:3px}
.cc-chat .cc-preview{font-size:13px;margin-top:2px}
.cc-chat .cc-chat-meta{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:2px 8px;margin-top:4px;font-size:11px;line-height:1.3}
.cc-chat .cc-mode{font-size:11px;line-height:1.3;margin:0;max-width:100%;white-space:normal}
.cc-mode.mode-waiting,.cc-mode.needs-attention{color:#8a4e0a;font-weight:650}.cc-mode.mode-human{color:#176c65;font-weight:600}
.cc-chat time{color:#68736d;white-space:nowrap}.cc-paging{padding:4px 8px;flex:none}
.cc-paging:not(:has(button:not([hidden]))){display:none}
.cc-thread{display:flex;flex-direction:column;min-height:0;overflow:visible}
#thread{display:flex;flex-direction:column;min-height:0;flex:1}
.cc-thread-head{display:flex;padding:10px 14px;gap:10px;align-items:center;flex-shrink:0;position:relative}
.cc-thread-head>div:first-child{min-width:0;flex:1}
.cc-thread-head h2{font-size:18px;line-height:1.3;overflow-wrap:anywhere}
.cc-thread-head p{font-size:12px;margin:3px 0 0;overflow-wrap:anywhere}
.cc-actions{gap:6px;align-items:center;margin:0;flex-shrink:0}
.cc-actions>button{font-size:13px;padding:7px 10px}
.cc-thread-head #history-notice{font-size:11px;margin-top:5px;padding:5px 8px;max-width:650px}
.cc-messages{flex:1;min-height:80px;max-height:none;padding:14px;gap:9px;overscroll-behavior:contain}
.cc-bubble{padding:9px 12px;border-radius:11px;max-width:87%;flex-shrink:0}
.cc-bubble p{font-size:15px;line-height:1.45;margin:3px 0 5px}
.cc-bubble img{max-height:200px}.cc-bubble .quiet:has(img){padding:0;background:transparent;min-height:0}
#composer{padding:10px 14px;flex-shrink:0;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px 10px;border-radius:0 0 11px 11px;background:#fff}
#composer-label{grid-column:1 / -1;font-size:12px;margin:0;color:#58655e;font-weight:600}
#composer textarea{min-height:58px;max-height:130px;resize:vertical;padding:8px 10px;font-size:15px}
.cc-compose-actions{margin:0;align-items:end;justify-content:flex-end;gap:6px}
.cc-compose-actions label{margin:0}.cc-compose-actions:has(label:not([hidden])){grid-column:1 / -1;justify-content:space-between}
#send-help{grid-column:1 / -1;font-size:11px;margin:0;line-height:1.35}
#older{font-size:11px;margin:0;padding:4px 14px;flex:none}
.cc-back{display:none}
.cc-attachments{grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:12px}
.cc-attachment{padding:12px}.cc-attachment img{height:130px}.cc-attachment h3{font-size:15px;margin:9px 0 5px}
.cc-attachment p{margin:5px 0}.cc-attachment button{margin-top:6px}
#new-test{margin:0;padding:8px;border-radius:0;flex:none}
@media(min-width:761px){
 .conversations-page .main{height:100dvh;min-height:0;display:flex;flex-direction:column}
 .conversations-page .topbar{flex:none}
 #workspace{display:flex;flex-direction:column;flex:1;min-height:0;margin:0;padding-bottom:14px;width:100%}
 #workspace>.heading,#workspace>#notice{flex-shrink:0}
 #chat-area{flex:1;min-height:0}
 #attachments-area{overflow:auto;min-height:0}
 .conversations-page footer{display:none}
 .cc-thread .empty{margin:auto}
}
@media(min-width:761px) and (max-width:1100px){
 .cc-grid{grid-template-columns:260px minmax(0,1fr);gap:10px}
 .conversations-page .heading p{max-width:300px}
 .conversations-page .heading h1{font-size:24px}
 .workspace-tools{gap:5px}.workspace-tools>button{font-size:13px}
 .cc-thread-head{align-items:start;flex-wrap:wrap}.cc-thread-head>div:first-child{flex-basis:100%}
 .cc-actions{justify-content:flex-end;width:100%}.cc-thread-head h2{font-size:17px}
}
@media(max-width:760px){
 #workspace{padding:12px 10px}.conversations-page .heading{flex-wrap:wrap;gap:8px}
 .conversations-page .heading>div:first-child{width:100%}.conversations-page .heading p{display:none}
 .workspace-tools{width:100%;justify-content:space-between}.workspace-tools button{font-size:13px}
 .cc-tabs{margin-bottom:8px!important;padding-bottom:6px!important}.cc-tabs button{min-height:40px;font-size:12px;padding:7px 10px}
 .conversations-page .topbar{height:auto;min-height:50px;padding:5px 10px;gap:5px}
 .conversations-page .topbar>a{font-size:12px;white-space:nowrap}.conversations-page .top-actions{gap:2px;justify-content:flex-end}
 #connection{display:none}.conversations-page .top-actions .quiet{font-size:12px;padding:5px}
 .cc-grid{display:block}.cc-inbox{max-height:none;height:calc(100dvh - 267px - env(safe-area-inset-bottom));min-height:260px}
 .cc-inbox form{padding:8px;grid-template-columns:minmax(0,1fr) auto}.cc-inbox form input{font-size:16px}
 .cc-inbox form select,.cc-inbox form button{min-height:44px}
 .cc-inbox .cc-chat{padding:9px 11px;min-height:76px}
 .cc-grid:not(.thread-open) .cc-thread{display:none}
 .cc-grid.thread-open .cc-inbox{display:none}
 .cc-grid.thread-open .cc-thread{display:flex;height:calc(100dvh - 267px - env(safe-area-inset-bottom));min-height:400px}
 .cc-back{display:flex;align-self:flex-start;min-height:40px;font-size:13px;padding:7px 12px}
 .cc-thread-head{padding:8px 12px;display:flex;align-items:start;flex-wrap:wrap;gap:8px}
 .cc-thread-head h2{font-size:17px}.cc-thread-head>div:first-child{flex-basis:100%}
 .cc-actions{gap:6px;margin:0}.cc-actions>button,.cc-actions summary{min-height:40px;font-size:12px}
 .cc-actions .compact-menu-body{right:auto;left:0}
 .cc-messages{padding:10px;max-height:none;min-height:70px;gap:8px}
 .cc-bubble{max-width:95%;padding:8px 11px}.cc-bubble p{font-size:15px}
 #composer{padding:8px 10px;gap:4px 8px}#composer textarea{font-size:16px;min-height:56px}
 #send{min-height:44px;padding:8px 12px}.cc-compose-actions{align-items:end}
 .cc-attachments{grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:8px}
 .cc-attachment{padding:10px}.cc-attachment img{height:120px}
 .conversations-page footer{display:none}
}

/* Two-line conversation entries keep status and time visible beside the preview. */
.cc-inbox .cc-chat{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:3px 10px;padding:9px 11px;min-height:58px;align-items:center}
.cc-chat>strong{grid-column:1;grid-row:1;line-height:1.3}
.cc-chat .cc-preview{grid-column:1;grid-row:2;margin:0;line-height:1.3}
.cc-chat .cc-chat-meta{display:contents}
.cc-chat .cc-mode{grid-column:2;grid-row:1;max-width:135px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:right}
.cc-chat time{grid-column:2;grid-row:2;font-size:11px;text-align:right}
@media(max-width:760px){
 .cc-inbox{height:calc(100dvh - 294px - env(safe-area-inset-bottom))}
 .cc-inbox .cc-chat{min-height:64px;padding:10px 11px}
 #workspace:has(.thread-open)>.heading,#workspace:has(.thread-open)>.cc-tabs{display:none}
 .cc-grid.thread-open .cc-thread{height:calc(100dvh - 140px - env(safe-area-inset-bottom));min-height:300px}
 .cc-actions>button,.cc-actions summary{min-height:44px}
}

/* Compact source logos in the inbox and selected conversation. */
.cc-chat .cc-chat-title,#chat-name{display:flex;align-items:center;gap:7px;min-width:0}
.cc-chat .cc-chat-name{display:block;min-width:0;margin:0;font-size:inherit;font-weight:inherit;color:inherit;overflow:hidden;text-overflow:ellipsis}
.cc-chat .cc-channel-icon,.cc-channel-icon{display:inline-flex;align-items:center;justify-content:center;flex:0 0 20px;width:20px;height:20px;margin:0;overflow:visible;vertical-align:middle;border-radius:5px;color:#64746d}
.cc-channel-icon svg{display:block;width:20px;height:20px}
.cc-chat .cc-channel-whatsapp,.cc-channel-whatsapp{color:#159b4b}
.cc-chat .cc-channel-facebook,.cc-channel-facebook{color:#087cff}
.cc-chat .cc-channel-instagram,.cc-channel-instagram{background:linear-gradient(35deg,#ffbd55,#e1306c 48%,#833ab4);color:white}
#chat-name>span:last-child{min-width:0;overflow-wrap:anywhere}

/* Small-team inbox: one owner, internal notes and a compact handoff. */
.cc-owner{color:#393a30!important;font-size:12px!important}
#assignee-filter{min-width:0;width:100%}
.cc-composer-top{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:0}
.cc-compose-actions #as-client-label{display:flex;align-items:center;gap:7px;font-size:12px}
.cc-compose-actions #as-client{width:18px;height:18px;min-height:18px;margin:0;flex:none}
.cc-composer-top label{margin:0;font-size:13px}
#composer-mode{font-size:12px;padding:7px 9px;max-width:230px}
#composer.is-note{background:#fff8e6;border-color:#e7cc83}
#message-note{width:100%;min-height:66px;resize:vertical;background:#fffdf6}
.cc-internal{align-self:stretch;background:#fff6db;border:1px solid #ead59c;border-radius:9px;padding:10px 13px;overflow-wrap:anywhere}
.cc-internal small{font-size:11px;color:#706040}
.cc-internal p{margin:5px 0;white-space:pre-wrap;font-size:14px}
.cc-event{background:#f5f5f1;border:0;padding:7px 12px}
.cc-event p{font-size:12px}
.cc-handoff{flex-shrink:0;background:#f5f6e7;border-bottom:1px solid #dce1af;padding:9px 14px;font-size:12px;max-height:32vh;overflow:auto}
.cc-handoff summary{cursor:pointer;list-style:disclosure-closed}
.cc-handoff[open] summary{list-style:disclosure-open}
.cc-handoff summary strong{font-size:11px;color:#50572b}
#handoff-reason{display:block;margin:3px 0 0 12px;font-size:13px;color:#292c22}
#handoff-body p{margin:10px 0;line-height:1.5;overflow-wrap:anywhere}
@media(max-width:760px){.cc-composer-top label{display:none}#composer-mode{max-width:100%;width:100%}.cc-handoff{max-height:29vh;padding:8px 12px}.cc-actions button{font-size:12px}.cc-owner{font-size:11px!important}}

.cc-chat>.cc-owner{grid-column:1/-1;grid-row:3;margin:1px 0 0}

/* Full-height chat: navigation and workspace tools stay in the left column. */
#composer{padding:6px 12px;gap:4px 10px}
#composer-mode{min-height:36px;padding:5px 8px}
#composer textarea{height:52px;min-height:52px;max-height:130px}
#send-help:empty{display:none}
.cc-thread-head{padding:8px 12px}
.cc-messages{padding:10px 12px;gap:7px}
.cc-bubble{padding:7px 11px}
.cc-handoff{padding:6px 12px}
#handoff-reason{display:inline;margin:0 0 0 8px}
@media(min-width:761px){
 .conversations-page .main:has(#workspace:not([hidden])){height:100dvh;min-height:0;display:grid;grid-template-columns:minmax(290px,29%) minmax(0,1fr);grid-template-rows:auto auto auto minmax(0,1fr);gap:8px 12px;padding:8px 14px}
 .conversations-page .main:has(#workspace:not([hidden]))>.topbar{grid-column:1;grid-row:1;height:auto;min-height:0;padding:0 2px 3px;border:0;background:none}
 .conversations-page .main:has(#workspace:not([hidden]))>.topbar>a{display:none}
 .conversations-page .topbar .top-actions{width:100%;display:flex;flex-wrap:wrap;gap:0 8px;justify-content:flex-start}
 #connection{flex-basis:100%;font-size:11px;line-height:1.4;padding:1px 6px}
 .conversations-page .top-actions .quiet{min-height:32px;padding:4px 6px;font-size:12px}
 #workspace{display:contents}
 #workspace>.heading{grid-column:1;grid-row:1;margin:0;min-height:0;min-width:0}
 #workspace>.heading>div:first-child{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 .workspace-tools{width:100%;gap:6px}
 .workspace-tools>button{min-height:36px;padding:6px 10px;font-size:12px;flex:1}
 .workspace-tools summary{padding:6px 8px;font-size:12px}
 .workspace-tools .compact-menu-body{left:0;right:auto}
 #workspace>.cc-tabs{grid-column:1;grid-row:2;display:flex;gap:4px;margin:0;padding:0 0 2px;border:0;min-width:0}
 #workspace>.cc-tabs button{padding:6px 8px;min-height:36px;font-size:12px;flex:1}
 #workspace>#notice{grid-column:1;grid-row:3;margin:0;padding:8px 10px;font-size:12px;line-height:1.4;max-height:18vh;overflow:auto}
 #chat-area{display:contents}
 .cc-inbox{grid-column:1;grid-row:4;height:auto;min-height:0}
 .cc-thread{grid-column:2;grid-row:1/5;height:auto;min-height:0}
 #attachments-area{grid-column:2;grid-row:1/5;min-height:0;overflow:auto;margin:0}
 #composer{grid-template-columns:170px minmax(0,1fr) auto;align-items:center}
 .cc-composer-top{grid-column:1;grid-row:1;min-width:0}
 #composer-label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 #composer-mode{width:100%;max-width:none}
 #composer textarea{grid-column:2;grid-row:1}
 .cc-compose-actions,.cc-compose-actions:has(label:not([hidden])){display:contents}
 #send{grid-column:3;grid-row:1;min-height:40px;padding:8px 12px}
 #send-help{grid-column:1/-1;grid-row:2}
 #file-label{grid-column:1/3;grid-row:2}
 #as-client-label{grid-column:3;grid-row:2;max-width:150px}
 #composer:has(#file-label:not([hidden])) #send-help{grid-row:3}
 .cc-thread .empty{margin:auto}
}

/* Configuration is separate from the shared inbox and reuses existing actions. */
.cc-settings-shortcut{display:flex;flex:none;align-items:center;justify-content:center;width:38px;height:38px;color:#50675e;border:1px solid #dce0dc;border-radius:9px;text-decoration:none;background:white}
.cc-settings-shortcut svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8}
.conversations-page .sidebar-foot #connection{font-size:11px;line-height:1.4}
.conversations-page.configuration-view .main:has(#workspace:not([hidden])){display:block;padding:28px;overflow:auto}
.configuration-view #workspace{display:block;padding:0;margin:0;max-width:none}
#settings-area{max-width:1050px;margin:0 auto}
.cc-settings-header{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:24px}
.cc-settings-header h1{font-size:30px;line-height:1.2;letter-spacing:-.8px;margin:6px 0 8px}
.cc-settings-header p{font-size:15px;color:#637069;margin:0}
.cc-settings-header>a{font-size:13px;flex:none}
.cc-settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.cc-setting-card{padding:24px;margin:0;display:flex;align-items:flex-start;flex-direction:column;gap:0}
.cc-setting-kicker{font-size:10px;font-weight:700;letter-spacing:.12em;color:#278079;margin-bottom:10px}
.cc-setting-card h2{font-size:21px;line-height:1.3;letter-spacing:-.4px;margin:0 0 10px}
.cc-setting-card p{font-size:14px;line-height:1.55;color:#647069;margin:0 0 16px}
.cc-setting-card .cc-setting-state{display:inline-flex;padding:4px 10px;border-radius:7px;background:#efefeb;color:#5d6259;font-size:12px;font-weight:600;margin:0 0 12px}
.cc-setting-card .cc-setting-state.is-active{background:#e5f3ef;color:#176c65}
.cc-setting-actions{display:flex;gap:6px;flex-wrap:wrap;margin-top:auto;width:100%}
.cc-setting-actions button,.cc-setting-actions .button{font-size:13px;padding:8px 12px;min-height:42px}
.cc-setting-secondary{font-size:13px;margin-top:15px;color:#176c65}
.cc-channel-status{width:100%;list-style:none;padding:0;margin:0 0 15px}
.cc-channel-status li{display:flex;justify-content:space-between;gap:15px;padding:7px 0;border-bottom:1px solid #edf0eb;font-size:13px}
.cc-channel-status li:first-child{padding-top:0}.cc-channel-status span{color:#637069;text-align:right}
.cc-setting-card .cc-setting-help{font-size:12px;margin:0;color:#69766e}
@media(max-width:760px){
 .cc-settings-shortcut{display:flex;flex:none;align-items:center;justify-content:center;width:44px;height:44px;color:#50675e;border:1px solid #dce0dc;border-radius:9px;text-decoration:none;background:white}
 .cc-tabs{align-items:center}
 .conversations-page.configuration-view .main:has(#workspace:not([hidden])){padding:18px 12px calc(83px + env(safe-area-inset-bottom));overflow:auto}
 .configuration-view #workspace{display:block;flex:none;padding:0}
 .cc-settings-header{align-items:flex-start;flex-direction:column;gap:10px;margin-bottom:18px}
 .cc-settings-header h1{font-size:27px}
 .cc-settings-header>a{padding-left:0}
 .cc-settings-grid{grid-template-columns:1fr;gap:12px}
 .cc-setting-card{padding:20px}
 .cc-setting-actions button,.cc-setting-actions .button{min-height:44px}
}
@media(min-width:761px) and (max-width:1100px){
 #composer{grid-template-columns:minmax(0,1fr) auto}
 .cc-composer-top{grid-column:1/-1;grid-row:1}
 #composer-mode{width:auto;max-width:230px}
 #composer textarea{grid-column:1;grid-row:2}
 #send{grid-column:2;grid-row:2}
 #send-help{grid-row:3}
 #file-label{grid-column:1;grid-row:3}
 #as-client-label{grid-column:2;grid-row:3}
 #composer:has(#file-label:not([hidden])) #send-help{grid-row:4}
}
@media(max-width:760px){
 .conversations-page .main:has(#workspace:not([hidden])){height:100dvh;min-height:0;padding-bottom:calc(67px + env(safe-area-inset-bottom));display:flex;flex-direction:column}
 .conversations-page .topbar{flex:none}
 .conversations-page .main:has(.thread-open)>.topbar{display:none}
 #workspace{display:flex;flex-direction:column;flex:1;min-height:0;width:100%;padding:8px 10px}
 #workspace>.heading,#workspace>.cc-tabs,#workspace>#notice{flex-shrink:0}
 #workspace>#notice{margin:0 0 8px;padding:8px 10px;font-size:12px}
 #chat-area{flex:1;min-height:0}
 .cc-inbox,.cc-grid.thread-open .cc-thread{height:100%;min-height:0}
 #attachments-area{min-height:0;overflow:auto}
 #composer{padding:6px 10px}
 #composer-mode{min-height:44px}
 #composer textarea{height:56px;min-height:56px;font-size:16px}
 .cc-messages{padding:8px 10px}
 .cc-handoff{padding:6px 12px}
}


/* States remain in the inbox, without shortening the message thread. */
.cc-status-filters{display:grid;grid-template-columns:1fr 1fr;gap:3px;padding:8px;flex:none;border-bottom:1px solid #e5e9e3}
.cc-status-filter{justify-content:flex-start;padding:5px;min-height:31px;font-size:11px;border:1px solid transparent;background:transparent;font-weight:500;gap:6px;line-height:1.2;text-align:left}
.cc-status-filter.selected{background:#edf4f1;border-color:#b6d4c9;font-weight:700}
.cc-status-dot{display:inline-flex;flex:none;align-items:center;justify-content:center;min-width:23px;height:23px;border-radius:50%;background:#62736a;color:#fff;font-size:11px;font-weight:750;font-variant-numeric:tabular-nums;padding:0 4px}
.state-attention .cc-status-dot{background:#b57010}.state-conversation .cc-status-dot{background:#168278}.state-waiting_customer .cc-status-dot{background:#397ab1}.state-no_response .cc-status-dot{background:#836397}.state-finished .cc-status-dot{background:#68746e}
.cc-inbox #search{grid-template-columns:minmax(0,1fr) auto}.cc-inbox #query{grid-column:1}.cc-inbox #search>button{grid-column:2;grid-row:1}.cc-inbox #filter,.cc-inbox #assignee-filter,.cc-inbox #tag-filter{grid-column:1/-1;min-height:34px;padding:6px 8px;font-size:12px}.cc-inbox #filter{display:block}
.cc-delivery-task{padding:8px 12px;font-size:12px;background:#fff0cf;color:#7e4b09;border-bottom:1px solid #e8c782;flex:none;max-height:90px;overflow:auto}
#chat-status-change{font-size:11px;max-width:170px;line-height:1.2}
.cc-chat.cc-alert-pulse{outline-offset:-2px}.cc-status-filters .cc-alert-pulse{outline-offset:1px}
@media(max-width:1100px){#chat-status-change{max-width:100px}}

/* Cards use the same state colors as their counters, with text labels retained. */
.cc-chat.state-conversation{--chat-tint:#e7f5f2;--chat-active:#cfece6;--chat-accent:#168278;--chat-ink:#12645d}
.cc-chat.state-waiting_customer{--chat-tint:#eaf2fc;--chat-active:#d5e6fa;--chat-accent:#397ab1;--chat-ink:#255a85}
.cc-chat.state-no_response{--chat-tint:#f2ecf8;--chat-active:#e5d8ef;--chat-accent:#836397;--chat-ink:#694d7b}
.cc-chat.state-finished{--chat-tint:#edf0ee;--chat-active:#dce2de;--chat-accent:#68746e;--chat-ink:#4f5c55}
.cc-chat:is(.state-conversation,.state-waiting_customer,.state-no_response,.state-finished){background:var(--chat-tint);border-left-color:var(--chat-accent)}
.cc-chat:is(.state-conversation,.state-waiting_customer,.state-no_response,.state-finished):is(:hover,.selected){background:var(--chat-active);box-shadow:inset 0 0 0 1px var(--chat-accent)}
.cc-chat:is(.state-conversation,.state-waiting_customer,.state-no_response,.state-finished) .cc-mode{color:var(--chat-ink);font-weight:650}

/* Team image attachments: one compact row, preview only when a file is selected. */
#file-label{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:11px;min-width:0}
#file-label input{max-width:230px;font-size:11px}
.cc-image-preview{grid-column:1/-1;display:flex;align-items:center;gap:10px;min-width:0;padding:6px 8px;background:#f2f5f1;border-radius:8px}
.cc-image-preview img{width:48px;height:48px;object-fit:contain;border-radius:5px}
#image-filename{font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}
#remove-image{flex-shrink:0}
@media(min-width:1101px){#image-preview{grid-row:3}#composer:has(#image-preview:not([hidden])) #send-help{grid-row:4}}
@media(min-width:761px) and (max-width:1100px){#image-preview{grid-row:4}#composer:has(#image-preview:not([hidden])) #send-help{grid-row:5}}
@media(max-width:760px){#file-label{grid-column:1/-1}#image-preview{grid-column:1/-1}}

/* Exact receipt amounts remain distinct from verified payment states. */
.cc-amount-search-help{font-size:11px;color:#4d645d;line-height:1.4;margin:0;padding:7px 10px;border-bottom:1px solid #e1e8e2;background:#f3f7f2}
.cc-receipt-match{font-size:11px!important;color:#235947!important;font-weight:600;background:#e9f2eb;border-radius:5px;padding:4px 6px;white-space:normal!important}
.cc-receipt-search{padding:7px 12px;background:#f0f5ee;border-bottom:1px solid #d9e4d7;flex:0 0 auto;font-size:11px;max-height:150px;overflow:auto}.cc-receipt-search>div{display:flex;gap:6px;flex-wrap:wrap;margin-top:4px}.cc-receipt-search button{font-size:11px;padding:5px 8px;background:white;border:1px solid #d6e0d1;text-align:left}.cc-receipt-search button small{display:block;color:#63725c;font-size:10px;margin-top:2px}

/* Native media stays in the message; originals remain authenticated. */
.cc-bubble .cc-inline-image{display:block;max-width:100%;max-height:340px;object-fit:contain;border-radius:12px}
.cc-bubble .cc-sticker,.cc-sticker{display:block;width:156px;max-width:100%;height:156px;object-fit:contain;background:transparent;border:0}
.cc-inline-audio{display:block;width:290px;max-width:100%;margin:6px 0}
.cc-inline-video{display:block;max-width:100%;width:360px;max-height:400px;border-radius:12px;background:#141414}
.cc-document,.cc-contact,.cc-location{display:grid;gap:6px;padding:14px;border-radius:12px;background:#ffffff12;border:1px solid #8884;color:inherit;text-decoration:none;overflow-wrap:anywhere}
.cc-download{display:inline-block;font-size:12px;margin:6px 8px 2px 0;color:inherit}
.cc-reaction{display:inline-block;border-radius:18px;padding:2px 7px;border:1px solid #8884;background:var(--panel,#fff);font-size:18px;margin:4px 0}
.cc-quote{border-left:3px solid #7eae42;border-radius:4px;margin:6px 0;padding:8px;background:#8881;font-size:12px;max-height:80px;overflow:hidden}
.cc-transcript{font-size:13px;margin-top:8px}.cc-transcript summary{cursor:pointer}.cc-pdf-preview{width:100%;height:55vh;border:0;border-radius:8px}

/* Approved integrated inbox: shared heading, compact actions and full state cards. */
#workspace>.cc-workspace-heading{position:absolute;width:1px;height:1px;min-height:0;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
#cc-inbox-group{--cc-tool-width:88px;display:grid;grid-template-rows:auto minmax(0,1fr);height:100%;min-width:0;min-height:0;overflow:hidden;border:1px solid #dce3dc;border-radius:11px;background:#fff}
#cc-inbox-group>.cc-inbox-header{display:grid;grid-template-columns:minmax(0,1fr) 34px 34px;align-items:center;gap:5px;min-height:46px;padding:6px 8px;margin:0;border:0;border-bottom:1px solid #dce3dc;overflow:visible;background:#fff}
#cc-inbox-group>.cc-inbox-header>[data-section]{justify-content:flex-start;gap:7px;min-height:32px;padding:5px 8px;border:0;border-radius:7px;font-size:13px;line-height:1.3;color:#263d32;background:#fff;min-width:0}
#cc-inbox-group>.cc-inbox-header>[data-section].selected{background:#edf5ef;color:#203b2e}
#cc-inbox-group .cc-search-toggle,#cc-inbox-group .cc-settings-shortcut{display:flex;align-items:center;justify-content:center;width:34px;height:32px;min-height:32px;padding:5px;border:1px solid #dce3dc;border-radius:7px;color:#526d5e;background:#fff}
#cc-inbox-group .cc-search-toggle svg,#cc-inbox-group .cc-settings-shortcut svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
#cc-inbox-group .cc-inbox-body{display:grid;grid-template-columns:var(--cc-tool-width) minmax(0,1fr);min-width:0;min-height:0;overflow:hidden}
#cc-inbox-group .cc-tool-rail{display:flex;flex-direction:column;min-width:0;min-height:0;height:100%;overflow-y:auto;overscroll-behavior:contain;padding:6px 5px;gap:8px;border-right:1px solid #dce3dc;background:#f1f5f1}
#cc-inbox-group .workspace-tools{display:flex;flex-direction:column;align-items:stretch;flex:none;width:auto;min-width:0;gap:5px}
#cc-inbox-group .workspace-tools>button{display:flex;flex-direction:column;justify-content:center;align-items:center;flex:none;width:100%;min-width:0;min-height:39px;padding:5px 2px;gap:3px;border-radius:7px;font-size:10.5px;line-height:1.2;font-weight:600;white-space:normal;overflow-wrap:normal;word-break:normal}
#cc-inbox-group .workspace-tools>button svg{width:14px;height:14px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
#cc-inbox-group .workspace-tools>button span{max-width:100%}
#cc-inbox-group #fulfillment-status{order:1;background:#fff;border:1px solid #d9e3da}
#cc-inbox-group #manual{order:2}
#cc-inbox-group #attention-alerts{order:3}
#cc-inbox-group #attention-alerts::before{content:"";display:block;width:14px;height:14px;flex:none;background:currentColor;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 17h14l-2-3V9a5 5 0 0 0-10 0v5zm5 3h4' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat}
#cc-inbox-group [data-section="attachments"]{order:4;background:#fff}
#cc-inbox-group [data-section="attachments"].selected{background:#203b2e;color:#fff;border-color:#203b2e}
#cc-inbox-group [data-section="test"]{order:5}
#cc-inbox-group #chat-status-filters{display:grid;grid-template-columns:minmax(0,1fr);gap:5px;flex:none;padding:8px 0 1px;border:0;border-top:1px solid #dce3dc}
#cc-inbox-group .cc-status-filter{--cc-state-card:#53675e;position:relative;display:grid;grid-template-columns:minmax(0,1fr);align-content:center;justify-items:center;gap:2px;width:100%;min-height:50px;padding:4px 3px;border:2px solid transparent;border-radius:7px;background:var(--cc-state-card);color:#fff;text-align:center;font-size:11px;line-height:1.15;font-weight:600}
#cc-inbox-group .cc-status-filter.state-attention{--cc-state-card:#975b0b}
#cc-inbox-group .cc-status-filter.state-conversation{--cc-state-card:#137568}
#cc-inbox-group .cc-status-filter.state-waiting_customer{--cc-state-card:#356c9b}
#cc-inbox-group .cc-status-filter.state-no_response{--cc-state-card:#78558f}
#cc-inbox-group .cc-status-filter.state-finished{--cc-state-card:#66736c}
#cc-inbox-group .cc-status-filter .cc-status-dot{display:block;width:auto;min-width:0;height:auto;padding:0;border-radius:0;background:transparent;color:inherit;font-size:16px;line-height:1;font-weight:750}
#cc-inbox-group .cc-status-filter>span:last-child{max-width:100%;font-size:10.5px;line-height:1.15;white-space:normal;overflow-wrap:normal;word-break:normal}
#cc-inbox-group .cc-status-filter:hover{background:var(--cc-state-card);filter:brightness(.94)}
#cc-inbox-group .cc-status-filter.selected{background:var(--cc-state-card);border-color:#ffffffdf;box-shadow:0 0 0 2px #263d33}
#cc-inbox-group .cc-status-filter.selected::after{content:"✓";position:absolute;top:3px;right:3px;font-size:9px;font-weight:700;line-height:1;color:#fff}
#cc-inbox-group .cc-inbox-content{display:flex;flex-direction:column;min-width:0;min-height:0;height:100%;overflow:hidden}
#cc-inbox-group .cc-inbox{display:flex;flex-direction:column;flex:1;height:100%;min-height:0;max-height:none;min-width:0;margin:0;padding:0;border:0;border-radius:0;overflow:hidden}
#cc-inbox-group.cc-search-collapsed #search{display:none}
#cc-inbox-group #attachments-area{flex:1;height:100%;min-height:0;min-width:0;overflow:auto;margin:0;padding:10px}
#cc-inbox-group #attachments-area .toolbar{margin:0 0 10px;gap:8px;font-size:12px;align-items:flex-start}
#cc-inbox-group #attachments-area .toolbar label{display:flex;align-items:center;gap:6px;margin:0;font-size:12px;line-height:1.4}
#cc-inbox-group #show-test{width:16px;height:16px;min-height:16px;flex:none;padding:0}
#cc-inbox-group #reload-files{min-height:32px;padding:5px 8px;font-size:12px}
#cc-inbox-group .cc-paging{border-top:1px solid #e5e9e3;background:#fff}
@media(min-width:1001px){
 .conversations-page:not(.configuration-view) .main:has(#workspace:not([hidden])){display:grid;grid-template-columns:clamp(372px,34vw,540px) minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);gap:8px 12px;height:100dvh;min-height:0;padding:8px 14px;overflow:hidden}
 .conversations-page:not(.configuration-view) #workspace{display:contents}
 .conversations-page:not(.configuration-view) #workspace>#notice{grid-column:1;grid-row:1;margin:0;padding:8px 10px;min-height:0;max-height:18vh;overflow:auto}
 .conversations-page:not(.configuration-view) #cc-inbox-group{grid-column:1;grid-row:2}
 .conversations-page:not(.configuration-view) #chat-area{display:contents}
 .conversations-page:not(.configuration-view) .cc-thread{grid-column:2;grid-row:1/3;height:auto;min-height:0;min-width:0;margin:0}
 .conversations-page:not(.configuration-view) .main:has(#notice[hidden]){grid-template-rows:minmax(0,1fr)}
 .conversations-page:not(.configuration-view) .main:has(#notice[hidden]) #cc-inbox-group,.conversations-page:not(.configuration-view) .main:has(#notice[hidden]) .cc-thread{grid-row:1}
 .conversations-page:not(.configuration-view) .main:has(#attachments-area:not([hidden])){grid-template-columns:minmax(0,1fr)}
}
@media(min-width:1001px) and (max-width:1350px){
 .conversations-page:not(.configuration-view) .cc-thread-head{flex-wrap:wrap;align-items:flex-start;gap:7px}
 .conversations-page:not(.configuration-view) .cc-thread-head>div:first-child{flex-basis:100%}
 .conversations-page:not(.configuration-view) .cc-actions{width:100%;justify-content:flex-end;gap:5px}
 .conversations-page:not(.configuration-view) .cc-actions>button,.conversations-page:not(.configuration-view) .cc-actions summary{font-size:12px;padding:6px 8px;min-height:34px}
}
@media(max-width:1000px){
 .conversations-page:not(.configuration-view) .main:has(#workspace:not([hidden])){display:flex;flex-direction:column;height:100dvh;min-height:0;padding:8px 12px;overflow:hidden}
 .conversations-page:not(.configuration-view) #workspace{display:flex;flex-direction:column;flex:1;height:100%;min-width:0;min-height:0;width:100%;max-width:none;padding:0;margin:0}
 .conversations-page:not(.configuration-view) #workspace>#notice{flex:none;margin:0 0 8px;padding:8px 10px;font-size:12px;max-height:18vh;overflow:auto}
 .conversations-page:not(.configuration-view) #cc-inbox-group{flex:1;height:100%;min-height:0}
 .conversations-page:not(.configuration-view) #chat-area:not(.thread-open){display:none}
 .conversations-page:not(.configuration-view) #workspace:has(#chat-area.thread-open)>#cc-inbox-group{display:none}
 .conversations-page:not(.configuration-view) #chat-area.thread-open{display:flex;flex:1;min-height:0;height:100%}
 .conversations-page:not(.configuration-view) #chat-area.thread-open .cc-thread{display:flex;flex:1;height:100%;min-height:0;min-width:0;margin:0}
 .conversations-page:not(.configuration-view) .cc-back{display:flex;align-self:flex-start;min-height:40px;padding:7px 12px;font-size:13px}
 .conversations-page:not(.configuration-view) .cc-messages{flex:1;min-height:70px;max-height:none}
}
@media(max-width:760px){
 .conversations-page:not(.configuration-view) .main:has(#workspace:not([hidden])){padding:8px 10px calc(75px + env(safe-area-inset-bottom))}
 .conversations-page:not(.configuration-view) .cc-thread-head{min-width:0;flex-wrap:wrap}
 .conversations-page:not(.configuration-view) .cc-thread-head>div:first-child{flex:1 1 100%;min-width:0}
 .conversations-page:not(.configuration-view) .cc-actions{position:relative;flex:1 1 100%;flex-wrap:wrap;width:100%;min-width:0;max-width:100%;justify-content:flex-start}
 .conversations-page:not(.configuration-view) .cc-actions>.compact-menu{position:static;max-width:100%}
 .conversations-page:not(.configuration-view) .cc-actions .compact-menu-body{left:0;right:auto;min-width:0;width:min(260px,100%);max-width:100%}
 #cc-inbox-group{--cc-tool-width:80px}
 #cc-inbox-group>.cc-inbox-header{grid-template-columns:minmax(0,1fr) 32px 32px;gap:4px;min-height:43px;padding:5px 6px}
 #cc-inbox-group>.cc-inbox-header>[data-section]{font-size:13px;gap:5px;padding:5px 6px}
 #cc-inbox-group .cc-search-toggle,#cc-inbox-group .cc-settings-shortcut{width:32px;height:32px}
 #cc-inbox-group .cc-tool-rail{padding:6px 4px;gap:7px}
 #cc-inbox-group .workspace-tools>button{font-size:10px;padding:5px 0;min-height:39px}
 #cc-inbox-group #chat-status-filters{gap:5px;padding-top:7px}
 #cc-inbox-group .cc-status-filter{min-height:50px;padding:4px 0}
 #cc-inbox-group .cc-status-filter>span:last-child{font-size:10px}
 #cc-inbox-group .cc-inbox #query{font-size:16px}
 #cc-inbox-group .cc-inbox #search{padding:7px;gap:5px}
 #cc-inbox-group .cc-inbox #search>select{font-size:12px;min-height:36px}
 #cc-inbox-group .cc-inbox .cc-chat{padding:9px;gap:3px 6px}
 #cc-inbox-group .cc-chat .cc-mode{max-width:106px;font-size:10px}
 #cc-inbox-group .cc-chat time{font-size:10px}
 #cc-inbox-group .cc-attachments{grid-template-columns:minmax(0,1fr)}
}

/* Same operational states, displayed as a CRM board. */
.conversations-page:not(.configuration-view) .main:has(#workspace:not([hidden])){display:flex;flex-direction:column;height:100dvh;min-height:0;padding:18px 20px;overflow:hidden}
.conversations-page:not(.configuration-view) #workspace{display:flex;flex-direction:column;flex:1;height:100%;min-width:0;min-height:0;width:100%;max-width:none;padding:0;margin:0}
.conversations-page:not(.configuration-view) #workspace>#notice{flex:none;margin:0 0 8px;padding:8px 10px;max-height:18vh;overflow:auto}
.conversations-page:not(.configuration-view) #cc-inbox-group{display:flex;flex-direction:column;flex:1;min-height:0;height:100%;border:0;background:transparent;overflow:hidden}
#cc-inbox-group>.cc-inbox-header{background:transparent;border:0;grid-template-columns:minmax(0,1fr) 42px 42px;min-height:46px;padding:0 0 12px;gap:8px}
#cc-inbox-group>.cc-inbox-header>[data-section]{font-size:23px;font-weight:750;padding:0;background:transparent!important;letter-spacing:-.5px}
#cc-inbox-group .cc-search-toggle,#cc-inbox-group .cc-settings-shortcut{width:40px;height:40px;min-height:40px;border-radius:11px;background:#fff}
#cc-inbox-group .cc-inbox-body{display:flex;flex-direction:column;flex:1;min-height:0;gap:14px}
#cc-inbox-group .cc-tool-rail{height:auto;flex:none;overflow:visible;display:flex;flex-direction:row;align-items:center;justify-content:space-between;padding:0 0 12px;border:0;border-bottom:1px solid #dde6df;background:transparent;gap:10px}
#cc-inbox-group .workspace-tools{display:flex;flex-direction:row;flex-wrap:wrap;gap:7px;width:100%;align-items:center}
#cc-inbox-group .workspace-tools>button{display:inline-flex;flex-direction:row;width:auto;min-height:38px;gap:6px;padding:7px 11px;font-size:12px;border-radius:9px}
#cc-inbox-group .workspace-tools>button svg{width:17px;height:17px}
#cc-inbox-group #attention-alerts{margin-left:auto;order:9}
#cc-inbox-group #chat-status-filters{display:none}
#cc-inbox-group .cc-inbox-content{flex:1;min-height:0;height:auto}
#cc-inbox-group .cc-inbox{background:transparent;min-height:0;flex:1;height:auto;max-height:none;overflow:hidden}
#cc-inbox-group .cc-inbox #search{grid-template-columns:minmax(170px,1.3fr) repeat(3,minmax(130px,1fr)) auto;gap:8px;padding:0 0 14px;border:0}
#cc-inbox-group .cc-inbox #search>:is(input,select,button){grid-column:auto;grid-row:auto;min-height:40px;font-size:13px;padding:8px 10px}
.crm-board{display:grid;grid-template-columns:repeat(5,minmax(220px,1fr));gap:12px;flex:1;min-height:0;overflow:auto;overscroll-behavior-x:contain;padding:2px 2px 10px;align-items:stretch;scrollbar-color:#bdcbc3 transparent;scrollbar-width:thin}
.crm-stage{--stage-accent:#64776c;display:flex;flex-direction:column;min-width:0;min-height:0;border:1px solid #dfe7e1;border-top:3px solid var(--stage-accent);border-radius:13px;background:#edf2ee;overflow:hidden}
.crm-stage.state-attention{--stage-accent:#a66b16;background:#f8f1e6}.crm-stage.state-conversation{--stage-accent:#23806b}.crm-stage.state-waiting_customer{--stage-accent:#407ba3;background:#edf2f7}.crm-stage.state-no_response{--stage-accent:#82689c;background:#f3eff6}
.crm-stage-head{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:61px;padding:14px 13px;flex:none}
.crm-stage-head h2{font-size:14px;line-height:1.25;letter-spacing:0;margin:0;font-weight:750;color:#34453b}
.crm-count{display:inline-flex;align-items:center;justify-content:center;min-width:28px;height:27px;padding:0 7px;border-radius:9px;color:var(--stage-accent);background:#fff;font-size:13px;font-weight:750;font-variant-numeric:tabular-nums;flex:none}
.crm-stage-cards{min-height:0;flex:1;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;padding:0 8px 8px;overflow-anchor:none}
#cc-inbox-group .crm-stage .cc-chat{margin:0 0 9px;border:1px solid #dce5dd;border-left:3px solid var(--stage-accent);border-radius:10px;padding:12px;background:#fff;box-shadow:0 2px 3px #283b2e03;min-height:0}
#cc-inbox-group .crm-stage .cc-chat:hover,#cc-inbox-group .crm-stage .cc-chat.selected{background:#fff;box-shadow:0 0 0 2px var(--stage-accent)}
#cc-inbox-group .crm-stage .cc-chat-title{font-size:14px;line-height:1.35;gap:7px}
#cc-inbox-group .crm-stage .cc-chat .cc-preview{white-space:normal;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;font-size:12px;line-height:1.5;color:#58675e;margin-top:8px;overflow-wrap:anywhere}
#cc-inbox-group .crm-stage .cc-chat .cc-mode{display:none}
#cc-inbox-group .crm-stage .cc-chat time{font-size:11px;color:#748078;margin:5px 0 0}
#cc-inbox-group .crm-stage .cc-owner{font-size:11px;margin-top:7px;padding-top:7px;border-top:1px solid #edf0ec;color:#5b6c61}
.crm-empty{font-size:12px;color:#7a887e;text-align:center;border:1px dashed #cdd9cf;border-radius:10px;margin:0;padding:24px 10px}
.crm-stage-pages{display:flex;align-items:center;justify-content:space-between;padding:7px 10px;gap:6px;border-top:1px solid #dce4df;background:#ffffff8c;flex:none}
.crm-stage-pages small{font-size:11px;color:#63756a}.crm-stage-pages button{min-height:32px;width:32px;padding:3px;background:#fff;border:1px solid #d5ded8;border-radius:8px}
/* Native top-layer window keeps all existing conversation tools available. */
body.cc-chat-open{overflow:hidden}
.conversations-page #chat-area.cc-chat-window:not([open]){display:none!important}
.conversations-page #chat-area.cc-chat-window[open]{display:flex!important;position:fixed;inset:0;width:min(1220px,calc(100vw - 64px));max-width:none;height:calc(100dvh - 48px);max-height:none;min-height:0;margin:auto;padding:0;border:1px solid #d3dfd7;border-radius:18px;background:#fff;box-shadow:0 22px 100px #132b3b45;overflow:hidden}
#chat-area::backdrop{background:#152d2880;backdrop-filter:blur(3px)}
.conversations-page #chat-area .cc-thread{display:flex;flex-direction:column;flex:1;min-height:0;height:100%;min-width:0;border:0;border-radius:0;margin:0;overflow:hidden}
.conversations-page #chat-area .cc-back{display:flex;justify-content:space-between;align-items:center;align-self:stretch;min-height:40px;padding:8px 18px;border-radius:0;background:#f5f8f5;border-bottom:1px solid #e2e9e3;font-size:12px;color:#586e60;flex:none}
.cc-back span{font-size:22px;line-height:1}
.conversations-page #chat-area .cc-thread-head{display:flex;flex-wrap:nowrap;align-items:center;padding:16px 20px;gap:14px}
.conversations-page #chat-area .cc-thread-head>div:first-child{flex:1;min-width:0}
.conversations-page #chat-area .cc-thread-head h2{font-size:20px}
.conversations-page #chat-area .cc-actions{width:auto;flex:none;justify-content:flex-end;flex-wrap:wrap;max-width:55%;gap:6px}
.conversations-page #chat-area .cc-actions>button,.conversations-page #chat-area .cc-actions summary{min-height:38px;font-size:12px;padding:8px 10px}
.conversations-page #chat-area .cc-messages{min-height:60px;max-height:none;flex:1;padding:20px 24px;background:#fafcf9;scrollbar-width:thin}
.conversations-page #chat-area .cc-bubble{max-width:min(80%,760px);padding:12px 16px;border-radius:14px}
.conversations-page #chat-area .cc-bubble p{font-size:15px;line-height:1.55}
.conversations-page #chat-area #composer{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px 12px;padding:12px 20px;border-radius:0}
#chat-area .cc-composer-top{grid-column:1/-1;grid-row:auto;display:flex;align-items:center;justify-content:space-between;gap:10px}
#chat-area #composer-mode{min-height:34px;max-width:240px;width:auto;font-size:12px}
#chat-area #composer textarea{grid-column:1;grid-row:auto;height:62px;min-height:62px;max-height:120px;font-size:16px}
#chat-area .cc-compose-actions{display:contents}
#chat-area #send{grid-column:2;grid-row:2;min-height:44px;align-self:stretch}
#chat-area #file-label{grid-column:1;grid-row:3;font-size:11px;display:flex;align-items:center;gap:8px}
#chat-area #as-client-label{grid-column:2;grid-row:3;font-size:11px}
#chat-area #image-preview{grid-column:1/-1;grid-row:auto}
#chat-area #composer #send-help{grid-column:1/-1;grid-row:auto;font-size:11px}
.conversations-page #workspace:has(#chat-area.thread-open)>#cc-inbox-group{display:flex}
@media(max-width:1100px){#cc-inbox-group .cc-inbox #search{grid-template-columns:1fr 1fr}#cc-inbox-group .cc-inbox #query{grid-column:1/-1}.conversations-page #chat-area .cc-thread-head{flex-wrap:wrap}.conversations-page #chat-area .cc-actions{max-width:100%;width:100%;justify-content:flex-start}}
@media(max-width:760px){
 .conversations-page:not(.configuration-view) .main:has(#workspace:not([hidden])){padding:12px 10px calc(75px + env(safe-area-inset-bottom))}
 #cc-inbox-group>.cc-inbox-header>[data-section]{font-size:22px}
 #cc-inbox-group .workspace-tools{flex-wrap:nowrap;gap:5px;overflow:auto;padding:0 1px 2px}
 #cc-inbox-group .workspace-tools>button{font-size:11px;min-height:38px;padding:7px 9px;flex:none}
 #cc-inbox-group #attention-alerts{margin-left:0}
 #cc-inbox-group .cc-inbox-body{gap:10px}#cc-inbox-group .cc-tool-rail{padding-bottom:8px}
 #cc-inbox-group .cc-inbox #search>:is(input,select,button){font-size:16px;min-height:44px}#cc-inbox-group .cc-inbox #search{gap:6px}
 .crm-board{grid-template-columns:repeat(5,minmax(260px,82vw));gap:10px;scroll-snap-type:x proximity}
 .crm-stage{scroll-snap-align:start}.crm-stage-head{min-height:56px}
 .conversations-page #chat-area.cc-chat-window[open]{width:100vw;height:100dvh;inset:0;margin:0;border:0;border-radius:0;max-width:100vw}
 .conversations-page #chat-area .cc-back{padding:calc(8px + env(safe-area-inset-top)) 14px 8px;min-height:44px}
 .conversations-page #chat-area .cc-thread-head{padding:10px 14px;gap:8px;flex:none}.conversations-page #chat-area .cc-thread-head h2{font-size:17px}
 .conversations-page #chat-area .cc-actions{gap:5px}.conversations-page #chat-area .cc-actions>button,.conversations-page #chat-area .cc-actions summary{min-height:38px;font-size:11px;padding:7px 9px}
 .conversations-page #chat-area .cc-messages{padding:12px 10px;min-height:50px}.conversations-page #chat-area .cc-bubble{max-width:94%;padding:10px 12px}
 .conversations-page #chat-area #composer{padding:8px 10px calc(8px + env(safe-area-inset-bottom));gap:5px 8px}
 #chat-area #composer-mode{min-height:36px;max-width:195px;font-size:12px}#chat-area #composer textarea{height:56px;min-height:56px}#chat-area #send{min-width:64px;padding:8px 10px}
 #chat-area #file-label{grid-column:1/-1;gap:4px;font-size:10px}#chat-area #file-label input{max-width:190px;font-size:10px}#chat-area #as-client-label{grid-column:1/-1;grid-row:4;font-size:10px}#chat-area #send-help{font-size:10px!important}
}

/* Cards use their complete width; inherited list columns must not squeeze text. */
#cc-inbox-group .crm-stage .cc-chat{display:flex;flex-direction:column;align-items:stretch;gap:0}
#cc-inbox-group .crm-stage .cc-chat-title{width:100%}
#cc-inbox-group .crm-stage .cc-chat .cc-chat-meta{display:flex;justify-content:flex-end;margin-top:7px}
#cc-inbox-group .crm-stage .cc-chat .cc-order-tag,#cc-inbox-group .crm-stage .cc-chat .cc-receipt-match{white-space:normal;overflow-wrap:anywhere;line-height:1.4;margin-top:7px}
#chat-area #composer .cc-composer-top{grid-row:1}
#chat-area #composer textarea{grid-row:2}
#chat-area #composer #image-preview{grid-row:4!important}
#chat-area #composer #as-client-label{grid-row:5!important}
#chat-area #composer #send-help{grid-row:6!important;margin:0;line-height:1.4}

@media(max-width:760px) and (max-height:600px){
 .conversations-page #chat-area .cc-thread-head{padding:6px 12px;gap:4px}
 .conversations-page #chat-area #history-notice{display:none}
 .conversations-page #chat-area .cc-thread-head p{margin-top:4px;font-size:11px}
 .conversations-page #chat-area #composer{gap:4px 8px}
 .conversations-page #chat-area #composer #file-label{grid-column:1/-1;flex-wrap:nowrap}
 .conversations-page #chat-area #composer #file-title{max-width:140px;font-size:10px}
}

/* Conversation space: keep messages dominant without shrinking their text. */
.conversations-page #chat-area.cc-chat-window[open]{width:calc(100vw - 20px);height:calc(100dvh - 16px);border-radius:12px}
.conversations-page #chat-area .cc-back{position:absolute;top:6px;right:6px;z-index:4;width:44px;height:44px;min-height:44px;padding:0;display:flex;align-items:center;justify-content:center;border:0;border-radius:8px;background:transparent;font-size:0}
.conversations-page #chat-area .cc-back:hover{background:#edf2ed}
.conversations-page #chat-area .cc-back:focus-visible{outline:2px solid #326d52;outline-offset:-3px}
.conversations-page #chat-area .cc-back span{font-size:26px}
.conversations-page #chat-area .cc-thread-head{padding:8px 58px 8px 14px;gap:10px;flex-wrap:nowrap;align-items:center}
.conversations-page #chat-area .cc-thread-head>div:first-child{flex:1 1 auto;min-width:0}
.conversations-page #chat-area .cc-thread-head h2{font-size:18px;line-height:1.25}
.conversations-page #chat-area .cc-thread-head p{margin:2px 0 0;font-size:12px;line-height:1.3}
.conversations-page #chat-area .cc-actions{width:auto;max-width:none;flex:0 0 auto;flex-wrap:nowrap;margin:0;gap:4px}
.conversations-page #chat-area .cc-actions>button,.conversations-page #chat-area .cc-actions summary{min-height:40px;padding:7px 9px;font-size:12px}
.conversations-page #chat-area .cc-handoff{padding:5px 14px}
.conversations-page #chat-area .cc-messages{padding:10px 14px;gap:6px;min-height:50px}
.conversations-page #chat-area .cc-bubble{padding:6px 10px;border-radius:10px;max-width:min(88%,760px)}
.conversations-page #chat-area .cc-bubble p{font-size:15px;line-height:1.4;margin:2px 0 3px}
.conversations-page #chat-area .cc-bubble small{font-size:12px;line-height:1.3}
.conversations-page #chat-area .cc-internal{padding:6px 10px}
.conversations-page #chat-area .cc-internal p{margin:3px 0}
.conversations-page #chat-area #composer{grid-template-columns:168px minmax(0,1fr) auto auto;align-items:center;padding:7px 12px;gap:4px 7px}
.conversations-page #chat-area #composer .cc-composer-top{grid-column:1;grid-row:1;margin:0;min-width:0}
.conversations-page #chat-area #composer-mode{width:100%;max-width:none;min-height:44px;font-size:13px;padding:6px 8px}
.conversations-page #chat-area #composer textarea{grid-column:2;grid-row:1;height:44px;min-height:44px;max-height:120px;padding:10px;font-size:16px;line-height:22px;resize:vertical}
.conversations-page #chat-area #composer .cc-compose-actions{display:contents}
.conversations-page #chat-area #composer #file-label{grid-column:3;grid-row:1;position:relative;display:flex;align-items:center;justify-content:center;width:44px;height:44px;min-width:44px;overflow:hidden;margin:0;padding:0;border:1px solid #dce3dd;border-radius:9px;background:#f8faf7;cursor:pointer}
.conversations-page #chat-area #composer #file-label::before{content:'\1F4CE';font-size:22px;line-height:1}
.conversations-page #chat-area #composer #file-label:focus-within{outline:2px solid #326d52;outline-offset:1px}
.conversations-page #chat-area #composer #file-title{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.conversations-page #chat-area #composer #image{position:absolute;inset:0;width:100%;height:100%;max-width:none;margin:0;padding:0;opacity:0;cursor:pointer}
.conversations-page #chat-area #composer #send{grid-column:4;grid-row:1;min-height:44px;max-width:185px;align-self:stretch;padding:8px 12px;font-size:14px}
.conversations-page #chat-area #composer #image-preview,.conversations-page #chat-area #composer #as-client-label,.conversations-page #chat-area #composer #send-help{grid-column:1/-1;grid-row:auto!important;min-width:0;margin:0}
.conversations-page #chat-area #composer #send-help{font-size:12px!important;line-height:1.35}
.conversations-page #chat-area #composer #image-preview{padding:5px 8px;gap:8px}
.conversations-page #chat-area #image-thumbnail{width:44px;height:44px;object-fit:contain}
@media(max-width:1050px){
 .conversations-page #chat-area .cc-thread-head{flex-wrap:wrap;gap:4px;padding-bottom:6px}
 .conversations-page #chat-area .cc-thread-head>div:first-child{flex-basis:100%}
 .conversations-page #chat-area .cc-actions{width:100%;max-width:100%;justify-content:flex-start;flex-wrap:wrap}
}
@media(max-width:760px){
 .conversations-page #chat-area.cc-chat-window[open]{width:100vw;height:100dvh;border-radius:0}
 .conversations-page #chat-area .cc-back{top:calc(4px + env(safe-area-inset-top));right:4px}
 .conversations-page #chat-area .cc-thread-head{padding:calc(6px + env(safe-area-inset-top)) 10px 4px;gap:3px}
 .conversations-page #chat-area .cc-thread-head>div:first-child{padding-right:42px}
 .conversations-page #chat-area .cc-thread-head h2{font-size:17px}
 .conversations-page #chat-area #chat-state{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .conversations-page #chat-area .cc-actions{gap:2px}
 .conversations-page #chat-area .cc-actions>button,.conversations-page #chat-area .cc-actions summary{min-height:44px;font-size:12px;padding:6px 7px}
 .conversations-page #chat-area .cc-actions summary{width:44px;padding:0;justify-content:center;font-size:0;gap:0}
 .conversations-page #chat-area .cc-actions summary::before{content:'•••';font-size:18px;letter-spacing:1px}
 .conversations-page #chat-area .cc-actions summary::after{display:none}
 .conversations-page #chat-area .cc-messages{padding:8px;gap:5px}
 .conversations-page #chat-area .cc-bubble{max-width:94%;padding:6px 9px}
 .conversations-page #chat-area .cc-handoff{padding:5px 10px}
 .conversations-page #chat-area #composer{grid-template-columns:minmax(0,1fr) 44px auto;padding:5px 8px calc(5px + env(safe-area-inset-bottom));gap:3px 6px}
 .conversations-page #chat-area #composer .cc-composer-top{grid-column:1/3;grid-row:1}
 .conversations-page #chat-area #composer-mode{width:auto;max-width:100%;font-size:16px}
 .conversations-page #chat-area #composer textarea{grid-column:1/3;grid-row:2}
 .conversations-page #chat-area #composer #file-label{grid-column:3;grid-row:1;justify-self:end;flex-wrap:nowrap}
 .conversations-page #chat-area #composer #send{grid-column:3;grid-row:2;min-width:64px;max-width:130px;padding:8px 9px}
}


/* Compact CRM cards: identity/order, last message, owner and timestamp. */
#cc-inbox-group .crm-stage .cc-chat.cc-chat-compact{display:flex;flex-direction:column;align-items:stretch;gap:5px;margin-bottom:6px;padding:8px 9px;min-height:0;border-left-width:2px;border-radius:9px;box-shadow:none;line-height:1.25}
#cc-inbox-group .crm-stage .cc-chat-compact .cc-chat-title{display:flex;align-items:center;gap:5px;min-width:0;font-size:13px;line-height:20px}
#cc-inbox-group .crm-stage .cc-chat-compact .cc-chat-title .cc-channel-icon{width:17px;height:17px;flex:0 0 17px}
#cc-inbox-group .crm-stage .cc-chat-compact .cc-channel-icon svg{width:17px;height:17px}
#cc-inbox-group .crm-stage .cc-chat-compact .cc-chat-name{flex:1;min-width:0;line-height:20px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#cc-inbox-group .crm-stage .cc-chat-compact .cc-card-order{display:flex;align-items:center;gap:3px;flex:none;margin:0;overflow:visible;font-size:11px;line-height:20px}
#cc-inbox-group .crm-stage .cc-chat-compact .cc-order-number{max-width:72px;margin:0;font-size:11px;font-weight:650;color:#52655a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#cc-inbox-group .crm-stage .cc-chat-compact .cc-order-situation{display:inline-flex;align-items:center;justify-content:center;width:23px;height:23px;flex:none;margin:0;border-radius:6px;overflow:visible}
.cc-order-situation svg{width:18px;height:18px;display:block}
#cc-inbox-group .crm-stage .cc-chat-compact .tone-pending{color:#906114;background:#fff3db}
#cc-inbox-group .crm-stage .cc-chat-compact .tone-ready{color:#347080;background:#e8f4f6}
#cc-inbox-group .crm-stage .cc-chat-compact .tone-transit{color:#346ac1;background:#edf3ff}
#cc-inbox-group .crm-stage .cc-chat-compact .tone-complete{color:#277b52;background:#e8f5ed}
#cc-inbox-group .crm-stage .cc-chat-compact .tone-muted{color:#727870;background:#f0f1ef}
#cc-inbox-group .crm-stage .cc-chat-compact .cc-preview{display:block;-webkit-line-clamp:unset;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0;font-size:12px;line-height:17px;color:#66736b}
#cc-inbox-group .crm-stage .cc-chat-compact .cc-card-footer{display:flex;align-items:center;justify-content:space-between;gap:6px;margin:0;min-width:0;font-size:11px;line-height:17px}
#cc-inbox-group .crm-stage .cc-chat-compact .cc-owner{display:flex;align-items:center;gap:4px;flex:1;min-width:0;max-width:none;padding:0;margin:0;border:0;font-size:11px!important;line-height:17px;color:#63756a!important}
#cc-inbox-group .crm-stage .cc-chat-compact .cc-owner svg{width:13px;height:13px;flex:none}
#cc-inbox-group .crm-stage .cc-chat-compact .cc-owner>span{min-width:0;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:inherit;line-height:inherit;color:inherit}
#cc-inbox-group .crm-stage .cc-chat-compact time{flex:none;margin:0;white-space:nowrap;font-size:10px;line-height:17px;font-variant-numeric:tabular-nums;color:#7b867f}
#cc-inbox-group .crm-stage .cc-chat-compact .cc-receipt-match{margin:0;font-size:11px;line-height:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}


/* Operational queue tabs share the Conversations heading. */
#cc-inbox-group .cc-inbox-header{display:flex;align-items:center;gap:8px;flex-wrap:nowrap;overflow-x:auto;min-height:48px;padding-bottom:10px}
#cc-inbox-group .cc-inbox-header>button[data-order-queue]{flex:none;min-height:40px;padding:8px 12px;white-space:nowrap;font-size:13px;border:1px solid #d8e3da;border-radius:9px;background:#fff;color:#53675b}
#cc-inbox-group .cc-inbox-header>button[data-order-queue].selected{color:#22563a;background:#e4f2e8;border-color:#97b9a3}
#cc-inbox-group .cc-inbox-header>button[data-section]{flex:none;white-space:nowrap}
#cc-inbox-group .cc-search-toggle{margin-left:auto;flex:none}
#cc-inbox-group .cc-settings-shortcut{flex:none}
#cc-inbox-group .cc-inbox-body{gap:0}
@media(min-width:761px){
 .conversations-page #chat-area.cc-chat-window[open]{width:calc(50vw - 10px);margin:auto}
 .conversations-page #chat-area .cc-thread-head{flex-wrap:wrap;gap:4px}
 .conversations-page #chat-area .cc-thread-head>div:first-child{flex-basis:100%}
 .conversations-page #chat-area .cc-actions{width:100%;max-width:100%;justify-content:flex-start;flex-wrap:wrap}
 .conversations-page #chat-area #composer{grid-template-columns:minmax(0,1fr) 44px auto}
 .conversations-page #chat-area #composer .cc-composer-top{grid-column:1/3;grid-row:1}
 .conversations-page #chat-area #composer-mode{width:auto;max-width:100%}
 .conversations-page #chat-area #composer textarea{grid-column:1/3;grid-row:2}
 .conversations-page #chat-area #composer #file-label{grid-column:3;grid-row:1;justify-self:end}
 .conversations-page #chat-area #composer #send{grid-column:3;grid-row:2}
}
@media(max-width:760px){
 #cc-inbox-group .cc-inbox-header{gap:6px;min-height:50px;scrollbar-width:thin}
 #cc-inbox-group .cc-inbox-header>button[data-order-queue]{min-height:44px;font-size:12px;padding:8px 10px}
}


/* Three stable conversation actions; writing controls remain at the bottom. */
.conversations-page #chat-area .cc-thread-head{gap:5px;padding-bottom:8px}
.conversations-page #chat-area .cc-chat-toolbar{display:flex;width:100%;max-width:100%;gap:6px;flex-wrap:wrap;justify-content:flex-start}
.conversations-page #chat-area .cc-chat-toolbar>button{font-size:12px;min-height:38px;padding:7px 10px}
#chat-legacy-controls[hidden]{display:none!important}
#cc-dialog.cc-template-manager{width:min(940px,calc(100vw - 24px));max-width:none;max-height:calc(100dvh - 24px);padding:0}
#cc-dialog.cc-template-manager>.dialog-header{position:sticky;top:0;z-index:2;background:#fff;margin:0;padding:16px 20px;border-bottom:1px solid #e0e7e1}
.cc-template-manager #dialog-body{padding:16px 20px}
.ct-nav{display:flex;gap:7px;flex-wrap:wrap;align-items:center;margin-bottom:16px}
.ct-nav button{min-height:40px;padding:8px 12px;font-size:13px}.ct-nav .selected{background:#e4f2e8;border-color:#97b9a3}.ct-nav .ct-new{margin-left:auto}
.ct-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.ct-card{border:1px solid #dfe6df;border-radius:12px;padding:14px;min-width:0;background:#fff}.ct-card h3{font-size:15px;margin:0;overflow-wrap:anywhere}.ct-meta{display:flex;gap:6px;flex-wrap:wrap;margin:7px 0 10px;font-size:12px;color:#65756b}.ct-badge{padding:3px 7px;background:#edf3ee;border-radius:6px}.ct-card p{white-space:pre-wrap;overflow-wrap:anywhere;font-size:14px;line-height:1.5}.ct-card footer{padding:0;margin-top:6px;font-size:12px;color:#68776c}.ct-card button{margin-top:8px}.ct-status{font-size:13px;color:#58695e;white-space:pre-wrap;margin:8px 0}.ct-status.error{color:#a13c2c}
.ct-editor-grid{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:20px}.ct-form{display:flex;flex-direction:column;gap:12px}.ct-form label{display:flex;flex-direction:column;gap:5px;font-size:13px;color:#405347}.ct-form :is(input,select,textarea){width:100%;min-width:0;font-size:15px;min-height:42px;padding:9px 10px;border:1px solid #d5dfd6;border-radius:8px}.ct-form textarea{min-height:150px;resize:vertical;line-height:1.5}.ct-fields{display:grid;grid-template-columns:1fr 1fr;gap:10px}.ct-form small{font-size:12px;color:#68786d}.ct-preview{background:#eef3ee;padding:18px;border-radius:12px;align-self:start}.ct-preview h3{font-size:13px;margin:0 0 14px}.ct-preview-message{background:#fff;border-radius:10px;padding:14px;box-shadow:0 1px 3px #0001}.ct-preview-message p{white-space:pre-wrap;overflow-wrap:anywhere;margin:8px 0;font-size:14px;line-height:1.5}.ct-preview-message small{display:block;color:#7b857e}.ct-form-actions{display:flex;gap:8px;flex-wrap:wrap;padding-top:5px}.ct-form-actions button{min-height:44px}.ct-examples{display:grid;gap:8px}
@media(max-width:760px){
 .conversations-page #chat-area .cc-chat-toolbar{gap:4px;flex-wrap:nowrap}
 .conversations-page #chat-area .cc-chat-toolbar>button{min-height:44px;font-size:12px;padding:6px 8px;flex:1;line-height:1.25}
 #cc-dialog.cc-template-manager{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;border-radius:0;margin:0}
 .cc-template-manager #dialog-body{padding:12px}.ct-list,.ct-editor-grid{grid-template-columns:minmax(0,1fr)}.ct-nav{gap:5px}.ct-nav button{min-height:44px;font-size:12px}.ct-form :is(input,select,textarea){font-size:16px}.ct-fields{grid-template-columns:1fr 1fr}
}

/* Chat actions remain recognizable, and template tabs never resize the dialog. */
.conversations-page #chat-area .cc-chat-toolbar>button{background:#f0f5f1;border:1px solid #aebfb3;border-radius:8px;box-shadow:0 1px 2px #12351d12;color:#254b36;font-weight:650;cursor:pointer;opacity:1}
.conversations-page #chat-area .cc-chat-toolbar>button:hover:not(:disabled){background:#dfece2;border-color:#708f7a}
.conversations-page #chat-area .cc-chat-toolbar>button:focus-visible{outline:2px solid #326d52;outline-offset:2px}
.conversations-page #chat-area .cc-chat-toolbar>button:disabled{background:#f1f2f1;border-color:#d2d9d4;color:#7a857d;cursor:default}
#cc-dialog.cc-template-manager{box-sizing:border-box;min-width:0;width:min(940px,calc(100vw - 24px));height:min(780px,calc(100dvh - 24px));max-height:calc(100dvh - 24px);overflow:hidden}
#cc-dialog.cc-template-manager[open]{display:flex;flex-direction:column}
#cc-dialog.cc-template-manager>.dialog-header{position:static;flex:0 0 auto}
.cc-template-manager #dialog-body{min-height:0;flex:1;overflow-y:auto;scrollbar-gutter:stable}
.ct-recipient{padding:10px 12px;background:#e9f2eb;border:1px solid #c7d8cc;border-radius:8px;font-size:14px;margin:0 0 14px;overflow-wrap:anywhere}
.ct-send-preview img{max-width:100%;max-height:180px;object-fit:contain;border-radius:7px}
.ct-preview-message .ct-preview-buttons{font-size:13px;color:#346c4c;white-space:pre-wrap;border-top:1px solid #e1e7e2;padding-top:10px}
@media(max-width:760px){#cc-dialog.cc-template-manager{width:100vw;min-width:100vw;height:100dvh;max-height:100dvh;margin:0;border-radius:0}.ct-form-actions button{flex:1}}

@media(max-width:760px){.ct-editor-grid:has(#ct-send-form){display:flex;flex-direction:column;gap:12px}.ct-editor-grid #ct-send-form{display:contents}.ct-editor-grid:has(#ct-send-form)>.ct-preview{order:1;align-self:stretch}.ct-editor-grid #ct-send-form .ct-form-actions{order:2}}

/* Service workflow: keep task details collapsed so messages retain the space. */
.cc-service-views{display:flex;gap:6px;align-items:center;padding:8px 10px;flex-wrap:wrap}.cc-service-views button{font-size:12px;padding:6px 9px;border-radius:8px}.cc-service-views button[aria-pressed="true"]{background:#1c1c1b;color:white}.crm-board.single-stage{grid-template-columns:minmax(240px,1fr)}.crm-stage.state-internal{--stage-color:#906012}.cc-service-work{background:#f5f2e9;border-radius:8px;padding:6px 10px;font-size:12px;flex:none;max-height:30vh;overflow:auto}.cc-service-work summary{cursor:pointer;font-weight:600}.cc-service-task{display:grid;gap:5px;padding:9px 0;border-top:1px solid #ded9ca}.cc-service-task small{color:#625e53}.cc-service-task button{justify-self:start}.cc-service-work[hidden]{display:none}.cc-service-work p{margin:6px 0}.cc-chat-toolbar{flex-wrap:wrap}.cc-chat-toolbar button{white-space:nowrap}@media(max-width:600px){.cc-service-views{gap:4px;padding:6px}.cc-service-views button{font-size:11px}.cc-service-work{max-height:25vh}.cc-chat-toolbar button{padding:5px 7px;font-size:11px}}

.cc-chat[draggable="true"]{cursor:grab}.cc-chat.cc-dragging{opacity:.45}.cc-drag-active .crm-stage{outline:1px dashed #b6c9c0;outline-offset:-2px}.cc-drag-active .crm-stage.cc-drop-target{outline:3px solid #26816a;background:#e8f5ee}.cc-chat.cc-move-saving{opacity:.65;cursor:progress;pointer-events:none}.cc-chat.cc-move-saving::after{content:"Guardando movimiento…";display:block;font-size:11px;color:#426252;padding-top:5px}

/* Counts remain visible at zero; native state selection saves immediately. */
#cc-inbox-group .cc-inbox-header>button[data-order-queue]{display:inline-flex;align-items:center;gap:7px}
.cc-queue-count{display:inline-flex;align-items:center;justify-content:center;min-width:21px;height:21px;padding:0 5px;border-radius:7px;background:#eaf0eb;color:#31573e;font-size:11px;font-weight:750;line-height:1;flex:none}
[data-order-queue].selected .cc-queue-count{background:#cfe4d4;color:#20492e}
.cc-actions .cc-state-control{display:inline-flex;align-items:center;gap:6px;margin:0;font-size:12px;color:#53675b;font-weight:600;max-width:100%}
.cc-actions #chat-status-change{width:auto;min-width:160px;max-width:220px;min-height:35px;padding:7px 30px 7px 10px;border:1px solid #c7d2c9;border-radius:8px;background-color:#fff;font:inherit;color:#263e2f;cursor:pointer}
.cc-actions #chat-status-change:disabled{cursor:wait;opacity:.6}
@media(max-width:760px){.cc-actions .cc-state-control{flex-wrap:wrap}.cc-actions #chat-status-change{min-width:145px;max-width:100%}}

#sofia-tasks-toggle{flex:none}#cc-dialog.cc-sofia-tasks{width:min(860px,calc(100vw - 32px));max-width:860px}.sofia-tasks{display:grid;gap:24px}.sofia-tasks h3{margin:0 0 10px}.sofia-task-main{padding:20px;border:1px solid #ccdcd0;border-radius:14px;background:#f3f8f4}.sofia-task-heading,.sofia-result>div{display:flex;align-items:center;justify-content:space-between;gap:12px}.sofia-task-heading h3{margin:0}.sofia-schedule{font-weight:700;color:#335e42}.sofia-badge{display:inline-block;flex:none;padding:4px 9px;border-radius:8px;background:#edf0ed;color:#4e5d52;font-size:12px;font-weight:700}.sofia-badge.active{background:#dceede;color:#245935}.sofia-badge.paused{background:#f1eade;color:#715c34}.sofia-task-buttons,.sofia-counts{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}.sofia-counts span{background:#f1f4f1;padding:6px 10px;border-radius:8px;font-size:12px}.sofia-notice{border:1px solid #dfe5df;border-radius:11px;padding:14px 16px;margin-top:10px}.sofia-notice summary{cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:12px;font-weight:650}.sofia-notice summary>span:first-child:before{content:'▸ ';color:#647b69}.sofia-notice[open] summary>span:first-child:before{content:'▾ '}.sofia-tasks blockquote{white-space:pre-wrap;overflow-wrap:anywhere;margin:12px 0;padding:12px 15px;background:#f5f7f4;border-left:3px solid #91ae98;border-radius:4px;font-size:14px;line-height:1.6}.sofia-note,.sofia-empty{font-size:13px;color:#637267;line-height:1.6}.sofia-run-label{display:flex;align-items:center;gap:10px}.sofia-run-label select{width:auto;max-width:100%}.sofia-result{border-bottom:1px solid #e4e9e4;padding:16px 0}.sofia-result p{font-size:13px;color:#657167}.sofia-tasks p{line-height:1.6}@media(max-width:600px){.sofia-task-heading{align-items:flex-start}.sofia-task-main{padding:14px}.sofia-notice{padding:12px}.sofia-notice summary{font-size:13px}.sofia-run-label{flex-wrap:wrap}}

.cc-market-context{flex-shrink:0;max-height:32vh;overflow:auto;padding:10px 14px;border-bottom:1px solid #d9dfd9;background:#f4f7f4;font-size:14px;line-height:1.4}.cc-market-heading{display:flex;gap:8px;align-items:center;justify-content:space-between}.cc-market-order{margin:3px 0 7px;overflow-wrap:anywhere}.cc-market-product{display:flex;gap:10px;align-items:flex-start;margin:6px 0}.cc-market-image{width:62px;height:62px;object-fit:contain;border:1px solid #ddd;border-radius:7px;background:white;flex-shrink:0}.cc-market-copy{min-width:0;flex:1}.cc-market-copy strong{font-size:14px}.cc-market-stock{margin-top:4px}.cc-market-empty{margin:4px 0}.cc-market-context small{font-size:12px;color:#5b675d}.cc-market-context a{display:inline-block;font-size:13px;margin-left:4px}@media(max-width:600px){.cc-market-context{padding:8px 10px;max-height:31vh}.cc-market-image{width:52px;height:52px}.cc-market-order{font-size:12px}.cc-market-copy strong{font-size:14px}.cc-market-stock{font-size:13px}}

/* Human responsibility stays visible independently of the service column. */
.cc-chat.cc-team,#cc-inbox-group .crm-stage .cc-chat.cc-team{--chat-tint:#f5f1ff;--chat-active:#e8ddff;--chat-accent:#7c3aed;--chat-ink:#4c1d95;background:var(--chat-tint);border-left:4px solid var(--chat-accent)}
.cc-chat.cc-team:is(:hover,.selected),#cc-inbox-group .crm-stage .cc-chat.cc-team:is(:hover,.selected){background:var(--chat-active);box-shadow:inset 0 0 0 1px var(--chat-accent)}
#cc-inbox-group .crm-stage .cc-chat.cc-chat-compact.cc-team{border-left-width:4px}
.cc-chat.cc-team .cc-team-label{display:inline-flex;align-items:center;flex:none;margin:0;padding:2px 6px;border-radius:5px;background:#6d28d9;color:#fff;font-size:11px;font-weight:700;line-height:15px;white-space:nowrap}

/* Pending replies use existing card space; the absolute badge never adds height. */
.cc-chat.cc-chat-compact{position:relative}
.cc-chat.cc-chat-compact.cc-has-unanswered .cc-chat-title{box-sizing:border-box;padding-left:22px}
.cc-chat.cc-chat-compact>.cc-unanswered-count{position:absolute;top:9px;left:6px;z-index:1;display:flex;align-items:center;justify-content:center;min-width:16px;height:16px;padding:0 3px;box-sizing:border-box;border-radius:5px;background:#000;color:#fff;font-size:10px;font-weight:750;line-height:16px;margin:0;white-space:nowrap;font-variant-numeric:tabular-nums}
