:root{
  --bg:#f4f5f8;--panel:#fff;--sidebar:#f2f3f6;--line:#e4e6eb;--text:#30333a;--muted:#8a8e97;
  --primary:#5866d9;--primary-soft:#ecefff;--danger:#d95b62;--success:#31a267;--warning:#d7a52f;
  --shadow:0 16px 50px rgba(24,31,52,.18);--radius:12px;--font:-apple-system,BlinkMacSystemFont,"SF Pro Text","SF Pro Display","Helvetica Neue",Arial,sans-serif;
}
*{box-sizing:border-box}
[hidden]{display:none!important}
html,body,#app{height:100%;margin:0}
body{font-family:var(--font);font-size:13px;font-weight:400;letter-spacing:-.01em;color:var(--text);background:var(--bg);overflow:hidden;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
body.font-large{font-size:14px}
button,input,textarea,select{font:inherit;color:inherit}
button{cursor:pointer}
a{color:#226be0}

.boot-view,.auth-view{height:100%;display:grid;place-items:center;background:linear-gradient(135deg,#f7f7fb,#eef0f7)}
.boot-brand,.brand-lockup{display:flex;align-items:center;gap:12px}
.boot-brand{padding:18px 22px;border-radius:16px;background:#fff;box-shadow:var(--shadow)}
.boot-brand span,.brand-lockup span{display:block;color:var(--muted);font-size:12px;margin-top:2px}
.brand-mark,.workspace-logo{display:grid;place-items:center;background:linear-gradient(135deg,#7d63eb,#8b6df1);color:#fff;font-weight:800;border-radius:12px}
.brand-mark{width:48px;height:48px}
.auth-card{width:min(420px,calc(100vw - 32px));background:#fff;border-radius:18px;padding:28px;box-shadow:var(--shadow)}
.auth-card h1{margin:24px 0 6px;font-size:25px}.auth-card>p{color:var(--muted);margin:0 0 20px}
.stack-form,.settings-fields{display:grid;gap:14px}
label{display:grid;gap:6px;font-size:12px;font-weight:650;color:#555a64}
input,textarea,select{width:100%;border:1px solid #dfe2e8;border-radius:9px;background:#fff;padding:10px 11px;outline:none}
input:focus,textarea:focus,select:focus{border-color:#9aa4ea;box-shadow:0 0 0 3px rgba(88,102,217,.10)}
textarea{resize:none}

.chat-shell{height:100%;display:grid;grid-template-columns:320px minmax(0,1fr);background:#fff}
.chat-shell.panel-open{grid-template-columns:320px minmax(0,1fr) 390px}
.sidebar{min-width:0;display:grid;grid-template-rows:auto auto auto minmax(0,1fr) auto;background:var(--sidebar);border-right:1px solid var(--line);overflow:hidden}
.workspace-row{display:grid;grid-template-columns:38px minmax(0,1fr) 32px;gap:10px;align-items:center;padding:14px 14px 10px}
.workspace-logo{width:38px;height:38px;border-radius:10px}.workspace-name-wrap{min-width:0}.workspace-name-wrap strong,.workspace-name-wrap span{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.workspace-name-wrap span{color:var(--muted);font-size:11px;margin-top:2px}
.icon-btn{border:0;background:transparent;width:32px;height:32px;border-radius:8px;display:grid;place-items:center}.icon-btn:hover{background:#e5e7ed}
.sidebar-search{margin:4px 14px 8px;height:38px;border:1px solid #e0e2e8;background:#e7e8ed;border-radius:10px;color:#757983;display:flex;align-items:center;gap:8px;padding:0 10px}.sidebar-search span:nth-child(2){flex:1;text-align:left}.sidebar-search kbd{font-size:10px;border:1px solid #cfd2d9;border-radius:5px;padding:2px 5px;background:#f4f5f8}
.quick-nav{padding:2px 8px 8px;border-bottom:1px solid var(--line)}.quick-nav button{width:100%;height:34px;border:0;background:transparent;border-radius:8px;display:grid;grid-template-columns:24px 1fr auto;align-items:center;text-align:left;color:#656a74;padding:0 8px}.quick-nav button:hover{background:#e7e9ef}.pill,.unread-dot{background:#5e6ada;color:#fff;border-radius:999px;font-size:10px;min-width:20px;padding:2px 6px;text-align:center}
.sidebar-scroll{min-height:0;overflow:auto;padding:10px 8px 14px;overscroll-behavior:contain}.department-bar,.section-head{display:flex;align-items:center;gap:6px}.department-bar{margin-bottom:5px}.department-picker{min-width:0;flex:1;border:0;background:transparent;border-radius:8px;padding:7px 7px;display:flex;align-items:center;gap:7px}.department-picker strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.department-picker:hover{background:#e6e8ee}.section-head{justify-content:space-between;margin:16px 6px 5px;color:#777c87;font-size:10px;font-weight:800;letter-spacing:.05em}
.nav-list{display:grid;gap:2px}.nav-item{width:100%;border:0;background:transparent;display:grid;grid-template-columns:29px minmax(0,1fr) auto;align-items:center;gap:5px;text-align:left;padding:6px 8px;border-radius:8px;color:#686d77}.nav-item:hover{background:#e6e8ee}.nav-item.active{background:#dfe4f7;color:#454b5b}.nav-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.nav-icon{text-align:center}.avatar-wrap{position:relative;width:max-content}.avatar{width:30px;height:30px;border-radius:9px;background:#dfe3ec;background-position:center;background-size:cover;display:grid;place-items:center;font-size:11px;font-weight:800;color:#58606f;flex:none}.avatar.xl{width:78px;height:78px;border-radius:18px;font-size:22px}.avatar.xxl{width:82px;height:82px;border-radius:19px;font-size:24px}.status-dot{position:absolute;right:-1px;bottom:-1px;width:10px;height:10px;border-radius:50%;border:2px solid #fff;background:#9ca1aa}.status-dot.online{background:#32a76a}.status-dot.busy{background:#dc5b62}.status-dot.away{background:#d4a42e}.status-dot.call{background:#4f79db}.status-dot.offshift{background:#9ca1aa}
.profile-footer{border-top:1px solid var(--line);padding:8px;background:#eef0f4;position:relative;z-index:4}.me-row{width:100%;height:48px;border:0;background:transparent;border-radius:10px;display:grid;grid-template-columns:34px minmax(0,1fr) 26px;align-items:center;gap:8px;text-align:left;padding:5px 7px}.me-row:hover{background:#e0e3e9}.me-copy{min-width:0}.me-copy strong,.me-copy small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.me-copy small{color:var(--muted);font-size:10px}

.main-panel{min-width:0;height:100%;display:grid;grid-template-rows:58px 66px auto minmax(0,1fr) auto auto auto;background:#fff;position:relative;overflow:hidden}
.topbar{display:flex;align-items:center;gap:10px;border-bottom:1px solid var(--line);padding:0 16px;background:#f7f8fa}.top-search{height:36px;flex:1;max-width:650px;border:0;background:#e7e9ee;border-radius:9px;color:#7b808a;display:flex;align-items:center;gap:8px;padding:0 12px;text-align:left}.top-actions{margin-left:auto;display:flex;align-items:center;gap:8px}.connection-state{display:flex;align-items:center;gap:5px;color:#7f848d;font-size:11px}.connection-state i{width:8px;height:8px;border-radius:50%;background:#34a853}.connection-state.bad i{background:#d9534f}.connection-state.sync i{background:#d6a228}
.thread-header{min-height:66px;border-bottom:1px solid var(--line);display:flex;align-items:center;padding:10px 18px;gap:12px}.thread-title-block{min-width:0;flex:1}.thread-title-row{display:flex;align-items:center;gap:7px;font-size:15px}.thread-icon{font-size:16px}.thread-topic{margin-top:3px;color:#858891;font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.private-badge{padding:2px 6px;background:#eeeafd;color:#6d5ce7;border-radius:5px;font-size:9px}.thread-actions{display:flex;gap:6px}.soft-btn{border:0;background:#f1f2f6;border-radius:8px;padding:8px 10px}.soft-btn:hover{background:#e7e9ef}.connection-banner{padding:8px 14px;background:#fff5d6;color:#7a6422;border-bottom:1px solid #ead894}
.messages{min-height:0;overflow:auto;padding:12px 0 24px;overscroll-behavior:contain}.day-divider{display:flex;align-items:center;gap:10px;margin:14px 18px;color:#999da5;font-size:10px}.day-divider:before,.day-divider:after{content:"";height:1px;background:#eceef1;flex:1}.message{position:relative;display:grid;grid-template-columns:40px minmax(0,1fr);gap:10px;padding:7px 18px}.message:hover{background:#fafafb}.message-avatar{grid-row:1/span 2;cursor:pointer}.message-main{min-width:0}.message-meta{display:flex;align-items:center;gap:8px}.message-author{font-weight:750;cursor:pointer}.message-author:hover{text-decoration:underline}.message-time{font-size:10px;color:#a0a3aa}.edited{font-size:9px;color:#a0a3aa}.message-body{margin-top:2px;white-space:pre-wrap;word-break:break-word;line-height:1.45}.message-body strong{font-weight:800}.message-body em{font-style:italic}.message-body s{text-decoration:line-through}.mention{color:#1b6f73;background:#d6f5f3;border-radius:4px;padding:0 3px}.reply-quote{margin:5px 0;padding:7px 9px;border-left:3px solid #8f82ec;background:#f5f3ff;border-radius:0 7px 7px 0;font-size:11px;color:#666a74}.attachment-card{margin-top:7px;display:flex;gap:9px;align-items:center;max-width:430px;padding:9px 10px;border:1px solid #e0e3e9;border-radius:10px;text-decoration:none;color:inherit;background:#fbfbfc}.attachment-card small{color:var(--muted)}.message-actions{position:absolute;right:16px;top:-15px;display:none;background:#fff;border:1px solid #e2e4e8;border-radius:8px;box-shadow:0 6px 18px rgba(36,40,52,.1);padding:2px;z-index:2}.message:hover .message-actions{display:flex}.message-actions button{width:30px;height:29px;border:0;background:transparent;border-radius:6px}.message-actions button:hover{background:#f0f1f4}.reaction-row{display:flex;gap:4px;flex-wrap:wrap;margin-top:5px}.reaction{border:1px solid #dde0e6;border-radius:999px;background:#fff;padding:2px 7px;font-size:11px}.reaction.mine{background:#eeebff;border-color:#cfc7ff}.thread-link{display:inline-flex;align-items:center;gap:4px;border:0;background:transparent;color:#5574c5;padding:4px 0;font-size:11px}.announcement-card{border-left:3px solid #f2b72c}.ack-row{margin-top:6px;font-size:10px;color:#81723a}.ack-btn{border:0;border-radius:6px;background:#fff3c9;padding:5px 8px;color:#68571b}
.composer{margin:0 18px 16px;border:1px solid #dfe2e7;border-radius:12px;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:end;padding:8px;background:#fff;position:relative;z-index:3}.composer:focus-within{border-color:#8fa0ee;box-shadow:0 0 0 2px rgba(88,102,217,.08)}.composer.dragging{border-color:#5866d9;background:#f5f6ff;box-shadow:0 0 0 3px rgba(88,102,217,.12)}.composer-tools{display:flex;align-items:center;flex-wrap:wrap;max-width:250px}.tool-btn{width:31px;height:31px;border:0;border-radius:7px;background:transparent;font-weight:700}.tool-btn:hover{background:#f0f1f5}.composer textarea{border:0;box-shadow:none!important;min-height:36px;max-height:180px;padding:8px}.send-btn{width:34px;height:34px;border:0;border-radius:8px;background:#6370dd;color:#fff;display:grid;place-items:center}.send-btn:hover{background:#5260d1}.reply-bar{margin:0 18px;border:1px solid #dedfe5;border-bottom:0;border-radius:10px 10px 0 0;padding:8px 10px;display:flex;align-items:center;gap:10px;background:#fafafd}.reply-bar>div{min-width:0;flex:1}.reply-bar small{color:#6f62d8}.reply-bar #replyText{font-size:11px;color:#777;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.draft-state,.upload-state{margin:-9px 18px 7px;color:#8d9097;font-size:10px}.jump-bottom{position:absolute;right:24px;bottom:92px;border:0;border-radius:18px;background:#6373db;color:#fff;padding:8px 13px;box-shadow:0 7px 18px rgba(46,56,110,.26)}

.context-panel{min-width:0;background:#fff;border-left:1px solid var(--line);display:flex;flex-direction:column;height:100%;overflow:hidden}.panel-head{height:58px;border-bottom:1px solid var(--line);display:flex;align-items:center;padding:0 13px 0 16px;flex:none}.panel-head>div{display:flex;flex-direction:column;flex:1}.panel-head small{color:var(--muted);font-size:9px}.thread-root{padding:12px;border-bottom:1px solid var(--line);flex:none}.thread-replies{flex:1;overflow:auto;padding:8px 0}.thread-reply{display:grid;grid-template-columns:32px 1fr;gap:8px;padding:8px 14px}.thread-reply p{margin:2px 0;white-space:pre-wrap}.thread-composer{border-top:1px solid var(--line);padding:10px;flex:none}.thread-composer textarea{margin-bottom:7px}.thread-composer>div{display:flex;justify-content:space-between}.members-panel-actions{padding:10px 12px;border-bottom:1px solid var(--line);text-align:right}.members-panel-list{overflow:auto;padding:8px 10px}.member-row{display:grid;grid-template-columns:36px minmax(0,1fr) auto;gap:9px;align-items:center;padding:9px 7px;border-radius:9px}.member-row:hover{background:#f5f6f8}.member-copy{min-width:0}.member-copy strong,.member-copy small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.member-copy small{color:var(--muted)}.member-controls{display:flex;align-items:center;gap:5px}.member-role{width:auto;min-width:92px;padding:6px 8px}.remove-member{border:0;background:transparent;color:#c34c54;border-radius:7px;padding:7px}.remove-member:hover{background:#fff0f1}.channel-note{padding:10px 12px;background:#f7f8fb;color:#757b86;font-size:11px;border-bottom:1px solid var(--line)}

.modal{border:0;padding:0;background:transparent}.modal::backdrop{background:rgba(24,27,34,.42);backdrop-filter:blur(2px)}.modal-card{width:min(500px,calc(100vw - 28px));max-height:88vh;overflow:auto;background:#fff;border-radius:14px;padding:20px;box-shadow:var(--shadow)}.large-card{width:min(760px,calc(100vw - 28px))}.modal-head{display:flex;align-items:flex-start;gap:12px;margin-bottom:14px}.modal-head>div{flex:1}.modal-head h3{margin:0;font-size:19px}.modal-head p{margin:3px 0 0;color:var(--muted);font-size:11px}.modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:16px}.modal-actions.split{justify-content:space-between}.modal-actions>div{display:flex;gap:7px}.btn{border:0;border-radius:8px;padding:9px 13px;font-weight:700}.btn.small{padding:7px 10px;font-size:11px}.btn.full{width:100%}.btn.primary{background:#315fd3;color:#fff}.btn.primary:hover{background:#2853c0}.btn.secondary{background:#eef1f9;color:#3f506f}.btn.ghost{background:transparent;color:#5f6570}.btn.danger{background:#fff0f1;color:#c54851}.form-error{background:#fff0f1;color:#b3464d;padding:8px 10px;border-radius:8px}.form-success{background:#ecf8f0;color:#2d7e4d;padding:8px 10px;border-radius:8px}

.settings-card{width:min(780px,calc(100vw - 30px));height:min(620px,calc(100vh - 30px));background:#fff;border-radius:15px;box-shadow:var(--shadow);display:grid;grid-template-rows:64px minmax(0,1fr) 64px;overflow:hidden}.settings-head{display:flex;align-items:center;padding:0 22px;border-bottom:1px solid var(--line)}.settings-head h3{margin:0;flex:1;font-size:20px}.settings-layout{display:grid;grid-template-columns:200px minmax(0,1fr);min-height:0}.settings-nav{border-right:1px solid var(--line);padding:15px 12px;display:flex;flex-direction:column;gap:4px;background:#fbfbfc}.settings-nav-title{font-size:10px;font-weight:800;color:#858a95;margin:10px 8px 4px}.settings-tab{border:0;background:transparent;border-radius:8px;padding:10px 11px;text-align:left;color:#5f6570}.settings-tab:hover{background:#f0f2f7}.settings-tab.active{background:#e9edfb;color:#2859c8;font-weight:750}.settings-content{overflow:auto;padding:22px 28px}.settings-pane{display:none}.settings-pane.active{display:block}.pane-title{font-size:18px;font-weight:800;margin-bottom:18px}.profile-hero{display:flex;align-items:center;gap:18px;margin-bottom:18px}.avatar-editor{display:flex;align-items:center;gap:10px}.status-box{flex:1}.status-edit-btn{width:100%;border:1px solid #e1e4eb;background:#fafbfc;border-radius:10px;padding:11px;display:flex;align-items:center;gap:10px;text-align:left}.status-edit-btn span:nth-child(2){display:flex;flex-direction:column}.status-edit-btn small{color:var(--muted);margin-top:2px}.settings-fields{grid-template-columns:1fr 1fr}.settings-fields label:last-child{grid-column:1/-1}.setting-line,.toggle-line{display:flex;align-items:center;gap:18px;padding:15px 0;border-bottom:1px solid #edf0f3}.setting-line>div,.toggle-line>span{flex:1}.setting-line b,.setting-line small,.toggle-line b,.toggle-line small{display:block}.setting-line small,.toggle-line small{color:var(--muted);font-size:11px;margin-top:3px}.toggle-line{grid-template-columns:1fr auto}.toggle-line input{width:42px;height:22px;accent-color:#4d67da}.settings-actions{display:flex;justify-content:flex-end;gap:8px;align-items:center;border-top:1px solid var(--line);padding:0 22px;background:#fbfbfc}
.grid-status{display:grid;grid-template-columns:90px 1fr;gap:10px}.recent-statuses{margin-top:14px}.recent-statuses>b{font-size:11px;color:#777c86}.recent-statuses>div{display:grid;gap:5px;margin-top:7px}.recent-status-btn{border:0;background:#f5f6f9;border-radius:8px;padding:8px 10px;text-align:left}.person-card-dialog{width:min(380px,calc(100vw - 28px));background:#fff;border-radius:14px;padding:18px;box-shadow:var(--shadow);position:relative}.person-close{position:absolute;right:10px;top:10px}.person-card-top{display:flex;align-items:center;gap:14px;padding-right:34px}.person-card-top h3{margin:0 0 3px}.person-card-top span{color:var(--muted)}.person-status{margin:14px 0;padding:9px 10px;border-radius:9px;background:#f6f7fa}.person-details{display:grid;gap:11px;margin:15px 0}.person-details>div{display:grid;grid-template-columns:110px 1fr;gap:8px}.person-details dt{font-size:11px;color:#8a8f99}.person-details dd{margin:0;word-break:break-word}.grid-2{display:grid;grid-template-columns:100px 1fr;gap:10px}fieldset{border:1px solid #e0e2e7;border-radius:10px;padding:10px}legend{color:#777;font-size:11px}.radio-card{display:flex;flex-direction:row;align-items:center;gap:9px;padding:8px;border-radius:8px}.radio-card:hover{background:#f6f7f9}.radio-card input{width:auto}.radio-card span{display:flex;flex-direction:column}.radio-card small{color:var(--muted)}.field-title{font-size:11px;font-weight:700;margin:12px 0 7px}.member-picker{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;max-height:230px;overflow:auto}.member-check{display:flex;flex-direction:row;align-items:center;gap:8px;padding:7px;border-radius:8px;background:#f6f7f9;font-weight:500}.member-check input{width:auto}.department-admin-list{display:flex;flex-direction:column;gap:7px}.department-admin-row{display:grid;grid-template-columns:50px 1fr auto;gap:7px;align-items:center}.section-block{padding-top:5px}.section-block-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}
.search-card{width:min(760px,calc(100vw - 28px));padding:0;overflow:hidden}.search-input-row{height:56px;display:flex;align-items:center;gap:9px;padding:0 13px;border-bottom:1px solid var(--line)}.search-input-row input{border:0;box-shadow:none!important;font-size:15px}.search-results,.feed-list{max-height:65vh;overflow:auto;padding:8px}.feed-item{display:flex;align-items:flex-start;gap:10px;border:0;width:100%;background:transparent;text-align:left;padding:10px;border-radius:9px}.feed-item:hover{background:#f5f6f8}.feed-item .feed-copy{min-width:0;flex:1}.feed-copy strong,.feed-copy small,.feed-copy p{display:block;margin:0}.feed-copy small{color:var(--muted)}.feed-copy p{margin-top:4px;color:#656971}.people-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.person-card{display:flex;gap:10px;align-items:center;padding:10px;border:1px solid #e7e8ec;border-radius:10px;background:#fff}.person-card:hover{border-color:#bbc2e9;background:#f8f9fd}.person-copy{min-width:0;flex:1}.person-copy strong,.person-copy small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.person-copy small{color:var(--muted)}
.popover{position:fixed;z-index:2000;padding:6px;border:1px solid #dddfe5;border-radius:10px;background:#fff;box-shadow:0 12px 28px rgba(30,34,45,.18);display:flex;gap:2px}.popover button{border:0;background:transparent;border-radius:7px;padding:7px}.popover button:hover{background:#f1f2f5}.mention-popover{flex-direction:column;width:280px;max-height:300px;overflow:auto}.mention-popover button{display:flex;align-items:center;gap:8px;text-align:left}.toast{position:fixed;z-index:3000;left:50%;bottom:25px;transform:translateX(-50%);background:#30343b;color:#fff;padding:9px 14px;border-radius:9px;box-shadow:0 8px 24px rgba(0,0,0,.18)}.empty-state{height:100%;display:grid;place-items:center;color:#9a9da5;text-align:center;padding:30px}.mobile-only{display:none}
body.density-compact .message{padding-top:3px;padding-bottom:3px}body.density-compact .message-body{line-height:1.3}

@media(max-width:1180px){.chat-shell.panel-open{grid-template-columns:290px minmax(0,1fr)}.context-panel{position:fixed;z-index:70;right:0;top:0;bottom:0;width:min(390px,100vw);box-shadow:-12px 0 35px rgba(29,34,48,.15)}.chat-shell{grid-template-columns:290px minmax(0,1fr)}}
@media(max-width:760px){body{overflow:hidden}.chat-shell,.chat-shell.panel-open{display:block}.sidebar{position:fixed;z-index:90;left:-320px;top:0;bottom:0;width:300px;transition:.2s;box-shadow:10px 0 30px rgba(30,34,48,.18)}.sidebar.open{left:0}.main-panel{height:100%}.mobile-only{display:grid}.topbar{padding-left:8px}.top-search span:last-child{display:none}.thread-header{padding-left:12px}.composer{margin-left:8px;margin-right:8px}.message{padding-left:10px;padding-right:10px}.message-actions{display:flex;position:static;margin-top:5px;box-shadow:none;border:0;background:transparent}.settings-card{height:calc(100vh - 14px);width:calc(100vw - 14px)}.settings-layout{grid-template-columns:1fr}.settings-nav{display:flex;flex-direction:row;overflow:auto;border-right:0;border-bottom:1px solid var(--line);padding:8px}.settings-nav-title{display:none}.settings-tab{white-space:nowrap}.settings-content{padding:16px}.settings-fields{grid-template-columns:1fr}.settings-fields label:last-child{grid-column:auto}.profile-hero{align-items:flex-start;flex-direction:column}.member-picker,.people-grid{grid-template-columns:1fr}}


/* v4.1 — compact Loop-like typography and personal-chat header avatar */
.workspace-name-wrap strong{font-size:13px;font-weight:650;letter-spacing:-.015em}
.workspace-name-wrap span{font-size:10.5px;font-weight:400}
.sidebar-search{font-size:12.5px}
.quick-nav button{font-size:12.5px;font-weight:450}
.department-picker{font-size:12.5px}
.department-picker strong{font-weight:650}
.section-head{font-size:9.5px;font-weight:700;letter-spacing:.045em}
.nav-item{font-size:12.5px;font-weight:450;padding:5px 7px}
.nav-item.active{font-weight:500}
.nav-label{line-height:1.25}
.me-copy strong{font-size:12.5px;font-weight:650}
.me-copy small{font-size:9.5px}
.top-search{font-size:12.5px}
.connection-state{font-size:10.5px}
.thread-header{min-height:60px;padding:8px 16px}
.thread-title-row{font-size:14px;font-weight:500}
.thread-title-row strong{font-weight:650}
.thread-topic{font-size:10.5px}
.thread-icon{font-size:15px;line-height:1;flex:none}
.thread-icon.dm-avatar{width:28px;height:28px;min-width:28px;max-width:28px;min-height:28px;max-height:28px;border-radius:8px;background:#dfe3ec center/cover no-repeat;display:grid;place-items:center;overflow:hidden;font-size:10px;font-weight:650;color:#59606d}
.messages{font-size:13px}
.message{grid-template-columns:36px minmax(0,1fr);gap:9px;padding:6px 16px}
.message .avatar{width:30px;height:30px;border-radius:8px}
.message-author{font-weight:650}
.message-time{font-size:9.5px}
.message-body{line-height:1.38}
.reply-quote{font-size:10.5px}
.composer{font-size:13px}
.composer textarea{font-size:13px;line-height:1.4}
.tool-btn,.send-btn{font-size:13px}
.panel-head strong{font-size:13px;font-weight:650}
.panel-head small{font-size:9px}
.thread-root,.thread-replies,.thread-composer{font-size:12.5px}
.settings-head h3{font-size:18px;font-weight:700}
.settings-nav-title{font-size:9.5px;font-weight:700}
.settings-tab{font-size:12.5px;font-weight:450}
.settings-tab.active{font-weight:650}
.pane-title{font-size:16px;font-weight:700}
.settings-content{font-size:12.5px}
.settings-fields label{font-size:11px;font-weight:600}
.settings-fields input,.settings-fields textarea,.settings-fields select{font-size:12.5px}
.status-edit-btn b{font-weight:650}
.btn{font-weight:600}
.person-card-dialog{font-size:12.5px}
.member-copy strong{font-weight:650}
.member-copy small{font-size:10.5px}
@media (max-width: 760px){
  body{font-size:13px}
  .thread-icon.dm-avatar{width:26px;height:26px;min-width:26px;max-width:26px;min-height:26px;max-height:26px}
}

/* v4.2 — участники как в рабочем мессенджере, без системных prompt */
.members-panel-actions{display:flex;align-items:center;justify-content:flex-end;gap:7px;padding:10px 12px}
.member-role-label{color:#6e7480;font-size:11px;white-space:nowrap}
.add-member-card{width:min(600px,calc(100vw - 28px));padding:0;overflow:hidden}
.add-member-card .modal-head{padding:18px 20px 12px;margin:0}
.member-search-field{margin:0 20px 10px;border:1.5px solid #315fd3;border-radius:9px;height:44px;display:flex!important;align-items:center;gap:8px;padding:0 12px;background:#fff}
.member-search-field>span{color:#777f8e;font-size:17px}
.member-search-field input{border:0!important;box-shadow:none!important;padding:0!important;height:40px;font-size:13px;background:transparent}
.add-member-results{max-height:340px;overflow:auto;border-top:1px solid #e7e8ec;padding:6px 8px 10px}
.add-member-row{width:100%;border:0;background:#fff;border-radius:9px;display:grid;grid-template-columns:38px minmax(0,1fr) auto;gap:10px;align-items:center;text-align:left;padding:9px 10px;color:var(--text)}
.add-member-row:hover{background:#f4f5f8}.add-member-row:disabled{opacity:.68}
.add-member-row>span:nth-child(2){min-width:0}.add-member-row b,.add-member-row small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.add-member-row b{font-size:13px;font-weight:600}.add-member-row small{color:#858b96;font-size:11px;margin-top:1px}
.add-member-plus{color:#315fd3;font-size:11px;font-weight:650}
.empty-inline{padding:28px 16px;text-align:center;color:#8a8f98;font-size:12px}

/* Мгновенная отправка: сообщение появляется сразу */
.optimistic-message{opacity:.82}.failed-message{opacity:1}.delivery-state{font-size:9.5px;color:#9398a1;margin-left:3px}.delivery-state.queued{color:#a57b18}.delivery-state.failed{color:#c54d56}


/* v4.3 — компактный composer как в Loop + профиль сверху + чистые иконки */
.profile-footer{display:none!important}
.sidebar{grid-template-rows:auto auto auto minmax(0,1fr)}
.workspace-logo{border:0;padding:0;overflow:hidden;background:linear-gradient(145deg,#765bf3,#6555df);box-shadow:0 3px 10px rgba(88,77,190,.18)}
.workspace-logo svg{width:31px;height:31px;display:block}.workspace-logo .fox-ear{fill:#f7b646;stroke:#fff;stroke-width:1.2;stroke-linejoin:round}.workspace-logo .fox-face{fill:#f7a93b}.workspace-logo .fox-cheek{fill:#fff4dc}.workspace-logo .fox-eye{fill:#433b55}.workspace-logo .fox-nose{fill:#433b55}
.top-profile-btn{border:0;background:transparent;border-radius:10px;padding:3px;display:grid;place-items:center}.top-profile-btn:hover{background:#e7e9ee}.top-avatar{width:31px;height:31px;border-radius:9px}
.members-btn{display:inline-flex;align-items:center;gap:5px;padding:7px 9px;color:#5f6672}.members-icon{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.main-panel{grid-template-rows:58px 60px auto minmax(0,1fr) auto auto auto}
.composer{margin:0 26px 18px;min-height:112px;max-height:164px;border:1px solid #dfe2e7;border-radius:18px;display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:minmax(44px,auto) 38px;align-items:center;padding:10px 11px 8px;background:#fff;position:relative;z-index:3;box-shadow:none}
.composer:focus-within{border-color:#b9c1dc;box-shadow:0 0 0 1px rgba(88,102,217,.05)}
.composer textarea{grid-column:1/-1;grid-row:1;border:0!important;box-shadow:none!important;min-height:38px;max-height:92px;height:38px;padding:4px 7px 6px;font-size:13px;line-height:1.42;align-self:start;overflow-y:auto;background:transparent}
.composer textarea::placeholder{color:#a2b3ca;opacity:1}
.composer-tools{grid-column:1;grid-row:2;display:flex;align-items:center;gap:3px;max-width:none;flex-wrap:nowrap;min-width:0}
.composer-actions{grid-column:2;grid-row:2;display:flex;align-items:center;gap:4px;margin-left:12px;padding-left:10px;border-left:1px solid #e4e6eb}
.tool-btn{width:32px;height:32px;border:0;border-radius:8px;background:transparent;color:#7b8089;font-size:14px;font-weight:650;display:grid;place-items:center;padding:0}.tool-btn:hover{background:#f2f3f6;color:#545b68}.action-tool{font-size:16px}
.send-btn{width:38px;height:32px;border-radius:8px;background:#f5f6f8;color:#a6acb5;font-size:15px}.send-btn:hover{background:#eef0f4;color:#77808b}.composer:focus-within .send-btn{background:#6470dd;color:#fff}.composer:focus-within .send-btn:hover{background:#5663d1}
.jump-bottom{bottom:145px}.draft-state,.upload-state{margin:-10px 26px 8px}
@media(max-width:760px){.composer{margin:0 10px 10px;min-height:104px;border-radius:15px}.composer-tools{gap:1px}.composer-actions{margin-left:5px;padding-left:5px}.tool-btn{width:29px;height:29px}.top-search{max-width:none}.connection-state{display:none}}

/* v4.4 — поле сообщения всегда закреплено у нижней кромки чата */
.main-panel{
  display:flex;
  flex-direction:column;
  min-height:0;
}
.topbar,
.thread-header,
.connection-banner,
.reply-bar,
.draft-state,
.composer,
.upload-state{
  flex:0 0 auto;
}
.messages{
  flex:1 1 auto;
  min-height:0;
  overflow:auto;
}
.composer{
  margin-top:0;
  margin-bottom:14px;
}
@media(max-width:760px){
  .main-panel{display:flex;height:100%}
  .composer{margin-bottom:8px}
}

/* v4.5 — Loop-like message actions + expanded emoji picker */
.message-actions{align-items:center;gap:1px;padding:3px 5px;border-radius:10px;overflow:visible}
.message-actions button{position:relative;width:31px;height:29px;display:grid;place-items:center;font-size:15px;line-height:1;color:#7c818b}
.message-actions button.line-icon{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:18px;font-weight:600;color:#858a94}
.message-actions button.thread-action{background:#f1f2f5;color:#6e737d}
.message-actions button.sparkle{font-size:21px}
.message-actions button sup{font-size:9px;line-height:1;position:absolute;right:3px;top:2px;font-weight:700}
.message-actions button[data-tip]:hover:after{content:attr(data-tip);position:absolute;left:50%;bottom:calc(100% + 8px);transform:translateX(-50%);background:#25262b;color:#fff;font-size:11px;font-weight:650;white-space:nowrap;padding:6px 8px;border-radius:6px;box-shadow:0 5px 15px rgba(0,0,0,.18);z-index:50;pointer-events:none}
.message-actions button[data-tip]:hover:before{content:"";position:absolute;left:50%;bottom:calc(100% + 3px);transform:translateX(-50%);border:5px solid transparent;border-top-color:#25262b;z-index:50}
.message-more-wrap{position:relative;display:flex;align-items:center}
.message-more-menu{display:none;position:absolute;right:0;top:34px;min-width:170px;background:#fff;border:1px solid #e1e3e8;border-radius:10px;box-shadow:0 12px 30px rgba(25,30,45,.18);padding:5px;z-index:40}
.message-more-menu.open{display:block}
.message-more-menu button{width:100%;height:auto;display:block;text-align:left;padding:8px 10px;border-radius:7px;font-size:12px;color:#484d56}
.message-more-menu button:hover{background:#f3f4f7}
.message-more-menu button.danger{color:#c5434d}
.emoji-popover{width:338px;max-height:220px;overflow:auto;display:grid;grid-template-columns:repeat(8,1fr);gap:2px;padding:8px}
.emoji-popover button{font-size:20px;padding:6px;width:36px;height:36px;display:grid;place-items:center}
.emoji-popover button:hover{transform:scale(1.08);background:#f0f1f4}
.thread-link{font-weight:600;color:#4f6fbe}

/* v4.6 — тихий старт без бренд-заставки + быстрый визуальный запуск */
.boot-view{height:100%;display:block;background:#fff}
.boot-skeleton{height:100%;display:grid;grid-template-columns:320px minmax(0,1fr);background:#fff}
.boot-sidebar{background:#f2f3f6;border-right:1px solid #e4e6eb;padding:14px;display:flex;flex-direction:column;gap:11px}
.boot-main{min-width:0;display:flex;flex-direction:column;background:#fff}
.boot-top{height:58px;border-bottom:1px solid #e4e6eb;background:#f7f8fa;padding:11px 16px}
.boot-thread{height:60px;border-bottom:1px solid #e4e6eb;padding:18px}
.boot-space{flex:1}
.boot-composer{height:112px;margin:0 26px 14px;border:1px solid #e5e7eb;border-radius:18px;background:#fff}
.boot-line{height:12px;border-radius:6px;background:#e2e5eb;animation:bootPulse 1.1s ease-in-out infinite alternate}
.boot-line-logo{width:72%;height:30px;border-radius:9px}
.boot-line-search{width:100%;height:36px;border-radius:10px;margin:4px 0 4px}
.boot-line-wide{width:86%}.boot-line-search-main{width:min(650px,70%);height:36px;border-radius:9px}.boot-line-title{width:220px;height:14px}.boot-gap{height:14px}
@keyframes bootPulse{from{opacity:.55}to{opacity:.9}}
@media(max-width:1180px){.boot-skeleton{grid-template-columns:290px minmax(0,1fr)}}
@media(max-width:760px){.boot-skeleton{grid-template-columns:1fr}.boot-sidebar{display:none}.boot-composer{margin:0 10px 8px}}

/* v4.7 — clean per-user login, no credential-like placeholders/autofill */
.auth-view{background:#f5f6f8}
.auth-card{width:min(360px,calc(100vw - 28px));padding:28px 26px;border:1px solid #e7e9ee;box-shadow:0 14px 40px rgba(34,39,52,.12)}
.login-title-block{display:flex;flex-direction:column;gap:3px;margin-bottom:20px}.login-title-block>b{font-size:15px;font-weight:700}.login-title-block>span{font-size:11px;color:var(--muted)}
.auth-card h1{margin:0 0 18px;font-size:21px;font-weight:700}
.auth-card .stack-form{gap:13px}
.auth-card label{font-size:11px;font-weight:650}
.auth-card input{height:42px;font-size:13px;background:#fff}
.auth-card .btn.primary{height:42px;margin-top:2px}
.autofill-trap{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;opacity:0!important;pointer-events:none!important;left:-10000px!important;top:-10000px!important}

/* v4.8 — real-time reliability, Loop-like threads, collapsible DMs, status emoji picker */
.chat-shell.panel-open{grid-template-columns:320px minmax(0,1fr) 430px}
.chat-shell.panel-open.thread-wide{grid-template-columns:320px minmax(0,1fr) 520px}
.section-head.dm-section-head{margin-top:16px}
.section-toggle{border:0;background:transparent;padding:0;display:flex;align-items:center;gap:5px;color:inherit;font:inherit;font-weight:inherit;letter-spacing:inherit}
.section-toggle:hover{color:#4d5360}.section-toggle span:first-child{font-size:13px;width:12px;text-align:center;color:#8a8f99}

/* Thread = отдельная правая колонка только по конкретному сообщению */
.thread-panel{background:#fff}
.thread-panel-head{height:58px;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:10px;padding:0 10px 0 16px;flex:none;background:#fff}
.thread-panel-title{min-width:0;flex:1}.thread-panel-title strong,.thread-panel-title small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.thread-panel-title strong{font-size:13px;font-weight:600;color:#646a75}.thread-panel-title small{font-size:9.5px;color:#9aa0aa;margin-top:2px}.thread-panel-head-actions{display:flex;gap:2px}
.loop-thread-root{padding:20px 18px 14px;border-bottom:0;background:#fff}
.loop-thread-message{display:grid;grid-template-columns:46px minmax(0,1fr);gap:12px;align-items:start}.thread-root-avatar{width:44px;height:44px;border-radius:10px}.loop-thread-copy{min-width:0}.loop-thread-meta{display:flex;align-items:baseline;gap:8px}.loop-thread-meta strong{font-size:16px;font-weight:650;color:#454a55}.loop-thread-meta span{font-size:11px;color:#a4a8b0}.loop-thread-copy .message-body{font-size:14px;line-height:1.45;margin-top:4px;color:#414650}.thread-root-reactions{margin-top:7px}
.thread-replies{flex:1;overflow:auto;padding:2px 0 8px;background:#fff}.thread-reply{display:grid;grid-template-columns:34px minmax(0,1fr);gap:9px;padding:8px 18px}.thread-reply:hover{background:#fafafb}.thread-reply .avatar{width:32px;height:32px;border-radius:8px}.thread-reply-copy{min-width:0}.thread-reply-meta{display:flex;gap:7px;align-items:baseline}.thread-reply-meta b{font-size:12.5px;font-weight:650}.thread-reply-meta small{font-size:9.5px;color:#a0a4ac}.thread-reply p{font-size:12.5px;line-height:1.42;margin:2px 0 0;white-space:pre-wrap;word-break:break-word}.thread-empty{padding:18px;color:#9b9fa8;font-size:11px;text-align:center}
.loop-thread-composer{margin:8px 14px 16px;border:1px solid #d9dde5;border-radius:14px;padding:10px 10px 8px;background:#fff;flex:none;box-shadow:none}.loop-thread-composer:focus-within{border-color:#356df1;box-shadow:0 0 0 1px rgba(53,109,241,.06)}
.loop-thread-composer textarea{border:0!important;box-shadow:none!important;padding:2px 6px 8px;min-height:54px;max-height:116px;height:54px;font-size:13px;line-height:1.42;resize:none;background:transparent}.loop-thread-composer textarea::placeholder{color:#a7b8ce}
.thread-composer-tools{display:flex!important;align-items:center;justify-content:space-between!important;gap:8px;border-top:0;padding-top:2px}.thread-format-tools,.thread-action-tools{display:flex;align-items:center;gap:2px}.thread-action-tools{margin-left:auto}.thread-send-btn{background:#5866d9!important;color:#fff!important;width:38px;height:32px;border-radius:8px;opacity:1!important}.thread-send-btn:hover{background:#4f5dce!important}.thread-send-btn:disabled{background:#8d95df!important;color:#fff!important;opacity:.72!important}

/* Expanded formatting popover */
.format-popover{width:430px;max-width:calc(100vw - 20px);display:grid;grid-template-columns:repeat(7,1fr);gap:1px;padding:8px}.format-popover button{height:38px;min-width:42px;font-size:18px;color:#7e838d;padding:5px;font-weight:500}.format-popover button:hover{background:#f0f2f6;color:#4f5663}.more-format-btn{font-size:16px!important;letter-spacing:1px}

/* Status emoji picker */
.status-emoji-field{display:grid;grid-template-columns:minmax(0,1fr) 38px;gap:6px}.status-emoji-field .icon-btn{width:38px;height:38px;border:1px solid #dfe2e8;background:#fff}.status-emoji-field .icon-btn:hover{background:#f4f5f8}

.feed-item.feed-unread{background:#f8f9ff}.feed-item.feed-unread:hover{background:#f1f3ff}

/* Don't flash empty avatar blocks while the cached image is decoding */
.top-avatar,.message-avatar,.avatar{background-color:#dfe3ec;background-repeat:no-repeat}

@media(max-width:1180px){
  .chat-shell.panel-open,.chat-shell.panel-open.thread-wide{grid-template-columns:290px minmax(0,1fr)}
  .thread-panel.context-panel{width:min(430px,100vw)}
}
@media(max-width:760px){
  .loop-thread-composer{margin:6px 8px 9px}.loop-thread-root{padding:16px 12px 10px}.thread-reply{padding-left:12px;padding-right:12px}.format-popover{grid-template-columns:repeat(6,1fr);width:min(360px,calc(100vw - 16px))}
}

/* v4.9 — realtime stability, Loop-like thread replies, fast avatars */
.thread-link{display:inline-flex;align-items:center;gap:5px;margin-top:5px;border:0;background:transparent;color:#4265c5;padding:3px 0;font-size:11px;font-weight:750;letter-spacing:.01em;text-transform:uppercase;cursor:pointer}
.thread-link:hover{text-decoration:underline}
.thread-reply{position:relative}
.thread-reply-actions{position:absolute;right:12px;top:4px;display:none;align-items:center;gap:1px;background:#fff;border:1px solid #e1e4e9;border-radius:8px;padding:2px;box-shadow:0 5px 16px rgba(34,39,54,.10);z-index:3}
.thread-reply:hover .thread-reply-actions{display:flex}
.thread-reply-actions button{width:28px;height:27px;border:0;background:transparent;border-radius:6px;color:#747a85;display:grid;place-items:center;font-size:13px}
.thread-reply-actions button:hover{background:#f0f2f5;color:#424854}
.thread-reply-meta b{cursor:pointer}.thread-reply-meta b:hover{text-decoration:underline}
.thread-composer.dragging{border-color:#5866d9;background:#f7f7ff}
.thread-send-btn,.thread-send-btn:disabled,.send-btn{background:#6370dd!important;color:#fff!important;opacity:1!important}
.thread-send-btn:hover,.send-btn:hover{background:#5260d1!important;color:#fff!important}
.status-emoji-strip{display:flex;flex-wrap:wrap;gap:5px;margin:-3px 0 11px}
.status-emoji-strip button{width:34px;height:32px;border:1px solid #e1e4e9;background:#fff;border-radius:8px;font-size:17px;display:grid;place-items:center}
.status-emoji-strip button:hover{background:#f1f3f7;border-color:#cfd4df}
/* Avatar placeholder never flashes white while image is being resolved */
.avatar,.top-avatar,.message-avatar,.thread-icon.dm-avatar{background-color:#dfe3ec!important;color:#59606d}
@media(max-width:760px){.thread-reply-actions{display:flex;position:static;margin-top:4px;box-shadow:none;border:0;padding:0}.thread-reply{grid-template-columns:32px minmax(0,1fr)}}

/* v5.0 — stability/performance pack */
.version-badge{display:inline-flex;align-items:center;height:22px;padding:0 7px;border:1px solid #dde1e8;border-radius:999px;background:#fff;color:#8a8f99;font-size:9.5px;font-weight:650;letter-spacing:.01em}
.update-banner{display:flex;align-items:center;justify-content:center;gap:10px;padding:7px 14px;background:#eef1ff;border-bottom:1px solid #dce1ff;color:#4d5685;font-size:11.5px}
.update-banner .btn{height:28px;padding:0 10px}
.history-load-wrap{display:flex;justify-content:center;padding:6px 0 12px}
.history-load-btn{border:1px solid #dfe3ea;background:#fff;color:#69707c;border-radius:8px;padding:7px 12px;font-size:11px;font-weight:600}
.history-load-btn:hover{background:#f5f6f8}.history-load-btn:disabled{opacity:.55;cursor:default}
.new-messages-divider{display:flex;align-items:center;gap:10px;margin:9px 18px;color:#6572d7;font-size:9.5px;font-weight:750;text-transform:uppercase;letter-spacing:.035em}
.new-messages-divider:before,.new-messages-divider:after{content:"";height:1px;background:#cfd5ff;flex:1}.new-messages-divider span{white-space:nowrap}
.dm-receipt{font-size:9px;color:#9a9fa8;margin-left:1px}.dm-receipt.read{color:#6875d9}
.retry-send{border:0;background:transparent;padding:0;color:#c54d56;cursor:pointer;font:inherit}.retry-send:hover{text-decoration:underline}
@media(max-width:760px){.version-badge{display:none}.update-banner{justify-content:space-between;padding-left:10px;padding-right:10px}.new-messages-divider{margin-left:10px;margin-right:10px}}
.channel-collapse-btn{width:28px;height:28px;color:#7d828d;font-size:13px}
.department-bar .channel-collapse-btn:hover{background:#e6e8ee}

/* v5.1 — @mention autocomplete + silent drafts */
.mention-popover{width:300px;max-height:330px;padding:6px;gap:2px}
.mention-popover .mention-choice{width:100%;display:flex;align-items:center;gap:10px;padding:8px 9px;border-radius:9px;text-align:left}
.mention-popover .mention-choice:hover,.mention-popover .mention-choice.mention-active{background:#f0f2f8}
.mention-popover .mention-avatar{width:30px;height:30px;min-width:30px;border-radius:9px;display:grid;place-items:center;background:#e9ebf3;color:#4e5667;font-size:11px;font-weight:700}
.mention-popover .mention-copy{min-width:0;display:flex;flex-direction:column;line-height:1.2}
.mention-popover .mention-copy b{font-size:12.5px;color:#2f3440}
.mention-popover .mention-copy small{font-size:10.5px;color:#858b97;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#draftState{display:none!important}

/* v5.2 — notification sound picker */
.sound-choice-line{align-items:center}
.sound-choice-control{display:flex;align-items:center;gap:8px;min-width:230px}
.sound-choice-control select{width:190px;padding:8px 30px 8px 10px;border-radius:8px;background:#fff;font-size:12.5px}
.sound-choice-control .btn{width:38px;min-width:38px;height:34px;padding:0;display:grid;place-items:center}
@media(max-width:760px){.sound-choice-line{align-items:flex-start;flex-direction:column}.sound-choice-control{width:100%;min-width:0}.sound-choice-control select{flex:1;width:auto}}

/* v5.4 — реакции на сообщения внутри тредов */
.thread-reply-reactions{margin-top:5px;display:flex;flex-wrap:wrap;gap:4px;min-height:0}
.thread-reply-reactions:empty{display:none}
.thread-reply-actions .thread-action-sep{width:1px;height:18px;background:#e6e8ec;margin:0 2px}
.thread-reply-actions button[data-thread-react]{font-size:12px}
.thread-reply-actions button[data-thread-action="react-more"]{font-size:10px;font-weight:700;letter-spacing:-.5px}

/* v5.6 — staged files, internal preview, thread replies, themes */
.pending-files{grid-column:1/-1;display:flex;gap:7px;flex-wrap:wrap;padding:2px 4px 6px}
.pending-file-chip{display:flex;align-items:center;gap:7px;max-width:310px;padding:6px 7px;border:1px solid #dfe3ea;border-radius:9px;background:#f8f9fb}
.pending-file-icon{font-size:17px}.pending-file-copy{min-width:0;display:flex;flex-direction:column}.pending-file-copy b{font-size:11.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pending-file-copy small{font-size:9.5px;color:var(--muted)}
.pending-file-chip button{border:0;background:transparent;width:24px;height:24px;border-radius:6px;color:#8b9099}.pending-file-chip button:hover{background:#eceef2;color:#555b66}
.thread-pending-files{padding:2px 4px 8px}.thread-pending-files .pending-file-chip{max-width:100%}
.thread-reply-bar{margin:2px 14px 0;padding:7px 9px;border-left:3px solid var(--primary);background:var(--primary-soft);border-radius:0 8px 8px 0;display:flex;align-items:center;gap:8px;font-size:11px;color:#626875}
.thread-reply-bar>div{min-width:0;flex:1}.thread-reply-bar small{display:block;color:#7a8090;margin-bottom:2px}.thread-reply-bar #threadReplyText{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.thread-inline-quote{margin:5px 0 4px;padding:6px 8px;border-left:3px solid #9a8cf0;background:#f5f3ff;border-radius:0 7px 7px 0;display:flex;flex-direction:column;gap:2px;font-size:10.5px;color:#666b76}.thread-inline-quote b{font-size:10.5px}.thread-inline-quote span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.thread-root-message{position:relative}.thread-root-actions{position:absolute;right:10px;top:10px;display:none;align-items:center;gap:1px;padding:2px;border:1px solid #e1e4e9;border-radius:8px;background:#fff;box-shadow:0 5px 16px rgba(34,39,54,.10)}.thread-root-message:hover .thread-root-actions{display:flex}.thread-root-actions button{width:29px;height:28px;border:0;background:transparent;border-radius:6px;color:#747a85}.thread-root-actions button:hover{background:#f0f2f5;color:#424854}
.file-viewer-card{width:min(1040px,calc(100vw - 28px));height:min(780px,calc(100vh - 28px));background:#fff;border-radius:14px;box-shadow:var(--shadow);display:grid;grid-template-rows:58px minmax(0,1fr);overflow:hidden}.file-viewer-head{display:flex;align-items:center;gap:12px;padding:0 14px 0 18px;border-bottom:1px solid var(--line)}.file-viewer-head>strong{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.file-viewer-head>div{display:flex;align-items:center;gap:7px}.file-viewer-body{min-height:0;display:grid;place-items:center;background:#f4f5f7;padding:12px}.file-preview-image{max-width:100%;max-height:100%;object-fit:contain;border-radius:8px;box-shadow:0 5px 24px rgba(30,35,48,.12)}.file-preview-frame{width:100%;height:100%;border:0;border-radius:8px;background:#fff}.file-preview-media{max-width:100%;max-height:100%}.file-preview-audio{width:min(620px,90%)}.file-preview-unknown{display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center;color:#6d737d}.file-preview-big-icon{font-size:48px}.file-preview-unknown small{max-width:420px;color:#8b9098}

/* Themes */
body[data-theme="violet"]{--bg:#f5f2fb;--sidebar:#eee9f7;--panel:#fff;--line:#ddd6ec;--primary:#7459d9;--primary-soft:#eee8ff;--text:#342f40;--muted:#8b8298}
body[data-theme="blue"]{--bg:#f2f6fb;--sidebar:#e9f0f8;--panel:#fff;--line:#d7e0eb;--primary:#3977c7;--primary-soft:#e8f2ff;--text:#2f3742;--muted:#7e8996}
body[data-theme="graphite"]{--bg:#edf0f3;--sidebar:#e2e6ea;--panel:#f8f9fa;--line:#d0d5db;--primary:#59636f;--primary-soft:#e5e9ed;--text:#2f3439;--muted:#737b84}
body[data-theme="dark"]{--bg:#17191d;--panel:#202329;--sidebar:#1c1f24;--line:#333740;--text:#edf0f4;--muted:#9da4af;--primary:#7b84f3;--primary-soft:#2d3150;--shadow:0 16px 50px rgba(0,0,0,.4)}
body[data-theme="dark"] .chat-shell,body[data-theme="dark"] .main-panel,body[data-theme="dark"] .thread-panel,body[data-theme="dark"] .thread-panel-head,body[data-theme="dark"] .loop-thread-root,body[data-theme="dark"] .thread-replies,body[data-theme="dark"] .loop-thread-composer,body[data-theme="dark"] .composer,body[data-theme="dark"] .modal-card,body[data-theme="dark"] .settings-card,body[data-theme="dark"] .person-card-dialog,body[data-theme="dark"] .file-viewer-card{background:#202329;color:var(--text)}
body[data-theme="dark"] .topbar,body[data-theme="dark"] .settings-actions,body[data-theme="dark"] .settings-nav{background:#1b1e23}body[data-theme="dark"] .sidebar-search,body[data-theme="dark"] .top-search{background:#2a2e35;color:#b4bac3}body[data-theme="dark"] input,body[data-theme="dark"] textarea,body[data-theme="dark"] select{background:#242830;border-color:#3a3f48;color:#eef1f5}body[data-theme="dark"] .message:hover,body[data-theme="dark"] .thread-reply:hover{background:#262a31}body[data-theme="dark"] .attachment-card,body[data-theme="dark"] .pending-file-chip,body[data-theme="dark"] .thread-root-actions,body[data-theme="dark"] .thread-reply-actions,body[data-theme="dark"] .popover{background:#252931;border-color:#3a3f48;color:#edf0f4}body[data-theme="dark"] .message-actions{background:#252931;border-color:#3a3f48}body[data-theme="dark"] .reaction{background:#252931;border-color:#414650;color:#eef1f4}body[data-theme="dark"] .reaction.mine{background:#34345f;border-color:#5e60a4}body[data-theme="dark"] .file-viewer-body{background:#16191d}body[data-theme="dark"] .btn.secondary{background:#2d333e;color:#d8dde5}body[data-theme="dark"] .settings-tab.active{background:#303758;color:#bfc7ff}body[data-theme="dark"] .thread-inline-quote,body[data-theme="dark"] .reply-quote{background:#2b2940;color:#d4d0e6}body[data-theme="dark"] .person-status,body[data-theme="dark"] .status-edit-btn{background:#262a31;border-color:#393e47;color:#e6e9ee}
body[data-theme="violet"] .topbar,body[data-theme="violet"] .workspace-row{background:#f5f1fb}body[data-theme="blue"] .topbar,body[data-theme="blue"] .workspace-row{background:#f0f6fc}body[data-theme="graphite"] .topbar,body[data-theme="graphite"] .workspace-row{background:#e9edf1}

@media(max-width:760px){.thread-root-actions{display:flex;position:static;margin-top:7px;box-shadow:none;border:0;padding:0}.file-viewer-card{width:100vw;height:100vh;border-radius:0}.pending-file-chip{max-width:100%}}
.composer:has(#pendingFiles:not([hidden])){grid-template-rows:minmax(44px,auto) auto 38px}
.composer:has(#pendingFiles:not([hidden])) #pendingFiles{grid-row:2}
.composer:has(#pendingFiles:not([hidden])) .composer-tools,.composer:has(#pendingFiles:not([hidden])) .composer-actions{grid-row:3}


/* v5.7 — unread emphasis + full notification center */
.nav-item.has-unread{
  background:color-mix(in srgb, var(--accent,#5c63e6) 8%, transparent);
  color:var(--text,#2d3240);
  font-weight:650;
}
.nav-item.has-unread:not(.active):hover{background:color-mix(in srgb, var(--accent,#5c63e6) 13%, transparent)}
.dm-unread-badge,.nav-item .unread-dot{
  min-width:20px;height:20px;padding:0 6px;border-radius:10px;
  display:inline-grid;place-items:center;
  background:var(--accent,#5c63e6);color:#fff;
  font-size:10px;font-weight:800;line-height:1;
  box-shadow:0 2px 8px rgba(60,70,180,.18);
}
.top-notifications-btn{position:relative}
.top-notification-badge{
  position:absolute;right:-5px;top:-5px;min-width:16px;height:16px;padding:0 4px;border-radius:9px;
  display:grid;place-items:center;background:#e5484d;color:white;border:2px solid var(--panel,#fff);
  font-size:9px;font-weight:800;line-height:1;
}
.notification-center-card{max-height:min(760px,86vh)}
.notification-center-actions{display:flex;align-items:center;gap:8px}
.notification-tabs{display:flex;gap:6px;flex-wrap:wrap;padding:0 0 12px;border-bottom:1px solid var(--border,#e8eaf0)}
.notification-tab{
  border:0;background:var(--soft,#f4f5f8);color:var(--muted,#737986);
  padding:7px 11px;border-radius:9px;font:inherit;font-size:12px;cursor:pointer
}
.notification-tab:hover{background:var(--hover,#eceef4)}
.notification-tab.active{background:var(--accent-soft,#e7eaff);color:var(--accent,#4f5bd5);font-weight:700}
.notification-center-list{max-height:58vh;overflow:auto;padding-top:8px}
.notification-center-item{grid-template-columns:26px 32px minmax(0,1fr) auto;align-items:start}
.notification-kind-icon{
  width:24px;height:24px;border-radius:8px;background:var(--soft,#f1f3f7);
  display:grid;place-items:center;font-size:12px;color:var(--accent,#4f5bd5)
}
.notification-center-item.feed-unread{
  background:color-mix(in srgb, var(--accent,#5c63e6) 7%, var(--panel,#fff));
}
.notification-unread-dot{
  width:8px!important;min-width:8px!important;height:8px!important;padding:0!important;
  border-radius:50%;font-size:0!important;margin-top:6px
}

/* v5.8 — Loop-like notification feed, thread summaries and conversation menus */
.main-panel.show-mentions .thread-header,
.main-panel.show-mentions #connectionBanner,
.main-panel.show-mentions #updateBanner,
.main-panel.show-mentions #messages,
.main-panel.show-mentions #jumpBottomBtn,
.main-panel.show-mentions #replyBar,
.main-panel.show-mentions #draftState,
.main-panel.show-mentions #composerForm,
.main-panel.show-mentions #uploadState{display:none!important}
.main-panel.show-mentions{grid-template-rows:58px minmax(0,1fr)!important}
.mentions-view{min-height:0;overflow:auto;padding:18px 20px 28px;background:var(--panel,#fff)}
.main-panel.show-mentions .mentions-view{display:block!important}
.mentions-view-head{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:14px}.mentions-view-head h2{font-size:15px;margin:0 0 3px;font-weight:750}.mentions-view-head p{margin:0;color:var(--muted);font-size:10.5px}
.mentions-tabs{display:flex;gap:6px;margin-bottom:12px}.mentions-tab{border:0;border-radius:7px;padding:7px 11px;background:#f3f4f7;color:#676c76;font-size:11px}.mentions-tab.active{background:#e9edff;color:#315ccb;font-weight:700}
.mentions-view-list{display:grid;gap:10px;max-width:920px}.mention-card{border:1px solid var(--line);border-radius:13px;background:var(--panel,#fff);padding:12px 14px}.mention-card-top{display:grid;grid-template-columns:34px minmax(0,1fr) auto;gap:10px;align-items:center}.mention-card-top b,.mention-card-top small{display:block}.mention-card-top small{color:var(--muted);font-size:10px;margin-top:2px}.mention-card-top button{border:1px solid var(--line);background:#fff;border-radius:8px;padding:6px 10px;color:#596172}.mention-card-body{margin:9px 0 0 44px;font-size:12px;line-height:1.45;color:var(--text)}.mentions-empty{height:220px;display:grid;place-items:center;color:var(--muted)}

.thread-summary{display:inline-flex;align-items:center;gap:7px;margin-top:5px;border:0;background:transparent;color:#606978;padding:3px 0;font-size:11px;font-weight:700;cursor:pointer}.thread-summary:hover{color:#345dcb}.thread-summary-avatars{display:flex;align-items:center}.thread-summary-avatar{width:24px!important;height:24px!important;border-radius:7px!important;border:2px solid #fff;margin-left:-6px;font-size:8px!important}.thread-summary-avatar:first-child{margin-left:0}.thread-summary-extra{height:24px;min-width:24px;padding:0 5px;border-radius:8px;background:#f0f1f4;border:2px solid #fff;margin-left:-6px;display:grid;place-items:center;font-size:9px;color:#737984}.thread-summary-reply{font-size:15px;color:#757b86}
.thread-follow-btn{border:0;border-radius:8px;background:#f2f3f6;color:#68707d;padding:6px 9px;font-size:10px;white-space:nowrap}.thread-follow-btn.active{background:#e7efff;color:#245bc4;font-weight:700}

.conversation-menu{position:fixed;z-index:130;width:250px;background:#fff;border:1px solid #e0e3e8;border-radius:13px;box-shadow:0 16px 45px rgba(29,35,52,.20);padding:6px}.conversation-menu button{width:100%;display:grid;grid-template-columns:25px minmax(0,1fr) auto;align-items:center;gap:7px;border:0;background:transparent;text-align:left;padding:9px 10px;border-radius:8px;color:#555c68;font-size:12px}.conversation-menu button:hover{background:#f3f4f7}.conversation-menu button.danger{color:#db4b52}.conversation-menu hr{border:0;border-top:1px solid #eceef2;margin:5px -6px}

body[data-theme="dark"] .conversation-menu,body[data-theme="dark"] .mention-card,body[data-theme="dark"] .mentions-view{background:#202329;color:var(--text)}body[data-theme="dark"] .mention-card-top button{background:#272b32;color:var(--text)}


/* v5.9 — custom sidebar categories, drag & drop, visible employee statuses */
.custom-category-head{margin-top:4px}.custom-category-list{display:grid;gap:8px;margin-bottom:10px}.custom-category{display:grid;gap:2px}.custom-category-head-row{display:flex;align-items:center;gap:4px;padding:0 4px}.custom-category-toggle{flex:1;display:flex;align-items:center;gap:6px;border:0;background:transparent;color:#707580;font-size:10px;font-weight:750;letter-spacing:.06em;text-align:left;padding:6px 2px;min-width:0}.custom-category-toggle span:last-child{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.custom-category-menu{opacity:0;border:0;background:transparent;color:#8b9099;border-radius:6px;width:26px;height:26px}.custom-category:hover .custom-category-menu{opacity:1}.custom-category-menu:hover{background:#e7e9ee}.custom-category-items{display:grid;gap:2px;min-height:3px}.custom-category-items.drop-active,.nav-list.drop-active{outline:2px dashed color-mix(in srgb,var(--primary,#5c63e6) 55%,transparent);outline-offset:2px;border-radius:8px;background:color-mix(in srgb,var(--primary,#5c63e6) 6%,transparent)}
.nav-item[draggable="true"]{cursor:grab}.nav-item.dragging{opacity:.45;cursor:grabbing}.nav-item.drag-over{box-shadow:inset 0 2px 0 var(--primary,#5c63e6)}
.user-status-emoji{display:inline-flex;align-items:center;justify-content:center;margin-left:4px;font-size:13px;line-height:1;vertical-align:-1px;cursor:help}.nav-label .user-status-emoji{margin-left:5px}.message-author .user-status-emoji,.thread-reply-meta b .user-status-emoji{font-size:12px}.thread-title-row .user-status-emoji{font-size:13px}
.move-category-list{display:grid;gap:6px;max-height:380px;overflow:auto}.move-category-option{width:100%;display:grid;grid-template-columns:28px minmax(0,1fr) auto;align-items:center;gap:8px;border:1px solid var(--line);background:var(--panel,#fff);padding:9px 10px;border-radius:10px;text-align:left;color:var(--text);font:inherit}.move-category-option:hover{background:#f4f5f8}.move-category-option small{color:var(--muted)}
body[data-theme="dark"] .custom-category-menu:hover,body[data-theme="dark"] .move-category-option:hover{background:#2a2e35}

/* v5.10 — расширенное меню сообщений и напоминания */
.message-more-menu{min-width:238px;max-width:min(290px,calc(100vw - 24px));padding:6px}
.message-more-menu button{display:flex;align-items:center;gap:9px;width:100%;padding:9px 10px;font-size:12.5px;line-height:1.25;white-space:nowrap}
.message-more-menu button span{overflow:hidden;text-overflow:ellipsis}
.message-menu-sep{height:1px;background:#eceef2;margin:5px 3px}
.thread-root-actions .message-more-wrap,.thread-reply-actions .message-more-wrap{position:relative;display:flex}
.thread-root-actions .message-more-menu,.thread-reply-actions .message-more-menu{right:0;top:31px}
.thread-reply-actions .message-more-menu{z-index:90}
.reminder-popover{position:fixed;z-index:2600;width:270px;background:#fff;border:1px solid #dfe2e8;border-radius:12px;box-shadow:0 16px 40px rgba(23,29,43,.2);padding:7px}
.reminder-popover[hidden]{display:none}
.reminder-title{font-size:12.5px;font-weight:700;color:#373d48;padding:8px 9px 7px}
.reminder-popover>button{width:100%;border:0;background:transparent;text-align:left;padding:9px 10px;border-radius:8px;color:#454b57;font-size:12.5px}
.reminder-popover>button:hover{background:#f1f3f7}
.reminder-custom{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px;padding:7px 5px 4px;border-top:1px solid #eceef2;margin-top:4px}
.reminder-custom input{min-width:0;height:35px;font-size:11.5px;padding:5px 7px}
.reminder-custom button{border:0;border-radius:8px;background:var(--accent,#5b5bd6);color:#fff;font-size:11.5px;font-weight:700;padding:0 10px}
body[data-theme="dark"] .message-more-menu,body[data-theme="dark"] .reminder-popover{background:#252931;border-color:#3a3f48;color:#edf0f4}
body[data-theme="dark"] .message-more-menu button,body[data-theme="dark"] .reminder-title,body[data-theme="dark"] .reminder-popover>button{color:#e9edf2}
body[data-theme="dark"] .message-more-menu button:hover,body[data-theme="dark"] .reminder-popover>button:hover{background:#333841}
body[data-theme="dark"] .message-menu-sep,body[data-theme="dark"] .reminder-custom{border-color:#3a3f48;background-color:transparent}

/* v5.11 — split send + scheduled messages */
.split-send{display:inline-flex;align-items:stretch;border-radius:10px;overflow:hidden;box-shadow:0 0 0 1px color-mix(in srgb,var(--accent,#6558e8) 18%,transparent)}
.split-send .send-btn{border-radius:0!important;box-shadow:none!important;min-width:42px}
.send-schedule-btn{width:30px;border:0;border-left:1px solid rgba(255,255,255,.24);background:var(--accent,#6558e8);color:#fff;font-size:17px;line-height:1;cursor:pointer;display:grid;place-items:center;padding:0}
.send-schedule-btn:hover{filter:brightness(.96)}
.send-schedule-btn:active{transform:none}
.schedule-popover{position:fixed;z-index:10050;width:300px;background:var(--panel,#fff);color:var(--text,#3e4350);border:1px solid var(--border,#e2e5ec);border-radius:14px;box-shadow:0 16px 44px rgba(26,30,45,.18);padding:10px}
.schedule-popover[hidden]{display:none!important}
.schedule-title{font-size:12px;font-weight:800;color:var(--muted,#8a909c);padding:8px 10px 6px;letter-spacing:.02em}
.schedule-popover>button,.schedule-custom button{width:100%;border:0;background:transparent;color:inherit;text-align:left;padding:10px 12px;border-radius:9px;font:inherit;cursor:pointer}
.schedule-popover>button:hover,.schedule-custom button:hover{background:var(--hover,#f3f5f9)}
.schedule-custom{padding:8px 6px 4px;border-top:1px solid var(--border,#e2e5ec);margin-top:5px;display:grid;gap:7px}
.schedule-custom[hidden]{display:none!important}
.schedule-custom input{width:100%;box-sizing:border-box;border:1px solid var(--border,#d9dde7);background:var(--input,#fff);color:var(--text,#3e4350);border-radius:9px;padding:9px 10px;font:inherit}
.schedule-custom button{background:var(--accent,#6558e8);color:#fff;text-align:center;font-weight:700}

/* v5.12 — Loop-like settings, theme gallery and minimalist controls */
.settings-card{width:min(980px,calc(100vw - 32px));height:min(760px,calc(100vh - 32px));border-radius:12px}
.settings-head{height:72px;padding:0 28px}.settings-head h3{font-size:24px;font-weight:680;letter-spacing:-.025em}
.settings-layout{grid-template-columns:260px minmax(0,1fr)}
.settings-nav{padding:20px 16px;background:#f7f8fa}.settings-nav-title{margin:12px 8px 6px;font-size:11px;color:#777d88;letter-spacing:.02em}
.settings-tab{padding:10px 12px;font-size:14px;border-radius:7px}.settings-tab.active{background:#e9edf8;color:#245dcc}
.settings-content{padding:24px 36px}.pane-title{font-size:22px;font-weight:680;letter-spacing:-.02em;margin-bottom:20px}
.appearance-section{border:1px solid #e6e8ed;background:#fbfbfc;border-radius:10px;padding:18px;margin-bottom:20px}.appearance-section-title{font-size:14px;font-weight:650;margin-bottom:16px}
.theme-gallery{display:grid;grid-template-columns:repeat(4,minmax(120px,1fr));gap:18px 20px}.theme-card{border:0;background:transparent;padding:0;text-align:left;color:#555b66}.theme-card strong{display:block;font-size:13px;font-weight:500;margin-top:8px}.theme-card.selected strong{color:#245dcc;font-weight:650}.theme-preview{height:94px;border:2px solid #d9dde5;border-radius:6px;background:#fff;display:grid;grid-template-columns:42% 58%;position:relative;overflow:hidden;box-shadow:0 1px 2px rgba(20,24,35,.04)}.theme-card.selected .theme-preview{border-color:#2c7ce9;box-shadow:0 0 0 1px #2c7ce9}.theme-preview i{grid-row:1/4;background:#eef0f2}.theme-preview b,.theme-preview em{position:absolute;left:8px;height:5px;border-radius:5px;background:#6d727b;opacity:.85}.theme-preview b{top:18px;width:28px}.theme-preview em{top:32px;width:22px}.theme-preview:after{content:"";position:absolute;left:49%;right:8px;top:18px;height:5px;border-radius:5px;background:#d4d7dc;box-shadow:0 14px 0 #d4d7dc,0 28px 0 #d4d7dc}.theme-preview-loop i,.theme-preview-quartz i{background:#eef0f2}.theme-preview-slack i{background:#4a154b}.theme-preview-denim i{background:#28466f}.theme-preview-sapphire i{background:#1e55ad}.theme-preview-indigo{background:#232a37}.theme-preview-indigo i{background:#1b2538}.theme-preview-indigo:after{background:#566071;box-shadow:0 14px 0 #566071,0 28px 0 #566071}.theme-preview-onyx{background:#1d1f22}.theme-preview-onyx i{background:#26292d}.theme-preview-onyx:after{background:#585d63;box-shadow:0 14px 0 #585d63,0 28px 0 #585d63}.theme-preview-sapphire b{background:#c7d7ff}.theme-preview-slack b{background:#f1d7f3}.theme-preview-denim b{background:#cbd9ef}
.appearance-options{border-top:1px solid #e6e8ed}.appearance-options .setting-line,.appearance-options .toggle-line{min-height:76px;padding:14px 2px}.appearance-options .setting-line b,.appearance-options .toggle-line b{font-size:14px;font-weight:650}.appearance-options .setting-line small,.appearance-options .toggle-line small{font-size:12px;color:#7f8590;margin-top:5px}
.minimal-select,.settings-content select{appearance:none;-webkit-appearance:none;background-color:#fff;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23767d89' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 10px center;background-size:14px;padding:8px 34px 8px 10px;border:1px solid #dfe3e9;border-radius:7px;box-shadow:none;font-weight:450;min-width:150px}
.settings-content input,.settings-content textarea{border-radius:7px;box-shadow:none}.settings-content input:focus,.settings-content textarea:focus,.settings-content select:focus{border-color:#4f7fd8;box-shadow:0 0 0 2px rgba(49,95,211,.08)}
.hide-online-presence .status-dot{display:none!important}
@media(max-width:900px){.theme-gallery{grid-template-columns:repeat(2,minmax(120px,1fr))}.settings-layout{grid-template-columns:210px minmax(0,1fr)}}
@media(max-width:760px){.settings-card{height:calc(100vh - 12px);width:calc(100vw - 12px)}.settings-layout{grid-template-columns:1fr}.theme-gallery{grid-template-columns:repeat(2,minmax(110px,1fr))}.settings-content{padding:18px}.appearance-options .setting-line{align-items:flex-start;flex-direction:column}.minimal-select{width:100%}}

/* Theme palettes */
body[data-theme="loop"]{--bg:#f4f5f8;--panel:#fff;--sidebar:#f2f3f6;--line:#e4e6eb;--text:#30333a;--muted:#8a8e97;--primary:#5866d9;--primary-soft:#ecefff}
body[data-theme="quartz"]{--bg:#f6f7f8;--panel:#fff;--sidebar:#f1f2f3;--line:#e0e3e6;--text:#34383e;--muted:#858b93;--primary:#2f75d6;--primary-soft:#e9f2fd}
body[data-theme="slack"]{--bg:#f6f3f7;--panel:#fff;--sidebar:#4a154b;--line:#e1d9e3;--text:#332b34;--muted:#8e8290;--primary:#7b3f82;--primary-soft:#f1e7f3}
body[data-theme="slack"] .sidebar,body[data-theme="slack"] .workspace-row,body[data-theme="slack"] .profile-footer{background:#4a154b;color:#fff;border-color:#6a3c6b}body[data-theme="slack"] .workspace-name-wrap span,body[data-theme="slack"] .section-head,body[data-theme="slack"] .nav-item,body[data-theme="slack"] .quick-nav button,body[data-theme="slack"] .me-copy small{color:#dccddd}body[data-theme="slack"] .sidebar-search{background:#5d2a5e;border-color:#704471;color:#e8dfe9}body[data-theme="slack"] .nav-item:hover,body[data-theme="slack"] .quick-nav button:hover{background:#5b2b5c}body[data-theme="slack"] .nav-item.active{background:#713f73;color:#fff}
body[data-theme="denim"]{--bg:#eef3f8;--panel:#fff;--sidebar:#28466f;--line:#d7e0ea;--text:#2f3742;--muted:#7f8996;--primary:#376ca8;--primary-soft:#e5eef8}body[data-theme="denim"] .sidebar,body[data-theme="denim"] .workspace-row,body[data-theme="denim"] .profile-footer{background:#28466f;color:#fff;border-color:#3c5b80}body[data-theme="denim"] .workspace-name-wrap span,body[data-theme="denim"] .section-head,body[data-theme="denim"] .nav-item,body[data-theme="denim"] .quick-nav button,body[data-theme="denim"] .me-copy small{color:#d4deeb}body[data-theme="denim"] .sidebar-search{background:#36567e;border-color:#49688c;color:#e7edf5}body[data-theme="denim"] .nav-item:hover{background:#35557d}body[data-theme="denim"] .nav-item.active{background:#46678d;color:#fff}
body[data-theme="sapphire"]{--bg:#f0f5fc;--panel:#fff;--sidebar:#1e55ad;--line:#d7e2f0;--text:#2f3640;--muted:#7b8797;--primary:#225fc7;--primary-soft:#e8f1ff}body[data-theme="sapphire"] .sidebar,body[data-theme="sapphire"] .workspace-row,body[data-theme="sapphire"] .profile-footer{background:#1e55ad;color:#fff;border-color:#3168bb}body[data-theme="sapphire"] .workspace-name-wrap span,body[data-theme="sapphire"] .section-head,body[data-theme="sapphire"] .nav-item,body[data-theme="sapphire"] .quick-nav button,body[data-theme="sapphire"] .me-copy small{color:#dce8fa}body[data-theme="sapphire"] .sidebar-search{background:#2d65b8;border-color:#4275c2;color:#edf4ff}body[data-theme="sapphire"] .nav-item:hover{background:#2b65b9}body[data-theme="sapphire"] .nav-item.active{background:#3971c4;color:#fff}
body[data-theme="indigo"]{--bg:#1b2230;--panel:#222a38;--sidebar:#1b2538;--line:#343e50;--text:#edf1f7;--muted:#a1a9b5;--primary:#6f8ee8;--primary-soft:#2c3857;--shadow:0 16px 50px rgba(0,0,0,.35)}
body[data-theme="onyx"]{--bg:#17191c;--panel:#202327;--sidebar:#25282c;--line:#35393e;--text:#f0f1f2;--muted:#a0a5aa;--primary:#5bbf9a;--primary-soft:#263f38;--shadow:0 16px 50px rgba(0,0,0,.42)}
body[data-theme="indigo"] .main-panel,body[data-theme="indigo"] .thread-panel,body[data-theme="indigo"] .modal-card,body[data-theme="indigo"] .settings-card,body[data-theme="indigo"] .composer,body[data-theme="onyx"] .main-panel,body[data-theme="onyx"] .thread-panel,body[data-theme="onyx"] .modal-card,body[data-theme="onyx"] .settings-card,body[data-theme="onyx"] .composer{background:var(--panel);color:var(--text)}
body[data-theme="indigo"] .topbar,body[data-theme="indigo"] .settings-nav,body[data-theme="indigo"] .settings-actions,body[data-theme="onyx"] .topbar,body[data-theme="onyx"] .settings-nav,body[data-theme="onyx"] .settings-actions{background:#1c2432;color:var(--text);border-color:var(--line)}
body[data-theme="onyx"] .topbar,body[data-theme="onyx"] .settings-nav,body[data-theme="onyx"] .settings-actions{background:#1b1e21}
body[data-theme="indigo"] input,body[data-theme="indigo"] textarea,body[data-theme="indigo"] select,body[data-theme="onyx"] input,body[data-theme="onyx"] textarea,body[data-theme="onyx"] select{background:#282f3c;border-color:#3d4656;color:var(--text)}body[data-theme="onyx"] input,body[data-theme="onyx"] textarea,body[data-theme="onyx"] select{background:#282b2f;border-color:#3a3e43}
body[data-theme="indigo"] .message:hover,body[data-theme="indigo"] .thread-reply:hover{background:#293140}body[data-theme="onyx"] .message:hover,body[data-theme="onyx"] .thread-reply:hover{background:#292d31}

/* v5.12.1 — Cursor behavior: keep arrow across UI, text caret only in editable fields. */
html, body, body *, button, a, [role="button"], [draggable="true"], .nav-item, .message-avatar, .message-author, .thread-link, .thread-summary, .user-status-emoji, .retry-send, .send-schedule-btn, .schedule-popover>button, .schedule-custom button {
  cursor: default !important;
}
input, textarea, [contenteditable="true"], [contenteditable="plaintext-only"], .composer-input, .thread-composer-input {
  cursor: text !important;
}

/* v5.13 — более чистый Loop-like интерфейс */
.title-menu-btn{width:26px!important;height:26px!important;min-width:26px;padding:0;border-radius:7px;color:#777d88;font-size:18px;line-height:1;background:transparent}
.title-menu-btn:hover{background:#eceef2;color:#454b55}
.thread-title-row{min-width:0}.thread-title-row strong{max-width:min(560px,55vw);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.thread-actions{margin-left:auto}
/* статус: никаких постоянно разложенных эмодзи — выбор только по клику */
.status-emoji-strip{display:none!important}
/* Единый расширенный эмодзи-пикер: компактный список, без лишнего tooltip-текста */
.emoji-popover{width:350px;max-height:260px;grid-template-columns:repeat(9,1fr);gap:3px;padding:9px;border-radius:12px}
.emoji-popover button{width:34px;height:34px;font-size:19px;border-radius:7px}
/* Кастомный календарь/время вместо системного пикера */
.date-time-picker{position:fixed;z-index:260;width:326px;background:#fff;border:1px solid #dfe2e8;border-radius:14px;box-shadow:0 18px 55px rgba(31,38,55,.22);padding:12px;color:#444a56}
.dtp-head{height:36px;display:grid;grid-template-columns:34px 1fr 34px;align-items:center;gap:5px}.dtp-head strong{text-align:center;font-size:13px;font-weight:700}.dtp-head .icon-btn{width:32px;height:32px;font-size:20px;color:#6e7480}
.dtp-weekdays,.dtp-days{display:grid;grid-template-columns:repeat(7,1fr);gap:3px}.dtp-weekdays{padding:8px 0 5px;color:#999ea8;font-size:10px;text-align:center}.dtp-days{padding-bottom:10px}
.dtp-day{border:0;background:transparent;height:34px;border-radius:8px;color:#4e5460;font-size:12px}.dtp-day:hover{background:#f0f2f6}.dtp-day.outside{color:#b8bdc6}.dtp-day.today{box-shadow:inset 0 0 0 1px #b9c3f6;color:#3e59bf}.dtp-day.selected{background:#5669db;color:#fff!important;font-weight:750;box-shadow:none}
.dtp-time{border-top:1px solid #eceef2;border-bottom:1px solid #eceef2;padding:10px 2px;display:flex;align-items:center;justify-content:space-between;font-size:12px}.dtp-time-inputs{display:flex;align-items:center;gap:5px}.dtp-time input{width:48px;height:34px;border:1px solid #dfe2e8;border-radius:8px;background:#f8f9fb;text-align:center;font:inherit;color:#454b55;padding:0}.dtp-time input:focus{outline:2px solid #dce2ff;border-color:#7182e1}
.dtp-actions{display:flex;justify-content:flex-end;gap:7px;padding-top:10px}
body[data-theme="dark"] .date-time-picker{background:#22262d;border-color:#3b404a;color:#eceff4}body[data-theme="dark"] .dtp-day{color:#d9dde4}body[data-theme="dark"] .dtp-day.outside{color:#696f7a}body[data-theme="dark"] .dtp-day:hover{background:#30353d}body[data-theme="dark"] .dtp-time input{background:#2a2f37;border-color:#424852;color:#eef1f5}
/* v5.14 — зафиксированный доступ существующего канала */
.channel-access-lock-note{margin:-2px 0 14px;padding:9px 11px;border-radius:9px;background:var(--surface-soft,#f5f6f8);color:var(--muted,#747985);font-size:12px;line-height:1.4}
#channelDialog input[name="channelPrivacy"]:disabled+span{opacity:.68}

/* v5.14.2 — меню разговора в строке боковой панели, как в Loop */
.title-menu-btn{display:none!important}
.nav-tail{display:flex;align-items:center;justify-content:flex-end;gap:3px;min-width:0}
.sidebar-conv-menu{width:27px;height:27px;border:0;border-radius:8px;background:transparent;color:#6f7480;font-size:20px;line-height:1;display:grid;place-items:center;padding:0;flex:none}
.sidebar-conv-menu:hover{background:rgba(91,96,110,.10);color:#464b55}
.nav-item.active .sidebar-conv-menu{display:grid}
.conversation-menu{z-index:260}


/* v5.15 — global + conversation search */
.title-search-btn{width:28px;height:28px;border-radius:8px;color:var(--muted);font-size:16px;flex:0 0 auto}
.title-search-btn:hover{background:var(--soft);color:var(--text)}
.search-scope-row{display:flex;align-items:center;gap:6px;padding:9px 12px;border-bottom:1px solid var(--line);background:var(--panel)}
.search-scope{border:0;background:transparent;color:var(--muted);font:inherit;font-size:12px;font-weight:600;padding:6px 10px;border-radius:8px}
.search-scope.active{background:var(--soft);color:var(--accent,#5e5ce6)}
.search-scope:disabled{opacity:.38}
.search-scope-label{margin-left:auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted);font-size:11px}
.search-result mark{background:#fff0a8;color:inherit;border-radius:3px;padding:0 1px}
.search-type-icon{width:32px;height:32px;border-radius:9px;background:var(--soft);display:grid;place-items:center;font-weight:700;color:var(--muted);flex:0 0 auto}
.search-result .feed-copy small{font-size:11px;margin-top:1px}
.search-result .feed-copy p{line-height:1.42}
@media (max-width:720px){.search-scope-label{display:none}}

/* v5.15.3 — reliable status emoji picker */
.status-emoji-menu{position:fixed;z-index:2147483646;width:350px;max-width:calc(100vw - 20px);max-height:260px;overflow:auto;display:grid;grid-template-columns:repeat(9,1fr);gap:3px;padding:9px;background:var(--panel,#fff);border:1px solid var(--border,#dfe2e8);border-radius:12px;box-shadow:0 16px 44px rgba(26,30,45,.22)}
.status-emoji-menu[hidden]{display:none!important}
.status-emoji-menu button{width:34px;height:34px;border:0;border-radius:7px;background:transparent;font-size:19px;display:grid;place-items:center;padding:0}
.status-emoji-menu button:hover{background:var(--hover,#f1f3f7)}
body[data-theme="dark"] .status-emoji-menu,body[data-theme="indigo"] .status-emoji-menu,body[data-theme="onyx"] .status-emoji-menu{background:var(--panel);border-color:var(--border);color:var(--text)}
