/* =========================================================
   微信风昼夜主题（WeChat-like Day/Night）— 覆盖层
   白天：浅灰底 + 白色气泡 + 微信绿(#95EC69)自己的气泡
         + 青绿管理员徽章 + 绿色发送键
   黑夜：深炭底 + 描边气泡 + 绿色月亮按钮高亮
   加载于 style.css 之后。html[data-theme="dark"] 切黑夜。
   ========================================================= */

:root {
  --wx-bg: #f0f1f4;             /* 全局底色 */
  --wx-surface: #ffffff;        /* 卡片/气泡 */
  --wx-header: #fbfcfd;         /* 头部/输入栏 */
  --wx-text: #1f2329;
  --wx-text-2: #7a818c;         /* 次要文字 */
  --wx-text-3: #9aa0a8;         /* 时间 */
  --wx-green: #07c160;          /* 微信绿（按钮/强调） */
  --wx-green-deep: #06ad56;
  --wx-self-bubble: #95ec69;    /* 自己的气泡 */
  --wx-badge: #3eb8a5;          /* 管理员徽章青绿 */
  --wx-line: rgba(0,0,0,.07);
  --wx-shadow: 0 2px 10px rgba(31,41,55,.07);
  --wx-shadow-lg: 0 10px 34px rgba(31,41,55,.12);
}

/* ---------- 0. 全局背景：纯净浅灰，关闭玻璃动态渐变 ---------- */
body, body.login-page, body.admin-login {
  background: var(--wx-bg) !important;
}
body::before, body::after {
  content: none !important;
  animation: none !important;
  background: none !important;
}

/* ---------- 1. 登录/注册/后台登录（绿色强调） ---------- */
.login-box {
  background: var(--wx-surface) !important;
  border: 1px solid var(--wx-line) !important;
  box-shadow: var(--wx-shadow-lg) !important;
  border-radius: 20px !important;
}
.login-box::before { height: 4px; background: linear-gradient(90deg, #07c160, #3eb8a5) !important; border-radius: 20px 20px 0 0; }
.login-logo-icon {
  background: linear-gradient(135deg, #07c160, #3eb8a5) !important;
  box-shadow: 0 8px 20px rgba(7,193,96,.3) !important;
  color: #fff !important;
}
.login-logo h1 { color: var(--wx-text) !important; }
.login-subtitle { color: var(--wx-text-2) !important; }

.form-input {
  background: #f3f4f6 !important;
  border: 1px solid transparent !important;
  box-shadow: none !important;
  color: var(--wx-text) !important;
  border-radius: 12px !important;
}
.form-input::placeholder { color: #a7adb6 !important; }
.form-input:focus {
  background: #fff !important;
  border-color: rgba(7,193,96,.5) !important;
  box-shadow: 0 0 0 3px rgba(7,193,96,.13) !important;
}
.input-group label { color: var(--wx-text-2) !important; }

.btn-primary {
  background: linear-gradient(135deg, #07c160, #06ad56) !important;
  border: none !important;
  color: #fff !important;
  box-shadow: 0 8px 20px rgba(7,193,96,.32) !important;
  transition: all .18s ease;
}
.btn-primary:hover:not(:disabled) {
  box-shadow: 0 10px 24px rgba(7,193,96,.4) !important;
  transform: translateY(-1px);
}
.btn-primary:active:not(:disabled) { transform: none; filter: brightness(.96); }
.btn-danger {
  background: linear-gradient(135deg, #f5655b, #e5484d) !important;
  box-shadow: 0 8px 18px rgba(229,72,77,.28) !important;
}
.btn { border: none !important; }

/* 找回密码弹窗 */
.rp-overlay { background: rgba(20,28,40,.4) !important; backdrop-filter: blur(4px); }
.rp-card {
  background: var(--wx-surface) !important;
  border: none !important;
  box-shadow: var(--wx-shadow-lg) !important;
  border-radius: 20px !important;
}
.rp-close { background: #f3f4f6; box-shadow: none; color: var(--wx-text-2); }

/* 网络诊断面板（保持深色高对比） */
#diagPanel {
  background: rgba(28,32,40,.94) !important;
  border: none;
  box-shadow: 0 20px 50px rgba(0,0,0,.35) !important;
}

/* ---------- 2. 聊天前端 ---------- */
.chat-app { background: transparent !important; padding: 20px !important; }
.chat-container {
  background: var(--wx-bg) !important;
  border: none !important;
  box-shadow: var(--wx-shadow-lg) !important;
  border-radius: 18px !important;
  overflow: hidden;
}
.chat-header {
  background: var(--wx-header) !important;
  border-bottom: 1px solid var(--wx-line) !important;
  box-shadow: none !important;
}
.header-logo { box-shadow: none !important; border-radius: 12px; }
.user-menu-trigger {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 12px !important;
}
.user-menu-trigger:active { background: rgba(0,0,0,.06) !important; }
.user-menu-dropdown {
  background: var(--wx-surface) !important;
  border: 1px solid var(--wx-line) !important;
  box-shadow: var(--wx-shadow-lg) !important;
  border-radius: 16px !important;
}
.user-menu-dropdown .menu-item:hover { background: rgba(7,193,96,.09); color: var(--wx-green); }

/* 头部工具按钮：白天为素净深灰图标，昼夜切换按钮带浅色底 */
.ch-tool-btn {
  background: transparent !important;
  color: var(--wx-text-2) !important;
  border-radius: 12px !important;
}
.ch-tool-btn:hover { background: rgba(0,0,0,.05) !important; }
.ch-tool-theme {
  background: rgba(0,0,0,.05) !important;
  color: var(--wx-text) !important;
}

.chat-sidebar {
  background: var(--wx-header) !important;
  border-right: 1px solid var(--wx-line) !important;
  box-shadow: none !important;
}
.sidebar-title { color: var(--wx-text-2) !important; }
.sidebar-item { border-radius: 12px; color: var(--wx-text); }
.sidebar-item:hover { background: rgba(0,0,0,.045); transform: none; }
.sidebar-item-active {
  background: rgba(7,193,96,.1) !important;
  color: var(--wx-green) !important;
  box-shadow: none !important;
}
.sidebar-item-active::before { background: var(--wx-green) !important; }
.sidebar-item-cardkey { border: 1px solid var(--wx-line) !important; box-shadow: none !important; }

.chat-main { background: var(--wx-bg) !important; }
.chat-messages { background: transparent !important; }
.chat-input-bar {
  background: var(--wx-header) !important;
  border-top: 1px solid var(--wx-line) !important;
  box-shadow: none !important;
}
.msg-input {
  background: #f3f4f6 !important;
  border: 1px solid transparent !important;
  box-shadow: none !important;
  color: var(--wx-text) !important;
  border-radius: 12px !important;
}
.msg-input::placeholder { color: #a7adb6 !important; }
.msg-input:focus {
  background: #fff !important;
  border-color: rgba(7,193,96,.5) !important;
  box-shadow: 0 0 0 3px rgba(7,193,96,.12) !important;
}
.btn-send {
  background: var(--wx-green) !important;
  color: #fff !important;
  border-radius: 12px !important;
  box-shadow: 0 6px 16px rgba(7,193,96,.35) !important;
}
.btn-send:active { filter: brightness(.94); box-shadow: none !important; }

/* 消息气泡：微信风（无尾巴、圆角、白/绿） */
.message-self .msg-bubble,
.message-other .msg-bubble { border-radius: 18px !important; }
.message-self .msg-bubble::after,
.message-other .msg-bubble::after { display: none !important; }

.message-self .msg-bubble {
  background: var(--wx-self-bubble) !important;
  color: #17301c !important;
  border-bottom-right-radius: 6px !important;
  box-shadow: var(--wx-shadow) !important;
}
.message-other .msg-bubble {
  background: var(--wx-surface) !important;
  color: var(--wx-text) !important;
  border-bottom-left-radius: 6px !important;
  box-shadow: var(--wx-shadow) !important;
}
.message-self .msg-text a { color: #0b6e3c; }

/* 文字清晰度增强：气泡正文更大更通透、发送名/时间更清楚 */
.msg-bubble { font-size: 15px !important; line-height: 1.62 !important; }
.msg-username { font-size: 12px !important; font-weight: 700 !important; color: #5b626c !important; }
.msg-time { font-size: 11px !important; font-weight: 600 !important; }
.date-separator { font-size: 12px !important; font-weight: 600 !important; letter-spacing: .3px; color: var(--wx-text-2) !important; }
.message-system .msg-bubble { font-size: 13px !important; line-height: 1.6 !important; }
.msg-file-size { color: var(--wx-text-2) !important; }
html[data-theme="dark"] .msg-username { color: #cfd5df !important; }
html[data-theme="dark"] .message-system .msg-bubble { color: #9aa1ad !important; }
html[data-theme="dark"] .date-separator { color: #8a91a0 !important; }
html[data-theme="dark"] .msg-time { color: #9aa1ad !important; }


/* 头像：圆角方形（微信风） */
.msg-avatar, .msg-avatar .avatar-placeholder { border-radius: 10px !important; overflow: hidden; }
.msg-avatar { box-shadow: none !important; }
.message-self .msg-avatar .avatar-placeholder { background: linear-gradient(135deg, #14b8a6, #0d9488) !important; }
.message-other .msg-avatar .avatar-placeholder { background: linear-gradient(135deg, #34d399, #14b8a6) !important; }

/* 用户名 / 时间 / 徽章 */
.msg-username { color: var(--wx-text-2) !important; }
.msg-time { color: var(--wx-text-3) !important; }
.role-badge {
  border: none !important;
  box-shadow: none !important;
  border-radius: 6px !important;
  font-weight: 600 !important;
}
.role-badge.rb-admin { background: var(--wx-badge) !important; color: #fff !important; }
.role-badge.rb-owner { background: linear-gradient(135deg, #f59e0b, #f97316) !important; color: #fff !important; }

/* 公告条 */
.message-announcement .msg-bubble {
  background: #e7f8ee !important;
  color: var(--wx-text) !important;
  box-shadow: none !important;
  border-radius: 14px !important;
}
.message-announcement .msg-bubble::after { display: none !important; }
.message-system .msg-bubble { color: var(--wx-text-3) !important; }

/* ---------- 3. 后台管理 ---------- */
.admin-wrapper { background: transparent; }
.admin-header {
  background: var(--wx-surface) !important;
  border: 1px solid var(--wx-line) !important;
  box-shadow: var(--wx-shadow) !important;
  border-radius: 16px !important;
}
.admin-tabs {
  background: var(--wx-surface) !important;
  border: 1px solid var(--wx-line) !important;
  box-shadow: var(--wx-shadow) !important;
  border-radius: 14px !important;
}
.tab-btn {
  border-radius: 10px !important;
  color: var(--wx-text-2) !important;
}
.tab-btn.active {
  background: var(--wx-green) !important;
  color: #fff !important;
  box-shadow: 0 6px 14px rgba(7,193,96,.3) !important;
}
.card {
  background: var(--wx-surface) !important;
  border: 1px solid var(--wx-line) !important;
  box-shadow: var(--wx-shadow) !important;
  border-radius: 16px !important;
}
.card-header { border-bottom: 1px solid var(--wx-line) !important; }
.search-box {
  background: #f3f4f6 !important;
  border: 1px solid transparent !important;
  box-shadow: none !important;
  border-radius: 12px !important;
}
.search-box:focus-within {
  background: #fff !important;
  border-color: rgba(7,193,96,.45) !important;
  box-shadow: 0 0 0 3px rgba(7,193,96,.12) !important;
}
.card-token { background: #f8f9fb !important; box-shadow: none; border: 1px solid var(--wx-line); border-radius: 12px; }

/* 表格 */
th {
  background: transparent !important;
  border-bottom: 1px solid var(--wx-line) !important;
  color: var(--wx-text-2) !important;
}
td { border-bottom: 1px solid rgba(0,0,0,.05) !important; }
tbody tr:hover td { background: rgba(7,193,96,.05); }
@media (max-width: 767px) {
  .card-body.p-0 table tr {
    background: #f8f9fb !important;
    border: 1px solid var(--wx-line) !important;
    box-shadow: none !important;
    border-radius: 12px !important;
  }
}

/* ---------- 3b. 后台仪表盘细节补全（覆盖内联渐变，统一微信风） ---------- */
/* 顶部盾牌 logo → 微信绿 */
.admin-header .ah-left > div { background: linear-gradient(135deg, #07c160, #3eb8a5) !important; }
/* 统计卡片：去内联渐变，改为白底 + 左侧彩色条 + 深色文字 */
#statCards > div {
  background: var(--wx-surface) !important;
  border: 1px solid var(--wx-line) !important;
  box-shadow: var(--wx-shadow) !important;
  border-radius: 14px !important;
  padding: 14px 16px !important;
  color: var(--wx-text) !important;
  position: relative; overflow: hidden;
}
#statCards > div > div:first-child { font-size: 12px !important; opacity: .85; color: var(--wx-text-2) !important; }
#statCards > div > div:last-child { font-size: 24px !important; font-weight: 800 !important; margin-top: 2px; color: var(--wx-text) !important; }
#statCards > div::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: linear-gradient(180deg, #07c160, #3eb8a5); }
/* 小按钮：微信风 */
.btn-sm.btn-default { background: #f3f4f6 !important; color: var(--wx-text) !important; border: none !important; box-shadow: none !important; }
.btn-sm.btn-default:hover { background: #e9edf2 !important; }
.btn-sm.btn-danger { background: linear-gradient(135deg, #f5655b, #e5484d) !important; color: #fff !important; border: none !important; box-shadow: 0 4px 12px rgba(229,72,77,.25) !important; }
.btn-sm.btn-primary { background: linear-gradient(135deg, #07c160, #06ad56) !important; border: none !important; }
.btn-sm.btn-outline { background: transparent !important; color: var(--wx-green) !important; border: 1px solid rgba(7,193,96,.4) !important; box-shadow: none !important; }
/* 设置行 */
.setting-row label { color: var(--wx-text-2) !important; }
.set-input .set-unit { color: var(--wx-text-3) !important; }
.setting-desc { color: var(--wx-text-2) !important; }
.bg-preview { border: 1px solid var(--wx-line) !important; box-shadow: none !important; }
.status-normal { color: #07c160 !important; }
.status-banned { color: #e5484d !important; }
code { color: var(--wx-text) !important; }
/* 后台昼夜切换按钮 */
.admin-night-btn { width: 34px; height: 34px; border-radius: 10px; border: none; cursor: pointer; background: transparent !important; color: var(--wx-text-2); display: flex; align-items: center; justify-content: center; transition: background .15s; }
.admin-night-btn:hover { background: rgba(0,0,0,.06) !important; }
/* 开关（启用 QQ） */
.switch-wrap { position: relative; display: inline-flex; align-items: center; cursor: pointer; }
.switch-wrap input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-track { width: 42px; height: 24px; border-radius: 20px; background: #d4d9e0; transition: background .2s; display: inline-block; position: relative; }
.switch-track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.switch-wrap input:checked + .switch-track { background: var(--wx-green); }
.switch-wrap input:checked + .switch-track::after { transform: translateX(18px); }
/* QQ 配置卡片内按钮（限宽场景） */
.tab-content .qq-login-btn { padding: 10px 14px; font-size: 14px; }

/* 弹窗 / 提示 */
.modal-overlay { backdrop-filter: blur(3px) !important; background: rgba(20,28,40,.4) !important; }
.modal {
  background: var(--wx-surface) !important;
  border: none !important;
  box-shadow: var(--wx-shadow-lg) !important;
  border-radius: 18px !important;
}
.modal-header {
  background: transparent !important;
  border-bottom: 1px solid var(--wx-line) !important;
}
.toast {
  background: rgba(28,32,40,.94) !important;
  border: none;
  box-shadow: 0 14px 36px rgba(0,0,0,.3) !important;
}

/* 通用小元素 */
.badge, .tag { box-shadow: none; border: none !important; }
input, select, textarea { color: var(--wx-text); }

/* 移动端：全屏贴边（微信观感） */
@media (max-width: 480px) {
  .chat-app { padding: 0 !important; }
  .chat-container { border-radius: 0 !important; box-shadow: none !important; }
}

/* =========================================================
   4. 黑夜模式（html[data-theme="dark"]）
   深炭底 + 描边气泡 + 绿色月亮按钮高亮
   ========================================================= */
html[data-theme="dark"] {
  --wx-bg: #181b21;
  --wx-surface: #262b34;
  --wx-header: #1b1e25;
  --wx-text: #f1f3f7;
  --wx-text-2: #aab1bd;
  --wx-text-3: #8a91a0;
  --wx-green: #07c160;
  --wx-self-bubble: #262b34;
  --wx-line: rgba(255,255,255,.08);
  --wx-shadow: 0 2px 10px rgba(0,0,0,.35);
  --wx-shadow-lg: 0 10px 34px rgba(0,0,0,.5);
}

/* 文字与底色 */
html[data-theme="dark"] body { background: var(--wx-bg) !important; color: var(--wx-text) !important; }
html[data-theme="dark"] body.login-page, html[data-theme="dark"] body.admin-login { background: var(--wx-bg) !important; }
html[data-theme="dark"] .login-logo h1,
html[data-theme="dark"] .form-input,
html[data-theme="dark"] .msg-input,
html[data-theme="dark"] input, html[data-theme="dark"] select, html[data-theme="dark"] textarea { color: var(--wx-text) !important; }
html[data-theme="dark"] .login-subtitle,
html[data-theme="dark"] .input-group label,
html[data-theme="dark"] .form-input::placeholder,
html[data-theme="dark"] .msg-input::placeholder { color: var(--wx-text-2) !important; }

/* 登录/注册卡片：暗色 */
html[data-theme="dark"] .login-box, html[data-theme="dark"] .rp-card {
  background: #1f232b !important;
  border-color: var(--wx-line) !important;
}
html[data-theme="dark"] .form-input, html[data-theme="dark"] .msg-input {
  background: #14171d !important;
  border-color: rgba(255,255,255,.09) !important;
}
html[data-theme="dark"] .form-input:focus, html[data-theme="dark"] .msg-input:focus {
  background: #14171d !important;
  border-color: rgba(7,193,96,.55) !important;
}

/* 聊天容器 / 头部 / 侧栏 */
html[data-theme="dark"] .chat-container {
  background: var(--wx-bg) !important;
}
html[data-theme="dark"] .chat-header {
  background: var(--wx-header) !important;
  border-bottom-color: var(--wx-line) !important;
}
html[data-theme="dark"] .user-menu-dropdown { background: #22262e !important; }
html[data-theme="dark"] .user-menu-trigger:active { background: rgba(255,255,255,.08) !important; }

/* 月亮按钮：绿色高亮（对应截图夜间头部） */
html[data-theme="dark"] .ch-tool-btn { color: var(--wx-text-2) !important; }
html[data-theme="dark"] .ch-tool-btn:hover { background: rgba(255,255,255,.07) !important; }
html[data-theme="dark"] .ch-tool-theme {
  background: rgba(7,193,96,.16) !important;
  color: #3ddc84 !important;
  box-shadow: 0 0 0 1px rgba(7,193,96,.25) inset;
}

html[data-theme="dark"] .chat-sidebar {
  background: var(--wx-header) !important;
  border-right-color: var(--wx-line) !important;
}
html[data-theme="dark"] .sidebar-item { color: #b7bdc9; }
html[data-theme="dark"] .sidebar-item:hover { background: rgba(255,255,255,.06); }
html[data-theme="dark"] .sidebar-item-active { background: rgba(7,193,96,.14) !important; }
html[data-theme="dark"] .chat-main { background: var(--wx-bg) !important; }
html[data-theme="dark"] .chat-input-bar {
  background: var(--wx-header) !important;
  border-top-color: var(--wx-line) !important;
}
html[data-theme="dark"] .msg-input {
  background: #14171d !important;
  border-color: rgba(255,255,255,.09) !important;
}

/* 气泡：双暗色描边（对应截图黑夜模式） */
html[data-theme="dark"] .message-other .msg-bubble {
  background: var(--wx-surface) !important;
  color: var(--wx-text) !important;
  border: 1px solid rgba(255,255,255,.13);
  box-shadow: none !important;
}
html[data-theme="dark"] .message-self .msg-bubble {
  background: var(--wx-self-bubble) !important;
  color: #e8ebf0 !important;
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: none !important;
}
html[data-theme="dark"] .message-self .msg-text a { color: #3ddc84; }
html[data-theme="dark"] .msg-time,
html[data-theme="dark"] .msg-username { color: var(--wx-text-2) !important; }

/* 公告条 */
html[data-theme="dark"] .message-announcement .msg-bubble {
  background: #20242d !important;
  color: #c9ced8 !important;
}
html[data-theme="dark"] .message-announcement .msg-bubble .announce-label,
html[data-theme="dark"] .message-announcement .msg-bubble strong { color: #3ddc84 !important; }

/* 后台管理 */
html[data-theme="dark"] .admin-header, html[data-theme="dark"] .card, html[data-theme="dark"] .modal {
  background: #1f232b !important;
  border-color: var(--wx-line) !important;
}
html[data-theme="dark"] .admin-tabs { background: #1f232b !important; }
html[data-theme="dark"] .tab-btn { color: var(--wx-text-2) !important; }
html[data-theme="dark"] th { color: var(--wx-text-2) !important; }
html[data-theme="dark"] td { border-bottom-color: rgba(255,255,255,.06) !important; color: #c8cdd8; }
html[data-theme="dark"] .search-box { background: #14171d !important; border-color: rgba(255,255,255,.09) !important; }
html[data-theme="dark"] .card-token { background: #22262e !important; border-color: var(--wx-line); }

/* 后台仪表盘细节：深色补全 */
html[data-theme="dark"] .admin-header .ah-left > div { background: linear-gradient(135deg, #07c160, #3eb8a5) !important; }
html[data-theme="dark"] #statCards > div { background: #1f232b !important; border-color: var(--wx-line) !important; color: #e8ebf0 !important; }
html[data-theme="dark"] #statCards > div > div:first-child { color: var(--wx-text-2) !important; }
html[data-theme="dark"] #statCards > div > div:last-child { color: #e8ebf0 !important; }
html[data-theme="dark"] .btn-sm.btn-default { background: #2a303b !important; color: #d5dae2 !important; }
html[data-theme="dark"] .btn-sm.btn-default:hover { background: #333a46 !important; }
html[data-theme="dark"] .admin-night-btn { color: var(--wx-text-2) !important; }
html[data-theme="dark"] .admin-night-btn:hover { background: rgba(255,255,255,.07) !important; }
html[data-theme="dark"] .switch-track { background: #3a404b; }
html[data-theme="dark"] code { background: #22262e !important; color: #c8cdd8 !important; }
html[data-theme="dark"] .setting-row label, html[data-theme="dark"] .setting-desc { color: var(--wx-text-2) !important; }
html[data-theme="dark"] .bg-preview { border-color: var(--wx-line) !important; }

/* 7天免登录勾选 */
.remember-row {
  display: flex; align-items: center; gap: 8px;
  margin: 2px 0 14px; font-size: 13px; color: var(--wx-text-2);
  cursor: pointer; user-select: none;
}
.remember-row input[type="checkbox"] {
  appearance: none; -webkit-appearance: none;
  width: 17px; height: 17px; border-radius: 5px;
  background: #f3f4f6; border: 1px solid #d4d9e0;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all .15s; flex-shrink: 0; margin: 0;
}
.remember-row input[type="checkbox"]:checked {
  background: var(--wx-green); border-color: var(--wx-green);
}
.remember-row input[type="checkbox"]:checked::after {
  content: ''; width: 9px; height: 5px;
  border-left: 2px solid #fff; border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translateY(-1px);
}
html[data-theme="dark"] .remember-row input[type="checkbox"] {
  background: #14171d; border-color: rgba(255,255,255,.18);
}

/* =========================================================
   5. 黑夜模式全量补全：覆盖所有写死浅色的元素
   ========================================================= */

/* --- 侧边栏底部菜单（余额/会员中心/充值/设置） --- */
html[data-theme="dark"] .sidebar-footer {
  background: var(--wx-header) !important;
  border-top: 1px solid var(--wx-line) !important;
}
html[data-theme="dark"] .sidebar-footer .sidebar-item { color: #c3c9d4 !important; }
html[data-theme="dark"] .si-icon { color: #8b919c !important; }
html[data-theme="dark"] .si-badge {
  background: rgba(245,158,11,.15) !important;
  color: #fbbf24 !important;
  border-color: rgba(245,158,11,.35) !important;
}

/* --- 侧边栏内部：徽章 / 计数 / 在线条 / 我的名片 --- */
html[data-theme="dark"] .sb-entry-badge {
  background: rgba(7,193,96,.18) !important;
  color: #3ddc84 !important;
}
html[data-theme="dark"] .sb-sec-count {
  background: rgba(255,255,255,.1) !important;
  color: #9aa1ad !important;
}
html[data-theme="dark"] .sb-online-bar { background: rgba(255,255,255,.06) !important; color: #8b919c !important; }
html[data-theme="dark"] .sb-online-bar b { color: #3ddc84 !important; }
html[data-theme="dark"] .sb-me-card {
  background: linear-gradient(135deg, rgba(7,193,96,.12), rgba(255,255,255,.04)) !important;
  border-color: rgba(7,193,96,.25) !important;
}
html[data-theme="dark"] .sb-me-name { color: #e8ebf0 !important; }
html[data-theme="dark"] .sb-me-status { color: #8b919c !important; }
html[data-theme="dark"] .sb-chan-entry:hover { background: rgba(255,255,255,.06) !important; }
html[data-theme="dark"] .sb-chan-entry.sb-entry-active { background: rgba(7,193,96,.14) !important; }
html[data-theme="dark"] .sb-chan-name { color: #d5dae2 !important; }
html[data-theme="dark"] .sb-chan-desc { color: #7d8490 !important; }
html[data-theme="dark"] .sb-section-title { color: #767d89 !important; }
html[data-theme="dark"] .sb-empty { color: #767d89 !important; }
html[data-theme="dark"] .sb-friend-name { color: #c3c9d4 !important; }
html[data-theme="dark"] .sb-friend-uid { color: #6b7280 !important; }
html[data-theme="dark"] .sb-friend-entry:hover { background: rgba(255,255,255,.06) !important; }
html[data-theme="dark"] .fr-dot { background: #4b5563 !important; }
html[data-theme="dark"] .sidebar-inner::-webkit-scrollbar-thumb { background: #333a46 !important; }
html[data-theme="dark"] ::-webkit-scrollbar-thumb { background: #333a46 !important; }

/* --- 频道头部（公共聊天室那一条） --- */
html[data-theme="dark"] .chat-channel-header {
  background: var(--wx-header) !important;
  border-bottom: 1px solid var(--wx-line) !important;
}
html[data-theme="dark"] .chat-channel-header::before { background: linear-gradient(180deg, #07c160, #3eb8a5) !important; }
html[data-theme="dark"] .channel-header-icon { color: #3ddc84 !important; }
html[data-theme="dark"] .chat-channel-header { color: #d5dae2 !important; }
html[data-theme="dark"] .channel-sub { color: #8b919c !important; }

/* --- 叮一下 / 举报 / 全体禁言按钮 --- */
html[data-theme="dark"] .ding-btn {
  background: rgba(245,158,11,.14) !important;
  color: #fbbf24 !important;
  border-color: rgba(245,158,11,.35) !important;
}
html[data-theme="dark"] .ding-btn:hover { background: rgba(245,158,11,.22) !important; }
html[data-theme="dark"] .ding-btn.ding-danger {
  background: rgba(239,68,68,.14) !important;
  color: #f87171 !important;
  border-color: rgba(239,68,68,.35) !important;
}
html[data-theme="dark"] .ding-btn.ding-danger:hover { background: rgba(239,68,68,.22) !important; }
html[data-theme="dark"] .btn-outline { color: #3ddc84 !important; }
html[data-theme="dark"] .btn-outline:hover { background: rgba(255,255,255,.06) !important; box-shadow: none !important; }
html[data-theme="dark"] .btn-default { background: #2a303b !important; color: #d5dae2 !important; box-shadow: none !important; }

/* --- 公告 / 绑定邮箱 / 禁言横幅（内联浅色 → 深色） --- */
html[data-theme="dark"] #announceBar {
  background: rgba(7,193,96,.1) !important;
  border-bottom: 1px solid rgba(7,193,96,.25) !important;
  color: #3ddc84 !important;
}
html[data-theme="dark"] #bindEmailBanner {
  background: rgba(245,158,11,.1) !important;
  border-bottom: 1px solid rgba(245,158,11,.28) !important;
  color: #fbbf24 !important;
}
html[data-theme="dark"] #groupMuteBanner {
  background: rgba(239,68,68,.12) !important;
  border-bottom: 1px solid rgba(239,68,68,.3) !important;
  color: #f87171 !important;
}

/* --- 回复条 / 表情面板 / @面板 / 用户列表面板 --- */
html[data-theme="dark"] .reply-bar {
  background: rgba(7,193,96,.1) !important;
  border-top: 1px solid rgba(7,193,96,.22) !important;
}
html[data-theme="dark"] .reply-bar-title { color: #3ddc84 !important; }
html[data-theme="dark"] .reply-bar-content { color: #8b919c !important; }
html[data-theme="dark"] .reply-bar-close { color: #8b919c !important; }
html[data-theme="dark"] .emoji-panel, html[data-theme="dark"] .mention-panel {
  background: #22262e !important;
  border: 1px solid var(--wx-line) !important;
  box-shadow: 0 14px 40px rgba(0,0,0,.5) !important;
}
html[data-theme="dark"] .emoji-item:hover, html[data-theme="dark"] .user-list-item:hover { background: rgba(7,193,96,.14) !important; transform: none !important; }
html[data-theme="dark"] .user-list-item { color: #c3c9d4 !important; }
html[data-theme="dark"] .user-list-dot.offline { background: #4b5563 !important; box-shadow: none !important; }
html[data-theme="dark"] .voice-recording span { color: #8b919c !important; }

/* --- 浅色卡片弹窗（私聊/搜索/举报/群管理等 shm-card） --- */
html[data-theme="dark"] .shm-card {
  background: #1f232b !important;
  border: 1px solid var(--wx-line) !important;
  box-shadow: 0 24px 60px rgba(0,0,0,.55) !important;
}
html[data-theme="dark"] .shm-title, html[data-theme="dark"] .shm-radio { color: #e8ebf0 !important; }
html[data-theme="dark"] .shm-sub, html[data-theme="dark"] .shm-empty,
html[data-theme="dark"] .rep-field-label, html[data-theme="dark"] .rep-uploader-text,
html[data-theme="dark"] .rep-uploader-tip { color: #8b919c !important; }
html[data-theme="dark"] .shm-input {
  background: #14171d !important;
  border-color: rgba(255,255,255,.09) !important;
  color: #e8ebf0 !important;
}
html[data-theme="dark"] .shm-results { border-top-color: var(--wx-line) !important; }
html[data-theme="dark"] .shm-close {
  background: #2a303b !important;
  border-color: var(--wx-line) !important;
  color: #c3c9d4 !important;
}
html[data-theme="dark"] .rep-uploader { background: rgba(255,255,255,.04) !important; border: 1px dashed rgba(255,255,255,.18) !important; }
html[data-theme="dark"] .modal-close { color: #8b919c !important; }
html[data-theme="dark"] .ch-more-menu {
  background: #22262e !important;
  border: 1px solid var(--wx-line) !important;
  box-shadow: 0 14px 40px rgba(0,0,0,.5) !important;
}
html[data-theme="dark"] .ch-more-item { color: #d5dae2 !important; }
html[data-theme="dark"] .ch-more-item:hover { background: rgba(255,255,255,.07) !important; }

/* --- 上传预览面板 --- */
html[data-theme="dark"] .upload-preview {
  background: #1f232b !important;
  border-top: 1px solid var(--wx-line) !important;
  box-shadow: 0 -14px 40px rgba(0,0,0,.5) !important;
}
html[data-theme="dark"] .upload-preview-header span { color: #e8ebf0 !important; }
html[data-theme="dark"] .upload-progress-text { color: #8b919c !important; }

/* --- 头部昵称 / 版本号 --- */
html[data-theme="dark"] .header-nickname { color: #d5dae2 !important; }
html[data-theme="dark"] .brand-ver { color: #6b7280 !important; }
html[data-theme="dark"] .menu-arrow { color: #8b919c !important; }
html[data-theme="dark"] .um-item { color: #d5dae2 !important; }
html[data-theme="dark"] .um-item:hover { background: rgba(255,255,255,.07) !important; }
html[data-theme="dark"] .um-item-danger { color: #f87171 !important; }
html[data-theme="dark"] .um-divider { background: var(--wx-line) !important; }
