/* 快聊 · 墨青值班台
   palette: ink #0C1017 / desk #121722 / slate #1A2030 / line rgba(148,176,210,.12)
            text #E8EEF6 / mute #8A93A6 / live #5EEAD4 / speak #3E63D3
   type: PingFang SC / Noto Sans SC
*/

:root {
  --kf-ink: #0c1017;
  --kf-desk: #121722;
  --kf-slate: #1a2030;
  --kf-lift: #222a3d;
  --kf-line: rgba(148, 176, 210, 0.12);
  --kf-text: #e8eef6;
  --kf-mute: #8a93a6;
  --kf-live: #5eead4;
  --kf-live-dim: rgba(94, 234, 212, 0.16);
  --kf-speak: #3e63d3;
  --kf-recv: #252c3c;
  --kf-danger: #f07178;
  --kf-ok: #7ee0b5;
  --kf-font: "PingFang SC", "Noto Sans SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

html, body, #root, .wk-root, .wk-main {
  font-family: var(--kf-font) !important;
}

body[theme-mode="dark"],
body[theme-mode="dark"] #root,
body[theme-mode="dark"] .wk-main {
  background: var(--kf-desk) !important;
  color: var(--kf-text) !important;
}

/* —— 左侧栏 —— */
.wk-main-sider,
body[theme-mode="dark"] .wk-main-sider,
.kefu-login-rail {
  width: 68px !important;
  background: var(--kf-ink) !important;
  border-right: 1px solid var(--kf-line) !important;
}
.wk-main-sider-content { padding-top: 8px; }
.wk-main-sider-avatar {
  width: 42px !important;
  height: 42px !important;
  margin: 12px 0 6px !important;
}
.wk-main-sider-avatar img {
  width: 42px !important;
  height: 42px !important;
  border-radius: 14px !important;
  box-shadow: 0 0 0 1px var(--kf-line) !important;
}
.wk-main-sider-item {
  width: 44px !important;
  height: 44px !important;
  margin-top: 8px !important;
  border-radius: 12px !important;
}
.wk-main-sider-item:hover {
  background: var(--kf-live-dim) !important;
}
.wk-main-sider-item.selected,
.wk-main-sider-item.wk-main-sider-item-selected {
  background: var(--kf-live-dim) !important;
}
.wk-main-sider-item img { opacity: 0.78 !important; }
.wk-main-sider-item.selected img { opacity: 1 !important; filter: none !important; }
.wk-icon-bar { background-color: #9aa6bb !important; }

.kefu-rail-item {
  width: 44px;
  min-height: 52px;
  margin-top: 8px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #b7c2d6;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 0;
  position: relative;
  z-index: 2;
}
.kefu-rail-item:hover { background: var(--kf-live-dim); color: var(--kf-text); }
.kefu-rail-item.is-on {
  background: var(--kf-live-dim);
  color: var(--kf-live);
}
.kefu-rail-item svg { width: 18px; height: 18px; fill: currentColor; }
.kefu-rail-item span {
  font-size: 10px;
  letter-spacing: 0.02em;
  line-height: 1;
  white-space: nowrap;
}

.wk-chat-search { gap: 8px; overflow: visible; }
.wk-chat-title { width: auto !important; flex: 1; min-width: 0; }
.wk-chat-search.is-searching .wk-chat-title { display: none; }
.kefu-conv-search {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.kefu-conv-search input {
  flex: 1;
  min-width: 0;
  height: 32px;
  border: 1px solid #e5e6eb;
  border-radius: 4px;
  padding: 0 10px;
  font-size: 13px;
  outline: none;
  background: #f7f8fa;
  color: #1d2129;
}
.kefu-conv-search input:focus { border-color: #2d8cf0; background: #fff; }
.kefu-conv-search-clear {
  border: 0;
  background: transparent;
  color: #2d8cf0;
  cursor: pointer;
  font-size: 13px;
  padding: 0;
  flex-shrink: 0;
}
body[theme-mode="dark"] .kefu-conv-search input {
  background: var(--kf-desk);
  border-color: var(--kf-line);
  color: var(--kf-text);
}

.kefu-gfold { border-bottom: 1px solid #f0f0f0; }
.kefu-gfold-hd {
  height: 36px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  cursor: pointer;
  user-select: none;
  background: #fafafa;
  font-size: 13px;
  color: #1d2129;
}
.kefu-gfold-hd:hover { background: #f2f3f5; }
.kefu-gfold-caret {
  width: 0; height: 0;
  border-left: 5px solid #86909c;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  transition: transform .15s;
}
.kefu-gfold:not(.is-off) .kefu-gfold-caret { transform: rotate(90deg); }
.kefu-gfold-hd b { font-weight: 600; font-size: 13px; }
.kefu-gfold-hd em { color: #86909c; font-style: normal; font-size: 12px; }
.kefu-gfold-hd i {
  margin-left: auto;
  min-width: 16px;
  height: 16px;
  padding: 0 5px;
  border-radius: 8px;
  background: #f53f3f;
  color: #fff;
  font-size: 11px;
  font-style: normal;
  line-height: 16px;
  text-align: center;
}
.kefu-gfold-add {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: #86909c;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 0 4px;
}
.kefu-gfold-hd i + .kefu-gfold-add { margin-left: 6px; }
.kefu-gfold.is-off .kefu-gfold-bd { display: none; }
.kefu-gfold-menu {
  position: fixed;
  z-index: 1300;
  min-width: 140px;
  background: #fff;
  border: 1px solid #e5e6eb;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  padding: 4px 0;
}
.kefu-gfold-menu-tt {
  padding: 4px 12px 6px;
  font-size: 12px;
  color: #86909c;
}
.kefu-gfold-menu button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 7px 12px;
  font-size: 13px;
  cursor: pointer;
  color: #1d2129;
}
.kefu-gfold-menu button:hover { background: #f7f8fa; }
.kefu-gfold-menu button.on { color: #2d8cf0; }
.kefu-gfold-menu-sep {
  height: 1px;
  margin: 4px 0;
  background: #e5e6eb;
}
.kefu-gfold-menu button.kefu-menu-danger,
.kefu-conv-del-menu button.kefu-menu-danger {
  color: #e34d59;
}
.kefu-gfold-menu button.kefu-menu-danger:hover,
.kefu-conv-del-menu button.kefu-menu-danger:hover {
  background: #fff1f0;
  color: #cb2634;
}
body[theme-mode="dark"] .kefu-gfold-menu-sep { background: rgba(148,176,210,.12); }
body[theme-mode="dark"] .kefu-gfold-menu button.kefu-menu-danger,
body[theme-mode="dark"] .kefu-conv-del-menu button.kefu-menu-danger { color: #f98981; }
body[theme-mode="dark"] .kefu-gfold-menu button.kefu-menu-danger:hover,
body[theme-mode="dark"] .kefu-conv-del-menu button.kefu-menu-danger:hover {
  background: rgba(227,77,89,.12);
}
body[theme-mode="dark"] .kefu-gfold-hd { background: #1a2030; color: #e8eef6; }
body[theme-mode="dark"] .kefu-gfold-hd:hover { background: #222a3d; }
body[theme-mode="dark"] .kefu-gfold { border-color: rgba(148,176,210,.12); }
body[theme-mode="dark"] .kefu-gfold-menu {
  background: #222a3d;
  border-color: rgba(148,176,210,.12);
}
body[theme-mode="dark"] .kefu-gfold-menu button { color: #e8eef6; }
body[theme-mode="dark"] .kefu-gfold-menu button:hover { background: #1a2030; }

.kefu-fold-page {
  position: fixed;
  left: 68px;
  top: 0;
  bottom: 0;
  width: var(--wk-width-layout-content-left, 320px);
  z-index: 70;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-right: 1px solid #f0f0f0;
  font-family: var(--kf-font);
}
.kefu-fold-bar {
  height: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 14px;
  font-weight: 600;
}
.kefu-fold-new {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: #4e5969;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}
.kefu-fold-body { flex: 1; min-height: 0; overflow: auto; }
.kefu-fold-item {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 56px;
  padding: 0 12px;
  cursor: pointer;
}
.kefu-fold-item:hover { background: #f7f8fa; }
.kefu-fold-item img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}
.kefu-fold-item span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}
.kefu-fold-item em {
  flex-shrink: 0;
  font-style: normal;
  font-size: 11px;
  color: #86909c;
}
.kefu-fold-empty {
  padding: 12px;
  font-size: 12px;
  color: #86909c;
  text-align: center;
}
.kefu-gfold-menu { z-index: 1300; }
@media (max-width: 960px) {
  .kefu-fold-page { left: 56px; }
}
body[theme-mode="dark"] .kefu-fold-page {
  background: var(--kf-slate);
  border-color: var(--kf-line);
  color: var(--kf-text);
}
body[theme-mode="dark"] .kefu-fold-bar { border-color: var(--kf-line); }
body[theme-mode="dark"] .kefu-fold-item:hover { background: var(--kf-lift); }
body[theme-mode="dark"] .kefu-fold-new { color: var(--kf-mute); }

.kefu-dlg-mask {
  position: fixed;
  inset: 0;
  z-index: 1400;
  background: rgba(0,0,0,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.kefu-dlg {
  width: 360px;
  max-width: 100%;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0,0,0,.18);
  overflow: hidden;
}
.kefu-dlg-hd {
  padding: 14px 16px 0;
  font-size: 15px;
  font-weight: 600;
  color: #1d2129;
}
.kefu-dlg-bd { padding: 12px 16px 8px; }
.kefu-dlg-msg {
  margin: 0 0 10px;
  font-size: 13px;
  color: #4e5969;
  line-height: 1.6;
}
.kefu-dlg-input {
  width: 100%;
  height: 36px;
  box-sizing: border-box;
  border: 1px solid #e5e6eb;
  border-radius: 4px;
  padding: 0 10px;
  font-size: 14px;
  outline: none;
}
.kefu-dlg-input:focus { border-color: #2d8cf0; }
.kefu-dlg-ft {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px 14px;
}
.kefu-dlg-ft-spacer { flex: 1; }
.kefu-dlg-btn {
  height: 32px;
  padding: 0 14px;
  border: 1px solid #e5e6eb;
  background: #fff;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
  color: #1d2129;
}
.kefu-dlg-btn.primary {
  border-color: #2d8cf0;
  background: #2d8cf0;
  color: #fff;
}
.kefu-dlg-btn.danger {
  border-color: transparent;
  background: transparent;
  color: #cb272d;
}
#kefu-toast-host {
  position: fixed;
  left: 50%;
  top: 18%;
  transform: translateX(-50%);
  z-index: 1500;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
.kefu-toast {
  min-width: 160px;
  max-width: 80vw;
  padding: 10px 18px;
  border-radius: 8px;
  background: rgba(29, 33, 41, 0.88);
  color: #fff;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .18s, transform .18s;
}
.kefu-toast.is-on {
  opacity: 1;
  transform: translateY(0);
}
body[theme-mode="dark"] .kefu-toast {
  background: rgba(34, 42, 61, 0.94);
  color: var(--kf-text);
}

body[theme-mode="dark"] .kefu-dlg { background: #222a3d; }
body[theme-mode="dark"] .kefu-dlg-hd,
body[theme-mode="dark"] .kefu-dlg-btn { color: #e8eef6; }
body[theme-mode="dark"] .kefu-dlg-msg { color: #8a93a6; }
body[theme-mode="dark"] .kefu-dlg-input {
  background: #121722;
  border-color: rgba(148,176,210,.12);
  color: #e8eef6;
}
body[theme-mode="dark"] .kefu-dlg-btn { background: #1a2030; border-color: rgba(148,176,210,.12); }

.kefu-sider-tip { display: none !important; }
.wk-chat-conversation-header-right .kefu-header-badge,
.wk-navheader-content-right .kefu-desk-btn,
.wk-navheader-content-right #kefu-desk-open,
.wk-chat-conversation-header-right #kefu-desk-open { display: none !important; }
.wk-messageinput-toolbar .kefu-quickreply,
.wk-messageinput-actionbox .kefu-quickreply,
.wk-conversation-chattoolbars .kefu-quickreply { display: none !important; }

.kefu-login-rail {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 0;
}
.wk-login { padding-left: 68px !important; }

/* —— 会话列表 —— */
body[theme-mode="dark"] .wk-chat-content-left,
body[theme-mode="dark"] .wk-conversationlist {
  background: var(--kf-slate) !important;
  border-right: 1px solid var(--kf-line) !important;
}
body[theme-mode="dark"] .wk-chat-search,
body[theme-mode="dark"] .wk-chat-title {
  background: var(--kf-slate) !important;
  border-bottom: 1px solid var(--kf-line) !important;
  color: var(--kf-text) !important;
  box-shadow: none !important;
}
body[theme-mode="dark"] .wk-chat-title {
  font-weight: 600 !important;
  font-size: 16px !important;
  letter-spacing: 0.01em;
}
body[theme-mode="dark"] .wk-search-box,
body[theme-mode="dark"] .semi-input-wrapper,
body[theme-mode="dark"] .wk-search-input .semi-input-wrapper {
  background: var(--kf-desk) !important;
  border: 1px solid var(--kf-line) !important;
  border-radius: 10px !important;
  box-shadow: none !important;
}
body[theme-mode="dark"] .wk-search-input input,
body[theme-mode="dark"] .semi-input {
  color: var(--kf-text) !important;
  background: transparent !important;
}
body[theme-mode="dark"] .wk-conversationlist-item-content {
  padding: 12px 14px !important;
  border-radius: 0 !important;
}
body[theme-mode="dark"] .wk-conversationlist-item-content:hover {
  background: var(--kf-lift) !important;
}
body[theme-mode="dark"] .wk-conversationlist-item-selected,
body[theme-mode="dark"] .wk-conversationlist-item-selected .wk-conversationlist-item-content {
  background: var(--kf-live-dim) !important;
  box-shadow: inset 2px 0 0 var(--kf-live) !important;
}
body[theme-mode="dark"] .wk-conversationlist-item-name,
body[theme-mode="dark"] .wk-conversationlist-item-name h3,
body[theme-mode="dark"] .wk-chat-conversation-header-channel-info-name {
  color: var(--kf-text) !important;
  font-weight: 600 !important;
}
body[theme-mode="dark"] .wk-conversationlist-item-selected .wk-conversationlist-item-name h3,
body[theme-mode="dark"] .wk-conversationlist-item-selected .wk-conversationlist-item-name {
  color: var(--kf-text) !important;
}
body[theme-mode="dark"] .wk-conversationlist-item-lastmsg,
body[theme-mode="dark"] .wk-conversationlist-item-time,
body[theme-mode="dark"] .wk-chat-conversation-header-channel-info-tip {
  color: var(--kf-mute) !important;
}
body[theme-mode="dark"] .wk-conversationlist-item-reddot,
body[theme-mode="dark"] .wk-conversation-unread-count,
body[theme-mode="dark"] .semi-badge-count {
  background: var(--kf-live) !important;
  color: #06241f !important;
  font-weight: 650 !important;
}

/* —— 聊天画布 —— */
body[theme-mode="dark"] .wk-chat-empty,
body[theme-mode="dark"] .wk-conversation,
body[theme-mode="dark"] .wk-conversation-content,
body[theme-mode="dark"] .wk-conversation-messages {
  background: var(--kf-desk) !important;
}
body[theme-mode="dark"] .wk-chat-conversation-header {
  height: auto !important;
  min-height: 56px;
  background: var(--kf-slate) !important;
  border-bottom: 1px solid var(--kf-line) !important;
  box-shadow: none !important;
}
body[theme-mode="dark"] .wk-message-system,
body[theme-mode="dark"] .wk-conversation-topview {
  color: var(--kf-mute) !important;
  background: transparent !important;
}
body[theme-mode="dark"] .wk-message-base-bubble-box.send .wk-message-base-bubble {
  background: var(--kf-speak) !important;
  color: #f4f7ff !important;
  border-radius: 14px 14px 4px 14px !important;
  box-shadow: none !important;
}
body[theme-mode="dark"] .wk-message-base-bubble-box.send .svgAppendix .corner {
  fill: var(--kf-speak) !important;
}
body[theme-mode="dark"] .wk-message-base-bubble-box.recv .wk-message-base-bubble {
  background: var(--kf-recv) !important;
  color: var(--kf-text) !important;
  border-radius: 14px 14px 14px 4px !important;
  box-shadow: none !important;
}
body[theme-mode="dark"] .wk-message-base-bubble-box.recv .svgAppendix .corner {
  fill: var(--kf-recv) !important;
}
body[theme-mode="dark"] .wk-message-text,
body[theme-mode="dark"] .wk-message-text-recv,
body[theme-mode="dark"] .wk-message-time {
  color: inherit !important;
}
body[theme-mode="dark"] .wk-message-time { color: var(--kf-mute) !important; opacity: 0.85; }

body[theme-mode="dark"] .wk-conversation-footer {
  background: var(--kf-slate) !important;
  border-top: 1px solid var(--kf-line) !important;
}
body[theme-mode="dark"] .wk-messageinput-box {
  background: var(--kf-desk) !important;
  border: 1px solid var(--kf-line) !important;
  border-radius: 14px !important;
  margin: 8px 12px 12px !important;
}
body[theme-mode="dark"] .wk-messageinput-input,
body[theme-mode="dark"] .wk-messageinput-input__input,
body[theme-mode="dark"] .wk-messageinput-input__control,
body[theme-mode="dark"] .mentions__input,
body[theme-mode="dark"] .mentions__highlighter {
  color: var(--kf-text) !important;
  background: transparent !important;
  font-size: 14px !important;
  line-height: 1.55 !important;
}
body[theme-mode="dark"] .wk-messageinput-toolbar {
  opacity: 0.88;
}
body[theme-mode="dark"] .wk-chat-channelsetting,
body[theme-mode="dark"] .wk-chat-popover,
body[theme-mode="dark"] .wk-subscribers,
body[theme-mode="dark"] .wk-userInfo,
body[theme-mode="dark"] .wk-route-header {
  background: var(--kf-slate) !important;
  color: var(--kf-text) !important;
  border-color: var(--kf-line) !important;
}
body[theme-mode="dark"] .wk-sider-setting-list,
body[theme-mode="dark"] .wk-sider-setting-list.open {
  background: var(--kf-slate) !important;
  color: var(--kf-text) !important;
  border: 1px solid var(--kf-line) !important;
  border-radius: 12px !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35) !important;
}
body[theme-mode="dark"] .wk-sider-setting-list li { color: var(--kf-text) !important; }
body[theme-mode="dark"] .wk-sider-setting-list li:hover {
  background: var(--kf-live-dim) !important;
  color: var(--kf-live) !important;
}

body[theme-mode="dark"] .kefu-card {
  background: var(--kf-desk) !important;
  border: 1px solid var(--kf-line) !important;
  border-radius: 12px !important;
}
body[theme-mode="dark"] .kefu-card-title,
body[theme-mode="dark"] .kefu-kv b { color: var(--kf-text) !important; }
body[theme-mode="dark"] .kefu-kv span,
body[theme-mode="dark"] .kefu-card-muted { color: var(--kf-mute) !important; }

body[theme-mode="dark"] ::-webkit-scrollbar { width: 8px; height: 8px; }
body[theme-mode="dark"] ::-webkit-scrollbar-thumb {
  background: #3a4458;
  border-radius: 8px;
}

/* —— 登录 —— */
body[theme-mode="dark"] .wk-login {
  background: var(--kf-desk) !important;
  color: var(--kf-text) !important;
}
body[theme-mode="dark"] .wk-login-backdrop {
  background-color: var(--kf-desk) !important;
  opacity: 0.25;
}
body[theme-mode="dark"] .wk-login-shell {
  background: var(--kf-slate) !important;
  border: 1px solid var(--kf-line) !important;
  border-radius: 16px !important;
  box-shadow: none !important;
}
body[theme-mode="dark"] .wk-login-content-slogan h2,
body[theme-mode="dark"] .wk-login-content-form label > span { color: var(--kf-text) !important; }
body[theme-mode="dark"] .wk-login-content-slogan p { color: var(--kf-mute) !important; }
body[theme-mode="dark"] .wk-login-content-form input {
  background: var(--kf-desk) !important;
  border: 1px solid var(--kf-line) !important;
  color: var(--kf-text) !important;
  border-radius: 10px !important;
  height: 42px !important;
}
body[theme-mode="dark"] .wk-login-content-form-ok,
body[theme-mode="dark"] .semi-button-primary {
  background: var(--kf-speak) !important;
  border-radius: 10px !important;
}

.kefu-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 16px 0;
}
.kefu-chip {
  border: 1px solid var(--kf-line);
  background: var(--kf-lift);
  color: var(--kf-text);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 12px;
  cursor: pointer;
}
.kefu-chip:hover { border-color: var(--kf-live); color: var(--kf-live); }

/* —— 话术一页两栏铺满 —— */
.kefu-workspace {
  position: fixed;
  left: 68px; top: 0; right: 0; bottom: 0;
  z-index: 80;
  display: flex; flex-direction: column;
  background: #fff; color: #1d2129;
  font-family: var(--kf-font);
}
.kefu-ws-bar {
  height: 44px; flex-shrink: 0;
  display: flex; align-items: center; gap: 10px;
  padding: 0 12px;
  border-bottom: 1px solid #f0f0f0;
}
.kefu-link, .kefu-btn-text {
  border: 0; background: transparent; color: #2d8cf0;
  cursor: pointer; font-size: 13px; padding: 0;
}
.kefu-btn-text:disabled { color: #c0c4cc; cursor: not-allowed; }
.kefu-ws-sep { width: 1px; height: 12px; background: #e5e6eb; }
.kefu-ws-title { font-size: 14px; font-weight: 600; }
.kefu-one {
  flex: 1; min-height: 0;
  display: grid; grid-template-columns: 360px minmax(0,1fr);
}
.kefu-col {
  min-height: 0; display: flex; flex-direction: column;
  border-right: 1px solid #f0f0f0;
}
.kefu-col:last-child { border-right: 0; }
.kefu-col-hd {
  height: 40px; flex-shrink: 0;
  display: flex; align-items: center; gap: 8px;
  padding: 0 12px; border-bottom: 1px solid #f0f0f0;
}
.kefu-col-hd b { font-size: 13px; font-weight: 600; margin-right: auto; }
.kefu-muted { font-size: 12px; color: #86909c; }
.kefu-col > textarea {
  flex: 1; min-height: 0; width: 100%;
  border: 0; border-bottom: 1px solid #f0f0f0;
  resize: none; padding: 10px 12px;
  font: inherit; font-size: 13px; line-height: 1.55;
  outline: none; box-sizing: border-box;
}
.kefu-col-ft {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 12px; font-size: 12px; color: #86909c; flex-shrink: 0;
}
.kefu-insert {
  border: 0; background: transparent; color: #2d8cf0;
  cursor: pointer; font-size: 12px; padding: 0 2px;
}
.kefu-preview {
  flex-shrink: 0; padding: 8px 12px 10px; background: #f7f8fa;
  display: flex; justify-content: flex-end;
}
.kefu-preview-b {
  max-width: 86%; background: #2d8cf0; color: #fff;
  border-radius: 4px 4px 2px 4px; padding: 6px 8px;
  font-size: 12px; line-height: 1.5; white-space: pre-wrap; word-break: break-word;
}
.kefu-table-wrap { flex: 1; min-height: 0; overflow: auto; }
.kefu-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.kefu-table th {
  text-align: left; font-weight: 500; color: #86909c; background: #fafafa;
  padding: 6px 12px; border-bottom: 1px solid #f0f0f0; position: sticky; top: 0;
}
.kefu-table td { padding: 8px 12px; border-bottom: 1px solid #f7f8fa; cursor: pointer; }
.kefu-table td.body {
  color: #4e5969; max-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.kefu-table tr:hover td { background: #f7f8fa; }
.kefu-table tr.on td { background: #e8f3ff; }
.kefu-edit {
  flex-shrink: 0; border-top: 1px solid #f0f0f0;
  padding: 8px 12px 10px; display: grid; gap: 6px;
}
.kefu-workspace input:not([type="checkbox"]),
.kefu-edit textarea {
  width: 100%; box-sizing: border-box; border: 1px solid #e5e6eb;
  border-radius: 2px; padding: 6px 8px; font: inherit; font-size: 13px; outline: none;
}
.kefu-edit textarea { min-height: 64px; resize: vertical; line-height: 1.5; }
.kefu-workspace input:focus, .kefu-edit textarea:focus { border-color: #2d8cf0; }
.kefu-switch { position: relative; width: 36px; height: 20px; flex-shrink: 0; }
.kefu-switch input { opacity: 0; width: 0; height: 0; }
.kefu-switch span {
  position: absolute; inset: 0; background: #c9cdd4; border-radius: 10px; cursor: pointer;
}
.kefu-switch span:before {
  content: ""; position: absolute; width: 16px; height: 16px; left: 2px; top: 2px;
  background: #fff; border-radius: 50%; transition: transform .15s ease;
}
.kefu-switch input:checked + span { background: #2d8cf0; }
.kefu-switch input:checked + span:before { transform: translateX(16px); }
.kefu-btn-primary {
  height: 28px; padding: 0 12px; border: 0; background: #2d8cf0; color: #fff;
  border-radius: 2px; font-size: 13px; cursor: pointer;
}
.kefu-empty { color: #86909c; text-align: center; padding: 20px 8px; }
.kefu-ws-toast {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%);
  padding: 6px 12px; background: #1d2129; color: #fff; font-size: 12px; opacity: 0; pointer-events: none;
}
.kefu-ws-toast.err { background: #cb272d; }
@media (max-width: 960px) {
  .kefu-one { grid-template-columns: 1fr; overflow: auto; }
  .kefu-workspace { left: 56px; }
  .kefu-col { min-height: 280px; border-right: 0; border-bottom: 1px solid #f0f0f0; }
}

body[theme-mode="dark"] .wk-contacts,
body[theme-mode="dark"] .wk-contacts-content,
body[theme-mode="dark"] .wk-contacts-content-contacts,
body[theme-mode="dark"] .wk-contacts-content-fnc,
body[theme-mode="dark"] .wk-contacts-content-header,
body[theme-mode="dark"] .wk-contacts-section,
body[theme-mode="dark"] .wk-contacts-section-list {
  background-color: var(--kf-slate) !important;
  color: var(--kf-text) !important;
  border-color: var(--kf-line) !important;
}
body[theme-mode="dark"] .wk-contacts-section-item,
body[theme-mode="dark"] .wk-contacts-section-item-name,
body[theme-mode="dark"] .wk-contacts-section-item-index {
  background-color: transparent !important;
  color: var(--kf-text) !important;
}
body[theme-mode="dark"] .wk-contacts-section-item::after { background: var(--kf-line) !important; }
body[theme-mode="dark"] .wk-contacts-section-item:hover,
body[theme-mode="dark"] .wk-contacts-section-item-selected {
  background-color: var(--kf-live-dim) !important;
  color: var(--kf-text) !important;
}
body[theme-mode="dark"] .wk-contacts-content-header .wk-search-box { background-color: var(--kf-desk) !important; }

body[theme-mode="dark"] .kefu-workspace,
body[theme-mode="dark"] .kefu-ws-bar,
body[theme-mode="dark"] .kefu-col,
body[theme-mode="dark"] .kefu-table-wrap,
body[theme-mode="dark"] .kefu-edit,
body[theme-mode="dark"] .kefu-table th {
  background: #222a3d; color: #e8eef6; border-color: rgba(148,176,210,.12);
}
body[theme-mode="dark"] .kefu-col > textarea,
body[theme-mode="dark"] .kefu-workspace input:not([type="checkbox"]),
body[theme-mode="dark"] .kefu-edit textarea {
  background: #121722; color: #e8eef6; border-color: rgba(148,176,210,.12);
}
body[theme-mode="dark"] .kefu-preview { background: #121722; }
body[theme-mode="dark"] .kefu-table td { color: #e8eef6; border-color: rgba(148,176,210,.08); }
body[theme-mode="dark"] .kefu-table td.body, body[theme-mode="dark"] .kefu-muted { color: #8a93a6; }
body[theme-mode="dark"] .kefu-table tr:hover td { background: #1a2030; }
body[theme-mode="dark"] .kefu-table tr.on td { background: rgba(45,140,240,.16); }
body[theme-mode="dark"] .kefu-switch span { background: #3a4458; }

/* 去掉输入栏截图（剪刀） */
.wk-conversation-chattoolbars-item:has(img[src*="func_screenshot"]),
.wk-conversation-chattoolbars-item:has(img[src*="screenshot"]) {
  display: none !important;
}

#kefu-sticker-tab span {
  font-size: 12px;
  color: #4e5969;
}
#kefu-sticker-tab.wk-emojipanel-tab-item-selected span { color: #1d2129; font-weight: 600; }
.kefu-sticker-grid {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  overflow: auto;
  align-content: flex-start;
}
.kefu-sticker-cell {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: #f7f8fa;
}
.kefu-sticker-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.kefu-sticker-add {
  width: 72px;
  height: 72px;
  border: 1px dashed #c9cdd4;
  border-radius: 8px;
  background: transparent;
  color: #86909c;
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
}
.kefu-sticker-add:hover { border-color: #2d8cf0; color: #2d8cf0; }
body[theme-mode="dark"] #kefu-sticker-tab span { color: var(--kf-mute); }
body[theme-mode="dark"] #kefu-sticker-tab.wk-emojipanel-tab-item-selected span { color: var(--kf-text); }
body[theme-mode="dark"] .kefu-sticker-cell { background: var(--kf-lift); }
body[theme-mode="dark"] .kefu-sticker-add { border-color: var(--kf-line); color: var(--kf-mute); }

/* —— 用户端权限锁定（kefu-lockdown） —— */
body.kefu-customer-lock .kefu-lock-hide {
  display: none !important;
}
/* 群成员工具（加号/减号）在 JS 标 hide；兜底：无名字的工具格常只有图 */
body.kefu-customer-lock .wk-subscribers-item img[src*="icon_add_more"],
body.kefu-customer-lock .wk-subscribers-item img[src*="icon_delete_more"] {
  display: none !important;
}
body.kefu-customer-lock .wk-subscribers-item:has(img[src*="icon_add_more"]),
body.kefu-customer-lock .wk-subscribers-item:has(img[src*="icon_delete_more"]) {
  display: none !important;
}
.kefu-lock-toast {
  position: fixed;
  left: 50%;
  bottom: 18%;
  transform: translateX(-50%);
  z-index: 99999;
  padding: 10px 16px;
  border-radius: 8px;
  background: rgba(12, 16, 23, 0.88);
  color: #e8eef6;
  font-size: 13px;
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

/* 用户端：只读基础资料 */
.kefu-my-profile-mask {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.kefu-my-profile-panel {
  width: min(360px, 100%);
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
  font-family: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}
.kefu-my-profile-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #eef0f3;
  font-size: 15px;
  font-weight: 600;
  color: #1f2329;
}
.kefu-my-profile-close {
  border: 0;
  background: transparent;
  color: #2d8cf0;
  font-size: 13px;
  cursor: pointer;
  padding: 4px 0;
}
.kefu-my-profile-bd {
  padding: 8px 16px 16px;
}
.kefu-my-profile-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f0f2f5;
  font-size: 14px;
}
.kefu-my-profile-row .k {
  color: #8a93a6;
  flex: 0 0 auto;
}
.kefu-my-profile-row .v {
  color: #1f2329;
  font-weight: 500;
  text-align: right;
  word-break: break-all;
}
.kefu-my-profile-tip {
  margin: 12px 0 0;
  font-size: 12px;
  color: #8a93a6;
  line-height: 1.5;
}
body[theme-mode="dark"] .kefu-my-profile-panel {
  background: #1a2030;
}
body[theme-mode="dark"] .kefu-my-profile-hd {
  border-bottom-color: rgba(148, 176, 210, 0.12);
  color: #e8eef6;
}
body[theme-mode="dark"] .kefu-my-profile-row {
  border-bottom-color: rgba(148, 176, 210, 0.12);
}
body[theme-mode="dark"] .kefu-my-profile-row .v {
  color: #e8eef6;
}


/* —— 隐藏黑名单 / 文件传输助手 / 系统账号 —— */
body.kefu-hide-system-entries .kefu-hide-entry,
.kefu-hide-entry {
  display: none !important;
}


/* —— 微信式按住发语音：图标进工具栏，不占打字区 —— */
.kefu-voice-toggle-item {
  flex-shrink: 0;
}
.kefu-voice-toggle {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #515151;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.kefu-voice-toggle:hover,
.kefu-voice-toggle.on { color: #2d8cf0; }
.kefu-voice-toggle-item:hover { background-color: #ededed; }
.kefu-voice-hold {
  display: none;
  width: calc(100% - 36px);
  height: 40px;
  margin: 10px 18px 15px;
  box-sizing: border-box;
  border: 0;
  border-radius: 6px;
  background: #e9e9e9;
  color: #191919;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  align-items: center;
  justify-content: center;
}
.kefu-voice-hold:active {
  background: #d9d9d9;
}
.kefu-voice-mode .kefu-voice-hold { display: flex; }
.kefu-voice-mode .wk-messageinput-inputbox,
.kefu-voice-mode .wk-messageinput-input {
  display: none !important;
}
.kefu-voice-row { display: none !important; }
.kefu-voice-mask {
  position: fixed;
  inset: 0;
  z-index: 600;
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  background: rgba(0,0,0,.25);
}
.kefu-voice-mask.on { display: flex; }
.kefu-voice-mask-card {
  width: 160px;
  padding: 20px 16px 16px;
  border-radius: 12px;
  background: rgba(0,0,0,.72);
  color: #fff;
  text-align: center;
}
.kefu-voice-mask-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 10px;
  border-radius: 24px;
  background: #2d8cf0;
  position: relative;
}
.kefu-voice-mask-icon::after {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 8px;
  background: #fff;
  clip-path: polygon(35% 10%, 65% 10%, 65% 55%, 80% 55%, 50% 90%, 20% 55%, 35% 55%);
}
.kefu-voice-mask.cancel .kefu-voice-mask-icon { background: #e34d59; }
.kefu-voice-mask-time {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 6px;
}
.kefu-voice-mask-tip {
  font-size: 13px;
  color: rgba(255,255,255,.85);
}
.kefu-voice-mask.cancel .kefu-voice-mask-tip { color: #ffb3b8; }
body[theme-mode="dark"] .kefu-voice-toggle { color: #c9d1d9; }
body[theme-mode="dark"] .kefu-voice-toggle-item:hover { background-color: rgba(255,255,255,.06); }
body[theme-mode="dark"] .kefu-voice-hold {
  background: #2a3142;
  color: #e8eef6;
}
body[theme-mode="dark"] .kefu-voice-hold:active { background: #222a3d; }

.wk-messageinput-box.kefu-forbidden-locked {
  position: relative;
}
.kefu-forbidden-bar {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f6f8;
  color: #86909c;
  font-size: 14px;
  pointer-events: auto;
  cursor: default;
}
body[theme-mode="dark"] .kefu-forbidden-bar {
  background: #1f2430;
  color: #8b949e;
}

/* —— 群发言开关：对齐免打扰行 —— */
.kefu-gqr-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
  flex-shrink: 0;
}
.kefu-gqr-tip {
  font-size: 12px;
  color: #8a94a6;
  min-width: 2em;
}
.kefu-gm-speak-tip { display: none; }
.kefu-gm-speak-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
  cursor: default;
}
.kefu-gm-speak-row .wk-list-item-content { flex: 1; min-width: 0; }
.kefu-gm-speak-row .wk-list-item-title { font-size: 15px; color: #1d2129; }
.kefu-gm-speak-row .wk-list-item-action {
  display: flex;
  align-items: center;
  margin-left: auto;
}
.kefu-gm-speak-row .kefu-switch {
  width: 40px;
  height: 24px;
}
.kefu-gm-speak-row .kefu-switch span:before {
  width: 20px;
  height: 20px;
  left: 2px;
  top: 2px;
}
.kefu-gm-speak-row .kefu-switch input:checked + span:before {
  transform: translateX(16px);
}
.kefu-gm-menu {
  position: fixed;
  z-index: 500;
  min-width: 140px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.14);
  padding: 4px 0;
  border: 1px solid #eef0f3;
}
.kefu-gm-menu button {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 10px 16px;
  font-size: 14px;
  color: #1d2129;
  cursor: pointer;
}
.kefu-gm-menu button:hover { background: #f5f7fa; }
.kefu-gm-menu button.danger { color: #e34d59; }
.wk-contextmenus li.kefu-gm-avatar-item.danger {
  color: #e34d59;
}
body[theme-mode="dark"] .wk-contextmenus li.kefu-gm-avatar-item.danger {
  color: #f07178;
}
.kefu-gm-badge {
  position: absolute;
  top: 2px;
  left: 2px;
  font-size: 10px;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 4px;
  background: #2d8cf0;
  color: #fff;
  pointer-events: none;
  z-index: 2;
}
.kefu-gm-badge.mute { background: #e34d59; }
.kefu-gm-badge.owner { background: #ff9900; }
.kefu-gm-badge.both { background: #2d8cf0; }
body:has(.wk-inputedit) .kefu-gm-badge {
  display: none !important;
}
.wk-subscribers-item.kefu-gm-member,
.wk-subscrierlist-list-item.kefu-gm-member {
  position: relative;
}
.kefu-gm-fab {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 3;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 11px;
  background: #2d8cf0;
  color: #fff;
  font-size: 11px;
  line-height: 22px;
  padding: 0;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}
.kefu-gm-fab:hover { background: #1a7ae0; }
.kefu-gm-user-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px 4px;
}
.kefu-gm-user-actions button {
  border: 1px solid #e5e6eb;
  background: #fff;
  color: #1d2129;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
}
.kefu-gm-user-actions button:hover { border-color: #2d8cf0; color: #2d8cf0; }
.kefu-gm-user-actions button.danger { color: #e34d59; border-color: #f3c1c6; }
.kefu-gm-user-actions button.danger:hover { border-color: #e34d59; }

.kefu-gm-member-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
}
.kefu-gm-member-entry:hover { background: #fafbfc; }
.kefu-gm-member-entry .wk-list-item-title { font-size: 15px; color: #1d2129; }
.kefu-gm-entry-action {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #8a94a6;
  font-size: 13px;
}
.kefu-gm-entry-arrow {
  font-size: 18px;
  line-height: 1;
  color: #c0c4cc;
}
/* 挂在右侧「聊天信息」.wk-route 内，不盖全屏 */
.wk-route.kefu-gm-host,
.wk-channelsetting.kefu-gm-host {
  position: relative !important;
}
.kefu-gm-page {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  background: var(--wk-color-secondary, #f5f6f8);
  font-family: var(--kf-font, "PingFang SC", "Noto Sans SC", sans-serif);
}
.kefu-gm-page-bar {
  height: 56px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  background: var(--wk-color-secondary, #f5f6f8);
  border-bottom: 1px solid #f0f0f0;
}
.kefu-gm-page-back {
  border: 0;
  background: transparent;
  color: #2d8cf0;
  font-size: 15px;
  cursor: pointer;
  padding: 4px 4px 4px 0;
  flex-shrink: 0;
}
.kefu-gm-page-title {
  font-size: 16px;
  font-weight: 600;
  color: #1d2129;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kefu-gm-search {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 10px;
  background: var(--wk-color-secondary, #f5f6f8);
  border-bottom: 1px solid #f0f0f0;
}
.kefu-gm-search input {
  flex: 1;
  min-width: 0;
  height: 34px;
  border: 1px solid #e5e6eb;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 13px;
  background: #fff;
  color: #1d2129;
  outline: none;
}
.kefu-gm-search input:focus { border-color: #2d8cf0; }
.kefu-gm-search input::placeholder { color: #c0c4cc; }
.kefu-gm-search-tip {
  flex-shrink: 0;
  font-size: 12px;
  color: #8a94a6;
  min-width: 3.5em;
  text-align: right;
}
.kefu-gm-page-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  background: #fff;
  padding: 0 16px;
}
.kefu-gm-member-panel-empty {
  font-size: 13px;
  color: #8a94a6;
  padding: 24px 0;
  text-align: center;
}
.kefu-gm-member-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}
.kefu-gm-member-row .meta { flex: 1; min-width: 0; }
.kefu-gm-member-row .name {
  font-size: 14px;
  color: #1d2129;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kefu-gm-member-row .tags { margin-top: 2px; }
.kefu-gm-member-row .tag {
  display: inline-block;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 4px;
  margin-right: 4px;
}
.kefu-gm-member-row .tag.mgr { background: #e8f3ff; color: #2d8cf0; }
.kefu-gm-member-row .tag.mute { background: #ffece8; color: #e34d59; }
.kefu-gm-member-row .acts { display: flex; gap: 6px; flex-shrink: 0; }
.kefu-gm-member-row .acts button {
  border: 1px solid #e5e6eb;
  background: #fff;
  color: #1d2129;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 12px;
  cursor: pointer;
}
.kefu-gm-member-row .acts button:hover { border-color: #2d8cf0; color: #2d8cf0; }
.kefu-gm-member-row .acts button.danger { color: #e34d59; border-color: #f3c1c6; }
body[theme-mode="dark"] .kefu-gm-speak-row {
  background: #1a2030;
  border-bottom-color: rgba(148, 176, 210, 0.12);
}
body[theme-mode="dark"] .kefu-gm-speak-row .wk-list-item-title { color: #e8eef6; }
body[theme-mode="dark"] .kefu-gm-menu {
  background: #1a2030;
  border-color: rgba(148, 176, 210, 0.16);
}
body[theme-mode="dark"] .kefu-gm-menu button { color: #e8eef6; }
body[theme-mode="dark"] .kefu-gm-menu button:hover { background: #222a3d; }
body[theme-mode="dark"] .kefu-gm-user-actions button {
  background: #222a3d;
  border-color: rgba(148, 176, 210, 0.16);
  color: #e8eef6;
}
body[theme-mode="dark"] .kefu-gm-member-entry {
  background: #1a2030;
  border-bottom-color: rgba(148, 176, 210, 0.12);
}
body[theme-mode="dark"] .kefu-gm-member-entry:hover { background: #222a3d; }
body[theme-mode="dark"] .kefu-gm-member-entry .wk-list-item-title,
body[theme-mode="dark"] .kefu-gm-page-title,
body[theme-mode="dark"] .kefu-gm-member-row .name { color: #e8eef6; }
body[theme-mode="dark"] .kefu-gm-page { background: #121722; }
body[theme-mode="dark"] .kefu-gm-page-bar,
body[theme-mode="dark"] .kefu-gm-search,
body[theme-mode="dark"] .kefu-gm-page-body { background: #1a2030; border-color: rgba(148, 176, 210, 0.12); }
body[theme-mode="dark"] .kefu-gm-search input {
  background: #222a3d;
  border-color: rgba(148, 176, 210, 0.16);
  color: #e8eef6;
}
body[theme-mode="dark"] .kefu-gm-member-row { border-bottom-color: rgba(148, 176, 210, 0.12); }
body[theme-mode="dark"] .kefu-gm-member-row .acts button {
  background: #222a3d;
  border-color: rgba(148, 176, 210, 0.16);
  color: #e8eef6;
}



/* —— 表情审核状态（kefu-sticker） ——
   未过审的压暗并挂角标；点击只给提示，服务端也会拦，双保险 */
.kefu-sticker-cell { position: relative; }
.kefu-sticker-cell[data-status="0"],
.kefu-sticker-cell[data-status="2"] { opacity: .5; }
.kefu-sticker-cell[data-status="0"] img,
.kefu-sticker-cell[data-status="2"] img { filter: grayscale(.7); }
.kefu-sticker-badge {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  font-size: 11px;
  line-height: 17px;
  text-align: center;
  color: #fff;
  background: rgba(0, 0, 0, .6);
}
.kefu-sticker-cell[data-status="2"] .kefu-sticker-badge { background: rgba(208, 48, 80, .9); }
body[theme-mode="dark"] .kefu-sticker-badge { background: rgba(0, 0, 0, .72); }
/* —— 用户端消息提醒铃铛（kefu-user-notice） —— */
.kefu-user-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-left: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  color: #4e5969;
  flex: none;
}
.kefu-user-bell:hover { background: rgba(0, 0, 0, .05); color: #1d2129; }
.kefu-user-bell svg { width: 18px; height: 18px; display: block; }
.kefu-user-bell-badge {
  position: absolute;
  top: -3px;
  right: -5px;
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  border-radius: 8px;
  background: #f53f3f;
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  line-height: 15px;
  text-align: center;
  box-sizing: border-box;
  box-shadow: 0 0 0 2px #fff;
}

/* 面板挂在会话侧栏内，跟着侧栏定位 */
.kefu-sysmsg {
  position: absolute;
  top: 46px;
  left: 8px;
  right: 8px;
  max-width: 360px;
  max-height: 60vh;
  background: #fff;
  border: 1px solid #e5e6eb;
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .12);
  z-index: 1200;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
/* 必须能盖住上面的 display:flex，否则面板收不回去 */
.kefu-sysmsg[hidden] { display: none !important; }

.kefu-sysmsg-head {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 8px 0 6px;
  border-bottom: 1px solid #f2f3f5;
  flex: none;
}
.kefu-sysmsg-back {
  height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #4e5969;
  font-size: 13px;
  cursor: pointer;
}
.kefu-sysmsg-back:hover { background: #f2f3f5; color: #1d2129; }
.kefu-sysmsg-title {
  flex: 1;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: #1d2129;
}
.kefu-sysmsg-clear {
  height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #86909c;
  font-size: 12px;
  cursor: pointer;
}
.kefu-sysmsg-clear:hover,
.kefu-sysmsg-clear[data-confirm="1"] { background: #fff1f0; color: #f53f3f; }
.kefu-sysmsg-clear[hidden] { display: none !important; }

.kefu-sysmsg-list { overflow-y: auto; }
.kefu-sysmsg-card {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid #f7f8fa;
}
.kefu-sysmsg-card:last-child { border-bottom: 0; }
.kefu-sysmsg-icon {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f2f3f5;
  color: #86909c;
  display: flex;
  align-items: center;
  justify-content: center;
}
.kefu-sysmsg-card.unread .kefu-sysmsg-icon { background: #e8f3ff; color: #2d8cf0; }
.kefu-sysmsg-body { flex: 1; min-width: 0; }
.kefu-sysmsg-row { display: flex; align-items: flex-start; gap: 8px; }
.kefu-sysmsg-name { flex: 1; min-width: 0; font-size: 13px; line-height: 20px; color: #1d2129; }
.kefu-sysmsg-card.unread .kefu-sysmsg-name { font-weight: 600; }
.kefu-sysmsg-card.unread .kefu-sysmsg-name::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 5px;
  border-radius: 50%;
  background: #f53f3f;
  vertical-align: middle;
}
.kefu-sysmsg-del {
  flex: none;
  height: 22px;
  padding: 0 8px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #c9cdd4;
  font-size: 12px;
  cursor: pointer;
  opacity: 0;
  transition: opacity .15s;
}
.kefu-sysmsg-card:hover .kefu-sysmsg-del { opacity: 1; }
.kefu-sysmsg-del:hover,
.kefu-sysmsg-del[data-confirm="1"] { background: #fff1f0; color: #f53f3f; opacity: 1; }
.kefu-sysmsg-text {
  margin-top: 3px;
  font-size: 12px;
  line-height: 18px;
  color: #86909c;
  word-break: break-all;
}
.kefu-sysmsg-meta { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.kefu-sysmsg-tag {
  height: 18px;
  line-height: 18px;
  padding: 0 6px;
  border-radius: 4px;
  background: #f2f3f5;
  color: #86909c;
  font-size: 11px;
}
.kefu-sysmsg-time { font-size: 11px; color: #c9cdd4; }
.kefu-sysmsg-empty { padding: 36px 12px; text-align: center; color: #c9cdd4; font-size: 13px; }
.kefu-sysmsg-empty-icon { color: #e5e6eb; margin-bottom: 8px; }

body[theme-mode="dark"] .kefu-user-bell { color: var(--kf-mute, #8b8f96); }
body[theme-mode="dark"] .kefu-user-bell:hover { background: rgba(255, 255, 255, .08); color: var(--kf-text, #e8e8e8); }
body[theme-mode="dark"] .kefu-user-bell-badge { box-shadow: 0 0 0 2px var(--kf-bg, #1c1d1f); }
body[theme-mode="dark"] .kefu-sysmsg {
  background: var(--kf-lift, #25272b);
  border-color: var(--kf-line, #33363c);
}
body[theme-mode="dark"] .kefu-sysmsg-head { border-color: var(--kf-line, #33363c); }
body[theme-mode="dark"] .kefu-sysmsg-title { color: var(--kf-text, #e8e8e8); }
body[theme-mode="dark"] .kefu-sysmsg-back:hover { background: rgba(255, 255, 255, .08); color: var(--kf-text, #e8e8e8); }
body[theme-mode="dark"] .kefu-sysmsg-card { border-color: var(--kf-line, #33363c); }
body[theme-mode="dark"] .kefu-sysmsg-name { color: var(--kf-text, #e8e8e8); }
body[theme-mode="dark"] .kefu-sysmsg-icon { background: rgba(255, 255, 255, .06); }
body[theme-mode="dark"] .kefu-sysmsg-card.unread .kefu-sysmsg-icon { background: rgba(45, 140, 240, .18); }
body[theme-mode="dark"] .kefu-sysmsg-tag { background: rgba(255, 255, 255, .08); }

/* —— 官方号星标（kefu-vip2） ——
   名字前一颗金色星，带柔和呼吸光，和名字后的 VIP 标签分工明确：星星=身份，标签=等级 */
.kefu-official-star {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  margin-right: 4px;
  transform: translateY(-1px);
  color: #ffb400;
  flex: none;
}
.kefu-official-star svg {
  width: 13px;
  height: 13px;
  display: block;
  filter: drop-shadow(0 0 2px rgba(255, 180, 0, .6));
  animation: kefu-star-glow 2.4s ease-in-out infinite;
}
@keyframes kefu-star-glow {
  0%, 100% { filter: drop-shadow(0 0 2px rgba(255, 180, 0, .5)); }
  50% { filter: drop-shadow(0 0 5px rgba(255, 180, 0, .95)); }
}
@media (prefers-reduced-motion: reduce) {
  .kefu-official-star svg { animation: none; }
}
body[theme-mode="dark"] .kefu-official-star { color: #ffc53d; }
/* —— 官方号消息：金色渐变气泡 + 换字体（kefu-vip2） ——
   普通气泡是黑字白底，官方号要一眼能认出来，所以底色、边框、字形同时改 */
.wk-message-base-bubble[data-kefu-official] {
  background: linear-gradient(135deg, #fff9ec 0%, #ffedd0 100%);
  border: 1px solid #ffd591;
  box-shadow: 0 2px 12px rgba(255, 170, 0, .22);
}
/* 字形也换掉：楷体 + 加粗 + 深金褐，和普通黑体拉开差距 */
.wk-message-base-bubble[data-kefu-official] .wk-message-content {
  color: #e53935 !important;
  font-family: 'STKaiti', 'KaiTi', 'Kaiti SC', '楷体', 'Microsoft YaHei', serif !important;
  font-weight: 700 !important;
  letter-spacing: .3px;
  line-height: 1.65;
}
body[theme-mode="dark"] .wk-message-base-bubble[data-kefu-official] {
  background: linear-gradient(135deg, #3a2f14 0%, #2b2310 100%);
  border-color: #6b5320;
  box-shadow: 0 2px 12px rgba(255, 170, 0, .16);
}
body[theme-mode="dark"] .wk-message-base-bubble[data-kefu-official] .wk-message-content {
  color: #ff7875 !important;
}
/* 官方号名字：默认是灰色小字，这里改成醒目的金褐并加粗 */
[data-kefu-official-name] {
  color: #c87a00 !important;
  font-weight: 700 !important;
}
body[theme-mode="dark"] [data-kefu-official-name] { color: #ffc53d !important; }
/* 客户端没渲染发送者名字时，我们自己补的那一行 */
.kefu-official-name-row {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-bottom: 2px;
  font-size: 12px;
  line-height: 1.5;
  font-weight: 700;
  color: #c87a00;
}
body[theme-mode="dark"] .kefu-official-name-row { color: #ffc53d; }
/* 补的名字行固定左对齐：气泡容器的对齐方式会把它带偏到中间 */
.kefu-official-name-row {
  justify-content: flex-start !important;
  align-self: flex-start !important;
  text-align: left !important;
  width: 100%;
}
/* 公告正文用红色，比金褐色更醒目（覆盖在前面的金色规则之后） */
.wk-message-base-bubble[data-kefu-official] .wk-message-content {
  color: #e53935 !important;
}
body[theme-mode="dark"] .wk-message-base-bubble[data-kefu-official] .wk-message-content {
  color: #ff7875 !important;
}
/* 公告正文红色。类名用 wk-message-text 系列 —— 之前写的 .wk-message-content 根本不存在，
   所以规则一直没命中。用属性包含选择器覆盖全部文本变体，时间戳单独排除。 */
.wk-message-base-bubble[data-kefu-official] [class*="wk-message-text"] {
  color: #e53935 !important;
}
.wk-message-base-bubble[data-kefu-official] .wk-message-time,
.wk-message-base-bubble[data-kefu-official] [class*="wk-message-time"] {
  color: #b8bcc4 !important;
}
body[theme-mode="dark"] .wk-message-base-bubble[data-kefu-official] [class*="wk-message-text"] {
  color: #ff7875 !important;
}
body[theme-mode="dark"] .wk-message-base-bubble[data-kefu-official] .wk-message-time,
body[theme-mode="dark"] .wk-message-base-bubble[data-kefu-official] [class*="wk-message-time"] {
  color: #6b7280 !important;
}