/* 销售管理 → 销售总览（sales-overview.js，2026-12-02）。一排选时间段，两条数字，两张图，一张每位销售的表，底下两张名单。
   颜色只用 logo 的蓝和金：蓝是打卡和走访，金是录入；字一律深色，主次靠字号和粗细。 */
.so-page { --so-gap:16px; display:grid; grid-template-columns:minmax(0,1fr); gap:var(--so-gap); }
.so-page .workspace { margin:0; }
.so-page .crm-head { min-height:0; margin-bottom:2px; align-items:center; }
.so-of { margin-left:14px; padding-left:14px; border-left:2px solid #dfe3e8; color:var(--blue); font-size:22px; font-weight:600; letter-spacing:0; vertical-align:2px; }
.so-page svg { fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.so-who { display:inline-flex; align-items:center; gap:10px; color:var(--text); font-size:14px; white-space:nowrap; }
.so-who .xs-trigger, .so-who select { min-width:168px; height:38px; }

/* 时间段 */
.so-bar { display:flex; align-items:center; gap:16px; flex-wrap:wrap; }
.so-seg { position:relative; display:inline-flex; padding:4px; border-radius:12px; background:#eceff3; }
.so-seg a { position:relative; z-index:1; min-width:76px; padding:8px 18px; border-radius:9px; color:var(--text-regular); font-size:14.5px; line-height:22px; text-align:center; text-decoration:none; transition:color .18s ease; }
.so-seg a:hover { color:var(--ink); }
.so-seg a.on { color:var(--blue); font-weight:600; }
.so-thumb { position:absolute; top:4px; bottom:4px; left:0; width:0; border-radius:9px; background:#fff; box-shadow:0 1px 2px rgb(16 24 40 / 8%), 0 4px 12px -6px rgb(16 24 40 / 22%); }
.so-thumb.moving { transition:transform .32s cubic-bezier(.3,.8,.25,1), width .32s cubic-bezier(.3,.8,.25,1); }
.so-custom { display:inline-flex; align-items:center; gap:10px; color:var(--text); font-size:14px; }
.so-custom[hidden] { display:none; }
.so-custom input { height:38px; padding:0 12px; border:1px solid #d8dde5; border-radius:10px; color:var(--text); background:#fff; font:inherit; font-size:14px; }
.so-custom input:focus { outline:0; border-color:var(--blue); box-shadow:0 0 0 3px rgb(18 116 165 / 12%); }
.so-custom .cd-btn { height:38px; }
.so-custom-error { color:#b42318; font-size:13.5px; }
.so-custom-error:empty { display:none; }
.so-span { margin-left:auto; color:var(--text); font-size:14.5px; font-variant-numeric:tabular-nums; white-space:nowrap; }
.so-hint { margin-bottom:0; padding:12px 16px; border:1px solid var(--accent-line); border-radius:12px; color:#8a4b06; background:var(--accent-soft); font-size:14px; }
.so-hint a { margin-left:10px; color:var(--blue); font-weight:600; }

/* 两条数字：四格一排，格子之间一条细线 */
.so-strip { position:relative; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); padding:6px 0; }
.so-stat { display:flex; align-items:flex-start; gap:16px; min-width:0; padding:22px 28px; }
.so-stat + .so-stat { box-shadow:inset 1px 0 0 #eef0f3; }
.so-ico { flex:none; width:44px; height:44px; display:grid; place-items:center; border-radius:13px; color:var(--blue); background:linear-gradient(150deg,#eaf7fd,#dcf0fa); }
.so-ico svg { width:23px; height:23px; }
.so-stat.gold .so-ico { color:var(--accent-deep); background:linear-gradient(150deg,#fff6e8,#fdebcf); }
.so-stat > div { min-width:0; display:grid; gap:4px; }
.so-label { color:var(--text); font-size:14.5px; line-height:22px; }
.so-stat p { margin:0; display:flex; align-items:baseline; gap:6px; }
.so-stat p b { color:var(--ink); font-size:34px; font-weight:680; line-height:42px; letter-spacing:-.02em; font-variant-numeric:tabular-nums; }
.so-stat p em { color:var(--text); font-size:14.5px; font-style:normal; }
.so-vs { display:inline-flex; align-items:center; gap:5px; color:var(--text-regular); font-size:13.5px; line-height:20px; white-space:nowrap; }
.so-vs svg { width:14px; height:14px; stroke-width:1.9; }
.so-entries { padding-top:50px; }
.so-strip-title { position:absolute; top:20px; left:28px; display:flex; align-items:center; gap:6px; margin:0; color:var(--ink); font-size:17px; font-weight:600; line-height:26px; }
.so-entries .so-stat { padding-top:18px; }
.so-entries .so-stat p b { font-size:28px; line-height:36px; }
.so-entries .so-ico { width:40px; height:40px; border-radius:12px; }
.so-entries .so-ico svg { width:21px; height:21px; }

/* 卡片和图 */
.so-card { padding:22px 26px 22px; }
.so-card > header { display:flex; align-items:center; gap:14px; margin-bottom:14px; min-height:26px; }
.so-card h2 { display:flex; align-items:center; gap:6px; margin:0; color:var(--ink); font-size:17px; font-weight:600; line-height:26px; }
.so-sub { margin-left:auto; color:var(--text); font-size:14px; }
.so-legend { margin-left:auto; display:inline-flex; align-items:center; gap:8px; color:var(--text); font-size:13.5px; }
.so-legend i { display:inline-block; }
.so-legend i.bar { width:11px; height:11px; border-radius:3px; background:var(--blue); }
.so-legend i.line { width:18px; height:3px; margin-left:12px; border-radius:2px; background:var(--accent); }
.so-cols { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:var(--so-gap); align-items:stretch; }
.so-cols.wide { grid-template-columns:minmax(0,1.9fr) minmax(0,1fr); }
.so-cols > .so-card { display:flex; flex-direction:column; }
.so-plot { min-width:0; height:300px; }
.so-page .so-plot svg.so-chart { display:block; width:100%; height:300px; overflow:visible; }
.so-chart text { stroke:none; fill:var(--text); font-size:13px; font-variant-numeric:tabular-nums; }
.so-chart text.strong { font-size:14px; font-weight:500; }
.so-chart text.so-val { fill:var(--ink); font-size:13.5px; font-weight:600; }
.so-plot.still * { animation:none !important; } .so-plot.still .so-line { stroke-dashoffset:0; } .so-plot.still .so-dot { opacity:1; }
.so-grid-line { stroke:#eef0f3; stroke-width:1; }
.so-hit { fill:transparent; stroke:none; transition:fill .15s ease; }
.so-col:hover .so-hit { fill:rgb(18 116 165 / 5%); }
.so-bar-el, .so-chart .so-bar { fill:var(--blue); stroke:none; transform-box:fill-box; transform-origin:50% 100%; animation:so-grow .56s cubic-bezier(.2,.8,.2,1) both; animation-delay:calc(var(--i,0) * 22ms); transition:fill .15s ease; }
.so-chart .so-bar.soft { fill:#9fd3ea; }
.so-chart .so-bar.peak { fill:var(--blue); }
.so-col:hover .so-bar { fill:var(--blue-hover); }
.so-col:hover .so-bar.soft { fill:#6dbbdc; }
.so-chart .so-zero { fill:#e3e7ec; stroke:none; }
.so-line { stroke:var(--accent); stroke-width:2.4; stroke-dasharray:1; stroke-dashoffset:1; animation:so-draw .9s .18s cubic-bezier(.4,0,.2,1) forwards; }
.so-dot { fill:#fff; stroke:var(--accent); stroke-width:2; opacity:0; animation:so-fade .3s ease forwards; animation-delay:calc(.3s + var(--i,0) * 22ms); }
.so-empty { flex:1; display:grid; place-items:center; min-height:300px; margin:0; color:var(--text-regular); font-size:15px; }
@keyframes so-grow { from { transform:scaleY(0); } to { transform:scaleY(1); } }
@keyframes so-draw { to { stroke-dashoffset:0; } }
@keyframes so-fade { to { opacity:1; } }
@keyframes so-rise { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:none; } }
.so-page > .workspace, .so-page > .so-cols { animation:so-rise .42s cubic-bezier(.2,.8,.2,1) both; }
.so-page > :nth-child(4) { animation-delay:.04s; } .so-page > :nth-child(5) { animation-delay:.08s; } .so-page > :nth-child(6) { animation-delay:.12s; } .so-page > :nth-child(7) { animation-delay:.16s; }

/* 每位销售 */
.so-card.so-board { padding:0 0 8px; }
.so-card.so-board > header { margin:0; padding:22px 26px 14px; }
.workpage .so-board .ftable.cd-table { margin:0; border:0; border-top:1px solid #eef0f3; border-radius:0; }
.workpage .ftable.so-people table { min-width:920px; table-layout:fixed; }
.so-people col.sw-name { width:22%; }
.so-people col.sw-punch { width:23%; }
.so-people col.sw-last { width:150px; }
.so-people col.sw-go { width:44px; }
.workpage .ftable.cd-table.so-people th:first-child, .workpage .ftable.cd-table.so-people td:first-child { padding-left:26px; }
.workpage .ftable.cd-table.so-people td { height:58px; font-variant-numeric:tabular-nums; }
.workpage .ftable.cd-table.so-people tr[data-href] { cursor:pointer; }
.so-flag { margin-left:10px; color:#b54708; font-size:13px; font-style:normal; font-weight:400; }
.so-flag a { display:inline !important; color:var(--blue) !important; }
.so-punch { white-space:nowrap; }
.so-punch b { display:inline-block; min-width:34px; margin-left:12px; color:var(--ink); font-weight:600; text-align:right; }
.so-punch span { margin-left:4px; }
.so-meter { display:inline-block; width:calc(100% - 86px); max-width:220px; height:6px; vertical-align:middle; stroke:none !important; }
.so-meter .t { fill:#eef1f4; stroke:none; }
.so-meter .v { fill:var(--blue); stroke:none; transform-box:fill-box; transform-origin:0 50%; animation:so-wide .6s cubic-bezier(.2,.8,.2,1) both; }
@keyframes so-wide { from { transform:scaleX(0); } to { transform:scaleX(1); } }

.so-people-m { display:none; margin:0; padding:0; list-style:none; }
.so-people-m li { border-top:1px solid #f0f2f5; }
.so-people-m li > * { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:8px 12px; padding:14px; color:var(--text); text-decoration:none; }
.so-people-m b { color:var(--ink); font-size:15.5px; font-weight:600; }
.so-pm-n { color:var(--ink); font-size:15.5px; font-weight:600; font-variant-numeric:tabular-nums; }
.so-people-m .so-meter { grid-column:1 / -1; width:100%; max-width:none; }
.so-pm-facts { grid-column:1 / -1; display:flex; flex-wrap:wrap; gap:4px 16px; font-size:14px; font-variant-numeric:tabular-nums; }
.so-pm-facts i { font-style:normal; }
.so-people-m .so-flag { grid-column:1 / -1; margin:0; }

/* 去得最多的门店、打卡记录 */
.so-rank, .so-feed { margin:0; padding:0; list-style:none; }
.so-rank li, .so-feed li { display:grid; align-items:center; gap:14px; min-height:46px; border-top:1px solid #f0f2f5; color:var(--text); font-size:14px; font-variant-numeric:tabular-nums; }
.so-rank li:first-child, .so-feed li:first-child { border-top:0; }
.so-rank li { grid-template-columns:22px minmax(0,1.3fr) minmax(40px,1fr) 46px 112px; }
.so-rank .so-meter { width:100%; max-width:none; }
.so-no { color:var(--text-regular); font-size:14px; text-align:center; }
.so-rank li:nth-child(-n+3) .so-no { color:var(--accent-deep); font-weight:700; }
.so-rank b, .so-feed b { overflow:hidden; color:var(--ink); font-weight:600; text-overflow:ellipsis; white-space:nowrap; }
.so-n { text-align:right; white-space:nowrap; }
.so-rank time { text-align:right; white-space:nowrap; }
.so-feed li { grid-template-columns:104px 64px minmax(0,1fr) minmax(0,1.1fr) 36px; }
.so-feed.long li { grid-template-columns:104px minmax(0,1fr) minmax(0,1.4fr) 36px; }
.so-feed li .vr-ph { grid-column:-2; } /* 当次打卡的照片放在最右边那一格（2026-12-02） */
.so-feed.long { max-height:468px; overflow:auto; }
.so-feed time { white-space:nowrap; }
.so-by { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.so-remark { overflow:hidden; color:var(--text-regular); text-overflow:ellipsis; white-space:nowrap; }
.so-more { margin-left:auto; display:inline-flex; align-items:center; gap:2px; color:var(--blue); font-size:14px; text-decoration:none; }
.so-more svg { width:15px; height:15px; }
.so-more:hover { text-decoration:underline; }

@media (prefers-reduced-motion: reduce) { .so-page *, .so-page { animation:none !important; transition:none !important; } .so-line { stroke-dashoffset:0; } .so-dot { opacity:1; } }
@media (max-width:1439px) { .so-stat { padding:20px 20px; gap:13px; } .so-stat p b { font-size:30px; } .so-strip-title { left:20px; } .so-card { padding:20px 22px; } .so-card.so-board > header { padding:20px 22px 14px; } .workpage .ftable.cd-table.so-people th:first-child, .workpage .ftable.cd-table.so-people td:first-child { padding-left:22px; } }
@media (max-width:1100px) { .so-cols, .so-cols.wide { grid-template-columns:1fr; } }
@media (max-width:1000px) and (min-width:761px) { .workpage.cd-page .ftable.cd-table.so-people { display:block; overflow:auto; } }
@media (max-width:860px) { .so-strip { grid-template-columns:repeat(2,minmax(0,1fr)); } .so-stat:nth-child(odd of .so-stat) { box-shadow:none; } .so-stat:nth-child(n+3 of .so-stat) { border-top:1px solid #eef0f3; } }
@media (max-width:760px) {
  .so-page { --so-gap:12px; }
  .so-seg { width:100%; } .so-seg a { flex:1; min-width:0; padding:8px 0; }
  .so-custom { width:100%; flex-wrap:wrap; } .so-custom input { flex:1; min-width:0; }
  .so-span { margin-left:0; font-size:14px; }
  .so-stat { padding:16px 14px; gap:10px; } .so-ico, .so-entries .so-ico { width:36px; height:36px; border-radius:10px; } .so-ico svg, .so-entries .so-ico svg { width:19px; height:19px; }
  .so-stat p b { font-size:26px; line-height:34px; } .so-entries .so-stat p b { font-size:24px; } .so-vs { white-space:normal; font-size:13px; }
  .so-strip-title { left:14px; top:16px; } .so-entries { padding-top:44px; }
  .so-people-m { display:block; } .so-card.so-board { padding-bottom:0; }
  .so-card { padding:16px 14px; } .so-card.so-board > header { padding:16px 14px 12px; } .workpage .ftable.cd-table.so-people th:first-child, .workpage .ftable.cd-table.so-people td:first-child { padding-left:14px; }
  .so-of { display:block; margin:4px 0 0; padding:0; border:0; font-size:17px; }
  .so-rank li { grid-template-columns:20px minmax(0,1fr) 46px; } .so-rank .so-meter, .so-rank time { display:none; }
  .so-feed li, .so-feed.long li { grid-template-columns:96px minmax(0,1fr) 36px; row-gap:2px; padding:9px 0; } .so-feed .so-by { display:none; } .so-feed .so-remark { grid-column:2; } .so-feed .so-remark:empty { display:none; }
  .so-feed li .vr-ph { grid-column:3; grid-row:1 / span 2; }
  .so-who > span { display:none; } .so-who .xs-trigger, .so-who select { min-width:132px; } /* 只藏「看谁的」三个字；下拉里显示名字的那个 span 也是 span，别一起藏了 */
}

/* ---------- 总览页公用（2026-12-02 起：客户概况、销售总览、拜访工作都是这一套；拼法见 pages.js 的 ovKit） ---------- */
/* 能点的数：整格是链接，鼠标上去底色淡一点、右上角露一个小箭头。 */
a.so-stat { position:relative; color:inherit; text-decoration:none; transition:background-color .18s ease; }
a.so-stat:hover { background:#f8fbfd; }
a.so-stat:focus-visible { outline:2px solid var(--blue-line); outline-offset:-2px; }
.so-go-arrow { position:absolute; top:22px; right:18px; display:inline-flex; color:var(--blue); opacity:0; transform:translateX(-4px); transition:opacity .18s ease, transform .18s ease; }
.so-go-arrow svg { width:18px; height:18px; }
a.so-stat:hover .so-go-arrow, a.so-stat:focus-visible .so-go-arrow { opacity:1; transform:none; }
.so-stat .so-ico { transition:transform .22s cubic-bezier(.2,.8,.2,1); }
a.so-stat:hover .so-ico { transform:translateY(-1px); }
.so-legend i.soft { width:11px; height:11px; margin-left:12px; border-radius:3px; background:#9fd3ea; }
/* 堆起来的柱子：整根从底下长出来，里面几段不各自动。 */
.so-chart .so-stack { transform-box:fill-box; transform-origin:50% 100%; animation:so-grow .56s cubic-bezier(.2,.8,.2,1) both; animation-delay:calc(var(--i,0) * 22ms); }
.so-chart .so-stack .so-bar { animation:none; }
.so-plot.still .so-stack { animation:none; }
/* 卡片里一行一条：名次、名字、细条、数，整行能点。 */
.so-list { margin:0; padding:0; list-style:none; }
.so-list li { border-top:1px solid #f0f2f5; }
.so-list li:first-child { border-top:0; }
.so-list a { display:grid; align-items:center; gap:14px; min-height:46px; color:var(--text); font-size:14px; text-decoration:none; font-variant-numeric:tabular-nums; }
.so-list a:focus-visible { outline:0; }
.so-list b { overflow:hidden; color:var(--ink); font-weight:600; text-overflow:ellipsis; white-space:nowrap; transition:color .12s ease; }
.so-list a:hover b, .so-list a:focus-visible b { color:var(--blue); }
.so-list span, .so-list time { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.so-list .so-meter { width:100%; max-width:none; }
.so-list .so-n, .so-list time { text-align:right; }
.so-tiers a { grid-template-columns:22px 5em minmax(24px,1fr) 72px 54px; min-height:50px; }
.so-areas a { grid-template-columns:22px minmax(0,1fr) minmax(40px,1fr) 72px 58px; }
.so-areas li:nth-child(-n+3) .so-no { color:var(--accent-deep); font-weight:700; }
.so-fresh a { grid-template-columns:minmax(0,1fr) 76px 56px 80px 66px; }
/* 1280、1366 的笔记本上新客户那张卡片窄，区域先不放，名字留得下。 */
@media (max-width:1439px) { .so-fresh a { grid-template-columns:minmax(0,1fr) 56px 80px 66px; } .so-fresh .so-area { display:none; } }
/* 停在一行上浮出来的小卡片 */
.float-card.so-float { width:auto; min-width:190px; max-width:300px; padding:11px 14px; }
.so-tip b { display:block; color:var(--ink); font-size:14.5px; font-weight:600; line-height:1.5; }
.so-tip p { margin:3px 0 0; color:var(--text); font-size:13.5px; line-height:1.6; }
.co-page .crm-actions { align-items:center; gap:6px; padding-top:0; }
/* 带标题那一排右上角的入口（客户概况「要留意的客户」→ 调整标准） */
.so-strip-more { position:absolute; top:22px; right:28px; display:inline-flex; align-items:center; gap:2px; color:var(--blue); font-size:14px; text-decoration:none; }
.so-strip-more svg { width:15px; height:15px; }
.so-strip-more:hover { text-decoration:underline; }
@media (max-width:1439px) { .so-strip-more { right:20px; } }
@media (max-width:760px) { .so-strip-more { top:16px; right:14px; } }
@media (max-width:1439px) { .so-go-arrow { top:20px; right:14px; } }
/* 1280、1366 的笔记本上右边那张窄卡片（客户分级、几点打卡）多给一点地方，名字不被截。1100 以下两张上下排，不受这条影响。 */
@media (max-width:1439px) and (min-width:1101px) { .so-cols.wide { grid-template-columns:minmax(0,1.6fr) minmax(0,1fr); } }
@media (max-width:760px) {
  .so-list .so-meter { display:none; }
  .so-tiers a { grid-template-columns:22px minmax(0,1fr) 72px 50px; }
  .so-areas a { grid-template-columns:20px minmax(0,1fr) 72px 54px; }
  .so-fresh a { grid-template-columns:minmax(0,1fr) 50px 70px 64px; gap:8px; } .so-fresh .so-area { display:none; }
  .co-page .crm-actions { width:100%; justify-content:flex-start; }
}
