/* 仓库管理系统 —— 全局样式（轻量，配合 Element Plus） */
* { box-sizing: border-box; }
html, body, #app { height: 100%; margin: 0; padding: 0; }
body { font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif; background: #f0f2f5; color: #303133; }

.app-header {
  display: flex; align-items: center; justify-content: space-between;
  background: #1f4e79; color: #fff; padding: 0 20px; height: 60px;
}
.app-header h1 { font-size: 18px; margin: 0; font-weight: 600; letter-spacing: 1px; }
.app-header .sub { font-size: 13px; opacity: .8; }

/* 侧边菜单 */
.el-aside { background: #263238; display: flex; flex-direction: column; }
.el-menu { border-right: none; }

/* 菜单分区与紧凑排版：保证 1366×768 首屏能看全「日常作业 + 库存核对」，
   表头设置按钮常驻底部；低频项收进「档案与设置」折叠组 */
.side-menu { flex: 1 1 auto; overflow-y: auto; overflow-x: hidden; padding-bottom: 6px; }
.side-menu .el-menu-item,
.side-menu .el-sub-menu__title { height: 40px; line-height: 40px; font-size: 13px; }
.side-menu .el-menu-item { padding-left: 18px !important; }
.side-menu .el-sub-menu .el-menu-item { padding-left: 32px !important; font-size: 12.5px; }
.side-menu .el-sub-menu__title { color: #b0bec5; }
.side-menu .el-sub-menu__title:hover { background: #2f3f47; }
.side-group {
  padding: 11px 18px 3px; font-size: 10.5px; letter-spacing: .5px; color: #78909c;
  border-top: 1px solid #37474f; margin-top: 4px; user-select: none;
}
.side-group:first-child { border-top: none; }
.side-menu::-webkit-scrollbar { width: 6px; }
.side-menu::-webkit-scrollbar-thumb { background: #455a64; border-radius: 3px; }
.side-menu::-webkit-scrollbar-track { background: transparent; }
.side-menu::-webkit-scrollbar { width: 6px; }
.side-menu::-webkit-scrollbar-thumb { background: #455a64; border-radius: 3px; }
.side-menu::-webkit-scrollbar-track { background: transparent; }

/* 主区域 */
.el-main { padding: 16px; background: #f0f2f5; }
.view-title { font-size: 16px; font-weight: 600; margin: 0 0 14px; color: #1f4e79; }

/* 通用数据表（纯 HTML table，避免内网 el-table 零宽塌陷） */
.data-table { width: 100%; border-collapse: collapse; background: #fff; font-size: 13px; }
.data-table th, .data-table td { border: 1px solid #e0e0e0; padding: 8px 10px; text-align: left; }
.data-table th { background: #f5f7fa; color: #1f4e79; font-weight: 600; white-space: nowrap; }
.data-table tr:nth-child(even) td { background: #fafafa; }
.data-table tr:hover td { background: #eef5ff; }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }

/* 单据行内「改 / 删」按钮：竖排两枚，窄列也不挤 */
.doc-ops { display: flex; flex-direction: column; gap: 4px; align-items: stretch; }
.doc-ops > span { display: block; }
.doc-ops .el-button { width: 100%; margin-left: 0 !important; }
.doc-ops .el-button.is-disabled { opacity: .55; }
/* 退货单操作列：按钮较多，横向排列自然换行，别挤成一列竖排 */
.doc-ops-row { display: flex; flex-wrap: wrap; gap: 4px; }
.doc-ops-row > span { display: inline-flex; }
.doc-ops-row .el-button { margin-left: 0 !important; }
.doc-ops-row .el-button.is-disabled { opacity: .55; }

/* 预警表强调 */
.warn-table th { background: #fde2e2; color: #c0392b; }
.warn-row td { background: #fff5f5 !important; color: #c0392b; font-weight: 600; }

/* KPI 卡片 */
.kpi-row { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.kpi-card { flex: 1 1 200px; background: #fff; border-radius: 8px; padding: 18px 20px; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.kpi-card .label { font-size: 13px; color: #909399; margin-bottom: 8px; }
.kpi-card .value { font-size: 26px; font-weight: 700; color: #1f4e79; }
.kpi-card .unit { font-size: 13px; color: #909399; margin-left: 4px; }

.chart-row { display: flex; gap: 16px; flex-wrap: wrap; }
.chart-box { flex: 1 1 360px; background: #fff; border-radius: 8px; padding: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.chart { width: 100%; height: 320px; }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.block { background: #fff; border-radius: 8px; padding: 16px; box-shadow: 0 1px 4px rgba(0,0,0,.08); margin-bottom: 16px; }
.items-table td .el-input, .items-table td .el-select { width: 100%; }
/* 材料明细表：字段多，整体横向滚动 + 紧凑单元格，避免文字折行溢出、下拉被挤压 */
.items-scroll { width: 100%; overflow-x: auto; }
.items-scroll .items-table { min-width: 1180px; }
.items-table { font-size: 12px; }
.items-table th, .items-table td { padding: 6px 8px; white-space: nowrap; }
.items-table td .el-input-number { width: 100%; }
.items-table td .el-button { padding: 6px 10px; }
.items-table tfoot td { background: #eef6ff; }
.el-form-item__content { min-width: 0; }
.muted { color: #909399; font-size: 12px; }
.tip { background:#fff7e6;border:1px solid #ffe58f;color:#ad6800;padding:8px 12px;border-radius:6px;margin-bottom:12px;font-size:13px; }

/* 顶栏左侧/右侧 */
.app-header .header-left { display: flex; flex-direction: column; line-height: 1.3; }
.header-right { display: flex; align-items: center; gap: 12px; }
.header-right .user { color: #fff; font-size: 13px; }
.header-right .user small { color: #cfe3ff; margin-left: 2px; }
.op-hint { margin-left: 12px; color: #1f4e79; font-size: 13px; font-weight: 600; }

/* 登录页 */
.login-wrap { height: 100%; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #1f4e79, #2c6aa0); }
.login-card { width: 340px; background: #fff; border-radius: 10px; padding: 28px 26px; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.login-title { font-size: 22px; font-weight: 700; color: #1f4e79; text-align: center; }
.login-sub { text-align: center; color: #888; margin: 6px 0 18px; font-size: 13px; }
.login-tip { margin-top: 14px; font-size: 12px; color: #999; text-align: center; line-height: 1.6; }
.login-addr { margin-top: 8px; font-size: 11px; color: #909399; text-align: center; line-height: 1.5; word-break: break-all; }
/* 只有确实用 file:// 直接打开（必然连不上后台）时才标红，避免正常访问时被红字误导 */
.login-addr-warn { color: #c0392b; }
/* 备案号页脚（ICP_BEIAN 配置后由 /api/deploy-info 注入；合规要求悬挂） */
.beian-footer { position: fixed; left: 0; right: 0; bottom: 6px; text-align: center; font-size: 12px; color: rgba(255,255,255,.7); pointer-events: none; }

/* 小区施工分配汇总与标签 */
.summary-bar { background: #eef6ff; border-left: 4px solid #409eff; padding: 10px 14px; border-radius: 4px; margin-bottom: 12px; font-size: 13px; color: #303133; }
.tag-green { display: inline-block; background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; padding: 2px 8px; border-radius: 10px; font-size: 12px; }
/* 角色徽章与权限说明条（账号与权限页） */
.role-badge { display: inline-block; min-width: 46px; text-align: center; padding: 2px 9px; border-radius: 10px; font-size: 12px; font-weight: 600; }
.rb-super_admin { background: #eef2ff; color: #3730a3; border: 1px solid #c7d2fe; }
.rb-finance { background: #e6f4ff; color: #0958d9; border: 1px solid #bae0ff; }
.rb-logistics { background: #f6ffed; color: #237804; border: 1px solid #b7eb8f; }
.policy-bar { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; padding: 10px 12px; background: #fafcff; border: 1px solid #e4ecf7; border-radius: 6px; font-size: 12.5px; line-height: 1.8; color: #4a5568; }
/* 页面顶部的角色权限提示（解释按钮为何隐藏） */
.policy-hint { margin-bottom: 12px; padding: 8px 12px; background: #fffbe6; border: 1px solid #ffe58f; border-left: 4px solid #faad14; border-radius: 5px; font-size: 12.5px; line-height: 1.8; color: #614700; }
.policy-hint b { color: #ad6800; }
.tag-blue { display: inline-block; background: #e3f2fd; color: #1565c0; border: 1px solid #90caf9; padding: 2px 8px; border-radius: 10px; font-size: 12px; }
.tag-gray { display: inline-block; background: #f5f5f5; color: #909399; border: 1px solid #dcdfe6; padding: 2px 8px; border-radius: 10px; font-size: 12px; }
.tag-red { display: inline-block; background: #fff2f0; color: #c0392b; border: 1px solid #ffccc7; padding: 2px 8px; border-radius: 10px; font-size: 12px; }
.tag-orange { display: inline-block; background: #fff4e5; color: #ad6800; border: 1px solid #ffd591; padding: 2px 8px; border-radius: 10px; font-size: 12px; }

/* 单据明细的标准件 / 异型件分类统计条 */
.type-stat-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; padding: 7px 10px; background: #fafcff; border: 1px solid #e4ecf7; border-radius: 6px; font-size: 12px; line-height: 1.8; }

/* 入库单表单：标签不折行、下拉框不被挤压，避免文字溢出/错位 */
.in-form .el-form-item__label { white-space: nowrap; }
.in-form .el-select, .in-form .el-date-editor { width: 100% !important; min-width: 0; }
.in-form .el-form-item__content { min-width: 0; }
.in-dialog .el-dialog__body { padding-top: 12px; }

/* 下拉项就地增减工具条 */
.quick-bar { background:#f4f9ff; border:1px solid #d9ecff; border-radius:6px; padding:8px 10px; margin-bottom:12px; }
.quick-bar .el-button { margin:0; }
.quick-dialog .data-table td .el-button { padding:4px 8px; }

/* 物品采购全流程：步骤条 / 进度点 / 弹窗 */
.flow-steps { display: flex; flex-wrap: wrap; gap: 0; margin-bottom: 12px; }
.flow-step {
  position: relative; flex: 1 1 150px; min-width: 150px; margin: 0 22px 12px 0;
  background: #fff; border: 1px solid #dcdfe6; border-radius: 8px;
  padding: 12px 14px; box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.flow-step.fs-done { border-color: #a5d6a7; background: #f7fbf7; }
.flow-step .fs-no { font-size: 18px; font-weight: 700; color: #1f4e79; line-height: 1.2; }
.flow-step .fs-name { font-size: 14px; font-weight: 600; margin-top: 2px; }
.flow-step .fs-hint { font-size: 12px; color: #909399; margin-top: 2px; }
.flow-step .fs-count { font-size: 12px; color: #1f4e79; margin: 6px 0 8px; }
.flow-step .fs-arrow { position: absolute; right: -20px; top: 50%; transform: translateY(-50%); color: #90a4ae; font-size: 18px; }
.flow-step .el-button { padding: 6px 10px; }
.fs-dot {
  display: inline-block; width: 21px; height: 21px; line-height: 19px; text-align: center;
  border-radius: 50%; border: 1px solid #dcdfe6; background: #f5f5f5; color: #909399;
  font-size: 12px; margin-right: 3px;
}
.fs-dot.on { background: #2e7d32; border-color: #2e7d32; color: #fff; font-weight: 700; }
.flow-tabs .el-tabs__item { font-size: 14px; }
.flow-dialog .el-dialog__body { padding-top: 12px; }
.kpi-card .value.money-val { font-size: 20px; white-space: nowrap; }

/* 现场照片缩略图 */
.img-thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.thumb-wrap { position: relative; width: 84px; height: 84px; border: 1px solid #e0e0e0; border-radius: 6px; overflow: hidden; background: #fafafa; }
.thumb-wrap .thumb { width: 100%; height: 100%; object-fit: cover; display: block; cursor: pointer; }
.thumb-wrap .thumb-del { position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; line-height: 16px; text-align: center; background: rgba(192,57,43,.9); color: #fff; border-radius: 50%; cursor: pointer; font-size: 13px; }
.thumb-wrap .thumb-del:hover { background: #c0392b; }

/* ============ 到货提醒条 / 差异与提醒页 ============ */
.ff-bar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  margin-bottom: 12px; padding: 10px 14px;
  background: #fff; border: 1px solid #e6ebf2; border-left: 4px solid #1f4e79;
  border-radius: 6px; box-shadow: 0 1px 3px rgba(15, 39, 66, .06);
}
.ff-bar-title { font-weight: 700; color: #1f4e79; font-size: 13px; }
.ff-item {
  display: inline-flex; align-items: baseline; gap: 5px;
  padding: 3px 10px; border-radius: 12px; font-size: 12.5px;
  cursor: pointer; border: 1px solid transparent; transition: background .15s;
}
.ff-item em { font-style: normal; color: #8a94a6; font-size: 11.5px; }
.ff-item b { font-size: 14px; }
.ff-short { background: #fff7e6; border-color: #ffd591; color: #ad4e00; }
.ff-short:hover { background: #ffe7ba; }
.ff-over { background: #fff1f0; border-color: #ffa39e; color: #a8071a; }
.ff-over:hover { background: #ffd8d6; }
.ff-late { background: #f9f0ff; border-color: #d3adf7; color: #531dab; }
.ff-late:hover { background: #efdbff; }
.ff-pay { background: #e6fffb; border-color: #87e8de; color: #006d75; }
.ff-pay:hover { background: #b5f5ec; }
.ff-overcollect { background: #fffbe6; border-color: #ffe58f; color: #ad6800; }
.ff-overcollect:hover { background: #fff1b8; }
.ff-bar-more { margin-left: auto; color: #1f4e79; font-size: 12.5px; cursor: pointer; }
.ff-bar-more:hover { text-decoration: underline; }
/* 差异与提醒页的说明文字与明细行 */
.ff-note { font-size: 12.5px; line-height: 1.8; color: #606266; margin-bottom: 8px; }
.ff-note b { color: #1f4e79; }

/* ================= 紧急调拨 ================= */
.tf-dialog .el-dialog__body { padding-top: 12px; }
.tf-form .el-form-item { margin-bottom: 14px; }
/* 表头字段两列排布（申请人/申请班组/申请日期/使用小区/计划调动时间/调出项目/调入项目/调入班组） */
.tf-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.tf-block-title { font-weight: 600; font-size: 13px; color: #1f4e79; margin: 14px 0 8px; }
.tf-items td .el-select, .tf-items td .el-input, .tf-items td .el-input-number { width: 100%; }
.items-scroll .tf-items { min-width: 800px; }
.tf-sig td .el-select, .tf-sig td .el-input, .tf-sig td .el-date-editor { width: 100%; }

/* 单据版式（对齐「调拨指令申请单」样板：A4 横向单页） */
.tf-sheet { border: 1px solid #dcdfe6; padding: 20px 22px; background: #fff; }
.tf-sheet-head { text-align: center; font-weight: 700; font-size: 15px; color: #1f4e79; line-height: 1.6; }
.tf-sheet-title { text-align: center; font-weight: 700; font-size: 20px; letter-spacing: 4px; margin: 8px 0 16px; color: #303133; }
.tf-sheet-meta { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 12px; }
.tf-sheet-meta td { border: 1px solid #dcdfe6; padding: 7px 10px; vertical-align: middle; }
.tf-sheet-meta .tf-k { background: #f5f7fa; color: #1f4e79; font-weight: 600; white-space: nowrap; width: 92px; text-align: center; }
.tf-print-items { margin-bottom: 8px; }
/* 签章栏：标准六角色按 3 列 × 2 行排布，正好两行对齐，像正式表单的签署区。
   用 grid 而非 flex-wrap——6 个签章位在 flex 下会排成 4+2，两侧留白不均。 */
.tf-sign-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 24px; margin-top: 14px; padding-top: 10px; border-top: 1px dashed #dcdfe6; }
.tf-sign-cell { font-size: 13px; color: #303133; white-space: normal; line-height: 1.7; }
.tf-sign-line { display: inline-block; min-width: 88px; border-bottom: 1px solid #909399; margin: 0 6px; text-align: center; }
.tf-sign-cell em { font-style: normal; color: #909399; font-size: 11px; margin-left: 4px; }
/* 键值行（详情页） */
.tf-kv { display: flex; gap: 10px; font-size: 13px; padding: 6px 0; border-bottom: 1px dashed #ebeef5; }
.tf-kv > span { color: #909399; flex: 0 0 110px; }
.tf-kv > b { font-weight: 600; color: #303133; }

/* 「单据表头设置」常驻入口：左侧栏 + 新建申购单弹窗顶部提示条，避免入口藏在弹窗底部找不到 */
.side-headcfg { padding: 10px; border-top: 1px solid #37474f; background: #263238; flex: 0 0 auto; }
.side-headcfg .sh-tip { color: #90a4ae; font-size: 10.5px; margin-top: 5px; line-height: 1.4; }
.po-headcfg-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 9px 12px; margin: 0 0 12px; background: #eaf3fb; border: 1px solid #b6d4f0;
  border-left: 4px solid #1f4e79; border-radius: 4px; font-size: 13px; color: #1f4e79;
}

/* 申购单打印版式（对齐调拨单据：表头第一行=标段名，第二行=材料申购单标题） */
.po-sheet { border: 1px solid #dcdfe6; padding: 20px 22px; background: #fff; max-width: 920px; margin: 0 auto; }
.po-sheet-head { text-align: center; font-weight: 700; font-size: 16px; color: #1f4e79; line-height: 1.6; letter-spacing: 2px; }
.po-sheet-title { text-align: center; font-weight: 700; font-size: 22px; letter-spacing: 6px; margin: 6px 0 16px; color: #303133; }
.po-info { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid #dcdfe6; border-bottom: none; margin-bottom: 10px; font-size: 13px; }
.po-info-cell { display: flex; align-items: stretch; border-bottom: 1px solid #dcdfe6; border-right: 1px solid #dcdfe6; }
.po-info-k { background: #1f4e79; color: #fff; font-weight: 600; white-space: nowrap; padding: 6px 10px; width: 84px; box-sizing: border-box; text-align: center; flex: 0 0 auto; }
.po-info-v { padding: 6px 10px; flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.po-print-items { margin-bottom: 8px; }
.po-print-items .po-group th { background: #1f4e79; color: #fff; font-size: 14px; letter-spacing: 4px; text-align: center; padding: 6px; }
.po-total { text-align: right; font-size: 14px; margin: 8px 0 14px; }
.po-total b { font-size: 16px; color: #c0392b; }
/* 签章栏：一排留白供手写签名，无下划线；列数按每套表头的签章人数由内联样式动态均分 */
.po-sign-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-top: 14px; border: 1px solid #dcdfe6; border-right: none; }
.po-sign-cell { display: flex; flex-direction: column; min-height: 62px; padding: 6px 8px; border-right: 1px solid #dcdfe6; font-size: 13px; color: #303133; }
.po-sign-label { white-space: nowrap; }
.po-sign-blank { flex: 1 1 auto; min-height: 34px; }
/* 屏幕预览：容器可横向滚动，避免窄屏时单据右边被挡 */
.po-dialog .el-dialog__body { overflow-x: auto !important; max-height: none !important; }
.po-sheet { min-width: 720px; }

/* 退货单：黑白针式打印机版式。两类单据靠标题文字、抬头字段、单据类别文字与线框区分，不使用颜色区分 */
.rt-kind-bar { border: 1px solid #dcdfe6; border-left: 4px solid #909399; background: #fafafa; padding: 8px 12px; margin-bottom: 10px; font-size: 13px; line-height: 1.7; }
.rt-kind-bar b { display: block; font-size: 14px; letter-spacing: 1px; }
.rt-kind-bar span { display: block; color: #606266; }
.rt-kind-a { border-left-color: #c0392b; }
.rt-kind-b { border-left-color: #1d9e75; }
.rt-sheet { border: 1px solid #dcdfe6; padding: 18px 20px; background: #fff; color: #000; max-width: 920px; min-width: 720px; margin: 0 auto; font-size: 13px; }
.rt-project { text-align: center; font-size: 15px; font-weight: 700; line-height: 1.6; letter-spacing: 1px; }
.rt-title { text-align: center; font-size: 22px; font-weight: 700; letter-spacing: 6px; margin: 6px 0 8px; }
.rt-kind-line { text-align: center; font-weight: 700; font-size: 13px; border-top: 1px solid #000; border-bottom: 1px solid #000; padding: 4px 0; margin-bottom: 10px; letter-spacing: 1px; }
.rt-head-line { display: flex; flex-wrap: wrap; gap: 0 18px; font-size: 13px; margin-bottom: 4px; }
.rt-head-item { flex: 1 1 30%; min-width: 0; overflow-wrap: anywhere; }
.rt-head-wide { flex: 1 1 60%; }
.rt-head-item b { font-weight: 700; }
.rt-items { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 12px; }
.rt-items th, .rt-items td { border: 1px solid #333; padding: 5px 4px; text-align: left; }
.rt-items th { text-align: center; font-weight: 700; background: #f5f5f5; }
.rt-items td.num { text-align: right; }
.rt-blank { text-align: center; letter-spacing: 4px; }
.rt-sign-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 12px; }
.rt-sign-cell { display: flex; align-items: flex-start; gap: 6px; min-height: 52px; font-size: 13px; padding: 6px 4px; }
.rt-sign-blank { flex: 1 1 auto; min-height: 30px; }
.rt-foot { border-top: 1px solid #000; margin-top: 8px; padding-top: 6px; font-size: 12px; }
/* 入库单 / 出库单的合计行：单色打印同样只用文字与线框表达 */
.rt-total-line { margin-top: 6px; font-size: 12px; text-align: right; }

/* ---------- 成交确认 → 是否打印（保存已在弹窗之前完成） ---------- */
.da-wrap { font-size: 13px; }
.da-head { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 6px; background: #f0f9eb; border: 1px solid #d6edc6; margin-bottom: 12px; }
.da-icon { flex: 0 0 26px; width: 26px; height: 26px; line-height: 26px; text-align: center; border-radius: 50%; background: #67c23a; color: #fff; font-weight: 700; }
.da-title { font-size: 15px; font-weight: 700; color: #2f6b1f; line-height: 1.5; }
.da-sub { font-size: 12px; color: #5b7a4e; margin-top: 2px; line-height: 1.5; }
.da-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.da-table th, .da-table td { border: 1px solid #e4e7ed; padding: 7px 10px; text-align: left; vertical-align: top; }
.da-table th { width: 96px; background: #fafafa; font-weight: 600; color: #606266; }
.da-q { margin-top: 14px; font-size: 14px; font-weight: 700; }
.da-hint { margin-top: 6px; font-size: 12px; color: #909399; line-height: 1.6; }

/* 默认 A4 竖向；横向由前端按配置动态注入 @page 覆盖 */
@page { size: A4 portrait; margin: 8mm; }
@media print {
  html, body { background: #fff !important; width: auto !important; height: auto !important; overflow: visible !important; }
  body * { visibility: hidden !important; }
  .po-sheet, .po-sheet *, .rt-sheet, .rt-sheet * { visibility: visible !important; }
  /* 解除 Element Plus 遮罩 / 对话框的 fixed 定位、固定宽度与 overflow 裁切，
     否则 .po-sheet 的绝对定位基准是遮罩，右侧内容会被裁在对话框边界内（边上被挡） */
  .el-overlay, .el-overlay-dialog, .el-dialog, .el-dialog__header, .el-dialog__body, .el-dialog__footer {
    position: static !important; top: auto !important; left: auto !important; right: auto !important; bottom: auto !important;
    inset: auto !important; transform: none !important;
    overflow: visible !important; width: auto !important; max-width: none !important; min-width: 0 !important;
    height: auto !important; max-height: none !important; min-height: 0 !important;
    background: transparent !important; box-shadow: none !important; border: none !important;
    padding: 0 !important; margin: 0 !important;
  }
  .po-sheet, .rt-sheet {
    position: absolute !important; left: 0 !important; top: 0 !important;
    width: 100% !important; max-width: none !important; min-width: 0 !important;
    border: none !important; padding: 0 !important; margin: 0 !important; background: #fff !important;
  }
  /* 竖向 A4 可用宽约 190mm：收紧字号与列内边距，让 9 列完整排下不裁边 */
  .po-sheet { font-size: 11px !important; }
  .po-sheet-head { font-size: 14px !important; }
  .po-sheet-title { font-size: 18px !important; margin: 4px 0 10px !important; }
  .po-info { font-size: 11px !important; }
  .po-info-k { width: 68px !important; padding: 4px 5px !important; }
  .po-info-v { padding: 4px 5px !important; }
  .po-print-items { width: 100% !important; table-layout: fixed !important; font-size: 11px !important; }
  .po-print-items th, .po-print-items td { word-break: break-all !important; padding: 3px 3px !important; }
  /* 放开内联固定列宽，按竖向 A4 比例重新分配 8 列（合计 100%） */
  .po-print-items thead tr:last-child th:nth-child(1) { width: 5% !important; }   /* 序号 */
  .po-print-items thead tr:last-child th:nth-child(2) { width: 22% !important; }  /* 物资名称 */
  .po-print-items thead tr:last-child th:nth-child(3) { width: 17% !important; }  /* 型号/规格 */
  .po-print-items thead tr:last-child th:nth-child(4) { width: 6% !important; }   /* 单位 */
  .po-print-items thead tr:last-child th:nth-child(5) { width: 8% !important; }   /* 数量 */
  .po-print-items thead tr:last-child th:nth-child(6) { width: 10% !important; }  /* 单价 */
  .po-print-items thead tr:last-child th:nth-child(7) { width: 12% !important; }  /* 合价 */
  .po-print-items thead tr:last-child th:nth-child(8) { width: 20% !important; }  /* 备注 */
  .po-print-items .po-group th { padding: 4px !important; font-size: 12px !important; }
  .po-total { font-size: 12px !important; }
  /* 列数由内联样式按该标段表头的签章人数决定，这里不加强制覆盖 */
  .po-sign-row { gap: 0 !important; }
  .po-sign-cell { min-height: 54px !important; padding: 4px 6px !important; font-size: 11px !important; }
  .po-sign-blank { min-height: 28px !important; }
  .po-sheet-head, .po-sheet-title { page-break-after: avoid; }
  .po-print-items tr { page-break-inside: avoid; }
  /* 退货单：单色针式打印，强制纯黑白，去底纹；区分完全依赖标题文字与抬头字段 */
  .rt-sheet { font-size: 11px !important; color: #000 !important; background: #fff !important; }
  .rt-sheet * { color: #000 !important; background: transparent !important; }
  .rt-project { font-size: 13px !important; }
  .rt-title { font-size: 18px !important; margin: 4px 0 6px !important; }
  .rt-kind-line { font-size: 12px !important; border-top: 1px solid #000 !important; border-bottom: 1px solid #000 !important; padding: 3px 0 !important; }
  .rt-head-line { font-size: 11px !important; }
  .rt-items { width: 100% !important; table-layout: fixed !important; font-size: 10px !important; }
  .rt-items th, .rt-items td { border: 1px solid #000 !important; padding: 3px 3px !important; word-break: break-all !important; }
  .rt-items thead th:nth-child(1) { width: 5% !important; }
  .rt-items thead th:nth-child(2) { width: 19% !important; }
  .rt-items thead th:nth-child(3) { width: 14% !important; }
  .rt-items thead th:nth-child(4) { width: 6% !important; }
  .rt-items thead th:nth-child(5) { width: 8% !important; }
  .rt-items thead th:nth-child(6) { width: 9% !important; }
  .rt-items thead th:nth-child(7) { width: 12% !important; }
  .rt-items thead th:nth-child(8) { width: 16% !important; }
  .rt-items thead th:nth-child(9) { width: 11% !important; }
  .rt-items tr { page-break-inside: avoid; }
  .rt-sign-cell { min-height: 46px !important; font-size: 11px !important; }
  .rt-sign-blank { min-height: 26px !important; }
  .rt-foot { font-size: 10px !important; border-top: 1px solid #000 !important; }
  .rt-total-line { font-size: 11px !important; color: #000 !important; }
  .no-print, .el-dialog__header, .el-dialog__footer { display: none !important; }
}


/* ---------- 申购单涨价比对提示 ----------
   明细行内联提示：单价高于同规格物品上次成交价时出现，红框要求填写原因。
   颜色只区分提示强度（warn 橙 / severe 红），不改变「缺原因不能保存」的硬规则。 */
.pc-tip { font-size: 11px; line-height: 1.5; padding: 4px 6px; border-radius: 4px; margin-bottom: 4px; border-left: 3px solid #faad14; background: #fffbe6; color: #614700; }
.pc-tip.pc-severe { border-left-color: #c0392b; background: #fff2f0; color: #a8071a; }
.pc-tip b { font-weight: 700; }
.pc-tip .pc-line { color: #c0392b; font-weight: 600; }
.pc-tip.pc-warn .pc-line { color: #ad6800; }
.pc-need .el-input__wrapper { box-shadow: 0 0 0 1px #c0392b inset !important; background: #fff8f7; }
.pc-quick { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.pc-quick span { font-size: 11px; color: #1f4e79; background: #eef4fb; border: 1px solid #cfe0f3; border-radius: 9px; padding: 1px 7px; cursor: pointer; user-select: none; }
.pc-quick span:hover { background: #dbeafe; }
.pc-bar { margin-top: 10px; padding: 8px 12px; border-radius: 4px; border-left: 4px solid #c0392b; background: #fff2f0; color: #a8071a; font-size: 13px; }
.pc-bar-miss { margin-left: 8px; font-weight: 700; }

/* ---------- 单据照片：拍照录入 / 查账核对 ---------- */
.dp-panel { border: 1px solid #d9e6f2; border-radius: 6px; background: #fafcff; padding: 10px 12px; }
.dp-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dp-panel .muted, .dp-hint { font-size: 12px; line-height: 1.6; color: #7a8699; }
.dp-thumbs { min-height: 34px; align-items: center; }
.dp-thumb { border-color: #90caf9; }
.dp-thumb .thumb { cursor: zoom-in; }
.dp-src { position: absolute; left: 2px; top: 2px; background: rgba(31,78,121,.88); color: #fff; font-size: 11px; line-height: 16px; padding: 0 5px; border-radius: 3px; }
.dp-empty { font-size: 12px; padding: 4px 0; }
.dp-original { margin-top: 8px; padding-top: 8px; border-top: 1px dashed #d9e6f2; font-size: 12px; }
.dp-original input[type=file] { font-size: 12px; margin-left: 6px; }
.dp-hint { margin-top: 6px; }
.dp-error { margin-top: 8px; padding: 6px 10px; border-radius: 4px; background: #fff2f0; border: 1px solid #ffccc7; color: #c0392b; font-size: 12px; line-height: 1.6; }
.dp-search { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.dp-table-thumb { width: 56px; height: 42px; object-fit: cover; border: 1px solid #d9e6f2; border-radius: 4px; cursor: zoom-in; background: #fafafa; }
.dp-link { margin-left: 8px; color: #1f4e79; font-size: 12px; text-decoration: underline; }
.dp-full { display: block; max-width: 100%; max-height: 60vh; margin: 0 auto 12px; border: 1px solid #e0e0e0; border-radius: 4px; background: #fafafa; }
.dp-meta { font-size: 13px; line-height: 1.9; color: #414855; }
.dp-meta b { color: #1f4e79; }
.dp-viewer-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px 14px; background: #f5f8fc; border: 1px solid #d9e6f2; border-radius: 6px; padding: 10px 14px; margin-bottom: 12px; font-size: 12px; color: #414855; }
.dp-viewer-meta b { color: #1f4e79; }
/* 现场摄像头 */
.cam-wrap { position: relative; width: 100%; min-height: 300px; background: #263238; border-radius: 6px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.cam-video { width: 100%; max-height: 52vh; object-fit: contain; display: block; background: #263238; }
.cam-placeholder { position: absolute; color: #cfd8dc; text-align: center; font-size: 14px; line-height: 1.9; }
.cam-placeholder .muted { color: #90a4ae; font-size: 12px; }
.cam-shot { margin-top: 10px; padding: 8px; border: 1px dashed #90caf9; border-radius: 6px; background: #fafcff; text-align: center; }
.cam-shot-img { max-width: 100%; max-height: 220px; border: 1px solid #e0e0e0; border-radius: 4px; }
.cam-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
