/* 中阳国际 · 在线客服后台 —— v3 现代重设计
   设计语言：深海军蓝侧栏 + 橙金主色 + 柔和层次阴影 + 圆角卡片
   保留全部历史类名，只改视觉；关键结构约束（工作台高度/输入框置底/响应式）一律不动 */
:root {
  --admin-sidebar: 236px;
  --side-bg: linear-gradient(180deg, #0c131f 0%, #0a101a 55%, #0b1119 100%);
  --surface: #ffffff;
  --line: #e9ecf2;
  --line-soft: #f0f2f6;
  --txt: #1f2937;
  --txt-2: #6b7280;
  --txt-3: #9aa3b2;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .04);
  --shadow-md: 0 4px 12px -2px rgba(16, 24, 40, .10), 0 2px 6px -2px rgba(16, 24, 40, .06);
  --brand-grad: linear-gradient(135deg, #ff9730 0%, #ff7a00 55%, #f26300 100%);
}

* { box-sizing: border-box; }

body.admin {
  margin: 0;
  background: #f4f5f8;
  color: var(--txt);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", Roboto, sans-serif;
  font-size: 14.5px;
  line-height: 1.6;
}

/* ---------- 侧边栏 ---------- */
.admin-shell { display: flex; min-height: 100vh; }
.admin-side {
  width: var(--admin-sidebar);
  flex: 0 0 var(--admin-sidebar);
  background: var(--side-bg);
  color: rgba(255, 255, 255, .72);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  box-shadow: inset -1px 0 0 rgba(255,255,255,.04);
}
.admin-brand {
  padding: 20px 20px;
  display: flex;
  align-items: center;
  gap: 11px;
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: .01em;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.admin-brand .dot {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: var(--brand-grad);
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 4px 14px rgba(255, 122, 0, .35);
}
.admin-nav { padding: 12px 12px; flex: 1; }
.admin-nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  margin-bottom: 3px;
  border-radius: 10px;
  color: rgba(255, 255, 255, .70);
  font-size: 14px;
  text-decoration: none;
  transition: background .16s ease, color .16s ease;
  position: relative;
}
.admin-nav a svg { flex: none; opacity: .85; }
.admin-nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.admin-nav a.is-active {
  background: linear-gradient(100deg, rgba(255, 122, 0, .95), rgba(255, 122, 0, .75));
  color: #fff;
  font-weight: 600;
  box-shadow: 0 8px 20px -6px rgba(255, 122, 0, .55);
}
.admin-nav .group-label {
  padding: 16px 12px 6px;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .32);
}

/* ---------- 主区与顶栏 ---------- */
.admin-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.admin-top {
  height: 64px;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.admin-top h1 { font-size: 17px; margin: 0; font-weight: 700; color: var(--txt); }
.admin-top .spacer { margin-left: auto; }
.admin-user { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--txt-2); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 5px 14px 5px 6px; }
.admin-user .avatar {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--brand-grad);
  color: #fff; font-size: 12px; font-weight: 800;
}
.admin-user strong { color: var(--txt); font-weight: 700; }

.admin-content { padding: 22px 24px; flex: 1; }

/* ---------- 卡片 / 统计 ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}
.card-title { font-size: 15.5px; font-weight: 700; margin-bottom: 14px; color: var(--txt); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); gap: 12px; }
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.stat::after {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--brand-grad); border-radius: 0 3px 3px 0; opacity: .9;
}
.stat .label { font-size: 12.5px; color: var(--txt-2); font-weight: 600; letter-spacing: .02em; }
.stat .value {
  font-size: 26px; font-weight: 800; color: #10151d;
  font-family: "SF Mono", ui-monospace, "Roboto Mono", Consolas, monospace;
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
  background: linear-gradient(120deg, #ff7a00, #e25a00);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #ff7a00;
}

/* ---------- 表格 ---------- */
.table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}
table.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th, .admin-table td { padding: 12px 14px; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: middle; }
.admin-table th { background: #fafbfc; color: var(--txt-2); font-weight: 600; font-size: 12px; letter-spacing: .04em; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table tbody tr { transition: background .12s ease; }
.admin-table tbody tr:hover td { background: #fbfcfe; }
.admin-table .actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--txt); margin-bottom: 6px; }
.field .hint { font-size: 12.5px; color: var(--txt-3); margin-top: 5px; }
input[type="text"], input[type="password"], input[type="number"], input[type="url"], input[type="tel"], input[type="email"], input[type="datetime-local"],
select, textarea {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  outline: none;
  font-size: 14px;
  color: var(--txt);
  transition: border-color .18s ease, box-shadow .18s ease;
}
input:focus, select:focus, textarea:focus {
  border-color: #ff9c3f;
  box-shadow: 0 0 0 3px rgba(255, 122, 0, .14);
}
textarea { min-height: 120px; resize: vertical; font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 13.5px; }
textarea.article-md { min-height: 460px; }
.checkbox { display: flex; align-items: center; gap: 8px; }
.checkbox input { width: auto; }

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 18px; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-size: 14px; font-weight: 600;
  transition: all .18s ease;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
}
.btn-primary { background: var(--brand-grad); color: #fff; box-shadow: 0 8px 20px -8px rgba(255, 122, 0, .55); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px -8px rgba(255, 122, 0, .6); }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--txt); }
.btn-ghost:hover { border-color: #ff9c3f; color: #e25a00; }
.btn-danger { background: #e5484d; color: #fff; }
.btn-sm { padding: 6px 13px; font-size: 13px; border-radius: 9px; }

.alert { padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; font-size: 14px; border: 1px solid transparent; }
.alert-success { background: #eafaf0; color: #166b3c; border-color: #c4ecd4; }
.alert-error { background: #fdecec; color: #a32828; border-color: #f6cccc; }
.alert-info { background: #fff3e6; color: #b4570a; border-color: #ffdcb0; }

.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge-published { background: #eafaf0; color: #166b3c; }
.badge-draft { background: #eef1f5; color: #6b7280; }
.badge-archived { background: #fdecec; color: #a32828; }

/* 媒体库 */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.media-item { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; box-shadow: var(--shadow-sm); transition: transform .16s ease, box-shadow .16s ease; }
.media-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.media-item img { width: 100%; height: 110px; object-fit: cover; background: #f1f3f6; }
.media-item .meta { padding: 8px 10px; font-size: 12.5px; color: var(--txt-3); }
.media-item .meta a { color: #e25a00; word-break: break-all; }

/* ---------- 登录页 ---------- */
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(255, 122, 0, .16), transparent 60%),
    radial-gradient(1000px 500px at 110% 110%, rgba(255, 151, 48, .12), transparent 55%),
    linear-gradient(160deg, #0c1420 0%, #0a101a 55%, #13100a 100%);
}
.login-card {
  width: min(100%, 400px);
  background: rgba(255, 255, 255, .97);
  border-radius: 20px;
  padding: 36px 32px;
  box-shadow: 0 24px 60px -12px rgba(5, 10, 20, .5);
}
.login-card .login-logo {
  width: 52px; height: 52px; border-radius: 14px;
  display: grid; place-items: center;
  background: var(--brand-grad);
  color: #fff; font-weight: 900; font-size: 18px;
  margin-bottom: 16px;
  box-shadow: 0 10px 24px -8px rgba(255, 122, 0, .6);
}
.login-card h1 { font-size: 21px; margin: 0 0 4px; color: var(--txt); }
.login-card .sub { color: var(--txt-2); font-size: 14px; margin-bottom: 22px; }
.login-card .btn { width: 100%; margin-top: 8px; }
.login-foot { margin-top: 16px; text-align: center; font-size: 12.5px; color: var(--txt-3); }

/* ---------- 移动端 ---------- */
.admin-toggle { display: none; width: 38px; height: 38px; border: 1px solid var(--line); background: #fff; border-radius: 10px; place-items: center; cursor: pointer; }
@media (max-width: 900px) {
  .admin-shell { display: block; }
  .admin-side {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 60;
    transform: translateX(-100%);
    transition: transform .3s ease;
    box-shadow: 0 0 0 rgba(0,0,0,0);
  }
  .admin-side.is-open { transform: translateX(0); box-shadow: var(--shadow-md); }
  .admin-toggle { display: grid; }
  .admin-content { padding: 14px; }
  .admin-top { padding: 0 14px; }
}
@media (max-width: 520px) {
  .stat .value { font-size: 22px; }
  .card { padding: 16px; }
  .form-actions .btn { flex: 1; }
}

/* ==========================================================================
   在线客服工作台
   ========================================================================== */
.chat-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.chat-toolbar .grow { flex: 1; min-width: 160px; }
.chat-toolbar input[type="text"], .chat-toolbar select { width: auto; min-width: 150px; padding: 8px 12px; }

/* 工作台高度约束（输入框永远可见，勿改） */
.chat-page {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 64px - 44px);
  min-height: 0;
}
.chat-page .stat-grid { flex: none; margin-bottom: 12px; }
.chat-page .chat-toolbar { flex: none; }

.chat-console {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 296px minmax(0, 1fr) 300px;
  gap: 14px;
  align-items: stretch;
}
.chat-col {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  min-width: 0;
  box-shadow: var(--shadow-sm);
}
.chat-col-head {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14px;
  font-weight: 700;
  color: var(--txt);
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fdfefe;
}
.chat-col-head .count { font-size: 12px; font-weight: 700; color: #e25a00; background: #fff1e2; border: 1px solid #ffdcb0; border-radius: 999px; padding: 1px 9px; }
.chat-col-body { flex: 1; overflow-y: auto; min-height: 0; }

/* 会话列表 */
.conv-item {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-soft);
  text-decoration: none;
  color: inherit;
  transition: background .12s ease;
}
.conv-item:hover { background: #fff7ee; }
.conv-item.is-active { background: linear-gradient(90deg, #fff3e4, #fffaf4); box-shadow: inset 3px 0 0 #ff7a00; }
.conv-item .conv-ava {
  width: 36px; height: 36px; flex: none; border-radius: 10px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #fff1e2, #ffe3c7);
  color: #c75b12; font-weight: 800; font-size: 13px;
  font-family: "SF Mono", ui-monospace, Consolas, monospace;
}
.conv-item .conv-main { flex: 1; min-width: 0; }
.conv-item .line1 { display: flex; align-items: center; gap: 8px; }
.conv-item .code { font-family: "SF Mono", ui-monospace, Consolas, monospace; font-size: 13.5px; font-weight: 800; color: #10151d; }
.conv-item .time { margin-left: auto; font-size: 12px; color: var(--txt-3); flex: none; }
.conv-item .preview {
  margin-top: 3px;
  font-size: 12.5px;
  color: var(--txt-2);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.conv-item .tags { margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font-size: 11.5px; padding: 1px 7px; border-radius: 999px; background: #eef1f5; color: #6b7280; }
.tag-online { background: #eafaf0; color: #166b3c; }
.tag-unread { background: #ff7a00; color: #fff; font-weight: 700; }
.tag-geo { background: #fff1e2; color: #b4570a; }

/* 对话区（min-height:0 勿删，防 flex 撑破） */
.chat-stream {
  flex: 1; overflow-y: auto; padding: 16px; min-height: 0;
  background:
    radial-gradient(rgba(15,23,42,.035) 1px, transparent 1px) 0 0/18px 18px,
    linear-gradient(180deg, #f9f7f4 0%, #f4f1ed 100%);
}
.chat-stream .msg { display: flex; gap: 8px; margin-bottom: 14px; }
.chat-stream .msg.agent { justify-content: flex-end; flex-direction: row-reverse; }
.msg-ava {
  width: 30px; height: 30px; flex: none; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, #97a1b3, #5b6478);
  margin-top: 18px;
}
.chat-stream .msg.visitor .msg-ava { background: #cdd4e0; color: #3c4558; }
.chat-stream .msg .msg-body { min-width: 0; max-width: min(74%, 560px); display: flex; flex-direction: column; }
.chat-stream .msg.agent .msg-body { align-items: flex-end; }
.chat-stream .msg.visitor .msg-body { align-items: flex-start; }
.chat-stream .msg .bubble {
  max-width: 100%;
  padding: 9px 13px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.chat-stream .msg.visitor .bubble { background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 5px; box-shadow: var(--shadow-sm); }
.chat-stream .msg.agent .bubble { background: var(--brand-grad); color: #fff; border-bottom-right-radius: 5px; box-shadow: 0 8px 20px -8px rgba(255, 122, 0, .5); }
.chat-stream .msg.system { justify-content: center; }
.chat-stream .msg.system .bubble { background: rgba(15,23,42,.06); color: #6b7280; font-size: 12.5px; border-radius: 10px; }
.chat-stream .msg .who { font-size: 11.5px; color: var(--txt-3); margin-bottom: 3px; }
.chat-stream .msg.agent .who { text-align: right; }

.chat-composer {
  flex: none; /* 恒不被压缩（勿改） */
  border-top: 1px solid var(--line-soft);
  padding: 10px 12px 12px;
  display: flex;
  gap: 8px;
  align-items: flex-end;
  background: #fff;
}
.chat-composer .rich-input {
  flex: 1;
  min-height: 44px;
  max-height: 150px;
  overflow-y: auto;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--txt);
  background: #fff;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.chat-composer .rich-input:focus { border-color: #ff9c3f; box-shadow: 0 0 0 3px rgba(255, 122, 0, .12); }
.chat-composer .rich-input[data-placeholder]:empty::before { content: attr(data-placeholder); color: var(--txt-3); pointer-events: none; }
.chat-composer .rich-input p { margin: 0 0 4px; }
.chat-composer .rich-input p:last-child { margin-bottom: 0; }
.chat-composer .rich-input ul, .chat-composer .rich-input ol { margin: 2px 0 4px; padding-left: 20px; }
.chat-composer .rich-input a { color: #2f7bd6; text-decoration: underline; }
.chat-composer .btn { flex: none; }

.bubble-rich { white-space: normal; }
.bubble-rich p { margin: 0 0 4px; }
.bubble-rich p:last-child { margin-bottom: 0; }
.bubble-rich ul, .bubble-rich ol { margin: 2px 0 4px; padding-left: 20px; }
.bubble-rich a { color: #ffd9a8; text-decoration: underline; word-break: break-all; }
.chat-stream .msg.visitor .bubble-rich a { color: #2f7bd6; }
.bubble-rich b, .bubble-rich strong { font-weight: 700; }

/* 富文本工具栏 */
.chat-tools {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-top: 1px solid var(--line-soft);
  background: #fbfaf9;
}
.chat-tools .grow { flex: 1; }
.chat-tools .tool-hint { font-size: 11.5px; color: var(--txt-3); }
.tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: #556070;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.tool-btn:hover { border-color: #ff9c3f; color: #e25a00; background: #fff8f0; }
.tool-btn.is-on { border-color: #ff9c3f; color: #e25a00; background: #fff1e2; }
.tool-glyph .glyph { font-size: 14px; font-weight: 800; line-height: 1; }
.tool-current { font-size: 12px; color: #e25a00; font-weight: 700; }

/* 颜色选择器 */
.color-pop {
  position: absolute;
  left: 12px;
  bottom: 42px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  width: 180px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  z-index: 30;
}
.color-pop[hidden] { display: none; }
.color-swatch { width: 30px; height: 30px; border: 2px solid #fff; outline: 1px solid rgba(15,23,42,.12); outline-offset: -1px; border-radius: 50%; cursor: pointer; padding: 0; transition: transform .12s ease; }
.color-swatch:hover { transform: scale(1.15); }

/* 常用语面板：窄栏、靠右（保持） */
.quick-pop {
  position: absolute;
  right: 40px;
  left: auto;
  bottom: 92px;
  width: 300px;
  max-width: calc(100% - 80px);
  max-height: 46vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  z-index: 29;
  overflow: hidden;
}
.quick-pop[hidden] { display: none; }
.quick-pop-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-bottom: 1px solid var(--line-soft); font-size: 13px; font-weight: 700; color: var(--txt); }
.quick-pop-body { overflow-y: auto; padding: 6px; }
.quick-empty { padding: 18px; text-align: center; color: var(--txt-3); font-size: 13px; }
.quick-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 9px;
  cursor: pointer;
  transition: background .12s ease;
}
.quick-item:hover { background: #fff7ee; }
.quick-item .q-title { font-size: 13px; font-weight: 700; color: var(--txt); flex: none; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quick-item .q-content { flex: 1; font-size: 12.5px; color: var(--txt-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quick-item .q-del { flex: none; border: 0; background: none; color: var(--txt-3); font-size: 16px; cursor: pointer; padding: 2px 4px; }
.quick-item .q-del:hover { color: #e5484d; }
.quick-group-label { padding: 8px 10px 4px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--txt-3); }

/* 图片消息气泡 */
.bubble-image { padding: 4px !important; background: transparent !important; }
.bubble-image img { display: block; max-width: 260px; max-height: 260px; border-radius: 12px; object-fit: contain; cursor: zoom-in; }
.chat-stream .msg.agent .bubble-image { background: transparent !important; }

/* 访客画像 */
.profile-block { padding: 12px 14px; border-bottom: 1px solid var(--line-soft); }
.profile-block h4 { margin: 0 0 8px; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--txt-3); }
.kv { display: flex; gap: 8px; font-size: 13px; padding: 3px 0; }
.kv .k { flex: 0 0 84px; color: var(--txt-2); }
.kv .v { flex: 1; color: var(--txt); word-break: break-all; }
.code-pill {
  display: inline-block;
  font-family: "SF Mono", ui-monospace, Consolas, monospace;
  font-size: 13px; font-weight: 800;
  color: #c75b12;
  background: #fff1e2;
  border: 1px dashed #ffc78a;
  border-radius: 8px;
  padding: 3px 10px;
}
.path-list { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.path-list li { display: flex; gap: 8px; padding: 5px 0; border-bottom: 1px dashed var(--line); color: var(--txt); }
.path-list li .idx { color: #ff7a00; font-weight: 700; flex: none; }
.path-list li .p { flex: 1; word-break: break-all; }
.path-list li .d { color: var(--txt-3); font-size: 12px; flex: none; }

/* 联系线索块 */
.leads-block .kv .k { color: #c75b12; font-weight: 700; }
.leads-block { background: linear-gradient(180deg, #fffaf3, #fff7ee); }

/* 地理分布 */
.geo-bars { display: flex; flex-direction: column; gap: 10px; }
.geo-row { display: grid; grid-template-columns: 120px 1fr 84px; gap: 10px; align-items: center; }
.geo-row .name { font-size: 13.5px; color: var(--txt); }
.geo-row .bar { height: 10px; background: #eef1f5; border-radius: 999px; overflow: hidden; }
.geo-row .bar i { display: block; height: 100%; border-radius: 999px; background: var(--brand-grad); }
.geo-row .num { font-size: 13px; color: var(--txt-2); text-align: right; font-family: "SF Mono", ui-monospace, Consolas, monospace; }
.geo-note { margin-top: 14px; font-size: 12.5px; color: var(--txt-3); }

.chat-empty {
  display: grid;
  place-items: center;
  height: 100%;
  min-height: 320px;
  color: var(--txt-3);
  font-size: 14px;
}

/* 响应式（保持移动端布局约束） */
@media (max-width: 1180px) {
  .chat-console { grid-template-columns: 260px minmax(0, 1fr); }
  .chat-col.profile { display: none; }
}
@media (max-width: 860px) {
  .chat-page { height: calc(100vh - 64px - 28px); }
  .chat-page .stat-grid { display: none; }
  .chat-page .chat-toolbar { padding: 4px 10px; }
  .chat-page .chat-toolbar form { flex-wrap: nowrap !important; overflow-x: auto; gap: 8px; white-space: nowrap; }
  .chat-console { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .chat-col.list { max-height: 180px; }
  .chat-col.chat { min-height: 0; }
}
@media (max-height: 720px) {
  .chat-page .stat-grid { display: none; }
}

/* 安装到桌面（应用模式） */
.install-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 0 0 12px;
  padding: 9px 12px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 11px;
  background: rgba(255,255,255,.06);
  color: #fff;
  font-size: 13px;
  cursor: pointer;
  transition: background .15s ease;
}
.install-btn:hover { background: rgba(255,255,255,.14); }
.admin-side-foot { padding: 12px 14px; border-top: 1px solid rgba(255,255,255,.08); }
.admin-side-foot .muted { color: rgba(255,255,255,.5); font-size: 12px; }
