:root {
  /* 品牌核心（与登录页 --lp-* 同源） */
  --accent:#0B63F6; --accent-hover:#0A55D8; --accent-active:#0846B4;
  /* 品牌蓝紫渐变（与 logo / My·主页一致）：所有实心主按钮统一 */
  --accent-grad:linear-gradient(135deg, #0B63F6 0%, #4F46E5 52%, #7C3AED 100%);
  --avatar-grad:linear-gradient(135deg, #EEF2FF, #EDE9FE); --avatar-ink:#4F46E5;
  /* 卡片数字/边框统一蓝紫（与 logo、按钮同源） */
  --card-grad:linear-gradient(135deg, #0B63F6, #4F46E5 55%, #7C3AED);
  --card-border:#D8C7FB;
  --accent-soft:#E5EEFF; --accent-soft-2:#F1F6FF; --accent-line:#9DC0FF;
  --accent-mid:#7FA8F5; --on-accent:#FFFFFF;
  --brand-cyan:#29C7E4; --brand-cyan-soft:#E7F8FC;
  --focus:#0A55D8; --accent-focus:var(--focus); --focus-ring:0 0 0 3px rgba(10,85,216,.20);

  /* 中性冷灰 */
  --bg:#F6F9FD; --surface:#FFFFFF; --surface-2:#F5F9FE; --surface-3:#EDF3FA;
  --line:#E3EAF0; --line-strong:#CBD7E0;
  --text:#1B2A38; --text-2:#5A6B78; --text-3:#627282; --placeholder:#9AA6B0; --track:#E9EEF2;

  /* 语义色（统一到品牌蓝紫青：完成/正向=青，提示/警告=紫，危险=红保留） */
  --ok:#0E9FB8; --ok-hover:#0B8399; --ok-soft:#E1F5F9; --ok-line:#A8DDE8;
  --warn:#7C3AED; --warn-hover:#6D28D9; --warn-soft:#F1EAFE; --warn-line:#CDB4FB;
  --danger:#F5222D; --danger-hover:#C81E28; --danger-solid:#F5222D; --danger-soft:#FEECEC; --danger-line:#F9C0C2;
  /* 亮眼展示红：替代原青色用于数字/金额/中标完成等正向展示，风格切换只改此处 */
  --shine:#F5222D; --shine-hover:#C81E28; --shine-soft:#FEECEC; --shine-line:#F9C0C2;
  --shine-deep:#C81E28; --shine-deep-soft:#FEECEC;
  /* 立场语义色（客户360联系人态度等）：支持紫 / 中立青 / 反对红；风格切换只需改这里 */
  --stance-support:var(--warn); --stance-support-b:var(--warn-line); --stance-support-bg:var(--warn-soft);
  --stance-neutral:var(--ok); --stance-neutral-b:var(--ok-line); --stance-neutral-bg:var(--ok-soft);
  --stance-oppose:var(--danger); --stance-oppose-b:var(--danger-line); --stance-oppose-bg:var(--danger-soft);
  --up:#F5222D; --down:#0E9FB8;

  /* 赢面（--must/--try 为别名，保留兼容） */
  --win-must:var(--shine); --win-must-soft:var(--shine-soft); --must:var(--win-must); --must-soft:var(--win-must-soft);
  --win-try:#7C3AED; --win-try-soft:#F1EAFE; --try:var(--win-try); --try-soft:var(--win-try-soft);

  /* 阶段 */
  --stage-active:#0B63F6; --stage-active-soft:#E5EEFF;
  --stage-won:var(--shine); --stage-won-soft:var(--shine-soft);
  --stage-dead:#F5222D; --stage-dead-soft:#FEECEC;

  /* 时效 */
  --tdot-fresh:var(--shine); --tdot-week:#0B63F6; --tdot-half:#7C3AED; --tdot-stale:#F5222D;

  /* KPI 辅助 */
  --kpi-purple:#7C3AED; --kpi-purple-soft:#F0EAFE; --kpi-purple-line:#CDB4FB;
  --kpi-teal:var(--shine); --kpi-teal-soft:var(--shine-soft);

  /* 环形图：app.js 通过 --pie-<tone> 读取，改这里即全量生效，不碰 app.js */
  --pie-orange:#7C3AED; --pie-orange-soft:#F1EAFE;
  --pie-blue:#0B63F6; --pie-blue-soft:#E3EEFF;
  --pie-green:var(--shine); --pie-green-soft:var(--shine-soft);
  --pie-red:#F5222D; --pie-red-soft:#FFDFDF;
  --pie-none:#CBD7E0; --pie-none-soft:#EDF1F4;

  /* 视角标识 */
  --role-team:#0B63F6; --role-person:#7C3AED; --role-readonly:#627282;

  /* 圆角阶梯 */
  --radius-xs:4px; --radius-sm:6px; --radius-control:8px; --radius:10px; --radius-lg:12px; --radius-pill:999px;

  /* 阴影阶梯（品牌深蓝 rgba） */
  --shadow-xs:0 1px 2px rgba(27,42,56,.04);
  --shadow:0 1px 2px rgba(27,42,56,.04), 0 4px 14px rgba(27,42,56,.05);
  --shadow-hover:0 6px 20px rgba(27,42,56,.10);
  --shadow-pop:0 12px 32px rgba(27,42,56,.16);

  /* 间距 4px 栅格 */
  --sp-1:4px; --sp-2:8px; --sp-3:12px; --sp-4:16px; --sp-5:20px; --sp-6:24px; --sp-8:32px;
  --page-pad:24px; --card-pad:16px;

  /* 字体排印 */
  --font-sans:-apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI","PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
  --fs-11:11px; --fs-12:12px; --fs-13:13px; --fs-14:14px; --fs-16:16px; --fs-18:18px; --fs-24:24px;

  /* ===== 语义别名层：把散落的硬编码色收编到这里，风格切换只改这一层 ===== */
  /* 纯白/纯黑 → 语义 */
  --white:#FFFFFF; --black:#000000;
  --on-color:#FFFFFF;               /* 彩色实底上的前景文字 */
  --accent-edge:#4F46E5;            /* 渐变按钮/激活态描边 */
  --accent-grad-soft:linear-gradient(90deg,#F1EAFE,#FFFFFF);  /* 浅紫→白 标题条 */
  /* 表面浅底（表单/卡片/表头/回收站） */
  --surface-input:#FFFFFF;          /* 输入框/下拉底 */
  --surface-hover:#F8FAFC;          /* 浅灰悬停底 */
  --surface-blue-1:#F1F7FF; --surface-blue-2:#EAF2FD; --surface-blue-3:#DCE6FF;
  --surface-green:#EAF9F2; --surface-purple:#F5F1FE;
  --table-head-bg:#EAF2FD; --table-head-ink:#0F4793;
  --table-head-grad:linear-gradient(90deg,#6E90EE 12%,#7C6BEC 55%,#9163E8 100%);  /* 表头整条蓝紫渐变，风格切换只改此处 */
  /* 危险语义（风险预警/回收站红） */
  --risk-red:#DC2626; --risk-red-ink:#B42318; --risk-red-bg:#FDECEC; --risk-red-line:#F6C6C6;
  --risk-amber:#B45309; --risk-amber-ink:#9A4C12; --risk-amber-bg:#FEF3E2; --risk-amber-line:#F2B97E;
  --risk-yellow-ink:#A16207; --risk-yellow-bg:#FEF9E7; --risk-yellow-line:#F2D68A;
  /* 紫系（回收站/星标/浅紫底） */
  --purple-soft:#F3EEFF; --purple-soft-2:#F7F3FF; --purple-ink:#6D28D9; --purple-deep:#5B21B6; --purple-faint:#6B5B8A;
  --purple-row:#FDFCFF; --purple-row-hover:#F7F3FF; --purple-row-alt:#FFFCF8;
  /* KPI 四卡语义浅底 */
  --kpi-blue-bg:#F1F7FF; --kpi-green-bg:#EAF9F2; --kpi-purple-bg:#F5F1FE;
  /* 登录页细节色（--lp-* 体系补充） */
  --lp-on:#FFFFFF; --lp-ring:#FFFFFF;
}

/* ===== 风格切换：html[data-theme] 覆盖层 =====
   内置五套：品牌蓝紫(默认 brand，无需 data-theme) / 春绿 spring /
   夏蓝 summer / 秋黄 autumn / 冬雪 winter。
   切换风格 = 给 <html> 设置 data-theme，只需在对应覆盖层重写语义变量，
   组件/字段/卡片/弹窗/按钮/表头/客户360 全部自动联动，零组件改动。
   新增风格：复制 :root 的语义别名层到此处改色值 + theme.js 注册一项即可。
*/
html[data-theme="spring"] {
  /* ===== 春绿主题：全系统语义变量一次覆盖，组件层零改动 ===== */
  --accent:#16A34A; --accent-hover:#15803D; --accent-active:#166534; --accent-mid:#4ADE80; --accent-edge:#16A34A;
  --accent-grad:linear-gradient(135deg, #16A34A 0%, #22C55E 52%, #0D9488 100%);
  --card-grad:linear-gradient(135deg, #16A34A, #22C55E 55%, #0D9488);
  --avatar-grad:linear-gradient(135deg,#F1FBF3,#E7F7EC); --avatar-ink:#166534;
  --accent-soft:#E7F7EC; --accent-soft-2:#F1FBF3; --accent-line:#A7DFB8; --accent-grad-soft:linear-gradient(90deg,#E7F7EC,#FFFFFF);
  --brand-cyan:#0EA5A0; --brand-cyan-soft:#E3F7F4; --on-accent:#FFFFFF;
  --focus:#15803D; --accent-focus:var(--focus); --focus-ring:0 0 0 3px #A7DFB8;
  --card-border:#B7E4C7;
  --ok:#0D9488; --ok-hover:#0D9488; --ok-soft:#E3F7F4; --ok-line:#A7DED6;
  --warn:#16A34A; --warn-hover:#15803D; --warn-soft:#E7F7EC; --warn-line:#A7DFB8;
  --shine:#16A34A; --shine-hover:#0F7A46; --shine-soft:#E7F7EC; --shine-line:#A7DFB8; --shine-deep:#0F7A46; --shine-deep-soft:#E7F7EC;
  --stance-support:#16A34A; --stance-support-b:#A7DFB8; --stance-support-bg:#E7F7EC;
  --stance-neutral:#0891B2; --stance-neutral-b:#A5E3EE; --stance-neutral-bg:#E4F7FB;
  --stance-oppose:#F5222D; --stance-oppose-b:#F9C0C2; --stance-oppose-bg:#FEECEC;
  --up:#F5222D; --down:#0D9488;
  --win-must:var(--shine); --win-must-soft:var(--shine-soft); --must:var(--win-must); --must-soft:var(--win-must-soft);
  --win-try:#0D9488; --win-try-soft:#E3F7F4; --try:var(--win-try); --try-soft:var(--win-try-soft);
  --stage-active:#16A34A; --stage-active-soft:#E7F7EC; --stage-won:var(--shine); --stage-won-soft:var(--shine-soft);
  --tdot-fresh:var(--shine); --tdot-week:#16A34A; --tdot-half:#0D9488; --tdot-stale:#F5222D;
  --kpi-purple:#0D9488; --kpi-purple-soft:#E3F7F4; --kpi-purple-line:#A7DED6;
  --kpi-teal:var(--shine); --kpi-teal-soft:var(--shine-soft);
  --pie-orange:#0D9488; --pie-orange-soft:#E3F7F4; --pie-blue:#16A34A; --pie-blue-soft:#E7F7EC;
  --pie-green:var(--shine); --pie-green-soft:var(--shine-soft);
  --role-team:#16A34A; --role-person:#0D9488;
  --table-head-grad:linear-gradient(90deg, #7FD8A4 12%, #5FC99B 55%, #3FB79E 100%);
  --surface-blue-1:#F1FBF3; --surface-blue-2:#E7F7EC; --surface-blue-3:#A7DFB8;
  --surface-green:#E3F7F4; --surface-purple:#E3F7F4;
  --kpi-blue-bg:#F1FBF3; --kpi-green-bg:#E3F7F4; --kpi-purple-bg:#E7F7EC;
  --purple-soft:#E3F7F4; --purple-soft-2:#F1FBF3; --purple-ink:#166534; --purple-deep:#0D9488;
  --risk-red:#DC2626; --risk-red-ink:#B42318; --risk-red-bg:#FDECEC; --risk-red-line:#F6C6C6;
}

html[data-theme="summer"] {
  /* ===== 夏蓝主题：全系统语义变量一次覆盖，组件层零改动 ===== */
  --accent:#0284C7; --accent-hover:#0369A1; --accent-active:#075985; --accent-mid:#7DD3FC; --accent-edge:#0284C7;
  --accent-grad:linear-gradient(135deg, #0284C7 0%, #2563EB 52%, #4F46E5 100%);
  --card-grad:linear-gradient(135deg, #0284C7, #2563EB 55%, #4F46E5);
  --avatar-grad:linear-gradient(135deg,#F1F8FE,#E4F3FD); --avatar-ink:#075985;
  --accent-soft:#E4F3FD; --accent-soft-2:#F1F8FE; --accent-line:#A5D4F0; --accent-grad-soft:linear-gradient(90deg,#E4F3FD,#FFFFFF);
  --brand-cyan:#06B6D4; --brand-cyan-soft:#E0F7FC; --on-accent:#FFFFFF;
  --focus:#0369A1; --accent-focus:var(--focus); --focus-ring:0 0 0 3px #A5D4F0;
  --card-border:#B9D9F2;
  --ok:#0891B2; --ok-hover:#0891B2; --ok-soft:#E0F7FC; --ok-line:#A5E3EE;
  --warn:#2563EB; --warn-hover:#1D4ED8; --warn-soft:#E8EFFE; --warn-line:#B9CDF7;
  --shine:#0284C7; --shine-hover:#075985; --shine-soft:#E4F3FD; --shine-line:#A5D4F0; --shine-deep:#075985; --shine-deep-soft:#E4F3FD;
  --stance-support:#0284C7; --stance-support-b:#A5D4F0; --stance-support-bg:#E4F3FD;
  --stance-neutral:#7C3AED; --stance-neutral-b:#CDB4FB; --stance-neutral-bg:#F1EAFE;
  --stance-oppose:#F5222D; --stance-oppose-b:#F9C0C2; --stance-oppose-bg:#FEECEC;
  --up:#F5222D; --down:#0891B2;
  --win-must:var(--shine); --win-must-soft:var(--shine-soft); --must:var(--win-must); --must-soft:var(--win-must-soft);
  --win-try:#4F46E5; --win-try-soft:#EEF0FE; --try:var(--win-try); --try-soft:var(--win-try-soft);
  --stage-active:#0284C7; --stage-active-soft:#E4F3FD; --stage-won:var(--shine); --stage-won-soft:var(--shine-soft);
  --tdot-fresh:var(--shine); --tdot-week:#0284C7; --tdot-half:#4F46E5; --tdot-stale:#F5222D;
  --kpi-purple:#4F46E5; --kpi-purple-soft:#EEF0FE; --kpi-purple-line:#C7CDF7;
  --kpi-teal:var(--shine); --kpi-teal-soft:var(--shine-soft);
  --pie-orange:#4F46E5; --pie-orange-soft:#EEF0FE; --pie-blue:#0284C7; --pie-blue-soft:#E4F3FD;
  --pie-green:var(--shine); --pie-green-soft:var(--shine-soft);
  --role-team:#0284C7; --role-person:#4F46E5;
  --table-head-grad:linear-gradient(90deg, #7FB8F0 12%, #6A9DEC 55%, #5B86E8 100%);
  --surface-blue-1:#F1F8FE; --surface-blue-2:#E4F3FD; --surface-blue-3:#A5D4F0;
  --surface-green:#E0F7FC; --surface-purple:#EEF0FE;
  --kpi-blue-bg:#F1F8FE; --kpi-green-bg:#E0F7FC; --kpi-purple-bg:#E4F3FD;
  --purple-soft:#EEF0FE; --purple-soft-2:#F1F8FE; --purple-ink:#075985; --purple-deep:#4F46E5;
  --risk-red:#DC2626; --risk-red-ink:#B42318; --risk-red-bg:#FDECEC; --risk-red-line:#F6C6C6;
}

html[data-theme="autumn"] {
  /* ===== 秋黄主题：全系统语义变量一次覆盖，组件层零改动 ===== */
  --accent:#D97706; --accent-hover:#B45309; --accent-active:#92400E; --accent-mid:#FBBF24; --accent-edge:#D97706;
  --accent-grad:linear-gradient(135deg, #D97706 0%, #EA580C 52%, #F59E0B 100%);
  --card-grad:linear-gradient(135deg, #D97706, #EA580C 55%, #F59E0B);
  --avatar-grad:linear-gradient(135deg,#FFF9EF,#FEF3E2); --avatar-ink:#92400E;
  --accent-soft:#FEF3E2; --accent-soft-2:#FFF9EF; --accent-line:#F2D39B; --accent-grad-soft:linear-gradient(90deg,#FEF3E2,#FFFFFF);
  --brand-cyan:#EA580C; --brand-cyan-soft:#FEF0E6; --on-accent:#FFFFFF;
  --focus:#B45309; --accent-focus:var(--focus); --focus-ring:0 0 0 3px #F2D39B;
  --card-border:#EFD3A6;
  --ok:#C2410C; --ok-hover:#C2410C; --ok-soft:#FEF0E6; --ok-line:#F3C4A6;
  --warn:#D97706; --warn-hover:#B45309; --warn-soft:#FEF3E2; --warn-line:#F2D39B;
  --shine:#EA580C; --shine-hover:#B45309; --shine-soft:#FEF0E6; --shine-line:#F3C4A6; --shine-deep:#B45309; --shine-deep-soft:#FEF0E6;
  --stance-support:#D97706; --stance-support-b:#F2D39B; --stance-support-bg:#FEF3E2;
  --stance-neutral:#0D9488; --stance-neutral-b:#A7DED6; --stance-neutral-bg:#E3F7F4;
  --stance-oppose:#DC2626; --stance-oppose-b:#F9C0C2; --stance-oppose-bg:#FEECEC;
  --up:#F5222D; --down:#C2410C;
  --win-must:var(--shine); --win-must-soft:var(--shine-soft); --must:var(--win-must); --must-soft:var(--win-must-soft);
  --win-try:#EA580C; --win-try-soft:#FEF0E6; --try:var(--win-try); --try-soft:var(--win-try-soft);
  --stage-active:#D97706; --stage-active-soft:#FEF3E2; --stage-won:var(--shine); --stage-won-soft:var(--shine-soft);
  --tdot-fresh:var(--shine); --tdot-week:#D97706; --tdot-half:#EA580C; --tdot-stale:#F5222D;
  --kpi-purple:#C2410C; --kpi-purple-soft:#FEF0E6; --kpi-purple-line:#F3C4A6;
  --kpi-teal:var(--shine); --kpi-teal-soft:var(--shine-soft);
  --pie-orange:#EA580C; --pie-orange-soft:#FEF0E6; --pie-blue:#D97706; --pie-blue-soft:#FEF3E2;
  --pie-green:var(--shine); --pie-green-soft:var(--shine-soft);
  --role-team:#D97706; --role-person:#EA580C;
  --table-head-grad:linear-gradient(90deg, #F0BC72 12%, #EAA85E 55%, #E09448 100%);
  --surface-blue-1:#FFF9EF; --surface-blue-2:#FEF3E2; --surface-blue-3:#F2D39B;
  --surface-green:#FEF0E6; --surface-purple:#FEF0E6;
  --kpi-blue-bg:#FFF9EF; --kpi-green-bg:#FEF0E6; --kpi-purple-bg:#FEF3E2;
  --purple-soft:#FEF0E6; --purple-soft-2:#FFF9EF; --purple-ink:#92400E; --purple-deep:#EA580C;
  --risk-red:#DC2626; --risk-red-ink:#B42318; --risk-red-bg:#FDECEC; --risk-red-line:#F6C6C6;
}

html[data-theme="winter"] {
  /* ===== 冬雪主题：全系统语义变量一次覆盖，组件层零改动 ===== */
  --accent:#475569; --accent-hover:#334155; --accent-active:#1E293B; --accent-mid:#94A3B8; --accent-edge:#475569;
  --accent-grad:linear-gradient(135deg, #475569 0%, #64748B 52%, #94A3B8 100%);
  --card-grad:linear-gradient(135deg, #475569, #64748B 55%, #94A3B8);
  --avatar-grad:linear-gradient(135deg,#F5F8FB,#EEF2F6); --avatar-ink:#334155;
  --accent-soft:#EEF2F6; --accent-soft-2:#F5F8FB; --accent-line:#C8D3DE; --accent-grad-soft:linear-gradient(90deg,#EEF2F6,#FFFFFF);
  --brand-cyan:#64748B; --brand-cyan-soft:#EEF2F6; --on-accent:#FFFFFF;
  --focus:#334155; --accent-focus:var(--focus); --focus-ring:0 0 0 3px #C8D3DE;
  --card-border:#D4DEE8;
  --ok:#0E7490; --ok-hover:#0E7490; --ok-soft:#E4F2F6; --ok-line:#A9D5E2;
  --warn:#475569; --warn-hover:#334155; --warn-soft:#EEF2F6; --warn-line:#C8D3DE;
  --shine:#475569; --shine-hover:#1E293B; --shine-soft:#EEF2F6; --shine-line:#C8D3DE; --shine-deep:#1E293B; --shine-deep-soft:#EEF2F6;
  --stance-support:#475569; --stance-support-b:#C8D3DE; --stance-support-bg:#EEF2F6;
  --stance-neutral:#0E7490; --stance-neutral-b:#A9D5E2; --stance-neutral-bg:#E4F2F6;
  --stance-oppose:#DC2626; --stance-oppose-b:#F9C0C2; --stance-oppose-bg:#FEECEC;
  --up:#F5222D; --down:#0E7490;
  --win-must:var(--shine); --win-must-soft:var(--shine-soft); --must:var(--win-must); --must-soft:var(--win-must-soft);
  --win-try:#64748B; --win-try-soft:#EEF2F6; --try:var(--win-try); --try-soft:var(--win-try-soft);
  --stage-active:#475569; --stage-active-soft:#EEF2F6; --stage-won:var(--shine); --stage-won-soft:var(--shine-soft);
  --tdot-fresh:var(--shine); --tdot-week:#475569; --tdot-half:#64748B; --tdot-stale:#F5222D;
  --kpi-purple:#475569; --kpi-purple-soft:#EEF2F6; --kpi-purple-line:#C8D3DE;
  --kpi-teal:var(--shine); --kpi-teal-soft:var(--shine-soft);
  --pie-orange:#64748B; --pie-orange-soft:#EEF2F6; --pie-blue:#475569; --pie-blue-soft:#EEF2F6;
  --pie-green:var(--shine); --pie-green-soft:var(--shine-soft);
  --role-team:#475569; --role-person:#64748B;
  --table-head-grad:linear-gradient(90deg, #AFC0D0 12%, #9FB2C4 55%, #8FA4B8 100%);
  --surface-blue-1:#F5F8FB; --surface-blue-2:#EEF2F6; --surface-blue-3:#C8D3DE;
  --surface-green:#E4F2F6; --surface-purple:#EEF2F6;
  --kpi-blue-bg:#F5F8FB; --kpi-green-bg:#E4F2F6; --kpi-purple-bg:#EEF2F6;
  --purple-soft:#EEF2F6; --purple-soft-2:#F5F8FB; --purple-ink:#1E293B; --purple-deep:#64748B;
  --risk-red:#DC2626; --risk-red-ink:#B42318; --risk-red-bg:#FDECEC; --risk-red-line:#F6C6C6;
}



* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.01em; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 60px;
  padding: 0 24px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo { display: block; height: 36px; width: auto; }
.brand-word-top { font-size: 24px; letter-spacing: 0; white-space: nowrap; }
.brand .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.brand h1 { font-size: 16px; }

.topbar-right { display: flex; align-items: center; gap: 10px; }

.meta-chip {
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}

/* ---------- 按钮 ---------- */
.btn {
  height: 34px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 13.5px;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .06s;
  white-space: nowrap;
}
.btn:hover { background: var(--surface-2); border-color: var(--accent-line); color: var(--accent); }
.btn:active { transform: translateY(1px); }
.btn.primary {
  background: var(--accent-grad);
  border-color: var(--accent-edge);
  color: var(--on-accent);
  font-weight: 500;
}
.btn.primary:hover { background: var(--accent-grad); border-color: var(--accent-edge); color: var(--on-accent); filter: brightness(1.07); box-shadow: 0 3px 10px rgba(79,70,229,.28); }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12.5px; }

/* ---------- 布局 ---------- */
.wrap {
  max-width: 1360px;
  margin: 0 auto;
  padding: 20px 24px 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ---------- KPI ---------- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

/* 全年完成业绩卡内嵌月份筛选 */
.kpi-mini-sel {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text-2);
  font: inherit;
  font-size: 11px;
  padding: 2px 4px;
  max-width: 82px;
  cursor: pointer;
}
.kpi-mini-sel:hover { border-color: var(--accent-line); color: var(--accent); }

.kpi {
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.kpi-label { font-size: 12px; color: var(--text-2); margin-bottom: 6px; }
.kpi-value {
  font-size: 24px;
  font-weight: 650;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  background: var(--card-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: var(--accent-edge);
}
.kpi-value.accent { color: var(--accent); }
.kpi-sub { font-size: 12px; color: var(--text-3); margin-top: 4px; }

/* 当前自然季度：月度拆分 */
.kpi-quarter .kpi-value { margin-bottom: 7px; }
.q-month-split { display: flex; flex-direction: column; gap: 4px; margin: 2px 0 5px; }
.qm-row { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--text-2); }
.qm-row.qm-click { cursor: pointer; border-radius: 5px; padding: 1px 4px; margin: 0 -4px; transition: background .14s; }
.qm-row.qm-click:hover { background: var(--accent-soft-2); }
.qm-row.qm-click:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.qm-row.is-current .qm-name, .qm-row.is-current .qm-amt { color: var(--accent); font-weight: 650; }
.qm-name { width: 32px; flex: none; font-variant-numeric: tabular-nums; }
.qm-track { flex: 1; height: 5px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.qm-track i { display: block; height: 100%; border-radius: 99px; background: var(--accent-mid); }
.qm-row.is-current .qm-track i { background: var(--accent); }
.qm-amt { min-width: 52px; text-align: right; font-variant-numeric: tabular-nums; font-weight: 550; color: var(--text); }
.q-cur-label { fill: var(--accent); font-weight: 650; }

/* 可点击 KPI（存量商机 → 全部商机） */
.kpi-link { position: relative; cursor: pointer; transition: box-shadow .16s, border-color .16s, transform .16s; }
.kpi-link:hover { border-color: var(--kpi-purple-line); box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.kpi-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.kpi-link .kpi-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kpi-go { font-size: 11px; font-weight: 500; color: var(--accent); white-space: nowrap; opacity: .75; transition: opacity .16s; }
.kpi-link:hover .kpi-go { opacity: 1; }

/* 金额按赢面拆分（必拿 / 力争） */
.amt-split { display: flex; gap: 10px; }
.amt-col {
  flex: 1; min-width: 0;
  padding: 3px 7px; margin: -3px -7px;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s;
}
.amt-col:hover { background: var(--accent-soft-2); }
.amt-col:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.amt-col-label { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--text-3); margin-bottom: 3px; }
.amt-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.amt-dot.must { background: var(--shine); }
.amt-dot.try { background: var(--shine-deep); }
.amt-col-value { font-size: 18.5px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.amt-col-value.must { color: var(--shine); }
.amt-col-value.try { color: var(--shine-deep); }

.progress {
  margin-top: 9px;
  height: 6px;
  border-radius: 99px;
  background: var(--track);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 99px;
  background: var(--accent);
  transition: width .5s cubic-bezier(.22, .61, .36, 1);
}

/* ---------- 面板 ---------- */
.panel-row {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 14px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 17px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.trash-cust-panel { margin-top: 18px; }
.panel-head h2 { font-size: 14px; }
.hint { font-size: 12px; color: var(--text-3); }

/* ---------- 漏斗 ---------- */
.funnel { padding: 16px 17px 18px; display: flex; flex-direction: column; gap: 13px; }

.fn-row { display: grid; grid-template-columns: 78px 1fr 96px; align-items: center; gap: 12px; }
.fn-name { font-size: 13px; color: var(--text-2); }
.fn-track { height: 20px; background: var(--bg); border-radius: 6px; overflow: hidden; }
.fn-bar {
  height: 100%;
  border-radius: 6px;
  transition: width .55s cubic-bezier(.22, .61, .36, 1);
}
.fn-val {
  font-size: 12.5px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  white-space: nowrap;
}
.fn-val small { color: var(--text-3); font-size: 11.5px; }

/* ---------- 趋势 ---------- */
.trend { padding: 14px 17px 16px; }
.trend svg { display: block; width: 100%; height: auto; }
.tr-label { font-size: 11px; fill: var(--text-3); }
.tr-value { font-size: 11px; fill: var(--text-2); font-weight: 600; }

/* ---------- 筛选 ---------- */
.filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filters input[type="search"],
.filters select {
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface);
  font-family: inherit;
  font-size: 12.5px;
  color: var(--text);
  outline: none;
}
.filters input[type="search"] { width: 200px; }
.filters input:focus, .filters select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  position: sticky;
  top: 0;
  z-index: 10;
  /* 整条连续渐变：所有 th 共享同一视口渐变坐标，不再一段一段；淡蓝紫底+深蓝紫字 */
  background-image: var(--table-head-grad);
  background-attachment: fixed;
  text-align: left;
  font-weight: 600;
  font-size: 12px;
  color: #FFFFFF;
  padding: 9px 12px;
  border-bottom: 1px solid rgba(255,255,255,.35);
  white-space: nowrap;
}
tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
tbody tr:hover { background: var(--surface-2); }
tbody tr:last-child td { border-bottom: none; }

.num { text-align: right; font-variant-numeric: tabular-nums; }
/* 预计发标 / 项目阶段：表头与内容统一居中对齐 */
thead th.w-bid, thead th.w-stage { text-align: center; }
.w-stage { width: 116px; }
.w-bid { width: 112px; }
.stage-cell { min-width: 108px; vertical-align: middle; text-align: center; }
.stage-cell .stage-sel { width: 100%; max-width: 100%; }
.bid-cell { vertical-align: middle; text-align: center; }
.bid-input {
  display: block; width: 100%; min-width: 92px; box-sizing: border-box;
  min-height: 30px; padding: 5px 6px; border: 1px solid transparent; border-radius: 6px;
  background: var(--bg); color: var(--text); font: inherit;
  font-size: 11.5px; font-weight: 600; text-align: center; line-height: 1.45;
  resize: none; overflow: hidden; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word;
  cursor: text; outline: none;
}
.bid-input::placeholder { color: var(--text-3); font-weight: 400; }
.bid-input:hover { border-color: var(--accent-mid); background: var(--accent-soft-2); }
.bid-input:focus { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 2px var(--accent-soft); }
.w-act { width: 84px; white-space: nowrap; }

.cust { font-weight: 550; }
.sub { font-size: 11.5px; color: var(--text-3); }
.amt { font-weight: 600; font-variant-numeric: tabular-nums; }
/* 表格「客户」「商机」名称统一同款样式；客户名可点击看档案 */
.cust-link, span.cust-name {
  display: block; font-size: 13px; font-weight: 550; color: var(--text);
  line-height: 1.45; text-align: left; overflow-wrap: anywhere; word-break: break-word;
}
.cust-link {
  padding: 0; border: none; background: transparent; cursor: pointer; font-family: inherit;
}
.cust-link:hover { color: var(--accent); text-decoration: underline; }
.cust-name { color: var(--text); }
/* 客户表/回收站的客户名是 <td>，必须保持 table-cell：
   否则被上面的 span 规则改成 block 后单元格变矮，下边框线与同行其他列不齐 */
td.cust-name { display: table-cell; font-weight: 600; }
/* 进展/下一步：可直接编辑，聚焦时末尾出现打勾按钮，点击即完成保存 */
.opp-edit-wrap { position: relative; }
.opp-editable { cursor: text; outline: none; border: 1px solid transparent; border-radius: 6px;
  padding: 3px 6px; margin: -3px -6px; min-height: 22px; transition: background .12s, border-color .12s; }
.opp-editable:hover { background: var(--accent-soft-2); border-color: var(--accent-soft); }
.opp-editable:focus { background: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); padding-right: 32px; }
.opp-editable:empty::before { content: attr(data-ph); color: var(--text-3); font-weight: 400; }
.opp-check {
  display: none; position: absolute; right: -2px; top: 50%; transform: translateY(-50%);
  width: 25px; height: 25px; padding: 0; border: 0; background: transparent;
  color: var(--accent); font-size: 19px; font-weight: 700;
  line-height: 25px; text-align: center; cursor: pointer;
  transition: color .12s, transform .12s;
}
.opp-edit-wrap:focus-within .opp-check { display: block; }
.opp-check:hover { color: var(--accent-hover); }
.opp-check:active { transform: translateY(-50%) scale(.9); }

.stage-select {
  width: 100%;
  height: 28px;
  padding: 0 6px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 550;
  cursor: pointer;
  appearance: none;
  text-align: center;
}
.stage-select:hover { border-color: var(--line-strong); }
.stage-select:focus { outline: none; border-color: var(--accent); }

.act-btn {
  width: 26px; height: 26px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}
.act-btn:hover { background: var(--surface-2); color: var(--text); }
.act-btn.del:hover { background: var(--danger-soft); color: var(--danger); }

.overdue { color: var(--danger); font-weight: 550; }

.empty { padding: 44px; text-align: center; color: var(--text-3); font-size: 13px; }

/* ---------- 弹窗 ---------- */
.mask[hidden] { display: none !important; }

.mask {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(27,42,56,.38);
  backdrop-filter: blur(2px);
  animation: fade .16s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.dialog {
  width: 100%;
  max-width: 700px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-pop);
  animation: pop .18s cubic-bezier(.22, .61, .36, 1);
}
.dialog.sm { max-width: 380px; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: none; } }

.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.dialog-head h3 { font-size: 16px; font-weight: 600; }
/* 商机详情标题：客户名 / 项目名分两行，均可点击跳转 */
#dlgDetailTitle { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; font-size: 15px; }
/* 项目名与客户名同字号同字重；销售人员信息右对齐 */
#dlgDetailTitle .dt-cust, #dlgDetailTitle .dt-name { font-size: 15px; font-weight: 650; color: var(--text); }
.detail-dialog-head { align-items: flex-start; }
.detail-head-side { display: flex; align-items: center; gap: 12px; margin-left: auto; padding-top: 1px; }
.detail-head-side #dlgDetailSub { text-align: right; }
.text-link { border: 0; background: none; padding: 0; margin: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; line-height: 1.35; }
.text-link:hover { color: var(--accent); text-decoration: underline; }
.opp-cust-link { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.x {
  width: 28px; height: 28px;
  border: none;
  background: transparent;
  color: var(--text-3);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  border-radius: 6px;
}
.x:hover { background: var(--surface-2); color: var(--text); }

.dialog-body { padding: 18px 20px; overflow-y: auto; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }

/* 系统模板生成的新增/编辑表单：两列布局，长文本跨整行 */
.tpl-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; padding: 16px 22px 22px; }
.tpl-form label.wide { grid-column: 1 / -1; }
.tpl-group {
  grid-column: 1 / -1;
  display: flex; align-items: center; gap: 9px;
  margin: 10px 0 2px;
  font-size: 12px; font-weight: 600; letter-spacing: .4px; color: var(--text);
}
.tpl-group:first-child { margin-top: 0; }
.tpl-group > span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 19px; padding: 0 5px;
  border-radius: 5px; background: var(--accent-soft); color: var(--accent);
  font-size: 10px; font-weight: 700; letter-spacing: 0;
}
.tpl-group::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.fld-hint { font-size: 11px; color: var(--text-3); font-weight: 400; line-height: 1.3; }
/* 折扣率：自动计算只读框 */
.calc-field { background: var(--bg); color: var(--accent); font-weight: 600; cursor: default; }
.calc-field::placeholder { color: var(--text-3); font-weight: 400; }
/* 商机客户名称：只能从档案选择，旁边可直接新建客户 */
.cust-picker { display: flex; align-items: center; gap: 8px; }
.cust-picker select { flex: 1; min-width: 0; }
.cust-picker .btn { flex: 0 0 auto; white-space: nowrap; }
.cust-picker .btn[hidden] { display: none; }
.cust-picker select:disabled { background: var(--bg); color: var(--text-2); cursor: not-allowed; }
@media (max-width: 720px) {
  .tpl-form { grid-template-columns: 1fr; padding: 14px 16px 18px; }
  .tpl-form label.wide { grid-column: auto; }
}

/* 后续计划：输入框 + 时间轴历史 */
.plan-wrap { display: flex; flex-direction: column; gap: 6px; }
.tl-toggle {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--text-2);
  font-size: 11.5px; line-height: 1; padding: 5px 9px; border-radius: 7px; cursor: pointer;
}
.tl-toggle:hover { border-color: var(--accent); color: var(--accent); }
.tl-toggle .tl-caret { font-style: normal; font-size: 10px; display: inline-block; transition: transform .15s; }
.tl-toggle[aria-expanded="true"] .tl-caret { transform: rotate(90deg); }
.tl-toggle .tl-count {
  min-width: 16px; text-align: center; padding: 1px 5px; border-radius: 9px;
  background: var(--accent-soft); color: var(--accent); font-size: 10px; font-variant-numeric: tabular-nums;
}
.tl-panel { display: flex; flex-direction: column; gap: 6px; }
.tl-panel[hidden] { display: none; }
.plan-hint { font-size: 11px; color: var(--text-3); }
.plan-history {
  display: flex; flex-direction: column; gap: 8px;
  max-height: 230px; overflow-y: auto;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}
.ph-empty { font-size: 11.5px; color: var(--text-3); padding: 4px 0; }
.ph-item {
  position: relative;
  padding: 8px 10px 8px 13px;
  border-left: 2px solid var(--line-strong);
  border-radius: 0 6px 6px 0;
  background: var(--surface);
}
.ph-item.editing { border-left-color: var(--accent); background: var(--accent-soft); }
.ph-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.ph-time { font-size: 11px; font-weight: 600; color: var(--text-2); }
.ph-state { font-size: 10px; padding: 1px 6px; border-radius: 9px; }
.ph-state.open { color: var(--shine); background: var(--shine-soft); }
.ph-state.locked { color: var(--text-3); background: var(--surface-2); }
.ph-edit {
  border: 0; background: transparent; color: var(--accent);
  font-size: 10.5px; cursor: pointer; padding: 1px 3px;
}
.ph-edit:hover { text-decoration: underline; }
.ph-text { font-size: 12px; color: var(--text); line-height: 1.55; white-space: normal; }

/* 详情弹窗里的后续计划历史 */
.dp-item { padding: 6px 0 8px 11px; border-left: 2px solid var(--line-strong); margin-bottom: 7px; }
.dp-time { font-size: 11px; color: var(--text-3); margin-bottom: 3px; }
.dp-text { font-size: 12.5px; color: var(--text); line-height: 1.55; }

label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--text-2); }
label.full { margin-top: 13px; }
.fld-label {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-height: 18px;
  line-height: 18px;
}
.req { color: var(--danger); font-style: normal; }

label input, label select, label textarea {
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface);
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
label textarea { height: auto; padding: 8px 10px; resize: vertical; line-height: 1.5; }
label input:focus, label select:focus, label textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.dialog-foot {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 9px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: 0 0 12px 12px;
}
.dialog-foot .foot-spacer { flex: 1; }
.trash-table .btn.tiny { padding: 4px 12px; font-size: 12px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%) translateY(8px);
  z-index: 90;
  padding: 9px 18px;
  border-radius: 8px;
  background: var(--text);
  color: var(--on-color);
  font-size: 13px;
  opacity: 0;
  transition: opacity .2s, transform .2s;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: var(--danger); }

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .panel-row { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .wrap { padding: 14px 14px 32px; }
  .topbar { padding: 0 14px; height: auto; min-height: 56px; flex-wrap: wrap; }
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi-value { font-size: 20px; }
  .grid2 { grid-template-columns: 1fr; }
  .filters input[type="search"] { width: 100%; }
}

/* ================= 看板新增样式 ================= */

.year-chip {
  padding: 4px 22px 4px 10px;
  border: 1px solid var(--accent-line);
  border-radius: 8px;
  background: var(--accent-soft-2) url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath d='M2 4l3 3 3-3' stroke='%230B63F6' stroke-width='1.3' fill='none'/%3E%3C/svg%3E") no-repeat right 7px center;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  line-height: 1.4;
}
.year-chip:hover { background-color: var(--accent-soft); border-color: var(--accent-mid); }
.year-chip:focus { outline: 2px solid var(--accent-line); }
/* 年份下拉 + 版本号同一行：版本号作竖线分隔的弱化小字 */
.year-wrap { display: flex; flex-direction: row; align-items: center; gap: 8px; }
.version-chip {
  font-size: 10px; line-height: 1.2; color: var(--text-3, #94A3B8);
  white-space: nowrap; letter-spacing: .3px;
  padding-left: 8px; border-left: 1px solid var(--line);
}

.tabs {
  display: flex;
  gap: 2px;
  padding: 3px;
  background: var(--track);
  border-radius: 9px;
  min-width: 0;
}
.tab {
  position: relative;
  height: 28px;
  padding: 0 13px;
  flex: 0 0 auto;
  min-width: max-content;
  white-space: nowrap;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--text-2);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.tab:hover { color: var(--accent); background: var(--accent-soft); }
.tab.active {
  background: var(--surface);
  color: var(--accent);
  font-weight: 600;
  box-shadow: var(--shadow-xs);
}
/* 激活底框：logo 同款蓝紫渐变（伪元素承载渐变，box-shadow 不支持渐变） */
.tab.active::after {
  content: ""; position: absolute; left: 8px; right: 8px; bottom: 1px; height: 2px;
  border-radius: 2px; background: var(--accent-grad);
}
/* 导航 My logo 字：与 logo 保持同款字体（Futura 字体栈 + 倾斜），字号与 tab 一致 */
.tab .my-logo {
  display: inline-block;
  font-family: "Futura", "Avenir Next", "Avenir", "Trebuchet MS", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 700;
  letter-spacing: -.4px;
  transform: skewX(-5deg);
  transform-origin: center;
}
.tab .my-logo .brand-word-m { font-size: inherit; }
.tab .my-logo .brand-word-blue { font-size: inherit; }

/* 图例 */
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--text-3); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.lg-bar { width: 10px; height: 10px; border-radius: 2px; background: var(--accent); display: inline-block; }
.lg-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); display: inline-block; }

.chart-box { padding: 14px 18px 10px; }
.chart-box svg { display: block; width: 100%; height: auto; }

.ax-label { font-size: 11px; fill: var(--text-3); }
.ax-value { font-size: 10.5px; fill: var(--text-2); }
.ax-count { font-size: 10.5px; fill: var(--warn); font-weight: 600; }
.grid-line { stroke: var(--track); stroke-width: 1; }

/* 排行榜 */
.rank-table tbody tr { cursor: pointer; }
.rank-table tbody tr:hover { background: var(--accent-soft-2); }
.rank-table .w-no { width: 42px; }
.rank-table .q-col { width: 72px; }
.w-rate { width: 132px; }

.rank-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 21px; height: 21px;
  border-radius: 6px;
  background: var(--track);
  color: var(--text-2);
  font-size: 11.5px;
  font-weight: 600;
}
.rank-no.top1 { background: var(--warn-soft); color: var(--warn); }
.rank-no.top2 { background: var(--surface-2); color: var(--text-2); }
.rank-no.top3 { background: var(--warn-soft); color: var(--warn); }

.who { display: flex; flex-direction: column; gap: 1px; }
.who-name { font-weight: 600; }
.who-region { font-size: 11.5px; color: var(--text-3); }

.rate-cell { display: flex; align-items: center; gap: 8px; }
.rate-bar { flex: 1; height: 5px; border-radius: 99px; background: var(--track); overflow: hidden; min-width: 44px; }
.rate-fill { height: 100%; border-radius: 99px; }
.rate-num { font-size: 12px; font-variant-numeric: tabular-nums; width: 38px; text-align: right; font-weight: 600; }

.q-cell { font-variant-numeric: tabular-nums; font-size: 12.5px; color: var(--text-2); }
.q-cell.q-zero { color: var(--line-strong); }
.q-cell.q-good { color: var(--shine); font-weight: 600; }
.q-cell.q-bad { color: var(--danger-solid); }

/* 个人头 */
.person-head { display: flex; align-items: center; gap: 16px; }
.person-id { display: flex; align-items: center; gap: 11px; }
.avatar {
  width: 40px; height: 40px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--avatar-grad);
  color: var(--avatar-ink);
  font-size: 15px;
  font-weight: 650;
}
.person-name { font-size: 17px; font-weight: 650; letter-spacing: -.01em; }
.person-sub { font-size: 12.5px; color: var(--text-3); }

/* 季度卡 */
.q-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.q-card {
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 13px 15px;
  box-shadow: var(--shadow);
}
.q-card.now { border-color: var(--kpi-purple); box-shadow: 0 0 0 3px var(--kpi-purple-soft); }
.q-name { font-size: 12.5px; color: var(--text-2); display: flex; justify-content: space-between; align-items: center; }
.q-name em { font-style: normal; font-size: 11px; color: var(--text-3); }
.q-amount { font-size: 19px; font-weight: 650; margin-top: 5px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; background: var(--card-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: var(--accent-edge); }
.q-meta { font-size: 11.5px; color: var(--text-3); margin-top: 2px; font-variant-numeric: tabular-nums; }
.progress.sm { height: 4px; margin-top: 8px; }

/* 表格内小标签 */
.pill {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.6;
}

.filters .hint { margin-right: 4px; }

@media (max-width: 1080px) {
  .q-grid { grid-template-columns: repeat(2, 1fr); }
  .q-col { display: none; }
}
/* 顶栏：中窄屏 tab 横向滚动不换行、不挤压；视角 chip 纯装饰可让位 */
@media (max-width: 1280px) {
  .topbar-right { min-width: 0; }
  .tabs {
    flex: 1 1 auto;
    min-width: 0;
    gap: 1px;
    padding: 3px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { padding: 0 9px; font-size: 12.5px; min-width: max-content; }
  .user-menu, .user-meta { white-space: nowrap; flex: 0 0 auto; }
  body[data-role] .topbar-right::before,
  .topbar-right > .ui-role-chip { display: none; }
}
/* iPad 竖屏等中屏（681~1080）：顶栏换行、标签独占一行，避免 6 个 My 标签被右侧按钮挤压到只剩 2 个 */
@media (min-width: 681px) and (max-width: 1080px) {
  .topbar { height: auto; min-height: 56px; flex-wrap: wrap; gap: 8px 12px; }
  .topbar-right { flex-wrap: wrap; width: 100%; gap: 8px; }
  .tabs {
    order: -1;
    flex: 1 1 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { flex: 0 0 auto; padding: 0 12px; white-space: nowrap; }
}
@media (max-width: 680px) {
  .topbar { gap: 8px 12px; }
  .topbar-right { flex-wrap: wrap; width: 100%; gap: 8px; }
  .tabs {
    order: -1;
    flex: 1 1 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { flex: 0 0 auto; padding: 0 12px; white-space: nowrap; }
  .person-head { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* ================= v3：11-12月存量商机 ================= */

[hidden] { display: none !important; }

.split {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.seller-list {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: sticky;
  top: 76px;
}
/* 销售个人视角：左侧「商务列表」已在右上角账户卡片实现，此处不重复展示；
   仅销售角色隐藏，团队视角（admin/只读）保持原样。隐藏后右栏占满整宽。 */
body[data-role="sales"] #viewSeller .split { grid-template-columns: minmax(0, 1fr); }
body[data-role="sales"] #viewSeller .seller-list { display: none; }
.aside-head {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  color: var(--text-3);
  background: var(--surface-2);
}

.seller-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: none;
  border-bottom: 1px solid var(--surface-2);
  background: transparent;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background .14s;
}
.seller-item:last-child { border-bottom: none; }
.seller-item:hover { background: var(--surface-2); }
.seller-item.active {
  background: var(--accent-soft);
  box-shadow: inset 3px 0 0 var(--accent);
}

.seller-avatar {
  flex: 0 0 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
}
.seller-item.active .seller-avatar {
  background: var(--avatar-grad);
  color: var(--avatar-ink);
}

.seller-info { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.seller-name { font-size: 13.5px; font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 5px; }
.upd-badge {
  font-style: normal; font-size: 9.5px; font-weight: 600; line-height: 1;
  padding: 2px 4px; border-radius: 4px; color: var(--danger-solid); background: var(--warn-soft);
  flex: none;
}
.seller-sub { font-size: 11px; color: var(--text-3); white-space: nowrap; }

.seller-nums { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.seller-nums strong { font-size: 14px; font-variant-numeric: tabular-nums; }
.seller-nums small { font-size: 10.5px; color: var(--text-3); white-space: nowrap; }
/* 完成金额文字色跟随完成率档位（与进度环同色系） */
.kpi-done-amt { font-weight: 600; }
.kpi-done-amt.amt-orange { color: var(--pie-orange); }
.kpi-done-amt.amt-blue   { color: var(--accent); }
.kpi-done-amt.amt-green  { color: var(--shine); }
.kpi-done-amt.amt-red    { color: var(--danger-solid); }
.kpi-done-amt.amt-none   { color: var(--text-3); }
.kpi-win-count { font-size: 14px; }

/* KPI 完成率小饼图标签（高亮四档）—— pie 令牌统一由主 :root 定义 */
.kpi-pie-tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 6px 2px 3px; margin-bottom: 3px;
  border-radius: 999px; border: 1px solid transparent;
  font-size: 11px; line-height: 1; white-space: nowrap;
}
.kpi-pie-svg { width: 22px; height: 22px; flex: none; display: block; overflow: visible; }
.kpi-pie-num { font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.kpi-top-badge {
  font-style: normal; font-size: 9.5px; font-weight: 700;
  padding: 1px 4px; border-radius: 4px; color: var(--on-color); background: var(--pie-orange);
}
.kt-orange { color: var(--warn); background: var(--warn-soft); border-color: var(--warn-line); }
.kt-blue   { color: var(--accent); background: var(--accent-soft); border-color: var(--accent-line); }
.kt-green  { color: var(--shine); background: var(--shine-soft); border-color: var(--shine-line); }
.kt-red    { color: var(--danger); background: var(--danger-soft); border-color: var(--danger-line); }
.kt-none   { color: var(--text-2); background: var(--surface-2); border-color: var(--line); }

.seller-detail { min-width: 0; }
.detail-title { display: flex; align-items: center; gap: 10px; }
.avatar.sm { width: 32px; height: 32px; border-radius: 9px; font-size: 12px; }

/* 表格列宽 */
.w-m { width: 80px; }
.w-amt { width: 84px; }
.w-win { width: 76px; }
.w-owner { width: 92px; }

/* 销售商机总览：全部销售一张表 */
/* 销售商机总览：标题一行、筛选栏独占一行铺满，「+ 添加商机」按钮靠最右对齐 */
.seller-overview-panel .overview-head { flex-direction: column; align-items: stretch; gap: 10px; }
.seller-overview-panel .overview-head h2 { margin-bottom: 3px; }
.seller-overview-panel .overview-head .hint { font-size: 11.5px; color: var(--text-3); }
.seller-overview-panel .overview-head .filters { width: 100%; }
.seller-overview-panel .overview-head #btnAddOppTop { margin-left: auto; }

/* 商务列横排置顶、商机总览铺满整宽（团队视角；销售视角 seller-list 本就隐藏） */
#viewSeller .split { grid-template-columns: minmax(0, 1fr); }
#viewSeller .seller-list {
  position: static;
  border-radius: 14px;
  background: linear-gradient(180deg, var(--surface), var(--surface-blue-1));
}
#viewSeller .aside-head {
  display: flex; align-items: center; gap: 7px;
  padding: 12px 13px 8px; border-bottom: none; background: transparent;
}
#viewSeller .aside-head strong { font-size: 13px; font-weight: 700; color: var(--text); }
#viewSeller .aside-count {
  min-width: 20px; padding: 2px 7px; border-radius: var(--radius-pill);
  background: var(--accent-soft); color: var(--accent);
  font-size: 11px; font-weight: 700; text-align: center;
}
#viewSeller .aside-count::after { content: ' 人'; }
#viewSeller .aside-sort { margin-left: auto; font-size: 11px; color: var(--text-3); }
#viewSeller #sellerNav {
  display: grid; grid-template-columns: repeat(var(--seller-cols, 4), minmax(0, 1fr));
  gap: 10px; padding: 0 12px 12px;
}
#viewSeller .seller-item {
  position: relative; display: flex; flex-direction: column; gap: 9px;
  min-width: 0; min-height: 96px; padding: 11px 12px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
  box-shadow: var(--shadow-xs); text-align: left;
  transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
#viewSeller .seller-item:hover {
  transform: translateY(-1px); border-color: var(--accent-line);
  background: var(--surface-blue-1); box-shadow: var(--shadow-hover);
}
#viewSeller .seller-item.active {
  border-color: var(--accent);
  background: linear-gradient(145deg, var(--accent-soft-2), var(--surface));
  box-shadow: 0 0 0 1px var(--accent-soft), var(--shadow);
}
#viewSeller .seller-item.active::before {
  content: ''; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--accent-grad);
}
#viewSeller .seller-card-head { display: flex; align-items: center; gap: 9px; min-width: 0; }
#viewSeller .seller-card-head .seller-avatar { flex: 0 0 34px; height: 34px; border-radius: 10px; }
#viewSeller .seller-card-head .seller-info { flex: 1; min-width: 0; }
/* 姓名完整显示且居中，不再被完成率圆环挤压截断 */
#viewSeller .seller-name-text { white-space: nowrap; }
#viewSeller .seller-card-head .seller-info { align-items: center; }
#viewSeller .seller-card-head .seller-name { font-size: 14px; }
#viewSeller .seller-card-sub { display: flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; }
/* 地区标签固定在卡片左上角，姓名与完成率保持居中主轴 */
#viewSeller .seller-card-sub .region-tag.region-below {
  position: absolute; top: 10px; left: 12px; margin: 0;
}
#viewSeller .seller-card-sub .kpi-pie-tag { flex: none; margin-bottom: 0; }
#viewSeller .seller-card-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  padding-top: 8px; border-top: 1px dashed var(--line);
}
#viewSeller .seller-stat { display: flex; align-items: baseline; gap: 5px; min-width: 0; }
#viewSeller .seller-stat em { flex: none; font-style: normal; font-size: 10.5px; color: var(--text-3); }
#viewSeller .seller-stat b {
  min-width: 0; font-size: 14px; line-height: 1.2; font-variant-numeric: tabular-nums;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
#viewSeller .kpi-win-count { color: var(--text); }
#viewSeller .seller-item:last-child { border-bottom: 1px solid var(--line); }

/* 主页商机状态板块：进行中 / 已中标 / 丢标中止 */
.overview-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 17px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.otab {
  height: 28px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  color: var(--text-2);
  font-family: inherit;
  font-size: 12.5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background .15s, color .15s, border-color .15s;
}
.otab:hover { color: var(--accent); border-color: var(--accent); }
.otab b {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--text-3);
  font-size: 11px;
  line-height: 18px;
  text-align: center;
  font-weight: 600;
}
.otab.active { background: var(--accent-grad); border-color: var(--accent-edge); color: var(--on-color); font-weight: 550; }
.otab.active b { background: rgba(255, 255, 255, .22); color: var(--on-color); }
.otab-won.active { background: var(--shine); border-color: var(--shine); }
.otab-dead.active { background: var(--danger); border-color: var(--danger); }
.otab-tip { margin-left: auto; font-size: 11.5px; color: var(--text-3); }

.who-link {
  border: none;
  background: transparent;
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  white-space: nowrap;
}
.who-link:hover { text-decoration: underline; }

.detail-table td,
.all-table td { font-size: 12.5px; }
/* 商机表格列较多，固定列宽保证「当日进展 / 下一步」不被挤压；窄屏由外层容器横向滚动 */
.seller-overview-panel .all-table,
#viewAll .all-table { table-layout: fixed; min-width: 1380px; }
/* 前段字段紧凑对齐，把宽度让给类型 / 预计发标 / 项目阶段 / 当日进展 / 下一步 */
.seller-overview-panel .all-table .w-owner,
#viewAll .all-table .w-owner { width: 66px; }
.seller-overview-panel .all-table .w-m,
#viewAll .all-table .w-m { width: 80px; }
.seller-overview-panel .all-table .w-custwide { width: 150px; }
#viewAll .all-table .w-cust { width: 98px; }
#viewAll .all-table .w-oppname { width: 84px; }
/* 项目类型列：窄列，紧凑展示「项目 / ITO」标签 */
.seller-overview-panel .all-table .w-ptype,
#viewAll .all-table .w-ptype { width: 88px; }
.ptype-tag {
  display: inline-block; height: 20px; padding: 0 7px; line-height: 20px;
  border: 1px solid var(--line); border-radius: var(--radius-pill);
  font-size: 11px; font-weight: 500; white-space: nowrap;
  background: var(--surface-3); color: var(--text-2);
}
.ptype-tag.ito { background: var(--surface-3); color: var(--text-2); font-weight: 600; }
/* 项目类型配色：每个类型独立色相，便于一眼区分 */
.ptype-tag.tone-insure { color:#1D4ED8; background:#EFF6FF; border-color:#BFDBFE; }
.ptype-tag.tone-xray   { color:#7C3AED; background:#F5F3FF; border-color:#DDD6FE; }
.ptype-tag.tone-ito    { color:#0E7490; background:#ECFEFF; border-color:#A5F3FC; font-weight:600; }
.ptype-tag.tone-renew  { color:#15803D; background:#F0FDF4; border-color:#BBF7D0; }
.ptype-tag.tone-cr     { color:#B45309; background:#FFFBEB; border-color:#FDE68A; }
.ptype-tag.tone-ops    { color:#BE185D; background:#FDF2F8; border-color:#FBCFE8; }
.ptype-tag.tone-voice  { color:#4F46E5; background:#EEF2FF; border-color:#C7D2FE; }
/* 项目类型行内下拉：可直接点选，样式对齐阶段下拉，配色与胶囊一致 */
.ptype-cell { min-width: 88px; vertical-align: middle; text-align: center; }
.ptype-sel {
  font-family: inherit; font-size: 11px; font-weight: 600;
  border: 1px solid var(--line); border-radius: 6px;
  padding: 3px 4px; cursor: pointer; outline: none; max-width: 100%;
  background: var(--surface-3); color: var(--text-2);
}
.ptype-sel:hover { filter: brightness(.96); }
.ptype-sel.tone-insure { color:#1D4ED8; background:#EFF6FF; border-color:#BFDBFE; }
.ptype-sel.tone-xray   { color:#7C3AED; background:#F5F3FF; border-color:#DDD6FE; }
.ptype-sel.tone-ito    { color:#0E7490; background:#ECFEFF; border-color:#A5F3FC; font-weight:600; }
.ptype-sel.tone-renew  { color:#15803D; background:#F0FDF4; border-color:#BBF7D0; }
.ptype-sel.tone-cr     { color:#B45309; background:#FFFBEB; border-color:#FDE68A; }
.ptype-sel.tone-ops    { color:#BE185D; background:#FDF2F8; border-color:#FBCFE8; }
.ptype-sel.tone-voice  { color:#4F46E5; background:#EEF2FF; border-color:#C7D2FE; }
.seller-overview-panel .all-table .w-amt,
#viewAll .all-table .w-amt { width: 88px; }
.seller-overview-panel .all-table .w-win,
#viewAll .all-table .w-win { width: 60px; }
.seller-overview-panel .all-table .month-pill,
#viewAll .all-table .month-pill { white-space: nowrap; text-align: center; line-height: 1.3; }
/* 表格月份 pill：固定两行——上行「YYYY年」不折行，下行「M月」 */
.month-pill .mp-y { display: block; white-space: nowrap; }
.month-pill .mp-m { display: block; white-space: nowrap; }
/* 金额(万)表头与内容右对齐；其余列标题与内容左对齐，一一对应 */
.seller-overview-panel .all-table th.num,
#viewAll .all-table th.num { text-align: right; }
/* 后段内容列获得更多空间 */
.seller-overview-panel .all-table .opp-text-cell,
#viewAll .all-table .opp-text-cell { min-width: 210px; }
.detail-table tbody tr,
.all-table tbody tr { cursor: pointer; }
.detail-table tbody tr:hover,
.all-table tbody tr:hover { background: var(--accent-soft-2); }

.opp-text-cell { min-width: 190px; vertical-align: top; }
.opp-text {
  color: var(--text-2);
  font-size: 12.5px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.month-pill {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 5px;
  font-size: 11.5px;
  font-weight: 600;
}
.month-pill.nov { background: var(--accent-soft); color: var(--accent); }
.month-pill.dec { background: var(--kpi-purple-soft); color: var(--kpi-purple); }

/* 赢面标签：必拿 vs 力争 强对比——必拿实心红、力争实心蓝，一眼分优先级 */
.pill.must, .tag-pill.must, .pill.ok {
  background: #E21B2D; color: #fff; font-weight: 700;
  box-shadow: 0 1px 2px rgba(226,27,45,.25);
}
.pill.try, .tag-pill.try, .pill.warn {
  background: #0B63F6; color: #fff; font-weight: 700;
  box-shadow: 0 1px 2px rgba(11,99,246,.25);
}

.dialog.wide { max-width: 720px; }

.d-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.d-field { display: flex; flex-direction: column; gap: 4px; }
.d-field.full { grid-column: 1 / -1; }
.d-label { font-size: 11.5px; color: var(--text-3); }
.d-value {
  font-size: 13px;
  color: var(--text);
  line-height: 1.6;
  padding: 7px 9px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 7px;
  min-height: 32px;
}

@media (max-width: 1080px) {
  .split { grid-template-columns: 1fr; }
  .seller-list { position: static; }
  #viewSeller #sellerNav { overflow: visible; }
}
@media (max-width: 680px) {
  #viewSeller #sellerNav { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 0 8px 8px; }
  #viewSeller .seller-item { min-height: 92px; padding: 10px 9px; gap: 8px; }
  #viewSeller .seller-card-head { gap: 6px; }
  #viewSeller .seller-card-head .seller-avatar { display: none; }
  #viewSeller .seller-card-sub .kpi-pie-tag { padding: 2px 5px 2px 2px; }
  #viewSeller .seller-card-sub .kpi-pie-svg { width: 19px; height: 19px; }
  #viewSeller .seller-card-stats { grid-template-columns: 1fr; gap: 4px; padding-top: 7px; }
}

/* ================= v3.3：个人业绩页 ================= */

.btn.back {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text-2);
  margin-bottom: 14px;
}
.btn.back:hover { background: var(--accent-soft-2); color: var(--accent); border-color: var(--accent-line); }

.person-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 16px 20px;
  margin-bottom: 14px;
}
.person-hero-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.person-hero .avatar { flex: 0 0 auto; }
.person-hero h2 { font-size: 20px; font-weight: 650; letter-spacing: -.01em; margin: 0 0 2px; }
.person-hero .hint { font-size: 12.5px; }

.person-kpi { margin-bottom: 14px; }

.chart-row {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 14px;
  margin-bottom: 14px;
  align-items: stretch;
}
.chart-panel { display: flex; flex-direction: column; min-width: 0; }
.chart-panel .panel-head { align-items: center; }
.chart-panel h3, .tag-panel h3 { margin: 0; font-size: 14px; font-weight: 600; }
.chart-box { flex: 1; display: flex; align-items: center; }
.lg-amt { background: var(--accent-line); }
.lg-wt { background: var(--accent); }
.lg-dot.d-must { background: var(--shine); }
.lg-dot.d-try { background: var(--warn); }
.lg-dot.d-other { background: var(--text-3); }

.pie-box {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 14px 18px 18px;
  min-height: 196px;
}
.pie-donut {
  position: relative;
  width: 148px; height: 148px;
  border-radius: 50%;
  flex: 0 0 auto;
}
.pie-donut::after {
  content: '';
  position: absolute;
  inset: 29px;
  background: var(--surface);
  border-radius: 50%;
}
.pie-center {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
}
.pie-center b { font-size: 17px; font-weight: 650; font-variant-numeric: tabular-nums; line-height: 1.2; }
.pie-center span { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.pie-legend { display: flex; flex-direction: column; gap: 9px; font-size: 11.5px; min-width: 96px; }
.pie-legend div { display: flex; align-items: center; gap: 6px; color: var(--text-2); }
.pie-legend b { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--text); }

.period-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 14px;
}
.period-card { padding: 14px 18px; }
.period-head { display: flex; align-items: center; gap: 8px; }
.period-tag {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11.5px;
  font-weight: 650;
}
.period-value { font-size: 22px; font-weight: 650; letter-spacing: -.02em; margin-top: 8px; font-variant-numeric: tabular-nums; }
.period-sub { font-size: 12px; color: var(--text-3); margin-top: 3px; font-variant-numeric: tabular-nums; }

.tag-panel { margin-bottom: 14px; }
.tag-panel .panel-head { align-items: center; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 18px 16px; }
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-2);
  font-family: inherit;
  font-size: 12.5px;
  cursor: pointer;
  transition: all .14s;
}
.tag:hover { border-color: var(--accent-line); color: var(--accent); background: var(--accent-soft-2); }
.tag.active { background: var(--accent-grad); border-color: var(--accent-edge); color: var(--on-color); }
.tag i { font-style: normal; font-size: 11px; opacity: .7; font-variant-numeric: tabular-nums; }
.tag-alias {
  font-style: normal;
  font-size: 11px;
  opacity: .72;
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tag.active .tag-alias { opacity: .9; }

/* 个人页：选中客户标签后的档案维护入口 */
.cust-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 16px;
  margin: -2px 0 14px;
  background: linear-gradient(90deg, var(--kpi-purple-soft), var(--accent-soft-2));
  border: 1px solid var(--kpi-purple-line);
  border-left: 4px solid var(--kpi-purple);
  border-radius: var(--radius);
}
.cust-entry[hidden] { display: none; }
.ce-info { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.ce-badge {
  flex: none;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--kpi-purple);
  color: var(--on-color);
  font-size: 11px;
  white-space: nowrap;
}
.ce-info b { font-size: 14px; color: var(--kpi-purple); }
.ce-info .hint { font-size: 11.5px; color: var(--text-3); }
.cust-entry .btn { flex: none; }

.scope-note {
  margin-top: 14px;
  padding: 11px 15px;
  border: 1px solid var(--warn-soft);
  background: var(--warn-soft);
  border-radius: var(--radius);
  color: var(--warn);
  font-size: 12px;
  line-height: 1.7;
}
.scope-note b { color: var(--warn); }

@media (max-width: 1080px) {
  .chart-row { grid-template-columns: 1fr; }
  .person-hero { flex-direction: column; align-items: flex-start; }
}

/* ================= v3.4：个人页重构 + 详细商机卡 + 标签分色 ================= */
/* tdot 令牌统一由主 :root 定义 */

.person-hero-nums { display: flex; gap: 22px; margin-left: auto; }
.person-hero-nums div { display: flex; flex-direction: column; gap: 2px; }
.person-hero-nums b { font-size: 16px; font-variant-numeric: tabular-nums; font-weight: 650; }
.person-hero-nums span { font-size: 11px; color: var(--text-3); }

/* v3.25：个人页年度 KPI 进度与鼓励语 */
.person-kpi-banner {
  flex: 1 0 100%;
  width: 100%;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 2px;
}
.kb-head { display: flex; align-items: baseline; gap: 10px; font-size: 12px; }
.kb-title { font-weight: 650; color: var(--kpi-purple); }
.kb-meta { color: var(--text-3); }
.kb-pct {
  margin-left: auto;
  font-size: 20px;
  font-weight: 650;
  color: var(--kpi-purple);
  font-variant-numeric: tabular-nums;
}
.kb-track {
  height: 10px;
  border-radius: 6px;
  background: var(--surface-2);
  overflow: hidden;
  margin: 10px 0;
}
.kb-fill {
  display: block;
  height: 100%;
  border-radius: 6px;
  background: var(--kpi-purple);
  transition: width .3s ease;
}
.kb-fill.done { background: var(--kpi-teal); }
.kb-enc {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--kpi-teal-soft);
  color: var(--kpi-teal);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  line-height: 1.6;
}
.kb-shuffle {
  margin-left: auto;
  flex: 0 0 auto;
  background: transparent;
  border: 1px solid rgba(14,116,144,.35);
  color: var(--kpi-teal);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 11px;
  cursor: pointer;
}
.kb-shuffle:hover { background: rgba(14,116,144,.1); }
@media (max-width: 680px) {
  .kb-head { flex-wrap: wrap; }
  .kb-pct { margin-left: 0; }
  .kb-enc { align-items: flex-start; flex-wrap: wrap; }
  .kb-shuffle { margin-left: 0; }
  .cust-entry { flex-direction: column; align-items: stretch; }
  .cust-entry .btn { width: 100%; }
}

.section-label {
  display: flex; align-items: baseline; gap: 10px;
  margin: 18px 2px 10px;
  font-size: 14px; font-weight: 650; color: var(--text);
}
.section-label .hint { font-size: 11.5px; font-weight: 400; }

/* 季度柱图复用 chart-box，颜色区分当前季 */
.qbar-cur { fill: var(--accent); }
.qbar-none { fill: var(--track); }

/* 标签四色 */
.tag-legend { display: flex; gap: 12px; font-size: 11px; color: var(--text-3); }
.tag-legend span { display: inline-flex; align-items: center; gap: 4px; }
.tdot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.tdot.fresh { background: var(--tdot-fresh); }
.tdot.week { background: var(--tdot-week); }
.tdot.half { background: var(--tdot-half); }
.tdot.stale { background: var(--tdot-stale); }

.tag.t-fresh { border-color: var(--shine-line); background: var(--shine-soft); color: var(--shine); }
.tag.t-fresh:hover { border-color: var(--shine); }
.tag.t-fresh.active { background: var(--shine); border-color: var(--shine); color: var(--on-color); }
.tag.t-week { border-color: var(--warn-line); background: var(--warn-soft); color: var(--warn); }
.tag.t-week:hover { border-color: var(--tdot-week); }
.tag.t-week.active { background: var(--warn); border-color: var(--warn); color: var(--on-color); }
.tag.t-half { border-color: var(--warn-line); background: var(--warn-soft); color: var(--warn); }
.tag.t-half:hover { border-color: var(--tdot-half); }
.tag.t-half.active { background: var(--warn); border-color: var(--warn); color: var(--on-color); }
.tag.t-stale { border-color: var(--danger-line); background: var(--danger-soft); color: var(--danger); }
.tag.t-stale:hover { border-color: var(--danger); }
.tag.t-stale.active { background: var(--danger); border-color: var(--danger); color: var(--on-color); }
.tag .tag-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: 0 0 auto; }

/* 详细商机卡片 */
.opp-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 14px; }
.opp-card {
  border: 1px solid var(--card-border);
  border-radius: 10px;
  background: var(--surface);
  padding: 13px 15px;
  min-width: 0;
  cursor: pointer;
  transition: box-shadow .15s, border-color .15s;
}
.opp-card:hover { border-color: var(--kpi-purple-line); box-shadow: 0 4px 14px rgba(27,42,56,.06); }
.opp-card-head { display: flex; align-items: flex-start; gap: 9px; margin-bottom: 9px; }
.opp-card-title { flex: 1; min-width: 0; }
.opp-card-cust { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 650; }
.opp-card-name { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.opp-card-meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.opp-card-amt { font-size: 15px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; background: var(--card-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: var(--accent-edge); }
.opp-card-amt.sub { font-size: 13px; color: var(--text-3); font-weight: 500; -webkit-text-fill-color: var(--text-3); }

.oc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 12px; }
.oc-field { min-width: 0; }
.oc-field.full { grid-column: 1 / -1; }
.oc-label { font-size: 10.5px; color: var(--text-3); margin-bottom: 1px; }
.oc-val { font-size: 12px; color: var(--text); line-height: 1.5; white-space: pre-line; word-break: break-word; }
.oc-val.sub { color: var(--text-3); }
.oc-val.risk { color: var(--danger); }
.oc-val.support { color: var(--accent-hover); }
.oc-tags { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.oc-chip { font-size: 10.5px; padding: 1px 6px; border-radius: 4px; background: var(--track); color: var(--text-2); }
.oc-chip.warn { background: var(--warn-soft); color: var(--warn); }
.oc-chip.ok { background: var(--shine-soft); color: var(--shine); }
.opp-card-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--surface-2); }
.mini-btn {
  border: 1px solid var(--line); background: var(--surface); color: var(--text-2);
  font-family: inherit; font-size: 11.5px; padding: 3px 10px; border-radius: 6px; cursor: pointer;
}
.mini-btn:hover { border-color: var(--accent-line); color: var(--accent); background: var(--accent-soft-2); }
/* 商机卡片底部：编辑/完整详情按钮放大一点 + 编辑按钮蓝色 + 空白处维护提示 */
.oc-edit-btn, .oc-open-btn { font-size: 12.5px; padding: 5px 14px; }
.oc-edit-btn { background: var(--accent-grad); border-color: var(--accent-edge); color: var(--on-color); font-weight: 600; }
.oc-edit-btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-color); }
.oc-foot-tip { font-size: 11px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.oc-foot-tip b { color: var(--accent); font-weight: 650; }
@media (max-width: 720px) { .oc-foot-tip { display: none; } }

@media (max-width: 1280px) { .opp-cards { grid-template-columns: 1fr; } }
@media (max-width: 1080px) { .person-hero-nums { display: none; } }

/* ================= v3.6：阶段选项卡 + 中标完成额 ================= */

.lg-won { background: var(--shine); }

.opp-card-foot { align-items: center; }
.stage-spacer { flex: 1; }
.stage-pick {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  color: var(--text-3);
  white-space: nowrap;
}
.stage-sel {
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-2);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 3px 6px;
  cursor: pointer;
  outline: none;
}
.stage-sel:hover { filter: brightness(.96); }
/* 阶段配色：每个阶段独立色相，便于表格里一眼区分（冷→暖对应推进流程） */
.stage-sel.tone-lead   { color:#64748B; background:#F1F5F9; border-color:#CBD5E1; }
.stage-sel.tone-talk   { color:#2563EB; background:#EFF6FF; border-color:#BFDBFE; }
.stage-sel.tone-setup  { color:#0891B2; background:#ECFEFF; border-color:#A5F3FC; }
.stage-sel.tone-bid    { color:#7C3AED; background:#F5F3FF; border-color:#DDD6FE; }
.stage-sel.tone-web    { color:#C026D3; background:#FDF4FF; border-color:#F0ABFC; }
.stage-sel.tone-public { color:#EA580C; background:#FFF7ED; border-color:#FED7AA; }
.stage-sel.tone-won    { color:var(--shine); background:var(--shine-soft); border-color:var(--shine-line); }
.stage-sel.tone-lost   { color:#9F1239; background:#FFF1F2; border-color:#FECDD3; text-decoration:line-through; }
/* 保留旧 class 兼容：与 tone 同色，避免覆盖上面已区分的配色 */
.stage-sel.won:not(.tone-won) { color: var(--shine); background: var(--shine-soft); border-color: var(--shine-line); }
.stage-sel.lost:not(.tone-lost) { color: var(--danger); background: var(--danger-soft); border-color: var(--danger-line); }

/* ================= v3.9：公司周会汇报 ================= */
.person-menu {
  display: flex;
  gap: 4px;
  margin: 16px 2px 4px;
  border-bottom: 1px solid var(--line);
}
.pmenu {
  position: relative;
  padding: 9px 16px;
  border: 0;
  background: transparent;
  color: var(--text-2);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 550;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.pmenu:hover { color: var(--accent); }
.pmenu.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 650; }
.pmenu-dot {
  display: inline-block;
  width: 6px; height: 6px;
  margin-left: 4px;
  border-radius: 50%;
  background: var(--shine);
  vertical-align: middle;
}

/* ---------- 工作台 ---------- */
.wb-title-row { align-items: center; }
.wb-badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--accent-grad); color: var(--on-color); box-shadow: 0 3px 10px rgba(79,70,229,.28);
  padding: 5px 12px; border-radius: 8px;
  font-size: 13px; font-weight: 650; line-height: 1;
}
.wb-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.wb-card { text-align: left; font: inherit; }
.wb-card-group {
  background: var(--surface); border: 1px solid var(--card-border); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.wb-group-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 15px 7px; font-size: 12px; color: var(--text-3); font-weight: 600;
  letter-spacing: .02em;
}
.wb-group-title { font-size: 12.5px; color: var(--text-2); font-weight: 600; }
.wb-sub-grid { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--card-border); }
.wb-card {
  background: transparent; border: 0; padding: 13px 15px; cursor: pointer;
  transition: background .15s, box-shadow .15s;
}
.wb-card + .wb-card { border-left: 1px solid var(--card-border); }
.wb-card:hover { background: var(--accent-soft-2); }
.wb-card.active { background: transparent; box-shadow: inset 0 -3px 0 var(--accent-edge); }
.wb-label { font-size: 12px; color: var(--text-2); margin-bottom: 6px; }
.wb-value { font-size: 21px; font-weight: 650; font-variant-numeric: tabular-nums; line-height: 1.25; color: var(--text); }
.wb-value em { font-style: normal; font-size: 13px; font-weight: 550; margin-left: 4px; background: var(--card-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: var(--accent-edge); }
.wb-sub { font-size: 11.5px; color: var(--text-3); margin-top: 5px; line-height: 1.6; }
.wb-delta { margin-left: 6px; font-weight: 600; white-space: nowrap; }
/* 环比：保留股市涨红跌绿语义，但改为浅底深字小胶囊，去掉纯色大字的刺眼感 */
.wb-delta.up { color: var(--danger-hover); background: var(--danger-soft); border-radius: 5px; padding: 1px 6px; }
.wb-delta.down { color: var(--ok-hover); background: var(--ok-soft); border-radius: 5px; padding: 1px 6px; }
.wb-panel .panel-head { align-items: center; }
.wb-list { padding: 6px 10px 12px; max-height: 460px; overflow-y: auto; }
.wb-unfiled {
  border: 1px solid var(--warn-line); background: var(--warn-soft); border-radius: 10px;
  padding: 11px 13px; margin-bottom: 14px;
}
.unf-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.unf-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--warn); color: var(--on-color); font-size: 12px; font-weight: 700;
}
.unf-title { font-size: 13px; font-weight: 600; color: var(--warn); }
.unf-head .hint { font-size: 11.5px; color: var(--warn); }
.unf-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.unf-item {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 10px; border: 1px solid var(--warn-line); border-radius: 16px;
  background: var(--surface); cursor: pointer; font: inherit; font-size: 12px; color: var(--text);
}
.unf-item:hover { border-color: var(--warn); background: var(--warn-soft); }
.unf-name { font-weight: 500; }
.unf-meta { color: var(--text-3); font-size: 11px; }
.unf-act { color: var(--warn); font-size: 11.5px; font-weight: 600; }
/* 工作台短名档案补全提醒（蓝色系，与橙色未建档提醒区分） */
#wbShortName { border-color: var(--accent-line); background: var(--accent-soft-2); margin-bottom: 14px; }
#wbShortName .unf-icon.sn { background: var(--accent); }
#wbShortName .unf-title { color: var(--accent-active); }
#wbShortName .unf-head .hint { color: var(--accent-mid); }
#wbShortName .unf-item { border-color: var(--accent-line); }
#wbShortName .unf-item:hover { border-color: var(--accent); background: var(--accent-soft-2); }
#wbShortName .unf-act { color: var(--accent-hover); }
/* 工作台风险预警汇总（红色系，三级严重度） */
#wbRisk { border-color: var(--risk-red-line); background: var(--risk-red-bg); padding: 7px 10px; }
#wbRisk .unf-icon.risk { background: var(--risk-red); width: 15px; height: 15px; font-size: 10px; }
#wbRisk .unf-title { color: var(--risk-red-ink); font-size: 12px; }
#wbRisk .unf-head .hint { color: var(--risk-red-ink); font-size: 10.5px; }
#wbRisk .risk-head { cursor: pointer; user-select: none; }
#wbRisk .risk-head:hover { opacity: .82; }
#wbRisk .risk-fold { margin-left: auto; font-size: 10.5px; color: var(--risk-red-ink); font-weight: 600; white-space: nowrap; }
#wbRisk .unf-list { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
#wbRisk .unf-list[hidden] { display: none; }
#wbRisk .unf-item { border-color: var(--risk-red-line); display: inline-flex; flex-direction: column; align-items: stretch; gap: 0; padding: 3px 8px; border-radius: 6px; max-width: 100%; }
#wbRisk .unf-item:hover { border-color: var(--risk-red); background: var(--surface); }
#wbRisk .unf-act { color: var(--risk-red-ink); margin-left: auto; font-size: 10px; }
#wbRisk .wr-row1 { display: flex; align-items: center; gap: 5px; min-width: 0; }
#wbRisk .wr-row1 .unf-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
#wbRisk .wr-row2 { display: block; margin-top: 1px; }
#wbRisk .wbr-title { color: var(--text-2); font-size: 10px; line-height: 1.35; text-align: left; white-space: nowrap; }
@media(max-width: 720px){ #wbRisk .wbr-title { white-space: normal; } }
#wbRisk .risk-badge-mini { font-size: 9px; padding: 0 5px; }
#wbRisk .risk-dot { width: 6px; height: 6px; }
.risk-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.risk-dot.r { background: var(--risk-red); } .risk-dot.o { background: var(--risk-amber); } .risk-dot.y { background: var(--risk-amber); }
.risk-badge-mini { font-size: 10px; border-radius: 9px; padding: 1px 7px; flex: none; }
.risk-badge-mini.r { background: var(--risk-red-bg); color: var(--risk-red-ink); }
.risk-badge-mini.o { background: var(--risk-amber-bg); color: var(--risk-amber); }
.risk-badge-mini.y { background: var(--risk-yellow-bg); color: var(--risk-yellow-ink); }
/* 补全全称输入框：默认锁定，点「修改」解锁后可编辑 */
#custFullName { width: 100%; box-sizing: border-box; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 8px; font: inherit; font-size: 13px; background: var(--surface); color: var(--text); }
#custFullName[readonly] { background: var(--bg); color: var(--text-2); cursor: default; }
#custFullName.editing { border-color: var(--warn-line); background: var(--warn-soft); }
#custFullName:focus { outline: none; border-color: var(--warn); box-shadow: 0 0 0 2px rgba(180,83,9,.12); }
.btn-edit-fullname { margin-left: 2px; }
.btn-cancel-fullname { margin-left: 4px; }
.cust-sec h4 .btn-edit-fullname.active { color: var(--warn); border-color: var(--warn-line); background: var(--warn-soft); }
/* 覆盖 app.js inline color:#b56a08（勘误：不用无效的 [fill=...] 选择器） */
.cust-sec h4 .hint[style*="color"] { color: var(--warn) !important; }
.cust-sec.complete-name { border-left: 3px solid var(--warn); padding-left: 10px; background: var(--warn-soft); }
/* ---------- 日程计划 ---------- */
.sched-title-row { align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.sched-title-main {
  display: inline-flex; align-items: center; gap: 7px;
  color: var(--accent); font-size: 14px; font-weight: 650;
}
.sched-nav { display: inline-flex; gap: 6px; margin-left: auto; }
.sched-nav .btn.tiny { padding: 4px 10px; font-size: 12px; }
.sched-nav .btn.tiny.is-current { background: var(--accent-grad); color: var(--on-color); border-color: var(--accent-edge); }
.sched-panel { padding: 0; overflow: hidden; }
.sched-grid { display: grid; grid-template-columns: 66px repeat(7, minmax(0, 1fr)); }
.sched-cell {
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 9px 11px; min-height: 84px; cursor: pointer; transition: background .12s;
  position: relative; min-width: 0; overflow-wrap: anywhere;
}
.sched-grid > .sched-cell:nth-child(8n) { border-right: 0; }
.sched-cell:hover { background: var(--accent-soft-2); }
/* ===== 日程表头配色（方案B 蓝顶边）：表头 7 天（含周六周日/今天）统一白底+蓝细条+蓝字，时段列实蓝锚点 ===== */
.sched-head-cell {
  background: var(--surface); cursor: default; padding: 10px 8px; text-align: center;
  display: flex; flex-direction: column; justify-content: center; gap: 2px;
  position: relative;
}
.sched-head-cell::before { /* 顶部色条：工作日亮蓝，可由状态覆盖 */
  content:""; position:absolute; left:0; right:0; top:0; height:3px;
  background: var(--sched-head-bar, var(--accent));
}
.sched-head-cell:hover { background: var(--surface); }
.sched-head-cell .dow { font-size: 13.5px; font-weight: 650; color: var(--accent); }
.sched-head-cell .date { font-size: 11.5px; color: var(--accent-mid); font-variant-numeric: tabular-nums; }
/* 时段列：实蓝底白字，做整表视觉锚点 */
.sched-head-cell.slot-head { background: var(--accent-grad); --sched-head-bar: var(--accent-edge); align-items: center; justify-content: center; }
.sched-head-cell.slot-head::before { background: transparent; }
.sched-head-cell.slot-head b { font-size: 13.5px; color: var(--on-color); }
.sched-head-cell.slot-head small { font-size: 10.5px; color: rgba(255,255,255,.82); }
/* 上午蓝/下午绿的 !important 语义色，在时段列内统一为白，避免实蓝底上糊成一团（格内 badge 不受影响） */
.sched-head-cell.slot-head b.sched-am, .sched-head-cell.slot-head b.sched-pm { color: var(--on-color) !important; }
/* 表头 7 天统一：周六、周日、今天全部与周一到周五一致（白底+蓝细条+蓝字），只排除时段列 */
/* 用 :not(.slot-head) 排除时段列 + 双类名提高特异性，压过后文通用的 .sched-cell.is-weekend / .sched-cell.is-today */
.sched-cell.sched-head-cell:not(.slot-head),
.sched-cell.sched-head-cell.is-weekend:not(.slot-head),
.sched-cell.sched-head-cell.is-today:not(.slot-head) { background: var(--surface); --sched-head-bar: var(--accent); }
.sched-cell.sched-head-cell:not(.slot-head) .dow { color: var(--accent); }
.sched-cell.sched-head-cell:not(.slot-head) .date { color: var(--accent-mid); }
/* 上午=蓝色，下午=绿色（表头大字 + 格子内小 badge） */
.sched-am { color: var(--accent) !important; }
.sched-pm { color: var(--shine) !important; }
/* 今天格子的浅蓝底已按用户要求去掉：今日上午/下午单元格与普通格子一致（透明底 + hover 反馈），表头今日样式由上方高特异性规则单独控制 */
.sched-cell-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 5px; }
.sched-slot-badge { font-size: 10.5px; color: var(--text-3); }
.sched-add-mini { font-size: 16px; color: var(--accent); line-height: 1; opacity: 0; transition: opacity .12s; }
.sched-cell:hover .sched-add-mini { opacity: 1; }
.sched-items { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.sched-item {
  min-width: 0; white-space: normal; overflow-wrap: anywhere; word-break: break-word;
  font-size: 12.5px; line-height: 1.45; color: var(--text);
}
.sched-item .t { display: inline-block; max-width: 100%; font-weight: 650; color: var(--accent); margin-right: 6px; font-variant-numeric: tabular-nums; }
.sched-item .c { max-width: 100%; font-weight: 600; }
.sched-item .topic { max-width: 100%; color: var(--text-3); }
.sched-empty { font-size: 11.5px; color: var(--text-3); opacity: .55; }
.sched-dialog { max-width: 760px; }
.sched-form { display: flex; flex-direction: column; gap: 12px; max-height: 56vh; overflow-y: auto; }
.sched-item-row { display: grid; grid-template-columns: 108px 1fr 1.6fr 32px; gap: 8px; align-items: center; }
.sched-item-row input {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 6px;
  font: inherit; font-size: 13px; background: var(--surface); color: var(--text);
}
.sched-item-row input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.sched-item-del { border: 0; background: transparent; color: var(--danger); font-size: 18px; cursor: pointer; line-height: 1; }
.sched-foot { justify-content: flex-start; }
.sched-foot-spacer { flex: 1; }
@media (max-width: 720px) {
  .sched-grid { grid-template-columns: 40px repeat(7, minmax(0, 1fr)); }
  .sched-cell { padding: 6px 5px; min-height: 58px; }
  .sched-item-row { grid-template-columns: 82px 1fr 30px; }
  .sched-item-row .s-customer { grid-column: 2 / 3; }
  .sched-item-row .s-topic { grid-column: 1 / -1; }
}
/* ---------- 团队销售日程（按销售姓名汇总） ---------- */
.team-sched-view { padding-top: 4px; }
.team-sched-nav { margin-left: 12px; }
.team-sched-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; max-width: 1480px; margin: 0 auto; }
.team-sched-card { padding: 0; overflow: hidden; }
.ts-card-head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-bottom: 1px solid var(--card-border); background: var(--bg);
}
.ts-avatar {
  width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%;
  background: var(--avatar-grad); color: var(--avatar-ink);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
}
.ts-card-head b { font-size: 14px; }
.tsched-count { font-size: 11.5px; color: var(--text-3); margin-left: auto; }
.tsched-grid { grid-template-columns: 50px repeat(7, minmax(0, 1fr)); }
.tsched-grid .sched-cell { min-height: 66px; padding: 6px 7px; }
.tsched-grid .sched-head-cell { padding: 7px 5px; }
.tsched-grid .sched-head-cell .dow { font-size: 11.5px; }
.tsched-grid .sched-head-cell .date { font-size: 10px; }
.tsched-grid .sched-head-cell.slot-head b { font-size: 11.5px; }
.tsched-grid .sched-head-cell.slot-head small { font-size: 9.5px; }
.tsched-grid .sched-item { font-size: 11px; line-height: 1.4; }
.ts-empty { padding: 24px; text-align: center; color: var(--text-3); }
@media (max-width: 720px) { .tsched-grid { grid-template-columns: 36px repeat(7, minmax(0, 1fr)); } .tsched-grid .sched-cell { min-height: 56px; padding: 5px 4px; } }
/* ---------- 一键日报 ---------- */
.daily-head { align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.daily-actions { display: flex; gap: 8px; }
.daily-text {
  display: block;
  width: calc(100% - 32px);
  margin: 4px 16px 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: 13px/1.8 -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
  color: var(--text);
  background: var(--accent-soft-2);
  resize: vertical;
}
.daily-text:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* 主页总览：按板块汇总成总表 */
.weekly-overview { margin-top: 18px; }
.weekly-overview-body {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 14px 16px 18px;
}
.ws-section {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
}
.ws-title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 13px;
  background: linear-gradient(90deg, var(--accent-soft-2), var(--surface-2));
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
  font-weight: 650;
}
.ws-title .ws-no {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--card-grad);
  color: var(--on-color);
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ws-count { margin-left: auto; font-size: 11px; font-weight: 400; color: var(--text-3); }
.ws-rows { display: flex; flex-direction: column; }
.ws-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  border-bottom: 1px solid var(--surface-2);
}
.ws-row:last-child { border-bottom: 0; }
.ws-row:hover { background: var(--surface-2); }
.ws-who {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 12px;
  background: var(--surface-2);
  border-right: 1px solid var(--line);
  font-size: 12.5px;
}
.ws-idx { font-size: 10.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.ws-who b { font-weight: 600; white-space: nowrap; }
.ws-content {
  padding: 9px 13px;
  font-size: 12.5px;
  line-height: 1.65;
  word-break: break-word;
}
.ws-row-empty .ws-content { color: var(--text-3); }
.ws-theme { font-size: 11px; color: var(--accent); font-weight: 600; margin-bottom: 4px; }
/* 周会汇报 5 板块：行内编辑 */
.ws-content { position: relative; }
.ws-edit-btn {
  float: right; margin: -3px 0 0 10px; padding: 2px 8px; border: 1px solid var(--line);
  background: var(--surface); color: var(--accent); border-radius: 6px; cursor: pointer;
  font-size: 11px; line-height: 18px; opacity: 0; transition: opacity .15s;
}
.ws-row:hover .ws-edit-btn, .ws-edit-btn:focus { opacity: 1; }
.ws-edit-btn:hover { background: var(--accent-soft, var(--surface-2)); }
.ws-who.is-editing { background: var(--accent-soft, var(--surface-2)); }
.ws-edit-wrap { width: 100%; }
.ws-edit-area {
  width: 100%; min-height: 110px; box-sizing: border-box; resize: vertical;
  padding: 9px 11px; font: inherit; font-size: 12.5px; line-height: 1.65;
  color: var(--text); background: var(--surface); border: 1px solid var(--accent, var(--line));
  border-radius: 8px; outline: none;
}
.ws-edit-actions { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.ws-edit-tip { font-size: 11px; color: var(--text-3); }
.ws-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 8px 12px;
}
.ws-metric {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 6px 9px;
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.ws-metric span { font-size: 10.5px; color: var(--text-2); }
.ws-metric b { font-size: 15px; font-weight: 680; line-height: 1.3; }
.ws-metric b.green { color: var(--shine); }
.ws-metric small { font-size: 10px; color: var(--text-3); }

/* 个人页周报展示（沿用卡片式区块） */
.wo-block { font-size: 12.5px; }
.wo-label {
  font-size: 11.5px;
  font-weight: 650;
  color: var(--accent);
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.wo-label .wo-no {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.wo-text { white-space: pre-wrap; color: var(--text); line-height: 1.6; }
.wo-empty { color: var(--text-3); font-size: 12px; font-style: normal; }

/* 自动汇总四宫格（总览 + 表单共用） */
.w-auto-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.auto-cell {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: var(--surface-2);
  min-width: 0;
}
.auto-cell h5 {
  margin: 0 0 3px;
  font-size: 11.5px;
  font-weight: 650;
  color: var(--text-2);
}
.auto-cell .auto-amt {
  font-size: 17px;
  font-weight: 680;
  color: var(--text);
  line-height: 1.25;
}
.auto-cell .auto-amt.green { color: var(--shine); }
.auto-cell .auto-sub { font-size: 10.5px; color: var(--text-3); }
.auto-cell ul { margin: 5px 0 0; padding-left: 15px; }
.auto-cell li { font-size: 11px; color: var(--text-2); line-height: 1.5; }
.auto-cell li span { color: var(--text-3); }

/* 个人页周报展示 */
.weekly-person .weekly-blocks {
  padding: 15px 17px 17px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.weekly-person .wo-block {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 11px 13px;
  background: var(--surface);
}
.weekly-person .wo-block.auto-block { background: var(--accent-soft-2); border-color: var(--accent-soft); }
.weekly-person .w-auto-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
/* 个人页两项指标卡片：与个人板块统一间距 */
.weekly-person .person-ts-row { margin-bottom: 2px; }
.weekly-person .person-ts-row .ts-section { border: 1px solid var(--card-border); border-radius: 9px; overflow: hidden; }
.weekly-person .person-ts-row .ws-title { padding: 9px 12px; }
.weekly-person .person-ts-row .ts-cell { padding: 11px 6px; }

/* 周报填写弹窗 */
.weekly-dialog { max-width: 860px; }
.weekly-form { display: flex; flex-direction: column; gap: 10px; }
.w-block {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px 12px;
}
.w-block.auto { background: var(--accent-soft-2); border-color: var(--accent-soft); }
.w-block-head { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.w-block-head h4 { font-size: 13px; margin: 0; }
.w-block-head .w-no {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.w-auto-tag {
  margin-left: auto;
  font-size: 10.5px;
  color: var(--accent);
  background: var(--surface);
  border: 1px solid var(--accent-soft);
  border-radius: 10px;
  padding: 1px 8px;
}
.w-edit-hint { margin-left: auto; font-size: 10.5px; color: var(--text-3); }
.w-title-edit input {
  border: 0;
  border-bottom: 1px dashed transparent;
  background: transparent;
  font: inherit;
  font-weight: 650;
  color: var(--text);
  width: 320px;
  max-width: 100%;
  padding: 0 0 2px;
}
.w-title-edit input:hover, .w-title-edit input:focus {
  outline: none;
  border-bottom-color: var(--accent);
}
.w-block textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text);
  resize: vertical;
}
.w-block textarea:focus { outline: none; border-color: var(--accent-focus); box-shadow: 0 0 0 2px var(--accent-soft); }

@media (max-width: 760px) {
  .weekly-person .w-auto-grid { grid-template-columns: 1fr; }
  .w-auto-grid { grid-template-columns: 1fr; }
  .ws-row { grid-template-columns: 1fr; }
  .ws-who { border-right: 0; border-bottom: 1px solid var(--line); }
  .ws-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 板块二：可点击的自动汇总数字 */
.ws-metric-click, .wo-amt-click { cursor: pointer; transition: border-color .15s, background .15s, transform .15s; }
.ws-metric-click:hover { border-color: var(--accent-mid); background: var(--accent-soft-2); transform: translateY(-1px); }
.ws-metric-click b::after { content: ' ↗'; font-size: 10px; color: var(--accent); opacity: 0; }
.ws-metric-click:hover b::after, .ws-metric-click:focus-visible b::after { opacity: 1; }
.ws-metric-click:focus-visible, .wo-amt-click:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.wo-amt-click:hover { color: var(--accent); text-decoration: underline dotted; }

/* 板块二：卡片手工值 vs 系统自动明细 · 口径差异说明 */
.wo-diff { margin: 2px 10px 14px; padding: 12px 14px; border: 1px solid var(--warn-line); border-radius: 8px; background: var(--warn-soft); }
.wo-diff-hd { font-size: 12.5px; font-weight: 650; color: var(--warn); line-height: 1.55; margin-bottom: 8px; }
.wo-diff-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 6px 0; border-top: 1px dashed var(--warn-line); font-size: 12px; color: var(--text-2); }
.wo-diff-row:first-of-type { border-top: none; }
.wo-diff-row b { font-size: 12.5px; color: var(--text); min-width: 56px; }
.wo-diff-row em { font-style: normal; font-weight: 650; color: var(--warn); }
.wo-diff-row span { line-height: 1.5; }
.wo-diff-act { margin-left: auto; align-self: center; padding: 3px 9px; border: 1px solid var(--warn-line); border-radius: 6px; background: var(--surface); color: var(--warn); font-size: 11.5px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.wo-diff-act:hover, .wo-diff-act:focus-visible { background: var(--warn-soft); border-color: var(--warn); outline: none; }
.wo-diff-help { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--warn-line); font-size: 11.5px; line-height: 1.7; color: var(--text-2); }
.wo-diff-help b { color: var(--warn); }
.wo-diff-help span { display: block; }
.ts-section.wo-diff-flash { box-shadow: 0 0 0 3px rgba(180,83,9,.22); border-radius: 8px; }

/* 板块二：指标下钻的商机明细列表 */
.wo-list-head, .wo-item {
  display: grid;
  grid-template-columns: 1fr 90px 130px;
  gap: 10px;
  align-items: center;
}
.wo-list-head { padding: 0 10px 8px; border-bottom: 1px solid var(--line); font-size: 11px; color: var(--text-3); font-weight: 600; }
.wo-item { padding: 10px; border-bottom: 1px solid var(--line); cursor: pointer; border-radius: 6px; }
.wo-item:hover { background: var(--accent-soft); }
.wo-item-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.wo-item-main b { font-size: 13px; color: var(--text); }
.wo-item-main span { font-size: 11.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wo-item-amt { font-size: 13px; font-weight: 650; color: var(--accent); text-align: right; }
.wo-item-tags { display: flex; gap: 4px; justify-content: flex-end; }
.tag-pill { display: inline-block; font-size: 10.5px; padding: 2px 6px; border-radius: 4px; background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.wo-stage, .wo-win { font-size: 10.5px; padding: 2px 6px; border-radius: 4px; background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.wo-stage.won { background: var(--shine-soft); color: var(--shine); }
.wo-stage.lost { background: var(--danger-soft); color: var(--danger); }
.wo-none { padding: 30px 10px; text-align: center; color: var(--text-3); font-size: 12.5px; }
@media (max-width: 760px) {
  .wo-list-head { display: none; }
  .wo-item { grid-template-columns: 1fr auto; }
  .wo-item-tags { grid-column: 1 / -1; justify-content: flex-start; }
}

/* 全年完成：KPI 上的编辑入口 */
.kpi-label { display: flex; align-items: center; gap: 6px; }
.kpi-edit {
  margin-left: auto;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--accent);
  border-radius: 5px;
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 7px;
  cursor: pointer;
}
.kpi-edit:hover { border-color: var(--accent-mid); background: var(--accent-soft); }

/* 全年完成：中标台账表单与列表 */
.win-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.win-form label { display: flex; flex-direction: column; gap: 5px; font-size: 11.5px; font-weight: 600; color: var(--text-2); }
.win-form input, .win-form select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 7px 9px;
  font-family: inherit;
  font-size: 12.5px;
  color: var(--text);
  background: var(--surface);
}
.win-form input:focus, .win-form select:focus { outline: none; border-color: var(--accent-focus); box-shadow: 0 0 0 2px var(--accent-soft); }
.win-form-actions { grid-column: 1 / -1; display: flex; gap: 8px; }
.win-list-wrap { margin-top: 14px; }
.win-list-title { font-size: 12px; font-weight: 650; margin-bottom: 9px; }
.win-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.win-table th { text-align: left; padding: 7px 9px; background: var(--surface-2); color: var(--text-2); font-size: 11px; font-weight: 600; border-bottom: 1px solid var(--line); white-space: nowrap; }
.win-table td { padding: 8px 9px; border-bottom: 1px solid var(--line); vertical-align: top; }
.win-table tr.editing { background: var(--accent-soft); }
.win-table .win-amt { color: var(--accent); font-weight: 650; white-space: nowrap; }
.win-table .win-ops { white-space: nowrap; }
.win-ops button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--accent);
  border-radius: 5px;
  padding: 2px 7px;
  font-size: 10.5px;
  cursor: pointer;
  margin-right: 4px;
}
.win-ops button.del { color: var(--danger); }
.win-ops button:hover { border-color: var(--accent-mid); background: var(--accent-soft-2); }
.win-empty { padding: 22px 10px; text-align: center; color: var(--text-3); font-size: 12px; }
@media (max-width: 760px) {
  .win-form { grid-template-columns: 1fr 1fr; }
  .win-table { font-size: 11px; }
}

/* ---------- 销售地区小标签 ---------- */
.region-tag {
  display: inline-block;
  flex: none;
  margin-left: 5px;
  padding: 0 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  line-height: 16px;
  vertical-align: 1px;
  white-space: nowrap;
}
.rt-green  { color: var(--shine); background: var(--shine-soft); }
.rt-blue   { color: var(--accent-hover); background: var(--accent-soft-2); }
.rt-orange { color: var(--warn); background: var(--warn-soft); }
.rt-purple { color: var(--kpi-purple); background: var(--kpi-purple-soft); }
.rt-cyan   { color: var(--kpi-teal); background: var(--kpi-teal-soft); }
.rt-gray   { color: var(--text-2); background: var(--surface-2); }
/* 标签置于名字下方 */
.region-tag.region-below {
  display: block;
  width: max-content;
  max-width: 100%;
  margin: 3px 0 0;
  vertical-align: 0;
}
#pRegion .region-tag { font-size: 11px; line-height: 18px; padding: 0 8px; }
.who-name { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
.who-name b { font-weight: 600; white-space: nowrap; }
.who-name .region-tag { margin: 0; }

/* ---------- 用户管理（整页视图） ---------- */
body[data-view="users"] .wrap { max-width: 1680px; }
.users-view { display: flex; flex-direction: column; gap: 16px; }
.users-view[hidden] { display: none !important; }
.users-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 16px 20px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.users-head h2 { margin: 0 0 6px; font-size: 18px; font-weight: 650; color: var(--text); }
.users-head h2 .hint { font-size: 12px; font-weight: 400; color: var(--text-3); }
.users-head > .hint { font-size: 12px; color: var(--text-3); line-height: 1.6; }
.users-body {
  display: flex; flex-direction: column; gap: 16px;
  padding: 18px 20px 24px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.users-body .sm-teamkpi { margin-bottom: 0; }
.users-body .sm-add { margin-bottom: 0; }
#btnSalesMgr.active { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }

/* 大区团队：大区账号扁平管理条 + 按地区分组的销售拓扑 */
.sm-team-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 11px 14px; border: 1px solid var(--line); border-radius: 9px;
  background: var(--surface-2); margin-bottom: 12px;
}
.sm-team-pick-label { font-size: 13px; font-weight: 650; color: var(--text); }
#smTeamPick {
  height: 32px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 7px;
  font: inherit; font-size: 12.5px; color: var(--text); background: var(--surface);
}
.sm-admin-strip {
  padding: 11px 14px; border: 1px solid var(--accent-line); border-radius: 9px;
  background: var(--accent-soft-2); margin-top: 14px;
}
.sm-admin-strip-head { font-size: 12.5px; font-weight: 650; color: var(--text); margin-bottom: 9px; }
.sm-admin-strip-row { display: flex; gap: 12px; flex-wrap: wrap; }
.sm-admin-chip {
  flex: 1 1 260px; display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap; padding: 9px 12px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--surface); font-size: 12.5px; color: var(--text);
}
.sm-admin-chip.is-empty, .sm-admin-chip.is-assign { border-style: dashed; background: var(--surface-2); }
.sm-admin-chip-main { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sm-admin-chip-btns { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sm-assign-sel {
  width: 100%; height: 30px; margin-top: 6px; padding: 0 8px;
  border: 1px solid var(--line-strong); border-radius: 6px;
  font: inherit; font-size: 12px; color: var(--text); background: var(--surface);
}
.sm-topo { display: flex; flex-direction: column; align-items: center; gap: 0; padding: 8px 0 18px; }
.sm-node {
  position: relative; min-width: 190px; padding: 11px 14px; text-align: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--shadow); font-size: 12.5px; color: var(--text);
}
.sm-root-node { min-width: 660px; max-width: 960px; border-color: var(--accent-line); background: var(--accent-soft-2); }
.sm-root-node b { font-size: 15px; margin: 0 8px; }
.sm-root-main { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px; }
.sm-root-main .hint { font-size: 11.5px; }
.sm-root-lead {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px;
  margin-top: 9px; padding: 7px 10px; border: 1px solid var(--accent-line);
  border-radius: 8px; background: var(--surface); font-size: 12.5px;
}
.sm-root-lead .hint { font-size: 11.5px; }
.sm-lead-badge {
  display: inline-block; padding: 1px 7px; border-radius: 4px; font-size: 10.5px;
  background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-line); font-weight: 600;
}
.sm-root-badge {
  display: inline-block; padding: 1px 7px; border-radius: 4px; font-size: 10.5px;
  background: var(--accent); color: var(--on-color, #fff); font-weight: 600;
}
.sm-topo-stem { width: 2px; height: 20px; background: var(--line-strong); }
.sm-node-top { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px; }
.sm-node-meta, .sm-node-stat, .sm-node-acc { margin-top: 5px; font-size: 11.5px; color: var(--text-3); }
.sm-node-acts { display: flex; justify-content: center; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.sm-region-row {
  position: relative; display: flex; flex-wrap: wrap; justify-content: center;
  align-items: flex-start; align-self: stretch; width: 100%;
  gap: 18px; max-width: 1320px; padding-top: 18px;
}
.sm-region-row::before { content: ''; position: absolute; top: 0; left: 8%; right: 8%; height: 2px; background: var(--line-strong); }
.sm-region-group { position: relative; flex: 1 1 260px; min-width: 230px; max-width: 330px; }
.sm-region-group::before { content: ''; position: absolute; top: -18px; left: 50%; width: 2px; height: 18px; background: var(--line-strong); }
.sm-region-head {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 6px 10px; border-radius: 6px; background: var(--accent-soft);
  color: var(--accent); font-size: 12.5px; font-weight: 650;
}
.sm-region-head em { font-style: normal; font-size: 11px; color: var(--text-3); }
.sm-region-sales { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
/* 不区分小区域的大区（如大东北）：销售卡片直接并排展示 */
.sm-flat-sales { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 14px; width: 100%; }
.sm-flat-sales .sm-sale-node { flex: 0 1 240px; width: auto; max-width: 300px; }
.sm-sale-node { width: 100%; cursor: pointer; transition: border-color .15s, transform .15s; }
.sm-sale-node:hover { border-color: var(--accent); transform: translateY(-2px); }
.sm-sale-node.is-admin { border-color: var(--accent-line); }
.sm-topo-empty { padding: 18px; font-size: 12.5px; color: var(--text-3); }
@media (max-width: 760px) {
  .sm-region-row::before, .sm-region-group::before { display: none; }
  .sm-region-row { padding-top: 0; }
}

/* ---------- 销售BD管理 ---------- */
.btn.mini { height: 26px; padding: 0 9px; font-size: 11.5px; border-radius: 6px; }
.btn.danger, .btn.mini.danger { color: var(--danger); border-color: var(--danger-soft); }
.btn.danger:hover, .btn.mini.danger:hover { background: var(--danger-soft); border-color: var(--danger-line); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:disabled:hover { background: var(--surface); }

/* 团队KPI管理 */
.sm-teamkpi { padding: 13px 14px; border: 1px solid var(--accent-line); border-radius: 9px; background: var(--accent-soft-2); margin-bottom: 16px; }
.sm-teamkpi .tk-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.sm-teamkpi .tk-head h4 { margin: 0; font-size: 13.5px; }
.tk-year { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-2); }
.tk-year select { height: 30px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: 7px; font: inherit; font-size: 12.5px; background: var(--surface); }
.tk-top { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.tk-top label { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: var(--text-2); }
.tk-top input { height: 32px; padding: 0 9px; border: 1px solid var(--line-strong); border-radius: 7px; font: inherit; font-size: 13px; background: var(--surface); width: 170px; }
.tk-top input.tk-locked { background: var(--surface-2); color: var(--text-2); border-color: var(--line); cursor: not-allowed; }
.tk-hint { font-size: 11.5px; color: var(--text-3); margin: 4px 0 8px; }
.tk-table { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); }
.tk-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.1fr; align-items: center; gap: 8px; padding: 7px 10px; border-bottom: 1px solid var(--line); font-size: 12px; }
.tk-row:last-child { border-bottom: none; }
.tk-row.tk-thead { background: var(--accent-soft-2); font-weight: 600; color: var(--text-2); font-size: 11.5px; }
.tk-row .tk-name b { color: var(--text); }
.tk-row .tk-stat { color: var(--text-2); }
.tk-kpi-edit { display: inline-flex; align-items: center; gap: 4px; }
.tk-kpi-input {
  width: 84px; height: 28px; padding: 0 7px; text-align: right;
  border: 1px solid var(--line-strong); border-radius: 6px;
  font: inherit; font-size: 12.5px; font-variant-numeric: tabular-nums;
  color: var(--text); background: var(--surface); transition: border-color .15s, box-shadow .15s;
  -moz-appearance: textfield;
  appearance: textfield;
}
.tk-kpi-input::-webkit-inner-spin-button,
.tk-kpi-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.tk-kpi-input:hover { border-color: var(--accent-mid); }
.tk-kpi-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(44,80,104,.16); }
.tk-kpi-input::placeholder { color: var(--text-3); font-weight: 400; }
/* 团队KPI目标已确认：团队总数 + 各销售分配一起锁定，需点「修改」才解锁 */
.tk-kpi-input.tk-locked, #smList.tk-locked .tk-kpi-input { background: var(--surface-2); color: var(--text-2); border-color: var(--line); cursor: not-allowed; }
#smList.tk-locked .tk-confirm, #smList.tk-locked .tk-done { pointer-events: none; opacity: .55; }

/* 销售卡片内嵌 KPI 编辑行 */
.sm-node-kpi {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
  gap: 6px; margin: 7px 0 2px; padding: 5px 6px;
  border: 1px dashed var(--line); border-radius: 7px; background: var(--surface-2);
}
.sm-node-kpi-label { font-size: 11px; color: var(--text-3); white-space: nowrap; }
.sm-node-kpi .tk-kpi-input { width: 76px; height: 26px; font-size: 12px; }
.sm-node-kpi .tk-kpi-stat { display: inline-flex; align-items: center; }
.sm-node-kpi .tk-confirm, .sm-node-kpi .tk-done { height: 24px; padding: 0 10px; font-size: 11px; }

/* 团队KPI：内嵌在大区根节点卡片内 */
.sm-root-kpi { margin-top: 10px; padding-top: 9px; border-top: 1px dashed var(--line); }
.sm-rk-line { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 12px; }
.sm-rk-line .tk-year { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; font-size: 11.5px; white-space: nowrap; }
.sm-rk-line .tk-year select { height: 28px; }
.sm-rk-line .tk-total-label { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-2); white-space: nowrap; }
.sm-rk-line .tk-total-label input { width: 130px; height: 28px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: 6px; font: inherit; font-size: 12.5px; background: var(--surface); color: var(--text); }
.sm-rk-line .tk-total-label input.tk-locked { background: var(--surface-2); color: var(--text-2); border-color: var(--line); cursor: not-allowed; }
.sm-rk-line .tk-total-label em { font-size: 11px; color: var(--text-3); font-style: normal; }
.sm-root-kpi .tk-summary { margin-top: 9px; padding: 8px 10px; justify-content: center; gap: 4px 16px; font-size: 11.5px; }
.sm-root-kpi .tk-summary .tk-cell b { font-size: 12.5px; }
.sm-root-kpi .tk-hint { margin: 7px 0 0; font-size: 11px; color: var(--text-3); }
@media (max-width: 760px) {
  .sm-root-node { min-width: 0; width: 100%; }
}
.tk-kpi-unit { font-size: 11px; color: var(--text-3); }
.tk-row .tk-diff.pos { color: var(--shine); }
.tk-row .tk-diff.neg { color: var(--danger); }
.tk-row .tk-diff.zero { color: var(--text-3); }
.tk-summary { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 10px; padding: 10px 12px; border-radius: 8px; background: var(--accent-soft); font-size: 12.5px; }
.tk-summary .tk-cell b { font-size: 15px; font-variant-numeric: tabular-nums; margin-left: 4px; }
.tk-summary .tk-gap-ok b { color: var(--shine); }
.tk-summary .tk-gap-bad b { color: var(--danger); }
.tk-summary .tk-gap-wait b { color: var(--text-3); }
.tk-confirmed { display: inline-block; padding: 1px 7px; border-radius: 4px; font-size: 10.5px; background: var(--shine-soft); color: var(--shine); }
.tk-stat-idle { color: var(--text-3); font-size: 12px; }
.btn.mini.tk-confirm { height: 26px; padding: 0 12px; background: var(--accent-grad); border-color: var(--accent-edge); color: var(--on-color); font-weight: 500; border-radius: 6px; font-size: 11.5px; }
.btn.mini.tk-confirm:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.mini.tk-done { height: 26px; padding: 0 12px; background: var(--surface-2); border-color: var(--line); color: var(--text-3); font-weight: 500; border-radius: 6px; font-size: 11.5px; cursor: pointer; }
.btn.mini.tk-done:hover { background: var(--line); border-color: var(--line-strong); color: var(--text-2); }

.sm-add { padding: 12px 14px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); margin-bottom: 16px; }
.sm-add h4, .sm-panel h4 { margin: 0 0 9px; font-size: 13.5px; }
.sm-add-form, .sm-foot { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.sm-add-form label, .sm-foot label { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: var(--text-2); }
.sm-add-form input, .sm-add-form select, .sm-foot input, .sm-foot select {
  height: 32px; padding: 0 9px; border: 1px solid var(--line-strong); border-radius: 7px;
  font: inherit; font-size: 12.5px; color: var(--text); background: var(--surface); min-width: 150px;
}
.sm-list-title { font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.sm-row {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px; border: 1px solid var(--line); border-bottom: none;
  background: var(--surface); font-size: 12.5px;
}
.sm-row:first-child { border-radius: 8px 8px 0 0; }
.sm-level { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 4px; font-size: 10.5px; font-style: normal; background: var(--accent-soft-2); color: var(--kpi-purple); }
.sm-team { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 4px; font-size: 10.5px; font-style: normal; background: var(--accent-soft-1, #eef4ff); color: var(--accent, #2f6fed); }
.sm-row:last-child { border-bottom: 1px solid var(--line); border-radius: 0 0 8px 8px; }
.sm-who { flex: 1; min-width: 130px; }
.sm-who b { font-size: 13px; }
.sm-stat { color: var(--text-3); font-size: 11.5px; min-width: 120px; }
.sm-acts { display: flex; gap: 6px; }
.sm-panel { margin-top: 14px; padding: 13px 14px; border: 1px solid var(--accent-line); border-radius: 9px; background: var(--accent-soft-2); }
.sm-panel .hint { display: block; margin-bottom: 10px; }
.sm-cust-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 12px; margin-bottom: 12px; }
.sm-cust-grid label { display: flex; align-items: center; gap: 6px; font-size: 12px; cursor: pointer; }
.sm-cust-grid span { color: var(--text-3); font-size: 11px; }
@media (max-width: 760px) {
  .sm-row { flex-wrap: wrap; }
  .sm-cust-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- 网站页脚备案号 ---------- */
.site-footer {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 24px 22px;
  text-align: center;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted, var(--text-3, #889));
}
.site-footer a {
  color: inherit;
  text-decoration: none;
}
.site-footer a:hover { text-decoration: underline; }
.login-page .site-footer {
  position: fixed;
  left: 0; right: 0; bottom: 10px;
  padding: 0 16px;
  z-index: 2;
}

/* ---------- 登录页 ---------- */
.login-page {
  --lp-primary:#22384C; --lp-primary-hover:#1B2E3E; --lp-brand-blue:#2C5068;
  --lp-accent:#29C7E4;                   /* 纯装饰，不承担聚焦指示 */
  --lp-accent-soft:rgba(41,199,228,.16);  /* 仅装饰柔光 */
  --lp-focus:#0B7285;                    /* 唯一聚焦指示器色，青色系 */
  --lp-focus-soft:rgba(11,114,133,.16);  /* 聚焦外圈装饰柔光，不计对比度 */
  --lp-bg:#F5F8FA; --lp-surface:#fff; --lp-text:#1B2A38;
  --lp-text-2:#5A6B78; --lp-text-3:#64748B; --lp-line:#E3EAF0;
  --lp-line-strong:#CBD7E0; --lp-placeholder:#9AA6B0;
  --lp-danger:#A8281F; --lp-danger-bg:#FEF3F2; --lp-danger-line:#E7B3AE;

  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--lp-text);
  background:
    radial-gradient(920px 460px at 15% -12%, rgba(41,199,228,.10) 0%, transparent 60%),
    radial-gradient(760px 420px at 90% 0%, rgba(44,80,104,.10) 0%, transparent 58%),
    var(--lp-bg);
}
.login-wrap { width: 100%; padding: 24px; display: flex; justify-content: center; }
.login-card {
  width: 100%; max-width: 400px; padding: 46px 32px 26px;
  background: var(--lp-surface); border: 1px solid var(--lp-line); border-radius: 16px;
  box-shadow: 0 1px 2px rgba(28,48,64,.04), 0 12px 32px rgba(28,48,64,.10);
}
.login-brand { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; margin-bottom: 40px; }
.login-brand .brand-mark { height: 88px; width: auto; display: block; }
/* 方案4：Futura 几何体 + 微倾斜，字母更艺术化 */
.brand-word {
  font-family: "Futura", "Avenir Next", "Avenir", "Trebuchet MS", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 34px; font-weight: 700; letter-spacing: -1px; line-height: 1.05;
  transform: skewX(-6deg); transform-origin: center;
  color: var(--purple-deep); margin: 0;  /* y/ale：深靛蓝 */
}
/* 顶栏小字恢复原尺寸，仅保留 Futura 字体与轻微倾斜 */
.brand-word.brand-word-top { font-size: 24px; letter-spacing: 0; transform: skewX(-5deg); }
/* logo 文字配色：取自「My·主页」蓝紫渐变体系（亮蓝→靛蓝→紫），s 保留品牌青 */
.brand-word-m { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: #4F46E5; }  /* M：蓝紫渐变 */
.brand-word-blue { color: #29C7E4; }  /* s：品牌青蓝 */
.brand-word-hot { color: #F5222D; }   /* x：红，呼应系统警示红 */
.login-brand .login-sub { text-align: center; }
.login-brand .dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--lp-accent);
  box-shadow: 0 0 0 5px var(--lp-accent-soft); flex: none;
}
.login-brand h1 { font-size: 17px; }
.login-sub { margin: 0; font-size: 12.5px; color: var(--lp-text-2); letter-spacing: .2px; }
.login-field { display: block; margin-bottom: 12px; }
.login-field span { display: block; font-size: 12.5px; font-weight: 600; color: var(--lp-text); margin-bottom: 6px; }
.login-field input {
  width: 100%; height: 42px; padding: 0 14px; border-radius: 10px;
  border: 1px solid var(--lp-line-strong); background: var(--lp-surface);
  font-family: inherit; font-size: 14px; color: var(--lp-text);
  transition: border-color .18s, box-shadow .18s;
}
.login-field input::placeholder { color: var(--lp-placeholder); }
/* 覆盖全局 label input:focus 的蓝色环；鼠标点按不显示聚焦环，键盘走 :focus-visible */
.login-field input:focus { outline: none; }
.login-field input:focus:not(:focus-visible):not([aria-invalid="true"]) {
  border-color: var(--lp-line-strong); box-shadow: none;
}
.login-field input:focus-visible {
  border-color: var(--lp-focus);
  box-shadow: 0 0 0 1px var(--lp-focus), 0 0 0 4px var(--lp-focus-soft);
  outline: none;
}
.login-field input[aria-invalid="true"] {
  border-color: var(--lp-danger); box-shadow: 0 0 0 3px rgba(168,40,31,.12); background: var(--risk-red-bg);
}
.login-err-slot { min-height: 42px; margin-bottom: 10px; }
.login-err {
  margin: 0; padding: 10px 12px; border-radius: 8px;
  background: var(--lp-danger-bg); border: 1px solid var(--lp-danger-line); border-left: 3px solid var(--lp-danger);
  color: var(--lp-danger); font-size: 12.5px; font-weight: 500; line-height: 1.5;
}
.btn.primary.login-btn {
  width: 100%; height: 44px; margin-top: 0; padding: 0 14px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: 10px;
  background: var(--accent-grad);
  color: var(--on-color); font-size: 14.5px; font-weight: 600; letter-spacing: .5px;
  box-shadow: 0 6px 16px rgba(79,70,229,.28);
  transition: background .18s, transform .18s, box-shadow .18s;
}
.btn.primary.login-btn:hover {
  background: var(--accent-grad); filter: brightness(1.07);
  transform: translateY(-1px); box-shadow: 0 10px 22px rgba(79,70,229,.36);
}
.btn.primary.login-btn:focus-visible {
  outline: none; box-shadow: 0 0 0 2px var(--lp-ring), 0 0 0 4px var(--lp-focus);
}
.btn.primary.login-btn:disabled,
.btn.primary.login-btn:disabled:hover {
  opacity: .55; box-shadow: none; transform: none; cursor: not-allowed;
}
.login-page .spinner {
  width: 15px; height: 15px; flex: none; display: inline-block; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.45); border-top-color: var(--on-color);
  animation: login-spin .7s linear infinite;
}
@keyframes login-spin { to { transform: rotate(360deg); } }
.login-hint {
  margin-top: 18px; padding: 10px 12px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--lp-line);
  font-size: 11.5px; color: var(--lp-text-2); line-height: 1.6;
}
.login-foot { margin-top: 12px; font-size: 11px; color: var(--lp-text-3); text-align: center; }

@media (max-width: 480px) {
  .login-wrap { padding: 16px; }
  .login-card { padding: 20px 16px; }
  .login-brand .brand-mark { height: 76px; }
  .brand-word { font-size: 32px; }
  .login-card { padding: 40px 16px 24px; }
  .login-brand { margin-bottom: 34px; }
  .login-field input, .btn.primary.login-btn { font-size: 16px; }
}
@media (max-height: 560px) {
  .login-page { align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .login-page .spinner { animation: none; }
  .btn.primary.login-btn, .login-field input { transition: none; }
  .btn.primary.login-btn:hover { transform: none; }
}

/* ---------- 顶栏：用户菜单 ---------- */
.user-menu { position: relative; }
.user-chip {
  display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 9px 0 6px;
  border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); cursor: pointer;
  transition: border-color .15s, background .15s;
}
.user-chip:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.user-chip:disabled { cursor: default; opacity: .85; }
.user-avatar {
  width: 24px; height: 24px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: 10.5px; font-weight: 650;
  background: var(--avatar-grad); color: var(--avatar-ink);
}
.user-meta { display: flex; flex-direction: column; line-height: 1.15; text-align: left; min-width: 0; }
.user-meta b { font-size: 12px; color: var(--text); font-weight: 600; white-space: nowrap; }
.user-meta small { font-size: 10px; color: var(--text-3); white-space: nowrap; }

/* 销售自己的页面：顶栏「个人主页」入口——蓝紫渐变胶囊，呼应个人视角标识 */
.btn-person-home {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 14px; border-radius: 999px;
  border: 1px solid transparent; color: var(--on-color); font-size: 12.5px; font-weight: 600;
  background: var(--accent-grad);
  box-shadow: 0 2px 8px rgba(79,70,229,.28);
  transition: transform .15s, box-shadow .15s, filter .15s;
}
.btn-person-home .ph-icon { flex: none; opacity: .95; }
/* 按钮内 My·主页：白底渐变字 + 青色 y，在蓝紫渐变底上保持清晰 */
.btn-person-home .my-logo { font-weight: 800; letter-spacing: -.4px; }
.btn-person-home .my-logo .brand-word-m {
  background: linear-gradient(180deg,var(--white),var(--surface-blue-3));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: var(--on-color);
  font-size: inherit;
}
.btn-person-home .my-logo .brand-word-blue { color: #8FE9F7; font-size: inherit; }
.btn-person-home:hover {
  color: var(--on-color); filter: brightness(1.07);
  box-shadow: 0 4px 14px rgba(79,70,229,.4); transform: translateY(-1px);
}
.btn-person-home:active { transform: translateY(0); box-shadow: 0 2px 8px rgba(79,70,229,.3); }

/* 个人视角：账户标签集成「本人商务卡片」，点击仍弹账户菜单 */
.user-chip.account-card {
  height: 34px; padding: 0 10px 0 6px; gap: 0; background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: 999px;
}
.user-chip.account-card:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.account-card-item {
  display: flex; align-items: center; gap: 7px; width: auto; padding: 0;
  border: none; background: transparent; cursor: pointer; color: inherit;
}
.account-card-item .seller-avatar {
  flex: 0 0 22px; height: 22px; border-radius: 7px; font-size: 10px;
  background: var(--accent-soft); color: var(--accent);
}
.account-card-item .seller-info { flex-direction: row; align-items: center; gap: 6px; flex: 0 0 auto; }
.account-card-item .seller-name { font-size: 12px; white-space: nowrap; }
.account-card-item .region-tag { font-size: 10.5px; }
/* 账户卡片内的完成进度圆环（111% TOP1），保留但压紧避免撑高胶囊 */
.account-card-item .seller-nums { flex-direction: row; align-items: center; margin-left: 1px; }
.account-card-item .kpi-pie-tag { margin-bottom: 0; padding: 1px 5px 1px 2px; }
.user-pop {
  position: absolute; right: 0; top: 40px; z-index: 40; min-width: 148px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 10px 30px rgba(27,42,56,.14); padding: 5px; display: flex; flex-direction: column;
}
.user-pop[hidden] { display: none; }
.user-pop button {
  border: none; background: transparent; text-align: left; padding: 8px 10px;
  font-size: 12.5px; color: var(--text); border-radius: 6px; cursor: pointer;
}
.user-pop button:hover { background: var(--accent-soft); color: var(--accent); }

/* ---------- 主页卡3：本月 / 下月 ---------- */
.kpi-months { display: flex; flex-direction: column; }
.month-pair { display: flex; flex-direction: column; gap: 5px; margin: 2px 0 1px; }
.mp-row {
  display: grid; grid-template-columns: 36px 1fr 1fr auto; gap: 6px; align-items: center;
  width: 100%; padding: 5px 8px; border: 1px solid var(--line); border-radius: 7px;
  background: var(--surface-2); cursor: pointer; font-size: 11.5px; color: var(--text-2);
  text-align: left; transition: background .14s, border-color .14s;
}
.mp-row:hover { background: var(--accent-soft); border-color: var(--accent-line); }
.mp-row:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.mp-m { font-size: 12px; font-weight: 650; color: var(--text); }
.mp-cell { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.mp-cell b { font-weight: 650; color: var(--text); font-variant-numeric: tabular-nums; }
.mp-total { white-space: nowrap; color: var(--text-3); font-size: 11px; }
.mp-total b { color: var(--accent); font-variant-numeric: tabular-nums; }

/* ---------- KPI 下钻明细行 ---------- */
.kpi-li {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px;
  border: none; border-bottom: 1px solid var(--line); border-radius: 6px;
  background: transparent; cursor: pointer; text-align: left; font-family: inherit;
}
.kpi-li:hover { background: var(--accent-soft); }
.kli-who { flex: none; width: 60px; font-size: 12px; color: var(--text-2); }
.kli-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.kli-main b { font-size: 13px; color: var(--text); }
.kli-main small {
  font-size: 11.5px; color: var(--text-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.kli-amt {
  flex: none; min-width: 86px; text-align: right; font-size: 13px;
  font-weight: 650; color: var(--accent); font-variant-numeric: tabular-nums;
}

/* 编辑销售资料对话框：叠加在销售BD管理弹窗之上 */
.mask-top { z-index: 70; }
/* 中标确认弹窗 */
.win-confirm-dialog { width: min(480px, 94vw); }
.win-confirm-dialog .dialog-body { padding-top: 14px; }
.wc-info { font-size: 13.5px; line-height: 1.6; color: var(--text-2); background: var(--bg-2, var(--bg)); border-radius: 8px; padding: 10px 12px; margin-bottom: 16px; }
.wc-info b { color: var(--text-1); }
.wc-field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.wc-field .req { color: var(--danger-solid); margin-left: 2px; }
.wc-field input { width: 100%; padding: 9px 10px; font-size: 14px; border: 1px solid var(--line, var(--line-strong)); border-radius: 7px; box-sizing: border-box; }
.wc-field input.invalid { border-color: var(--danger-solid); box-shadow: 0 0 0 2px rgba(180,35,24,.15); }
.wc-field .hint { font-size: 11.5px; color: var(--text-3); margin-top: 6px; }
.wc-ito-tip { font-size: 13px; line-height: 1.7; color: var(--warn); background: var(--warn-soft); border: 1px solid var(--warn-soft); border-radius: 8px; padding: 12px; }
.wc-ito-tip b { color: var(--warn); }
#saleEditMask .dialog { max-width: 520px; }
#smEdit h4 { margin: 0 0 14px; font-size: 15px; }
#smEdit .sm-foot label { flex: 1; min-width: 0; }
#smEdit .sm-foot label input, #smEdit .sm-foot label select { width: 100%; min-width: 0; }
/* 二维码虚线框下方的「保存/取消」与边框保持间距，并右对齐 */
#smEdit .wx-qr-sec + .sm-foot { margin-top: 18px; justify-content: flex-end; }

/* ---------- 修改密码 ---------- */
.dialog.narrow { max-width: 400px; }
/* 风格切换弹窗（全部走语义 token，随主题联动） */
.theme-list { display: flex; flex-direction: column; gap: 10px; }
.theme-card { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); cursor: pointer; text-align: left; font: inherit; transition: border-color .15s, box-shadow .15s, background .15s; }
.theme-card:hover { border-color: var(--accent-edge); background: var(--accent-soft-2); }
.theme-card.on { border-color: var(--accent-edge); box-shadow: 0 0 0 2px var(--accent-soft); background: var(--accent-soft-2); }
.theme-swatch { display: inline-flex; gap: 0; flex: none; }
.theme-swatch i { display: block; width: 16px; height: 30px; }
.theme-swatch i:first-child { border-radius: 6px 0 0 6px; }
.theme-swatch i:last-child { border-radius: 0 6px 6px 0; }
.theme-meta { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.theme-meta b { font-size: 13.5px; color: var(--text); }
.theme-meta small { font-size: 11px; color: var(--text-3); }
.theme-check { font-size: 12px; font-weight: 600; color: var(--accent-edge); flex: none; }
.theme-note { margin-top: 14px; padding: 10px 12px; border: 1px solid var(--card-border); border-radius: var(--radius-sm); background: var(--surface-2); font-size: 11.5px; line-height: 1.6; color: var(--text-2); }
.pwd-form { display: flex; flex-direction: column; gap: 11px; }
.pwd-form label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--text-2); }
.pwd-form input {
  height: 38px; padding: 0 11px; border: 1px solid var(--line-strong);
  border-radius: 9px; font-size: 14px; color: var(--text); background: var(--surface);
}
.pwd-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.pwd-err { padding: 8px 10px; border-radius: 8px; background: var(--danger-soft); border: 1px solid var(--danger-soft); color: var(--danger); font-size: 12.5px; }
.pwd-note { font-size: 11.5px; color: var(--text-3); line-height: 1.6; }

/* ---------- 数据体检（只读） ---------- */
.dc-summary {
  margin-bottom: 12px; padding: 10px 12px; border-radius: 9px;
  background: var(--soft, var(--bg)); font-size: 13px; font-weight: 600; color: var(--text);
}
.dc-summary.bad { background: var(--danger-soft); color: var(--danger); }
.dc-report {
  margin: 0; padding: 14px; max-height: 52vh; overflow: auto;
  border: 1px solid var(--line-strong); border-radius: 9px; background: var(--surface);
  font: 12px/1.65 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--text); white-space: pre-wrap; word-break: break-word;
}

/* ---------- 销售BD：账号信息 ---------- */
.sm-acc {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: 11.5px; color: var(--text-2); min-width: 210px;
}
.sm-acc b { color: var(--text); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; }
/* 在线状态：绿点=在线（2分钟内有请求），红点=离线；固定色不随主题漂移 */
.acc-presence { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: 0 0 8px; }
.acc-presence.is-online { background: #16a34a; box-shadow: 0 0 0 3px rgba(22,163,74,.16); }
.acc-presence.is-offline { background: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,.14); }
.sm-acc-btns { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
.btn.mini.role-grant { background: var(--accent-grad); border-color: var(--accent-edge); color: var(--on-color); font-weight: 500; }
.btn.mini.role-grant:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.mini.role-revoke { background: var(--danger-solid); border-color: var(--danger-solid); color: var(--on-color); font-weight: 500; }
.btn.mini.role-revoke:hover { background: var(--danger); border-color: var(--danger); }
.sm-acc em { font-style: normal; padding: 1px 6px; border-radius: 4px; font-size: 10.5px; }
.acc-def { background: var(--warn-soft); color: var(--warn); }
.acc-ok { background: var(--shine-soft); color: var(--shine); }
.acc-admin { background: var(--accent-soft); color: var(--accent); }
.acc-owner { background: var(--danger-soft); color: var(--danger); font-weight: 600; }
.acc-user { background: var(--surface-2); color: var(--text-2); }
.acc-readonly { background: var(--kpi-purple-soft); color: var(--kpi-purple); font-weight: 600; }
.sm-ro-title { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.sm-ro-row .sm-who b { color: var(--text); }
.btn.mini { height: 26px; padding: 0 8px; font-size: 11.5px; border-radius: 6px; }

/* 销售角色下收口管理功能；销售界面（tabs / 个人页 / 导入）对所有销售账号一致开放 */
body[data-role="sales"] #btnSalesMgr { display: none; }

/* 窄屏仍显示账号用户名：头像与角色副标题由文末规则统一隐藏，
   这里若再隐藏 .user-meta 会把用户名也一起藏掉，令账号按钮变成空胶囊 */
@media (max-width: 980px) {
  .user-meta { display: flex; }
}
@media (max-width: 760px) {
  .mp-row { grid-template-columns: 32px 1fr 1fr; }
  .mp-total { grid-column: 2 / -1; font-size: 10.5px; }
  .kli-who { display: none; }
}

/* ---------- v3.18 修正：BD 管理行改为两行，新增销售表单改网格 ---------- */
.sm-row { flex-wrap: wrap; row-gap: 6px; }
.sm-row .sm-who { flex: 1 1 120px; }
.sm-row .sm-stat { flex: 1 1 140px; }
.sm-row .sm-acts { margin-left: auto; }
.sm-row .sm-acc {
  order: 5; flex: 1 0 100%; min-width: 0;
  padding-top: 6px; border-top: 1px dashed var(--line);
}
/* 新增销售：7 个字段一行紧凑排布（姓名 / 账号 / 团队 / 地区 / KPI年份 / KPI / 按钮） */
.sm-add-form {
  display: grid;
  grid-template-columns: minmax(110px, 1.5fr) minmax(120px, 1.4fr) 104px 122px 98px minmax(110px, 1fr) auto;
  align-items: end;
  gap: 8px;
}
.sm-add-form label { gap: 3px; font-size: 11px; white-space: nowrap; }
.sm-add-form input, .sm-add-form select {
  min-width: 0; width: 100%; height: 30px; padding: 0 8px; font-size: 12px;
}
.sm-add-form select.sm-team-locked {
  background: var(--surface-3, #eef0f4); color: var(--text-2); cursor: not-allowed; opacity: .85;
}
.sm-add-form .btn { height: 30px; padding: 0 14px; white-space: nowrap; }
@media (max-width: 900px) {
  .sm-add-form { grid-template-columns: 1fr 1fr; }
  .sm-add-form button { grid-column: 1 / -1; }
}

/* ---------- v3.21 个人页第4卡：客户分组下钻 ---------- */
.cust-group { border-bottom: 1px solid var(--line); }
.cust-head {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px;
  border: none; background: transparent; cursor: pointer; text-align: left; font-family: inherit;
  border-radius: 6px;
}
.cust-head:hover, .cust-group.open .cust-head { background: var(--accent-soft); }
.cust-head:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.cg-idx {
  flex: none; width: 22px; height: 22px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft-2); color: var(--accent); font-size: 11px; font-weight: 700;
}
.cg-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cg-main b { font-size: 13.5px; color: var(--text); }
.cg-main small { font-size: 11px; color: var(--text-3); }
.cg-amt { flex: none; font-size: 13px; font-weight: 650; color: var(--accent); font-variant-numeric: tabular-nums; }
.cg-arrow { flex: none; font-size: 18px; color: var(--text-3); transition: transform .16s; }
.cust-head.open .cg-arrow { transform: rotate(90deg); }
.cust-items { padding: 0 0 6px 34px; }
.cust-opp { padding: 8px 10px; }
.cust-opp .kli-who { width: 42px; }

/* ---------- v3.21 Excel 批量导入 ---------- */
.person-hero-actions { display: flex; flex-direction: column; gap: 8px; }
.imp-step1 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.imp-file-label { display: inline-flex; align-items: center; cursor: pointer; }
.imp-tip {
  font-size: 11.5px; color: var(--text-3); background: var(--accent-soft-2);
  border: 1px solid var(--accent-soft-2); border-radius: 8px; padding: 8px 10px; line-height: 1.6;
}
.imp-preview { margin-top: 12px; }
.imp-summary { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--text-2); margin-bottom: 8px; }
.imp-summary b { color: var(--accent); font-size: 13px; }
.imp-table-wrap { max-height: 280px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.imp-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.imp-table th, .imp-table td { padding: 7px 9px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.imp-table th { position: sticky; top: 0; background: var(--surface-2); color: var(--text-2); font-weight: 600; z-index: 1; }
.imp-table .imp-more { text-align: center; color: var(--text-3); }
.imp-result { margin-top: 12px; }
.imp-ok { font-size: 13px; color: var(--shine); background: var(--shine-soft); border: 1px solid var(--shine-line); border-radius: 8px; padding: 10px 12px; }
.imp-err, .imp-err-list { font-size: 12px; color: var(--danger); background: var(--danger-soft); border: 1px solid var(--danger-soft); border-radius: 8px; padding: 10px 12px; }
.imp-err-list { margin-top: 8px; line-height: 1.6; }
/* 导入校验与可编辑预览 */
.imp-check { margin-top: 12px; }
.imp-warn { font-size: 12.5px; color: var(--warn); background: var(--warn-soft); border: 1px solid var(--warn-line); border-radius: 8px; padding: 9px 12px; line-height: 1.6; }
.imp-bad-txt { color: var(--danger); }
.imp-bad-txt b { color: var(--danger); }
.imp-good-txt { color: var(--shine); }
.imp-table.imp-editable th, .imp-table.imp-editable td { white-space: nowrap; padding: 5px 7px; }
.imp-editable .imp-ln { color: var(--text-3); font-variant-numeric: tabular-nums; width: 28px; }
.imp-editable input, .imp-editable select {
  width: 100%; min-width: 90px; box-sizing: border-box; font-size: 12px;
  padding: 4px 6px; border: 1px solid var(--line); border-radius: 5px;
  background: var(--surface); color: var(--text);
}
.imp-editable input[type=number] { min-width: 78px; }
.imp-editable select { min-width: 92px; cursor: pointer; }
.imp-editable input:focus, .imp-editable select:focus { outline: 2px solid var(--accent-mid); border-color: var(--accent); }
.imp-table tr.imp-bad { background: var(--warn-soft); }
.imp-table tr.imp-bad input, .imp-table tr.imp-bad select { border-color: var(--danger-line); background: var(--surface); }
.imp-flag { text-align: center; font-weight: 700; width: 28px; color: var(--shine); }
.imp-bad .imp-flag { color: var(--danger); }
@media (max-width: 720px) {
  .person-hero-actions { flex-direction: row; }
}

/* ---------- v3.22 周会汇报总览独立页 + 团队总计 ---------- */
#viewWeekly.weekly-overview { margin-top: 0; }
/* 晨会/周会已是独立页：放宽容器，工作安排整页完整展示 */
body[data-view="weekly"] .wrap { max-width: 1680px; }
body[data-view="weekly"] .weekly-overview-body { padding: 16px 20px 24px; }
.weekly-page-head { display: flex; align-items: center; gap: 14px; margin: 4px 0 14px; }
.weekly-page-head h2 { font-size: 18px; margin: 0; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.weekly-page-head .hint { font-size: 12px; font-weight: 400; }
body[data-view="weekly"] .tw-section .ws-title { padding: 13px 18px; font-size: 15px; }
body[data-view="weekly"] .tw-section .ws-title .ws-count { font-size: 13px; }
/* 团队晨会/周会两页切换 */
.weekly-switch { display: inline-flex; align-items: center; gap: 3px; padding: 3px; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; }
.weekly-switch .ws-tab { border: 0; background: transparent; color: var(--text-2); font: inherit; font-size: 12.5px; font-weight: 600; padding: 6px 14px; border-radius: 6px; cursor: pointer; white-space: nowrap; }
.weekly-switch .ws-tab:hover { color: var(--accent); background: var(--accent-soft); }
.weekly-switch .ws-tab.active { background: var(--accent-grad); color: #fff; box-shadow: var(--shadow-soft); }
/* 历史周报选择器 */
.weekly-archive-pick { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; white-space: nowrap; }
.weekly-archive-pick .wa-label { font-size: 12px; font-weight: 600; color: var(--text-2); }
.weekly-archive-pick select { font: inherit; font-size: 12.5px; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; cursor: pointer; max-width: 260px; }
.weekly-archive-pick select:focus { outline: none; border-color: var(--accent); }
.ts-months-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; align-items: start; }
.ts-section { border-color: var(--card-border); box-shadow: var(--shadow-hover); }
.ts-section .ws-title { background: var(--accent-grad-soft); }
@media (max-width: 1100px) { .ts-months-row { grid-template-columns: 1fr; } }
.ts-actions { margin-left: auto; display: flex; gap: 6px; }
.ts-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--card-border); }
.ts-cell { background: var(--surface); padding: 14px 8px; text-align: center; }
.ts-label { font-size: 12px; color: var(--text); font-weight: 600; margin-bottom: 6px; }
.ts-manual-tag { font-size: 9px; color: var(--warn); background: var(--warn-soft); border-radius: 4px; padding: 1px 4px; margin-left: 2px; }
.ts-amt { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; cursor: pointer; }
.ts-amt:hover { text-decoration: underline; }
.ts-count { font-size: 11px; color: var(--text-3); margin-top: 3px; }
/* 五项指标数字统一蓝紫渐变文字，消除青/蓝/紫混用 */
.ts-won .ts-amt, .ts-pub .ts-amt, .ts-hang .ts-amt, .ts-remain .ts-amt, .ts-try .ts-amt {
  background: var(--card-grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: var(--accent-edge);
}
.ts-edit-form { display: flex; flex-direction: column; gap: 12px; }
.ts-edit-row { display: grid; grid-template-columns: 90px 1fr 1fr; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.ts-edit-row b { font-size: 13px; }
.ts-edit-row label { font-size: 11px; color: var(--text-3); display: flex; flex-direction: column; gap: 3px; }
.ts-edit-row input { width: 100%; padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; font-family: inherit; }
@media (max-width: 860px) {
  .ts-grid { grid-template-columns: repeat(2, 1fr); }
  .ts-edit-row { grid-template-columns: 1fr 1fr; }
  .ts-edit-row b { grid-column: 1 / -1; }
}

/* ---------- 客户管理：客户档案 / 商机关联 / 资料库 ---------- */
.cust-summary {
  display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center;
  padding: 10px 14px; margin-bottom: 10px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--surface-2); font-size: 12px; color: var(--text-2);
}
.cust-summary b { color: var(--text); font-size: 14px; font-variant-numeric: tabular-nums; }
/* 客户简称/全称自动识别提示条 */
.dup-hint { padding: 12px 14px; margin-bottom: 12px; border: 1px solid var(--accent-line, #9DC0FF); border-radius: 8px; background: var(--accent-soft-2, #F1F6FF); }
.dup-hint-tit { font-size: 13px; font-weight: 600; color: var(--accent-hover, #0A55D8); margin-bottom: 8px; }
.dup-hint-list { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.dup-pair { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-2); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; }
.dup-pair b { color: var(--text); }
/* 客户表：固定布局 + 百分比列宽，客户名不再独占剩余空间，各列比例更和谐 */
.cust-table { table-layout: fixed; min-width: 1100px; }
.cust-table th:nth-child(1), .cust-table td:nth-child(1) { width: 26%; }        /* 客户名称 */
.cust-table th:nth-child(2), .cust-table td:nth-child(2) { width: 6%; }         /* 属地 */
.cust-table th:nth-child(3), .cust-table td:nth-child(3) { width: 5%; }         /* 类型 */
.cust-table th:nth-child(4), .cust-table td:nth-child(4) { width: 8%; }         /* 地区 */
.cust-table th:nth-child(5), .cust-table td:nth-child(5) { width: 9%; }         /* 归属销售 */
.cust-table th:nth-child(6), .cust-table td:nth-child(6) { width: 5%; }         /* 商机 */
.cust-table th:nth-child(7), .cust-table td:nth-child(7) { width: 10%; }        /* 商机金额 */
.cust-table th:nth-child(8), .cust-table td:nth-child(8) { width: 8%; }         /* 中标 */
.cust-table th:nth-child(9), .cust-table td:nth-child(9) { width: 10%; }        /* 最近维护 */
.cust-table th:nth-child(10), .cust-table td:nth-child(10) { width: 5%; }       /* 资料 */
.cust-table th:nth-child(11), .cust-table td:nth-child(11) { width: 8%; }       /* 查看 */
/* 地区（华东地区）与日期（2026-11-15）保持单行，不拆行 */
.cust-table td:nth-child(2), .cust-table td:nth-child(4), .cust-table td:nth-child(9) { white-space: nowrap; }
.cust-table tbody tr { cursor: pointer; }
.cust-table .cust-name { font-weight: 600; color: var(--text); }
.cust-table .cust-name:hover { color: var(--accent); text-decoration: underline; }
.cust-table .owner-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.owner-chip {
  display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 10px;
  background: var(--accent-soft); color: var(--accent-hover); font-size: 11px; white-space: nowrap;
}
.owner-chip.shared { background: var(--warn-soft); color: var(--warn); }
.cust-basic { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.cust-basic > div { background: var(--surface); padding: 12px 13px; }
.cust-basic .cb-label { font-size: 11px; color: var(--text-3); margin-bottom: 5px; }
.cust-basic .cb-value { font-size: 13px; color: var(--text); line-height: 1.5; word-break: break-all; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.cust-basic .oneid-val { color: var(--kpi-purple); font-size: 14px; letter-spacing: 1px; display: inline-flex; align-items: center; gap: 7px; user-select: all; }
.oneid-copy { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; padding: 0; border: 1px solid var(--kpi-purple); border-radius: 5px; background: transparent; color: var(--kpi-purple); cursor: pointer; user-select: none; vertical-align: middle; transition: background .15s, color .15s; }
.oneid-copy:hover { background: var(--kpi-purple); color: var(--on-color); }
.oneid-copy:active { transform: scale(.94); }
/* 按客户编号合并客户 */
.merge-sec { /* 去掉紫色竖条，与其他区块标题风格保持一致 */ }
.merge-lookup { display: flex; gap: 8px; align-items: center; }
.merge-oneid { flex: 1; min-width: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--surface); color: var(--text); }
.merge-result { margin-top: 12px; }
.merge-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.merge-card { border: 1px solid var(--card-border); border-radius: 8px; padding: 11px 12px; background: var(--surface); }
.merge-card.keep { border-color: var(--shine); background: var(--shine-soft); }
.merge-card.drop { border-color: var(--warn-hover); background: var(--warn-soft); }
.merge-card .mc-tag { font-size: 11px; color: var(--text-3); margin-bottom: 5px; }
.merge-card .mc-name { font-size: 13px; font-weight: 500; color: var(--text); margin-bottom: 3px; }
.merge-card .mc-one { font-size: 12px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--kpi-purple); margin-bottom: 7px; }
.merge-card .mc-role { font-size: 11px; display: inline-block; padding: 2px 7px; border-radius: 10px; }
.merge-card .mc-role.ok { color: var(--shine); background: var(--shine-line); }
.merge-card .mc-role.warn { color: var(--warn-hover); background: var(--warn-line); }
.merge-summary { font-size: 12px; color: var(--text-2); line-height: 1.6; margin-top: 11px; }
.merge-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.merge-err { font-size: 12px; color: var(--danger-hover); padding: 9px 10px; background: var(--danger-soft); border-radius: 6px; }
/* 归属销售勾选列表（新增弹窗 + 客户详情共用） */
.cust-basic .cb-owner-cell { grid-column: 1 / -1; }
.owner-checklist { display: flex; flex-wrap: wrap; gap: 8px 10px; }
.owner-check {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer; user-select: none;
  padding: 6px 11px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); font-size: 12.5px; color: var(--text-2); transition: all .12s;
}
.owner-check:hover { border-color: var(--accent-mid); background: var(--accent-soft-2); }
.owner-check input { position: absolute; opacity: 0; width: 0; height: 0; }
.owner-check .oc-box {
  width: 15px; height: 15px; border: 1.5px solid var(--line-strong); border-radius: 4px;
  flex: 0 0 auto; position: relative; background: var(--surface); transition: all .12s;
}
.owner-check.checked { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.owner-check.checked .oc-box { background: var(--accent); border-color: var(--accent); }
.owner-check.checked .oc-box::after {
  content: ''; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px;
  border: solid var(--surface); border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.owner-check.readonly { cursor: default; opacity: .9; }
.owner-check.readonly:hover { border-color: var(--line); background: var(--surface); }
.cust-sec { margin-top: 20px; }
.cust-sec h4 { font-size: 13px; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.cust-sec h4 .hint { font-size: 11px; font-weight: 400; }
.cust-note { width: 100%; min-height: 76px; padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: 7px; font-family: inherit; font-size: 13px; resize: vertical; }
.cust-opp-row { display: grid; grid-template-columns: 54px minmax(160px, 1fr) 84px 66px 78px 82px; gap: 8px; align-items: center; padding: 9px 10px; border-bottom: 1px solid var(--line); font-size: 12.5px; cursor: pointer; }
.cust-opp-row:hover { background: var(--accent-soft-2); }
.cust-opp-row .co-title { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cust-opp-row .co-amt { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.stage-pill { display: inline-block; padding: 2px 7px; border-radius: 9px; font-size: 11px; background: var(--accent-soft); color: var(--accent-hover); }
.stage-pill.won { background: var(--shine-soft); color: var(--shine); }
.stage-pill.dead { background: var(--bg); color: var(--text-3); }
.doc-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.doc-item .doc-icon { width: 28px; height: 28px; border-radius: 6px; background: var(--accent-soft); color: var(--accent-hover); display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; flex: none; }
.doc-item .doc-main { flex: 1; min-width: 0; }
.doc-item .doc-main a { color: var(--accent); text-decoration: none; }
.doc-item .doc-main a:hover { text-decoration: underline; }
.doc-item .doc-meta { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.form-grid.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.form-grid.two > .fld.full { grid-column: 1 / -1; } /* 名称/别名等长字段占整行，右边界与两列行对齐 */
.ce-name-hint { grid-column: 1 / -1; margin-top: -4px; min-height: 15px; }
.ce-name-hint.merge { color: var(--warn); background: var(--warn-soft); border: 1px solid var(--warn-line); border-radius: 6px; padding: 5px 9px; }
.ce-name-hint.merge:has(.ce-direct-link:not([hidden])) { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ce-name-hint.merge #ceNameHintText { flex: 1 1 240px; }
.ce-direct-link { flex: none; color: var(--on-color); background: var(--warn); border-color: var(--warn); }
.ce-direct-link:hover { background: var(--warn); border-color: var(--warn); }
.fld { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.fld .lb { font-size: 12.5px; color: var(--text-2); min-height: 18px; line-height: 18px; }
.link-list { max-height: 340px; overflow-y: auto; margin-top: 10px; border: 1px solid var(--line); border-radius: 8px; }
.link-row { display: flex; align-items: center; gap: 9px; padding: 8px 11px; border-bottom: 1px solid var(--line); font-size: 12.5px; cursor: pointer; }
.link-row:last-child { border-bottom: none; }
.link-row:hover { background: var(--accent-soft-2); }
.link-row input { width: auto; height: auto; }
.link-row .lr-main { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-row .lr-owner { color: var(--text-3); font-size: 11px; white-space: nowrap; }
@media (max-width: 900px) {
  .cust-basic { grid-template-columns: repeat(2, 1fr); }
  .form-grid.two { grid-template-columns: 1fr; }
  .cust-opp-row { grid-template-columns: 58px 1fr 76px 78px; }
  .cust-opp-row .co-owner, .cust-opp-row .co-date { display: none; }
}
.doc-panel { margin-top: 14px; }
.doc-panel .doc-link { color: var(--accent); text-decoration: none; font-weight: 550; }
.doc-panel .doc-link:hover { text-decoration: underline; }

/* ---------- 客户标签云：按归属销售聚合 ---------- */
.cust-cloud {
  padding: 11px 13px 12px; margin-bottom: 12px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2);
}
.cust-cloud-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 9px; }
.cust-cloud-head b { font-size: 12.5px; color: var(--text); }
.cust-cloud-head .hint { font-size: 11px; }
/* 销售自己的页面：标签行右侧新增客户入口，右对齐 */
.btn-new-cust-cloud { margin-left: auto; align-self: center; }
.cust-cloud-body { display: flex; flex-wrap: wrap; gap: 7px; }
.cust-cloud-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px;
  border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface);
  font-family: inherit; font-size: 12.5px; color: var(--text-2); cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.cust-cloud-chip:hover { border-color: var(--accent-line); color: var(--accent); }
.cust-cloud-chip.active {
  background: var(--accent-grad); border-color: var(--accent-edge); color: var(--on-color); font-weight: 550;
}
.cust-cloud-chip i {
  font-style: normal; font-size: 11px; min-width: 18px; height: 18px; line-height: 18px;
  text-align: center; border-radius: 9px; background: var(--surface-2); color: var(--text-2);
}
.cust-cloud-chip.active i { background: rgba(255, 255, 255, .25); color: var(--on-color); }
.cust-cloud-chip small { font-size: 10.5px; opacity: .72; font-variant-numeric: tabular-nums; }
.cust-alias {
  width: 100%; height: 38px; padding: 0 11px;
  border: 1px solid var(--line-strong); border-radius: 8px;
  font-family: inherit; font-size: 13px; color: var(--text); background: var(--surface);
}
.cust-alias:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.cust-tags {
  width: 100%; height: 38px; padding: 0 11px;
  border: 1px solid var(--line-strong); border-radius: 8px;
  font-family: inherit; font-size: 13px; color: var(--text); background: var(--surface);
}
.cust-tags:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.tag-common { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 9px; }
.tag-chip {
  padding: 4px 10px; border: 1px solid var(--line-strong); border-radius: 14px;
  background: var(--surface); color: var(--text-2); font-size: 12px; cursor: pointer; line-height: 1.4;
}
.tag-chip:hover { border-color: var(--accent); color: var(--accent); }
.tag-chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

/* ==================== ITO 业务 ==================== */
.ito-summary-panel .panel-head { align-items: center; }
.ito-kpi { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 0 18px 16px; }
.ito-kpi-card { background: var(--bg); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 12px 14px; }
.ito-kpi-card.accent { background: var(--accent-soft); }
.ito-kpi-card .ik-label { font-size: 12px; color: var(--text-2); }
.ito-kpi-card .ik-value { font-size: 22px; font-weight: 600; line-height: 1.3; margin-top: 3px; background: var(--card-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: var(--accent-edge); }
.ito-kpi-card.accent .ik-value { color: var(--accent-edge); }
.ito-kpi-card .ik-sub { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.ito-table .ito-date-input {
  width: 100%; min-width: 96px; border: 1px solid transparent; background: transparent;
  color: var(--text); font-size: 12px; padding: 3px 4px; border-radius: 5px; cursor: text;
}
/* 发标 / 中标时间：列表只读展示，黑色字体 */
.ito-table .ito-time-th { color: var(--black); }
.ito-table .ito-time-ro { color: var(--black); font-size: 12.5px; white-space: nowrap; }
.ito-table .ito-date-input:hover { border-color: var(--line-strong); background: var(--surface-2); }
.ito-table .ito-date-input:focus { border-color: var(--accent); background: var(--surface); outline: none; }
.ito-table .ito-name-btn { background: none; border: 0; padding: 0; color: var(--text); cursor: pointer; text-align: left; font: inherit; }
.ito-table .ito-name-btn:hover { color: var(--accent); }
.ito-table .ito-cycle { display: inline-block; padding: 1px 8px; border-radius: 10px; background: var(--kpi-purple-soft); color: var(--kpi-purple); font-size: 12px; }
.ito-table .ito-amt { color: var(--shine); font-weight: 500; white-space: nowrap; }
.ito-table .seller-mini { display: inline-block; padding: 1px 6px; margin: 1px 3px 1px 0; border-radius: 5px; background: var(--accent-soft); color: var(--accent); font-size: 12px; }
.ito-note { margin: 0; border-radius: 0 0 var(--radius) var(--radius); }

/* ITO 编辑弹窗 */
.ito-dialog .dialog-body { max-height: 72vh; }
.ito-section-title {
  font-size: 13px; font-weight: 600; color: var(--text); margin: 8px 0 12px;
  padding-left: 9px; border-left: 3px solid var(--accent);
  display: flex; align-items: center; justify-content: space-between;
}
.ito-pos-actions { display: inline-flex; gap: 6px; }
.form-grid.four { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.ito-pos-table-wrap { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.ito-pos-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.ito-pos-table th { background: var(--bg); font-size: 12px; color: var(--text-2); font-weight: 500; padding: 8px 6px; text-align: left; border-bottom: 1px solid var(--line); }
.ito-pos-table th.num, .ito-pos-table td.num { text-align: right; }
.ito-pos-table td { padding: 5px 6px; border-bottom: 1px solid var(--line); }
.ito-pos-table tr:last-child td { border-bottom: 0; }
.ito-pos-table input { width: 100%; border: 1px solid var(--line); border-radius: 5px; padding: 5px 7px; font-size: 13px; }
.ito-pos-table input:focus { border-color: var(--accent); outline: none; }
.ito-pos-table input[type=number] { text-align: right; }
.ito-pos-table th:first-child, .ito-pos-table td:first-child { width: auto; }
.ito-pos-table th:nth-child(2), .ito-pos-table td:nth-child(2) { width: 45%; }
.ito-pos-table .w-act { width: 36px; }

/* ITO 表格：可编辑数字输入（人数 / 月数） */
.ito-table .ito-num-input {
  width: 52px; border: 1px solid transparent; background: transparent;
  color: var(--text); font-size: 12px; padding: 3px 4px; border-radius: 5px; text-align: right; cursor: text;
}
.ito-table .ito-num-input:hover { border-color: var(--line-strong); background: var(--surface-2); }
.ito-table .ito-num-input:focus { border-color: var(--accent); background: var(--surface); outline: none; }
.ito-table .ito-num-input::-webkit-inner-spin-button,
.ito-table .ito-num-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* ITO 岗位对话框（两列手填：岗位名称 + 单价，可多次添加） */
.ito-role-price-dialog { width: min(680px, 94vw); }
.ito-role-price-dialog .dialog-body { max-height: 64vh; overflow: auto; }
.ito-price-table { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.ito-price-head { display: grid; grid-template-columns: 1.2fr 1fr 32px; gap: 10px; padding: 8px 10px; background: var(--bg); border-bottom: 1px solid var(--line); font-size: 12px; color: var(--text-2); }
.ito-price-head span:nth-child(2) { text-align: left; }
.ito-price-row { display: grid; grid-template-columns: 1.2fr 1fr 32px; gap: 10px; align-items: center; padding: 7px 10px; border-bottom: 1px solid var(--line); }
.ito-price-row:last-child { border-bottom: 0; }
.ito-price-row input { width: 100%; border: 1px solid var(--line-strong); border-radius: 6px; padding: 6px 8px; font-size: 13px; }
.ito-price-row input:focus { border-color: var(--accent); outline: none; }
.ito-price-row .row-del { justify-self: center; }
.ito-role-price-dialog #btnItoPriceAddRow { margin-top: 10px; }

@media (max-width: 900px) {
  .ito-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ==================== ITO 改造：岗位报价 / 入场时间 / 月度结算 ==================== */
/* 主列表：岗位+报价、入场时间、累计结算按钮 */
.ito-table .w-pos { width: 150px; }
.ito-table .w-entry { width: 108px; }
.ito-table .ito-pos-brief { max-width: 170px; }
.ito-table .ipb-row { display: flex; align-items: center; gap: 6px; line-height: 1.7; font-size: 12px; }
.ito-table .ipb-role { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100px; }
.ito-table .ipb-price { color: var(--shine); font-weight: 500; white-space: nowrap; }
.ito-table .ito-entry-cell { display: flex; flex-wrap: wrap; gap: 3px; }
.ito-table .entry-chip { display: inline-block; padding: 1px 6px; border-radius: 5px; background: var(--kpi-purple-soft); color: var(--kpi-purple); font-size: 11px; white-space: nowrap; }
.ito-table .ito-settle-btn { background: none; border: 0; padding: 2px 4px; color: var(--shine); font-weight: 500; cursor: pointer; font: inherit; white-space: nowrap; }
.ito-table .ito-settle-btn:hover { text-decoration: underline; }

/* 编辑弹窗岗位表：入场时间列 */
.ito-pos-table input[type=date] { width: 100%; border: 1px solid var(--line); border-radius: 5px; padding: 5px 7px; font-size: 12px; }
.ito-pos-table input[type=date]:focus { border-color: var(--accent); outline: none; }

/* 月度结算弹窗 */
.ito-settle-dialog { width: min(560px, 94vw); }
.ito-settle-dialog .dialog-body { max-height: 66vh; overflow: auto; }
.ito-settle-toolbar { display: flex; gap: 8px; margin-bottom: 12px; }
.ito-settle-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; }
.ito-settle-item { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.ito-settle-item .ism-label { width: 34px; flex: 0 0 auto; color: var(--text); }
.ito-settle-item input { flex: 1; min-width: 0; border: 1px solid var(--line-strong); border-radius: 6px; padding: 6px 9px; font-size: 13px; }
.ito-settle-item input:focus { border-color: var(--accent); outline: none; }
.ito-settle-foot { justify-content: space-between; align-items: center; }
.ito-settle-foot .ito-settle-total { font-size: 14px; color: var(--text-2); }
.ito-settle-foot .ito-settle-total b { color: var(--shine); font-size: 18px; margin-left: 4px; }
@media (max-width: 900px) {
  .ito-settle-grid { grid-template-columns: 1fr; }
}

/* ============ 只读账号：隐藏全部写入口，仅保留查看/下钻/切换/关闭 ============ */
body[data-role="readonly"] #btnKbNew,
body[data-role="readonly"] #btnKbUpload,
body[data-role="readonly"] #btnCustomerNew,
body[data-role="readonly"] #btnKnowledgeCloud,
body[data-role="readonly"] #btnDocGlobal,
body[data-role="readonly"] #btnDocListUpload,
body[data-role="readonly"] #btnItoNew,
body[data-role="readonly"] #btnNewForPerson,
body[data-role="readonly"] #btnAddOppTop,
body[data-role="readonly"] #btnImport,
body[data-role="readonly"] #btnEditWins,
body[data-role="readonly"] #btnPersonCustOpen,
body[data-role="readonly"] #btnRefreshDaily,
body[data-role="readonly"] #btnEditWeekly,
body[data-role="readonly"] #btnDeleteFromDetail,
body[data-role="readonly"] #btnEditFromDetail,
body[data-role="readonly"] #btnDeleteCustomer,
body[data-role="readonly"] #btnLinkOpps,
body[data-role="readonly"] #btnUploadDoc,
body[data-role="readonly"] #btnSaveCustomerNote,
body[data-role="readonly"] #btnCreateCustFromCard,
body[data-role="readonly"] #btnSaveCustomerNew,
body[data-role="readonly"] #btnSubmitDoc,
body[data-role="readonly"] #btnSaveLink,
body[data-role="readonly"] #btnSaveEdit,
body[data-role="readonly"] #btnSaveWeekly,
body[data-role="readonly"] #btnAddSchedItem,
body[data-role="readonly"] #btnSaveSched,
body[data-role="readonly"] #btnConfirmImport,
body[data-role="readonly"] #btnSaveTs,
body[data-role="readonly"] #btnSaveWin,
body[data-role="readonly"] #btnConfirmTeamKpi,
body[data-role="readonly"] #btnModifyTeamKpi,
body[data-role="readonly"] #btnAddSale,
body[data-role="readonly"] #btnSavePwd,
body[data-role="readonly"] #btnItoPosImport,
body[data-role="readonly"] #btnItoPosAdd,
body[data-role="readonly"] #btnSaveIto,
body[data-role="readonly"] #btnItoPriceAddRow,
body[data-role="readonly"] #btnCancelWinEdit,
body[data-role="readonly"] .oc-edit-btn,
body[data-role="readonly"] .stage-pick,
body[data-role="readonly"] .kpi-edit,
body[data-role="readonly"] .btn-reset-person,
body[data-role="readonly"] .ts-actions,
body[data-role="readonly"] [data-docdel],
body[data-role="readonly"] [data-restore],
body[data-role="readonly"] [data-purge],
body[data-role="readonly"] .fullname-edit,
body[data-role="readonly"] #btnFullName,
body[data-role="readonly"] #btnMergeCust { display: none !important; }

/* ============ 方案库账号：只看全部业务数据(只读) + 仅解决方案库可写 ============ */
body[data-role="solution"] #btnKbNew,
body[data-role="solution"] #btnCustomerNew,
body[data-role="solution"] #btnDocGlobal,
body[data-role="solution"] #btnDocListUpload,
body[data-role="solution"] #btnItoNew,
body[data-role="solution"] #btnNewForPerson,
body[data-role="solution"] #btnAddOppTop,
body[data-role="solution"] #btnImport,
body[data-role="solution"] #btnEditWins,
body[data-role="solution"] #btnPersonCustOpen,
body[data-role="solution"] #btnRefreshDaily,
body[data-role="solution"] #btnEditWeekly,
body[data-role="solution"] #btnDeleteFromDetail,
body[data-role="solution"] #btnEditFromDetail,
body[data-role="solution"] #btnDeleteCustomer,
body[data-role="solution"] #btnLinkOpps,
body[data-role="solution"] #btnUploadDoc,
body[data-role="solution"] #btnSaveCustomerNote,
body[data-role="solution"] #btnCreateCustFromCard,
body[data-role="solution"] #btnSaveCustomerNew,
body[data-role="solution"] #btnSubmitDoc,
body[data-role="solution"] #btnSaveLink,
body[data-role="solution"] #btnSaveEdit,
body[data-role="solution"] #btnSaveWeekly,
body[data-role="solution"] #btnAddSchedItem,
body[data-role="solution"] #btnSaveSched,
body[data-role="solution"] #btnConfirmImport,
body[data-role="solution"] #btnSaveTs,
body[data-role="solution"] #btnSaveWin,
body[data-role="solution"] #btnConfirmTeamKpi,
body[data-role="solution"] #btnModifyTeamKpi,
body[data-role="solution"] #btnAddSale,
body[data-role="solution"] #btnItoPosImport,
body[data-role="solution"] #btnItoPosAdd,
body[data-role="solution"] #btnSaveIto,
body[data-role="solution"] #btnItoPriceAddRow,
body[data-role="solution"] #btnCancelWinEdit,
body[data-role="solution"] .oc-edit-btn,
body[data-role="solution"] .stage-pick,
body[data-role="solution"] .kpi-edit,
body[data-role="solution"] .btn-reset-person,
body[data-role="solution"] .ts-actions,
body[data-role="solution"] [data-docdel],
body[data-role="solution"] [data-restore],
body[data-role="solution"] [data-purge],
body[data-role="solution"] .fullname-edit,
body[data-role="solution"] #btnFullName,
body[data-role="solution"] #btnMergeCust { display: none !important; }

/* 只读态：客户全称输入保持只读外观，阶段列退化为纯文本色调 */
body[data-role="readonly"] .stage-sel { pointer-events: none; opacity: 1; color: var(--text-2); }

/* 只读角标 */
body[data-role="readonly"] #userRole { color: var(--kpi-purple, #7c5cff); font-weight: 600; }
body[data-role="readonly"] #btnEditFullName,
body[data-role="readonly"] #btnCancelFullName,
body[data-role="readonly"] .btn-edit-fullname,
body[data-role="readonly"] .tag-editor,
body[data-role="readonly"] [data-merge],
body[data-role="readonly"] #btnMerge {
  /* 客户档案内的标签编辑、合并入口同样收口 */
  display: none !important;
}

/* 只读态：富文本/输入类字段一律只读外观，禁止编辑交互 */
body[data-role="readonly"] [contenteditable="true"],
body[data-role="readonly"] .calc-field[contenteditable],
body[data-role="readonly"] textarea,
body[data-role="readonly"] input:not([type=checkbox]):not([type=radio]):not([type=button]):not([type=submit]) { pointer-events: none; -webkit-user-select: text; user-select: text; }

/* ===== 勘误兜底：SVG 内联 fill 属性选择器（app.js 月图/季图 4 处） ===== */
[fill="#16a34a"] { fill: var(--shine); }
[fill="#15803d"] { fill: var(--shine); }
[fill="#eef0f4"] { fill: var(--track); }

/* ===== 视角区分（纯 CSS，零 JS）===== */
/* 顶栏底部 3px 语义色条 */
.topbar { position: sticky; }
.topbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px;
  height: 3px; background: var(--role-team); pointer-events: none;
}
body[data-role="admin"] .topbar::after { background: var(--role-team); }
body[data-role="sales"] .topbar::after { background: var(--role-team); opacity: .55; }
body[data-role="readonly"] .topbar::after { background: var(--role-readonly); }
body:has(#viewPerson:not([hidden])) .topbar::after { background: var(--role-person); }

/* 视角 chip：仅视觉增强，语义由 #userRole 承担 */
body:not([data-role]) .topbar-right::before,
.topbar-right > .ui-role-chip { display: none; }
body[data-role] .topbar-right::before {
  content: "团队视角";
  font-size: 11px; font-weight: 600; line-height: 20px;
  padding: 0 8px; height: 20px; border-radius: var(--radius-pill);
  background: var(--accent-soft); color: var(--accent);
  border: 1px solid var(--accent-line); white-space: nowrap;
}
body[data-role="sales"] .topbar-right::before { content: "我的数据"; }
body[data-role="readonly"] .topbar-right::before {
  content: "只读视角"; background: var(--surface-3); color: var(--text-2); border-color: var(--line);
}
body:has(#viewPerson:not([hidden])) .topbar-right::before {
  content: "个人视角"; background: var(--kpi-teal-soft); color: var(--kpi-teal); border-color: var(--kpi-teal);
}

/* 个人页 hero 强调 */
body:has(#viewPerson:not([hidden])) .person-hero {
  border-left: 3px solid var(--role-person);
}
body:has(#viewPerson:not([hidden])) .person-hero h2 { font-size: 22px; }

/* 范围提示：seller 视图顶部固定短句 */
body[data-role="admin"] #viewAll .panel:first-child::before,
body[data-role="sales"] #viewAll .panel:first-child::before {
  display: block; font-size: 11.5px; color: var(--text-3); padding: 8px 14px 0;
}
body[data-role="admin"] #viewAll .panel:first-child::before { content: "当前展示大东南区全量"; }
body[data-role="sales"] #viewAll .panel:first-child::before { content: "当前仅展示你名下的数据"; }

/* ===== 焦点环（不触碰登录页 2103–2226）===== */
body:not(:has(.login-page)) :focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
body:not(:has(.login-page)) button:focus-visible,
body:not(:has(.login-page)) a:focus-visible,
body:not(:has(.login-page)) [role="button"]:focus-visible {
  outline: 2px solid var(--focus); outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(11,114,133,.16);
}
body:not(:has(.login-page)) input:focus-visible,
body:not(:has(.login-page)) select:focus-visible,
body:not(:has(.login-page)) textarea:focus-visible {
  border-color: var(--focus) !important; outline: none; box-shadow: var(--focus-ring);
}

/* ===== 响应式：窄屏表格首列 sticky 实底 ===== */
@media (max-width: 900px) {
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .table-wrap thead th:first-child, .table-wrap tbody td:first-child {
    position: sticky; left: 0; z-index: 12; background: var(--surface);
  }
  .table-wrap thead th:first-child { background-image:var(--table-head-grad);background-attachment:fixed; }
}

/* ===== 全站 reduced-motion（登录页已有独立规则，不重复）===== */
@media (prefers-reduced-motion: reduce) {
  body:not(:has(.login-page)) *, body:not(:has(.login-page)) *::before, body:not(:has(.login-page)) *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
}

/* ===== 主页 KPI 四卡：统一用当前主题主色，避免多色混杂 ===== */
/* 顶部色带、数字、必拿/力争圆点全部跟随主题色，切换风格自动生效 */
#teamKpi .kpi{position:relative;overflow:hidden;border:1px solid var(--card-border);background:var(--surface)}
#teamKpi .kpi::before{content:"";position:absolute;left:0;top:0;right:0;height:4px;background:var(--accent)}
#teamKpi .kpi-value,
#teamKpi .amt-col-value.must,
#teamKpi .amt-col-value.try{
  background:none;-webkit-background-clip:border-box;background-clip:border-box;
  -webkit-text-fill-color:var(--accent);color:var(--accent)
}
#teamKpi .amt-dot.must,
#teamKpi .amt-dot.try{background:var(--accent)}
#teamKpi .kpi-value{font-size:30px;font-weight:700}

/* 状态 tab：选中实色填充 + 白字 */
.otab.active{background:var(--accent-grad);color: var(--on-color);border-color: var(--accent-edge)}
.otab-won.active{background:var(--shine);color: var(--on-color);border-color:var(--shine)}
.otab-dead.active{background:var(--danger);color: var(--on-color);border-color:var(--danger)}

/* 销售列表选中项：粗蓝条 + 蓝底 */
.seller-item.active{background:var(--accent-soft);border-left:5px solid var(--accent)}
.seller-item.active .seller-name{color:var(--accent)}

/* 表头浅蓝底 + 加深字 */
.all-table thead th,.cust-table thead th,.ito-table thead th{background-image:var(--table-head-grad);background-attachment:fixed;color:#FFFFFF;font-weight:700;border-bottom:1px solid rgba(255,255,255,.35)}

/* ===== 回收站综合美化（警示横幅 + 卡片分区 + 操作强化）===== */
#viewTrash{padding-top:4px;position:relative}
#viewTrash::before{
  content:"回收站 · 删除内容暂存区：这里的商机与客户已不在正常列表，请尽快找回或彻底删除";
  display:block;margin-bottom:16px;padding:14px 18px 14px 46px;position:relative;
  background:linear-gradient(90deg,var(--purple-soft),var(--surface-hover));border: 1px solid var(--card-border);border-left: 4px solid var(--warn);
  border-radius:var(--radius-lg);color: var(--purple-deep);font-size:13px;font-weight:600;line-height:1.5;
  box-shadow:0 2px 10px rgba(124,58,237,.08);
}
#viewTrash::after{
  content:"!";position:absolute;top:14px;left:16px;width:24px;height:24px;border-radius:50%;
  background: var(--warn);color: var(--on-color);font-size:15px;font-weight:700;text-align:center;line-height:24px;
}
#viewTrash > .panel{border:1px solid var(--line);border-radius:var(--radius-lg);box-shadow:var(--shadow);margin-bottom:18px;overflow:hidden}
#viewTrash > .panel .panel-head{background:linear-gradient(90deg,var(--purple-soft-2),var(--surface));border-bottom: 1px solid var(--warn-line);padding:14px 18px}
#viewTrash > .panel .panel-head h2{font-size:15px;color: var(--purple-ink);display:flex;align-items:center;gap:9px}
#viewTrash > .panel .panel-head h2::before{content:"";width:16px;height:16px;border-radius:4px;background: var(--warn);opacity:.85;box-shadow:inset 0 0 0 3px #DDD0FB}
#viewTrash > .panel .panel-head .hint{color: var(--purple-faint)}
#viewTrash .trash-table thead th{background: var(--purple-soft);color: var(--purple-deep)}
#viewTrash .trash-table tbody tr{background: var(--purple-row)}
#viewTrash .trash-table tbody tr:hover{background: var(--purple-soft-2)}
#viewTrash .trash-table .month-pill{background: var(--risk-amber-bg);color:var(--risk-amber)}
#viewTrash .btn.tiny.primary{background:var(--accent-grad);border-color: var(--accent-edge);color: var(--on-color);font-weight:600;box-shadow:0 1px 3px rgba(79,70,229,.28)}
#viewTrash .btn.tiny.danger{background: var(--risk-red-bg);color:var(--danger);border:1px solid var(--danger-line);font-weight:600}
#viewTrash .trash-table td:last-child{background: var(--purple-row-alt)}

/* ===== 用户菜单：只显示用户名，不显示角色副标题（超级管理员/普通用户等），也不显示头像圆圈（避免挤压换行）===== */
#userRole{display:none!important}
.user-avatar{display:none!important}
.user-chip{gap:7px;padding:0 12px}
/* 用户名任何屏宽都显示：窄屏不得把 .user-meta 一起隐藏，否则账号按钮变空胶囊 */
.user-meta{display:flex!important}
.user-meta b{font-size:12.5px;white-space:nowrap}

/* ===== 重置密码成功：新密码展示框（页面内弹窗，可一键复制）===== */
.reset-pwd-box{display:flex;flex-direction:column;gap:8px;background: var(--surface-2);border:1px solid var(--accent-soft);border-radius:10px;padding:16px 18px}
.reset-pwd-label{font-size:12px;color:var(--text-2)}
.reset-pwd-val{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:22px;font-weight:700;letter-spacing:2px;color:var(--accent);user-select:all;word-break:break-all}

/* ===== 编辑销售资料：职级缩短 + 微信ID + 专属二维码 ===== */
#smEdit .wx-row{display:flex;gap:10px;flex-wrap:wrap;margin-top:12px}
#smEdit .wx-row label{flex:1;min-width:0}
#smEdit .wx-row label input,#smEdit .wx-row label select{width:100%;min-width:0}
#smEdit .wx-qr-sec{margin-top:14px;padding:14px 16px;background: var(--surface-2);border: 1px dashed var(--accent-line);border-radius:10px}
#smEdit .wx-qr-head{font-size:13px;font-weight:600;color:var(--text);display:flex;align-items:center;gap:8px}
#smEdit .wx-qr-head .hint{font-weight:400}
#smEdit .wx-qr-body{display:flex;gap:16px;align-items:flex-start;margin-top:12px;flex-wrap:wrap}
#smEdit .wx-qr-img{width:132px;height:132px;flex:none;background: var(--surface);border:1px solid var(--line);border-radius:8px;display:flex;align-items:center;justify-content:center;overflow:hidden}
#smEdit .wx-qr-img svg{width:100%;height:100%}
#smEdit .wx-qr-info{flex:1;min-width:180px;font-size:12px;color:var(--text-2);line-height:1.8}
#smEdit .wx-qr-info b{color:var(--text);font-family:ui-monospace,Menlo,Consolas,monospace}
#smEdit .wx-qr-info .bind-url{display:block;word-break:break-all;background: var(--surface);border:1px solid var(--line);border-radius:6px;padding:6px 8px;margin:6px 0;color:var(--accent);font-size:11px}
#smEdit .wx-qr-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}

/* ===== 客户360画像：独立全页视图 ===== */
#viewCust360 { padding-bottom: 40px; }
#viewCust360 > .btn.back { margin-bottom: 14px; }
#cust360Pane { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px 24px; }

/* My·商机 合并列：商机名在上可点，客户公司名在下小字（销售页与团队页共用 oppCells） */
.cust-stack{display:block}
.cust-stack .opp-name-link{
  display:block;padding:0;border:none;background:transparent;font-family:inherit;
  font-size:13px;font-weight:600;color:var(--text);line-height:1.45;text-align:left;
  overflow-wrap:anywhere;word-break:break-word;cursor:pointer;
}
.cust-stack .opp-name-link:hover{color:var(--accent);text-decoration:underline}
.cust-stack .cust-sub{display:block;font-size:11px;font-weight:400;color:var(--text-3);margin-top:1px}
.cust-stack .cust-sub:hover{color:var(--accent);text-decoration:underline}

/* 日程卡片头部：整周日期范围 */
.tsched-range{font-size:12px;font-weight:600;color:var(--accent,#4F46E5);background:var(--accent-soft-2,#EEF2FF);border:1px solid var(--card-border,#D8C7FB);border-radius:6px;padding:3px 9px;letter-spacing:.2px}
/* 过去 3 周日程回顾：与主表同款网格，三列并排，时间已过只读不可编辑 */
.ts-past{margin-top:2px;padding:12px 16px 16px;border-top:1px solid var(--card-border,#D8C7FB);background:var(--bg,#fff)}
.ts-past-title{font-size:12.5px;font-weight:700;color:var(--text-2,#475569);margin-bottom:10px;display:flex;align-items:center;gap:7px}
.ts-past-title::before{content:"";width:3px;height:13px;border-radius:2px;background:var(--accent-grad,linear-gradient(135deg,#0B63F6,#4F46E5,#7C3AED))}
/* 默认折叠：历史 3 周收起，只留一行可点标题；展开后恢复纵向 3 张网格 */
.ts-past-toggle{cursor:pointer;user-select:none;margin-bottom:0;padding:2px 0}
.ts-past-toggle:hover{color:var(--accent,#4F46E5)}
.ts-past-caret{display:inline-block;font-size:10px;color:var(--accent,#4F46E5);transition:transform .18s;transform:rotate(0deg)}
.ts-past.is-open .ts-past-caret{transform:rotate(90deg)}
.ts-past-toggle-hint{margin-left:auto;font-size:11px;font-weight:400;color:var(--text-3,#94A3B8)}
.ts-past-weeks{display:none;grid-template-columns:minmax(0,1fr);gap:14px;margin-top:10px}
.ts-past.is-open .ts-past-weeks{display:grid}
.ts-past-week{border:1px solid var(--card-border,#D8C7FB);border-radius:9px;overflow:hidden;background:var(--surface,#fff)}
.ts-past-head{display:flex;align-items:center;justify-content:space-between;gap:6px;padding:8px 10px;background:var(--accent-soft-2,#EEF2FF);border-bottom:1px solid var(--card-border,#D8C7FB)}
.ts-past-head b{font-size:11.5px;color:var(--accent,#4F46E5);font-weight:700;white-space:nowrap}
.ts-past-head span{font-size:10.5px;color:var(--text-3,#94A3B8);white-space:nowrap}
/* 历史网格：与主表同款全宽同尺寸，纵向按时间排 3 张；只读格去掉指针反馈（内容多时也能完整展示） */
.past-grid .sched-cell{cursor:default}
.past-grid .sched-cell:hover{background:var(--surface)}
@media (max-width:720px){.tsched-range{font-size:11px}}

/* ---------- 今日工作安排（团队晨会/周会页置顶） ---------- */
.tw-section{border-color:var(--card-border);box-shadow:var(--shadow-hover)}
.tw-section .ws-title{background:var(--accent-grad);color:var(--on-accent,#fff)}
.tw-section .ws-title .ws-count,.tw-section .ws-title .hint{color:rgba(255,255,255,.85)}
.tw-no{background:rgba(255,255,255,.22)!important;color:#fff!important}
.tw-list{display:flex;flex-direction:column}
.tw-row{
  display:grid;grid-template-columns:34px 34px 62px 118px 1fr auto;
  gap:10px;align-items:center;padding:9px 13px;border-bottom:1px solid var(--line);
  font-size:12.5px;line-height:1.45;background:var(--surface)
}
.tw-row:last-child{border-bottom:0}
.tw-row:hover{background:var(--accent-soft-2,var(--surface-2))}
.tw-editable{cursor:pointer}
.tw-idx{font-size:11px;color:var(--text-3);font-variant-numeric:tabular-nums;text-align:center}
.tw-pri{
  min-width:26px;height:22px;display:inline-flex;align-items:center;justify-content:center;
  border-radius:6px;font-size:11px;font-weight:700;padding:0 5px;text-align:center
}
.tw-pri.p-high{background:var(--danger-soft,#FEE2E2);color:var(--danger,#DC2626)}
.tw-pri.p-mid{background:var(--accent-soft,#E5EEFF);color:var(--accent,#0B63F6)}
.tw-pri.p-low{background:var(--surface-2,#F1F5F9);color:var(--text-2,#64748B)}
.tw-pri.p-none{background:transparent;color:var(--text-3)}
.tw-time{color:var(--text-2);font-variant-numeric:tabular-nums}
.tw-who{font-weight:600;color:var(--text)}
.tw-who .region-tag{margin-left:4px}
.tw-what{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 8px;min-width:0}
.tw-cust{color:var(--text);font-weight:600}
.tw-cust-empty{color:var(--text-3);font-style:italic}
.tw-topic{color:var(--text-2)}
.tw-edit{font-size:11px;color:var(--accent);opacity:0;transition:opacity .12s}
.tw-row:hover .tw-edit{opacity:1}
.tw-empty{padding:16px 13px;color:var(--text-3);font-size:12.5px}
.tw-focus{padding:11px 13px;background:var(--surface-2);border-top:1px solid var(--line)}
.tw-focus-label{font-size:12.5px;font-weight:650;color:var(--text);margin-bottom:7px}
.tw-focus-label .hint{font-weight:400;margin-left:6px}
.tw-focus-body{display:flex;gap:9px;align-items:flex-start}
.tw-focus-input{
  flex:1;min-width:0;resize:vertical;padding:8px 10px;border:1px solid var(--line);
  border-radius:6px;font:inherit;font-size:12.5px;background:var(--surface);color:var(--text)
}
.tw-focus-input:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 2px var(--accent-soft)}
.tw-focus-input[readonly]{background:var(--bg-soft,#f5f7fa);color:var(--text-2);cursor:default;border-style:dashed}
.tw-focus-input[readonly]:focus{box-shadow:none;border-color:var(--line)}
.tw-focus-readonly{font-size:12.5px;color:var(--text-2);white-space:pre-wrap;line-height:1.5}
.tw-confirm-state{font-weight:400;font-size:11.5px;margin-left:8px;padding:1px 7px;border-radius:9px;background:var(--surface);border:1px solid var(--line);color:var(--text-2)}
.tw-confirm-state.is-ok{background:#e7f7ee;border-color:#a8dcbf;color:#16803c}
.tw-focus-hint{font-size:11.5px;color:var(--text-2);margin-top:7px;line-height:1.5}
/* 集中文本块 + 一键复制（所有人汇总，一条一段文本） */
.tw-update{font-size:11.5px;font-weight:400;color:rgba(255,255,255,.92);background:rgba(255,255,255,.18);border:1px solid rgba(255,255,255,.42);border-radius:10px;padding:2px 9px;white-space:nowrap;margin-left:4px}
.tw-copy{margin-left:auto;background:rgba(255,255,255,.18);border:1px solid rgba(255,255,255,.55);color:#fff}
.tw-copy:hover{background:rgba(255,255,255,.32);color:#fff}
.tw-text{
  white-space:pre-wrap;word-break:break-word;font-size:14px;line-height:1.9;
  padding:20px 24px;background:var(--surface);color:var(--text);
  font-variant-numeric:tabular-nums
}
.tp-preview{margin-bottom:14px}
@media (max-width:720px){
  .tw-row{grid-template-columns:24px 30px 54px 1fr;gap:6px;padding:8px 10px}
  .tw-who,.tw-edit{display:none}
  .tw-what{grid-column:2 / -1}
  .tw-text{font-size:13px;padding:14px 16px;line-height:1.8}
}

/* ============ 企业微信打通设置面板 ============ */
.wecom-dialog{max-width:920px}
.wecom-badge{display:inline-block;font-size:11.5px;font-weight:600;padding:2px 10px;border-radius:10px;margin-left:8px;vertical-align:middle;background:var(--surface);border:1px solid var(--line);color:var(--text-2)}
.wecom-badge.is-on{background:#e7f7ee;border-color:#a8dcbf;color:#16803c}
.wecom-body{display:flex;flex-direction:column;gap:20px}
.wecom-sec{border:1px solid var(--line);border-radius:12px;padding:16px 18px;background:var(--surface)}
.wecom-sec-title{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;font-size:14px;font-weight:700;color:var(--text);margin-bottom:12px}
.wecom-sec-title .hint{font-size:11.5px;font-weight:400}
.wecom-tip{font-size:12px;line-height:1.6;color:var(--text-2);margin-bottom:12px;background:var(--bg);border-radius:8px;padding:8px 11px}
.wecom-caps{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.wecom-cap{border:1px solid var(--line);border-radius:10px;padding:11px 13px;background:var(--bg)}
.wecom-cap-head{display:flex;align-items:center;gap:8px;margin-bottom:5px}
.wecom-cap-name{font-size:13.5px;font-weight:700;color:var(--text)}
.wecom-cap-status{font-size:11px;font-weight:600;padding:1px 8px;border-radius:9px;white-space:nowrap}
.wecom-cap-status.ready{background:#e7f7ee;border-color:#a8dcbf;color:#16803c}
.wecom-cap-status.auth{background:#fff4e0;border-color:#f3d39a;color:#986518}
.wecom-cap-status.plan{background:var(--surface-2,#eef0f4);border-color:var(--line);color:var(--text-2)}
.wecom-cap-desc{font-size:12px;line-height:1.5;color:var(--text-2)}
.wecom-cap-need{font-size:11.5px;color:var(--accent);margin-top:5px}
.wecom-hook-row{display:flex;align-items:center;gap:10px;margin-bottom:10px}
.wecom-hook-team{font-size:13px;font-weight:600;min-width:66px;color:var(--text)}
.wecom-hook-row input{flex:1;font:12.5px inherit;font-size:12.5px;padding:7px 10px;border:1px solid var(--line);border-radius:8px;background:var(--bg);color:var(--text);min-width:0}
.wecom-hook-row input:focus{outline:none;border-color:var(--accent)}
.wecom-hook-set{font-size:11.5px;color:#16803c;white-space:nowrap}
.wecom-switch-row{display:flex;align-items:center;gap:9px;font-size:13px;font-weight:600;color:var(--text);margin-top:6px;cursor:pointer}
.wecom-switch-row input{width:16px;height:16px;accent-color:var(--accent)}
.wecom-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.wecom-form-grid label{display:flex;flex-direction:column;gap:5px;font-size:12.5px;font-weight:600;color:var(--text)}
.wecom-form-grid label.wecom-full{grid-column:1 / -1}
.wecom-form-grid input{font:12.5px inherit;font-size:12.5px;padding:8px 10px;border:1px solid var(--line);border-radius:8px;background:var(--bg);color:var(--text)}
.wecom-form-grid input:focus{outline:none;border-color:var(--accent)}
.wecom-foot .hint{font-size:12px;color:var(--text-2)}
.wecom-foot .hint.bad{color:#c0392b}
.wecom-foot .hint.good{color:#16803c}
@media (max-width:720px){.wecom-caps,.wecom-form-grid{grid-template-columns:1fr}.wecom-hook-row{flex-wrap:wrap}.wecom-hook-row input{min-width:100%}}
.wecom-clear-secret{font-size:11.5px;font-weight:400;color:var(--text-2);margin-top:2px;display:flex;align-items:center;gap:5px;cursor:pointer}
.wecom-clear-secret input{width:14px;height:14px;accent-color:var(--accent)}
.wecom-hook-row .btn.tiny{font-size:11.5px;padding:3px 9px}

/* ---------- 知识库（解决方案库 + 知识文件） ---------- */
.knowledge-view{padding:18px 22px 40px}
.kv-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:16px}
.kv-head h2{font-size:20px;font-weight:700;margin:0 0 6px;color:var(--text)}
.kv-head h2 .hint{font-weight:400;font-size:12px;margin-left:8px}
.kv-actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.kb-module-bar{display:flex;gap:7px;padding:5px;background:var(--surface-2);border:1px solid var(--line);border-radius:var(--radius);margin-bottom:13px;width:max-content;max-width:100%}
.kb-module{border:0;background:transparent;color:var(--text-2);font-size:13px;font-weight:600;padding:7px 16px;border-radius:7px;cursor:pointer;white-space:nowrap}
.kb-module.active{background:var(--surface);color:var(--accent);box-shadow:0 1px 5px rgba(27,42,56,.09)}
.kb-filters{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:14px}
.kb-filters input[type=search],
.kb-filters select{height:34px;padding:0 12px;border:1px solid var(--line-strong);border-radius:8px;background:var(--surface);color:var(--text);font-family:inherit;font-size:13px;outline:none;transition:border-color .15s,box-shadow .15s}
.kb-filters input[type=search]{flex:1 1 260px;min-width:220px}
.kb-filters input[type=search]::placeholder{color:var(--text-3)}
.kb-filters select{min-width:140px;cursor:pointer}
.kb-filters input[type=search]:focus,.kb-filters select:focus{border-color:var(--accent);box-shadow:var(--focus-ring)}
.kb-count{font-size:12px;color:var(--text-2);white-space:nowrap;margin-left:auto}
.kb-filters #btnKbUpload{flex:0 0 auto;white-space:nowrap}
.kb-solution-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:13px}
.kb-card{position:relative;display:flex;flex-direction:column;gap:9px;padding:15px 14px;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:0 2px 10px rgba(27,42,56,.04);min-height:160px}
.kb-card:hover{border-color:var(--accent-line);box-shadow:0 5px 16px rgba(27,42,56,.08)}
.kb-card-top{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.kb-card-title{font-size:15px;font-weight:700;line-height:1.4;color:var(--text);word-break:break-word}
.kb-tag{display:inline-flex;align-items:center;white-space:nowrap;font-size:11px;font-weight:600;padding:3px 8px;border-radius:999px;background:var(--accent-soft);color:var(--accent);border:1px solid var(--accent-line)}
.kb-tag.gray{background:var(--surface-3);color:var(--text-2);border-color:var(--line)}
.kb-tag.mini{font-size:10.5px;padding:2px 7px}
.kb-tag.tone-insure{color:#1D4ED8;background:#EFF6FF;border-color:#BFDBFE}
.kb-tag.tone-xray{color:#7C3AED;background:#F5F3FF;border-color:#DDD6FE}
.kb-tag.tone-life{color:#0F766E;background:#F0FDFA;border-color:#99F6E4}
.kb-tag.tone-pnc{color:#C2410C;background:#FFF7ED;border-color:#FED7AA}
.kb-tag.tone-group{color:#4338CA;background:#EEF2FF;border-color:#C7D2FE}
.kb-tag.tone-ito{color:#0E7490;background:#ECFEFF;border-color:#A5F3FC}
.kb-tag.tone-renew{color:#15803D;background:#F0FDF4;border-color:#BBF7D0}
.kb-tag.tone-voice{color:#BE185D;background:#FDF2F8;border-color:#FBCFE8}
.kb-tag.tone-xline{color:#B91C1C;background:#FEF2F2;border-color:#FECACA}
.kb-tag.tone-other{color:#64748B;background:#F1F5F9;border-color:#CBD5E1}
.kb-card-summary{font-size:12.5px;line-height:1.55;color:var(--text-2);flex:1}
.kb-card-highlights{font-size:11.5px;line-height:1.5;color:var(--text-3);max-height:48px;overflow:hidden;white-space:pre-line}
.kb-card-field{display:flex;gap:8px;font-size:12px;line-height:1.55;color:var(--text-2)}
.kb-field-label{flex:0 0 auto;color:var(--text-3);font-weight:600}
.kb-field-text{flex:1;min-width:0;white-space:pre-line;word-break:break-word}
.kb-file-chip{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;padding:10px 12px;border-radius:12px;background:transparent;border:1px solid var(--line);box-shadow:none}
.kb-file-chip-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}
.kb-file-chip-name{display:block;color:var(--text);font-size:13px;font-weight:600;line-height:1.35;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.kb-file-chip-size{display:block;color:var(--text-3);font-size:11.5px;line-height:1.2}
.kb-file-chip-preview{flex:0 0 auto;border:1px solid var(--accent-line);background:var(--accent-soft);color:var(--accent);font-size:11.5px;font-weight:600;padding:4px 10px;border-radius:7px;cursor:pointer}
.kb-file-chip-preview:hover{filter:brightness(.96)}
.kb-card-file .kb-file-chip{margin-bottom:2px}
.kb-file-chip-ico{position:relative;width:46px;height:52px;flex:0 0 auto;display:grid;place-items:center;overflow:hidden;border-radius:8px;color:#fff;font-size:11px;font-weight:800;letter-spacing:.4px;background:#64748B;box-shadow:0 2px 6px rgba(0,0,0,.18)}
.kb-file-chip-ico::after{content:"";position:absolute;top:0;right:0;border-width:0 14px 14px 0;border-style:solid;border-color:transparent rgba(255,255,255,.92) transparent transparent}
.kb-file-chip.tone-pdf .kb-file-chip-ico{background:#E5484D}
.kb-file-chip.tone-doc .kb-file-chip-ico{background:#2563EB}
.kb-file-chip.tone-xls .kb-file-chip-ico{background:#12805C}
.kb-file-chip.tone-ppt .kb-file-chip-ico{background:#D97706}
.kb-file-chip.tone-txt .kb-file-chip-ico{background:#475569}
.kb-file-chip.tone-img .kb-file-chip-ico{background:#7C3AED}
.kb-card-foot{display:flex;flex-direction:column;align-items:stretch;gap:9px;font-size:11.5px;color:var(--text-3);border-top:1px solid var(--line);padding-top:10px;margin-top:auto}
.kb-card-ops{display:flex;gap:5px;opacity:.95;flex-wrap:wrap;justify-content:flex-end}
.kb-card-ops .btn{padding:4px 8px;font-size:11.5px;min-width:52px;text-align:center}
.kb-card-ops .btn.kb-convert{color:var(--accent);border-color:var(--accent-line);background:var(--accent-soft)}
.kb-file-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:13px}
.kb-file-row{display:flex;align-items:center;gap:12px;padding:12px 14px;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius)}
.kb-file-ico{width:36px;height:36px;flex:0 0 auto;display:grid;place-items:center;border-radius:9px;background:var(--accent-soft);color:var(--accent);font-size:12px;font-weight:700}
.kb-file-main{flex:1;min-width:0}
.kb-file-name{font-size:13.5px;font-weight:600;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.kb-file-meta{font-size:11.5px;color:var(--text-3);margin-top:3px}
.kb-empty{padding:50px 20px;text-align:center;color:var(--text-3);font-size:13px;background:var(--surface);border:1px dashed var(--line-strong);border-radius:var(--radius)}
.kb-form{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.kb-form label{display:flex;flex-direction:column;gap:5px;font-size:12.5px;font-weight:600;color:var(--text)}
.kb-form label.wide{grid-column:1 / -1}
.kb-form input,.kb-form select,.kb-form textarea{font:12.5px inherit;font-size:12.5px;padding:8px 10px;border:1px solid var(--line);border-radius:8px;background:var(--bg);color:var(--text);resize:vertical}
.kb-form input:focus,.kb-form select:focus,.kb-form textarea:focus{outline:none;border-color:var(--accent);box-shadow:var(--focus-ring)}
.kb-preview-dialog{max-width:900px}
.kb-preview-body{min-height:320px;background:var(--surface-2)}
.kb-preview-body iframe,.kb-preview-body img{display:block;width:100%;min-height:420px;border:0;border-radius:8px;background:#fff}
.kb-preview-body pre{margin:0;padding:16px;white-space:pre-wrap;word-break:break-word;font:12.5px/1.6 ui-monospace,SFMono-Regular,Menlo,monospace;color:var(--text)}
.kb-preview-note{padding:60px 20px;text-align:center;color:var(--text-2);font-size:13px;line-height:1.7}

/* PDF.js 在线预览：工具栏 + 逐页 canvas */
.pdf-viewer{display:flex;flex-direction:column;align-items:center;gap:10px;padding:12px 0 18px}
.pdf-toolbar{display:flex;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap;position:sticky;top:0;z-index:2;background:var(--surface-2);padding:6px 10px;border-radius:8px;color:var(--text-2);font-size:12.5px}
.pdf-toolbar button{border:1px solid var(--line);background:var(--surface);color:var(--text);border-radius:6px;padding:4px 12px;cursor:pointer;font-size:12.5px}
.pdf-toolbar button:hover:not(:disabled){border-color:var(--accent);color:var(--accent)}
.pdf-toolbar button:disabled{opacity:.4;cursor:not-allowed}
.pdf-pages{display:flex;flex-direction:column;align-items:center;gap:14px;width:100%}
.pdf-page{background:#fff;border-radius:6px;box-shadow:0 2px 12px rgba(0,0,0,.12);max-width:100%}
.pdf-page canvas{display:block;max-width:100%;height:auto}
.pdf-loading{padding:50px 20px;text-align:center;color:var(--text-2);font-size:13px}
.pdf-error{padding:40px 20px;text-align:center;color:var(--danger,var(--text-2));font-size:13px;line-height:1.8}

/* PDF 下载进度条 */
.pdf-progress-label{display:flex;align-items:center;justify-content:center;gap:10px;font-size:13px;color:var(--text-2);margin-bottom:12px}
.pdf-progress-label b{font-size:18px;font-weight:700;color:var(--accent);min-width:48px;text-align:right;font-variant-numeric:tabular-nums}
.pdf-progress-track{width:min(360px,80%);height:8px;margin:0 auto;border-radius:99px;background:var(--line);overflow:hidden}
.pdf-progress-bar{height:100%;border-radius:99px;background:linear-gradient(90deg,var(--accent),var(--accent-2,var(--accent)));transition:width .18s ease}

/* 预览弹窗铺满整个页面（仅知识库预览，不影响其他弹窗） */
#kbPreviewMask{padding:0;background:var(--bg)}
#kbPreviewMask .dialog.kb-preview-dialog{max-width:none;max-height:none;width:100vw;height:100vh;border:0;border-radius:0;box-shadow:none;animation:none}
#kbPreviewMask .dialog-head{flex:0 0 auto}
#kbPreviewMask .kb-preview-body{flex:1 1 auto;min-height:0;padding:10px 18px}
#kbPreviewMask .dialog-foot{flex:0 0 auto;border-radius:0}
#kbPreviewMask .pdf-page canvas{max-width:none}
@media (max-width:640px){#kbPreviewMask .kb-preview-body{padding:8px 10px}}


@media(max-width:760px){
  .knowledge-view{padding:14px 12px 30px}
  .kv-actions{width:100%}
  .kb-filters input[type=search]{flex-basis:100%}
  .kb-form{grid-template-columns:1fr}
  .kb-file-row{flex-wrap:wrap}
  .kb-card-ops{opacity:1}
}
