/* 原材料采购（2026-08-28）库存页第三个 Tab */
.proc-status { display: inline-block; padding: 2px 10px; border-radius: 10px; font-size: 12px; line-height: 18px; }
.proc-status-pending { background: #fef3c7; color: #92400e; }
.proc-status-approved { background: #dcfce7; color: #166534; }
.proc-status-rejected { background: #fee2e2; color: #991b1b; }
.proc-no a { color: #1e40af; text-decoration: none; font-weight: 600; }
.proc-no a:hover { text-decoration: underline; }

/* width 必须显式覆盖 .mz-dialog 的 min(480px,92vw)：只写 max-width 只是上限、不会把弹窗撑开 */
.mz-dialog-proc { width: min(1040px, 94vw); max-width: 1040px; }
.mz-dialog-proc .mz-fields { max-height: 74vh; overflow: auto; }
/* 明细列较多（含部门自定义字段），给足最小宽度，超出时由 .mz-fields 横向滚动，避免被挤压换行 */
/* 2026-09-20：新增「照片」「封装」两列 → 最小宽度上调；同日再加「采购链接」列 → 1040px */
.mz-dialog-proc .proc-items-table { min-width: 1040px; }

/* 2026-09-20 采购清单「照片」列 —— 值引用原材料库（只读，点击看大图） */
.proc-items-table .proc-photo-cell { text-align: center; width: 78px; }
.proc-items-table .proc-photo { width: 52px; height: 52px; object-fit: cover; border: 1px solid #e4e7ec; border-radius: 4px; display: inline-block; vertical-align: middle; background: #f8fafc; }
.proc-items-table .proc-photo-none { color: #98a2b3; font-size: 12px; }

/* 2026-09-20 采购清单「采购链接」列 —— 值引用原材料库（只读）；仅 http/https 渲染成可点击链接 */
.proc-items-table .proc-link-cell { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proc-items-table .proc-link { color: #1d4ed8; text-decoration: underline; }
.proc-items-table .proc-link:hover { color: #1e40af; }
.proc-items-table .proc-link-text { color: #667085; }
.proc-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 6px 14px; padding: 10px 12px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; font-size: 13px; color: #334155; }

.proc-items-block { display: flex; flex-direction: column; gap: 8px; }
/* 清单标题行：标签 + 右侧"添加一行"（2026-09-08），避免按钮沉在滚动区底部找不到 */
.proc-items-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.proc-view-tip { margin: 6px 0 0; font-size: 12px; color: #98a2b3; }
/* 明细行操作按钮：2026-09-08 起统一走公共组件 .mz-btn（app.css），此处仅保留列宽 */
.proc-item-row > [data-proc-row-supplier] { flex: 1 1 140px; min-width: 110px; background: #f8fafc; color: #475467; }
/* 可搜索选料输入框（datalist）：未命中候选项时红框提示 */
.proc-item-row { position: relative; }
.proc-item-row > [data-proc-row-spec-input] { flex: 2 1 220px; min-width: 180px; }
.proc-item-row > [data-proc-row-code] { flex: 0 1 130px; min-width: 110px; }
.proc-item-row > [data-proc-row-unit], .proc-item-row > [data-proc-row-supplier], .proc-item-row > [data-proc-row-code] { background: #f8fafc; color: #475467; }
.proc-item-row > [data-proc-row-unit] { flex: 0 1 70px; min-width: 60px; }
/* 规格搜索候选弹层（2026-09-08） */
.proc-search-list { position: absolute; top: 100%; left: 0; right: auto; width: min(420px, 100%); z-index: 40; background: #fff; border: 1px solid #d0d5dd; border-radius: 6px; box-shadow: 0 8px 20px rgba(16,24,40,.14); max-height: 220px; overflow: auto; }
.proc-search-item { display: flex; gap: 10px; align-items: baseline; width: 100%; text-align: left; border: 0; background: #fff; padding: 8px 10px; font: inherit; font-size: 13px; cursor: pointer; }
.proc-search-item:hover { background: #eef4ff; }
.proc-search-item .s-spec { flex: 1 1 auto; color: #1f2937; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proc-search-item .s-code { color: #0b57b7; font-weight: 700; white-space: nowrap; }
.proc-search-item .s-sup { color: #667085; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 120px; }
.proc-search-empty { padding: 8px 10px; font-size: 13px; color: #98a2b3; }
/* 采购清单 查看（只读表格）/编辑（行选料）切换隐藏（2026-09-08） */
.proc-hidden { display: none !important; }
.proc-items-label { font-weight: 600; font-size: 13px; color: #334155; }
/* 明细行含不定数量的部门自定义字段，改用 flex 自动换行（原 grid 固定 4 列，多出的字段会掉行错位） */
.proc-item-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.proc-item-row > select { flex: 1 1 280px; min-width: 220px; }
.proc-item-row > input { flex: 1 1 150px; min-width: 120px; }
.proc-item-row > button { flex: 0 0 auto; }
.proc-item-rows { display: flex; flex-direction: column; gap: 8px; }

.proc-items-table { margin-top: 4px; }
.proc-flow-list { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; }
/* 2026-09-08：流转记录整体在一个块内，逐条不再带边框底色卡片（改为浅分隔线） */
.proc-flow-list li { font-size: 13px; color: #475569; padding: 7px 2px; border-bottom: 1px dashed #edf0f4; }
.proc-flow-list li:last-child { border-bottom: 0; }
.proc-flow-list li strong { color: #1e40af; }
.proc-flow-time { float: right; color: #94a3b8; font-size: 12px; }
.proc-flow-note { margin-top: 2px; color: #64748b; font-size: 12px; }

/* 作废（软删除）相关：状态标签、整行置灰、工具栏开关、详情提示条 */
.proc-status-voided { background: #f1f5f9; color: #64748b; }
.proc-row-voided { opacity: .62; }
.proc-void-filter { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #475569; }
.proc-void-banner { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; border-radius: 8px; padding: 8px 12px; font-size: 13px; margin-bottom: 10px; }
