:root{
  --blue:#1577c9; --blue-d:#0e5fa3; --teal:#0a9b9b; --ink:#1f2d3d; --mut:#6b7c8f;
  --bg:#f4f7fa; --card:#fff; --line:#e3e9f0; --ok:#1f9d55; --warn:#e0812b; --bad:#d64545;
  --purple:#7a5af8; --crimson:#c94f7c; --indigo:#4f63d2;
}
*{box-sizing:border-box}
body{margin:0;font-family:-apple-system,"Microsoft YaHei",Segoe UI,sans-serif;background:var(--bg);color:var(--ink);font-size:14px}
header{background:linear-gradient(90deg,var(--blue),var(--teal));color:#fff;padding:10px 18px;display:flex;align-items:center;justify-content:space-between}
header h1{font-size:17px;margin:0;font-weight:600;letter-spacing:1px}
header .me{font-size:13px;display:flex;align-items:center;gap:10px}
header .me button{background:rgba(255,255,255,.2);border:0;color:#fff;padding:4px 10px;border-radius:6px;cursor:pointer}
.layout{display:flex;min-height:calc(100vh - 48px)}
nav{width:172px;background:var(--card);border-right:1px solid var(--line);padding:8px 0;flex-shrink:0}
nav a{display:block;padding:9px 16px;color:var(--ink);text-decoration:none;cursor:pointer;border-left:3px solid transparent;font-size:13.5px}
nav a:hover{background:#eef4fb}
nav a.active{background:#eaf3fc;border-left-color:var(--blue);color:var(--blue-d);font-weight:600}
main{flex:1;padding:16px 20px;overflow:auto}
.card{background:var(--card);border:1px solid var(--line);border-radius:10px;padding:14px 16px;margin-bottom:14px;box-shadow:0 1px 3px rgba(20,50,90,.04)}
h2{font-size:15px;margin:0 0 12px;color:var(--blue-d)}
h3{font-size:13.5px;margin:14px 0 8px;color:var(--mut)}
.row{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.kpi{background:var(--card);border:1px solid var(--line);border-radius:10px;padding:14px 16px;min-width:140px;flex:1}
.kpi .v{font-size:22px;font-weight:700;color:var(--blue-d)}
.kpi .l{font-size:12px;color:var(--mut);margin-top:3px}
table{width:100%;border-collapse:collapse;font-size:13px}
th,td{padding:8px 10px;border-bottom:1px solid var(--line);text-align:left}
th{background:#f0f5fa;color:var(--mut);font-weight:600}
tr:hover td{background:#fafcff}
.badge{padding:2px 8px;border-radius:20px;font-size:12px}
.b-new{background:#e8f1fb;color:#1577c9}.b-wait{background:#fff3e0;color:#e0812b}
.b-ship{background:#e6f6f1;color:#0a9b9b}.b-done{background:#e7f6ec;color:#1f9d55}
.tag-warn{background:#fdecea;color:#d64545}
button{font-family:inherit;cursor:pointer;border:0;border-radius:7px;padding:7px 14px;background:var(--blue);color:#fff;font-size:13px}
button.ghost{background:#eef2f7;color:var(--ink)}
button.teal{background:var(--teal)}
button:disabled{opacity:.5;cursor:not-allowed}
input,select,textarea{padding:7px 10px;border:1px solid var(--line);border-radius:7px;font-family:inherit;font-size:13px;width:100%}
label{font-size:12px;color:var(--mut);display:block;margin:8px 0 3px}
.modal{position:fixed;inset:0;background:rgba(20,40,70,.4);display:flex;align-items:center;justify-content:center;z-index:50}
.modal .box{background:#fff;border-radius:12px;padding:20px 22px;width:420px;max-width:92vw;max-height:90vh;overflow:auto}
.login{height:100vh;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#1577c9,#0a9b9b)}
.login .panel{background:#fff;border-radius:14px;padding:28px 30px;width:340px;box-shadow:0 10px 40px rgba(0,0,0,.15)}
.login .panel h2{text-align:center;color:var(--blue-d);margin-bottom:6px}
.login .hint{font-size:12px;color:var(--mut);text-align:center;margin:4px 0 16px}
.login .quick{font-size:12px;color:var(--mut);margin-top:12px;line-height:1.7}
.confirm{background:#fff8ec;border:1px solid #f3d9a6;border-radius:8px;padding:12px 14px;margin:10px 0}
.confirm .big{font-size:15px;font-weight:600}
.muted{color:var(--mut)}
.small{font-size:12px}
.pill{display:inline-block;background:#eef2f7;padding:1px 8px;border-radius:6px;font-size:12px}
.ok{color:var(--ok)}.na{color:var(--mut)}
.matrix td,.matrix th{text-align:center;padding:5px 6px}
.matrix td:first-child,.matrix th:first-child{text-align:left}

/* ═══════════════ 手机端（≤760px）═══════════════ */
.home-cards{display:none}
.tabbar{display:none}
.mlist{display:none}
.mic-wrap{display:none}
.backbar{display:none}

@media (max-width:760px){
  /* 隐藏桌面端左侧栏 */
  .layout{display:block;min-height:auto}
  nav{display:none}
  header{padding:12px 16px;padding-top:calc(12px + env(safe-area-inset-top,0px))}
  header h1{font-size:16px}
  main{padding:12px 14px 92px}
  .card{padding:12px 14px;border-radius:14px;margin-bottom:12px}
  h2{font-size:16px}
  table{font-size:12.5px}
  th,td{padding:7px 8px}
  .row{gap:8px}
  .kpi{min-width:calc(50% - 4px);padding:12px 14px}
  .kpi .v{font-size:19px}
  input,select,textarea{padding:9px 11px;font-size:15px} /* 防 iOS 聚焦缩放 */
  label{font-size:12.5px;margin:10px 0 4px}
  button{padding:9px 15px;font-size:14px}
  .modal{align-items:flex-end}
  .modal .box{width:100%;max-width:100%;border-radius:18px 18px 0 0;padding:20px 20px calc(20px + env(safe-area-inset-bottom,0px));max-height:88vh;overflow:auto}

  /* 桌面表格在手机上转成卡片列表 */
  .dframe{display:none}
  .mlist{display:block}

  /* 底部标签栏 */
  .tabbar{display:flex;position:fixed;left:0;right:0;bottom:0;z-index:40;
    background:#fff;border-top:1px solid var(--line);
    padding:6px 4px calc(6px + env(safe-area-inset-bottom,0px));
    box-shadow:0 -2px 12px rgba(20,50,90,.06)}
  .tabbar a{flex:1;text-align:center;padding:6px 2px;font-size:11.5px;color:var(--mut);
    text-decoration:none;cursor:pointer;border-radius:10px;line-height:1.35}
  .tabbar a .ico{display:block;font-size:19px;line-height:1.25}
  .tabbar a.active{color:var(--blue);background:#eef5fd;font-weight:600}

  /* 首页卡片入口 */
  .home-cards{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:12px}
  .hcard{background:#fff;border:1px solid var(--line);border-radius:16px;padding:18px 16px;
    cursor:pointer;box-shadow:0 1px 3px rgba(20,50,90,.05);position:relative;overflow:hidden}
  .hcard:active{transform:scale(.98)}
  .hcard .hi{font-size:26px;line-height:1}
  .hcard .hn{font-size:16px;font-weight:600;margin-top:10px;color:var(--ink)}
  .hcard .hs{font-size:11.5px;color:var(--mut);margin-top:3px}
  .hcard .hbar{position:absolute;left:0;top:0;bottom:0;width:4px}
  .hb-blue .hbar{background:var(--blue)} .hb-teal .hbar{background:var(--teal)}
  .hb-warn .hbar{background:var(--warn)} .hb-ok .hbar{background:var(--ok)}
  .hb-purple .hbar{background:var(--purple)}
  .hb-crimson .hbar{background:var(--crimson)}
  .hb-indigo .hbar{background:var(--indigo)}

  /* 竖屏物料卡片 */
  .mcard{background:#fff;border:1px solid var(--line);border-radius:14px;padding:12px 14px;margin-bottom:9px;
    display:flex;align-items:center;justify-content:space-between;gap:10px}
  .mcard .mmain{flex:1;min-width:0}
  .mcard .mname{font-size:15px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .mcard .msub{font-size:11.5px;color:var(--mut);margin-top:2px}
  .mcard .mnum{text-align:right;flex-shrink:0}
  .mcard .mqty{font-size:19px;font-weight:700;font-variant-numeric:tabular-nums;line-height:1.1}
  .mcard .munit{font-size:11px;color:var(--mut)}
  .dot{display:inline-block;width:8px;height:8px;border-radius:50%;margin-right:5px;vertical-align:middle}
  .dot-g{background:var(--ok)} .dot-y{background:var(--warn)} .dot-r{background:var(--bad)}

  /* 大录音按钮 */
  .mic-wrap{display:block;text-align:center;padding:18px 0 10px}
  .mic-btn{width:118px;height:118px;border-radius:50%;border:0;margin:0 auto;display:flex;
    align-items:center;justify-content:center;flex-direction:column;gap:2px;
    background:linear-gradient(150deg,var(--blue),var(--teal));color:#fff;
    font-size:13px;font-weight:600;box-shadow:0 8px 24px rgba(21,119,201,.35);cursor:pointer}
  .mic-btn:active{transform:scale(.96)}
  .mic-btn .mi{font-size:34px;line-height:1}
  .mic-hint{font-size:12px;color:var(--mut);margin-top:10px}

  /* 返回条 */
  .backbar{display:flex;align-items:center;gap:8px;margin-bottom:10px}
  .backbar .bk{border:0;background:#eef2f7;color:var(--ink);padding:7px 12px;border-radius:9px;font-size:13.5px}

  /* 预警条 */
  .alertbar{background:#fff8ec;border:1px solid #f3d9a6;border-radius:12px;padding:11px 14px;margin-bottom:12px;font-size:13px}
  .alertbar b{color:#c96a12}
  .alertbar .al-i{color:#c96a12;font-size:12px;line-height:1.7}
}
@media (min-width:761px){
  .home-cards{display:none!important}
  .tabbar{display:none!important}
  .mlist{display:none!important}
  .mic-wrap{display:none!important}
  .backbar{display:none!important}
  .alertbar{display:block}
}

/* ═══════════════ 四模块改造新增组件 ═══════════════ */
/* 库存阶段标签（手机+电脑通用） */
.stage-tag{display:inline-block;font-size:10.5px;line-height:1;padding:3px 7px 2px;border-radius:5px;margin-left:5px;vertical-align:middle;white-space:nowrap}
.stg-raw{background:#f5eddc;color:#8a6116}
.stg-half{background:#fdeee0;color:#b06218}
.stg-done{background:#e6f1fb;color:#1577c9}

/* 六分块快捷入口（手机） */
.sixgrid{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin:14px 0 6px}
.sixbtn{background:#fff;border:1px solid var(--line);border-radius:13px;padding:13px 8px;text-align:center;cursor:pointer;box-shadow:0 1px 2px rgba(20,50,90,.04)}
.sixbtn:active{transform:scale(.97)}
.sixbtn .si{font-size:19px;line-height:1.1}
.sixbtn .sn{font-size:13.5px;font-weight:600;margin-top:4px}
.sixbtn.sin .sn{color:var(--ok)}
.sixbtn.sout .sn{color:var(--warn)}

/* 样品页：统计行 / 搜索 / 双按钮 / 客户卡 / 时间轴 */
.stat-row{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-bottom:12px}
.stat-cell{background:#fff;border:1px solid var(--line);border-radius:12px;padding:11px 4px;text-align:center}
.stat-cell .sv{font-size:19px;font-weight:700;color:var(--blue-d);font-variant-numeric:tabular-nums}
.stat-cell .sl{font-size:11px;color:var(--mut);margin-top:2px}
.searchbar{width:100%;padding:10px 13px;border-radius:11px;border:1px solid var(--line);font-size:15px;margin-bottom:10px;background:#fff}
.btn2grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:12px}
.btn2grid button{padding:12px 8px;font-size:14.5px;border-radius:11px}
.btn3grid{display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px;margin-bottom:12px}
.btn3grid button{padding:12px 4px;font-size:13.5px;border-radius:11px;white-space:nowrap}
.ccard{background:#fff;border:1px solid var(--line);border-radius:13px;margin-bottom:10px;overflow:hidden}
.ccard summary{padding:12px 14px;list-style:none;display:flex;justify-content:space-between;align-items:center;gap:10px;cursor:pointer}
.ccard summary::-webkit-details-marker{display:none}
.ccard .cn{font-size:15px;font-weight:600}
.ccard .cs{font-size:11.5px;color:var(--mut);text-align:right;line-height:1.5}
.timeline{border-top:1px solid var(--line);padding:6px 14px 10px;max-height:320px;overflow:auto}
.tl-item{padding:9px 0;border-bottom:1px dashed var(--line);font-size:13.5px;line-height:1.6}
.tl-item:last-child{border-bottom:0}
.tl-item.tl-s{color:var(--mut);font-size:12.5px}
.tl-date{color:var(--mut);font-size:11.5px;margin-right:4px}
.tag-voice{background:#e6f6f1;color:#0a9b9b;font-size:10.5px;padding:2px 7px 1px;border-radius:5px;margin-left:6px;vertical-align:middle}
.cbtns{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:10px 14px calc(12px + env(safe-area-inset-bottom,0px));border-top:1px solid var(--line)}
.cbtns button{width:100%}
button.sm{padding:4px 10px;font-size:12px;border-radius:6px}
@media (min-width:761px){
  .sixgrid{grid-template-columns:repeat(6,1fr)}
  .stat-row{grid-template-columns:repeat(4,1fr)}
  .btn2grid{grid-template-columns:1fr 1fr;max-width:420px}
}

/* ═══════════════ 样品审批流（提交 → 库管发货）═══════════════ */
.b-off{background:#eef2f7;color:#6b7c8f}.b-warn{background:#fdecec;color:#c0392b}
.filechip-del{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;margin-left:-2px;border-radius:50%;background:#fdecec;color:#c0392b;font-size:11px;line-height:1;text-decoration:none;vertical-align:middle}
.filechip-del:active{background:#c0392b;color:#fff}
.stat-cell .sv.sv-warn{color:var(--warn)}
.stat-cell .sv.sv-ok{color:var(--ok)}
/* 状态筛选胶囊 */
.chips{display:flex;gap:8px;overflow-x:auto;padding:2px 0 10px;-webkit-overflow-scrolling:touch}
.chip{flex:0 0 auto;background:#fff;border:1px solid var(--line);border-radius:20px;padding:6px 13px;font-size:12.5px;color:var(--mut);cursor:pointer;white-space:nowrap}
.chip.on{background:var(--blue);border-color:var(--blue);color:#fff;font-weight:600}
/* 明细行（多行产品录入） */
.row.line{padding:2px 0}
.row.line select{min-width:0}
.row.line .l_qty{text-align:center}
/* 主操作按钮占整行（如「发货」） */
.cbtns button.teal{grid-column:span 2}
@media (max-width:760px){
  .ccard summary{padding:13px 14px}
  .timeline{max-height:260px}
}

/* ═══════════════ 发货 / 留档 / 搜索增强 ═══════════════ */
.toast{position:fixed;left:50%;bottom:calc(84px + env(safe-area-inset-bottom,0px));transform:translateX(-50%);
  background:rgba(31,45,61,.94);color:#fff;font-size:13.5px;padding:10px 16px;border-radius:22px;
  z-index:99;max-width:86vw;text-align:center;box-shadow:0 6px 20px rgba(0,0,0,.2);transition:opacity .3s;pointer-events:none}
/* 地址 + 一键复制 */
.addrbox{background:#f7fafd;border:1px solid var(--line);border-radius:9px;padding:9px 11px;margin-top:8px}
.copyrow{display:flex;gap:8px;margin-top:7px;flex-wrap:wrap}
.copyrow button{padding:5px 11px;font-size:12px}
/* 附件预览（全局 64px 缩略图：卡片和话术库表格里都用） */
.fileprev{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}
.thumb{width:64px;height:64px;object-fit:cover;border-radius:8px;border:1px solid var(--line)}
/* 附件列表 */
.filelist{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}
.filechip{display:inline-block;background:#eef5fd;color:#1577c9;text-decoration:none;
  font-size:12px;padding:4px 9px;border-radius:7px;border:1px solid #d6e6f7;max-width:100%;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* 话术库：搜索框 / 表格列宽 / 关键词高亮 */
.sc-q{flex:1;min-width:220px;width:auto}
table.sctab th{white-space:nowrap}
table.sctab td{vertical-align:top}
mark{background:#ffe9a8;color:inherit;padding:0 1px;border-radius:2px}
/* 客户选择 */
.cpick{max-height:52vh;overflow:auto;border:1px solid var(--line);border-radius:9px;margin-top:8px}.cpitem{padding:11px 13px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;
  align-items:center;gap:10px;cursor:pointer;font-size:14px}
.cpitem:last-child{border-bottom:0}
.cpitem:active{background:#eef5fd}
/* 选产品选择器（页面内，带返回键） */
#pk_list{border:1px solid var(--line);border-radius:9px;overflow:auto;max-height:56vh}
.pkitem{padding:13px 14px;border-bottom:1px solid var(--line);cursor:pointer;font-size:14.5px}
.pkitem:last-child{border-bottom:0}
.pkitem:active{background:#eef5fd}
.pkitem.on{background:#e8f6f6;color:#0a7d7d;font-weight:600;border-left:3px solid #0a9b9b}
.pk-sec{margin:10px 0 4px}
.pk-t{font-size:12.5px;color:var(--muted);margin:0 0 6px;display:flex;align-items:center;gap:6px}
.pk-no{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:50%;background:#eef2f7;color:#5a6b7d;font-size:11px;font-weight:600}
.pk-items{border:1px solid var(--line);border-radius:10px;overflow:hidden}  /* 不再限高内滚：整页里一组全铺开，页面自己滚 */
.pk-result{margin-top:12px;padding:10px 12px;border-radius:10px;background:#f4fbfa;border:1px solid #cdeceb}
/* 选产品整页（不挤弹窗） */
body.pp-lock{overflow:hidden}
.pickpage{position:fixed;inset:0;z-index:90;background:var(--bg);display:flex;flex-direction:column}
.pp-bar{display:flex;align-items:center;gap:10px;padding:9px 12px;background:#fff;border-bottom:1px solid var(--line);flex-shrink:0}
.pp-bar b{font-size:15px}
/* 电脑上整页浮层收成一列，别拉满 1440 宽 */
@media(min-width:761px){
  .pickpage.cvpage>.pp-bar,.pickpage.cvpage>.pp-body,.pickpage.cvpage>.pp-foot{max-width:880px;margin-left:auto;margin-right:auto;width:100%}
  .pickpage.cvpage>.pp-bar,.pickpage.cvpage>.pp-foot{border-left:1px solid var(--line);border-right:1px solid var(--line)}
  .pickpage.cvpage>.pp-body{border-left:1px solid var(--line);border-right:1px solid var(--line);background:#fff}
}
.pp-q{padding:8px 12px;background:#fff;border-bottom:1px solid var(--line);flex-shrink:0}
.pp-q .searchbar{margin:0}
.pp-sum{display:flex;flex-wrap:wrap;gap:6px;padding:8px 12px;background:#fff;border-bottom:1px solid var(--line);flex-shrink:0}
.pp-sum:empty{display:none}
.pp-chip{font-size:12.5px;padding:5px 10px;border-radius:999px;background:#eef2f7;color:#5a6b7d;cursor:pointer;line-height:1.2}
.pp-chip.on{background:#e8f6f6;color:#0a7d7d;font-weight:600}
.pp-body{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:12px 12px 96px}
.pp-sec-t{font-size:13px;color:var(--mut);margin:0 2px 8px;display:flex;justify-content:space-between;align-items:center}
.pp-foot{position:absolute;left:0;right:0;bottom:0;background:#fff;border-top:1px solid var(--line);padding:10px 12px;display:flex;align-items:center;gap:10px;box-shadow:0 -2px 12px rgba(20,50,90,.06)}
.pp-foot .pp-lab{flex:1;min-width:0;font-size:13px;line-height:1.35}
.pp-foot .pp-lab b{display:block;font-size:14px;color:var(--ink);word-break:break-all}
.pp-foot button{flex-shrink:0;min-width:96px}
/* 长弹窗的底部按钮钉住，不用翻到底找「取消/提交」 */
.modal .box .box-foot{position:sticky;bottom:-20px;background:#fff;border-top:1px solid var(--line);padding:10px 0 6px;margin-top:14px;z-index:3}
/* 转订单列表卡片 */
.cv-item{border:1px solid var(--line);border-radius:10px;padding:12px;margin-bottom:10px;background:#fff}
.modal.top{z-index:110}
/* 必填标记 */
label .req{font-size:11px;font-weight:400;color:#c0392b;background:#fdecea;border-radius:5px;padding:1px 6px;margin-left:2px}
/* 沟通留档列表 */
.commcard{margin-top:4px}
.commtl{padding:2px 0 0}
.commtl .tl-item{border-bottom:1px dashed var(--line);padding:10px 0}
.tl-head{display:flex;align-items:center;gap:7px;flex-wrap:wrap;font-size:13.5px}
.tl-body{margin-top:4px;font-size:13.5px;line-height:1.6;color:var(--ink);white-space:pre-wrap;word-break:break-word}

/* ═══════════════ 卡片内沟通记录 / 分步发货 / 首页统计 ═══════════════ */
/* 卡片内沟通：最新两条直接展示，其余折叠 */
.ccomm{margin-top:10px;background:#fbfcfe;border:1px solid var(--line);border-radius:9px;padding:8px 11px}
.ccomm-h{font-size:13px;font-weight:600;color:var(--ink);display:flex;gap:6px;align-items:center}
.ccomm .commtl .tl-item:last-child{border-bottom:0;padding-bottom:2px}
.ccomm details summary{cursor:pointer;padding:6px 0 0;list-style:none}
.ccomm details summary::-webkit-details-marker{display:none}
.ccomm details summary::before{content:'▾ ';}
.ccomm details[open] summary::before{content:'▴ ';}
/* 发货弹窗分步标题 */
.step{display:flex;align-items:center;gap:8px;margin:16px 0 6px;font-size:14px;font-weight:600;color:var(--ink)}
.step .sn{display:inline-flex;width:19px;height:19px;border-radius:50%;background:var(--brand,#1577c9);
  color:#fff;font-size:12px;align-items:center;justify-content:center;flex:0 0 auto}
.step .req{font-size:11px;font-weight:400;color:#c0392b;background:#fdecea;border-radius:5px;padding:1px 6px}
/* 发货按钮未满足条件时 */
button[disabled]{opacity:.45;cursor:not-allowed;filter:grayscale(.3)}
/* 首页收发统计 */
.sstat{margin-top:10px}
.sstat-h{display:flex;align-items:center;gap:7px;font-size:15px;margin-bottom:4px}
.sstat-h .muted{margin-left:auto;font-weight:400}
.sstat-l{font-size:12px;color:#7a8a99;margin:8px 0 4px;letter-spacing:.4px}
.sstat .stat-row{margin-top:0}
.sstat .stat-cell{padding:6px 2px}
.sstat .stat-cell .sv{font-size:20px}
.sstat .stat-cell .sl{font-size:11.5px}

/* ═══════════════ 一句话查单 ═══════════════ */
.qa{background:linear-gradient(135deg,#f2f9ff,#eefaf6);border:1px solid #d9e9f7;border-radius:12px;padding:11px 12px;margin:6px 0 10px}
.qa-h{font-size:13.5px;font-weight:600;color:var(--ink);display:flex;gap:7px;align-items:baseline;flex-wrap:wrap}
.qa-row{display:flex;gap:8px;margin-top:8px}
.qa-row input{flex:1;font-size:15px;padding:10px 12px;border:1px solid #cfdde9;border-radius:9px;background:#fff}
.qa-row button{flex:0 0 auto;padding:0 18px;font-size:15px}
.qa-res{margin-top:2px}
.qa-item{border-bottom:1px dashed var(--line);padding:10px 0}
.qa-item:last-child{border-bottom:0}
.qa-t{display:flex;align-items:center;gap:8px;font-size:14.5px;margin-bottom:3px}
.btnlink{display:inline-block;background:#1577c9;color:#fff;text-decoration:none;font-size:12px;
  padding:5px 11px;border-radius:7px;line-height:1.2}
.btnlink:active{opacity:.8}

/* ═══════════════ 样品列表行 → 客户独立页 ═══════════════ */
.ccard-go{padding:12px 14px;cursor:pointer}
.ccard-go:active{background:#f3f8fd}
.ccard .cch{display:flex;justify-content:space-between;align-items:center;gap:10px}
.ccard .cgoto{color:#a7b4c0;font-size:20px;line-height:1;flex:0 0 auto}
.ccard .ccline{margin-top:6px;font-size:13px;color:#33475b;line-height:1.5}
.ccard .csub{display:flex;justify-content:space-between;gap:10px;margin-top:5px;font-size:11.5px;color:#7a8a99}
.ccard .ccm{margin-top:5px;color:#5a6b7c}
/* 客户页头部 */
.cph{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:8px}
.cpn{font-size:19px;font-weight:600;line-height:1.3}
.ordc{margin-bottom:10px}
.ordc .cch .cs{text-align:right;font-size:11.5px;color:var(--mut);line-height:1.5}
/* 可点的统计格 */
.stat-cell.link{cursor:pointer;border-radius:10px;transition:background .15s}
.stat-cell.link:active{background:#eef4fa}
.stat-cell.link .sl::after{content:' ›';opacity:.55}
/* 当前选中的汇总格 */
.stat-cell.on{background:#eaf3fb;box-shadow:inset 0 0 0 1.5px #9fc6e8}

/* ═══════════════ 电脑端表格排版（列宽按比例，窄屏横向滚） ═══════════════ */
.tablewrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
.tablewrap table{width:100%;min-width:840px;table-layout:fixed}
.tb-samples th,.tb-samples td{vertical-align:top;overflow-wrap:break-word}
.tb-samples th:nth-child(1),.tb-samples td:nth-child(1){width:5%}
.tb-samples th:nth-child(2),.tb-samples td:nth-child(2){width:11%}
.tb-samples th:nth-child(3),.tb-samples td:nth-child(3){width:10%}
.tb-samples th:nth-child(4),.tb-samples td:nth-child(4){width:22%}
.tb-samples th:nth-child(5),.tb-samples td:nth-child(5){width:7%}
.tb-samples th:nth-child(6),.tb-samples td:nth-child(6){width:9%}
.tb-samples th:nth-child(7),.tb-samples td:nth-child(7){width:11%;white-space:nowrap}
.tb-samples th:nth-child(8),.tb-samples td:nth-child(8){width:11%}
.tb-samples th:nth-child(9),.tb-samples td:nth-child(9){width:6%}
.tb-samples th:nth-child(10),.tb-samples td:nth-child(10){width:8%}
.tb-samples td:nth-child(4){line-height:1.7;word-break:keep-all}
.tb-samples td:nth-child(2),.tb-samples td:nth-child(3){word-break:keep-all}
.tb-samples td button{white-space:nowrap}

/* ═══════════════ 财务开票 · 对接自助开票 ═══════════════ */
.btnlink.alt{background:#5a6b7c}
.tag-ok{background:#e7f6ef;color:#0f6e56;font-size:12px;padding:5px 11px;border-radius:7px;line-height:1.2}
.fpout{margin-top:10px}
.fp-tb td,.fp-tb th{padding:6px 8px}
.fp-tb td.right{text-align:right;color:var(--mut)}
.fp-tb tr:last-child td{background:#f7fafc;font-weight:600}
.fp-text{margin-top:8px}
.fp-text summary{cursor:pointer;color:var(--mut);font-size:13px}
.fp-text pre{white-space:pre-wrap;background:#f7f9fb;border:1px solid var(--line);border-radius:9px;padding:10px;font-size:12.5px;line-height:1.7;margin:6px 0 0}

.badge,.tag-warn,.tag-voice{white-space:nowrap}
.tb-samples td:nth-child(3),.tb-samples td:nth-child(5),.tb-samples td:nth-child(6){white-space:nowrap}
.tb-samples th{white-space:nowrap}

.tb-samples td:nth-child(10){white-space:nowrap}
.tb-samples td:nth-child(10 .muted.small){display:inline-block}

/* ═══════════════ 首页看板：总计/当月/单日 三档 ═══════════════ */
.bsec{margin-top:10px}
.bsec-h{font-size:13px;color:var(--mut);font-weight:600;margin-bottom:5px;display:flex;gap:6px;align-items:baseline}
.sstat .stat-row{gap:8px}
.sstat .stat-cell{min-width:76px;padding:9px 8px}
.dashwrap{margin-top:14px}
.dashwrap h2{margin:0 0 8px}
@media (min-width:1100px){ .dashwrap{display:grid;grid-template-columns:1fr 1fr;gap:12px} .dashwrap h2{grid-column:1/-1} }
/* 看板标签不折行 */
.sstat .sl{white-space:nowrap;font-size:11.5px}
.sstat .stat-cell{min-width:0;flex:1 1 62px}
