/* 厂办通 CRM — 界面样式 */
:root{
  --brown:#8b6a55; --brown-dark:#755641; --brown-soft:#f3e9df;
  --bg:#faf7f2; --card:#ffffff; --line:#ebe5dd; --line-2:#f1ede7;
  --text:#2f2e2c; --sub:#6f6b66; --muted:#9b968f;
  --blue:#1f5fe6; --blue-soft:#eaf1ff; --blue-bar:#9abdf5;
  --green:#0e9f6e; --green-soft:#e6f7ef;
  --orange:#d97706; --orange-soft:#fff4e3;
  --red:#dc2626; --red-soft:#feecec;
  --radius:10px; --shadow:0 1px 3px rgba(60,45,30,.07), 0 6px 16px rgba(60,45,30,.04);
}
*{box-sizing:border-box}
html,body{margin:0;padding:0;height:100%}
body{font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",Arial,sans-serif;
  font-size:15px;color:var(--text);background:var(--bg);-webkit-font-smoothing:antialiased}
button,input,select,textarea{font-family:inherit;font-size:inherit;color:inherit}
button{cursor:pointer;border:0;background:none}
.hidden{display:none !important}
a{color:var(--blue);text-decoration:none}

/* ---------------- 登录页（与主界面同风格） ---------------- */
.login-view{min-height:100vh;display:flex;align-items:center;justify-content:center;
  background:var(--bg);padding:32px}
.login-card{width:min(430px,96vw);background:var(--card);border:1px solid var(--line);
  border-radius:var(--radius);box-shadow:var(--shadow);overflow:hidden}
.login-brandbar{background:var(--brown);color:#fff;display:flex;align-items:center;gap:12px;padding:18px 26px}
.login-logo{width:42px;height:42px;border-radius:10px;background:rgba(255,255,255,.18);
  display:flex;align-items:center;justify-content:center;font-size:22px;font-weight:700;flex:0 0 auto}
.login-brandbar-text b{display:block;font-size:18px;line-height:1.3}
.login-brandbar-text small{display:block;font-size:13px;color:#f0e5dc;margin-top:3px}
.login-form{padding:30px 30px 26px;display:flex;flex-direction:column}
.login-form h2{font-size:23px;margin:0 0 8px;font-weight:600}
.auth-sub{color:var(--muted);margin:0 0 26px;font-size:14.5px}
.auth-switch{display:flex;background:var(--brown-soft);border-radius:9px;padding:4px;margin-bottom:26px}
.auth-switch button{flex:1;padding:9px 0;border-radius:7px;color:var(--sub);font-size:14.5px;font-weight:600}
.auth-switch button.active{background:#fff;color:var(--brown-dark);box-shadow:0 1px 4px rgba(60,45,30,.12)}
.field-label{display:block;font-size:14px;font-weight:600;margin:0 0 8px;color:#3b3a38}
.input{width:100%;height:42px;border:1px solid #e2e6ee;border-radius:8px;padding:0 13px;outline:none;
  background:#fff;margin-bottom:18px;transition:border-color .15s,box-shadow .15s}
.input:focus{border-color:#5b83f0;box-shadow:0 0 0 3px rgba(60,100,235,.1)}
.input::placeholder{color:#b6bbc5}
textarea.input{height:auto;min-height:92px;padding:11px 13px;resize:vertical;line-height:1.6}
.follow-tpls{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px;align-items:center}
.follow-tpls .tpl-label{font-size:12.5px;color:var(--muted);margin-right:2px}
.tpl-chip{border:1px solid var(--line);background:var(--bg);color:var(--sub);border-radius:14px;
  padding:4px 11px;font-size:12.5px;transition:.15s}
.tpl-chip:hover{background:var(--brown-soft);border-color:var(--brown);color:var(--brown-dark)}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;border-radius:7px;padding:8px 15px;
  font-size:14.5px;font-weight:500;white-space:nowrap;transition:.15s}
.btn-primary{background:var(--blue);color:#fff}
.btn-primary:hover{background:#164fc9}
.btn-brown{background:var(--brown);color:#fff}
.btn-brown:hover{background:var(--brown-dark)}
.btn-ghost{background:#fff;border:1px solid var(--line);color:var(--sub)}
.btn-ghost:hover{background:#faf7f3;border-color:#dcd3c8}
.btn-danger{background:var(--red-soft);color:var(--red)}
.btn-warning{background:var(--orange-soft);color:var(--orange)}
.btn-warning:hover{background:#ffe7c6}
.btn-sm{padding:5px 11px;font-size:13px}
.btn-block{width:100%;height:44px;font-size:15px;font-weight:600}
.auth-submit{margin-top:6px}
.auth-foot{text-align:center;color:#b3b6bd;font-size:13.5px;margin:20px 0 0}
.auth-hint{text-align:center;color:#9aa2b1;font-size:13.5px;margin:10px 0 0}

/* ---------------- 顶栏 ---------------- */
.topbar{height:52px;background:var(--brown);display:flex;align-items:center;gap:20px;padding:0 16px;color:#fff;
  box-shadow:0 1px 5px rgba(70,45,25,.15);position:sticky;top:0;z-index:30}
.brand-mini{display:flex;align-items:center;gap:8px;min-width:170px}
.brand-square{width:30px;height:30px;border-radius:7px;background:#f6ede3;color:var(--brown);
  display:flex;align-items:center;justify-content:center;font-weight:700;font-size:17px}
.brand-text{display:flex;flex-direction:column;line-height:1.25}
.brand-text b{font-size:14.5px;letter-spacing:.02em}
.brand-text small{font-size:11.5px;color:#e6d6c8}
.topnav{display:flex;gap:3px;align-items:center}
.topnav button{display:flex;align-items:center;gap:6px;padding:7px 13px;border-radius:7px;
  color:#f1e5da;font-size:14px;transition:.15s}
.topnav button:hover{background:rgba(255,255,255,.12)}
.topnav button.active{background:#fbf6f0;color:var(--brown-dark);font-weight:600}
.topnav svg{width:13px;height:13px;stroke:currentColor;fill:none;stroke-width:1.8}
.topbar-right{margin-left:auto;display:flex;align-items:center;gap:9px}
.db-badge{display:flex;align-items:center;gap:5px;background:#1c8f63;color:#fff;padding:4px 10px;
  border-radius:20px;font-size:12.5px;font-weight:500}
.db-badge i{width:6px;height:6px;border-radius:50%;background:#a7ffd8;display:block}
.top-btn{color:#f4e8dc;border:1px solid rgba(255,255,255,.32);border-radius:6px;padding:5px 10px;font-size:13.5px}
.top-btn:hover{background:rgba(255,255,255,.14)}
.top-user{font-size:13.5px;color:#f4e8dc;display:flex;align-items:center;gap:5px}

main{padding:10px 18px 40px;max-width:1800px;margin:0 auto}

/* ---------------- 通用卡片 / 控件 ---------------- */
.card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow)}
/* 全局隐藏页面标题/副标题，内容上移以显示更多 */
.page-head{display:none!important}
.pill{border-radius:20px;padding:5px 12px;font-size:13.5px;background:#f5f2ed;color:#6d675f;border:1px solid transparent}
.pill:hover{background:#eee8df}
.pill.active{background:var(--brown);color:#fff;font-weight:600}
.pill.soft{background:#f8f5f0;border-color:var(--line)}
.tag{display:inline-flex;align-items:center;padding:2px 8px;border-radius:5px;font-size:13px;font-weight:500;white-space:nowrap}
.tag-blue{background:var(--blue-soft);color:var(--blue)}
.tag-green{background:var(--green-soft);color:var(--green)}
.tag-orange{background:var(--orange-soft);color:var(--orange)}
.tag-gray{background:#f3f1ed;color:#8c867d}
.tag-red{background:var(--red-soft);color:var(--red)}
.wechat-cell{display:inline-flex;align-items:center;gap:6px}
.fav-btn{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;padding:0;border-radius:5px;color:#c9c2b6;background:transparent;transition:background .15s,color .15s}
.fav-btn svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.7}
.fav-btn:hover{background:#faf4e8;color:#e0a020}
.fav-btn.fav-on{color:#e8a317}
.fav-btn.fav-on svg{fill:#f5c451;stroke:#e8a317}
.link-btn{color:var(--blue);font-size:13.5px;padding:2px 4px;border-radius:4px}
.link-btn:hover{background:var(--blue-soft)}
.tel-btn{color:var(--blue);text-decoration:none;cursor:pointer;display:inline-block}
.tel-btn:hover{text-decoration:underline;background:none}
/* 选中号码恢复默认蓝色；号码后「法人」文字标签按实名变色，同行不换行 */
.main-phone-line{display:inline-flex;align-items:center;gap:5px;white-space:nowrap}
.legal-person-tag{display:inline-flex;align-items:center;padding:0 5px;border-radius:4px;
  font-size:11px;line-height:17px;font-weight:600;white-space:nowrap}
.legal-person-tag.tag-real{background:var(--green-soft);color:var(--green)}
.legal-person-tag.tag-unreal{background:#f3f1ed;color:#8c867d}
/* 法人姓名后的实名文字标签，与姓名同行 */
.name-anchor{display:inline-flex;align-items:center;gap:5px;flex-wrap:wrap}
.name-anchor .tag{font-size:11px;line-height:16px;padding:1px 5px}
.phone-cell{display:flex;flex-direction:column;gap:3px;align-items:flex-start}
.plat-phones{display:flex;flex-direction:column;align-items:flex-start;gap:3px}
.plat-phone{color:#C55C10;font-weight:400;font-size:13px;text-decoration:none;padding:1px 4px;
  background:none;border:none;border-radius:0;white-space:nowrap}
.plat-phone:hover{background:none;text-decoration:underline}
.unselected-phones{display:flex;flex-direction:column;align-items:flex-start;gap:3px}
.unselected-phone{color:#757171;font-weight:400;font-size:13px;text-decoration:none;padding:1px 4px;
  background:none;border:none;border-radius:0;white-space:nowrap}
.unselected-phone:hover{background:none;text-decoration:underline}
/* 电脑端号码不拨号，点击复制：显示手型光标 */
.num-static{cursor:pointer}
.num-static:hover{text-decoration:underline;background:none}
.import-section{margin-bottom:18px}
/* 跟进信息文本输入框 */
.followups-input{width:100%;box-sizing:border-box;resize:vertical;line-height:1.7;font-size:13.5px;
  font-family:inherit;padding:10px 12px}
.followups-hint{font-size:12px;color:var(--muted);margin-top:6px;line-height:1.5}
.import-section-title{font-size:16px;font-weight:700;color:var(--brown);margin:0 0 12px}
.import-divider{height:1px;background:var(--line);margin:22px 0}
.import-submit{margin-top:14px;width:100%}
.mini-btn{width:26px;height:26px;border-radius:5px;display:inline-flex;align-items:center;justify-content:center;
  color:#8d857b;border:1px solid transparent}
.mini-btn:hover{background:#f3efe9;color:var(--brown)}
.mini-btn svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:1.8}
.mini-btn.danger:hover{background:var(--red-soft);color:var(--red)}
.search-box{display:flex;align-items:center;gap:7px;border:1px solid var(--line);border-radius:7px;
  background:#fff;padding:0 10px;height:32px;min-width:250px}
.search-box svg{width:14px;height:14px;stroke:#aaa49b;fill:none;stroke-width:1.9}
.search-box input{border:0;outline:0;width:100%;background:transparent;font-size:14px}
.search-clear{border:0;background:#e9e4da;color:#7a7368;width:18px;height:18px;line-height:16px;
  border-radius:50%;cursor:pointer;font-size:14px;flex:0 0 18px;padding:0;text-align:center}
.search-clear:hover{background:#d8cfc0;color:#4a443c}
.count-hint{font-size:13.5px;color:var(--muted);white-space:nowrap}
.empty{text-align:center;padding:52px 20px;color:var(--muted)}
.empty .big{font-size:32px;margin-bottom:10px;opacity:.4}
.empty p{margin:4px 0;font-size:14.5px}

/* ---------------- 数据看板 ---------------- */
.stat-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:13px;margin-bottom:14px}
.stat-card{padding:14px 16px;display:flex;align-items:center;justify-content:space-between;cursor:pointer;transition:.15s}
.stat-card:hover{transform:translateY(-2px);box-shadow:0 6px 18px rgba(60,45,30,.1)}
.stat-card .label{font-size:13.5px;color:var(--sub)}
.stat-card .num{font-size:25px;font-weight:700;margin-top:5px;letter-spacing:.02em}
.stat-icon{width:38px;height:38px;border-radius:9px;display:flex;align-items:center;justify-content:center}
.stat-icon svg{width:18px;height:18px;stroke:currentColor;stroke-width:1.9;fill:none}
.dist-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:13px}
.dist-card{padding:15px 17px;min-height:132px}
.dist-card h3{font-size:14.5px;margin:0 0 14px;font-weight:600}
.dist-row{display:flex;align-items:center;gap:9px;margin-bottom:9px;font-size:13.5px}
.dist-row .name{width:92px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--sub)}
.dist-bar{height:7px;border-radius:5px;background:var(--blue-bar);min-width:6px;transition:width .4s}
.dist-row .val{font-weight:600;color:#4d4944;min-width:16px;text-align:right}
.dist-row.clickable{cursor:pointer;border-radius:5px}
.dist-row.clickable:hover{background:#faf7f2}
.no-data{text-align:right;color:#b5afa7;font-size:13.5px;padding-top:12px}

/* ---------------- 客户管理 ---------------- */
.work-card{overflow:hidden}
.work-toolbar{display:flex;align-items:center;gap:9px;padding:10px 13px;flex-wrap:wrap;border-bottom:1px solid var(--line-2)}
.work-tabs{display:flex;gap:2px;margin-right:6px}
.work-tabs button{padding:7px 12px;font-size:14px;color:var(--sub);border-radius:7px;white-space:nowrap}
.work-tabs button.active{background:var(--brown-soft);color:var(--brown-dark);font-weight:600}
/* 企查查线索页：线索池 / 工作台 Tab（位于原提示条位置） */
.lead-tabs{margin-right:14px;padding:3px;background:#f3efe9;border-radius:9px;gap:3px}
.lead-tabs button{padding:7px 17px;font-size:13.5px;border-radius:6px}
.lead-tabs button.active{background:#fff;color:var(--brown-dark);font-weight:600;box-shadow:0 1px 4px rgba(60,45,30,.12)}
.toolbar-spacer{flex:1}
.filter-row{display:flex;align-items:center;gap:6px;padding:9px 13px;flex-wrap:wrap;border-bottom:1px solid var(--line-2)}
.filter-row .flabel{font-size:13px;color:var(--muted);margin-right:2px}
.filter-row .pill{padding:4px 10px;font-size:13px}
.table-wrap{overflow-x:auto}
table{width:100%;border-collapse:collapse;white-space:nowrap}
thead th{text-align:left;font-size:13px;font-weight:500;color:#8f8a83;padding:9px 10px;
  background:#fdfbf8;border-bottom:1px solid var(--line-2)}
tbody td{padding:9px 10px;border-bottom:1px solid #f5f1eb;font-size:13.8px;vertical-align:middle}
tbody tr:hover{background:#fdfaf6}
tbody tr:last-child td{border-bottom:0}
.cell-strong{font-weight:600;color:#33302c}
.th-sort{padding:0;font-weight:600;color:inherit;display:inline-flex;align-items:center;gap:3px;white-space:nowrap}
.th-sort:hover,.th-sort.active{color:var(--brown-dark)}
.th-sort .sort-arrow{font-size:11px;color:var(--muted);font-weight:400}
.th-sort.active .sort-arrow{color:var(--brown)}
.name-with-ent{display:flex;flex-wrap:wrap;align-items:center;gap:5px}
/* 企业名容器 + 紧靠企业名（省略号）右上角的状态标签：文字截断后标签紧跟其后 */
.ent-head{display:flex;align-items:center;gap:4px;min-width:0;max-width:100%}
.ent-head>.clamp-1{flex:0 1 auto;min-width:0}
.ent-inline{flex:none;display:inline-flex;align-items:center;
  font-size:10.5px;line-height:16px;padding:0 5px;border-radius:4px;font-weight:600;white-space:nowrap;cursor:default}
@media (max-width:700px){.ent-inline{font-size:10px;line-height:15px;padding:0 4px}}
/* 注册资本小标签：灰色描边，跟在企业状态标签后 */
.capital-inline{flex:none;display:inline-flex;align-items:center;
  font-size:10.5px;line-height:16px;padding:0 5px;border-radius:4px;font-weight:600;white-space:nowrap;cursor:default;
  color:#6b6560;background:#f5f2ed;border:1px solid #e7e1d8}
@media (max-width:700px){.capital-inline{font-size:10px;line-height:15px;padding:0 4px}}
.cell-sub{color:var(--muted);font-size:13px;line-height:1.45;white-space:normal;max-width:180px}
.cell-type-line{margin-top:3px;white-space:nowrap}
.cell-type-line .tag{font-size:11px;padding:1px 6px;line-height:1.5;font-weight:600;cursor:pointer}
.cell-wrap{white-space:normal;max-width:200px;line-height:1.5}
/* 公司与地址列：公司名1行、地址2行，最多3行，超出显示省略号（hover 看全文） */
.clamp-1{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.clamp-2{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.ops{display:flex;gap:1px;align-items:center}
.mini-type-btn{height:26px;padding:0 7px;border-radius:5px;border:1px solid var(--line);background:#fff;
  color:var(--brown);font-size:12px;font-weight:600;white-space:nowrap;cursor:pointer;transition:.15s}
.mini-type-btn:hover{background:var(--brown);color:#fff;border-color:var(--brown)}
.pop-host{position:relative;display:inline-block}
.popover{position:absolute;top:calc(100% + 4px);left:0;z-index:45;background:#fff;border:1px solid var(--line);
  border-radius:8px;box-shadow:0 10px 30px rgba(50,40,25,.16);padding:5px;min-width:240px;max-height:380px;overflow:auto}
.popover .pop-items{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:2px}
/* 客户经理弹窗：固定两列，宽度保证「待分配（清除指定）」完整显示 */
.popover-manager{min-width:290px}
.popover-manager .pop-items{grid-template-columns:repeat(2,minmax(0,1fr))}
/* 客户意向弹窗：完整显示所有选项，不加高限制、不滚动 */
.popover-intent{max-height:none;overflow:visible}
.popover button{display:block;width:100%;text-align:left;padding:6px 10px;border-radius:5px;font-size:13.5px;white-space:nowrap}
.popover button:hover{background:var(--brown-soft);color:var(--brown-dark)}
.popover .pop-title{font-size:12.5px;color:var(--muted);padding:4px 10px 6px;border-bottom:1px solid var(--line-2);margin-bottom:3px}
.pager{display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:10px 13px;border-top:1px solid var(--line-2);font-size:13.5px;color:var(--sub)}
.pager button{border:1px solid var(--line);border-radius:5px;padding:4px 9px;font-size:13.5px}
.pager button:disabled{opacity:.4;cursor:default}
.pager button.pg-icon{display:inline-flex;align-items:center;justify-content:center;padding:3px 6px;line-height:1}
.pager button.pg-icon svg{width:15px;height:15px;fill:currentColor;stroke:none}
.pager .pager-jump{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}
.pager .page-jump-input{width:50px;border:1px solid var(--line);border-radius:5px;padding:4px 6px;font-size:13.5px;text-align:center;color:var(--text);background:var(--card);-moz-appearance:textfield}
.pager .page-jump-input::-webkit-inner-spin-button,.pager .page-jump-input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}

/* ---------------- 表单 / 抽屉 ---------------- */
.overlay{position:fixed;inset:0;background:rgba(35,28,20,.3);z-index:40}
.drawer{position:fixed;right:0;top:0;bottom:0;width:440px;max-width:96vw;background:#fff;z-index:41;
  box-shadow:-12px 0 40px rgba(40,30,20,.16);display:flex;flex-direction:column;animation:slideIn .2s ease-out}
@keyframes slideIn{from{transform:translateX(30px);opacity:.4}to{transform:translateX(0);opacity:1}}
/* 厂房导入抽屉：加宽到整个页面一半 */
.drawer-half{width:50vw;max-width:50vw}
.drawer-half .drawer-body{padding:20px 24px}
.drawer-half .re-editor{min-height:230px}
.drawer-head{padding:18px 20px;border-bottom:1px solid var(--line);display:flex;align-items:flex-start;gap:10px}
.drawer-head h2{font-size:18px;margin:0 0 4px;font-weight:600}
.drawer-head p{margin:0;font-size:13.5px;color:var(--muted)}
.drawer-close{margin-left:auto;color:var(--muted);font-size:22px;line-height:1;padding:2px 6px;border-radius:5px}
.drawer-close:hover{background:#f4f0eb}
.drawer-body{padding:18px 20px;overflow-y:auto;flex:1}
.drawer-foot{padding:13px 20px;border-top:1px solid var(--line);display:flex;justify-content:flex-end;gap:9px;background:#fdfbf8}
.form-row{margin-bottom:15px}
.form-row>label{display:block;font-size:13.5px;font-weight:600;margin-bottom:6px;color:#514d48}
.form-row .req{color:var(--red)}
.form-row .input{margin-bottom:0;height:38px}
.form-row textarea.input{height:auto}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 12px}
.check-line{display:flex;align-items:center;gap:8px;padding:9px 11px;border:1px solid var(--line);
  border-radius:7px;margin-bottom:9px;cursor:pointer;font-size:14px}
.check-line input{accent-color:var(--blue);width:15px;height:15px}
.check-line small{color:var(--muted);font-size:12.5px}
.info-box{background:#f7f9fd;border:1px solid #e6ecfa;border-radius:8px;padding:11px 13px;
  font-size:13.5px;line-height:1.75;color:#5a6272;margin-bottom:15px}
.info-box b{color:#3a4356}
.file-drop{border:1.5px dashed #cfd6e4;border-radius:9px;padding:22px;text-align:center;background:#fbfcff;
  cursor:pointer;transition:.15s}
.file-drop:hover{border-color:var(--blue);background:#f5f8ff}
.file-drop .big{font-size:24px;color:#9aa8c4;margin-bottom:7px}
.file-drop p{margin:3px 0;font-size:13.5px;color:var(--sub)}
.file-drop small{color:var(--muted);font-size:12.5px}
.file-drop input{display:none}
.timeline{border-left:2px solid var(--line);margin:0 0 18px 4px;padding-left:14px}
.timeline-item{position:relative;margin-bottom:16px}
.timeline-item:before{content:"";position:absolute;left:-19px;top:4px;width:8px;height:8px;border-radius:50%;
  background:var(--blue);border:2px solid #fff}
.timeline-item .meta{font-size:12.5px;color:var(--muted);margin-bottom:4px}
.timeline-item .body{font-size:14px;line-height:1.6;color:#3d3935}
.hint{font-size:13px;color:var(--muted);line-height:1.7}
/* 客户表单「更多号码」：整行占满表单宽度，输入框加宽到可完整显示 11 位手机号 */
.mp-field{grid-column:1/-1}
.mp-wrap{display:flex;align-items:flex-start;gap:8px}
.mp-list{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:7px}
.mp-row{display:flex;align-items:center;gap:6px;flex-wrap:nowrap}
.mp-row .input{flex:1 1 auto;min-width:0}
.mp-row .mp-input{flex:1 1 180px;min-width:150px;font-variant-numeric:tabular-nums}
.mp-invalid{border-color:var(--red)!important;background:var(--red-soft)!important}
.mp-err{position:absolute;left:0;top:100%;font-size:11.5px;color:var(--red);white-space:nowrap}
.mp-row{position:relative}
.mp-del{flex:none;width:38px;height:38px;border:1px solid var(--line);border-radius:5px;background:#fff;
  color:var(--muted);font-size:18px;line-height:1;cursor:pointer}
.mp-del:hover{background:var(--red-soft);color:var(--red);border-color:var(--red)}
.mp-add{flex:none;height:38px;white-space:nowrap}

/* ---------------- 线索 / 员工 / 数据库 ---------------- */
.lead-phones{display:flex;flex-wrap:wrap;gap:4px}
.phone-chip{border:1px solid var(--line);background:#faf8f4;border-radius:5px;padding:2px 7px;font-size:13px;color:var(--blue)}
.phone-chip.selected{background:var(--blue);border-color:var(--blue);color:#fff;font-weight:600}
.phone-chip:hover{border-color:var(--blue)}
/* 平台号码（工作台同步到线索池）：紫红色区分 */
.phone-chip.platform{color:#a3188c;border-color:#e5b9dc;background:#fdf2fb}
.section-title{font-size:14.5px;font-weight:600;margin:0 0 10px}
.db-section-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.db-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:13px;margin-bottom:14px}
.db-stat{padding:15px 17px}
.db-stat .k{font-size:13px;color:var(--muted)}
.db-stat .v{font-size:21px;font-weight:700;margin-top:6px}
.db-list{padding:16px 18px}
.db-row{display:flex;justify-content:space-between;padding:8px 0;border-bottom:1px dashed var(--line-2);font-size:14px}
.db-row:last-child{border:0}
.db-actions{display:flex;gap:9px;flex-wrap:wrap;margin-top:14px}
.log-list{max-height:280px;overflow:auto}

/* ---------------- 弹窗 / 提示 ---------------- */
.modal-overlay{z-index:50;display:flex;align-items:center;justify-content:center}
.modal{background:#fff;border-radius:12px;width:390px;max-width:92vw;padding:22px;box-shadow:0 20px 60px rgba(0,0,0,.2)}
.modal h3{margin:0 0 10px;font-size:17px}
.modal p{margin:0 0 20px;color:var(--sub);font-size:14.5px;line-height:1.7}
.modal-foot{display:flex;justify-content:flex-end;gap:9px}
.toast{position:fixed;top:66px;right:20px;z-index:60;background:#2f2c28;color:#fff;padding:10px 16px;
  border-radius:8px;font-size:14.5px;box-shadow:0 8px 24px rgba(0,0,0,.2);animation:fadeIn .2s;max-width:min(560px,80vw);line-height:1.5}
.toast.hidden{display:none}
.toast.error{background:#c2352f}
.toast.success{background:#137a56}
@keyframes fadeIn{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}

@media(max-width:1100px){
  .stat-grid{grid-template-columns:repeat(2,1fr)}
  .dist-grid,.db-grid{grid-template-columns:1fr 1fr}
  .login-view{padding:18px}
  .login-form{padding:26px 22px}
}
@media(max-width:700px){
  .topbar{gap:8px;padding:0 10px}.brand-mini{min-width:0}.brand-text,.db-badge,.top-user{display:none}
  .stat-grid,.dist-grid,.db-grid{grid-template-columns:1fr}
  .topnav button{padding:7px 8px;font-size:13px}
}


/* ============ 本轮 UI 调整 ============ */
/* 导航文字统一加粗 */
.topnav button, .top-btn, .top-user, .db-badge,
.brand-text small, .work-tabs button, .auth-switch button { font-weight: 600; }
.brand-text b { font-weight: 700; }

/* 按钮内图标统一尺寸 */
.btn svg { width: 14px; height: 14px; flex: none;
  stroke: currentColor; fill: none; stroke-width: 1.9;
  stroke-linecap: round; stroke-linejoin: round; }

/* 修复导入抽屉：label 默认 inline 导致虚线框被挤成窄条 */
.file-drop { display: flex; flex-direction: column; align-items: center;
  justify-content: center; width: 100%; min-height: 132px; box-sizing: border-box; }
.file-drop .big { margin-bottom: 8px; line-height: 1; }
.file-drop p, .file-drop small { width: 100%; }

/* 电话 / 更多电话：每行固定两个号码后换行 */
.lead-phones { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px; width: 250px; max-width: 100%; }
.phone-chip { min-width: 0; width: 100%; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; text-align: center; }

/* 导入企查查文件：更显眼的主操作按钮 */
.btn-spotlight { background: linear-gradient(135deg, #3169f2, #1f4fd0);
  color: #fff; font-weight: 700; padding: 9px 18px;
  box-shadow: 0 3px 10px rgba(31, 79, 208, .3); }
.btn-spotlight:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(31, 79, 208, .42); }
.btn-spotlight svg { width: 15px; height: 15px; stroke-width: 2.1; }

/* 表格行内直接导入按钮 */
.btn-mini-import { background: #eaf1ff; color: #1f5fe6; border-radius: 5px;
  padding: 5px 10px; font-weight: 600; }
.btn-mini-import:hover { background: #1f5fe6; color: #fff; }
.ops { gap: 5px; }

/* 字号加大后的表格留白微调 */
tbody td { padding: 10px; }
thead th { padding: 10px; }

/* 控件高度适配 */
.search-box { height: 36px; }
.form-row .input { height: 40px; }
.file-drop { min-height: 140px; }
.work-toolbar .btn { padding: 9px 15px; }
.btn-spotlight { padding: 10px 19px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.count-hint { white-space: normal; line-height: 1.5; }

/* 最近跟进悬浮：显示全部跟进内容与日期 */
.follow-hover { cursor: help; }
.follow-tip { position: fixed; z-index: 55; width: 330px; max-height: 330px; overflow: auto;
  background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 12px 14px;
  box-shadow: 0 12px 34px rgba(45, 35, 20, .18); }
.tip-title { font-size: 13.5px; font-weight: 700; margin-bottom: 7px; color: #35312c;
  display:flex;align-items:center;justify-content:space-between;gap:8px }
/* 提示框右上角拨打图标：点击才拨号 */
.tip-call{flex:none;width:26px;height:26px;border-radius:6px;display:inline-flex;align-items:center;justify-content:center;
  background:var(--blue);color:#fff;text-decoration:none}
.tip-call:hover{background:#1749b5}
.tip-call svg{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.tip-due { font-size: 12px; color: var(--blue); background: #f1f6ff; border-radius: 5px;
  padding: 5px 8px; margin-bottom: 8px; }
.tip-list { max-height: 235px; overflow: auto; }
.tip-item { padding: 7px 0; border-bottom: 1px dashed var(--line-2); }
.tip-item:last-child { border-bottom: 0; }
.tip-date { font-size: 11.5px; color: var(--muted); margin-bottom: 3px; line-height: 1.7 }
/* 跟进记录悬浮提示里的意向：与客户意向一致的彩色标签，尺寸缩小以适配提示 */
.tip-date .tag{font-size:11px;line-height:15px;padding:0 5px;font-weight:600;vertical-align:middle;margin:0 1px}
.tip-content { font-size: 12.5px; line-height: 1.6; color: #3d3935; white-space: normal; cursor: pointer; border-radius: 4px; }
.tip-content:hover { background: var(--brown-soft); }
.tip-empty { color: var(--muted); font-size: 12.5px; padding: 10px 0; }
/* 自动记录美化：把「字段：旧 → 新」分行、旧值删除线、新值高亮 */
.fc-badge{display:inline-block;font-size:11px;line-height:1.5;padding:1px 7px;border-radius:5px;
  background:var(--brown-soft);color:var(--brown-dark);font-weight:600;margin-bottom:6px}
.fc-rows{display:flex;flex-direction:column;gap:4px}
.fc-row{display:flex;flex-wrap:wrap;align-items:baseline;gap:5px;font-size:13px;line-height:1.5}
.fc-field{color:var(--muted);font-size:12px;margin-right:2px;white-space:nowrap}
.fc-old{color:#aaa49b;text-decoration:line-through}
.fc-arrow{color:var(--brown);font-weight:700}
.fc-new{color:var(--brown-dark);font-weight:600}
.fc-text{color:#3d3935}

/* 可点击的重复号码提示：与普通提示共用同一外观，仅保留手型光标，颜色/样式不另设 */
.toast.clickable { cursor: pointer; }

/* 从重复提示跳转过来时高亮定位的客户行 */
tbody tr.row-highlight { background: #fff4d6 !important; box-shadow: inset 3px 0 0 #e0654a; }
tbody tr.row-highlight:hover { background: #ffedb8 !important; }

/* ================================================================
   手机端适配（仅 max-width:700px 生效，桌面端显示完全不变）
   ================================================================ */
@media(max-width:700px){
  html,body{height:auto}
  body{font-size:15px;-webkit-text-size-adjust:100%}
  main{padding:8px 10px 90px}

  /* ---- 顶栏：单行，不吸顶。整行（品牌+导航+右侧按钮）连接在一起横滑 ---- */
  .topbar{height:48px;flex-wrap:nowrap;gap:8px;padding:0 8px;position:static;
    overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;scrollbar-width:none}
  .topbar::-webkit-scrollbar{display:none}
  .brand-mini{min-width:0;flex:0 0 auto}
  .brand-square{width:26px;height:26px;font-size:14px}
  .brand-text{display:none}
  .topbar-right{margin-left:0;gap:5px;flex:0 0 auto}
  .db-badge{display:none}
  .top-btn{padding:5px 8px;font-size:13px}
  /* 手机上用户名换成"改密"，保证改密入口始终可点（须放在 .top-btn 之后覆盖字号） */
  .top-user{display:inline-flex;align-items:center;font-size:0;padding:5px 8px;border:1px solid rgba(255,255,255,.32)}
  .top-user::after{content:"改密";font-size:13px;line-height:1}
  .topnav{order:0;flex:0 0 auto;width:auto;min-width:0;overflow:visible;gap:3px;padding:0}
  .topnav::-webkit-scrollbar{display:none}
  .topnav button{flex:0 0 auto;padding:6px 10px;font-size:13px;white-space:nowrap}
  .topnav svg{width:12px;height:12px}

  /* ---- 页面标题已全局隐藏 ---- */
  /* ---- 工具栏 / 筛选行：按钮可换行、搜索占满 ---- */
  .work-toolbar{gap:8px;padding:10px}
  .work-tabs{width:100%;overflow-x:auto;gap:4px;scrollbar-width:none;-webkit-overflow-scrolling:touch}
  .work-tabs::-webkit-scrollbar{display:none}
  .work-tabs button{flex:0 0 auto;padding:8px 12px;font-size:14px}
  .toolbar-spacer{display:none}
  .search-box{width:100%;min-width:0;flex:1 1 100%;height:40px}
  .search-box input{font-size:15px} /* ≥16px 会触发 iOS 聚焦缩放，15px 折中防抖 */
  .work-toolbar .btn{flex:1 1 auto;padding:10px 12px;font-size:14px}
  .filter-row{padding:9px 10px;gap:7px}
  .filter-row .flabel{width:100%;font-size:12.5px}
  .date-controls{width:100%;margin-left:0;padding-left:0;border-left:none;gap:6px}
  .date-controls .flabel{width:auto;flex:none;white-space:nowrap}
  .date-controls .date-input{flex:1 1 0;min-width:0}
  .date-range-box{flex:1 1 auto;min-width:0;justify-content:center;font-size:12.5px;padding:0 8px}
  .pill{padding:7px 13px;font-size:13.5px}
  .filter-row .pill{padding:6px 12px;font-size:13px}

  /* ---- 表格 → 卡片：每行一张卡，字段名用 data-label 显示 ---- */
  .table-wrap{overflow:visible}
  #main table,#main tbody,#main tr,#main td{display:block;width:100%}
  #main thead{display:none}
  #main tbody{padding:0}
  #main tbody tr{background:#fff;border:1px solid var(--line);border-radius:10px;
    margin:10px 0;padding:6px 12px 10px;box-shadow:0 1px 4px rgba(60,45,30,.05)}
  #main tbody td{border:0;padding:8px 0;border-bottom:1px dashed var(--line-2);
    display:flex;align-items:flex-start;gap:10px;font-size:14.5px;white-space:normal;min-height:38px;max-width:none}
  #main tbody td:last-child{border-bottom:0}
  #main tbody td::before{content:attr(data-label);flex:0 0 78px;color:var(--muted);
    font-size:11.5px;font-weight:600;padding-top:3px;line-height:1.6;word-break:break-all}
  /* 单元格内容占满标签右侧，避免中文字被挤成竖排 */
  #main tbody td>div,#main tbody td>span,#main tbody td>button,
  #main tbody td>a,#main tbody td>select,#main tbody td>input{flex:1 1 auto;min-width:0}
  #main tbody td .cell-wrap,#main tbody td.cell-wrap{max-width:none;width:auto}
  #main tbody td .name-with-ent{flex-wrap:wrap;word-break:break-word}
  /* 企业名称/地址上下分行，地址另起一行占满 */
  #main tbody td>.cell-wrap{display:block}
  #main tbody td>.cell-wrap .cell-sub{margin-top:5px;max-width:none}
  /* 线索表「企业名称」：td 自身即 cell-wrap，改为块布局让公司名与地址上下分行 */
  #lead-tbody td[data-label="企业名称"]{display:block;position:relative;padding-left:88px}
  #lead-tbody td[data-label="企业名称"]::before{position:absolute;left:0;top:10px;width:78px}
  #lead-tbody td[data-label="企业名称"]>.name-with-ent,
  #lead-tbody td[data-label="企业名称"]>.cell-sub{width:100%;display:block}
  #lead-tbody td[data-label="企业名称"]>.cell-sub{margin-top:5px}
  /* 较长字段名加宽标签，避免难看的折行 */
  #lead-tbody td[data-label="电话 / 更多电话"]::before{flex-basis:92px}
  /* 第一列姓名/企业名：作为卡片标题，不显示标签、加粗放大 */
  #main tbody td.cell-strong:first-child{border-bottom:1px solid var(--line);
    padding:11px 0 10px;font-size:16px}
  #main tbody td.cell-strong:first-child::before{display:none}
  #main tbody td .cell-sub{max-width:none}
  #main tbody td .cell-wrap{max-width:none}
  /* 操作列：按钮加大、靠右排开 */
  #main tbody td:last-child .ops{gap:8px;margin-left:auto}
  #main tbody td:last-child .mini-btn{width:34px;height:34px;border:1px solid var(--line)}
  #main tbody td:last-child .mini-btn svg{width:18px;height:18px}
  #main tbody td:last-child .btn-mini-import{padding:7px 16px;font-size:14px}
  /* 微信列收藏星标：手机端加大触控区 */
  .wechat-cell{gap:10px}
  .fav-btn{width:32px;height:32px}
  .fav-btn svg{width:21px;height:21px}
  /* 复选框、开关列：与标签对齐 */
  #main tbody td input[type=checkbox]{width:18px;height:18px;accent-color:var(--blue)}
  /* 号码 chip 两列 */
  .lead-phones{width:100%;grid-template-columns:repeat(2,minmax(0,1fr))}
  /* 开发专员下拉占满剩余 */
  #main tbody td select{min-width:0;flex:1 1 auto;max-width:100%}

  /* ---- 空状态 ---- */
  .empty{padding:36px 14px}

  /* ---- 分页 ---- */
  /* 客户管理：分页栏移到表格（卡片列表）前面，筛选行之后 */
  .customer-page-card{display:flex;flex-direction:column}
  .customer-page-card .pager{order:1;border-top:none;border-bottom:1px solid var(--line-2)}
  .customer-page-card .table-wrap{order:2}
  .pager{justify-content:center;flex-wrap:wrap;gap:8px;padding:12px 10px}
  .pager button{padding:7px 14px;font-size:14px}
  .pager button.pg-icon{padding:7px 11px}
  .pager button.pg-icon svg{width:18px;height:18px}
  .pager .pager-jump{gap:6px}
  .pager .page-jump-input{width:60px;padding:7px 6px;font-size:14px}

  /* ---- 看板 / 数据库网格 ---- */
  .stat-grid{grid-template-columns:1fr 1fr;gap:10px}
  .stat-card{padding:12px}
  .stat-card .num{font-size:22px}
  .dist-grid,.db-grid{grid-template-columns:1fr;gap:10px}
  .db-row{align-items:flex-start;gap:12px;font-size:13.5px;line-height:1.6}

  /* ---- 抽屉：全屏 ---- */
  .drawer{width:100%;max-width:100%;top:0;bottom:0}
  .drawer-half{width:100%;max-width:100%}
  .drawer-half .drawer-body{padding:16px}
  .drawer-half .re-editor{min-height:180px}
  .drawer-head{padding:15px 16px}
  .drawer-head h2{font-size:17px}
  .drawer-body{padding:16px}
  .drawer-foot{padding:11px 16px;gap:10px}
  .drawer-foot .btn{flex:1 1 auto;padding:12px}
  .form-grid{grid-template-columns:1fr;gap:0}
  .form-row .input,textarea.input{height:44px;font-size:16px}
  .mp-del,.mp-add{height:44px}
  .mp-add{padding:0 12px;font-size:14px}
  textarea.input{height:auto;min-height:110px}
  .tpl-chip{padding:8px 14px;font-size:14px}
  .follow-tpls{gap:8px}

  /* ---- 弹窗 ---- */
  .modal{width:92vw;max-width:92vw;padding:20px}
  .modal-foot .btn{flex:1 1 auto}

  /* ---- 意向弹窗：手机端限宽、两列 ---- */
  .popover{min-width:min(240px,calc(100vw - 24px));max-width:calc(100vw - 24px)}

  /* ---- 悬浮跟进提示：限宽、可点 ---- */
  .follow-tip{width:min(330px,calc(100vw - 24px));max-height:60vh}
  .follow-hover{cursor:pointer}

  /* ---- Toast：顶部居中、限宽 ---- */
  .toast{top:8px;left:10px;right:10px;max-width:none;text-align:center;font-size:14px}

  /* ---- 登录页 ---- */
  .login-view{padding:14px;align-items:flex-start}
  .login-card{margin-top:6vh;width:100%}
  .login-form{padding:22px 20px}
  .login-form h2{font-size:21px}
  .input{height:46px;font-size:16px}
  #auth-username,#auth-password{font-size:16px} /* 防 iOS 聚焦缩放 */
}

/* 超窄屏（≤380px）微调 */
@media(max-width:380px){
  #main tbody td::before{flex-basis:64px;font-size:12px}
  .work-tabs button,.topnav button{padding:8px 10px;font-size:13.5px}
  .stat-card .num{font-size:20px}
  .mp-row .mp-input{min-width:110px}
  .mp-add{padding:0 8px}
}

/* ================= 2026-11-24 新增功能样式 ================= */
/* 联系号码表头下拉：外观与其它表头一致（灰字、无边框、带下拉箭头） */
.phone-filter-select{appearance:none;-webkit-appearance:none;border:none;background:transparent;
  font-size:13px;font-weight:600;color:inherit;font-family:inherit;cursor:pointer;
  padding:0 14px 0 0;max-width:100%;white-space:nowrap;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%238f8a83' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right center}
.phone-filter-select:hover{color:var(--brown-dark)}
/* 手机端表头筛选条：桌面端隐藏，手机端替代被隐藏的 thead */
.mobile-table-filters{display:none}
@media(max-width:700px){
  .mobile-table-filters{display:flex;align-items:center;gap:6px 16px;flex-wrap:wrap;
    padding:10px 12px;background:#fdfbf8;border-bottom:1px solid var(--line-2)}
  .mobile-table-filters .phone-filter-select{flex:0 0 auto;font-size:13.5px;color:#8f8a83;padding-right:16px}
  .mobile-table-filters .th-sort{flex:0 0 auto;font-size:13.5px;color:#8f8a83}
  .mobile-table-filters .phone-filter-select:focus,.mobile-table-filters .th-sort:hover{color:var(--brown-dark)}
}
/* 需求3：日期筛选输入（已合并进「意向」筛选行，同一行显示） */
.date-filter-row{gap:8px}
.date-controls{display:inline-flex;align-items:center;gap:6px;margin-left:8px;padding-left:12px;
  border-left:1px solid var(--line-2)}
.date-controls .flabel{margin-right:2px}
.date-input{border:1px solid var(--line);border-radius:6px;height:30px;padding:0 8px;font-size:13px;
  background:#fff;color:var(--brown-dark);font-family:inherit}
/* 日期区间输入框（点开日历连选） */
.date-range-box{display:inline-flex;align-items:center;gap:8px;height:32px;padding:0 12px;
  border:1px solid var(--line);border-radius:8px;background:#fff;color:#9a938a;font-size:13px;
  font-family:inherit;cursor:pointer;white-space:nowrap;min-width:210px}
.date-range-box:hover{border-color:var(--blue-bar)}
.date-range-box.has-value{color:var(--brown-dark)}
.date-range-box svg{width:15px;height:15px;flex:none;stroke:currentColor;fill:none;stroke-width:1.9;
  stroke-linecap:round;stroke-linejoin:round}
/* 日期区间日历浮层（fixed 挂 body，避免 work-card overflow 裁切） */
.date-cal{position:fixed;z-index:58;width:302px;background:#fff;border:1px solid var(--line);
  border-radius:10px;box-shadow:0 12px 34px rgba(50,40,25,.18);padding:12px 13px 10px;font-family:inherit}
.dc-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}
.dc-nav{border:none;background:none;font-size:17px;line-height:1;color:var(--muted);cursor:pointer;
  width:26px;height:26px;border-radius:5px;padding:0}
.dc-nav:hover{background:var(--brown-soft);color:var(--brown-dark)}
.dc-title{font-size:15px;font-weight:600;color:var(--brown-dark)}
.dc-week,.dc-grid{display:grid;grid-template-columns:repeat(7,1fr)}
.dc-week span{text-align:center;font-size:12.5px;color:var(--muted);padding:5px 0}
.dc-grid{gap:2px 0}
.dc-cell{position:relative;display:flex;align-items:center;justify-content:center;height:34px;font-size:13.5px;
  color:var(--brown-dark);cursor:pointer;user-select:none}
.dc-cell.dc-out{color:#ccc;cursor:default}
.dc-cell.dc-in{background:var(--blue-soft);color:var(--blue)}
.dc-cell.dc-today:not(.dc-start):not(.dc-end){color:var(--blue);font-weight:600}
/* 开始/结束日：圆形蓝底白字；区间内相邻端补半块底色使连选连贯 */
.dc-cell.dc-start,.dc-cell.dc-end{position:relative;color:#fff;font-weight:600}
.dc-cell.dc-start::before,.dc-cell.dc-end::before{content:'';position:absolute;
  left:50%;top:3px;bottom:3px;width:34px;transform:translateX(-50%);background:var(--blue);border-radius:17px;z-index:0}
.dc-cell.dc-start{text-align:center}
.dc-cell.dc-start i,.dc-cell.dc-end i{position:relative;z-index:1;font-style:normal}
.dc-foot{display:flex;align-items:center;justify-content:space-between;border-top:1px solid var(--line-2);
  margin-top:8px;padding-top:8px;font-size:12px}
.dc-range{color:var(--brown-dark);font-weight:600}
.dc-tip{color:var(--muted)}
/* 日期筛选的 × 清除按钮（蓝色，与主题一致） */
.clear-date-btn{border:none;background:none;color:var(--blue);font-size:22px;line-height:1;cursor:pointer;
  padding:0 4px;font-weight:300;transform:translateY(-1px)}
.clear-date-btn:hover{color:#1749b5}
/* 日期筛选后的小图标按钮：今日数据 / 刷新 */
.mini-icon-btn{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;flex:none;
  border:1px solid var(--line);border-radius:8px;background:#fff;color:#9a938a;cursor:pointer;padding:0}
.mini-icon-btn:hover{border-color:var(--blue-bar);color:var(--blue)}
.mini-icon-btn svg{width:15px;height:15px;flex:none;stroke:currentColor;fill:none;stroke-width:1.9;
  stroke-linecap:round;stroke-linejoin:round}
.mini-icon-btn.today-ops-btn.active{background:var(--blue);border-color:var(--blue);color:#fff}
.mini-icon-btn.spinning svg{animation:mi-rotate .8s linear infinite}
@keyframes mi-rotate{to{transform:rotate(360deg)}}
/* 下载筛选数据按钮（蓝色文字，无背景） */
.download-filtered-btn{display:inline-flex;align-items:center;gap:6px;border:none;background:none;
  color:var(--blue);font-size:14px;font-weight:600;cursor:pointer;padding:4px 8px;margin-left:4px;white-space:nowrap}
.download-filtered-btn:hover{color:#1749b5;text-decoration:underline}
.download-filtered-btn svg{width:16px;height:16px;flex:none;stroke:currentColor;fill:none;stroke-width:1.9;
  stroke-linecap:round;stroke-linejoin:round}
/* 需求2：标题后 ? 号 + 可复制说明浮层 */
.import-section-title{display:flex;align-items:center;gap:8px}
.help-q{display:inline-flex;align-items:center;justify-content:center;width:17px;height:17px;border-radius:50%;
  border:1px solid #c9b9a5;background:#faf6ef;color:#9a7d54;font-size:12px;font-weight:700;cursor:help;padding:0;line-height:1}
.help-q:hover{background:var(--brown-soft);border-color:var(--brown);color:var(--brown)}
.help-tip{position:fixed;z-index:60;width:350px;max-width:calc(100vw - 24px);background:#fff;
  border:1px solid var(--line);border-radius:9px;padding:12px 14px;box-shadow:0 12px 34px rgba(45,35,20,.2)}
.ht-head{display:flex;align-items:center;justify-content:space-between;font-size:13.5px;font-weight:700;
  color:#35312c;margin-bottom:8px}
.ht-copy{border:1px solid var(--line);background:#faf8f4;color:var(--brown);border-radius:5px;
  padding:3px 9px;font-size:12px;cursor:pointer;font-family:inherit}
.ht-copy:hover{background:var(--brown-soft)}
.ht-body{font-size:12.5px;line-height:1.75;color:#4a453e;user-select:text;max-height:260px;overflow:auto}
/* 需求5：跟进号码选择 chips */
.fphone-list{display:flex;flex-wrap:wrap;gap:8px}
.fphone-chip{display:inline-flex;align-items:center;gap:7px;border:1px solid var(--line);border-radius:7px;
  padding:6px 10px;cursor:pointer;background:#fff;font-size:13px;transition:all .15s}
.fphone-chip:hover{border-color:var(--blue);background:#f7faff}
.fphone-chip.selected{border-color:var(--blue);background:var(--blue-soft)}
.fphone-chip input{accent-color:var(--blue);margin:0}
.fp-num{font-weight:600;color:var(--brown-dark)}
.fp-kind{font-size:11px;color:var(--muted)}
.fphone-chip.selected .fp-kind{color:var(--blue)}
/* 号码悬浮显示该号码跟进记录时，光标提示可查看 */
[data-phone-tip]{cursor:help}
.num-static[data-phone-tip]{cursor:pointer}

/* ---------------- 线索工作台（Excel 式粘贴编辑） ---------------- */
.drawer-wide{width:960px;max-width:96vw}
.wb-body{padding:16px 18px;display:flex;flex-direction:column;min-height:0}
.wb-toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:10px}
.wb-toolbar .input{height:34px;min-width:170px;margin:0;font-size:15px}
.wb-toolbar .btn{padding:7px 11px;font-size:15px}
.wb-count{margin-left:auto;font-size:14.5px;color:var(--muted)}
/* 工作台只读列：纯文本可选中复制；公司名单击进入编辑 */
.wb-static{min-height:30px;display:flex;align-items:center;justify-content:center;text-align:center;padding:0 7px;font-size:15px;
  color:#3b3630;line-height:1.45;user-select:text;word-break:break-word}
.wb-static.wb-empty{color:#b8ada0}
.wb-edit-cell{cursor:text}
.wb-edit-cell:hover{background:#faf6ef;border-radius:4px}
.wb-company-edit{border-color:var(--blue-bar);background:#fff;outline:none}
.wb-basis-edit{width:100%;min-height:64px;padding:5px 7px;line-height:1.45;text-align:left;
  white-space:normal;overflow-wrap:anywhere;word-break:break-all;resize:vertical}
/* 与线索池一致：表格自身不滚动，由页面统一滚动，避免双层滚动条 */
.wb-table-wrap{overflow-x:auto;border:1px solid var(--line);border-radius:8px}
.wb-table{width:100%;min-width:830px;border-collapse:collapse;font-size:15px;table-layout:fixed}
.wb-table th{position:sticky;top:0;z-index:1;background:#fdfbf8;text-align:center;font-weight:600;
  color:#8f8a83;padding:8px 9px;border-bottom:1px solid var(--line-2);white-space:nowrap}
.wb-table td{padding:3px 5px;border-bottom:1px solid #f5f1eb;vertical-align:middle;text-align:center}
/* 公司名称、推测依据：内容左对齐 */
.wb-table th.wb-left,.wb-table td.wb-company-cell,.wb-table td.wb-basis-cell{text-align:left}
.wb-company-cell .wb-static,.wb-basis-cell .wb-static{justify-content:flex-start;text-align:left}
/* 推测依据 + 公司名/联系人文本：用 block 布局让长内容真正换行，避免 flex 子项 min-width:auto 撑破单元格 */
.wb-basis-cell,.wb-basis-cell .wb-static{white-space:normal;overflow-wrap:anywhere;word-break:break-all}
.wb-basis-cell .wb-static{display:block;width:100%}
.wb-cell-inner{display:flex;align-items:flex-start;gap:4px;min-width:0;width:100%}
.wb-cell-inner .wb-static{display:block;flex:1 1 auto;min-width:0;width:100%;
  white-space:normal;overflow-wrap:anywhere;word-break:break-word;padding-top:5px;padding-bottom:5px}
.wb-basis-cell .wb-static,.wb-cell-inner .wb-static{padding-left:7px;padding-right:7px}
/* 企业状态：同样支持长内容换行 */
.wb-col-status .wb-static{display:block;width:100%;min-width:0;white-space:normal;
  overflow-wrap:anywhere;word-break:break-word;padding-top:5px;padding-bottom:5px}
.wb-cell-copy{flex:0 0 18px;width:18px;height:22px;margin:0;padding:2px;border:0;background:none;
  color:#b7ada2;cursor:pointer;border-radius:4px;display:flex;align-items:center;justify-content:center}
.wb-cell-copy svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:1.8}
.wb-cell-copy:hover{background:#f0ece6;color:var(--blue)}
.wb-company-cell .wb-input{text-align:left}
.wb-table tr:last-child td{border-bottom:0}
.wb-table input[type=checkbox]{accent-color:var(--blue);width:15px;height:15px}
.wb-idx{width:52px;text-align:center;color:var(--muted);font-size:14px}
.wb-input{width:100%;height:32px;padding:0 7px;margin:0;font-size:15px;border:1px solid transparent;
  background:transparent;border-radius:5px;font-family:inherit;text-align:center}
.wb-input:hover{border-color:var(--line-2)}
.wb-input:focus{border-color:var(--blue-bar);background:#fff;outline:none}
/* 联系电话：多号码逐行编辑 */
.wb-phones{display:flex;flex-direction:column;gap:3px}
.wb-phone-row{display:flex;align-items:center;gap:3px}
.wb-phone-row .wb-phone-input{flex:1 1 auto;min-width:0;width:auto;height:28px;padding:0 5px;margin:0;font-size:14.5px;
  border:1px solid transparent;background:transparent;border-radius:5px;font-family:inherit;text-align:center}
.wb-phone-row .wb-phone-input:hover{border-color:var(--line-2)}
.wb-phone-row .wb-phone-input:focus{border-color:var(--blue-bar);background:#fff;outline:none}
.wb-phone-del{flex:0 0 20px;width:20px;height:28px;line-height:26px;text-align:center;border:0;background:none;
  color:#b7ada2;font-size:18px;cursor:pointer;border-radius:4px;padding:0}
.wb-phone-del:hover{background:#fdeaea;color:#c0392b}
/* 联系电话、企业状态：列宽贴合内容，单元格左右间距 6px */
.wb-col-phone,.wb-col-status{padding-left:6px!important;padding-right:6px!important}
.wb-col-phone .wb-phone-input,.wb-col-status .wb-static{padding-left:0;padding-right:0}
/* 工作台行操作：删除该行 */
.wb-row-ops{text-align:center}
.wb-row-del{width:22px;height:22px;line-height:20px;border:1px solid transparent;background:none;
  color:#b7ada2;font-size:18px;cursor:pointer;border-radius:4px;padding:0}
.wb-row-del:hover{background:#fdeaea;color:#c0392b;border-color:#f3d4d4}
/* 工作台归档：下拉列表 + 归档只读提示 */
.wb-archive-box{position:relative;margin-left:auto}
.wb-view-tag{color:#fff;background:#7a5ae0;border-radius:10px;padding:1px 7px;font-size:11px;margin-left:4px;font-weight:600}
.wb-archive-menu{position:absolute;right:0;top:calc(100% + 4px);z-index:20;min-width:230px;max-height:340px;overflow:auto;
  background:#fff;border:1px solid var(--line-2);border-radius:8px;box-shadow:0 8px 24px rgba(60,50,40,.16);padding:6px}
.wb-archive-item{display:block;width:100%;text-align:left;border:0;background:none;cursor:pointer;
  padding:8px 10px;border-radius:5px;font-size:13px;color:#3b3630;font-family:inherit}
.wb-archive-item:hover{background:#faf6ef}
.wb-archive-item.active{background:#eef3ff;color:#1f5fe6;font-weight:600}
.wb-archive-n{color:#a89e93;font-size:11.5px;font-weight:400}
.wb-archive-cur{color:#fff;background:#1f5fe6;border-radius:9px;padding:0 6px;font-size:10.5px;margin-left:4px}
.wb-view-bar{display:flex;align-items:center;gap:8px;margin-bottom:10px;padding:7px 12px;
  background:#f3efff;border:1px solid #e2d9ff;border-radius:6px;font-size:13px;color:#5b4a9e}
.wb-view-bar b{color:#4a35ad}
.wb-view-bar .mini-btn{margin-left:auto}
.wb-archive-phones{line-height:1.5}
@media(max-width:700px){
  .drawer-wide{width:100%;max-width:100%}
  .wb-toolbar .btn{flex:1 1 auto}
  .wb-count{margin-left:0;width:100%}
}
/* 手机端日期区：覆盖后置基础样式的 min-width:210px，让日期框可收缩，保证刷新按钮不出屏 */
@media(max-width:700px){
  .date-range-box{min-width:0;flex:1 1 0;padding:0 6px;gap:5px}
  .date-controls{gap:5px}
}

/* ==================== 厂房资源 ==================== */
.factory-filters{padding:8px 13px;border-bottom:1px solid var(--line-2);display:flex;flex-direction:column;gap:4px}
.factory-filters .frow{display:flex;align-items:center;gap:8px;min-height:24px}
.factory-filters .flabel{flex:0 0 58px;font-size:12.5px;color:var(--muted);padding-top:0;white-space:nowrap}
.factory-filters .fpills{display:flex;flex-wrap:wrap;gap:4px}
.fpill{border:1px solid transparent;background:transparent;color:#514d48;border-radius:6px;
  padding:2px 8px;font-size:12.5px;line-height:1.5;cursor:pointer;font-family:inherit;white-space:nowrap}
.fpill-dot{display:inline-block;width:5px;height:5px;border-radius:50%;background:#2fa36b;
  margin-left:4px;vertical-align:middle;flex:none}
.fpill.active .fpill-dot{background:#1f5fe6}
.flabel-help{display:inline-flex;align-items:center;justify-content:center;width:17px;height:17px;
  margin-left:5px;border:1px solid #c8bfb3;border-radius:50%;background:#fff;color:#9a8774;
  font-size:11px;line-height:1;cursor:pointer;vertical-align:1px;padding:0;font-weight:600}
.flabel-help:hover{background:var(--orange-soft);border-color:var(--orange);color:var(--orange)}
.fpill:hover{background:var(--brown-soft)}
.fpill.active{border-color:#b6cffb;background:#eef3ff;color:#1f5fe6;font-weight:600}
.factory-list-head{padding:9px 13px;font-size:13px;color:var(--muted)}
.factory-list{padding:0 13px 8px;display:grid;grid-template-columns:repeat(auto-fill,minmax(340px,1fr));gap:11px}
.factory-card-item{border:1px solid var(--line);border-radius:9px;padding:11px;background:#fff}
.fcard-top{display:flex;gap:10px;align-items:flex-start}
.fcover{width:78px;height:78px;flex:none;object-fit:cover;border-radius:7px;border:1px solid var(--line-2)}
.fcover-ph{display:flex;align-items:center;justify-content:center;background:#f5f1eb;color:#b8ada0}
.fcover-ph svg{width:26px;height:26px;stroke:#b8ada0;fill:none;stroke-width:1.6}
.fcard-main{min-width:0;flex:1}
.ftitle{font-size:15px;font-weight:700;color:#3d3935;line-height:1.4;margin-bottom:3px}
.faddr{font-size:12.5px;color:var(--muted);line-height:1.5;margin-bottom:6px;word-break:break-all}
.ftags{display:flex;flex-wrap:wrap;gap:4px}
.ftag{display:inline-block;font-size:11.5px;padding:2px 7px;border-radius:4px;background:#f1efe9;color:#6f685f}
.ftag-city{background:#eef3ff;color:#1f5fe6}
.ftag-status{background:#e7f6ef;color:#137a56}
.ftag-dim{background:#f6f0ea;color:#9a7b5f}
.fcard-ops{display:flex;flex-direction:column;gap:6px}
.fmeta{display:flex;flex-wrap:wrap;gap:4px 14px;margin-top:9px;padding-top:9px;border-top:1px dashed var(--line-2)}
.fmeta span{font-size:12.5px;color:#514d48}
.fmeta b{color:var(--muted);font-weight:500}
.fcard-foot{margin-top:8px;font-size:11.5px;color:#aaa49b}
.factory-editor-tip{font-weight:400;color:var(--muted);font-size:12px;margin-left:6px}
.rich-editor-wrap{border:1px solid #e2e6ee;border-radius:8px;overflow:hidden;background:#fff}
.rich-editor-wrap:focus-within{border-color:#5b83f0;box-shadow:0 0 0 3px rgba(60,100,235,.1)}
.re-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:3px;padding:6px 7px;
  background:#faf8f5;border-bottom:1px solid var(--line)}
.re-tool{min-width:27px;height:27px;padding:0 6px;border-radius:5px;display:inline-flex;
  align-items:center;justify-content:center;font-size:12.5px;color:#5b5854;background:transparent;
  border:1px solid transparent;line-height:1;white-space:nowrap}
.re-tool:hover{background:#fff;border-color:#ded7ce;color:var(--brown-dark)}
.re-tool.re-strong{font-weight:700}
.re-sep{width:1px;height:17px;background:#ddd6cd;margin:0 3px}
.re-color{position:relative;overflow:hidden;cursor:pointer}
.re-color input{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%;height:100%}
.re-color-bar{display:block;width:15px;height:3px;background:var(--orange);border-radius:2px;margin-left:2px}
.re-editor{min-height:210px;max-height:420px;overflow-y:auto;padding:11px 13px;font-size:13.5px;
  line-height:1.75;color:var(--text);outline:none;word-break:break-word}
.re-editor:empty:before{content:attr(data-placeholder);color:#b8b2aa}
.re-editor img{max-width:100%;height:auto;border-radius:6px;margin:5px 0;display:block}
.re-editor blockquote{border-left:3px solid var(--blue-bar);margin:6px 0;padding:2px 0 2px 11px;color:var(--sub)}
.re-editor pre{background:#f5f3ef;border-radius:6px;padding:9px 11px;white-space:pre-wrap;font-size:12.5px}
.re-editor h3{font-size:16px;margin:8px 0 4px}
.re-status{display:flex;align-items:center;justify-content:space-between;gap:10px;
  padding:5px 11px;background:#faf8f5;border-top:1px solid var(--line);
  font-size:11.5px;color:var(--muted)}
.re-status span:last-child{white-space:nowrap}

/* 厂房资源详情：重要信息置顶 */
.fd-detail{padding:0}
.fd-hero{padding:16px 18px 14px;background:linear-gradient(135deg,#f7f3ed,#fff);border-bottom:1px solid var(--line)}
.fd-hero-title{font-size:19px;font-weight:700;color:#3d3935;line-height:1.4;word-break:break-word}
.fd-tags{display:flex;flex-wrap:wrap;gap:6px;margin-top:9px}
.fd-tag{font-size:12px;padding:3px 9px;border-radius:5px;background:#f1efe9;color:#6f685f}
.fd-tag-city{background:#eef3ff;color:#1f5fe6;font-weight:600}
.fd-tag-status{background:#e7f6ef;color:#137a56}
.fd-tag-dim{background:#f6f0ea;color:#9a7b5f}
.fd-metrics{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;padding:14px 18px}
.fd-metric{border:1px solid var(--line);border-radius:9px;padding:11px 13px;background:#fff}
.fd-metric-k{font-size:12px;color:var(--muted);margin-bottom:5px}
.fd-metric-v{font-size:20px;font-weight:700;color:var(--brown-dark);line-height:1.3;word-break:break-word}
.fd-empty{color:#c4bdb4;font-weight:400}
.fd-block{padding:4px 18px 12px}
.fd-block-title{font-size:13px;font-weight:700;color:var(--sub);margin:8px 0 7px;padding-left:9px;border-left:3px solid var(--blue-bar)}
.fd-info-row{display:flex;gap:10px;padding:5px 0;border-bottom:1px dashed var(--line-2);font-size:13.5px;line-height:1.5}
.fd-info-row:last-child{border-bottom:0}
.fd-info-k{flex:0 0 84px;color:var(--muted)}
.fd-info-v{flex:1;color:var(--text);word-break:break-word}
.fd-gallery{display:flex;flex-wrap:wrap;gap:8px}
.fd-gallery-img{width:88px;height:88px;object-fit:cover;border-radius:7px;border:1px solid var(--line);cursor:zoom-in;background:#f5f1eb}
.fd-gallery-main{width:100%;height:170px;object-fit:cover}
.fd-noimg{font-size:12.5px;color:#b8b2aa;padding:8px 0}
/* 厂房详情图片预览 */
.fd-lightbox{position:fixed;inset:0;z-index:70;background:rgba(18,14,11,.92);display:flex;align-items:center;justify-content:center;padding:48px 72px 64px}
.fd-lb-img{max-width:100%;max-height:calc(100vh - 120px);object-fit:contain;border-radius:6px;background:#fff;box-shadow:0 16px 60px rgba(0,0,0,.45)}
.fd-lb-nav{position:absolute;top:50%;transform:translateY(-50%);width:48px;height:48px;border-radius:50%;border:1px solid rgba(255,255,255,.35);background:rgba(255,255,255,.12);color:#fff;font-size:32px;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0}
.fd-lb-nav:hover{background:rgba(255,255,255,.26)}
.fd-lb-prev{left:20px}
.fd-lb-next{right:20px}
.fd-lb-close{position:absolute;top:16px;right:20px;width:36px;height:36px;border-radius:50%;border:1px solid rgba(255,255,255,.3);background:rgba(255,255,255,.1);color:#fff;font-size:22px;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0}
.fd-lb-close:hover{background:rgba(255,255,255,.25)}
.fd-lb-bar{position:absolute;bottom:20px;left:0;right:0;display:flex;justify-content:center;gap:22px;color:#eae7e2;font-size:13.5px}
.fd-lb-hint{opacity:.6}
@media(max-width:700px){
  .fd-lightbox{padding:44px 14px 58px}
  .fd-lb-nav{width:40px;height:40px;font-size:26px;background:rgba(255,255,255,.18)}
  .fd-lb-prev{left:8px}
  .fd-lb-next{right:8px}
  .fd-lb-bar{font-size:12px;gap:12px}
}
.fd-raw{margin:6px 18px 0;border:1px solid var(--line);border-radius:8px;background:#fdfbf8}
.fd-raw summary{cursor:pointer;padding:9px 12px;font-size:12.5px;color:var(--sub)}
.fd-raw pre{margin:0;padding:0 12px 12px;font-size:12px;line-height:1.6;white-space:pre-wrap;word-break:break-word;color:#5b5854}
.fd-raw-imgs{display:flex;flex-wrap:wrap;gap:7px;padding:0 12px 12px}
.fd-raw-imgs img{width:64px;height:64px;object-fit:cover;border-radius:6px;border:1px solid var(--line);cursor:zoom-in;background:#f5f1eb}
/* 原始粘贴富文本：按粘贴时的图文位置与样式还原 */
.fd-raw-rich{padding:6px 12px 12px;font-size:13.5px;line-height:1.7;color:#4a4a48;word-break:break-word}
.fd-raw-rich img{max-width:100%;height:auto;border-radius:6px;margin:6px 0;cursor:zoom-in}
.fd-raw-rich div,.fd-raw-rich p{margin:2px 0}
.fd-raw-rich .fd-raw-imgs{padding:0}
.fd-added{padding:12px 18px 18px;font-size:11.5px;color:#aaa49b}
@media(max-width:700px){
  .fd-metric-v{font-size:18px}
  .fd-info-k{flex-basis:72px}
}

.factory-parse-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:12px 0 8px}
.factory-parse-hint{font-size:12px;color:var(--muted)}
.factory-preview{margin-bottom:4px}
.preview-title{font-size:13px;font-weight:600;color:#514d48;margin-bottom:8px}
.preview-item{border:1px solid var(--line);border-radius:8px;padding:11px 12px;margin-bottom:9px;background:#fdfbf8}
.preview-item-head{font-size:12.5px;color:var(--brown);font-weight:600;margin-bottom:9px}
.pending{color:#c2352f}
/* 识别结果：每个字段可编辑 */
.preview-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(165px,1fr));gap:9px 12px}
.pv{font-size:12px;display:flex;flex-direction:column;gap:3px;min-width:0}
.pv-label{color:var(--muted);font-size:11px}
.preview-grid .pv-input{height:31px;padding:4px 8px;font-size:12.5px;line-height:1.4}
.pv-input::placeholder{color:#c0b8ae;font-style:italic}
/* 识别结果里的图片：只读缩略图，不进单行输入框 */
.pv-images{grid-column:1/-1;display:flex;flex-direction:column;gap:5px;margin-top:2px}
.pv-thumbs{display:flex;gap:7px;flex-wrap:wrap;align-items:center}
.pv-thumbs img{width:62px;height:46px;object-fit:cover;border:1px solid var(--line);
  border-radius:5px;background:#fff}
.pv-more{font-size:11.5px;color:var(--muted)}
/* 图片上传中：状态提示 + 禁用导入按钮 */
.re-status span.uploading{color:var(--orange);font-weight:600}
/* 粘贴内容在上，城市/行政区/客户经理三项并排放在下面 */
.factory-import-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0 14px;
  border-top:1px dashed var(--line);margin-top:16px;padding-top:14px}
.factory-import-fields .form-row{margin-bottom:4px}
@media(max-width:700px){
  .factory-filters{padding:8px 10px;gap:4px}
  .factory-filters .frow{gap:5px;flex-direction:column;align-items:flex-start;min-height:0}
  .factory-filters .flabel{flex:none;padding-top:0}
  .factory-filters .fpills{gap:4px}
  .fpill{padding:4px 9px;font-size:13px}
  .factory-list{grid-template-columns:1fr;padding:0 10px 8px;gap:9px}
  .preview-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .factory-import-fields{grid-template-columns:1fr;gap:0}
}
