*{box-sizing:border-box}body{margin:0;font-family:-apple-system,"PingFang SC","Microsoft YaHei",sans-serif;background:#f5f6fa;color:#1f2329;font-size:14px}
a{color:#1664ff;text-decoration:none}button{cursor:pointer}
.btn{background:#1664ff;color:#fff;border:0;border-radius:6px;padding:8px 16px;font-size:14px}.btn.secondary{background:#fff;color:#1f2329;border:1px solid #dee0e3}.btn.danger{background:#f53f3f}
.input,select.input,textarea.input{width:100%;padding:9px 12px;border:1px solid #dee0e3;border-radius:6px;font-size:14px;background:#fff}
.layout{display:flex;min-height:100vh}.sidebar{width:220px;background:#001529;color:#c9d4e3;flex-shrink:0;padding:20px 0}.sidebar .logo{color:#fff;font-size:17px;font-weight:600;padding:0 20px 18px}.sidebar a{display:block;color:#c9d4e3;padding:11px 20px}.sidebar a.active,.sidebar a:hover{background:#1664ff;color:#fff}
.main{flex:1;padding:20px;min-width:0}.card{background:#fff;border-radius:8px;padding:18px;margin-bottom:16px;box-shadow:0 1px 2px rgba(0,0,0,.04)}
table{width:100%;border-collapse:collapse}th,td{padding:10px 8px;border-bottom:1px solid #eef0f3;text-align:left;white-space:nowrap}th{color:#646a73;font-weight:500;background:#fafbfc}
.stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px}.stat{background:#fff;border-radius:8px;padding:16px}.stat b{font-size:24px;display:block}.stat span{color:#646a73}
.login-wrap{max-width:360px;margin:12vh auto}.muted{color:#86909c}.tag{display:inline-block;background:#e8f3ff;color:#1664ff;border-radius:4px;padding:1px 7px;font-size:12px}.tag.red{background:#ffece8;color:#f53f3f}
/* PWA 移动端 */
.mobile{max-width:520px;margin:0 auto;padding:12px;padding-bottom:78px}.tabbar{position:fixed;bottom:0;left:0;right:0;background:#fff;border-top:1px solid #eef0f3;display:flex}.tabbar button{flex:1;background:none;border:0;padding:12px 4px;font-size:13px;color:#646a73}.tabbar button.active{color:#1664ff}
.callbtn{display:block;text-align:center;background:#00b42a;color:#fff;border-radius:8px;padding:13px;font-size:16px;margin:10px 0}.outcome-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.outcome-grid button{padding:10px;border:1px solid #dee0e3;background:#fff;border-radius:6px}
.task-overdue{border-left:3px solid #f53f3f}
/* 生命周期三段步骤条 + 客户分群树 + 工作台（借鉴大厂范式） */
.phase-steps{display:flex;align-items:center;gap:6px;margin:10px 0 2px;flex-wrap:wrap}
.phase-step{font-size:12px;padding:3px 12px;border-radius:999px;background:#f2f3f5;color:#86909c;border:1px solid #e5e6eb}
.phase-step.on{background:#e8f3ff;color:#1664ff;border-color:#bcd7fb;font-weight:600}
.phase-arrow{color:#c9cdd4;font-size:12px}
.cust-flex{display:flex;gap:14px;align-items:flex-start}
.cust-tree{flex:0 0 196px;background:#f7fafd;border:1px solid #edf1f6;border-radius:10px;padding:10px 12px;max-height:720px;overflow-y:auto}
.cust-tree h5{margin:10px 0 4px;font-size:12px;color:#86909c;font-weight:600}
.cust-tree h5:first-child{margin-top:0}
.tree-item{display:flex;justify-content:space-between;gap:6px;padding:4px 8px;border-radius:6px;cursor:pointer;font-size:13px;color:#35506e}
.tree-item:hover{background:#eef4fb}
.tree-item.on{background:#e8f3ff;color:#1664ff;font-weight:600}
.tree-item .cnt{color:#86909c;font-size:12px}
.cust-main{flex:1;min-width:0}
@media (max-width:900px){ .cust-flex{flex-direction:column} .cust-tree{flex:none;width:100%;max-height:none} }

/* 表格批：冻结列 / 可排序表头 / 已选条件标签 / 筛选抽屉 */
.tbl-wrap table th.sticky1, .tbl-wrap table td.sticky1, table.freeze th.sticky1, table.freeze td.sticky1 { position: sticky; left: 0; background: #fff; z-index: 3; }
.tbl-wrap table th.sticky2, .tbl-wrap table td.sticky2, table.freeze th.sticky2, table.freeze td.sticky2 { position: sticky; left: 34px; background: #fff; z-index: 3; box-shadow: 2px 0 5px rgba(15,40,80,.07); }
th.sortable { cursor: pointer; white-space: nowrap; }
th.sortable:hover { color: #1664ff; }
th.sortable .sarr { color: #1664ff; font-size: 11px; }
.fchip { display: inline-flex; align-items: center; gap: 5px; background: #eef4ff; color: #1664ff; border: 1px solid #c9dcff; border-radius: 999px; padding: 2px 6px 2px 10px; font-size: 12px; margin: 2px 4px 2px 0; }
.fchip a { color: #1664ff; text-decoration: none; font-weight: 700; padding: 0 2px; }
#filterDrawer .fd-mask { position: fixed; inset: 0; background: rgba(10,25,50,.35); z-index: 9990; }
#filterDrawer .fd-panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(400px, 94vw); background: #fff; z-index: 9991; box-shadow: -8px 0 30px rgba(0,0,0,.18); display: flex; flex-direction: column; }
#filterDrawer .fd-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid #edf0f5; }
#filterDrawer .fd-body { flex: 1; overflow: auto; padding: 14px 16px; }
#filterDrawer .fd-foot { display: flex; gap: 8px; align-items: center; padding: 12px 16px; border-top: 1px solid #edf0f5; }
#filterDrawer .fd-sec { font-weight: 600; margin: 14px 0 6px; font-size: 13px; }
#filterDrawer .fd-sec:first-child { margin-top: 0; }
#filterDrawer .fd-opts { display: flex; flex-wrap: wrap; gap: 6px; }
#filterDrawer .fd-opt { border: 1px solid #dbe3ee; border-radius: 999px; padding: 4px 11px; font-size: 12.5px; cursor: pointer; background: #fff; }
#filterDrawer .fd-opt.on { background: #1664ff; border-color: #1664ff; color: #fff; }
select.mini-sel { max-width: 118px; padding: 3px 6px; font-size: 12.5px; }

.prof-chip{border:1px solid #d9dee4;background:#fff;color:#1f2329;border-radius:99px;padding:5px 12px;margin:2px 2px 2px 0;cursor:pointer;font-size:13px}
.prof-chip.on{background:#2f8cff;border-color:#2f8cff;color:#fff}

/* ===== 全站大厂设计系统 v2（2026-11-25）：统一圆角/阴影/间距/状态 ===== */
body{-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
::selection{background:#bcd7fb}
::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-thumb{background:#c9cdd4;border-radius:4px}::-webkit-scrollbar-track{background:transparent}
.btn{border-radius:8px;padding:9px 18px;font-weight:500;transition:all .15s}
.btn:hover{background:#0f53d6}
.btn:active{transform:scale(.98)}
.btn.secondary:hover{background:#f5f9ff;border-color:#1664ff;color:#1664ff}
.btn.danger:hover{background:#d92d20}
.btn.sm{padding:5px 12px;font-size:13px;border-radius:7px}
.btn:disabled{opacity:.55;cursor:not-allowed;transform:none}
.input,select.input,textarea.input{border-radius:8px;transition:border-color .15s,box-shadow .15s}
.input:focus,select.input:focus,textarea.input:focus{outline:none;border-color:#1664ff;box-shadow:0 0 0 3px rgba(22,100,255,.13)}
.card{border-radius:12px;padding:20px;box-shadow:0 1px 3px rgba(16,24,40,.06);border:1px solid #eef0f3}
.card h4{font-size:15px;font-weight:600}
.main section>h3:first-child,.mobile section>h3:first-child{font-size:17px;font-weight:600;margin:2px 0 14px;padding-left:10px;border-left:3.5px solid #1664ff;line-height:1.3}
table th{background:#f7f8fa;font-size:13px;padding:12px 10px;border-bottom:1px solid #e5e6eb}
table td{padding:12px 10px}
table tbody tr{transition:background .12s}
table tbody tr:hover{background:#f5f9ff}
.sidebar{width:224px;padding:16px 0}
.sidebar .logo{padding:2px 20px 14px;letter-spacing:.5px}
.sidebar a{margin:2px 12px;padding:10px 14px;border-radius:8px;transition:all .13s}
.sidebar a:hover{background:rgba(255,255,255,.09);color:#fff}
.sidebar a.active{background:#1664ff;color:#fff;box-shadow:0 2px 8px rgba(22,100,255,.35)}
.stat{border-radius:12px;box-shadow:0 1px 3px rgba(16,24,40,.06);border:1px solid #eef0f3}
.stat b{font-size:26px;font-weight:600}
.tag{border-radius:5px;padding:2px 8px;font-weight:500}
.tag.green{background:#e9f9ee;color:#00a854}.tag.orange{background:#fff3e5;color:#ff7d00}.tag.gray{background:#f2f3f5;color:#646a73}.tag.purple{background:#f0eafd;color:#7c5cd6}
.badge{display:inline-block;min-width:18px;height:18px;line-height:18px;text-align:center;background:#f53f3f;color:#fff;border-radius:99px;font-size:11px;padding:0 5px;font-weight:600}
.toolbar{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.pager-bar button,.pager-bar select{border:1px solid #dee0e3;background:#fff;border-radius:7px;padding:5px 10px}
/* PWA 底部导航：图标 + 文字（大厂范式） */
.tabbar{padding-bottom:env(safe-area-inset-bottom);box-shadow:0 -1px 8px rgba(16,24,40,.05);z-index:30}
.tabbar button{display:flex;flex-direction:column;align-items:center;gap:2px;padding:7px 4px 6px;font-size:11px}
.tabbar button::before{content:'';width:23px;height:23px;background-repeat:no-repeat;background-position:center;background-size:23px 23px}
.tabbar button[data-tab="tasks"]::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2386909c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 11l3 3L22 4'/%3E%3Cpath d='M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11'/%3E%3C/svg%3E")}
.tabbar button[data-tab="tasks"].active::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231664ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 11l3 3L22 4'/%3E%3Cpath d='M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11'/%3E%3C/svg%3E")}
.tabbar button[data-tab="customers"]::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2386909c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M23 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E")}
.tabbar button[data-tab="customers"].active::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231664ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M23 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E")}
.tabbar button[data-tab="stats"]::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2386909c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='20' x2='18' y2='10'/%3E%3Cline x1='12' y1='20' x2='12' y2='4'/%3E%3Cline x1='6' y1='20' x2='6' y2='14'/%3E%3C/svg%3E")}
.tabbar button[data-tab="stats"].active::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231664ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='20' x2='18' y2='10'/%3E%3Cline x1='12' y1='20' x2='12' y2='4'/%3E%3Cline x1='6' y1='20' x2='6' y2='14'/%3E%3C/svg%3E")}
.tabbar button[data-tab="me"]::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2386909c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E")}
.tabbar button[data-tab="me"].active::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231664ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E")}
.tabbar button.active{font-weight:600}
/* PWA 列表卡片 */
.mobile{max-width:560px;padding:14px;padding-bottom:86px}
.mobile .card{border-radius:14px;padding:16px;margin-bottom:12px}
.mobile .card:active{transform:scale(.995)}
#taskList .callbtn{display:inline-block;background:#e8f3ff;color:#1664ff;padding:6px 16px;font-size:13px;font-weight:600;border-radius:99px;margin:9px 0 0}
.task-overdue{border-left:4px solid #f53f3f}
.callbtn{border-radius:12px;font-weight:600;box-shadow:0 2px 8px rgba(0,180,42,.25)}
.outcome-grid button{border-radius:9px;padding:11px;transition:all .13s}
.outcome-grid button:active{border-color:#1664ff;background:#e8f3ff}

#pQ{flex:1 1 210px;max-width:380px}
.tbl-wrap{box-shadow:inset -14px 0 14px -14px rgba(16,24,40,.25)}
