/* 客户档案（客户详情页最上面）。和客户对照页一个路子：白底、细线、留白，只用品牌蓝做强调。
   三排格子之间一条横线，格子之间一条竖线；数字大、说明小；能填的格子鼠标放上去才出现一支笔。 */
.cp-card { --cp-line: #eceef2; --cp-ink: #14151c; --cp-soft: #74757c; --cp-faint: #a3a6ad; margin-bottom: 16px; border: 1px solid var(--cp-line); border-radius: 16px; background: #fff; overflow: hidden; }
.cp-head { display: flex; align-items: baseline; gap: 12px; padding: 20px 28px 16px; }
.cp-head h3 { margin: 0; color: var(--cp-ink); font-size: 17px; font-weight: 650; letter-spacing: -.01em; }
.cp-head span { color: var(--cp-faint); font-size: 12.5px; }
.cp-more { margin-left: auto; color: var(--blue); font-size: 12.5px; }

.cp-row { display: grid; border-top: 1px solid var(--cp-line); }
.cp-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cp-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cp-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cp-1 { grid-template-columns: minmax(0, 1fr); }
.cp-rival { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.cp-cell { position: relative; display: block; min-width: 0; padding: 20px 28px 20px; border: 0; border-left: 1px solid var(--cp-line); background: none; color: inherit; font: inherit; text-align: left; }
.cp-cell:first-child { border-left: 0; }
.cp-cell.editable { cursor: pointer; transition: background .15s ease; }
.cp-cell.editable:hover, .cp-line:hover { background: #f8f9fb; }
.cp-cell:focus-visible, .cp-line:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.cp-label { display: flex; align-items: center; gap: 6px; color: var(--cp-soft); font-size: 12.5px; }
.cp-value { display: block; margin: 8px 0 6px; overflow: hidden; color: var(--cp-ink); font-size: 24px; font-weight: 650; line-height: 1.25; letter-spacing: -.01em; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cp-value small { margin-left: 5px; color: var(--cp-soft); font-size: 13px; font-weight: 400; letter-spacing: 0; }
.cp-value.bad, .cp-foot .bad { color: var(--danger, #d54941); font-style: normal; }
.cp-foot { display: block; overflow: hidden; color: var(--cp-faint); font-size: 12px; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }
.cp-cell.empty .cp-value { color: #c4c7ce; font-size: 20px; font-weight: 500; }
.cp-pen { display: inline-flex; opacity: 0; transition: opacity .15s ease; }
.cp-pen svg { width: 13px; height: 13px; fill: none; stroke: var(--blue); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.cp-cell.editable:hover .cp-pen, .cp-line:hover .cp-pen, .cp-cell.editable:focus-visible .cp-pen { opacity: 1; }
.cp-bar { display: block; width: 120px; max-width: 100%; height: 4px; margin: 0 0 7px; overflow: hidden; border-radius: 4px; background: #eef0f3; }
.cp-bar em { display: block; height: 100%; border-radius: inherit; background: var(--blue); }

/* 竞品分析：一格里两行，各自点开填。 */
.cp-lines { padding-bottom: 12px; }
.cp-line { display: flex; align-items: baseline; gap: 14px; width: calc(100% + 24px); margin: 6px -12px 0; padding: 8px 12px; border: 0; border-radius: 9px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; transition: background .15s ease; }
.cp-line-label { flex: none; width: 58px; color: var(--cp-soft); font-size: 12.5px; }
.cp-line-text { flex: 1; min-width: 0; color: var(--cp-ink); font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.cp-line.empty .cp-line-text { color: #c4c7ce; }
.cp-line-by { flex: none; color: var(--cp-faint); font-size: 12px; }

/* ---------- 进出门打卡 ---------- */
.cp-table { width: 100%; border-collapse: collapse; border-top: 1px solid var(--cp-line); }
.cp-table th { padding: 11px 12px; color: var(--cp-soft); font-size: 12.5px; font-weight: 400; text-align: left; white-space: nowrap; }
.cp-table td { padding: 13px 12px; border-top: 1px solid var(--cp-line); color: var(--cp-ink); font-size: 13.5px; white-space: nowrap; }
.cp-table th:first-child, .cp-table td:first-child { padding-left: 28px; }
.cp-table th:last-child, .cp-table td:last-child { padding-right: 28px; }
.cp-table td a { color: inherit; }
.cp-table td a:hover { color: var(--blue); }
.cp-table .cp-note { width: 46%; max-width: 0; overflow: hidden; color: var(--text-regular); text-overflow: ellipsis; }
.cp-miss { color: #c4c7ce; font-style: normal; }
.cp-none { margin: 0; padding: 30px 28px 34px; border-top: 1px solid var(--cp-line); color: var(--cp-faint); font-size: 13.5px; }
.cp-none a { margin-left: 8px; color: var(--blue); }
.cp-reports { padding: 18px 28px 22px; border-top: 1px solid var(--cp-line); }
.cp-reports h4 { margin: 0 0 12px; color: var(--cp-ink); font-size: 14px; font-weight: 600; }
.cp-reports h4 small { margin-left: 6px; color: var(--cp-faint); font-size: 12px; font-weight: 400; }

/* ---------- 填一项的小弹窗 ---------- */
.cp-modal { position: fixed; z-index: 90; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(20, 21, 28, .36); }
.cp-dialog { width: min(420px, 100%); padding: 26px 26px 20px; border-radius: 16px; background: #fff; box-shadow: var(--shadow-lg); }
.cp-dialog h2 { margin: 0 0 16px; color: #14151c; font-size: 18px; font-weight: 650; }
.cp-dialog input[type="text"], .cp-dialog textarea, .cp-num input { width: 100%; padding: 10px 12px; border: 1px solid #dcdfe5; border-radius: 10px; color: #14151c; font: inherit; font-size: 14.5px; line-height: 1.6; resize: vertical; }
.cp-dialog input:focus, .cp-dialog textarea:focus { outline: 0; border-color: var(--blue); }
.cp-num { display: flex; align-items: center; gap: 10px; }
.cp-num span { flex: none; color: #74757c; font-size: 14px; }
.cp-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; padding: 3px; border-radius: 10px; background: var(--fill, #f2f3f5); }
.cp-pick button { height: 36px; border: 0; border-radius: 8px; color: #74757c; background: none; font-size: 14px; }
.cp-pick button.on { color: #14151c; background: #fff; box-shadow: 0 1px 3px rgba(20, 21, 28, .12); font-weight: 600; }
.cp-hint { margin: 12px 0 0; color: #8b8e96; font-size: 12.5px; line-height: 1.7; }
.cp-acts { display: flex; align-items: center; gap: 10px; margin-top: 22px; }
.cp-acts span { flex: 1; }
.cp-btn { height: 36px; padding: 0 18px; border: 1px solid #dcdfe5; border-radius: 9px; color: var(--text); background: #fff; font-size: 13.5px; font-weight: 500; }
.cp-btn:hover:not(:disabled) { border-color: #c5c9d1; background: #f7f8fa; }
.cp-btn.primary { border-color: var(--blue); color: #fff; background: var(--blue); }
.cp-btn.primary:hover:not(:disabled) { border-color: var(--blue-hover); background: var(--blue-hover); }
.cp-btn.ghost { padding: 0 6px; border-color: transparent; color: #8b8e96; }
.cp-btn:disabled { opacity: .5; cursor: not-allowed; }

@media (max-width: 1000px) {
  .cp-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cp-4 .cp-cell:nth-child(3) { border-left: 0; }
  .cp-4 .cp-cell:nth-child(n+3) { border-top: 1px solid var(--cp-line); }
  .cp-3, .cp-rival { grid-template-columns: minmax(0, 1fr); }
  .cp-3 .cp-cell, .cp-rival .cp-cell { border-left: 0; }
  .cp-3 .cp-cell + .cp-cell, .cp-rival .cp-cell + .cp-cell { border-top: 1px solid var(--cp-line); }
  .cp-head, .cp-cell { padding-left: 18px; padding-right: 18px; }
  .cp-table { display: block; overflow-x: auto; }
  .cp-table th:first-child, .cp-table td:first-child { padding-left: 18px; }
}

/* ---------- 记客户档案（销售岗按店名找一家再填，customer-profile.js 末尾） ---------- */
.cpf-table td:nth-child(1), .cpf-table td:nth-child(2) { white-space: normal; overflow-wrap: anywhere; }
.cpf-table th:nth-child(3), .cpf-table td:nth-child(3) { width: 110px; }
.cpf-table th:nth-child(4), .cpf-table td:nth-child(4) { width: 120px; }
.cpf-hint { margin: 14px 4px 0; color: var(--text-muted); font-size: 13px; }

/* ---------- 录入记录（2026-12-03 第二版，customer-profile.js 的 customerEntriesHtml） ----------
   负责人：「我觉得录入记录要能删，要能随时改。然后这块儿的前端，我觉得你要调，不好看。」
   一条一次：左边一格日子和几点，右边抬头（谁录的、怎么录的、哪一次打卡）和「改」「删」，下面这一次录的几项（标签和内容挨着，两栏）。
   拜访时录的一条里分「这次拜访」「记进档案」两小段。字一律深色，主次靠字号粗细。 */
.cpe { margin-top: 16px; }
.cpe-list { margin: 2px 0 0; padding: 0 22px 8px; list-style: none; }
.cpe-item { padding: 14px 0 12px; border-top: 1px solid var(--cdp-soft, #f1f2f5); }
.cpe-item:first-child { border-top: 0; }
/* 一行两栏：左边一栏加粗的小标题（日子几点、这次拜访、记进档案、改档案），右边内容，右边的字都从同一条竖线开始。 */
.cpe-line { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); align-items: baseline; gap: 16px; }
.cpe-line + .cpe-line { margin-top: 6px; }
.cpe-k { color: #14151c; font-size: 14px; font-weight: 600; }
.cpe-when { font-size: 14.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cpe-head { position: relative; align-items: center; min-height: 34px; }
.cpe-headmain { display: flex; flex-wrap: wrap; align-items: center; row-gap: 4px; min-width: 0; padding-right: 84px; color: #1d2129; font-size: 14px; line-height: 22px; }
.cpe-by { margin-right: 12px; color: #14151c; font-size: 14.5px; font-weight: 600; }
/* 几样说明之间一条细竖线，不用灰色的点。 */
.cpe-meta { display: inline-flex; align-items: center; color: #1d2129; }
.cpe-meta + .cpe-meta::before { content: ""; width: 1px; height: 12px; margin: 0 10px; background: #d5d9e0; }
.cpe-headmain .vr-ph { margin-left: 12px; }
.cpe-body { margin-top: 2px; }
.cpe-items { display: flex; flex-wrap: wrap; gap: 6px 32px; min-width: 0; }
.cpe-it { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; min-width: 0; }
.cpe-l { color: #1d2129; font-size: 14px; }
.cpe-v { color: #14151c; font-size: 14.5px; font-weight: 500; overflow-wrap: anywhere; }
/* 拜访时说的一段话、高德打卡时写的备注：照原样分行（2026-12-04，高德备注常一行一项：「2个工位↵2个工人↵月保养台次在25台次」）。 */
.cpe-it[data-f^="visit:"] .cpe-v { white-space: pre-line; }
/* 有往年记录的（高德打卡备注有 2024、2025 年的）：左边一栏放宽到放得下「2025年12月30日 14:04」一行，这一张卡片里都一样宽；手机上照旧上下排。 */
@media (min-width: 761px) { .cpe.wide .cpe-line { grid-template-columns: 12em minmax(0, 1fr); } }
.cpe-before { color: var(--accent-deep); font-size: 14px; }
/* 改、删：两个图标（笔、垃圾桶），鼠标放上去才有底色；删的那个变红。 */
.cpe-right { position: absolute; top: 50%; right: 0; display: inline-flex; gap: 4px; transform: translateY(-50%); }
.cpe-right[hidden] { display: none; }
.cpe-icon { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 9px; background: none; color: #1d2129; cursor: pointer; transition: color .12s ease, background .12s ease; }
.cpe-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.cpe-icon:hover, .cpe-icon:focus-visible { outline: 0; color: var(--blue); background: #edf5fa; }
.cpe-icon.danger:hover, .cpe-icon.danger:focus-visible { color: #c4402f; background: #fff2f0; }
.cpe-icon:disabled { opacity: .5; cursor: not-allowed; }
/* 改的时候：这一条下面原地变成填写框，一项一行，和看的时候一样名称在左一栏。 */
.cpe-form { margin-top: 6px; }
.cpe-form .cpe-line + .cpe-line { margin-top: 8px; }
.cpe-form .cpe-line.ed { align-items: center; }
.cpe-in { min-width: 0; color: #14151c; font-size: 14.5px; }
.cpe-form .cpe-in input, .cpe-form .cpe-in select, .cpe-form .cpe-in .xs-trigger { width: min(520px, 100%); }
.cpe-form input, .cpe-form select { width: 100%; height: 36px; padding: 0 12px; border: 1px solid #d8dde5; border-radius: 9px; background: #fff; color: #14151c; font: inherit; font-size: 14.5px; }
.cpe-form input:focus, .cpe-form select:focus { outline: 0; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(18, 116, 165, .1); }
.cpe-hint { margin: 10px 0 0; color: #1d2129; font-size: 13.5px; }
.cpe-acts { display: flex; justify-content: flex-end; gap: 10px; margin-top: 10px; }
.cpc-btn.primary { border-color: var(--blue); color: #fff; background: var(--blue); }
.cpc-btn.primary:hover, .cpc-btn.primary:focus-visible { border-color: var(--blue-hover); color: #fff; background: var(--blue-hover); }
/* 录入记录：标题后面写几条，右边一格搜（打字就筛） */
.cpe-n { margin-left: 4px; color: #1d2129; font-size: 14px; font-weight: 400; }
.cpe-find { display: inline-flex; align-items: center; gap: 8px; width: min(260px, 46%); height: 36px; padding: 0 14px; border: 1px solid #dfe0e4; border-radius: 10px; background: #fff; transition: border-color .12s ease; }
.cpe-find:focus-within { border-color: var(--blue); }
.cpe-find svg { width: 15px; height: 15px; flex: none; color: #8a8f99; }
.cpe-find input { flex: 1; min-width: 0; border: 0; outline: 0; color: #14151c; background: transparent; font: inherit; font-size: 14px; }
.cpe-find input::placeholder { color: #8a8f99; }
.cpe-find input:focus, .cpe-find input:focus-visible { outline: 0; box-shadow: none; background: transparent; }
.cpe-nohit { padding: 4px 22px 18px; }

/* 联系人卡片下面一行「老板性格和做事风格」（2026-12-03 从拜访采集表挪进档案）：名称长，左边一栏放宽 */
.cpc-after .cdp-kv { grid-template-columns: 136px minmax(0, 1fr); }

/* ---------- 拜访采集（2026-12-03 第二版，customer-profile.js 的 customerVisitCollectHtml、bindVisitCollect） ----------
   平时：「上次拜访」一行抬头（哪天几点、谁去的、谁录的），下面这一次说的几项（两栏，标签和内容挨着）；再一行「下次去顺便问」。
   「记一次拜访」原地展开成一张表：一行一项、标签在左一栏对齐；分「这次拜访」「顺便补档案」两段，每段一个小标题加一条线。
   填过的档案项写上次记的是什么，后面「没变」「改」两个小按钮；点了「没变」整行变蓝、打上勾。 */
.cvc-head-acts { display: inline-flex; align-items: center; gap: 14px; }
.cvc-due { color: var(--accent-deep); font-size: 13.5px; }
.cvc.editing .cvc-due, .cvc.editing [data-cvc-open] { display: none; }
.cvc-body { padding: 2px 22px 14px; }
/* 两行：上次拜访、下次去顺便问；左边一栏加粗、右边内容，和录入记录一个样子，字一律深色（2026-12-03 负责人：「这里也是」）。 */
.cvc-row { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); align-items: baseline; gap: 16px; padding: 10px 0; }
.cvc-row + .cvc-row { border-top: 1px solid var(--cdp-soft, #f1f2f5); }
.cvc-k { color: #14151c; font-size: 14px; font-weight: 600; }
.cvc-v { min-width: 0; color: #1d2129; font-size: 14px; line-height: 22px; }
.cvc-when { display: flex; flex-wrap: wrap; align-items: center; row-gap: 4px; }
.cvc-when b { margin-right: 12px; color: #14151c; font-size: 14.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cvc-v .cpe-items { margin-top: 6px; }
.cvc-v > span[title] { cursor: help; }
.cvc-more { color: #1d2129; }
.cvc-empty { margin: 8px 0 4px; color: #1d2129; font-size: 14px; }

.cvf { padding: 2px 0 0; }
.cvf-top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.cvf-pickone, .cvf-new label { display: inline-flex; align-items: center; gap: 12px; min-width: 0; }
.cvf-pickone > span, .cvf-new label > span { flex: none; color: #1d2129; font-size: 14px; }
.cvf-pickone select, .cvf-pickone .xs-trigger { width: min(460px, 60vw); }
.cvf-new { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.cvf-new[hidden] { display: none; }
.cvf-new label input { width: 140px; }
.cvf-new label:last-child input, .cvf-new label:last-child select, .cvf-new label:last-child .xs-trigger { width: 260px; }
/* 「说说这次拜访」是主角（2026-12-03 负责人：「这里要加个语音麦克风录入的地方。」「底下这种给我的感觉有点臃肿，让人看着就不想录」）：
   一个大框，左下角麦克风（点一下说，说完转成字放进框里能改），右下角「帮我填」；录音时上面一条红点在跳、几秒、「说完了」「不录了」。 */
.cvf-say { display: grid; gap: 8px; margin: 16px 0 0; padding: 12px 14px 10px; border: 1px solid #d8dde5; border-radius: 14px; background: #fff; transition: border-color .12s ease, box-shadow .12s ease; }
.cvf-say:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(18, 116, 165, .08); }
.cvf-say textarea { width: 100%; min-height: 72px; padding: 2px 0; border: 0; outline: 0; resize: vertical; color: #14151c; background: transparent; font: inherit; font-size: 15px; line-height: 24px; }
.cvf-say textarea:focus, .cvf-say textarea:focus-visible { outline: 0; border: 0; box-shadow: none; }
.cvf-say textarea::placeholder { color: #8a8f99; }
.cvf-say-ops { display: flex; align-items: center; gap: 12px; }
.cvf-say-note { margin-right: auto; color: #1d2129; font-size: 14px; }
.cvf-say-note:empty { margin-right: auto; }
.cvf-say-ops .cpc-btn { flex: none; height: 36px; padding: 0 20px; font-size: 14px; }
.cvf-mic { flex: none; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; color: var(--blue); background: #e8f3fa; cursor: pointer; transition: background .12s ease, transform .12s ease; }
.cvf-mic:hover, .cvf-mic:focus-visible { outline: 0; background: #d6eaf6; }
.cvf-mic:active { transform: scale(.95); }
.cvf-mic[hidden] { display: none; }
.cvf-mic svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cvf-live { display: flex; align-items: center; gap: 12px; padding: 6px 4px 8px; border-bottom: 1px solid var(--cdp-soft, #f1f2f5); }
.cvf-live[hidden] { display: none; }
.cvf-live b { color: #14151c; font-size: 14.5px; font-weight: 600; }
.cvf-live [data-say-time] { margin-right: auto; color: #1d2129; font-size: 14px; font-variant-numeric: tabular-nums; }
.cvf-live .cpc-btn { height: 32px; }
.cvf-rec { flex: none; width: 12px; height: 12px; border-radius: 50%; background: #e5484d; animation: cvf-rec 1.2s ease-in-out infinite; }
@keyframes cvf-rec { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.82); } }
@media (prefers-reduced-motion: reduce) { .cvf-rec { animation: none; } }
/* 下面客户档案的几项一列排：一项一行，名称在左一栏、细线的填写框在右；最宽 820，不铺满整张卡片（2026-12-03 傍晚起不再分「这次拜访」「顺便补档案」）。 */
.cvf-sec { margin-top: 20px; min-width: 0; }
.cvf-arch { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--cdp-soft, #f1f2f5); } /* 收着那一行和下面「取消 / 保存」那条线一样宽，「展开」靠右 */
.cvf-fold-body { max-width: 860px; }
/* 客户档案默认收成一行（2026-12-03 傍晚），点「展开」或「帮我填」填进去了才打开；填进去的几格名称和下划线变蓝。 */
.cvf-fold { display: flex; align-items: baseline; gap: 12px; width: 100%; padding: 0; border: 0; background: none; color: #1d2129; font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.cvf-fold b { flex: none; color: #14151c; font-size: 15px; font-weight: 600; }
.cvf-fold span { min-width: 0; }
.cvf-fold i { flex: none; margin-left: auto; color: var(--blue); font-size: 14px; font-style: normal; }
.cvf-fold:hover i, .cvf-fold:focus-visible i { text-decoration: underline; text-underline-offset: 3px; }
.cvf-fold:focus-visible { outline: 0; }
.cvf-fold-body[hidden] { display: none; }
.cvf-f.got .cvf-label { color: var(--blue); }
.cvf-f.got .cvf-cell input, .cvf-f.got .cvf-cell textarea, .cvf-f.got .cvf-cell .xs-trigger { border-bottom-color: var(--blue); }
/* 档案的几项分组排（2026-12-03 傍晚，负责人嫌十三行一列「密密麻麻」）：组名一行，下面一排三格、名称在格子上面；表和长句占整排，竞品两句和客户信息各占半排。 */
.cvf-group { margin-top: 22px; }
.cvf-group h5 { margin: 0 0 6px; color: #14151c; font-size: 14.5px; font-weight: 600; }
.cvf-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px 28px; }
.cvf-f { grid-column: span 2; min-width: 0; }
.cvf-f.half { grid-column: span 3; }
.cvf-f.wide { grid-column: 1 / -1; }
.cvf-f .cvf-label { margin-bottom: 2px; color: #1d2129; font-size: 13.5px; line-height: 20px; }
.cvf-f .cvf-num { display: flex; }
.cvf-f .cvf-num input { width: 100%; max-width: 160px; }
.cvf-sec h4 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0 0 2px; color: #14151c; font-size: 15px; font-weight: 600; }
.cvf-row { position: relative; display: grid; grid-template-columns: 11em minmax(0, 1fr); align-items: baseline; gap: 16px; padding: 4px 0; }
.cvf-label { color: #1d2129; font-size: 14px; line-height: 20px; }
.cvf-cell { min-width: 0; }
.cvf-top input, .cvf-top select { width: 100%; min-width: 0; min-height: 38px; padding: 8px 12px; border: 1px solid #d8dde5; border-radius: 10px; color: #14151c; background: #fff; font: inherit; font-size: 14.5px; line-height: 20px; transition: border-color .12s ease, box-shadow .12s ease; }
.cvf-top input:focus, .cvf-top select:focus { outline: 0; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(18, 116, 165, .1); }
.cvf-top .xs-trigger { height: 38px; border-radius: 10px; }
/* 一项一行的填写框只留下面一条细线（不再一格一个大框），点进去线变蓝。 */
.cvf-cell input, .cvf-cell textarea, .cvf-cell select { width: 100%; min-width: 0; min-height: 34px; padding: 6px 2px; border: 0; border-bottom: 1px solid #dcdfe5; border-radius: 0; color: #14151c; background: transparent; font: inherit; font-size: 14.5px; line-height: 20px; transition: border-color .12s ease; }
.cvf-cell textarea { display: block; height: 34px; resize: none; overflow: hidden; }
.cvf-cell input::placeholder, .cvf-cell textarea::placeholder { color: #8a8f99; }
.cvf-cell input:focus, .cvf-cell textarea:focus, .cvf-cell select:focus { outline: 0; border-bottom-color: var(--blue); box-shadow: none; }
.cvf-cell .xs-trigger { height: 34px; border: 0; border-bottom: 1px solid #dcdfe5; border-radius: 0; background: transparent; }
.cvf-num { display: inline-flex; align-items: center; gap: 10px; }
.cvf-cell .cvf-num input { width: 120px; }
.cvf-num i { color: #1d2129; font-size: 14px; font-style: normal; }
.cvf-lines { display: grid; gap: 8px; }
.cvf-line { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding-right: 34px; }
.cvf-line-del { position: absolute; top: 4px; right: 0; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 7px; background: none; color: #1d2129; font-size: 17px; line-height: 1; cursor: pointer; }
.cvf-line-del:hover, .cvf-line-del:focus-visible { outline: 0; color: #c4402f; background: #fff4f2; }
.cvf-was-note { margin: 6px 0 0; color: var(--accent-deep); font-size: 13.5px; }
.cvf-now { margin: 0 0 8px; color: #1d2129; font-size: 14px; line-height: 20px; }
.cvf-link { margin-top: 6px; padding: 0; border: 0; background: none; color: var(--blue); font: inherit; font-size: 13.5px; cursor: pointer; }
.cvf-link:hover, .cvf-link:focus-visible { outline: 0; text-decoration: underline; text-underline-offset: 3px; }
.cvc-acts { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--cdp-line, #e9ebef); }
.cvc-acts .cpc-btn { height: 36px; min-width: 80px; justify-content: center; font-size: 14px; }
.cvc-status { margin-right: auto; color: #1d2129; font-size: 13.5px; }
@media (max-width: 900px) { .cvf-line { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .cpe-list { padding: 0 16px 6px; }
  /* 手机上左边那一栏挪到上面：小标题一行、内容一行；一项里名称和内容各占一行，长名称不折。 */
  .cpe-line, .cvc-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .cpe-line + .cpe-line { margin-top: 10px; }
  .cpe-head .cpe-when { padding-right: 84px; }
  .cpe-headmain { padding-right: 0; }
  .cpe-right { top: 0; transform: none; }
  .cpe-items { flex-direction: column; gap: 6px; }
  .cpe-form .cpe-in input, .cpe-form .cpe-in select, .cpe-form .cpe-in .xs-trigger { width: 100%; }
  .cpe .cdp-card-head { flex-wrap: wrap; padding-bottom: 4px; }
  .cpe-find { width: 100%; }
  .cvc-body { padding: 4px 16px 16px; }
  .cvc-head-acts .cvc-due { display: none; }
  .cvf-top, .cvf-new { display: grid; gap: 12px; }
  .cvf-pickone, .cvf-new label { display: grid; gap: 7px; }
  .cvf-pickone select, .cvf-pickone .xs-trigger, .cvf-new label input, .cvf-new label:last-child input, .cvf-new label:last-child select, .cvf-new label:last-child .xs-trigger { width: 100%; }
  .cvf-row { grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 6px 0; }
  .cvf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; }
  .cvf-f { grid-column: span 1; }
  .cvf-f.half, .cvf-f.wide { grid-column: 1 / -1; }
  .cvf-fold { flex-wrap: wrap; }
}

/* ---------- 门店情况、竞品信息两张卡片（2026-12-04 起项能改名、停用、加、调顺序）---------- */
/* 名称那一栏：卡片里有长名称（老板改的、加的）就整张卡片一起放宽，各行还是对齐的（宽度在 customer-profile.js 的 cpDt 里算）。 */
.cdp-kvs[style*="--cpc-dt"] .cdp-kv { grid-template-columns: var(--cpc-dt) minmax(0, 1fr); }
/* 竞品信息里一条一行的那张表：上面一行写名称，和一格一个值的几项用整条线隔开。 */
.cpc-block { padding-top: 6px; }
.cpc-block-h { margin: 0; padding: 10px 22px 0; color: #1d2129; font-size: 14px; font-weight: 500; line-height: 22px; }
.cpc-block .cpc-lines { margin-top: 8px; }
.cpc-block + .cdp-kvs, .cdp-kvs + .cpc-block { border-top: 1px solid var(--cdp-soft, #f1f2f5); }
.cpc-block + .cdp-kvs { padding-top: 2px; }
.cpc-block[data-cpc-focus] { cursor: pointer; }
.cpc-form .cpc-block .cpc-add { margin-left: 22px; }

/* ---------- 管理字段的框 ---------- */
.pf-modal { z-index: 95; }
.pf-dialog { width: min(600px, 100%); max-height: calc(100vh - 48px); display: flex; flex-direction: column; overflow: hidden; border-radius: 16px; background: #fff; box-shadow: var(--shadow-lg); }
.pf-loading { margin: 0; padding: 40px 28px; color: #1d2129; font-size: 14.5px; text-align: center; }
.pf-head { display: flex; align-items: center; gap: 12px; padding: 22px 22px 0 28px; }
.pf-head h2 { display: flex; align-items: center; gap: 6px; flex: 1; margin: 0; color: var(--ink); font-size: 18px; font-weight: 650; }
.pf-x { width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 10px; color: #1d2129; background: none; cursor: pointer; }
.pf-x svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.pf-x:hover, .pf-x:focus-visible { outline: 0; background: #f2f4f7; }
/* 上面切换哪张卡片：一条细线上两个页签，选中的下面一道蓝线。 */
.pf-tabs { display: flex; gap: 26px; margin: 14px 28px 0; border-bottom: 1px solid #eceef2; }
.pf-tabs button { position: relative; display: inline-flex; align-items: center; gap: 7px; height: 42px; padding: 0; border: 0; color: #1d2129; background: none; font: inherit; font-size: 15px; cursor: pointer; }
.pf-tabs button i { min-width: 20px; height: 20px; display: inline-grid; place-items: center; padding: 0 6px; border-radius: 10px; color: #1d2129; background: #f2f4f7; font-size: 13px; font-style: normal; font-weight: 500; }
.pf-tabs button.on { color: var(--blue); font-weight: 600; }
.pf-tabs button.on i { color: var(--blue); background: var(--blue-soft); }
.pf-tabs button.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 2px; background: var(--blue); }
.pf-tabs button:focus-visible { outline: 0; color: var(--blue); }
/* 一项一行：左边名称，右边写填什么；鼠标停上去右边换成几个小按钮（手机上按钮一直在，填什么挪到名称下面）。 */
.pf-list, .pf-off ol { margin: 0; padding: 0; list-style: none; }
/* 中间一段（项、加一项、停用的）自己滚动，上面的标题、页签和下面的「完成」不动。 */
.pf-body { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; overflow: auto; padding-bottom: 2px; }
.pf-list { padding: 10px 16px 0; }
.pf-row { min-height: 50px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 4px 6px 4px 12px; border-radius: 10px; transition: background .12s ease; }
.pf-row:not(.off) > .pf-kind, .pf-row:not(.off) > .pf-ops { grid-row: 1; grid-column: 2; justify-self: end; }
.pf-row:not(.off) > .pf-kind { padding-right: 10px; transition: opacity .12s ease; }
.pf-row.off { grid-template-columns: minmax(0, 1fr) auto auto; }
.pf-row + .pf-row { margin-top: 2px; }
.pf-row:hover, .pf-row:focus-within { background: #f6f8fa; }
.pf-name { min-width: 0; overflow: hidden; color: var(--ink); font-size: 15px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.pf-kind { color: #1d2129; font-size: 13.5px; white-space: nowrap; }
.pf-ops { display: flex; align-items: center; gap: 2px; opacity: 0; pointer-events: none; transition: opacity .12s ease; }
.pf-row:hover .pf-ops, .pf-row:focus-within .pf-ops, .pf-ops.show { opacity: 1; pointer-events: auto; }
.pf-row:not(.off):hover > .pf-kind, .pf-row:not(.off):focus-within > .pf-kind { opacity: 0; }
.pf-icon { width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 8px; color: #1d2129; background: none; cursor: pointer; }
.pf-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.pf-icon:hover:not(:disabled), .pf-icon:focus-visible { outline: 0; color: var(--blue); background: #e9f5fb; }
.pf-icon.danger:hover:not(:disabled), .pf-icon.danger:focus-visible { color: var(--danger); background: var(--danger-bg); }
.pf-icon:disabled { opacity: .3; cursor: default; }
.pf-none { padding: 18px 12px; color: #1d2129; font-size: 14.5px; }
/* 改名：原行里变成输入框（数字项多一格单位）。 */
.pf-row.editing { padding: 8px 6px 8px 8px; background: #f6f8fa; }
.pf-edit, .pf-new { display: flex; align-items: center; gap: 8px; min-width: 0; grid-column: 1 / -1; }
.pf-in { min-width: 0; flex: 1; height: 38px; padding: 0 12px; border: 1px solid #dcdfe5; border-radius: 9px; color: var(--ink); background: #fff; font: inherit; font-size: 14.5px; }
.pf-in.pf-unit { flex: 0 0 84px; }
.pf-in:focus { outline: 0; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(18, 116, 165, .12); }
.pf-edit .cp-btn, .pf-new .cp-btn { flex: none; height: 38px; padding: 0 16px; }
/* 加一项：一行蓝字，点开是一行填写。 */
.pf-add { display: inline-flex; align-items: center; gap: 6px; margin: 8px 28px 0; padding: 8px 2px; border: 0; color: var(--blue); background: none; font: inherit; font-size: 14.5px; font-weight: 500; cursor: pointer; align-self: flex-start; }
.pf-add svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.pf-add:hover span, .pf-add:focus-visible span { text-decoration: underline; text-underline-offset: 3px; }
.pf-add:focus-visible { outline: 0; }
.pf-new { margin: 10px 22px 0; padding: 10px; border-radius: 12px; background: #f6f8fa; }
.pf-seg { flex: none; display: inline-flex; padding: 3px; border-radius: 9px; background: #eceff3; }
.pf-seg button { height: 32px; padding: 0 14px; border: 0; border-radius: 7px; color: #1d2129; background: none; font: inherit; font-size: 14px; cursor: pointer; }
.pf-seg button.on { color: var(--ink); background: #fff; box-shadow: 0 1px 2px rgba(20, 21, 28, .12); font-weight: 600; }
/* 停用的：最下面一组，名称照样深色，右边「恢复」。 */
.pf-off { margin: 16px 16px 0; padding-top: 12px; border-top: 1px solid #eceef2; }
.pf-off h3 { margin: 0 0 4px 12px; color: #1d2129; font-size: 14px; font-weight: 600; }
.pf-row.off .pf-name { font-weight: 400; }
.pf-text { height: 32px; padding: 0 12px; border: 0; border-radius: 8px; color: var(--blue); background: none; font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; }
.pf-text:hover, .pf-text:focus-visible { outline: 0; background: #e9f5fb; }
.pf-foot { display: flex; justify-content: flex-end; margin-top: 18px; padding: 14px 22px 18px; border-top: 1px solid #eceef2; }
.pf-foot .cp-btn { min-width: 88px; height: 38px; }
@media (hover: none) {
  .pf-ops { opacity: 1; pointer-events: auto; }
  .pf-row:not(.off) > .pf-kind { grid-row: 2; grid-column: 1; justify-self: start; padding-right: 0; opacity: 1 !important; }
  .pf-row:not(.off) > .pf-ops { grid-row: 1 / 3; }
  .pf-row:not(.off) { gap: 2px 10px; padding-top: 8px; padding-bottom: 8px; }
}
@media (max-width: 640px) {
  .pf-modal { place-items: end center; padding: 0; }
  .pf-dialog { width: 100%; max-height: 88vh; border-radius: 16px 16px 0 0; }
  .pf-head { padding: 18px 16px 0 20px; }
  .pf-tabs { margin: 10px 20px 0; }
  .pf-list { padding: 8px 8px 0; }
  .pf-ops { opacity: 1; pointer-events: auto; }
  .pf-row, .pf-row.off { grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding-top: 8px; padding-bottom: 8px; }
  .pf-row > .pf-kind, .pf-row:not(.off) > .pf-kind { grid-row: 2; grid-column: 1; justify-self: start; padding-right: 0; opacity: 1 !important; }
  .pf-row > .pf-ops, .pf-row:not(.off) > .pf-ops { grid-row: 1 / 3; grid-column: 2; }
  .pf-edit, .pf-new { flex-wrap: wrap; }
  .pf-edit .pf-in:not(.pf-unit), .pf-new .pf-in:not(.pf-unit) { flex: 1 1 100%; }
  .pf-add { margin-left: 20px; }
  .pf-new { margin: 10px 12px 0; }
  .pf-off { margin: 16px 8px 0; }
  .pf-foot { padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); }
}
@media (max-width: 760px) {
  /* 手机上卡片两边是 16px（customer-detail.css），竞品那张表上面的名称跟着对齐。 */
  .cpc-block-h { padding: 10px 16px 0; }
  .cpc-form .cpc-block .cpc-add { margin-left: 16px; }
}
