:root {
  --navy: #17365d;
  --navy-2: #1f4a80;
  --blue: #2f6fed;
  --blue-soft: #eaf1fb;
  --green: #0f9d76;
  --red: #d93025;
  --amber: #e08b00;
  --ink: #1b2431;
  --ink-2: #5a6b80;
  --ink-3: #92a1b4;
  --line: #e3e9f2;
  --bg: #f4f7fb;
  --card: #ffffff;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(23, 54, 93, .06), 0 8px 24px rgba(23, 54, 93, .06);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.55;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; font-size: 14px; }
input, select, textarea { font-family: inherit; font-size: 14px; }
a { color: var(--blue); text-decoration: none; }

/* ---------- 登录 ---------- */
.login-wrap {
  min-height: 100vh; display: grid; grid-template-columns: 1.1fr .9fr;
  background: linear-gradient(135deg, #0d2544 0%, #17365d 45%, #24507f 100%);
}
.login-left { padding: 64px 72px; color: #fff; display: flex; flex-direction: column; justify-content: flex-start; }
.brand-mark { display: flex; align-items: center; gap: 14px; font-size: 18px; font-weight: 600; letter-spacing: .5px; }
.brand-logo {
  width: 54px; height: 54px; border-radius: 15px; display: grid; place-items: center;
  background: #fff; box-shadow: 0 3px 12px rgba(0,0,0,.22); flex: none; overflow: hidden;
}
.brand-logo img { width: 50px; height: 50px; object-fit: contain; display: block; }
.login-hero { margin-top: 48px; margin-bottom: 44px; }
.login-hero h1 { font-size: 40px; line-height: 1.25; margin: 0; font-weight: 700; letter-spacing: -.5px; }
.login-hero h1 em { font-style: normal; color: #7ac6ff; }
.login-feats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-width: 520px; }
.login-feat {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14);
  border-radius: 14px; padding: 18px 18px 15px; backdrop-filter: blur(6px);
  display: flex; flex-direction: column; gap: 6px;
}
.login-feat b { font-size: 28px; font-weight: 750; letter-spacing: -.5px; line-height: 1; }
.login-feat b i { font-style: normal; font-size: 13px; font-weight: 500; color: #9db8d6; margin-left: 3px; }
.login-feat span { font-size: 13px; color: #c3d6ea; }
.login-foot {
  margin-top: 18px; display: flex; align-items: baseline; justify-content: space-between;
  font-size: 12px; color: #6f8bab; max-width: 520px;
}
.login-foot em { font-style: normal; font-size: 12px; color: #5f7d9e; letter-spacing: 1px; }
.login-right { background: var(--card); display: flex; align-items: center; justify-content: center; padding: 40px; }
.login-card { width: 100%; max-width: 380px; }
.login-card h2 { font-size: 25px; margin: 0 0 6px; color: var(--navy); }
.login-card .sub { color: var(--ink-2); margin: 0 0 28px; font-size: 13px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12.5px; color: var(--ink-2); margin-bottom: 6px; font-weight: 500; }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px;
  background: #fbfcfe; outline: none; transition: .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--blue); background: #fff; box-shadow: 0 0 0 3px rgba(47,111,237,.1);
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 18px; border-radius: 10px; font-weight: 600; font-size: 13.5px;
  transition: .15s; white-space: nowrap;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: #1f5ad4; }
.btn-ghost { background: #f0f4fa; color: var(--ink-2); }
.btn-ghost:hover { background: #e5ecf6; color: var(--ink); }
.btn-outline { border: 1px solid var(--line); background: #fff; color: var(--ink-2); }
.btn-outline:hover { border-color: var(--blue); color: var(--blue); }
.btn-danger { background: #fdeceb; color: var(--red); }
.btn-block { width: 100%; padding: 12px; font-size: 15px; }
.btn-sm { padding: 6px 11px; font-size: 12.5px; border-radius: 8px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.login-err { background: #fdeceb; color: var(--red); padding: 9px 12px; border-radius: 9px; font-size: 13px; margin-bottom: 14px; }
.demo-hint {
  margin-top: 22px; background: var(--blue-soft); border-radius: 10px; padding: 12px 14px;
  font-size: 12px; color: #33507a; line-height: 1.9;
}
.demo-hint b { color: var(--navy); }
.demo-hint code { background: rgba(255,255,255,.8); padding: 1px 5px; border-radius: 4px; font-size: 11.5px; }

/* ---------- 布局 ---------- */
.layout { display: flex; min-height: 100vh; }
.side {
  width: 226px; background: var(--navy); color: #cfe0f2; display: flex; flex-direction: column;
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 40;
}
.side-brand { padding: 20px 20px 16px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid rgba(255,255,255,.08); }
.side-brand .brand-logo { width: 38px; height: 38px; border-radius: 11px; }
.side-brand .brand-logo img { width: 35px; height: 35px; }
.side-brand div b { display: block; color: #fff; font-size: 14px; }
.side-brand div span { font-size: 11px; color: #7d9dc0; }
.side-nav { padding: 12px 10px; flex: 1; overflow-y: auto; }
.nav-group { font-size: 11px; color: #6b8bb0; padding: 12px 10px 6px; letter-spacing: .5px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 9px;
  color: #c3d7ec; font-size: 13.5px; margin-bottom: 2px; cursor: pointer; transition: .13s;
}
.nav-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-item.active { background: var(--blue); color: #fff; font-weight: 600; }
.nav-item .ico { width: 17px; text-align: center; font-size: 15px; opacity: .95; }
/* v163：星标菜单图标（金色实心星，不依赖系统 emoji 字体） */
.nav-item .ico.emo {
  color: #ffc53d; font-size: 15px; opacity: 1;
  text-shadow: 0 0 8px rgba(255, 197, 61, .35);
}
.nav-item .badge { margin-left: auto; background: rgba(255,255,255,.2); font-size: 10.5px; padding: 1px 6px; border-radius: 20px; }
.side-user { padding: 14px 16px; border-top: 1px solid rgba(255,255,255,.08); display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; font-weight: 700; font-size: 13px; flex-shrink: 0;
}
.side-user div { flex: 1; min-width: 0; }
.side-user b { display: block; color: #fff; font-size: 13px; }
.side-user span { font-size: 11px; color: #7d9dc0; }
.side-user button { color: #8fadcb; font-size: 12px; padding: 4px; }
.side-user button:hover { color: #fff; }

.main { flex: 1; margin-left: 226px; min-width: 0; }
.topbar {
  height: 62px; background: #fff; border-bottom: 1px solid var(--line); display: flex;
  align-items: center; padding: 0 26px; gap: 16px; position: sticky; top: 0; z-index: 30;
}
.topbar h1 { font-size: 17px; margin: 0; font-weight: 650; color: var(--navy); }
.topbar .crumb { font-size: 12px; color: var(--ink-3); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.sync-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ink-3); }
.sync-dot i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(15,157,118,.15); }
.sync-dot.busy i { background: var(--amber); box-shadow: 0 0 0 3px rgba(224,139,0,.15); }
.content { padding: 22px 26px 60px; max-width: 1560px; }

/* ---------- 通用卡片 ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-h { padding: 15px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.card-h h3 { margin: 0; font-size: 14.5px; font-weight: 650; color: var(--navy); }
.card-h .sub { font-size: 12px; color: var(--ink-3); }
.card-h .r { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.card-b { padding: 18px; }

/* ---------- v150：微信好友年度存量账（期初 + 本年新增 − 删除 = 合计） ---------- */
.wx-ledger { display: flex; align-items: center; gap: 5px; flex-wrap: wrap;
  background: #f7fafd; border: 1px solid #e3ecf7; border-radius: 8px;
  padding: 4px 11px; font-size: 12.5px; color: #5a6b80; line-height: 1.7; }
.wx-ledger .wx-seg { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.wx-ledger .wx-t { font-weight: 700; color: var(--navy); margin-right: 2px; }
.wx-ledger .wx-n { color: var(--navy); font-weight: 700; font-variant-numeric: tabular-nums; }
.wx-ledger .wx-op { color: #9aabc0; font-weight: 700; font-style: normal; }
.wx-ledger .wx-eq { color: #2f6fed; font-weight: 700; }
.wx-ledger .wx-total { color: #2f6fed; font-weight: 800; font-size: 14.5px;
  font-variant-numeric: tabular-nums; }
.wx-inp { width: 58px; padding: 1px 4px; border: 1px solid #d6e2f0; border-radius: 5px;
  text-align: center; font-size: 12.5px; font-weight: 700; color: var(--navy);
  font-variant-numeric: tabular-nums; background: #fff; }
.wx-inp:focus { outline: 2px solid #cfe0fb; border-color: #2f6fed; }
.wx-inp.wx-empty { background: #fffbf0; border-color: #f0d59a; color: #a5751a; }
.wx-inp::-webkit-outer-spin-button, .wx-inp::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.wx-ledger.wx-neg { border-color: #f3c2c2; background: #fff6f6; }
.wx-ledger.wx-neg .wx-total { color: #d14343; }
.wx-unset { color: #b0801f; font-size: 11.5px; }
.wx-ledger .wx-note { flex-basis: 100%; margin-top: 1px; }

/* ---------- KPI ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.kpi {
  background: #fff; border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.kpi::after {
  content: ''; position: absolute; right: -18px; top: -18px; width: 76px; height: 76px;
  border-radius: 50%; background: var(--blue-soft); opacity: .55;
}
.kpi .k-label { font-size: 12.5px; color: var(--ink-2); display: flex; align-items: center; gap: 6px; position: relative; }
.kpi .k-label .tag { font-size: 10px; background: var(--blue-soft); color: var(--blue); padding: 1px 5px; border-radius: 4px; }
.kpi .k-val { font-size: 27px; font-weight: 700; color: var(--navy); margin: 7px 0 2px; letter-spacing: -.5px; position: relative; }
.kpi .k-val small { font-size: 13px; font-weight: 500; color: var(--ink-3); margin-left: 3px; }
.kpi .k-foot { font-size: 11.5px; color: var(--ink-3); display: flex; align-items: center; gap: 8px; position: relative; }
.kpi .k-foot .up { color: var(--red); }
.kpi .k-foot .down { color: var(--green); }
.mini-bar { height: 4px; background: #eef2f8; border-radius: 4px; overflow: hidden; margin-top: 9px; }
.mini-bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #4d8cff, #2f6fed); }
.mini-bar.warn i { background: linear-gradient(90deg, #ffc46b, #e08b00); }
.mini-bar.ok i { background: linear-gradient(90deg, #4bd0a5, #0f9d76); }

/* ---------- 两列 ---------- */
.grid-2 { display: grid; grid-template-columns: 1.35fr 1fr; gap: 14px; }
.grid-2-eq { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.stack > * + * { margin-top: 14px; }

/* ---------- 图表 ---------- */
.chart { width: 100%; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 150px; padding: 0 2px; }
.bars .b { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; height: 100%; position: relative; }
.bars .b .col {
  width: 100%; max-width: 26px; background: linear-gradient(180deg, #6fa3ff, #2f6fed);
  border-radius: 5px 5px 2px 2px; min-height: 3px; transition: .3s; position: relative;
}
.bars .b:hover .col { background: linear-gradient(180deg, #8db8ff, #1f5ad4); }
.bars .b .lbl { font-size: 10px; color: var(--ink-3); white-space: nowrap; }
.bars .b .num {
  font-size: 10.5px; color: var(--ink-2); font-weight: 600; position: absolute; top: -2px;
}
.trend-svg { width: 100%; height: 160px; display: block; }

.funnel { display: flex; flex-direction: column; gap: 9px; }
.fn-row { display: flex; align-items: center; gap: 10px; font-size: 12.5px; }
.fn-row .nm { width: 66px; color: var(--ink-2); flex-shrink: 0; }
.fn-row .bar { flex: 1; height: 22px; background: #f2f5fa; border-radius: 6px; overflow: hidden; position: relative; }
.fn-row .bar i { display: block; height: 100%; border-radius: 6px; transition: .4s; }
.fn-row .n { width: 62px; text-align: right; font-weight: 650; color: var(--navy); flex-shrink: 0; }
.fn-row .n small { font-weight: 400; color: var(--ink-3); font-size: 10.5px; }

/* ---------- 表格 ---------- */
.tbl-wrap { overflow: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th {
  background: #f7f9fd; color: var(--ink-2); font-weight: 600; font-size: 12px; text-align: left;
  padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; z-index: 2;
}
table.tbl td { padding: 10px 12px; border-bottom: 1px solid #f0f4f9; vertical-align: middle; }
table.tbl tbody tr:hover { background: #fafcff; }
table.tbl tbody tr.clickable { cursor: pointer; }
table.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
table.tbl .muted { color: var(--ink-3); }
.nowrap { white-space: nowrap; }
/* 员工账号表：列多时保底宽度 + 横向滚动，避免姓名被压成一字一行 */
table.tbl-staff{min-width:1000px}
table.tbl-staff td{white-space:nowrap}
table.tbl-staff td:nth-child(1){min-width:118px}
.pill {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 20px;
  font-size: 11.5px; font-weight: 600; white-space: nowrap;
}
.pill.new { background: #eef2f8; color: #5a6b80; }
.pill.wechat { background: #e8f3ff; color: #1769d6; }
.pill.quoted { background: #fff4e0; color: #b46f00; }
.pill.sample { background: #f3edff; color: #6d3fc4; }
.pill.deal { background: #e6f7f0; color: #0a7d5d; }
.pill.lost { background: #fdeceb; color: #c0392b; }
.pill.ok { background: #e6f7f0; color: #0a7d5d; }
.pill.no { background: #fdeceb; color: #c0392b; }
.pill.grey { background: #f0f3f8; color: #7a8a9e; }
.pill.warn { background: #fff4e0; color: #b46f00; }
.rate-cell { display: flex; align-items: center; gap: 8px; min-width: 130px; }
.rate-bar { width: 62px; height: 5px; background: #eef2f8; border-radius: 4px; overflow: hidden; flex-shrink: 0; }
.rate-bar i { display: block; height: 100%; border-radius: 4px; }
.rate-txt { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 12.5px; }

.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.toolbar .sp { margin-left: auto; }
.input-sm {
  padding: 7px 11px; border: 1px solid var(--line); border-radius: 9px; background: #fbfcfe; outline: none; font-size: 13px;
}
.input-sm:focus { border-color: var(--blue); background: #fff; }
.search-box { position: relative; }
.search-box input { padding-left: 32px; width: 230px; }
.search-box::before { content: '⌕'; position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-size: 15px; }

.pager { display: flex; align-items: center; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--ink-2); }
.pager .sp { margin-left: auto; display: flex; gap: 6px; align-items: center; }

/* ---------- 空状态 / 骨架 ---------- */
.empty { padding: 44px 20px; text-align: center; color: var(--ink-3); font-size: 13px; }
.empty .ico { font-size: 30px; display: block; margin-bottom: 10px; opacity: .5; }
.loading { padding: 40px; text-align: center; color: var(--ink-3); font-size: 13px; }

/* ---------- 弹窗 ---------- */
.mask {
  position: fixed; inset: 0; background: rgba(16, 30, 48, .45); z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 20px; backdrop-filter: blur(2px);
}
.dialog {
  background: #fff; border-radius: 16px; width: 100%; max-width: 620px; max-height: 90vh;
  display: flex; flex-direction: column; box-shadow: 0 24px 70px rgba(0,0,0,.24); animation: pop .18s ease;
}
@keyframes pop { from { transform: translateY(10px) scale(.98); opacity: 0 } to { transform: none; opacity: 1 } }
.dialog.wide { max-width: 860px; }
.dialog-h { padding: 18px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; }
.dialog-h h3 { margin: 0; font-size: 16px; color: var(--navy); }
.dialog-h .x { margin-left: auto; color: var(--ink-3); font-size: 20px; line-height: 1; padding: 2px 6px; border-radius: 6px; }
.dialog-h .x:hover { background: #f2f5fa; color: var(--ink); }
.dialog-b { padding: 20px; overflow-y: auto; }
.dialog-f { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-grid .full { grid-column: 1 / -1; }
.req::after { content: ' *'; color: var(--red); }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 40px; transform: translate(-50%, 20px);
  background: #1b2431; color: #fff; padding: 10px 20px; border-radius: 10px; font-size: 13.5px;
  opacity: 0; pointer-events: none; transition: .22s; z-index: 300; box-shadow: 0 8px 24px rgba(0,0,0,.2);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.ok { background: #0f7d5f; }
.toast.err { background: #c0392b; }

/* ---------- 拖拽导入 ---------- */
.dropzone {
  border: 2px dashed #c8d6e8; border-radius: 12px; padding: 30px; text-align: center;
  background: #f9fbfe; transition: .15s; cursor: pointer;
}
.dropzone:hover, .dropzone.over { border-color: var(--blue); background: var(--blue-soft); }
.dropzone .big { font-size: 30px; margin-bottom: 8px; }
.dropzone b { color: var(--navy); display: block; margin-bottom: 4px; }
.dropzone span { font-size: 12.5px; color: var(--ink-3); }
.import-result { margin-top: 16px; background: #f6f9fd; border-radius: 10px; padding: 14px 16px; font-size: 13px; }
.import-result .row { display: flex; gap: 22px; margin-bottom: 6px; }
.import-result .row b { color: var(--navy); font-size: 16px; }

/* ---------- 成员卡 ---------- */
.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 12px; }
.member {
  border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: #fff;
  transition: .15s; cursor: pointer;
}
.member:hover { border-color: #b9cdf0; box-shadow: 0 6px 18px rgba(23,54,93,.08); }
.member .m-top { display: flex; align-items: center; gap: 9px; margin-bottom: 11px; }
.member .m-top b { font-size: 14px; color: var(--navy); }
.member .m-top span { font-size: 11px; color: var(--ink-3); display: block; }
.m-row { display: flex; justify-content: space-between; font-size: 12px; padding: 3px 0; color: var(--ink-2); }
.m-row b { color: var(--ink); font-variant-numeric: tabular-nums; }
.rank-tag { font-size: 10px; padding: 1px 6px; border-radius: 5px; background: #fff4e0; color: #b46f00; font-weight: 700; }

/* ---------- 月份切换 ---------- */
.month-pick { display: inline-flex; align-items: center; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 3px; }
.month-pick button { padding: 5px 9px; border-radius: 7px; color: var(--ink-2); font-size: 12.5px; }
.month-pick button:hover { background: #f2f5fa; }
.month-pick input[type=month] { border: none; background: none; outline: none; font-size: 13px; color: var(--navy); font-weight: 600; padding: 4px 6px; width: 128px; }

/* ---------- 月份 / 年份 选择器（新） ---------- */
.mpbar { margin-bottom: 16px; gap: 10px; flex-wrap: wrap; }
.mpick {
  position: relative; display: inline-flex; align-items: center; gap: 2px;
  background: #fff; border: 1px solid #d7e1ef; border-radius: 10px; padding: 3px;
  box-shadow: 0 1px 2px rgba(23, 54, 93, .04);
}
.mpick .mp-nav {
  width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  font-size: 17px; line-height: 1; color: #4a5f7a; background: none; border: none;
  cursor: pointer; transition: background .13s, color .13s, transform .08s;
  user-select: none; padding: 0; padding-bottom: 3px;
}
.mpick .mp-nav:hover { background: #eaf1fb; color: var(--navy); }
.mpick .mp-nav:active { transform: scale(.9); background: #dbe7f8; }
.mpick .mp-label {
  display: inline-flex; align-items: center; gap: 5px; min-width: 112px; justify-content: center;
  padding: 5px 8px; border-radius: 8px; background: none; border: none; cursor: pointer;
  font-size: 13.5px; color: var(--navy); font-weight: 680; transition: background .13s;
  font-variant-numeric: tabular-nums;
}
.mpick .mp-label:hover { background: #f3f7fd; }
.mpick .mp-label i { font-style: normal; font-size: 9px; color: #92a1b4; transition: transform .15s; }
.mpick .mp-label.open i, .mpick:has(.mp-pop.on) .mp-label i { transform: rotate(180deg); }
.mpick .mp-today {
  padding: 5px 9px; border-radius: 7px; font-size: 12px; color: #2f6fed; background: #eef4fe;
  border: none; cursor: pointer; transition: background .13s; white-space: nowrap;
}
.mpick .mp-today:hover { background: #dfebfd; }
.mpick.ypick .mp-label { min-width: 86px; }

.mp-pop {
  position: absolute; top: calc(100% + 7px); left: 0; z-index: 60; width: 246px;
  background: #fff; border: 1px solid #d7e1ef; border-radius: 12px; padding: 11px;
  box-shadow: 0 12px 32px rgba(20, 48, 88, .16); display: none;
}
.mp-pop.on { display: block; animation: mpIn .13s ease-out; }
@keyframes mpIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: none; } }
.mp-pop-h {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 9px; padding-bottom: 8px; border-bottom: 1px solid #f0f4fa;
}
.mp-pop-h b { font-size: 13px; color: var(--navy); font-weight: 680; font-variant-numeric: tabular-nums; }
.mp-pop-h button {
  width: 26px; height: 26px; border-radius: 7px; border: none; background: #f4f7fc;
  color: #4a5f7a; font-size: 14px; cursor: pointer; display: grid; place-items: center;
  transition: background .13s; padding: 0; padding-bottom: 2px;
}
.mp-pop-h button:hover { background: #e5eefa; color: var(--navy); }
.mp-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.mp-grid .mp-m {
  padding: 7px 0; border-radius: 7px; border: 1px solid transparent; background: #f6f9fd;
  font-size: 12.5px; color: #46586f; cursor: pointer; transition: all .12s;
  font-variant-numeric: tabular-nums;
}
.mp-grid .mp-m:hover { background: #e8f0fb; border-color: #c8dcf7; color: var(--navy); }
.mp-grid .mp-m.on {
  background: var(--btn, #2f6fed); color: #fff; font-weight: 700;
  box-shadow: 0 2px 7px rgba(47, 111, 237, .3);
}
.mp-grid.ygrid { grid-template-columns: repeat(3, 1fr); }
.mp-grid.ygrid .mp-m { padding: 9px 0; }

/* 按月 / 全年 切换 */
.mstab { display: inline-flex; background: #eef2f8; border-radius: 10px; padding: 3px; gap: 2px; }
.mstab .tb-tab {
  padding: 6px 14px; border-radius: 8px; border: none; background: none; cursor: pointer;
  font-size: 13px; color: var(--ink-2); transition: all .15s; white-space: nowrap;
}
.mstab .tb-tab:hover { color: var(--navy); }
.mstab .tb-tab.on {
  background: #fff; color: var(--navy); font-weight: 680;
  box-shadow: 0 1px 3px rgba(23, 54, 93, .12);
}

/* v108 日期区间选择器：两个 date input + 快捷按钮 */
.rgpick { display: inline-flex; align-items: center; gap: 6px; background: #eef2f8;
  border-radius: 10px; padding: 4px 8px; }
.rgpick input[type="date"] {
  border: 1px solid #d6dfea; background: #fff; color: var(--navy);
  border-radius: 6px; padding: 4px 8px; font-size: 12.5px; font-family: inherit;
  outline: none; transition: border-color .15s;
}
.rgpick input[type="date"]:focus { border-color: var(--blue, #2f6fed); }
.rgpick .rg-quick {
  border: none; background: transparent; color: #5a6b80; padding: 4px 8px;
  border-radius: 6px; font-size: 12px; cursor: pointer; transition: .15s;
  font-family: inherit;
}
.rgpick .rg-quick:hover { background: #fff; color: var(--navy); font-weight: 600; }

/* ---------- 移动端 ---------- */
.mobile-top { display: none; }
@media (max-width: 1080px) {
  .login-wrap { grid-template-columns: 1fr; }
  .login-left { display: none; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-2, .grid-2-eq { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .side { transform: translateX(-100%); transition: .22s; }
  .side.open { transform: none; }
  .main { margin-left: 0; }
  .content { padding: 14px 12px 70px; }
  .topbar { height: 54px; padding: 0 12px; }
  .topbar h1 { font-size: 15px; }
  .mobile-top { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: #f2f5fa; font-size: 17px; }
  .kpi { padding: 13px 14px; }
  .kpi .k-val { font-size: 22px; }
  .kpi-grid { gap: 9px; margin-bottom: 12px; }
  .form-grid { grid-template-columns: 1fr; }
  .search-box input { width: 100%; }
  .search-box { flex: 1; }
  .login-right { padding: 24px; }
  .content { font-size: 13.5px; }
  .toolbar { gap: 7px; }
  .month-pick input[type=month] { width: 118px; }
  /* 新选择器：手机上占满整行，按钮加大便于点按 */
  .mpbar { gap: 8px; }
  .mpick { flex: 1 1 auto; justify-content: space-between; }
  .mpick .mp-label { flex: 1; min-width: 0; }
  .mpick .mp-nav { width: 34px; height: 34px; font-size: 19px; }
  .mstab { flex: 1 1 100%; }
  .mstab .tb-tab { flex: 1; text-align: center; padding: 8px 0; }
  .mp-pop { width: min(280px, calc(100vw - 32px)); left: 0; right: auto; }
  .mp-pop .mp-grid .mp-m { padding: 10px 0; font-size: 13px; }
}

/* ================= 客户登记表（Excel 复刻） ================= */
.gtbl-wrap {
  width: 100%; overflow: auto; max-height: calc(100vh - 250px);
  border-top: 1px solid #d8e3f0; background: #fff;
}
.gtbl2 {
  border-collapse: separate; border-spacing: 0;
  font-size: 12.2px; table-layout: fixed; min-width: 100%;
  font-variant-numeric: tabular-nums;
}
/* ---- 表头 ---- */
.gtbl2 thead th {
  position: sticky; z-index: 3;
  background: #eaf1fa; color: #1c3f6e; font-weight: 650;
  border-right: 1px solid #cddbeb; border-bottom: 1px solid #cddbeb;
  padding: 7px 3px; text-align: center; letter-spacing: 0;
  font-size: 11.8px; white-space: normal; word-break: break-all; line-height: 1.25;
}
.gtbl2 thead tr.ghead1 th { top: 0; height: 26px; }
.gtbl2 thead tr.ghead2 th { top: 26px; height: 30px; }
.gtbl2 thead tr.ghead3 th { top: 56px; height: 30px; background: #f0f5fc; padding: 2px 3px; z-index: 2; }
.gtbl2 thead tr.ghead3 .gfcell select,
.gtbl2 thead tr.ghead3 .gfcell input {
  width: 100%; box-sizing: border-box; font-size: 11px; padding: 2px 3px;
  border: 1px solid #c9d6e8; border-radius: 3px; background: #fff; color: #243;
}
.gtbl2 thead tr.ghead3 .gamount { display: flex; gap: 2px; }
.gsearch {
  width: 240px; max-width: 40vw; font-size: 12px; padding: 4px 8px;
  border: 1px solid #c9d6e8; border-radius: 6px; background: #fff;
}
/* ---- 勾选导出 ---- */
.gtbl2 td.gtd-sel, .gtbl2 th.gsel-all { text-align: center; background: #f2f6fc; }
.gtbl2 td.gtd-sel input[type=checkbox], .gtbl2 th.gsel-all input[type=checkbox] {
  width: 15px; height: 15px; cursor: pointer; accent-color: #2f6fed;
}
.selbar { color: #0a7d5d; font-size: 12.3px; background: #e6f7f0; border: 1px solid #b7e6d4; border-radius: 7px; padding: 4px 10px; margin-left: 10px; }
.gpager { margin-left: 12px; display: inline-flex; align-items: center; gap: 8px; }
.gpager b { font-size: 12.3px; color: #17365d; }
.gpager button:disabled { opacity: .4; cursor: default; }
tr.gfiltered-hit { outline: 1px solid #ffd66b; }
/* ---- 电话重复提示 ---- */
.gtd.phdup-cell { position: relative; background: #fff7e6; }
.gtd.phdup-cell input { border-color: #e6a23c !important; background: #fffaf0; }
.phdup {
  position: absolute; left: 0; top: 100%; z-index: 30;
  min-width: 220px; max-width: 340px; margin-top: 2px;
  padding: 5px 8px; border-radius: 6px;
  background: #fff4e5; border: 1px solid #e6a23c; color: #8a5300;
  font-size: 11.5px; line-height: 1.4; white-space: normal;
  box-shadow: 0 4px 14px rgba(0,0,0,.12);
}
.gtbl2 thead th.gband { white-space: normal; letter-spacing: 1px; font-weight: 700; font-size: 12.5px; }
/* ---- 弹窗内电话重复提示 ---- */
.dlg-phdup { font-size: 11.5px; color: #b26a00; margin-top: 4px; line-height: 1.4; min-height: 0; }
input.warn { border-color: #e6a23c !important; background: #fffaf0 !important; }
.gtbl2 thead th.gband-daily  { background: #dce9f9; color: #17427a; }
.gtbl2 thead th.gband-status { background: #dfe9d8; color: #3d5b23; }
.gtbl2 thead th.gcorner { background: #e2ebf6; }
/* ---- 冻结序号列 ---- */
.gtbl2 tbody td.gtd-seq, .gtbl2 thead th.gcorner:first-child {
  position: sticky; left: 0; z-index: 2;
}
.gtbl2 thead th.gcorner:first-child { z-index: 4; }
.gtbl2 tbody td.gtd-seq {
  background: #f5f8fc; color: #7a8a9e; text-align: center;
  border-right: 1px solid #dbe5f0; font-size: 11.5px;
}
/* ---- 数据格 ---- */
.gtbl2 tbody td {
  border-right: 1px solid #e8eef6; border-bottom: 1px solid #eef3f9;
  padding: 0; height: 34px; background: #fff; position: relative;
}
.gtbl2 tbody tr:hover td { background: #f7fbff; }
.gtbl2 tbody tr.gjust-saved td { background: #e7f8f0; transition: background .3s; }
.gtbl2 input.gc, .gtbl2 select.gc {
  width: 100%; height: 34px; border: 0; background: transparent;
  padding: 0 5px; font-size: 12.2px; color: #1f2d3d; outline: none;
  font-family: inherit;
}
.gtbl2 select.gc { cursor: pointer; appearance: none; -webkit-appearance: none; }
.gtbl2 select.gc:hover { background: #f2f7ff; }
.gtbl2 input.gc:focus, .gtbl2 select.gc:focus {
  background: #fff; box-shadow: inset 0 0 0 2px #2f6fed; border-radius: 2px;
}
.gtbl2 input[type=number].gc { text-align: right; padding-right: 6px; }
.gtbl2 input[type=date].gc { padding: 0 3px; font-size: 11.8px; }
.gtbl2 input[type=date].gc::-webkit-calendar-picker-indicator { opacity: .45; }
.gtbl2 .gowner { display: block; padding: 0 5px; line-height: 34px; color: #4a5c70; font-size: 12.2px; }
.gtbl2 td.gtd-money { background: #fdfefe; }
.gtbl2 .gtd-act { text-align: center; border-right: 0; }
.gx {
  width: 20px; height: 20px; border-radius: 50%; border: 0; cursor: pointer;
  background: transparent; color: #b8c5d4; font-size: 16px; line-height: 1;
  font-weight: 400; transition: .15s;
}
.gx:hover { background: #fdeceb; color: #d93025; }
/* ---- 提示条 / 底栏 ---- */
.gtip {
  display: flex; align-items: center; gap: 9px; padding: 9px 18px;
  background: linear-gradient(90deg, #f0f6ff, #f8fbff);
  border-bottom: 1px solid #e2ecf8; font-size: 12.3px; color: #4a5c70; line-height: 1.7;
}
.gtip-ico {
  flex: none; width: 20px; height: 20px; border-radius: 6px; background: #2f6fed;
  color: #fff; font-size: 12px; display: grid; place-items: center;
}
.gtip-right { margin-left: auto; flex: none; color: #7a8a9e; }
.gfoot {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px;
  justify-content: space-between; padding: 8px 18px;
  font-size: 12px; color: #7a8a9e; border-top: 1px solid #eef3f9; background: #fbfcfe;
}

/* ---- 经理只读单元格 ---- */
.gtbl2 .gtxt { display: block; padding: 0 7px; line-height: 34px; font-size: 12.8px; color: #26374a;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* ---- 只读详情 ---- */
.vbox { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: #e8eef6; border: 1px solid #e8eef6; border-radius: 10px; overflow: hidden; }
.vrow { background: #fff; padding: 9px 12px; display: flex; flex-direction: column; gap: 3px; }
.vrow span { font-size: 11.5px; color: #7387a0; }
.vrow b { font-size: 13px; color: #17365d; font-weight: 620; word-break: break-all; }

/* ---- 员工账号搜索 ---- */
.staff-search { display: flex; align-items: center; gap: 7px; margin: 0 18px 10px; }
.staff-search input {
  flex: 1; min-width: 0; font-size: 12.5px; padding: 6px 11px;
  border: 1px solid #c9d6e8; border-radius: 7px; background: #fff; color: #1f2d3d;
}
.staff-search input:focus { outline: none; border-color: #2f6fed; box-shadow: 0 0 0 3px rgba(47,111,237,.12); }
/* 搜索栏移动端 / 窄屏适配：避免被卡片头挤出换行 */
@media (max-width: 1080px) {
  .card-h { flex-wrap: wrap; }
  .card-h .r.searchwrap { width: 100%; max-width: none !important; margin-top: 8px; }
  .staff-search { flex-wrap: wrap; }
}
.login-ver { margin-top: 14px; text-align: center; font-size: 11px; color: #9aa9bc; letter-spacing: 1px; }

/* ============ 可视化看板（今日实时卡 + 双轴图 + 成员对比） ============ */
.kpi-live {
  background: linear-gradient(135deg, #14294a 0%, #1d3f6b 100%);
  border-radius: 14px; padding: 16px 18px; margin-bottom: 16px; color: #fff;
}
.kpi-live-h { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.kpi-live-h b { font-size: 15px; font-weight: 700; letter-spacing: .3px; }
.kpi-live-h span { font-size: 12px; color: #8fb0d4; }
.td-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.td-card {
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px; padding: 12px 14px; display: flex; align-items: center; gap: 12px;
}
.td-ring { position: relative; width: 60px; height: 60px; flex: none; }
.td-ring svg { display: block; }
.td-ring b {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 12px; font-weight: 700; color: #dbeafe;
}
.td-body { min-width: 0; flex: 1; }
.td-l { font-size: 12px; color: #9db8d6; margin-bottom: 2px; }
.td-v { font-size: 24px; font-weight: 750; line-height: 1.15; letter-spacing: -.5px; }
.td-v i { font-style: normal; font-size: 12px; font-weight: 500; color: #9db8d6; margin-left: 2px; }
.td-f { font-size: 11.5px; color: #7d9dc0; margin-top: 2px; }

/* 双轴组合图 */
.chart-wrap { padding: 4px 0 0; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 12px; color: var(--ink-2); margin-bottom: 6px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.chart-legend i.dash {
  width: 16px; height: 0; border-top: 2px dashed #22c55e; border-radius: 0;
}
.chart-svg { width: 100%; height: 260px; display: block; }

/* 成员四项对比 */
.mb-list { display: flex; flex-direction: column; gap: 14px; }
.mb-row { border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.mb-row:last-child { border-bottom: none; padding-bottom: 0; }
.mb-head { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.mb-head .av {
  width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center;
  color: #fff; font-size: 12px; font-weight: 700; flex: none;
}
.mb-head b { font-size: 13.5px; }
.mb-meta { font-size: 11.5px; color: var(--ink-3); }
.mb-avg { margin-left: auto; font-size: 15px; font-weight: 750; color: var(--navy); }
.mb-avg em { font-style: normal; font-size: 11px; font-weight: 500; color: var(--ink-3); margin-right: 4px; }
.mb-avg small { font-size: 11px; font-weight: 500; color: var(--ink-3); margin-left: 2px; }
.mb-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 16px; }
.mb-item { display: flex; align-items: center; gap: 7px; }
.mb-lab { font-size: 11.5px; color: var(--ink-3); width: 30px; flex: none; }
.mb-track { flex: 1; height: 6px; background: #eef2f8; border-radius: 4px; overflow: hidden; }
.mb-track i { display: block; height: 100%; border-radius: 4px; transition: width .4s ease; }
.mb-pct { font-size: 11.5px; font-weight: 650; text-align: right; flex: none; white-space: nowrap; min-width: 56px; }
.mb-pct small { font-weight: 400; font-size: 10px; color: var(--ink-3); margin-left: 1px; }

/* 手机端今日卡 */
.m-today { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.m-today .td-card {
  background: #14294a; border: none; flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px;
}
.m-today .td-ring { width: 44px; height: 44px; }
.m-today .td-ring svg { width: 44px; height: 44px; }
.m-today .td-ring b { font-size: 10px; }
.m-today .td-v { font-size: 20px; }
.m-chart .chart-svg { height: 200px; }

/* ============ 全员排行榜（日榜 / 月榜） ============ */
.mstab-sm { display: inline-flex; background: #eef2f8; border-radius: 8px; padding: 3px; gap: 2px; }
.mstab-sm button {
  border: none; background: none; padding: 5px 12px; border-radius: 6px;
  font-size: 12px; color: var(--ink-2); cursor: pointer; font-weight: 500;
}
.mstab-sm button.on { background: #fff; color: var(--navy); font-weight: 650; box-shadow: 0 1px 3px rgba(0,0,0,.08); }

.lb-wrap { display: flex; flex-direction: column; }
.lb-head {
  display: grid; grid-template-columns: 26px minmax(0,1fr) repeat(4, minmax(0,1.2fr));
  gap: 12px; align-items: center; padding: 6px 12px 8px;
  font-size: 11.5px; color: var(--ink-3); border-bottom: 1px solid var(--line);
}
.lb-head .i-cells { display: contents; }
.lb-head i { font-style: normal; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-hcells { display: contents; }
.lb-hcells i { font-style: normal; }

.lb-row {
  display: grid; grid-template-columns: 26px minmax(0,1fr) repeat(4, minmax(0,1.2fr));
  gap: 12px; align-items: center; padding: 11px 12px;
  border-bottom: 1px solid #f4f7fb; transition: background .15s;
}
.lb-row:last-child { border-bottom: none; }
.lb-row.me { background: #eef5ff; border-radius: 8px; }
.lb-av {
  width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center;
  color: #fff; font-size: 12px; font-weight: 700; flex: none;
}
.lb-name { font-size: 13px; font-weight: 550; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-name i {
  font-style: normal; font-size: 10px; background: #2f6fed; color: #fff;
  padding: 1px 5px; border-radius: 6px; margin-left: 5px;
}
.lb-cells { display: contents; }
.lb-cell b { font-size: 12.5px; }
.lb-cell { text-align: right; }
.lb-cell b { display: block; font-size: 12.5px; font-weight: 700; color: var(--navy); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-cell span { font-size: 10px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }

/* 手机端 */
@media (max-width: 768px) {
  .lb-head { padding: 4px 8px 7px; gap: 8px; grid-template-columns: 24px minmax(0,1fr) repeat(4, minmax(0,1.2fr)); font-size: 10.5px; }
  .lb-row { padding: 8px 8px; gap: 8px; grid-template-columns: 24px minmax(0,1fr) repeat(4, minmax(0,1.2fr)); }
  .lb-av { width: 22px; height: 22px; border-radius: 7px; font-size: 11px; }
  .lb-name { min-width: 46px; font-size: 12.5px; }
  .lb-cell b { font-size: 12px; }
  .lb-cell span { font-size: 9.5px; }
  .lb-name i { display: none; }
}

/* 成员排行卡：四项完成率百分比行 */
.m-rates {
  display: flex; justify-content: space-between; margin-top: 6px;
  font-size: 12.5px; font-weight: 650;
}

/* 年度统计卡 */
.yr-sum { display: flex; flex-direction: column; gap: 12px; }
.yr-row { display: flex; align-items: center; gap: 12px; }
.yr-lab { width: 34px; font-size: 13px; font-weight: 650; color: var(--navy); flex: none; }
.yr-track { flex: 1; height: 8px; background: #eef2f8; border-radius: 5px; overflow: hidden; }
.yr-track i { display: block; height: 100%; border-radius: 5px; transition: width .4s; }
.yr-num { text-align: right; flex: none; min-width: 150px; }
.yr-num b { font-size: 14px; font-weight: 700; }
.yr-num small { display: block; font-size: 11px; color: var(--ink-3); margin-top: 1px; }

/* 排行榜左右双栏 */
.lb-duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; }
.lb-col { padding: 4px 18px; min-width: 0; }
.lb-col:first-child { border-right: 1px solid var(--line); padding-left: 6px; }
.lb-col:last-child { padding-right: 6px; }
.lb-col-h { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.lb-col-h b { font-size: 13.5px; }
.lb-col-h span { font-size: 11px; color: var(--ink-3); }

/* 日榜（只要数字） */
.lbd-row {
  display: flex; align-items: center; gap: 9px; padding: 7px 8px;
  border-radius: 8px; transition: background .15s;
}
.lbd-row.me { background: #eef5ff; }
.lbd-rank { width: 26px; text-align: center; font-size: 13px; font-weight: 700; color: var(--ink-3); flex: none; }
.lbd-row:first-child .lbd-rank, .lbd-row:nth-child(2) .lbd-rank, .lbd-row:nth-child(3) .lbd-rank { font-size: 15px; }
.lbd-av {
  width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center;
  color: #fff; font-size: 11px; font-weight: 700; flex: none;
}
.lbd-name { font-size: 13px; font-weight: 550; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lbd-num { font-size: 17px; font-weight: 750; color: var(--navy); flex: none; }
.lbd-num small { font-size: 11px; font-weight: 500; color: var(--ink-3); margin-left: 2px; }

@media (max-width: 900px) {
  .lb-duo { grid-template-columns: 1fr; }
  .lb-col:first-child { border-right: none; border-bottom: 1px solid var(--line); padding: 4px 6px 10px; }
  .lb-col:last-child { padding: 10px 6px 4px; }
}

/* ---- 排行榜四项前三名榜首区（日/月共用） ---- */
.lb-pods { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; margin-bottom: 14px; }
.lb-pod { background: #f8faff; border: 1px solid #e3ecfb; border-radius: 12px; padding: 10px 12px; min-width: 0; }
.lb-pod .pod-h { font-size: 12px; font-weight: 700; color: #1f5fd6; margin-bottom: 6px; }
.lb-pod .pod-row { display: flex; align-items: center; gap: 7px; padding: 4px 0; min-width: 0; }
.lb-pod .pod-row + .pod-row { border-top: 1px dashed #e8effa; }
.lb-pod .pod-rank { position: relative; width: 20px; height: 20px; margin-top: 7px; border-radius: 50%;
  font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center;
  flex: none; color: #fff; box-shadow: inset 0 -2px 3px rgba(0,0,0,.18), 0 1px 2px rgba(0,0,0,.15); }
.lb-pod .pod-rank::before, .lb-pod .pod-rank::after { content: ''; position: absolute; top: -6px;
  width: 5px; height: 9px; border-radius: 1px; z-index: 0; }
.lb-pod .pod-rank::before { left: 2px; transform: rotate(-24deg); background: #4d8cff; }
.lb-pod .pod-rank::after { right: 2px; transform: rotate(24deg); background: #e06666; }
.lb-pod .pod-rank.m1 { background: linear-gradient(160deg, #f6cf5a, #d4a017 60%, #a87c0c); }
.lb-pod .pod-rank.m2 { background: linear-gradient(160deg, #d7dde6, #9aa7b8 60%, #71809a); }
.lb-pod .pod-rank.m3 { background: linear-gradient(160deg, #e0a06b, #c07a3d 60%, #96551f); }
.lb-pod .pod-rank span { position: relative; z-index: 1; }
.lb-pod .av { width: 20px; height: 20px; border-radius: 50%; color: #fff; font-size: 11px;
  display: flex; align-items: center; justify-content: center; flex: none; }
.lb-pod b { font-size: 12.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.lb-pod em { font-style: normal; font-size: 12.5px; font-weight: 700; color: #1f5fd6; margin-left: auto; white-space: nowrap; flex: none; }

@media (max-width: 760px) {
  .lb-pods { grid-template-columns: 1fr; }
}


/* ================= 列宽拖动 + 底部横向滚动条 ================= */
.gtbl2 thead th .rz {
  position: absolute; top: 0; right: -3px; bottom: 0; width: 7px;
  cursor: col-resize; z-index: 6; background: transparent;
}
.gtbl2 thead th .rz::after {
  content: ''; position: absolute; top: 20%; bottom: 20%; left: 3px;
  width: 1px; background: transparent; transition: background .15s;
}
.gtbl2 thead th:hover .rz::after { background: #9ec0e8; }
.gtbl2 thead th .rz.dragging::after { background: #2f6fed; width: 2px; }

/* 底部横向滚动条：自定义粗滑块，好按好拖 */
.hscroll {
  padding: 5px 12px 6px; background: #f7fafd;
  border-top: 1px solid #e3ecf8; margin-top: -1px;
}
.hscroll-track {
  position: relative; height: 12px; border-radius: 8px;
  background: #e3ebf6; cursor: pointer; overflow: hidden;
}
.hscroll-thumb {
  position: absolute; top: 0; left: 0; height: 12px; width: 40%; border-radius: 8px;
  background: linear-gradient(180deg, #9dbde4, #6f9ed2);
  box-shadow: 0 1px 3px rgba(23,54,93,.22);
  cursor: grab; transition: background .15s;
}
.hscroll-thumb:hover { background: linear-gradient(180deg, #82a8d8, #5789c6); }
.hscroll-thumb:active { cursor: grabbing; background: linear-gradient(180deg, #5f8fc4, #3f6fae); }

/* ================= 日期格：可留空 + 一键清除 ================= */
.gdate-wrap { position: relative; display: block; }
.gdate-clr {
  position: absolute; right: 2px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; line-height: 14px; text-align: center;
  border-radius: 50%; background: #d8e3f0; color: #4a5c70;
  font-size: 12px; font-style: normal; cursor: pointer; opacity: .55;
  transition: opacity .12s, background .12s, transform .12s; z-index: 3;
  user-select: none;
}
.gdate-wrap:hover .gdate-clr { opacity: 1; }
.gdate-clr:hover { background: #e06666; color: #fff; transform: translateY(-50%) scale(1.15); }
/* 有值时给输入框让出右侧空间，别被 × 压住 */
.gdate-wrap:not(.is-empty) input { padding-right: 16px; }
/* 空白日期：显示浅色「选择日期」占位 */
.gdate-wrap.is-empty input { cursor: pointer; }
.gdate-wrap.is-empty input::placeholder { color: #a9b8c9; opacity: 1; }
.gdate-wrap.is-empty:hover { background: #f4f8ff; }
.gdate-wrap.is-empty:hover input::placeholder { color: #4a7fd4; }

/* ================= 中文日历选择器 ================= */
.zhdp {
  position: fixed; z-index: 9999; width: 252px;
  background: #fff; border: 1px solid #cfdcec; border-radius: 11px;
  box-shadow: 0 12px 32px rgba(23,54,93,.18), 0 2px 6px rgba(23,54,93,.08);
  padding: 10px; user-select: none;
  animation: zdIn .12s ease-out;
}
@keyframes zdIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.zd-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; }
.zd-title { font-size: 13.5px; font-weight: 700; color: #17365d; letter-spacing: .3px; }
.zd-nav {
  width: 26px; height: 26px; border: 1px solid #d5e0ee; background: #f7faff;
  border-radius: 7px; color: #3d6ba5; font-size: 16px; line-height: 1; cursor: pointer;
  display: grid; place-items: center; transition: all .12s;
}
.zd-nav:hover { background: #2f6fed; border-color: #2f6fed; color: #fff; }
.zd-week { display: grid; grid-template-columns: repeat(7, 1fr); margin-bottom: 3px; }
.zd-week i {
  font-style: normal; text-align: center; font-size: 10.5px; color: #92a1b4;
  padding: 3px 0; font-weight: 600;
}
.zd-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.zd-cell {
  height: 28px; border: none; background: transparent; border-radius: 6px;
  font-size: 12.5px; color: #24384f; cursor: pointer; transition: background .1s, color .1s;
  font-variant-numeric: tabular-nums;
}
.zd-cell:hover { background: #e8f0fe; color: #1a4f9c; }
.zd-cell.zd-out { color: #c2cddb; }
.zd-cell.zd-today { box-shadow: inset 0 0 0 1px #7ba7e8; color: #2f6fed; font-weight: 700; }
.zd-cell.zd-on { background: #2f6fed; color: #fff !important; font-weight: 700; }
.zd-cell.zd-on:hover { background: #2560d8; }
.zd-foot {
  display: flex; gap: 6px; margin-top: 9px; padding-top: 8px; border-top: 1px solid #eef3f9;
}
.zd-btn {
  flex: 1; height: 27px; border: 1px solid #d5e0ee; background: #fff; border-radius: 7px;
  font-size: 12px; color: #3d6ba5; cursor: pointer; transition: all .12s;
}
.zd-btn:hover { background: #f2f7ff; border-color: #a9c4e8; color: #2f6fed; }
/* 触屏设备：× 一直可见，方便手指点 */
@media (hover: none) {
  .gdate-clr { opacity: 1; width: 17px; height: 17px; line-height: 16px; font-size: 13px; }
}

/* 批量改日期 */
.bulk-row { display: flex; gap: 8px; align-items: stretch; }
.bulk-row input { flex: 1; min-width: 0; }
.bulk-row .btn { flex: none; white-space: nowrap; }
.bulk-warn {
  padding: 9px 11px; border-radius: 8px; background: #fff8e6; border: 1px solid #f2dfae;
  color: #7a5c14; font-size: 12.5px; line-height: 1.55;
}

/* ===== 日期列筛选面板 ===== */
.dpanel {
  position: fixed; z-index: 9999; width: 292px;
  background: #fff; border: 1px solid #c9d8ec; border-radius: 10px;
  box-shadow: 0 8px 28px rgba(28, 60, 105, .18); padding: 8px;
  font-size: 12.5px; color: #2c3e50;
}
.dp-tabs { display: flex; gap: 3px; margin-bottom: 8px; }
.dp-tabs button {
  flex: 1 1 0; min-width: 0; padding: 5px 2px; border: 1px solid #dbe5f1; border-radius: 6px;
  background: #f6f9fd; color: #4a5c70; font-size: 11.5px; cursor: pointer; transition: .12s;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dp-tabs button:hover { background: #eaf2fd; }
.dp-tabs button.on { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 600; }
.dp-pane { display: none; padding: 2px 0; }
.dp-pane.show { display: block; }
.dp-pane input {
  width: 100%; padding: 7px 9px; border: 1px solid #d5e0ee; border-radius: 7px;
  background: #fbfdff; outline: none; font-size: 12.5px;
}
.dp-pane input:focus { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 3px rgba(47, 111, 237, .1); }
/* 区间行：必须带 .show 才显示，否则会被这条 display:flex 覆盖掉 .dp-pane 的 display:none */
.dp-range { align-items: center; gap: 5px; }
.dp-range.show { display: flex; }
.dp-range input { flex: 1; min-width: 0; }
.dp-range span { flex: none; color: #8496ab; font-size: 11px; }
.dp-blank button {
  width: 100%; margin-bottom: 5px; padding: 7px 0; border: 1px solid #dbe5f1;
  border-radius: 7px; background: #f6f9fd; color: #4a5c70; font-size: 12.5px; cursor: pointer;
  white-space: nowrap;
}
.dp-blank button.on { background: #e8f2ff; border-color: var(--blue); color: var(--blue); font-weight: 600; }
.dp-foot { display: flex; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px solid #eef3fa; }
.dp-foot button { flex: 1; padding: 6px 0; border-radius: 7px; font-size: 12.5px; cursor: pointer; border: 1px solid #dbe5f1; background: #fff; color: #4a5c70; }
.dp-foot .dp-ok { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 600; }
.dp-foot .dp-clr:hover { background: #fdecec; border-color: #e8a9a9; color: #c0392b; }

/* 日期筛选面板：标题 + 快捷条件 */
.dp-head {
  font-size: 12px; font-weight: 600; color: #2f6fed; margin-bottom: 7px;
  padding-bottom: 6px; border-bottom: 1px solid #eef3fa;
}
.dp-quick { display: flex; gap: 4px; margin-top: 7px; }
.dp-quick button {
  flex: 1; padding: 5px 0; border: 1px solid #dbe5f1; border-radius: 6px;
  background: #fff; color: #4a5c70; font-size: 11.5px; cursor: pointer; transition: .12s;
}
.dp-quick button:hover { background: #eaf2fd; border-color: #b9d3f7; color: var(--blue); }
.dp-mrow { display: flex; align-items: center; gap: 5px; }
.dp-mrow select {
  flex: 1; padding: 6px 4px; border: 1px solid #d5e0ee; border-radius: 7px;
  background: #fbfdff; font-size: 12.5px; outline: none; color: #2c3e50;
}
.dp-mrow select:focus { border-color: var(--blue); background: #fff; }
.dp-mrow span { flex: none; color: #8496ab; font-size: 11.5px; }
.dp-pane input.dp-d { cursor: pointer; }
.dp-pane input.dp-d::placeholder { color: #9db0c6; }
/* 表头日期筛选格：有值时高亮显示条件 */
.gfcell-date { cursor: pointer; }
.gfdate.has-val .gfdate-txt { color: var(--blue); font-weight: 600; background: #eaf2ff; border-color: #b9d3f7; }
.gfdate .gfdate-txt { cursor: pointer; }
.gfdate { position: relative; display: block; }

/* 日期筛选格内的 × */
.gfdate-clr {
  position: absolute; right: 1px; top: 50%; transform: translateY(-50%);
  width: 14px; height: 14px; line-height: 13px; text-align: center;
  border-radius: 50%; background: #d8e3f0; color: #4a5c70;
  font-size: 11px; font-style: normal; cursor: pointer; z-index: 5;
}
.gfdate-clr:hover { background: #e06666; color: #fff; }
.gfdate.has-val .gfdate-txt { padding-right: 15px; }

/* 弹窗内日期字段 + 清空按钮 */
.dlg-date { display: flex; gap: 6px; align-items: stretch; }
.dlg-date input { flex: 1; min-width: 0; }
.dlg-date-clr {
  flex: none; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px;
  background: #f4f7fb; color: var(--ink-2); font-size: 12.5px; cursor: pointer;
  transition: .15s; white-space: nowrap;
}
.dlg-date-clr:hover { background: #fdecec; border-color: #e8a9a9; color: #c0392b; }

/* ================= 图片 / 文档附件列 ================= */
.gtbl2 td.gtd-attach { background: #fcfdff; }
.gatt { display: flex; align-items: center; gap: 3px; padding: 2px 4px; height: 34px; overflow: hidden; }
.gatt-thumb {
  flex: none; width: 26px; height: 26px; border-radius: 4px; overflow: hidden;
  border: 1px solid #d8e3f0; background: #fff; display: block;
}
.gatt-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gatt-thumb:hover { border-color: #2f6fed; }
.gatt-more, .gatt-doc {
  flex: none; font-style: normal; font-size: 10.5px; color: #4a5c70;
  background: #eef4fb; border-radius: 4px; padding: 2px 4px; white-space: nowrap;
}
.gatt-add {
  flex: none; width: 20px; height: 20px; margin-left: auto; padding: 0;
  border: 1px dashed #b7cbe4; border-radius: 5px; background: #fff;
  color: #5a80b0; font-size: 13px; line-height: 17px; cursor: pointer;
}
.gatt-add:hover { border-color: #2f6fed; color: #2f6fed; background: #f2f7ff; }

/* 图片列拖拽上传（v107）：文件拖到格子上时整格高亮，松手即上传 */
td.gtd-attach { position: relative; transition: background .12s, box-shadow .12s; }
td.gtd-attach.drag-over {
  background: #e8f1ff;
  box-shadow: inset 0 0 0 2px #2f6fed;
}
td.gtd-attach.drag-over::after {
  content: "松手即可上传";
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #2f6fed; background: rgba(232, 241, 255, .88);
  pointer-events: none; border-radius: 4px; letter-spacing: .3px;
}
/* 空格子：显示一条虚线提示，让用户知道这里可以拖文件进来 */
.gatt-empty {
  border: 1px dashed #d3e0ef; border-radius: 5px; margin: 0 2px;
  justify-content: space-between; padding: 0 4px;
}
.gatt-empty::before {
  content: "拖文件到此"; font-size: 10px; color: #a9bacd; white-space: nowrap;
}
.gatt-empty .gatt-add { margin-left: 0; }

/* 附件弹窗 */
/* v110 附件弹窗拖拽上传区 */
.att-drop {
  border: 1.5px dashed #c3d2e6; border-radius: 10px; background: #f8fafd;
  padding: 26px 16px 18px; text-align: center; cursor: pointer;
  margin-bottom: 14px; transition: border-color .15s, background .15s;
}
.att-drop:hover { border-color: #2f6fed; background: #f2f7ff; }
.att-drop.drag-over { border-color: #2f6fed; background: #e8f1ff; }
.att-drop.uploading { opacity: .55; pointer-events: none; }
.att-drop-ico { font-size: 26px; color: #7d93b2; margin-bottom: 6px; }
.att-drop-txt { font-size: 13.5px; color: #4d6076; font-weight: 600; margin-bottom: 10px; }
.att-drop.drag-over .att-drop-txt { color: #2f6fed; }
.att-drop-btn {
  border: none; background: #eef2f8; color: #3a5470; font-size: 12.5px;
  padding: 7px 18px; border-radius: 8px; cursor: pointer; font-family: inherit;
  transition: .15s;
}
.att-drop-btn:hover { background: #2f6fed; color: #fff; }
.att-drop-tip { font-size: 11px; color: #9aabc0; margin-top: 10px; }

.att-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.att-item {
  position: relative; border: 1px solid #e3ecf8; border-radius: 9px; overflow: hidden;
  background: #fff; display: flex; flex-direction: column;
}
.att-item > a { display: block; height: 96px; background: #f6f9fd; }
.att-item > a img { width: 100%; height: 100%; object-fit: cover; display: block; }
.att-item b {
  font-size: 11.5px; color: #17365d; padding: 5px 7px 0; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.att-item > span { font-size: 10.5px; color: #92a1b4; padding: 1px 7px 6px; }
.att-item .att-del {
  position: absolute; top: 4px; right: 4px; width: 18px; height: 18px; line-height: 17px;
  text-align: center; border-radius: 50%; background: rgba(0,0,0,.45); color: #fff;
  font-size: 10px; font-style: normal; cursor: pointer; opacity: 0; transition: opacity .12s;
}
.att-item:hover .att-del { opacity: 1; }
.att-item .att-del:hover { background: #e06666; }
.att-item.doc .att-file {
  display: grid; place-items: center; height: 96px; text-decoration: none;
  background: linear-gradient(135deg, #eef4fb, #e2ecf9);
}
.att-item.doc .att-file span { font-size: 15px; font-weight: 700; color: #4a7fc1; letter-spacing: .5px; }

/* 列宽拖动时的浮动边界指示线 */
.col-guide {
  position: fixed; display: none; width: 2px; z-index: 9999;
  background: #2f6fed; box-shadow: 0 0 4px rgba(47,111,237,.5);
  pointer-events: none;
}
/* 列名行：层叠优先级高于分组行与筛选行，文字永远压在最上层可见 */
.gtbl2 thead tr.ghead2 th {
  position: sticky; z-index: 6; overflow: visible;
  color: #0f3468; font-weight: 700; font-size: 12px;
  background: #e2ecf9; line-height: 1.2; min-height: 22px;
  display: table-cell; vertical-align: middle;
}
.gtbl2 thead tr.ghead2 th::after {
  content: ''; position: absolute; top: 4px; bottom: 4px; right: -1px;
  width: 2px; background: transparent; transition: background .12s; border-radius: 2px;
}
.gtbl2 thead tr.ghead2 th:hover::after { background: #2f6fed; }

/* ===== 表头保底：任何情况下列名都必须看得见 ===== */
.gtbl2 thead tr.ghead2 th {
  min-width: 0; text-overflow: clip;
  white-space: normal; overflow-wrap: anywhere;
}
.gtbl2 thead tr.ghead2 th > .rz { pointer-events: auto; }

/* ================= 导入前查重预检报告 ================= */
.dup-report { margin-top: 14px; border: 1px solid #d9e4f2; border-radius: 12px; overflow: hidden; background: #fff; }
.dup-head { display: flex; gap: 12px; align-items: center; padding: 13px 15px; }
.dup-head.warn { background: linear-gradient(180deg, #fff6f5, #ffeeec); border-bottom: 1px solid #ffd9d4; }
.dup-head.ok   { background: linear-gradient(180deg, #f2fbf5, #e9f8ef); border-bottom: 1px solid #c9ecd6; }
.dup-ico { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 700; }
.dup-head.warn .dup-ico { background: #fde0db; color: #c0392b; }
.dup-head.ok   .dup-ico { background: #d5f0de; color: #1f8a4c; }
.dup-hbody { display: flex; flex-direction: column; gap: 3px; }
.dup-hbody b { font-size: 13.5px; color: #1c3f6e; }
.dup-head.warn .dup-hbody b { color: #a83226; }
.dup-hbody span { font-size: 12px; color: #5a6b80; }

.dup-body { padding: 4px 15px 12px; }
.dup-sec { margin-top: 11px; }
.dup-sec h4 { margin: 0 0 6px; font-size: 12.5px; color: #33475f; font-weight: 650; display: flex; align-items: center; gap: 7px; }
.dup-sec h4 i { font-style: normal; font-size: 11px; padding: 1px 7px; border-radius: 9px; background: #fde0db; color: #c0392b; font-weight: 700; }
.dup-tblwrap { max-height: 210px; overflow: auto; border: 1px solid #e6edf7; border-radius: 8px; }
.dup-tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
.dup-tbl th { position: sticky; top: 0; background: #f4f8fd; color: #4a5c70; font-weight: 650; text-align: left; padding: 6px 8px; border-bottom: 1px solid #e6edf7; white-space: nowrap; }
.dup-tbl td { padding: 6px 8px; border-bottom: 1px solid #f2f6fb; vertical-align: top; color: #2c3e50; }
.dup-tbl tr:last-child td { border-bottom: none; }
.dup-tbl .num { text-align: right; color: #92a1b4; width: 46px; }
.dup-tbl .mono { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .2px; }
.dup-tag { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 9px; white-space: nowrap; }
.dup-tag.db   { background: #fde0db; color: #b03a2e; }
.dup-tag.file { background: #fff2d6; color: #8a6100; }
.dup-tag.bad  { background: #eef0f3; color: #5a6b80; }
.dup-meta { font-size: 11px; color: #8b98a9; margin-top: 3px; line-height: 1.6; }
.dup-note { margin: 10px 0 0; font-size: 12px; color: #5a6b80; background: #f6f9fd; padding: 8px 10px; border-radius: 8px; line-height: 1.7; }
.dup-warn { margin: 0 15px 10px; font-size: 12px; color: #b46f00; background: #fffaf0; padding: 8px 10px; border-radius: 8px; }
.dup-foot { display: flex; justify-content: flex-end; gap: 9px; padding: 11px 15px; background: #f8fbff; border-top: 1px solid #e6edf7; }

/* ================= 导入后日期来源核对 ================= */
.audit-box { margin-top: 10px; background: #f6f9fd; border: 1px solid #e3ecf8; border-radius: 9px; padding: 9px 12px; }
.audit-t { font-size: 12px; color: #1c3f6e; font-weight: 650; margin-bottom: 5px; }
.audit-line { display: flex; gap: 14px; font-size: 12px; color: #4a5c70; line-height: 1.9; }
.audit-l { width: 78px; flex: 0 0 78px; color: #5a6b80; }
.audit-v b { color: #1c3f6e; }
.audit-v.muted { color: #92a1b4; }
.audit-v.muted b { color: #7b8a9e; }

/* ===== 跨业务员重叠提醒（仅主账号可见） ===== */
.overlap-bar { padding: 0 14px; }
.overlap-bar .ov-note {
  display: inline-block; margin: 6px 0; padding: 6px 12px; border-radius: 8px;
  background: #fff7e6; border: 1px solid #f2dfae; color: #7a5c14; font-size: 12.5px;
}
td .ov-tag {
  display: inline-block; margin-left: 4px; padding: 1px 6px; border-radius: 8px;
  background: #fdebd2; border: 1px solid #f0c78a; color: #a05a00;
  font-size: 10.5px; font-style: normal; white-space: nowrap; cursor: help; vertical-align: middle;
}
td .ov-tag:hover { background: #f9d9a8; }

/* ===== 删除确认弹窗 ===== */
.confirm-dlg .cfm-body { font-size: 13.5px; line-height: 1.75; color: var(--ink); }
.confirm-dlg .cfm-warn {
  background: #fdecec; border: 1px solid #f5c2c2; color: #a3282b;
  border-radius: 8px; padding: 8px 12px; font-size: 12.8px; margin-bottom: 12px;
}
.confirm-dlg .cfm-tb { width: 100%; border-collapse: collapse; font-size: 12.8px; }
.confirm-dlg .cfm-tb th {
  text-align: left; font-weight: 600; color: var(--ink-3); width: 68px;
  padding: 4px 8px 4px 0; vertical-align: top; white-space: nowrap;
}
.confirm-dlg .cfm-tb td { padding: 4px 0; color: var(--ink); word-break: break-all; }
.confirm-dlg .field label { font-size: 12.5px; color: var(--ink-3); display: block; margin-bottom: 4px; }
.confirm-dlg .field input { width: 100%; padding: 7px 10px; border: 1px solid var(--line); border-radius: 7px; font-size: 13.5px; }

/* 附件缩略图加载失败时的占位（避免浏览器破图标） */
.gatt-thumb img.is-broken {
  background: #f2f5fa url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2392a1b4' stroke-width='1.6'%3E%3Crect x='3' y='4' width='18' height='16' rx='2'/%3E%3Cpath d='M3 16l5-5 4 4 3-3 6 6'/%3E%3Ccircle cx='9' cy='9' r='1.4'/%3E%3C/svg%3E") center/20px no-repeat;
}

/* v111 周报 */
.wk-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 4px 0; }
.wk-stat {
  background: #f8fafd; border: 1px solid #eef2f8; border-radius: 10px;
  padding: 14px 12px; text-align: center;
}
.wk-stat b { display: block; font-size: 20px; color: #17365d; margin-bottom: 4px; }
.wk-stat span { font-size: 11.5px; color: #92a1b4; }
.wk-field { margin-bottom: 16px; }
.wk-field label { display: block; font-size: 13px; font-weight: 650; color: #17365d; margin-bottom: 6px; }
.wk-field textarea {
  width: 100%; border: 1px solid #d6dfea; border-radius: 8px; padding: 10px 12px;
  font-size: 13.5px; font-family: inherit; line-height: 1.7; color: #2a3b4d;
  resize: vertical; min-height: 88px; outline: none; transition: border-color .15s;
  box-sizing: border-box;
}
.wk-field textarea:focus { border-color: #2f6fed; }
.wk-field textarea:disabled { background: #f4f6f9; color: #7d8ea3; }
.wk-comment {
  background: #fffbe8; border: 1px solid #f3e6b3; border-radius: 8px;
  padding: 10px 14px; margin-top: 6px;
}
.wk-comment b { font-size: 12.5px; color: #8a6d1a; }
.wk-comment p { margin: 6px 0 4px; font-size: 13.5px; line-height: 1.7; color: #5a4a10; white-space: pre-wrap; }
.wk-comment span { font-size: 11px; color: #b09b45; }
@media (max-width: 760px) {
  .wk-stats { grid-template-columns: repeat(2, 1fr); }
}

/* =========================================================
   客户拿货（销售明细）分析
   ========================================================= */
.d-head{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin-bottom:14px}
.d-tabs{display:flex;gap:4px;background:#eef2f8;border-radius:10px;padding:4px;flex:none}
.d-tab{border:0;background:transparent;padding:7px 16px;border-radius:8px;font-size:13.5px;font-weight:600;color:#5b6b80;cursor:pointer;transition:.18s;white-space:nowrap;flex:none}
.d-tab:hover{color:#17365d}
.d-tab.on{background:#fff;color:#17365d;box-shadow:0 1px 3px rgba(23,54,93,.14)}
.d-filters{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.d-seg{display:flex;background:#eef2f8;border-radius:9px;padding:3px}
.d-seg button{border:0;background:transparent;padding:6px 14px;border-radius:7px;font-size:13px;color:#5b6b80;cursor:pointer;font-weight:600}
.d-seg button.on{background:#17365d;color:#fff}
.d-period{display:inline-flex;align-items:center;gap:2px;background:#fff;border:1px solid #dbe3ee;border-radius:9px;padding:1px}
.d-pernav{border:none;background:transparent;color:#7d8ea3;font-size:17px;line-height:1;cursor:pointer;
  width:24px;height:28px;border-radius:7px;font-family:inherit;padding:0}
.d-pernav:hover{background:#eef4ff;color:#2f6fed}
.d-sel-per{border:none!important;background:transparent!important;font-weight:600;color:#17365d;min-width:132px;text-align:center}
.d-sel{border:1px solid #dbe3ee;border-radius:9px;padding:7px 10px;font-size:13px;background:#fff;color:#334155;max-width:170px}

/* 四张环形卡（沿用现有深色看板风格） */
.d-cards{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;background:linear-gradient(135deg,#14294a,#1d3f6b);
  border-radius:14px;padding:16px 18px;margin-bottom:16px;color:#fff}
.d-cards .td-card{background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.1);border-radius:12px;padding:12px 14px;display:flex;align-items:center;gap:12px}
.d-cards .td-ring{position:relative;width:60px;height:60px;flex:none}
.d-cards .td-ring svg{display:block}
.d-cards .td-ring b{position:absolute;inset:0;display:grid;place-items:center;font-size:12px;font-weight:700;color:#dbeafe}
.d-cards .td-body{min-width:0;flex:1}
.d-cards .td-label{font-size:12px;color:#9db8d6;display:block;margin-bottom:3px}
.d-cards .td-label em{font-style:normal}
.d-cards .td-val{font-size:20px;font-weight:750;line-height:1.15;letter-spacing:-.3px;display:block}
.d-cards .td-sub{font-size:11.5px;color:#7d9dc0;display:block;margin-top:3px}
.d-cards .td-mom{font-size:11.5px;color:#9db8d6;display:block;margin-top:2px}

/* 涨绿跌红 */
.d-mom{font-size:12px;font-weight:700}
.d-mom.up{color:#0f9d76}
.d-mom.down{color:#d93025}
.d-mom.flat{color:#92a1b4;font-weight:500}

.d-grid2{display:grid;grid-template-columns:1.15fr 1fr;gap:14px}
.d-panel{background:#fff;border:1px solid #e7edf5;border-radius:13px;padding:14px 16px}
.d-panel.d-mt,.d-mt{margin-top:14px}
.d-ptitle{font-size:14px;font-weight:700;color:#17365d;margin-bottom:12px;display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.d-hint{font-style:normal;font-size:11.5px;font-weight:500;color:#92a1b4}
.d-chk{margin-left:auto;font-size:12px;font-weight:500;color:#5b6b80;display:inline-flex;align-items:center;gap:5px;cursor:pointer}
.d-search-wrap{position:relative;display:inline-flex;align-items:center;margin-left:auto;flex:none}
.d-search{border:1px solid #dbe3ee;border-radius:8px;padding:6px 10px;font-size:12.5px;width:224px;padding-right:64px}
.d-search-go{position:absolute;right:3px;top:50%;transform:translateY(-50%);width:27px;height:27px;
  border:none;border-radius:7px;background:#2f6fed;color:#fff;font-size:13px;cursor:pointer;
  display:flex;align-items:center;justify-content:center;padding:0;line-height:1}
.d-search-go:hover{background:#1f5ed8}
.d-search-go:active{background:#1a54c4}
.d-search-clr{position:absolute;right:35px;top:50%;transform:translateY(-50%);width:19px;height:19px;
  border:none;border-radius:50%;background:#e3eaf3;color:#5b6b80;font-size:12px;cursor:pointer;
  display:none;align-items:center;justify-content:center;padding:0;line-height:1}
.d-search-clr:hover{background:#d3dde9;color:#3c4a5e}
.d-tip{font-size:12.5px;color:#5b6b80;line-height:1.7;margin:0 0 12px}
.d-file{font-size:12.5px;display:block;margin-bottom:8px}
.d-ta{width:100%;height:130px;border:1px solid #dbe3ee;border-radius:9px;padding:10px;font-size:12px;font-family:ui-monospace,Menlo,monospace;resize:vertical}
.d-mt8{margin-top:8px}
.d-msg{display:none;margin-top:10px;font-size:12.5px;line-height:1.7;padding:9px 12px;border-radius:8px;background:#f3f6fa;color:#5b6b80}
.d-msg.on{display:block}
.d-msg.ok{background:#eaf7f1;color:#0b6b4f}
.d-msg.err{background:#fdeceb;color:#a52218}

/* 奖牌榜 */
.d-podium{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:14px}
.d-podium-1{grid-template-columns:minmax(0,1fr)}
.d-podium-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.d-pod{background:#f7f9fc;border:1px solid #e7edf5;border-radius:11px;padding:12px 10px 16px;text-align:center;position:relative;overflow:hidden}
.d-pod.p1{background:linear-gradient(160deg,#fff8e6,#fff);border-color:#f0d9a0}
.d-pod.p2{background:linear-gradient(160deg,#f6f8fa,#fff)}
.d-pod.p3{background:linear-gradient(160deg,#fdf6f0,#fff)}
.d-pod .d-av{width:52px;height:52px;border-radius:15px;color:#fff;font-size:20px;font-weight:700;
  display:grid;place-items:center;margin:0 auto 9px;position:relative;z-index:1;
  box-shadow:0 3px 10px rgba(23,54,93,.18)}
.d-pod b{display:block;font-size:14.5px;color:#17365d;margin-bottom:4px;font-weight:700}
.d-pod > span{display:block;font-size:13px;color:#5b6b80;font-weight:700;font-variant-numeric:tabular-nums}
/* 奖牌台面板：只放三块奖牌时内容垂直居中，避免底部大片留白 */
.d-panel-medal{display:flex;flex-direction:column}
.d-medal-body{flex:1;display:flex;flex-direction:column;justify-content:center}

/* v149：客户拿货「只看自己」——说明条 + 单人业绩面板 */
.d-solo-tip{display:flex;align-items:flex-start;gap:8px;background:#fff7e6;border:1px solid #ffe2b0;
  color:#8a5a00;border-radius:10px;padding:9px 13px;font-size:12.5px;line-height:1.7;margin-bottom:10px}
.d-solo-tip span{flex:1;min-width:0}
.d-solo-tip b{color:#8a5a00}
.d-solo-ic{width:18px;height:18px;flex:none;margin-top:2px;border-radius:50%;background:#f0a020;color:#fff;
  display:grid;place-items:center;font-size:12px;font-style:normal;font-weight:700}
.d-solo-perf{display:flex;align-items:center;gap:24px;flex-wrap:wrap;padding:8px 4px}
.d-sp-main{flex:1;min-width:200px}
.d-sp-label{display:block;font-size:12.5px;color:#5b6b80;font-weight:700}
.d-sp-val{display:block;font-size:30px;font-weight:800;color:#17365d;letter-spacing:-.5px;
  font-variant-numeric:tabular-nums;margin:4px 0 2px}
.d-sp-sub{font-size:12px;color:#7d9dc0;font-style:normal}
.d-sp-side{display:flex;gap:22px}
.d-sp-side > div{text-align:center}
.d-sp-side span{display:block;font-size:11.5px;color:#8ea6c4}
.d-sp-side b{display:block;font-size:14px;color:#17365d;margin-top:3px;font-variant-numeric:tabular-nums}
@media (max-width:768px){
  .d-sp-val{font-size:24px}
  .d-solo-perf{gap:14px}
  .d-sp-side{gap:16px}
}
.d-pod .d-pod-am{display:block;font-size:12.5px;color:#5b6b80;font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap}

/* ---- 奖牌：圆盘 + 左右双绶带 ---- */
.d-medal-wrap{position:relative;width:80px;height:68px;margin:0 auto 10px;filter:drop-shadow(0 3px 6px rgba(23,54,93,.14))}
.d-medal-wrap .d-ribbon{position:absolute;top:0;width:16px;height:40px;border-radius:3px;z-index:0}
.d-medal-wrap .d-ribbon.l{left:23px;transform:rotate(-22deg);
  background:linear-gradient(180deg,#5b95ff,#2f6fed);clip-path:polygon(0 0,100% 0,100% 100%,50% 88%,0 100%)}
.d-medal-wrap .d-ribbon.r{right:23px;transform:rotate(22deg);
  background:linear-gradient(180deg,#f07070,#d94c4c);clip-path:polygon(0 0,100% 0,100% 100%,50% 88%,0 100%)}
.d-medal-wrap .d-medal{position:absolute;left:50%;bottom:0;transform:translateX(-50%);
  width:48px;height:48px;border-radius:50%;color:#fff;font-size:22px;font-weight:800;
  display:grid;place-items:center;z-index:1;letter-spacing:-.5px;
  text-shadow:0 1px 2px rgba(0,0,0,.22);box-shadow:inset 0 -3px 6px rgba(0,0,0,.18),inset 0 2px 4px rgba(255,255,255,.4)}
.d-medal-wrap .d-medal::after{content:"";position:absolute;inset:5px;border-radius:50%;
  border:1.5px solid rgba(255,255,255,.35);pointer-events:none}
.d-medal.m1{background:radial-gradient(circle at 34% 28%,#ffe08a,#f5c518 42%,#c8960a 100%)}
.d-medal.m2{background:radial-gradient(circle at 34% 28%,#eef2f6,#b8c2cc 42%,#8d99a6 100%)}
.d-medal.m3{background:radial-gradient(circle at 34% 28%,#eaa676,#cd8b52 42%,#9e6127 100%)}
.d-pod.p1 .d-medal{animation:medalShine 3.2s ease-in-out infinite}
@keyframes medalShine{0%,100%{filter:brightness(1)}50%{filter:brightness(1.12)}}

.d-list{display:flex;flex-direction:column;gap:2px}
.d-row{display:flex;align-items:center;gap:10px;padding:7px 8px;border-radius:8px;font-size:13px}
.d-row:hover{background:#f7f9fc}
.d-row.me{background:#eef4ff}
.d-rk{width:22px;flex:none;text-align:center;font-weight:700;color:#92a1b4;font-size:12.5px}
.d-rk.top{color:#e08b00}
.d-nm{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#334155;display:flex;align-items:center;gap:6px}
.d-am{font-weight:700;color:#17365d;font-variant-numeric:tabular-nums}
.d-mo{width:74px;text-align:right;flex:none}
.d-dot{width:8px;height:8px;border-radius:50%;display:inline-block;flex:none}
.d-mine{margin-top:10px;padding:9px 12px;background:#eef4ff;border-radius:9px;font-size:12.5px;color:#17365d}
.d-count{margin-top:8px;text-align:center;font-size:11.5px;color:#92a1b4}
.d-lockbar{background:#fff8e6;border:1px solid #f0d9a0;color:#8a6100;font-size:12px;padding:8px 12px;border-radius:8px;margin-bottom:10px}

/* 柱状走势 */
.d-bars{display:flex;align-items:flex-end;gap:5px;height:150px;padding-top:6px}
.d-bar{flex:1;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;height:100%;gap:5px}
.d-bar i{display:block;width:100%;background:linear-gradient(180deg,#4d8cff,#2f6fed);border-radius:4px 4px 0 0;min-height:2px;transition:height .35s}
.d-bar span{font-size:10.5px;color:#92a1b4;white-space:nowrap}

/* 表格 */
.d-tbwrap{overflow:auto;-webkit-overflow-scrolling:touch;max-height:66vh;border-radius:8px;
  scrollbar-width:thin;scrollbar-color:#c1cfe0 #f4f7fb}
/* 大表（明细/全列）强制保留滚动条轨道：Mac 上也能直接拖 */
.d-tbwrap-lg{overflow:scroll;max-height:62vh;scrollbar-width:none}
.d-tbwrap-lg::-webkit-scrollbar{width:0;height:0;display:none}

/* ---- 自绘常显滚动条（原生条在 Mac 上会被系统隐藏，这里画一条永远可见的） ---- */
.d-scrollx{width:100%}
.d-scrollx-main{display:flex;gap:6px;align-items:stretch}
.d-scrollx-main .d-tbwrap-lg{flex:1;min-width:0}
.d-hbar{position:relative;height:14px;margin:9px 19px 3px 0;background:#e9eff8;
  border:1px solid #d5dfec;border-radius:8px;cursor:pointer;box-shadow:inset 0 1px 2px rgba(32,56,88,.06)}
.d-hthumb{position:absolute;top:1px;bottom:1px;left:0;min-width:48px;border-radius:7px;
  background:linear-gradient(180deg,#a8bcd4,#8ba2be);box-shadow:0 1px 3px rgba(32,56,88,.22);
  cursor:grab;transition:background .15s}
.d-hthumb:hover{background:linear-gradient(180deg,#96aec9,#7791b0)}
.d-hthumb.on{cursor:grabbing;background:linear-gradient(180deg,#7e9ab9,#61809f)}
.d-vbar{position:relative;width:14px;flex:0 0 14px;background:#e9eff8;border:1px solid #d5dfec;
  border-radius:8px;cursor:pointer;box-shadow:inset 0 1px 2px rgba(32,56,88,.06)}
.d-vthumb{position:absolute;left:1px;right:1px;top:0;min-height:40px;border-radius:7px;
  background:linear-gradient(90deg,#a8bcd4,#8ba2be);box-shadow:0 1px 3px rgba(32,56,88,.22);
  cursor:grab;transition:background .15s}
.d-vthumb:hover{background:linear-gradient(90deg,#96aec9,#7791b0)}
.d-vthumb.on{cursor:grabbing;background:linear-gradient(90deg,#7e9ab9,#61809f)}
@media (max-width:760px){
  .d-hbar{margin-right:20px;height:15px}
  .d-vbar{width:15px;flex:0 0 15px}
  .d-tbwrap-lg{max-height:56vh}
}
/* Mac 默认隐藏滚动条 → 强制常显，方便拖动 */
.d-tbwrap::-webkit-scrollbar{width:11px;height:11px}
.d-tbwrap::-webkit-scrollbar-track{background:#f4f7fb;border-radius:6px}
.d-tbwrap::-webkit-scrollbar-thumb{background:#c1cfe0;border-radius:6px;border:2px solid #f4f7fb}
.d-tbwrap::-webkit-scrollbar-thumb:hover{background:#a8bbd3}
.d-tbwrap::-webkit-scrollbar-corner{background:#f4f7fb}
/* 表头吸顶，纵向滚动时不跑掉 */
.d-tbwrap thead th{position:sticky;top:0;z-index:2;box-shadow:inset 0 -1px 0 #e7edf5}
/* 完整 17 列明细：横向滚动 */
.d-table-all{min-width:1560px}
.d-table-all td,.d-table-all th{white-space:nowrap}
.d-nowrap{white-space:nowrap}
.d-scroll-tip{display:flex;align-items:center;gap:6px;font-size:11.5px;color:#92a1b4;margin:0 0 8px}
.d-scroll-tip b{color:#5b6b80;font-weight:600}
@media (max-width:760px){.d-scroll-tip{display:none}}
.d-rank-sub{display:none}
.d-table{width:100%;border-collapse:collapse;font-size:13px}
.d-table th{text-align:left;font-weight:600;color:#7d8ea3;font-size:12px;padding:8px 10px;border-bottom:1px solid #e7edf5;white-space:nowrap;background:#fafcfe}
.d-table td{padding:9px 10px;border-bottom:1px solid #f0f4f9;color:#334155;vertical-align:middle}
.d-table tbody tr:hover td{background:#fafcfe}
.d-table tr.me td{background:#f4f8ff}
.d-table tr.d-ret td{background:#fffafa}
/* 本期没拿货的客户：整行淡一点，避免和本期有单的混在一起看花眼 */
.d-table tr.d-idle-row td{background:#fcfdfe}
.d-table tr.d-idle-row td b{color:#7c8ca1;font-weight:600}
.d-table .num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.d-table .gold{color:#8a6100;font-weight:600}
.d-table-sm{font-size:12.5px}
.d-table-sm td{padding:7px 9px}
.d-mono{font-family:ui-monospace,Menlo,monospace;font-size:11.5px;color:#5b6b80}
.d-code{display:block;font-style:normal;font-size:11px;color:#92a1b4;margin-top:2px}
.d-idle{display:block;font-style:normal;font-size:10.5px;color:#92a1b4;margin-top:1px}
.d-self{display:inline-block;font-style:normal;font-size:10px;background:#eef2f8;color:#7d8ea3;padding:1px 5px;border-radius:4px;margin-left:5px}
.d-pill{display:inline-block;font-size:11.5px;padding:2px 8px;border-radius:20px;background:color-mix(in srgb,var(--tc) 12%,#fff);color:var(--tc);font-weight:600;white-space:nowrap}
.d-prog{height:6px;background:#eef2f8;border-radius:4px;overflow:hidden}
.d-prog i{display:block;height:100%;background:#2f6fed;border-radius:4px}
.d-pager{display:flex;align-items:center;justify-content:center;gap:14px;margin-top:14px;font-size:12.5px;color:#5b6b80}
.d-pager button{border:1px solid #dbe3ee;background:#fff;border-radius:8px;padding:6px 14px;font-size:12.5px;cursor:pointer;color:#334155}
.d-pager button:disabled{opacity:.45;cursor:not-allowed}

/* 客户分层 */
.d-tiers{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:14px}
.d-tier{border:1px solid #e7edf5;background:#fff;border-radius:10px;padding:8px 14px;font-size:13px;color:#5b6b80;cursor:pointer;transition:.18s}
.d-tier b{font-size:15px;margin-left:5px;color:#17365d}
.d-tier.on{border-color:var(--tc,#17365d);background:color-mix(in srgb,var(--tc,#17365d) 7%,#fff);color:var(--tc,#17365d)}
.d-alert{background:#fff8e6;border:1px solid #f0d9a0;border-radius:12px;padding:13px 16px;margin-bottom:14px;font-size:12.5px;color:#8a6100;line-height:1.7}
.d-alert b{display:block;margin-bottom:4px;font-size:13px}
.d-chips{display:flex;gap:7px;flex-wrap:wrap;margin-top:8px}
.d-chip{background:#fff;border:1px solid #f0d9a0;border-radius:20px;padding:3px 11px;font-size:11.5px;color:#8a6100}

@media (max-width:1100px){
  .d-cards{grid-template-columns:1fr 1fr}
  .d-grid2{grid-template-columns:1fr}
}
@media (max-width:640px){
  /* 卡片改成两列紧凑，避免一屏只看得到卡片 */
  .d-cards{grid-template-columns:1fr 1fr;padding:10px;gap:8px}
  .d-cards .td-card{padding:9px 10px;gap:8px;border-radius:10px}
  .d-cards .td-ring{width:44px;height:44px}
  .d-cards .td-ring svg{width:44px;height:44px}
  .d-cards .td-ring b{font-size:10.5px}
  .d-cards .td-val{font-size:15px}
  .d-cards .td-label,.d-cards .td-sub,.d-cards .td-mom{font-size:10.5px}
  .d-head{gap:8px}
  /* tab 横向滑动，不换行也不截断 */
  .d-tabs{width:100%;overflow-x:auto;flex-wrap:nowrap;-webkit-overflow-scrolling:touch;scrollbar-width:none}
  .d-tabs::-webkit-scrollbar{display:none}
  .d-tab{padding:7px 12px;font-size:12.5px;white-space:nowrap;flex:none}
  .d-filters{margin-left:0;width:100%;gap:6px}
  .d-sel{flex:1;max-width:none;min-width:0;font-size:12.5px;padding:7px 8px}
  .d-seg button{padding:6px 10px;font-size:12px}
  .d-podium{grid-template-columns:1fr 1fr 1fr;gap:6px}
  .d-pod{padding:10px 6px 12px}
  .d-pod .d-av{width:42px;height:42px;font-size:16px;border-radius:12px}
  .d-medal-wrap{width:62px;height:52px}
  .d-medal-wrap .d-ribbon{width:13px;height:28px}
  .d-medal-wrap .d-ribbon.l{left:15px}
  .d-medal-wrap .d-ribbon.r{right:15px}
  .d-medal-wrap .d-medal{width:38px;height:38px;font-size:17px}
  .d-pod b{font-size:12px}
  .d-pod span{font-size:11.5px}
  .d-pod .d-pod-am{font-size:10.5px;letter-spacing:-.2px}
  /* 手机端榜单：姓名不折行；单据/客户并成金额下的小字，腾出宽度给环比 */
  .d-table-rank th,.d-table-rank td{white-space:nowrap}
  .d-table-rank td{padding:8px 6px;font-size:12.5px}
  .d-table-rank td:nth-child(2){min-width:62px}
  .d-table-rank .d-col-hide{display:none}
  .d-rank-sub{display:block;font-style:normal;font-size:10.5px;font-weight:600;color:#8496ab;margin-top:2px}
  .d-search-wrap{width:100%;margin-left:0}
  .d-search{width:100%}
  .d-panel{padding:12px 12px}
  .d-ptitle{font-size:13px;margin-bottom:10px}
  .d-bars{height:120px}
}

/* ===== 拿货提醒横幅 ===== */
.d-remind{margin:10px 0 0;border-radius:12px;border:1px solid #f0d9a0;background:#fffaf0;overflow:hidden}
.d-remind-bar{display:flex;align-items:center;gap:12px;padding:12px 16px;cursor:pointer;user-select:none}
.d-remind-bar:hover{background:#fff5e0}
.d-remind-ic{flex:none;width:26px;height:26px;border-radius:50%;background:#e08b00;color:#fff;
  font-weight:700;font-size:15px;display:flex;align-items:center;justify-content:center;font-style:normal}
.d-remind-txt{flex:1;display:flex;flex-direction:column;gap:2px;min-width:0}
.d-remind-txt b{font-size:14px;color:#7a5300}
.d-remind-txt b em{font-style:normal;color:#d93025;font-size:16px;padding:0 2px}
.d-remind-txt span{font-size:12px;color:#9a7d3a}
.d-remind-toggle{flex:none;font-size:12px;color:#7a5300;white-space:nowrap}
.d-remind-list{border-top:1px solid #f0d9a0;background:#fff;padding:10px 12px;overflow-x:auto}
.d-remind-list .d-done-btn{padding:3px 10px;font-size:12px;white-space:nowrap}
@media (max-width:768px){
  .d-remind-txt b{font-size:13px}
  .d-remind-txt span{display:none}
  /* 手机上让表格按内容铺开、横向滑动，避免「具体情况」被压成逐字换行 */
  .d-remind-list{padding:10px 8px}
  .d-remind-list .d-table-sm{min-width:560px}
  .d-remind-list .d-table-sm td{white-space:nowrap}
  /* 具体情况列允许按短语折行（用 class 定位，管理/业务员两种列数都适用） */
  .d-remind-list .d-table-sm td.d-rdetail{white-space:normal;min-width:150px;line-height:1.55}
}
.d-rgroup{margin-bottom:14px}
.d-rgroup:last-of-type{margin-bottom:6px}
.d-rgroup-h{display:flex;align-items:center;gap:8px;padding:2px 0 7px;font-size:12.5px;color:#5b6b80}
.d-rgroup-h b{color:#17365d;font-size:13px}
.d-rgroup-h em{font-style:normal;color:#92a1b4;font-size:11.5px}
/* v164：分组「展开全部 / 收起」按钮 */
.d-rgroup-more{padding:7px 0 1px;text-align:center}
.d-rgroup-more .d-more-btn{
  font-size:12px;color:#2f6fed;background:#f4f8ff;border:1px solid #dbe7fb;
  border-radius:999px;padding:4px 14px;cursor:pointer;transition:.15s;
}
.d-rgroup-more .d-more-btn:hover{background:#2f6fed;color:#fff;border-color:#2f6fed}
.d-tpl-link{color:#2f6fed;font-weight:600;margin-left:6px;white-space:nowrap}
.d-tpl-link:hover{text-decoration:underline}

/* ===== 拖拽上传区 ===== */
.d-drop{display:block;border:2px dashed #c8d6e8;border-radius:12px;background:#fafcfe;padding:22px 16px;
  cursor:pointer;transition:.18s;text-align:center;margin-top:10px}
/* 文件框透明铺满整个拖拽区：点击/拖拽全走浏览器原生，不依赖脚本触发 */
.d-drop{position:relative}
.d-fileinput{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer;z-index:3;font-size:0}
.d-drop-file{position:relative;z-index:4;pointer-events:none}
.d-drop-file .d-drop-x{pointer-events:auto}
.d-drop:hover{border-color:#8fb4e8;background:#f4f9ff}
.d-drop.over{border-color:#2f6fed;background:#eaf2ff;box-shadow:0 0 0 4px rgba(47,111,237,.09)}
.d-drop.has{border-style:solid;border-color:#c9e7c1;background:#f7fdf5;padding:14px 16px;text-align:left}
.d-drop-ic{font-size:26px;line-height:1;color:#9ab4d4;margin-bottom:8px}
.d-drop-t{font-size:13.5px;font-weight:600;color:#3d5a80}
.d-drop-s{font-size:12px;color:#92a1b4;margin-top:5px}
.d-drop-s b{color:#2f6fed}
.d-drop-file{display:flex;align-items:center;gap:10px;font-size:13px}
.d-drop-file[hidden]{display:none}
.d-drop-fic{color:#3d9a2b;font-size:18px;flex:none}
.d-drop-fname{font-weight:600;color:#17365d;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0}
.d-drop-fsize{color:#92a1b4;font-size:12px;flex:none}
.d-drop-x{flex:none;border:0;background:#eef2f8;color:#7d8ea3;width:24px;height:24px;
  border-radius:50%;font-size:15px;line-height:1;cursor:pointer;padding:0}
.d-drop-x:hover{background:#ffe5e5;color:#d93025}

/* ===== 自定义日期区间 ===== */
.d-range{display:flex;align-items:center;gap:5px;flex-wrap:nowrap}
.d-date{border:1px solid #dbe3ee;border-radius:8px;padding:6px 9px;font-size:12.5px;
  color:#334155;background:#fff;font-family:inherit}
.d-date:focus{outline:none;border-color:#2f6fed}
.d-range-sep{font-size:12px;color:#92a1b4}
.d-range-ok{padding:6px 11px !important;font-size:12px !important;white-space:nowrap}
@media (max-width:640px){
  .d-range{width:100%}
  .d-date{flex:1;min-width:0}
  .d-drop{padding:18px 12px}
  .d-drop-ic{font-size:22px}
}

/* 自选区快捷按钮 */
.d-quick{display:flex;gap:4px;margin-left:2px}
.d-quick button{border:1px solid #dbe3ee;background:#fff;border-radius:7px;padding:5px 7px;
  font-size:11px;color:#5b6b80;cursor:pointer;white-space:nowrap;font-family:inherit}
.d-quick button:hover{border-color:#2f6fed;color:#2f6fed;background:#f4f9ff}
@media (max-width:900px){
  .d-quick{width:100%;margin-left:0;margin-top:6px}
  .d-quick button{flex:1}
}

/* 日期框：文本 + 日历图标（原生 date 输入仅作选择器，视觉隐藏） */
.d-date-wrap{position:relative;display:inline-flex;align-items:center}
.d-date{width:98px;padding:6px 24px 6px 8px !important;font-size:12px}
.d-date-pick{position:absolute;right:0;bottom:0;width:1px;height:1px;opacity:0;
  border:0;padding:0;pointer-events:none}
.d-cal{position:absolute;right:6px;top:50%;transform:translateY(-50%);
  font-size:13px;color:#8aa0b8;cursor:pointer;line-height:1;user-select:none}
.d-cal:hover{color:#2f6fed}
@media (max-width:640px){
  .d-range{flex-wrap:wrap;width:100%}
  .d-date-wrap{flex:1 1 40%;min-width:0}
  .d-date{width:100%}
  .d-cal{right:4px}
  .d-range-ok{flex:none}
  .d-quick{width:100%;margin:2px 0 0;order:9}
  .d-quick button{flex:1}
}

/* 客户拿货页头：导入/导出按钮（与「我的表格」卡片按钮同风格） */
.d-io{margin-left:auto;display:flex;gap:8px;align-items:center;flex:none}
@media (max-width:640px){
  .d-io{margin-left:0;width:100%;margin-top:4px}
  .d-io .btn{flex:1}
}

/* ===== 微信客户总数（v129 / v130 四卡版）===== */
.wx-row{display:grid;grid-template-columns:1fr 14px 1fr 14px 1fr 14px 1.15fr;
  gap:10px;align-items:stretch;padding:2px 0 4px}
.wx-cell{position:relative;border:1px solid var(--line);border-radius:13px;
  padding:14px 16px 13px;background:#fff;overflow:hidden;
  box-shadow:0 1px 2px rgba(23,54,93,.04)}
.wx-cell::after{content:"";position:absolute;left:0;right:0;top:0;height:3px;background:#c9d6e6}
.wx-cell.base::after{background:linear-gradient(90deg,#4d8cff,#8fb6ff)}
.wx-cell.table::after{background:linear-gradient(90deg,#0f9d76,#5bc9a4)}
.wx-cell.del::after{background:linear-gradient(90deg,#e06666,#f09a9a)}
.wx-cell.total{background:linear-gradient(150deg,#fffdf6,#fff6e2);border-color:#f0d9a0;
  box-shadow:0 2px 10px rgba(224,139,0,.10)}
.wx-cell.total::after{background:linear-gradient(90deg,#e08b00,#f4c04a)}
.wx-lab{font-size:12.5px;color:#7d8ea3;margin-bottom:8px;display:flex;align-items:center;gap:5px}
.wx-tag{font-size:10px;font-weight:600;padding:1px 5px;border-radius:5px;line-height:1.5}
.wx-cell.base .wx-tag{background:#eaf1ff;color:#2f6fed}
.wx-cell.table .wx-tag{background:#e6f7f1;color:#0f9d76}
.wx-cell.del .wx-tag{background:#fdecec;color:#d94c4c}
.wx-cell.total .wx-tag{background:#fdf0d8;color:#a5701a}
.wx-val{font-size:30px;font-weight:750;color:#17365d;line-height:1.05;
  letter-spacing:-.8px;font-variant-numeric:tabular-nums}
.wx-val small{font-size:12px;font-weight:500;color:#92a1b4;margin-left:3px;letter-spacing:0}
.wx-cell.total .wx-val{color:#a5701a;font-size:32px}
.wx-foot{font-size:11.5px;color:#92a1b4;margin-top:7px;line-height:1.45}
.wx-op{display:flex;align-items:center;justify-content:center;font-size:18px;
  color:#c2cfdf;font-weight:600}
.wx-edit{margin-top:16px;border-top:1px dashed var(--line);padding-top:14px}
.wx-edit-h{font-size:12.5px;color:#7d8ea3;margin-bottom:10px}
.wx-tbwrap{overflow-x:auto}
.wx-table{width:100%;border-collapse:collapse;font-size:13px;min-width:560px}
.wx-table th{text-align:left;font-weight:600;color:#7d8ea3;font-size:12px;
  padding:8px 10px;border-bottom:1px solid #e7edf5;background:#fafcfe;white-space:nowrap}
.wx-table td{padding:7px 10px;border-bottom:1px solid #f0f4f9;color:#334155}
.wx-table .num{text-align:right;font-variant-numeric:tabular-nums}
.wx-in{width:78px;border:1px solid #dbe3ee;border-radius:7px;padding:5px 8px;
  font-size:13px;text-align:right;font-family:inherit;color:#17365d}
.wx-in:focus{outline:none;border-color:#2f6fed;box-shadow:0 0 0 3px rgba(47,111,237,.1)}
.wx-ro{color:#92a1b4}
.wx-tot{font-weight:700;color:#17365d}
.wx-edit-foot{display:flex;align-items:center;gap:10px;margin-top:12px;flex-wrap:wrap}
.wx-hint{font-size:12px;color:#92a1b4}
@media (max-width:1080px){
  .wx-row{grid-template-columns:1fr 14px 1fr;grid-template-rows:auto auto;row-gap:10px}
  .wx-row .wx-op-eq{display:none}
  .wx-row .wx-cell.base{grid-area:1 / 1}
  .wx-row .wx-op-plus{grid-area:1 / 2}
  .wx-row .wx-cell.table{grid-area:1 / 3}
  .wx-row .wx-cell.del{grid-area:2 / 1}
  .wx-row .wx-op-minus{grid-area:2 / 2}
  .wx-row .wx-cell.total{grid-area:2 / 3}
}
@media (max-width:760px){
  .wx-row{grid-template-columns:1fr 1fr !important;grid-template-rows:auto auto;gap:10px}
  .wx-row .wx-op{display:none}
  .wx-row .wx-cell.base{grid-area:1 / 1}
  .wx-row .wx-cell.table{grid-area:1 / 2}
  .wx-row .wx-cell.del{grid-area:2 / 1}
  .wx-row .wx-cell.total{grid-area:2 / 2}
  .wx-row .wx-lab{padding-right:0}
  .wx-foot{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  .wx-cell{padding:11px 12px 11px;border-radius:11px}
  .wx-lab{font-size:11.5px;margin-bottom:6px}
  .wx-val{font-size:22px;letter-spacing:-.4px;line-height:1.15}
  .wx-cell.total{padding:13px 14px}
  .wx-cell.total .wx-val{font-size:24px}
  .wx-foot{font-size:11px;margin-top:5px;min-height:30px}
  .wx-op{font-size:15px}
  .wx-edit{margin-top:10px;padding-top:10px}
  .wx-edit-h{font-size:11.5px}
  .wx-table{min-width:460px;font-size:12.5px}
  .wx-table th,.wx-table td{padding:6px 8px}
  .wx-in{width:66px;padding:4px 6px;font-size:12.5px}
}

.d-perhint{font-style:normal;font-weight:400;font-size:11.5px;color:#92a1b4;margin-left:6px}

/* v144：完整榜单里「不参与排名」的人：业绩照显示，但名次为 —、整行弱化 */
.d-nob td{background:#fafbfd}
.d-nob .d-dot{opacity:.55}
.d-rk-nob{display:inline-flex;align-items:center;justify-content:center;min-width:26px;height:22px;
  border-radius:7px;color:#a4b0c2;font-weight:700;font-size:12px}
.d-pill-nob{display:inline-block;margin-left:6px;padding:1px 7px;border-radius:8px;font-size:10.5px;
  background:#eef1f6;color:#8a97ab;border:1px solid #e0e6ef;vertical-align:1px;font-weight:600}

/* v145：拿货明细表头下的逐列筛选行（每格一个输入框，打字即筛，多列 AND） */
.d-frow th{padding:3px 5px;background:#f6f9fd;border-bottom:1px solid #e2eaf5;position:relative}
.d-frow input{width:100%;min-width:76px;border:1px solid #dbe4f0;border-radius:6px;padding:3px 6px;
  font-size:11.5px;font-weight:400;color:#2b3a50;background:#fff;box-sizing:border-box}
.d-frow input::placeholder{color:#b6c2d3;font-weight:400}
.d-frow input:focus{border-color:#2f6fed;outline:none;box-shadow:0 0 0 2px rgba(47,111,237,.13)}
.d-frow th:empty{background:#f6f9fd}
@media (max-width:760px){
  .d-frow input{min-width:70px;font-size:12px}
}

/* v154：账目条挪到卡片标题下方，独立一行（桌面端） */
.card > .wx-ledger { margin: 12px 18px 0; padding: 7px 14px; font-size: 13px; }
.card > .wx-ledger .wx-total { font-size: 15px; }
.card > .wx-ledger .wx-inp { width: 64px; font-size: 13px; }

/* ---------- v159 回访台账 ---------- */
.d-rfu{font-size:11.5px;color:var(--ink-3);margin-top:1px;white-space:nowrap}
.d-fu-cu{margin-left:10px;color:var(--ink-2);font-size:13px;font-weight:400}
.d-fu-hist{background:#f7f9fd;border:1px solid var(--line);border-radius:10px;padding:8px 12px;margin-bottom:14px;max-height:210px;overflow-y:auto}
.d-fu-hist-t{font-size:12px;color:var(--ink-3);margin-bottom:4px}
.d-fu-item{padding:7px 0;border-top:1px dashed var(--line)}
.d-fu-item:first-of-type{border-top:none;padding-top:2px}
.d-fu-meta{display:flex;align-items:center;gap:8px;font-size:12.5px;flex-wrap:wrap}
.d-fu-meta b{color:var(--navy)}
.d-fu-meta i{font-style:normal;background:var(--blue-soft);color:var(--blue);border-radius:4px;padding:0 6px;font-size:12px}
.d-fu-meta em{font-style:normal;color:var(--amber);font-size:12px}
.d-fu-txt{font-size:13px;color:var(--ink);margin-top:2px;white-space:pre-wrap;word-break:break-word}
.d-fu-empty{padding:12px;text-align:center;color:var(--ink-3);font-size:13px;background:#f7f9fd;border-radius:10px;margin-bottom:14px}
.d-fu-row{display:block;margin-bottom:12px}
.d-fu-row>span{display:block;font-size:12.5px;color:var(--ink-2);margin-bottom:4px}
.d-fu-row select,.d-fu-row input,.d-fu-row textarea{width:100%;border:1px solid var(--line);border-radius:8px;padding:7px 10px;background:#fff;color:var(--ink);outline:none}
.d-fu-row select:focus,.d-fu-row input:focus,.d-fu-row textarea:focus{border-color:var(--blue);box-shadow:0 0 0 3px rgba(47,111,237,.12)}
.d-fu-row textarea{resize:vertical;min-height:62px}
.d-fu-row em{font-style:normal;font-size:12px}
@media(max-width:760px){.d-fu-hist{max-height:160px}}

/* ---------- v160 回访跟进台账 ---------- */
.d-fu-led { margin-top: 16px; }
.d-fu-bar { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 4px; }
.d-fu-bar .d-sel { height: 30px; font-size: 12.5px; padding: 0 8px; }
.d-fu-sum {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: 13px; color: var(--ink-2);
  background: #f7f9fd; border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 12px; margin: 6px 0 10px;
}
.d-fu-sum b { color: var(--navy); }
.d-fu-tag { display: inline-block; padding: 1px 7px; border-radius: 5px; font-size: 12px; }
.d-fu-tag.ok { background: #e8f6f1; color: var(--green); }
.d-fu-tag.bad { background: #fdecea; color: var(--red); }
.d-fu-tag.wait { background: var(--blue-soft); color: var(--blue); }
.d-fu-rate { font-size: 14px; }
.d-fu-rate.ok { color: var(--green); }
.d-fu-rate.bad { color: var(--red); }
.d-fu-rate.wait { color: var(--amber); }
.d-fu-worst { margin-left: auto; font-style: normal; font-size: 12px; color: var(--red); }
.d-fu-sum .d-fu-scope { font-style: normal; font-size: 12px; color: var(--ink-3); }
.d-fu-wrap { overflow-x: auto; }
.d-fu-tb {
  width: 100%; border-collapse: collapse; font-size: 13px; min-width: 800px;
  table-layout: fixed;
}
.d-fu-tb th {
  text-align: left; font-weight: 600; color: #7d8ea3; font-size: 12px;
  padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap;
  background: #fafcfe; overflow: hidden; text-overflow: ellipsis;
}
.d-fu-tb td {
  padding: 9px 10px; border-bottom: 1px solid #f0f4f9; color: #334155;
  vertical-align: middle; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.d-fu-tb tbody tr:hover td { background: #fafcfe; }
.d-fu-tb td.d-fu-c { color: var(--ink); cursor: default; }
.d-fu-way {
  font-style: normal; background: var(--blue-soft); color: var(--blue);
  border-radius: 4px; padding: 1px 6px; font-size: 12px; white-space: nowrap;
}
.d-fu-st { font-size: 12px; white-space: nowrap; font-weight: 600; }
.d-fu-st.ok { color: var(--green); }
.d-fu-st.bad { color: var(--red); }
.d-fu-st.wait { color: var(--blue); }
.d-fu-st.nil { color: var(--ink-3); font-weight: 400; }
.d-fu-nil {
  padding: 22px 12px; text-align: center; color: var(--ink-3); font-size: 13px;
  background: #f9fbfe; border: 1px dashed var(--line); border-radius: 10px;
}
.d-fu-more { padding: 8px 10px; font-size: 12px; color: var(--ink-3); }
@media (max-width: 760px) {
  .d-fu-bar .d-sel { flex: 1 1 44%; }
  .d-fu-sum { font-size: 12.5px; }
  .d-fu-worst { margin-left: 0; }
  .d-fu-tb { min-width: 640px; }
}

/* ---------- v161 台账独立成页 ---------- */
.d-head + .d-fu-led { margin-top: 6px; }
.d-fu-led .d-ptitle { font-size: 15px; }

/* ---------- v163 排行榜：全部 N 人 + 完整排名弹窗 ---------- */
.lb-pod .pod-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.lb-pod .pod-all {
  font-size: 11px; font-weight: 600; color: #2f6fed; background: #eaf2ff;
  border-radius: 999px; padding: 1px 8px; cursor: pointer; white-space: nowrap;
  border: 1px solid #d6e5fd; transition: background .15s, color .15s;
}
.lb-pod .pod-all:hover { background: #2f6fed; color: #fff; border-color: #2f6fed; }
.lb-pod .pod-me {
  margin-top: 5px; padding-top: 5px; border-top: 1px dashed #e8effa;
  font-size: 11.5px; color: #2f6fed; font-weight: 600;
}
.lba-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.lba-tab {
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  border-radius: 999px; padding: 4px 12px; font-size: 12.5px; cursor: pointer;
}
.lba-tab:hover { border-color: #b9d2fb; color: #2f6fed; }
.lba-tab.on { background: #2f6fed; border-color: #2f6fed; color: #fff; }
.lba-sum { font-size: 12.5px; color: var(--ink-3); margin-bottom: 8px; }
.lba-sum b { color: var(--navy); }
.lba-list { max-height: 52vh; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; }
.lba-row { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-bottom: 1px dashed #eef3fa; }
.lba-row:last-child { border-bottom: none; }
.lba-row.me { background: #f2f8ff; }
.lba-row .av { width: 22px; height: 22px; border-radius: 50%; color: #fff; font-size: 11px;
  display: flex; align-items: center; justify-content: center; flex: none; }
.lba-row b { font-size: 13px; color: var(--ink); display: flex; align-items: center; gap: 5px;
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lba-row b i { font-style: normal; font-size: 10.5px; background: #2f6fed; color: #fff;
  border-radius: 4px; padding: 0 4px; flex: none; }
.lba-row em { font-style: normal; margin-left: auto; font-weight: 700; color: #1f5fd6; font-size: 13px; flex: none; }
.lba-rk { width: 24px; text-align: center; font-weight: 800; color: var(--ink-3); font-size: 12.5px; flex: none; }
.lba-rk.g { color: #c08a00; }
.lba-rk.s { color: #7d8ea3; }
.lba-rk.b { color: #a9662a; }
.lb-pod .pod-nil { font-size: 12px; color: var(--ink-3); padding: 5px 0 3px; }

#icp{padding:18px 0 74px;text-align:center;font-size:12px}
#icp a{color:#8a94a6;text-decoration:none}
#icp a:hover{color:#2f6fed;text-decoration:underline}
