.crm-chat-shell{height:min(760px,calc(100dvh - 170px));min-height:440px;display:grid;grid-template-columns:280px minmax(0,1fr);overflow:hidden;border:1px solid #dce4ee;border-radius:14px;background:#fff}.crm-chat-sidebar{border-right:1px solid #e4e9f1;overflow:auto}.crm-chat-tools{padding:14px;display:flex;gap:8px;flex-wrap:wrap;border-bottom:1px solid #e4e9f1}.crm-chat-rooms button{display:block;width:100%;text-align:left;border:0;border-bottom:1px solid #eef1f5;background:#fff;padding:15px;color:#26394d;cursor:pointer}.crm-chat-rooms button.active{background:#edf4fb;border-left:3px solid #245a92}.crm-chat-rooms strong{font-size:13px}.crm-chat-rooms small{display:block;color:#7a8797;margin-top:5px}.crm-chat-unread{float:right;padding:2px 7px;border-radius:12px;background:#245a92;color:#fff;font-size:11px}.crm-chat-main{min-width:0;min-height:0;display:flex;flex-direction:column}.crm-chat-heading{padding:14px 18px;display:flex;align-items:center;gap:10px;border-bottom:1px solid #e4e9f1}.crm-chat-heading h2{font-size:15px;margin:0}.crm-chat-heading small{display:block;font-size:11px;color:#728197;margin-top:5px}.crm-chat-history{flex:1;overflow:auto;padding:18px;display:flex;flex-direction:column;gap:12px;background:#f5f7fa;overscroll-behavior:contain}.crm-chat-bubble{align-self:flex-start;max-width:88%;padding:12px 14px;border:1px solid #e1e7ee;background:#fff;border-radius:12px;overflow-wrap:anywhere;font-size:13px;white-space:pre-wrap}.crm-chat-bubble.own{align-self:flex-end;background:#e9f2fb;border-color:#d5e5f5}.crm-chat-bubble small{display:block;color:#6d7f91;font-size:10px;margin-bottom:5px}.crm-chat-bubble p{margin:5px 0;line-height:1.6}.crm-chat-actions{display:flex;flex-wrap:wrap;gap:9px;margin-top:8px}.crm-chat-actions button{font-size:10px;color:#476e96;border:0;background:transparent;padding:2px;cursor:pointer}.crm-chat-compose{border-top:1px solid #e4e9f1;padding:12px;display:grid;grid-template-columns:auto 1fr auto;gap:8px;align-items:end}.crm-chat-compose textarea{resize:none;min-height:42px;max-height:140px;padding:10px;border:1px solid #dce4ee;border-radius:8px;width:100%;font-size:14px}.crm-chat-context{padding:8px 14px;font-size:12px;background:#fff7e7}.crm-chat-error{padding:10px 14px;color:#a32c2c;background:#fff3f3;font-size:12px;overflow-wrap:anywhere}.crm-chat-back{display:none}.crm-chat-dialog{border:1px solid #dce4ee;border-radius:14px;width:min(480px,calc(100% - 24px));padding:22px;max-height:85dvh;overflow:auto;color:#23384f}.crm-chat-dialog::backdrop{background:#14243c77;backdrop-filter:blur(3px)}.crm-chat-dialog h2{font-size:18px;margin:0 0 18px}.crm-chat-dialog input:not([type=checkbox]),.crm-chat-dialog select{width:100%;padding:10px;border:1px solid #dce4ee;border-radius:7px;margin:6px 0 14px}.crm-chat-dialog .crm-peer{display:flex;align-items:center;gap:9px;padding:10px;border-bottom:1px solid #eef1f5;font-size:13px}.crm-peer input{width:16px;height:16px}.crm-chat-dialog footer{display:flex;justify-content:flex-end;gap:8px;margin-top:18px}.crm-chat-top{position:relative}.crm-chat-top b{margin-left:6px;font-size:11px}.crm-chat-bubble a{color:#245a92}.crm-chat-hint{font-size:12px;color:#67798d;padding:10px;line-height:1.6}
@media(max-width:760px){body.crm-chat-mobile .content{padding:10px!important}body.crm-chat-mobile .sidebar{display:none!important}body.crm-chat-mobile .app{grid-template-columns:1fr!important}body.crm-chat-mobile .topbar{padding:8px 12px!important}body.crm-chat-mobile .topbar h1{font-size:17px}.crm-chat-shell{height:calc(100dvh - 120px);height:calc(100svh - 120px);min-height:360px;grid-template-columns:1fr;border-radius:9px}.crm-chat-shell .crm-chat-main{display:none}.crm-chat-shell.room-open .crm-chat-sidebar{display:none}.crm-chat-shell.room-open .crm-chat-main{display:flex}.crm-chat-back{display:inline-flex}.crm-chat-bubble{max-width:94%;font-size:14px}.crm-chat-compose{padding:10px 8px calc(10px + env(safe-area-inset-bottom));gap:6px}.crm-chat-compose .btn{padding:10px;font-size:12px}.crm-chat-compose textarea{font-size:16px}.crm-chat-heading{padding:11px}.crm-chat-history{padding:12px}.crm-chat-tools .btn{font-size:12px}.crm-chat-heading small{max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}
.crm-chat-shell [hidden],.crm-chat-dialog [hidden]{display:none!important}

@media(max-width:760px){.crm-chat-shell{height:var(--crm-chat-height,calc(100svh - 120px))}}

/* Keep utility tools and extra grid children out of the conversation layout. */
.crm-chat-shell>.crm-chat-sidebar{grid-column:1;grid-row:1;min-height:0;display:flex;flex-direction:column;background:#fbfcfe}
.crm-chat-shell>.crm-chat-main{grid-column:2;grid-row:1;overflow:hidden;background:#fff}
.crm-chat-rooms{flex:1;overflow:auto}.crm-chat-tools{align-items:center;gap:8px}.crm-chat-settings{position:relative}.crm-chat-settings summary{font-size:12px;color:#536c87;cursor:pointer;padding:8px 4px}.crm-chat-settings[open]{background:#fff;border:1px solid #dce4ee;border-radius:8px;padding:7px}.crm-chat-settings .btn{display:block;width:100%;text-align:left;margin-top:6px!important;font-size:11px}.crm-chat-welcome{margin:auto;text-align:center;max-width:260px;color:#8a98aa;font-size:14px;line-height:1.7}.crm-chat-menu-back{display:none}.crm-chat-heading{min-height:66px}.crm-chat-people-button{margin-left:auto;order:2}.crm-chat-heading h2{font-size:14px!important}.crm-chat-rooms>.btn{margin:10px;width:calc(100% - 20px);text-align:center}
@media(max-width:760px){.crm-chat-shell>.crm-chat-main{grid-column:1;grid-row:1;display:none}.crm-chat-shell>.crm-chat-sidebar{grid-column:1;grid-row:1;display:flex}.crm-chat-shell.room-open>.crm-chat-sidebar{display:none}.crm-chat-shell.room-open>.crm-chat-main{display:flex}.crm-chat-menu-back{display:inline-flex}.crm-chat-tools{padding:12px}.crm-chat-heading .crm-chat-people-button{font-size:11px;padding:7px}}

.crm-nav-message-count{margin-left:auto;display:inline-grid;place-items:center;min-width:20px;height:20px;padding:0 5px;background:#cfe1f6;color:#173351;border-radius:10px;font-size:11px!important}

.crm-chat-search{padding:12px;border-bottom:1px solid #e4e9f1;display:grid;grid-template-columns:1fr auto;gap:7px}.crm-chat-search input{grid-column:1/-1;width:100%;min-width:0;padding:10px;font-size:13px;border:1px solid #dce4ee;border-radius:7px}.crm-chat-search select{min-width:0;border:1px solid #dce4ee;border-radius:6px;padding:7px;color:#526881;font-size:12px;background:#fff}.crm-chat-search-results{max-height:50dvh;overflow:auto;margin:10px 0}.crm-chat-search-result{display:block;width:100%;text-align:left;padding:12px;border:1px solid #e0e7ef;background:#f9fbfd;border-radius:8px;margin-bottom:8px;cursor:pointer;color:#263f59;font-size:13px;overflow-wrap:anywhere}.crm-chat-search-result p{margin:7px 0;white-space:pre-wrap;font-size:12px;line-height:1.5}.crm-chat-search-result small{display:block;color:#7a8b9c;font-size:10px;margin-top:5px}.crm-chat-search-query{font-size:13px;color:#4a6b8e;overflow-wrap:anywhere}.crm-chat-bubble.crm-chat-match{outline:2px solid #d7a23b;background:#fff8e7}.crm-chat-compose textarea:focus{outline:2px solid #dbe9f7;border-color:#82a9ce}

.crm-chat-key-hint{grid-column:1/-1;text-align:right;color:#8595a6;font-size:10px}.crm-chat-quote{display:block;max-width:100%;font-size:11px;padding:7px 9px;border:0;border-left:3px solid #87a9cc;border-radius:4px;text-align:left;background:#ffffff88;color:#546f8c;white-space:normal;cursor:pointer;margin:6px 0}

/* v153 — compact conversations with accessible action menus. */
body:not(.crm-printing) #content .crm-chat-bubble{font-size:12px;line-height:1.5;padding:9px 11px}body:not(.crm-printing) #content .crm-chat-bubble p{font-size:12px!important;margin:5px 0 6px;line-height:1.5}body:not(.crm-printing) #content .crm-chat-heading h2{font-size:13px!important}.crm-chat-rooms strong{font-size:12px}.crm-chat-rooms small{font-size:10px}.crm-chat-rooms button{padding:11px 12px}.crm-chat-tools .btn,.crm-chat-search .btn,.crm-chat-room-options .btn{font-size:11px!important}.crm-chat-message-menu{align-self:flex-end;margin-top:3px;max-width:100%}.crm-chat-message-menu summary{list-style:none;cursor:pointer;text-align:right;min-width:34px;min-height:30px;font-size:20px;line-height:1.3;color:#57718b}.crm-chat-message-menu .crm-chat-actions{display:flex;flex-wrap:wrap;gap:4px;padding-top:4px;border-top:1px solid #dfe7ef}.crm-chat-actions button{font-size:11px!important;padding:6px 8px;color:#3f607e;border:1px solid #dfe7ef;background:#ffffffaa;border-radius:6px;cursor:pointer}.crm-chat-bubble>small{font-size:10px!important}.crm-chat-deleted{color:#8391a2;font-style:italic;background:#f0f3f7!important}.crm-chat-room-options>div{max-height:60dvh;overflow:auto}.crm-chat-dialog>p{font-size:13px;line-height:1.6}
@media(max-width:760px){body:not(.crm-printing) #content .crm-chat-bubble,body:not(.crm-printing) #content .crm-chat-bubble p{font-size:13px!important}.crm-chat-heading{padding:8px}.crm-chat-message-menu summary{min-width:44px;min-height:36px}.crm-chat-history{gap:9px;padding:10px}.crm-chat-dialog{font-size:13px}}
/* v154 — content-sized messages, sender portraits and a compact metadata line. */
.crm-chat-message-row{display:flex;align-items:flex-end;gap:7px;width:100%;min-width:0}.crm-chat-message-row.is-own{justify-content:flex-end}.crm-chat-message-row.is-own>.crm-chat-avatar{order:2}.crm-chat-message-row.is-own>.crm-chat-bubble{order:1}.crm-chat-avatar{flex:none;width:29px;height:29px;min-width:29px;min-height:29px;border:0;border-radius:50%;padding:0;overflow:hidden;background:#dce7ef;color:#4c6982;display:grid;place-items:center;font-size:10px;cursor:pointer;align-self:flex-end}.crm-chat-avatar img{width:100%;height:100%;object-fit:cover}.crm-chat-message-top{display:flex;align-items:center;justify-content:space-between;gap:10px;min-width:0}.crm-chat-sender{background:transparent;border:0;padding:0;text-align:left;max-width:210px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px;font-weight:600;color:#526e87;cursor:pointer;line-height:1.3}.crm-chat-bubble .crm-chat-message-menu{margin:0;flex:none}.crm-chat-bubble .crm-chat-message-menu summary{min-width:23px;min-height:18px;line-height:16px;font-size:17px;padding:0 1px}.crm-chat-stamp{display:block;text-align:right;font-size:9px!important;line-height:1.2;color:#8796a3;margin-top:2px;white-space:nowrap}.crm-chat-read{font-size:10px;color:#8197a6}.crm-chat-read.read{color:#428bb5}.crm-chat-message-row .crm-chat-bubble{position:relative;align-self:auto;width:fit-content;min-width:60px;max-width:min(78%,560px);box-sizing:border-box;border:0!important;box-shadow:0 1px 1px #18324809!important;border-radius:8px!important;background:#fff}.crm-chat-message-row .crm-chat-bubble.own{background:#e7f1ec}.crm-chat-message-row .crm-chat-bubble .crm-chat-actions{max-width:260px;padding-top:5px}.crm-chat-message-row .crm-chat-bubble p{margin:3px 0!important}.crm-chat-message-row .crm-chat-bubble>a{display:block;font-size:11px;overflow-wrap:anywhere}.crm-chat-message-row .crm-chat-bubble .crm-chat-stamp{font-size:9px!important}.crm-chat-message-row .crm-chat-bubble.own .crm-chat-message-top>.crm-chat-sender{display:none}.crm-chat-message-row .crm-chat-bubble.own .crm-chat-message-top{justify-content:flex-end;height:4px}.crm-chat-message-row .crm-chat-bubble.own .crm-chat-message-menu{position:relative;top:3px;margin-left:12px}.crm-chat-message-row .crm-chat-bubble.own p{padding-right:18px}.crm-chat-profile-photo{width:76px;height:76px;font-size:24px;margin:12px auto}.crm-chat-profile-photo img{width:100%;height:100%}.crm-chat-dialog h3{font-size:16px;margin:12px 0}.crm-chat-search-dialog{display:grid;grid-template-columns:1fr auto;gap:8px}.crm-chat-search-dialog input{grid-column:1/-1}.crm-chat-search-dialog input,.crm-chat-search-dialog select{width:100%;box-sizing:border-box;padding:10px;border:1px solid #dce4ee;border-radius:8px}.crm-chat-resource-tabs{display:flex;gap:7px;margin:12px 0}.crm-chat-resource-tabs .active{background:#dfeaf4;color:#284f73}.crm-chat-resource-list{max-height:55dvh;overflow:auto;overscroll-behavior:contain}.crm-chat-resource{display:flex;flex-direction:column;gap:7px;padding:12px 0;border-bottom:1px solid #e4eaf1;overflow-wrap:anywhere}.crm-chat-resource>small{color:#8090a2;font-size:10px}.crm-chat-resource strong{font-size:13px}.crm-chat-resource .btn{align-self:flex-start;font-size:11px}.crm-chat-resource-thumb{width:120px;height:90px;object-fit:cover;border-radius:6px;background:#eef2f6}.crm-chat-inline-search{order:2;font-size:21px!important;padding:4px 9px!important;min-width:38px}.crm-chat-dialog>small{display:block;color:#8090a2;font-size:11px;line-height:1.5;margin-top:7px}
body:not(.crm-printing) #content .crm-chat-message-row .crm-chat-bubble{padding:6px 9px;font-size:12px}body:not(.crm-printing) #content .crm-chat-message-row .crm-chat-bubble p{font-size:12px!important;line-height:1.45}
@media(max-width:760px){.crm-chat-message-row{gap:5px}.crm-chat-message-row .crm-chat-bubble{max-width:calc(100% - 45px)}.crm-chat-avatar{width:27px;height:27px;min-width:27px;min-height:27px}.crm-chat-sender{max-width:170px}.crm-chat-bubble .crm-chat-message-menu summary{min-width:30px;min-height:24px}.crm-chat-profile-photo{width:76px;height:76px}.crm-chat-inline-search{min-width:38px;font-size:22px!important}.crm-chat-heading{gap:6px}.crm-chat-search-dialog{grid-template-columns:1fr auto}body:not(.crm-printing) #content .crm-chat-message-row .crm-chat-bubble p{font-size:13px!important}.crm-chat-message-row .crm-chat-bubble.own .crm-chat-message-menu{top:5px}}
.crm-chat-message-menu:not([open])>.crm-chat-actions,.crm-chat-room-options:not([open])>div{display:none!important}.crm-chat-message-menu[open]>.crm-chat-actions{position:fixed;z-index:12500;display:flex!important;flex-direction:column;gap:3px;max-height:calc(100dvh - 40px);overflow:auto;padding:8px!important;border:1px solid #dce5ed;border-radius:9px;background:#fff;box-shadow:0 7px 24px #18324822;box-sizing:border-box}.crm-chat-message-menu .crm-chat-actions button{text-align:left;min-height:30px;padding:7px 9px;font-size:11px}.crm-chat-profile-photo{min-width:76px;min-height:76px}
