:root{
  --primary:#2563eb; --primary-d:#1d4ed8; --bg:#f4f6fa; --card:#ffffff;
  --text:#1e293b; --muted:#64748b; --line:#e2e8f0;
  --green:#059669; --red:#dc2626; --orange:#d97706; --purple:#7c3aed;
}
*{margin:0;padding:0;box-sizing:border-box}
body{font-family:"Microsoft YaHei","PingFang SC",system-ui,sans-serif;background:var(--bg);color:var(--text);font-size:14px}
header{background:linear-gradient(135deg,#1e40af,#3b82f6);color:#fff;padding:14px 24px;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px}
.brand-row{display:flex;align-items:center;gap:12px}
.brand-row .brand-logo{height:40px;width:auto;max-width:160px;object-fit:contain;border-radius:6px;background:#fff;box-shadow:0 1px 4px rgba(0,0,0,.12)}
.brand{text-align:center;margin-bottom:12px}
.brand .brand-logo{height:80px;width:auto;max-width:240px;object-fit:contain;border-radius:8px;background:#fff;box-shadow:0 2px 6px rgba(0,0,0,.1)}
header h1{font-size:19px;font-weight:600}
header .sub{font-size:12px;opacity:.85;margin-top:3px}
.hbtns{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.hbtn{background:rgba(255,255,255,.18);border:1px solid rgba(255,255,255,.4);padding:5px 12px;border-radius:12px;font-size:12px;color:#fff;cursor:pointer;font-family:inherit}
.hbtn:hover{background:rgba(255,255,255,.32)}
nav{background:#fff;border-bottom:1px solid var(--line);padding:0 16px;display:flex;flex-wrap:wrap;position:sticky;top:0;z-index:50}
nav button{border:none;background:none;padding:13px 18px;font-size:14px;cursor:pointer;color:var(--muted);border-bottom:2.5px solid transparent;font-family:inherit}
nav button:hover{color:var(--primary)}
nav button.active{color:var(--primary);border-bottom-color:var(--primary);font-weight:600}
main{padding:18px 22px;max-width:1500px;margin:0 auto}
.stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;margin-bottom:18px}
.stat{background:var(--card);border-radius:10px;padding:14px 16px;box-shadow:0 1px 3px rgba(0,0,0,.06)}
.stat .v{font-size:24px;font-weight:700;color:var(--primary)}
.stat .l{font-size:12px;color:var(--muted);margin-top:4px}
.stat.warn .v{color:var(--red)} .stat.ok .v{color:var(--green)} .stat.pu .v{color:var(--purple)}
.dash-sec{margin:4px 0 10px}
.dash-sec .sec-t{font-size:15px;font-weight:700;color:var(--text);margin:14px 0 8px;padding-left:11px;border-left:4px solid var(--primary);display:flex;align-items:baseline;gap:8px;flex-wrap:wrap}
.dash-sec .sec-t .sub{font-size:12px;font-weight:400;color:var(--muted)}
.dash-sec .sec-t.go{cursor:pointer;transition:color .12s ease}
.dash-sec .sec-t.go:hover{color:var(--primary)}
.dash-sec .sec-t.go::after{content:'›';color:var(--primary);font-weight:700;margin-left:2px}
.stat-lg.clickable,.stat.lg.clickable{cursor:pointer;transition:transform .1s ease,box-shadow .1s ease}
.stat-lg.clickable:hover,.stat.lg.clickable:hover{transform:translateY(-2px);box-shadow:0 6px 18px rgba(0,0,0,.12)}
.dash-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:16px;margin-bottom:18px}
.dash-grid .dash-sec{margin:0;background:var(--card);border-radius:10px;padding:14px 16px;box-shadow:0 1px 3px rgba(0,0,0,.06)}
.dash-grid .dash-sec .sec-t{margin-top:0}
.dash-grid .dash-sec .stats{grid-template-columns:repeat(4,1fr);margin-bottom:0;gap:10px}
.dash-grid .dash-sec .stats.lg{grid-template-columns:1fr;margin-bottom:10px;gap:10px}
.stat-lg{background:linear-gradient(135deg,#eff6ff 0%,var(--card) 100%);border:1px solid var(--primary);padding:18px 16px;text-align:center}
.stat-lg .v{font-size:32px;line-height:1}
.stat-lg .l{font-size:14px;font-weight:600;color:var(--primary-d);margin-top:6px}
/* 数据看板：商标/专利/软著/科技 四个看板高度压缩约 1/3（行距、内边距收紧，不影响顶部统计行） */
.dash-grid .dash-sec{padding:10px 14px}
.dash-grid .dash-sec .sec-t{margin:0 0 6px}
.dash-grid .dash-sec .stat{padding:14px 16px}
.dash-grid .dash-sec .stat .v{font-size:24px}
.dash-grid .dash-sec .stat .l{margin-top:4px;font-size:12px}
.dash-grid .dash-sec .stats{gap:8px}
.dash-grid .dash-sec .stats.lg{margin-bottom:6px;gap:8px}
.dash-grid .dash-sec .stat-lg{padding:18px 16px}
.dash-grid .dash-sec .stat-lg .v{font-size:32px}
.dash-grid .dash-sec .stat-lg .l{margin-top:6px;font-size:14px}
@media (max-width:1100px){ .dash-grid{grid-template-columns:1fr} }
.card{background:var(--card);border-radius:10px;box-shadow:0 1px 3px rgba(0,0,0,.06);margin-bottom:16px;overflow:hidden}
.card h3{padding:12px 16px;border-bottom:1px solid var(--line);font-size:14px;color:var(--text);background:#f8fafc;display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:16px}
@media (max-width:1000px){ .grid2{grid-template-columns:1fr} }
.toolbar{display:flex;gap:10px;flex-wrap:wrap;padding:12px 16px;align-items:center;border-bottom:1px solid var(--line)}
.toolbar input[type=text]{padding:8px 12px;border:1px solid var(--line);border-radius:8px;width:280px;font-size:13px;font-family:inherit}
.toolbar input[type=text]:focus{outline:2px solid #bfdbfe;border-color:var(--primary)}
/* 需求117：工具条里操作按钮统一靠右（搜索框与按钮之间放一个弹性占位） */
.tb-spacer{flex:1 1 auto;min-width:0}
.chip{padding:5px 12px;border-radius:14px;border:1px solid var(--line);background:#fff;cursor:pointer;font-size:12px;color:var(--muted);font-family:inherit}
.chip.on{background:var(--primary);color:#fff;border-color:var(--primary)}
/* 需求117：筛选药丸统一单独占一行（工具栏只留搜索框 + 操作按钮） */
.chip-row{display:flex;gap:8px;flex-wrap:wrap;padding:10px 16px;align-items:center;border-bottom:1px solid var(--line)}
.chip-sep{width:1px;height:20px;background:var(--line);flex:none}
.chip-row.sub{margin:0;padding:8px 16px 10px 28px;background:var(--bg,#f8fafc)}
.chip-row.sub .chip{font-size:11px;padding:4px 11px}
.addbtn{background:var(--primary);color:#fff;border:none;padding:8px 16px;border-radius:8px;font-size:13px;cursor:pointer;font-family:inherit;font-weight:600}
.addbtn:hover{background:var(--primary-d)}
.addbtn.sm{padding:5px 12px;font-size:12px;font-weight:400}
.tblwrap{overflow:auto;max-height:66vh}
table{width:100%;border-collapse:collapse;font-size:13px;white-space:nowrap}
th{position:sticky;top:0;background:#f1f5f9;color:#475569;text-align:left;padding:9px 12px;border-bottom:2px solid var(--line);font-weight:600;z-index:2}
td{padding:8px 12px;border-bottom:1px solid #f1f5f9;vertical-align:top}
tr:hover td{background:#f8faff}
tr.clickable{cursor:pointer}
.tag{display:inline-block;padding:2px 8px;border-radius:10px;font-size:11px;margin:1px 2px}
.t-ok{background:#dcfce7;color:#15803d} .t-bad{background:#fee2e2;color:#b91c1c}
.t-warn{background:#fef3c7;color:#b45309} .t-info{background:#dbeafe;color:#1d4ed8}
.t-gray{background:#f1f5f9;color:#64748b} .t-pu{background:#ede9fe;color:#6d28d9} .t-purple{background:#f3e8ff;color:#7e22ce;font-weight:600}
.money{font-variant-numeric:tabular-nums}
.money.bad{color:var(--red);font-weight:600}
/* 限宽列：超长内容省略号截断，悬停 title 看全文 */
td.cap,th.cap{max-width:30em;overflow:hidden;text-overflow:ellipsis}
/* 客户名称列限宽（18字），避免挤开“类型”等后续列 */
td.cap-n,th.cap-n{max-width:18em;overflow:hidden;text-overflow:ellipsis}
/* 列宽拖拉：列头右边缘出现拖动手柄（th 已是 sticky 定位，::after 以其为定位基准） */
#main th::after{content:'';position:absolute;top:0;right:0;bottom:0;width:9px;cursor:col-resize;z-index:3}
#main th:hover::after{background:rgba(37,99,235,.28);border-radius:3px}
/* 拖过列宽后表格切固定布局，单元格超宽自动省略 */
table.fx{table-layout:fixed}
table.fx td,table.fx th{overflow:hidden;text-overflow:ellipsis}
.detail-head{background:linear-gradient(135deg,#eff6ff,#fff);padding:18px 20px;border-bottom:1px solid var(--line)}
.detail-head h2{font-size:18px;color:var(--primary-d)}
.detail-head .meta{display:flex;gap:16px;flex-wrap:wrap;margin-top:8px;color:var(--muted);font-size:13px;align-items:center}
.back{cursor:pointer;color:var(--primary);margin-bottom:6px;display:inline-block;font-size:13px}
.back:hover{text-decoration:underline}
.empty{padding:30px;text-align:center;color:var(--muted)}
.note-ctx{color:var(--muted);font-size:12px;padding:10px 16px;background:#fffbeb;border-top:1px solid #fde68a}
/* 分页控件 */
.pager{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;padding:10px 16px;border-top:1px solid var(--line);font-size:12px;color:var(--muted)}
.pg-info{display:flex;align-items:center;gap:6px}
.pg-info b{color:var(--text)}
.pg-sel{padding:4px 8px;border:1px solid var(--line);border-radius:6px;font-size:12px;font-family:inherit;background:#fff;color:var(--text);cursor:pointer}
.pg-sel:focus{outline:2px solid #bfdbfe;border-color:var(--primary)}
.pg-btns{display:flex;align-items:center;gap:4px;flex-wrap:wrap}
.pg-btn{min-width:28px;height:28px;padding:0 9px;border:1px solid var(--line);background:#fff;border-radius:6px;font-size:12px;cursor:pointer;color:var(--muted);font-family:inherit;transition:all .12s}
.pg-btn:hover:not(:disabled):not(.on){border-color:var(--primary);color:var(--primary)}
.pg-btn.on{background:var(--primary);color:#fff;border-color:var(--primary);font-weight:600}
.pg-btn:disabled{opacity:.4;cursor:default}
.pg-dot{padding:0 2px;color:var(--muted)}
.pg-pos{white-space:nowrap}
footer{padding:14px 24px;color:var(--muted);font-size:12px;text-align:center}
footer .icp a{color:var(--muted);text-decoration:none}
footer .icp a:hover{color:var(--primary,#1677ff);text-decoration:underline}
/* 合同列表「具体业务」列：单行固定、超长省略，悬停由原生 title 显示全部（需求：不随文字换行撑高行距） */
table td.biz-clip{max-width:200px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bar{display:flex;height:10px;border-radius:5px;overflow:hidden;margin-top:8px;width:100%}
.bar div{height:100%}
ul.plain{list-style:none;padding:10px 16px}
ul.plain li{padding:6px 0;border-bottom:1px dashed #f1f5f9;font-size:13px}
.kw{background:#fde047}
.thumb{max-width:34px;max-height:34px;border-radius:6px;border:1px solid var(--line);cursor:pointer;vertical-align:middle;object-fit:cover;background:#f8fafc}
.tcenter{text-align:center}
.muted{color:var(--muted)}
.opbtn{border:1px solid var(--line);background:#fff;border-radius:6px;padding:2px 7px;cursor:pointer;font-size:12px;margin-right:3px;font-family:inherit}
.opbtn:hover{border-color:var(--primary);color:var(--primary)}
.opbtn.del:hover{border-color:var(--red);color:var(--red)}
.ops{white-space:nowrap}
/* 弹窗 */
.modal{display:none;position:fixed;inset:0;background:rgba(15,23,42,.45);z-index:200;padding:24px;overflow:auto}
.modal.open{display:flex;align-items:flex-start;justify-content:center}
.mbox{background:#fff;border-radius:12px;width:min(94vw,960px);max-width:94vw;margin-top:3vh;box-shadow:0 20px 50px rgba(0,0,0,.25)}
.mbox.wide{width:860px}
.mhead{display:flex;justify-content:space-between;align-items:center;padding:14px 18px;border-bottom:1px solid var(--line)}
.mhead b{font-size:15px;color:var(--primary-d)}
.mclose{border:none;background:none;font-size:22px;cursor:pointer;color:var(--muted);line-height:1}
.mbody{padding:18px 20px;max-height:86vh;overflow:auto}
.fgrid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
/* 关键：栅格子项允许收缩，避免长内容把列撑破导致整窗横向滚动 */
.fitem{display:flex;flex-direction:column;gap:4px;min-width:0}
.fitem.full{grid-column:1/-1}
.fitem label{font-size:12px;color:var(--muted)}
.fitem input,.fitem select,.fitem textarea{padding:7px 10px;border:1px solid var(--line);border-radius:7px;font-size:13px;font-family:inherit;width:100%;min-width:0}
.fitem input:focus,.fitem select:focus,.fitem textarea:focus{outline:2px solid #bfdbfe;border-color:var(--primary)}
.fitem textarea{min-height:64px;resize:vertical}
.fitem .err{color:var(--red);font-size:11px;display:none}
.fitem.bad input{border-color:var(--red)}
.fitem.bad .err{display:block}
.fitem.hl{background:#fffbe6;border:1px solid #ffe58f;border-radius:8px;padding:10px 12px;margin-bottom:4px}
.stat.clickable{cursor:pointer;transition:transform .1s ease,box-shadow .1s ease}
.stat.clickable:hover{transform:translateY(-2px);box-shadow:0 6px 18px rgba(0,0,0,.12)}
.mfoot{display:flex;justify-content:flex-end;gap:10px;padding:14px 18px;border-top:1px solid var(--line)}
.mfoot button{padding:8px 22px;border-radius:8px;border:1px solid var(--line);background:#fff;cursor:pointer;font-size:13px;font-family:inherit}
.mfoot button.primary{background:var(--primary);color:#fff;border-color:var(--primary);font-weight:600}
.img-field{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;gap:8px}
.img-field input[type=file]{max-width:240px;font-size:12px}
.img-prev{display:flex;align-items:center;gap:6px;flex-wrap:wrap;min-height:0}
.img-rm{border:1px solid var(--red);color:var(--red);background:#fff;border-radius:6px;padding:3px 9px;cursor:pointer;font-size:12px;font-family:inherit}
.img-hint{font-size:11px;color:var(--muted)}
/* 合同「具体业务」结构化明细行 —— 布局见下方 285 行起 .biz-header / .biz-row（CSS Grid 8 列布局） */
.biz-wrap{display:flex;flex-direction:column;gap:8px;overflow-x:auto;padding-bottom:4px}
/* 以下 flex 旧规则已被 285 行起 grid 布局替代，删除避免特异性 (0,2,0) 覆盖 (0,1,1) 的 width:100% */
/* .biz-row{display:flex;...} 等已移除 */
.biz-empty{font-size:12px;padding:4px 0}
.biz-empty.muted{color:var(--muted)}
/* 需求92：后台设置拖拽排序 */
.drag-handle{color:var(--muted);cursor:grab;user-select:none;font-size:14px;line-height:1;text-align:center}
.drag-handle:active{cursor:grabbing}
.tblwrap tr.dragging{opacity:0.4;background:#fffbe6}
.tblwrap tr.drop-target{box-shadow:inset 0 2px 0 var(--primary),inset 0 -2px 0 var(--primary)}
/* 需求106：列表最左侧「序号」列（客户名称前） */
th.col-seq, td.col-seq { width:46px; min-width:46px; text-align:center; color:var(--muted); font-size:12px; font-variant-numeric:tabular-nums; }
th.col-seq { background:#f8fafc; }
td.col-seq { background:#fcfdff; }
a.lnk-contract { color:#1677ff; text-decoration:none; border-bottom:1px dashed #91caff; cursor:pointer; }
a.lnk-contract:hover { color:#0958d9; border-bottom-style:solid; }
a.lnk-contract.ro-field { display:block; width:100%; padding:7px 8px; box-sizing:border-box; background:#f1f5f9; border:1px solid #d9d9d9; border-radius:6px; font-size:14px; }
.fitem .status-ro { display:flex; align-items:center; width:100%; min-height:32px; padding:5px 8px; box-sizing:border-box; background:#f1f5f9; border:1px solid #d9d9d9; border-radius:7px; }
.fitem input[readonly]{background:#f1f5f9;color:var(--muted);cursor:not-allowed}
/* 可搜索下拉（国家字段） */
.search-select{position:relative;width:100%}
.search-select::after{content:"▾";position:absolute;right:12px;top:50%;transform:translateY(-50%);color:var(--primary);font-size:12px;line-height:1;pointer-events:none}
.search-select .ss-input{width:100%;padding:7px 28px 7px 10px;border:1px solid var(--line);border-radius:7px;font-size:13px;font-family:inherit;background:#fff;cursor:pointer}
.search-select .ss-input:focus{outline:2px solid #bfdbfe;border-color:var(--primary)}
.search-select .ss-dropdown{position:absolute;top:100%;left:0;right:0;max-height:260px;overflow-y:auto;background:#fff;border:1px solid var(--line);border-radius:7px;box-shadow:0 6px 18px rgba(0,0,0,.12);z-index:300;margin-top:3px;padding:4px 0}
.search-select .ss-option{padding:7px 12px;font-size:13px;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.search-select .ss-option:hover,.search-select .ss-option.hover{background:#eff6ff}
.search-select .ss-option.selected{background:var(--primary);color:#fff}
.warn-tip{background:#fef3e2;color:#92400e;border:1px solid #fcd9a3;border-radius:8px;padding:10px 12px;font-size:13px;margin-bottom:14px;line-height:1.6}
.perr{color:var(--red);font-size:12px;min-height:16px}
#toast{position:fixed;left:50%;bottom:36px;transform:translateX(-50%) translateY(20px);background:#1e293b;color:#fff;padding:10px 22px;border-radius:10px;font-size:13.5px;box-shadow:0 8px 24px rgba(15,23,42,.25);opacity:0;pointer-events:none;transition:all .25s;z-index:400;max-width:80vw}
#toast.show{opacity:1;transform:translateX(-50%) translateY(0)}
/* 登录 */
#login{position:fixed;inset:0;background:linear-gradient(135deg,#1e40af,#3b82f6);display:flex;align-items:center;justify-content:center;z-index:100}
.login-card{background:#fff;padding:34px 32px;border-radius:14px;box-shadow:0 20px 50px rgba(0,0,0,.3);width:350px}
.login-card h1{margin:0 0 6px;font-size:20px;color:var(--primary-d)}
.login-card .sub{color:var(--muted);margin-bottom:20px;font-size:13px}
.login-card label{display:block;margin-bottom:14px;font-size:13px;color:var(--muted)}
.login-card .input{margin-top:4px;padding:9px 11px;border:1px solid var(--line);border-radius:8px;width:100%;font-size:14px;font-family:inherit}
.login-card .input:focus{outline:2px solid #bfdbfe;border-color:var(--primary)}
.login-card .err{color:var(--red);font-size:13px;min-height:18px;margin-bottom:8px}
#app{display:none}
/* 后台设置页：卡片网格 + 面包屑 */
/* 后台设置卡片改版：去掉说明文字，改为单行「图标 · 名称 · 数量胶囊 · 箭头」，整页更紧凑清爽 */
.set-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(236px,1fr));gap:12px;margin-top:8px}
.set-card{position:relative;display:flex;gap:12px;align-items:center;padding:13px 15px;border:1px solid var(--line);border-radius:12px;background:#fff;cursor:pointer;transition:.18s;overflow:hidden}
.set-card::before{content:'';position:absolute;left:0;top:0;bottom:0;width:3px;background:var(--primary);opacity:0;transition:.18s}
.set-card:hover{border-color:#c7d2fe;box-shadow:0 8px 20px rgba(30,64,175,.10);transform:translateY(-2px)}
.set-card:hover::before{opacity:1}
.set-ico{width:38px;height:38px;flex:0 0 38px;display:flex;align-items:center;justify-content:center;font-size:19px;background:linear-gradient(135deg,#eef2ff,#e0e7ff);border-radius:10px;transition:.18s}
.set-card:hover .set-ico{background:linear-gradient(135deg,#e0e7ff,#c7d2fe)}
.set-body{display:flex;align-items:center;justify-content:space-between;gap:10px;flex:1;min-width:0}
.set-body b{font-size:14.5px;color:var(--primary-d);font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.set-body em{flex:0 0 auto;font-style:normal;font-size:12px;font-weight:600;color:var(--primary);background:#eef2ff;border-radius:999px;padding:2px 9px;line-height:1.6;white-space:nowrap;transition:.18s}
.set-card:hover .set-body em{background:#e0e7ff}
.set-go{flex:0 0 auto;margin-left:-4px;color:#cbd5e1;font-size:20px;line-height:1;transition:.18s}
.set-card:hover .set-go{color:var(--primary);transform:translateX(3px)}
/* 需求114：后台设置页——按业务分组，行内「状态列 | 类型列」严格对齐 */
.set-sec{margin-top:22px}
.set-sec-hd{display:flex;align-items:center;gap:10px;font-size:14px;font-weight:600;color:var(--primary-d);margin-bottom:10px}
.set-sec-hd::after{content:'';flex:1;height:1px;background:var(--line)}
.set-matrix{display:grid;grid-template-columns:96px minmax(0,1fr) minmax(0,1fr);gap:10px 12px;align-items:stretch}
.set-colhd{font-size:12px;font-weight:600;color:var(--muted);letter-spacing:.5px;padding:0 4px 2px}
.set-rowhd{display:flex;align-items:center;justify-content:center;text-align:center;font-size:13px;font-weight:600;color:var(--primary-d);background:linear-gradient(180deg,#f8fafc,#eef2ff);border:1px solid var(--line);border-radius:12px;padding:8px 6px;line-height:1.5}
.set-empty{border:1px dashed var(--line);border-radius:12px;background:#fcfdff;display:flex;align-items:center;justify-content:center;text-align:center;color:var(--muted);font-size:12px;padding:10px}
.set-matrix .set-card{height:100%;min-height:62px}
@media (max-width:900px){
  .set-matrix{grid-template-columns:1fr}
  .set-matrix .set-rowhd{justify-content:flex-start;padding:8px 12px}
  .set-colhd{display:none}
}
.crumb{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--muted);margin-bottom:10px}
.crumb a{color:var(--primary);cursor:pointer;text-decoration:none;font-weight:600}
.crumb a:hover{text-decoration:underline}
.crumb .sep{color:var(--line)}
/* 窄屏（手机/平板）：表单改为单列，避免两列被挤压造成横向滚动与内容截断 */
@media (max-width:680px){
  .fgrid{grid-template-columns:1fr}
  .mbox{width:96vw;margin-top:2vh}
  .mbody{max-height:88vh}
}

/* ===== 进度说明（仅编辑页可见） ===== */
.pt-box{border:1px solid var(--line);border-radius:8px;background:var(--bg);margin-top:2px;overflow:hidden}
.pt-table{width:100%;display:table;border-collapse:collapse}
.pt-head{display:table-row;background:#f1f5f9;font-weight:600;font-size:13px;color:var(--muted)}
.pt-table > #ptNotes{display:table-row-group}
.pt-row{display:table-row;border-top:1px solid var(--line)}
.pt-row:first-child{border-top:none}
.pt-cell{display:table-cell;padding:5px 12px;vertical-align:middle;font-size:13px;line-height:1.35}
.pt-c-text{width:100%;word-break:break-all;vertical-align:middle}
.pt-c-st{white-space:nowrap;width:130px;vertical-align:middle}
.pt-c-time{white-space:nowrap;width:130px;color:var(--muted);font-size:12px;vertical-align:middle}
.pt-c-ops{white-space:nowrap;width:100px;text-align:right;vertical-align:middle}
.pt-btn-edit,.pt-btn-del{border:none;border-radius:6px;cursor:pointer;padding:2px 9px;font-size:12px;line-height:1.5;margin-left:4px;vertical-align:middle}
.pt-btn-edit{background:#e0f2fe;color:#0369a1}
.pt-btn-edit:hover{background:#bae6fd}
.pt-btn-del{background:#fee2e2;color:var(--red)}
.pt-btn-del:hover{background:#fecaca}
.pt-empty{color:var(--muted);font-style:italic}
/* 需求121：进度说明仅管理员可改，其他账号在此列看到只读提示 */
.pt-lock{color:var(--muted);font-size:12px;white-space:nowrap;cursor:default}
.pt-notes-h{display:flex;justify-content:space-between;align-items:center;margin-bottom:6px}
.pt-notes-h label{margin:0}
.pt-hint{color:var(--muted);font-weight:400;font-size:12px;margin-left:6px}

/* 进度说明编辑弹窗（需求120：先选进度，再填说明） */
#noteEditModal textarea{width:100%;min-height:120px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.6;padding:10px;border:1px solid var(--line);border-radius:8px;box-sizing:border-box}
.ne-row{display:flex;align-items:center;gap:10px;margin-bottom:10px}
.ne-row label{flex:0 0 auto;margin:0;font-weight:600;font-size:13px;color:var(--muted);white-space:nowrap}
.ne-row select{flex:1 1 auto;min-width:0;padding:8px 10px;border:1px solid var(--line);border-radius:8px;font-size:14px;font-family:inherit;background:var(--bg);color:inherit}

/* ===== 导入弹窗 ===== */
.imp-tip{font-size:12px;color:var(--muted);line-height:1.7;background:#f8fafc;border:1px solid var(--line);border-radius:8px;padding:8px 10px;margin-bottom:10px}
.imp-tip b{color:var(--primary-d)}
#importModal .tblwrap{max-height:240px;overflow:auto;margin-top:6px}
#importModal #impDo:disabled{opacity:.55;cursor:not-allowed}

/* ===== 列头筛选弹层 ===== */
th[data-col]{cursor:pointer;transition:background .15s}
th[data-col]:hover{background:#e2e8f0}
.colf-btn{cursor:pointer;display:inline-block;margin-left:7px;font-size:18px;font-weight:700;color:var(--primary);border:1px solid var(--line);border-radius:6px;padding:1px 9px;line-height:1.1;user-select:none;vertical-align:middle;transition:background .12s,color .12s}
.colf-btn:hover{background:var(--primary);color:#fff;border-color:var(--primary)}
.colf-btn.on{background:var(--primary);color:#fff;border-color:var(--primary)}
.tblwrap thead th[data-col]{cursor:pointer;transition:background .12s,color .12s}
.tblwrap thead th[data-col]:hover{background:#eaf1fb;color:var(--primary-d)}
.colf-pop{display:none;position:fixed;z-index:9999;background:#fff;border:1px solid var(--line);border-radius:10px;box-shadow:0 12px 32px rgba(15,23,42,.18);width:240px;max-height:340px;overflow:hidden;flex-direction:column}
.colf-pop .colf-head{padding:14px 16px;font-size:15px;font-weight:600;color:var(--primary-d);border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;flex:0 0 auto}
.colf-pop .colf-x{border:none;background:none;cursor:pointer;font-size:16px;color:var(--muted);padding:0 4px}
.colf-pop .colf-x:hover{color:var(--red)}
.colf-pop .colf-search{margin:8px 12px 10px;padding:7px 10px;border:1px solid var(--line);border-radius:8px;font-size:14px;box-sizing:border-box;width:calc(100% - 24px)}
.colf-pop .colf-opts{overflow:auto;padding:0 10px 10px;max-height:240px}
.colf-opt{display:flex;align-items:center;gap:8px;padding:7px 8px;border-radius:6px;cursor:pointer;font-size:14px;line-height:1.5}
.colf-opt:hover{background:#f1f5f9}
.colf-opt input{margin:0}
.colf-empty{padding:20px 12px;text-align:center;color:var(--muted);font-size:13px}

/* ===== 商标进度 / 版权进度（列表列，chip 药丸） ===== */
td.tmseq,td.crprog{min-width:120px;white-space:nowrap}
.tmseq-chip,.crprog-chip{display:inline-block;padding:2px 10px;border-radius:12px;background:#eef2ff;color:#3a7afe;font-size:12px;font-weight:600;white-space:nowrap;line-height:1.6}
.tmseq-empty{color:var(--muted);font-size:13px}

/* ===== 批量多选删除 ===== */
.col-chk{width:34px;min-width:34px;text-align:center;white-space:nowrap}
.col-chk input[type=checkbox],thead .col-chk input[type=checkbox]{width:15px;height:15px;cursor:pointer;accent-color:#e05a5a;vertical-align:middle}
td.col-chk{text-align:center}
.btn-bdel{background:#e05a5a!important}
.btn-bdel:hover{filter:brightness(.92)}
.btn-bdel .seln{display:inline-block;min-width:16px;margin-left:3px;background:rgba(255,255,255,.25);border-radius:9px;padding:0 4px;font-weight:700}

/* ===== 需求116：进度任务「归档」===== */
.btn-barch{background:#c98a2e!important}
.btn-barch:hover{filter:brightness(.92)}
.btn-barch .seln{display:inline-block;min-width:16px;margin-left:3px;background:rgba(255,255,255,.25);border-radius:9px;padding:0 4px;font-weight:700}
.btn-archview{background:#fff!important;color:#8a6100!important;border:1px solid #e0b24a!important}
.btn-archview:hover{background:#fff8e8!important}
.btn-archview.on{background:#8a6100!important;color:#fff!important;border-color:#8a6100!important}
/* 已归档任务行：浅黄底 + 减弱文字，与在办任务一眼区分（悬停恢复正常对比度） */
tr.row-archived td{background:#fffaf0}
tr.row-archived td,tr.row-archived td b,tr.row-archived td a{color:#8a7654}
tr.row-archived:hover td{background:#fff4dd}
.arch-tag{display:inline-block;padding:0 7px;margin-right:4px;border-radius:9px;background:#f2e3c2;color:#8a6100;font-size:12px;line-height:18px;white-space:nowrap}
.opbtn.arch:hover{border-color:#e0b24a;color:#8a6100}

/* ===== 字段管理（列显示/隐藏）弹窗 ===== */
.colvis-btn{background:var(--blue,#3a7afe)!important}
.colvis-btn:hover{filter:brightness(.95)}
.colvis-modal{display:none;position:fixed;inset:0;z-index:9998;background:rgba(15,23,42,.45);align-items:flex-start;justify-content:center}
.colvis-modal.open{display:flex}
.colvis-box{margin-top:12vh;width:340px;max-width:92vw;background:#fff;border-radius:12px;box-shadow:0 16px 44px rgba(15,23,42,.28);overflow:hidden;display:flex;flex-direction:column;max-height:74vh}
.colvis-hd{padding:14px 16px;font-size:15px;font-weight:700;color:var(--primary-d);border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center}
.colvis-hd .colvis-x{border:none;background:none;cursor:pointer;font-size:17px;color:var(--muted);padding:0 4px}
.colvis-hd .colvis-x:hover{color:var(--red)}
.colvis-bd{padding:8px 10px;overflow:auto;display:flex;flex-direction:column;gap:2px}
.colvis-item{display:flex;align-items:center;gap:8px;padding:8px 8px;border-radius:6px;cursor:default;font-size:14px;line-height:1.4;user-select:none;background:#fff;border:1px solid transparent}
.colvis-item:hover{background:#f1f5f9}
.colvis-item.dragging{opacity:.4;background:#e7efff}
.colvis-item.drop-target{background:#e7efff;border-color:var(--primary,#3a7afe)}
.colvis-grip{flex:0 0 auto;color:#aab2bf;font-weight:700;letter-spacing:-2px;cursor:grab;padding:0 2px;font-size:15px}
.colvis-grip:active{cursor:grabbing}
.colvis-chk{display:flex;align-items:center;gap:8px;cursor:pointer;flex:1;min-width:0}
.colvis-item input{margin:0;width:16px;height:16px;accent-color:var(--primary);flex:0 0 auto}
.colvis-ft{padding:12px 14px;border-top:1px solid var(--line);display:flex;gap:10px;justify-content:flex-end;align-items:center}
.colvis-act{border:1px solid var(--line);background:#fff;border-radius:8px;padding:6px 12px;cursor:pointer;font-size:13px;color:var(--primary-d)}
.colvis-act:hover{background:#f1f5f9}
.colvis-done{padding:6px 18px}

/* 合同「具体业务」明细：9 列表格严格对齐，空列占位，竖线分隔 */
.biz-wrap { border:1px solid var(--line); border-radius:8px; overflow-x:auto; }
/* 关键：min-width:0 覆盖 grid 子项默认 min-width:auto，禁止输入框内在宽度撑大轨道——否则表头(纯文字)与数据行(有输入框)轨道尺寸不一致导致错位 */
.biz-header > span, .biz-cell { min-width:0; }
/* 8 列固定宽（避免 fr 列被输入框 min-content 撑大与表头 fr 分配不一致）：业务板块｜业务内容｜类别/数量｜费用1｜费用2｜已收款｜备注｜✕；总费用 = col4+col5 共 200px */
.biz-header { display:grid; grid-template-columns:96px 200px 150px 110px 110px 100px 110px 36px; gap:0; background:#f8fafc; font-size:12px; font-weight:600; color:#475569; text-align:center; border-bottom:1px solid #e2e8f0; }
.biz-header span { padding:8px 4px; border-right:1px solid #e2e8f0; display:flex; align-items:center; justify-content:center; }
.biz-header span:last-child { border-right:none; color:var(--muted); }
.biz-header > span.hdr-fee { grid-column: 4 / 6; background:#f8fafc; color:#475569; border-bottom:1px solid #e2e8f0; }
.biz-row { display:grid; grid-template-columns:96px 200px 150px 110px 110px 100px 110px 36px; gap:0; align-items:stretch; border-bottom:1px dashed #ececec; }
.biz-row:last-child { border-bottom:none; }
.biz-cell { display:flex; align-items:center; padding:4px; border-right:1px solid #f1f5f9; box-sizing:border-box; min-height:40px; }
.biz-cell:last-child { border-right:none; justify-content:center; }
.biz-cell > * { width:100%; box-sizing:border-box; min-width:0; }
/* select 去 UA 默认箭头（箭头占约 13px padding，会把 select 撑出 cell 边界），用自定义 SVG 箭头 */
.biz-row select, .biz-cell select {
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6'><path d='M0 0 L5 6 L10 0' stroke='%23666' fill='none' stroke-width='1.5'/></svg>");
  background-position: right 4px center;
  background-repeat: no-repeat;
  padding-right: 18px !important;
}
.biz-row select, .biz-row input { padding:5px 6px; border:1px solid #d9d9d9; border-radius:6px; font-size:13px; box-sizing:border-box; }
.biz-row .biz-memo { width:100%; }
.biz-row .biz-del { width:26px; height:26px; padding:0; border:none; background:#ffe9e9; color:#c0392b; border-radius:6px; cursor:pointer; font-size:14px; display:flex; align-items:center; justify-content:center; }
/* 「类型/数量」复合格子：左边是类型选择（吃剩余），右边是数量（44px 固定） */
.biz-cell.cat-qty { display:flex; gap:4px; align-items:stretch; padding:5px 4px; }
.biz-cell.cat-qty > .biz-tmtype,
.biz-cell.cat-qty > .biz-ptype,
.biz-cell.cat-qty > .biz-ctype,
.biz-cell.cat-qty > .biz-ttype { flex:1 1 0; min-width:0; }
/* 商标行的「类别」已改为隐藏域（需求111）——随行携带旧值，不参与布局 */
/* 科技项目/其他 无类别控件，用同宽占位撑开，保证「数量」框与商标/专利/软著 并列在同一位置 */
.biz-cell.cat-qty > .biz-cat-ph { flex:1 1 0; min-width:0; display:block; }
.biz-cell.cat-qty > .biz-qty { flex:0 0 44px; width:44px; }
.biz-sum { padding:8px 12px; color:#1677ff; font-size:13px; font-weight:600; background:#f8fbff; border-top:1px solid #e2e8f0; }
.biz-sum .sum-amt { display:inline-block; padding:0 4px; border-radius:4px; }
.biz-sum .sum-amt.total  { color:#1677ff; background:#e6f0ff; }
.biz-sum .sum-amt.recv   { color:#389e0d; background:#e6f7e6; }
.biz-sum .sum-amt.owing  { color:#d4380d; background:#ffece6; }

/* 需求107：提成类型「后期触发条件」多选勾选框 */
.ms-box { display:flex; flex-wrap:wrap; gap:6px 8px; padding:2px 0; }
.ms-item { display:inline-flex; align-items:center; gap:4px; font-size:12px; line-height:1.6; background:#f8fafc; border:1px solid #e2e8f0; border-radius:6px; padding:3px 8px; cursor:pointer; user-select:none; }
.ms-item:hover { border-color:#93c5fd; background:#f1f5ff; }
.ms-item input { margin:0; cursor:pointer; }
.ms-empty { color:#94a3b8; font-size:12px; }

/* ===== 提成管理报表页样式（由 comm_style_patch.css 于 2026-09-14 合并进来，之前从未部署） ===== */
/* 提成管理报表页 */
.comm-bar {display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:14px 0 8px}
.comm-bar label {font-weight:600}
.comm-bar input[type=month] {padding:6px 10px;border:1px solid var(--border,#e2e8f0);border-radius:8px;font-size:14px}
.comm-hint {color:var(--muted,#94a3b8);font-size:12px}
.comm-sum {background:#f1f5f9;padding:10px 14px;border-radius:8px;margin-bottom:12px;font-size:14px}
.comm-sum b {color:#0f172a}
.comm-tbl {width:100%;border-collapse:collapse;font-size:13px}
.comm-tbl th,.comm-tbl td {border:1px solid #e2e8f0;padding:7px 9px;text-align:left}
.comm-tbl thead th {background:#f8fafc;position:sticky;top:0}
.comm-tbl .amt {text-align:right;font-variant-numeric:tabular-nums;font-weight:600}
.comm-tbl .st-pre {color:#b45309;font-weight:600}
.comm-tbl .st-post {color:#15803d;font-weight:600}
/* 阶段列：固定列宽，[√/× 下拉] + [金额输入] + [月份标签] 同行 */
.comm-tbl th.col-pre,
.comm-tbl td.col-pre { width:170px; min-width:170px; max-width:170px; background:#FFF8EC; }
.comm-tbl th.col-post,
.comm-tbl td.col-post { width:170px; min-width:170px; max-width:170px; background:#F1F8F1; }
/* 商务负责人：内容居中 */
.comm-tbl th.col-owner,
.comm-tbl td.col-owner { width:110px; min-width:110px; max-width:110px; text-align:center; }
/* 提成类型：下拉列 */
.comm-tbl th.col-ctype,
.comm-tbl td.col-ctype { width:150px; min-width:150px; max-width:150px; }
.comm-ctype {
  width:100%; padding:4px 6px; border:1px solid #cbd5e1; border-radius:5px;
  font-size:12px; color:#1e293b; background:#fff; box-sizing:border-box; cursor:pointer;
}
.comm-ctype:focus { outline:none; border-color:#3b46d6; box-shadow:0 0 0 2px rgba(59,70,214,.16); }
.comm-ctype-txt { color:#334155; font-size:12px; }
.comm-ctype-tip { color:#c0c7d4; font-size:12px; font-style:italic; }
.comm-tbl th.col-remark,
.comm-tbl td.col-remark { width:180px; min-width:180px; max-width:180px; }
.comm-tbl td.col-pre,
.comm-tbl td.col-post {
  display:table-cell;
  vertical-align:middle;
  white-space:nowrap;
}
/* √/× 可编辑下拉：胶囊形徽章；图标用 SVG 绘制（圆头对勾 / 圆头叉），文字隐藏 */
.comm-mark {
  -webkit-appearance:none; -moz-appearance:none; appearance:none;
  display:inline-block;
  width:20px; height:16px;
  padding:0;
  border-radius:4px;
  font-size:11px; font-weight:700;
  line-height:14px;
  text-align:center;
  text-align-last:center;
  vertical-align:middle;
  cursor:pointer;
  box-sizing:border-box;
  outline:none;
  /* 文本只作为无障碍/降级显示，视觉上由 SVG 图标承担 */
  color:transparent;
  text-shadow:none;
  background-repeat:no-repeat;
  background-position:center center;
  transition:box-shadow .15s, filter .15s;
}
/* √ 已发生：红底 + 白色圆头对勾 */
.comm-mark.ok {
  padding:0;
  text-align:center;
  background-color:#E23B3B;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 16 16'><path d='M3.3 8.6 L6.4 11.7 L12.7 4.7' fill='none' stroke='%23ffffff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-size:12px 12px;
  border:1px solid #C92828;
}
/* × 未发生：浅灰底 + 灰色圆头叉 */
.comm-mark.empty {
  padding:0;
  text-align:center;
  background-color:#F5F5F5;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 16 16'><path d='M4.4 4.4 L11.6 11.6 M11.6 4.4 L4.4 11.6' fill='none' stroke='%239CA3AF' stroke-width='2.4' stroke-linecap='round'/></svg>");
  background-size:11px 11px;
  border:1px solid #D9D9D9;
}
.comm-mark.manual {
  box-shadow:0 0 0 2.5px rgba(245,158,11,.5);
}
.comm-mark:hover { filter:brightness(0.94); }
.comm-mark.ok:hover { box-shadow:0 0 0 3px rgba(226,59,59,.22); }
.comm-mark.empty:hover { box-shadow:0 0 0 3px rgba(140,140,140,.22); }
.comm-mark:focus { box-shadow:0 0 0 3px rgba(59,70,214,.35); }
.comm-mark:disabled { opacity:.55; cursor:progress; }
.comm-mark option { background:#fff; color:#1e293b; font-weight:600; text-align:left; }
/* 「恢复自动判定」入口：只在该阶段被人工指定过时出现，平时隐藏、行悬停才浮现，不占版面 */
.comm-unlock {
  -webkit-appearance:none; appearance:none;
  width:16px; height:16px; padding:0; margin-left:4px;
  border:1px solid #cbd5e1; border-radius:4px;
  background:#fff; color:#64748b;
  font-size:11px; line-height:1; cursor:pointer;
  vertical-align:middle; opacity:.45; transition:opacity .12s, color .12s, border-color .12s;
}
.comm-tbl tr:hover .comm-unlock { opacity:1; }
.comm-unlock:hover { opacity:1 !important; color:#b45309; border-color:#f59e0b; background:#fffbeb; }
.comm-unlock:disabled { opacity:.35 !important; cursor:progress; }
/* 金额：可编辑输入框（归档后 locked 置灰） */
.comm-amt {
  display:inline-block;
  width:66px;
  margin-left:6px;
  padding:2px 5px;
  border:1px solid #cbd5e1;
  border-radius:5px;
  font-size:13px;
  font-weight:600;
  font-variant-numeric:tabular-nums;
  color:#1e293b;
  background:#fff;
  vertical-align:middle;
  text-align:right;
}
.comm-amt:focus { outline:none; border-color:#3b46d6; box-shadow:0 0 0 2px rgba(59,70,214,.16); }
/* 去掉数字输入框的上下增减箭头，直接填写金额 */
.comm-amt::-webkit-outer-spin-button,
.comm-amt::-webkit-inner-spin-button { -webkit-appearance:none; margin:0; }
.comm-amt { -moz-appearance:textfield; appearance:textfield; }
.comm-amt.locked, .comm-amt:disabled { background:#f1f5f9; color:#94a3b8; border-color:#e2e8f0; cursor:not-allowed; }
/* 触发月份小标签 */
.comm-ym { margin-left:5px; font-size:11px; color:#94a3b8; font-variant-numeric:tabular-nums; }
/* 备注输入 */
.comm-remark {
  width:100%; padding:3px 6px; border:1px solid #cbd5e1; border-radius:5px;
  font-size:12px; color:#1e293b; background:#fff; box-sizing:border-box;
}
.comm-remark:focus { outline:none; border-color:#3b46d6; box-shadow:0 0 0 2px rgba(59,70,214,.16); }
.comm-remark:disabled { background:#f1f5f9; color:#94a3b8; }
/* 申请号小字 */
.comm-no { display:block; font-size:11px; color:#94a3b8; margin-top:2px; }
/* 归档区 */
.comm-arch {
  margin-top:14px; padding:12px 16px; border-radius:8px; font-size:13px;
  background:#fff7ed; border:1px solid #fed7aa; color:#9a3412;
  display:flex; align-items:center; gap:12px; flex-wrap:wrap;
}
.comm-arch.done { background:#f0fdf4; border-color:#bbf7d0; color:#166534; }
.comm-arch.final { background:#eef2ff; border-color:#c7d2fe; color:#3730a3; }
.comm-arch b { font-size:14px; }
.comm-arch-txt { flex:1 1 460px; line-height:1.75; }
.comm-arch-btns { display:flex; gap:8px; flex-wrap:wrap; }
/* 归档记录（已归档月份清单） */
.comm-archlist { margin-top:14px; padding:14px 16px; border:1px solid #dbe3ef; border-radius:10px; background:#fbfcfe; }
.archlist-head { font-size:14px; font-weight:700; color:#0f172a; display:flex; align-items:baseline; flex-wrap:wrap; gap:4px; }
.arch-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(232px, 1fr)); gap:10px; margin-top:10px; }
.arch-card {
  display:flex; flex-direction:column; gap:3px; text-align:left; padding:10px 12px; border-radius:9px;
  border:1px solid #e2e8f0; background:#fff; cursor:pointer; font:inherit; font-size:12px; color:#475569;
}
.arch-card:hover { border-color:#3b46d6; background:#f5f7ff; box-shadow:0 2px 8px rgba(59,70,214,.12); }
.arch-card.cur { border-color:#86efac; background:#f0fdf4; }
.arch-card .ac-top { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.arch-card .ac-top b { font-size:13px; color:#0f172a; }
.arch-card .ac-total { font-weight:700; color:#c2410c; }
.arch-card.cur .ac-total { color:#166534; }
.arch-card .ac-line { color:#64748b; }
.arch-card .ac-line.muted { color:#94a3b8; font-size:11px; }
.arch-card .ac-go { margin-top:2px; color:#3b46d6; font-weight:600; }
.arch-card .ac-badge { align-self:flex-start; margin-top:2px; padding:1px 7px; border-radius:999px; font-size:11px; font-weight:700; }
.arch-card .ac-badge.final { background:#dcfce7; color:#166534; }
.arch-card .ac-badge.open { background:#fef3c7; color:#92400e; }
.arch-card .ac-acts { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-top:2px; }
.arch-card .ac-dl {
  border:1px solid #c7d2fe; background:#eef2ff; color:#3730a3; border-radius:6px;
  padding:2px 8px; font-size:11px; font-weight:700; cursor:pointer; font-family:inherit;
}
.arch-card .ac-dl:hover { background:#e0e7ff; border-color:#a5b4fc; }
/* 归档数据弹窗 */
.arch-meta {
  display:flex; flex-wrap:wrap; gap:6px 18px; font-size:13px; color:#475569;
  background:#f1f5f9; border-radius:8px; padding:9px 12px; margin-bottom:10px;
}
.arch-meta b { color:#0f172a; }
.arch-tbl .am-mark { font-weight:700; }
.arch-tbl .am-mark.ok { color:#15803d; }
.arch-tbl .am-mark.no { color:#b91c1c; }
.arch-tbl .am-mark.muted { color:#94a3b8; }
/* 链接式按钮（对应进度） */
.linkbtn {
  background:none; border:none; color:#3b46d6; cursor:pointer;
  font-size:13px; padding:2px 4px; border-radius:4px;
}
.linkbtn:hover { background:#eef2ff; text-decoration:underline; }
/* 进度详情弹窗 */
.pd-meta { font-size:12px; color:#64748b; margin-bottom:10px; }
.pd-tbl { width:100%; border-collapse:collapse; font-size:13px; }
.pd-tbl th { width:38%; text-align:left; background:#f8fafc; color:#475569; font-weight:600;
  border:1px solid #e2e8f0; padding:6px 10px; }
.pd-tbl td { border:1px solid #e2e8f0; padding:6px 10px; color:#0f172a; word-break:break-all; }
/* 工具栏复选 */
.comm-chk { display:inline-flex; align-items:center; gap:5px; font-weight:500; font-size:13px; cursor:pointer; }
.comm-bar .addbtn.primary { background:#3b46d6; color:#fff; border-color:#3b46d6; }
.comm-owner {margin-top:12px;padding:10px 14px;background:#eff6ff;border:1px solid #bfdbfe;border-radius:8px;font-size:14px;color:#1e3a8a}
.comm-hint {color:#64748b;font-size:12px}

/* 后台「提成类型」页列宽
   原先前期/后期提成 + 两个触发条件 4 列一刀切 132px：金额列（只放「¥10」）浪费，
   后期触发条件（多选，实测需要约 245px）被挤到换行看不清。改为按内容分配：
   金额列窄化 → 触发条件列各取所需（后期更宽）→ 说明列主动让位并允许折行。 */
th.col-camt, td.col-camt { width:82px; min-width:82px; max-width:82px; }
th.col-ctrig, td.col-ctrig { width:150px; min-width:150px; max-width:150px; }
th.col-cpost, td.col-cpost { width:250px; min-width:250px; max-width:250px; }
th.col-cdesc, td.col-cdesc { width:190px; min-width:140px; max-width:280px; white-space:normal; word-break:break-word; font-size:12px; color:#64748b; }
/* 触发条件标签本身不折行，整列窄了才整体换行，保证每个标签读得完整 */
th.col-ctrig .tag, td.col-ctrig .tag,
th.col-cpost .tag, td.col-cpost .tag { white-space:nowrap; }

/* ============ 工资表核算（📅 出勤统计 / 💰 工资单 / 👤 员工花名册）============ */
/* 工资单列很多（22 列），给个最小宽度让表格横向滚动而不是把每列挤成两行；
   同时把内边距收紧一档，22 列在 1600px 屏上尽量少滚一点 */
.pay-tbl { min-width: 1600px; }
.pay-tbl td, .pay-tbl th { padding: 6px 9px; }
.tblwrap td.num, .tblwrap th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* 合计行：与数据行明显区分（底色 + 上线） */
tr.pay-sum td { background: #f1f5f9; font-weight: 700; border-top: 2px solid var(--line); }
/* 应发 / 实发 / 扣款三色区分，扫一眼就能分块 */
.pay-gross { color: #0f766e; }
.pay-net { color: #b91c1c; }
.pay-ded { color: #b45309; }
/* 「自动」小标：实出勤是按口径算出来的（不是手填） */
.pay-auto { margin-left: 4px; font-size: 10px; font-weight: 400; color: #94a3b8;
  border: 1px solid #e2e8f0; border-radius: 3px; padding: 0 3px; vertical-align: middle; }
/* 离职员工整行淡化 */
tr.pay-off td { opacity: .5; }
/* 用户管理里的单行复选（如「允许查看工资表核算」） */
.chk-inline { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; cursor: pointer; font-size: 13px; }

/* ============ 出勤统计：自动计算字段（只读展示，随表单其它字段实时重算）============ */
#mform input.ro-field { background: #f1f5f9; color: var(--text); font-variant-numeric: tabular-nums; cursor: default; }
#mform input.ro-field.num-units { font-weight: 700; }
/* 公式说明条：把当月天数与各项天数代入，填的过程中实时更新 */
.att-calc-tip { line-height: 1.75; }
.att-calc-tip b { color: #3b46d6; }

/* ============ 工资单「个税」自动计算（累计预扣预缴，允许人工改）============ */
.autotax-wrap { display: flex; gap: 6px; align-items: center; }
.autotax-wrap input { flex: 1; min-width: 0; background: #f8fafc; font-variant-numeric: tabular-nums; font-weight: 600; }
.autotax-wrap input:focus { background: #fff; }
.autotax-wrap .tax-reset { flex: none; height: 32px; padding: 0 9px; font-size: 12px; line-height: 1;
  border: 1px solid var(--line); background: #fff; border-radius: 6px; cursor: pointer; color: #475569; white-space: nowrap; }
.autotax-wrap .tax-reset:hover { border-color: #3b46d6; color: #3b46d6; }
/* 个税算式说明条：把累计收入、减除费用、社保公积金、专项附加逐项代入 */
.tax-calc-tip { line-height: 1.85; }
.tax-calc-tip b { color: #3b46d6; }
.tax-calc-tip .tax-manual { color: #b45309; }

/* ============ 提成管理：右上角「?」说明按钮 + 说明弹窗 ============ */
.comm-head { justify-content: flex-start; }
.help-btn { margin-left: auto; flex: none; width: 22px; height: 22px; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--line); background: #fff; color: var(--primary); font-size: 13px; font-weight: 700;
  line-height: 1; display: inline-flex; align-items: center; justify-content: center; font-family: inherit; padding: 0; }
.help-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
/* ---- 需求121：鼠标悬停才显示的「?」气泡（移开即隐藏，纯 CSS，无点击）---- */
.hover-help { margin-left: auto; flex: none; position: relative; display: inline-flex; align-items: center; }
/* 外层只负责定位与「悬停桥」：padding-top 让鼠标从按钮移到气泡时不丢 hover */
.hover-help-pop { position: absolute; top: 100%; right: 0; padding-top: 9px; z-index: 90; display: none; }
.hover-help:hover .hover-help-pop,
.hover-help:focus-within .hover-help-pop { display: block; }
.hover-help-card { width: 700px; max-width: calc(100vw - 80px); max-height: 68vh; overflow: auto;
  background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px 10px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .18); text-align: left; }
.hover-help-card .help-p { margin: 0 0 6px; }
.hover-help-card .help-sec { margin: 0 0 13px; }
.hover-help-card .help-kbd { padding: 1px 5px; white-space: nowrap; }
/* 说明较长时（如提成管理）用宽卡 + 双栏排版，避免在悬停气泡里还要滚动才能看全 */
.hover-help-card.wide { width: 1080px; padding: 16px 18px 14px; }
.help-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 26px; align-items: start; }
.help-cols .help-col { min-width: 0; }
.help-cols .help-sec:last-child { margin-bottom: 0; }
.help-sec { margin: 0 0 16px; }
.help-sec:last-child { margin-bottom: 0; }
.help-sec h4 { margin: 0 0 8px; font-size: 14px; color: var(--primary-d); display: flex; align-items: center; gap: 8px; }
.help-no { flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--primary); color: #fff;
  font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.help-p { margin: 0 0 8px; font-size: 13px; color: var(--muted); line-height: 1.7; }
.help-ul { margin: 0; padding-left: 20px; font-size: 13px; color: #475569; line-height: 1.95; }
.help-ul b { color: #0f172a; }
.help-kbd { display: inline-block; min-width: 18px; text-align: center; padding: 0 4px; border-radius: 4px;
  background: #eef2ff; color: #3b46d6; font-weight: 700; }
.help-tbl { width: 100%; border-collapse: collapse; font-size: 13px; margin: 0 0 10px; }
.help-tbl th, .help-tbl td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; }
.help-tbl th { background: #f8fafc; color: #475569; font-weight: 600; }
.help-tbl td:first-child { width: 34%; color: #0f172a; font-weight: 600; }
