﻿.channel-group>summary{padding:12px 10px;font-size:12px;cursor:pointer;color:#5c6670}.channel-group.active>summary{color:#1687dd;background:#dcebf8}.channel-group .account-item{padding-left:20px;font-size:12px}.channel-group .group-filter{margin:0 10px 5px;padding:2px 8px;font-size:11px}.channel-editor-row{padding:12px 0;border-bottom:1px solid #eee;display:grid;grid-template-columns:1.3fr 1fr auto;gap:8px}.channel-editor-row small{grid-column:1/-1;color:#999}.group-editor{display:flex;gap:8px;margin:8px 0}.group-editor input{flex:1}.member-row{display:flex;gap:5px;align-items:center;margin:9px 0;font-size:12px}.member-row span{flex:1}.member-row button{font-size:10px;padding:2px 5px}.compose-mode{display:flex;align-items:center;gap:10px;font-size:12px;margin-bottom:5px}.compose-mode label{white-space:nowrap}.compose-mode input{vertical-align:middle}.compose-mode span{font-size:11px;color:#999;flex:1}.compose-mode button{padding:2px 6px}.internal-active .composer{background:#fff8e9;border-top:2px solid #dfaf4e}.internal-active #draft{background:#fff8e9}.internal-active #composeHint{color:#a4721f}.internal-count{background:#d7a236;color:white;border-radius:8px;padding:1px 5px;font-size:10px;margin-left:5px}#internalMessages{flex:1;overflow:auto;padding:18px;background:#faf7ef;min-height:0}#internalMessages[hidden]{display:none}.internal-bubble{padding:10px 13px;background:#fff3cc;border:1px solid #ead79c;white-space:pre-wrap;overflow-wrap:anywhere;border-radius:5px}.internal-message{margin:0 0 18px;max-width:88%}.internal-message.own{margin-left:auto}.internal-message .meta{color:#a28f62}#stagedMedia{border:1px solid #c8dbea;padding:8px;background:#f0f7fc;margin:5px 0;display:flex;align-items:center;gap:12px}#stagedMedia[hidden]{display:none}#stagedMedia img{max-height:90px;max-width:150px;object-fit:contain}#stagedMedia .stage-info{flex:1;min-width:0;font-size:12px}.material-tools{display:flex;gap:8px;margin-bottom:16px}.material-tools input{flex:1}.material-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.material-card{border:1px solid #e1e5e9;border-radius:5px;padding:14px;min-width:0}.material-card img{max-width:100%;height:130px;object-fit:contain;display:block;margin:8px auto}.material-card pre{white-space:pre-wrap;overflow-wrap:anywhere;font:12px/1.6 inherit;max-height:160px;overflow:auto;background:#f6f7f9;padding:10px}.material-card .row{flex-wrap:wrap}.material-card button,.material-card a{font-size:12px}.material-form{border-top:1px solid #eee;margin-top:20px;padding-top:16px;display:grid;gap:10px}.material-form textarea{height:90px}.favorite-button{border:0;background:transparent;color:#9ca8b2;font-size:10px;padding:2px 8px}.main .chathead{height:auto;min-height:62px}.main .chathead #subtitle{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.team-presence{font-size:11px;color:#778da0}#libraryDialog{width:min(850px,94vw)}@media(max-width:1150px){.topbar{gap:10px}.topnav{gap:10px}.topbar button{font-size:12px}.brand{font-size:16px}.userbox{gap:8px}}

.internal-active .compose-mode{background:#ffff00;margin:-10px -14px 5px;padding:8px 14px}.internal-active .composer,.internal-active #draft{background:white}.internal-active .composer{border-top:1px solid #dedfe1}.internal-bubble{background:#fff36b;border-color:#e7dc55;display:inline-block}.internal-message.own{text-align:right}.internal-message.own .internal-bubble{text-align:left}.internal-count{white-space:nowrap}

@media(min-width:951px){.shell{grid-template-columns:190px 260px minmax(270px,1fr) 300px}.conversation{min-height:74px;padding:10px}.topbar{height:60px}}
.out .bubble{background:#fff;border-color:#ededed}.message{position:relative;margin-left:34px;max-width:calc(100% - 68px)}.message.out{margin-left:auto;margin-right:34px}.message[data-avatar]::before{content:attr(data-avatar);position:absolute;left:-34px;top:20px;width:27px;height:27px;line-height:27px;text-align:center;background:#dce6ee;color:#688399;border-radius:3px;font-size:12px}.message.out[data-avatar]::before{left:auto;right:-34px}.message [data-quote],.message .favorite-button{opacity:0}.message:hover [data-quote],.message:hover .favorite-button,.message:focus-within [data-quote],.message:focus-within .favorite-button{opacity:1}.internal-bubble{background:#ffff75}.internal-message{margin-left:34px;max-width:calc(100% - 68px)}.internal-message.own{margin-left:auto;margin-right:34px}

.avatar .real-avatar{width:100%;height:100%;object-fit:cover;border-radius:inherit;display:block}

.message.has-real-avatar::before{display:none}.sender-avatar{position:absolute;left:-34px;top:20px;width:27px;height:27px;border-radius:3px;object-fit:cover}.message.out .sender-avatar{left:auto;right:-34px}

.chathead{position:relative;padding-right:145px}.chat-team-actions{position:absolute;right:10px;top:12px;display:flex;align-items:center;gap:6px}#headerMembers{display:flex;gap:3px}.operator-mini{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;background:#dcecf8;color:#3987bd;border-radius:4px;font-size:12px}#chatMore{font-size:23px;border:0;background:transparent;padding:0 3px;line-height:32px}#chatInfoDialog{width:500px;max-width:92vw;padding:0;border:0;border-radius:0}#chatInfoDialog .modal-head{margin:0;background:#278fe8;color:#fff;padding:8px 12px}#chatInfoDialog h2{font-size:15px;font-weight:400}#chatInfoDialog [data-dialog-close]{font-size:25px;color:white;background:transparent;border:0;padding:0;line-height:22px}.member-cards{padding:18px 22px;display:grid;grid-template-columns:repeat(5,1fr);gap:18px 12px;min-height:220px;align-content:start}.operator-card{text-align:center;font-size:12px}.operator-face{width:52px;height:52px;background:#deedf8;color:#3889c1;display:flex;align-items:center;justify-content:center;font-size:24px;position:relative;margin:0 auto 5px;border-radius:4px}.operator-card small{display:block;color:#959da5;font-size:10px}.member-symbol{width:52px;height:52px;border:2px dashed #aaa;color:#999;font-size:36px;padding:0;margin:0 auto}.remove-member{position:absolute;right:-7px;top:-7px;background:#e76969;color:white;border:0;border-radius:50%;width:20px;height:20px;line-height:18px;padding:0}.chat-info-row{padding:16px 14px;border-top:6px solid #f1f1f1;display:flex;justify-content:space-between;gap:20px}.chat-info-row span:last-child{color:#8a949d}.chat-info-primary{padding:16px 14px;border-top:6px solid #f1f1f1;display:grid;grid-template-columns:76px 1fr;align-items:center;gap:8px}.chat-info-primary p{grid-column:2;margin:0;font-size:11px}.chat-info-primary label{font-weight:600}.chat-info-footer{padding:14px;border-top:1px solid #eee;text-align:right}#primarySlot select{width:100%}@media(max-width:1050px){#headerMembers .operator-mini:nth-child(n+3){display:none}.chathead{padding-right:96px}}

.chat-info-footer{display:flex;gap:10px;justify-content:flex-end}.chathead>.row{min-width:0}.chathead strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

.conversation.is-pinned{background:#eef3f9}.conversation.is-pinned.selected{background:#dbeafe}.preference-mark{color:#7d8b9a;font-size:11px}.conversation-options{padding:0 20px}.conversation-options input{accent-color:#2999e8;width:18px;height:18px}.conversation-options p{font-size:12px}

#chatContextMenu{position:fixed;z-index:10000;background:#484848;color:#fff;padding:7px 0;border-radius:4px;box-shadow:0 6px 22px #0003;min-width:170px}#chatContextMenu[hidden]{display:none}#chatContextMenu button{display:block;width:100%;border:0;border-radius:0;background:transparent;color:white;text-align:left;padding:9px 15px;font-size:13px}#chatContextMenu button:hover,#chatContextMenu button:focus{background:#626262;outline:none}#chatContextMenu button:disabled{opacity:.38}
.operator-avatar{width:100%;height:100%;border-radius:4px;object-fit:cover;display:block}.operator-face{background:transparent}.operator-mini{overflow:hidden}#currentOperatorAvatar{display:inline-block;width:27px;height:27px;vertical-align:middle;margin-right:6px}.internal-message>.operator-avatar{position:absolute;width:27px;height:27px;left:-34px;top:20px}.internal-message{position:relative}.internal-message.own>.operator-avatar{left:auto;right:-34px}.member-cards{min-height:250px;grid-template-columns:repeat(5,1fr);gap:20px 12px}.operator-face,.member-symbol{width:55px;height:55px}.member-symbol{border-radius:0;background:#fff;border:3px dashed #999;font-weight:bold;color:#999}.operator-card small{margin-top:3px}.conversation-event{text-align:center;color:#aaa;font-size:12px;line-height:1.9;margin:18px 0;white-space:pre-wrap}.conversation-event time{display:block;margin-bottom:8px}.tag-nav{position:relative}#tagNavMenu{position:absolute;top:100%;right:0;z-index:10;background:#252832;min-width:140px;box-shadow:0 4px 9px #0003}#tagNavMenu button{display:block;padding:12px;color:#fff;width:100%;text-align:left}.contact-tag-row{display:flex;align-items:center;gap:16px;cursor:pointer;min-height:72px}.contact-tag-row h3{min-width:65px;margin:0}.contact-tag-row .tag,.tag-chip-list .tag{display:inline-block;background:#2c7ef4;color:#fff;border-radius:2px;padding:4px 7px;margin:2px;font-size:12px}.contact-tag-row:hover{background:#f6f8fb}.tag-scroll{max-height:60vh;overflow:auto;padding:12px}.tag-scroll details{margin:0 0 13px}.tag-scroll summary{cursor:pointer;font-size:14px;list-style:disclosure-open}.tag-options{display:flex;flex-wrap:wrap;gap:10px 20px;padding:12px 0 0}.tag-options label{display:inline-flex;align-items:center;gap:5px;font-size:13px;color:#666}.tag-options input{accent-color:#278fe8}.tag-options button{font-size:11px;background:#f4f4f4;border:0;padding:3px 8px}.dialog-actions{padding:10px 20px;background:#f5f5f5;display:flex;justify-content:space-around;gap:20px;position:sticky;bottom:0}.dialog-actions button{min-width:120px}.tag-edit-row{display:flex;gap:8px;margin:10px 0}.tag-edit-row input{flex:1}.tag-chip-list{padding:6px 15px}#tagManagerGroups summary button{float:right;padding:2px 8px;font-size:12px}#tagBatchContacts{max-height:180px;overflow:auto;display:flex;flex-wrap:wrap;gap:12px}#tagBatchContacts label{font-size:13px}#tagBatchContacts label[hidden]{display:none}#tagBatchAdd,#tagBatchRemove{max-height:180px;overflow:auto}#tagManager,#tagPicker,#tagBatch{width:min(1000px,94vw);padding:0}#tagEditor,#memberPicker{width:min(500px,94vw);padding:0}#tagEditorForm,#tagBatch>label,#tagBatch>h3,#tagBatch>p,#tagBatchContacts,#tagBatchAdd,#tagBatchRemove{padding-left:14px;padding-right:14px}#tagManager .modal-head,#tagPicker .modal-head,#tagEditor .modal-head,#tagBatch .modal-head,#memberPicker .modal-head{background:#278fe8;color:white;margin:0;padding:8px 12px}#tagManager h2,#tagPicker h2,#tagEditor h2,#tagBatch h2,#memberPicker h2{font-size:16px;font-weight:400}#memberPickerList{min-height:300px;max-height:55vh;overflow:auto;padding:12px}.member-choice{display:flex;align-items:center;gap:12px;margin:10px 0;padding:8px}.member-choice img{width:40px;height:40px}.member-choice input{accent-color:#278fe8}#cancelConversationTimeout{display:block;width:100%;padding:13px;border-radius:0;border-color:#ddd;background:#fafafa}.conversation-options{padding:0}.conversation-options .chat-info-row{border-top:1px solid #eee}.conversation-options input[type=checkbox]{appearance:none;width:50px;height:30px;border-radius:20px;border:1px solid #ddd;background:#fff;position:relative;cursor:pointer}.conversation-options input[type=checkbox]:before{content:'';position:absolute;left:1px;top:1px;width:26px;height:26px;border-radius:50%;background:white;box-shadow:0 1px 3px #bbb}.conversation-options input:checked{background:#168cff;border-color:#168cff}.conversation-options input:checked:before{left:21px}.conversation-options>p{padding:0 14px;font-size:11px}.chat-info-row{align-items:center}.chat-info-primary p{color:#bc737e}

.field[hidden]{display:none!important}#tagNavMenu[hidden]{display:none}#tagPicker,#tagManager,#tagEditor,#tagBatch,#memberPicker{border-radius:0;border:0}#tagPicker [data-dialog-close],#tagManager [data-dialog-close],#tagEditor [data-dialog-close],#tagBatch [data-dialog-close],#memberPicker [data-dialog-close]{color:white;background:transparent;border:0}

.history-visible-row{display:flex;align-items:center;justify-content:space-between;padding:10px 4px 16px;border-bottom:1px solid #eee;gap:40px}.history-visible-row span{max-width:120px;font-size:15px}.history-visible-row input{appearance:none;width:52px;height:32px;border:1px solid #ddd;border-radius:20px;background:#fff;position:relative;cursor:pointer;flex-shrink:0}.history-visible-row input:before{content:'';position:absolute;left:1px;top:1px;width:28px;height:28px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #bbb}.history-visible-row input:checked{background:#168cff;border-color:#168cff}.history-visible-row input:checked:before{left:21px}#historyAccessNotice{background:#fff8e7;color:#8a754c;padding:9px 15px;font-size:12px}#historyAccessNotice[hidden]{display:none}
#stableContactIdentity code{display:block;font-size:11px;overflow-wrap:anywhere;margin:5px 0 10px;color:#526579}#stableContactIdentity[hidden]{display:none}

.conversation.is-timeout:not(.selected){background:#ffd0d0}.conversation.is-pinned:not(.is-timeout):not(.selected){background:#eef3f9}

.native-emoji{width:16px!important;height:16px!important;display:inline-block!important;vertical-align:middle;object-fit:contain;margin:0 1px}.mini-program-card{width:230px;white-space:normal}.mini-program-card strong{display:block;margin:12px 0;font-size:16px}
#emojiDialog{width:460px;max-width:90vw}.emoji-tabs{display:flex;gap:8px;margin-bottom:12px}.emoji-tabs .active{color:#2388bd;background:#edf7fc}#emojiSearch{width:100%;margin-bottom:10px}.emoji-grid{display:grid;grid-template-columns:repeat(8,1fr);gap:5px;max-height:330px;overflow:auto}.emoji-choice{padding:8px;border:0;background:transparent}.emoji-choice:hover{background:#e5f3fc}.emoji-choice img{width:28px;height:28px;object-fit:contain}.custom-emoji-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;max-height:300px;overflow:auto}.custom-emoji-grid img{width:90px;height:90px;object-fit:contain}.custom-emoji-grid span{display:block;font-size:12px}

/* Reference: Kyliao's compact 485 x 275 face grid, above the composer. */
#composerEmoji,#composerCustomEmoji{display:inline-flex;align-items:center;justify-content:center;background:none;border:0;color:#222;padding:2px;width:28px;height:28px;flex:0 0 28px;margin:0}#composerCustomEmoji{font-size:23px}#composerEmoji:hover,#composerCustomEmoji:hover{color:#2388bd;background:#f1f5f8}
#emojiDialog{position:fixed;inset:auto;margin:0;padding:0;width:485px;max-width:calc(100vw - 16px);border:1px solid #ddd;border-radius:0;background:white;box-shadow:0 2px 9px #0002;z-index:1000}#emojiDialog:not([open]){display:none}#emojiDialog:has(#emojiDefaultPanel:not([hidden])) .modal-head,#emojiDialog:has(#emojiDefaultPanel:not([hidden])) .emoji-tabs,#emojiSearch{display:none}#emojiGrid{display:grid;grid-template-columns:repeat(11,42px);gap:0;height:275px;max-height:275px;padding:0;overflow-y:scroll;align-content:start}.emoji-choice{height:47px;width:42px;padding:5px 3px;border-radius:0}.emoji-choice img{width:32px;height:32px}#emojiCustomPanel{padding:12px}#emojiDialog .modal-head{padding:8px 12px}#emojiDialog .emoji-tabs{padding:0 12px}@media(max-width:510px){#emojiGrid{grid-template-columns:repeat(auto-fit,42px)}}

.message .bubble.recalled-bubble{background:#ffe1e1!important;border:1px solid #eda4a4;color:#8b2020}.forward-card{min-width:240px;max-width:480px}.forward-card summary{cursor:pointer;font-weight:600}.contact-card h3{margin:8px 0}.location-card p{margin:8px 0}.media audio{max-width:100%;width:280px}

.voice-transcript{border-top:1px solid #e0e4e8;margin-top:8px;padding-top:7px;white-space:pre-wrap;max-width:420px}.voice-transcript small{color:#8b949e;font-size:11px}

.contact-card-avatar{width:48px;height:48px;object-fit:cover;border-radius:4px;float:left;margin-right:12px}.contact-card{min-width:240px;min-height:75px}

.preview.recalled-preview{color:#8a9099}

.channel-policy{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:10px;border:1px solid #e2e8ef;border-radius:6px;padding:10px;margin:6px 0}.channel-policy label{display:flex;align-items:center;gap:5px}.channel-policy .routing-rule,.channel-policy small{flex-basis:100%}.channel-policy small{color:#697887}#operatorPresence{font-size:12px;margin-left:8px;border:1px solid #c9dcd5;color:#20755d;background:#f0faf6;border-radius:5px;padding:4px 8px}

/* 客易聊式会话三态底色：超时(未回) #FFCCCC > 置顶 #EEEEEE > 普通白 */
.conversation.conv-timeout{background:#ffcccc}
.conversation.conv-pinned{background:#eeeeee}
.conversation.conv-normal{background:#ffffff}
@media (hover:hover){.conversation:hover{filter:brightness(.97)}}
.conversation.conv-timeout.selected,.conversation.conv-pinned.selected,.conversation.conv-normal.selected{background:#dceaf6;box-shadow:inset 3px 0 #288ddd}

/* 客易聊实测色值覆盖：超时 #FFCCCC，置顶 #EEEEEE（置顶优先，不参与超时着色） */
.conversation.is-timeout:not(.selected){background:#ffcccc}
.conversation.is-pinned:not(.is-timeout):not(.selected){background:#eeeeee}

/* 用户管理：11 项权限开关排成三列，避免标签竖排换行 */
#uPerms{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px 14px;align-items:start}
#uPerms label{display:flex;align-items:center;gap:5px;white-space:nowrap;font-size:13px;line-height:1.4}
#uPerms label .muted{font-size:12px}

/* 联系人整页 */
dialog.page-dialog{width:100vw;max-width:100vw;height:100vh;max-height:100vh;margin:0;border:0;border-radius:0;padding:0;background:#fff}
dialog.page-dialog[open]{display:flex;flex-direction:column}
dialog.page-dialog .modal-head{display:flex;align-items:center;gap:12px;padding:14px 20px;margin:0;border-bottom:1px solid #e6ece9;background:#f7faf8}
dialog.page-dialog .modal-head h2{font-size:17px;margin:0}
dialog.page-dialog .modal-head .muted{margin-left:auto;font-size:13px}
.dir-toolbar{display:flex;flex-wrap:wrap;gap:8px;align-items:center;padding:12px 20px;border-bottom:1px solid #eef2f0}
.dir-toolbar #directorySearch{flex:1 1 240px;min-width:200px;height:32px}
.dir-toolbar select{height:32px}
.dir-toolbar button{height:32px;padding:0 12px}
.dir-date{display:flex;align-items:center;gap:6px;color:#6b7a74;font-size:13px}
.dir-date input{height:30px}
.dir-check{display:flex;align-items:center;gap:5px;font-size:13px;color:#6b7a74}
.dir-columns{display:flex;flex-wrap:wrap;gap:8px 18px;padding:10px 20px;border-bottom:1px solid #eef2f0;background:#fbfdfc}
.dir-columns[hidden]{display:none}
.dir-columns label{font-size:13px;display:flex;align-items:center;gap:5px}
.dir-table-wrap{flex:1;overflow:auto;padding:0 20px 20px}
.dir-table{border-collapse:separate;border-spacing:0;width:100%;font-size:13px}
.dir-table th{position:sticky;top:0;background:#f3f7f5;text-align:left;padding:9px 10px;border-bottom:1px solid #e2e9e5;white-space:nowrap;cursor:pointer;user-select:none;z-index:1;font-weight:600;color:#41544c}
.dir-table th.sorted{color:#2f6d55}
.dir-table td{padding:8px 10px;border-bottom:1px solid #f0f4f2;vertical-align:top;max-width:260px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dir-table tbody tr:hover{background:#f8fbf9}
.dir-table td.dir-name{cursor:pointer;color:#1d6f4f;font-weight:600}
.dir-table td.dir-name:hover{text-decoration:underline}
.dir-table .dir-bl{color:#b3261e}
.dir-table .dir-empty{text-align:center;color:#8a9992;padding:36px}

.link-list{max-height:52vh;overflow:auto;margin-top:10px;border-top:1px solid #eef2f0}
.link-list .contact-row{padding:8px 0;border-bottom:1px solid #f2f6f4}
.link-badge{display:inline-block;margin-right:6px;padding:1px 7px;border-radius:10px;background:#e7f4ec;color:#2f6d55;font-size:12px}

.dir-table td.dir-field{cursor:pointer}
.dir-table td.dir-field:hover{background:#f2f8f4}
.dir-field-input{width:100%;height:26px;border:1px solid #9fc3af;border-radius:4px;padding:0 6px;font-size:13px}
.field-list{max-height:44vh;overflow:auto;margin-top:10px}
.field-list .contact-row{padding:8px 0;border-bottom:1px solid #f2f6f4}
.field-form{display:flex;gap:8px;margin-top:12px}
.field-form input{flex:1}

/* 敏感词 */
.sensitive-tools{display:flex;gap:8px;margin:10px 0}
.sensitive-tools input{flex:1}
.sensitive-tools select{width:110px}
.sensitive-list{display:flex;flex-wrap:wrap;gap:6px;max-height:180px;overflow:auto;padding:4px 0}
.sensitive-chip{display:inline-flex;align-items:center;gap:6px;padding:3px 8px;border-radius:12px;background:#f2f6f4;font-size:13px}
.sensitive-chip.block{background:#fde8e8;color:#b3261e}
.sensitive-chip.warn{background:#fff4e0;color:#9a6210}
.sensitive-chip.remind{background:#e8f0fd;color:#1d4f9a}
.sensitive-chip button{border:0;background:transparent;color:inherit;cursor:pointer;font-size:12px}
.sensitive-head{display:flex;align-items:center;gap:8px;margin-top:14px}
.sensitive-head h3{margin:0;font-size:14px}
.sensitive-head .muted{margin-left:auto;font-size:12px}
.sensitive-hits{max-height:320px;overflow:auto;margin-top:8px}
.sensitive-hit{padding:8px 0;border-bottom:1px solid #f0f4f2;font-size:13px}
.sensitive-hit .hit-meta{color:#6b7a74;font-size:12px;margin-bottom:2px}
.sensitive-hit .hit-body{white-space:pre-wrap;word-break:break-word}
.sensitive-hit .hit-word{font-weight:600}
.sensitive-hit.block .hit-word{color:#b3261e}
.sensitive-hit.warn .hit-word{color:#9a6210}
.sensitive-hit.remind .hit-word{color:#1d4f9a}

/* 数据分析 */
.report-tools{display:flex;align-items:center;gap:8px;margin:10px 0}
.report-tools .muted{margin-left:auto;font-size:12px}
.report-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.report-card{background:#f7faf8;border:1px solid #e6ece9;border-radius:10px;padding:10px 12px}
.report-card b{display:block;font-size:20px;color:#2f6d55}
.report-card span{font-size:12px;color:#6b7a74}
.report-section{margin-top:16px}
.report-section h3{margin:0 0 8px;font-size:14px}
.report-bars{display:flex;align-items:flex-end;gap:6px;height:130px;padding:6px 0;border-bottom:1px solid #eef2f0}
.report-bar{flex:1;height:100%;display:flex;flex-direction:column;justify-content:flex-end;gap:2px;min-width:0}
.report-bar i{display:block;min-height:2px;background:#9fc3af;border-radius:3px 3px 0 0}
.report-bar i.out{background:#5f9c7d}
.report-bar span{font-size:10px;color:#8a9992;text-align:center;white-space:nowrap;overflow:hidden}
.report-op{display:flex;gap:10px;align-items:center;padding:5px 0;font-size:13px;border-bottom:1px solid #f4f7f5}
.report-op .bar{height:8px;background:#cfe4d8;border-radius:4px}
.report-quality{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;font-size:13px}
.report-quality div{background:#fbfdfc;border:1px solid #eef2f0;border-radius:8px;padding:8px 10px}
.report-quality b{display:block;font-size:17px;color:#41544c}
/* 对齐客易聊：会话行两行制、45px 头像、红色未读角标、右下角主客服 */
@media(min-width:951px){.shell{grid-template-columns:200px 280px minmax(270px,1fr) 300px}}
.conversation{min-height:68px;padding:8px 10px;align-items:center}
.conversation .avatar{width:45px;height:45px;border-radius:5px;font-size:17px}
.conversation .conv-text{flex:1;min-width:0}
.conversation .conv-name{font-size:16px;font-weight:500;color:#3b4144}
.conversation .conv-time{font-size:12px;color:#999}
.conversation .preview{font-size:12px;color:#888;margin-top:1px}
.conversation .unread-pill{position:absolute;top:-5px;right:-5px;min-width:18px;height:18px;line-height:18px;padding:0 5px;border-radius:100px;background:#ff5a5f;color:#fff;font-size:12px;text-align:center;box-shadow:0 0 0 2px #fff}
.conversation .conv-meta{position:absolute;right:10px;bottom:8px;display:flex;align-items:center;gap:4px}
.conv-owner{width:22px;height:22px;border-radius:50%;background:#5f9c7d;color:#fff;font-size:12px;display:flex;align-items:center;justify-content:center;box-shadow:0 0 0 2px #fff}
.conv-free{font-size:11px;color:#a6adb6}
.topnav button{font-size:15px}
.topnav button.active{background:#fff;color:#23262e;border-radius:6px;padding:6px 12px;height:auto}
.conversation{position:relative}
.conversation .avatar{flex:0 0 45px}
.conversation .conv-meta{position:absolute;right:10px;bottom:8px;display:flex;align-items:center;gap:4px}
.conversation .preference-mark{display:none}
.conversation .conv-free{display:none}
.conversation .preview{margin-right:24px}

/* 对齐客易聊：浅灰对话底、无边框气泡、居中时间分隔 */
#messages{background:#f5f6f7;padding:16px 18px}
.message .bubble{background:#fff;border:0;border-radius:6px;padding:10px 13px;box-shadow:0 1px 2px rgba(17,24,28,.06)}
.message.out .bubble{background:#eef2f0}
.message .meta{font-size:11px;color:#8a9099;margin:0 0 4px}
.time-divider{text-align:center;color:#9aa0a6;font-size:12px;margin:10px 0 14px;clear:both}
.unread-divider{display:flex;align-items:center;gap:10px;margin:16px 4px;color:#288568;font-size:12px;clear:both}
.unread-divider::before,.unread-divider::after{content:"";flex:1;height:1px;background:linear-gradient(90deg,transparent,#b8d8ca)}
.unread-divider::after{background:linear-gradient(90deg,#b8d8ca,transparent)}
.unread-divider span{flex:0 0 auto;white-space:nowrap;letter-spacing:.5px}

/* 对齐客易聊：右侧资料"标签 + 值"行 */
.facts{margin:10px 0 4px}
.facts .fact{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:7px 0;border-bottom:1px solid #f0f2f1;font-size:13px}
.facts .fact b{font-weight:400;color:#8a9099;flex:0 0 auto}
.facts .fact span{color:#3b4144;max-width:64%;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* 输入框：textarea 版 */
#draft{width:100%;min-height:88px;max-height:180px;border:0;outline:0;resize:none;background:#fff;
  font:14px/1.55 "Microsoft YaHei",sans-serif;color:#30343b;padding:12px 14px;display:block}
#draft::placeholder{color:#9aa0a6}
.composer{background:#fff}

/* 左侧渠道：会话数括号 + 红色未读徽标 */
.acc-count{color:#8a9099;font-size:12px;margin-left:2px}
.acc-unread{background:#ff5a5f;color:#fff;border-radius:100px;padding:0 6px;font-size:11px;min-width:18px;text-align:center;margin-left:6px}

/* 消息 meta：群聊显示发送人，不在每条消息上重复时间 */
.message .meta .sender{font-size:12px;color:#8a9099}
.message .meta:empty{display:none}
/* 搜索框与筛选按钮对齐客易聊 */
.list .tools input#search{background:#f7f7f7;border:1px solid #eee;border-radius:6px;height:38px;padding:0 12px}
.list .filters select{background:#fff;border:1px solid #e6e8ea;border-radius:4px;height:32px;color:#3b4144}

/* 聊天头部：头像 + 名称 + 渠道副标题 */
.chathead{min-height:60px;align-items:center;gap:10px;padding:10px 18px;background:#fff;border-bottom:1px solid #eef0f2}
.chat-avatar{width:38px;height:38px;flex:0 0 38px;border-radius:6px;font-size:15px}
.chat-head-text{flex:1;min-width:0}
#chatname{font-size:16px;color:#3b4144}
#subtitle{font-size:12px;color:#8a9099}

/* 快捷回复分类折叠 */
.quick-group{margin:6px 0}
.quick-group>summary{cursor:pointer;font-size:12px;color:#8a9099;padding:4px 0}
.quick-group .quick-item{margin:4px 0}

/* 自动消息分组折叠 */
.auto-group{margin:8px 0}
.auto-group>summary{cursor:pointer;font-size:12px;color:#8a9099;padding:4px 0}

.chat-flags{display:flex;gap:4px;font-size:14px;color:#8a9099}
.chat-flag{opacity:.85}


/* ===== 手机 / iPad 适配 ===== */
.chat-back,.chat-panel-toggle{display:none}
@media (max-width:1200px){
  .shell{grid-template-columns:170px 250px minmax(0,1fr) 270px}
}
@media (max-width:1024px){
  .shell{grid-template-columns:0 240px minmax(0,1fr) 0}
  .accounts{overflow:hidden;padding:0;border:0}
  .sidebar{position:fixed;right:0;top:60px;bottom:0;width:min(320px,86vw);background:#fff;z-index:60;
    box-shadow:-6px 0 22px rgba(0,0,0,.16);transform:translateX(105%);transition:transform .2s ease;overflow:auto}
  body.panel-open .sidebar{transform:none}
  .chat-panel-toggle{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px}
}
@media (max-width:760px){
  .shell{display:block}
  .accounts{display:none}
  .list{height:calc(100vh - 60px);border-right:0}
  main.main{display:none}
  body.mobile-chat .list{display:none}
  body.mobile-chat main.main{display:flex;height:calc(100vh - 60px)}
  .chat-back{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;font-size:22px;line-height:1;padding:0 0 4px}
  .topbar{padding:0 10px}
  .brand{font-size:15px}
  .brand i{width:26px;height:26px}
  .topnav{overflow-x:auto;white-space:nowrap;flex:1;scrollbar-width:none}
  .topnav::-webkit-scrollbar{display:none}
  .topnav button{padding:16px 8px;font-size:14px}
  .topnav button.active{padding:5px 10px}
  .userbox #systemStatus,.userbox #password{display:none}
  .composer{padding-bottom:calc(10px + env(safe-area-inset-bottom))}
  #draft{min-height:64px}
  .message{max-width:94%}
  .chathead{min-height:56px;padding:8px 12px}
  .chat-avatar{width:32px;height:32px;flex:0 0 32px}
  .filters select{height:30px;font-size:12px}
  .conversation{min-height:66px}
  .sidebar{top:56px}
}

@media (max-width:1024px){.shell{min-width:0}}
@media (max-width:760px){.shell{min-width:0}.topbar{min-width:0}}

@media (max-width:760px){
  .compose-mode{flex-wrap:wrap;gap:8px}
  .compose-mode #composeHint{display:none}
  #chatname{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .chat-flags{display:none}
  .chat-head-text{min-width:0;flex:1}
  .chathead{flex-wrap:nowrap;gap:6px}
  .chathead>button{padding:5px 8px;font-size:12px}
  .list-summary{padding:6px 10px}
}

@media (max-width:1024px){
  .topbar{padding:0 10px;gap:8px}
  .topnav{overflow-x:auto;white-space:nowrap;flex:1;min-width:0;scrollbar-width:none}
  .topnav::-webkit-scrollbar{display:none}
  .topnav button{padding:16px 8px;font-size:14px}
  .userbox{flex:0 0 auto}
  .userbox #operatorName,.userbox #systemStatus,.userbox #password{display:none}
  #chatname{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .chat-head-text{min-width:0;flex:1}
}

@media (max-width:1024px){
  .sidebar{display:flex;flex-direction:column}
}

.panel-backdrop{position:fixed;inset:60px 0 0;background:rgba(17,24,28,.32);z-index:55;display:none}
body.panel-open .panel-backdrop{display:block}
@media (max-width:760px){.panel-backdrop{inset:56px 0 0}}

/* 聊天信息弹窗 */
.chat-members{display:flex;flex-wrap:wrap;gap:8px;margin:6px 0 14px}
.chat-members .member{display:flex;flex-direction:column;align-items:center;gap:4px;font-size:11px;color:#6b7a74;width:52px}
.chat-members .member .avatar{width:40px;height:40px;border-radius:8px;font-size:14px}
.chat-info-switches{border-top:1px solid #eef2f0;border-bottom:1px solid #eef2f0;margin-bottom:14px}
.chat-switch{display:flex;align-items:center;justify-content:space-between;padding:10px 2px;font-size:14px;cursor:pointer}
.chat-switch input{width:18px;height:18px}
.chat-info-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.chat-info-actions button{padding:9px 10px;border-radius:6px}
.chat-info-actions button.danger{color:#b3261e;border-color:#f0c9c6}

.chat-members .member{position:relative}
.member-remove{position:absolute;top:-2px;right:2px;width:16px;height:16px;line-height:14px;padding:0;border-radius:50%;border:1px solid #e6e8ea;background:#fff;color:#b3261e;font-size:12px;cursor:pointer}

.tag-visibility{padding:4px 14px 10px}
.tag-visibility h3{margin:6px 0 8px;font-size:13px;font-weight:400;color:#555}
.tag-visibility-list{display:grid;grid-template-columns:1fr 1fr;gap:6px 14px;max-height:150px;overflow:auto;border:1px solid #ececec;border-radius:4px;padding:8px 10px;background:#fafafa}
.tag-visibility-list label{display:flex;align-items:center;gap:6px;font-size:12px;color:#444}
.tag-visibility-list input{accent-color:#278fe8}
.tag-visibility p{margin:8px 0 0;font-size:11px;color:#999}

#memberList{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0}
.member-chip{display:inline-flex;align-items:center;gap:5px;font-size:11px;background:#eef3f7;border-radius:12px;padding:2px 8px 2px 3px;white-space:nowrap}
.member-chip .operator-avatar{width:20px;height:20px;border-radius:50%}
.member-chip.primary{background:#e3f0ff;color:#1a6fbb}

/* 手机输入区：单行工具条 + 触屏尺寸按钮 + 底部表情面板 */
@media (max-width:760px){
  .composer{padding:8px 10px calc(8px + env(safe-area-inset-bottom))}
  .compose-mode{flex-wrap:nowrap;overflow-x:auto;gap:10px;margin-bottom:6px;align-items:center;scrollbar-width:none;-webkit-overflow-scrolling:touch}
  .compose-mode::-webkit-scrollbar{display:none}
  .compose-mode label{white-space:nowrap;font-size:12px;display:inline-flex;align-items:center;gap:4px}
  .compose-mode input[type=checkbox]{width:15px;height:15px;margin:0}
  #composerLibrary{font-size:12px;padding:3px 9px;white-space:nowrap}
  #composerEmoji{width:30px;height:30px;flex:0 0 30px}
  #composerCustomEmoji{display:none}
  #draft{min-height:42px;height:42px;max-height:120px;padding:9px 12px;border-radius:9px;font-size:15px;line-height:1.4}
  .composer>.row{display:flex;flex-wrap:nowrap;gap:8px;align-items:center;margin-top:8px}
  .composer>.row .muted{display:none}
  .composer>.row button{flex:1 1 0;height:40px;padding:0 4px;font-size:13px;border-radius:9px;white-space:nowrap}
  .composer>.row button.primary{flex:1.15 1 0;font-size:14px}
  #stagedMedia{margin:0 0 8px}
  .internal-active .compose-mode{margin:0 0 6px;padding:0;background:transparent}
  #emojiDialog{left:0!important;right:0;top:auto!important;bottom:0;width:100vw;max-width:100vw;max-height:60vh;border-radius:12px 12px 0 0;border-left:0;border-right:0;border-bottom:0;box-shadow:0 -4px 18px #0003}
  #emojiCustomPanel{max-height:52vh;overflow:auto}
  #emojiGrid{grid-template-columns:repeat(auto-fill,minmax(44px,1fr));height:auto;max-height:44vh;padding:4px 8px;overflow-y:auto}
  .emoji-choice{width:auto;height:46px}
  .emoji-tabs{padding:0 10px}
}

@media (max-width:760px){
  #emojiDialog{max-height:64vh}
  #emojiDialog .modal-head{display:flex!important;padding:8px 12px}
  #emojiDialog .emoji-tabs{display:flex!important;padding:0 10px}
  #emojiGrid{max-height:38vh}
}

@media (max-width:760px){
  .internal-active .composer{border-top:2px solid #dfaf4e;background:#fffdf6}
  .internal-active #draft{background:#fffdf6}
}

#stagedMedia .stage-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media (max-width:760px){
  #stagedMedia{padding:6px;gap:9px;border-radius:8px}
  #stagedMedia img{max-height:64px;max-width:64px;border-radius:6px}
  #stagedMedia .stage-info{font-size:12px;line-height:1.35}
  #stagedMedia #removeStaged{height:36px;padding:0 12px;flex:0 0 auto}
}

/* 横屏 iPad（1024×768 一类）：右栏常驻，不再作为抽屉 */
@media (min-width:1000px) and (max-width:1024px) and (orientation:landscape){
  .shell{grid-template-columns:0 220px minmax(0,1fr) 250px}
  .sidebar{position:static;width:auto;transform:none;box-shadow:none;border-left:1px solid #e5e8ea;z-index:auto}
  .panel-backdrop{display:none!important}
  .chat-panel-toggle{display:none}
}

/* 顶部导航「更多」收纳 */
.nav-more-wrap{position:relative;flex:0 0 auto}
#navMore{color:#dce0e5;background:transparent;border:0;padding:16px 4px;white-space:nowrap}
#navMore:hover,#navMore[aria-expanded="true"]{color:#fff}
.nav-more-menu{position:absolute;right:0;top:calc(100% - 1px);min-width:150px;background:#252832;border:1px solid #3b4150;box-shadow:0 8px 22px #0006;z-index:90;padding:4px 0}
.nav-more-menu button{display:block;width:100%;text-align:left;padding:10px 16px;border:0;background:transparent;color:#e6e9ee;font-size:13px;white-space:nowrap}
.nav-more-menu button:hover{background:#343a49;color:#fff}
.nav-more-menu button.active{color:#7fc4ff}

.nav-more-wrap{position:relative;align-self:stretch;display:flex;align-items:center}
#navMore{padding:0 4px;height:100%}

/* 手机消息气泡：图片/附件/语音的尺寸与触摸链接 */
@media (max-width:760px){
  #messages{padding:12px 10px}
  .message{max-width:94%;margin-bottom:16px}
  .message .bubble{padding:8px 10px;border-radius:8px}
  .bubble:has(> .media > a > img){padding:4px}
  .media{margin-top:4px}
  .media img{max-height:320px;border-radius:6px;margin:2px 0 4px}
  .media a{display:inline-flex;align-items:center;justify-content:center;min-height:34px;padding:0 13px;margin:5px 8px 2px 0;background:#eef4f9;border-radius:17px;font-size:13px;color:#1e6ea8;text-decoration:none}
  .media span{display:block;padding:3px 2px 5px;font-size:13px;overflow-wrap:anywhere}
  .media audio{width:100%}
  .media video{max-height:56vh}
}

.nav-more-wrap[hidden]{display:none!important}

@media (max-width:760px){
  .media button{min-height:32px;padding:0 12px;border-radius:16px;font-size:13px}
}

/* 数据分析：未解析消息归类 */
.unparsed-report{margin-top:6px}
.unparsed-cats{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:10px}
.unparsed-cat{display:inline-flex;align-items:center;gap:5px;background:#eef4f8;border-radius:12px;padding:3px 10px;font-size:12px;color:#42525f}
.unparsed-cat b{color:#1d6fa5;font-size:13px}
.unparsed-list{display:flex;flex-direction:column;gap:2px;max-height:240px;overflow:auto}
.unparsed-row{display:grid;grid-template-columns:64px 120px 42px minmax(0,1fr);gap:8px;align-items:center;padding:5px 6px;font-size:12px;border-bottom:1px solid #f0f2f4}
.unparsed-type{color:#8a9099;font-family:Consolas,monospace;font-size:11px}
.unparsed-label{color:#333}
.unparsed-row b{color:#c4532a}
.unparsed-row small{color:#8a9099;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media (max-width:760px){.unparsed-row{grid-template-columns:58px minmax(0,1fr) 36px}.unparsed-row small{display:none}}

/* 系统通知：只读派生行，居中显示 */
.system-notice{display:flex;flex-wrap:wrap;justify-content:center;gap:6px;margin:14px 20px;font-size:12px;color:#7d8790;text-align:center;line-height:1.6}
.system-notice .muted{font-size:11px;color:#a3a9b0}

/* 只读派生：引用回复与动画表情 */
.derived-quote .bubble{min-width:160px}
.derived-quote blockquote.derived-quote{margin:0 0 8px;padding:7px 10px;border-left:3px solid #9fb8ab;background:#f3f6f4;border-radius:4px;color:#6f7a84;font-size:12px;white-space:pre-wrap;overflow-wrap:anywhere}
.derived-quote .derived-text{white-space:pre-wrap;overflow-wrap:anywhere}
.sticker-bubble{padding:4px!important;background:transparent!important;box-shadow:none!important;border:0!important}
.sticker-bubble img{display:block;max-width:140px;max-height:140px;border-radius:6px}
.derived-sticker .meta:empty{display:none}

/* 只读派生：文件 / 图片卡片 */
.derived-file .bubble,.derived-image .bubble{max-width:380px}
.file-line{display:flex;align-items:center;gap:10px;min-width:0}
.file-icon{font-size:22px;line-height:1;flex:0 0 auto}
.file-name{font-size:13px;color:#30343b;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:260px}
.file-download{flex:0 0 auto;font-size:12px;color:#1f6fae;text-decoration:none;background:#eef4f9;padding:6px 10px;border-radius:14px}
@media (max-width:760px){.derived-file .bubble,.derived-image .bubble{max-width:100%}.file-name{max-width:180px}}

/* 只读派生：成员申请 / 视频号卡片 */
.join-card,.channel-card{min-width:220px}
.join-card{display:flex;align-items:flex-start;gap:10px}
.join-icon,.channel-icon{font-size:20px;line-height:1.2;flex:0 0 auto}
.join-label{font-weight:600;font-size:13px;color:#3a4750;margin-bottom:2px}
.join-text{font-size:13px;color:#30343b;overflow-wrap:anywhere}
.channel-head{display:flex;gap:10px;align-items:flex-start}
.channel-label{font-size:11px;color:#8a9099;margin-bottom:3px}
.channel-title{font-size:13px;color:#30343b;font-weight:600;overflow-wrap:anywhere}
.channel-link{display:inline-block;margin-top:8px;font-size:12px;color:#1f6fae;background:#eef4f9;padding:5px 12px;border-radius:14px;text-decoration:none}
@media (max-width:760px){.join-card,.channel-card{min-width:0}}

/* 只读派生：小程序 / 应用卡片 / 会议 */
.app-card{display:flex;align-items:flex-start;gap:10px;min-width:240px}
.app-icon{font-size:20px;line-height:1.2;flex:0 0 auto}
.app-label{font-size:11px;color:#8a9099;margin-bottom:2px}
.app-title{font-size:13px;color:#30343b;font-weight:600;overflow-wrap:anywhere}
.app-link{flex:0 0 auto;font-size:12px;color:#1f6fae;background:#eef4f9;padding:5px 12px;border-radius:14px;text-decoration:none}
@media (max-width:760px){.app-card{min-width:0}}

.draft-preview{color:#d98a2b;margin-right:4px;font-size:11px}

/* 图片浮窗与右击/长按保存 */
#messages img.chat-image{cursor:zoom-in}
.image-viewer{position:fixed;inset:0;background:rgba(10,14,18,.86);z-index:200;display:flex;align-items:center;justify-content:center;padding:24px}
.image-viewer[hidden]{display:none}
/* 11-19 预览里手指缩放图片：浮层自己处理手势，浏览器不缩放、不滚动页面 */
.image-viewer{touch-action:none;overflow:hidden;overscroll-behavior:contain}
.image-viewer img{transform-origin:center center;-webkit-user-drag:none;user-select:none;-webkit-user-select:none}
.image-viewer.is-zoomed img{box-shadow:none;border-radius:0}
.image-viewer.is-zoomed .image-viewer-tip{opacity:0}
.image-viewer img{max-width:94vw;max-height:88vh;object-fit:contain;border-radius:4px;box-shadow:0 10px 40px #0008}
#imageViewerClose{position:absolute;top:14px;right:18px;width:40px;height:40px;border-radius:50%;border:0;background:#ffffff22;color:#fff;font-size:24px;line-height:1;cursor:pointer}
.image-viewer-tip{position:absolute;bottom:18px;left:0;right:0;text-align:center;color:#ffffffb0;font-size:12px}
.image-save-menu{position:fixed;z-index:210;background:#fff;border:1px solid #ddd;border-radius:8px;box-shadow:0 6px 24px #0003;padding:4px}
.image-save-menu[hidden]{display:none}
.image-save-menu button{border:0;background:none;padding:8px 16px;font-size:13px;white-space:nowrap;cursor:pointer}

/* 主客服：聊天信息内的头像选择 + 列表头像 */
.chat-info-primary-picker{padding:12px 14px;border-bottom:1px solid #eee}
.chat-info-primary-head{display:flex;justify-content:space-between;gap:8px;font-size:12px;color:#555;margin-bottom:8px}
.chat-info-primary-list{display:flex;gap:8px;overflow-x:auto;padding-bottom:2px}
.primary-chip{display:flex;flex-direction:column;align-items:center;gap:4px;border:1px solid #e4e8ec;background:#fff;border-radius:8px;padding:6px 8px;min-width:58px;cursor:pointer}
.primary-chip .operator-avatar{width:34px;height:34px;border-radius:50%}
.primary-chip span{font-size:11px;color:#5c6670;white-space:nowrap;max-width:64px;overflow:hidden;text-overflow:ellipsis}
.primary-chip.active{border-color:#258ce4;background:#eef6ff}
.primary-chip:disabled{opacity:.55;cursor:default}
.chat-info-join{display:flex;gap:8px;margin-top:8px}
.conv-owner-avatar{display:inline-flex;width:22px;height:22px;border-radius:50%;overflow:hidden;border:1px solid #e6eaee;vertical-align:middle}
.conv-owner-avatar .operator-avatar{width:100%;height:100%}

.chat-info-primary-head>span{font-weight:600;white-space:nowrap;flex:0 0 auto}
.chat-info-primary-head small{flex:1;min-width:0;text-align:right}
#memberList[hidden],#assign[hidden]{display:none!important}
.chat-info-join{flex-wrap:wrap}
.chat-info-join button{white-space:nowrap}

/* 用户管理：头像与权限字段 */
.user-row .user-avatar{display:inline-flex;width:34px;height:34px;border-radius:50%;overflow:hidden;flex:0 0 auto}
.user-row .user-avatar .operator-avatar{width:100%;height:100%}
#uPerms label,#uGroups label,#uWorkdays label{display:inline-flex;align-items:center;gap:4px;margin:2px 10px 2px 0;font-size:12px}
#uGroups,#uWorkdays{margin:4px 0 8px}
#userForm small.muted{display:block;margin:2px 0 6px}

.send-health{display:inline-flex;align-items:center;gap:4px;font-size:11px;line-height:1;padding:5px 8px;border-radius:10px;background:#eef2f6;color:#5c6670;cursor:pointer;white-space:nowrap}
.send-health.ok{background:#e8f6ec;color:#1f7a3f}
.send-health.fail{background:#fdecec;color:#b42318}
@media (max-width:760px){.send-health{display:none}}
.bot-md{white-space:normal;min-width:0;max-width:100%}
.bot-md>*{margin:0}.bot-md>*+*{margin-top:6px}
.bot-md p,.bot-md .md-h,.bot-md .md-quote,.bot-md li,.bot-md th,.bot-md td{white-space:pre-wrap;overflow-wrap:anywhere}
.bot-md .md-h{font-weight:600;line-height:1.45}.bot-md .md-h1{font-size:16px}.bot-md .md-h2{font-size:15px}.bot-md .md-h3,.bot-md .md-h4,.bot-md .md-h5,.bot-md .md-h6{font-size:14px}
.bot-md .md-quote{border-left:3px solid #d5dbe1;padding:1px 0 1px 8px;color:#5f6670}
.bot-md ul,.bot-md ol{padding-left:22px}.bot-md li+li{margin-top:2px}
.bot-md hr{border:0;border-top:1px solid #e3e6ea}
.bot-md .md-table{overflow-x:auto;max-width:100%}.bot-md table{border-collapse:collapse;font-size:12px}
.bot-md th,.bot-md td{border:1px solid #e3e6ea;padding:3px 8px;text-align:left;vertical-align:top}.bot-md th{background:#f5f7f9;font-weight:600}
.bot-md .md-r{text-align:right}.bot-md .md-ctr{text-align:center}
.bot-md code{font-family:Consolas,"Courier New",monospace;font-size:12px;background:#f2f4f6;border-radius:3px;padding:0 4px}
.bot-md pre.md-code{font-family:Consolas,"Courier New",monospace;font-size:12px;background:#f2f4f6;border-radius:4px;padding:8px;overflow-x:auto;white-space:pre}
.bot-md a{color:#2f6fb5;text-decoration:none}.bot-md a:hover{text-decoration:underline}
.bot-md .md-c-info{color:#1a9b4b}.bot-md .md-c-comment{color:#8f959e}.bot-md .md-c-warning{color:#e8590c}

/* R29: status never participates in bubble flow; the slot survives confirmation. */
#messages{overflow-anchor:none}
.r29-send .meta{height:16px;min-height:16px}
.bubble-wrap{position:relative;display:inline-block;max-width:100%}
.send-slot{position:absolute;left:-24px;top:50%;width:18px;height:18px;transform:translateY(-50%)}
/* 11-28: 「上传中 77%」/「企微上传中」 sat inside the 18 px slot and wrapped one character per line */
.send-slot small{position:absolute;top:100%;right:0;margin-top:3px;white-space:nowrap;font-size:11px;line-height:1.2;color:var(--muted,#8a94a6)}
.send-icon{display:block;box-sizing:border-box;width:16px;height:16px;min-width:16px;padding:0;margin:0;border:0;border-radius:50%;line-height:16px;font-size:12px;text-align:center;background:transparent}
.send-icon.failed{color:#fff;background:#d64545;cursor:pointer;opacity:1}
.send-icon.unknown{color:#fff;background:#949ba4;opacity:1}
.send-icon.quiet{visibility:hidden}
.send-icon.spinning{border:2px solid #c8cdd2;border-top-color:#83909b;animation:r29-spin 1s linear infinite;opacity:1}
@keyframes r29-spin{to{transform:rotate(360deg)}}
.message.recalled-system{max-width:none;margin:12px 0;text-align:center;color:#999;font-size:12px}
.message.recalled-system::before,.message.recalled-system>.sender-avatar,.message.recalled-system>.favorite-button{display:none}
.recalled-bubble{background:transparent!important;border:0!important;padding:0!important;color:#999;font-size:12px}
.recalled-original{display:block;white-space:pre-wrap;overflow-wrap:anywhere;max-width:100%}  /* 11-13 老板：对方撤回的消息像普通消息一样完整显示 */
.local-internal .bubble{background:#ffff75}
@media(prefers-reduced-motion:reduce){.send-icon.spinning{animation:none}}
.r29-send>.favorite-button{position:absolute;right:0;bottom:0;transform:translateY(100%)}
.r29-image-frame{width:160px;height:120px;margin-top:6px;display:flex;align-items:center;justify-content:center}.r29-image-frame img.chat-image{width:160px;height:120px;object-fit:contain}.r29-attachment{height:22px;line-height:22px}.r29-attachment a[aria-disabled]{color:#999;pointer-events:none}
.r29-quote{margin:8px 0 0;padding:5px 8px;border-left:2px solid #b9c3c8;color:#777;font-size:12px}


/* R31: fixed avatar geometry; favorite is context-menu only. */
.internal-message>.xiaoju-avatar{border-radius:3px}
.message>.favorite-button{display:none}

#forwardDialog{width:min(640px,92vw)}#forwardTargets{max-height:40vh;overflow:auto;display:grid;gap:8px}#forwardTargets label{display:flex;gap:10px;padding:8px}#forwardBar:not([hidden]){display:flex;gap:12px;padding:10px;border-top:1px solid #ddd}.forward-check{float:left;margin:8px}#forwardSelected,#forwardPreview{overflow-wrap:anywhere}


/* ===================================================================
   MODERN SKIN (R47) — 现代 SaaS 视觉皮肤（Linear/shadcn 取向）
   纯皮肤层：只改观感，不改布局/结构/逻辑。整段删除即还原旧皮肤。
   单一强调色 --accent（可一处改色）。追加在文件末尾，稳赢层叠。
   =================================================================== */
:root{
  --bg:#f6f7f9; --surface:#fff; --surface-2:#f1f3f6; --surface-3:#e9ecf1;
  --border:#e7e9ee; --border-2:#dcdfe6;
  --text:#1b1e25; --text-2:#5a616b; --text-3:#8b929c;
  --accent:#5b5fc7; --accent-hover:#4b4fb5; --accent-weak:#eef0fb; --accent-weak-2:#e4e7f8; --accent-border:#cdd2f2;
  --success:#16a34a; --success-weak:#e9f7ee;
  --danger:#e5484d;  --danger-weak:#fdeceb;
  --warning:#d9820b; --warning-weak:#fdf2e2;
  --unread:#ef4444;
  --r:7px; --r-lg:11px; --pill:999px;
  --sh-sm:0 1px 2px rgba(20,24,33,.05);
  --sh-pop:0 10px 30px rgba(20,24,33,.12),0 2px 8px rgba(20,24,33,.06);
  --font:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"PingFang SC","Microsoft YaHei",sans-serif;
}
/* 全局基底 */
body{background:var(--bg);color:var(--text);font-family:var(--font);-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
::selection{background:var(--accent-weak-2)}
*::-webkit-scrollbar{width:10px;height:10px}
*::-webkit-scrollbar-thumb{background:#c9ced6;border:3px solid transparent;background-clip:padding-box;border-radius:var(--pill)}
*::-webkit-scrollbar-thumb:hover{background:#aeb4bf;border:3px solid transparent;background-clip:padding-box}
*::-webkit-scrollbar-track{background:transparent}
/* 表单控件 */
button{border:1px solid var(--border-2);border-radius:var(--r);background:var(--surface);color:var(--text-2);transition:background .12s,border-color .12s,color .12s}
button:hover{background:var(--surface-2);border-color:var(--border-2);color:var(--text)}
.primary{background:var(--accent)!important;border-color:var(--accent)!important;color:#fff!important}
.primary:hover{background:var(--accent-hover)!important;border-color:var(--accent-hover)!important}
input,select,textarea{border:1px solid var(--border);border-radius:var(--r);background:var(--surface);color:var(--text)}
input:focus,textarea:focus,select:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-weak)}
a{color:var(--accent)}
/* 顶栏 */
.topbar{background:#1b1e27}
.brand i{background:var(--accent)}
.topnav button.active{background:#fff;color:#1b1e27;border-radius:var(--r)}
/* 左栏：账号/渠道 */
.accounts{background:var(--surface-2);border-right:1px solid var(--border)}
.account-item.active{background:var(--accent-weak);color:var(--accent)}
.account-heading{color:var(--text-3)}
.account-bottom{color:var(--text-3);border-top:1px solid var(--border)}
.channel-group.active>summary{color:var(--accent);background:var(--accent-weak)}
/* 会话列表 */
.list{background:var(--surface);border-right:1px solid var(--border)}
.list .tools input#search{background:var(--surface-2);border:1px solid var(--border);border-radius:var(--r)}
.list .filters select{background:var(--surface);border:1px solid var(--border);border-radius:var(--r);color:var(--text-2)}
.conversation{border-bottom:1px solid var(--border)}
@media (hover:hover){.conversation:hover{background:var(--surface-2);filter:none}}
.conversation.conv-normal{background:var(--surface)}
.conversation.is-pinned:not(.is-timeout):not(.selected),.conversation.conv-pinned:not(.selected){background:var(--surface-2)}
.conversation.is-timeout:not(.selected),.conversation.conv-timeout:not(.selected){background:var(--danger-weak)}
.conversation.selected,.conversation.conv-normal.selected,.conversation.conv-pinned.selected,.conversation.conv-timeout.selected{background:var(--accent-weak);box-shadow:inset 3px 0 var(--accent)}
.conversation .conv-name{color:var(--text)}
.conversation .conv-time{color:var(--text-3)}
.conversation .preview{color:var(--text-2)}
.conversation .unread-pill,.unread-pill{background:var(--unread);box-shadow:0 0 0 2px var(--surface)}
.acc-unread{background:var(--unread)}
.acc-count{color:var(--text-3)}
.conv-owner{background:var(--success)}
/* 头像 */
.avatar{background:var(--accent-weak);color:var(--accent);border-radius:var(--r)}
.avatar.group{background:#efeafc;color:#7a5cc7}
.avatar.helper{background:var(--success-weak);color:var(--success)}
/* 主区 / 聊天 */
.main{background:var(--bg)}
.chathead{background:var(--surface);border-bottom:1px solid var(--border)}
#chatname{color:var(--text)}
#subtitle{color:var(--text-3)}
#messages{background:var(--bg)}
.message .bubble{background:var(--surface);border:1px solid var(--border);border-radius:var(--r);box-shadow:var(--sh-sm);color:var(--text)}
.message.out .bubble{background:var(--accent-weak);border-color:var(--accent-border)}
.message[data-avatar]::before{background:var(--surface-3);color:var(--text-3);border-radius:var(--r)}
.message .meta{color:var(--text-3)}
.pending .bubble{background:var(--warning-weak);border:1px dashed #e4c591}
/* 输入区 */
.composer{background:var(--surface);border-top:1px solid var(--border)}
#draft{background:var(--surface);color:var(--text);font-family:var(--font)}
#draft::placeholder{color:var(--text-3)}
#quoteDraft{background:var(--surface-2);border-left:3px solid var(--accent)}
.send-health{background:var(--surface-2);color:var(--text-2);border-radius:var(--pill)}
.send-health.ok{background:var(--success-weak);color:var(--success)}
.send-health.fail{background:var(--danger-weak);color:var(--danger)}
/* 右栏：资料 / 快捷回复 */
.sidebar{background:var(--surface);border-left:1px solid var(--border)}
.detail-tabs{background:var(--surface);border-bottom:1px solid var(--border)}
.detail-tabs button.active{color:var(--accent);border-bottom:2px solid var(--accent)}
.facts .fact{border-bottom:1px solid var(--border)}
.facts .fact b{color:var(--text-3)}
.facts .fact span{color:var(--text)}
.field{color:var(--text-2)}
.field input,.field textarea{color:var(--text)}
.tag,.contact-tag-row .tag,.tag-chip-list .tag{background:var(--accent-weak);color:var(--accent);border-radius:6px}
.badge{background:var(--surface-2);color:var(--text-2);border-radius:6px}
.stat{color:var(--accent)}
.notice{background:var(--warning-weak);color:#8a6a20}
/* 弹窗 / 浮层 */
dialog{border:1px solid var(--border);border-radius:var(--r-lg);box-shadow:var(--sh-pop);color:var(--text)}
dialog::backdrop{background:rgba(20,24,33,.45)}
.modal-head{border-bottom:1px solid var(--border);padding-bottom:14px}
.modal-head h2{color:var(--text)}
dialog.page-dialog .modal-head{background:var(--surface-2);border-bottom:1px solid var(--border)}
#chatInfoDialog .modal-head,#tagManager .modal-head,#tagPicker .modal-head,#tagEditor .modal-head,#tagBatch .modal-head,#memberPicker .modal-head{background:var(--surface-2);color:var(--text);border-bottom:1px solid var(--border)}
#chatInfoDialog h2,#tagManager h2,#tagPicker h2,#tagEditor h2,#tagBatch h2,#memberPicker h2{color:var(--text)}
#chatInfoDialog [data-dialog-close],#tagManager [data-dialog-close],#tagPicker [data-dialog-close],#tagEditor [data-dialog-close],#tagBatch [data-dialog-close],#memberPicker [data-dialog-close]{color:var(--text-2)}
/* 下拉 / 右键菜单 / 保存菜单 */
#chatContextMenu{background:var(--surface);color:var(--text);border:1px solid var(--border);border-radius:var(--r);box-shadow:var(--sh-pop)}
#chatContextMenu button{color:var(--text)}
#chatContextMenu button:hover,#chatContextMenu button:focus{background:var(--surface-2)}
.nav-more-menu{background:#1b1e27;border:1px solid #2c303b;border-radius:var(--r);box-shadow:var(--sh-pop)}
.image-save-menu{border:1px solid var(--border);border-radius:var(--r);box-shadow:var(--sh-pop)}
/* 报表 / 卡片 */
.report-card{background:var(--surface-2);border:1px solid var(--border);border-radius:var(--r-lg)}
.report-card b{color:var(--accent)}
/* 提示条 */
#toast{background:#1b1e27;border-radius:var(--r);box-shadow:var(--sh-pop)}
/* 登录面板 */
#loginPanel{background:var(--bg)!important}
#loginForm{border:1px solid var(--border);box-shadow:var(--sh-pop);border-radius:var(--r-lg)!important}

/* R47b: 隐藏右上角发送自检指示（元素保留以免 JS 报错） */
.send-health{display:none!important}

/* R59 token and layout overrides are intentionally last in index.html. */

/* R61 BEGIN: page-mode Settings, scoped away from message layout. */
body dialog.r61-page[open]{position:fixed!important;inset:0 0 0 232px!important;margin:0!important;width:calc(100% - 232px)!important;height:100dvh!important;max-width:none!important;max-height:none!important;border:0!important;border-radius:0!important;padding:32px 40px 64px!important;background:#fff;z-index:70;overflow-y:auto!important;overflow-x:hidden;box-shadow:none!important;box-sizing:border-box}
body.r59-sidebar-collapsed dialog.r61-page[open]{left:0!important;width:100%!important}
body dialog.r61-page>.modal-head{position:relative!important;top:auto!important;margin:0 0 8px!important;padding:0!important;border:0!important;box-shadow:none!important;display:flex;align-items:center;gap:14px;min-height:40px}
body dialog.r61-page>.modal-head h2{font-size:25px;letter-spacing:-.6px;line-height:1.35;flex:1;margin:0;outline:none;color:#15233f}
body dialog.r61-page>.modal-head [data-close],body dialog.r61-page>.modal-head [data-dialog-close]{display:none}
.r61-back{display:inline-flex;align-items:center;gap:6px;color:#4a5875!important;font-size:12px!important;background:transparent!important;border:1px solid #dce1e8!important;flex:none}
.r61-intro{max-width:1120px;margin:0 0 26px;color:#7a869c}.r61-intro small{font-size:11px;letter-spacing:.7px}.r61-intro p{font-size:14px;margin:8px 0;line-height:1.7}
.r61-tabs{display:flex;flex-wrap:wrap;gap:6px;padding-bottom:16px;margin-bottom:24px;border-bottom:1px solid #dce1e8;max-width:1120px}
.r61-tabs button{border:0;background:transparent;padding:9px 14px;color:#4a5875}.r61-tabs button[aria-selected=true]{background:#e8f0fa;color:#123e73;font-weight:600}
.r61-section{max-width:1120px;min-width:0}.r61-section[hidden]{display:none!important}.r61-page>p.muted{display:none}
.r61-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:0 0 18px}.r61-toolbar input{flex:1;min-width:140px;max-width:420px;margin:0!important}.r61-toolbar select{width:auto;max-width:240px}
body dialog.r61-page .template-form,body dialog.r61-page .material-form{display:flex;flex-direction:column;align-items:stretch;gap:18px;max-width:700px;margin-top:20px;padding:0;border:0;background:transparent}
body dialog.r61-page .template-form>button,body dialog.r61-page .material-form>button{align-self:flex-start;min-width:120px}
body dialog.r61-page label:not(:has(input[type=checkbox],input[type=radio])){display:flex;flex-direction:column;gap:7px;font-size:13px;color:#15233f;width:100%;min-width:0}
body dialog.r61-page input:not([type=checkbox]):not([type=radio]),body dialog.r61-page select,body dialog.r61-page textarea{max-width:100%;min-width:0;border:1px solid #dce1e8;border-radius:6px;background:#fff;padding:9px 12px;color:#15233f;box-sizing:border-box;font-size:13px}
body dialog.r61-page textarea{min-height:100px;resize:vertical}
body dialog label:has(>input[type=checkbox]),body dialog label:has(>input[type=radio]){display:inline-flex!important;flex-direction:row!important;align-items:center!important;gap:8px;max-width:100%;font-size:13px;line-height:1.6}
body dialog input[type=checkbox],body dialog input[type=radio]{width:16px!important;height:16px!important;min-width:16px!important;flex:0 0 16px;margin:0;accent-color:#2167b4}
body dialog .row{min-width:0;flex-wrap:wrap}body dialog .row>label:not(:has(input[type=checkbox],input[type=radio])){flex:1;min-width:140px}
body dialog.r61-page .contact-row,body dialog.r61-page .channel-editor-row{padding:16px 12px;border-bottom:1px solid #e4e8ee;gap:12px;margin:0;border-radius:0;background:#fff}
body dialog.r61-page .contact-row .body{min-width:0;flex:1}body dialog.r61-page .contact-row p{margin:6px 0 0;line-height:1.6}body dialog.r61-page .user-avatar img{width:34px;height:34px}
body dialog.r61-page .channel-editor-row{display:grid;grid-template-columns:minmax(100px,1fr) minmax(120px,1fr) minmax(120px,1fr) auto;align-items:center}body dialog.r61-page .group-editor{display:flex;flex-wrap:wrap;align-items:center;gap:12px;max-width:700px;padding:12px 0}
body dialog.r61-page .group-editor input{flex:1}body dialog.r61-page .material-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(240px,100%),1fr));gap:16px}
body dialog.r61-page table{border-collapse:collapse;table-layout:fixed;width:100%;font-size:13px}body dialog.r61-page td,body dialog.r61-page th{padding:12px 8px;text-align:left;border-bottom:1px solid #dce1e8;overflow-wrap:anywhere}body dialog.r61-page th{background:#f3f5f8;color:#4a5875;font-weight:500}
body dialog.r61-page .material-tools,body dialog.r61-page .sensitive-tools,body dialog.r61-page .sensitive-head{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
body dialog.r61-page .material-tools input{min-width:120px;flex:1}body dialog.r61-page .muted{font-size:12px;line-height:1.7;color:#7a869c}
body dialog.r61-page .diagnostic-grid{grid-template-columns:repeat(auto-fit,minmax(min(260px,100%),1fr));gap:20px}body dialog.r61-page .cap-row{padding:22px 0;max-width:850px}
body dialog.r61-page .tag-scroll{max-height:none;overflow:visible}body dialog.r61-page .quick-actions{display:flex;gap:8px;flex-wrap:wrap}
body dialog:not(.r61-page):not(.page-dialog){box-sizing:border-box;max-width:calc(100vw - 24px)!important;width:min(560px,calc(100vw - 24px));overflow-wrap:anywhere}body dialog:not(.r61-page) input:not([type=checkbox]):not([type=radio]),body dialog:not(.r61-page) select,body dialog:not(.r61-page) textarea{max-width:100%;min-width:0;box-sizing:border-box}body dialog pre{white-space:pre-wrap;overflow-wrap:anywhere}body dialog img{max-width:100%}
body dialog .danger{color:#c23b2e!important;border-color:#efd3cf!important;background:#fff8f7!important}body dialog .primary{color:#fff!important;background:#2167b4!important}
body #chatInfoDialog{padding:20px;width:520px}body #chatInfoDialog>.modal-head{background:#2167b4;color:#fff;margin:-20px -20px 18px;top:-20px;padding:16px 20px;box-shadow:none}body #chatInfoDialog>.modal-head [data-close]{color:#fff}body #chatInfoDialog h2{font-size:17px}
body #chatInfoDialog .chat-members{display:grid;grid-template-columns:repeat(auto-fill,minmax(64px,1fr));gap:16px 8px;padding:8px 0 20px;margin:0}body #chatInfoDialog .member{min-width:0;width:auto}body #chatInfoDialog .member span{overflow-wrap:anywhere}body #chatInfoDialog .chat-info-switches{display:flex;flex-direction:column;gap:0;border:1px solid #dce1e8;border-radius:8px;overflow:hidden;margin:0 0 20px}
body #chatInfoDialog .chat-switch,body #chatInfoDialog .r61-info-channel,body #chatInfoDialog .r61-info-transfer{display:flex!important;justify-content:space-between;align-items:center;width:100%!important;padding:13px 14px;margin:0;background:#fff;border:0;border-bottom:1px solid #e9edf2;border-radius:0;font-size:13px;gap:12px;text-align:left;box-sizing:border-box}
.r61-info-channel span:last-child{color:#7a869c;max-width:65%;text-align:right}body #chatInfoDialog .r61-info-transfer:after{content:'›';color:#7a869c}
body #chatInfoDialog .chat-info-primary-picker{background:transparent;border:0;padding:0;margin-bottom:16px}body #chatInfoDialog .chat-info-primary-head{display:flex;flex-direction:column;align-items:flex-start;gap:6px;margin-bottom:10px}body #chatInfoDialog .chat-info-primary-head small{color:#c23b2e;font-size:11px;line-height:1.6}body #chatInfoDialog #assign{width:100%;height:38px;border-radius:6px;margin-bottom:10px}body #chatInfoDialog #chatInfoPrimary[hidden]{display:none!important}
body #chatInfoDialog .chat-info-actions{display:flex;flex-wrap:wrap;gap:8px;border-top:1px solid #dce1e8;padding-top:16px;margin-top:16px}body #chatInfoDialog .chat-info-actions button{flex:1}body #chatInfoDialog .r61-secondary-action{font-size:12px;background:transparent}.r61-full{width:100%}.r61-loading>:not(.modal-head):not(.r61-info-loading){visibility:hidden}.r61-info-loading{position:absolute;inset:80px 20px auto;text-align:center;color:#7a869c}
#r61UserCard{width:420px}.r61-user-identity{display:flex;align-items:center;gap:16px;margin:24px 0}.r61-user-identity img{width:56px;height:56px;border-radius:10px}#r61UserBody dl>div{display:grid;grid-template-columns:110px 1fr;gap:16px;padding:10px 0;border-bottom:1px solid #eef1f5}#r61UserBody dt{color:#7a869c}#r61UserBody dd{margin:0;overflow-wrap:anywhere}.r61-user-groups{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 24px}.r61-user-groups span{background:#e7f4eb;color:#267d43;border-radius:5px;padding:4px 10px}
body .v2 #messages .r61-avatar-target{position:absolute!important;left:0;top:0;width:32px!important;height:32px!important;padding:0!important;margin:0!important;min-width:0;border:0!important;box-shadow:none;background:transparent!important;z-index:2;cursor:pointer}body .v2 #messages .out .r61-avatar-target{left:auto;right:0}.r61-avatar-target:focus-visible{outline:2px solid #2167b4;outline-offset:3px}
body .v2 .composer{position:relative}.r61-quick-pop{position:absolute;left:0;right:0;bottom:100%;max-height:240px;overflow:auto;background:#fff;border:1px solid #dce1e8;border-radius:8px 8px 0 0;box-shadow:0 -8px 24px #15233f14;z-index:15;padding:6px}.r61-quick-pop button{display:block;width:100%;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;background:transparent;border:0;padding:10px 12px;border-radius:5px}.r61-quick-pop button:hover,.r61-quick-pop button:focus{background:#e8f0fa}.r61-quick-pop[hidden]{display:none!important}
#r61QuickSearch{width:100%;margin-bottom:18px}.r61-quick-scope h3{font-size:12px;color:#7a869c;text-transform:uppercase;margin:16px 0 10px}.r61-quick-category{border-bottom:1px solid #dce1e8;padding:10px 0}.r61-quick-category summary{font-size:13px;font-weight:600;cursor:pointer}.r61-quick-row{display:flex;gap:6px;align-items:center;padding:7px 0}.r61-quick-row>button:first-child{flex:1;min-width:0;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background:transparent;border:0}.r61-eye{display:flex;align-items:center;justify-content:center;width:30px;flex:none;border:0;background:transparent}#r61QuickEdit{width:100%;margin-top:20px}
body .v2 details.r61-channels{position:relative;overflow:visible!important}body .v2 details.r61-channels>summary{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:10px 12px;background:#f3f5f8;border-radius:6px}body .v2 details.r61-channels>.accounts{position:absolute!important;inset:42px 0 auto!important;width:auto!important;max-height:min(65dvh,540px);overflow-y:auto;overflow-x:hidden;background:#fff;border:1px solid #dce1e8;border-radius:8px;box-shadow:0 12px 32px #15233f22;padding:8px;z-index:55}body .v2 .r61-channels .channel-group summary{font-size:12px;padding:10px 6px;overflow-wrap:anywhere}body .v2 .r61-channels .account-item{width:100%;padding:10px;gap:6px}body .v2 .r61-channels .account-item>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}body .v2 .r61-channels .r61-offline{color:#c23b2e!important}.r61-offline:after{content:'离线';font-size:10px}
@media(max-width:1023px){body dialog.r61-page[open]{left:0!important;width:100%!important;padding:24px!important}}
@media(max-width:600px){body dialog.r61-page[open]{padding:18px 16px 40px!important}body dialog.r61-page>.modal-head{flex-wrap:wrap;gap:16px}body dialog.r61-page>.modal-head h2{font-size:22px;flex-basis:100%;order:2}.r61-intro{margin-bottom:20px}.r61-tabs{gap:4px;margin-bottom:18px}.r61-tabs button{padding:8px 10px}.r61-toolbar{align-items:stretch}.r61-toolbar input{flex-basis:100%;max-width:100%}.r61-toolbar select{max-width:100%;flex:1}body dialog.r61-page .contact-row{flex-wrap:wrap;padding:14px 0;gap:8px}body dialog.r61-page .contact-row .body{flex-basis:65%}body dialog.r61-page .channel-editor-row{grid-template-columns:minmax(0,1fr) auto;gap:10px}body dialog.r61-page .channel-editor-row small{grid-column:1/-1}body dialog.r61-page .channel-editor-row input{grid-column:1/-1}body dialog.r61-page .report-cards{grid-template-columns:1fr 1fr}body dialog.r61-page table{font-size:12px}body dialog.r61-page td button{padding:5px}body dialog.r61-page .sensitive-tools input{width:100%}body dialog.r61-page #uPerms,body dialog.r61-page #uGroups{display:flex;flex-direction:column;align-items:flex-start}body dialog.r61-page .row>label{flex-basis:100%}body #chatInfoDialog{padding:16px}body #chatInfoDialog>.modal-head{margin:-16px -16px 16px;top:-16px}.r61-back{min-height:36px}body dialog:not(.r61-page){padding:16px}body dialog .tag-edit-row{display:flex;min-width:0}body dialog .tag-edit-row input{width:100%;min-width:0}}
/* R61 END */
body #chatInfoDialog .modal-head h2{color:#fff!important}body #chatInfoDialog .chat-switch input[type=checkbox]{width:38px!important;height:22px!important;flex:0 0 38px!important;min-width:38px!important;background:#dce1e8!important}body #chatInfoDialog .chat-switch input[type=checkbox]:checked{background:#2167b4!important}body #chatInfoDialog .chat-switch input[type=checkbox]::before{width:18px;height:18px;top:2px;left:2px}body #chatInfoDialog .chat-switch input[type=checkbox]:checked::before{left:18px}body #chatInfoDialog .r61-primary-hint{display:block;color:#c23b2e;font-size:11px;line-height:1.6;margin:0 0 12px}.r61-fieldset{border:0;border-bottom:1px solid #dce1e8;display:flex;flex-direction:column;gap:18px;padding:0 0 24px;margin:0 0 10px;min-width:0}.r61-fieldset legend{font-size:15px;font-weight:600;padding:0 0 18px}.r61-users-table th:first-child{width:52px}.r61-users-table th:nth-last-child(-n+2){width:76px}.r61-users-table .user-avatar img{width:34px;height:34px}.r61-users-table .body p{line-height:1.7}.channel-editor-row .channel-policy{grid-column:1/-1;min-width:0!important;display:flex;flex-wrap:wrap;gap:10px;padding:16px;text-align:left}.channel-policy small{flex-basis:100%;line-height:1.7}.channel-policy .routing-rule{flex-basis:100%}body .r61-page .r61-toolbar input{max-width:420px}body .r61-page .r61-section>.r61-toolbar{justify-content:flex-start}body .r61-page #batchTags{margin:0 0 18px}body #chatInfoDialog .member-remove{min-width:18px;min-height:18px;padding:0;line-height:16px}body .r61-page button,body dialog button{overflow-wrap:anywhere}body .r61-page #uRoleDesc{margin-top:-8px}
@media(max-width:600px){.r61-users-table th:first-child{width:34px}.r61-users-table th:nth-last-child(-n+2){width:42px}.r61-users-table td,.r61-users-table th{padding:10px 4px!important}.r61-users-table .user-avatar img{width:28px;height:28px}.r61-users-table .badge{display:inline-block;white-space:normal}.r61-users-table td button{font-size:11px;padding:5px!important}}
body dialog.r61-fetching .r61-section{visibility:hidden}body dialog.r61-fetching:after{content:'正在加载配置…';position:absolute;left:40px;top:245px;color:#7a869c;font-size:13px}
body #emojiDialog{padding:0!important;overflow-x:hidden!important}body #emojiDialog>.modal-head{margin:0!important;top:0!important;padding:10px 12px!important;box-shadow:none!important;max-width:100%;box-sizing:border-box}body #emojiDialog .emoji-tabs{padding:10px 12px!important;margin:0!important}body #emojiGrid{max-width:100%;box-sizing:border-box}
body #directoryDialog{max-width:100vw!important;width:100vw!important;height:100dvh!important;max-height:100dvh!important;inset:0!important;margin:0!important;border-radius:0!important;padding:0!important;box-sizing:border-box;overflow:hidden}body #directoryDialog .modal-head{margin:0;padding:16px 20px;min-width:0;flex-wrap:wrap}body #directoryDialog .dir-toolbar{min-width:0;max-width:100%;box-sizing:border-box;gap:8px}body #directoryDialog .dir-date{flex-wrap:wrap;width:auto!important}body #directoryDialog .dir-date input{min-width:0;width:130px}body #directoryDialog .dir-table-wrap{min-width:0;padding:0 16px 20px}body #directoryDialog .dir-table{table-layout:fixed;min-width:0;width:100%}body #directoryDialog th,body #directoryDialog td{white-space:normal!important;overflow-wrap:anywhere;word-break:break-word;max-width:none!important;min-width:0!important;padding:9px 6px}body #directoryDialog .dir-field{white-space:normal}body #directoryDialog .dir-toolbar>input{min-width:120px;max-width:100%;box-sizing:border-box}
body #chatContextMenu,body #imageSaveMenu,body #mentionPopup,body #tagNavMenu,body #navMoreMenu{max-width:calc(100vw - 24px)!important;max-height:70dvh;overflow:auto;box-sizing:border-box}body #chatContextMenu button{white-space:normal;overflow-wrap:anywhere}body #mentionPopup{min-width:0!important}
@media(max-width:1023px){body #directoryDialog .dir-table,body #directoryDialog thead,body #directoryDialog tbody{display:block}body #directoryDialog thead tr{display:flex;flex-wrap:wrap;gap:4px;padding:8px 0}body #directoryDialog th{position:static;border:1px solid #dce1e8;border-radius:4px;background:#f3f5f8;font-size:11px;font-weight:500;padding:5px 7px}body #directoryDialog tbody tr{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px 16px;border-bottom:1px solid #dce1e8;padding:16px 0}body #directoryDialog td{display:block;border:0;padding:0;font-size:12px}body #directoryDialog td:before{content:attr(data-r61-label);display:block;color:#7a869c;font-size:10px;margin-bottom:4px}body #directoryDialog td.dir-name{grid-column:1/-1;font-size:14px}body #directoryDialog .dir-toolbar{max-height:36dvh;overflow-y:auto;flex-shrink:0;padding:12px 16px}body #directoryDialog .dir-date{flex-basis:100%;display:flex!important;flex-direction:row!important;gap:5px}body #directoryDialog .dir-date input{flex:1;width:100px}body #directoryDialog .modal-head h2{font-size:17px}body #directoryDialog .modal-head #dirCount{font-size:11px}}
@media(max-width:600px){body #emojiDialog{left:0!important;right:0!important;max-width:100vw!important;width:100vw!important}body #emojiGrid{grid-template-columns:repeat(auto-fit,minmax(38px,1fr))}.r61-info-actions{flex-wrap:wrap}}
body dialog .r61-field[hidden]{display:none!important}

/* R61 merge fix (Claude): both strokes of the close cross in the blue chat-info header */
body #chatInfoDialog>.modal-head [data-close]::before{transform:rotate(45deg)!important}
body #chatInfoDialog>.modal-head [data-close]::after{transform:rotate(-45deg)!important}

/* R65 scoped tables and page forms */
#channelDialog .r65-table-wrap{overflow:auto;border:1px solid #dfe5ec;border-radius:10px;margin-top:16px}
#channelDialog .r65-table{border-collapse:collapse;width:100%;min-width:700px;font-size:14px}
#channelDialog .r65-table th,#channelDialog .r65-table td{padding:14px 16px;text-align:left;border-bottom:1px solid #e8edf3;max-width:260px;overflow-wrap:anywhere}
#channelDialog .r65-table th{background:#f5f7fa;color:#586679;font-weight:600}
#channelDialog .r65-actions{display:flex;gap:10px;justify-content:flex-end;margin:16px 0}
#channelDialog .r65-table button,#channelDialog .r65-actions button{height:36px;min-width:72px;padding:0 16px;border-radius:7px}
#channelDialog .r65-form{margin-top:20px;padding:24px;max-width:720px;border:1px solid #dfe5ec;border-radius:12px;background:#fff}
#channelDialog .r65-form label{display:block;margin:12px 0}#channelDialog .r65-form input:not([type=checkbox]),#channelDialog .r65-form select{display:block;width:100%;margin-top:6px;min-height:38px}
#channelDialog .r65-form fieldset{border:1px solid #dfe5ec;border-radius:8px;margin-top:20px}
#channelDialog #newGroup{display:none!important}

/* R65 minor (Claude): hidden nav items take no space; one "新建分组" button on the channel page */
html body .v2 .rail #navMassSend[hidden],html body .v2 .rail .rail-btn[hidden]{display:none!important}
body #channelDialog .r61-toolbar>button.primary{display:none!important}

/* R66 typography: Dongli 14px body / 12px muted, without changing geometry rules. */
body dialog.r61-page>.modal-head h2{font-size:20px!important}
body dialog .modal-head h2{font-size:18px}
body .list-head h2,body .conversation-list h2,body #chatName,body .chathead h2,body .chat-title{font-size:16px!important}
body .r61-tabs button,body .tabs button,body .tab,body dialog.r61-page .r61-tabs button{font-size:14px!important}
body dialog.r61-page h3,body dialog.r61-page legend{font-size:16px}
body dialog.r61-page,body dialog input,body dialog select,body dialog textarea,body dialog button{font-size:14px}
body .muted,body dialog small{font-size:12px}
body #chatInfoMembers .r66-member-symbol{display:inline-flex;width:44px;height:44px;min-width:44px;min-height:44px;padding:0;align-items:center;justify-content:center;font-size:28px;line-height:1;border:1px dashed #b6c3cd;border-radius:6px;background:#f5f7fa;align-self:start}
body #chatInfoMembers .member .avatar,body #chatInfoMembers .member .operator-avatar{width:44px;height:44px}
.r66-member-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(92px,1fr));gap:12px;margin:16px 0;max-height:55vh;overflow:auto;padding:3px}
.r66-member-card{position:relative;display:flex!important;flex-direction:column;align-items:center;gap:5px;min-width:0;padding:12px 6px;border:1px solid #dce1e8;border-radius:8px;cursor:pointer;text-align:center;overflow-wrap:anywhere}
.r66-member-card:has(input:checked){border-color:var(--brand,#2167b4);background:#e8f0fa}
.r66-member-card.locked{cursor:not-allowed;background:#f3f5f8;color:#697789}
.r66-member-card input{position:absolute;right:5px;top:5px;width:15px!important;height:15px;min-height:0!important;margin:0}
.r66-member-face img,.r66-member-face .operator-avatar{width:44px;height:44px;border-radius:6px;object-fit:cover}
.r66-member-card b{font-size:13px}.r66-member-card small{font-size:12px;line-height:1.4}
#inviteDialog,#r66RemoveDialog{width:560px;max-width:calc(100vw - 32px)}
#r66PasswordDialog,#xjDisplayNameDialog{width:360px;max-width:calc(100vw - 32px)}
#r66PasswordForm .field,#xjDisplayNameForm .field{display:flex;flex-direction:column;margin:12px 0;gap:6px}
#r66PasswordError,#xjDisplayNameError,#inviteError,#r66RemoveError{color:#b42318}
#tagPickerGroups details{margin:0 0 16px;border-bottom:1px solid #e6ebf0;padding-bottom:12px;min-width:0}
#tagPickerGroups summary{font-size:15px;font-weight:600;margin-bottom:10px;overflow-wrap:anywhere}
#tagPickerGroups .r66-tag-mode{font-weight:400;color:#6e7d8f;margin-left:10px;white-space:nowrap}
#tagPickerGroups .tag-options{display:flex;flex-wrap:wrap;gap:8px;min-width:0}
#tagPickerGroups .tag-options label{position:relative;display:inline-flex;max-width:100%;min-width:0;white-space:normal;overflow-wrap:anywhere;padding:7px 12px;border:1px solid #dce1e8;background:#f5f7f9;border-radius:6px;cursor:pointer;line-height:1.5}
#tagPickerGroups .tag-options label:has(input:checked){color:white;background:var(--brand,#2167b4);border-color:var(--brand,#2167b4)}
#tagPickerGroups .tag-options label:has(input:focus-visible){outline:2px solid #2167b4;outline-offset:2px}
#tagPickerGroups .tag-options input{position:absolute;opacity:0;width:1px;height:1px;min-height:0;padding:0;margin:0}
#tagPickerGroups [data-clear-group]{font-size:12px;color:#6e7d8f;background:transparent;border:0}
body #inviteDialog .r66-member-card,body #r66RemoveDialog .r66-member-card{display:flex!important;flex-direction:column!important;align-items:center!important;width:auto!important;gap:5px!important}
body .r66-member-card .r66-member-face{flex:none;width:44px;height:44px;display:block}
body .r66-member-card b,body .r66-member-card small{display:block;width:100%;max-width:100%;text-align:center;white-space:normal;overflow-wrap:anywhere;flex:none}
body #tagPicker{width:620px;max-width:calc(100vw - 32px)}
body .v2 .r59-list-title h1{font-size:18px!important}
body .v2 #chatname{font-size:15px!important}

/* R66 minor (Claude): keep the group caret inside the tag picker */
body #tagPicker details>summary{list-style-position:inside;padding-left:2px}

/* Workbench fixes: keep selection separate from material titles. */
#libraryDialog .material-select{display:flex;align-items:center;gap:6px;margin:0 0 8px;font-size:12px;line-height:18px;color:#5c6670}
#libraryDialog .material-select input[type="checkbox"]{flex:0 0 auto;width:14px;height:14px;margin:0}
body .v2 #messages .message.out .bubble.recalled-own{background:#eef0f2;color:#6b7280}
.recalled-own-label{display:block;margin-top:6px;font-size:11px;line-height:1.4;color:#68717b}

/* Screenshot editor, scoped away from page-dialog and composer controls. */
body #composerScreenshot{width:auto;min-width:66px;flex:0 0 auto;white-space:nowrap;font-size:12px;padding:4px 7px}
body #screenshotDialog{width:min(1100px,calc(100vw - 24px));max-height:calc(100dvh - 24px);padding:16px;overflow:auto;border:1px solid #dce1e8;border-radius:10px}
#screenshotDialog::backdrop{background:#14233499}
#screenshotDialog h2{margin:0 0 12px;font-size:18px}
#screenshotDialog .screenshot-tools,#screenshotDialog .screenshot-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
#screenshotDialog .screenshot-tools label{display:flex;align-items:center;gap:4px;width:auto}
#screenshotDialog input[type=color]{width:40px;height:32px;padding:2px}
#screenshotDialog [data-text]{flex:1 1 210px;min-width:0}
#screenshotDialog .screenshot-hint{font-size:12px;color:#657487}
#screenshotDialog .screenshot-viewport{overflow:auto;max-height:65dvh;background:#e8edf2;text-align:center}
#screenshotDialog canvas{display:block;width:auto;height:auto;max-width:100%;max-height:65dvh;margin:auto;touch-action:none;cursor:crosshair}
#screenshotDialog .screenshot-actions{justify-content:flex-end;margin-top:12px}

/* Shared received/sent file card; replace the legacy 22px attachment row. */
body .r29-attachment{display:flex;align-items:center;gap:12px;box-sizing:border-box;width:280px;max-width:100%;height:auto;min-height:76px;padding:12px;border:1px solid #dfe4e9;border-radius:8px;background:#fafbfc;line-height:1.4;white-space:normal;text-align:left}
body .r29-attachment .r29-file-icon{flex:0 0 38px;font-size:30px;line-height:1;text-align:center}
body .r29-attachment .r29-file-info{flex:1;min-width:0;overflow:hidden}
body .r29-attachment .r29-file-name{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:600;color:#263445}
body .r29-attachment .r29-file-size{display:block;font-size:12px;color:#8993a0;margin:4px 0}
body .r29-attachment a{font-size:12px}body .r29-attachment .r29-file-pending{font-size:12px;color:#8993a0}


/* Library overrides must outrank r61-page, including its generic input rules. */
body #libraryDialog{box-sizing:border-box;min-width:0}
body #libraryDialog .material-tools{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
body #libraryDialog .material-tools>input{flex:1 1 220px;min-width:0;width:auto;max-width:100%}
body #libraryDialog .material-tools>select{flex:0 1 160px;min-width:0;max-width:100%}
body #libraryDialog .material-tools>button{flex:0 0 auto;max-width:100%;white-space:normal}
body #libraryDialog .material-tools>label{display:inline-flex;align-items:center;gap:6px;flex:0 0 auto;min-width:0;width:auto;margin:0!important;white-space:nowrap}
body #libraryDialog .material-tools input[type="checkbox"]{flex:0 0 14px;min-width:14px;width:14px;height:14px;margin:0}
body #libraryDialog .material-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(240px,100%),1fr));gap:16px;align-items:stretch;min-width:0}
body #libraryDialog .material-card{display:flex;flex-direction:column;gap:8px;min-width:0;max-width:100%;box-sizing:border-box;overflow-wrap:anywhere}
body #libraryDialog .material-card>*{min-width:0;max-width:100%;box-sizing:border-box}
body #libraryDialog .material-select{display:flex;align-items:center;flex-direction:row;gap:6px;width:auto;margin:0;flex:none}
body #libraryDialog .material-select input[type="checkbox"]{flex:0 0 14px;min-width:14px;width:14px;height:14px;margin:0}
body #libraryDialog .material-card pre,body #libraryDialog .material-card p{margin:0;overflow-wrap:anywhere}
body #libraryDialog .material-card audio,body #libraryDialog .material-card video{width:100%;min-width:0;max-width:100%}
body #libraryDialog .material-card>.row{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-top:auto;padding-top:8px}
body #libraryDialog .material-form{display:flex;flex-direction:column;align-items:stretch;gap:12px;width:100%;max-width:700px;min-width:0;box-sizing:border-box}
body #libraryDialog .material-form>*{min-width:0;max-width:100%;box-sizing:border-box}
body #libraryDialog .material-form>label{display:flex;align-items:center;gap:6px;width:auto}
body #libraryDialog .material-form input[type="checkbox"]{flex:none;width:14px;min-width:14px;height:14px;margin:0}
body #libraryDialog .material-form>[hidden]{display:none!important}
@media(max-width:600px){body #libraryDialog .material-grid{grid-template-columns:minmax(0,1fr)}body #libraryDialog .material-tools>input{flex-basis:100%}body #libraryDialog .material-tools>select{flex:1 1 120px}}

/* 11-11 合并转发：企微式「聊天记录」卡片 + 查看弹窗 */
body #messages .bubble:has(>.xj-fwd){padding:0!important;background:transparent!important;border:0!important;box-shadow:none!important}
.xj-fwd{display:block;width:260px;max-width:100%;box-sizing:border-box;background:#fff;border:1px solid #e3e7ee;border-radius:8px;padding:10px 12px 0;cursor:pointer;text-align:left;color:#1f2329;user-select:none}
.xj-fwd:hover{border-color:#c5cfdf;box-shadow:0 2px 8px rgba(16,32,61,.06)}
.xj-fwd:focus-visible{outline:2px solid #2167b4;outline-offset:2px}
.xj-fwd-title{font-size:14px;font-weight:600;line-height:20px;margin-bottom:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.xj-fwd-line{font-size:12px;line-height:18px;color:#8a919f;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.xj-fwd-foot{margin-top:8px;border-top:1px solid #eef0f3;padding:6px 0 7px;font-size:12px;line-height:16px;color:#8a919f}
.xj-fwd-dialog{width:min(560px,calc(100vw - 32px));max-height:min(720px,calc(100dvh - 48px));padding:0!important;border:0;border-radius:12px;box-shadow:0 12px 40px rgba(16,32,61,.18);overflow:hidden!important}
.xj-fwd-dialog[open]{display:flex;flex-direction:column}
.xj-fwd-dialog::backdrop{background:rgba(16,24,40,.35)}
.xj-fwd-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;border-bottom:1px solid #eef0f3;flex:none}
.xj-fwd-head b{font-size:15px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.xj-fwd-close{border:0!important;background:transparent!important;font-size:22px;line-height:1;color:#8a919f;cursor:pointer;padding:2px 6px!important;box-shadow:none!important}
.xj-fwd-close:hover{color:#1f2329}
.xj-fwd-list{overflow-y:auto;padding:0 16px 8px;min-height:0}
.xj-fwd-item{padding:12px 0;border-bottom:1px solid #f1f2f5}
.xj-fwd-item:last-child{border-bottom:0}
.xj-fwd-meta{display:flex;justify-content:space-between;align-items:baseline;gap:12px;font-size:12px;line-height:18px;color:#8a919f;margin-bottom:4px}
.xj-fwd-meta b{color:#4a5875;font-weight:600;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.xj-fwd-meta span{flex:none}
.xj-fwd-text{font-size:14px;line-height:22px;color:#1f2329;white-space:pre-wrap;overflow-wrap:anywhere}
.xj-fwd-att{display:flex;align-items:center;gap:10px;background:#f5f6f8;border-radius:8px;padding:10px 12px;width:fit-content;max-width:100%;box-sizing:border-box}
.xj-fwd-ico{font-size:22px;line-height:1;flex:none}
.xj-fwd-att b{display:block;font-size:13px;font-weight:500;color:#1f2329;overflow-wrap:anywhere}
.xj-fwd-att small{display:block;font-size:12px;line-height:18px;color:#8a919f}
.xj-fwd-note{margin:8px 0 0;font-size:12px;color:#8a919f}
@media (max-width:480px){.xj-fwd{width:220px}.xj-fwd-dialog{width:calc(100vw - 16px);max-height:calc(100dvh - 24px)}}

/* 11-11 引用定位：引用块可点；跳到的原消息黄色闪一下 */
body #messages .message blockquote{cursor:pointer}
body #messages .message blockquote:hover{filter:brightness(.97)}
body #messages .message.xj-jump-flash .bubble{animation:xjJumpFlash 2.4s ease-out}
@keyframes xjJumpFlash{0%,40%{box-shadow:0 0 0 3px rgba(255,190,0,.9);background-color:#fff4cc}100%{box-shadow:0 0 0 0 rgba(255,190,0,0)}}

/* 11-11 企微式转发弹窗：左 最近聊天/搜索，右 发送给 + 预览 + 留言 + 取消/发送 */
body #forwardDialog{width:min(780px,calc(100vw - 24px));padding:0!important;overflow:hidden!important}
body #forwardDialog .modal-head{padding:14px 18px;border-bottom:1px solid #eef0f3;margin:0}
.xjf{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);height:min(560px,calc(100dvh - 120px))}
.xjf-left{display:flex;flex-direction:column;min-height:0;border-right:1px solid #eef0f3;padding:12px 0 0}
.xjf-search{margin:0 14px 8px;padding:8px 12px!important;border:1px solid #e1e5ec;border-radius:8px;background:#f5f6f8;font-size:13px}
.xjf-sub{padding:4px 16px 6px;font-size:12px;color:#8a919f}
body #forwardTargets.xjf-list{display:block;max-height:none;flex:1;min-height:0;overflow-y:auto;padding:0 6px 8px}
.xjf-item{display:flex;align-items:center;gap:10px;width:100%;padding:7px 10px!important;border:0!important;background:transparent!important;border-radius:8px;cursor:pointer;text-align:left;box-shadow:none!important;color:#1f2329}
.xjf-item:hover:not(:disabled){background:#f2f4f7!important}
.xjf-item:disabled{opacity:.45;cursor:not-allowed}
.xjf-check{flex:none;width:18px;height:18px;border:1.5px solid #c3c9d4;border-radius:50%;box-sizing:border-box;position:relative}
.xjf-item.on .xjf-check{background:#2167b4;border-color:#2167b4}
.xjf-item.on .xjf-check::after{content:"";position:absolute;left:5px;top:2px;width:4px;height:8px;border:solid #fff;border-width:0 2px 2px 0;transform:rotate(45deg)}
.xjf-avatar{flex:none;width:32px;height:32px;border-radius:6px;background:#e8eef7;color:#2167b4;font-size:13px;font-weight:600;display:flex;align-items:center;justify-content:center;overflow:hidden}
.xjf-avatar img{width:100%;height:100%;object-fit:cover}
.xjf-name{flex:1;min-width:0;font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.xjf-item small{flex:none;font-size:11px;color:#a0a6b1}
.xjf-right{display:flex;flex-direction:column;min-height:0;padding:12px 16px 14px;gap:10px}
.xjf-head{display:flex;justify-content:space-between;align-items:baseline;font-size:14px}
.xjf-head span{font-size:12px;color:#8a919f}
.xjf-chosen{flex:1;min-height:60px;overflow-y:auto;display:flex;flex-direction:column;gap:2px}
.xjf-chosen-item{display:flex;align-items:center;gap:10px;padding:5px 2px}
.xjf-remove{flex:none;width:22px;height:22px;padding:0!important;border:0!important;border-radius:50%;background:#eef0f3!important;color:#6b7280;font-size:15px;line-height:22px;cursor:pointer;box-shadow:none!important}
.xjf-remove:hover{background:#e1e5ec!important;color:#1f2329}
.xjf-empty{margin:8px 4px;font-size:12px;color:#a0a6b1}
.xjf-preview{flex:none;max-height:96px;overflow:hidden;background:#f5f6f8;border-radius:8px;padding:8px 10px;font-size:12px;line-height:18px;color:#6b7280}
.xjf-preview b{display:block;color:#4a5875;font-weight:600;margin-bottom:2px}
.xjf-preview div{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.xjf-note{flex:none;height:64px;resize:none;border:1px solid #e1e5ec;border-radius:8px;padding:8px 10px!important;font-size:13px}
.xjf-hint{flex:none;margin:0;min-height:16px;font-size:12px;color:#8a919f}
.xjf-hint.warn{color:#c2410c}
.xjf-actions{flex:none;display:flex;justify-content:flex-end;gap:10px}
.xjf-actions button{min-width:84px}
@media (max-width:640px){.xjf{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto;height:calc(100dvh - 90px)}.xjf-left{border-right:0;border-bottom:1px solid #eef0f3}.xjf-chosen{flex:none;max-height:110px;min-height:0}.xjf-right{gap:8px}}

/* 11-11 群成员（已识别）面板 */
body #groupMembersDialog{width:min(560px,calc(100vw - 24px))}
.gm-note{margin:0 0 10px;font-size:12px;line-height:18px;color:#8a919f}
body #groupMembersDialog .gm-search{display:block;width:100%;box-sizing:border-box;margin:0 0 12px!important}
.gm-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(76px,1fr));gap:12px 8px;max-height:min(460px,calc(100dvh - 220px));overflow-y:auto}
.gm-item{display:flex;flex-direction:column;align-items:center;gap:6px;min-width:0}
.gm-avatar{position:relative;flex:none;width:44px;height:44px;border-radius:8px;background:#e8eef7;color:#2167b4;font-size:15px;font-weight:600;display:flex;align-items:center;justify-content:center;overflow:hidden}
.gm-avatar::before{content:attr(data-i)}
.gm-avatar img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.gm-name{max-width:100%;font-size:12px;color:#1f2329;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* 11-11 附件卡片仿企业微信 */
body #messages .bubble:has(>.xj-file),body #messages .bubble:has(>.media>.xj-file),body .v2 #messages .message .bubble:has(>.xj-file),body .v2 #messages .message.out .bubble:has(>.xj-file),body .v2 #messages .message .bubble:has(>.media>.xj-file){padding:0!important;background:transparent!important;border:0!important;box-shadow:none!important;color:inherit!important}
.xj-file{display:flex;align-items:center;gap:12px;width:260px;max-width:100%;box-sizing:border-box;padding:12px 14px;background:#fff;border:1px solid #e3e7ee;border-radius:8px;color:#1f2329!important;text-decoration:none!important;cursor:pointer;text-align:left}
.xj-file:hover{border-color:#c5cfdf;box-shadow:0 2px 8px rgba(16,32,61,.06)}
.xj-file-off{cursor:default;opacity:.85}
.xj-file-text{flex:1;min-width:0;display:flex;flex-direction:column;gap:6px}
.xj-file-name{font-size:14px;line-height:20px;color:#1f2329!important;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;word-break:break-all}
.xj-file-size{font-size:12px;line-height:16px;color:#8a919f!important}
.xj-file-icon{flex:none;display:block}
.xj-file-alt{display:inline-block;margin:4px 0 0 2px;font-size:12px;color:#8a919f!important}
.xj-file-alt:hover{color:#2167b4!important}
@media (max-width:480px){.xj-file{width:220px}}

/* 11-11 安全水印（不挡点击；弹窗在顶层，单独铺一层同样的水印） */
#xjWatermark{position:fixed;inset:0;z-index:2147483000;pointer-events:none;background-repeat:repeat}
#xjWatermark[hidden]{display:none}
body dialog[open]{background-image:var(--xj-wm,none)!important;background-repeat:repeat!important}
@media print{#xjWatermark{display:block!important}}

/* 11-11 电脑1 停用、所有渠道走 hub：中心机本地老发送通道/接收器的「企微通道未就绪…」提示条不再显示（老板要求删除） */
#connectionNotice{display:none!important}

/* 按需原图与转发文件，390px 窄屏可换行。 */
.xj-original-wrap{position:relative;display:inline-block;max-width:100%;min-width:0}
.xj-original-btn{position:absolute;right:6px;bottom:6px;max-width:calc(100% - 12px);white-space:normal;overflow-wrap:anywhere;font-size:12px;padding:4px 8px;border:0;border-radius:5px;color:#fff;background:rgba(0,0,0,.68);cursor:pointer}
.xj-original-btn:disabled{cursor:wait;opacity:.8}
.xj-fwd-att>div{min-width:0;overflow-wrap:anywhere}.xj-fwd-att button,.xj-fwd-att a{display:inline-block;max-width:100%;margin-top:6px;white-space:normal;overflow-wrap:anywhere}

/* 11-11 老板：主客服头像放在会话列表醒目位置，没设主客服的一眼能看到（原来 12px 头像几乎看不见，「未分配」被隐藏）。 */
body .v2 #conversations .conversation .conv-meta{position:absolute;right:10px;bottom:9px;height:auto;line-height:normal;display:flex;align-items:center;gap:4px}
body .v2 #conversations .conversation .conv-owner-avatar{width:20px!important;height:20px!important;border-radius:50%;overflow:hidden;border:2px solid #fff;box-shadow:0 0 0 1px #d6dde5;font-size:11px;line-height:16px;flex:none}
body .v2 #conversations .conversation .conv-owner-avatar img,body .v2 #conversations .conversation .conv-owner-avatar svg,body .v2 #conversations .conversation .conv-owner-avatar .operator-avatar{width:100%!important;height:100%!important;display:block}
body .v2 #conversations .conversation .conv-free{display:inline-block!important;font-size:11px;line-height:16px;padding:1px 6px;border-radius:9px;color:#c2410c;background:#fff1e6;border:1px solid #fed7aa;white-space:nowrap}
body .v2 #conversations .conversation .preview,body .v2 #conversations .conversation .conv-preview{padding-right:58px}

/* Desktop-like forward viewer; independent of chat bubble widths. */
.xj-fwd-dialog{box-sizing:border-box;background:#f5f5f5;border-radius:5px}
.xj-fwd-head{background:#fafafa}.xj-fwd-head b{flex:1}
.xj-fwd-list{overflow-x:hidden;min-height:0;padding:8px 16px 16px}
.xj-fwd-item{display:flex;gap:10px;border:0;padding:10px 0}
.xj-fwd-avatar{flex:0 0 34px;height:34px;display:grid;place-items:center;background:#dce6ef;color:#53677d;border-radius:4px}
.xj-fwd-content{min-width:0;flex:1}.xj-fwd-date{text-align:center;color:#999;font-size:12px;margin:12px 0}
.xj-fwd-image{display:block;max-width:min(220px,100%);max-height:240px;object-fit:contain;border-radius:3px}
.xj-fwd-content .xj-fwd-text{width:fit-content;max-width:100%;box-sizing:border-box;background:#fff;border-radius:4px;padding:8px 10px}
.xj-fwd-content .xj-file{width:260px;max-width:100%;background:#fff;border:1px solid #e5e5e5;border-radius:4px}
.xj-fwd-content .xj-fwd{max-width:100%;margin:0}.xj-fwd-meta{gap:6px}.xj-fwd-meta span{font-size:11px}

.xj-fwd-content .xj-file-name{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}

/* 11-11 语音条仿企业微信 */
.xj-voice-wrap{min-width:0}
.xj-voice{display:flex;align-items:center;gap:6px;min-height:22px;max-width:100%;cursor:pointer;user-select:none}
.message.out .xj-voice{flex-direction:row-reverse}
.xj-voice-ico{width:18px;height:18px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}
.message.out .xj-voice-ico{transform:scaleX(-1)}
.xj-voice.playing .xj-voice-ico{animation:xj-voice-pulse 1s steps(3) infinite}
@keyframes xj-voice-pulse{0%{opacity:.35}50%{opacity:.7}100%{opacity:1}}
.xj-voice-dur{font-size:13px;opacity:.85}
.xj-voice-text{margin-top:6px;padding:6px 9px;border-radius:4px;background:rgba(0,0,0,.05);font-size:13px;line-height:1.55;white-space:pre-wrap;overflow-wrap:anywhere}
.message.out .xj-voice-text{background:rgba(255,255,255,.2)}
.xj-voice-wait{opacity:.6}
.xj-voice-text button{font-size:12px;padding:0 6px}
#messages .message:not(.out) .sender-avatar{cursor:pointer}

/* 11-11 合并转发里的文件：同款文件卡片 + 下载按钮 */
.xj-fwd-file{display:flex;flex-direction:column;align-items:flex-start;gap:4px;max-width:100%}
.xj-fwd-file .xj-file{max-width:280px}
.xj-file-act{font-size:12px;padding:2px 10px}

/* 11-11 长引用折叠 + 合并转发文件卡片点击即下载 */
.xj-quote-text{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;white-space:pre-wrap;overflow-wrap:anywhere;margin:2px 0 4px}
.xj-quote-text.open{display:block;-webkit-line-clamp:unset}
.xj-quote-more{border:0;background:transparent;color:#2b78e4;font-size:12px;padding:0 4px 4px 0;cursor:pointer}
.xj-fwd-dl{cursor:pointer}.xj-fwd-dl:hover{border-color:#bcd3f2}

/* 11-12 从电脑2 拉取更早记录: centred text link + small select, under 加载更早已接收记录 */
.xj-hpull{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:6px 8px;margin:2px auto 16px;font-size:12px;line-height:22px;color:#8a8f98}
.xj-hpull-btn{background:none;border:0;padding:0 2px;margin:0;color:#3a6fd8;font-size:12px;line-height:22px;cursor:pointer;box-shadow:none}
.xj-hpull-btn:hover:not(:disabled){text-decoration:underline}
.xj-hpull-btn:disabled{color:#a0a4ab;cursor:default}
.xj-hpull-pages{height:22px;padding:0 2px;font-size:12px;color:#555;border:1px solid #dcdfe6;border-radius:4px;background:#fff;cursor:pointer}
.xj-hpull-pages:disabled{color:#a0a4ab;background:#f5f6f7;cursor:default}
.xj-hpull-status:empty{display:none}
/* 11-12 全局下拉框弹出列表（select-popup.js）：总在框的正下方/正上方，不盖住原来的框 */
.xj-sel-pop{position:fixed;inset:auto;margin:0;z-index:2147483000;box-sizing:border-box;max-width:min(420px,calc(100vw - 16px));overflow-y:auto;overflow-x:hidden;padding:4px;background:var(--surface,#fff);color:var(--text,#1f2328);border:1px solid var(--border,#dcdfe6);border-radius:6px;box-shadow:0 8px 24px rgba(15,23,42,.14);font:13px/1.4 var(--font,inherit);text-align:left}
.xj-sel-item{padding:6px 10px;border-radius:4px;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;user-select:none}
.xj-sel-item.is-indent{padding-left:20px}
.xj-sel-item.is-active{background:var(--accent-weak,#eaf3fc)}
.xj-sel-item.is-selected{color:var(--accent,#1687dd);font-weight:600}
.xj-sel-item.is-disabled{color:var(--text-3,#b0b4ba);cursor:default}
.xj-sel-group{padding:6px 10px 2px;font-size:12px;color:var(--text-3,#8a8f98);user-select:none}
select.xj-sel-open{border-color:var(--accent,#1687dd)}
/* 11-12 右栏：滚动条位置常驻，展开「会话标识」等内容出现滚动条时宽度不再跳动 */
.detail-pane{scrollbar-gutter:stable}
/* 11-12 定时消息 */
.xj-sched-open[hidden],.xj-sched-badge[hidden],.xj-sched-bar[hidden]{display:none!important}
.xj-sched-badge{display:inline-flex;align-items:center;margin-left:8px;padding:1px 8px;border:1px solid #fed7aa;border-radius:10px;background:#fff7ed;color:#c2410c;font-size:12px;font-weight:600;line-height:18px;vertical-align:middle;cursor:pointer;white-space:nowrap}
/* 11-19 角标原来插在客户名和副标题之间单独占一行，手机头部只有52px，名字和副标题被挤出去。
   后来放到客户名同一行，又在 iPhone 上盖住了右侧按钮：手机群聊、电脑群聊的文字区只有70～110px，名字和角标放不下。
   定稿：客户名独占第一行（永远整行宽）；角标放第二行最前面，副标题排在它后面、放不下就省略。 */
.chathead .chat-head-text{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center}
.chathead .chat-head-text>*{grid-column:1/-1;min-width:0}
.chathead .chat-head-text>#chatname{grid-row:1}
.chathead .chat-head-text>#schedBadge:not([hidden])~#subtitle{grid-row:2;grid-column:2}
/* 11-19 列表里的定时标签紧跟客户名，时间仍靠右（行是 space-between，用 margin-right:auto 顶开） */
body .v2 #conversations .conversation .conv-text .row>.xj-sched-pill,.conversation .conv-text .row>.xj-sched-pill{flex:none;margin:0 auto 0 0}
.chathead .chat-head-text>#schedBadge{grid-row:2;grid-column:1;justify-self:start;box-sizing:border-box;min-width:max-content;height:18px;min-height:0;margin:0 6px 0 0;padding:0 6px;font-size:11px;line-height:16px}
.xj-sched-badge.is-bad,.xj-sched-pill.is-bad{border-color:#fecaca;background:#fef2f2;color:#b91c1c}
body .v2 #conversations .conversation .xj-sched-pill,.xj-sched-pill{display:inline-block;margin-left:4px;padding:0 6px;border:1px solid #fed7aa;border-radius:9px;background:#fff7ed;color:#c2410c;font-size:11px;line-height:16px;white-space:nowrap;vertical-align:middle}
.xj-sched-bar{display:flex;flex-direction:column;gap:4px;margin:0 0 6px;padding:6px 8px;border:1px solid #fed7aa;border-radius:6px;background:#fffaf3;font-size:12px;transition:box-shadow .3s}
.xj-sched-bar.flash{box-shadow:0 0 0 3px #fdba74}
.xj-sched-row{display:flex;align-items:center;gap:8px;min-width:0}
.xj-sched-row.is-bad{color:#b91c1c}
.xj-sched-when{flex:none;font-weight:600;color:#c2410c}
.xj-sched-row.is-bad .xj-sched-when{color:#b91c1c}
.xj-sched-text{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text-2,#3b4144)}
.xj-sched-row.is-bad .xj-sched-text{color:#b91c1c}
.xj-sched-by{flex:none;color:var(--text-3,#8a8f98)}
.xj-sched-row button{flex:none;padding:0 8px;height:22px;font-size:12px}
.xj-sched-dialog{width:440px;max-width:calc(100vw - 32px);padding:0;border:1px solid var(--border,#dcdfe6);border-radius:8px}
.xj-sched-form{display:flex;flex-direction:column;gap:12px;padding:18px 20px;margin:0}
.xj-sched-form h3{margin:0;font-size:16px}
.xj-sched-label{display:flex;flex-direction:column;gap:6px;font-size:13px;color:var(--text-2,#3b4144)}
.xj-sched-label textarea{width:100%;box-sizing:border-box;resize:vertical;min-height:90px;font:inherit}
.xj-sched-label input{width:100%;box-sizing:border-box;height:32px}
.xj-sched-quick{display:flex;flex-wrap:wrap;gap:6px}
.xj-sched-quick button{height:26px;padding:0 10px;font-size:12px}
.xj-sched-tip{margin:0;font-size:12px;line-height:1.6;color:var(--text-3,#8a8f98)}
.xj-sched-err{min-height:0;font-size:12px;color:#b91c1c}
.xj-sched-err:empty{display:none}
.xj-sched-actions{display:flex;justify-content:flex-end;gap:8px}
/* 11-12 老板：会话顶部「标记已处理」用不上，去掉（筛选里的待处理/已处理一并去掉） */
#resolve{display:none!important}

/* 11-12 搜索结果可点击定位 */
.xj-search-hint{margin-top:4px;font-size:12px;color:var(--text-3,#8a8f98)}
.xj-search-hint[hidden]{display:none}
body.xj-searching #messages .message[id^="message-"]{cursor:pointer}
body.xj-searching #messages .message[id^="message-"]:hover .bubble{box-shadow:0 0 0 2px var(--accent-weak,#d6e9fb)}
/* 11-12 内部消息 @ 同事 */
.xj-imention-btn[hidden],.xj-imention-pop[hidden],.xj-imention-banner[hidden]{display:none!important}
.xj-imention-pop{position:fixed;z-index:2147482000;min-width:180px;max-width:280px;max-height:260px;overflow-y:auto;padding:4px;background:var(--surface,#fff);border:1px solid var(--border,#dcdfe6);border-radius:6px;box-shadow:0 8px 24px rgba(15,23,42,.14);font-size:13px}
.xj-imention-item{padding:6px 10px;border-radius:4px;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.xj-imention-item span{margin-left:6px;font-size:12px;color:var(--text-3,#8a8f98)}
.xj-imention-item.is-active,.xj-imention-item:hover{background:var(--accent-weak,#eaf3fc)}
.xj-imention-empty{padding:8px 10px;color:var(--text-3,#8a8f98)}
body .v2 #conversations .conversation.xj-imention-row,.conversation.xj-imention-row{background:#fff1f1!important;box-shadow:inset 3px 0 0 #ef4444}
body .v2 #conversations .conversation .xj-imention-pill,.xj-imention-pill{display:inline-block;margin-right:4px;padding:0 6px;border-radius:9px;background:#ef4444;color:#fff;font-size:11px;font-weight:700;line-height:16px;vertical-align:middle}
.xj-imention-banner{display:flex;align-items:center;gap:10px;margin:0;padding:8px 16px;background:#fff1f1;border-bottom:1px solid #fecaca;color:#7f1d1d;font-size:13px}
.xj-imention-ico{flex:none;width:22px;height:22px;border-radius:50%;background:#ef4444;color:#fff;font-weight:700;display:inline-flex;align-items:center;justify-content:center}
.xj-imention-msg{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.xj-imention-text{color:#991b1b}
.xj-imention-banner button{flex:none;height:26px;padding:0 10px;font-size:12px}
/* 11-12 「返回最新消息」：浮在聊天区顶部中间的小胶囊，随滚动一直可见（原来是列表最上方的一个普通按钮） */
#messages>#latest{position:sticky;top:8px;z-index:6;display:block;width:max-content;margin:0 auto 10px;padding:4px 14px;border:1px solid var(--border,#dcdfe6);border-radius:14px;background:var(--surface,#fff);color:var(--accent,#1687dd);font-size:12px;line-height:18px;box-shadow:0 2px 10px rgba(15,23,42,.12);cursor:pointer}
#messages>#latest::after{content:" ↓"}
#messages>#latest:hover{background:var(--accent-weak,#eaf3fc)}
/* 11-12 图片按原图比例显示（只缩小不放大，最大 360×220），自己发出的图也一样。
   原来 index.html 有一条 .message.out .media img.chat-image{160×120!important} 的规则优先级更高，把发出去的图都框成 160×120。 */
body .v2 #messages .message .media img.chat-image[data-r66-width],body .v2 #messages .message.out .media img.chat-image[data-r66-width],body .v2 #messages .message .r29-image-frame img.chat-image[data-r66-width]{width:var(--r66-w)!important;height:auto!important;aspect-ratio:var(--r66-ratio)!important;max-width:100%!important;max-height:none!important;object-fit:contain!important}
body .v2 #messages .message .media:has(img.chat-image[data-r66-width]),body .v2 #messages .message .r29-image-frame:has(img.chat-image[data-r66-width]){width:fit-content!important;height:auto!important;min-width:0!important;min-height:0!important;max-width:100%!important}

/* Record image preview */
#forwardPreview{max-height:45vh;overflow:auto;min-width:0;overflow-wrap:anywhere}
.record-image-preview{display:block;width:100%;height:auto;margin:8px 0}
#forwardBar{flex-wrap:wrap}
#forwardDialog{box-sizing:border-box;max-width:calc(100vw - 16px)}
#forwardDialog .xjf>*{min-width:0}
@media(max-width:480px){#forwardDialog .xjf{display:flex;flex-direction:column}#forwardDialog .xjf-left,#forwardDialog .xjf-right{width:100%;box-sizing:border-box}#forwardDialog .xjf-list{max-height:22vh}}

/* PC2 native download button */
.xj-pc2-download{display:flex;flex-direction:column;gap:6px;min-width:0;max-width:100%;overflow-wrap:anywhere}.xj-pc2-download button{max-width:100%;white-space:normal;align-self:flex-start}

/* 11-12 左上角品牌区：「内部系统」与「小聚」同一行；副标题留出右侧收起按钮(#sidebarEdge, left:219px)的位置，过长时省略 */
body .v2 .r59-brand-header{padding:20px 30px 12px 16px}
body .v2 .r59-brand-row{display:flex;align-items:center;gap:10px;min-width:0}
body .v2 .r59-brand-row>div:last-child{min-width:0;flex:1}
body .v2 .r59-brand-name{display:flex;align-items:center;gap:6px;white-space:nowrap;line-height:1.2}
body .v2 .r59-brand-name .r59-internal{display:inline-block;margin:0;padding:1px 5px;font-size:10px;line-height:14px;font-weight:500;letter-spacing:.04em}
body .v2 .r59-brand-sub{margin-top:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* 11-12 发送前显示客服姓名：输入框上方的提示 */
.xj-name-hint{margin-left:auto;font-size:12px;color:var(--muted,#7b8496);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:60%}
.xj-name-hint b{color:var(--ink,#1f2937);font-weight:600}

/* 11-12 左侧栏收起后：「展开」按钮不贴屏幕边、不压住「会话」标题，会话列表左边留出空隙（只限电脑宽度）。 */
@media (min-width:761px){
 body.r59-sidebar-collapsed #sidebarEdge{left:12px!important}
 body.r59-sidebar-collapsed .v2 .list{padding-left:12px}
 body.r59-sidebar-collapsed .v2 .list .r59-list-title{padding-left:44px}
}
/* 11-12 视频号卡片（企微样式） */
.xj-finder{display:block;width:280px;max-width:100%;background:#fff;border:1px solid #e6e8eb;border-radius:8px;padding:10px 12px 0;color:#1f2329;text-decoration:none;white-space:normal}
a.xj-finder:hover{border-color:#c9cdd4}
.xj-finder-head{display:flex;align-items:center;gap:6px;font-size:12px;color:#646a73;margin-bottom:6px}
.xj-finder-icon{width:16px;height:16px;flex:none;color:#fa9d3b}
.xj-finder-title{font-size:14px;font-weight:600;line-height:1.45;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.xj-finder-desc{font-size:12.5px;color:#646a73;line-height:1.5;margin-top:4px;white-space:pre-line;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.xj-finder-foot{border-top:1px solid #f0f1f2;margin-top:10px;padding:7px 0 8px;font-size:11.5px;color:#8f959e}
body #messages .bubble:has(>.xj-finder),body .v2 #messages .message .bubble:has(>.xj-finder),body .v2 #messages .message.out .bubble:has(>.xj-finder){padding:0!important;background:transparent!important;border:0!important;box-shadow:none!important;color:inherit!important}

/* 11-13: words of a WeCom mixed (text + picture/sticker) message, shown above its media */
.media-caption{margin:0 0 6px}
/* 11-13: the @我 pill sits inline at the start of the preview line */
body .v2 #conversations .conversation .preview .xj-imention-pill{display:inline-block;margin:0 4px 0 0;padding:0 5px;line-height:16px;font-size:11px;vertical-align:1px}
/* 11-13: extreme-ratio images (long screenshots, banners) show a cropped WeChat-like box; tap opens the full image */
body .v2 #messages .message .media img.chat-image.r66-cropped{object-fit:cover!important}
body .v2 #messages .message .media img.chat-image.r66-cropped.r66-tall{object-position:top center!important}

/* 11-13 Claude: chat videos keep a fixed box (set inline from videoBox) so loading never shifts the chat */
#messages video.chat-video{display:block;max-width:100%;object-fit:contain;background:#0b0f17;border-radius:6px}

/* Group notice uses the existing profile field/control tokens. */
#groupNoticeBox{min-width:0;max-width:100%;overflow-wrap:anywhere}
#groupNoticeBox textarea{box-sizing:border-box;width:100%;max-width:100%;min-width:0;resize:vertical}
#groupNoticeBox pre{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;max-width:100%;max-height:160px;overflow-y:auto}
/* 11-14 group name/notice status popup: centred, prominent, auto-hides */
#groupStatusPop{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);z-index:200;box-sizing:border-box;width:max-content;min-width:min(260px,calc(100vw - 32px));max-width:min(420px,calc(100vw - 32px));padding:22px 24px 20px;border-radius:var(--r-lg);background:var(--surface);border:1px solid var(--border);box-shadow:0 18px 48px rgba(20,24,33,.22),0 3px 10px rgba(20,24,33,.08);text-align:center;color:var(--text);cursor:pointer;animation:gspIn .16s ease-out}
#groupStatusPop[hidden]{display:none}
#groupStatusPop .gsp-icon{display:flex;align-items:center;justify-content:center;width:44px;height:44px;margin:0 auto 12px;border-radius:50%;font-size:22px;font-weight:700;line-height:1;background:var(--accent-weak);color:var(--accent)}
#groupStatusPop[data-state=verified] .gsp-icon{background:var(--success-weak);color:var(--success)}
#groupStatusPop[data-state=unknown] .gsp-icon{background:var(--warning-weak);color:var(--warning)}
#groupStatusPop[data-state=failed] .gsp-icon{background:var(--danger-weak);color:var(--danger)}
#groupStatusPop[data-state=pending]{cursor:default}
#groupStatusPop[data-state=pending] .gsp-icon{box-sizing:border-box;border:3px solid var(--accent-border);border-top-color:var(--accent);background:transparent;animation:gspSpin .8s linear infinite}
#groupStatusPop .gsp-title{display:block;font-size:12px;font-weight:500;color:#7a808c;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#groupStatusPop .gsp-text{margin:6px 0 0;font-size:16px;font-weight:600;line-height:1.5;overflow-wrap:anywhere}
@keyframes gspIn{from{opacity:0;transform:translate(-50%,-46%)}to{opacity:1;transform:translate(-50%,-50%)}}
@keyframes gspSpin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){#groupStatusPop,#groupStatusPop[data-state=pending] .gsp-icon{animation:none}}
/* 11-14 右侧栏简化：群管理卡片（只读行 + 点「修改」展开编辑）、提示收敛、技术信息在底部 */
body .v2 #contactPanel>.identity{order:0;position:relative}
body .v2 #contactPanel>#xjLinksBox{order:1}
body .v2 #contactPanel>.contact-tag-row{order:2}
body .v2 #contactPanel>#groupAdminCard{order:3}
body .v2 #contactPanel>.field{order:4}
body .v2 #contactPanel>#extraProfileFields{order:5}
body .v2 #contactPanel>#profileHint{order:6}
body .v2 #contactPanel>.section:has(#contactRoute){order:9}
body .v2 #contactPanel .identity #profileReload{margin-left:auto;align-self:center;width:28px;height:28px;padding:0;border-radius:8px;border:1px solid var(--line,#dce1e8);background:#fff;color:#5b6475;font-size:15px;line-height:26px}
body .v2 #contactPanel .identity #profileReload:hover{color:var(--accent,#2167b4);border-color:#b9cbe4}
body .v2 #contactPanel #extraProfileFields textarea{height:64px;min-height:64px;resize:vertical}
#groupAdminCard>section{padding:10px 12px;border-top:1px solid var(--line,#e7e9ee)}
#groupAdminCard>h3+section{border-top:0}
#groupAdminCard .ga-view{display:flex;align-items:flex-start;gap:10px;min-width:0}
#groupAdminCard .ga-label{flex:0 0 42px;font-size:12px;color:#7a869c;line-height:20px}
#groupAdminCard .ga-value{flex:1;min-width:0;margin:0;font:inherit;font-size:13px;line-height:20px;color:var(--text,#1b1e25);white-space:pre-wrap;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden;max-height:none}
#groupAdminCard .ga-value[data-empty="1"]::before{content:"暂无记录";color:#a1a8b5}
#groupAdminCard .ga-edit{flex:none;border:0;background:none;padding:0;color:var(--accent,#2167b4);font-size:12px;line-height:20px;cursor:pointer}
#groupAdminCard .ga-edit:hover{text-decoration:underline}
#groupAdminCard .ga-note{flex:none;font-size:12px;line-height:20px;color:#a1a8b5;white-space:nowrap}
#groupAdminCard section:not(.editing)>.field,#groupAdminCard section:not(.editing)>.ga-actions,#groupAdminCard section:not(.editing)>.muted,#groupAdminCard section:not(.editing)>#groupNoticeAtAllRow,#groupAdminCard section:not(.editing)>p{display:none!important}
#groupAdminCard section.editing>.ga-view{display:none}
#groupAdminCard section.editing>.field{margin:0!important}
#groupAdminCard section.editing #groupNoticeBody{display:none}
#groupAdminCard #groupNoticeName{min-height:96px}
#groupAdminCard .ga-actions{display:flex;gap:8px;margin-top:8px}
#groupAdminCard .ga-actions button{border-radius:8px;padding:6px 14px;font-size:12px}
#groupAdminCard #groupRenameSave,#groupAdminCard #groupNoticeSave{background:var(--accent,#2167b4);border:1px solid transparent;color:#fff}
#groupAdminCard #groupRenameSave:disabled,#groupAdminCard #groupNoticeSave:disabled{opacity:.45}
#groupAdminCard .ga-cancel{background:#fff;border:1px solid var(--line,#dce1e8);color:#5b6475}
#groupAdminCard #groupRenameHint:empty,#groupAdminCard #groupNoticeHint:empty{display:none!important}
#groupAdminCard .muted,#groupAdminCard #groupNoticeAtAllRow{font-size:12px;margin:6px 0 0!important}
body .v2 #contactPanel .section:has(#contactRoute)>details>summary{cursor:pointer}
body .v2 #contactPanel .section:has(#contactRoute) #stableContactIdentity{margin-top:8px;border:0;padding:0}
body .v2 #contactPanel .section:has(#contactRoute) #stableContactIdentity h3{background:none;padding:0;margin:0 0 4px;font-size:12px;color:#7a869c}
/* 11-14 群管理卡片：群公告行显示企微当前公告 + 刷新 + 最后修改时间 */
#groupAdminCard .ga-value-wrap{flex:1;min-width:0}
#groupAdminCard .ga-meta{margin:2px 0 0!important;font-size:11px!important;color:#a1a8b5;display:block!important}
#groupAdminCard .ga-meta:empty{display:none!important}
#groupAdminCard .ga-refresh{flex:none;border:0;background:none;padding:0;color:#7a869c;font-size:12px;line-height:20px;cursor:pointer}
#groupAdminCard .ga-refresh:disabled{opacity:.5;cursor:default}
#groupAdminCard section.editing .ga-meta{display:none!important}
/* 11-16 老板：手机上群公告被挤成细长一条。公告行改为上下排列：标题+刷新/修改一行，正文占满整行，最多6行可展开 */
#groupAdminCard #groupNoticeBox>.ga-view{flex-wrap:wrap;row-gap:4px}
#groupAdminCard #groupNoticeBox>.ga-view>.ga-label{flex:1 1 auto}
#groupAdminCard #groupNoticeBox>.ga-view>.ga-value-wrap{order:9;flex:1 1 100%;min-width:0}
#groupAdminCard #groupNoticeBox .ga-value{-webkit-line-clamp:6;max-height:120px;cursor:default}
#groupAdminCard #groupNoticeBox .ga-value.expanded{display:block;-webkit-line-clamp:unset;max-height:none;overflow:visible}
#groupAdminCard .ga-more{display:block;border:0;background:none;padding:2px 0 0;color:var(--accent,#2167b4);font-size:12px;line-height:18px;cursor:pointer}
#groupAdminCard .ga-more[hidden]{display:none}
#groupAdminCard #groupNoticeBox .ga-meta{margin-top:4px!important}
/* 11-15 老板：名片/位置/链接消息仿微信原生卡片（统一 xj-card 外观） */
.bubble>.xj-card,.bubble>.xj-link-card{display:block;box-sizing:border-box;width:250px;max-width:100%;margin:0;border-radius:8px;background:#fff;border:1px solid #e7e9ee;overflow:hidden;text-decoration:none;color:inherit}
.out .bubble>.xj-card,.out .bubble>.xj-link-card{background:#fbfdff}
a.xj-card{cursor:pointer}
.xj-card .xj-card-main,.xj-contact-top,.xj-link-body{padding:12px 14px}
.xj-card .xj-card-title{font-size:15px;font-weight:600;color:#1b1e25;line-height:1.35;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.xj-card .xj-card-sub{margin-top:4px;font-size:12px;color:#8a909c;line-height:1.5;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.xj-card .xj-card-foot{display:flex;align-items:center;gap:5px;padding:7px 14px;border-top:1px solid #f0f1f4;font-size:11px;color:#a1a8b5;background:#fafbfc;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.xj-card .xj-card-ico{font-size:12px;line-height:1;flex:0 0 auto}
.xj-contact-top{display:flex;align-items:center;gap:12px}
.xj-contact-avatar{flex:0 0 auto;width:46px;height:46px;border-radius:6px;object-fit:cover;background:#dbe7f4}
.xj-contact-fallback{display:flex;align-items:center;justify-content:center;color:#4275a2;font-size:20px;font-weight:600;text-transform:uppercase}
.xj-contact-info{min-width:0;flex:1 1 auto}
.xj-contact-card .xj-card-sub{-webkit-line-clamp:1}
.xj-text-card .xj-card-main{font-size:14px;line-height:1.55;color:#1b1e25;overflow-wrap:anywhere}
.xj-link-card:hover{border-color:#cdd2f2}

/* 11-17 real nickname in the contact card */
.profile-real-nickname{margin-top:2px;color:#7a869c;font-size:12px;line-height:18px;overflow-wrap:anywhere}

/* 11-17 联系人页（老板：字号和列表样式有问题）
   all widths: title-bar actions, dropdowns that are not clipped, readable sizes */
body #directoryDialog .modal-head{display:flex;align-items:center;gap:10px}
body #directoryDialog .dir-head-tools{display:flex;align-items:center;gap:8px;margin-left:auto}
body #directoryDialog .dir-head-tools+[data-close]{margin-left:4px}
body #directoryDialog .dir-head-tools button{height:32px;min-height:32px;padding:0 12px;font-size:13px;line-height:30px;white-space:nowrap}
body #directoryDialog #dirCount{white-space:nowrap}
body #directoryDialog .dir-toolbar select{height:32px;min-height:32px;padding:0 26px 0 10px;font-size:13px;line-height:30px;box-sizing:border-box}
body #directoryDialog .dir-toolbar #directorySearch{height:32px;font-size:14px;padding:0 10px;box-sizing:border-box}
body #directoryDialog .dir-date input{height:32px;font-size:13px;box-sizing:border-box}
/* desktop table: 14 px body, quiet 13 px header, compact action buttons (rows were ~57 px tall) */
@media(min-width:1024px){
 body #directoryDialog .dir-table{font-size:14px}
 body #directoryDialog .dir-table th{font-size:13px;font-weight:600;color:#5b6a80;padding:10px}
 body #directoryDialog .dir-table td{padding:9px 10px;vertical-align:middle;color:#1f2329;line-height:22px}
 body #directoryDialog .dir-table td.dir-name{font-size:14px;font-weight:600;color:#2167b4;max-width:220px}
 body #directoryDialog .dir-table td{max-width:200px}
 body #directoryDialog .dir-table td button.link{height:26px;min-height:26px;padding:0 10px;margin:0;font-size:13px;line-height:24px;border-radius:4px;white-space:nowrap}
 body #directoryDialog .dir-table .link-badge{margin-right:6px;font-size:13px}
}
/* phone / narrow: a compact list - the name on its own line, the other fields inline as 「标签 值」, empty ones hidden,
   the column-name chips (tap to sort) scroll sideways instead of being cut off */
@media(max-width:1023px){
 body #directoryDialog .dir-table{min-width:0!important;width:100%!important;max-width:100%!important}
 body #directoryDialog thead tr{flex-wrap:nowrap!important;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch}
 body #directoryDialog thead tr::-webkit-scrollbar{display:none}
 body #directoryDialog th{flex:0 0 auto;font-size:12px!important;white-space:nowrap!important}
 body #directoryDialog tbody tr{display:flex!important;flex-wrap:wrap;align-items:baseline;gap:6px 16px;padding:12px 0!important}
 body #directoryDialog td{display:inline-flex!important;align-items:baseline;gap:5px;max-width:100%!important;min-width:0;font-size:13px!important;line-height:20px;color:#4a5875;white-space:normal!important;overflow:visible!important;overflow-wrap:anywhere}
 body #directoryDialog td:before{display:inline!important;margin:0!important;font-size:12px!important;color:#8f959e;white-space:nowrap}
 body #directoryDialog td.dir-name{flex:0 0 100%;font-size:16px!important;font-weight:600;line-height:22px;color:#2167b4}
 body #directoryDialog td.dir-name:before{display:none!important}
 body #directoryDialog td[data-empty]{display:none!important}
 body #directoryDialog td button.link{height:24px;min-height:24px;padding:0 8px;font-size:12px;line-height:22px}
 body #directoryDialog .dir-head-tools{order:3;flex:1 0 100%;margin-left:0}
}
/* 11-20 (boss): 群名称 row's note (未能确认群主身份，点公告旁「刷新」重试) was nowrap and overflowed the card: it gets its own
   line under the value; 禁止互相添加为联系人 uses the card's 13px regular text like the other rows. */
#groupAdminCard #groupRenameBox>.ga-view{flex-wrap:wrap;row-gap:2px}
#groupAdminCard #groupRenameBox .ga-note{order:9;flex:1 1 100%;min-width:0;padding-left:52px;white-space:normal;overflow-wrap:anywhere}
#groupAdminCard #groupNoticeBox .ga-note{white-space:normal;min-width:0;flex:0 1 auto}
#groupAdminCard #groupForbidLabel{font-size:13px;font-weight:400;color:var(--text,#1b1e25)}
#groupAdminCard #groupForbidDescription,#groupAdminCard .group-forbid-status{font-size:12px}
/* 11-20 (boss): helper sentences in the right panel become a 「!」 icon with the text on hover/tap (info-tips.js) */
.xj-tip-src{display:none!important}
/* 11-20 (boss: 叹号太丑, 指针奇怪): same as the Dongli system's <Hint> - lucide CircleHelp, muted, brand on hover */
.xj-tip{display:inline-flex;align-items:center;justify-content:center;flex:none;width:16px;height:16px;min-width:16px;margin:0 0 0 4px;padding:0;border:0;border-radius:50%;background:none;color:rgba(122,134,156,.7);cursor:pointer;vertical-align:middle;box-shadow:none}
.xj-tip svg{width:14px;height:14px;display:block}
.xj-tip:hover,.xj-tip:focus-visible{color:#2167b4;background:none;outline:none}
.xj-tip[hidden],.xj-tip-label[hidden]{display:none}
.xj-tip-label{display:inline-flex;align-items:center;font-size:13px;color:#7a869c}
#groupAdminCard .ga-label:has(>.xj-tip:not([hidden])){flex-basis:auto;white-space:nowrap;display:inline-flex;align-items:center}
#xjTipBubble{position:fixed;z-index:10000;padding:8px 12px;border:1px solid #dce1e8;border-radius:6px;background:#fff;color:#4a5875;font-size:12px;line-height:1.65;box-shadow:0 10px 15px -3px rgba(21,35,63,.1),0 4px 6px -4px rgba(21,35,63,.1);white-space:normal;overflow-wrap:anywhere}
#xjTipBubble[hidden]{display:none}
#xjTipBubble{white-space:pre-line}
/* 11-20 (boss: 侧边栏描述框可以大一点) */
#contactPanel #profile_description{min-height:110px;max-height:240px;resize:vertical;line-height:1.6;overflow-y:auto}
/* 11-20 (boss: 渠道在线/离线要醒目) - channel-status.js */
#channelStatusBar{margin:6px 12px 8px;padding:8px 12px;border:1px solid #f5c2c0;border-radius:8px;background:#fdecec;color:#b42318;font-size:13px;line-height:1.55}
#channelStatusBar[hidden]{display:none}
#channelStatusBar .cs-row+.cs-row{margin-top:4px}
#channelStatusBar .cs-row{display:flex;align-items:flex-start;gap:8px}
#channelStatusBar .cs-face{flex:none;width:22px;height:22px;margin-top:0;border-radius:5px;overflow:hidden;background:#f6cfcc;color:#b42318;font-size:12px;font-weight:600;line-height:22px;text-align:center}
#channelStatusBar .cs-face img{display:block;width:100%;height:100%;object-fit:cover}
#channelStatusBar .cs-row[data-state=starting]{color:#b45309}
#channelStatusBar b{font-weight:700}
.ch-dot{display:inline-block;flex:none;width:8px;height:8px;margin-right:6px;border-radius:50%;background:#16a34a;vertical-align:middle}
.ch-dot[data-state=starting]{background:#f59e0b}.ch-dot[data-state=login]{background:#f97316}.ch-dot[data-state=offline]{background:#dc2626}
#channelOfflineNote{padding:8px 14px;border-top:1px solid #f5c2c0;background:#fdecec;color:#b42318;font-size:13px;line-height:1.5}
#channelOfflineNote[hidden]{display:none}
/* 11-21: the zero-message groups left out of the list (index.html renderList) are named at the end of the list */
#conversations[data-hidden-empty]::after{content:attr(data-hidden-empty);display:block;padding:14px 16px 22px;color:#98a2b3;font-size:12px;line-height:1.5;text-align:center}
/* 11-21 (boss): channel (WeCom account) head right of the 主客服 head / 未分配 tag: same 20px as the owner head, a rounded
   square so it does not read as a second person; the preview text keeps clear of the wider corner */
body .v2 #conversations .conversation .conv-channel-avatar{flex:none;display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;border-radius:5px;object-fit:cover;box-shadow:0 0 0 1px #d6dde5;background:#eef2f7;color:#4a5875;font-size:11px;line-height:1}
body .v2 #conversations .conversation:has(.conv-channel-avatar) .preview,body .v2 #conversations .conversation:has(.conv-channel-avatar) .conv-preview{padding-right:82px}
/* 11-21: 更多信息 IDs copy on tap (team-ui.js): a small 复制 / 已复制 label after each */
body .v2 #contactPanel #contactRoute,body .v2 #contactPanel #stableContactIdentity code{cursor:pointer;-webkit-user-select:none;user-select:none;border-radius:4px;-webkit-tap-highlight-color:transparent}
body .v2 #contactPanel #contactRoute:hover,body .v2 #contactPanel #stableContactIdentity code:hover{background:#eef4fb}
body .v2 #contactPanel #contactRoute::after,body .v2 #contactPanel #stableContactIdentity code::after{content:'复制';margin-left:6px;font-size:11px;color:#2167b4;font-family:var(--font,inherit);white-space:nowrap}
body .v2 #contactPanel #contactRoute.xj-copied::after,body .v2 #contactPanel #stableContactIdentity code.xj-copied::after{content:'已复制';color:#16a34a}
/* 11-21 (boss: 电脑版会话列表顶部信息太多，一屏会话少): computer width only (the phone keeps its own header; filters and
   channels live in its 更多 sheet). Before: title 72 + offline note 99 + search/filters 86 + channels 38 + 我的未读 28 = 344px
   above the first row. Now: title row 48 (with the counts), search + channel picker in one row, the four filters, and the
   offline note on one line (full sentence on hover). Grid placement only: no element moves, so mobile-app.js can still
   carry .filters/.chan into its sheet and back. */
#channelStatusBar .cs-short{display:none}
@media (min-width:761px){
 body .shell.v2 .list{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto auto auto minmax(0,1fr)}
 body .shell.v2 .list>.r59-list-title{grid-area:1/1/2/2;height:48px;padding-right:6px;min-width:0}
 body .shell.v2 .list>.r59-list-title #listCount{font-size:11px}
 body .shell.v2 .list>.list-summary{grid-area:1/2/2/3;height:48px;min-height:48px;align-items:center;padding:0 16px 0 0;border:0;white-space:nowrap}
 body .shell.v2 .list>.list-summary #unreadTotal:not(:empty)::before{content:'·';margin-right:6px;color:var(--muted,#9aa3b2)}
 body .shell.v2 .list>#channelStatusBar{grid-area:2/1/3/3}
 body .shell.v2 .list>.tools{display:contents}
 body .shell.v2 .list>.tools>#search{grid-area:3/1/4/2;height:34px;margin:0 6px 6px 16px;padding:0 10px;width:auto;border-radius:6px}
 body .shell.v2 .list>.tools>.filters{grid-area:4/1/5/3;margin:0 16px 8px}
 body .shell.v2 .list>.tools>.filters select{height:28px}
 body .shell.v2 .list>details.r61-channels{grid-area:3/2/4/3;align-self:start;margin:0 16px 6px 0;max-width:120px;background:transparent}
 body .shell.v2 .list>details.r61-channels>summary{position:relative;display:block;height:34px;line-height:32px;box-sizing:border-box;padding:0 24px 0 10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border:1px solid var(--line,#dce1e8);border-radius:6px;background:#fff;font-size:12px;color:var(--text-2,#4a5568);list-style:none}
 body .shell.v2 .list>details.r61-channels>summary::-webkit-details-marker{display:none}
 body .shell.v2 .list>details.r61-channels>summary::before{content:none}
 body .shell.v2 .list>details.r61-channels>summary::after{content:'';position:absolute;right:10px;top:12px;width:5px;height:5px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg);opacity:.6}
 body .shell.v2 .list>details.r61-channels[open]>summary{border-color:var(--accent,#2167b4);color:var(--accent,#2167b4)}
 body .shell.v2 .list>details.r61-channels>.accounts{inset:38px 0 auto auto!important;width:256px!important}
 body .shell.v2 .list>#conversations{grid-area:5/1/6/3;border-top:1px solid var(--line,#e5e9f0)}
 body.r59-sidebar-collapsed #sidebarEdge{top:10px}
 #channelStatusBar{margin:0 16px 6px;padding:4px 8px;font-size:12px;line-height:20px}
 #channelStatusBar .cs-row{align-items:center}
 #channelStatusBar .cs-row+.cs-row{margin-top:2px}
 #channelStatusBar .cs-face{width:18px;height:18px;line-height:18px;font-size:11px;border-radius:4px}
 #channelStatusBar .cs-row>span:last-child{display:flex;gap:6px;min-width:0;flex:1;white-space:nowrap}
 #channelStatusBar .cs-row b{min-width:0;overflow:hidden;text-overflow:ellipsis}
 #channelStatusBar .cs-text{display:none}
 #channelStatusBar .cs-short{display:inline;flex:none}
}
/* 11-23 企微模板卡片（审批、智能表格提醒…） */
.xj-wcard{width:300px;max-width:100%;background:#fff;border:1px solid #e6e8eb;border-radius:8px;padding:10px 12px;color:#1f2329;white-space:normal;text-align:left}
.xj-wcard-src{font-size:12px;color:#646a73;margin-bottom:6px}
.xj-wcard-title{font-size:14px;font-weight:600;line-height:1.45;margin-bottom:4px;word-break:break-word}
.xj-wcard-line{font-size:12.5px;color:#4e5969;line-height:1.55;white-space:pre-line;word-break:break-word}
.xj-wcard-btns{display:flex;flex-wrap:wrap;gap:8px;border-top:1px solid #f0f1f2;margin-top:10px;padding-top:8px}
.xj-wcard-btn{font-size:13px;color:#2b6de5;text-decoration:none}
.xj-wcard-btn:hover{text-decoration:underline}
.xj-wcard-note{font-size:11.5px;color:#8f959e;margin-top:4px}
.xj-wdrive-copy{background:none;border:0;padding:0;font:inherit;font-size:13px;color:#2b6de5;cursor:pointer}
.xj-wdrive-copy:hover{text-decoration:underline}
/* 11-27 (boss: 微盘文件卡片在手机上挤成竖条): the 「微盘文件」 card also carries .xj-file, the row layout of ordinary file rows
   (icon | name | size side by side), so its label, name, size and buttons were squeezed into narrow columns. As a card it
   stacks like the 「微盘」 link card: label, name, size, then the two actions on one line. */
.xj-wcard.xj-file{display:block;width:300px;max-width:100%;padding:10px 12px;cursor:default}
.xj-wcard.xj-file:hover{box-shadow:none}
.xj-wcard.xj-file>small{display:block;font-size:12px;line-height:16px;color:#8a919f!important;margin-top:2px}
.xj-wcard .xj-wcard-btns .xj-wcard-btn{background:none;border:0;padding:0;margin:0;font:inherit;font-size:13px;line-height:20px;color:#2b6de5;cursor:pointer;text-decoration:none;white-space:nowrap;min-height:0;height:auto;box-shadow:none}
.xj-wcard .xj-wcard-btns{gap:16px}
body #messages .bubble:has(>.xj-wcard),body .v2 #messages .message .bubble:has(>.xj-wcard),body .v2 #messages .message.out .bubble:has(>.xj-wcard){padding:0!important;background:transparent!important;border:0!important;box-shadow:none!important;color:inherit!important}
.xj-fill-room-name{margin-left:6px;padding:0 6px;border:0;background:transparent;color:#2b6de5;font-size:12px;cursor:pointer}
.xj-fill-room-name:hover{text-decoration:underline}

/* 11-23 常用文件：工具栏自动换行，手机底部抽屉；不产生横向滚动。 */
body .shell.v2 .composer .compose-mode{flex-wrap:wrap;height:auto;min-height:28px;overflow:visible}
body .shell.v2 #composerDriveFiles{position:static;display:inline-flex;align-items:center;justify-content:center;flex:none;max-width:100%;height:28px;padding:0 6px;margin:0;border:0;border-radius:6px;background:transparent;color:var(--ink-soft);font-size:11px;white-space:nowrap}
body .shell.v2 #composerDriveFiles:hover{background:var(--paper)}
body dialog#driveFilesDialog{box-sizing:border-box;width:440px;min-width:0;max-width:calc(100vw - 24px);max-height:70vh;padding:16px;border:1px solid var(--line,#e5e9f0);border-radius:12px;overflow-x:hidden;overflow-y:auto}
body #driveFilesDialog::backdrop{background:rgba(0,0,0,.24)}
#driveFilesDialog .modal-head{display:flex;gap:8px;align-items:center;justify-content:space-between}
#driveFilesDialog h2{font-size:18px;margin:0 0 12px}
#driveFilesDialog #driveFilesSearch{display:block;width:100%;min-width:0;margin:8px 0 12px}
#driveFilesDialog .drive-files-group{min-width:0;margin:12px 0}
#driveFilesDialog .drive-files-group h3{font-size:13px;color:var(--ink-soft);overflow-wrap:anywhere}
#driveFilesDialog .drive-file-item{display:block;width:100%;min-width:0;max-width:100%;padding:10px 12px;margin:6px 0;text-align:left;white-space:normal;overflow-wrap:anywhere}
#driveFilesDialog .drive-files-empty{overflow-wrap:anywhere}
@media(max-width:760px){
 body .shell.v2 #composerDriveFiles{font-size:10px;padding:0 4px}
 body dialog#driveFilesDialog{position:fixed;inset:auto 0 0;margin:0;width:100vw;max-width:100vw!important;max-height:75vh;max-height:75dvh;border-radius:16px 16px 0 0;padding:16px 16px calc(16px + env(safe-area-inset-bottom))}
}

/* 手机原工具栏被移动版隐藏：只露出相邻的素材库、常用文件，其余工具仍走原加号面板。 */
@media(max-width:760px){
 body .shell.v2 .composer:has(#composerDriveFiles){grid-template-areas:"files files files files" "staged staged staged staged" "quote quote quote quote" "sched sched sched sched" "voice input plus send" "retry retry retry retry" "status status status status" "tiles tiles tiles tiles"!important}
 body .shell.v2 .composer:has(#composerDriveFiles)>.compose-mode{grid-area:files;display:flex!important;flex-wrap:wrap;height:auto;gap:4px;padding:0 0 4px;margin:0;min-width:0}
 body .shell.v2 .composer:has(#composerDriveFiles)>.compose-mode>:not(#composerLibrary):not(#composerDriveFiles){display:none!important}
 body .shell.v2 .composer #composerLibrary,body .shell.v2 .composer #composerDriveFiles{display:inline-flex;margin:0;min-height:32px;height:32px;font-size:12px;padding:0 8px}
}

/* Visible-only attachment progress; desktop and mobile share this card. */
.xj-download-card{width:260px;max-width:100%;min-width:0;gap:10px;overflow-wrap:anywhere;cursor:default}
.xj-download-card .xj-file-text{min-width:0;flex:1 1 0}
body .shell.v2 #messages .bubble .xj-download-card .xj-download-label{font-size:12px!important;line-height:18px!important;color:#737d8c;overflow-wrap:anywhere}
.xj-ring-slot{display:flex;flex:0 0 44px;align-items:center;justify-content:center}
.xj-download-card .xj-download-ring{display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:44px;height:44px;min-width:44px;padding:0;border:0;border-radius:50%;background:transparent;color:#2684e8;cursor:pointer}
.xj-download-card .xj-download-ring:disabled{opacity:1;cursor:default}
.xj-download-ring:focus-visible{outline:2px solid #2684e8;outline-offset:3px}
.xj-download-ring svg{display:block;flex:none;overflow:visible}
.xj-download-ring circle,.xj-download-ring path{fill:none;stroke:currentColor;stroke-width:2.5;stroke-linecap:round}
.xj-download-ring .xj-ring-track{stroke:#dce5ee}
.xj-download-ring .xj-ring-fill{transform:rotate(-90deg);transform-origin:24px 24px}
.xj-download-ring text{fill:currentColor;font-size:11px;font-weight:600;font-family:Arial,sans-serif}
.xj-download-ring .xj-ring-alert{font-size:24px}
.xj-download-ring.is-failed{color:#d83a42}
.xj-download-ring.is-spinning .xj-ring-fill{animation:xj-download-spin 1s linear infinite}
@keyframes xj-download-spin{to{transform:rotate(270deg)}}
@media(max-width:480px){.xj-download-card{width:220px;max-width:100%}}
@media(prefers-reduced-motion:reduce){.xj-download-ring.is-spinning .xj-ring-fill{animation-duration:3s}}
/* 11-27 (boss: 再检查还有哪些消息类型显示有问题): placeholders for messages without the file / unsupported types,
   call line, contact / location / red-packet / 收集表 / 视频号名片 cards (team-ui.js 「11-27」 block) */
.xj-ph{display:inline-flex;align-items:center;gap:10px;max-width:100%;box-sizing:border-box;padding:8px 14px 8px 10px;background:#fff;border:1px solid #e3e7ee;border-radius:8px;color:#1f2329;text-align:left;vertical-align:top}
.xj-ph-icon{flex:none;width:30px;height:30px;border-radius:6px;background:#f2f4f7;color:#8a94a6;display:flex;align-items:center;justify-content:center}
.xj-ph-icon svg{width:18px;height:18px}
.xj-ph-text{display:flex;flex-direction:column;min-width:0}
.xj-ph .xj-ph-title{font-size:14px;line-height:20px;color:#1f2329!important}
.xj-ph .xj-ph-text small{font-size:12px;line-height:16px;color:#8a919f!important}   /* !important: .out .bubble small turns small text white */
body #messages .bubble:has(>.xj-ph),body .v2 #messages .message .bubble:has(>.xj-ph),body .v2 #messages .message.out .bubble:has(>.xj-ph),body #messages .bubble:has(>.xj-hb),body .v2 #messages .message .bubble:has(>.xj-hb),body .v2 #messages .message.out .bubble:has(>.xj-hb){padding:0!important;background:transparent!important;border:0!important;box-shadow:none!important;color:inherit!important}
.xj-call{display:inline-flex;align-items:center;gap:6px;vertical-align:top}
.xj-call svg{width:1.1em;height:1.1em;flex:none}
.xj-ccard,.xj-loc,.xj-form,.xj-chcard,.xj-doccard{width:260px}
.xj-ccard-main{display:flex;align-items:center;gap:10px}
.xj-ccard-av{flex:none;width:40px;height:40px;border-radius:6px;background:#e8f0fe;color:#2b6de5;font-size:17px;font-weight:600;display:flex;align-items:center;justify-content:center}
.xj-ccard-who{min-width:0}
.xj-ccard .xj-wcard-title{margin:0}
.xj-ccard-foot{border-top:1px solid #f0f1f2;margin-top:10px;padding-top:6px}
.xj-loc .xj-wcard-src,.xj-form .xj-wcard-src,.xj-doccard .xj-wcard-src{display:flex;align-items:center;gap:4px}
.xj-loc .xj-wcard-src svg,.xj-form .xj-wcard-src svg,.xj-doccard .xj-wcard-src svg{width:14px;height:14px;flex:none}
.xj-loc .xj-wcard-src svg{color:#e5533d}
.xj-hb{width:240px;max-width:100%;border-radius:8px;overflow:hidden;background:#fa9d3b;color:#fff;text-align:left}
.xj-hb-main{display:flex;align-items:center;gap:10px;padding:12px}
.xj-hb-icon{flex:none;width:32px;height:40px;border-radius:4px;background:#e4472f;position:relative}
.xj-hb-icon::after{content:'';position:absolute;left:50%;top:13px;width:12px;height:12px;margin-left:-6px;border-radius:50%;background:#f9d26c}
.xj-hb-text{min-width:0}
.xj-hb-title{font-size:15px;line-height:21px;word-break:break-word}
.xj-hb-from{font-size:12px;line-height:17px;opacity:.85;margin-top:2px}
.xj-hb-foot{background:#fff;color:#8a919f;font-size:12px;line-height:16px;padding:5px 12px;border:1px solid #f0e2d0;border-top:0;border-radius:0 0 8px 8px}
/* phones: file / forward / download cards were 220px wide and broke names like 「N1阶段20261125.zi|p」; the bubble has room for 260 */
@media (max-width:480px){.xj-file,.xj-fwd,.xj-download-card{width:260px}}
/* 11-27 消息里的网址（team-ui.js「消息里的网址可以点」）；发出的蓝色气泡里沿用白色下划线 */
#messages .bubble a.xj-link{color:#2167b4;text-decoration:none;word-break:break-all;overflow-wrap:anywhere}
#messages .bubble a.xj-link:hover{text-decoration:underline}
