/* 销售工作台样式（复刻同行长相，主色 #3370FF） */
:root {
  --primary: #3370FF;
  --primary-dark: #245BDB;
  --primary-light: #E6F0FF;
  --success: #00B42A;
  --warning: #FF7D00;
  --danger: #F53F3F;
  --purple: #722ED1;
  --bg: #F5F6F8;
  --white: #FFFFFF;
  --border: #E5E6EB;
  --border-light: #F0F1F3;
  --text-primary: #1F2329;
  --text-secondary: #4E5969;
  --text-muted: #86909C;
  --radius: 8px;
  --radius-sm: 6px;
  --radius-lg: 12px;
  --topnav-h: 48px;
  --sidebar-w: 208px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #DCDDE1; border-radius: 4px; }

/* ============ 登录页 ============ */
.login-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: linear-gradient(135deg, #1F2329 0%, #2B2F36 50%, #1F2329 100%);
  display: flex; align-items: center; justify-content: center;
}
.login-card {
  background: #fff; border-radius: var(--radius-lg);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.25); width: 380px; max-width: 92vw; overflow: hidden;
}
.login-header {
  background: linear-gradient(135deg, var(--primary), #5E7FF5);
  padding: 26px 24px 20px; text-align: center; color: #fff;
}
.login-logo {
  width: 52px; height: 52px; background: rgba(255, 255, 255, 0.2); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center; margin: 0 auto 10px; font-size: 22px;
}
.login-header h2 { font-size: 17px; font-weight: 700; margin: 0 0 2px; }
.login-sub { font-size: 12px; opacity: 0.85; }
.login-form { padding: 20px 22px 22px; }
.input-group {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  margin-bottom: 12px; transition: border-color 0.15s;
}
.input-group:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(51, 112, 255, 0.1); }
.input-group i { color: var(--text-muted); font-size: 14px; width: 16px; text-align: center; }
.input-group input, .input-group select {
  border: none; outline: none; flex: 1; font-size: 14px; color: var(--text-primary);
  background: transparent; font-family: inherit; padding: 0;
}
.input-group select { cursor: pointer; }
.btn-primary {
  background: var(--primary); color: #fff; border: none; border-radius: var(--radius-sm);
  padding: 9px 14px; font-size: 14px; display: inline-flex; align-items: center; gap: 6px;
}
.btn-primary:hover { background: var(--primary-dark); }
.btn-block { width: 100%; justify-content: center; font-size: 15px; padding: 10px; }
.login-hint { text-align: left; margin-top: 12px; font-size: 12px; color: var(--text-muted); line-height: 1.7; }
.login-hint b { color: var(--text-secondary); font-weight: 600; }
.login-error {
  margin-top: 10px; padding: 8px 12px; background: #FEF2F2; color: #DC2626;
  border-radius: var(--radius-sm); font-size: 13px; text-align: center; display: none;
}

/* ============ 顶栏 ============ */
.top-nav {
  height: var(--topnav-h); background: var(--white); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 16px; padding: 0 16px;
  position: sticky; top: 0; z-index: 100;
}
.top-nav-brand { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.top-nav-logo { display: flex; align-items: center; gap: 7px; font-size: 15px; font-weight: 600; }
.top-nav-logo i { color: var(--primary); font-size: 17px; }
.top-nav-menu { display: flex; gap: 2px; overflow-x: auto; flex: 1; scrollbar-width: none; }
.top-nav-menu::-webkit-scrollbar { display: none; }
.top-nav-link {
  padding: 5px 11px; border-radius: var(--radius-sm); font-size: 13px; color: var(--text-secondary);
  white-space: nowrap;
}
.top-nav-link:hover { background: rgba(0, 0, 0, 0.04); color: var(--text-primary); }
.top-nav-link.active { background: var(--primary-light); color: var(--primary); font-weight: 500; }
.top-nav-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

/* 模式切换器 */
/* P2-8 全站工具条：4 个弹层入口 */
.p2-tools { display: flex; align-items: center; gap: 4px; }
.p2-tool {
  border: none; background: none; color: var(--text-secondary); font-size: 12px;
  padding: 5px 8px; border-radius: var(--radius-sm); cursor: pointer; white-space: nowrap;
}
.p2-tool:hover { background: var(--primary-light); color: var(--primary); }
.mode-switch { display: flex; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.mode-switch button {
  border: none; background: #fff; padding: 5px 12px; font-size: 12px; color: var(--text-secondary);
  border-right: 1px solid var(--border);
}
.mode-switch button:last-child { border-right: none; }
.mode-switch button.active { background: var(--primary); color: #fff; font-weight: 500; }
.user-chip { display: flex; align-items: center; gap: 7px; font-size: 13px; }
.user-avatar {
  width: 26px; height: 26px; border-radius: 50%; background: var(--primary-light); color: var(--primary);
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600;
}
.role-tag {
  font-size: 11px; padding: 1px 7px; border-radius: 4px; background: var(--primary-light); color: var(--primary);
}
.logout-btn {
  border: none; background: none; color: var(--text-muted); font-size: 14px; padding: 4px;
}

/* ============ 主体骨架 ============ */
.shell { display: flex; height: calc(100vh - var(--topnav-h)); }
.sidebar {
  width: var(--sidebar-w); background: var(--white); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; flex-shrink: 0;
}
.sidebar-nav { flex: 1; padding: 6px 0; overflow-y: auto; }
.nav-section { margin-bottom: 2px; }
.nav-section-title {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 14px 5px; font-size: 11px; color: var(--text-muted); letter-spacing: 0.4px;
}
.nav-section.zone-tele .nav-section-title { color: #245BDB; }
.nav-section.zone-live .nav-section-title { color: #0F6E56; }
.nav-section.collapsed .nav-item { display: none; }
.nav-group-label { padding: 6px 14px 3px; font-size: 11px; color: var(--text-muted); opacity: 0.75; }
.nav-item {
  display: flex; align-items: center; gap: 8px; padding: 7px 14px; margin: 1px 6px;
  border-radius: var(--radius-sm); font-size: 13px; color: var(--text-secondary); position: relative;
}
.nav-item:hover { background: rgba(0, 0, 0, 0.04); }
.nav-item.active { background: var(--primary-light); color: var(--primary); font-weight: 500; }
.nav-item i { width: 16px; text-align: center; font-size: 13px; opacity: 0.85; }
.nav-item .badge {
  margin-left: auto; background: var(--danger); color: #fff; font-size: 10px;
  padding: 0 5px; border-radius: 8px; line-height: 15px;
}
.sidebar-footer { border-top: 1px solid var(--border-light); padding: 8px 14px; font-size: 11px; color: var(--text-muted); }

.main { flex: 1; overflow-y: auto; padding: 16px 18px 40px; min-width: 0; }
.page { display: none; }
.page.active { display: block; }

/* ============ 页头 ============ */
.page-header {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 12px;
}
.page-title { font-size: 19px; font-weight: 600; margin: 0; }
.page-desc { font-size: 12px; color: var(--text-muted); margin: 0; }
.page-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.btn-outline {
  background: #fff; border: 1px solid var(--border); color: var(--text-secondary);
  border-radius: var(--radius-sm); padding: 6px 11px; font-size: 13px;
  display: inline-flex; align-items: center; gap: 5px;
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.select-input {
  height: 32px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 0 8px; font-size: 13px; background: #fff; color: var(--text-primary); font-family: inherit;
}
.input-search { width: 230px; height: 32px; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0 10px; font-size: 13px; font-family: inherit; outline: none; }
.input-search:focus { border-color: var(--primary); }

/* ============ 统计卡 ============ */
.stats-grid { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 12px; }
.stat-card {
  flex: 1; min-width: 130px; border-radius: 10px; padding: 10px 14px;
  border: 1px solid transparent; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.stat-card.blue { background: #E6F4FF; border-color: #1677FF22; }
.stat-card.green { background: #F6FFED; border-color: #389E0D22; }
.stat-card.orange { background: #FFF7E6; border-color: #D4880622; }
.stat-card.purple { background: #F9F0FF; border-color: #722ED122; }
.stat-value { font-size: 22px; font-weight: 700; line-height: 1.2; }
.stat-card.blue .stat-value { color: #1677FF; }
.stat-card.green .stat-value { color: #389E0D; }
.stat-card.orange .stat-value { color: #D48806; }
.stat-card.purple .stat-value { color: #722ED1; }
.stat-label { font-size: 12px; color: #666; margin-top: 2px; }
.stat-sub { font-size: 11px; color: #B8860B; margin-top: 1px; }
.stat-card.cyan { background: #E6FFFB; border-color: #13C2C222; }
.stat-card.cyan .stat-value { color: #13C2C2; }
.stat-card.stat-on { outline: 2px solid var(--primary); }

/* 表头排序 / 列筛选 */
.full-table th[data-sort], .full-table th[data-col] { cursor: pointer; }
.full-table th[data-sort]:hover, .full-table th[data-col]:hover { background: #EEF2F7; }
.full-table th.th-on { color: var(--primary); }
.star-btn {
  background: #F5F5F5; color: #8C8C8C; border: 1px solid #D9D9D9;
  font-size: 12px; padding: 1px 8px; border-radius: 4px;
}
.star-btn.on { background: #FFF7E6; color: #D48806; border-color: #FFE7BA; }
.btn-del {
  background: #fff; color: #CF1322; border: 1px solid #FFCCC7;
  border-radius: 4px; font-size: 12px; padding: 2px 8px;
}
.btn-del:hover { background: #FFF1F0; }

/* ============ Tab ============ */
.main-tabs { display: flex; gap: 8px; margin: 2px 0 10px; }
.tab-bar { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; }
.tab-btn {
  border: 1px solid var(--border); background: #fff; color: var(--text-secondary);
  border-radius: var(--radius-sm); padding: 5px 14px; font-size: 13px;
}
.tab-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 500; }
.main-tab-btn { font-size: 14px; padding: 6px 16px; }

/* ============ 卡片与表格 ============ */
.card {
  background: #fff; border: 1px solid var(--border-light); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 14px;
}
.card.tight { padding: 0; overflow-x: auto; }
.full-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 900px; }
.full-table th {
  background: #FAFBFC; color: var(--text-secondary); font-weight: 600; font-size: 12px;
  padding: 9px 10px; border-bottom: 1px solid var(--border); text-align: center; white-space: nowrap;
}
.full-table td {
  padding: 9px 10px; border-bottom: 1px solid var(--border-light); text-align: center;
  vertical-align: middle; white-space: nowrap;
}
.full-table tbody tr:hover { background: #FAFBFC; }

/* 保单体检（11-03）：宽表把「操作」列钉在右边 —— 横向滚动时导出/编辑/删除始终看得见 */
.full-table th.ck-opcol, .full-table td.ck-opcol {
  position: sticky; right: 0; z-index: 1; box-shadow: -2px 0 4px rgba(0,0,0,.05);
}
.full-table th.ck-opcol { background: #FAFBFC; }
.full-table td.ck-opcol { background: #fff; }
.full-table tbody tr:hover td.ck-opcol { background: #FAFBFC; }

/* ============ 通用表格增强：表头排序 + 表头筛选（10-20 豪哥要求）============ */
.full-table th.th-sortable { cursor: pointer; user-select: none; position: relative; }
.full-table th.th-sortable:hover { background: #EEF2F7; }
.th-filter-btn {
  display: inline-block; margin-left: 3px; padding: 0 3px; border-radius: 3px;
  font-size: 10px; color: #C0C6CF; cursor: pointer; vertical-align: 1px;
}
/* ▾ 画在伪元素里：th.textContent 保持纯列名，别的地方（含测试）按文字找表头才不会挂 */
.th-filter-btn::before { content: '▾'; }
.th-filter-btn:hover { background: #E5E6EB; color: var(--primary); }
.th-filter-btn.on { background: var(--primary); color: #fff; }
.col-filter-pop {
  position: fixed; z-index: 3000; width: 236px; background: #fff;
  border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 0 0;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .14); font-size: 13px;
}
.cfp-title { font-size: 12px; color: var(--text-muted); padding: 0 12px 8px; }
.cfp-list { max-height: 232px; overflow-y: auto; padding-bottom: 4px; }
.cfp-item {
  display: flex; align-items: center; gap: 6px; padding: 5px 12px; cursor: pointer;
  font-size: 12px; color: var(--text-primary);
}
.cfp-item:hover { background: #F7F8FA; }
.cfp-item input { width: 14px; height: 14px; flex: none; }
.cfp-all { border-bottom: 1px solid var(--border-light); margin-bottom: 2px; font-weight: 600; }
.cfp-n { margin-left: auto; color: var(--text-muted); font-size: 11px; }
.cfp-input {
  width: calc(100% - 24px); margin: 0 12px 6px; height: 30px; padding: 0 8px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 12px; outline: none;
}
.cfp-input:focus { border-color: var(--primary); }
.cfp-tip { font-size: 11px; color: var(--text-muted); padding: 0 12px 8px; }
.cfp-foot {
  display: flex; gap: 8px; justify-content: flex-end;
  padding: 8px 12px; border-top: 1px solid var(--border-light); background: #FAFBFC;
  border-radius: 0 0 var(--radius) var(--radius);
}
.client-name-link { color: var(--primary); font-weight: 600; cursor: pointer; }
.tag {
  display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 4px; white-space: nowrap;
}
.tag-blue { background: #E6F0FF; color: #2F54EB; }
.tag-green { background: #F6FFED; color: #389E0D; }
.tag-orange { background: #FFF7E6; color: #D46B08; }
.tag-red { background: #FFF1F0; color: #CF1322; }
.tag-gray { background: #F2F3F5; color: #86909C; }
.tag-click { cursor: pointer; border-bottom: 1px dashed currentColor; }
.tag-click:hover { filter: brightness(0.94); }
.tag-purple { background: #F9F0FF; color: #722ED1; }
.dash { color: #C9CDD4; font-weight: 700; }

/* ============ 分页 ============ */
.pagination {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; flex-wrap: wrap; gap: 8px;
}
.page-info { font-size: 12px; color: var(--text-secondary); }
.page-btns { display: flex; gap: 3px; flex-wrap: wrap; }
.page-btns button {
  padding: 4px 9px; border: 1px solid var(--border); background: #fff; color: #333;
  border-radius: 4px; font-size: 12px;
}
.page-btns button.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }

/* ============ 占位页 ============ */
.placeholder { padding: 40px 0; text-align: center; color: var(--text-muted); }
.placeholder i { font-size: 32px; color: #C9CDD4; margin-bottom: 10px; }
.placeholder h3 { font-size: 15px; font-weight: 600; color: var(--text-secondary); margin: 0 0 6px; }
.placeholder p { font-size: 13px; margin: 0; }

/* ============ 弹窗 ============ */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.35); z-index: 2000;
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.modal {
  background: #fff; border-radius: var(--radius-lg); width: 460px; max-width: 94vw;
  max-height: 88vh; display: flex; flex-direction: column;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}
.modal-hd {
  padding: 13px 18px; border-bottom: 1px solid var(--border-light);
  display: flex; align-items: center; justify-content: space-between;
}.modal-hd h3 { margin: 0; font-size: 15px; font-weight: 600; }
.modal-close { border: none; background: none; font-size: 18px; color: var(--text-muted); line-height: 1; }
.modal-bd { padding: 16px 18px; overflow-y: auto; }
.modal-ft {
  padding: 12px 18px; border-top: 1px solid var(--border-light);
  display: flex; justify-content: flex-end; gap: 8px;
}

/* 宽弹层：看板数字点进去的"这批人是谁"名单（10-20 豪哥要求） */
.modal.wide { width: 1000px; max-width: 96vw; }
.modal.wide .modal-bd { padding: 0; overflow: auto; }
.modal.wide .full-table { min-width: 760px; }
/* 可点的统计卡：给个手型和悬停反馈，不然没人知道能点 */
.stat-card.clickable { cursor: pointer; transition: box-shadow .15s, transform .15s; }
.stat-card.clickable:hover { box-shadow: 0 3px 12px rgba(0, 0, 0, .10); transform: translateY(-1px); }
.stat-card .stat-hint {
  font-size: 10px; color: var(--primary); opacity: 0; margin-top: 3px; transition: opacity .15s;
}
.stat-card.clickable:hover .stat-hint { opacity: 1; }
.form-group { margin-bottom: 12px; }
.form-label { display: block; font-size: 13px; color: var(--text-secondary); margin-bottom: 5px; }
.form-label.required::before { content: '*'; color: var(--danger); margin-right: 3px; }
.form-control {
  width: 100%; height: 34px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 0 10px; font-size: 13px; font-family: inherit; color: var(--text-primary); background: #fff;
}
.form-control:focus { outline: none; border-color: var(--primary); }
textarea.form-control { height: auto; padding: 7px 10px; line-height: 1.5; }
.form-hint { font-size: 11px; color: var(--text-muted); margin-top: 4px; line-height: 1.5; }
.toast {
  position: fixed; top: 66px; left: 50%; transform: translateX(-50%); z-index: 3000;
  background: #1F2329; color: #fff; padding: 9px 18px; border-radius: var(--radius-sm);
  font-size: 13px; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* ============ 提示条 ============ */
.notice {
  background: var(--primary-light); border-left: 3px solid var(--primary);
  padding: 9px 12px; font-size: 12px; color: var(--text-secondary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin-bottom: 12px; line-height: 1.6;
}

/* 手机用：汉堡按钮 + 侧栏抽屉 + 遮罩（桌面端不显示） */
.nav-toggle {
  display: none; border: 1px solid var(--border); background: #fff; border-radius: var(--radius-sm);
  width: 32px; height: 32px; align-items: center; justify-content: center;
  color: var(--text-secondary); font-size: 14px; flex-shrink: 0;
}
.sidebar-mask {
  display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.35);
  z-index: 140; top: var(--topnav-h);
}

/* ============ 小屏适配（手机 / 平板竖屏）============ */
@media (max-width: 768px) {
  .nav-toggle { display: inline-flex; }
  .top-nav { padding: 0 10px; gap: 8px; }
  .top-nav-menu { display: none; }          /* 横排导航换成侧栏抽屉 */
  .top-nav-right { gap: 6px; }
  .mode-switch { font-size: 12px; }
  .mode-switch button { padding: 0 6px; }
  .top-nav-logo span { display: none; }      /* 顶栏只留盾牌图标 */
  .user-chip span#userName, .user-chip .role-tag { display: none; }

  /* 侧栏变抽屉 */
  .sidebar {
    position: fixed; top: var(--topnav-h); bottom: 0; left: 0;
    width: 210px; z-index: 150; box-shadow: 2px 0 12px rgba(0, 0, 0, 0.12);
    transform: translateX(-100%); transition: transform 0.22s ease;
  }
  .sidebar.open { transform: translateX(0); }
  .shell.drawer-open .sidebar-mask { display: block; }

  .main { padding: 10px; min-width: 0; }
  .page-header { gap: 8px; }
  .page-title { font-size: 16px; }
  .input-search { width: 100%; }
  .page-actions { margin-left: 0; width: 100%; gap: 6px; }
  .page-actions > * { flex: 1 1 auto; min-width: 0; }
  .select-input, .page-actions input[type="date"] { flex: 1 1 120px; }
  .stats-grid { gap: 8px; }
  .stat-card { flex: 1 1 calc(50% - 4px); min-width: 0; padding: 8px 10px; }
  .stat-value { font-size: 19px; }
  .card { padding: 10px 12px; }
  .modal { max-width: 100%; }
  .modal-bd { padding: 12px 14px; max-height: 62vh; }
  .toast { left: 10px; right: 10px; transform: none; text-align: center; }
  .pagination { justify-content: center; }
}

/* ============ 客户详情面板 ============ */
.modal-overlay.lv2 { z-index: 2100; background: rgba(0, 0, 0, 0.28); }
.modal.wide { width: 720px; }
.dt-hd {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding-bottom: 12px; border-bottom: 1px solid var(--border-light); margin-bottom: 12px;
}
.dt-name { font-size: 17px; font-weight: 600; }
.dt-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border-light); margin-bottom: 12px; flex-wrap: wrap; }
.dt-tab {
  border: none; background: none; padding: 7px 12px; font-size: 13px; color: var(--text-secondary);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.dt-tab.on { color: var(--primary); font-weight: 600; border-bottom-color: var(--primary); }
.dt-grid { display: grid; grid-template-columns: 96px 1fr 96px 1fr; gap: 9px 10px; align-items: center; }
.dt-k { font-size: 12px; color: var(--text-muted); }
.dt-v { font-size: 13px; color: var(--text-primary); word-break: break-all; }
.dt-sec { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--border); }
.dt-sec-t { font-size: 13px; font-weight: 600; margin-bottom: 9px; display: flex; align-items: center; gap: 6px; }
.dt-edit {
  font-size: 12px; color: var(--primary); background: var(--primary-light);
  border: none; border-radius: 4px; padding: 2px 8px;
}
.dt-box {
  background: var(--bg); border-radius: var(--radius-sm); padding: 9px 11px;
  font-size: 13px; color: var(--text-secondary); line-height: 1.6; white-space: pre-wrap;
  min-height: 34px; word-break: break-all;
}
.dt-empty { color: #BBB; font-style: italic; }
.log-item { border-left: 2px solid var(--primary-light); padding: 6px 0 6px 10px; margin-bottom: 9px; }
.log-date { font-size: 11px; color: var(--text-muted); margin-bottom: 2px; }
.log-text { font-size: 13px; color: var(--text-secondary); line-height: 1.55; white-space: pre-wrap; }
.dt-warn {
  background: #FFF7E8; border: 1px solid #FFD08A; border-radius: var(--radius-sm);
  padding: 9px 11px; font-size: 12px; color: #8C5A00; margin-bottom: 12px; line-height: 1.6;
}
@media (max-width: 768px) {
  .modal.wide { width: 100%; max-width: 100vw; }
  .dt-grid { grid-template-columns: 84px 1fr; }
  .modal { max-height: 92vh; }
}

/* 权限范围标签：业务员只看到「我的客户」，主管看到「我的团队」 */
.scope-tag { background: #F0F1F3 !important; color: var(--text-secondary) !important; }

/* 「跳过去看一眼」的落点：短暂描边 + 底色，让人确定"就是这张表" */
.sd-anchor { border-radius: var(--radius-sm); scroll-margin-top: 10px; }
.sd-anchor.anchor-flash { animation: anchorFlash 1.6s ease-out 1; }
@keyframes anchorFlash {
  0%   { box-shadow: 0 0 0 0 rgba(43, 108, 246, .45); background: rgba(43, 108, 246, .06); }
  40%  { box-shadow: 0 0 0 3px rgba(43, 108, 246, .22); background: rgba(43, 108, 246, .06); }
  100% { box-shadow: 0 0 0 0 rgba(43, 108, 246, 0);    background: transparent; }
}

/* 现场签到（业务员在领奖现场用）：一行一个人 + 一个大按钮，手机上好点 */
.sign-hd {
  padding: 8px 14px; font-size: 12px; color: var(--text-muted);
  background: #FAFBFC; border-bottom: 1px solid var(--border);
}
.sign-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-bottom: 1px solid var(--border);
}
.sign-row:last-child { border-bottom: none; }
.sign-on { background: #F6FFF9; }
.sign-info { flex: 1; min-width: 0; }
.sign-name { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.sign-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.sign-btn {
  min-width: 84px; height: 38px; font-size: 14px; flex: none;
}

/* ==================== 保单体检报告（11-01 · 打印成 PDF）==================== */
.ck-report-overlay {
  position: fixed; inset: 0; z-index: 2200; background: #F2F3F5;
  overflow-y: auto; padding: 24px 16px 60px;
}
.ck-report {
  max-width: 860px; margin: 0 auto; background: #fff; border-radius: 10px;
  box-shadow: 0 4px 24px rgba(0,0,0,.08); padding: 36px 44px;
}
.ck-toolbar {
  max-width: 860px; margin: 0 auto 12px; display: flex; gap: 10px; justify-content: flex-end;
}
.ck-report h1 { font-size: 22px; margin: 0 0 4px; }
.ck-rsec { margin-top: 22px; }
.ck-rsec > h2 {
  font-size: 15px; margin: 0 0 10px; padding-left: 9px;
  border-left: 4px solid #1D6FE0; line-height: 1.3;
}
.ck-rtable { width: 100%; border-collapse: collapse; font-size: 12px; }
.ck-rtable th, .ck-rtable td { border: 1px solid #E5E6EB; padding: 6px 8px; text-align: center; }
.ck-rtable th { background: #F7F8FA; font-weight: 600; }
.ck-rmeta { font-size: 12px; color: #86909C; margin-bottom: 18px; line-height: 1.9; }
.ck-rhead { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.ck-rhead > div { border: 1px solid #E5E6EB; border-radius: 8px; padding: 8px 6px; text-align: center; }
.ck-rhead b { display: block; font-size: 17px; }
.ck-rhead span { font-size: 11px; color: #86909C; }
.ck-svc { border: 1px solid #E5E6EB; border-radius: 8px; padding: 10px 14px; margin-bottom: 10px; break-inside: avoid; }
.ck-foot { margin-top: 26px; font-size: 11px; color: #86909C; line-height: 1.9; border-top: 1px dashed #E5E6EB; padding-top: 10px; }
/* 保险体检报告 = 唯一一份 PDF 报告（11-03 深夜 · 原"客户交付版"已砍，内容与 Excel 清单重叠）
   打印：A4 纵向、按内容分页；表头逐页重复；一行/一块不跨页切开。 */
@media print {
  @page { size: A4 portrait; margin: 12mm 10mm; }
  body.printing-report > *:not(.ck-report-overlay) { display: none !important; }
  body.printing-report .ck-report-overlay {
    position: static; background: #fff; padding: 0; overflow: visible;
  }
  body.printing-report .ck-toolbar { display: none !important; }
  body.printing-report .ck-report { box-shadow: none; border-radius: 0; padding: 0; max-width: none; }
  body.printing-report * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body.printing-report thead { display: table-header-group; }
  body.printing-report tr, body.printing-report .ck-svc { break-inside: avoid; page-break-inside: avoid; }
  body.printing-report .ck-rsec > h2 { break-after: avoid; page-break-after: avoid; }
}
/* 保司权益大表（同行人 details HTML 里的唯一 class，11-03） */
.svc-detail-table { width: 100%; border-collapse: collapse; font-size: 12px; margin: 8px 0; }
.svc-detail-table th, .svc-detail-table td { border: 1px solid #E5E6EB; padding: 5px 8px; text-align: left; vertical-align: top; }
.svc-detail-table th { background: #F7F8FA; font-weight: 600; }
