.cm-shell{--cm-blue:#3390ec;display:grid;grid-template-columns:300px minmax(0,1fr);height:min(70vh,760px);min-height:500px;border:1px solid #dce4ef;border-radius:18px;overflow:hidden;background:#fff;color:#172b45;text-align:left;box-shadow:0 8px 32px #142c4810}
.cm-shell *{box-sizing:border-box}.cm-shell [hidden]{display:none!important}
.cm-sidebar{display:flex;flex-direction:column;min-height:0;background:#fff;border-right:1px solid #e5eaf1}.cm-sidebar-head{display:flex;align-items:center;justify-content:space-between;padding:20px 18px 10px}.cm-sidebar h3{margin:0;font-size:21px}.cm-sidebar-head>span{font-size:11px;border-radius:12px;padding:4px 9px;background:#eef5fe;color:#3085d6}
.cm-search{display:flex;align-items:center;gap:8px;margin:2px 12px 12px;padding:0 12px;border-radius:22px;background:#f0f3f7;color:#7e90a7}.cm-search>span{font-size:25px}.cm-shell .cm-search input{border:0!important;background:transparent!important;box-shadow:none!important;color:#172b45!important;width:100%;min-width:0;padding:11px 0!important;font-size:13px;outline:none}
.cm-people{overflow:auto;flex:1;padding:0 6px 10px}.cm-person{display:flex;align-items:center;gap:11px;width:100%;border:0;border-radius:12px;background:transparent;color:inherit;padding:12px 10px;text-align:left;cursor:pointer}.cm-person:hover{background:#f2f6fb}.cm-person.on{background:#eaf3ff}.cm-avatar{width:46px;height:46px;border-radius:50%;background:linear-gradient(135deg,#56b3ec,#4984dc);color:white;display:grid;place-items:center;font-weight:700;font-size:16px;flex-shrink:0}.cm-avatar.group{background:linear-gradient(135deg,#7eb8a5,#48a891);font-size:28px}.cm-person-copy{display:flex;flex-direction:column;min-width:0;gap:5px;flex:1}.cm-person-copy b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px}.cm-person-copy small{font-size:12px;color:#7890a8;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cm-room-icon{color:#7f9dbb;font-size:16px}.cm-team-status{font-size:11px;color:#a84d47;padding:8px 14px;overflow-wrap:anywhere}.cm-team-status:empty{display:none}
.cm-thread{display:flex;flex-direction:column;min-width:0;min-height:0;background:#e5edf3}.cm-thread-head{display:flex;align-items:center;gap:11px;min-height:76px;padding:11px 18px;background:#fff;border-bottom:1px solid #e7edf4}.cm-thread-head>div{min-width:0;flex:1}.cm-thread-name{display:block;font-size:15px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.cm-thread-sub{display:block;font-size:11px;line-height:1.6;color:#7590aa;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.cm-thread-head .cm-avatar{width:42px;height:42px}.cm-shell .cm-message-search{width:155px;min-width:0;border:0!important;border-radius:20px!important;background:#f1f4f8!important;color:#172b45!important;padding:10px 12px!important;font-size:11px;outline:none}.cm-back{display:none;border:0;background:none;color:#3e90d9;font-size:34px;padding:0 8px;cursor:pointer}
#cmpChatMount{flex:1;min-height:0;display:flex;flex-direction:column}.cm-shell .cx-chat{display:flex;flex:1;min-height:0;flex-direction:column;background:transparent;border:0;border-radius:0;height:100%;padding:0}.cm-shell .cx-msgs{flex:1;min-height:0;max-height:none;overflow:auto;padding:16px 24px;background:radial-gradient(circle at 10% 20%,#ffffff40 0,transparent 40%),#e5edf3;overscroll-behavior:contain}
.cm-shell .cx-msg{display:flex;justify-content:flex-start;margin:7px 0;min-width:0}.cm-shell .cx-msg.me{justify-content:flex-end}.cm-shell .cx-bub{display:flex;flex-direction:column;min-width:60px;max-width:min(82%,520px);border:0;background:#fff;color:#19334d;border-radius:14px 14px 14px 4px;padding:9px 12px 5px;box-shadow:0 1px 2px #22344b12}.cm-shell .cx-msg.me .cx-bub{background:#dceeff;border-radius:14px 14px 4px 14px}.cm-shell .cx-txt{order:1;font-size:14px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere}.cm-shell .cm-media{order:1;margin:3px 0}.cm-shell .cm-media:empty{display:none}.cm-shell .cx-meta{order:2;font-size:10px;color:#7a93ab;margin:4px 0 0;text-align:right;line-height:1.4}.cm-shell .cm-check{color:#7b9db7}.cm-shell .cm-check.seen{color:#1680d6}.cm-shell .cx-acts{order:3;display:flex;justify-content:flex-end;gap:8px;opacity:0}.cm-shell .cx-bub:hover .cx-acts,.cm-shell .cx-bub:focus-within .cx-acts{opacity:1}.cm-shell .cx-acts button,.cm-shell .cx-acts span{font-size:10px!important;padding:3px!important;min-height:0!important;background:none!important;border:0!important;color:#6a87a2!important;cursor:pointer}
.cm-shell .cx-send{flex-shrink:0;display:flex!important;align-items:flex-end!important;gap:7px!important;flex-wrap:nowrap!important;background:#fff;margin:10px 14px 14px;padding:8px!important;border:0;border-radius:15px;box-shadow:0 1px 6px #24476b0c}.cm-shell .cx-send textarea{font-family:inherit;flex:1;width:0;min-width:0;min-height:42px;max-height:120px;padding:12px 5px;border:0;background:#fff;color:#17324d;font-size:14px;line-height:1.4;outline:none;resize:none;overflow:auto}.cm-shell .cx-send [data-act=send-chat]{border-radius:50%!important;width:44px!important;height:44px;flex:0 0 44px;padding:0!important;border:0!important;background:#3390ec!important;color:white!important;display:grid;place-items:center;font-size:20px}.cm-shell .cx-send .cm-mic{background:#f0f5fb!important;color:#6297bd!important;border:0!important}.cm-shell .cm-attach{font-size:26px;color:#7994ae;width:32px;flex-basis:32px}.cm-emoji{border:0;background:none;color:#7994ae;font-size:26px;cursor:pointer;height:44px;width:32px;flex:0 0 32px;padding:0}.cm-emoji-tray{display:flex;flex-wrap:wrap;gap:8px;padding:10px 16px;background:#fff}.cm-emoji-tray button{background:#f4f7fb;border:0;border-radius:8px;width:37px;height:37px;font-size:23px;cursor:pointer}.cm-shell .cm-status{background:#fff;padding:5px 16px;color:#b15845}.cm-shell .cm-preview{background:#f5faff}.cm-empty{padding:35px 20px;text-align:center;color:#7990a7;font-size:13px}
#companyModal:has(.cm-shell) .cx-kpis,#companyModal:has(.cm-shell) .cx-co{display:none}#companyModal:has(.cm-shell) .cx-tabs{margin-bottom:10px}
@media(hover:none){.cm-shell .cx-acts{opacity:1}}
@media(max-width:900px){.cm-shell{grid-template-columns:235px minmax(0,1fr)}.cm-thread-head{padding:10px}.cm-thread-sub{max-width:210px}.cm-shell .cm-message-search{width:120px}.cm-shell .cx-msgs{padding:12px}.cm-shell .cx-send{margin:7px}.cm-shell .cx-send .cm-mic{width:38px!important;flex-basis:38px!important}.cm-emoji{width:28px;flex-basis:28px}}
@media(max-width:700px){.cm-shell{display:block;height:calc(100dvh - 155px);min-height:350px;border-radius:12px}.cm-sidebar,.cm-thread{height:100%}.cm-shell:not(.in-thread) .cm-thread{display:none}.cm-shell.in-thread .cm-sidebar{display:none}.cm-back{display:block}.cm-thread-head{min-height:68px}.cm-shell .cm-message-search{display:none}.cm-shell .cx-bub{max-width:89%}.cm-shell .cx-send textarea{font-size:16px}.cm-shell .cx-send{gap:3px!important}.cm-thread-sub{max-width:240px}.cm-shell .cm-preview{padding:6px}.cm-shell .cx-acts{opacity:1}.cm-sidebar-head{padding-top:15px}}
#companyModal:has(.cm-shell) .wf-page-heading{display:none!important}
#companyModal .cm-shell{min-height:300px;max-height:none}
#companyModal .cm-shell .cx-send textarea{border:0!important;box-shadow:none!important;border-radius:0!important;background:white!important;color:#17324d!important;min-width:0!important;font-family:inherit!important}
#companyModal .cm-shell .cm-search input{background:transparent!important;border:0!important;box-shadow:none!important}
#companyModal .cm-shell .cx-send [data-act=send-chat]{font-size:23px!important;border-radius:50%!important;width:44px!important;min-width:44px!important;height:44px!important;padding:0!important;background:#3390ec!important;color:white!important}
#companyModal .cm-shell .cx-acts button{background:none!important;box-shadow:none!important;border:0!important;font-size:10px!important;min-height:0!important;padding:2px!important;color:#6a87a2!important}
#companyModal .cm-company-home input{position:relative;z-index:1;pointer-events:auto!important;user-select:text!important;touch-action:manipulation;caret-color:#172b45}
@media(max-width:700px){#companyModal:has(.cm-shell) .cx-body{padding-bottom:6px!important}#companyModal .cm-shell{min-height:300px}}
@media(max-width:700px){#companyModal .cm-shell{min-height:200px}}
/* Chat bubbles stay readable when the surrounding studio uses a dark palette. */
#companyModal .cm-shell .cx-bub{background:#fff!important;color:#19334d!important;min-width:80px}
#companyModal .cm-shell .cx-msg.me .cx-bub{background:#dceeff!important}
#companyModal .cm-shell .cx-txt{color:#19334d!important;-webkit-text-fill-color:#19334d;text-shadow:none;opacity:1;font-size:14px;line-height:1.5}
#companyModal .cm-shell .cx-meta{display:block!important;white-space:nowrap;color:#627d97!important;-webkit-text-fill-color:#627d97}
#companyModal .cm-shell .cm-check{-webkit-text-fill-color:currentColor}
#companyModal .cm-shell .cm-message-search{background:#f1f4f8!important;color:#17324d!important;-webkit-text-fill-color:#17324d}
#companyModal .cm-shell .cx-bub:has(.cm-media:not(:empty)){width:min(360px,89%)}
#companyModal .cm-shell .cm-media img,#companyModal .cm-shell .cm-media video{max-width:100%;max-height:280px;object-fit:contain}
#companyModal .cm-shell .cm-media img[role=button]{cursor:zoom-in}
#companyModal .cm-shell .cm-open-media,#companyModal .cm-shell .cm-loading{display:block;background:#eff6ff!important;color:#2366a5!important;-webkit-text-fill-color:#2366a5;border:1px solid #d7e6f8!important;border-radius:8px;padding:8px 12px;font-size:12px;line-height:1.4;white-space:normal;cursor:pointer}
#companyModal .cm-shell .cm-open-media{margin-top:6px;width:100%}
#companyModal .cm-shell .cm-media:empty,#companyModal .cm-shell .cx-txt:empty{display:none}
dialog#cmMediaViewer{position:fixed;inset:0;width:100vw;max-width:none;height:100dvh;max-height:none;margin:0;padding:0;border:0;border-radius:0;background:#0c1523;color:#f5f8ff;z-index:2147483200;display:flex;flex-direction:column;font-family:Arial,sans-serif;box-shadow:none}
dialog#cmMediaViewer:not([open]){display:none!important}
dialog#cmMediaViewer::backdrop{background:#070d17ed}
#cmMediaViewer header{display:flex;align-items:center;gap:12px;padding:14px 20px;min-height:64px;background:#142238;color:#f5f8ff;flex-shrink:0}
#cmMediaViewer header b{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:15px;color:#f5f8ff!important}
#cmMediaViewer header a,#cmMediaViewer header button{display:inline-flex;align-items:center;justify-content:center;min-width:42px;min-height:40px;padding:8px 12px;margin:0;background:#243b58!important;color:#fff!important;-webkit-text-fill-color:#fff;border:1px solid #4b6585!important;border-radius:8px;font-size:14px;cursor:pointer;text-decoration:none;flex-shrink:0}
#cmMediaViewer .cm-view-stage{flex:1;min-height:0;padding:16px;overflow:auto;display:grid;place-items:center;background:#0c1523}
#cmMediaViewer .cm-view-stage img,#cmMediaViewer .cm-view-stage video{display:block;width:auto;height:auto;max-width:100%;max-height:calc(100dvh - 132px);object-fit:contain;background:transparent;border-radius:0;opacity:1}
#cmMediaViewer .cm-view-stage img{cursor:zoom-in}
#cmMediaViewer .cm-view-stage:has(img.zoomed){display:block}
#cmMediaViewer .cm-view-stage img.zoomed{max-width:none;max-height:none;cursor:zoom-out;margin:auto}
#cmMediaViewer .cm-view-stage video{width:min(1100px,100%)}
#cmMediaViewer .cm-view-status{color:#d6e5fa!important;background:#142238;margin:0;padding:12px 20px;font-size:13px}
#cmMediaViewer .cm-view-status:empty{display:none}
@media(max-width:600px){#cmMediaViewer header{gap:7px;padding:8px}#cmMediaViewer header a,#cmMediaViewer header button{padding:8px;min-width:36px;font-size:12px}#cmMediaViewer .cm-view-stage{padding:8px}}
/* Refined conversation workspace and accessible mobile search. */
#companyModal .cm-thread-head{box-shadow:0 2px 10px #24476b06;z-index:1;flex-wrap:wrap}
#companyModal .cm-sidebar-head h3{font-size:20px;letter-spacing:-.04em;color:#172b45!important}
#companyModal .cm-person{transition:background .15s;min-height:76px}
#companyModal .cm-person.on{background:#e9f3ff;box-shadow:inset 3px 0 #3390ec}
#companyModal .cm-person-copy b,#companyModal .cm-thread-name{color:#172b45!important}
#companyModal .cm-person-copy small{color:#617c96!important}
#companyModal .cm-shell :is(button,input,textarea):focus-visible{outline:2px solid #3390ec!important;outline-offset:2px}
#companyModal .cm-shell .cx-msgs{padding:20px clamp(14px,3vw,48px);scrollbar-width:thin;scrollbar-color:#b5c9da transparent;background:radial-gradient(ellipse at 20% 0,#f3f8fc 0,transparent 60%),#e6edf3}
#companyModal .cm-shell .cx-bub{padding:10px 13px 6px;box-shadow:0 1px 3px #24476b14}
#companyModal .cm-shell .cx-send{border:1px solid #e0e9f3;box-shadow:0 3px 16px #24476b0b;max-width:980px;width:calc(100% - 28px);align-self:center}
#companyModal .cm-shell .cx-send:focus-within{border-color:#a9cffa}
#companyModal .cm-shell .cm-message-search{min-height:38px;font-size:12px}
#companyModal .cm-search-toggle{display:none;border:0!important;background:#eff5fc!important;color:#357bb9!important;border-radius:50%!important;width:38px;height:38px;min-width:38px;padding:9px!important;cursor:pointer;align-items:center;justify-content:center}
#companyModal .cm-search-result{background:#f7faff;color:#3b6c96;font-size:12px;padding:9px 18px;border-bottom:1px solid #dce7f3}
@media(min-width:1500px){#companyModal .cm-shell .cx-bub{max-width:min(76%,640px)}}
@media(max-width:700px){#companyModal .cm-thread-head{gap:8px;padding:10px 12px}#companyModal .cm-search-toggle{display:inline-flex}#companyModal .cm-thread-head>div{min-width:0}#companyModal .cm-shell.searching .cm-message-search{display:block;order:6;flex-basis:100%;width:100%;margin-top:2px;font-size:16px}#companyModal .cm-shell .cx-msgs{padding:12px}#companyModal .cm-shell .cx-send{width:calc(100% - 14px);margin:7px;padding-bottom:max(8px,env(safe-area-inset-bottom))!important}#companyModal .cm-shell .cx-bub{max-width:91%}#companyModal .cm-shell .cx-acts{gap:14px}#companyModal .cm-shell .cx-acts button{min-height:26px!important;padding:4px!important}#companyModal .cm-thread-sub{max-width:none}}
@media(prefers-reduced-motion:reduce){#companyModal .cm-shell *,#factorySection *{scroll-behavior:auto!important;transition:none!important}}
