/* =========================================================
 * 暖暖生产ERP · 前端演示原型 · 样式（原创设计）
 * ========================================================= */
:root {
  --primary: #3157c9;
  --primary-dark: #23439f;
  --primary-light: #eef2ff;
  --sidebar-bg: #1d2438;
  --sidebar-sub: #151a29;
  --text: #1f2733;
  --muted: #667085;
  --border: #e4e8f0;
  --bg: #f4f6fb;
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
  --info: #0891b2;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(16,24,40,.06), 0 4px 16px rgba(16,24,40,.08);
  font-size: 14px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  color: var(--text);
  background: var(--bg);
  overflow: hidden;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 13px; }

/* ---------- 登录 ---------- */
.login-wrap {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1d2438 0%, #3157c9 55%, #5b7fe0 100%);
}
.login-card {
  width: 380px; background: #fff; border-radius: 14px; padding: 34px 34px 30px;
  box-shadow: 0 20px 60px rgba(0,0,0,.28);
}
.login-logo { text-align: center; margin-bottom: 22px; }
.login-logo .mark {
  display: inline-flex; width: 54px; height: 54px; border-radius: 14px;
  background: var(--primary); color: #fff; font-size: 26px; font-weight: 700;
  align-items: center; justify-content: center;
}
.login-logo h1 { font-size: 20px; margin-top: 12px; letter-spacing: 1px; }
.login-logo p { color: var(--muted); font-size: 12px; margin-top: 4px; }
.form-item { margin-bottom: 16px; }
.form-item label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.form-item input {
  width: 100%; height: 40px; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0 12px; outline: none; transition: .15s;
}
.form-item input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(49,87,201,.12); }
.btn-primary {
  width: 100%; height: 42px; border: none; border-radius: var(--radius);
  background: var(--primary); color: #fff; font-size: 15px; letter-spacing: 4px;
  display: inline-flex; align-items: center; justify-content: center; line-height: 1.2;
}
.btn-primary:hover { background: var(--primary-dark); }
.login-tip { margin-top: 14px; text-align: center; color: var(--muted); font-size: 12px; }

/* ---------- 主布局 ---------- */
.app { display: flex; height: 100vh; }
.sidebar {
  width: 236px; flex: 0 0 236px; background: var(--sidebar-bg); color: #cdd3e1;
  display: flex; flex-direction: column; overflow: hidden;
}
.brand {
  height: 56px; display: flex; align-items: center; gap: 10px; padding: 0 16px;
  color: #fff; font-weight: 700; font-size: 16px; border-bottom: 1px solid rgba(255,255,255,.08);
}
.brand .mark { width: 30px; height: 30px; border-radius: 8px; background: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 15px; }
.nav { flex: 1; overflow-y: auto; padding: 8px 0 20px; }
.nav::-webkit-scrollbar { width: 6px; }
.nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 3px; }
.nav-group { margin-bottom: 2px; }
.nav-group-head {
  display: flex; align-items: center; gap: 9px; padding: 10px 16px; cursor: pointer;
  font-size: 13.5px; color: #e7ebf4; user-select: none; border-left: 3px solid transparent;
}
.nav-group-head:hover { background: rgba(255,255,255,.05); }
.nav-group-head .arrow { margin-left: auto; transition: transform .18s; font-size: 11px; opacity: .6; }
.nav-group.open .nav-group-head .arrow { transform: rotate(90deg); }
.nav-group-head.active { border-left-color: #6d8cf5; background: rgba(109,140,245,.14); color: #fff; }
.nav-children { display: none; background: var(--sidebar-sub); }
.nav-group.open .nav-children { display: block; }
.nav-item {
  display: block; padding: 8px 16px 8px 40px; font-size: 12.5px; color: #aab3c8;
  cursor: pointer; border-left: 3px solid transparent; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nav-item:hover { color: #fff; background: rgba(255,255,255,.04); }
.nav-item.active { color: #fff; border-left-color: #6d8cf5; background: rgba(109,140,245,.18); }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: 56px; background: #fff; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 18px; gap: 16px; flex: 0 0 56px;
}
.topbar .title { font-size: 15px; font-weight: 600; }
.topbar .crumb { color: var(--muted); font-size: 12.5px; }
.topbar .spacer { flex: 1; }
.user {
  display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted);
}
.user .avatar {
  width: 30px; height: 30px; border-radius: 50%; background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 13px;
}
.tabbar {
  height: 38px; background: #fff; border-bottom: 1px solid var(--border);
  display: flex; align-items: flex-end; padding: 0 8px; gap: 2px; flex: 0 0 38px; overflow-x: auto;
}
.tab {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; font-size: 12.5px;
  border: 1px solid transparent; border-bottom: none; border-radius: 6px 6px 0 0;
  color: var(--muted); cursor: pointer; white-space: nowrap; max-width: 180px;
}
.tab .label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tab.active { color: var(--primary); background: var(--bg); border-color: var(--border); font-weight: 600; }
.tab .close { opacity: .5; font-size: 12px; line-height: 1; padding: 0 2px; }
.tab .close:hover { opacity: 1; color: var(--danger); }
.content { flex: 1; overflow: auto; padding: 16px 18px; }

/* ---------- 通用组件 ---------- */
.card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-hd { padding: 14px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.card-hd h3 { font-size: 14.5px; }
.card-bd { padding: 16px; }
.card-bd.flush { padding: 0; }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .grow { flex: 1; }
.search-input, .select, .input {
  height: 34px; border: 1px solid var(--border); border-radius: 6px; padding: 0 10px; outline: none; background: #fff;
}
.search-input:focus, .select:focus, .input:focus { border-color: var(--primary); }
.btn {
  height: 34px; padding: 0 14px; border-radius: 6px; border: 1px solid var(--border);
  background: #fff; color: var(--text); font-size: 13px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; line-height: 1.2;
}
.btn:hover { background: #f6f8fc; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-dark); }
.btn.danger { color: var(--danger); border-color: #fecaca; }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12px; }
.btn.ghost { background: transparent; border: none; color: var(--primary); }

table.grid { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.grid th, table.grid td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--border); }
table.grid th { background: #f8fafc; color: #475467; font-weight: 600; white-space: nowrap; position: sticky; top: 0; }
table.grid tbody tr:hover { background: #fafbff; }
table.grid td.num { text-align: right; font-variant-numeric: tabular-nums; }
table.grid th.num { text-align: right; }
/* 工序行拖动手柄（大货生产单）2026-09-18 */
.pr-drag{cursor:grab;color:#b3c0d1;margin-right:6px;font-size:16px;user-select:none;line-height:1;}
.pr-drag:hover{color:#1677ff;}
tr.pr-dragging td{background:#e8f1ff !important;}   /* 数字列的表头也要右对齐，否则表头和数据对不上 */
table.grid .op { color: var(--primary); cursor: pointer; margin-right: 10px; white-space: nowrap; }
table.grid .op.danger { color: var(--danger); }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }

.badge { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 11.5px; line-height: 1.6; }
.badge.green { background: #ecfdf3; color: var(--success); }
.badge.amber { background: #fff7ed; color: var(--warning); }
.badge.red { background: #fef2f2; color: var(--danger); }
.badge.blue { background: #eff6ff; color: var(--primary); }
.badge.gray { background: #f2f4f7; color: var(--muted); }

/* 弹窗 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(16,24,40,.45); display: flex;
  align-items: center; justify-content: center; z-index: 50;
}
.modal { width: 860px; max-width: 94vw; max-height: 88vh; background: #fff; border-radius: 10px; display: flex; flex-direction: column; box-shadow: 0 24px 60px rgba(0,0,0,.3); }
.modal-hd { padding: 14px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; }
.modal-hd h3 { font-size: 15px; }
.modal-hd .x { margin-left: auto; cursor: pointer; color: var(--muted); font-size: 20px; line-height: 1; }
.modal-bd { padding: 18px; overflow: auto; flex: 1; }
.modal-ft { padding: 14px 18px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.field .select, .field .input, .field input { width: 100%; height: 34px; border: 1px solid var(--border); border-radius: 6px; padding: 0 10px; outline: none; }
.field input:focus, .field .select:focus { border-color: var(--primary); }

/* 明细表格（单据行） */
.detail-wrap { border: 1px solid var(--border); border-radius: 6px; overflow: auto; margin-top: 14px; }
.detail-wrap table.grid td input, .detail-wrap table.grid td select {
  height: 30px; border: 1px solid var(--border); border-radius: 5px; padding: 0 6px; width: 100%; min-width: 70px;
}

/* 仪表盘 */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.kpi { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.kpi .k { color: var(--muted); font-size: 12.5px; }
.kpi .v { font-size: 26px; font-weight: 700; margin: 8px 0 4px; }
.kpi .s { font-size: 12px; color: var(--muted); }
.kpi .v.blue { color: var(--primary); } .kpi .v.green { color: var(--success); } .kpi .v.amber { color: var(--warning); } .kpi .v.red { color: var(--danger); }
.dash-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 14px; }
.bars { display: flex; align-items: flex-end; gap: 14px; height: 180px; padding: 10px 6px 0; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bar { width: 70%; background: linear-gradient(180deg, #6d8cf5, #3157c9); border-radius: 4px 4px 0 0; min-height: 4px; }
.bar-label { font-size: 11.5px; color: var(--muted); }
.bar-val { font-size: 11px; color: var(--text); }
.list-simple { list-style: none; }
.list-simple li { display: flex; justify-content: space-between; padding: 9px 2px; border-bottom: 1px dashed var(--border); font-size: 12.5px; }
.list-simple li:last-child { border-bottom: none; }
.list-simple .b { font-weight: 600; }

.footer-note { margin-top: 16px; color: var(--muted); font-size: 12px; text-align: center; }
.hint { color: var(--muted); font-size: 12px; line-height: 1.7; }
.hint b { color: var(--primary); }
@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
}

/* ---------- 打样单：紧凑表格样式 ---------- */
.ws-compact { font-size: 12px; }
.ws-compact .ws-sec { background: #eef2ff; color: #23439f; font-weight: 600; font-size: 12.5px; padding: 5px 8px; border-radius: 4px; margin: 8px 0 3px; }
.inp { height: 30px; border: 1px solid var(--border); border-radius: 4px; padding: 0 8px; font-size: 13px; box-sizing: border-box; }
table.ws-table { border-collapse: collapse; width: 100%; }
table.ws-table th { background: #f8fafc; color: #475467; font-weight: 600; font-size: 11.5px; padding: 4px 8px; text-align: left; white-space: nowrap; width: 64px; }
table.ws-table td { padding: 3px 8px; }
table.ws-table .inp { width: 100%; }
#ds-procs .inp, #ds-mats .inp { height: 29px; }
#ds-procs table.grid th, #ds-procs table.grid td, #ds-mats table.grid th, #ds-mats table.grid td { padding: 3px 6px; }
.card-hd h3 { margin: 0; }

/* ---------- 打样单：紧凑网格布局（仿表格、非 <table>） ---------- */
.ws-grid { display: grid; grid-template-columns: 76px 210px 76px 210px; gap: 6px 14px; align-items: center; max-width: 660px; }
.ws-grid .ws-cap { color: #667085; font-size: 13px; white-space: nowrap; padding: 5px 0; }
.ws-grid .inp { width: 100%; min-width: 0; }
.ws-row2 { display: grid; grid-template-columns: 70px 1fr 1fr 70px 60px 70px 40px 100px 30px; gap: 4px; align-items: center; margin-bottom: 4px; }
.ws-row3 { display: grid; grid-template-columns: 20px 1fr 1fr 60px 78px 92px; gap: 4px; align-items: center; margin-bottom: 4px; }
.ws-head { background: #f1f5ff; border-radius: 4px; padding: 3px 4px; font-weight: 600; color: #475467; font-size: 11.5px; }
.ws-head span { padding: 0 2px; }
.ws-row2 .inp, .ws-row3 .inp { width: 100%; }
.ws-sec { cursor: pointer; user-select: none; }
.ws-arrow { display: inline-block; width: 16px; }
.ws-size { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr; gap: 6px 8px; align-items: center; }
.ws-size .ws-cap { color: #667085; font-size: 13px; white-space: nowrap; padding: 2px 0; }
.ws-size .inp { width: 64px; }


.mat-img img { max-width: 80px; max-height: 60px; border: 1px solid var(--border); border-radius: 4px; margin: 2px; }
.mat-img input[type=file] { font-size: 11px; width: 100%; }


.mini-btn { height: 24px; padding: 0 6px; font-size: 12px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }

/* 毛纱一行布局 */
.ws-yarn-row { display: grid; grid-template-columns: 88px 170px 60px 170px 58px 250px 60px 140px; gap: 6px 14px; align-items: center; margin: 6px 0; }
.ws-yarn-row .inp { width: 100%; }
.yarn-img-ctl { display: flex; gap: 4px; align-items: center; }
.yarn-img-ctl input[type=file] { font-size: 11px; }
.yarn-img-ctl label.btn { cursor: pointer; }



.paste-box { width: 180px; height: 90px; border: 1px dashed var(--border); border-radius: 4px; position: relative; display: flex; flex-wrap: wrap; align-items: stretch; justify-content: flex-start; gap: 2px; overflow: hidden; background: #fafbff; cursor: text; box-sizing: border-box; }
.paste-box:focus { border-color: var(--primary); outline: none; } .pb-hint { color: var(--muted); font-size: 11px; text-align: center; width: 100%; } .pb-thumb { position: relative; flex: 1 1 auto; min-width: 0; height: 100%; } .pb-thumb img { width: 100%; height: 100%; object-fit: contain; object-position: center; } .pb-del { position: absolute; top: 0; right: 0; background: #fff; border-radius: 4px; z-index: 5; padding: 0 3px; }
.img-thumbs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.paste-box-sm { width: 110px; height: 60px; }

.df-grid { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.df-field { display: flex; align-items: center; gap: 6px; }
.df-field .ws-cap { white-space: nowrap; padding: 0 2px; }
.df-field .inp { width: 100%; min-width: 70px; }
.df-w1 { width: 150px; } .df-w2 { width: 240px; } .df-w3 { width: 340px; }
.fs-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--border); }
.fs-label { flex: 1; }

.adj-grid { display: flex; flex-wrap: wrap; gap: 10px; padding: 6px; }
.adj-block { position: relative; border: 1px solid var(--border); border-radius: 4px; padding: 8px 10px; background: #fafbff; cursor: grab; user-select: none; box-sizing: border-box; }
.adj-block:hover { border-color: var(--primary); }
.adj-label { font-size: 13px; color: var(--text); }
.adj-resize { position: absolute; right: 0; bottom: 0; width: 14px; height: 14px; cursor: nwse-resize; border-left: 1px solid var(--border); border-top: 1px solid var(--border); }
.adj-drag { position: fixed; z-index: 999; opacity: .8; box-shadow: 0 8px 24px rgba(0,0,0,.2); pointer-events: none; }


.adj-del { position: absolute; top: 2px; right: 4px; cursor: pointer; color: var(--danger); font-weight: 700; z-index: 3; }

.adjusting .df-field { border: 1px dashed var(--primary); background: #fbfcff; cursor: grab; position: relative; }
.df-resize { position: absolute; right: 0; bottom: 0; width: 14px; height: 14px; cursor: nwse-resize; background: var(--primary); border-radius: 2px 0 0 0; }
.adj-toolbar { display: flex; align-items: center; gap: 8px; padding: 6px 8px; background: #eef2ff; border-radius: 4px; margin-bottom: 8px; font-size: 12px; }
.adj-toolbar .hint { color: #475467; }
.adj-drag { position: fixed; z-index: 999; opacity: .8; box-shadow: 0 8px 24px rgba(0,0,0,.2); pointer-events: none; }


.adj-del-inline { position: absolute; top: 2px; right: 4px; cursor: pointer; color: var(--danger); font-weight: 700; z-index: 4; font-size: 12px; background: #fff; padding: 0 4px; border-radius: 4px; }

.df-canvas { position: relative; padding: 4px; }
.df-abs { box-sizing: border-box; }

.grid-scroll { overflow: auto; max-height: 62vh; border: 1px solid var(--border); border-radius: 4px; }
.grid-grid { border-collapse: collapse; table-layout: fixed; min-width: 100%; }
.grid-grid th, .grid-grid td { border: 1px solid var(--border); }
.gcorner { width: 30px; background: #f1f5ff; }
.gch { background: #f1f5ff; font-size: 11px; color: #475467; position: relative; padding: 2px 0; text-align: center; }
.gch-r { position: absolute; right: 0; top: 0; bottom: 0; width: 5px; cursor: col-resize; }
.grh { background: #f1f5ff; font-size: 11px; color: #475467; position: relative; width: 30px; text-align: center; }
.grh-r { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; cursor: row-resize; }
.gc { font-size: 12px; padding: 3px; vertical-align: middle; text-align: center; word-break: break-all; position: relative; }
.gc:focus { outline: 2px solid var(--primary); }
.gc img { border-radius: 3px; }
.gc-a, .gc-b { background: #dbeafe !important; }
.grid-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.gc-sel { background: #bfdbfe !important; }
.grid-img { position: absolute; cursor: move; }
.grid-img img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 3px; }
.grid-img .gimg-r { position: absolute; right: -5px; bottom: -5px; width: 14px; height: 14px; background: var(--primary); cursor: nwse-resize; border-radius: 2px; }
.gc-embed-img { position: absolute; left: 0; top: 0; width: 100%; height: 100%; object-fit: contain; object-position: center; display: block; max-width: none; max-height: none; }





.gimg-del { position: absolute; top: -8px; right: -8px; width: 18px; height: 18px; background: var(--danger); color: #fff; border-radius: 50%; text-align: center; line-height: 18px; font-size: 13px; cursor: pointer; z-index: 3; }

/* ---------- 打样单：多面板折叠 ---------- */
.dw-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.dw-panel-arrow { display: inline-block; width: 18px; cursor: pointer; color: var(--primary); font-weight: 700; }
.dw-panel-content { padding: 10px 12px; border-top: 1px solid var(--border); }
.dw-foot { display: flex; justify-content: flex-end; gap: 10px; padding-top: 10px; margin-top: 10px; border-top: 1px solid var(--border); }

.dw-thumb { width: 34px; height: 34px; object-fit: cover; border: 1px solid var(--border); border-radius: 4px; margin-right: 6px; flex: 0 0 auto; }
.dw-thumb-empty { display: inline-flex; align-items: center; justify-content: center; background: #f1f5ff; color: #94a3b8; font-size: 11px; }

.grid-color-box { display: inline-flex; align-items: center; gap: 4px; margin: 0 4px; }
.grid-color-box input[type=color] { width: 30px; height: 24px; border: 1px solid var(--border); border-radius: 4px; padding: 0; background: #fff; cursor: pointer; }
.grid-swatches { display: inline-flex; gap: 3px; }
.grid-swatch { width: 16px; height: 16px; border: 1px solid var(--border); border-radius: 3px; cursor: pointer; display: inline-block; }

/* ---------- 生产大货进度 ---------- */
.bar { height: 8px; background: #e5e7eb; border-radius: 999px; overflow: hidden; flex: 1; min-width: 60px; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, #2563eb, #38bdf8); border-radius: 999px; }
.bar.sm { height: 6px; }
.pb-steps { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.pb-step { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.pb-name { width: 76px; color: #475467; white-space: nowrap; }
.pb-num { width: 76px; text-align: right; color: #667085; font-variant-numeric: tabular-nums; }

/* 2026-10-10 老板要求：供应商列别那么宽、别挤别的列 → 名称仍占剩余空间，供应商固定 200px */
/* 2026-10-10 老板要求：① 类型/单位被切了要加宽 ② 多余宽度要「匀给类型和单位」，别留在末尾。
   做法：类型 / 名称 / 单位 三列都吃弹性空间（按 1 : 3 : 1 分），固定列一个不动：
   图片74 │ 类型 min90 │ 名称 min220 │ 供应商200 │ 用量70 │ 单位 min80 │ 单价·历史价150 │ 单件价70 │ 删30 */
.ws-row4 { display: grid; grid-template-columns: 74px minmax(90px, 1fr) minmax(220px, 3fr) 200px 70px minmax(80px, 1fr) 150px 70px 30px; gap: 4px; align-items: center; margin-bottom: 4px; }
.ws-row4 .inp { width: 100%; }
/* ---------- 名称自动搜索候选 ---------- */
.pm-sug {
  position: fixed; z-index: 1000; background: #fff; border: 1px solid var(--border);
  border-radius: 6px; box-shadow: var(--shadow); max-height: 210px; overflow: auto;
  font-size: 13px; padding: 4px;
}
.pm-sug .pm-sug-item {
  padding: 6px 10px; cursor: pointer; border-radius: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pm-sug .pm-sug-item:hover, .pm-sug .pm-sug-item.active { background: var(--primary-light); color: var(--primary); }
.machine-sug {
  position: fixed; z-index: 1000; background: #fff; border: 1px solid var(--border);
  border-radius: 6px; box-shadow: var(--shadow); max-height: 210px; overflow: auto;
  font-size: 13px; padding: 4px;
}
.machine-sug .machine-sug-item {
  padding: 6px 10px; cursor: pointer; border-radius: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.machine-sug .machine-sug-item:hover, .machine-sug .machine-sug-item.active { background: var(--primary-light); color: var(--primary); }
/* ---------- 制版登记 底部 进行中/已确定 视图栏 ---------- */
.pview-bar {
  display: flex; align-items: center; gap: 8px;
  margin-top: 10px; padding: 8px 10px;
  border: 1px solid var(--border); border-radius: 8px; background: #fff;
}
.pview-bar .btn.sm { padding: 4px 12px; }
.pview-bar .hint { color: var(--muted); font-size: 12px; }
/* ---------- 制版登记 状态分类筛选栏 ---------- */
.pfilter-bar {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  margin: 0 0 8px; padding: 6px 8px;
  border: 1px solid var(--border); border-radius: 8px; background: #fff;
}
.pfilter {
  border: 1px solid var(--border); background: #fff; color: var(--text);
  border-radius: 6px; padding: 4px 10px; font-size: 13px; cursor: pointer;
}
.pfilter:hover { border-color: var(--primary); color: var(--primary); }
.pfilter.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---------- 材料订货单（打印样式） ---------- */
.ord-print { max-width: 720px; margin: 0 auto; padding: 12px; font-family: "SimSun", "Songti SC", serif; }
.ord-print h2 { text-align: center; font-size: 26px; letter-spacing: 8px; margin: 6px 0 14px; }
.ord-table, .ord-info { width: 100%; border-collapse: collapse; margin-bottom: 12px; }
.ord-table th, .ord-table td, .ord-info td { border: 1px solid #333; padding: 6px 10px; font-size: 14px; }
.ord-table th { background: #f2f2f2; font-weight: 600; text-align: center; }
.ord-table td { text-align: left; }
.ord-table .ord-seq, .ord-table .ord-qty { text-align: center; }
.ord-info .ord-label { width: 90px; background: #f2f2f2; text-align: center; font-weight: 600; }
.ord-actions { text-align: center; margin-top: 10px; }
@media print {
  body * { visibility: hidden; }
  .ord-print, .ord-print * { visibility: visible; }
  .ord-print { position: absolute; left: 0; top: 0; width: 100%; }
}
/* ---------- 制版登记 可折叠工序 ---------- */
.pt-collapse-hd {
  margin: 12px 0 6px; padding: 8px 10px; background: #f1f5ff; border: 1px solid var(--border); border-radius: 6px;
  cursor: pointer; font-weight: 600; font-size: 13px; user-select: none;
}
/* ---------- 制版登记 时效 ---------- */
.pt-elapsed { color: var(--muted); font-size: 12px; white-space: nowrap; }
.pt-elapsed.overdue { color: var(--danger); font-weight: 700; }


/* ---------- 大货进度看板 圆形工序进度 ---------- */
.pb-circ { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 72px; }
.pb-ring { width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.pb-ring-in { width: 42px; height: 42px; background: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.pb-ring-num { font-size: 11px; font-weight: 700; color: var(--text); }
.pb-circ-name { font-size: 11px; color: #475467; white-space: nowrap; width: 72px; text-align: center; overflow: hidden; text-overflow: ellipsis; }
.pb-circ-num { font-size: 10px; color: #667085; }\n\n/* 订货单 物料图片 */\n.ord-img-hd { margin: 10px 0 4px; font-weight: 600; font-size: 13px; }\n.ord-imgs { display: flex; flex-wrap: wrap; gap: 4px; }\n
.prod-batch-menu { position:absolute; z-index:500; background:#fff; border:1px solid var(--border); border-radius:6px; box-shadow:0 8px 24px rgba(0,0,0,.12); padding:4px; }
.prod-batch-menu button { display:block; width:100%; padding:7px 12px; border:none; background:none; text-align:left; cursor:pointer; font-size:13px; border-radius:4px; }
.prod-batch-menu button:hover { background:#f1f5f9; }
.prod-row-menu { position:fixed; z-index:3000; background:#fff; border:1px solid var(--border); border-radius:6px; box-shadow:0 10px 28px rgba(0,0,0,.16); padding:4px; min-width:178px; }
.prod-row-menu button { display:block; width:100%; padding:8px 12px; border:none; background:none; text-align:left; cursor:pointer; font-size:13px; border-radius:4px; white-space:nowrap; }
.prod-row-menu button:hover { background:#f1f5f9; }
.prod-row-menu button.danger { color:var(--danger); }
#prod-tbl table th:first-child, #prod-tbl table td:first-child { display:none; }
#prod-tbl.batch-mode table th:first-child, #prod-tbl.batch-mode table td:first-child { display:table-cell; }

/* ===== 大货进度看板：紧凑模式 ===== */
.pb-dense .card { margin-bottom: 8px !important; }
.pb-dense .card-hd { padding: 6px 12px !important; gap: 8px !important; }
.pb-dense .card-hd h3 { font-size: 15px !important; }
.pb-dense .card-bd { padding: 8px 12px 10px !important; }
.pb-dense .bar { height: 6px !important; }
.pb-dense .hint { margin: 4px 0 !important; line-height: 1.35 !important; }
.pb-dense .pb-steps { gap: 6px !important; margin-top: 4px !important; }
.pb-dense .pb-circ { width: 58px !important; gap: 2px !important; }
.pb-dense .pb-ring { width: 38px !important; height: 38px !important; }
.pb-dense .pb-ring-in { width: 29px !important; height: 29px !important; }
.pb-dense .pb-ring-num { font-size: 10.5px !important; }
.pb-dense .pb-circ-name { font-size: 11px !important; width: 58px !important; }
.pb-dense .pb-circ-shop { font-size: 10px !important; line-height: 1.15 !important; }
.pb-dense .pb-circ-num { font-size: 10px !important; }

.pb-dense .pb-color { font-size: 12px; color: #3157c9; background: #eef2ff; border: 1px solid #c7d2fe; border-radius: 999px; padding: 1px 9px; white-space: nowrap; }

.pb-dense .pb-circ-jst { border-left: 1px dashed #d0d5dd; padding-left: 8px; margin-left: 2px; }
.pb-dense .pb-circ-jst .pb-circ-name { color: #15803d; font-weight: 600; }
/* ---------- 大货单 · 毛纱/辅料订货表：修复下拉框被挤到看不见内容 ---------- */
.modal.modal-lg { width: 1320px; }
#po-mats { overflow-x: auto; }
#po-mats table.ws-table { min-width: 900px; }
#po-mats table.ws-table select.inp { min-width: 58px; }
#po-mats table.ws-table select[data-role="pmt-type"] { min-width: 92px; }
#po-mats table.ws-table select[data-role="pmt-supplier"] { min-width: 104px; }
#po-mats table.ws-table select[data-role="pmt-status"] { min-width: 74px; }
#po-mats table.ws-table input[data-role="pmt-name"] { min-width: 120px; }

/* ---------- 删除物料类型 ---------- */
.ty-del-list { max-height: 46vh; overflow: auto; margin-top: 8px; }
.ty-del-row { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-bottom: 1px solid var(--border); }
.ty-del-row > span:first-child { flex: 1; font-weight: 600; }
.ty-del-use { color: #667085; font-size: 12px; white-space: nowrap; }

/* ---------- 款式信息表（一版一卡，仿 Excel 带框表） ---------- */
.ss-card { border: 1px solid #b9c0cc; margin-bottom: 18px; background: #fff; display: inline-block; max-width: 100%; vertical-align: top; }
.ss-seq { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; background: #dbe5f7; border-bottom: 1px solid #b9c0cc; padding: 6px 8px; }
.ss-seq-lb { font-weight: 700; color: #1f3a68; margin-right: 4px; font-size: 13px; white-space: nowrap; }
.ss-chip { border: 1px solid #a9bad8; background: #fff; border-radius: 4px; padding: 2px 8px; font-size: 12px; color: #1f3a68; white-space: nowrap; }
.ss-chip b { color: #c2410c; font-weight: 700; margin-left: 4px; }
.ss-body { overflow-x: auto; }\n.ss-tbl { border-collapse: collapse; table-layout: fixed; }
.ss-tbl th, .ss-tbl td { border: 1px solid #ccd2dc; padding: 6px 8px; font-size: 12px; vertical-align: top; word-break: break-all; }
.ss-tbl thead th { background: #ffe600; font-weight: 700; text-align: center; color: #1a1a1a; }
.ss-tbl tbody td { background: #e9f2e9; }
.ss-img { text-align: center; vertical-align: middle; }
.ss-img img { max-width: 138px; max-height: 165px; cursor: zoom-in; border-radius: 2px; }
.ss-noimg { color: #98a2b3; font-size: 12px; }
.ss-style { font-weight: 700; font-size: 14px; line-height: 1.45; }
.ss-color { font-weight: 400; color: #475467; margin-top: 4px; font-size: 12px; }
.ss-sup { display: block; color: #667085; font-size: 11px; margin-top: 1px; }
.ss-dim { line-height: 1.9; }
.ss-qty { line-height: 1.9; color: #344054; }
.ss-last .ss-craft { color: #dc2626; font-weight: 700; width: 100%; }
.ss-w { color: #344054; }
.ss-price { color: #475467; margin-top: 4px; }
.ss-addr-lb { background: #0f9d58 !important; color: #fff; font-weight: 700; text-align: center; letter-spacing: 2px; }
.ss-addr-val { background: #0f9d58 !important; }
.ss-addr-inp { width: 100%; background: #fff; color: #0f5132; font-weight: 700; }
/* 手工改过的格子：橙色边框（默认值不加框） */
.ss-ovr { border-color: #f59e0b !important; }
.ss-warn { color: #c2410c; font-size: 11px; }

/* ---------- 待办事项：手动填的字体大一点 + 标红 ---------- */
/* 手填的待办：加大、加粗、加深，和下面系统生成的明显区分 */
.todo-list li { font-size: 17px; font-weight: 600; color: #111827; padding: 13px 2px; }
.todo-list li a { font-size: 13px; font-weight: 400; color: #6b7280; }
.todo-red { color: #cf1322 !important; font-weight: 700; }
/* 系统生成的那块：往下调、留出空白，视觉上分级 */
.todo-auto-hd { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--border); color: #98a2b3; font-size: 12px; margin-bottom: 4px; }
.todo-auto li { font-size: 12.5px; color: #98a2b3; font-weight: 400; }

/* ---------- 大货生产单：同款折叠 ---------- */
/* 2026-09-19 老板要求：收起/打开用颜色区分，收起的底色深一点 */
.prod-fold-chip { display:inline-flex; align-items:center; gap:4px; margin-top:3px; font-size:11px; line-height:1.55; color:#fff; background:#3157c9; border:1px solid #23439f; border-radius:999px; padding:1px 9px; cursor:pointer; white-space:nowrap; font-weight:600; box-shadow:0 1px 2px rgba(49,87,201,.28); }
.prod-fold-chip:hover { background:#23439f; border-color:#1b3480; box-shadow:0 2px 7px rgba(49,87,201,.38); }
.prod-fold-chip.open { color:#3157c9; background:#eef2ff; border-color:#9db6dd; font-weight:600; box-shadow:none; }
.prod-fold-chip.open:hover { background:#e1e9ff; }
.prod-fold-chip .prod-fold-arrow { color:#fff; font-size:11px; font-weight:700; line-height:1; margin-right:0; }
.prod-fold-chip.open .prod-fold-arrow { color:#3157c9; }
.prod-fold-sub { font-size:11px; color:#98a2b3; margin-top:2px; white-space:nowrap; }
/* 展开出来的追加单：底色加深，一眼看出「这些是从折叠里摊开的」 */
#prod-tbl tr.prod-fold-child > td { background:#dfe9f7; }
#prod-tbl tr.prod-fold-child > td:nth-child(2) { border-left:3px solid #7f9ec9; }
/* 2026-09-22 款式信息表：版里有图的地方都带出图（物料 / 下机尺寸 / 绣花·印花 / 每个颜色的版图）
   21:5x 老板说太小 → 物料图 30→46、绣花印花 78x48→120x66、下机尺寸 76x42→120x58 */
.ss-mrow { display: flex; align-items: flex-start; gap: 8px; }
.ss-mrow + .ss-mrow { margin-top: 6px; }
.ss-mimg { width: 46px; height: 46px; object-fit: cover; border: 1px solid var(--border); border-radius: 4px; cursor: zoom-in; background: #fff; flex: 0 0 auto; }
.ss-mtxt { min-width: 0; }
.ss-thumb { display: block; width: 100%; max-width: 120px; height: 66px; object-fit: cover; border: 1px solid var(--border); border-radius: 4px; cursor: zoom-in; background: #fff; margin-bottom: 5px; }
.ss-thumb-sm { display: block; width: 100%; max-width: 120px; height: 58px; object-fit: cover; border: 1px solid var(--border); border-radius: 4px; cursor: zoom-in; background: #fff; margin-top: 5px; }
.ss-cimgs { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.ss-cimg { width: 62px; }
.ss-cimgs .ss-cimg-b img { display: block; width: 62px; height: 62px; max-width: none; max-height: none; object-fit: cover; border: 1px solid var(--border); border-radius: 4px; cursor: zoom-in; background: #fff; }
.ss-cimg-n { font-size: 11px; color: #475467; text-align: center; margin-top: 2px; }
.ss-cimg-no { display: block; width: 62px; height: 62px; border: 1px dashed var(--border); border-radius: 4px; }

/* ---------- 2026-10-10 大货生产单：计划数量列收窄 + 工序进度格内滚动（整页不横滚） ---------- */
#prod-tbl > div > table.grid td.prod-plan-cell { max-width: 116px; }
#prod-tbl > div > table.grid td.prod-plan-cell .prod-fold-sub { white-space: normal; word-break: break-word; font-size: 10.5px; line-height: 1.25; }
#prod-tbl > div > table.grid td.prod-proc-cell { padding-left: 4px; padding-right: 4px; }
#prod-tbl > div > table.grid td.prod-proc-cell .prod-proc-scroll { width: 100%; overflow-x: auto; overflow-y: hidden; }
#prod-tbl > div > table.grid td.prod-proc-cell .prod-proc-scroll::-webkit-scrollbar { height: 6px; }
#prod-tbl > div > table.grid td.prod-proc-cell .prod-proc-scroll::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
#prod-tbl > div > table.grid td.prod-proc-cell .prod-proc-scroll::-webkit-scrollbar-track { background: #f1f5f9; border-radius: 3px; }

/* ---------- 2026-10-10 大货生产单：整表自适应宽度（固定列宽 + 100% 撑满，永不出横向滚动条） ---------- */
#prod-tbl > div > table.grid { table-layout: fixed; width: 100%; }
/* 第 10 列是「工序进度」：故意不给宽度 —— 剩下的空间全归它，宽窄自适应 */
/* 第 17 列是「操作」：报数 + 入库 + ⋯ 三个都在这里 */


/* 2026-10-10 大货生产单：每格左右内边距 12px→6px（省出来的宽度全部给「工序进度」） */
#prod-tbl > div > table.grid > thead > tr > th,
#prod-tbl > div > table.grid > tbody > tr > td { padding-left: 6px; padding-right: 6px; }

/* 第 10 列（工序进度）也写死宽度 —— 全部 17 列加起来正好 100%，不留剩余空间 */

/* ---------- 2026-10-10 大货生产单：可读性改版（表头/斑马纹/对齐/标签不换行） ---------- */
#prod-tbl > div > table.grid > thead > tr > th {
  background: #eef2f7 !important; color: #3d4a5c !important; font-weight: 600 !important;
  font-size: 12px !important; letter-spacing: .2px; border-bottom: 2px solid #dbe2ec !important;
  height: 36px; vertical-align: middle;
}
#prod-tbl > div > table.grid > tbody > tr > td {
  padding-top: 7px !important; padding-bottom: 7px !important;
  border-bottom: 1px solid #eef1f6 !important; vertical-align: middle;
}
#prod-tbl > div > table.grid > tbody > tr:nth-of-type(even) > td { background: #fafcff; }
#prod-tbl > div > table.grid > tbody > tr:hover > td { background: #f1f7ff !important; }
#prod-tbl > div > table.grid td.num, #prod-tbl > div > table.grid td .num { font-variant-numeric: tabular-nums; }
#prod-tbl > div > table.grid .badge { white-space: nowrap; }
#prod-tbl > div > table.grid .prod-fold-sub { font-size: 10.5px !important; line-height: 1.25 !important; }
#prod-tbl > div > table.grid .prod-fold-chip { font-size: 11px !important; padding: 1px 9px !important; }
/* 大货单里被折行折得最凶的「计划数量 / 状态 / 物料订货 / 订货状态」文字略缩一号，能一行放下 */
#prod-tbl > div > table.grid > tbody > tr > td:nth-child(8),
#prod-tbl > div > table.grid > tbody > tr > td:nth-child(14),
#prod-tbl > div > table.grid > tbody > tr > td:nth-child(15),
#prod-tbl > div > table.grid > tbody > tr > td:nth-child(16) { font-size: 12px; line-height: 1.35; }

/* ---------- 2026-10-10 大货生产单 UI 改版（照设计稿） ---------- */
#prod-tbl > div > table.grid > thead > tr > th { background: #f7f9fc !important; color: #5b6675 !important; font-weight: 600 !important; font-size: 11.5px !important; letter-spacing: .3px; height: 42px; border-bottom: 1px solid #e6ebf3 !important; }
#prod-tbl > div > table.grid > thead > tr > th:nth-child(10),
#prod-tbl > div > table.grid > thead > tr > th:nth-child(11),
#prod-tbl > div > table.grid > thead > tr > th:nth-child(12) { background: #eef2f8 !important; color: #3f4a5a !important; }
#prod-tbl > div > table.grid > tbody > tr > td { padding-top: 9px !important; padding-bottom: 9px !important; border-bottom: 1px solid #f0f3f8 !important; vertical-align: middle; }
#prod-tbl > div > table.grid > tbody > tr:nth-of-type(even) > td { background: #fbfcfe; }
#prod-tbl > div > table.grid > tbody > tr:hover > td { background: #f3f7ff !important; }
#prod-tbl > div > table.grid td.num { font-variant-numeric: tabular-nums; }
#prod-tbl .prod-style-main { font-weight: 600; font-size: 13px; line-height: 1.35; }
#prod-tbl .prod-color-sub { display: inline-flex; align-items: center; gap: 5px; margin-top: 3px; font-size: 11.5px; color: #475467; background: transparent; border: none; padding: 0; }
#prod-tbl .prod-color-sub .dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; background: #cbd5e1; border: 1px solid rgba(0,0,0,.14); }
#prod-tbl .prod-color-sub .dot[style*="#f8f8f8"], #prod-tbl .prod-color-sub .dot[style*="#f1eadb"], #prod-tbl .prod-color-sub .dot[style*="#f7f3ea"] { border-color: #cbd5e1; }
#prod-tbl .prod-profit-neg { color: var(--danger); }
#prod-tbl .prod-mat-cell { white-space: nowrap; }
#prod-tbl .prod-ord-cell { font-size: 11px; color: #98a2b3; margin-top: 2px; line-height: 1.35; }
#prod-tbl .pb-flow { display: flex; align-items: flex-start; overflow: hidden; -webkit-mask-image: linear-gradient(90deg,#000 0,#000 calc(100% - 26px),transparent 100%); mask-image: linear-gradient(90deg,#000 0,#000 calc(100% - 26px),transparent 100%); }
#prod-tbl .pb-step { width: 56px; flex: 0 0 56px; display: flex; flex-direction: column; align-items: center; position: relative; }
#prod-tbl .pb-step + .pb-step::before { content: ""; position: absolute; top: 16px; left: -6px; width: 12px; height: 2px; background: #e6ebf3; }
#prod-tbl .pb-step-ring { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; position: relative; z-index: 1; }
#prod-tbl .pb-step-ring i { width: 24px; height: 24px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; font-style: normal; font-size: 9.5px; font-weight: 700; color: #3157c9; }
#prod-tbl .pb-step-name { margin-top: 4px; font-size: 10.5px; color: #475467; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 56px; text-align: center; }
#prod-tbl .pb-step-shop { font-size: 9.5px; color: #98a2b3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 56px; text-align: center; line-height: 1.3; }
#prod-tbl .pb-step-shop.none { color: #d97706; background: #fff7ed; border-radius: 3px; padding: 0 3px; }
#prod-tbl .pb-step-qty { font-size: 9.5px; color: #b0b8c4; white-space: nowrap; line-height: 1.3; }
#prod-tbl > div > table.grid .badge { white-space: nowrap; }

/* ---------- 2026-10-10 大货生产单：顶部统计卡 + 100% 圈变绿 ---------- */
#prod-stats { display: flex; gap: 10px; margin: 2px 0 14px; flex-wrap: wrap; }
#prod-stats .prod-stat { flex: 1 1 0; min-width: 148px; display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid #e4e8f0; border-left: 4px solid #e4e8f0; border-radius: 10px; padding: 10px 14px; cursor: pointer; transition: box-shadow .15s, border-color .15s; }
#prod-stats .prod-stat:hover { box-shadow: 0 4px 14px rgba(16,24,40,.08); }
#prod-stats .prod-stat.on { border-color: #3157c9; border-left-color: #3157c9; box-shadow: inset 0 0 0 1px #3157c9; }
#prod-stats .prod-stat .ic { width: 36px; height: 36px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex: none; }
#prod-stats .prod-stat .lb { font-size: 12.5px; color: #667085; line-height: 1.3; }
#prod-stats .prod-stat .vl { font-size: 22px; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; }
#prod-stats .prod-stat.c-all { border-left-color: #3157c9; }
#prod-stats .prod-stat.c-doing { border-left-color: #3157c9; }
#prod-stats .prod-stat.c-wait { border-left-color: #98a2b3; }
#prod-stats .prod-stat.c-done { border-left-color: #16a34a; }
#prod-stats .prod-stat.c-late { border-left-color: #dc2626; }
#prod-tbl .pb-step-ring.done i { color: #16a34a; }

/* ---------- 2026-10-10 大货生产单：加「总计时」列（16 列） ---------- */
#prod-tbl > div > table.grid thead th:nth-child(1) { width: 34px; }
#prod-tbl > div > table.grid thead th:nth-child(2) { width: 3%; }
#prod-tbl > div > table.grid thead th:nth-child(3) { width: 3.5%; }
#prod-tbl > div > table.grid thead th:nth-child(4) { width: 5.5%; }
#prod-tbl > div > table.grid thead th:nth-child(5) { width: 3.5%; }
#prod-tbl > div > table.grid thead th:nth-child(6) { width: 9%; }
#prod-tbl > div > table.grid thead th:nth-child(7) { width: 5%; }
#prod-tbl > div > table.grid thead th:nth-child(8) { width: 5.5%; }
#prod-tbl > div > table.grid thead th:nth-child(9) { width: 5.5%; }
#prod-tbl > div > table.grid thead th:nth-child(10) { width: 20%; }
#prod-tbl > div > table.grid thead th:nth-child(11) { width: 5.5%; }
#prod-tbl > div > table.grid thead th:nth-child(12) { width: 6.5%; }
#prod-tbl > div > table.grid thead th:nth-child(13) { width: 5.5%; }
#prod-tbl > div > table.grid thead th:nth-child(14) { width: 4.5%; }
#prod-tbl > div > table.grid thead th:nth-child(15) { width: 7%; }
#prod-tbl > div > table.grid thead th:nth-child(16) { width: 9.5%; }
#prod-tbl .prod-timer { font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 12px; }
#prod-tbl .prod-timer.done { color: #16a34a; font-weight: 600; }
/* 2026-10-11 老板要求：还在计时的单超过 7 天 → 时间标红 */
#prod-tbl .prod-timer.over { color: #dc2626; font-weight: 700; }

/* ---------- 2026-10-10 对价：明细行内展开 ---------- */
#content table.grid tbody tr.cc-detail > td { padding: 0 !important; background: #fafbfc !important; border-bottom: 1px solid var(--border) !important; }
#content table.grid tbody tr.cc-detail:hover > td { background: #fafbfc !important; }
#content .cc-box { padding: 12px 14px 14px; border-left: 3px solid var(--primary); }
#content .cc-box table.grid { font-size: 12px; }
#content .cc-box table.grid th, #content .cc-box table.grid td { padding: 6px 10px; }

/* 对价明细：同工序多家的子行 */
#content .cc-box tr.cc-subrow > td { background: #f3f6fb !important; border-top: 1px dashed #e4e8f0 !important; color: #475467; }
#content .cc-box tr.cc-subrow:hover > td { background: #eef3fb !important; }

/* 整单物料对价：列宽收紧（订货单号别占半屏） */
#content table.grid th, #content table.grid td { word-break: break-word; }
#content .cc-box table.grid { table-layout: fixed; }

/* ---------- 2026-10-10 修：工序进度圆圈里的 100% 被折成两行（看着像圆圈错位） ---------- */
/* 病根：#content table.grid td 上的 word-break:break-word 会继承进圆内文字，
   把 "100%" 从中间断成 "100" + "%"。
   对策：圈内文字不换行；内圈放大到能容下 "100%"（9.5px 粗体约 26.6px）。 */
#prod-tbl .pb-step-ring { width: 34px; height: 34px; }
#prod-tbl .pb-step-ring i { width: 28px; height: 28px; white-space: nowrap; }

/* ---------- 2026-10-10 修：大货生产单「加费列」表头左对齐、数据右对齐，看着就是“列和内容对不上” ---------- */
/* 行里数字格带 class=num（右对齐），表头没有 → 表头跟着右对齐 */
#prod-tbl > div > table.grid > thead > tr > th:nth-child(2),
#prod-tbl > div > table.grid > thead > tr > th:nth-child(3),
#prod-tbl > div > table.grid > thead > tr > th:nth-child(4),
#prod-tbl > div > table.grid > thead > tr > th:nth-child(8),
#prod-tbl > div > table.grid > thead > tr > th:nth-child(11),
#prod-tbl > div > table.grid > thead > tr > th:nth-child(12),
#prod-tbl > div > table.grid > thead > tr > th:nth-child(13) { text-align: right; }

/* 金额列加宽后，行里的金额不再被折成两行 */
#prod-tbl > div > table.grid > tbody > tr > td:nth-child(11),
#prod-tbl > div > table.grid > tbody > tr > td:nth-child(12),
#prod-tbl > div > table.grid > tbody > tr > td:nth-child(13) { white-space: nowrap; }

/* ---------- 2026-10-11 老板要求：工序进度里「工序名」默认不占位，鼠标停在圆圈上才浮出来 ---------- */
/* 用 absolute 脱离文档流：默认省掉这一行的高度，悬停浮出、不会把表格撑动 */
#prod-tbl .pb-step-name {
  position: absolute !important;
  top: 36px;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 0 !important;
  visibility: hidden;
  background: #1f2733;
  color: #fff !important;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.55;
  padding: 1px 7px;
  border-radius: 4px;
  white-space: nowrap;
  max-width: none !important;
  overflow: visible !important;
  text-overflow: clip !important;
  z-index: 30;
  pointer-events: none;
  box-shadow: 0 2px 7px rgba(0,0,0,.2);
}
#prod-tbl .pb-step:hover .pb-step-name { visibility: visible; }

/* ---------- 2026-10-11 老板说「比例不协调」→ 圈收小、字放大、间距收紧，让上下更匀 ---------- */
#prod-tbl .pb-step { gap: 5px !important; }
#prod-tbl .pb-step + .pb-step::before { top: 15px !important; }
#prod-tbl .pb-step-ring { width: 30px !important; height: 30px !important; }
#prod-tbl .pb-step-ring i { width: 24px !important; height: 24px !important; font-size: 9.5px !important; line-height: 24px !important; }
#prod-tbl .pb-step-shop { font-size: 10px !important; line-height: 1.25 !important; }
#prod-tbl .pb-step-qty { font-size: 10px !important; line-height: 1.25 !important; }
#prod-tbl .pb-step-name { top: 32px !important; }

/* ---------- 2026-10-11 修：工序进度能左右滑动（滚动容器由 JS 补上了） ---------- */
/* .pb-flow 必须能比容器宽，外层才滚得动；原来的遮罩会把右边渐隐，这里去掉，改成直接可滚 */
#prod-tbl .pb-flow {
  width: max-content !important;
  min-width: 100% !important;
  overflow: visible !important;
  -webkit-mask-image: none !important;
  mask-image: none !important;
}
/* 2026-10-11 老板要求：滚动条平时看不见，鼠标移到【滚动条本身】上才出现，移开就消失。
   ⚠ 关键：这里绝对不能加 scrollbar-width —— 新版 Chrome 一看到那个属性就会忽略下面所有
   ::-webkit-scrollbar 规则、退回系统原生滚动条（原生条一直显示，鼠标移开也不消失，之前就是这么坏的）。 */
#prod-tbl > div > table.grid td.prod-proc-cell .prod-proc-scroll::-webkit-scrollbar { height: 6px; }
#prod-tbl > div > table.grid td.prod-proc-cell .prod-proc-scroll::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
#prod-tbl > div > table.grid td.prod-proc-cell .prod-proc-scroll::-webkit-scrollbar-track { background: transparent; border-radius: 3px; }
#prod-tbl > div > table.grid td.prod-proc-cell .prod-proc-scroll::-webkit-scrollbar-thumb { background: transparent; border-radius: 3px; }
#prod-tbl > div > table.grid td.prod-proc-cell .prod-proc-scroll::-webkit-scrollbar-thumb:hover { background: #b9c4d4; }
/* 材料订货单：列头双击排序的小箭头 */
.mo-sort-arrow { color: #1677ff; font-size: 11px; margin-left: 2px; }

/* ================= 成品库存 · 界面优化（2026-10-11 老板给的优化版） ================= */
:is(#fin-stock, #aux-stock) .fs-help { margin-bottom: 8px; }
:is(#fin-stock, #aux-stock) .fs-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 10px; }
:is(#fin-stock, #aux-stock) .fs-kpi { background: #fff; border: 1px solid #e5e7eb; border-left: 3px solid #2563eb; border-radius: 8px; padding: 10px 14px; display: flex; align-items: center; gap: 10px; }
:is(#fin-stock, #aux-stock) .fs-kpi.g { border-left-color: #16a34a; } :is(#fin-stock, #aux-stock) .fs-kpi.r { border-left-color: #dc2626; } :is(#fin-stock, #aux-stock) .fs-kpi.y { border-left-color: #d97706; }
:is(#fin-stock, #aux-stock) .fs-kpi .ic { width: 34px; height: 34px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; background: #eff6ff; }
:is(#fin-stock, #aux-stock) .fs-kpi.g .ic { background: #f0fdf4; } :is(#fin-stock, #aux-stock) .fs-kpi.r .ic { background: #fef2f2; } :is(#fin-stock, #aux-stock) .fs-kpi.y .ic { background: #fffbeb; }
:is(#fin-stock, #aux-stock) .fs-kpi .lb { font-size: 11px; color: #6b7280; margin-bottom: 2px; }
:is(#fin-stock, #aux-stock) .fs-kpi .vl { font-size: 18px; font-weight: 700; color: #2563eb; font-variant-numeric: tabular-nums; }
:is(#fin-stock, #aux-stock) .fs-kpi.g .vl { color: #16a34a; } :is(#fin-stock, #aux-stock) .fs-kpi.r .vl { color: #dc2626; } :is(#fin-stock, #aux-stock) .fs-kpi.y .vl { color: #d97706; }
:is(#fin-stock, #aux-stock) .fs-toolbar { background: #fff; border: 1px solid #e5e7eb; border-radius: 8px 8px 0 0; padding: 8px 12px; display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
:is(#fin-stock, #aux-stock) .fs-tb-l, :is(#fin-stock, #aux-stock) .fs-tb-r { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
:is(#fin-stock, #aux-stock) .fs-btn { padding: 5px 12px; border-radius: 5px; border: 1px solid #d1d5db; background: #fff; color: #374151; cursor: pointer; font-size: 12px; display: inline-flex; align-items: center; gap: 3px; }
:is(#fin-stock, #aux-stock) .fs-btn:hover { color: #2563eb; border-color: #93c5fd; background: #eff6ff; }
:is(#fin-stock, #aux-stock) .fs-btn.pri { background: #2563eb; color: #fff; border-color: #2563eb; font-weight: 600; }
:is(#fin-stock, #aux-stock) .fs-btn.pri:hover { background: #1d4ed8; color: #fff; }
:is(#fin-stock, #aux-stock) .fs-btn.success { background: #16a34a; color: #fff; border-color: #16a34a; }
:is(#fin-stock, #aux-stock) .fs-btn.success:hover { background: #15803d; color: #fff; }
:is(#fin-stock, #aux-stock) .fs-search input { padding: 5px 8px 5px 24px; border: 1px solid #d1d5db; border-radius: 5px; width: 180px; font-size: 12px; outline: none; }
:is(#fin-stock, #aux-stock) .fs-search input:focus { border-color: #2563eb; box-shadow: 0 0 0 2px rgba(37,99,235,.1); }
:is(#fin-stock, #aux-stock) .fs-filter { background: #fff; border: 1px solid #e5e7eb; border-top: none; padding: 6px 12px; display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
:is(#fin-stock, #aux-stock) .fs-filter .lb { font-size: 11px; color: #9ca3af; margin-right: 4px; }
:is(#fin-stock, #aux-stock) .fs-pill { padding: 3px 10px; font-size: 11px; border-radius: 12px; border: 1px solid #e5e7eb; background: #fff; color: #6b7280; cursor: pointer; }
:is(#fin-stock, #aux-stock) .fs-pill:hover { color: #2563eb; border-color: #93c5fd; }
:is(#fin-stock, #aux-stock) .fs-pill.on { background: #2563eb; color: #fff; border-color: #2563eb; }
:is(#fin-stock, #aux-stock) .fs-pill.on.r { background: #dc2626; border-color: #dc2626; }
:is(#fin-stock, #aux-stock) .fs-pill.on.y { background: #d97706; border-color: #d97706; }
:is(#fin-stock, #aux-stock) .fs-tablewrap { background: #fff; border: 1px solid #e5e7eb; border-top: none; border-radius: 0 0 8px 8px; overflow-x: auto; }
:is(#fin-stock, #aux-stock) table.fst { width: 100%; border-collapse: collapse; min-width: 1100px; table-layout: fixed; }
:is(#fin-stock, #aux-stock) table.fst thead th { padding: 7px 6px; text-align: left; font-size: 11px; font-weight: 600; color: #6b7280; background: #f9fafb; border-bottom: 2px solid #e5e7eb; white-space: nowrap; }
:is(#fin-stock, #aux-stock) table.fst thead th.num { text-align: right; }
:is(#fin-stock, #aux-stock) table.fst thead th.center { text-align: center; }
:is(#fin-stock, #aux-stock) table.fst tbody td { padding: 6px; font-size: 12px; border-bottom: 1px solid #e5e7eb; background: #fff; vertical-align: middle; overflow: hidden; text-overflow: ellipsis; }
:is(#fin-stock, #aux-stock) table.fst tbody tr.master { cursor: pointer; }
:is(#fin-stock, #aux-stock) table.fst tbody tr.master:hover td { background: #f8fafc; }
:is(#fin-stock, #aux-stock) table.fst td.num { text-align: right; font-variant-numeric: tabular-nums; }
:is(#fin-stock, #aux-stock) table.fst td.center { text-align: center; }
:is(#fin-stock, #aux-stock) .fs-bar { width: 3px; padding: 0 !important; position: relative; }
:is(#fin-stock, #aux-stock) .fs-bar::before { content: ""; position: absolute; left: 0; top: 15%; bottom: 15%; width: 3px; border-radius: 0 2px 2px 0; }
:is(#fin-stock, #aux-stock) tr.fs-fail .fs-bar::before { background: #dc2626; }
:is(#fin-stock, #aux-stock) tr.fs-unpush .fs-bar::before { background: #d97706; }
:is(#fin-stock, #aux-stock) tr.fs-low .fs-bar::before { background: #f59e0b; }
:is(#fin-stock, #aux-stock) tr.fs-ok .fs-bar::before { background: transparent; }
:is(#fin-stock, #aux-stock) .fs-style { font-weight: 600; color: #1f2733; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
:is(#fin-stock, #aux-stock) .fs-color { font-size: 12px; color: #374151; }
:is(#fin-stock, #aux-stock) .fs-size { font-size: 12px; color: #9ca3af; }
:is(#fin-stock, #aux-stock) .fs-qty { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; color: #1f2733; }
:is(#fin-stock, #aux-stock) .fs-qty.low { color: #d97706; } :is(#fin-stock, #aux-stock) .fs-qty.zero { color: #dc2626; }
:is(#fin-stock, #aux-stock) .fs-safety { font-size: 11px; color: #9ca3af; }
:is(#fin-stock, #aux-stock) .fs-tag { display: inline-block; padding: 2px 8px; border-radius: 8px; font-size: 10px; font-weight: 600; }
:is(#fin-stock, #aux-stock) .fs-tag.ok { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
:is(#fin-stock, #aux-stock) .fs-tag.low { background: #fff7ed; color: #d97706; border: 1px solid #fed7aa; }
:is(#fin-stock, #aux-stock) .fs-tag.out { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
:is(#fin-stock, #aux-stock) .fs-recent { font-size: 11px; line-height: 1.4; }
:is(#fin-stock, #aux-stock) .fs-recent .d { color: #6b7280; }
:is(#fin-stock, #aux-stock) .fs-recent .c { font-weight: 600; font-variant-numeric: tabular-nums; }
:is(#fin-stock, #aux-stock) .fs-recent .c.up { color: #16a34a; } :is(#fin-stock, #aux-stock) .fs-recent .c.down { color: #dc2626; }
:is(#fin-stock, #aux-stock) .fs-jst { font-size: 11px; line-height: 1.5; }
:is(#fin-stock, #aux-stock) .fs-jt { display: inline-block; padding: 1px 6px; border-radius: 6px; font-size: 10px; font-weight: 600; margin-right: 4px; }
:is(#fin-stock, #aux-stock) .fs-jt.pushed { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
:is(#fin-stock, #aux-stock) .fs-jt.unpush { background: #fffbeb; color: #d97706; border: 1px solid #fde68a; }
:is(#fin-stock, #aux-stock) .fs-jt.fail { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
:is(#fin-stock, #aux-stock) .fs-ops { display: flex; gap: 4px; justify-content: center; align-items: center; }
:is(#fin-stock, #aux-stock) .fs-op { padding: 4px 10px; border-radius: 4px; border: none; font-size: 11px; font-weight: 600; cursor: pointer; white-space: nowrap; }
:is(#fin-stock, #aux-stock) .fs-op.pri { background: #2563eb; color: #fff; }
:is(#fin-stock, #aux-stock) .fs-op.pri:hover { background: #1d4ed8; }
:is(#fin-stock, #aux-stock) .fs-op.def { background: #fff; color: #374151; border: 1px solid #d1d5db; }
:is(#fin-stock, #aux-stock) .fs-op.def:hover { color: #2563eb; border-color: #93c5fd; }
:is(#fin-stock, #aux-stock) .fs-op.more { background: transparent; color: #9ca3af; padding: 4px 6px; border: 1px solid transparent; }
:is(#fin-stock, #aux-stock) .fs-op.more:hover { color: #2563eb; border-color: #e5e7eb; background: #f9fafb; }
:is(#fin-stock, #aux-stock) .fs-pager { padding: 8px 12px; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid #e5e7eb; background: #f9fafb; font-size: 11px; }
:is(#fin-stock, #aux-stock) .fs-pager .info { color: #9ca3af; }
:is(#fin-stock, #aux-stock) .fs-pager .pages { display: flex; gap: 3px; align-items: center; }
:is(#fin-stock, #aux-stock) .fs-page { min-width: 24px; height: 24px; padding: 0 5px; border-radius: 4px; border: 1px solid #d1d5db; background: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 11px; color: #6b7280; }
:is(#fin-stock, #aux-stock) .fs-page:hover { color: #2563eb; border-color: #93c5fd; }
:is(#fin-stock, #aux-stock) .fs-page.on { background: #2563eb; color: #fff; border-color: #2563eb; }
/* 成品库存：操作列「···」下拉菜单 */
:is(#fin-stock, #aux-stock) .fs-more-wrap { position: relative; display: inline-block; }
:is(#fin-stock, #aux-stock) .fs-menu { display: none; position: absolute; right: 0; top: 100%; margin-top: 2px; background: #fff; border: 1px solid #e5e7eb; border-radius: 6px; box-shadow: 0 4px 14px rgba(0,0,0,.12); z-index: 1000; min-width: 92px; padding: 4px; }
:is(#fin-stock, #aux-stock) .fs-menu span { display: block; padding: 6px 10px; font-size: 12px; color: #374151; cursor: pointer; border-radius: 4px; white-space: nowrap; }
:is(#fin-stock, #aux-stock) .fs-menu span:hover { background: #f1f5ff; color: #2563eb; }
:is(#fin-stock, #aux-stock) .fs-menu span.danger { color: #dc2626; }
:is(#fin-stock, #aux-stock) .fs-menu span.danger:hover { background: #fef2f2; color: #dc2626; }
/* ================= 成品库存 · 字体放大（2026-10-11 老板说字太小） ================= */
:is(#fin-stock, #aux-stock) .fs-help { font-size: 13px; }
:is(#fin-stock, #aux-stock) .fs-kpi .lb { font-size: 13px; }
:is(#fin-stock, #aux-stock) .fs-kpi .vl { font-size: 20px; }
:is(#fin-stock, #aux-stock) .fs-btn { font-size: 13px; }
:is(#fin-stock, #aux-stock) .fs-search input { font-size: 13px; }
:is(#fin-stock, #aux-stock) .fs-filter .lb { font-size: 12px; }
:is(#fin-stock, #aux-stock) .fs-pill { font-size: 12px; }
:is(#fin-stock, #aux-stock) table.fst thead th { font-size: 12px; padding: 8px 6px; }
:is(#fin-stock, #aux-stock) table.fst tbody td { font-size: 14px; padding: 8px 6px; }
:is(#fin-stock, #aux-stock) .fs-style { font-size: 14px; }
:is(#fin-stock, #aux-stock) .fs-color { font-size: 13px; }
:is(#fin-stock, #aux-stock) .fs-size { font-size: 13px; }
:is(#fin-stock, #aux-stock) .fs-qty { font-size: 16px; }
:is(#fin-stock, #aux-stock) .fs-safety { font-size: 12px; }
:is(#fin-stock, #aux-stock) .fs-tag { font-size: 11px; }
:is(#fin-stock, #aux-stock) .fs-recent { font-size: 12px; }
:is(#fin-stock, #aux-stock) .fs-jst { font-size: 12px; }
:is(#fin-stock, #aux-stock) .fs-jt { font-size: 11px; }
:is(#fin-stock, #aux-stock) .fs-op { font-size: 12px; }
:is(#fin-stock, #aux-stock) .fs-menu span { font-size: 13px; }
:is(#fin-stock, #aux-stock) .fs-pager { font-size: 12px; }
:is(#fin-stock, #aux-stock) .fs-page { font-size: 12px; }
/* ================= 成品库存 · 字体再放大一档（2026-10-11 老板二次要求） ================= */
:is(#fin-stock, #aux-stock) .fs-help { font-size: 14px; }
:is(#fin-stock, #aux-stock) .fs-kpi .lb { font-size: 14px; }
:is(#fin-stock, #aux-stock) .fs-kpi .vl { font-size: 22px; }
:is(#fin-stock, #aux-stock) .fs-btn { font-size: 14px; }
:is(#fin-stock, #aux-stock) .fs-search input { font-size: 14px; }
:is(#fin-stock, #aux-stock) .fs-filter .lb { font-size: 13px; }
:is(#fin-stock, #aux-stock) .fs-pill { font-size: 13px; }
:is(#fin-stock, #aux-stock) table.fst thead th { font-size: 13px; }
:is(#fin-stock, #aux-stock) table.fst tbody td { font-size: 15px; }
:is(#fin-stock, #aux-stock) .fs-style { font-size: 15px; }
:is(#fin-stock, #aux-stock) .fs-color { font-size: 14px; }
:is(#fin-stock, #aux-stock) .fs-size { font-size: 14px; }
:is(#fin-stock, #aux-stock) .fs-qty { font-size: 18px; }
:is(#fin-stock, #aux-stock) .fs-safety { font-size: 13px; }
:is(#fin-stock, #aux-stock) .fs-tag { font-size: 12px; }
:is(#fin-stock, #aux-stock) .fs-recent { font-size: 13px; }
:is(#fin-stock, #aux-stock) .fs-jst { font-size: 13px; }
:is(#fin-stock, #aux-stock) .fs-jt { font-size: 12px; }
:is(#fin-stock, #aux-stock) .fs-op { font-size: 13px; }
:is(#fin-stock, #aux-stock) .fs-menu span { font-size: 14px; }
:is(#fin-stock, #aux-stock) .fs-pager { font-size: 13px; }
:is(#fin-stock, #aux-stock) .fs-page { font-size: 13px; }
/* 成品库存：流水明细（和主表统一风格） */
:is(#fin-stock, #aux-stock) .fs-flow-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 6px 0 8px; }
:is(#fin-stock, #aux-stock) .fs-flow-title { font-size: 13px; font-weight: 700; color: #1f2733; }
:is(#fin-stock, #aux-stock) .fs-flow-sum { font-size: 13px; color: #374151; }
:is(#fin-stock, #aux-stock) .fs-flow-sum b { font-variant-numeric: tabular-nums; }
:is(#fin-stock, #aux-stock) .fs-flow-tip { font-size: 12px; color: #9ca3af; }
:is(#fin-stock, #aux-stock) table.fs-flow { width: 100%; border-collapse: collapse; }
:is(#fin-stock, #aux-stock) table.fs-flow thead th { padding: 7px 8px; text-align: left; font-size: 12px; font-weight: 600; color: #6b7280; background: #f9fafb; border-bottom: 1px solid #e5e7eb; white-space: nowrap; }
:is(#fin-stock, #aux-stock) table.fs-flow tbody td { padding: 7px 8px; font-size: 13px; color: #1f2733; border-bottom: 1px solid #eef0f3; }
:is(#fin-stock, #aux-stock) table.fs-flow tbody tr:last-child td { border-bottom: none; }
:is(#fin-stock, #aux-stock) table.fs-flow td.num { text-align: right; font-variant-numeric: tabular-nums; }
/* 成品库存：流水明细比主表小一号（!important 放在最后，避免被主表的 td 字号连带放大） */
:is(#fin-stock, #aux-stock) .fs-flow-title { font-size: 13px !important; }
:is(#fin-stock, #aux-stock) .fs-flow-sum { font-size: 13px !important; }
:is(#fin-stock, #aux-stock) .fs-flow-tip { font-size: 11px !important; }
:is(#fin-stock, #aux-stock) table.fs-flow thead th { font-size: 12px !important; }
:is(#fin-stock, #aux-stock) table.fs-flow tbody td { font-size: 13px !important; }
/* 成品库存：流水明细里的按钮/标签也比主表小一号 */
:is(#fin-stock, #aux-stock) table.fs-flow .fs-op { font-size: 12px !important; padding: 3px 8px !important; }
:is(#fin-stock, #aux-stock) table.fs-flow .fs-tag { font-size: 11px !important; }
:is(#fin-stock, #aux-stock) table.fs-flow .fs-jt { font-size: 11px !important; }
/* 成品库存：流水里的「删除」改成小字链接，别用按钮 */
:is(#fin-stock, #aux-stock) .fs-flow-del { font-size: 12px; color: #dc2626; cursor: pointer; margin-left: 10px; }
:is(#fin-stock, #aux-stock) .fs-flow-del:hover { text-decoration: underline; }

/* ===== 2026-10-25 成本看板：已确定·版正 ===== */
.cb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(620px, 1fr)); gap: 18px; }
.cb-card { display: flex; min-height: 300px; background: #fff; border: 1px solid var(--line); border-left: 6px solid #e11d48; border-radius: 14px; overflow: hidden; box-shadow: 0 7px 24px rgba(26,39,76,.09); }
.cb-card.cb-cost-incomplete { border-left-color: #d99b45; background: #fffdf8; }
.cb-media { flex: 0 0 330px; min-height: 300px; display: flex; align-items: center; justify-content: center; background: #f4f6fa; overflow: hidden; }
.cb-media img { width: 100%; height: 300px; object-fit: contain; cursor: zoom-in; display: block; }
.cb-noimg, .cb-muted { color: #98a2b3; font-size: 13px; }
.cb-main { flex: 1; min-width: 0; padding: 20px 22px; display: flex; flex-direction: column; gap: 15px; }
.cb-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.cb-no { font-size: 30px; line-height: 1.15; font-weight: 900; color: #172033; word-break: break-word; }
.cb-style { margin-top: 7px; color: #667085; font-size: 16px; word-break: break-word; }
.cb-badges { display: flex; align-items: center; justify-content: flex-end; gap: 5px; flex-wrap: wrap; }
.cb-cat, .cb-color { white-space: nowrap; border-radius: 999px; padding: 4px 11px; font-size: 14px; font-weight: 700; }
.cb-cat { color: #3157c9; background: #eef2ff; }
.cb-color { color: #7c3aed; background: #f3e8ff; }
.cb-cost-alert { color: #9a5b30; background: #f7e8d5; white-space: nowrap; border-radius: 999px; padding: 4px 11px; font-size: 14px; font-weight: 700; }
.cb-dims { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; min-height: 46px; font-size: 21px; line-height: 1.4; color: #344054; }
.cb-dims span { white-space: nowrap; }
.cb-dims b { color: #667085; font-weight: 700; margin-right: 6px; }
.cb-dim-img { width: 52px; height: 52px; object-fit: contain; border: 1px solid var(--line); border-radius: 7px; background: #fff; cursor: zoom-in; }
.cb-cost { margin-top: auto; border-radius: 11px; padding: 13px 16px; display: flex; align-items: center; justify-content: space-between; gap: 14px; background: linear-gradient(135deg, #fff1f2, #ffe4e6); border: 1px solid #fecdd3; }
.cb-cost-label { color: #9f1239; font-size: 17px; font-weight: 800; }
.cb-cost-value { color: #be123c; font-size: 34px; font-weight: 900; letter-spacing: .2px; }
.cb-cost-value.warn { color: #9a5b30; }
.cb-warn { color: #b45309; background: #fffbeb; border-radius: 6px; padding: 6px 9px; font-size: 14px; }
.cb-pager { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin: 14px 0 4px; font-size: 14px; }
.cb-pager select { height: 32px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
@media (max-width: 760px) {
  .cb-grid { grid-template-columns: 1fr; }
  .cb-card { flex-direction: column; }
  .cb-media { flex: none; width: 100%; min-height: 230px; }
  .cb-media img { height: 260px; }
  .cb-no { font-size: 24px; }
  .cb-dims { font-size: 18px; gap: 8px 16px; }
}
