.chat-global-link{position:relative}.chat-global-link #chat-global-unread{position:absolute;top:-6px;right:-7px;min-width:17px;height:17px;border:2px solid #fff;border-radius:20px;background:#c66c75;color:white;font:600 9px/13px system-ui;text-align:center;padding:0 2px}.chat-global-link [hidden]{display:none!important}
.app-page .workspace:has(.chat-app){padding:20px;display:flex;flex-direction:column;overflow:hidden;max-width:none}.chat-app{display:grid;grid-template-columns:285px minmax(0,1fr);flex:1;min-height:0;width:100%;border:1px solid #dbe6eb;border-radius:18px;background:#fff;box-shadow:0 7px 32px #214c6006;overflow:hidden;color:var(--ink)}.chat-app [hidden],.chat-dialog [hidden]{display:none!important}
.chat-rail{display:flex;flex-direction:column;min-height:0;background:#f8fafc;border-right:1px solid #e0e9ed}.chat-rail>header{display:flex;align-items:center;justify-content:space-between;padding:20px 17px 14px;gap:10px}.chat-rail>header>div{display:flex;align-items:center;gap:10px}.chat-rail h1{font-size:22px;margin:0;letter-spacing:-.6px}.chat-kicker{color:var(--teal);font-size:19px}.chat-icon{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:32px;height:32px;padding:0;border-radius:9px;border:0;background:transparent;color:#657f8b;font-size:14px;line-height:1;text-align:center}.chat-icon>.fa-solid{margin:0;font-size:inherit}.chat-icon:hover{background:#e5eff3;color:var(--teal)}.chat-icon:disabled{opacity:.4;cursor:wait}.chat-search{display:flex;align-items:center;gap:8px;margin:0 15px;padding:0 10px;border:1px solid #dae5ea;border-radius:9px;background:#fff;color:#92a8b1}.chat-search input{min-width:0;min-height:36px;padding:7px 0;font-size:11px;border:0;background:transparent;margin:0;box-shadow:none;outline:none;width:100%}.chat-search:focus-within{border-color:var(--teal);outline:2px solid #347e9115}.chat-rail-status{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 16px}.chat-rail-status>span{font-size:9px;color:#a08354}.chat-rail-status>span:before{content:'';display:inline-block;width:6px;height:6px;border-radius:50%;background:#c9a771;margin-right:6px}.chat-rail-status>span.is-live{color:#64867a}.chat-rail-status>span.is-live:before{background:#6caa8c}.chat-rail-status button{font-size:11px;width:26px;height:26px}
.chat-room-list{overflow-y:auto;overscroll-behavior:contain;min-height:0;flex:1;padding:0 9px 14px}.chat-room{display:flex;align-items:center;gap:10px;width:100%;padding:12px 10px;background:transparent;color:var(--ink);text-align:left;border-radius:11px;border:1px solid transparent;margin:3px 0}.chat-room:hover{background:#edf3f6}.chat-room.is-active{background:#e7f1f4;border-color:#d4e6ec}.chat-avatar{position:relative;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:38px;height:38px;background:linear-gradient(135deg,#e2eef3,#e8e7f2);color:#58808c;font-size:12px;font-weight:650;border-radius:13px}.chat-avatar.is-online:after{content:'';position:absolute;right:-1px;bottom:-1px;width:10px;height:10px;border-radius:50%;border:2px solid #f8fafc;background:#7eac93}.chat-room-copy{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}.chat-room-copy strong{font-size:12px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-room-copy small{font-size:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#8b9aa3;font-weight:400}.chat-room.has-unread .chat-room-copy strong,.chat-room.has-unread .chat-room-copy small{color:#305f72;font-weight:650}.chat-room-meta{display:flex;flex-direction:column;align-items:flex-end;gap:8px;flex-shrink:0}.chat-room-meta time{font-size:9px;color:#95a6ae;font-weight:400}.chat-unread{font-size:9px;background:var(--teal);color:white;padding:1px 5px;min-width:18px;text-align:center;border-radius:6px}.chat-list-empty{font-size:12px;text-align:center;padding:30px 14px;color:var(--muted)}
.chat-conversation{min-height:0;min-width:0;position:relative;background:#fff;display:flex;flex-direction:column}.chat-welcome{display:flex;flex:1;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:35px;min-height:350px;background:radial-gradient(ellipse at center,#f1f7f8,white 70%)}.chat-welcome-icon{width:90px;height:90px;display:grid;place-items:center;border:1px solid #d8e9ee;background:linear-gradient(145deg,#edf7f8,#e7e9f4);border-radius:30px;color:var(--teal);font-size:35px;transform:rotate(-8deg);margin-bottom:25px}.chat-welcome h2{font-size:25px;letter-spacing:-.6px;margin:0 0 12px}.chat-welcome p{font-size:13px;color:var(--muted);max-width:350px;margin-bottom:25px}.chat-welcome button{font-size:12px;padding:10px 17px;border-radius:9px}
#chat-room-content{display:flex;flex-direction:column;flex:1;min-height:0;min-width:0}.chat-room-header{display:flex;align-items:center;gap:12px;flex-shrink:0;padding:16px 22px;border-bottom:1px solid #e5ecef;background:#fff}.chat-room-heading{min-width:0;flex:1}.chat-room-heading h2{font-size:15px;margin:0 0 3px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-room-heading p{font-size:10px;margin:0;color:#8b9da5}.chat-header-tools{display:flex;gap:4px}.chat-back{display:none}.chat-message-search{padding:10px 20px;display:flex;align-items:center;gap:8px;flex-shrink:0;background:#f5f9fa;border-bottom:1px solid var(--line)}.chat-message-search input{margin:0;min-height:34px;padding:6px 10px;border-radius:7px;font-size:12px}.chat-message-search button{margin:0;font-size:11px;flex-shrink:0}
.chat-feed{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;padding:14px 26px 12px;background:linear-gradient(180deg,#fafcfd,#f8fafc);scrollbar-gutter:stable}.chat-history-toolbar{text-align:center}.chat-history-toolbar button{font-size:10px;padding:5px 12px;border-radius:7px;background:#eff4f6;color:#6a8995;margin:0 0 8px}.chat-day{display:flex;align-items:center;gap:15px;justify-content:center;font-size:9px;color:#9aaab2;margin:18px 0 22px}.chat-day:before,.chat-day:after{content:'';height:1px;background:#e6edf0;flex:1}.chat-message{position:relative;display:flex;align-items:flex-start;gap:10px;margin-bottom:20px;min-width:0}.chat-message>.chat-avatar{width:29px;height:29px;border-radius:10px;font-size:9px;margin-top:21px}.chat-message-content{display:flex;flex-direction:column;align-items:flex-start;min-width:0;max-width:calc(100% - 40px)}.chat-message-meta{display:flex;align-items:baseline;gap:9px;font-size:9px;color:#9aaab1;margin-bottom:5px;flex-wrap:wrap}.chat-message-meta strong{font-size:10px;font-weight:600;color:#5f7b88}.chat-message-meta small{font-size:8px}.chat-bubble{border:1px solid #e2e9ee;border-radius:0 13px 13px 13px;background:#fff;padding:10px 14px;min-width:50px;max-width:100%;box-shadow:0 2px 5px #254b6403}.chat-message.is-own{flex-direction:row-reverse}.chat-message.is-own .chat-message-content{align-items:flex-end}.chat-message.is-own .chat-message-meta{flex-direction:row-reverse}.chat-message.is-own .chat-bubble{background:#eaf3f6;border-color:#dce9ef;border-radius:13px 0 13px 13px}.chat-message-body{font-size:12px;line-height:1.7;overflow-wrap:anywhere;min-width:0;max-width:100%}.chat-prose{white-space:pre-wrap}.chat-prose a{text-decoration:underline;text-underline-offset:2px}.chat-inline-code{font-size:11px;background:#e8edf2;border-radius:4px;padding:2px 5px;color:#4f617a}.chat-code-block{border:1px solid #d8e1eb;border-radius:8px;overflow:hidden;max-width:100%;margin:8px 0;background:#202f42;color:#e0e9f4}.chat-code-block header{display:flex;align-items:center;justify-content:space-between;gap:20px;background:#293b51;padding:4px 9px;color:#a8bfd3;font:10px system-ui}.chat-code-block .chat-icon{color:#b3c9da;width:24px;height:24px;border-radius:5px;font-size:11px}.chat-code-block .chat-icon:hover{background:#3a516a}.chat-code-block pre{white-space:pre;tab-size:4;overflow:auto;max-width:100%;margin:0;padding:13px 15px;font:11px/1.7 ui-monospace,SFMono-Regular,Consolas,monospace;color:inherit;scrollbar-width:thin}.chat-code-block code{font:inherit;color:inherit;background:transparent}.chat-quote{display:flex;flex-direction:column;gap:3px;border-left:3px solid #8daeba;background:#eaf0f440;margin:0 0 10px;padding:5px 9px;font-size:10px;max-width:100%;overflow-wrap:anywhere}.chat-quote strong{font-size:9px;color:var(--teal)}.chat-deleted{font-size:11px;color:#99a6b0}.chat-message-tools{display:flex;gap:2px;opacity:0;transition:opacity .15s;margin-top:3px}.chat-message:hover .chat-message-tools,.chat-message:focus-within .chat-message-tools{opacity:1}.chat-message-tools .chat-icon{width:25px;height:25px;border-radius:6px;font-size:10px}.chat-read{font-size:8px;color:#9babba;max-width:300px;text-align:right;line-height:1.5;margin-top:3px}.chat-reactions{display:flex;flex-wrap:wrap;gap:4px;margin-top:4px}.chat-reactions:empty{display:none}.chat-reaction{padding:2px 7px;background:#fff;border:1px solid #e2e9ec;color:#6c7f89;font-size:10px;border-radius:20px;line-height:1.6}.chat-reaction:hover,.chat-reaction.is-mine{border-color:#b1d0da;background:#e9f4f6}.chat-attachments{display:grid;gap:7px;min-width:180px;margin-top:5px}.chat-file{display:flex;align-items:center;gap:11px;padding:10px;background:#f3f7f9;border:1px solid #dce7ed;border-radius:8px;color:#547c8e;max-width:100%;min-width:0}.chat-file:hover{text-decoration:none;background:#eaf2f5}.chat-file>i:first-child{font-size:23px}.chat-file>i:last-child{font-size:10px;margin-left:auto}.chat-file>span{min-width:0}.chat-file strong{display:block;font-size:11px;font-weight:600;overflow-wrap:anywhere}.chat-file small{font-size:9px;color:#93a6b0}.chat-new-messages{position:absolute;right:25px;bottom:220px;border:1px solid #cde1e8;background:#fff;color:var(--teal);border-radius:20px;font-size:11px;padding:7px 13px;box-shadow:0 3px 12px #245f6d15;z-index:1}.chat-typing{min-height:23px;padding:3px 24px;font-size:10px;color:#89a0ac;background:#f8fafc;flex-shrink:0}.chat-error{padding:10px 18px;color:#a45d59;font-size:11px;background:#fcf0ed;flex-shrink:0}
.chat-composer{position:relative;flex-shrink:0;padding:10px 20px 13px;background:#fff;border-top:1px solid #e7eef1}.chat-composer textarea{display:block;width:100%;resize:vertical;min-height:65px;max-height:180px;padding:10px 12px;border:1px solid #d8e4ea;border-radius:10px;font:12px/1.6 system-ui;color:var(--ink);background:#fbfdfe;margin:0;outline-color:var(--teal)}.chat-composer-tools{display:flex;align-items:center;gap:8px;margin-top:8px}.chat-composer-tools>div{display:flex;gap:1px;align-items:center}.chat-composer-tools>small{font-size:9px;color:#9babb3}.chat-composer-tools>button{margin-left:auto;padding:8px 13px;font-size:11px;border-radius:8px;min-width:85px}.chat-composer-tools>div .chat-icon{width:29px;height:29px;font-size:13px}.chat-reply-bar{display:flex;align-items:center;justify-content:space-between;padding:5px 9px;margin-bottom:8px;border-left:3px solid #8cbdca;background:#eef6f8;border-radius:5px;font-size:10px;color:#6d8c99}.chat-reply-bar>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.chat-selected-files{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:7px}.chat-selected-files:empty{display:none}.chat-file-chip{display:flex;align-items:center;gap:6px;padding:4px 7px;border-radius:7px;border:1px solid #d9e5eb;background:#f4f8fa;font-size:9px;color:var(--muted);min-width:0;max-width:100%}.chat-file-chip>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.chat-file-chip .chat-icon{width:21px;height:21px;font-size:9px}.chat-drop-hint{position:absolute;inset:4px;background:#e7f4f9ed;border:2px dashed #90bbc9;border-radius:11px;display:flex;align-items:center;justify-content:center;gap:15px;font-size:16px;color:var(--teal);pointer-events:none}
.chat-dialog{padding:0;border:1px solid var(--line);border-radius:18px;color:var(--ink);width:min(580px,calc(100vw - 28px));max-height:calc(100dvh - 60px);box-shadow:0 25px 100px #18384730;overflow:hidden}.chat-dialog[open]{display:flex;flex-direction:column}.chat-dialog::backdrop{background:#18394770}.chat-dialog>header{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:17px 22px;border-bottom:1px solid var(--line);flex-shrink:0}.chat-dialog>header h2{font-size:17px;margin:0}.chat-dialog-body{padding:20px 22px;overflow:auto;min-height:0}.chat-dialog-body p{font-size:12px}.chat-dialog label{font-size:12px;margin:0 0 15px}.chat-dialog input,.chat-dialog select,.chat-dialog textarea{font-size:12px;border-radius:8px;min-height:38px;padding:9px 11px;margin-top:7px;width:100%}.chat-dialog textarea{resize:vertical;min-height:100px;max-height:55vh}.chat-dialog button[type=submit],.chat-dialog-body>button{font-size:12px;padding:9px 16px;border-radius:8px}.chat-modal-form>button[type=submit]{display:block;margin:18px 0 0 auto}.chat-member-choices{max-height:230px;overflow:auto;border:1px solid var(--line);border-radius:8px;padding:6px 12px;margin-top:10px}.chat-member-choices label{display:flex;flex-direction:row-reverse;align-items:center;justify-content:flex-end;gap:10px;padding:9px 0;margin:0;font-size:12px;border-bottom:1px solid #f0f4f6;font-weight:400}.chat-member-choices label:last-child{border:0}.chat-member-choices input{min-height:16px;width:16px;height:16px;padding:0;margin:0;flex-shrink:0}.chat-modal-hint{font-size:10px!important;color:var(--muted);line-height:1.7;margin-top:12px}.chat-dialog-error{color:#ad6059;background:#fff0ed;padding:12px;border-radius:9px;margin:14px 0 0}.chat-code-input{font:12px/1.6 ui-monospace,SFMono-Regular,Consolas,monospace!important;tab-size:4;background:#f8fafc}.chat-member-row{display:flex;align-items:center;gap:12px;margin:12px 0}.chat-member-row strong{font-size:12px}.chat-member-row small{margin-left:auto;font-size:10px;color:var(--muted)}.chat-emoji-grid{display:flex;gap:8px;flex-wrap:wrap}.chat-emoji-grid button{font-size:23px;padding:10px;border-radius:10px}
@media(min-width:701px){.chat-app{height:100%;min-height:0}}
@media(max-width:1200px){.chat-app{grid-template-columns:240px minmax(0,1fr)}.chat-feed{padding-left:17px;padding-right:17px}.chat-composer-tools>small{display:none}}
@media(max-width:900px){.app-page .workspace:has(.chat-app){padding:12px}.chat-app{grid-template-columns:210px minmax(0,1fr)}.chat-rail>header{padding:16px 12px}.chat-room{gap:8px;padding:11px 7px}.chat-room>.chat-avatar{width:31px;height:31px;border-radius:11px;font-size:10px}.chat-room-copy strong{font-size:11px}.chat-room-copy small{font-size:9px}.chat-room-meta time{display:none}.chat-room-header{padding:13px}.chat-composer{padding:10px 12px}.chat-feed{padding:10px 12px}.chat-message-content{max-width:calc(100% - 30px)}.chat-message>.chat-avatar{width:24px;height:24px;font-size:8px}}
@media(max-width:700px){.app-page .workspace:has(.chat-app){padding:8px}.chat-app{display:flex;border-radius:12px;min-height:0}.chat-rail{width:100%;border:0}.chat-conversation{display:none}.chat-app.has-room .chat-rail{display:none}.chat-app.has-room .chat-conversation{display:flex;width:100%;flex:1}.chat-back{display:inline-flex}.chat-room-copy strong{font-size:13px}.chat-room-copy small{font-size:11px}.chat-room-meta time{display:block}.chat-room>.chat-avatar{width:39px;height:39px;font-size:12px}.chat-room-header{gap:8px}.chat-room-header>.chat-avatar{display:none}.chat-room-heading h2{font-size:14px}.chat-feed{padding:8px}.chat-message>.chat-avatar{display:none}.chat-message-content{max-width:93%}.chat-bubble{padding:9px 11px}.chat-message-tools{opacity:1}.chat-message{margin-bottom:13px}.chat-code-block pre{font-size:10px}.chat-composer textarea{min-height:60px}.chat-composer-tools>button{min-width:70px}.chat-composer-tools>div .chat-icon{width:27px}.chat-dialog-body{padding:17px}.chat-new-messages{bottom:210px;right:14px}}
.chat-avatar>img{width:100%;height:100%;object-fit:cover;border-radius:inherit}.chat-shared-files{display:grid;gap:9px;margin-bottom:16px}.chat-shared-files .chat-file{min-width:0}
@media(hover:none){.chat-message-tools{opacity:1}}
@media(max-width:480px){.header-actions .profile-name{display:none}.header-actions .profile-toggle{max-width:45px;padding:5px 3px}.header-actions .language-switch select{max-width:60px}.app-page .header-brand{width:76px}}
