/* ============ 基础 ============ */
:root{
  --navy:#12314f; --navy2:#1d4a74; --blue:#2f6fed; --blue-soft:#eaf1ff;
  --teal:#0e9384; --amber:#b77900; --red:#c0392b; --green:#2e7d4f;
  --ink:#1c2733; --ink2:#4b5b6b; --muted:#7c8b9a;
  --bg:#f4f6fa; --card:#fff; --line:#e3e8ef;
  --sh:0 1px 2px rgba(18,49,79,.05), 0 8px 24px rgba(18,49,79,.06);
  --radius:14px;
}
*{box-sizing:border-box}
html,body{height:100%}
body{margin:0;background:var(--bg);color:var(--ink);font-family:"Microsoft YaHei","PingFang SC","Hiragino Sans GB",system-ui,-apple-system,sans-serif;
  line-height:1.6;-webkit-font-smoothing:antialiased}
h1,h2,h3,h4{margin:0;font-weight:700}
a{color:var(--blue);text-decoration:none}
button{font-family:inherit}
.hidden{display:none !important}
.muted{color:var(--muted)}
svg{width:18px;height:18px;flex:0 0 auto}

/* ============ 登录 ============ */
.login{position:fixed;inset:0;z-index:100;display:flex;align-items:center;justify-content:center;padding:20px;
  background:radial-gradient(1200px 600px at 20% 0%,#2a6b9e 0%,#1d4a74 40%,#12314f 100%)}
.login:after{content:"";position:absolute;inset:0;background-image:radial-gradient(rgba(255,255,255,.08) 1px,transparent 1px);
  background-size:22px 22px;opacity:.5}
.login-card{position:relative;z-index:1;width:100%;max-width:390px;background:#fff;border-radius:20px;padding:34px 30px 26px;
  box-shadow:0 30px 80px rgba(6,24,42,.35)}
.login-card h1{font-size:24px;text-align:center;margin-top:14px}
.login-sub{text-align:center;color:var(--muted);font-size:13px;margin:6px 0 22px}
.brand-mark{width:38px;height:38px;border-radius:11px;background:linear-gradient(135deg,#2f6fed,#5b8def);color:#fff;
  display:flex;align-items:center;justify-content:center;flex:0 0 auto}
.brand-mark svg{width:21px;height:21px}
.brand-mark.lg{width:54px;height:54px;border-radius:15px;margin:0 auto}
.brand-mark.lg svg{width:28px;height:28px}
.login-tip{font-size:11.5px;color:var(--muted);text-align:center;margin:16px 0 0}
.login-err{color:var(--red);font-size:12.5px;text-align:center;min-height:18px;margin:8px 0 0}

.field{display:block;margin-bottom:13px}
.field>span{display:block;font-size:12px;color:var(--ink2);margin-bottom:5px}
.field input,.field select,.field textarea{width:100%;border:1px solid #d8e0ea;background:#fbfcfe;border-radius:9px;
  padding:9px 11px;font-size:14px;color:var(--ink);outline:none;transition:.15s}
.field input:focus,.field select:focus,.field textarea:focus{border-color:var(--blue);background:#fff;box-shadow:0 0 0 3px rgba(47,111,237,.12)}
.field textarea{min-height:74px;resize:vertical;line-height:1.6}

/* ============ 按钮 ============ */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;border:1px solid transparent;border-radius:9px;
  padding:8px 13px;font-size:13px;font-weight:600;cursor:pointer;background:#f1f4f8;color:var(--ink2);transition:.15s;white-space:nowrap}
.btn:hover{filter:brightness(.97)}
.btn.primary{background:var(--blue);color:#fff;box-shadow:0 4px 12px rgba(47,111,237,.25)}
.btn.primary:hover{background:#2560d8}
.btn.ghost{background:#fff;border-color:#dde4ed;color:var(--ink2)}
.btn.danger{background:#fdeceb;color:var(--red)}
.btn.sm{padding:5px 10px;font-size:12px;border-radius:7px}
.btn.block{width:100%;padding:11px;font-size:14px}
.btn svg{width:15px;height:15px}

/* ============ 侧栏 ============ */
.side{position:fixed;left:0;top:0;bottom:0;width:228px;background:#fff;border-right:1px solid var(--line);
  display:flex;flex-direction:column;padding:18px 14px;z-index:40}
.brand{display:flex;align-items:center;gap:10px;padding:4px 8px 18px}
.brand b{display:block;font-size:15px;color:var(--navy);line-height:1.3}
.brand span{font-size:11px;color:var(--muted);letter-spacing:.1em}
.nav{display:flex;flex-direction:column;gap:4px;flex:1}
.nav-item{display:flex;align-items:center;gap:10px;padding:9px 12px;border-radius:9px;color:var(--ink2);
  font-size:13.5px;cursor:pointer;border:none;background:none;text-align:left;width:100%}
.nav-item svg{color:#8a98a8}
.nav-item:hover{background:#f5f8fc}
.nav-item.active{background:var(--blue-soft);color:#1f4e91;font-weight:600}
.nav-item.active svg{color:var(--blue)}
.nav-badge{margin-left:auto;background:#fdeaea;color:var(--red);font-size:10.5px;font-weight:700;
  border-radius:999px;padding:1px 7px}
.side-foot{border-top:1px solid var(--line);padding-top:12px}
.user-chip{display:flex;align-items:center;gap:9px;margin-bottom:9px}
.avatar{width:32px;height:32px;border-radius:50%;background:#dfe8f5;color:#31557c;display:flex;align-items:center;
  justify-content:center;font-size:13px;font-weight:700;flex:0 0 auto}
.user-chip b{display:block;font-size:13px}
.user-chip i{font-style:normal;font-size:11px;color:var(--muted)}

/* ============ 主区 ============ */
.main{margin-left:228px;min-height:100vh;display:flex;flex-direction:column}
.topbar{position:sticky;top:0;z-index:30;height:66px;background:rgba(255,255,255,.92);backdrop-filter:blur(8px);
  border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 28px;gap:16px}
.tb-left{display:flex;align-items:baseline;gap:10px;min-width:0}
.tb-left h2{font-size:18px;color:var(--navy);white-space:nowrap}
.tb-sub{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tb-right{display:flex;align-items:center;gap:10px}
.search{display:flex;align-items:center;gap:7px;background:#f4f7fb;border:1px solid #e4eaf2;border-radius:9px;padding:6px 10px;width:230px}
.search svg{width:15px;height:15px;color:#93a1b1}
.search input{border:none;background:none;outline:none;font-size:13px;width:100%;color:var(--ink)}
.content{padding:22px 28px 40px;max-width:1460px;width:100%}

/* ============ 卡片 / 网格 ============ */
.card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--sh)}
.card-h{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:15px 18px 0}
.card-h h3{font-size:14px;color:var(--navy)}
.card-h .hint{font-size:11.5px;color:var(--muted)}
.card-b{padding:14px 18px 18px}
.grid-2{display:grid;grid-template-columns:1.35fr 1fr;gap:16px}
.grid-2.align-start{align-items:start}
.grid-3{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}
.stack{display:flex;flex-direction:column;gap:16px}
.mt16{margin-top:16px}

/* KPI */
.kpi-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:16px}
.kpi{position:relative;background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:16px 18px;
  box-shadow:var(--sh);overflow:hidden}
.kpi:after{content:"";position:absolute;right:-18px;top:-18px;width:74px;height:74px;border-radius:50%;background:var(--blue-soft);opacity:.65}
.kpi.red:after{background:#fdeaea}.kpi.green:after{background:#e4f4ea}.kpi.amber:after{background:#fff2d9}
.kpi .label{font-size:12px;color:var(--ink2);position:relative;z-index:1}
.kpi .num{font-size:30px;font-weight:700;color:var(--navy);line-height:1.25;margin-top:4px;position:relative;z-index:1}
.kpi .num small{font-size:12px;font-weight:400;color:var(--muted);margin-left:3px}
.kpi .foot{font-size:11.5px;color:var(--muted);position:relative;z-index:1;margin-top:2px}
.kpi.red .num{color:var(--red)}.kpi.green .num{color:var(--green)}

/* 漏斗 */
.funnel{display:flex;flex-direction:column;gap:8px}
.funnel-row{display:grid;grid-template-columns:88px 1fr 38px;align-items:center;gap:10px;font-size:12.5px}
.funnel-row .fl{color:var(--ink2);white-space:nowrap}
.funnel-bar{height:22px;background:#f2f5f9;border-radius:6px;overflow:hidden}
.funnel-bar i{display:block;height:100%;border-radius:6px;background:linear-gradient(90deg,#5b8def,#2f6fed)}
.funnel-row .fv{text-align:right;font-weight:700;color:var(--navy)}
.funnel-foot{margin-top:14px;padding-top:11px;border-top:1px solid #f0f3f7;font-size:12px;color:var(--muted)}
.use-list{display:grid;gap:10px}
.use{font-size:13px;color:var(--ink2);border-left:2px solid #dbe5f1;padding-left:11px;line-height:1.7}
.use b{color:var(--navy);margin-right:6px}

/* 产品条 */
.pbar{margin-bottom:11px}
.pbar .pl{display:flex;justify-content:space-between;font-size:12.5px;margin-bottom:4px}
.pbar .pl b{font-weight:600;color:var(--ink)}
.pbar .pl span{color:var(--muted)}
.pbar .track{height:10px;background:#f2f5f9;border-radius:999px;overflow:hidden;display:flex}
.pbar .track i{display:block;height:100%;background:var(--green)}
.pbar .track u{display:block;height:100%;background:#9cc4ff;text-decoration:none}

/* 负责人 */
.owner-table{width:100%;border-collapse:collapse;font-size:13px}
.owner-table th{font-size:11px;color:var(--muted);font-weight:600;text-align:right;padding:0 0 8px;border-bottom:1px solid var(--line)}
.owner-table th:first-child{text-align:left}
.owner-table td{padding:9px 0;border-bottom:1px solid #f2f5f9;text-align:right;color:var(--ink2)}
.owner-table td:first-child{text-align:left;color:var(--ink);font-weight:600}
.owner-table tr:last-child td{border-bottom:none}
.owner-table .od{color:var(--red);font-weight:700}

/* 超期清单 */
.od-list{display:flex;flex-direction:column;gap:9px}
.od-item{display:flex;align-items:center;gap:11px;padding:10px 12px;border:1px solid #f3dede;background:#fff7f7;border-radius:10px}
.od-item .days{flex:0 0 auto;width:44px;text-align:center;color:var(--red);font-weight:700;font-size:15px;line-height:1.1}
.od-item .days small{display:block;font-size:9.5px;font-weight:400;color:#b98282}
.od-item .info{min-width:0;flex:1}
.od-item .info b{display:block;font-size:13px;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.od-item .info span{font-size:11.5px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}
.od-item .who{font-size:11px;color:var(--ink2);background:#fff;border:1px solid var(--line);border-radius:999px;padding:1px 8px}
.empty{color:var(--muted);font-size:13px;padding:26px 0;text-align:center}

/* ============ 筛选 ============ */
.filters{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-bottom:14px}
.filters select,.filters input{border:1px solid #dde4ed;background:#fff;border-radius:8px;padding:7px 10px;font-size:12.5px;color:var(--ink2);outline:none}
.seg{display:inline-flex;background:#eef2f7;border-radius:9px;padding:3px}
.seg button{border:none;background:none;padding:5px 11px;border-radius:7px;font-size:12.5px;color:var(--ink2);cursor:pointer;white-space:nowrap}
.seg button.on{background:#fff;color:var(--navy);font-weight:600;box-shadow:0 1px 2px rgba(18,49,79,.1)}
.filters .spacer{flex:1}

/* ============ 表格 ============ */
.table-wrap{overflow:auto;border-radius:12px;border:1px solid var(--line);background:#fff}
table.rec{width:100%;border-collapse:collapse;font-size:13px;min-width:860px}
table.rec thead th{position:sticky;top:0;background:#f8fafc;color:var(--muted);font-size:11.5px;font-weight:600;
  text-align:left;padding:10px 12px;border-bottom:1px solid var(--line);white-space:nowrap;z-index:1}
table.rec tbody td{padding:11px 12px;border-bottom:1px solid #f2f5f9;vertical-align:middle;color:var(--ink2)}
table.rec tbody tr{cursor:pointer}
table.rec tbody tr:hover td{background:#f9fbfe}
table.rec tbody tr.is-overdue td{background:#fff7f7}
table.rec tbody tr.is-overdue:hover td{background:#fff1f1}
table.rec .c-cust{font-weight:600;color:var(--ink)}
table.rec .c-model{color:var(--ink);max-width:250px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
table.rec .c-action{max-width:240px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--muted);font-size:12.5px}
table.rec .c-date{font-variant-numeric:tabular-nums;white-space:nowrap}
table.rec .late{color:var(--red);font-weight:700}
table.rec .c-owner{white-space:nowrap}

/* 阶段标签 */
.pill{display:inline-block;font-size:11px;font-weight:600;border-radius:999px;padding:2px 9px;white-space:nowrap;line-height:1.7}
.pill[data-stage="待送样"]{background:#f1f5f9;color:#64748b}
.pill[data-stage="已送样"]{background:#e0f2fe;color:#0369a1}
.pill[data-stage="测试中"]{background:#fef3c7;color:#92400e}
.pill[data-stage="问题改善中"]{background:#ffedd5;color:#9a3412}
.pill[data-stage="待承认"]{background:#ede9fe;color:#5b21b6}
.pill[data-stage="已承认"]{background:#dbeafe;color:#1d4ed8}
.pill[data-stage="已报价"]{background:#e0e7ff;color:#3730a3}
.pill[data-stage="小批量"]{background:#ccfbf1;color:#0f766e}
.pill[data-stage="量产"]{background:#dcfce7;color:#166534}
.pill[data-stage="暂停"]{background:#e5e7eb;color:#4b5563}
.pill[data-stage="失败"]{background:#fee2e2;color:#991b1b}

/* 移动端卡片 */
.rec-cards{display:none}
.rcard{background:#fff;border:1px solid var(--line);border-radius:12px;padding:13px 14px;margin-bottom:10px;box-shadow:0 1px 2px rgba(18,49,79,.04)}
.rcard.late{border-color:#f3d3d3;background:#fffafa}
.rcard .r1{display:flex;align-items:center;justify-content:space-between;gap:8px}
.rcard .r1 b{font-size:14.5px}
.rcard .r2{font-size:12.5px;color:var(--muted);margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rcard .r3{display:flex;align-items:center;justify-content:space-between;margin-top:9px;font-size:12px;color:var(--ink2)}
.rcard .r3 .d{color:var(--muted)}
.rcard .r3 .d.late{color:var(--red);font-weight:700}

/* ============ 抽屉 ============ */
.mask{position:fixed;inset:0;background:rgba(11,25,40,.42);z-index:60;backdrop-filter:blur(1px)}
.drawer{position:fixed;top:0;right:0;bottom:0;width:540px;max-width:100%;background:#fff;z-index:70;
  box-shadow:-20px 0 60px rgba(11,25,40,.18);display:flex;flex-direction:column;transform:translateX(100%);
  transition:transform .22s ease}
.drawer.open{transform:none}
.drawer-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:18px 20px 14px;border-bottom:1px solid var(--line)}
.drawer-head h3{font-size:16px;color:var(--navy)}
.drawer-head .sub{font-size:12px;color:var(--muted);margin-top:2px}
.drawer-body{flex:1;overflow:auto;padding:16px 20px 20px}
.drawer-foot{display:flex;gap:9px;justify-content:flex-end;padding:12px 20px;border-top:1px solid var(--line);background:#fbfcfe}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 14px}
.form-grid .full{grid-column:1/-1}
.stage-picker{display:flex;flex-wrap:wrap;gap:6px;margin:2px 0 14px}
.stage-picker button{border:1px solid #dde4ed;background:#fff;border-radius:8px;padding:5px 10px;font-size:12px;color:var(--ink2);cursor:pointer}
.stage-picker button.on{border-color:var(--blue);background:var(--blue-soft);color:#1f4e91;font-weight:600}
.close{width:32px;height:32px;border-radius:8px;border:none;background:#f2f5f9;color:var(--ink2);cursor:pointer;font-size:18px;line-height:1}
.close:hover{background:#e8eef6}

/* ============ 空状态 / toast ============ */
.toast{position:fixed;left:50%;bottom:30px;transform:translateX(-50%);background:rgba(18,49,79,.94);color:#fff;
  font-size:13px;padding:9px 16px;border-radius:9px;z-index:200;box-shadow:0 8px 24px rgba(0,0,0,.2)}
.login .brand-mark{background:linear-gradient(135deg,#2f6fed,#5b8def)}

/* ============ 产品视图 ============ */
.back{display:inline-flex;align-items:center;gap:5px;border:none;background:none;color:#5b6b7c;font-size:13px;
  padding:4px 0;margin-bottom:10px;cursor:pointer}
.back svg{width:15px;height:15px}
.prod-list{display:flex;flex-direction:column;gap:4px}
.prod-list.two{display:grid;grid-template-columns:1fr 1fr;gap:0 26px}
.prod-row{display:grid;grid-template-columns:minmax(180px,1.1fr) minmax(120px,1.4fr) auto 52px;align-items:center;gap:12px;
  padding:10px 8px;border-radius:9px;cursor:pointer;border-bottom:1px solid #f4f7fa}
.prod-row:last-child{border-bottom:none}
.prod-row:hover{background:#f8fbff}
.pr-main b{display:block;font-size:13px;color:var(--ink);line-height:1.4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pr-main span{display:block;font-size:11px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pr-bar{height:8px;border-radius:999px;background:#f0f3f8;overflow:hidden;display:flex}
.pr-bar i{display:block;height:100%;background:#2e9e63}
.pr-bar u{display:block;height:100%;background:#7fb0ff;text-decoration:none}
.pr-bar em{display:block;height:100%;background:#e8edf5}
.pr-nums{display:flex;gap:8px;font-size:10.5px;color:var(--muted);white-space:nowrap}
.pr-nums .g{color:#2e7d4f}.pr-nums .b{color:#2f6fed}
.pr-cover{text-align:right;font-size:12px;font-weight:700;color:var(--navy)}
.prod-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(270px,1fr));gap:14px}
.pcard{background:#fff;border:1px solid var(--line);border-radius:13px;padding:16px 17px;box-shadow:var(--sh);cursor:pointer;transition:.15s}
.pcard:hover{border-color:#bcd3f5;transform:translateY(-1px);box-shadow:0 10px 26px rgba(18,49,79,.10)}
.pcard-top{display:flex;justify-content:space-between;align-items:flex-start;gap:8px}
.pcard-top b{display:block;font-size:14.5px;color:var(--navy);line-height:1.4}
.pcard-top span{display:block;font-size:11.5px;color:var(--muted);margin-top:2px}
.pcard-spec{font-size:12px;color:var(--ink2);margin:9px 0 10px;min-height:18px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pcard-bar{height:7px;border-radius:999px;background:#f0f3f8;overflow:hidden;display:flex;margin-bottom:8px}
.pcard-bar i{display:block;height:100%;background:#2e9e63}
.pcard-bar u{display:block;height:100%;background:#7fb0ff;text-decoration:none}
.pcard-nums{display:flex;gap:9px;font-size:11px;color:var(--muted)}
.pcard-nums .g{color:#2e7d4f;font-weight:600}.pcard-nums .b{color:#2f6fed;font-weight:600}
.cert{display:inline-block;font-style:normal;font-size:10.5px;background:#eef7f1;color:#1f6b40;border:1px solid #cfe8d9;
  border-radius:6px;padding:1px 7px;white-space:nowrap}
.detail-head{display:flex;justify-content:space-between;gap:18px;align-items:flex-start;padding:20px 22px}
.dh-main h2{font-size:21px;color:var(--navy);line-height:1.35}
.dh-sub{font-size:13px;color:var(--ink2);margin-top:3px}
.dh-feat{font-size:13px;color:var(--ink2);margin:10px 0 0;line-height:1.7;max-width:760px}
.dh-note{font-size:12px;color:var(--muted);margin:6px 0 0}
.dh-right{display:flex;flex-direction:column;align-items:flex-end;gap:9px;flex:0 0 auto}
.kpi-grid.kpi-4{grid-template-columns:repeat(4,1fr)}
.pill-none{background:#f1f5f9;color:#7c8b9a}
.pill-on{background:#dcfce7;color:#166534}

/* 批量登记 */
.batch-tools{display:flex;gap:7px;margin-bottom:9px;flex-wrap:wrap}
.batch-tools input{flex:1;min-width:110px;border:1px solid #dde4ed;border-radius:8px;padding:6px 10px;font-size:12.5px;outline:none}
.checklist{border:1px solid var(--line);border-radius:10px;max-height:250px;overflow:auto;margin-bottom:14px;background:#fbfcfe}
.check-row{display:flex;align-items:center;gap:9px;padding:8px 12px;border-bottom:1px solid #f1f4f8;cursor:pointer;font-size:13px}
.check-row:last-child{border-bottom:none}
.check-row:hover{background:#f6f9fe}
.check-row input{width:15px;height:15px;accent-color:var(--blue);flex:0 0 auto}
.check-row .cn{flex:1;color:var(--ink)}
.check-row .cs{font-size:11px;color:var(--muted);white-space:nowrap}
.check-row.has .cs{color:#2f6fed}
.batch-count{margin-right:auto;font-size:12px;color:var(--muted)}


/* ============ 问题分组 ============ */
.grp-list{display:flex;flex-direction:column;gap:10px}
.grp{background:#fff;border:1px solid var(--line);border-radius:12px;overflow:hidden;box-shadow:var(--sh)}
.grp-head{display:flex;align-items:center;gap:12px;padding:13px 16px;cursor:pointer}
.grp-head:hover{background:#f8fbff}
.g-main{flex:1;min-width:0}
.g-main b{display:block;font-size:14px;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.5}
.g-main span{font-size:11.5px;color:var(--muted)}
.g-stats{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}
.schip{font-style:normal;font-size:10.5px;padding:2px 8px;border-radius:999px;white-space:nowrap;font-weight:600}
.s-0{background:#fef3c7;color:#92400e}
.s-1{background:#ffedd5;color:#9a3412}
.s-2{background:#dcfce7;color:#166534}
.s-3{background:#fee2e2;color:#991b1b}
.grp-arrow{color:#9aa6b4;font-size:18px;line-height:1;transition:.15s;flex:0 0 auto}
.grp.open .grp-arrow{transform:rotate(90deg)}
.grp-body{border-top:1px solid #f0f3f7;padding:2px 0}
.irow{display:flex;align-items:center;gap:10px;padding:9px 16px;border-bottom:1px solid #f6f8fb;cursor:pointer;font-size:12.5px}
.irow:last-child{border-bottom:none}
.irow:hover{background:#f9fbfe}
.itag{font-size:10.5px;background:#eef3fa;color:#3d5a7a;border-radius:5px;padding:1px 6px;white-space:nowrap;max-width:170px;overflow:hidden;text-overflow:ellipsis}
.icat{font-size:11px;color:#7c8b9a;white-space:nowrap;min-width:64px}
.idesc{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ink2)}
.istat{flex:0 0 auto}
.iown{font-size:11px;color:var(--muted);min-width:38px;text-align:right}
.ibadge{display:inline-block;font-size:10.5px;font-weight:600;padding:2px 8px;border-radius:999px;white-space:nowrap;cursor:pointer;line-height:1.7}
.ibadge.open{background:#fff2d9;color:#8a5a00}
.ibadge.done{background:#e4f4ea;color:#1f6b40}
.ibadge:hover{filter:brightness(.96)}
.ibtn{margin-left:6px;border:none;background:#eef3fa;color:#2f6fed;font-size:10.5px;font-weight:600;padding:2px 7px;border-radius:6px;cursor:pointer;line-height:1.7}
.ibtn:hover{background:#e2ecff}
.grp-close{flex:0 0 auto;margin-right:2px}
.grp.flash{box-shadow:0 0 0 3px rgba(47,111,237,.28)}

/* ============ 跟进台 ============ */
.follow-kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:14px}
.fk{background:#fff;border:1px solid var(--line);border-radius:11px;padding:12px 15px;text-align:left;box-shadow:var(--sh);cursor:pointer;transition:.15s}
.fk:hover{border-color:#bcd3f5;transform:translateY(-1px)}
.fk b{display:block;font-size:24px;color:var(--navy);line-height:1.25}
.fk span{font-size:12px;color:var(--muted)}
.fk.red b{color:var(--red)}
.fk.amber b{color:#8a5a00}
.fk.blue b{color:var(--blue)}
table.rec.follow{min-width:1020px}
.bhead td{background:#f7fafc;font-size:12px;font-weight:600;color:var(--ink2);padding:8px 12px;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.bdot{display:inline-block;width:7px;height:7px;border-radius:50%;margin-right:6px;vertical-align:middle}
.bdot.red{background:#d9534f}
.bdot.amber{background:#d9a400}
.bdot.blue{background:#2f6fed}
.bdot.gray{background:#9aa6b4}
.bdot.green{background:#2e9e63}
.bucket-title{font-size:12.5px;font-weight:600;color:var(--ink2);margin:15px 2px 8px}
.bucket-title b{color:var(--navy);margin-left:4px}
.done-toggle{text-align:center;margin-top:16px}

/* ============ 批量粘贴 ============ */
.mode-tabs{display:inline-flex;background:#eef2f7;border-radius:9px;padding:3px;margin-bottom:14px}
.mode-tabs button{border:none;background:none;padding:5px 14px;border-radius:7px;font-size:12.5px;color:var(--ink2);cursor:pointer}
.mode-tabs button.on{background:#fff;color:var(--navy);font-weight:600;box-shadow:0 1px 2px rgba(18,49,79,.1)}
.bulk-preview{font-size:12px;color:var(--muted);background:#fbfcfe;border:1px dashed #dbe5f1;border-radius:8px;padding:8px 11px;margin-top:10px;line-height:1.7}
.bulk-preview b{color:var(--navy)}

/* ============ 跟进记录 ============ */
.fu-cell{display:flex;flex-direction:column;gap:1px;max-width:250px;min-width:0;cursor:pointer}
.fu-date{font-size:10.5px;color:var(--muted)}
.fu-note{font-size:12.5px;color:var(--ink2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fu-cell:hover .fu-note{color:var(--blue)}
.fu-add{color:var(--blue);font-size:12px;cursor:pointer;white-space:nowrap}
.fu-form{background:#fbfcfe;border:1px solid var(--line);border-radius:10px;padding:12px 12px 10px;margin-bottom:16px}
.fu-form .btn{width:100%}
.fu-history h4{font-size:12px;color:var(--muted);margin:0 0 8px;font-weight:600}
.fu-item{border-left:2px solid #dfe7f0;padding:2px 0 12px 12px;position:relative}
.fu-item:before{content:"";position:absolute;left:-5px;top:6px;width:8px;height:8px;border-radius:50%;background:#7fb0ff}
.fu-ihead{display:flex;gap:8px;align-items:center;font-size:11.5px;color:var(--muted)}
.fu-ihead b{color:var(--navy);font-size:12px}
.fu-ihead span{flex:1}
.fu-del{border:none;background:none;color:#b9c3cf;font-size:11px;cursor:pointer}
.fu-del:hover{color:var(--red)}
.fu-item p{margin:4px 0 0;font-size:13px;color:var(--ink2);line-height:1.7;white-space:pre-wrap}

/* ============ 访客只读 ============ */
body.guest-mode #addBtn,
body.guest-mode #fab,
body.guest-mode #addProductBtn,
body.guest-mode #editProductBtn,
body.guest-mode #addIssueBtn,
body.guest-mode #exportBtn,
body.guest-mode [data-batch],
body.guest-mode [data-close-product],
body.guest-mode [data-close-ci],
body.guest-mode [data-close-group],
body.guest-mode .fu-add,
body.guest-mode .ibtn,
body.guest-mode .done-toggle { display: none !important; }
.ro-row{display:grid;grid-template-columns:92px 1fr;gap:10px;padding:9px 0;border-bottom:1px solid #f2f5f9;font-size:13px;line-height:1.7}
.ro-row b{color:var(--muted);font-weight:400}
.ro-row span{color:var(--ink2);white-space:pre-wrap}
.ro-sub{margin:18px 0 6px;font-size:12px;color:var(--muted);font-weight:600}

.ochip{display:inline-block;background:#eef4ff;color:#2f6fed;border-radius:6px;padding:1px 7px;font-size:11.5px;margin:0 4px 2px 0;white-space:nowrap}

.linkbtn{border:none;background:none;color:#2f6fed;font-size:12.5px;cursor:pointer;padding:0;font-weight:500}
.linkbtn:hover{text-decoration:underline}
.cust-prod-row{display:flex;align-items:center;gap:10px;padding:11px 0;border-bottom:1px solid #f0f4f9}
.cust-prod-row:last-child{border-bottom:none}
.cust-prod-row .pr-main{flex:1;display:flex;flex-direction:column;gap:2px;min-width:0}
.cust-prod-row .pr-main b{font-size:13px;color:var(--navy)}
.cust-prod-row .pr-main span{font-size:11.5px;color:var(--muted)}

.mnav,.fab{display:none}
@media (max-width: 900px){
  .side{display:none}
  .main{margin-left:0}
  .topbar{height:58px;padding:0 14px}
  .tb-left h2{font-size:16px}
  .tb-sub{display:none}
  .search{display:none}
  .tb-right #addBtn{display:none}
  .content{padding:14px 14px 84px}
  .kpi-grid{grid-template-columns:1fr 1fr;gap:10px}
  .kpi{padding:13px 14px}
  .kpi .num{font-size:24px}
  .grid-2,.grid-3{grid-template-columns:1fr}
  .card-h{padding:13px 14px 0}
  .card-b{padding:12px 14px 15px}
  .table-wrap{display:none}
  .rec-cards{display:block}
  .filters{gap:6px}
  .filters .seg{flex:0 0 100%}
  .filters .seg button{flex:1}
  .filters select{flex:1 1 0;min-width:0}
  .filters .spacer{display:none}
  .filters .muted{flex:1 1 100%;text-align:right}
  #exportBtn{display:none}
  .content{padding-bottom:96px}
  .mnav{display:flex;position:fixed;left:0;right:0;bottom:0;z-index:50;background:rgba(255,255,255,.96);
    border-top:1px solid var(--line);padding:6px 4px calc(6px + env(safe-area-inset-bottom));backdrop-filter:blur(10px)}
  .mnav button{flex:1;border:none;background:none;display:flex;flex-direction:column;align-items:center;gap:2px;
    font-size:10.5px;color:#9aa7b5;padding:4px 0;cursor:pointer}
  .mnav button svg{width:20px;height:20px}
  .mnav button.on{color:var(--blue)}
  .fab{display:flex;position:fixed;right:18px;bottom:76px;z-index:55;width:52px;height:52px;border-radius:50%;
    border:none;background:var(--blue);color:#fff;align-items:center;justify-content:center;box-shadow:0 8px 22px rgba(47,111,237,.4);cursor:pointer}
  .fab svg{width:24px;height:24px}
  .drawer{width:100%;top:auto;height:92vh;border-radius:18px 18px 0 0;transform:translateY(100%)}
  .drawer.open{transform:none}
  .drawer-head{padding:14px 16px 10px}
  .drawer-body{padding:12px 16px 16px}
  .drawer-foot{padding:10px 16px calc(10px + env(safe-area-inset-bottom))}
  .form-grid{grid-template-columns:1fr}
  .prod-row{grid-template-columns:1fr auto;gap:5px 10px}
  .pr-bar{grid-column:1/-1;order:3}
  .pr-nums{grid-column:1/-1;order:4;font-size:10px}
  .pr-cover{order:2}
  .prod-grid{grid-template-columns:1fr}
  .prod-list.two{grid-template-columns:1fr;gap:0}
  .kpi-grid.kpi-4{grid-template-columns:1fr 1fr}
  .detail-head{flex-direction:column}
  .dh-right{flex-direction:row;align-items:center;width:100%;justify-content:space-between}
  .grp-head{flex-wrap:wrap;gap:8px}
  .follow-kpis{grid-template-columns:1fr 1fr}
  .fk{padding:10px 12px}
  .fk b{font-size:21px}
  .g-stats{order:3;width:100%;justify-content:flex-start}
  .irow{flex-wrap:wrap;gap:6px 8px}
  .idesc{flex-basis:100%;order:5;white-space:normal}
  .iown{display:none}
  .login-card{padding:28px 22px 22px}
}
@media (min-width: 901px){
  .grp.single .istat{display:none}
}
