:root {
  --bg: #f5f6f8;
  --bg-card: #ffffff;
  --bg-card2: #f0f1f3;
  --border: #e5e7eb;
  --text: #1a1a1a;
  --text-dim: #6b7280;
  --blue: #3b82f6;
  --red: #ef4444;
  --green: #10b981;
  --amber: #f59e0b;
  --purple: #8b5cf6;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.6;
}

/* 顶部导航 */
.nav {
  display: flex;
  align-items: center;
  height: 56px;
  padding: 0 24px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav .brand {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  margin-right: 32px;
  white-space: nowrap;
}
.nav .brand span { color: var(--blue); }
.nav .tabs { display: flex; gap: 4px; }
.nav .tabs a {
  color: var(--text-dim);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 8px;
  transition: all .15s;
}
.nav .tabs a:hover { color: var(--text); background: var(--bg-card2); }
.nav .tabs a.active { color: #fff; background: var(--blue); }
.nav .right { margin-left: auto; color: var(--text-dim); font-size: 13px; }

/* 主容器 */
.container { max-width: 1280px; margin: 0 auto; padding: 24px; }

/* 卡片 */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}
.card h2 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text);
}
.card .sub { color: var(--text-dim); font-size: 12px; font-weight: 400; margin-left: 8px; }

/* KPI 卡片 */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.kpi {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
}
.kpi .label { color: var(--text-dim); font-size: 13px; }
.kpi .value { font-size: 28px; font-weight: 600; margin: 6px 0 2px; }
.kpi .unit { color: var(--text-dim); font-size: 12px; }
.kpi.red .value { color: var(--red); }
.kpi.green .value { color: var(--green); }
.kpi.amber .value { color: var(--amber); }
.kpi.blue .value { color: var(--blue); }

/* 两列布局 */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }

/* 表格 */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
th { color: var(--text-dim); font-weight: 500; font-size: 12px; }
td { color: var(--text); font-size: 13px; }
tr:hover td { background: var(--bg-card2); }

/* 徽章 */
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}
.badge.red { background: rgba(255,92,108,.15); color: var(--red); }
.badge.green { background: rgba(46,204,138,.15); color: var(--green); }
.badge.amber { background: rgba(245,166,35,.15); color: var(--amber); }
.badge.blue { background: rgba(79,140,255,.15); color: var(--blue); }
.badge.gray { background: rgba(139,155,176,.15); color: var(--text-dim); }

/* 按钮 */
.btn {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card2);
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  transition: all .15s;
  text-decoration: none;
}
.btn:hover { border-color: var(--blue); color: var(--blue); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover { opacity: .9; color: #fff; }
.btn.danger { color: var(--red); border-color: rgba(255,92,108,.4); }
.btn.sm { padding: 4px 10px; font-size: 12px; }

/* 工具栏 */
.toolbar { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.toolbar .spacer { flex: 1; }

/* 输入框 */
input, select, textarea {
  width: 100%;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card2);
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); }
label { display: block; color: var(--text-dim); font-size: 12px; margin-bottom: 4px; }
.form-row { margin-bottom: 14px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }

/* 弹窗 */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  width: 560px;
  max-width: 92vw;
  max-height: 88vh;
  overflow-y: auto;
  padding: 24px;
}
.modal h3 { font-size: 16px; margin-bottom: 16px; }
.modal .actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 20px; }
.hidden { display: none !important; }

/* 进度条 / 分布条 */
.bar { height: 8px; border-radius: 4px; background: var(--bg-card2); overflow: hidden; }
.bar .fill { height: 100%; border-radius: 4px; }

/* 空状态 */
.empty { color: var(--text-dim); text-align: center; padding: 40px; }

/* 详情描述列表 */
.desc { display: grid; grid-template-columns: 120px 1fr; gap: 8px 16px; }
.desc .k { color: var(--text-dim); font-size: 13px; }
.desc .v { color: var(--text); font-size: 13px; }

/* 提示条 */
.tip { background: rgba(79,140,255,.1); border: 1px solid rgba(79,140,255,.3); border-radius: 8px; padding: 10px 14px; color: var(--text-dim); font-size: 13px; margin-bottom: 16px; }

/* 侧边栏 */
.sidebar {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: 220px;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  z-index: 99;
}
.sidebar .sb-brand {
  height: 56px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  font-size: 16px;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}
.sidebar .sb-brand span { color: var(--blue); }
.sb-group { padding: 2px 0; }
.sb-group-title {
  padding: 9px 20px;
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 1px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  border-radius: 6px;
  margin: 0 8px;
  user-select: none;
  transition: all .15s;
}
.sb-group-title:hover { background: var(--bg-card2); color: var(--text); }
.sb-arrow {
  display: inline-block;
  font-size: 9px;
  width: 12px;
  transition: transform .2s;
  color: var(--text-dim);
}
.sb-group.open .sb-arrow { transform: rotate(90deg); color: var(--blue); }
.sb-items {
  max-height: 0;
  overflow: hidden;
  transition: max-height .25s ease;
}
.sb-group.open .sb-items { max-height: 320px; }
.sb-item {
  display: block;
  padding: 7px 20px 7px 38px;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 13px;
  transition: all .12s;
  position: relative;
}
.sb-item:hover { color: var(--text); background: var(--bg-card2); }
.sb-item.active { color: #ff8c00; background: rgba(255,140,0,.12); }
.sb-item.disabled { color: #55627a; cursor: not-allowed; }
.sb-item.disabled:hover { color: #55627a; background: transparent; }
.sb-item .tag {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  color: var(--amber);
}

body.with-sidebar { margin-left: 0; }
body.with-topbar { margin-left: 0; padding-top: 70px; }
body.side-open { margin-left: 180px; }
body.with-topbar .container { padding-top: 0; max-width: 1280px; }

/* 目标结果卡 */
.goal-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card2);
  margin-bottom: 10px;
}
.goal-card .g-left { display: flex; align-items: center; gap: 14px; }
.goal-card .g-name { font-weight: 600; min-width: 90px; }
.goal-card .g-meta { color: var(--text-dim); font-size: 12px; }
.goal-card .g-result { font-size: 20px; font-weight: 600; }
.goal-card .g-result.ok { color: var(--green); }
.goal-card .g-result.warn { color: var(--amber); }
.goal-card .g-result.bad { color: var(--red); }

/* 老板总看板：盈利大字 */
.hero {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
@media (max-width: 800px) { .hero { grid-template-columns: repeat(2, 1fr); } }
.hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 20px;
  text-align: center;
}
.hero-card .v { font-size: 34px; font-weight: 600; line-height: 1.2; }
.hero-card .l { color: var(--text-dim); font-size: 13px; margin-top: 6px; }
.hero-card.revenue .v { color: var(--blue); }
.hero-card.cost .v { color: var(--text-dim); }
.hero-card.profit .v { color: #ffd166; }
.hero-card.rate .v { color: var(--green); }

/* 中心经营卡 */
.center-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
@media (max-width: 900px) { .center-grid { grid-template-columns: repeat(2, 1fr); } }
.center-card {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  position: relative;
}
.center-card .rank {
  position: absolute;
  top: 12px;
  right: 14px;
  font-size: 12px;
  color: var(--text-dim);
}
.center-card .c-name { font-weight: 600; margin-bottom: 6px; }
.center-card .c-value { font-size: 22px; font-weight: 600; }
.center-card .c-metric { color: var(--text-dim); font-size: 12px; margin-top: 2px; }
.center-card .c-desc { color: var(--text-dim); font-size: 11px; margin-top: 6px; }
.center-card.ok { border-top: 3px solid var(--green); }
.center-card.warn { border-top: 3px solid var(--amber); }
.center-card.bad { border-top: 3px solid var(--red); }

/* 排名榜 */
.rank-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.rank-item:last-child { border-bottom: none; }
.rank-medal {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  margin-right: 14px;
  flex-shrink: 0;
}
.rank-medal.gold { background: #ffd166; color: #7a5200; }
.rank-medal.silver { background: #c0c7d1; color: #3a4149; }
.rank-medal.bronze { background: #cd9a6b; color: #5a3416; }
.rank-medal.normal { background: var(--bg-card2); color: var(--text-dim); }
.rank-item .r-name { font-weight: 600; flex: 1; }
.rank-item .r-score { color: var(--text-dim); font-size: 13px; }

/* 侧边栏用户信息 */
.sb-user {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}
.sb-user-name { font-weight: 600; font-size: 14px; }
.sb-user-role { color: var(--text-dim); font-size: 12px; margin-top: 2px; }
.sb-logout { color: var(--red); font-size: 12px; text-decoration: none; margin-top: 10px; display: inline-block; }

/* ====== 顶栏（亿企代账风格）====== */
.with-topbar .container { max-width: 1280px; }
.topbar {
  position: fixed; left: 0; right: 0; top: 0; height: 52px;
  background: linear-gradient(180deg, #2c2f36 0%, #232529 100%);
  border-bottom: 1px solid #1a1c20;
  z-index: 100;
  color: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.3);
}
.topbar-inner {
  display: flex; align-items: center; height: 100%;
  padding: 0 16px;
}
.topbar-brand {
  font-size: 16px; font-weight: 700; color: #fff;
  text-decoration: none; padding-right: 18px;
  border-right: 1px solid #3a3d44;
  margin-right: 4px;
  letter-spacing: 1px;
}
.topbar-menus { display: flex; flex: 1; height: 100%; overflow: hidden; }
.topbar-menu {
  display: flex; align-items: center; gap: 6px;
  padding: 0 14px; height: 100%;
  color: #c8cad0; text-decoration: none; font-size: 13px;
  font-weight: 600;
  cursor: pointer; position: relative; white-space: nowrap;
  transition: all .15s;
}
.topbar-menu:hover { color: #fff; background: rgba(255,255,255,.06); }
.topbar-menu.active {
  color: #fff;
  background: linear-gradient(180deg, #ff6a3d 0%, #e14d1e 100%);
  font-weight: 600;
}
.topbar-menu.active::after {
  content: ''; position: absolute; left: 50%; bottom: -1px;
  width: 30px; height: 3px; background: #ff6a3d;
  transform: translateX(-50%); border-radius: 2px;
}
.topbar-ic { font-size: 14px; }
/* ===== 导航个性化：更多收纳 / 自定义面板（顶栏纯展示，不支持拖拽，无隐藏×） ===== */
.topbar-more { cursor: pointer; user-select: none; }
.more-caret { font-size: 10px; margin-left: 2px; opacity: .8; }
.more-dropdown {
  position: fixed; top: auto; right: auto;
  width: 480px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 10px; box-shadow: 0 12px 30px rgba(0,0,0,.4); padding: 6px; z-index: 2000;
}
.more-body { display: flex; height: 430px; margin-top: 4px; }
.more-groups { width: 132px; flex-shrink: 0; border-right: 1px solid var(--border); overflow-y: auto; padding: 2px; }
.mg-item { padding: 9px 12px; font-size: 13px; cursor: pointer; border-radius: 6px; margin: 2px 0; color: var(--text); }
.mg-item:hover { background: rgba(255,255,255,.06); }
.mg-item.active { background: var(--blue); color: #fff; }
.more-items { flex: 1; overflow-y: auto; padding: 2px 4px; }
/* 顶栏栏目下方下拉子菜单（陈总原则：不做左右结构，二级菜单隐藏在栏目文字下方） */
.topdrop { position: fixed; min-width: 200px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 12px 30px rgba(0,0,0,.4); padding: 6px; z-index: 2001; }
.td-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 6px; cursor: pointer; color: var(--text); font-size: 13px; text-decoration: none; }
.td-item:hover { background: rgba(255,255,255,.06); }
.td-item.active { color: var(--blue); font-weight: 600; }
.td-ic { font-size: 15px; }
.td-divider { border-top: 1px solid var(--border); margin: 4px 0; }
.more-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 4px 8px 8px; font-size: 12px; color: var(--text-dim);
  border-bottom: 1px solid var(--border); margin-bottom: 4px;
}
.more-head a { color: var(--blue); cursor: pointer; }
.more-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; cursor: pointer; color: var(--text); text-decoration: none; font-weight: 600; }
.more-item:hover { background: rgba(255,255,255,.06); }
.mi-ic { font-size: 15px; }
.mi-lb { flex: 1; }
.mi-show {
  font-size: 12px; color: var(--blue);
  border: 1px solid var(--border); border-radius: 6px; padding: 2px 8px;
}
.mi-show:hover { border-color: var(--blue); }
.more-item.mi-hidden .mi-ic, .more-item.mi-hidden .mi-lb { opacity: .45; }
.more-empty { padding: 14px; text-align: center; color: var(--text-dim); font-size: 13px; }
.nc-row { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--border); }
.nc-move { display: flex; flex-direction: column; gap: 2px; }
.nc-move .btn { padding: 1px 7px; line-height: 1.3; font-size: 12px; }
.nc-ic { font-size: 16px; }
.nc-lb { flex: 1; font-size: 14px; }
.nc-toggle { font-size: 13px; color: var(--text-dim); white-space: nowrap; }
.topbar-right { display: flex; align-items: center; gap: 12px; padding-right: 4px; }
.topbar-badge {
  position: relative; cursor: pointer; padding: 4px 8px;
  background: rgba(255,255,255,.08); border-radius: 14px;
  font-size: 12px; color: #ddd;
}
.topbar-badge:hover { background: rgba(255,255,255,.15); }
.topbar-badge.renew { background: #ff4d4f; color: #fff; }
.topbar-badge .bd {
  position: absolute; top: -6px; right: -8px;
  background: #ff4d4f; color: #fff; font-size: 10px;
  padding: 1px 5px; border-radius: 8px; font-weight: 600;
}
.topbar-avatar {
  display: flex; align-items: center; gap: 6px;
  cursor: pointer; padding: 4px 10px; border-radius: 20px;
  color: #fff; text-decoration: none;
  transition: background .15s;
}
.topbar-avatar:hover { background: rgba(255,255,255,.1); }
.avatar-circle {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, #4f8cff, #7f77dd);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; color: #fff;
}
.avatar-name { font-size: 13px; }
.avatar-arrow { font-size: 10px; color: #ccc; }

/* 头像下拉菜单 */
.avatar-menu {
  position: fixed; top: 56px; right: 16px;
  width: 240px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
  z-index: 101; padding: 4px 0;
}
.am-header {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-bottom: 1px solid var(--border);
}
.am-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, #4f8cff, #7f77dd);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 600; font-size: 16px;
}
.am-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; color: var(--text); text-decoration: none;
  font-size: 14px; cursor: pointer;
}
.am-item:hover { background: var(--bg-card2); }
.am-ic { width: 22px; text-align: center; font-size: 16px; }
.am-arr { margin-left: auto; color: var(--text-dim); font-size: 14px; }
.am-badge {
  margin-left: auto; padding: 1px 6px; font-size: 11px;
  background: rgba(245,166,35,.15); color: #f5a623;
  border-radius: 4px; font-weight: 600;
}
.am-item.danger { color: var(--red); }
.am-divider { height: 1px; background: var(--border); margin: 4px 0; }

/* ====== 左侧二级菜单 ======= */
.subsidebar {
  position: fixed; left: 0; top: 52px; bottom: 0;
  width: 180px; background: var(--bg-card);
  border-right: 1px solid var(--border);
  overflow-y: auto; z-index: 90;
}
.ss-title {
  padding: 14px 18px 8px;
  font-size: 12px; color: var(--text-dim);
  letter-spacing: 1px;
  display: flex; justify-content: space-between; align-items: center;
}
.ss-close { cursor: pointer; font-size: 14px; color: var(--text-dim); padding: 0 4px; }
.ss-close:hover { color: var(--red); }
.ss-items { display: flex; flex-direction: column; }
.ss-item {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 18px; color: var(--text-dim);
  text-decoration: none; font-size: 13px;
  border-left: 3px solid transparent;
  transition: all .12s;
}
.ss-item:hover { color: var(--text); background: var(--bg-card2); }
.ss-item.active {
  color: #ff8c00; background: rgba(255,140,0,.12);
  border-left-color: #ff8c00;
}
.ss-item.disabled { color: #55627a; cursor: not-allowed; }
.ss-ic { width: 18px; font-size: 14px; }
.ss-lb { flex: 1; }

/* 左侧栏可折叠父项（如合规交付 → 客户/售前/服务/档案） */
.ss-parent { cursor: pointer; }
.ss-caret { margin-left: auto; font-size: 11px; opacity: .65; transition: transform .2s; }
.ss-parent.open .ss-caret { transform: rotate(90deg); }
.ss-children { display: none; padding-left: 10px; margin: 2px 0 2px 16px; border-left: 2px solid var(--border); }
.ss-children.open { display: block; }
/* 二级折叠（客户→获客管理→新媒体中心） */
.ss-parent2 { cursor: pointer; font-size: 12.5px; padding-left: 6px !important; }
.ss-parent2 .ss-caret { font-size: 10px; }
.ss-parent2.open .ss-caret { transform: rotate(90deg); }
.ss-children2 { display: none; padding-left: 8px; margin: 2px 0 2px 12px; border-left: 1px dashed var(--border); }
.ss-children2.open { display: block; }
.ss-child2 { display: block; padding: 6px 12px; font-size: 12.5px; color: var(--text-dim); text-decoration: none; border-left: 2px solid transparent; }
.ss-child2:hover { color: var(--text); background: rgba(255,255,255,.04); }
.ss-child2.active { color: var(--blue); border-left-color: var(--blue); font-weight: 600; }
.ss-child { display: block; padding: 8px 12px 8px 14px; margin: 2px 0; color: var(--text-dim); font-size: 13px; border-radius: 6px; text-decoration: none; cursor: pointer; transition: all .12s; }
.ss-child:hover { background: var(--bg-card2); color: var(--text); }
.ss-child.active { background: var(--blue); color: #fff; }

/* 栏目末位固定「设置」项 */
.ss-setting { margin-top: 10px; border-top: 1px solid var(--border); padding-top: 12px; }

/* ====== 模块设置按钮(齿轮) ====== */
.module-tools {
  display: flex; align-items: center; gap: 8px;
  margin-left: auto;
}
.module-gear {
  width: 30px; height: 30px; border-radius: 6px;
  background: var(--bg-card2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 14px; color: var(--text-dim);
  transition: all .15s;
}
.module-gear:hover { background: var(--blue); color: #fff; border-color: var(--blue); }

/* ====== 模块设置弹窗 ======= */
.module-set-tabs {
  display: flex; border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}
.module-set-tabs .t {
  padding: 10px 18px; cursor: pointer;
  color: var(--text-dim); border-bottom: 2px solid transparent;
  font-size: 14px;
}
.module-set-tabs .t.active { color: var(--blue); border-bottom-color: var(--blue); font-weight: 600; }
.module-set-panel { display: none; }
.module-set-panel.active { display: block; }
.perm-row {
  display: grid; grid-template-columns: 1fr 80px 80px 80px 80px;
  gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border); align-items: center;
}
.perm-row .h { color: var(--text-dim); font-size: 12px; font-weight: 600; }
.perm-row input[type="checkbox"] { width: 18px; height: 18px; cursor: pointer; }

/* 浮动齿轮按钮(模块设置入口) */
.module-gear-fixed {
  position: fixed; top: 64px; right: 16px;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg-card); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 18px; color: var(--text-dim);
  z-index: 89; transition: all .2s;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
}
.module-gear-fixed:hover {
  background: var(--blue); color: #fff; border-color: var(--blue);
  transform: rotate(90deg);
}

/* 移动端顶栏 + 汉堡按钮 */
.mobile-bar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 97;
  height: 52px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  align-items: center;
  padding: 0 16px;
  gap: 14px;
}
.mobile-bar .brand { font-weight: 600; font-size: 15px; }
.mobile-bar .hamburger {
  background: none;
  border: none;
  color: var(--text);
  font-size: 24px;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
}
.sidebar-mask {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 98;
}

/* 手机响应式 */
@media (max-width: 768px) {
  .mobile-bar { display: flex; }
  body.with-sidebar { margin-left: 0; }
  .sidebar {
    transform: translateX(-100%);
    transition: transform .25s ease;
    width: 250px;
    z-index: 99;
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-mask.show { display: block; }
  .container { padding: 14px; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .kpi { padding: 14px; }
  .kpi .value { font-size: 22px; }
  .hero { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .hero-card { padding: 16px 12px; }
  .hero-card .v { font-size: 26px; }
  .center-grid { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .desc { grid-template-columns: 90px 1fr; }
  .modal { width: 94vw; padding: 18px; }
  .toolbar { flex-wrap: wrap; }
  .toolbar input, .toolbar select { width: 100% !important; }
  .card { overflow-x: auto; }
  table { min-width: 560px; }
  #experts, #nodes { grid-template-columns: repeat(2, 1fr) !important; }
  h1 { font-size: 19px !important; }
  .card h2 { font-size: 14px; }
}

/* ===== 手机工作台（mobile.html 专用） ===== */
.m-app { max-width: 520px; margin: 0 auto; min-height: 100vh; position: relative; padding-bottom: 62px; }
.m-header {
  position: sticky; top: 0; z-index: 10;
  height: 50px; background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 16px;
}
.m-tab { display: none; padding: 14px; }
.m-tab.active { display: block; }
.m-tabbar {
  position: fixed; bottom: 0; left: 0; right: 0;
  max-width: 520px; margin: 0 auto;
  height: 58px; background: var(--bg-card);
  border-top: 1px solid var(--border);
  display: flex; z-index: 20;
}
.m-tabbar .it {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px;
  color: var(--text-dim); font-size: 11px; cursor: pointer;
}
.m-tabbar .it .ic { font-size: 20px; line-height: 1; }
.m-tabbar .it.active { color: var(--blue); }
.m-tabbar .it.active .ic { transform: scale(1.1); }

.m-msg { display: flex; align-items: center; gap: 12px; padding: 14px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 10px; }
.m-msg .ic { width: 42px; height: 42px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.m-msg .tt { font-weight: 600; font-size: 14px; }
.m-msg .sub { color: var(--text-dim); font-size: 12px; margin-top: 2px; }
.m-msg .tm { margin-left: auto; color: var(--text-dim); font-size: 11px; flex-shrink: 0; }

.m-cust { display: flex; align-items: center; gap: 12px; padding: 14px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 10px; cursor: pointer; }
.m-cust .av { width: 40px; height: 40px; border-radius: 50%; background: var(--blue); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600; flex-shrink: 0; }
.m-cust .nm { font-weight: 600; font-size: 14px; }
.m-cust .mt { color: var(--text-dim); font-size: 12px; margin-top: 2px; }

.m-todo { display: flex; align-items: center; gap: 10px; padding: 14px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 10px; }
.m-todo .ck { width: 20px; height: 20px; border: 2px solid var(--border); border-radius: 50%; flex-shrink: 0; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.m-todo.done .ck { background: var(--green); border-color: var(--green); }
.m-todo.done .tt { text-decoration: line-through; color: var(--text-dim); }

.m-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.m-grid .tool { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; cursor: pointer; }
.m-grid .tool .ic { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.m-grid .tool .nm { font-size: 11px; color: var(--text); text-align: center; }

.m-me { text-align: center; }
.m-me .avatar { width: 70px; height: 70px; border-radius: 50%; background: var(--blue); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 600; margin: 10px auto; }
.m-me .stat { display: flex; gap: 10px; justify-content: center; margin: 16px 0; }
.m-me .stat .s { flex: 1; background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 12px 6px; }
.m-me .stat .s .v { font-size: 20px; font-weight: 600; }
.m-me .stat .s .l { color: var(--text-dim); font-size: 11px; margin-top: 2px; }
.m-me .menu { text-align: left; background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.m-me .menu .mi { display: flex; align-items: center; gap: 10px; padding: 14px; border-bottom: 1px solid var(--border); font-size: 14px; }
.m-me .menu .mi:last-child { border-bottom: none; }
.m-me .menu .mi .ic { font-size: 18px; }

/* mobile 弹层/创建方式/创建个人客户表单 */
.m-fab {
  position: fixed; bottom: 76px; right: 20px; width: 52px; height: 52px;
  border-radius: 50%; background: var(--blue); color: #fff;
  border: none; font-size: 28px; box-shadow: 0 4px 12px rgba(79,140,255,.4);
  z-index: 15; cursor: pointer; line-height: 1;
}
.m-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 100;
  display: flex; align-items: flex-end; justify-content: center;
}
.m-sheet {
  width: 100%; max-width: 520px; max-height: 80vh; background: var(--bg);
  border-radius: 16px 16px 0 0; overflow-y: auto; padding-bottom: 16px;
}
.m-sheet-header {
  display: flex; align-items: center; height: 48px;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--bg); z-index: 1;
}
.m-action {
  display: flex; align-items: center; gap: 14px; padding: 16px;
  border-bottom: 1px solid var(--border); cursor: pointer; position: relative;
}
.m-action-ic {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: #fff; flex-shrink: 0;
}
.m-action-tt { font-weight: 600; font-size: 15px; }
.m-action-sub { color: var(--text-dim); font-size: 12px; margin-top: 2px; }
.m-action-arrow { margin-left: auto; color: var(--text-dim); font-size: 18px; }
.m-tag-new {
  position: absolute; right: 36px; top: 50%; transform: translateY(-50%);
  background: var(--red); color: #fff; font-size: 10px; padding: 2px 6px;
  border-radius: 4px;
}
.m-form {
  width: 100%; max-width: 520px; max-height: 92vh; background: var(--bg);
  border-radius: 16px 16px 0 0; overflow-y: auto; padding-bottom: 60px;
}
.m-form-group {
  background: var(--bg-card2); padding: 8px 16px;
  font-size: 12px; color: var(--text-dim);
}
.m-form-row {
  display: flex; align-items: center; min-height: 48px;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  background: var(--bg); cursor: pointer;
}
.m-form-row .lb { min-width: 80px; font-size: 14px; }
.m-form-row .lb .req { color: var(--red); margin-right: 2px; }
.m-form-row .ph { flex: 1; color: var(--text-dim); font-size: 14px; }
.m-form-row .ar { color: var(--text-dim); }
.m-form-loc { color: var(--blue); font-size: 18px; }
.m-form-input {
  display: none; padding: 10px 16px; background: var(--bg);
  border: none; border-bottom: 1px solid var(--border);
  color: var(--text); font-size: 14px; width: 100%;
}
.m-form-input:focus { outline: none; background: var(--bg-card2); }
.m-form-footer {
  position: sticky; bottom: 0; background: var(--bg);
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; gap: 12px;
}
.m-form-submit {
  background: #2ecc8a; color: #fff; border: none; border-radius: 8px;
  padding: 10px 24px; font-size: 15px; font-weight: 600; cursor: pointer;
}
.m-picker {
  width: 100%; max-width: 520px; max-height: 60vh; background: var(--bg);
  border-radius: 16px 16px 0 0; overflow-y: auto;
}
.m-pick-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px; border-bottom: 1px solid var(--border); cursor: pointer;
}
.m-pick-row.sel { color: var(--blue); }
.m-pick-ck { color: var(--blue); font-weight: 600; }

/* ===== 状态栏 + 顶部栏 ===== */
.m-topbar {
  display: flex; align-items: center; height: 44px;
  padding: 0 14px; border-bottom: 1px solid var(--border);
  background: var(--bg-card);
}
.m-topbar-time { font-size: 13px; color: var(--text); font-weight: 600; min-width: 50px; }
.m-topbar-title { flex: 1; text-align: center; font-size: 16px; font-weight: 600; }
.m-topbar-icons { font-size: 18px; min-width: 50px; text-align: right; }

.m-topbar2 {
  display: flex; align-items: center; justify-content: space-between;
  height: 44px; padding: 0 14px; border-bottom: 1px solid var(--border);
  background: var(--bg-card);
}
.m-title2 { font-size: 17px; font-weight: 600; }
.m-topbar-icons2 { font-size: 14px; color: var(--text-dim); cursor: pointer; }

/* ===== 消息大卡（图1） ===== */
.m-searchbar {
  display: flex; align-items: center; margin: 10px 14px;
  padding: 8px 12px; background: var(--bg-card2); border-radius: 8px;
}
.m-msg-card {
  display: flex; gap: 12px; padding: 14px; margin: 0 14px 10px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
}
.m-msg-ic {
  width: 40px; height: 40px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: #fff; flex-shrink: 0;
}
.m-msg-body { flex: 1; min-width: 0; }
.m-msg-tt { font-size: 13px; line-height: 1.5; }
.m-msg-sub { color: var(--text); font-weight: 600; }
.m-msg-desc { color: var(--text-dim); font-size: 12px; margin-top: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-msg-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.m-msg-num {
  background: var(--red); color: #fff; font-size: 10px; padding: 1px 6px;
  border-radius: 8px; min-width: 18px; text-align: center;
}
.m-msg-time { color: var(--text-dim); font-size: 11px; }
.m-msg-side { width: 24px; height: 24px; border-radius: 50%; background: #4f8cff; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; }
.ai-tag { display: inline-block; background: linear-gradient(90deg,#2ecc8a,#378add); color: #fff; font-size: 9px; padding: 1px 5px; border-radius: 4px; margin-right: 4px; }
.ai-tag-ok { color: #2ecc8a; font-weight: 700; margin-left: 2px; }

/* ===== 客户大卡（图5） ===== */
.m-tags { display: flex; gap: 8px; padding: 10px 14px; overflow-x: auto; }
.m-tag {
  padding: 4px 12px; background: var(--bg-card2); border-radius: 14px;
  font-size: 12px; color: var(--text-dim); white-space: nowrap;
}
.m-tag.active { background: #2ecc8a; color: #fff; }
.m-stat-row { display: flex; justify-content: space-between; padding: 4px 14px 10px; font-size: 12px; color: var(--text-dim); }

.m-cust-card {
  display: flex; gap: 12px; padding: 14px; margin: 0 14px 10px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
}
.m-cust-avatar {
  width: 42px; height: 42px; border-radius: 50%; background: var(--blue); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 600; flex-shrink: 0;
}
.m-cust-body { flex: 1; min-width: 0; }
.m-cust-name { font-size: 15px; font-weight: 600; }
.m-cust-name .m-cust-phone { color: var(--text-dim); font-weight: 400; font-size: 12px; margin-left: 6px; }
.m-cust-co { color: var(--text-dim); font-size: 12px; margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-cust-meta { font-size: 12px; color: var(--text-dim); margin-top: 2px; display: flex; gap: 6px; align-items: center; }
.m-new-tag { background: #2ecc8a; color: #fff; font-size: 10px; padding: 1px 5px; border-radius: 4px; }
.m-cust-owner { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.m-cust-call {
  width: 36px; height: 36px; border-radius: 50%; background: var(--bg-card2);
  display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0;
  align-self: center;
}

/* ===== 待办大卡（图2） ===== */
.m-todo-card {
  display: flex; gap: 10px; padding: 14px; margin: 0 14px 10px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
}
.m-todo-ck {
  width: 18px; height: 18px; border: 2px solid var(--border); border-radius: 50%;
  flex-shrink: 0; margin-top: 2px;
}
.m-todo-body { flex: 1; }
.m-todo-tt { font-size: 15px; font-weight: 600; }
.m-todo-content { color: var(--text-dim); font-size: 12px; margin-top: 4px; }
.m-todo-customer { font-size: 12px; color: var(--text-dim); margin-top: 6px; display: flex; align-items: center; gap: 4px; }
.m-cust-av { display: inline-block; width: 18px; height: 18px; border-radius: 50%; background: var(--blue); color: #fff; text-align: center; line-height: 18px; font-size: 10px; }
.m-todo-overdue { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.m-overdue-num { color: var(--red); font-weight: 600; margin: 0 2px; }

/* ===== 工具网格（图3） ===== */
.m-grid4 {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 14px;
}
.m-grid-item {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px 4px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 10px; position: relative; cursor: pointer;
}
.m-grid-item.m-add-cell { background: #222; color: #888; }
.m-grid-ic {
  width: 36px; height: 36px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: #fff; position: relative;
}
.m-grid-avatar { width: 36px; height: 36px; border-radius: 50%; background: #5f5e5a; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px; }
.m-grid-dot {
  position: absolute; top: -2px; right: -2px; width: 8px; height: 8px;
  background: var(--red); border-radius: 50%;
}
.m-grid-nm { font-size: 11px; color: var(--text); text-align: center; }
.m-tools-section { padding: 6px 14px 0; font-size: 12px; color: var(--text-dim); }

/* ===== 我页（图4） ===== */
.m-me-profile {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 14px; background: var(--bg-card);
  border-bottom: 1px solid var(--border); cursor: pointer;
}
.m-me-avatar {
  width: 50px; height: 50px; border-radius: 50%; background: var(--blue); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 20px; flex-shrink: 0;
}
.m-me-stat { display: flex; gap: 1px; background: var(--border); }
.m-mes { flex: 1; background: var(--bg-card); padding: 12px 6px; text-align: center; }
.m-mes .v { font-size: 20px; font-weight: 600; }
.m-mes .l { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
.m-me-section-title { padding: 10px 14px 6px; font-size: 12px; color: var(--text-dim); background: var(--bg-card2); }
.m-me-section { background: var(--bg-card); }
.m-me-auth { padding: 16px 8px; text-align: center; font-size: 12px; cursor: pointer; }
.m-me-auth-ic {
  width: 40px; height: 40px; border-radius: 10px; margin: 0 auto 6px;
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 18px;
}
.m-me-menu {
  display: flex; align-items: center; gap: 12px;
  padding: 14px; border-bottom: 1px solid var(--border);
  font-size: 14px; cursor: pointer;
}
.m-me-menu .ic { font-size: 18px; width: 22px; text-align: center; }
.m-me-menu .arr { margin-left: auto; color: var(--text-dim); }

/* ===== 底部 tab 数字徽章 ===== */
.m-tabbar .it { position: relative; }
.m-tabbar .badge-num {
  position: absolute; top: 4px; right: 18%;
  background: var(--red); color: #fff; font-size: 9px;
  padding: 1px 5px; border-radius: 8px; min-width: 16px; text-align: center;
  font-weight: 600;
}

/* ===== 通用导入弹层(通讯录/微信/企微/扫名片/易企查/汇营销 7 选项全部用同一个通用弹层) ===== */
.m-import {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 100%; max-width: 480px; max-height: 80vh;
  background: #1c1d21; border-radius: 16px 16px 0 0;
  display: flex; flex-direction: column;
  border: 1px solid #2a2b30;
}
.m-import-header {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border-bottom: 1px solid #2a2b30;
}
.m-import-body { flex: 1; overflow-y: auto; padding: 0 0 20px; }
.m-import-search {
  display: flex; align-items: center; gap: 8px;
  margin: 8px 14px; padding: 8px 12px;
  background: #25272c; border-radius: 10px;
}
.m-import-search input {
  flex: 1; background: transparent; border: none; outline: none;
  color: var(--text); font-size: 14px;
}
.m-import-empty {
  text-align: center; padding: 60px 20px; color: var(--text-dim); font-size: 13px;
}
.m-import-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid #25272c; cursor: pointer;
}
.m-import-item:active { background: #25272c; }
.m-import-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: #4f8cff; color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 16px; flex-shrink: 0;
}
.m-import-info { flex: 1; min-width: 0; }
.m-import-name { font-size: 15px; font-weight: 500; }
.m-import-sub { font-size: 12px; color: var(--text-dim); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-import-badge {
  font-size: 11px; padding: 2px 6px; border-radius: 4px;
  background: #2a2b30; color: var(--text-dim);
}
.m-import-badge.int { background: #1f3a23; color: #4ecb71; }
.m-import-confirm {
  margin: 16px; padding: 12px; border-radius: 10px;
  background: var(--blue); color: #fff; text-align: center; font-weight: 600; cursor: pointer;
}
.m-import-preview {
  margin: 0 14px 10px; padding: 10px 12px;
  background: #25272c; border-radius: 10px; font-size: 13px;
}
.m-import-preview img { max-width: 100%; border-radius: 8px; margin-top: 6px; }
.m-import-tip {
  margin: 12px 14px; padding: 10px 12px;
  background: #2a2525; color: #f5a623; font-size: 12px;
  border-radius: 8px; border: 1px solid #4a3618;
}


/* ===== 高级筛选（统一组件 — 客户/订单/续费/账号等所有列表页通用） ===== */
.adv-filter { position:relative; display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:10px; }
.adv-btn { display:inline-flex; align-items:center; gap:6px; padding:7px 14px; border:1px solid #d1d5db; border-radius:7px; background:#fff; color:#374151; font-size:13px; font-weight:600; cursor:pointer; }
.adv-btn:hover { border-color:#93c5fd; color:#2563eb; }
.adv-btn.on { background:#eff6ff; border-color:#2563eb; color:#1d4ed8; }
.adv-num { display:inline-flex; min-width:18px; height:18px; padding:0 6px; border-radius:9px; background:#dc2626; color:#fff; font-size:11px; font-weight:700; align-items:center; justify-content:center; }
.adv-btn.on .adv-num { background:#2563eb; }
.adv-kw { position:relative; flex:1; min-width:200px; }
.adv-kw input { width:100%; padding:8px 12px 8px 32px; border:1px solid #d1d5db; border-radius:7px; font-size:13px; outline:none; }
.adv-kw input:focus { border-color:#2563eb; }
.adv-kw::before { content:'🔍'; position:absolute; left:10px; top:50%; transform:translateY(-50%); font-size:13px; opacity:.6; }
.adv-panel { display:none; position:absolute; top:42px; left:0; z-index:50; min-width:380px; max-width:640px; background:#fff; border:1px solid #e5e7eb; border-radius:10px; box-shadow:0 8px 30px rgba(0,0,0,.12); padding:14px 16px; z-index:100; }
.adv-panel.open { display:block; }
.adv-row { display:flex; align-items:center; gap:10px; padding:7px 0; border-bottom:1px dashed #f0f2f5; }
.adv-row:last-child { border-bottom:none; }
.adv-row > label:first-child { width:96px; font-size:12.5px; color:#374151; font-weight:600; flex-shrink:0; }
.adv-row > .adv-field { flex:1; }
.adv-row select, .adv-row input[type=text] { width:100%; padding:6px 10px; border:1px solid #d1d5db; border-radius:6px; font-size:12.5px; outline:none; box-sizing:border-box; }
.adv-row select:focus, .adv-row input:focus { border-color:#2563eb; }
.adv-multi { display:flex; flex-wrap:wrap; gap:4px 14px; align-items:center; }
.adv-multi label { display:inline-flex; align-items:center; gap:4px; font-size:12.5px; color:#475569; cursor:pointer; }
.adv-multi input { width:14px; height:14px; accent-color:#2563eb; }
.adv-actions { display:flex; gap:10px; justify-content:flex-end; padding-top:10px; margin-top:6px; border-top:1px solid #f0f2f5; }
.adv-actions .adv-reset { padding:7px 18px; background:#fff; color:#64748b; border:1px solid #d1d5db; border-radius:6px; cursor:pointer; font-size:13px; }
.adv-actions .adv-confirm { padding:7px 22px; background:linear-gradient(90deg,#1e3a5f,#2563eb); color:#fff; border:none; border-radius:6px; cursor:pointer; font-size:13px; font-weight:700; }
.adv-actions .adv-confirm:hover { opacity:.9; }

.adv-radio { display:inline-flex; align-items:center; gap:4px; font-size:12.5px; color:#374151; cursor:pointer; margin-right:14px; }
.adv-radio input { width:14px; height:14px; accent-color:#2563eb; }
.adv-daterange { display:flex; align-items:center; gap:6px; }
.adv-daterange input[type=date] { flex:1; padding:6px 10px; border:1px solid #d1d5db; border-radius:6px; font-size:12.5px; outline:none; }

/* 主字段链接：蓝色 + 可点击，点击进入编辑弹窗（全系统统一） */
.field-link { color: #185FA5 !important; font-weight: 600; cursor: pointer; text-decoration: none; transition: color .15s; }
.field-link:hover { color: #0C447C !important; text-decoration: underline; }
/* 表格内主字段链接：确保蓝色不被 td b / td.name 等规则覆盖（全系统统一） */
table td b.field-link, table td.field-link { color: #185FA5 !important; text-decoration: none; }
table td b.field-link:hover, table td.field-link:hover { color: #0C447C !important; text-decoration: underline; }
/* 非表格场景主字段链接兜底（话术标题 .ph-title、员工名 .name-link 等自定义类自带颜色，需提高特异性） */
.ph-title.field-link, .name-link.field-link { color: #185FA5 !important; text-decoration: none; }
.ph-title.field-link:hover, .name-link.field-link:hover { color: #0C447C !important; text-decoration: underline; }

/* ============ 字段显示设置组件（全系统列表页通用） ============ */
.field-set-btn { display:inline-flex; align-items:center; gap:5px; background:#f8fafc; border:1px solid var(--border); color:#475569; }
.field-set-btn:hover { border-color:var(--blue); color:var(--blue); }
.fs-badge { display:inline-flex; align-items:center; justify-content:center; min-width:16px; height:16px; padding:0 4px; border-radius:9px; background:var(--red); color:#fff; font-size:10px; font-weight:700; line-height:1; }
.fs-head { display:flex; align-items:baseline; gap:10px; margin-bottom:12px; flex-wrap:wrap; }
.fs-head h3 { margin:0; font-size:15px; }
.fs-sub { font-size:11.5px; color:var(--text-dim); }
.fs-list { max-height:54vh; overflow-y:auto; display:flex; flex-direction:column; gap:2px; padding:4px 0; }
.fs-row { display:flex; align-items:center; gap:9px; padding:8px 10px; border-radius:8px; font-size:13.5px; cursor:pointer; }
.fs-row:hover { background:var(--bg-card2); }
.fs-row input[type=checkbox] { width:16px; height:16px; accent-color:var(--blue); cursor:pointer; }
.fs-row span { flex:1; }
.fs-row.locked { color:var(--text-dim); cursor:not-allowed; }
.fs-row.locked em { font-style:normal; font-size:10px; background:#eef2f7; color:#94a3b8; padding:1px 7px; border-radius:8px; }
.fs-foot { display:flex; gap:8px; margin-top:12px; padding-top:12px; border-top:1px solid var(--border); flex-wrap:wrap; }
.fs-foot .btn.primary { margin-left:auto; }
