.chat-shell{--chat-paper:var(--white,#fff);display:grid;grid-template-columns:296px minmax(0,1fr);height:calc(100dvh - 240px);min-height:540px;max-height:900px;border:1px solid var(--line,#e2e8e0);border-radius:22px;overflow:hidden;background:var(--chat-paper);box-shadow:0 14px 50px #173f2510;margin-bottom:20px}.chat-shell button,.chat-shell input,.chat-shell textarea{font:inherit}.chat-shell svg,.chat-dialog svg{width:20px;height:20px;flex-shrink:0}.chat-sidebar{display:flex;flex-direction:column;min-width:0;border-right:1px solid var(--line,#e2e8e0);background:linear-gradient(145deg,#f5f8f2,var(--chat-paper))}.chat-side-head{display:flex;gap:8px;align-items:center;justify-content:space-between;padding:24px 18px 16px}.chat-side-head b{font-size:16px}.chat-side-head small{display:block;color:var(--muted);font-size:11px;margin-top:4px}.chat-side-actions{display:flex;gap:4px}.chat-icon{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:34px;height:34px;border:1px solid transparent;border-radius:10px;background:transparent;color:var(--green,#246752);cursor:pointer}.chat-icon:hover{background:#dce8d4;border-color:#cedcc4}.chat-icon:disabled{opacity:.4;cursor:default}.chat-search,.chat-thread-search{display:flex;align-items:center;gap:8px;padding:9px 12px;border:1px solid var(--line);border-radius:12px;background:var(--chat-paper);color:var(--muted);margin:0 16px 8px}.chat-search input,.chat-thread-search input{border:0;outline:0;background:transparent;color:var(--ink);width:100%;min-width:0;padding:0;height:25px;font-size:12px}.chat-search svg,.chat-thread-search svg{width:16px}.chat-status{color:#a14631;font-size:12px;margin:0;padding:0 18px;line-height:1.6;flex-shrink:0}.chat-status:not(:empty){padding-top:10px;padding-bottom:10px;background:#fff4e9}.chat-room-list{flex:1;min-height:0;overflow:auto;padding:6px 9px}.chat-room{width:100%;text-align:left;display:flex;align-items:center;gap:10px;min-height:78px;padding:14px 10px;border:1px solid transparent;background:none;border-radius:14px;color:var(--ink);cursor:pointer}.chat-room:hover{background:#eaf0e3}.chat-room.selected{background:#e1ecd8;border-color:#d4e0c9}.chat-avatar{height:42px;width:42px;flex-shrink:0;background:linear-gradient(140deg,#edf1df,#d4e5cc);border:1px solid #d3ddc6;border-radius:15px;display:inline-flex;justify-content:center;align-items:center;color:var(--green);font-size:17px;font-weight:600}.chat-avatar.group{background:linear-gradient(140deg,#dceee4,#c7e2d2)}.chat-room-copy{min-width:0;flex:1}.chat-room-line{display:flex;gap:8px;justify-content:space-between;align-items:center;min-width:0}.chat-room-line b,.chat-room-line small{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;line-height:1.6}.chat-room-line b{font-size:13px}.chat-room-line small{color:var(--muted);font-size:11px;max-width:170px}.chat-room-line time{font-size:10px;color:var(--muted);flex-shrink:0}.chat-unread{min-width:20px;height:20px;padding:0 5px;display:inline-flex;align-items:center;justify-content:center;border-radius:8px;background:var(--green);color:#fff;font-size:10px}.chat-side-foot{padding:13px 20px;font-size:10px;color:var(--muted);border-top:1px solid var(--line);display:flex;align-items:center;gap:7px}.chat-connection-dot{width:6px;height:6px;border-radius:50%;background:#7fa16d}.chat-conversation{min-width:0;min-height:0;position:relative;display:flex;flex-direction:column;background:radial-gradient(ellipse at top right,#e9f0e440,transparent 70%),var(--chat-paper)}.chat-thread-head{display:flex;align-items:center;gap:12px;padding:16px 22px 11px}.chat-thread-title{flex:1;min-width:0}.chat-thread-title h2{font-size:17px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:0 0 4px;line-height:1.5}.chat-thread-title small{font-size:11px;color:var(--muted)}.chat-back{display:none}.chat-thread-search{margin:0 22px 10px;padding:4px 10px;background:#f8faf5}.chat-thread-search input{font-size:11px}.chat-thread-search .chat-icon{width:25px;height:25px}.chat-search-note{padding:0 24px 9px;color:var(--muted);font-size:11px}.chat-timeline{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:16px 26px;scrollbar-width:thin;outline-offset:-3px}.chat-day{display:table;margin:4px auto 20px;padding:5px 13px;border-radius:20px;font-size:10px;color:var(--muted);background:#eff3e9}.chat-message{display:flex;align-items:flex-end;gap:8px;margin:0 0 17px;position:relative}.chat-message.own{flex-direction:row-reverse}.chat-message-avatar{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:28px;height:28px;border-radius:10px;background:#e7ecde;color:var(--green);font-size:11px;margin-bottom:20px}.chat-bubble-wrap{max-width:min(78%,560px);min-width:0}.chat-author{display:block;font-size:10px;color:var(--muted);font-weight:500;margin:0 0 4px 3px;overflow-wrap:anywhere}.chat-bubble{padding:11px 14px;background:#edf2e8;border:1px solid #e4ebdf;border-radius:15px 15px 15px 4px;line-height:1.7;font-size:13px}.chat-message.own .chat-bubble{background:var(--green,#266c54);border-color:var(--green);color:#fff;border-radius:15px 15px 4px 15px}.chat-body{white-space:pre-wrap;overflow-wrap:anywhere}.chat-bubble blockquote{margin:0 0 8px;padding:7px 10px;border-left:3px solid #9bb98c;border-radius:2px 8px 8px 2px;background:#ffffff24;font-size:11px;line-height:1.5;overflow:hidden}.chat-bubble blockquote b{display:block;font-weight:600}.chat-bubble blockquote span{display:block;max-height:50px;overflow:hidden;white-space:pre-wrap;overflow-wrap:anywhere;opacity:.85}.chat-message-meta{display:flex;gap:7px;justify-content:flex-start;font-size:9px;color:var(--muted);margin:4px 4px 0;line-height:1.5;flex-wrap:wrap}.chat-message.own .chat-message-meta{justify-content:flex-end}.chat-message.recalled .chat-bubble{background:transparent;border:1px dashed #ccd4c5;color:var(--muted);font-style:italic;font-size:12px}.chat-message-actions{display:flex;align-self:center;opacity:0;transition:opacity .15s}.chat-message:hover .chat-message-actions,.chat-message:focus-within .chat-message-actions{opacity:1}.chat-message-actions .chat-icon{width:28px;height:28px}.chat-message-actions svg{width:14px;height:14px}.chat-compose{padding:14px 22px 13px;border-top:1px solid var(--line);background:var(--chat-paper)}.chat-compose-label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(100%)}.chat-compose-row{display:flex;align-items:flex-end;gap:10px;padding:10px 10px 10px 14px;border:1px solid #d6e2d1;border-radius:16px;background:#f6f9f2}.chat-compose-row:focus-within{border-color:var(--green);box-shadow:0 0 0 3px #3c785012}.chat-compose textarea{flex:1;min-width:0;resize:none;border:0;outline:0;max-height:140px;min-height:42px;background:transparent;color:var(--ink);font-size:13px;line-height:1.7;padding:0}.chat-send{display:flex;align-items:center;justify-content:center;width:38px;height:38px;border:0;border-radius:12px;background:var(--green);color:#fff;cursor:pointer}.chat-send:disabled{opacity:.4;cursor:default}.chat-compose-hint{display:flex;justify-content:space-between;gap:10px;font-size:9px;color:var(--muted);margin-top:8px}.chat-reply-draft{display:flex;justify-content:space-between;gap:10px;border-left:3px solid var(--green);padding-left:10px;margin-bottom:10px;font-size:11px}.chat-reply-draft:empty{display:none}.chat-reply-draft b,.chat-reply-draft span{display:block}.chat-reply-draft span{max-width:430px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted);margin-top:3px}.chat-welcome{min-height:100%;display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;padding:30px 10px}.chat-welcome-icon{width:78px;height:78px;display:flex;align-items:center;justify-content:center;border-radius:26px;background:linear-gradient(140deg,#edf2dc,#d6e8d1);box-shadow:0 12px 32px #3e704616,inset 0 1px #fff;color:var(--green);transform:rotate(-6deg);margin:0 auto 26px}.chat-welcome-icon svg{width:35px;height:35px}.chat-welcome .eyebrow{font-size:9px;letter-spacing:1.7px;color:#829176}.chat-welcome h2{font-size:26px;line-height:1.5;font-weight:500;letter-spacing:-.5px;margin:15px 0 10px}.chat-welcome p{max-width:320px;font-size:12px;line-height:1.8;color:var(--muted);margin:0 0 20px}.chat-welcome small{font-size:10px;color:var(--muted);margin-top:22px}.chat-welcome .btn{gap:12px}.chat-list-empty,.chat-thread-empty{font-size:12px;color:var(--muted);text-align:center;padding:40px 15px;line-height:1.8}.chat-load-more{display:block;margin:3px auto 18px;border:1px solid var(--line);background:var(--chat-paper);color:var(--green);border-radius:20px;padding:7px 15px;font-size:10px;cursor:pointer}.chat-new-messages{position:absolute;bottom:145px;left:50%;transform:translateX(-50%);border:1px solid #cedcc4;box-shadow:0 4px 20px #254b2220;border-radius:20px;padding:8px 16px;background:var(--chat-paper);color:var(--green);font-size:11px;cursor:pointer;z-index:1}.chat-new-messages[hidden]{display:none}.chat-unavailable{padding:40px;text-align:center;line-height:1.8}.chat-unavailable p{font-size:13px;color:var(--muted)}.chat-dialog{max-width:540px}.chat-dialog h2{font-size:22px;line-height:1.5;margin:0 0 8px;overflow-wrap:anywhere}.chat-dialog>p{color:var(--muted);font-size:12px;line-height:1.8}.chat-dialog label:not(.chat-person){display:block;font-size:12px;color:var(--muted);margin-top:15px}.chat-dialog input:not([type=checkbox]):not([type=radio]),.chat-dialog textarea,.chat-dialog select{display:block;box-sizing:border-box;width:100%;margin-top:6px;padding:11px 12px;border:1px solid var(--line);border-radius:10px;font:inherit;color:var(--ink);background:#fff}.chat-dialog textarea{line-height:1.7;resize:vertical}.chat-people{max-height:280px;overflow:auto;margin:15px 0;border:1px solid var(--line);border-radius:12px}.chat-person{display:flex;align-items:center;gap:11px;padding:12px;border-bottom:1px solid var(--line);line-height:1.5;min-width:0}.chat-person:last-child{border-bottom:0}.chat-person[hidden]{display:none}.chat-person input{accent-color:var(--green);flex-shrink:0}.chat-person>span:last-child{min-width:0}.chat-person b{font-size:12px;display:block;overflow-wrap:anywhere}.chat-person small{display:block;font-size:10px;color:var(--muted);overflow-wrap:anywhere}.chat-person .chat-avatar{width:33px;height:33px;border-radius:11px;font-size:13px}.chat-dialog-note{font-size:11px;line-height:1.7;background:#f1f5e9;color:var(--muted);border-radius:10px;padding:11px 13px}.chat-dialog-actions{display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap;margin-top:22px}.chat-dialog-error{font-size:12px;color:#a14631;margin-bottom:0}.chat-nav-count{margin-left:auto}.chat-shell button:focus-visible,.chat-shell input:focus-visible,.chat-dialog button:focus-visible{outline:2px solid var(--green);outline-offset:2px}
@media(pointer:coarse){.chat-message-actions{opacity:1}.chat-message-actions .chat-icon{width:30px;height:32px}}
@media(max-width:1100px){.chat-shell{grid-template-columns:255px minmax(0,1fr)}.chat-side-head{padding-left:14px;padding-right:10px}.chat-side-head b{font-size:14px}.chat-bubble-wrap{max-width:80%}.chat-timeline{padding:15px}.chat-message-actions{flex-direction:column}}
@media(max-width:760px){.chat-shell{display:block;height:calc(100dvh - 208px);min-height:510px;max-height:none;border-radius:17px}.chat-sidebar{height:100%;border-right:0}.chat-shell .chat-conversation{display:none;height:100%}.chat-shell.has-thread .chat-sidebar{display:none}.chat-shell.has-thread .chat-conversation{display:flex}.chat-back{display:inline-flex;width:28px}.chat-thread-head{padding:12px 10px;gap:8px}.chat-thread-head .chat-avatar{height:35px;width:35px;border-radius:12px;font-size:14px}.chat-thread-title h2{font-size:14px}.chat-thread-title small{font-size:9px}.chat-thread-search{margin:0 12px 8px}.chat-timeline{padding:10px 12px}.chat-bubble{padding:9px 11px;font-size:12px}.chat-message{gap:5px}.chat-bubble-wrap{max-width:78%}.chat-message-avatar{width:23px;height:23px;border-radius:8px;font-size:9px}.chat-message-actions{flex-direction:column;opacity:1}.chat-message-actions .chat-icon{height:27px;width:25px}.chat-compose{padding:10px 12px}.chat-compose-row{padding:8px 8px 8px 11px;gap:6px}.chat-compose textarea{font-size:16px;min-height:40px}.chat-compose-hint{font-size:8px}.chat-send{height:35px;width:35px}.chat-new-messages{bottom:138px}.chat-welcome h2{font-size:23px}.chat-room-line small{max-width:220px}.chat-dialog h2{font-size:20px}.chat-person{padding:11px 9px}.chat-reply-draft span{max-width:210px}.chat-unavailable{padding:26px 16px}}
@media(prefers-reduced-motion:reduce){.chat-message-actions{transition:none}}
.chat-media-toolbar{display:flex;align-items:center;gap:5px;position:relative;margin:-2px 0 8px;color:var(--muted)}.chat-media-toolbar>small{font-size:10px;margin-left:6px}.chat-media-toolbar .chat-icon{width:31px;height:30px}.chat-media-toolbar .chat-icon svg{width:18px;height:18px}.chat-file-preview{display:flex;gap:11px;align-items:center;padding:10px;margin-bottom:10px;background:#edf3e6;border:1px solid #d9e5d2;border-radius:12px}.chat-file-preview:empty{display:none}.chat-file-thumb{display:flex;align-items:center;justify-content:center;height:52px;width:58px;flex-shrink:0;border-radius:9px;overflow:hidden;background:#d9e8cd;color:var(--green)}.chat-file-thumb img{width:100%;height:100%;object-fit:cover}.chat-file-copy{min-width:0;flex:1}.chat-file-copy b{display:block;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-file-copy small,.chat-file-progress-text{display:block;font-size:9px;color:var(--muted);line-height:1.6}.chat-file-copy progress{width:100%;height:4px;accent-color:var(--green);margin-top:5px}.chat-file-copy progress[hidden]{display:none}.chat-attachment{position:relative;margin:-5px -7px 7px;max-width:280px;min-width:150px}.chat-media-open{display:flex;align-items:center;justify-content:center;flex-direction:column;overflow:hidden;position:relative;min-height:125px;min-width:180px;max-width:100%;width:260px;border:0;border-radius:11px;color:var(--green);background:#dce8d4;cursor:zoom-in;padding:0}.chat-media-open img{display:block;width:100%;height:auto;max-height:310px;object-fit:cover}.chat-image-loading{font-size:11px;padding:20px}.chat-media-open.is-video{min-height:155px;background:radial-gradient(ellipse at top,#3f7861,#153b30);color:#f1f5df;cursor:pointer;padding:18px}.chat-play{width:45px;height:45px;border:1px solid #ffffff70;border-radius:50%;display:grid;place-items:center;background:#ffffff15;backdrop-filter:blur(5px);margin-bottom:10px}.chat-play svg{height:19px;width:19px;margin-left:1px}.chat-media-open b{font-size:12px}.chat-media-open small{font-size:9px;max-width:210px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-top:6px;opacity:.8}.chat-media-retry{font-size:10px;display:block;margin:6px auto 0;padding:5px 10px;border:1px solid #c4d3bb;border-radius:20px;background:#fff;color:var(--green)}.chat-media-retry[hidden]{display:none}.chat-sticker-image{display:block;object-fit:contain;max-width:150px;height:auto;margin:0 auto;filter:drop-shadow(0 4px 5px #214c1e12)}.chat-message.sticker-message .chat-bubble{background:transparent;border:0;color:var(--ink);padding:0}.chat-message.sticker-message .chat-body{font-size:12px;padding:0 12px}.chat-body:empty{display:none}.chat-sticker-panel{position:absolute;bottom:40px;left:0;width:340px;max-width:calc(100vw - 100px);border:1px solid #dce5d3;border-radius:18px;background:var(--chat-paper,#fff);box-shadow:0 14px 45px #193b2630;z-index:4;overflow:hidden}.chat-sticker-panel[hidden]{display:none}.chat-sticker-title{display:flex;align-items:center;justify-content:space-between;padding:13px 15px;border-bottom:1px solid var(--line);gap:10px}.chat-sticker-title b{color:var(--green);font-size:13px}.chat-sticker-title small{font-size:9px;color:var(--muted)}.chat-sticker-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));padding:9px;gap:4px;max-height:310px;overflow:auto}.chat-sticker-grid button{border:0;border-radius:12px;background:transparent;padding:3px;cursor:pointer}.chat-sticker-grid button:hover{background:#eff5e6}.chat-sticker-grid img{display:block;width:100%;height:auto;transition:transform .18s}.chat-sticker-grid button:hover img{transform:translateY(-3px) rotate(-4deg)}.chat-drop-active .chat-conversation{outline:3px dashed #80a96f;outline-offset:-7px}.chat-media-viewer{width:min(820px,80vw);max-width:none}.chat-media-viewer h2{font-size:17px}.chat-media-stage{display:flex;align-items:center;justify-content:center;border-radius:15px;background:#102c22;min-height:180px;overflow:hidden;margin-top:17px}.chat-media-stage>img,.chat-media-stage>video{display:block;max-width:100%;max-height:65dvh;object-fit:contain}.chat-media-stage>video{width:100%}.chat-media-viewer>p{overflow-wrap:anywhere;font-size:11px}.chat-media-viewer .chat-dialog-actions{margin-top:12px}.chat-video-help:empty{display:none}
@media(max-width:760px){.chat-sticker-panel{width:280px;max-width:calc(100vw - 65px);bottom:38px;left:0}.chat-sticker-grid{max-height:245px}.chat-sticker-title{padding:11px}.chat-sticker-title small{font-size:8px}.chat-media-toolbar>small{font-size:8px}.chat-file-preview{padding:8px;gap:7px}.chat-file-thumb{height:44px;width:44px}.chat-file-copy b{font-size:10px}.chat-file-copy small,.chat-file-progress-text{font-size:8px}.chat-media-open{width:210px;min-width:125px;min-height:100px}.chat-attachment{min-width:110px;max-width:100%}.chat-media-open img{max-height:235px}.chat-media-open.is-video{min-height:125px;padding:12px}.chat-sticker-image{max-width:125px}.chat-media-viewer{width:calc(100vw - 66px)}.chat-media-stage>img,.chat-media-stage>video{max-height:55dvh}}
@media(prefers-reduced-motion:reduce){.chat-sticker-grid img{transition:none}}

#modal:has(.chat-media-viewer){width:min(900px,94vw);max-width:94vw}.chat-media-viewer{width:100%}

@media(max-width:760px){.chat-sticker-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}

.chat-document{margin:-3px -5px 5px}.chat-document-open{display:flex;align-items:center;gap:12px;padding:15px;border:1px solid #d3dfc8;border-radius:12px;background:#f1f5e9;color:#285b44;max-width:280px;text-align:left;cursor:pointer}.chat-document-open>svg{height:32px;width:28px;flex-shrink:0}.chat-document-open>span{min-width:0}.chat-document-open b{font-size:12px;display:block;overflow-wrap:anywhere}.chat-document-open small{display:block;font-size:9px;margin-top:6px;opacity:.7}.document-stage{background:#f1f5e9;min-height:210px}.chat-document-summary{display:flex;align-items:center;flex-direction:column;gap:14px;text-align:center;padding:22px;color:var(--green)}.chat-document-summary svg{height:56px;width:48px}.chat-document-summary b{font-size:15px;overflow-wrap:anywhere}.chat-document-summary small{font-size:11px;color:var(--muted)}@media(max-width:760px){.chat-document-open{padding:11px;gap:8px}.chat-document-open b{font-size:11px}.chat-document-open small{font-size:8px}.chat-media-toolbar>small{font-size:7px}}
