
*{box-sizing:border-box} body{margin:0;font-family:Arial,"Microsoft YaHei",sans-serif;background:#f5f7fa;color:#1f2d3d}
a{text-decoration:none;color:inherit}.app{display:flex;min-height:100vh}.sidebar{width:190px;background:#071e33;color:#c9d6e2;position:fixed;left:0;top:0;bottom:0}
.brand{height:58px;display:flex;align-items:center;padding:0 18px;font-weight:700;font-size:18px;color:#fff;border-bottom:1px solid rgba(255,255,255,.06)}
.logo{width:28px;height:28px;border-radius:50%;background:#fff;color:#3a8ee6;display:flex;align-items:center;justify-content:center;font-size:11px;margin-right:10px}
.menu{padding:10px 0}.menu-item{padding:12px 20px;cursor:pointer;display:flex;gap:10px;align-items:center;font-size:14px}.menu-item:hover{background:#0d2c48}.menu-item.active{background:#1677d2;color:#fff}
.main{margin-left:190px;width:calc(100% - 190px)}.topbar{height:58px;background:#fff;border-bottom:1px solid #e7eaf0;display:flex;align-items:center;justify-content:space-between;padding:0 20px;position:sticky;top:0;z-index:10}
.content{padding:18px}.cards{display:grid;grid-template-columns:repeat(7,minmax(110px,1fr));gap:12px}.card{background:#fff;border-radius:7px;padding:16px;border-top:3px solid #409eff;box-shadow:0 1px 2px rgba(0,0,0,.04);text-align:center}.card strong{font-size:26px;color:#1677d2;display:block}.card span{font-size:12px;color:#8b95a5}
.panel{background:#fff;border-radius:7px;margin-top:14px;border:1px solid #edf0f4}.panel-title{padding:14px 16px;border-bottom:1px solid #edf0f4;font-weight:700}.panel-body{padding:16px}
.grid-2{display:grid;grid-template-columns:2fr 1fr;gap:14px}.linkbox{display:flex;align-items:center;gap:10px;padding:10px 0}.badge{display:inline-block;padding:3px 8px;border-radius:10px;font-size:12px}.online{background:#e8f8ed;color:#1db954}.offline{background:#fff0f0;color:#f56c6c}
table{width:100%;border-collapse:collapse}th,td{padding:11px 10px;border-bottom:1px solid #edf0f4;text-align:left;font-size:13px}th{background:#fafbfc;color:#596273}
.btn{border:0;background:#1677d2;color:#fff;padding:8px 14px;border-radius:4px;cursor:pointer}.btn.secondary{background:#fff;color:#4d5b6a;border:1px solid #d9dee6}.btn.green{background:#27ae60}.btn.red{background:#e74c3c}
.workspace{display:grid;grid-template-columns:330px 1fr;min-height:calc(100vh - 58px)}.session-list{background:#fff;border-right:1px solid #e8ebef}.agent-head{padding:14px;display:flex;align-items:center;gap:10px;border-bottom:1px solid #eee}.avatar{width:34px;height:34px;border-radius:50%;background:linear-gradient(135deg,#5b8def,#805ad5);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:bold}
.search{padding:10px 12px}.search input{width:100%;border:1px solid #ddd;border-radius:18px;padding:9px 14px;outline:none}.tabs{display:flex;border-bottom:1px solid #eee}.tab{flex:1;text-align:center;padding:10px;cursor:pointer}.tab.active{color:#1677d2;border-bottom:2px solid #1677d2}
.session{padding:12px;border-bottom:1px solid #eee;display:flex;gap:10px;cursor:pointer}.session:hover,.session.active{background:#f1f7ff}.session .meta{flex:1}.session .name{display:flex;justify-content:space-between;font-weight:600;font-size:14px}.session .preview{font-size:12px;color:#8b95a5;margin-top:5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chat-area{display:flex;flex-direction:column}.chat-title{height:56px;background:#fff;border-bottom:1px solid #eee;padding:12px 18px;display:flex;justify-content:space-between;align-items:center}.messages{flex:1;padding:22px;overflow:auto;background:#f8fafc;min-height:520px}.msg{display:flex;margin:12px 0;gap:8px}.msg.me{justify-content:flex-end}.bubble{max-width:55%;padding:10px 12px;border-radius:10px;background:#fff;border:1px solid #e7ebf0;box-shadow:0 1px 2px rgba(0,0,0,.03)}.msg.me .bubble{background:#dff1ff;border-color:#c8e8ff}.time{font-size:11px;color:#a0a8b3;margin-top:4px}
.composer{background:#fff;border-top:1px solid #eee;padding:12px}.toolbar{font-size:13px;color:#657080;margin-bottom:8px}.composer textarea{width:100%;height:90px;border:1px solid #ddd;border-radius:6px;padding:10px;resize:none}.composer-actions{display:flex;justify-content:space-between;margin-top:8px}
.form-row{display:grid;grid-template-columns:150px 1fr;align-items:center;gap:12px;margin:14px 0}.input,select,textarea{width:100%;padding:9px 10px;border:1px solid #d9dee6;border-radius:4px;background:#fff}.switch{width:42px;height:22px;background:#1677d2;border-radius:20px;position:relative}.switch:after{content:"";position:absolute;width:18px;height:18px;border-radius:50%;background:#fff;right:2px;top:2px}
.notice{font-size:12px;color:#f39c12}.quick-list .q{padding:12px;border:1px solid #edf0f4;border-radius:5px;margin:8px 0;background:#fff}
.small{font-size:12px;color:#8b95a5}
@media(max-width:1100px){.cards{grid-template-columns:repeat(3,1fr)}.grid-2{grid-template-columns:1fr}.sidebar{width:160px}.main{margin-left:160px;width:calc(100% - 160px)}}

.rich-editor{border:1px solid #d9dee6;border-radius:6px;background:#fff;overflow:hidden}
.rich-toolbar{display:flex;flex-wrap:wrap;gap:6px;padding:8px;border-bottom:1px solid #e7ebf0;background:#fafbfc}
.rich-toolbar button,.rich-toolbar select,.rich-toolbar input[type=color]{height:30px;border:1px solid #d9dee6;background:#fff;border-radius:4px;padding:0 8px}
.rich-area{min-height:180px;padding:12px;outline:none}.preview-card{margin-top:12px;border:1px dashed #ccd4de;border-radius:6px;padding:12px;background:#fbfcfe}
.asset-row{display:grid;grid-template-columns:120px 1fr auto;gap:8px;margin:8px 0;align-items:center}
.login-state{padding:6px 10px;border-radius:14px;font-size:12px;background:#e8f8ed;color:#1db954}

.auto-msg-card{border:1px solid #e5e9ef;border-radius:6px;margin-bottom:14px;background:#fff;overflow:hidden}
.auto-msg-head{height:44px;padding:0 12px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #edf0f4;background:#fcfcfd}
.msg-num{display:inline-flex;width:22px;height:22px;background:#1677d2;color:#fff;border-radius:6px;align-items:center;justify-content:center;font-size:12px;margin-right:6px}
.icon-btn{border:0;background:transparent;cursor:pointer;color:#9aa3ad;font-size:15px}
.auto-editor{min-height:150px;max-height:300px;overflow:auto}
.add-message-btn{width:100%;height:42px;border:1px dashed #cfd6df;background:#fff;border-radius:5px;color:#687483;cursor:pointer}
.add-message-btn:hover{border-color:#1677d2;color:#1677d2;background:#f7fbff}

.workspace-agent-head{justify-content:flex-start;gap:10px}
.agent-meta{flex:1}
.status-tools{display:flex;align-items:center;gap:8px}
.status-pill{border:0;border-radius:16px;padding:4px 14px;font-size:12px;color:#fff;cursor:pointer}
.online-pill{background:#4caf50}
.offline-pill{background:#a0a7b4}
.gear-btn{border:0;background:transparent;font-size:18px;cursor:pointer;color:#475569}
.drawer-mask{position:fixed;inset:0;background:rgba(0,0,0,.35);opacity:0;pointer-events:none;transition:.25s;z-index:30}
.drawer-mask.show{opacity:1;pointer-events:auto}
.agent-drawer{position:fixed;top:0;right:-360px;width:360px;max-width:90vw;height:100vh;background:#fff;box-shadow:-8px 0 24px rgba(0,0,0,.12);transition:.25s;z-index:31;display:flex;flex-direction:column}
.agent-drawer.open{right:0}
.drawer-head{height:56px;border-bottom:1px solid #edf0f4;display:flex;align-items:center;padding:0 18px;background:#fff}
.drawer-close{border:0;background:transparent;font-size:16px;cursor:pointer;margin-right:8px;color:#666}
.drawer-body{padding:12px 18px 24px;overflow:auto}
.drawer-section{padding:18px 0;border-bottom:1px solid #edf0f4}
.drawer-section:last-child{border-bottom:0}
.section-title{font-weight:700;margin-bottom:8px}
.tag-gold{display:inline-block;background:#fff3cd;color:#d48806;border-radius:10px;padding:1px 6px;font-size:11px;margin-left:6px}
.switch-row{display:flex;align-items:center;justify-content:space-between;margin-top:12px}
.tiny-switch{width:44px;height:24px;border:0;border-radius:20px;cursor:pointer;position:relative}
.tiny-switch:after{content:"";position:absolute;width:18px;height:18px;border-radius:50%;background:#fff;top:3px;transition:.2s}
.tiny-switch.on{background:#1677d2}.tiny-switch.on:after{left:23px}
.tiny-switch.off{background:#c7cdd6}.tiny-switch.off:after{left:3px}
.range-labels{display:flex;justify-content:space-between;font-size:12px;color:#7b8794}
.pill-tabs{display:flex;gap:6px;flex-wrap:wrap;margin-top:10px}
.pill{border:1px solid #d9dee6;background:#fff;border-radius:4px;padding:6px 10px;font-size:12px;cursor:pointer}
.pill.active{background:#1677d2;color:#fff;border-color:#1677d2}
.theme-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-top:14px}
.theme-item{text-align:center;padding:8px;border:1px solid transparent;border-radius:8px}
.theme-item.selected{border-color:#8bb8ff;background:#f5f9ff}
.theme-circle{width:36px;height:36px;border-radius:50%;border:0;cursor:pointer}
.theme-circle.blue{background:#3b82f6}
.theme-circle.green{background:#52c41a}
.theme-circle.orange{background:#fa8c16}
.theme-circle.cyan{background:#13c2c2}
.theme-circle.pink{background:#eb2f96}
.theme-circle.azure{background:#4096ff}

.record-modal-mask{position:fixed;inset:0;background:rgba(0,0,0,.35);opacity:0;pointer-events:none;transition:.25s;z-index:40}
.record-modal-mask.show{opacity:1;pointer-events:auto}
.record-modal{position:fixed;right:-520px;top:0;width:520px;max-width:96vw;height:100vh;background:#fff;z-index:41;box-shadow:-8px 0 24px rgba(0,0,0,.12);transition:.25s;display:flex;flex-direction:column}
.record-modal.show{right:0}
.record-modal-head{display:flex;align-items:center;justify-content:space-between;padding:16px 18px;border-bottom:1px solid #edf0f4}
.record-transcript{padding:16px;overflow:auto;background:#f7f9fc;flex:1}
.record-msg{display:flex;gap:8px;margin:12px 0}
.record-msg.agent{justify-content:flex-end}
.record-role{font-size:12px;color:#8b95a5;min-width:36px;padding-top:4px}
.record-bubble{max-width:74%;padding:10px 12px;border-radius:10px;background:#fff;border:1px solid #e7ebf0}
.record-msg.agent .record-bubble{background:#eaf4ff;border-color:#cfe4ff}

.menu-item{position:relative}
.menu-unread{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 6px;border-radius:10px;background:#f56c6c;color:#fff;font-size:11px;margin-left:auto}
.menu-unread.hidden{display:none}
.session{position:relative}
.session-unread{min-width:20px;height:20px;padding:0 6px;border-radius:10px;background:#f56c6c;color:#fff;font-size:11px;display:flex;align-items:center;justify-content:center;align-self:center}

.workspace-v7{grid-template-columns:330px minmax(0,1fr) 330px;transition:.2s}
.workspace-v7.visitor-collapsed{grid-template-columns:330px minmax(0,1fr) 0}
.chat-title-v7{gap:12px}
.chat-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.chat-mode-select{width:auto;min-width:90px;padding:8px;border:1px solid #d9dee6;border-radius:4px;background:#fff}
.visitor-panel{background:#f7f8fa;border-left:1px solid #e7ebf0;height:calc(100vh - 58px);overflow:hidden;transition:.2s;min-width:0}
.visitor-panel.collapsed{width:0;opacity:0;border-left:0}
.visitor-panel-head{height:56px;background:#fff;border-bottom:1px solid #e7ebf0;display:flex;align-items:center;justify-content:space-between;padding:0 14px}
.visitor-panel-scroll{padding:12px;overflow:auto;height:calc(100% - 56px)}
.visitor-card{background:#fff;border-radius:10px;padding:12px 14px;margin-bottom:12px;border:1px solid #eef1f4}
.visitor-card-title{font-weight:700;border-left:3px solid #409eff;padding-left:8px;margin-bottom:10px}
.info-row{display:flex;justify-content:space-between;gap:12px;padding:9px 0;border-bottom:1px solid #f0f2f5;font-size:13px}
.info-row:last-child{border-bottom:0}
.info-row span:first-child{color:#8b95a5}
.info-row b,.info-row a{max-width:62%;text-align:right;word-break:break-all}
.stars{color:#f5b301;font-size:20px;letter-spacing:3px}
.mini-tag{display:inline-block;padding:2px 6px;border:1px solid #d9dee6;border-radius:4px;background:#fafafa;font-size:12px}
.blacklist-status{padding:10px;border-radius:6px;margin-top:12px;font-size:13px}
.blacklist-status.safe{background:#eef9f1;color:#2d8a46;border:1px solid #cfead6}
.blacklist-status.blocked{background:#fff0f0;color:#d64545;border:1px solid #f0caca}
@media(max-width:1350px){
  .workspace-v7{grid-template-columns:290px minmax(0,1fr) 300px}
}

.read-ok{color:#2f9e44;font-weight:600}
.read-wait{color:#f59f00;font-weight:600}

/* V11：后台聊天区域固定高度，输入框固定在底部，消息区独立滚动 */
.workspace-v7{
  height:calc(100vh - 58px);
  min-height:0;
  overflow:hidden;
}
.workspace-v7 .session-list{
  height:100%;
  min-height:0;
  overflow:hidden;
  display:flex;
  flex-direction:column;
}
.workspace-v7 .session-list #sessions{
  flex:1;
  min-height:0;
  overflow-y:auto;
}
.workspace-v7 .chat-area{
  height:100%;
  min-height:0;
  overflow:hidden;
  display:flex;
  flex-direction:column;
}
.workspace-v7 .chat-title{
  flex:0 0 auto;
}
.workspace-v7 .messages{
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto;
  overscroll-behavior:contain;
}
.workspace-v7 .composer{
  flex:0 0 auto;
  position:relative;
  bottom:auto;
  z-index:5;
}
.workspace-v7 .visitor-panel{
  height:100%;
}
.recall-btn{
  display:none;
  margin-top:6px;
  margin-left:auto;
  border:0;
  background:transparent;
  color:#8b95a5;
  font-size:12px;
  cursor:pointer;
  padding:0;
}
.msg.me:hover .recall-btn{display:block}
.recall-btn:hover{color:#e74c3c;text-decoration:underline}

#vpNickname{
  color:#1677d2;
  font-weight:700;
  cursor:pointer;
  padding:2px 6px;
  border-radius:4px;
}
#vpNickname:hover{
  background:#eef6ff;
  text-decoration:underline;
}

.hidden{display:none!important}
.coworker-area{flex:1;min-height:0;overflow-y:auto;background:#fff}
.coworker-agent{border-bottom:1px solid #edf0f4;background:#fff}
.coworker-agent.selected{background:#f8fbff}
.coworker-agent-head{display:flex;align-items:center;gap:10px;padding:12px;cursor:pointer}
.coworker-agent-head:hover{background:#f6f9fd}
.coworker-avatar{flex:0 0 36px}
.coworker-agent-main{flex:1;min-width:0}
.coworker-name-row{display:flex;align-items:center;gap:7px;margin-bottom:4px}
.agent-state{font-size:11px;padding:2px 7px;border-radius:10px}
.agent-state.is-online{background:#e8f8ed;color:#22a447}
.agent-state.is-offline{background:#f1f2f4;color:#8b95a5}
.coworker-load{display:flex;justify-content:space-between;font-size:11px;color:#7b8794;margin-top:6px}
.load-bar{height:4px;background:#eef1f5;border-radius:3px;margin-top:5px;overflow:hidden}
.load-bar i{display:block;height:100%;background:#409eff;border-radius:3px}
.coworker-arrow{font-size:18px;color:#9aa3ad}
.coworker-session-list{border-top:1px solid #edf0f4;background:#fbfcfe}
.coworker-session{padding:10px 14px 10px 58px;border-bottom:1px solid #edf0f4;cursor:pointer}
.coworker-session:hover,.coworker-session.active{background:#edf6ff}
.coworker-session-title{display:flex;justify-content:space-between;gap:10px}
.coworker-session .preview{margin-top:4px;font-size:12px;color:#8b95a5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.coworker-empty{padding:14px 16px 14px 58px;color:#9aa3ad;font-size:12px;border-top:1px solid #edf0f4}
.readonly-badge{display:inline-block;margin-left:6px;padding:2px 7px;border-radius:10px;background:#fff4e5;color:#d48806;font-size:11px}
.readonly-composer{opacity:.62}
.readonly-composer textarea{background:#f5f7fa}
.empty-chat-hint{height:100%;display:flex;align-items:center;justify-content:center;color:#a0a8b3;font-size:14px}

/* V15 左侧导航层级：首页、在线客服为一级；其他均为在线客服子菜单 */
.top-menu{
  font-weight:600;
}
.online-parent{
  display:flex;
  align-items:center;
  gap:8px;
}
.online-parent > span:first-child{
  flex:1;
}
.submenu-arrow{
  margin-left:4px;
  font-size:13px;
  color:#9fb1c2;
}
.submenu{
  max-height:0;
  overflow:hidden;
  transition:max-height .22s ease;
  background:rgba(0,0,0,.08);
}
.submenu.open{
  max-height:520px;
}
.submenu-item{
  padding-left:34px!important;
  font-size:14px;
  position:relative;
}
.submenu-item:before{
  content:"";
  position:absolute;
  left:20px;
  top:50%;
  width:4px;
  height:4px;
  border-radius:50%;
  background:#6d8aa4;
  transform:translateY(-50%);
}
.submenu-item.active{
  background:#1677d2!important;
  color:#fff;
}
.submenu-item.active:before{
  background:#fff;
}

.save-tip{margin-left:10px;color:#2f9e44}.config-table{width:100%;border-collapse:collapse}.config-table th,.config-table td{border:1px solid #edf0f4;padding:10px;text-align:center}
.quick-edit-row{display:flex;justify-content:space-between;gap:12px;padding:14px;border:1px solid #edf0f4;border-radius:6px;margin-bottom:10px}.quick-actions{display:flex;gap:8px}
.simple-modal{position:fixed;left:50%;top:50%;transform:translate(-50%,-48%);width:520px;max-width:92vw;background:#fff;z-index:45;border-radius:10px;box-shadow:0 18px 50px rgba(0,0,0,.2);opacity:0;pointer-events:none}.simple-modal.show{opacity:1;pointer-events:auto;transform:translate(-50%,-50%)}.simple-modal-head{display:flex;justify-content:space-between;padding:14px;border-bottom:1px solid #eee}.simple-modal-body{padding:16px}.leave-detail-body{padding:16px}.leave-question,.reply-history{padding:12px;border:1px solid #e5e9ef;border-radius:8px;background:#f8fafc}.leave-message-box{margin-top:6px;white-space:pre-wrap}

/* V17 客服人员端导航修复 */
.menu{padding-top:8px}
.top-menu{font-weight:600}
.online-parent{display:flex;align-items:center;gap:8px}
.online-label{flex:1}
.submenu{max-height:0;overflow:hidden;background:rgba(0,0,0,.08);transition:max-height .2s ease}
.submenu.open{max-height:560px}
.submenu-item{padding-left:28px!important}
.submenu-item.active{background:#1677d2!important;color:#fff}

.top-user-wrap{position:relative}
.top-user-btn{border:0;background:transparent;display:flex;align-items:center;gap:7px;cursor:pointer;padding:6px 8px;border-radius:6px}
.top-user-btn:hover{background:#f5f7fa}
.top-user-avatar{width:28px;height:28px;border-radius:50%;background:linear-gradient(135deg,#4f8df7,#7b61ff);color:#fff;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:700}
.top-user-name{font-weight:600}
.top-user-menu{position:absolute;right:0;top:42px;width:145px;background:#fff;border:1px solid #e7ebf0;border-radius:6px;box-shadow:0 10px 30px rgba(0,0,0,.12);padding:6px;display:none;z-index:60}
.top-user-menu.show{display:block}
.top-user-menu button{width:100%;border:0;background:#fff;text-align:left;padding:9px 10px;border-radius:4px;cursor:pointer;color:#344054}
.top-user-menu button:hover{background:#f5f7fa}
body[data-theme="green"] .menu-item.active,body[data-theme="green"] .btn{background:#22a447}
body[data-theme="orange"] .menu-item.active,body[data-theme="orange"] .btn{background:#fa8c16}
body[data-theme="cyan"] .menu-item.active,body[data-theme="cyan"] .btn{background:#13c2c2}
body[data-theme="pink"] .menu-item.active,body[data-theme="pink"] .btn{background:#eb2f96}

/* V19 repair */
.config-table{width:100%;border-collapse:collapse}.config-table th,.config-table td{border:1px solid #edf0f4;padding:10px;text-align:center}.save-tip{margin-left:10px;color:#2f9e44}.leave-detail-body{padding:16px}.leave-question,.reply-history{padding:12px;border:1px solid #e5e9ef;border-radius:8px;background:#f8fafc}.leave-message-box{margin-top:6px;white-space:pre-wrap}

/* V21 留言回复状态 */
.leave-summary{display:flex;gap:10px;margin:8px 0 12px}
.leave-summary-chip{display:inline-flex;align-items:center;padding:5px 10px;border-radius:14px;font-size:12px;font-weight:600}
.leave-summary-chip.pending{background:#fff1f0;color:#cf1322;border:1px solid #ffa39e}
.leave-summary-chip.replied{background:#f6ffed;color:#389e0d;border:1px solid #b7eb8f}
.leave-status{display:inline-flex;align-items:center;justify-content:center;min-width:72px;padding:4px 9px;border-radius:12px;font-size:12px;font-weight:600;white-space:nowrap}
.leave-status.pending{background:#fff1f0;color:#cf1322;border:1px solid #ffa39e}
.leave-status.replied{background:#f6ffed;color:#389e0d;border:1px solid #b7eb8f}
.leave-row-pending{background:#fffafa}
.leave-action{color:#1677d2;font-weight:600;text-decoration:none}
.leave-action:hover{text-decoration:underline}
.pending-hint{padding:12px;border-radius:8px;background:#fff7e6;border:1px solid #ffd591;color:#ad6800}
.reply-history-title{color:#389e0d;font-weight:700;margin-bottom:8px}
.leave-table th,.leave-table td{vertical-align:middle}

.quick-edit-row{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;padding:14px;border:1px solid #e7ebf0;border-radius:8px;margin-bottom:10px;background:#fff}
.quick-main{flex:1;min-width:0}
.quick-actions{display:flex;gap:8px;flex-wrap:wrap}
.empty{padding:32px;text-align:center;color:#98a2b3}

/* V24 会话记录详情改版 */
.record-detail-modal{
  position:fixed;left:50%;top:50%;transform:translate(-50%,-48%);
  width:min(1080px,92vw);height:min(720px,86vh);background:#fff;z-index:80;
  border-radius:10px;box-shadow:0 20px 60px rgba(0,0,0,.28);
  opacity:0;pointer-events:none;overflow:hidden;display:flex;flex-direction:column;
  transition:.15s ease
}
.record-detail-modal.show{opacity:1;pointer-events:auto;transform:translate(-50%,-50%)}
.record-detail-modal.fullscreen{width:96vw;height:92vh}
.record-detail-head{height:52px;display:flex;align-items:center;justify-content:space-between;padding:0 16px;border-bottom:1px solid #edf0f4}
.record-detail-title{font-size:16px;font-weight:700}
.record-detail-tools{display:flex;gap:8px}
.record-tool-btn{width:32px;height:32px;border:0;background:transparent;border-radius:6px;cursor:pointer;font-size:16px}
.record-tool-btn:hover{background:#f3f5f7}
.record-summary-grid{display:grid;grid-template-columns:110px 1fr 110px 1fr 110px 1fr;border-left:1px solid #e8ebef;margin:12px 12px 0}
.sum-label,.sum-value{padding:10px 12px;border-right:1px solid #e8ebef;border-top:1px solid #e8ebef;font-size:13px}
.sum-label{background:#fafafa;color:#667085}.sum-value{background:#fff;color:#344054}
.rd-tag{display:inline-flex;padding:2px 8px;border-radius:4px;border:1px solid #ddd;font-size:12px}
.rd-tag.gray{background:#f5f5f5;color:#666}.rd-tag.orange{background:#fff7e6;color:#d46b08;border-color:#ffd591}
.record-detail-body{flex:1;min-height:0;display:grid;grid-template-columns:minmax(0,1fr) 285px;gap:12px;padding:12px}
.record-message-panel,.record-visitor-panel{border:1px solid #e8ebef;border-radius:8px;min-height:0;background:#fff;overflow:hidden}
.record-message-panel{display:flex;flex-direction:column}
.record-section-head{height:44px;padding:0 14px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #edf0f4;font-weight:700}
.record-count{font-weight:400;color:#98a2b3;font-size:12px}
.record-message-list{flex:1;overflow-y:auto;padding:14px;background:#f6f7f9}
.history-msg{display:flex;gap:9px;margin-bottom:14px;align-items:flex-start}
.history-msg.visitor{flex-direction:row-reverse}
.history-avatar{width:32px;height:32px;border-radius:50%;background:#6c5ce7;color:#fff;display:flex;align-items:center;justify-content:center;flex:0 0 auto;font-size:12px}
.history-msg.agent .history-avatar{background:#98a2b3}
.history-content{max-width:78%}
.history-meta{font-size:12px;color:#667085;margin-bottom:5px}
.history-msg.visitor .history-meta{text-align:right}
.history-meta span{color:#98a2b3;margin-left:6px}
.history-bubble{background:#fff;border:1px solid #e7ebf0;padding:10px 12px;border-radius:9px;line-height:1.65;word-break:break-word}
.history-msg.agent .history-bubble{background:#dce7ff}
.record-visitor-panel{display:flex;flex-direction:column}
.visitor-info-scroll{overflow-y:auto;padding:10px;background:#f7f8fa}
.visitor-info-card{background:#fff;border:1px solid #e8ebef;border-radius:9px;padding:12px;margin-bottom:10px}
.visitor-card-title{font-weight:700;border-left:3px solid #1677ff;padding-left:8px;margin-bottom:8px}
.visitor-info-row{display:flex;justify-content:space-between;gap:14px;padding:8px 0;border-bottom:1px solid #f0f1f3;font-size:12px}
.visitor-info-row:last-child{border-bottom:0}
.visitor-info-row span{color:#98a2b3}
.visitor-info-row b{font-weight:600;color:#344054;text-align:right;word-break:break-all}
@media(max-width:900px){
  .record-detail-modal{width:96vw;height:92vh}
  .record-summary-grid{grid-template-columns:100px 1fr 100px 1fr}
  .record-detail-body{grid-template-columns:1fr}
  .record-visitor-panel{display:none}
}

/* V25 客服工作台快捷回复同步 */
.workspace-quick-toolbar{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.workspace-quick-list{display:inline-flex;align-items:center;gap:6px;flex-wrap:wrap}
.workspace-quick-chip{
  border:1px solid #d9e3f0;background:#fff;color:#1677d2;border-radius:5px;
  padding:3px 8px;font-size:12px;cursor:pointer;line-height:1.5
}
.workspace-quick-chip:hover{background:#eaf4ff;border-color:#91caff}


/* V31 工作台聊天头像昵称 */
.workspace-msg-avatar{flex:0 0 auto;width:34px;height:34px;border-radius:50%;overflow:hidden;display:flex;align-items:center;justify-content:center;background:#e9edf3;color:#667085;font-size:13px;font-weight:700;border:1px solid rgba(0,0,0,.05)}
.workspace-msg-avatar img{width:100%;height:100%;object-fit:cover;display:block}
.workspace-msg-body{display:flex;flex-direction:column;max-width:70%}
.msg.me .workspace-msg-body{align-items:flex-end}
.workspace-msg-name{font-size:12px;color:#98a2b3;line-height:1.2;margin:0 2px 4px}
.workspace-msg-body .bubble{max-width:100%}
.readonly-badge{display:inline-block;padding:2px 8px;border-radius:10px;background:#fff7e6;color:#d48806;border:1px solid #ffd591;font-size:12px;margin-left:8px}
@media(max-width:900px){.workspace-msg-body{max-width:82%}.workspace-msg-avatar{width:32px;height:32px}}
.cs-ads-editor{display:flex;flex-direction:column;gap:12px;margin:8px 0 12px}.cs-ad-edit{border:1px solid #e5eaf2;border-radius:10px;padding:12px;background:#fafcff}.cs-ad-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}.chatset-ad{display:flex!important;flex-direction:column;align-items:stretch;overflow-y:auto;overflow-x:hidden;padding:8px;box-sizing:border-box}.chatset-ad-card.cs-ad-vertical{position:relative;display:block;flex:0 0 auto;border:1px solid #e6e8ee;border-radius:10px;overflow:hidden;background:#fff;text-decoration:none}.chatset-ad-card.cs-ad-vertical img{width:100%;height:100%;object-fit:cover;display:block}.cs-ad-titlebar{position:absolute;left:0;right:0;top:0;z-index:2;padding:6px 8px;background:rgba(0,0,0,.56);color:#fff;font-size:12px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chatset-ad-ph{height:100%;display:flex;align-items:center;justify-content:center;color:#999;background:#f7f8fa}
.ad-column{display:flex!important;flex-direction:column;gap:8px;overflow-y:auto;overflow-x:hidden;padding:8px;box-sizing:border-box}.ad-card-v40{position:relative;display:block;flex:0 0 auto;border:1px solid #e6e8ee;border-radius:10px;overflow:hidden;background:#fff;text-decoration:none}.ad-card-v40 img{width:100%;height:100%;object-fit:cover;display:block}.ad-card-v40 .ad-title-v40{position:absolute;top:0;left:0;right:0;z-index:2;padding:6px 8px;background:rgba(0,0,0,.56);color:#fff;font-size:12px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ad-card-v40 .ad-empty-v40{height:100%;display:flex;align-items:center;justify-content:center;color:#999;background:#f7f8fa}.visitor-shell.mobile .ad-column{display:none!important}@media(max-width:760px){.ad-column{display:none!important}}
/* V41: 右侧活动广告按数量自适应平铺，排序由上到下 */
.chatset-ad{height:100%;min-height:0;overflow:hidden!important;display:flex!important;flex-direction:column;gap:8px;padding:8px;box-sizing:border-box}
.chatset-ad-card.cs-ad-vertical{flex:1 1 0!important;height:auto!important;min-height:0!important;position:relative;overflow:hidden}
.chatset-ad-card.cs-ad-vertical img{width:100%;height:100%;object-fit:cover;display:block}
.ad-column{height:100%;min-height:0;overflow:hidden!important;align-items:stretch!important;justify-content:stretch!important;display:flex!important;flex-direction:column;gap:8px;padding:8px!important;box-sizing:border-box}
.ad-card-v40{flex:1 1 0!important;height:auto!important;min-height:0!important;position:relative;overflow:hidden;border:1px solid #e6e8ee;border-radius:10px;background:#fff;text-decoration:none}
.ad-card-v40 img{width:100%;height:100%;object-fit:cover;display:block}
.ad-title-v40,.cs-ad-titlebar{min-height:26px;box-sizing:border-box}
.cs-ad-head .ai-link[disabled]{opacity:.35;pointer-events:none}

/* ===== V70 结束会话弹窗 ===== */
.v70-modal-mask{
  position:fixed;inset:0;z-index:99999;
  display:flex;align-items:center;justify-content:center;
  background:rgba(15,23,42,.46);backdrop-filter:blur(1px);
}
.v70-modal-mask.hidden{display:none!important}
.v70-modal{
  width:min(430px,calc(100vw - 36px));
  background:#fff;border-radius:12px;
  box-shadow:0 24px 70px rgba(15,23,42,.28);
  overflow:hidden;animation:v70pop .16s ease-out;
}
@keyframes v70pop{from{transform:scale(.97);opacity:.55}to{transform:scale(1);opacity:1}}
.v70-modal-head{
  display:flex;align-items:center;justify-content:space-between;
  padding:16px 18px;border-bottom:1px solid #edf0f4;
}
.v70-modal-title{font-size:16px;font-weight:700;color:#1f2937}
.v70-close{
  width:30px;height:30px;border:0;background:transparent;
  font-size:22px;line-height:28px;color:#98a2b3;cursor:pointer;border-radius:6px
}
.v70-close:hover{background:#f3f4f6;color:#475467}
.v70-modal-body{display:flex;gap:14px;padding:22px 20px}
.v70-warn-icon{
  flex:0 0 38px;width:38px;height:38px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  background:#fff1f0;color:#d92d20;font-weight:800;font-size:20px
}
.v70-modal-text{padding-top:1px}
.v70-main-text{font-size:15px;font-weight:600;color:#1f2937;margin-bottom:7px}
.v70-sub-text{font-size:13px;color:#667085;line-height:1.65}
.v70-modal-foot{
  display:flex;justify-content:flex-end;gap:10px;
  padding:14px 18px;border-top:1px solid #edf0f4;background:#fafbfc
}
.v70-btn{
  min-width:84px;height:36px;padding:0 16px;border-radius:7px;
  border:1px solid #d0d5dd;background:#fff;color:#344054;cursor:pointer;font-size:14px
}
.v70-btn.cancel:hover{background:#f8fafc}
.v70-btn.danger{
  border-color:#d92d20;background:#d92d20;color:#fff
}
.v70-btn.danger:hover{background:#b42318}
.v70-btn:disabled{opacity:.55;cursor:not-allowed}

/* ===== V71：非阻断式网络提示 ===== */
.v71-net-status{
  position:fixed;left:50%;top:76px;transform:translate(-50%,-8px);
  z-index:100000;opacity:0;pointer-events:none;
  padding:9px 14px;border-radius:8px;font-size:13px;
  box-shadow:0 8px 28px rgba(15,23,42,.16);
  transition:.18s ease;
}
.v71-net-status.show{opacity:1;transform:translate(-50%,0)}
.v71-net-status.warn{background:#fff7e6;color:#9a6700;border:1px solid #ffe0a3}
.v71-net-status.ok{background:#ecfdf3;color:#067647;border:1px solid #abefc6}
.v71-send-state{color:#98a2b3}
.v71-send-state.warn{color:#b54708}

/* ===== V73 转接 / 评价 ===== */
.v73-mask{position:fixed;inset:0;z-index:100001;background:rgba(15,23,42,.48);display:flex;align-items:center;justify-content:center}
.v73-mask.hidden{display:none!important}
.v73-modal{width:min(520px,calc(100vw - 36px));background:#fff;border-radius:12px;overflow:hidden;box-shadow:0 24px 70px rgba(15,23,42,.28)}
.v73-modal.small{width:min(420px,calc(100vw - 36px))}
.v73-head{display:flex;justify-content:space-between;align-items:center;padding:16px 18px;border-bottom:1px solid #edf0f4}
.v73-head button{border:0;background:transparent;font-size:22px;color:#98a2b3;cursor:pointer}
.v73-body{padding:18px}.v73-note{font-size:13px;color:#667085;line-height:1.65}
.v73-foot{display:flex;justify-content:flex-end;gap:10px;padding:13px 18px;background:#fafbfc;border-top:1px solid #edf0f4}
.v73-agent-list{margin-top:14px;max-height:330px;overflow:auto}
.v73-agent{display:flex;align-items:center;gap:12px;padding:11px;border:1px solid #e4e7ec;border-radius:9px;margin-bottom:8px;cursor:pointer}
.v73-agent:hover,.v73-agent.selected{border-color:#1677d2;background:#f5faff}
.v73-agent-avatar{width:38px;height:38px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:#eef4ff;color:#175cd3;font-weight:700}
.v73-agent-main{flex:1}.v73-agent-name{font-weight:700}.v73-agent-meta{font-size:12px;color:#667085;margin-top:3px}
.v73-online-dot{width:8px;height:8px;border-radius:50%;background:#12b76a}
.v73-empty{padding:24px;text-align:center;color:#98a2b3}
.v73-rating-icon{width:54px;height:54px;border-radius:50%;margin:0 auto 12px;background:#fff7e6;color:#f79009;display:flex;align-items:center;justify-content:center;font-size:28px}
.v73-system-msg{margin:10px auto;padding:7px 12px;border-radius:14px;background:#f2f4f7;color:#667085;font-size:12px;text-align:center;max-width:80%}
.v73-rating-card{margin:10px 0 14px;padding:14px;border:1px solid #e4e7ec;border-radius:10px;background:#fff}
.v73-rating-title{font-weight:700;margin-bottom:8px}.v73-stars{display:flex;gap:7px;margin:8px 0}
.v73-star{font-size:28px;cursor:pointer;color:#d0d5dd;user-select:none}.v73-star.active{color:#f79009}
.v73-rating-comment{width:100%;min-height:62px;border:1px solid #d0d5dd;border-radius:7px;padding:8px;resize:vertical}

/* ===== V74 访客端工具栏和媒体消息 ===== */
#visitorToolbar{display:flex;align-items:center;gap:10px;padding:8px 12px;border-top:1px solid #e5eaf0;background:#fff;min-height:42px;flex-wrap:wrap}
#visitorToolbar .tool{display:none;appearance:none;border:0;background:transparent;padding:2px 3px;margin:0;font-size:20px;line-height:1.2;cursor:pointer;border-radius:6px;transition:background .15s,transform .15s}
#visitorToolbar .tool.show{display:inline-flex;align-items:center;justify-content:center}
#visitorToolbar .tool:hover{background:#eef5ff;transform:translateY(-1px)}
#visitorToolbar .tool:focus-visible{outline:2px solid #1677d2;outline-offset:2px}
.v74-layer{position:fixed;inset:0;z-index:100050;background:rgba(16,24,40,.38);display:flex;align-items:center;justify-content:center;padding:16px}
.v74-layer.hidden{display:none!important}
.v74-panel{width:min(460px,100%);max-height:min(80vh,680px);display:flex;flex-direction:column;background:#fff;border-radius:12px;box-shadow:0 18px 60px rgba(0,0,0,.22);overflow:hidden}
.v74-panel-head{display:flex;align-items:center;justify-content:space-between;padding:13px 16px;border-bottom:1px solid #eaecf0;font-size:15px}
.v74-panel-head button{border:0;background:transparent;font-size:25px;color:#667085;cursor:pointer}
.v74-panel-body{padding:14px 16px;overflow:auto}
.v74-emoji-grid{display:grid;grid-template-columns:repeat(8,1fr);gap:5px}
.v74-emoji{border:0;background:#fff;border-radius:7px;font-size:25px;padding:7px 2px;cursor:pointer}
.v74-emoji:hover{background:#eef5ff}
.v74-toast{position:fixed;z-index:100100;left:50%;bottom:22px;transform:translate(-50%,12px);opacity:0;pointer-events:none;background:#101828;color:#fff;padding:10px 14px;border-radius:8px;font-size:13px;max-width:calc(100vw - 30px);transition:.2s}
.v74-toast.show{opacity:1;transform:translate(-50%,0)}
.v74-toast.error{background:#b42318}
.v74-attachment-image img{display:block;max-width:min(280px,100%);max-height:260px;border-radius:8px;object-fit:contain}
.v74-attachment-video video{display:block;width:min(340px,100%);max-height:260px;border-radius:8px;background:#111}
.v74-file-name{font-size:12px;color:#667085;margin-top:5px;word-break:break-all}
.v74-file-link{display:inline-flex;gap:10px;align-items:center;flex-wrap:wrap;padding:10px 12px;border:1px solid #d0d5dd;border-radius:8px;color:#175cd3;text-decoration:none;background:#fff;max-width:100%;word-break:break-all}
.v74-file-link span{font-size:12px;color:#667085}
.v74-history-item{padding:10px 0;border-bottom:1px solid #f0f2f5}
.v74-history-meta{display:flex;justify-content:space-between;color:#667085;font-size:12px;margin-bottom:6px}
.v74-history-content{font-size:13px;line-height:1.55;overflow-wrap:anywhere}
.v74-history-content img{max-width:180px;max-height:140px;object-fit:contain}
.v74-history-content video{max-width:220px;max-height:140px}
.v74-empty{padding:26px 10px;text-align:center;color:#98a2b3;font-size:13px}
.v74-faq-list{display:grid;gap:8px}
.v74-faq-item{width:100%;display:flex;justify-content:space-between;align-items:center;text-align:left;border:1px solid #e4e7ec;background:#fff;border-radius:8px;padding:12px;color:#101828;cursor:pointer}
.v74-faq-item:hover{border-color:#84caff;background:#f5faff}
.v74-form{display:grid;gap:12px}
.v74-form label{display:grid;gap:5px;font-size:13px;color:#344054}
.v74-form input,.v74-form textarea{width:100%;border:1px solid #d0d5dd;border-radius:7px;padding:9px 10px;font:inherit}
.v74-primary{border:0;border-radius:7px;background:#1677d2;color:#fff;padding:10px 14px;cursor:pointer}
.v74-primary:disabled{opacity:.6;cursor:wait}
.v74-leave-note{background:#f8fafc;border:1px solid #dbe3ee;border-radius:8px;padding:10px;line-height:1.6;white-space:normal}
@media(max-width:640px){
  .v74-layer{padding:10px}
  .v74-panel{max-height:86vh}
  .v74-emoji-grid{grid-template-columns:repeat(7,1fr)}
  #visitorToolbar{gap:8px;padding:7px 10px}
  #visitorToolbar .tool{font-size:19px}
}


/* ==========================================================
   V75 MODERN SAAS THEME — Agent workbench
   仅调整视觉与响应式排版，不更改业务逻辑/数据/API
   ========================================================== */
:root{
  --v75-ink:#182230;
  --v75-muted:#667085;
  --v75-line:#e5eaf2;
  --v75-bg:#f4f7fb;
  --v75-card:#ffffff;
  --v75-blue:#2563eb;
  --v75-blue-dark:#1d4ed8;
  --v75-cyan:#0ea5a4;
  --v75-radius:14px;
  --v75-shadow:0 8px 28px rgba(16,24,40,.055);
}
html{scroll-behavior:smooth}
body{background:var(--v75-bg);color:var(--v75-ink);font-family:Inter,"Segoe UI","Microsoft YaHei",Arial,sans-serif}
.sidebar{
  width:248px!important;
  background:linear-gradient(180deg,#101f38 0%,#132a49 56%,#10223c 100%)!important;
  box-shadow:8px 0 30px rgba(16,24,40,.08);
}
.brand{
  height:72px!important;padding:0 22px!important;
  font-size:17px!important;letter-spacing:.2px;
  border-bottom:1px solid rgba(255,255,255,.09)!important;
}
.logo{
  width:34px!important;height:34px!important;border-radius:11px!important;
  background:linear-gradient(135deg,#60a5fa,#22d3ee)!important;color:#fff!important;
  font-size:12px!important;font-weight:800;box-shadow:0 5px 14px rgba(34,211,238,.2)
}
.menu{padding:14px 12px!important}
.menu-item{
  margin:3px 0;padding:11px 14px!important;border-radius:9px;
  color:#c5d1e2!important;font-size:13px!important;transition:.18s ease;
}
.menu-item:hover{background:rgba(255,255,255,.075)!important;color:#fff!important}
.menu-item.active{background:linear-gradient(100deg,#2563eb,#3277e8)!important;color:#fff!important;box-shadow:0 6px 18px rgba(37,99,235,.25)}
.submenu{margin:3px 0 9px;padding:4px 0 4px 9px;border-left:1px solid rgba(255,255,255,.14);margin-left:22px}
.submenu .menu-item{padding:9px 11px!important;font-size:12px!important}
.menu-icon{width:19px;text-align:center;opacity:.9}
.main{margin-left:248px!important;width:calc(100% - 248px)!important;min-width:0}
.topbar{
  height:68px!important;padding:0 26px!important;background:rgba(255,255,255,.94)!important;
  border-bottom:1px solid var(--v75-line)!important;backdrop-filter:blur(14px);
  box-shadow:0 2px 12px rgba(16,24,40,.025);z-index:20
}
.topbar>div:first-child{font-size:14px;font-weight:650;color:#344054}
.content{padding:24px!important}
.cards{gap:14px!important}
.card{
  border:1px solid var(--v75-line)!important;border-radius:var(--v75-radius)!important;
  box-shadow:var(--v75-shadow)!important;border-top:0!important;text-align:left!important;
  padding:18px 20px!important;position:relative;overflow:hidden;
}
.card:before{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:linear-gradient(180deg,#3b82f6,#22c1c3)}
.card strong{font-size:27px!important;color:#1d4ed8!important;letter-spacing:-.6px}
.card span{display:block;margin-top:5px;color:#7b8798!important;font-weight:500}
.panel{
  border:1px solid var(--v75-line)!important;border-radius:var(--v75-radius)!important;
  box-shadow:var(--v75-shadow)!important;overflow:hidden;margin-top:16px!important
}
.panel-title{padding:16px 20px!important;font-size:14px;color:#26364b;background:#fff}
.panel-body{padding:20px!important}
.grid-2{gap:16px!important}
.btn{
  border-radius:8px!important;padding:9px 15px!important;font-weight:600;
  background:linear-gradient(135deg,#2563eb,#1d4ed8)!important;
  box-shadow:0 3px 9px rgba(37,99,235,.12);transition:.16s ease
}
.btn:hover{filter:brightness(1.04);transform:translateY(-1px)}
.btn.secondary{background:#fff!important;color:#344054!important;border:1px solid #d0d8e5!important;box-shadow:none}
.btn.green{background:linear-gradient(135deg,#16a34a,#059669)!important}
.btn.red{background:linear-gradient(135deg,#ef4444,#dc2626)!important}
input,select,textarea,.input{border-color:#d7deea!important;border-radius:8px!important;color:#1d2939}
input:focus,select:focus,textarea:focus{outline:none!important;border-color:#7aa7ff!important;box-shadow:0 0 0 3px rgba(37,99,235,.10)}
table th{background:#f7f9fc!important;color:#667085!important;font-weight:650}
table td,table th{padding:12px 13px!important;border-bottom-color:#edf0f5!important}
.tag,.badge{border-radius:20px!important;padding:4px 10px!important;font-weight:600}
.workspace-v7{
  grid-template-columns:300px minmax(0,1fr) 286px!important;
  height:calc(100vh - 68px)!important;background:#fff
}
.workspace-v7.visitor-collapsed{grid-template-columns:300px minmax(0,1fr) 0!important}
.session-list{background:#fbfcfe!important;border-right:1px solid #e7ecf3!important}
.agent-head{padding:16px!important;border-bottom:1px solid #e8edf4!important;background:#fff}
.workspace-agent-head .avatar{width:42px!important;height:42px!important;border:2px solid #e5edff}
.agent-meta b{font-size:14px;color:#243247}
.agent-meta .small{font-size:11px;color:#8995a7}
.status-pill{padding:6px 13px!important;font-weight:650}
.gear-btn{width:32px;height:32px;border-radius:8px!important;background:#f2f5fa!important}
.gear-btn:hover{background:#e8efff!important;color:#245edb!important}
.search{padding:13px 14px!important}
.search input{height:38px;border-radius:9px!important;background:#f7f9fc;border-color:#e4e9f1!important;padding-left:14px}
.tabs{padding:0 12px;border-bottom:1px solid #e9edf3!important;background:#fff}
.tab{font-size:12px;font-weight:650;color:#7a8798;padding:13px 8px!important}
.tab.active{color:#245edb!important;border-bottom:2px solid #2563eb!important}
.session{padding:13px 14px!important;border-bottom:1px solid #f0f2f6!important;transition:.15s}
.session:hover,.session.active{background:#eef4ff!important}
.session.active{box-shadow:inset 3px 0 #2563eb}
.session .name{color:#253449}
.session .preview{color:#8491a3!important;line-height:1.5}
.chat-area{background:#fff!important}
.chat-title{
  min-height:66px!important;height:auto!important;padding:12px 20px!important;
  border-bottom:1px solid #e8edf4!important;background:#fff!important
}
.chat-title b{font-size:15px;color:#1d2939}
.chat-title .small{color:#8995a7}
.chat-actions{gap:7px!important}
.chat-actions .btn{padding:8px 12px!important;font-size:12px}
.chat-mode-select{border-radius:8px!important}
.messages{background:#f7f9fc!important;padding:22px 24px!important}
.msg{margin:15px 0!important}
.bubble{border:1px solid #e7ecf3!important;border-radius:4px 14px 14px 14px!important;padding:12px 14px!important;box-shadow:0 3px 10px rgba(16,24,40,.035)!important;line-height:1.6}
.msg.me .bubble{border-radius:14px 4px 14px 14px!important;background:#eaf2ff!important;border-color:#d7e6ff!important}
.workspace-msg-name{font-size:12px!important;color:#667085!important;margin-bottom:5px}
.time{color:#98a2b3!important}
.composer{padding:14px 18px!important;border-top:1px solid #e8edf4!important;background:#fff!important}
.workspace-quick-toolbar{margin-bottom:9px!important}
.composer textarea{height:82px!important;min-height:70px;border-radius:10px!important;background:#fbfcfe;padding:12px 14px!important}
.composer-actions{align-items:center}
.composer-actions .small{color:#98a2b3}
.visitor-panel{background:#f8fafc!important;border-left:1px solid #e8edf4!important}
.visitor-panel-head{height:62px!important;padding:0 16px!important;background:#fff!important;border-bottom:1px solid #e8edf4!important}
.visitor-panel-head b{font-size:14px;color:#26364b}
.visitor-panel-scroll{padding:13px!important}
.visitor-card{border:1px solid #e7ecf3!important;border-radius:12px!important;padding:14px!important;box-shadow:0 2px 8px rgba(16,24,40,.025)}
.visitor-card-title{border-left:3px solid #3b82f6!important;color:#344054;padding-left:9px!important}
.info-row{font-size:12px!important}
.info-row span:first-child{color:#98a2b3!important}
.top-user-btn{border-radius:30px!important;padding:5px 10px!important}
.top-user-avatar{box-shadow:0 0 0 3px #eef4ff}
.record-modal,.simple-modal,.agent-modal,.ai-drawer,.leave-detail-modal{border-radius:16px!important;box-shadow:0 24px 70px rgba(16,24,40,.2)!important}
@media(max-width:1350px){
 .workspace-v7{grid-template-columns:270px minmax(0,1fr) 250px!important}
 .workspace-v7.visitor-collapsed{grid-template-columns:270px minmax(0,1fr) 0!important}
}
@media(max-width:1100px){
 .sidebar{width:210px!important}.main{margin-left:210px!important;width:calc(100% - 210px)!important}
 .content{padding:18px!important}.cards{grid-template-columns:repeat(3,minmax(0,1fr))!important}
 .workspace-v7{grid-template-columns:250px minmax(0,1fr) 0!important}
 .workspace-v7 .visitor-panel{display:none}
}
@media(max-width:760px){
 .sidebar{position:relative!important;width:100%!important;bottom:auto!important;min-height:auto}
 .brand{height:58px!important}
 .menu{display:flex;overflow-x:auto;padding:7px 9px!important;gap:4px}
 .menu-item{white-space:nowrap;margin:0!important}
 .submenu{display:none!important}
 .main{margin-left:0!important;width:100%!important}
 .topbar{height:58px!important;padding:0 14px!important}
 .content{padding:12px!important}
 .cards{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 .workspace-v7{height:auto!important;min-height:calc(100vh - 58px);display:flex!important;flex-direction:column;overflow:visible!important}
 .workspace-v7 .session-list{height:260px!important;min-height:260px!important}
 .workspace-v7 .chat-area{height:65vh!important;min-height:520px!important}
 .workspace-v7 .visitor-panel{display:none!important}
 .chat-actions{gap:5px!important}
 .chat-actions .btn{padding:7px 9px!important}
 .messages{padding:14px!important}
 .composer{padding:10px!important}
}


/* ===== V76 corrective layout pass: agent console ===== */
.sidebar{width:258px!important}
.main{margin-left:258px!important;width:calc(100% - 258px)!important}
.brand{height:76px!important}
.menu{padding:17px 13px!important}
.menu-item{min-height:42px!important}
.submenu{margin-left:22px!important}
.submenu .menu-item{min-height:36px!important}
.topbar{height:72px!important}
.content{max-width:1680px;margin:0 auto;padding:28px 30px!important}
.cards{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:16px!important}
.card{min-height:112px!important;display:flex;flex-direction:column;justify-content:center;padding:20px 22px 18px 24px!important}
.card strong{font-size:30px!important;line-height:1.15}
.grid-2{gap:18px!important}
.workspace-v7{grid-template-columns:320px minmax(0,1fr) 320px!important}
.workspace-v7.visitor-collapsed{grid-template-columns:320px minmax(0,1fr) 0!important}
.workspace-v7 .session-list{border-right:1px solid #e4eaf2!important}
.workspace-v7 .chat-area{min-width:0}
.workspace-v7 .visitor-panel{border-left:1px solid #e4eaf2!important}
@media(max-width:1350px){
 .workspace-v7{grid-template-columns:290px minmax(0,1fr) 290px!important}
 .workspace-v7.visitor-collapsed{grid-template-columns:290px minmax(0,1fr) 0!important}
}
@media(max-width:1100px){
 .cards{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 .workspace-v7{grid-template-columns:270px minmax(0,1fr) 0!important}
 .workspace-v7.visitor-collapsed{grid-template-columns:270px minmax(0,1fr) 0!important}
 .workspace-v7 .visitor-panel{display:none!important}
}
@media(max-width:760px){
 .sidebar{position:relative!important;width:100%!important;max-height:42vh!important;overflow-y:auto!important;bottom:auto!important}
 .brand{height:58px!important}
 .menu{display:block!important;overflow:visible!important;padding:8px 10px!important}
 .menu-item{white-space:normal!important;margin:2px 0!important}
 .submenu,.submenu.open{display:block!important;margin-left:14px!important}
 .main{margin-left:0!important;width:100%!important}
 .topbar{height:58px!important;padding:0 14px!important}
 .content{padding:12px!important}
 .cards{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important}
 .card{min-height:88px!important;padding:13px!important}
 .card strong{font-size:23px!important}
 .workspace-v7{display:flex!important;flex-direction:column;height:auto!important;min-height:0!important;overflow:visible!important}
 .workspace-v7 .session-list{height:240px!important;min-height:240px!important}
 .workspace-v7 .chat-area{height:65vh!important;min-height:500px!important}
 .workspace-v7 .visitor-panel{display:none!important}
}

@keyframes v76NoticeIn{from{opacity:0;transform:translateX(10px)}to{opacity:1;transform:translateX(0)}}

/* V76 稳定性修复：聊天消息行不因鼠标悬停产生位移或动画。 */
.workspace-v7 .messages .msg,
.workspace-v7 .messages .msg:hover,
.workspace-v7 .messages .bubble,
.workspace-v7 .messages .bubble:hover{
  transform:none!important;
  animation:none!important;
}
