:root {
  --sidebar: #1d2b3a;
  --sidebar-2: #15202b;
  --sidebar-hover: #243445;
  --sidebar-active: #1890ff;
  --primary: #1890ff;
  --primary-2: #40a9ff;
  --primary-dark: #096dd9;
  --success: #52c41a;
  --warning: #faad14;
  --danger: #ff4d4f;
  --text: #1f2d3d;
  --text-2: #606266;
  --text-3: #909399;
  --border: #e4e7ed;
  --bg: #f5f7fa;
  --card: #fff;
  --shadow: 0 2px 12px rgba(0, 0, 0, .08);
  --radius: 6px;
  --header-h: 50px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  font-size: 13px;
}
button, input, select, textarea { font-family: inherit; font-size: 13px; }
a { color: var(--primary); text-decoration: none; cursor: pointer; }
img { max-width: 100%; }
.hidden { display: none !important; }

/* ========== Login ========== */
.login-page {
  min-height: 100vh;
  background: #eaf3fb;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-orb {
  position: absolute;
  border-radius: 50%;
  opacity: .9;
}
.login-orb.earth {
  width: 280px; height: 280px; left: -40px; bottom: -60px;
  background: radial-gradient(circle at 35% 35%, #8aa0b8, #3d4d5c 55%, #2b3844);
  box-shadow: inset -20px -10px 40px rgba(0,0,0,.25);
}
.login-orb.moon {
  width: 88px; height: 88px; right: 36px; top: 28px;
  background: radial-gradient(circle at 30% 30%, #9aa8b6, #4c5864);
}
.login-card {
  width: 860px;
  max-width: calc(100vw - 40px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 16px 50px rgba(31, 86, 140, .12);
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  overflow: hidden;
  position: relative;
  z-index: 1;
}
.login-art {
  background: linear-gradient(180deg, #f4f9ff, #eef6ff);
  display: flex; align-items: center; justify-content: center;
  padding: 28px;
}
.login-art svg.wa-mark { width: 220px; height: 220px; }
.login-form { padding: 48px 40px 36px; }
.login-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; font-size: 18px; font-weight: 700; color: #1b3a63; }
.login-brand .logo {
  width: 28px; height: 28px; border-radius: 8px;
  background: linear-gradient(135deg, #1890ff, #36cfc9);
  display: grid; place-items: center; color: #fff; font-size: 14px;
}
.login-field { margin-bottom: 14px; }
.login-field input {
  width: 100%; height: 40px; border: 1px solid #d9d9d9; border-radius: 4px;
  padding: 0 12px; outline: none; background: #fff;
}
.login-field input:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(24,144,255,.15); }
.captcha-row { display: grid; grid-template-columns: 1fr 118px; gap: 10px; }
.captcha-box { height: 40px; border: 1px solid #d9d9d9; border-radius: 4px; cursor: pointer; background: #fafafa; }
.login-extra { display: flex; align-items: center; justify-content: space-between; margin: 8px 0 16px; color: var(--text-2); }
.login-extra label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.login-btn {
  width: 100%; height: 40px; border: 0; border-radius: 4px; color: #fff; font-weight: 600;
  background: var(--primary); cursor: pointer;
}
.login-btn:hover { background: var(--primary-2); }
.login-hint { margin-top: 14px; color: var(--text-3); line-height: 1.6; font-size: 12px; }
.login-hint b { color: var(--text-2); font-weight: 600; }
.lang-select {
  height: 28px; border: 1px solid var(--border); border-radius: 4px; background: #fff;
  color: var(--text-2); padding: 0 8px; font-size: 12px; cursor: pointer;
}
.login-lang {
  position: absolute; right: 16px; top: 12px;
}
.login-brand .logo .ico { color: #fff; }

/* ========== App shell ========== */
.app { display: none; height: 100vh; }
.app.show { display: flex; }
.sidebar {
  width: 220px; background: var(--sidebar); color: #c5d0da; display: flex; flex-direction: column; flex-shrink: 0;
}
.sidebar-logo {
  height: var(--header-h); display: flex; align-items: center; gap: 8px; padding: 0 16px;
  background: var(--sidebar-2); color: #fff; font-weight: 700; font-size: 14px;
  text-decoration: none; cursor: pointer;
}
.nav-item, .nav-group-title {
  display: flex; align-items: center; gap: 8px; padding: 9px 18px; cursor: pointer; user-select: none;
  text-decoration: none; color: inherit;
}
.sidebar-logo .mark {
  width: 22px; height: 22px; border-radius: 6px; background: var(--primary);
  display: grid; place-items: center; color: #fff;
}
.nav { overflow: auto; padding: 8px 0 16px; flex: 1; }
.nav::-webkit-scrollbar { width: 6px; }
.nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 6px; }
.nav-item:hover, .nav-group-title:hover { background: var(--sidebar-hover); color: #fff; }
.nav-item.active { background: var(--sidebar-active); color: #fff; }
.nav-group-title { justify-content: space-between; color: #9eb0c0; }
.nav-group-title span { display: flex; align-items: center; gap: 8px; }
.nav-children { display: none; background: rgba(0,0,0,.12); }
.nav-group.open .nav-children { display: block; }
.nav-children .nav-item { padding-left: 42px; font-size: 12px; }
.nav-ico { width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; opacity: .95; }
.nav-ico .ico { width: 16px; height: 16px; vertical-align: 0; }
.nav-caret { display: inline-flex; align-items: center; opacity: .7; }
.nav-caret .ico { width: 12px; height: 12px; }
.nav-group.open .nav-caret { transform: rotate(-180deg); }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: var(--header-h); background: #fff; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: flex-start; padding: 0 16px; flex-shrink: 0;
}
.top-links { display: flex; align-items: center; gap: 18px; color: var(--text-2); }
.top-links a { color: var(--text-2); }
.top-links a:hover, .top-links a.active { color: var(--primary); }
.top-right { display: flex; align-items: center; gap: 16px; color: var(--text-3); font-size: 12px; margin-left: auto; }
.log-export { position: relative; }
.log-export > button {
  height: 28px; border: 1px solid var(--border); border-radius: 4px; background: #fff;
  color: var(--text-2); padding: 0 8px; font-size: 12px; cursor: pointer;
}
.user-chip { display: flex; align-items: center; gap: 8px; cursor: pointer; color: var(--text); position: relative; }
.deleted-acc-page .user-chip { display: none; }
.avatar {
  width: 28px; height: 28px; border-radius: 50%; background: #91d5ff; color: #003a8c;
  display: grid; place-items: center; font-weight: 700; overflow: hidden; flex-shrink: 0;
}
.avatar.sm { width: 22px; height: 22px; font-size: 11px; }
.avatar.lg { width: 36px; height: 36px; }
.avatar.group { color: #fff; }
.avatar img, .item_header img, .cs-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dropdown {
  position: absolute; right: 0; top: 36px; background: #fff; border: 1px solid var(--border);
  border-radius: 6px; box-shadow: var(--shadow); min-width: 140px; display: none; z-index: 20;
}
.dropdown.show { display: block; }
.dropdown div { padding: 8px 12px; cursor: pointer; }
.dropdown div:hover { background: #f5f7fa; }

.work { flex: 1; overflow: hidden; display: flex; flex-direction: column; }
.tabs {
  height: 34px; background: #fff; display: flex; align-items: center; padding: 0; gap: 0; flex-shrink: 0;
  box-shadow: 0 1px 3px 0 rgba(0,0,0,.12), 0 0 3px 0 rgba(0,0,0,.04);
  overflow-x: auto; overflow-y: hidden; scrollbar-width: thin;
}
.tabs::-webkit-scrollbar { height: 3px; }
.tabs::-webkit-scrollbar-thumb { background: #d8dce5; border-radius: 3px; }
.tab {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; line-height: 24px; padding: 0 8px; margin: 4px 0 0 15px;
  font-size: 12px; color: #495060; background: #fff; border: 1px solid #d8dce5; border-radius: 0; cursor: pointer;
  text-decoration: none; flex: 0 0 auto; white-space: nowrap;
}
.tab.active { background: #409eff; border-color: #409eff; color: #fff; font-weight: 400; }
.tab-x {
  border: 0; background: transparent; color: inherit; width: 16px; height: 16px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center; border-radius: 2px; cursor: pointer; opacity: .7;
}
.tab-x:hover { opacity: 1; background: rgba(0,0,0,.08); }
.tab.active .tab-x:hover { background: rgba(255,255,255,.22); }
.tab-x .ico { width: 12px; height: 12px; }
.ico { display: inline-block; vertical-align: -3px; flex-shrink: 0; }
.crumb { padding: 8px 16px 0; color: var(--text-3); font-size: 12px; }
.page { flex: 1; overflow: auto; padding: 12px 16px 20px; }
.page.no-pad { padding: 0; overflow: hidden; }

/* ========== Common widgets ========== */
.card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.toolbar .ml { margin-left: auto; }
.input, .select, .textarea {
  height: 32px; border: 1px solid #dcdfe6; border-radius: 4px; padding: 0 10px; outline: none; background: #fff; color: var(--text);
}
.textarea { height: auto; padding: 8px 10px; min-height: 72px; resize: vertical; width: 100%; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); }
.input.w160 { width: 160px; } .input.w200 { width: 200px; } .input.w240 { width: 240px; } .input.w100 { width: 100px; }
.select.w140 { width: 140px; } .select.w180 { width: 180px; }
.btn { 
  height: 32px; border: 1px solid #dcdfe6; background: #fff; border-radius: 4px; padding: 0 12px;
  cursor: pointer; color: var(--text); display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
}
.btn .ico { width: 14px; height: 14px; color: inherit; }
.btn:hover { color: var(--primary); border-color: #40a9ff; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-2); color: #fff; }
.btn.danger { background: #fff1f0; border-color: #ffa39e; color: #cf1322; }
.btn.ghost { background: transparent; }
.btn.sm { height: 26px; padding: 0 8px; font-size: 12px; }
.btn.link { border: 0; background: transparent; color: var(--primary); height: auto; padding: 0 4px; }
.btn.link[disabled] { color: #8c8c8c; }
.btn.warn { background: #fff7e6; border-color: #ffd591; color: #d46b08; }
.btn.success { background: #f6ffed; border-color: #b7eb8f; color: #389e0d; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.table-wrap { overflow: auto; border: 1px solid var(--border); border-radius: 4px; background: #fff; }
table.data { width: 100%; border-collapse: collapse; min-width: 800px; }
table.data th, table.data td { border-bottom: 1px solid var(--border); padding: 10px 12px; text-align: left; white-space: nowrap; }
table.data th { background: #fafafa; color: var(--text-2); font-weight: 600; }
table.data tr:hover td { background: #f5f7fa; }
table.data .ops { display: flex; gap: 8px; }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 10px 0; color: var(--text-3); }
.pager .btn { min-width: 32px; justify-content: center; }
.pager .btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.tag { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; line-height: 18px; white-space: nowrap; }
.tag.green { background: #f6ffed; color: #389e0d; border: 1px solid #b7eb8f; }
.tag.red { background: #fff1f0; color: #cf1322; border: 1px solid #ffa39e; }
.tag.orange { background: #fff7e6; color: #d46b08; border: 1px solid #ffd591; }
.tag.blue { background: #e6f7ff; color: #096dd9; border: 1px solid #91d5ff; }
.tag.gray { background: #f5f5f5; color: #595959; border: 1px solid #d9d9d9; }
.archive-tag { margin-left: 6px; vertical-align: 1px; }

.switch { width: 40px; height: 20px; background: #dcdfe6; border-radius: 10px; position: relative; cursor: pointer; display: inline-block; vertical-align: middle; }
.switch::after { content: ""; width: 16px; height: 16px; background: #fff; border-radius: 50%; position: absolute; top: 2px; left: 2px; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch.on { background: #409eff; }
.switch.on::after { transform: translateX(20px); }

.set-form {
  max-width: 520px; background: #fff; border: 1px solid #ebeef5; border-radius: 4px;
  padding: 22px 24px 8px; box-shadow: 0 2px 12px 0 rgba(0,0,0,.06);
}
.set-form .el-form-item { display: flex; align-items: flex-start; margin-bottom: 18px; }
.set-form .el-form-item > label {
  width: 140px; text-align: right; padding: 8px 12px 0 0; color: #606266; line-height: 20px; flex-shrink: 0; font-size: 14px;
}
.set-form .el-form-item__content { flex: 1; min-width: 0; line-height: 36px; }
.set-form .el-select {
  width: 100%; height: 36px; border: 1px solid #dcdfe6; border-radius: 4px; padding: 0 28px 0 15px;
  outline: none; background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 1024 1024'><path fill='%23c0c4cc' d='M512 714L192 394h640z'/></svg>") no-repeat right 10px center;
  appearance: none; color: #606266; font-size: 14px;
}
.set-form .el-select:focus { border-color: #409eff; }
.set-actions { display: flex; align-items: center; gap: 10px; }
.btn.set-warn { color: #e6a23c; background: #fff; border-color: #f3d19e; }
.btn.set-warn:hover { color: #fff; background: #e6a23c; border-color: #e6a23c; }

.empty {
  min-height: 280px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--text-3); gap: 8px;
}
.empty-box { width: 120px; height: 90px; opacity: .85; }

.stats { display: flex; flex-direction: column; gap: 12px; }
.stat-row { display: grid; grid-template-columns: 92px 1fr; background: #fff; border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
.stat-label { display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 16px; }
.stat-label.blue { background: #1890ff; }
.stat-label.green { background: #52c41a; }
.stat-label.orange { background: #fa8c16; }
.stat-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(88px, 1fr)); }
.stat-body.cols3 { grid-template-columns: repeat(3, 1fr); }
.stat-item { padding: 18px 12px; text-align: center; color: var(--text-2); border-left: 1px solid var(--border); }
.stat-item b { display: block; color: var(--text); margin-top: 6px; font-size: 16px; font-weight: 600; }

.filter-grid { display: grid; grid-template-columns: repeat(4, minmax(180px, 1fr)); gap: 8px 12px; margin-bottom: 10px; background: #fff; border: 1px solid var(--border); padding: 12px; border-radius: 4px; }
.filter-item { display: flex; align-items: center; gap: 8px; }
.filter-item label { width: 72px; color: var(--text-2); flex-shrink: 0; text-align: right; }
.filter-item .input, .filter-item .select { flex: 1; min-width: 0; }
.count-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.count-pills span { background: #fff; border: 1px solid var(--border); border-radius: 4px; padding: 4px 10px; cursor: pointer; }
.count-pills span.active { border-color: var(--primary); color: var(--primary); }
.count-pills .c { color: var(--primary); font-weight: 600; }
.count-pills .g { color: var(--success); } .count-pills .r { color: var(--danger); } .count-pills .o { color: #d46b08; }

.alert { background: #fffbe6; border: 1px solid #ffe58f; color: #ad8b00; padding: 8px 12px; border-radius: 4px; margin-bottom: 12px; }
.alert.info { background: #e6f7ff; border-color: #91d5ff; color: #096dd9; }
.alert.danger { background: #fff1f0; border-color: #ffa39e; color: #cf1322; }

/* ========== Chat ========== */
.chat-layout { display: grid; grid-template-columns: 80px 240px 280px 1fr; height: 100%; background: #fff; }
.chat-layout.agent { grid-template-columns: 80px 270px 280px 1fr; }
.chat-layout.agent.no-acc { grid-template-columns: 80px 280px 1fr; }
.cs-rail, .acc-col, .conv-col { border-right: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; }
.cs-rail { background: #f7f8fa; padding: 10px 8px; gap: 10px; align-items: center; }
.cs-rail .mini { width: 48px; text-align: center; color: var(--text-3); font-size: 11px; }
.icon-col { width: 80px; border-right: 1px solid var(--border); display: flex; flex-direction: column; align-items: stretch; padding: 6px 4px 12px; gap: 2px; color: var(--text-2); background: #fff; }
.icon-col .ic { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; cursor: pointer; }
.icon-col .ic:hover, .icon-col .ic.on { background: #e6f7ff; color: var(--primary); }
.icon-col.labeled { width: 80px; }
.icon-col .bar-list { padding: 8px 2px; }
.icon-col .bar-list .title { color: inherit; font-size: 12px; }
.col-hd { padding: 10px; border-bottom: 1px solid var(--border); }
.search { width: 100%; }
.seg { display: flex; background: #f0f2f5; border-radius: 4px; padding: 2px; margin-top: 8px; }
.seg b, .seg button {
  flex: 1; text-align: center; padding: 4px 0; border-radius: 4px; cursor: pointer; font-weight: 500;
  color: var(--text-2); border: 0; background: transparent; height: auto;
}
.seg b.on, .seg button.on { background: var(--primary); color: #fff; }
.list { overflow: auto; flex: 1; }
.list-item { display: flex; gap: 8px; padding: 10px; cursor: pointer; border-bottom: 1px solid #f0f0f0; }
.list-item:hover { background: #f5f7fa; }
.list-item.pinned { background: #fff7e6; }
.list-item.pinned:hover { background: #ffe7ba; }
.list-item.on, .list-item.pinned.on { background: #e6f4ff; }
table.data tr.pinned td { background: #fff7e6; }
table.data tr.pinned:hover td { background: #ffe7ba; }
.hist-pull { display: none; height: 32px; align-items: center; justify-content: center; color: #909399; font-size: 12px; user-select: none; }
.hist-pull.show { display: flex; }
.msg-tick { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 14px; margin-left: 6px; font-size: 12px; line-height: 14px; letter-spacing: -1px; color: #8c8c8c; vertical-align: -2px; flex: none; }
.msg-tick.pending { color: transparent; }
.msg-tick.pending::before { content: ""; width: 10px; height: 10px; border: 2px solid #d9d9d9; border-top-color: #8c8c8c; border-radius: 50%; animation: hist-spin .7s linear infinite; }
.msg-tick.fail { color: #ff4d4f; font-weight: 700; }
.msg-tick.read { color: #1890ff; }
.asr { margin-top: 4px; color: #667781; font-size: 13px; line-height: 1.4; }
.cs-filter.cs-split { flex-direction: row; align-items: stretch; gap: 0; padding: 0; }
.cs-filter .cs-col { flex: 1; min-width: 0; padding: 10px 8px; display: flex; flex-direction: column; gap: 4px; overflow: auto; }
.cs-filter.cs-split .cs-col + .cs-col { border-left: 1px solid var(--border); }
.list-item .meta { flex: 1; min-width: 0; }
.list-item .t { display: flex; justify-content: space-between; gap: 8px; }
.list-item .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.expired-line { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.expired-line .tag { margin-left: 0; }
.list-item .time { color: var(--text-3); font-size: 12px; }
.list-item .sub { color: var(--text-3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist-btn { display: block; width: fit-content; margin: 4px 0 0; white-space: nowrap; }
.hist-btn.is-loading { color: #909399; cursor: wait; }
.hist-btn.is-loading::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 4px; border: 2px solid #d9d9d9; border-top-color: #1677ff; border-radius: 50%; vertical-align: -2px; animation: hist-spin .7s linear infinite; }
@keyframes hist-spin { to { transform: rotate(360deg); } }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #bbb; display: inline-block; }
.dot.on { background: #52c41a; }
.dot.err { background: #ff4d4f; }

.chat-pane { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #f5f7fa; }
.chat-hd { height: 54px; background: #fff; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 16px; }
.chat-hd .who { font-weight: 600; }
.chat-hd .sub { color: var(--text-3); font-size: 12px; margin-left: 8px; }
.who-block .who { font-weight: 600; line-height: 1.3; }
.who-block .seen { color: #667781; font-size: 12px; margin-top: 2px; }
.day-chip { display: table; margin: 10px auto; background: #e9edef; color: #54656f; font-size: 12px; padding: 4px 10px; border-radius: 8px; }
.msg-time { display: block; text-align: right; font-size: 11px; color: #667781; margin-top: 2px; }
.msg-img img { max-width: 240px; max-height: 320px; border-radius: 8px; display: block; }
.file-card { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 88px; color: inherit; }
.file-card .file-ico { width: 36px; height: 36px; display: grid; place-items: center; }
.file-card .file-ico .ico, .file-card .file-ico svg { width: 32px; height: 32px; }
.file-name { font-size: 12px; max-width: 140px; word-break: break-all; text-align: center; line-height: 1.3; }
.file-card-link { color: inherit; text-decoration: none; }
.chat-body { flex: 1; overflow: auto; padding: 0; overflow-anchor: none; }
.bubble-row { display: flex; margin-bottom: 12px; gap: 8px; }
.bubble-row.me { flex-direction: row-reverse; }
.bubble { max-width: 62%; background: #fff; border-radius: 8px; padding: 8px 10px; box-shadow: 0 1px 2px rgba(0,0,0,.04); line-height: 1.5; }
.bubble-row.me .bubble { background: #d9fdd3; }
.bubble.gone, .bubble-row.me .bubble.gone { color: #667781; font-style: italic; background: #fff; }
.bubble .tr { display: block; color: #1677ff; font-size: 13px; margin-top: 6px; padding-top: 6px; border-top: 1px solid #d6e4ff; line-height: 1.5; }
.tr-tag { display: inline-block; margin-right: 6px; padding: 0 4px; border-radius: 3px; background: #e6f4ff; color: #1677ff; font-size: 11px; line-height: 16px; }
.tr-wait { display: flex; align-items: center; min-height: 16px; }
.tr-spin { width: 12px; height: 12px; border: 2px solid #d6e4ff; border-top-color: #1677ff; border-radius: 50%; animation: trspin .7s linear infinite; }
@keyframes trspin { to { transform: rotate(360deg); } }
.msg-quote { margin: 0 0 6px; padding: 4px 8px; border-left: 3px solid #25d366; background: rgba(0,0,0,.05); border-radius: 4px; color: #667781; font-size: 12px; line-height: 1.4; }
.sys { text-align: center; color: var(--text-3); font-size: 12px; margin: 10px 0; }
.chat-ft { background: #fff; border-top: 1px solid var(--border); padding: 8px 12px 12px; }
.chat-tools { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; color: var(--text-2); }
.chat-tools .ic { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 4px; cursor: pointer; }
.chat-tools .ic:hover { background: #f5f7fa; color: var(--primary); }
.chip-tog { border: 1px solid var(--border); border-radius: 12px; padding: 2px 8px; font-size: 12px; cursor: pointer; }
.chip-tog.on { background: #e6f7ff; border-color: #91d5ff; color: var(--primary); }
.composer { display: flex; flex-wrap: wrap; gap: 8px; }
.composer .emoji-panel, .composer .reply-bar { flex: 1 0 100%; }
.emoji-panel { border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.emoji-top { display: flex; gap: 8px; padding: 8px; }
.emoji-top .input { flex: 1; }
.emoji-tabs { display: flex; gap: 4px; padding: 0 8px 8px; overflow: auto; }
.emoji-tabs button { border: 0; background: transparent; padding: 4px 8px; border-radius: 6px; cursor: pointer; white-space: nowrap; }
.emoji-tabs button.on { background: #e7f8ef; }
.emoji-grid { display: flex; flex-wrap: wrap; max-height: 180px; overflow: auto; padding: 0 6px 8px; }
.emoji-grid button { border: 0; background: transparent; font-size: 22px; width: 36px; height: 36px; cursor: pointer; }
.composer textarea { flex: 1; min-height: 54px; border: 1px solid var(--border); border-radius: 6px; padding: 8px; outline: none; resize: none; }
.send { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--success); color: #fff; cursor: pointer; align-self: flex-end; display: inline-flex; align-items: center; justify-content: center; }
.send .ico { width: 16px; height: 16px; }
.file-chip { margin-top: 6px; display: inline-flex; align-items: center; gap: 4px; color: var(--text-2); font-size: 12px; }

/* ========== Modal / toast ========== */
.mask { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: none; align-items: center; justify-content: center; z-index: 50; }
.mask.show { display: flex; }
.modal { position: relative; background: #fff; border-radius: 8px; width: 560px; max-width: calc(100vw - 32px); max-height: calc(100vh - 48px); overflow: auto; box-shadow: 0 8px 28px rgba(0,0,0,.2); }
.pick-layer { position: absolute; inset: 0; background: #fff; z-index: 5; display: flex; flex-direction: column; border-radius: 8px; }
.avatar-pop { display: flex; align-items: center; justify-content: center; min-height: 240px; }
.photo-layer { position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, .3); display: flex; align-items: center; justify-content: center; }
.photo-layer img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.msg-img img { cursor: zoom-in; }
.avatar-pop .letter { width: 240px; height: 240px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 72px; color: #fff; }
.sess-search { display: flex; gap: 6px; align-items: center; margin-bottom: 8px; }
.sess-search .input.search { flex: 1; margin: 0; }
.but-list .search-btn { flex-shrink: 0; margin-left: 6px; }
.account_list.unread-acc-col {
  width: 270px; min-width: 220px; overflow: hidden;
}
.unread-acc-row {
  display: flex; align-items: center; gap: 8px; min-width: 0;
  padding: 8px 10px; border-radius: 4px; cursor: pointer;
}
.unread-acc-row:hover, .unread-acc-row.on { background: #e6f4ff; }
.unread-acc-phone {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 13px; font-weight: 600; color: #303133;
}
.modal.lg { width: 820px; }
.modal.sm { width: 420px; }
.modal.wa-del-modal { width: 340px; }
.modal.wa-del-modal .modal-hd { justify-content: center; border-bottom: 0; padding-bottom: 0; }
.wa-delete { display: flex; flex-direction: column; padding: 8px 0 12px; }
.wa-delete button { border: 0; background: #fff; padding: 14px 16px; font-size: 15px; color: #ea0038; cursor: pointer; }
.wa-delete button.cancel { color: #54656f; }
.wa-delete button:hover { background: #f5f6f6; }
.wa-delete-note { padding: 4px 18px 0; color: #667781; font-size: 13px; line-height: 1.45; text-align: center; }
.msg-pick-bar { display: flex; align-items: center; width: 100%; min-height: 40px; }
.msg-pick-n { flex: 1; margin: 0 14px; font-size: 16px; font-weight: 500; color: #111b21; }
.msg-pick-btn { width: 36px; height: 36px; border: 0; border-radius: 50%; background: #f0f2f5; color: #54656f; display: grid; place-items: center; cursor: pointer; padding: 0; flex: 0 0 36px; }
.msg-pick-btn:hover { background: #e9edef; color: #111b21; }
.msg-pick-btn.danger { color: #ea0038; }
.msg-pick-btn.danger:hover { background: #fde8ec; color: #c4002f; }
.msg-pick-btn:disabled { opacity: .35; cursor: default; background: #f0f2f5; color: #8696a0; }
.bubble-row.picking { cursor: pointer; }
.pick-dot { width: 20px; height: 20px; border: 2px solid #8696a0; border-radius: 50%; flex: 0 0 20px; align-self: center; box-sizing: border-box; }
.bubble-row.picked .pick-dot { border-color: #00a884; background: #00a884; }
.bubble-row.picked .pick-dot::after { content: ""; display: block; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); margin: 2px 0 0 6px; }
.toast .undo { margin-left: 12px; border: 0; background: transparent; color: #fff; font-weight: 600; cursor: pointer; }
.toast .undo span:first-child { text-decoration: underline; }
.toast .undo-count { margin-left: 6px; font-variant-numeric: tabular-nums; }
.modal-hd { padding: 14px 18px; border-bottom: 1px solid var(--border); font-weight: 600; display: flex; justify-content: space-between; }
.modal-bd { padding: 16px 18px; }
.modal-ft { padding: 12px 18px 16px; display: flex; justify-content: flex-end; gap: 8px; }
.form-row { display: flex; align-items: flex-start; margin-bottom: 12px; gap: 10px; }
.form-row > label { width: 96px; text-align: right; padding-top: 6px; color: var(--text-2); flex-shrink: 0; }
.form-row .ctrl { flex: 1; }
.req::before { content: "*"; color: #ff4d4f; margin-right: 4px; }
.radio, .check { display: inline-flex; align-items: center; gap: 4px; margin-right: 14px; cursor: pointer; }
.upload {
  display: block; width: 100%;
  border: 1px dashed #91d5ff; background: #f0f8ff; color: var(--primary); padding: 16px; text-align: center;
  border-radius: 6px; cursor: pointer;
}
.perm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; }
.perm-row { display: flex; justify-content: space-between; align-items: center; }

.toasts { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: 8px; }
.toast { background: #303133; color: #fff; border-radius: 4px; box-shadow: 0 6px 16px rgba(0, 0, 0, .28); padding: 12px 18px; min-width: 240px; font-size: 14px; }
.toast.ok { background: #1f7a3a; }
.toast.err { background: #c45656; }

.help { line-height: 1.8; padding: 8px 4px; color: var(--text-2); }
.help h3 { color: var(--text); margin: 12px 0 6px; }
kbd { background: #f5f5f5; border: 1px solid #ddd; border-radius: 3px; padding: 0 4px; }

.hamburger {
  width: 54px; height: var(--header-h); border: 0; background: transparent; cursor: pointer;
  color: #303133; display: flex; align-items: center; justify-content: center;
}
.hamburger:hover { color: #409eff; background: #f5f7fa; }
.topbar { padding-left: 0; padding-right: 16px; box-shadow: 0 1px 4px rgba(0,21,41,.08); }
.ver { color: #c0c4cc; font-size: 12px; }
.sidebar { background: #304156; }
.sidebar-logo { background: #2b3a4b; }
.nav-item.active { background: #1890ff; }

.ov-wrap { display: flex; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.shadow-box {
  background: transparent; padding: 10px 15px; margin-bottom: 10px; flex: 1;
  box-shadow: 0 2px 4px rgba(0,0,0,.12), 0 0 6px rgba(0,0,0,.04);
}
.shadow-box.assign-box { width: 280px; flex: 0 0 280px; }
.ov-hd { color: #606266; font-size: 14px; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.ov-hd .ref { color: var(--primary); cursor: pointer; font-size: 12px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.el-tag {
  display: inline-block; height: 28px; padding: 0 10px; line-height: 26px; font-size: 12px;
  border-radius: 4px; border: 1px solid #d9ecff; background: #ecf5ff; color: #409eff; box-sizing: border-box;
}
.el-tag--success { background: #f0f9eb; border-color: #e1f3d8; color: #67c23a; }
.el-tag--info { background: #f4f4f5; border-color: #e9e9eb; color: #909399; }
.el-tag--warning { background: #fdf6ec; border-color: #faecd8; color: #e6a23c; }
.el-tag--danger { background: #fef0f0; border-color: #fde2e2; color: #f56c6c; }
.btn-circle {
  width: 28px; height: 28px; padding: 5px; border-radius: 50%; border: 1px solid #dcdfe6;
  background: #fff; color: #606266; display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; margin-left: 5px; vertical-align: middle;
}
.btn-circle svg { width: 12px; height: 12px; }
.btn-circle:hover { color: #409eff; border-color: #c6e2ff; background: #ecf5ff; }
.el-form-inline { display: flex; flex-wrap: wrap; align-items: center; margin-bottom: 8px; gap: 0; }
.el-form-inline .el-form-item { display: flex; align-items: center; margin: 0 10px 8px 0; }
.el-form-inline .el-form-item > label { color: #606266; font-size: 14px; padding-right: 8px; }
.input.mini, .btn.mini { height: 28px; font-size: 12px; }
.select.mini { height: 28px; font-size: 12px; padding: 0 24px 0 8px; }
.input.mini.w80 { width: 80px; }
.input.mini.w160, .select.mini.w160 { width: 160px; }
.query-form { margin-bottom: 4px; }
.query-form .el-form-item { margin: 0 8px 8px 0; }
.inline-pair { display: inline-flex; align-items: center; gap: 6px; }
.unit { color: #909399; font-size: 12px; }
.sel-count { color: #606266; font-size: 12px; margin-left: 4px; }
.btn.fill-success, .btn.mini.success { background: #67c23a; border-color: #67c23a; color: #fff; }
.btn.mini.success:hover { background: #85ce61; color: #fff; border-color: #85ce61; }
.btn.mini { padding: 0 10px; }
.btn.mini svg { width: 12px; height: 12px; }
.btn.plain.primary { background: #fff; color: #409eff; border-color: #b3d8ff; }
.btn.plain.primary:hover { background: #ecf5ff; color: #409eff; }
.btn.warning { background: #e6a23c; border-color: #e6a23c; color: #fff; }
.btn.plain.warning { background: #fff; color: #e6a23c; border-color: #f5dab1; }
.btn.plain.warning:hover { background: #fdf6ec; color: #e6a23c; }
.btn.plain.warning[disabled] { opacity: .5; cursor: not-allowed; background: #fff; color: #e6a23c; }
.mb8 { margin-bottom: 8px; }
.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.btn-row .top-right-btn { margin-left: auto; display: flex; gap: 8px; }
.el-dropdown { position: relative; display: inline-block; }
.el-dropdown-menu {
  display: none; position: absolute; left: 0; top: 32px; z-index: 30; min-width: 180px; max-height: 280px;
  overflow: auto; background: #fff; border: 1px solid #e4e7ed; border-radius: 2px;
  box-shadow: 0 2px 12px 0 rgba(0,0,0,.1); padding: 6px 0;
}
.el-dropdown.open .el-dropdown-menu { display: block; }
.el-dropdown-item { padding: 8px 16px; font-size: 13px; color: #606266; cursor: pointer; white-space: nowrap; }
.el-dropdown-item:hover { background: #ecf5ff; color: #66b1ff; }
.caret {
  display: inline-block; width: 0; height: 0; margin-left: 4px; vertical-align: middle;
  border: 4px solid transparent; border-top-color: currentColor; border-bottom-width: 0;
}
button.region-pick {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 8px;
  min-width: 108px; cursor: pointer; color: #606266;
}
button.region-pick .caret { margin-left: 8px; border-top-color: #909399; }
.region-pop {
  position: fixed; z-index: 40; width: 220px; box-sizing: border-box;
  background: #fff; border: 1px solid #e4e7ed; border-radius: 4px;
  box-shadow: 0 2px 12px rgba(0,0,0,.1); padding: 6px;
}
.region-pop .input { width: 100%; margin-bottom: 6px; box-sizing: border-box; }
.region-pop-list { max-height: 240px; overflow: auto; }
.region-pop-item { padding: 6px 8px; font-size: 12px; color: #606266; cursor: pointer; }
.region-pop-item:hover { background: #ecf5ff; color: #409eff; }
.region-pop-empty { padding: 8px; color: #909399; font-size: 12px; }
.table-wrap.el-table-border { border: 1px solid #ebeef5; border-radius: 0; }
table.data.center th, table.data.center td { text-align: center; font-weight: 400; }
table.data.center th { background: #f5f7fa; color: #909399; font-weight: 500; border-bottom: 1px solid #ebeef5; }
table.data.center td { border-bottom: 1px solid #ebeef5; }
table.data.center .ops { justify-content: center; flex-wrap: nowrap; gap: 4px; white-space: nowrap; }
table.data.center td.ops.wrap { flex-wrap: wrap; min-width: 460px; white-space: normal; }
.pair-steps { display: flex; flex-direction: column; gap: 16px; padding: 6px 8px 14px; }
.pair-step { display: flex; align-items: center; justify-content: space-between; font-size: 14px; color: #303133; }
.pair-ico { width: 22px; height: 22px; display: block; flex: none; }
.pair-ico.run { animation: pairspin 0.8s linear infinite; transform-origin: center; }
@keyframes pairspin { to { transform: rotate(360deg); } }
table.data.center td.ops { min-width: 330px; }
table.data .td-empty { text-align: center; color: #909399; padding: 48px 12px; }
.th-check, .td-check { width: 40px; }
.ov-pills { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; font-size: 13px; color: var(--text-2); }
.ov-pills b { font-weight: 600; }
.ov-pills .g { color: #67c23a; } .ov-pills .r { color: #f56c6c; } .ov-pills .o { color: #e6a23c; } .ov-pills .c { color: var(--primary); }

.icon-col.slim { width: 80px; }
.mat-card { color: var(--text-2); }
.mat-card span { font-size: 12px; max-width: 76px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mat-card .ico { color: #409eff; width: 22px; height: 22px; }
.modal-x {
  border: 0; background: transparent; color: #909399; width: 24px; height: 24px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; border-radius: 4px;
}
.modal-x:hover { color: #409eff; background: #f5f7fa; }
.cs-filter .sel { width: 100%; }
.ip-tabs { display: flex; gap: 16px; margin-bottom: 12px; }
.ip-tabs span { cursor: pointer; padding-bottom: 6px; color: var(--text-2); }
.ip-tabs span.on { color: var(--primary); border-bottom: 2px solid var(--primary); }
.check-inline { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; }

.mat-tabs { display: flex; gap: 18px; padding: 8px 0 12px; border-bottom: 1px solid var(--border); margin-bottom: 12px; color: var(--text-2); }
.mat-tabs span { cursor: pointer; padding-bottom: 8px; }
.mat-tabs span.on { color: var(--primary); border-bottom: 2px solid var(--primary); }
.mat-layout { display: grid; grid-template-columns: 160px 1fr; gap: 0; min-height: 420px; background: #fff; border: 1px solid var(--border); }
.mat-groups { border-right: 1px solid var(--border); padding: 12px; }
.mat-groups .g { padding: 8px 10px; cursor: pointer; border-radius: 4px; }
.mat-groups .g.on { background: #ecf5ff; color: var(--primary); }
.mat-body { padding: 16px; position: relative; }
.add-card {
  width: 88px; height: 88px; border: 1px solid #e4e7ed; border-radius: 4px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; color: var(--text-3); cursor: pointer; gap: 4px;
}
.add-card:hover { border-color: var(--primary); color: var(--primary); }
.add-card .plus { width: 28px; height: 28px; border-radius: 50%; border: 1px solid #67c23a; color: #67c23a; display: grid; place-items: center; }

.ip-layout { display: grid; grid-template-columns: 180px 1fr; gap: 12px; }
.ip-tree { background: #fff; border: 1px solid var(--border); border-radius: 4px; padding: 10px; min-height: 360px; }
.ip-tree .g { padding: 8px; cursor: pointer; border-radius: 4px; }
.ip-tree .g.on { background: #ecf5ff; color: var(--primary); }

.tree { border: 1px solid var(--border); border-radius: 4px; padding: 8px; max-height: 160px; overflow: auto; background: #fafafa; }
.tree label { display: flex; align-items: center; gap: 6px; padding: 4px 0; cursor: pointer; }

.chat-layout.admin { grid-template-columns: 168px 80px 230px 250px 1fr; }
.deleted-acc-page .chat-layout.admin { grid-template-columns: 168px 340px 260px minmax(0, 1fr); }
.cs-filter { background: #fff; border-right: 1px solid var(--border); padding: 10px 8px; display: flex; flex-direction: column; gap: 8px; }
.cs-filter .ttl { font-weight: 600; padding: 8px 6px 4px; }
.cs-filter .node { padding: 8px 10px; cursor: pointer; border-radius: 4px; color: var(--text-2); }
.cs-filter .node.on { background: #ecf5ff; color: var(--primary); }
.box-empty { min-height: 220px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #c0c4cc; gap: 8px; }
.box-empty svg { width: 110px; height: 80px; }

.app.collapse .sidebar { width: 64px; }
.app.collapse .sidebar-logo span:last-child, .app.collapse .nav-group-title > span:first-child, .app.collapse .nav-item { font-size: 0; }
.app.collapse .nav-item, .app.collapse .nav-group-title { justify-content: center; padding-left: 0; padding-right: 0; }
.app.collapse .nav-ico, .app.collapse .sidebar-logo .mark { font-size: 14px; }
.app.collapse .nav-caret { display: none; }
.app.collapse .nav-children { display: none !important; }

.app.waba-page .page { padding: 0; overflow: hidden; display: flex; flex-direction: column; }

.chat_box { display: flex; height: 100%; padding: 10px; background: #f5f7fa; min-height: 0; flex: 1; }
.cs-list-wrapper {
  width: 168px; flex-shrink: 0; background: #fff; padding: 0;
  box-shadow: 0 2px 4px rgba(0,0,0,.12), 0 0 6px rgba(0,0,0,.04); display: flex; flex-direction: column;
}
.cs-list-wrapper.cs-split { width: 336px; flex-direction: row; }
.cs-pane { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 10px 8px; min-height: 0; }
.cs-list-wrapper.cs-split .cs-pane + .cs-pane { border-left: 1px solid #ebeef5; }
.cs-pane .cs-list { flex: 1; }
.cs-list-header { display: flex; align-items: center; justify-content: space-between; padding: 0 0 10px; margin-bottom: 10px; }
.header-title { font-size: 14px; font-weight: 700; color: #303133; }
.el-circle {
  width: 28px; height: 28px; border-radius: 50%; border: 1px solid #409eff; background: #409eff; color: #fff;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0;
}
.el-circle svg { width: 12px; height: 12px; }
.addbut { width: 26px; height: 26px; margin-left: 5px; flex-shrink: 0; }
.cs-list { flex: 1; overflow: auto; padding-right: 5px; }
.cs-list-item { padding: 8px 4px; border-radius: 5px; cursor: pointer; }
.cs-list-item:hover, .cs-list-item-active { background: #ecf5ff; }
.cs-list-item-content { display: flex; align-items: center; gap: 8px; }
.cs-avatar, .item_header {
  width: 32px; height: 32px; border-radius: 50%; color: #fff; display: grid; place-items: center;
  font-size: 12px; font-weight: 600; flex-shrink: 0; position: relative;
}
.item_header { width: 40px; height: 40px; font-size: 13px; }
.item_header.sm { width: 22px; height: 22px; font-size: 11px; }
.cs-name, .item_name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-username, .ws-account-info { font-size: 12px; color: #909399; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.unread-acc-main { flex: 1; min-width: 0; }

.waba-sidebar {
  width: 80px; flex-shrink: 0; background: #fff; margin-left: 5px; overflow: auto; padding: 4px 2px 30px;
  box-shadow: 0 2px 12px 0 rgba(0,0,0,.1); border: 1px solid #ebeef5; border-radius: 4px;
}
.bar-list { text-align: center; padding: 8px 2px; cursor: pointer; color: #606266; border-radius: 5px; }
.bar-list .icon { position: relative; display: flex; justify-content: center; color: inherit; }
.bar-list .icon .ico { width: 18px; height: 18px; }
.bar-list .title {
  font-size: 12px; line-height: 1.3; padding: 4px 0 0; color: inherit;
  word-break: keep-all; white-space: nowrap;
}
.bar-list:hover { color: #409eff; background: #ecf5ff; }
.bar-list-active { color: #1890ff; background: #ecf5ff; }
.horn-box.is-off { color: #f56c6c; }
.horn-box.is-on { color: #67c23a; }

.account_list, .group_list { width: 270px; flex-shrink: 0; min-width: 70px; margin-left: 5px; height: 100%;
  box-shadow: 0 2px 4px rgba(0,0,0,.12), 0 0 6px rgba(0,0,0,.04); background: #fff; }
.user_list_col { width: 250px; flex-shrink: 0; min-width: 125px; margin-left: 0; height: 100%;
  box-shadow: 0 2px 4px rgba(0,0,0,.12), 0 0 6px rgba(0,0,0,.04); }
.el-card-body { height: 100%; display: flex; flex-direction: column; padding: 15px 8px 10px; }
.search_inp { position: relative; margin-bottom: 10px; }
.search_inp .el-input__inner {
  width: 100%; height: 28px; border: 1px solid #dcdfe6; border-radius: 4px; padding: 0 30px 0 15px;
  outline: none; font-size: 12px; color: #606266; background: #fff;
}
.search_inp .el-input__inner:focus { border-color: #409eff; }
.el-input__suffix { position: absolute; right: 8px; top: 6px; color: #c0c4cc; pointer-events: none; }
.el-input__suffix svg { width: 14px; height: 14px; }

.el-radio-group { display: flex; width: 100%; margin-bottom: 15px; }
.el-radio-button { flex: 1; cursor: pointer; }
.el-radio-button__inner {
  display: block; text-align: center; padding: 5px; font-size: 12px; line-height: 14px; height: 28px;
  border: 1px solid #dcdfe6; background: #fff; color: #606266; white-space: nowrap; box-sizing: border-box;
}
.el-radio-button:first-child .el-radio-button__inner { border-radius: 4px 0 0 4px; }
.el-radio-button:last-child .el-radio-button__inner { border-radius: 0 4px 4px 0; border-left: 0; }
.el-radio-button.is-active .el-radio-button__inner { background: #409eff; border-color: #409eff; color: #fff; }

.user_list, .user_listbox { flex: 1; overflow: auto; min-height: 0; }
.listPageBox { position: sticky; bottom: 0; padding: 5px 10px; background: #f5f5f5; font-size: 12px; text-align: center; border-radius: 5px; color: #606266; }

.user_item { display: flex; gap: 8px; padding: 8px 4px; cursor: pointer; border-radius: 4px; position: relative; }
.user_item:hover, .user_item.on { background: #e6f4ff; }
.item_info { flex: 1; min-width: 0; }
.nameinfo { display: flex; justify-content: space-between; gap: 8px; }
.time_text { color: #909399; font-size: 12px; flex-shrink: 0; }
.timeinfo { display: flex; align-items: flex-end; gap: 4px; }
.timeinfo .content { flex: 1; color: #909399; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.repeat-text { color: #f56c6c; font-size: 12px; border: 1px solid #f56c6c; border-radius: 2px; padding: 0 3px; line-height: 16px; }
.sess-ops { display: flex; flex-direction: column; gap: 4px; color: #909399; }
.sess-op { cursor: pointer; opacity: .45; }
.sess-op:hover, .sess-op.active { opacity: 1; color: #409eff; }
.sess-op.danger { opacity: 1; color: #f56c6c; }
.el-badge-num {
  position: absolute; top: -4px; right: -6px; background: #f56c6c; color: #fff; font-size: 10px;
  border-radius: 8px; padding: 0 4px; min-width: 14px; line-height: 14px; text-align: center;
}
.unread-n {
  display: inline-block; margin-left: 6px; background: #f56c6c; color: #fff; font-size: 10px;
  border-radius: 8px; padding: 0 4px; min-width: 14px; line-height: 14px; text-align: center; vertical-align: middle;
}
.unread-n.is-zero { background: #d9d9d9; color: #666; }

.resizeBox { width: 1px; background: #eee; position: relative; cursor: col-resize; flex-shrink: 0; margin: 0 2px; }
.resizeBox svg { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%) rotate(-90deg); color: #c0c4cc; width: 12px; height: 12px; }

.el-tabs--border-card { height: 100%; background: #fff; border-radius: 4px; display: flex; flex-direction: column; overflow: hidden; }
.el-tabs__header { border-bottom: 1px solid #dcdfe6; background: #f5f7fa; }
.el-tabs__item { display: inline-block; height: 40px; line-height: 40px; padding: 0 20px; font-size: 14px; color: #909399; background: transparent; margin-bottom: -1px; border-bottom: 1px solid transparent; cursor: pointer; }
.el-tabs__item.is-active { color: #409eff; background: #fff; border-bottom: 1px solid #fff; }
.el-tabs__item:hover { color: #409eff; }
.el-tabs__content { flex: 1; display: flex; flex-direction: column; min-height: 0; padding: 10px 8px; }
.but-list { display: flex; align-items: center; margin-bottom: 8px; }
.but-list .search_inp { flex: 1; margin-bottom: 0; }
.group-ops { display: flex; gap: 6px; margin-bottom: 10px; }
.group-row { padding: 10px 8px; cursor: pointer; border-radius: 4px; }
.group-row:hover, .group-row.on { background: #ecf5ff; color: #409eff; }

.chat_window, .chat_window_info {
  flex: 1; min-width: 0; margin-left: 5px; background: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,.12), 0 0 6px rgba(0,0,0,.04); display: flex; flex-direction: column;
}
.chat_window_info { align-items: center; justify-content: center; }
.chat-header {
  height: 54px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 8px; padding: 0 16px; flex-shrink: 0;
}
.chat-header .left-user, .chat-header .right-user { font-weight: 600; cursor: pointer; }
.chat-header .info { color: #909399; }
.chat-header .edit-ico { color: #909399; margin-left: 4px; vertical-align: middle; }
.content-box { flex: 1; min-height: 0; overflow: auto; background: #f5f7fa; overflow-anchor: none; }
.char-log { padding: 16px; }
.noloadingLog { text-align: center; color: #909399; font-size: 12px; padding: 8px; }
.blockBox { padding: 8px 12px; display: flex; align-items: center; gap: 8px; background: #fff; border-top: 1px solid var(--border); }
.el-tag--danger { background: #fef0f0; border: 1px solid #fbc4c4; color: #f56c6c; padding: 0 10px; line-height: 24px; font-size: 12px; border-radius: 4px; }
.chat_window .chat-ft { background: #fff; }
.chat_window .composer { align-items: flex-end; }
.chat_window .composer textarea { min-height: 54px; }
.chat_window .submitBut { white-space: nowrap; height: auto; padding: 7px 12px; line-height: 1.2; }
.chat_window .composer textarea:disabled, .chat_window .composer button:disabled { opacity: .5; cursor: not-allowed; }
.icon-box { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 4px; cursor: pointer; color: #606266; }
.icon-box:hover { background: #f5f7fa; color: #409eff; }
.ctx-menu { position: fixed; z-index: 90; min-width: 148px; background: #fff; border: 1px solid #e4e7ed; border-radius: 4px; box-shadow: 0 2px 12px rgba(0,0,0,.12); padding: 4px 0; }
.ctx-menu button { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: 7px 14px; cursor: pointer; font-size: 13px; color: #303133; }
.ctx-menu button:hover { background: #f5f7fa; color: #409eff; }
.reply-bar { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; padding: 6px 8px; background: #f4f4f5; border-left: 3px solid #25d366; font-size: 12px; color: #606266; }
.batch-bar { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 8px; }

.el-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 8px; color: #909399; min-height: 160px; }
.el-empty__image { width: 160px; }
.el-empty__image svg { width: 100%; height: auto; display: block; }
.el-empty.infotext { min-height: 100%; width: 100%; padding: 40px 0; }
.el-empty__description { margin-top: 20px; font-size: 14px; color: #909399; text-align: center; }
.el-empty__description p { margin: 0; }

@media (max-width: 1100px) {
  .chat-layout, .chat-layout.agent, .chat-layout.agent.no-acc { grid-template-columns: 80px 200px 1fr; }
  .chat-layout.admin { grid-template-columns: 56px 200px 1fr; }
  .deleted-acc-page .chat-layout.admin { grid-template-columns: 240px 220px minmax(0, 1fr); }
  .cs-filter, .cs-rail { display: none; }
  .filter-grid { grid-template-columns: 1fr 1fr; }
  .login-card { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .ip-layout, .mat-layout { grid-template-columns: 1fr; }
  .cs-list-wrapper { display: none; }
}
