/* ==========================================================================
   RGCRM Design System  ·  统一变量 / 组件 / 布局
   设计语言：深空蓝侧栏 + 极光青点缀 + 浅灰白内容区，圆角 14，阴影柔和
   ========================================================================== */

:root {
  --brand:        #2f6bff;
  --brand-600:    #1d54e8;
  --brand-100:    #e8efff;
  --brand-50:     #f2f6ff;
  --teal:         #12b886;
  --amber:        #f59f00;
  --rose:         #f03e3e;
  --violet:       #7048e8;

  --bg:           #f4f7fb;
  --card:         #ffffff;
  --text:         #0f172a;
  --text-2:       #334155;
  --muted:        #7c8aa0;
  --line:         #e8edf5;
  --line-2:       #f1f5fa;

  --sidebar-bg:   #0b1220;
  --sidebar-bg-2: #101d33;
  --sidebar-text: #9fb0c9;
  --sidebar-on:   #ffffff;

  --r-sm: 8px;
  --r:    12px;
  --r-lg: 16px;
  --r-xl: 22px;

  --sh-1: 0 1px 2px rgba(16,24,40,.05);
  --sh-2: 0 4px 14px rgba(16,24,40,.06);
  --sh-3: 0 12px 34px rgba(16,24,40,.10);
  --sh-4: 0 24px 60px rgba(15,23,42,.22);

  --sidebar-w: 232px;
  --sidebar-w-mini: 72px;
  --header-h: 62px;

  --ease: cubic-bezier(.4,.14,.3,1);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-600); }
img { max-width: 100%; }
::selection { background: rgba(47,107,255,.18); }

/* 滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #cfd8e6; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #b6c2d4; }
::-webkit-scrollbar-track { background: transparent; }

/* ==========================================================================
   布局骨架
   ========================================================================== */
.layout { display: flex; min-height: 100vh; }

/* ---------- 侧栏 ---------- */
.sidebar {
  position: fixed; inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: linear-gradient(180deg, var(--sidebar-bg) 0%, var(--sidebar-bg-2) 100%);
  display: flex; flex-direction: column;
  z-index: 60;
  transition: width .24s var(--ease), transform .28s var(--ease);
}
.sidebar::after {
  content: ""; position: absolute; top: 0; right: 0; width: 1px; height: 100%;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,.10), transparent);
}
.brand {
  height: var(--header-h); display: flex; align-items: center; gap: 10px;
  padding: 0 18px; flex: none; overflow: hidden;
}
.brand-logo {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  background: linear-gradient(135deg, #4d8bff, #12b886);
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 15px;
  box-shadow: 0 6px 16px rgba(47,107,255,.38);
}
.brand-name { color: #fff; font-weight: 700; font-size: 15px; letter-spacing: .4px; white-space: nowrap; }
.brand-sub  { color: #5c7093; font-size: 10px; letter-spacing: 2px; white-space: nowrap; }

.nav { flex: 1; overflow-y: auto; padding: 8px 10px 22px; }
.nav::-webkit-scrollbar { width: 4px; }
.nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); }

.nav-group > .nav-title {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; margin: 4px 0;
  color: var(--sidebar-text); border-radius: 10px;
  cursor: pointer; font-size: 13.5px; font-weight: 500;
  transition: background .18s, color .18s;
  user-select: none;
}
.nav-group > .nav-title:hover { background: rgba(255,255,255,.06); color: #dbe6f7; }
.nav-group.open > .nav-title { color: #fff; }
.nav-title .ico { font-size: 16px; width: 20px; text-align: center; flex: none; opacity: .9; }
.nav-title .arrow { margin-left: auto; font-size: 10px; opacity: .5; transition: transform .2s; }
.nav-group.open > .nav-title .arrow { transform: rotate(90deg); }

.nav-sub { max-height: 0; overflow: hidden; transition: max-height .28s var(--ease); }
.nav-group.open > .nav-sub { max-height: 800px; }
.nav-sub a {
  display: block; padding: 8px 12px 8px 42px; margin: 2px 0;
  color: #8598b4; font-size: 13px; border-radius: 9px;
  position: relative; transition: all .16s;
}
.nav-sub a::before {
  content: ""; position: absolute; left: 26px; top: 50%; width: 5px; height: 5px;
  margin-top: -2.5px; border-radius: 50%; background: #3a4a66; transition: all .16s;
}
.nav-sub a:hover { color: #dbe6f7; background: rgba(255,255,255,.05); }
.nav-sub a.active {
  color: #fff; background: linear-gradient(90deg, rgba(47,107,255,.30), rgba(47,107,255,.10));
  box-shadow: inset 2px 0 0 var(--brand);
}
.nav-sub a.active::before { background: var(--brand); box-shadow: 0 0 0 3px rgba(47,107,255,.22); }

/* ------------------------------------------------------------------
   mini 折叠态：点/悬停分组图标，在侧栏右侧浮出该组子菜单
   （折叠时 .nav-sub 是 display:none，不浮出就点不到任何页面）
------------------------------------------------------------------ */
.nav-flyout {
  position: fixed;
  left: calc(var(--sidebar-w-mini) + 8px);
  z-index: 80;
  min-width: 188px;
  max-width: 246px;
  max-height: 70vh;
  overflow-y: auto;
  padding: 6px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 20px 44px -18px rgba(8,17,32,.5), 0 0 0 1px rgba(15,23,42,.06);
  opacity: 0;
  transform: translateX(-6px);
  pointer-events: none;
  transition: opacity .16s var(--ease), transform .16s var(--ease);
}
.nav-flyout.on { opacity: 1; transform: none; pointer-events: auto; }
.nav-flyout .nf-head {
  font-size: 11.5px; font-weight: 700; letter-spacing: .5px;
  color: #8b98ad; padding: 6px 10px 7px;
}
.nav-flyout .nf-body a {
  display: block; padding: 8px 10px; border-radius: 8px;
  color: #334155; font-size: 13px; text-decoration: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nav-flyout .nf-body a:hover { background: #eef4ff; color: #1a4fe0; }
.nav-flyout .nf-body a.active { background: #eef4ff; color: #1a4fe0; font-weight: 600; }
.nav-flyout .nf-body a span { vertical-align: middle; }

/* 折叠态图标补一个悬停反馈，暗示"点了会弹子菜单" */
.layout.mini .nav-title { position: relative; }
.layout.mini .nav-title:hover { background: rgba(255,255,255,.1); }
.layout.mini .nav-title::after {
  content: ''; position: absolute; right: 7px; top: 50%;
  width: 4px; height: 4px; margin-top: -2px; border-radius: 50%;
  background: rgba(255,255,255,.4); opacity: 0; transition: opacity .16s;
}
.layout.mini .nav-title:hover::after { opacity: 1; }

/* 收起态 */
.layout.mini .sidebar { width: var(--sidebar-w-mini); }
.layout.mini .brand-name, .layout.mini .brand-sub,
.layout.mini .nav-title span.txt, .layout.mini .nav-title .arrow { display: none; }
.layout.mini .nav-sub { display: none; }
.layout.mini .nav-title { justify-content: center; padding: 12px 0; }
.layout.mini .main { margin-left: var(--sidebar-w-mini); }

/* ---------- 主区 ---------- */
.main {
  flex: 1; margin-left: var(--sidebar-w); min-width: 0;
  display: flex; flex-direction: column;
  transition: margin .24s var(--ease);
}

.header {
  height: var(--header-h); position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 14px; padding: 0 22px;
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.hamburger {
  width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line);
  background: #fff; cursor: pointer; display: grid; place-items: center; color: var(--text-2);
  transition: all .16s;
}
.hamburger:hover { border-color: #cfddfa; color: var(--brand); background: var(--brand-50); }

/* 顶栏面包屑：一律不换行，超长省略。
   手机上曾被压成竖排「系统管 理」，是这里缺 nowrap + min-width:0 导致 */
.crumb {
  display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
}
.crumb > * { white-space: nowrap; }
.crumb strong { overflow: hidden; text-overflow: ellipsis; }
.crumb strong { color: var(--text); font-weight: 600; }

.header-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.icon-btn {
  position: relative; width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center; color: #55637a; cursor: pointer;
  border: 1px solid transparent; transition: all .16s; background: transparent;
}
.icon-btn:hover { background: var(--brand-50); color: var(--brand); border-color: #e2ebff; }
.dot-badge {
  position: absolute; top: 4px; right: 3px; min-width: 16px; height: 16px; padding: 0 4px;
  background: var(--rose); color: #fff; border-radius: 9px; font-size: 10px; line-height: 16px;
  text-align: center; font-weight: 700; box-shadow: 0 0 0 2px #fff;
}

.user-chip {
  display: flex; align-items: center; gap: 9px; padding: 4px 10px 4px 4px;
  border-radius: 999px; cursor: pointer; border: 1px solid var(--line); background: #fff;
  transition: all .16s;
}
.user-chip:hover { border-color: #cfddfa; box-shadow: var(--sh-2); }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, #4d8bff, #7048e8);
  color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700;
}
.user-meta { line-height: 1.2; }
.user-meta b { font-size: 13px; font-weight: 600; display: block; }
.user-meta span { font-size: 11px; color: var(--muted); }

.content { padding: 22px; flex: 1; }

/* 页面标题 */
.page-head { display: flex; align-items: flex-end; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.page-title { font-size: 21px; font-weight: 700; letter-spacing: -.2px; margin: 0; }
.page-desc { color: var(--muted); font-size: 13px; margin: 2px 0 0; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* ==========================================================================
   组件
   ========================================================================== */
.card {
  background: var(--card); border-radius: var(--r-lg); border: 1px solid var(--line);
  box-shadow: var(--sh-1);
}
.card-pad { padding: 18px 20px; }
.card-head {
  display: flex; align-items: center; gap: 10px; padding: 15px 20px;
  border-bottom: 1px solid var(--line-2);
}
.card-head h3 { margin: 0; font-size: 15px; font-weight: 650; }
.card-head .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.card-body { padding: 18px 20px; }
.card-body.tight { padding: 0; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 16px; border-radius: 10px;
  border: 1px solid var(--line); background: #fff; color: var(--text-2);
  font-size: 13.5px; font-weight: 550; cursor: pointer; white-space: nowrap;
  transition: all .16s var(--ease); user-select: none;
}
.btn:hover { border-color: #cfddfa; color: var(--brand); background: var(--brand-50); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn.disabled { opacity: .55; cursor: not-allowed; transform: none; }

.btn-primary {
  background: linear-gradient(135deg, #3d78ff, var(--brand-600));
  border-color: transparent; color: #fff;
  box-shadow: 0 6px 16px rgba(47,107,255,.26);
}
.btn-primary:hover { color: #fff; background: linear-gradient(135deg, #4b84ff, #1a4fe0); box-shadow: 0 8px 20px rgba(47,107,255,.34); }

.btn-teal { background: linear-gradient(135deg, #17c98f, #0da172); border-color: transparent; color: #fff; box-shadow: 0 6px 16px rgba(18,184,134,.24); }
.btn-teal:hover { color: #fff; background: linear-gradient(135deg, #1ad79a, #0b9669); }

.btn-danger { background: #fff; border-color: #ffd9d9; color: var(--rose); }
.btn-danger:hover { background: #fff5f5; border-color: #ffc4c4; color: #d92d2d; }

/* 警示色（琥珀）：回收 / 转未分配 / 释放等「改变归属、需谨慎」的批量操作，全局统一 */
.btn-warn { background: #fff; border-color: #ffe0a3; color: #b57200; }
.btn-warn:hover { background: #fff9ec; border-color: #ffcf66; color: #8a5600; }

/* 按钮内嵌动态数量（勾选/筛选条数）：全局统一高亮 */
.btn .ph-num { font-weight: 700; font-variant-numeric: tabular-nums; }

.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--line-2); color: var(--text); }

/* 次要但有实体感的按钮：浅底 + 细边，避免「看不出是按钮」 */
.btn-soft { background: #eef3fc; border-color: #d8e3f6; color: #33415c; font-weight: 600; }
.btn-soft:hover { background: #e2ecfd; border-color: #bcd2f2; color: var(--brand); }
.btn-soft:active { background: #d8e6fb; }

/* 统一的白底黑字按钮（查看拨号单等次要但有实体感的入口） */
.btn-white { background: #fff; border-color: #d3dae6; color: #1f2937; font-weight: 600; }
.btn-white:hover { background: #f5f8fd; border-color: #b9c5da; color: #111827; }
.btn-white:active { background: #eef3fb; }

/* 所属组织下拉树（v1.9.0） */
.dept-picker { position: relative; }
.dp-input {
  display: flex; align-items: center; justify-content: space-between;
  height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; cursor: pointer; font-size: 13.5px;
}
.dp-input:hover { border-color: #c7d5ee; }
.dp-placeholder { color: #a8b3c6; }
.dp-arrow { color: #9aa6bb; font-style: normal; font-size: 12px; }
.dept-picker.open .dp-input { border-color: #2f6bff; box-shadow: 0 0 0 3px rgba(47,107,255,.12); }
.dp-panel {
  display: none; position: absolute; z-index: 80; left: 0; right: 0; top: 42px;
  max-height: 260px; overflow: auto; background: #fff;
  border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 12px 28px rgba(15,23,42,.14); padding: 6px;
}
.dept-picker.open .dp-panel { display: block; }
.dp-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; border-radius: 8px; cursor: pointer; font-size: 13px;
}
.dp-item:hover { background: #f2f6fd; }
.dp-lv0 { padding-left: 10px; }
.dp-lv1 { padding-left: 26px; }
.dp-lv2 { padding-left: 42px; }
.dp-lv3 { padding-left: 58px; }
.dp-item.on { background: #eef3fc; color: #2f6bff; font-weight: 600; }
.dp-item.disabled { opacity: .38; cursor: not-allowed; }
.dp-item.disabled:hover { background: transparent; }
.dp-item.historical::after {
  content: '历史归属'; font-size: 10px; color: #b45309;
  background: #fef3c7; padding: 1px 5px; border-radius: 4px;
}
.dp-type {
  margin-left: auto; font-size: 10.5px; color: #9aa6bb;
  background: #f4f6fa; padding: 1px 6px; border-radius: 5px;
}
.dp-item.on .dp-type { background: #dbe7ff; color: #2f6bff; }
.dp-hint { margin-top: 6px; font-size: 12px; color: #8b96a8; }
.dp-hint.warn { color: #b45309; }

.btn-sm { height: 30px; padding: 0 11px; font-size: 12.5px; border-radius: 8px; }
.btn-lg { height: 44px; padding: 0 24px; font-size: 15px; border-radius: 12px; }
.btn-block { width: 100%; }

/* 系统设置：呼叫方式二选一 */
.call-mode-row { display: flex; flex-direction: column; gap: 8px; margin-top: 2px; }
.call-mode-opt {
  display: flex; align-items: flex-start; gap: 10px; cursor: pointer;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px;
  background: #fff; transition: border-color .15s, background .15s;
}
.call-mode-opt:hover { border-color: #bcd2f2; background: #f8fbff; }
.call-mode-opt input[type="radio"] { margin-top: 3px; flex: 0 0 auto; }
.call-mode-opt .cm-body { display: flex; flex-direction: column; gap: 2px; line-height: 1.45; }
.call-mode-opt .cm-body b { font-size: 13.5px; font-weight: 650; color: var(--text); }
.call-mode-opt .cm-body em { font-style: normal; font-size: 12px; color: var(--muted); }
.call-mode-opt:has(input:checked) { border-color: var(--brand); background: #f4f8ff; }
.call-mode-opt:has(input:checked) .cm-body b { color: var(--brand); }

/* 表格操作列：只占按钮本身宽度，不再吃掉多余空间 */
.table-ops th:last-child,
.table-ops td:last-child { width: 1%; white-space: nowrap; }
.table-ops th.right,
.table-ops td.right { padding-right: 18px; }

/* 表单 */
.input, .select, .textarea {
  width: 100%; height: 36px; padding: 0 12px; font-size: 13.5px; color: var(--text);
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  outline: none; transition: all .16s; font-family: inherit;
}
.textarea { height: auto; padding: 10px 12px; line-height: 1.65; resize: vertical; min-height: 92px; }
.input:hover, .select:hover, .textarea:hover { border-color: #d6e1f3; }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--brand); box-shadow: 0 0 0 3px rgba(47,107,255,.12);
}
.input::placeholder, .textarea::placeholder { color: #a9b5c8; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4.5L6 8.5L10 4.5' stroke='%237c8aa0' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; padding-right: 30px; }

.field { margin-bottom: 15px; }
.field > label { display: block; font-size: 12.5px; color: var(--text-2); font-weight: 600; margin-bottom: 6px; }
/* 开关本身就是 label，不能被上面的通用 label 规则破坏排版 */
.field > label.switch,
.field > .switch { display: inline-flex; font-weight: 400; margin-bottom: 0; }
.field > label.switch .label { font-weight: 500; }
.field > .switch + .hint { margin-top: 7px; }
.field .hint { font-size: 11.5px; color: var(--muted); margin-top: 5px; }
.field.required > label::after { content: " *"; color: var(--rose); }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 16px; }
.form-grid.three { grid-template-columns: repeat(3, minmax(0,1fr)); }
.form-grid .full { grid-column: 1 / -1; }

/* 开关 */
.switch { position: relative; display: inline-flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track {
  width: 42px; height: 24px; border-radius: 999px; background: #d7dfeb;
  transition: background .2s; flex: none; position: relative;
}
.switch .track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
  background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,.2);
  transition: transform .2s var(--ease);
}
.switch input:checked + .track { background: linear-gradient(135deg, #3d78ff, var(--brand-600)); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch .label { font-size: 13px; color: var(--text-2); }

/* 表单选项组（自定义字段单选/多选） */
.opt-group { display: flex; gap: 8px 14px; flex-wrap: wrap; padding: 2px 0; }
.opt-item { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); cursor: pointer; user-select: none; }
.opt-item input { width: 15px; height: 15px; accent-color: #3d78ff; margin: 0; cursor: pointer; }

/* 徽标 / 标签 */
.badge {
  display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 9px;
  border-radius: 999px; font-size: 11.5px; font-weight: 600; line-height: 1;
}
.badge-blue   { background: var(--brand-100); color: var(--brand-600); }
.badge-teal   { background: #e3faf3; color: #0b8f66; }
.badge-amber  { background: #fff4e0; color: #a86b00; }
.badge-rose   { background: #ffecec; color: #d92d2d; }
.badge-gray   { background: #eef2f7; color: #5c6b82; }
.badge-violet { background: #f0eaff; color: #5b32d6; }

.tag {
  display: inline-flex; align-items: center; gap: 5px; height: 23px; padding: 0 10px;
  border-radius: 7px; font-size: 12px; font-weight: 550; background: #eef3fb; color: #47566e;
}
.tag .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag-dotline { background: #fff; border: 1px solid var(--line); }

.stars { color: #f59f00; letter-spacing: 1px; font-size: 12px; }
.stars .off { color: #dfe6f0; }

/* 表格 */
.table-wrap { width: 100%; overflow-x: auto; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.table thead th {
  position: sticky; top: 0; z-index: 2;
  background: #f7f9fd; color: var(--muted); font-weight: 600; font-size: 12.5px;
  text-align: left; padding: 11px 14px; white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
.table tbody td {
  padding: 12px 14px; border-bottom: 1px solid var(--line-2);
  vertical-align: middle; white-space: nowrap;
}
.table tbody tr { transition: background .14s; }
.table tbody tr:hover { background: #f9fbff; }
.table tbody tr.selected { background: #f2f7ff; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .col-name { font-weight: 600; color: var(--text); }
.table .col-mobile { font-variant-numeric: tabular-nums; letter-spacing: .3px; }
.table .muted { color: var(--muted); font-size: 12.5px; }
.table .op { display: flex; gap: 6px; }

.table-card { border-radius: var(--r-lg); overflow: hidden; }

/* 空状态 */
.empty { padding: 60px 20px; text-align: center; color: var(--muted); }
.empty .ico { font-size: 40px; opacity: .35; margin-bottom: 10px; }
.empty p { margin: 0; font-size: 13.5px; }

/* 分页 */
.pager { display: flex; align-items: center; gap: 6px; padding: 14px 18px; flex-wrap: wrap; }
.pager .info { color: var(--muted); font-size: 12.5px; margin-right: auto; }
.pager a, .pager span {
  min-width: 32px; height: 32px; padding: 0 9px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; color: var(--text-2); border: 1px solid var(--line); background: #fff;
}
.pager a:hover { border-color: #cfddfa; color: var(--brand); }
.pager .active { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.pager .disabled { opacity: .45; pointer-events: none; }
.pager .pagesize { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.pager .pagesize select { height: 32px; padding: 0 26px 0 9px; border-radius: 8px; border: 1px solid var(--line); background: #fff; font-size: 12.5px; color: var(--text-2); }

/* 筛选条 */
.filter-bar {
  display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap;
  padding: 16px 20px; border-bottom: 1px solid var(--line-2); background: #fff;
}
.filter-bar .fitem { display: flex; flex-direction: column; gap: 5px; }
.filter-bar .fitem label { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.filter-bar .fitem .input, .filter-bar .fitem .select { height: 34px; min-width: 128px; }
.filter-bar .fitem.wide .input { min-width: 220px; }
.filter-bar .spacer { flex: 1; }

/* 统计卡 */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.kpi {
  position: relative; overflow: hidden; padding: 18px 20px;
  background: #fff; border-radius: var(--r-lg); border: 1px solid var(--line);
  box-shadow: var(--sh-1); transition: transform .2s var(--ease), box-shadow .2s;
}
.kpi:hover { transform: translateY(-2px); box-shadow: var(--sh-2); }
.kpi .k-label { font-size: 12.5px; color: var(--muted); font-weight: 550; display: flex; align-items: center; gap: 6px; }
.kpi .k-value { font-size: 27px; font-weight: 750; letter-spacing: -.6px; margin-top: 6px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.kpi .k-foot { font-size: 12px; color: var(--muted); margin-top: 6px; display: flex; align-items: center; gap: 5px; }
.kpi .k-ico {
  position: absolute; right: 14px; top: 14px; width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center; font-size: 17px; opacity: .9;
}
.kpi.blue  .k-ico { background: var(--brand-100); color: var(--brand); }
.kpi.teal  .k-ico { background: #e3faf3; color: #0b8f66; }
.kpi.amber .k-ico { background: #fff4e0; color: #a86b00; }
.kpi.rose  .k-ico { background: #ffecec; color: #d92d2d; }
.kpi.violet .k-ico { background: #f0eaff; color: #5b32d6; }
.kpi.blue::before, .kpi.teal::before, .kpi.amber::before, .kpi.rose::before, .kpi.violet::before {
  content: ""; position: absolute; left: 0; top: 0; width: 3px; height: 100%;
}
.kpi.blue::before { background: var(--brand); }
.kpi.teal::before { background: var(--teal); }
.kpi.amber::before { background: var(--amber); }
.kpi.rose::before { background: var(--rose); }
.kpi.violet::before { background: var(--violet); }

/* 网格 */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-2-1 { grid-template-columns: 2fr 1fr; }
.grid-1-2 { grid-template-columns: 1fr 2fr; }

/* 迷你柱状图 */
.bars { display: flex; align-items: flex-end; gap: 10px; height: 150px; padding: 8px 2px 0;
  overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.bars::-webkit-scrollbar { display: none; }
.bars .bar { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 7px; height: 100%; justify-content: flex-end; }
.bars .bar i {
  display: block; width: 100%; max-width: 34px; border-radius: 7px 7px 3px 3px;
  background: linear-gradient(180deg, #6ea0ff, var(--brand));
  transition: height .5s var(--ease); position: relative;
}
.bars .bar:hover i { background: linear-gradient(180deg, #86b2ff, #1d54e8); }
.bars .bar b { font-size: 11px; color: var(--muted); font-weight: 500; }
.bars .bar em { font-size: 11px; color: var(--brand); font-style: normal; font-weight: 700; }

/* 进度条 */
.progress { height: 7px; border-radius: 999px; background: #eef2f8; overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #4d8bff, var(--brand)); transition: width .4s var(--ease); }

/* 列表行 */
.rank-row { display: flex; align-items: center; gap: 11px; padding: 10px 0; border-bottom: 1px dashed var(--line-2); }
.rank-row:last-child { border-bottom: 0; }
.rank-no {
  width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center;
  font-size: 11.5px; font-weight: 700; background: #eef2f8; color: #66748c; flex: none;
}
.rank-row:nth-child(1) .rank-no { background: linear-gradient(135deg,#ffd43b,#f59f00); color: #7a4a00; }
.rank-row:nth-child(2) .rank-no { background: linear-gradient(135deg,#dee2e6,#adb5bd); color: #495057; }
.rank-row:nth-child(3) .rank-no { background: linear-gradient(135deg,#ffc9a2,#e8843c); color: #7a3d00; }

/* 提示条 */
.alert { display: flex; gap: 11px; padding: 13px 16px; border-radius: var(--r); font-size: 13px; line-height: 1.65; }
.alert .ico { flex: none; font-size: 15px; }
.alert-info { background: var(--brand-50); color: #2b4f9e; border: 1px solid #dfe9ff; }
.alert-warn { background: #fff9ec; color: #8a5c00; border: 1px solid #ffe9bf; }
.alert-danger { background: #fff5f5; color: #b42318; border: 1px solid #ffdcdc; }
.alert-teal { background: #effcf7; color: #067a58; border: 1px solid #c9f2e4; }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); padding: 0 20px; overflow-x: auto; }
.tabs a {
  padding: 12px 14px; font-size: 13.5px; color: var(--muted); font-weight: 550;
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.tabs a:hover { color: var(--brand); }
.tabs a.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 650; }

/* 时间轴 */
.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(180deg,#dbe6fa,#eef2f8); }
.tl-item { position: relative; padding: 0 0 16px; }
.tl-item::before {
  content: ""; position: absolute; left: -21px; top: 5px; width: 10px; height: 10px; border-radius: 50%;
  background: #fff; border: 2px solid var(--brand); box-shadow: 0 0 0 3px rgba(47,107,255,.10);
}
.tl-item.teal::before { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(18,184,134,.12); }
.tl-head { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.tl-head b { color: var(--text); font-size: 13px; font-weight: 600; }
.tl-body { margin-top: 4px; font-size: 13px; color: var(--text-2); line-height: 1.7; word-break: break-word; }

/* 描述列表 */
.dl { display: grid; grid-template-columns: 88px 1fr; gap: 8px 12px; font-size: 13px; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; color: var(--text); word-break: break-all; }

/* ==========================================================================
   弹窗 / 抽屉 / Toast
   ========================================================================== */
.mask {
  position: fixed; inset: 0; background: rgba(15,23,42,.45);
  backdrop-filter: blur(2px); z-index: 100; opacity: 0; visibility: hidden;
  transition: opacity .2s, visibility .2s;
}
.mask.show { opacity: 1; visibility: visible; }

.modal {
  position: fixed; z-index: 101; left: 50%; top: 50%;
  transform: translate(-50%, -46%) scale(.98); opacity: 0; visibility: hidden;
  width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 60px); max-height: calc(100dvh - 60px);
  background: #fff; border-radius: var(--r-xl); box-shadow: var(--sh-4);
  display: flex; flex-direction: column; overflow: hidden;
  transition: all .24s var(--ease);
}
.modal.show { opacity: 1; visibility: visible; transform: translate(-50%, -50%) scale(1); }
.modal.wide { width: min(1120px, calc(100vw - 40px)); }
.modal.narrow { width: min(480px, calc(100vw - 32px)); }

.modal-head {
  display: flex; align-items: center; gap: 12px; padding: 16px 20px;
  border-bottom: 1px solid var(--line-2); flex: none;
}
.modal-head h3 { margin: 0; font-size: 16px; font-weight: 680; }
.modal-head .close {
  margin-left: auto; width: 32px; height: 32px; border-radius: 9px; border: 0; background: transparent;
  color: var(--muted); font-size: 18px; cursor: pointer; display: grid; place-items: center;
}
.modal-head .close:hover { background: var(--line-2); color: var(--text); }
.modal-body { padding: 20px; overflow-y: auto; flex: 1; }
.modal-body.tight { padding: 0; }
.modal-foot {
  display: flex; align-items: center; gap: 9px; padding: 14px 20px;
  border-top: 1px solid var(--line-2); background: #fcfdff; flex: none;
}
.modal-foot .left { margin-right: auto; display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); }

/* 跟进弹窗专属布局 */
.follow-layout { display: grid; grid-template-columns: 330px 1fr; min-height: 460px; }
.follow-side { border-right: 1px solid var(--line-2); padding: 18px; background: #fbfcff; overflow-y: auto; }
.follow-main { padding: 18px 20px; display: flex; flex-direction: column; min-width: 0; }
.cust-name { font-size: 19px; font-weight: 720; letter-spacing: -.3px; display: flex; align-items: center; gap: 8px; }
.cust-mobile {
  margin-top: 8px; display: flex; align-items: center; gap: 8px;
  font-size: 16px; font-weight: 650; color: var(--brand); font-variant-numeric: tabular-nums;
}
.cust-mobile .call-btn {
  width: 30px; height: 30px; border-radius: 9px; border: 1px solid #d9e5ff; background: #fff;
  color: var(--brand); cursor: pointer; display: grid; place-items: center; font-size: 14px;
}
.cust-mobile .call-btn:hover { background: var(--brand-50); }

.quick-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); background: #fff;
  font-size: 12.5px; color: var(--text-2); cursor: pointer; transition: all .14s; user-select: none;
}
.chip:hover { border-color: #cfddfa; color: var(--brand); background: var(--brand-50); }
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }

.quick-text { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.quick-text .q {
  padding: 3px 9px; border-radius: 6px; background: #f1f5fb; color: #4b5c76;
  font-size: 12px; cursor: pointer; border: 1px solid transparent;
}
.quick-text .q:hover { background: var(--brand-100); color: var(--brand-600); border-color: #d6e4ff; }

/* 抽屉 */
.drawer {
  position: fixed; z-index: 101; top: 0; right: 0; height: 100%;
  width: min(460px, 92vw); background: #fff; box-shadow: var(--sh-4);
  transform: translateX(102%); transition: transform .28s var(--ease);
  display: flex; flex-direction: column;
}
.drawer.show { transform: translateX(0); }
.drawer-head { display: flex; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line-2); }
.drawer-body { padding: 18px 20px; overflow-y: auto; flex: 1; }

/* Toast */
.toast-wrap { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 9px; padding: 10px 16px; border-radius: 11px;
  background: #fff; box-shadow: var(--sh-3); font-size: 13.5px; font-weight: 500;
  border: 1px solid var(--line); animation: toastIn .26s var(--ease);
  max-width: 82vw;
}
.toast.ok  { border-color: #c9f2e4; color: #067a58; background: #f4fdfa; }
.toast.err { border-color: #ffdcdc; color: #b42318; background: #fff7f7; }
.toast .ico { font-size: 14px; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px) scale(.96); } to { opacity: 1; transform: none; } }

/* 骨架屏 */
.skeleton { background: linear-gradient(90deg,#eef2f8 25%,#f6f9fd 37%,#eef2f8 63%); background-size: 400% 100%; animation: sk 1.3s ease infinite; border-radius: 8px; }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* 工具类 */
.mt-0{margin-top:0}.mt-1{margin-top:8px}.mt-2{margin-top:16px}.mt-3{margin-top:24px}
.mb-1{margin-bottom:8px}.mb-2{margin-bottom:16px}.mb-3{margin-bottom:24px}
.flex{display:flex}.between{justify-content:space-between}.center{align-items:center}
.gap-1{gap:8px}.gap-2{gap:16px}
.muted{color:var(--muted)}.text-sm{font-size:12.5px}.text-lg{font-size:16px}
.bold{font-weight:650}.right{text-align:right}.nowrap{white-space:nowrap}
.hidden{display:none !important}
.mono{font-variant-numeric: tabular-nums; font-family: ui-monospace, SFMono-Regular, Menlo, monospace}

/* ==========================================================================
   登录页
   ========================================================================== */
.login-page {
  min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr;
  background: #0b1220; overflow: hidden;
}
.login-visual {
  position: relative; padding: 56px 60px; color: #fff; overflow: hidden;
  background:
    radial-gradient(900px 500px at 12% 18%, rgba(47,107,255,.42), transparent 62%),
    radial-gradient(700px 500px at 88% 82%, rgba(18,184,134,.30), transparent 60%),
    linear-gradient(140deg, #071022 0%, #0d1c36 48%, #0a1526 100%);
  display: flex; flex-direction: column;
}
.login-visual::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 46px 46px; mask-image: radial-gradient(circle at 30% 30%, #000 30%, transparent 78%);
}
.login-brand { display: flex; align-items: center; gap: 12px; position: relative; z-index: 2; }
.login-brand .brand-logo { width: 42px; height: 42px; border-radius: 12px; font-size: 18px; }
.login-brand h1 { font-size: 19px; margin: 0; font-weight: 700; letter-spacing: .5px; }
.login-brand span { font-size: 11px; color: #7f93b4; letter-spacing: 3px; }

.login-copy { position: relative; z-index: 2; margin-top: auto; }
.login-copy h2 { font-size: 38px; line-height: 1.24; margin: 0 0 16px; font-weight: 750; letter-spacing: -1px; }
.login-copy h2 em { font-style: normal; background: linear-gradient(120deg,#6ea0ff,#3ddc97); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login-copy p { color: #9db0cc; font-size: 14.5px; line-height: 1.9; max-width: 480px; margin: 0; }
.login-feats { display: flex; gap: 26px; margin-top: 34px; position: relative; z-index: 2; flex-wrap: wrap; }
.login-feats div { font-size: 12.5px; color: #8ba0c0; }
.login-feats b { display: block; font-size: 22px; color: #fff; font-weight: 750; letter-spacing: -.5px; }

.login-panel { background: #fff; display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.login-box { width: 100%; max-width: 372px; }
.login-box h3 { font-size: 24px; margin: 0 0 6px; font-weight: 720; letter-spacing: -.4px; }
.login-box .sub { color: var(--muted); font-size: 13.5px; margin: 0 0 26px; }
.login-box .sub.has-alert { margin-bottom: 14px; }
.login-alert { display: flex; align-items: flex-start; gap: 8px; background: #fff4f4; border: 1px solid #ffd7d7;
  color: #d64545; font-size: 12.5px; line-height: 1.6; padding: 10px 12px; border-radius: 10px; margin: 0 0 16px; }
.login-alert svg { flex: none; margin-top: 2px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.login-field { position: relative; margin-bottom: 14px; }
.login-field .ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #a9b5c8; font-size: 15px; }
.login-field .input { height: 46px; padding-left: 40px; border-radius: 12px; background: #f8fafd; border-color: #e8eef8; font-size: 14px; }
.login-field .input:focus { background: #fff; }
.login-row { display: flex; gap: 10px; }
/* v3.10.1：画布回调到 140x44（字符约 28px 高、约 v3.9.0 的 1.9 倍），
   容器同步回调到协调尺寸；object-fit:contain 保证不变形、边缘不裁切。 */
.captcha-box { width: 112px; height: 34px; border-radius: 9px; overflow: hidden; border: 1px solid #e8eef8; cursor: pointer; flex: none; background: #eef3ff; }
.captcha-box img, .captcha-box svg { width: 100%; height: 100%; display: block; object-fit: contain; }
.login-opt { display: flex; align-items: center; justify-content: space-between; margin: 14px 0 20px; font-size: 12.5px; color: var(--muted); }
.login-btn { height: 46px; border-radius: 12px; font-size: 15px; font-weight: 600; }
.login-foot { margin-top: 26px; text-align: center; font-size: 12px; color: #a3aec2; line-height: 1.9; }
/* 登录页 · 注册入口（开启注册后显示）：胶囊按钮 */
.login-register {
  display: inline-flex; align-items: center; gap: 5px;
  height: 30px; padding: 0 13px 0 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f0f5ff 0%, #e2ecff 100%);
  border: 1px solid #c5daff;
  color: #2461f5; font-size: 13px; font-weight: 650;
  text-decoration: none; white-space: nowrap;
  transition: background .18s, border-color .18s, box-shadow .18s, transform .18s;
}
.login-register svg { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; flex: none; }
.login-register:hover {
  background: linear-gradient(135deg, #e4edff 0%, #d6e5ff 100%);
  border-color: #b7d0ff;
  box-shadow: 0 6px 16px -8px rgba(47,107,255,.6);
  transform: translateY(-1px);
  text-decoration: none;
}
.login-register:active { transform: translateY(0); box-shadow: none; }
@media (max-width: 400px) {
  .login-register { padding: 0 9px; }
  .login-register span { display: none; }
}

@media (max-width: 960px) {
  .login-page { grid-template-columns: 1fr; }
  .login-visual { display: none; }
  .login-panel { min-height: 100vh; background: linear-gradient(180deg,#f7faff,#fff 40%); align-items: flex-start; padding-top: 54px; }
}

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 1280px) {
  .grid-2-1, .grid-1-2 { grid-template-columns: 1fr; }
}
@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); width: var(--sidebar-w); box-shadow: var(--sh-4); }
  .layout.nav-open .sidebar { transform: translateX(0); }
  .main { margin-left: 0 !important; }
  .layout.mini .sidebar { width: var(--sidebar-w); }
  .layout.mini .brand-name, .layout.mini .brand-sub, .layout.mini .nav-title span.txt,
  .layout.mini .nav-title .arrow, .layout.mini .nav-sub { display: revert; }
  .layout.mini .nav-title { justify-content: flex-start; padding: 10px 12px; }
  .nav-backdrop {
    position: fixed; inset: 0; background: rgba(15,23,42,.42); z-index: 55; display: none;
  }
  .layout.nav-open .nav-backdrop { display: block; }
  .follow-layout { grid-template-columns: 1fr; }
  .follow-side { border-right: 0; border-bottom: 1px solid var(--line-2); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 768px) {
  .content { padding: 14px; }
  .header { padding: 0 14px; gap: 8px; }
  .page-title { font-size: 18px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .form-grid, .form-grid.three { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
  .kpi { padding: 14px; }
  .kpi .k-value { font-size: 22px; }
  .kpi .k-ico { width: 30px; height: 30px; font-size: 14px; right: 10px; top: 10px; }
  .modal, .modal.wide, .modal.xwide { width: calc(100vw - 16px); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); border-radius: 16px; }
  .modal-body { padding: 14px; }
  .filter-bar { padding: 12px 14px; gap: 8px; }
  .filter-bar .fitem { flex: 1 1 46%; }
  .filter-bar .fitem .input, .filter-bar .fitem .select { min-width: 0; width: 100%; }
  .filter-bar .fitem.wide { flex-basis: 100%; }
  .filter-bar .fitem.wide .input { min-width: 0; }
  .user-meta { display: none; }
  .pager .info { width: 100%; margin-bottom: 6px; }
  /* 手机版：页数过多时，分页改为「自身容器内部横向滚动」，
     而非撑宽整页导致整页横向拉拽。min-width:0 是 flex 子项能收缩到
     100% 并内部滚动的关键（flex 默认 min-width:auto 会拒绝收缩）。 */
  .pagination {
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  .table thead th, .table tbody td { padding: 10px 11px; }
  /* 窄屏隐藏次要列，保证「操作」列落在首屏（表格仍可横向滚动，只是不用滑）
     用法：<th class="col-s-hide"> / <td class="col-s-hide"> */
  .table .col-s-hide { display: none; }
  .page-head .actions { width: 100%; margin-left: 0; }
  /* 按钮按内容宽度排列，放不下就换行；不要 flex:1 等分 ——
     等分遇到「超期未跟进 9」这种长文案会挤爆容器，手机端整页横向滚动 */
  .page-head .actions .btn { flex: 0 1 auto; }
  .dl { grid-template-columns: 76px 1fr; }
  .tabs { padding: 0 14px; }
}

/* ==========================================================================
   分页（兼容 ThinkPHP Bootstrap 分页器输出）
   ========================================================================== */
.pagination {
  display: inline-flex; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0;
}
.pagination > li > a, .pagination > li > span {
  min-width: 32px; height: 32px; padding: 0 9px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; color: var(--text-2); border: 1px solid var(--line); background: #fff;
  text-decoration: none;
}
.pagination > li > a:hover { border-color: #cfddfa; color: var(--brand); }
.pagination > li.active > span {
  background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600;
}
.pagination > li.disabled > span { opacity: .45; }

/* ==========================================================================
   内联 SVG 图标（侧栏）
   ========================================================================== */
.ico {
  width: 18px; height: 18px; flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .92;
}
.nav-title:hover .ico, .nav-group.open > .nav-title .ico { opacity: 1; }

/* 空状态图标：统一改用内联 SVG，避免不同系统 emoji 字体差异 */
.empty .ico {
  font-size: 0; width: 46px; height: 46px; margin: 0 auto 12px; opacity: .28;
  background: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237c8aa0' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 13h5l1.5 2.5h5L16 13h5'/%3E%3Cpath d='M4.5 5.5h15l1.5 7.5v4.5a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V13z'/%3E%3C/svg%3E") center/contain no-repeat;
}
.kpi .k-ico svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.login-field .ico svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ==========================================================================
   顶栏：首页按钮 + 用户下拉
   ========================================================================== */
.home-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 12px; border-radius: 9px;
  border: 1px solid var(--line); background: #fff;
  color: var(--text-2); font-size: 13px; font-weight: 550;
  text-decoration: none; transition: all .16s; white-space: nowrap;
}
.home-btn:hover { border-color: #cfddfa; color: var(--brand); background: var(--brand-50); }

.user-menu { position: relative; }
.user-drop {
  position: absolute; right: 0; top: calc(100% + 8px); width: 214px;
  background: #fff; border: 1px solid var(--line); border-radius: 13px;
  box-shadow: var(--sh-3); padding: 6px; z-index: 80;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: all .18s var(--ease);
}
.user-drop.show { opacity: 1; visibility: visible; transform: none; }
.user-drop .ud-head {
  padding: 10px 10px 8px; border-bottom: 1px solid var(--line-2); margin-bottom: 4px;
}
.user-drop .ud-head b { display: block; font-size: 13.5px; }
.user-drop .ud-head span { font-size: 11.5px; color: var(--muted); }
.user-drop a {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 10px; border-radius: 8px; font-size: 13px; color: var(--text-2); text-decoration: none;
}
.user-drop a span { width: 16px; text-align: center; opacity: .7; font-size: 13px; }
.user-drop a em {
  margin-left: auto; font-style: normal; background: var(--rose); color: #fff;
  font-size: 10px; padding: 1px 6px; border-radius: 999px; font-weight: 700;
}
.user-drop a:hover { background: var(--brand-50); color: var(--brand); }
.user-drop a.danger:hover { background: #fff5f5; color: var(--rose); }
.user-drop .ud-line { height: 1px; background: var(--line-2); margin: 4px 6px; }

@media (max-width: 1024px) { .home-btn span { display: none; } .home-btn { padding: 0 10px; } }

/* ==========================================================================
   客户状态横向按钮 / 列表排序 / 最近跟进
   ========================================================================== */
.status-bar {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px;
}
.status-bar .s-btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 34px; padding: 0 14px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line);
  font-size: 13px; color: var(--text-2); text-decoration: none;
  transition: all .16s var(--ease); white-space: nowrap;
}
.status-bar .s-btn i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.status-bar .s-btn em {
  font-style: normal; font-size: 11px; color: var(--muted);
  background: #f1f5fa; padding: 1px 6px; border-radius: 999px; font-weight: 600;
}
.status-bar .s-btn:hover { border-color: #cfddfa; color: var(--brand); }
.status-bar .s-btn.on {
  background: linear-gradient(135deg, #3d78ff, var(--brand-600));
  border-color: transparent; color: #fff;
  box-shadow: 0 6px 16px rgba(47,107,255,.26);
}
.status-bar .s-btn.on em { background: rgba(255,255,255,.22); color: #fff; }
.status-bar .s-btn.on i { background: #fff !important; }

.table th.sortable { cursor: pointer; user-select: none; }
.table th.sortable:hover { color: var(--brand); }
.table th.sortable.sorted { color: var(--brand); }
/* 排序箭头用 CSS 三角绘制，不依赖字体，避免出现方块/问号等「字段显示异常」 */
.table th.sortable .sort-ico {
  display: inline-block; width: 0; height: 0; margin-left: 3px; vertical-align: middle;
  border-left: 4px solid transparent; border-right: 4px solid transparent;
  border-top: 5px solid #c3ccd9; opacity: .8;
}
.table th.sortable:hover .sort-ico { border-top-color: var(--brand); }
.table th.sortable .sort-ico.asc { border-top: 0; border-bottom: 5px solid var(--brand); opacity: 1; }
.table th.sortable .sort-ico.desc { border-top: 5px solid var(--brand); opacity: 1; }

.rf-list { display: flex; flex-direction: column; gap: 3px; }
.rf-item { display: flex; gap: 7px; align-items: baseline; font-size: 12px; line-height: 1.5; }
.rf-item .rf-t { color: #a3aec2; flex: none; font-variant-numeric: tabular-nums; }
.rf-item .rf-c {
  color: #5c6b82; white-space: normal; word-break: break-all; max-width: 300px;
}
.rf-item.today .rf-t { color: var(--brand); font-weight: 700; }
.rf-item.today .rf-c { color: #1d54e8; }
.rf-item.today::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--brand);
  /* v3.10.4：跟进内容换行后整行变高，align-self:center 会把圆点垂直居中到多行中间而错位；
     改为贴顶对齐首行，再用 margin-top 让它与 12px/1.5 行高的首行文字垂直居中。 */
  align-self: flex-start; flex: none; margin: 6px -2px 0 0;
}
tr.today-row td { background: #f7fbff; }
tr.today-row:hover td { background: #f2f8ff; }

/* ==========================================================================
   组织成员树
   ========================================================================== */
.mtree { padding: 6px 2px; }
.mt-node {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px; border-radius: 8px; cursor: default;
  font-size: 13px; transition: background .14s;
  position: relative;
}
.mt-node:hover { background: var(--brand-50, #eef3ff); }
.mt-node.mt-branch { font-weight: 600; color: var(--text); }
.mt-node.mt-user { color: var(--text-2); }
.mt-node.mt-user:hover { background: #f4f7fb; }
.mt-caret {
  width: 16px; height: 16px; line-height: 16px; text-align: center;
  font-size: 10px; color: var(--muted); cursor: pointer; flex: none;
  user-select: none; border-radius: 4px; transition: all .16s, transform .16s;
}
.mt-caret:hover { background: var(--line-2); color: var(--brand); }
.mt-caret.collapsed { transform: rotate(-90deg); }
.mt-check { display: inline-flex; align-items: center; flex: none; }
.mt-check input { width: 15px; height: 15px; accent-color: var(--brand); cursor: pointer; }
.mt-dot { width: 6px; height: 6px; border-radius: 50%; background: #c9d4e5; flex: none; }
.mt-node.mt-user .mt-dot { background: var(--brand); box-shadow: 0 0 0 3px rgba(47,107,255,.12); }
.mt-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-role { font-style: normal; font-size: 11px; color: var(--muted); background: #f1f5fa; padding: 1px 7px; border-radius: 999px; }
.mt-count { font-style: normal; font-size: 11px; color: var(--muted); background: #f1f5fa; padding: 0 6px; border-radius: 999px; min-width: 18px; text-align: center; }
.mt-children { overflow: hidden; position: relative; }
/* 子节点引导竖线，让层级更清晰 */
.mt-children::before {
  content: ''; position: absolute; left: 20px; top: 0; bottom: 6px;
  width: 1px; background: var(--line-2, #e8edf4);
}

/* 分配页：左列表 + 右成员树 */
.assign-layout { display: grid; grid-template-columns: 1fr 320px; gap: 16px; align-items: start; }
.assign-side { position: sticky; top: 76px; }
@media (max-width: 1200px) {
  .assign-layout { grid-template-columns: 1fr; }
  .assign-side { position: static; }
}
.assign-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 14px 20px; border-bottom: 1px solid var(--line-2); background: #fbfdff;
}
.assign-bar .pick-info { font-size: 12.5px; color: var(--muted); }
.assign-bar .pick-info b { color: var(--brand); font-size: 15px; }
.range-input { width: 84px; height: 34px; text-align: center; }

/* ==========================================================================
   公告 & 简易富文本
   ========================================================================== */
.ntc-title { font-size: 15px; font-weight: 700; color: var(--text); }
.ntc-title:hover { color: var(--brand); }
.ntc-brief { color: #47566e; line-height: 1.8; margin-top: 2px; }

.rte { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.rte-bar {
  display: flex; align-items: center; gap: 2px; flex-wrap: wrap;
  padding: 6px 8px; background: #f8fafd; border-bottom: 1px solid var(--line);
}
.rte-bar button {
  min-width: 30px; height: 28px; padding: 0 8px; border-radius: 6px;
  border: 1px solid transparent; background: transparent; cursor: pointer;
  font-size: 12.5px; color: var(--text-2);
}
.rte-bar button:hover { background: #fff; border-color: var(--line); color: var(--brand); }
.rte-bar .rte-sep { width: 1px; height: 16px; background: var(--line); margin: 0 5px; }
.rte-body {
  min-height: 170px; padding: 12px 14px; outline: none; font-size: 13.5px; line-height: 1.8;
  background: #fff;
}
.rte-body:empty::before {
  content: attr(data-placeholder); color: #a9b5c8; font-size: 13px;
}
.rte-view { font-size: 14px; line-height: 1.9; color: var(--text-2); word-break: break-word; }
.rte-view img { max-width: 100%; height: auto; border-radius: 8px; }
.rte-view h1, .rte-view h2, .rte-view h3 { margin: 12px 0 8px; color: var(--text); }
.rte-view ul, .rte-view ol { padding-left: 22px; margin: 8px 0; }
.rte-view a { color: var(--brand); }

/* 字段多选网格 */
.chk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px 12px; }
.chk-item { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-2); padding: 5px 8px; border-radius: 7px; cursor: pointer; }
.chk-item:hover { background: var(--line-2); }
.chk-item input { width: 15px; height: 15px; accent-color: var(--brand); }

/* ==========================================================================
   API 对接手册
   ========================================================================== */
.doc-wrap { display: flex; flex-direction: column; gap: 16px; }
.doc-wrap .card { margin: 0; }
.doc-p { font-size: 13.5px; line-height: 1.9; color: #47566e; margin: 0 0 10px; }
.doc-ol, .doc-ul { margin: 0 0 8px; padding-left: 22px; font-size: 13.5px; line-height: 2; color: #47566e; }
.doc-ol li, .doc-ul li { margin-bottom: 2px; }
.doc-formula {
  background: #f4f7fd; border: 1px solid #e0e9f8; border-radius: 10px;
  padding: 14px 18px; font-size: 13.5px; color: #1d4ed8; margin: 10px 0 16px;
  overflow-x: auto; white-space: nowrap;
}
.doc-code {
  background: #0f172a; color: #cbd5e1; border-radius: 10px;
  padding: 16px 18px; font: 12.5px/1.85 Consolas, Monaco, "Courier New", monospace;
  overflow-x: auto; white-space: pre; margin: 10px 0;
}
.api-item { padding: 14px 0; border-bottom: 1px dashed var(--line); }
.api-item:last-child { border-bottom: 0; }
.api-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.api-method {
  font-size: 11px; font-weight: 800; letter-spacing: .5px; padding: 3px 9px; border-radius: 6px; color: #fff;
}
.api-method.post { background: #0b8f66; }
.api-method.get  { background: #2f6bff; }
.api-url {
  background: #f4f7fd; border: 1px solid #e0e9f8; padding: 4px 10px; border-radius: 7px;
  font-size: 12.5px; color: #1d4ed8; word-break: break-all;
}
.doc-tabs { display: flex; gap: 6px; margin-bottom: 4px; flex-wrap: wrap; }
.doc-tab {
  padding: 7px 16px; border-radius: 8px; border: 1px solid var(--line);
  background: #fff; font-size: 13px; color: var(--text-2); cursor: pointer;
}
.doc-tab:hover { border-color: #cfddfa; color: var(--brand); }
.doc-tab.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.doc-pane { display: none; }
.doc-pane.on { display: block; }
@media print {
  .sidebar, .topbar, .page-head .actions, .doc-tabs { display: none !important; }
  .main { margin: 0 !important; }
  .doc-pane { display: block !important; }
  .card { break-inside: avoid; }
}

/* ==========================================================================
   高级筛选折叠区
   ========================================================================== */
.adv-filter { border-top: 1px solid var(--line-2); }
.adv-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 20px; cursor: pointer; font-size: 12.5px; color: #6b7a90;
  background: #fbfdff; user-select: none;
}
.adv-head:hover { color: var(--brand); background: var(--brand-50); }
.adv-head .adv-caret { font-size: 10px; opacity: .6; }
.adv-body { border-top: 1px dashed var(--line-2); }
.adv-body .filter-bar { border-bottom: 0; }

/* ==========================================================================
   客户选择列表（业绩提报 / 手机号匹配多条时）
   ========================================================================== */
.pick-list { display: flex; flex-direction: column; gap: 8px; max-height: 340px; overflow-y: auto; }
.pick-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px;
  cursor: pointer; transition: all .15s;
}
.pick-item:hover { border-color: #cfddfa; background: var(--brand-50); }
.pick-item .pi-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pick-item .pi-main b { font-size: 14px; color: var(--text); }
.pick-item .pi-meta { font-size: 12px; color: var(--muted); }
.pick-item .pi-side { text-align: right; font-size: 12px; color: var(--text-2); flex: none; }
.pick-item .pi-side em { display: block; font-style: normal; font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* 登陆码点击复制 */
.code-copy { transition: opacity .15s; }
.code-copy:hover { opacity: .7; text-decoration: underline dotted; }

/* ======================================================================
   v1.4.1：跟进弹窗放大 + 客户资料锁定 + 提醒强化
   ====================================================================== */
.modal.xwide { width: min(1320px, calc(100vw - 24px)); height: min(920px, calc(100vh - 24px)); height: min(920px, calc(100dvh - 24px)); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); }
.follow-layout.wide {
  grid-template-columns: 430px 1fr;
  flex: 1; min-height: 0; overflow: hidden;
}
.modal.xwide .follow-side { padding: 16px 18px; }
.modal.xwide .follow-main { padding: 16px 18px; }
.follow-layout.wide .follow-side .form-grid { gap: 0 12px; }
.follow-layout.wide .follow-side .field > label { font-size: 12px; }
.follow-layout.wide .follow-side .input,
.follow-layout.wide .follow-side .select { height: 38px; font-size: 13px; }
.lock-tip { font-size: 11px; color: #98a4b7; font-weight: 400; margin-left: 4px; }
.input.locked { background: #f1f4f9; color: #7d8ba1; cursor: not-allowed; }
.input.locked:focus { background: #f1f4f9; border-color: #e8eef8; box-shadow: none; }

/* 顶部铃铛：更醒目（红点 + 脉冲） */
.icon-btn .dot-badge {
  min-width: 18px; height: 18px; line-height: 18px; font-size: 10.5px;
  background: linear-gradient(135deg, #ff6b6b, #e03131);
  box-shadow: 0 0 0 2px #fff, 0 2px 8px rgba(224, 49, 49, .45);
}
.icon-btn.has-unread .dot-badge { animation: bellPulse 1.8s ease-in-out infinite; }
.icon-btn.has-unread { color: var(--rose); }
@keyframes bellPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 2px #fff, 0 2px 8px rgba(224,49,49,.45); }
  50%      { transform: scale(1.14); box-shadow: 0 0 0 4px rgba(224,49,49,.16), 0 2px 10px rgba(224,49,49,.5); }
}

/* 新消息浮层通知（右上角，可关闭 / 可点击查看） */
.remind-pop {
  position: fixed; top: 66px; right: 18px; z-index: 320; width: 340px; max-width: calc(100vw - 24px);
  display: flex; flex-direction: column; gap: 8px;
}
.remind-card {
  background: #fff; border-radius: 13px; box-shadow: 0 14px 40px rgba(15,23,42,.16);
  border: 1px solid #e6eefb; border-left: 4px solid var(--rose);
  padding: 12px 13px; animation: popIn .22s var(--ease); cursor: pointer;
}
.remind-card .rc-head { display: flex; align-items: center; gap: 7px; }
.remind-card .rc-title { font-size: 13px; font-weight: 650; color: #0f172a; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.remind-card .rc-body { font-size: 12.5px; color: #5b6b82; margin-top: 5px; line-height: 1.6; }
.remind-card .rc-close {
  border: 0; background: transparent; color: #a9b5c8; cursor: pointer; font-size: 15px; line-height: 1; padding: 2px 4px;
}
.remind-card .rc-close:hover { color: #495a72; }
@keyframes popIn { from { opacity: 0; transform: translateX(20px) scale(.97); } to { opacity: 1; transform: none; } }

/* 消息中心条目 */
.msg-item { padding: 14px 18px; border-bottom: 1px solid var(--line-2); display: flex; gap: 11px; align-items: flex-start; }
.msg-item.unread { background: #f6faff; }
.msg-item .msg-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--rose); margin-top: 7px; flex: none; }
.msg-item .msg-main { flex: 1; min-width: 0; }
.msg-item .msg-title { font-size: 13.5px; font-weight: 620; color: #0f172a; }
.msg-item .msg-content { font-size: 12.8px; color: #5b6b82; margin-top: 3px; line-height: 1.65; }
.msg-item .msg-time { font-size: 12px; color: #98a4b7; white-space: nowrap; margin-left: 10px; }
.cust-filter .adv-body .filter-bar { border-bottom: 0; }
.cust-filter .adv-num {
  display: inline-block; min-width: 16px; height: 16px; line-height: 16px; padding: 0 4px;
  border-radius: 8px; background: var(--brand); color: #fff; font-size: 10.5px; font-style: normal; margin: 0 2px;
}

/* ======================================================================
   v1.4.2：跟进弹窗记录分类 / 呼叫二维码 / 紧凑筛选 / 自定义字段标签
   ====================================================================== */

/* 跟进记录 · 生命周期 标签页 */
.rec-wrap {
  border-top: 1px solid var(--line-2); padding-top: 10px; margin-top: 4px;
  flex: 1; min-height: 0; display: flex; flex-direction: column;
}
.rec-tabs { display: flex; gap: 6px; margin-bottom: 8px; flex: none; }
.rec-tab {
  border: 1px solid var(--line); background: #fff; border-radius: 9px; padding: 5px 12px;
  font-size: 12.5px; color: #55637a; cursor: pointer; transition: all .14s;
}
.rec-tab em { font-style: normal; color: #98a4b7; margin-left: 4px; font-variant-numeric: tabular-nums; }
.rec-tab:hover { border-color: #cfddfa; color: var(--brand); }
.rec-tab.on { background: var(--brand-50); border-color: #cfddfa; color: var(--brand); font-weight: 620; }
.rec-tab.on em { color: var(--brand); }
.rec-body { overflow-y: auto; padding-right: 6px; flex: 1; min-height: 0; }
.timeline .tl-item.log .tl-body { color: #4b5c76; }

/* 呼叫助手二维码 */
.call-state {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px;
  background: #f5f8ff; color: #35507a; font-size: 13px; border: 1px solid #e2ebff;
}
.call-state .cs-dot { width: 8px; height: 8px; border-radius: 50%; background: #ff922b; flex: none; }
.call-state.ok { background: #f1fcf7; color: #067a58; border-color: #c9f2e4; }
.call-state.ok .cs-dot { background: #12b886; }
.call-qr-wrap { text-align: center; margin: 16px 0 10px; }
.call-qr {
  display: inline-block; padding: 10px; background: #fff;
  border: 1px solid var(--line); border-radius: 14px; min-width: 208px; min-height: 208px;
}
.call-qr img, .call-qr canvas { display: block; margin: 0 auto; }
.call-qr-tip { font-size: 12.5px; color: #64748b; line-height: 1.8; margin-top: 10px; }
.call-device { text-align: center; font-size: 12.5px; color: #55637a; }

/* 紧凑筛选栏（无字段标题，一行到位） */
.filter-bar.compact {
  align-items: center; gap: 8px; padding: 12px 16px;
}
.filter-bar.compact .fitem { flex-direction: row; gap: 0; }
.filter-bar.compact .input,
.filter-bar.compact .select {
  height: 34px; font-size: 13px; min-width: 0;
}
.filter-bar.compact .input { width: 160px; }
.filter-bar.compact .input.w-sm { width: 118px; }
.filter-bar.compact .select { width: 122px; min-width: 0; }
.filter-bar.compact .spacer { flex: 1; }

/* 列表「自定义字段」列（按客户字段配置动态渲染） */
.quali { display: flex; gap: 4px; flex-wrap: wrap; }
.quali span {
  display: inline-block; padding: 1px 6px; border-radius: 5px; font-size: 11px;
  background: #f1f5fb; color: #55637a; border: 1px solid transparent; white-space: nowrap;
}
.quali span.on { background: #eef4ff; color: #2f6bff; border-color: #d9e5ff; }
.quali span.mute { color: #a9b5c8; }

/* 跟进弹窗底部：上下一条按钮不被压缩 */
.modal-foot .left .btn { flex: none; white-space: nowrap; }
.modal-foot .left .mono { white-space: nowrap; }

/* 成员负载面板（分配页右侧） */
.load-list { display: flex; flex-direction: column; gap: 7px; max-height: 260px; overflow-y: auto; }
.load-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.load-row .ln { width: 72px; flex: none; color: #334155; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.load-row .lbar { flex: 1; height: 8px; background: #eef2f7; border-radius: 6px; overflow: hidden; }
.load-row .lbar i { display: block; height: 100%; background: linear-gradient(90deg, #4f8cff, #2f6bff); border-radius: 6px; }
.load-row .lc { width: 40px; flex: none; text-align: right; color: #64748b; font-variant-numeric: tabular-nums; }

/* ======================================================================
   v1.4.3：跟进弹窗尺寸 / 呼叫按钮 / 手机端滚动
   ====================================================================== */
/* 电脑端高度收敛（原 920px 过大） */
.modal.xwide { height: min(760px, calc(100vh - 40px)); height: min(760px, calc(100dvh - 40px)); }

/* 呼叫按钮：明亮醒目 */
.btn-call {
  background: linear-gradient(135deg, #ffa94d, #f76707);
  color: #fff; border-color: transparent;
  box-shadow: 0 6px 16px rgba(247, 103, 7, .28);
  font-weight: 620;
}
.btn-call:hover { filter: brightness(1.06); color: #fff; }
.btn-call:active { transform: translateY(1px); }

/* 手机 / 平板：单列 + 整页纵向滚动，避免横向溢出与"滚不动" */
@media (max-width: 1024px) {
  .modal.xwide {
    width: calc(100vw - 12px);
    height: calc(100vh - 12px);
    height: calc(100dvh - 12px);
    max-height: calc(100vh - 12px);
    max-height: calc(100dvh - 12px);
    border-radius: 14px;
  }
  .follow-layout.wide {
    grid-template-columns: 1fr;
    overflow-x: hidden;
    overflow-y: auto;
    min-height: 0;
  }
  .modal.xwide .follow-side {
    border-right: 0;
    border-bottom: 1px solid var(--line-2);
    overflow: visible;
    padding: 14px;
  }
  .modal.xwide .follow-main { overflow: visible; padding: 14px; }
  .modal.xwide .form-grid,
  .modal.xwide .form-grid.three { grid-template-columns: 1fr 1fr; }
  .rec-wrap { min-height: 240px; }
  .rec-body { max-height: 46vh; }
  .modal-foot { flex-wrap: wrap; row-gap: 8px; }
  .modal-foot .left { flex: 0 0 100%; margin-bottom: 2px; }
  .modal-foot .btn { flex: 1 1 auto; }
}

/* 生命周期日志：分类筛选按钮 */
.log-cats {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-bottom: 10px; position: sticky; top: 0; z-index: 2;
  background: #fff; padding: 2px 0 8px;
}
.log-cats button {
  border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 3px 9px;
  font-size: 12px; color: #55637a; cursor: pointer; transition: all .14s;
}
.log-cats button em { font-style: normal; color: #98a4b7; margin-left: 2px; }
.log-cats button:hover { border-color: #cfddfa; color: var(--brand); }
.log-cats button.on { background: var(--brand-50); border-color: #cfddfa; color: var(--brand); font-weight: 620; }
.log-cats button.on em { color: var(--brand); }

/* 呼叫状态：离线警示 */
.call-state.warn { background: #fff8ef; color: #a8661a; border-color: #ffe2c2; }
.call-state.warn .cs-dot { background: #f76707; }

/* ==========================================================================
   v1.6.4
   1) 呼叫按钮 hover 不再被 .btn:hover 的浅色背景覆盖
   2) 跟进弹窗底部按钮不再被挤压 / 裁切
   3) 成员结构树视觉升级（层级图标 / 角色标签 / 连接线）
   4) 团队数据·客户详情弹窗
   ========================================================================== */

/* 1. 呼叫按钮：hover / focus 保持橙色渐变（原 .btn:hover 会把背景刷成浅蓝） */
.btn-call:hover,
.btn-call:focus-visible {
  background: linear-gradient(135deg, #ffb066, #f76707);
  border-color: transparent;
  color: #fff;
  filter: brightness(1.03);
  box-shadow: 0 8px 20px rgba(247, 103, 7, .34);
}

/* 2. 跟进弹窗底部：左侧导航 + 三个动作按钮，保证不换行不裁切 */
.modal.xwide { width: min(1240px, calc(100vw - 32px)); }
.modal.xwide .modal-foot { gap: 10px; flex: none; flex-wrap: nowrap; overflow-x: auto; }
.modal.xwide .modal-foot .btn { flex: 0 0 auto; white-space: nowrap; }
.modal.xwide .modal-foot .left { min-width: 0; overflow: hidden; }
.modal.xwide .modal-foot .left .mono { color: var(--muted); }

/* 3. 数据状态标签（已去掉数量）：间距统一 */
.status-bar .s-btn { gap: 8px; }
.status-bar .s-btn i { box-shadow: 0 0 0 3px rgba(47, 107, 255, .08); }

/* 4. 成员结构树 */
.mtree { padding: 4px 2px 10px; }
.mt-node {
  padding: 7px 8px; border-radius: 9px;
  transition: background .14s, box-shadow .14s;
}
.mt-node.mt-branch { color: #1f2d44; }
.mt-node.mt-branch:hover { background: #eef4ff; }
.mt-node.mt-branch.mt-open { background: #f5f9ff; }
.mt-ico {
  width: 14px; height: 10px; flex: none; position: relative;
  border-radius: 3px; display: inline-block; margin-top: 1px;
}
.mt-ico-area { background: linear-gradient(135deg, #cfdffb, #aec6f5); }
.mt-ico-group { background: linear-gradient(135deg, #c9ecd9, #a6dcbd); }
/* 文件夹缺角：顶部小标签，避免和复选框混淆 */
.mt-ico-area::before,
.mt-ico-group::before {
  content: ''; position: absolute; left: 1px; top: -3px; width: 6px; height: 3px;
  border-radius: 2px 2px 0 0; background: inherit;
}
.mt-children::before { left: 24px; background: linear-gradient(180deg, #e2e9f5, #eef2f8); }
.mt-user { position: relative; }
.mt-user:hover { background: #f6f9ff; }
.mt-user .mt-name { font-weight: 500; }
.mt-role { font-size: 10.5px; letter-spacing: .2px; }
.mt-role.role-leader { background: #e8f0ff; color: #2f6bff; }
.mt-role.role-warden { background: #f3ecff; color: #7048e8; }
.mt-role.role-staff  { background: #f1f5fa; color: #7c8aa0; }
.mt-count { background: #eef2f8; color: #5b6b82; font-weight: 600; }
.mt-check input:checked { accent-color: var(--brand); }

/* 5. 表格紧凑化：客户表在 1440 屏内完整展示 */
.table thead th { padding: 10px 10px; }
.table tbody td { padding: 10px 10px; }
.quali { flex-wrap: nowrap; }
.table .col-mobile { white-space: nowrap; }
.assign-layout { grid-template-columns: minmax(0, 1fr) 280px; }
.assign-layout .table { min-width: 760px; }
.table td .op { gap: 6px; }
.table .op .btn-sm { padding: 0 9px; }

/* 操作列固定在右侧：列数多、横向滚动时「编辑/删除/详情」始终可见 */
.table-ops th:last-child,
.table-ops td:last-child {
  position: sticky;
  right: 0;
  background: #fff;
  box-shadow: -8px 0 12px -8px rgba(15, 23, 42, .12);
  z-index: 1;
}
.table-ops thead th:last-child { z-index: 3; background: #f7f9fd; }
.table-ops tbody tr:hover td:last-child { background: #f8fbff; }

/* 6. 团队数据·客户详情弹窗 */
.cd-layout { display: grid; grid-template-columns: 330px 1fr; min-height: 400px; }
.cd-side {
  padding: 18px 20px; background: #fbfcff;
  border-right: 1px solid var(--line-2); overflow-y: auto;
}
.cd-name { font-size: 20px; font-weight: 720; letter-spacing: -.2px; }
.cd-mobile {
  margin-top: 6px; font-size: 15px; font-weight: 650; color: var(--brand);
  font-variant-numeric: tabular-nums;
}
.cd-tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 14px; }
.cd-side .dl { grid-template-columns: 74px 1fr; gap: 8px 10px; }
.cd-remark { color: var(--text-2); line-height: 1.6; }
.cd-extra { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line-2); }
.cd-extra-title { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
/* v3.10.3：扩展字段一行 2 个（短类型），压缩详情弹窗高度；
   与 .cd-side .dl 同为两类选择器，定义在其后因而优先生效。
   长值字段 dd.dl-wide 跨满剩余 3 列，仍独占一行且值更宽。
   窄屏回退成一行 1 个，避免 74px+1fr+74px+1fr 被挤到不可读。 */
.cd-extra .dl-extra { grid-template-columns: 74px minmax(0,1fr) 74px minmax(0,1fr); gap: 8px 10px; }
.cd-extra .dl-extra dd.dl-wide { grid-column: span 3; }
@media (max-width: 900px) {
  .cd-extra .dl-extra { grid-template-columns: 74px minmax(0,1fr); }
  .cd-extra .dl-extra dd.dl-wide { grid-column: auto; }
}
/* 跟进弹窗自定义字段同样一行 2 个，与基本资料网格对齐 */
.extra-grid { margin-top: 2px; }
.cd-main { padding: 16px 20px; min-width: 0; display: flex; flex-direction: column; }
.cd-tabs {
  display: flex; gap: 18px; border-bottom: 1px solid var(--line-2);
  margin-bottom: 14px; flex: none;
}
.cd-tabs a {
  padding: 6px 0 10px; color: var(--muted); text-decoration: none;
  font-size: 13.5px; border-bottom: 2px solid transparent;
}
.cd-tabs a.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 650; }
.cd-tabs a em { font-style: normal; color: #98a4b7; margin-left: 2px; }
.cd-pane { flex: 1; overflow-y: auto; max-height: calc(760px - 200px); }
.cd-stars span.on  { color: #f59f00; }
.cd-stars span.off { color: #dfe6f0; }

@media (max-width: 1024px) {
  .cd-layout { grid-template-columns: 1fr; }
  .cd-side { border-right: 0; border-bottom: 1px solid var(--line-2); }
  .cd-pane { max-height: none; }
}

/* ==========================================================================
   v1.6.5：最近导入面板 / 长文本溢出统一
   ========================================================================== */
/* 列表行内的长文本必须能收缩，否则会顶穿卡片右侧 */
.rank-row { align-items: flex-start; min-width: 0; }
.rank-main { flex: 1 1 auto; min-width: 0; }
.rank-file {
  font-size: 12.5px; color: #47566e; line-height: 1.5;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rank-stat { margin-top: 2px; font-size: 11.5px; color: #94a3b8; line-height: 1.4; }
.rank-time { flex: 0 0 auto; font-size: 12px; color: var(--muted); white-space: nowrap; padding-top: 1px; }
/* tight 容器里的列表补左右内边距，避免贴边/溢出 */
.import-log-list .rank-row { padding: 10px 16px; }
.import-log-list .rank-row:last-child { border-bottom: 0; }

/* ==========================================================================
   v1.6.6：工作台首页紧凑布局（仅 index/index 使用）
   目标：1440×900 一屏内看完指标 + 趋势 + 待办 + 分布 + 排行 + 公告
   ========================================================================== */
.dash-head { margin-bottom: 14px; }
.kpi-grid.dash-kpi { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.kpi-grid.dash-kpi .kpi { padding: 12px 15px; border-radius: 14px; min-height: 92px; }
.kpi-grid.dash-kpi .k-value { font-size: 23px; margin-top: 4px; }
.kpi-grid.dash-kpi .k-label { font-size: 12px; }
.kpi-grid.dash-kpi .k-foot { margin-top: 3px; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.kpi-grid.dash-kpi .k-ico { width: 30px; height: 30px; right: 12px; top: 12px; border-radius: 9px; }

.dash-grid { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.dash-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.dash-card .card-head { padding: 12px 16px; }
.dash-card .card-head h3 { font-size: 14px; }
.dash-card .card-body { padding: 14px 16px; }
.dash-card .card-body.tight { padding: 0; }

/* 趋势柱：固定高度，避免撑开 */
.dash-chart { padding: 12px 16px 6px !important; }
.dash-chart .bars { height: 122px; }

/* 待办表格：限高滚动，表头吸顶 */
.dash-table { max-height: 262px; overflow-y: auto; }
.dash-table .table thead th { background: #f7f9fd; }

/* 来源分布：紧凑 */
.dash-dist { max-height: 196px; overflow-y: auto; }
.dash-dist .dist-item { margin-bottom: 10px; }
.dash-dist .progress { height: 6px; border-radius: 4px; background: #f1f5fb; overflow: hidden; }
.dash-dist .progress i { display: block; height: 100%; border-radius: 4px; }
.dash-dist .dist-item:last-child { margin-bottom: 0; }

/* 排行：紧凑 */
.dash-rank { max-height: 156px; overflow-y: auto; padding-top: 6px !important; padding-bottom: 6px !important; }
.dash-rank .rank-row { padding: 7px 0; }

/* 公告：单行省略 + 限高 */
.dash-notice { max-height: 152px; overflow-y: auto; }
.dash-notice .notice-item {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 16px; text-decoration: none; border-bottom: 1px dashed var(--line-2);
}
.dash-notice .notice-item:last-child { border-bottom: 0; }
.dash-notice .notice-item:hover { background: #f8fbff; }
.dash-notice .notice-title {
  flex: 1; min-width: 0; font-size: 12.5px; color: #0f172a;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dash-notice .notice-time { flex: none; font-size: 11.5px; color: #a3aec2; }

/* 内容中心分类筛选：沿用「我的客户」状态胶囊风格（圆点 + 选中蓝色渐变） */
.ntc-tabbar { display: flex; gap: 8px; flex-wrap: wrap; padding: 14px 16px 2px; }
.ntc-tabbar .s-btn,
.ntc-tabbar .dnt {
  display: inline-flex; align-items: center; gap: 7px;
  height: 34px; padding: 0 14px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line);
  font-size: 13px; line-height: 1; color: var(--text-2); text-decoration: none;
  cursor: pointer; transition: all .16s var(--ease); white-space: nowrap;
}
.ntc-tabbar .s-btn i,
.ntc-tabbar .dnt i {
  width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: none;
  box-shadow: 0 0 0 3px rgba(47, 107, 255, .08);
}
/* 分类无独立 color 字段，按序循环分配 6 色，风格与状态标签一致 */
.ntc-tabbar > :nth-child(2) i { background: #e5484d; }
.ntc-tabbar > :nth-child(3) i { background: #f59e0b; }
.ntc-tabbar > :nth-child(4) i { background: #2f6bff; }
.ntc-tabbar > :nth-child(5) i { background: #12a594; }
.ntc-tabbar > :nth-child(6) i { background: #7c5cff; }
.ntc-tabbar > :nth-child(7) i { background: #ec4899; }
.ntc-tabbar .s-btn:hover,
.ntc-tabbar .dnt:hover { border-color: #cfddfa; color: var(--brand); }
.ntc-tabbar .s-btn.on,
.ntc-tabbar .dnt.on {
  background: linear-gradient(135deg, #3d78ff, var(--brand-600));
  border-color: transparent; color: #fff;
  box-shadow: 0 6px 16px rgba(47, 107, 255, .26);
}
.ntc-tabbar .s-btn.on i,
.ntc-tabbar .dnt.on i { background: #fff !important; box-shadow: none; }

/* 内容通知：正文图片 */
#dnBody img { max-width: 100%; height: auto; border-radius: 8px; }
@media (max-width: 640px) {
  .ntc-tabbar { padding: 10px 10px 2px; gap: 6px; }
  .ntc-tabbar .s-btn, .ntc-tabbar .dnt { height: 30px; padding: 0 11px; font-size: 12px; }
  .dash-notice .notice-item { padding: 9px 10px; gap: 6px; }
  .dash-notice .notice-time { font-size: 11px; }
}

@media (max-width: 1200px) {
  .dash-grid { grid-template-columns: minmax(0, 1fr); }
  .kpi-grid.dash-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ==========================================================================
   v1.6.6：统计分析页（数据 / 跟进 / 业绩）
   ========================================================================== */
.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.stat-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.stat-list { padding: 14px 16px 16px; }
.stat-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 12.5px; }
.stat-row .stat-name {
  min-width: 76px; max-width: 120px; flex: none; color: #475569;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.stat-bar { flex: 1 1 auto; min-width: 20px; height: 8px; background: #f1f5fb; border-radius: 4px; overflow: hidden; }
.stat-bar i { display: block; height: 100%; background: linear-gradient(90deg, #6ea0ff, #2f6bff); border-radius: 4px; }
.stat-row b { flex: none; min-width: 48px; text-align: right; color: #0f172a; font-variant-numeric: tabular-nums; }

/* 转化漏斗 */
.funnel-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.funnel-row:last-of-type { margin-bottom: 4px; }
.funnel-name { width: 64px; flex: none; font-size: 12.5px; color: #475569; }
.funnel-bar {
  flex: 1 1 auto; min-width: 0; height: 26px; background: #f1f5fb;
  border-radius: 7px; position: relative; overflow: hidden;
}
.funnel-bar i {
  display: block; height: 100%; border-radius: 7px;
  background: linear-gradient(90deg, #7fa9ff, #2f6bff);
  transition: width .4s var(--ease);
}
.funnel-bar span {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  font-size: 12px; font-weight: 700; color: #1d4ed8;
}
.funnel-rate { width: 52px; flex: none; text-align: right; font-size: 12px; color: #94a3b8; }

@media (max-width: 1200px) {
  .stat-grid, .stat-grid-3 { grid-template-columns: minmax(0, 1fr); }
}

/* ==========================================================================
   v1.6.7：团队成员 · 组织结构树（区 → 组 → 成员卡片）
   ========================================================================== */
.org-card { padding: 0 0 18px; }
.org-wrap { padding: 4px 18px 0; }

.org-area {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #fbfdff, #ffffff 90px);
  margin-bottom: 16px;
  overflow: hidden;
}
.org-area:last-child { margin-bottom: 0; }

.org-head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  background: linear-gradient(90deg, #eef4ff, #f8fbff 60%, #ffffff);
  border-bottom: 1px solid var(--line-2);
  border-left: 3px solid #2f6bff;
}
.org-title { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.org-title b { font-size: 14.5px; color: #0f172a; }
.org-kpi { margin-left: auto; display: flex; gap: 14px; font-size: 12px; color: #7c8899; white-space: nowrap; }
.org-kpi b { color: #1e2a3b; font-variant-numeric: tabular-nums; }
.org-kpi b.amber, .mcard-stats b.amber { color: #e8590c; }

.org-ico {
  width: 24px; height: 24px; flex: none; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #fff; letter-spacing: 0;
}
.org-ico-area { background: linear-gradient(135deg, #5b8dff, #2f6bff); }
.org-ico-group { background: linear-gradient(135deg, #46c79a, #12a97c); }
.org-ico-dir { background: linear-gradient(135deg, #ffb84d, #f59f00); }
.org-ico-top { background: linear-gradient(135deg, #a78bfa, #7048e8); }

.org-group {
  padding: 12px 16px 14px 30px;
  position: relative;
  border-bottom: 1px dashed var(--line-2);
}
.org-group:last-child { border-bottom: 0; }
.org-group::before {
  content: ''; position: absolute; left: 18px; top: 0; bottom: 0;
  border-left: 1px dashed #d8e2f2;
}
.org-ghead { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.org-ghead::before {
  content: ''; position: absolute; left: 18px; top: 18px; width: 10px;
  border-top: 1px dashed #d8e2f2;
}
.org-ghead b { font-size: 13px; color: #1e2a3b; }
.org-gkpi { margin-left: auto; font-size: 11.5px; color: #93a0b4; white-space: nowrap; }

.member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(228px, 1fr));
  gap: 10px;
}
.mcard {
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: #fff;
  padding: 11px 12px 9px;
  transition: box-shadow .16s var(--ease), transform .16s var(--ease), border-color .16s;
}
.mcard:hover {
  border-color: #c7d8ff;
  box-shadow: 0 6px 18px rgba(47, 107, 255, .10);
  transform: translateY(-1px);
}
.mcard.off { opacity: .62; background: #fafbfd; }
.mcard-top { display: flex; align-items: center; gap: 9px; }
.mcard-top .avatar { width: 32px; height: 32px; font-size: 13px; flex: none; }
.mcard-id { min-width: 0; }
.mcard-name {
  display: flex; align-items: center; gap: 5px;
  font-size: 13px; font-weight: 600; color: #0f172a;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dot-on {
  width: 6px; height: 6px; border-radius: 50%; background: #12b886;
  box-shadow: 0 0 0 3px rgba(18, 184, 134, .16); flex: none;
}
.mcard-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 4px; margin: 9px 0 7px;
  padding: 7px 0; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2);
}
.mcard-stats > div { text-align: center; min-width: 0; }
.mcard-stats b {
  display: block; font-size: 13px; color: #1e2a3b;
  font-variant-numeric: tabular-nums; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mcard-stats span { display: block; font-size: 10.5px; color: #98a4b8; margin-top: 1px; }
.mcard-stats b.mono { font-size: 11.5px; }
.mcard-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mcard-foot .btn { padding: 3px 9px; font-size: 11.5px; }

@media (max-width: 900px) {
  .org-kpi { display: none; }
  .org-gkpi { display: none; }
  .org-group { padding-left: 16px; }
  .org-group::before, .org-ghead::before { display: none; }
}

/* ==========================================================================
   v1.6.8：趋势柱状图（0 值灰柱 + 标签不换行）
   ========================================================================== */
.bars .bar > b {
  white-space: nowrap; font-size: 10px; line-height: 1.2;
  letter-spacing: -.2px; min-height: 12px;
}
.bars .bar > em { min-height: 13px; line-height: 1.1; }
.bars .bar.zero > i { background: #e8eef8; }
.bars .bar.zero:hover > i { background: #dbe5f5; }
.bars .bar.mt-on, .mt-node.mt-on {
  background: linear-gradient(90deg, #eef4ff, #f8fbff);
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px #cfe0ff;
}

/* 团队数据：最近跟进单行（双栏宽度有限） */
.rf-one {
  display: flex; align-items: center; gap: 6px;
  font-size: 11.5px; color: #64748b; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; max-width: 168px;
}
.rf-one .rf-t { color: #94a3b8; flex: none; font-variant-numeric: tabular-nums; }
.rf-one .rf-c { overflow: hidden; text-overflow: ellipsis; }
.rf-one.today .rf-t { color: var(--brand); font-weight: 600; }

.rf-one .rf-c { min-width: 0; flex: 1 1 auto; }

/* ------------------------------------------------------------------
   组织树面板（全站统一 v2.1.3）
   · 所有带树的页面：卡片头部右侧「‹」收起 / 展开
   · 树里不再显示任何统计数字（客户数规模太大，实时统计太耗资源）
   · 手机 / 窄屏：树限高，触屏加大点击区
------------------------------------------------------------------ */
.org-all {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 9px; margin-bottom: 6px;
  border-radius: 9px; background: #f8fafc;
  color: #334155; font-size: 13px; cursor: pointer;
  transition: background .14s;
}
.org-all:hover { background: #eef4ff; }
.org-all.on { background: linear-gradient(90deg, #eef4ff, #f8fbff); color: #1a4fe0; font-weight: 600;
  box-shadow: inset 0 0 0 1px #cfe0ff; }
.org-all-ico { width: 13px; height: 13px; border-radius: 4px; background: #c7d2fe; flex: none; }
.org-all.on .org-all-ico { background: #2f6bff; }

/* 收起态：保留标题 + 展开按钮，右侧其它按钮隐起来 */
.assign-side.collapsed .card-head { padding: 9px 12px; }
.assign-side.collapsed .card-head h3 { font-size: 13.5px; }
.assign-side.collapsed .card-head .right > *:not(.panel-toggle) { display: none; }
.assign-side .card-head .panel-toggle { flex: none; }

/* 窄屏：左右布局塌成单列，树在列表下方，限高避免占满整屏 */
@media (max-width: 1200px) {
  .assign-side { position: static; }
  .assign-side .card-body { max-height: 46vh !important; }
}
/* 手机：加大树节点点击区，避免误触 */
@media (max-width: 640px) {
  .assign-side .card-head { padding: 10px 12px; }
  .assign-side .card-head h3 { font-size: 15px; }
  .assign-side .panel-toggle { min-width: 40px; min-height: 34px; font-size: 17px; line-height: 1; }
  .assign-side .card-body { padding: 8px 8px !important; }
  .mt-node { padding: 9px 6px; gap: 7px; }
  .mt-caret { min-width: 18px; text-align: center; }
  .mt-check input { width: 17px; height: 17px; }
  .org-all { padding: 9px 8px; font-size: 14px; }
}

/* 列表上方的「已勾选 N 条」提示（公海分配等批量操作页，统计放左侧） */
.pick-tip {
  padding: 8px 12px 0;
  font-size: 12.5px; color: #7c8aa0;
}
.pick-tip b { color: #2f6bff; font-size: 15px; }
@media (max-width: 640px) { .pick-tip { padding: 8px 10px 0; } }

/* ======================================================================
   v2.1.4 响应式修复
   1) 窄屏左右布局必须变单列：原来 1324 行的两列定义写在 935 行媒体查询
      之后，同特异性下把它覆盖了 —— 手机上列表被压成 106px 宽。
   2) 手机筛选栏两列自适应，去掉固定宽度。
   3) 页头统一：左标题/说明/统计，右按钮，手机端按钮整行。
   ====================================================================== */
@media (max-width: 1200px) {
  .assign-layout { grid-template-columns: minmax(0, 1fr); }
  .assign-layout > .card { min-width: 0; }
  .assign-side { position: static; }
}

@media (max-width: 768px) {
  .filter-bar { padding: 12px; gap: 8px; }
  .filter-bar .fitem { flex: 1 1 calc(50% - 4px); min-width: 0; }
  .filter-bar .fitem.wide { flex: 1 1 100%; }
  .filter-bar .fitem .input,
  .filter-bar .fitem .select { width: 100%; min-width: 0; }
  /* 紧凑筛选栏：控件直接是 flex 子项（没有 .fitem 包裹），统一两列 */
  .filter-bar.compact { align-items: stretch; }
  .filter-bar.compact > .input,
  .filter-bar.compact > .select,
  .filter-bar.compact > .input.w-sm,
  .filter-bar.compact > .fitem {
    flex: 1 1 calc(50% - 4px); width: auto !important; min-width: 0;
  }
  .filter-bar.compact > .fitem { flex-direction: row; }
  .filter-bar.compact > .fitem .input,
  .filter-bar.compact > .fitem .select { width: 100% !important; }
  .filter-bar > .btn,
  .filter-bar > button,
  .filter-bar.compact > .btn,
  .filter-bar.compact > button { flex: 1 1 calc(50% - 4px); }
  /* 状态标签横向滚动，避免换三行占满屏幕 */
  .tabs { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs > * { flex: none; }
  .status-bar {
    flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
    margin-bottom: 12px; padding-bottom: 2px; scrollbar-width: none;
  }
  .status-bar::-webkit-scrollbar { display: none; }
  .status-bar .s-btn { flex: none; white-space: nowrap; }
}

@media (max-width: 640px) {
  .page-head { align-items: flex-start; gap: 10px; margin-bottom: 14px; }
  .page-title { font-size: 19px; }
  .page-desc { font-size: 12.5px; line-height: 1.6; }
  .page-head .ph-meta { margin-top: 8px; }
  .page-head .actions { width: 100%; margin-left: 0; gap: 8px; }
  .page-head .actions > .btn,
  .page-head .actions > button,
  .page-head .actions > a.btn { flex: 0 1 auto; min-width: 0; }
  .page-head .actions > .badge { flex: none; }
  .cust-filter .filter-bar.compact { gap: 8px; }
}

/* 页头左侧信息块（标题 + 说明 + 统计/筛选状态） */
.page-head .ph-main { min-width: 0; flex: 1 1 auto; }
.page-head .ph-meta {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 7px; font-size: 12.5px; color: var(--muted);
}
.page-head .ph-meta .ph-num { font-weight: 700; color: var(--text); }
.page-head .ph-meta .badge { font-weight: 600; }

/* ======================================================================
   v2.1.4 手机端横向溢出修复
   flex 子项默认 min-width:auto，宽表格会把 .card 撑破（整页横向滚动）。
   统一给主区/卡片/表容器加 min-width:0，让滚动条出现在表格内部。
   ====================================================================== */
.main, .content { min-width: 0; }
.card, .card-head, .card-body, .card-head > *, .card-body > * { min-width: 0; }
.table-wrap { max-width: 100%; }

@media (max-width: 768px) {
  .flex.gap-1, .flex.gap-2 { flex-wrap: wrap; }
  .card-head { flex-wrap: wrap; row-gap: 6px; }
  .card-head .right { flex-wrap: wrap; row-gap: 6px; }
  .content form .select,
  .content form .input { max-width: 100%; }
  /* 统计页顶部区间表单：控件两列 */
  .stat-filter { flex-wrap: wrap; width: 100%; }
  .stat-filter .select, .stat-filter .input { flex: 1 1 calc(50% - 4px); width: auto !important; min-width: 0; }
  .stat-filter .btn { flex: 1 1 calc(50% - 4px); }
}

/* 手机：趋势柱保留最小宽度，靠横向滑动看全量（30 天不会把整页撑爆） */
@media (max-width: 640px) {
  .bars { gap: 6px; }
  .bars .bar { min-width: 14px; }
}

/* ------------------------------------------------------------------
   菜单管理（v2.1.6）：后台批量调整左侧菜单顺序
------------------------------------------------------------------ */
.ms-list { display: flex; flex-direction: column; }
.ms-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 9px;
  transition: background .14s;
}
.ms-row + .ms-row { border-top: 1px solid var(--line-2); }
.ms-row:hover { background: #f8fafd; }
.ms-idx { flex: none; width: 22px; text-align: center; font-size: 12px; font-weight: 700; color: #94a3b8; }
.ms-name { flex: none; font-size: 13.5px; font-weight: 600; color: var(--text); min-width: 96px; }
.ms-url { flex: 1 1 auto; min-width: 0; font-size: 11.5px; color: #9aa7bd; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-eye { flex: none; display: inline-flex; align-items: center; }
.ms-eye-in { width: 15px; height: 15px; accent-color: #2f6bff; cursor: pointer; }
.ms-ops { flex: none; display: flex; gap: 5px; }
.ms-btn {
  width: 26px; height: 26px; border-radius: 7px;
  border: 1px solid var(--line); background: #fff; color: #64748b;
  font-size: 12px; line-height: 1; cursor: pointer;
  transition: border-color .14s, background .14s, color .14s, transform .1s;
}
.ms-btn:hover { border-color: #c7d6f5; background: #eef4ff; color: #2f6bff; }
.ms-btn:active { transform: scale(.94); }

@media (max-width: 640px) {
  .ms-row { flex-wrap: wrap; gap: 6px 8px; padding: 10px; }
  .ms-url { flex: 1 1 100%; order: 5; }
  .ms-name { min-width: 0; flex: 1 1 auto; }
}

/* ------------------------------------------------------------------
   手机端顶栏精简：面包屑只留当前页、隐藏数据范围徽章与「首页」文字
   （390 宽下这几项会把标题挤成竖排）
------------------------------------------------------------------ */
@media (max-width: 640px) {
  .header { gap: 8px; padding: 0 12px; }
  .header .crumb { flex: 1 1 auto; font-size: 12.5px; }
  .header .crumb > span { display: none; }
  .header-right { gap: 6px; }
  .header-right > .badge { display: none; }
  .home-btn { padding: 0 9px; }
  .home-btn span { display: none; }
  .user-chip .user-meta { display: none; }
  .user-chip { padding: 0 4px; }
}

/* ------------------------------------------------------------------
   v2.1.8 交互增强
------------------------------------------------------------------ */

/* 1) 筛选栏折叠：超出部分的字段隐藏，末尾出现「更多」 */
/* 折叠项：标准版（.fitem）与紧凑版（直系控件）都要隐藏 */
.filter-bar .fm-hit { display: none !important; }
.fm-toggle {
  /* 不抢行尾：紧跟「筛选 / 重置」排在同一行，形成完整按钮组。
     早先用 margin-left:auto 会把它推到最后，把「重置」挤掉（截图里的错位）。 */
  flex: none; white-space: nowrap;
  border: 1px dashed #c7d6f5; background: #f7faff; color: #2f6bff;
  font-weight: 600;
}
.fm-toggle:hover { background: #eef4ff; border-style: solid; }
@media (max-width: 768px) {
  .fm-toggle { flex: 1 1 100%; }
}

/* 2) 表格顶部横向滚动条（与表格双向同步） */
.tscroll-top {
  height: 13px;
  overflow-x: auto;
  overflow-y: hidden;
  margin: 0 0 6px;
  border-radius: 8px;
  background: #f8fafc;
  box-shadow: inset 0 0 0 1px #eef2f8;
}
.tscroll-top::-webkit-scrollbar { height: 9px; }
.tscroll-top::-webkit-scrollbar-track { background: transparent; }
.tscroll-top::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 8px; }
.tscroll-top::-webkit-scrollbar-thumb:hover { background: #a9b8cf; }
.tscroll-top-inner { height: 1px; }
@media (max-width: 768px) {
  .tscroll-top { height: 15px; margin-bottom: 4px; }
}

/* 3) 表单字段小提示 + 只读输入框（登录账号锁定） */
.field-tip {
  font-style: normal; font-weight: 400; font-size: 11.5px;
  color: #94a3b8; margin-left: 6px;
}
.input.readonly,
.input[readonly] {
  background: #f1f5f9 !important;
  color: #64748b;
  cursor: not-allowed;
}

/* 待跟进三个切换按钮上的分类红标（表示"这一类里有活儿"） */
.tab-badge {
  display: inline-block; min-width: 17px; height: 17px; line-height: 17px;
  padding: 0 5px; margin-left: 5px; border-radius: 9px;
  background: #f03e3e; color: #fff; font-size: 11px; font-weight: 700;
  font-style: normal; text-align: center; vertical-align: 1px;
}
/* 当前选中的按钮是蓝底，红标反色处理，避免看不清 */
.btn-primary .tab-badge { background: #fff; color: #e03131; }

/* ==========================================================================
   右侧浮动「跟进话术」板（v3.10.3）
   层级 90：低于遮罩(100) / 弹窗(101)，打开跟进弹窗时自动被盖住，不挡业务操作
   ========================================================================== */
.rg-sb {
  position: fixed; right: 0; top: 30vh; z-index: 250;
  display: flex; align-items: flex-start; font-size: 13px;
}
.rg-sb-handle {
  width: 38px; min-height: 92px; padding: 10px 0;
  border: 1px solid var(--line); border-right: 0;
  border-radius: 12px 0 0 12px; background: #fff; color: var(--brand);
  cursor: grab; box-shadow: 0 4px 14px rgba(15,23,42,.10);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
}
.rg-sb-handle:hover { background: var(--brand-50); border-color: #cfddfa; }
.rg-sb-handle span { width: 12px; font-size: 11px; font-weight: 600; line-height: 1.25; }
.rg-sb.is-collapsed .rg-sb-panel { display: none; }
.rg-sb:not(.is-collapsed) .rg-sb-handle { display: none; }
.rg-sb-panel {
  width: 300px; max-width: calc(100vw - 16px);
  background: #fff; border: 1px solid var(--line); border-right: 0;
  border-radius: 14px 0 0 14px; box-shadow: 0 8px 30px rgba(15,23,42,.14);
  overflow: hidden; display: flex; flex-direction: column;
}
.rg-sb-head {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  background: linear-gradient(135deg, #3d78ff, var(--brand-600));
  color: #fff; cursor: grab; user-select: none;
}
.rg-sb-head b { font-size: 13.5px; font-weight: 650; }
.rg-sb-drag-tip { flex: 1; font-size: 11px; opacity: .82; }
.rg-sb-x {
  width: 22px; height: 22px; border: 0; border-radius: 6px;
  background: rgba(255,255,255,.18); color: #fff; font-size: 16px; line-height: 1; cursor: pointer;
}
.rg-sb-x:hover { background: rgba(255,255,255,.34); }
.rg-sb-search { padding: 10px 12px 6px; }
.rg-sb-search input {
  box-sizing: border-box; width: 100%; height: 32px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 8px; outline: none; font-size: 12.5px;
}
.rg-sb-search input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(47,107,255,.12); }
.rg-sb-tags {
  display: flex; flex-wrap: wrap; align-content: flex-start; gap: 6px;
  padding: 4px 12px 10px; max-height: 132px; overflow-y: auto;
  border-bottom: 1px solid var(--line-2);
}
.rg-sb-tag {
  max-width: 100%; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--brand-50); color: var(--text-2); font-size: 12px; cursor: pointer;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rg-sb-tag:hover { border-color: var(--brand); color: var(--brand); }
.rg-sb-tag.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.rg-sb-body { padding: 10px 12px; max-height: 260px; overflow-y: auto; }
.rg-sb-placeholder { color: var(--muted); font-size: 12px; line-height: 1.8; }
.rg-sb-content {
  display: none; color: var(--text-2); font-size: 12.8px; line-height: 1.85;
  white-space: pre-wrap; word-break: break-word;
}
.rg-sb-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 12px; border-top: 1px solid var(--line-2); background: #fbfcfe;
}
.rg-sb-count { color: var(--muted); font-size: 11.5px; }
.rg-sb-loading { padding: 4px 0; color: var(--muted); font-size: 12px; line-height: 1.8; }
.rg-sb-loading a { color: var(--brand); }
body.rg-sb-dragging, body.rg-sb-dragging * { user-select: none !important; cursor: grabbing !important; }
@media (max-width: 768px) {
  .rg-sb-panel { width: min(300px, calc(100vw - 16px)); }
  .rg-sb-body { max-height: 200px; }
}

/* 右上角下拉里的「应急控制」：与退出登录同为危险项，单独描红以便一眼识别 */
.user-drop a.emergency-item { color: #b91c1c; }
.user-drop a.emergency-item:hover { background: #fff5f5; color: #dc2626; }

/* ==========================================================================
   v3.12.1 客户数据表格：备注 / 跟进信息 —— 固定宽度、全文显示、允许换行
   --------------------------------------------------------------------------
   · 备注列 .cell-note = 260px、跟进列 .cell-follow = 300px，列宽固定，
     不随内容长短伸缩；表格因此变宽，由 .table-wrap 出现左右滚动条，
     app.js 的 tableScrollTop 会在表格上/下各挂一条同步横向滚动条。
   · 内容全部显示并自动换行（长串英文/数字也断行），去掉历史上的
     3 行截断(-webkit-line-clamp) / 单行省略(text-overflow:ellipsis) /
     max-width 软限制。
   · td 顶部对齐，并覆盖 .table tbody td 的 white-space:nowrap。
   · td 给 min-width 硬下限：窄屏 / 手机端表格再被压缩也不会把内容挤错位。
   ========================================================================== */
.table tbody td.td-note,
.table tbody td.td-follow {
  white-space: normal;
  vertical-align: top;
}
.table tbody td.td-note   { min-width: 286px; }
.table tbody td.td-follow { min-width: 326px; }

.cell-note,
.cell-follow {
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.6;
}
.cell-note   { width: 260px; max-width: 260px; }
.cell-follow { width: 300px; max-width: 300px; }

/* 跟进列表：在固定宽度列内完整换行，去掉旧的 max-width / ellipsis 软截断 */
.cell-follow .rf-list { max-width: none; }
.cell-follow .rf-item,
.cell-follow .rf-one  { align-items: flex-start; }
.cell-follow .rf-one {
  max-width: none;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}
.cell-follow .rf-item .rf-c,
.cell-follow .rf-one  .rf-c {
  max-width: none;
  min-width: 0;
  flex: 1 1 auto;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  overflow: visible;
  text-overflow: clip;
}
.cell-follow .rf-t { margin-top: 1px; }

/* 手机端：固定宽度列仍不压缩，靠 .table-wrap 横向滚动看全，绝不错位 */
@media (max-width: 768px) {
  .table tbody td.td-note   { min-width: 282px; }
  .table tbody td.td-follow { min-width: 322px; }
}

/* ==========================================================================
   v3.12.2 手机端：隐藏浮动话术板 / 跟进弹窗防错位、底部按钮防裁切
   --------------------------------------------------------------------------
   放在文件末尾，确保覆盖 v1.6.4 的 .modal.xwide .modal-foot 全局规则：
   那条用 flex-wrap:nowrap + overflow-x:auto + .left{overflow:hidden}，
   在窄屏会把「加入公海 / 呼叫 / 保存并下一条 / 保存跟进」挤出屏幕。
   ========================================================================== */
@media (max-width: 768px) {
  /* 1) 手机端不需要右侧浮动「跟进话术」板（script_bar.js 已不创建 DOM，此处兜底） */
  .rg-sb { display: none !important; }

  /* 2) 跟进弹窗撑满可视区；中间区域改为 flex 自适应滚动。
        覆盖模板内联的 max-height:calc(100vh - 190px) —— 真机 100vh 含地址栏，
        会把头尾挤出可视区，还会在底部留白。 */
  .modal.xwide {
    width: calc(100vw - 12px);
    height: calc(100dvh - 12px);
    max-height: calc(100dvh - 12px);
  }
  .modal.xwide .follow-layout.wide {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none !important;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* 3) 表单改单列，消除两列挤压（原最窄列仅 91px，下拉框错位） */
  .modal.xwide .form-grid,
  .modal.xwide .form-grid.three { grid-template-columns: 1fr; }

  /* 4) 底部按钮：整行换行 + 左侧导航独占一行，全部可见、不被裁切 */
  .modal.xwide .modal-foot {
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 12px;
    overflow-x: hidden;
    overflow-y: auto;
    max-height: 34dvh;
  }
  .modal.xwide .modal-foot .left {
    flex: 0 0 100%;
    min-width: 0;
    margin-right: 0;
    margin-bottom: 0;
    overflow: visible;
    flex-wrap: wrap;
    gap: 6px;
  }
  .modal.xwide .modal-foot .btn { flex: 1 1 auto; }
  .modal.xwide .modal-foot .left .btn { flex: 0 1 auto; }
}

/* ==========================================================================
   SKIN v2 · 租户端视觉收敛（克制版 · 纯覆盖，不改结构/功能）
   --------------------------------------------------------------------------
   原则：不堆渐变、不发光、不加彩色光晕；只用中性色 + 边框 + 字重 + 留白
        建立层次。目标是"像正经后台"，而不是"像 AI 生成的展示页"。
   回退：删除 "SKIN v2 BEGIN" 到 "SKIN v2 END" 整段即可恢复原样。
   ========================================================================== */
/* SKIN v2 BEGIN */

/* 变量：文字加深、边框变清晰、圆角与阴影收敛；主色保持品牌蓝不变 */
:root {
  --bg:      #f5f6f8;
  --text:    #16203a;
  --text-2:  #334155;
  --muted:   #6b7688;
  --line:    #e4e8ef;
  --line-2:  #eef1f6;
  --r-sm: 6px;
  --r:    8px;
  --r-lg: 10px;
  --r-xl: 14px;
  --sh-1: 0 1px 2px rgba(16,24,40,.05);
  --sh-2: 0 2px 8px rgba(16,24,40,.05);
  --sh-3: 0 8px 22px rgba(16,24,40,.07);
}

/* 卡片：干净白底 + 细边框；标题栏用纯色浅灰，不用渐变 */
.card { border: 1px solid var(--line); box-shadow: var(--sh-1); border-radius: var(--r-lg); }
.card-head { border-bottom: 1px solid var(--line); background: #fafbfd; }
.card-head h3 { font-weight: 700; color: var(--text); }
.card-head .right { color: var(--muted); }
.card-body.tight { padding: 0; }

/* 按钮：扁平纯色，去发光阴影 */
.btn { border-radius: var(--r); font-weight: 600; }
.btn-primary { background: var(--brand); border-color: var(--brand); box-shadow: none; }
.btn-primary:hover { background: var(--brand-600); border-color: var(--brand-600); box-shadow: none; }
.btn-teal { background: var(--teal); border-color: var(--teal); box-shadow: none; }
.btn-teal:hover { background: #0b8a64; border-color: #0b8a64; box-shadow: none; }
/* 精准覆盖工作台那个内联绿按钮，仅此一处 */
.dash-head .actions .btn[style*="0f9d58"] {
  background: var(--teal) !important; border-color: var(--teal) !important;
  color: #fff !important; box-shadow: none !important;
}
.dash-head .actions .btn[style*="0f9d58"]:hover { background: #0b8a64 !important; border-color: #0b8a64 !important; }

/* KPI 卡：去掉左侧彩条；图标改中性描边；数值颜色沉稳 */
.kpi { border-radius: var(--r-lg); }
.kpi.blue::before, .kpi.teal::before, .kpi.amber::before,
.kpi.rose::before, .kpi.violet::before { display: none; }
.kpi .k-label { color: #5b6577; font-weight: 600; }
.kpi .k-value { color: var(--text); font-weight: 750; letter-spacing: -.4px; }
.kpi .k-foot { color: #7a8598; }
.kpi .k-ico { opacity: 1; border-radius: 8px; background: #f1f4f9; color: #5b6577; }
.kpi.blue .k-ico  { color: var(--brand); }
.kpi.teal .k-ico  { color: var(--teal); }
.kpi.amber .k-ico { color: var(--amber); }
.kpi.rose .k-ico  { color: var(--rose); }
.kpi.violet .k-ico{ color: var(--violet); }
.kpi-grid.dash-kpi .kpi { border-radius: var(--r-lg); }

/* 表格：清晰表头 + 淡斑马纹，快速定位行 */
.table { font-size: 13px; }
.table thead th {
  background: #f2f5f9; color: #4b5565; font-weight: 700; font-size: 12px;
  border-bottom: 1px solid #d9e0ea;
}
.table tbody td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); }
.table tbody tr:nth-child(even) { background: #fbfcfe; }
.table tbody tr:hover { background: #f3f7fd; }
.dash-table .table thead th { background: #f2f5f9; color: #4b5565; }

/* 表单控件：统一收敛圆角 */
.input, .select, .textarea { border-radius: var(--r); border-color: var(--line); }
.dp-input { border-radius: var(--r); }

/* 进度条 / 柱状图 / 排名：扁平纯色，去渐变 */
.progress > i { background: var(--brand); }
.bars .bar i { background: var(--brand); border-radius: 5px 5px 2px 2px; }
.bars .bar:hover i { background: var(--brand-600); }
.rank-no { border-radius: 6px; }
.rank-row:nth-child(1) .rank-no { background: #f0f2f6; color: #6b7280; }
.rank-row:nth-child(2) .rank-no { background: #f0f2f6; color: #6b7280; }
.rank-row:nth-child(3) .rank-no { background: #f0f2f6; color: #6b7280; }

/* 徽章：降饱和细边，弱化糖果色 */
.badge { font-weight: 600; }
.badge-blue   { background: var(--brand-50); color: var(--brand-600); }
.badge-teal   { background: #eaf6f2; color: var(--teal); }
.badge-amber  { background: #fdf4e6; color: #a86b00; }
.badge-rose   { background: #fdeeee; color: #cf3a3f; }
.badge-gray   { background: #eef2f7; color: #5c6b82; }
.badge-violet { background: #f1ecfd; color: #5b32d6; }

/* 页面标题：层级分明 */
.page-title { color: var(--text); font-weight: 750; }
.page-desc  { color: var(--muted); }

/* 侧栏：单一深蓝灰纯色，不加渐变/高光线/光晕（ Logo 也收敛为纯色） */
.sidebar {
  background: #16203a;
}
.sidebar::before { display: none; }
.sidebar::after  { display: none; }
.brand-logo {
  background: var(--brand);
  box-shadow: none;
  border-radius: 8px;
}
.brand-sub { color: #7f8fad; }
.nav-group > .nav-title { color: var(--sidebar-text); font-weight: 550; }
.nav-group > .nav-title:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-sub a { color: #98a6c0; }
.nav-sub a::before { background: #46557a; }
.nav-sub a:hover { color: #fff; background: rgba(255,255,255,.06); }
.nav-sub a.active {
  color: #fff; background: rgba(47,107,255,.16);
  box-shadow: inset 3px 0 0 var(--brand);
}
.nav-sub a.active::before { background: #8aa8ff; box-shadow: none; }

/* SKIN v2 END */

/* ==========================================================================
   v4.0.22 · 分配工作台紧凑布局（三级未分配 / 私有数据 / 公海）
   目标：右侧操作面板紧凑、成员负载可视化、底部操作按钮常驻可见。
   ========================================================================== */
/* ASSIGN-UI BEGIN */
/* 操作面板整体更紧凑，减少纵向堆叠 */
.assign-layout .assign-side .card-body { padding: 8px 12px; }
.load-head { display:flex; justify-content:space-between; align-items:center; font-size:12px; color:var(--muted); margin-bottom:6px; }
.load-head a { color:var(--brand); cursor:pointer; }
.member-load { max-height:132px; overflow-y:auto; }
.load-row { display:flex; align-items:center; gap:8px; margin-bottom:5px; font-size:12px; }
.load-name { width:64px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--text-2); }
.load-bar { flex:1; height:7px; background:#eef2f7; border-radius:4px; overflow:hidden; }
.load-bar i { display:block; height:100%; background:var(--brand); border-radius:4px; }
.load-num { width:34px; text-align:right; color:var(--muted); font-variant-numeric:tabular-nums; }
/* 底部固定操作条：按钮常驻可见 */
.assign-sticky { display:flex; flex-direction:column; gap:6px; }
.pick-hint { font-size:12px; color:var(--muted); }
.pick-hint b { color:var(--brand); font-size:15px; }
/* 账本看板 */
.ledger-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:10px; margin:12px 0; }
.ledger-card { border:1px solid var(--line); border-radius:var(--r); padding:12px 14px; background:var(--card); }
.ledger-card .lg-name { font-size:12px; color:var(--muted); }
.ledger-card .lg-num { font-size:22px; font-weight:750; color:var(--text); line-height:1.3; }
.ledger-card .lg-sub { font-size:11px; color:var(--muted); }
.ledger-card.lg-active { border-color:var(--brand); box-shadow:0 0 0 2px var(--brand-100); }
.ledger-card .lg-path { font-size:10.5px; color:var(--muted); margin-top:5px; padding-top:5px; border-top:1px dashed var(--line-2,#e2e8f0); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ledger-card.lg-company { background:linear-gradient(135deg,var(--brand-50,#eef4ff),var(--card)); border-color:var(--brand-200,#c7d9ff); }
/* 团未分配右侧操作区：三个操作分块，避免下拨/回收/直分混在一起 */
.op-block { padding:10px 0; border-bottom:1px dashed var(--line-2,#e2e8f0); }
.op-block:last-of-type { border-bottom:0; }
.op-block .select { margin-bottom:7px; }
.op-block-head { display:flex; align-items:center; gap:7px; margin-bottom:7px; }
.op-block-head b { font-size:13px; color:var(--text); }
.op-step { display:inline-flex; align-items:center; justify-content:center; width:19px; height:19px; border-radius:50%; background:var(--brand); color:#fff; font-size:11px; font-weight:700; flex:none; }
.op-desc { font-size:11px; color:var(--muted); margin-left:auto; text-align:right; }
/* echarts 图表网格 */
.chart-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(300px,1fr)); gap:12px; margin:12px 0; }
.chart-box { border:1px solid var(--line); border-radius:var(--r); background:var(--card); padding:10px 12px; }
.chart-box h4 { font-size:13px; margin:0 0 6px; color:var(--text-2); }
.chart-box .chart-canvas { height:260px; }
/* 响应式：窄屏时右侧面板移到下方，按钮仍可见 */
@media (max-width: 980px) {
  .assign-layout { display:block; }
  .assign-layout .assign-side { position:static !important; width:100% !important; max-height:none !important; margin-top:12px; }
  .member-load { max-height:96px; }
  .chart-grid { grid-template-columns:1fr; }
  .ledger-grid { grid-template-columns:repeat(2,1fr); }
}
/* 分配规则：悬停提示，省去常驻占位 */
.rule-tip { display:inline-block; margin-bottom:8px; }
.rule-tip-trigger { display:inline-block; font-size:12px; color:var(--brand,#2563eb); cursor:help; border-bottom:1px dashed var(--brand,#2563eb); line-height:1.6; }
.rule-tip-trigger:focus { outline:2px solid var(--brand,#2563eb); outline-offset:2px; border-radius:3px; }
/* 浮层用 fixed + JS 定位：脱离窄面板，紧贴触发图标，不遮挡左侧数据、文字完整换行 */
.rule-tip-pop { display:none; position:fixed; left:0; top:0; z-index:2000; width:300px; max-width:calc(100vw - 16px); box-sizing:border-box; padding:11px 13px; background:#0f172a; color:#e2e8f0; border-radius:10px; border-left:3px solid #60a5fa; box-shadow:0 10px 30px rgba(15,23,42,.28); font-size:12px; line-height:1.85; text-align:left; white-space:normal; word-break:break-word; }
.rule-tip-pop .rt-title { font-weight:700; color:#fff; margin-bottom:3px; font-size:13px; }
.rule-tip-pop b { color:#93c5fd; }
/* 右侧操作面板手风琴：radio 互斥，打开一个自动关一个，默认展开负载 */
.acc-radio { position:absolute; opacity:0; width:0; height:0; pointer-events:none; }
.acc-head { display:flex; align-items:center; gap:7px; min-height:40px; padding:8px 12px; cursor:pointer; user-select:none; font-size:13px; color:var(--text-2,#475569); background:#f8fafc; border-bottom:1px solid var(--line-2,#e2e8f0); }
.acc-head:hover { background:#f1f5f9; }
.acc-head b { font-size:13px; color:var(--text,#0f172a); font-weight:600; }
.acc-head .op-desc { font-size:11px; color:var(--muted,#94a3b8); margin-left:auto; text-align:right; padding-right:16px; }
.acc-head::after { content:'＋'; margin-left:auto; color:var(--muted,#94a3b8); font-size:14px; line-height:1; }
.acc-head.has-desc::after { margin-left:0; }
.acc-radio:checked + .acc-head { background:#eef4ff; }
.acc-radio:checked + .acc-head b { color:var(--brand,#2563eb); }
.acc-radio:checked + .acc-head::after { content:'－'; color:var(--brand,#2563eb); }
.acc-body { display:none; padding:10px 12px; border-bottom:1px solid var(--line-2,#e2e8f0); }
.acc-radio:checked + .acc-head + .acc-body { display:block; }
.acc-body .load-head { margin-bottom:6px; }
/* ASSIGN-UI END */

/* ==========================================================================
   v4.1.3 紧凑化 + 圆角统一覆盖层（置底覆盖既有值，零回归）
   目标：首屏多显示数据、间距收紧一档、所有块圆角化、移动端自适应
   ========================================================================== */

/* ---- 1. 页头紧凑；说明文字改为标题旁 ⓘ 悬浮展现、统计置顶（v4.1.4）---- */
.page-head { margin-bottom: 12px; gap: 10px; align-items: center; }
.page-title { font-size: 19px; }
/* 原说明段落隐藏；其内容由通用 JS 抽取：统计→标题下方、全文→ⓘ 气泡 */
.page-desc { display: none !important; }
/* 大标题正下方的统计行 */
.stat-under-title { margin: 7px 0 0; font-size: 13px; color: var(--muted); line-height: 1.6; }
.stat-under-title b { color: var(--brand); font-size: 15px; font-weight: 700; margin: 0 2px; }
.stat-under-title .sep { color: #cbd5e1; margin: 0 9px; }
/* 标题旁的说明图标 */
.desc-info {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; margin-left: 9px; border-radius: 50%;
  background: #eef2ff; color: #5b7cfa; font-size: 12px; font-style: italic;
  font-family: Georgia, serif; font-weight: 700; cursor: help; vertical-align: middle;
  border: 1px solid #dbe4ff; position: relative; top: -1px; user-select: none;
}
.desc-info:hover, .desc-info.desc-info-on { background: #5b7cfa; color: #fff; border-color: #5b7cfa; }
/* 说明气泡 */
.desc-tip {
  display: none; position: fixed; z-index: 99999; max-width: 460px;
  background: #1e293b; color: #f1f5f9; padding: 12px 15px; border-radius: 10px;
  font-size: 12.5px; line-height: 1.75; box-shadow: 0 10px 30px rgba(0,0,0,.25);
  pointer-events: none; word-break: break-word;
}
@media (max-width: 768px) { .desc-tip { max-width: calc(100vw - 20px); } }
.desc-tip.on { display: block; }
.desc-tip::before {
  content: ''; position: absolute; top: -6px; left: var(--arrow-x, 16px);
  border-left: 6px solid transparent; border-right: 6px solid transparent;
  border-bottom: 6px solid #1e293b;
}
.desc-tip.above::before { top: auto; bottom: -6px; border-bottom: none; border-top: 6px solid #1e293b; }
.desc-tip b, .desc-tip strong { color: #fff; }

/* ---- 2. 卡片 / 块：圆角统一加大、内边距收紧 ---- */
.card, .table-card { border-radius: 14px; }
.card-pad, .card-body { padding: 13px 16px; }
.card-head { padding: 11px 16px; border-radius: 14px 14px 0 0; }
.badge, .pill, [class*="badge-"] { border-radius: 999px; }

/* ---- 3. 表格：行高收紧一档，圆角化外层 ---- */
.table { font-size: 13px; }
.table thead th { padding: 8px 12px; }
.table tbody td { padding: 8px 12px; }
.table .btn-sm { height: 27px; padding: 0 9px; font-size: 12px; border-radius: 8px; }
.table-wrap { border-radius: 12px; }

/* ---- 4. 按钮 / 输入：高度与圆角 ---- */
.btn { height: 34px; padding: 0 14px; border-radius: 10px; }
.btn-sm { height: 28px; padding: 0 10px; border-radius: 9px; }
.input, .select, textarea.input { border-radius: 10px; }
.filter-bar { gap: 10px; padding: 11px 14px; border-radius: 12px; }
.pager { padding: 10px 14px; }
.pager a, .pager span { border-radius: 8px; }

/* ---- 5. 手机端自适应强化 ---- */
@media (max-width: 768px) {
  .page-head { display: block; }
  .page-head .actions, .page-head .ph-actions {
    margin: 10px 0 0; width: 100%; justify-content: flex-start;
  }
  .page-head .actions .btn, .page-head .ph-actions .btn { flex: 0 1 auto; }
  .page-desc { max-width: 100%; -webkit-line-clamp: 3; }
  .card-pad, .card-body { padding: 11px 12px; }
  .card-head { padding: 10px 12px; }
  .table thead th, .table tbody td { padding: 8px 10px; }
  .filter-bar { padding: 10px; }
  .filter-bar .fitem .input, .filter-bar .fitem .select { min-width: 0; width: 100%; }
}
@media (max-width: 480px) {
  .page-title { font-size: 18px; }
  .page-head .actions .btn, .page-head .ph-actions .btn { flex: 1 1 44%; }
  .table { font-size: 12.5px; }
  .table thead th, .table tbody td { padding: 7px 8px; }
}

/* ==========================================================================
   v4.1.5 UI 设计审计精修（置底覆盖，零破坏既有规则）
   ========================================================================== */
/* 1) 原生文件上传控件美化：让"选择文件"按钮匹配系统描边风格 */
input[type="file"].input { padding: 6px 8px !important; height: auto; line-height: 1.5; }
input[type="file"].input::file-selector-button {
  content: '选择文件';
  background: #eef2ff; color: #4c6ef5; border: 1px solid #d0d9ff;
  border-radius: 9px; padding: 7px 14px; margin-right: 12px;
  font: inherit; font-weight: 600; font-size: 12.5px; cursor: pointer;
  transition: background .15s, border-color .15s;
}
input[type="file"].input::file-selector-button:hover { background: #e3eaff; border-color: #a9bdff; }
input[type="file"].input::-webkit-file-upload-button { /* Safari/旧 Chrome 兜底 */
  background: #eef2ff; color: #4c6ef5; border: 1px solid #d0d9ff;
  border-radius: 9px; padding: 7px 14px; margin-right: 12px;
  font: inherit; font-weight: 600; font-size: 12.5px; cursor: pointer;
}
/* 2) 跟进话术侧栏收起把手：加宽、字横排不局促 */
.rg-sb-handle { width: 42px; gap: 8px; }
.rg-sb-handle span { width: auto; font-size: 12px; letter-spacing: 1px; }

/* ==========================================================================
   v4.1.6 大标题下「实时统计条」全站统一组件
   --------------------------------------------------------------------------
   设计口径（专业判断，不按情绪色字面）：
   · 数值 = 品牌蓝（全站主色，协调不突兀）；标签 = 中性灰；分隔 = 极淡竖线
   · 无背景块 / 无彩色 badge / 无红紫高饱和 —— 统计是信息，不是警报
   · 显式 .head-stats 由模板直接渲染，JS 抽取逻辑见 app.js（有此块则跳过）
   ========================================================================== */
.head-stats {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 0; margin: 8px 0 0; min-height: 20px;
  font-size: 12.5px; line-height: 1.5; color: var(--muted);
}
.head-stats .hs-item {
  display: inline-flex; align-items: baseline; gap: 5px;
  white-space: nowrap;
}
.head-stats .hs-label { color: var(--muted); }
.head-stats .hs-num {
  color: var(--brand); font-size: 16px; font-weight: 750;
  font-variant-numeric: tabular-nums; line-height: 1; margin: 0 1px;
}
.head-stats .hs-unit { color: var(--muted); font-size: 12px; }
/* 项间分隔：极淡竖线，垂直居中，不抢眼 */
.head-stats .hs-sep {
  display: inline-block; width: 1px; height: 13px; flex: 0 0 1px;
  background: #e2e8f0; margin: 0 13px; vertical-align: middle;
}
/* 次要口径（如"在职/总数"中的分母）用淡色，不与主数值争夺焦点 */
.head-stats .hs-sub { color: #9aa6b8; font-weight: 500; }
/* 移动端：整体更紧凑，分隔间距收窄 */
@media (max-width: 768px) {
  .head-stats { margin-top: 7px; row-gap: 5px; }
  .head-stats .hs-num { font-size: 15px; }
  .head-stats .hs-sep { margin: 0 9px; }
}

/* ==========================================================================
   v4.1.7 限定分配数量输入（团未分配 / 公海分配共用）
   ========================================================================== */
.assign-limit-box label { display:block; font-size:12.5px; font-weight:600; color:var(--text); margin-bottom:5px; }
.assign-limit-box .al-row { display:flex; align-items:center; gap:8px; }
.assign-limit-box .al-row .input { min-width:0; height:32px; }
.assign-limit-box .al-row b { color:var(--brand); font-variant-numeric:tabular-nums; }
.assign-limit-box .al-hint { margin-top:4px; font-size:11.5px; line-height:1.4; }

/* ==========================================================================
   v4.1.8 右侧操作面板：标签页（替代手风琴）+ 成员负载常驻
   --------------------------------------------------------------------------
   · 成员负载移到面板顶部常驻，沿用既有 .member-load 进度条样式（不改视觉）
   · 操作项由纵向手风琴改为横向标签页，一眼全见、首屏可达、不用点开猜
   · 复用 .acc-radio（隐藏 radio）+ ~ 兄弟选择器，RG.accordion 状态记忆照常工作
   · 纯 UI 层替换，所有 DOM id / 提交 payload / 权限裁剪 / JS 联动保持不变
   ========================================================================== */
.assign-side .op-load-block { padding:10px 12px 8px; border-bottom:1px solid var(--line-2,#e2e8f0); }
.assign-side .op-load-block .load-head { margin-bottom:6px; }
/* 标签栏 */
.op-tabbar { display:flex; gap:4px; padding:8px 10px 0; background:#f8fafc; border-bottom:1px solid var(--line-2,#e2e8f0); }
.op-tab {
  flex:1; display:inline-flex; align-items:center; justify-content:center; gap:5px;
  min-height:36px; padding:6px 4px; font-size:12.5px; font-weight:600;
  color:var(--text-2,#475569); background:#e9eef5; border:1px solid transparent; border-bottom:none;
  border-radius:9px 9px 0 0; cursor:pointer; user-select:none; white-space:nowrap;
  transition:background .15s ease, color .15s ease;
}
.op-tab .op-step { width:17px; height:17px; font-size:10px; }
.op-tab:hover { background:#dde5ef; }
/* 选中态：radio:checked 用通用兄弟 ~ 命中对应标签 */
#unacc2:checked ~ .op-tabbar label[for="unacc2"],
#unacc3:checked ~ .op-tabbar label[for="unacc3"],
#unacc4:checked ~ .op-tabbar label[for="unacc4"],
#placc2:checked ~ .op-tabbar label[for="placc2"],
#placc3:checked ~ .op-tabbar label[for="placc3"] {
  background:var(--brand,#2563eb); color:#fff;
}
#unacc2:checked ~ .op-tabbar label[for="unacc2"] .op-step,
#unacc3:checked ~ .op-tabbar label[for="unacc3"] .op-step,
#unacc4:checked ~ .op-tabbar label[for="unacc4"] .op-step,
#placc2:checked ~ .op-tabbar label[for="placc2"] .op-step,
#placc3:checked ~ .op-tabbar label[for="placc3"] .op-step { background:#fff; color:var(--brand,#2563eb); }
/* 内容面板：默认隐藏，选中对应 radio 才显示 */
.op-panel { display:none; padding:10px 12px; border-bottom:1px solid var(--line-2,#e2e8f0); }
#unacc2:checked ~ .op-panel[data-tab="unacc2"],
#unacc3:checked ~ .op-panel[data-tab="unacc3"],
#unacc4:checked ~ .op-panel[data-tab="unacc4"],
#placc2:checked ~ .op-panel[data-tab="placc2"],
#placc3:checked ~ .op-panel[data-tab="placc3"] { display:block; }
.op-panel .btn-block { margin-top:7px; }
.op-panel .btn-block + .btn-block { margin-top:6px; }
/* 公海：单一分配面板（选人+设置+提交一屏完成），无需切换 */
.op-panel-always { display:block; }
/* 移动端：标签更紧凑，去掉序号圆点省宽 */
@media (max-width:768px) {
  .op-tabbar { padding:6px 6px 0; gap:3px; }
  .op-tab { min-height:38px; font-size:12px; padding:5px 2px; }
  .op-tab .op-step { display:none; }
  .assign-side .op-load-block { padding:8px 10px 6px; }
}

/* v4.1.8 修复：账本卡片窄屏下 long path 撑宽 grid 列导致整页 20px 横向溢出 */
.ledger-grid > .ledger-card { min-width: 0; }

/* ==========================================================================
   v4.1.8 修订：标签防溢出 + 三种操作共用数量框 + 非法输入提示
   ========================================================================== */
/* 标签栏：文字居中、允许收缩，杜绝窄屏挤出面板 */
.op-tabbar { gap:3px; padding:8px 8px 0; }
.op-tab { min-width:0; padding:6px 2px; overflow:hidden; text-overflow:ellipsis; }
/* 三种操作共用的数量框 */
.op-limit-shared { padding:9px 12px; border-bottom:1px solid var(--line-2,#e2e8f0); }
.ols-row { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:5px; }
.op-limit-shared label { font-size:12.5px; font-weight:600; color:var(--text); }
.op-limit-shared .al-hint { margin-top:4px; font-size:11.5px; line-height:1.4; }
.op-limit-shared .input.is-invalid,
.assign-limit-box .input.is-invalid { border-color:#e03131 !important; background:#fff5f5 !important; }
/* 清空按钮紧凑 */
.op-limit-shared .btn-sm, .assign-limit-box .btn-sm { flex:none; padding:0 10px; height:32px; }
@media (max-width:768px) {
  .op-tabbar { padding:6px 6px 0; gap:3px; }
  .op-tab { font-size:12px; min-height:38px; }
  .op-limit-shared { padding:8px 10px; }
}

/* ==========================================================================
   v4.4.50 批量加入拨号单弹窗（勾选优先 / 否则按筛选）
   ========================================================================== */
.rg-draft-info {
  font-size: 13px; line-height: 1.7; color: var(--text, #333);
  padding: 8px 10px; margin-bottom: 8px; border-radius: 6px;
  background: var(--bg-soft, #f6f8fb); border: 1px solid var(--line-2, #e2e8f0);
  word-break: break-all;
}
.rg-draft-info b { font-weight: 700; }
.rg-draft-info .hi { color: #0f9d58; font-weight: 700; }
.rg-draft-field { padding: 4px 2px 2px; }
.rg-draft-field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.rg-draft-field input[type=number] {
  width: 100%; height: 38px; padding: 0 10px; box-sizing: border-box;
  border: 1px solid var(--line-2, #cbd5e1); border-radius: 6px;
  background: var(--bg, #fff); color: var(--text, #333); font-size: 15px;
}
.rg-draft-hint { font-size: 12px; line-height: 1.6; color: var(--text-sub, #888); margin-top: 8px; }
.rg-draft-err { font-size: 12.5px; color: #e03131; margin-top: 8px; }
