/* ============================================================
   手机拆机工厂 ERP 通用样式
   ============================================================ */
.erp-page { padding: 18px 20px 26px; }

/* 页头：恢复普通文档流（不做吸顶）。
   之前的 sticky 版本滚动时会在内容上方压出一条白底条 + 渐隐阴影，看起来发闷，故去掉；
   这里保持无内边距、无背景/分隔线，标题与下方内容的间距沿用吸顶前一致的 2px。 */
.erp-page-head {
    display: flex; align-items: flex-start; justify-content: space-between;
    margin: 0 0 2px;
    padding: 0;
}
.erp-title { font-size: 20px; font-weight: 700; color: #1f2937; letter-spacing: .5px; }
.erp-sub { font-size: 12px; color: #94a3b8; margin-top: 6px; }
.erp-head-actions { display: flex; align-items: center; gap: 8px; }

.erp-stat-row {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px;
}
.erp-stat {
    background: #fff; border-radius: 14px; padding: 16px 18px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .05); border: 1px solid #f1f5f9;
}
.erp-stat-label { font-size: 12px; color: #94a3b8; margin-bottom: 8px; }
.erp-stat-value { font-size: 24px; font-weight: 700; color: #0f172a; }
.erp-stat-value .unit { font-size: 12px; color: #94a3b8; font-weight: 400; margin-left: 4px; }

.erp-toolbar {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    margin: 4px 0 12px;
}
.erp-pager { display: flex; justify-content: flex-end; padding: 12px 0 0; }

.erp-chip {
    display: inline-block; padding: 1px 9px; border-radius: 10px;
    font-size: 12px; line-height: 19px; background: #f1f5f9; color: #64748b;
}
.erp-chip.green { background: #e8f8ef; color: #16a34a; }
.erp-chip.yellow { background: #fff6e5; color: #d97706; }
.erp-chip.red { background: #fdecec; color: #dc2626; }
.erp-chip.blue { background: #e8f1ff; color: #2563eb; }
.erp-chip.gray { background: #f1f5f9; color: #64748b; }
/* 白底描边款：分类/单位这类中性标签用，视觉更轻 */
.erp-chip.plain { background: #fff; border: 1px solid #e2e8f0; color: #475569; border-radius: 6px; padding: 0 8px; }

.erp-link { color: #2563eb; cursor: pointer; }
.erp-link:hover { text-decoration: underline; }
.erp-warn-text { color: #d97706; font-weight: 600; }
.erp-over-row { background: #fffdf5 !important; }

.erp-detail-head {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
    background: #f8fafc; border-radius: 10px; padding: 14px 16px; margin-bottom: 14px;
    font-size: 13px; color: #334155;
}
.erp-detail-head .k { color: #94a3b8; margin-right: 8px; }

.erp-empty { text-align: center; color: #94a3b8; padding: 40px 0; font-size: 13px; }
.erp-strong { font-weight: 700; color: #0f172a; }
.erp-muted { color: #94a3b8; font-size: 12px; }

/* 表格微调 */
.erp-page .el-table th { background: #f8fafc !important; color: #475569 !important; font-weight: 600; }
.erp-page .el-table td { color: #334155; }
.erp-page .el-tabs__item.is-active { color: #2563eb; font-weight: 600; }
.erp-page .el-tabs__active-bar { background-color: #2563eb; }

/* ============ 仪表盘 ============ */
.dash-wrap { padding: 18px 20px 26px; }
.dash-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.dash-card {
    background: #fff; border-radius: 16px; padding: 18px 20px; position: relative;
    box-shadow: 0 4px 16px rgba(15, 23, 42, .06); border: 1px solid #f1f5f9;
    cursor: pointer; transition: all .25s;
}
.dash-card:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(15, 23, 42, .1); }
.dash-card .t { font-size: 13px; color: #64748b; display: flex; align-items: center; gap: 6px; }
.dash-card .v { font-size: 30px; font-weight: 700; color: #0f172a; margin: 10px 0 6px; }
.dash-card .v small { font-size: 13px; font-weight: 400; color: #94a3b8; margin-left: 4px; }
.dash-card .s { font-size: 12px; color: #94a3b8; }
.dash-card .ico {
    position: absolute; right: 18px; top: 16px; width: 38px; height: 38px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center; font-size: 18px; color: #fff;
}
.dash-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 14px; margin-top: 14px; }
.dash-panel {
    background: #fff; border-radius: 16px; padding: 18px 20px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, .06); border: 1px solid #f1f5f9;
}
.dash-panel h4 { margin: 0 0 4px; font-size: 15px; color: #1f2937; font-weight: 600; }
.dash-panel .desc { font-size: 12px; color: #94a3b8; margin-bottom: 14px; }
.dash-todo-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 12px; border-radius: 10px; background: #f8fafc; margin-bottom: 8px; font-size: 13px;
}
.dash-todo-item:hover { background: #f1f5f9; }
.dash-legend { display: flex; justify-content: space-between; font-size: 13px; padding: 6px 4px; }
.dash-legend .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 8px; }

/* ============ 数据驾驶舱（深色） ============ */
.ck-wrap {
    margin: 14px 18px 20px; padding: 18px; border-radius: 18px; color: #d7e6ff;
    background: radial-gradient(circle at 50% 0%, #142a52 0%, #0a1226 45%, #060a16 100%);
    box-shadow: 0 20px 50px rgba(0, 0, 0, .35);
    font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}
.ck-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 8px 16px; }
.ck-title {
    font-size: 24px; font-weight: 700; letter-spacing: 4px;
    background: linear-gradient(90deg, #6ee7ff, #7ea8ff 55%, #b388ff);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.ck-sub { font-size: 12px; color: #4d6a96; letter-spacing: 2px; margin-top: 6px; }
.ck-clock { font-size: 13px; color: #6d8cba; text-align: right; }
.ck-kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.ck-kpi {
    background: linear-gradient(160deg, rgba(31, 71, 133, .38), rgba(11, 23, 45, .5));
    border: 1px solid rgba(88, 152, 255, .22); border-radius: 12px; padding: 14px 16px;
    position: relative; overflow: hidden;
}
.ck-kpi:before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
    background: linear-gradient(180deg, #38bdf8, #6366f1);
}
.ck-kpi .l { font-size: 12px; color: #7ea2d4; }
.ck-kpi .v { font-size: 24px; font-weight: 700; color: #e6f1ff; margin-top: 6px; }
.ck-kpi .v small { font-size: 12px; color: #7ea2d4; margin-left: 4px; font-weight: 400; }
.ck-grid { display: grid; grid-template-columns: 1fr 1.25fr 1fr; gap: 12px; margin-top: 12px; }
.ck-panel {
    background: linear-gradient(180deg, rgba(17, 34, 65, .72), rgba(9, 18, 36, .78));
    border: 1px solid rgba(74, 128, 214, .2); border-radius: 12px; padding: 14px 16px; min-height: 200px;
}
.ck-panel h5 {
    margin: 0 0 12px; font-size: 13px; color: #9dc0f0; font-weight: 600; letter-spacing: 1px;
    display: flex; align-items: center; justify-content: space-between;
}
.ck-panel h5 span { font-size: 11px; color: #4d6a96; font-weight: 400; }
.ck-wh { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed rgba(90, 140, 210, .15); }
.ck-wh:last-child { border-bottom: none; }
.ck-wh .n { font-size: 13px; color: #cfe3ff; }
.ck-wh .q { font-size: 12px; color: #6d8cba; }
.ck-bar { height: 5px; border-radius: 3px; background: rgba(80, 130, 200, .18); margin-top: 6px; overflow: hidden; }
.ck-bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #22d3ee, #6366f1); }
.ck-list-item { display: flex; justify-content: space-between; font-size: 12px; color: #8fb0d9; padding: 7px 0; border-bottom: 1px dashed rgba(90, 140, 210, .12); }
.ck-list-item:last-child { border-bottom: none; }
.ck-tag { font-size: 11px; padding: 0 6px; border-radius: 4px; background: rgba(56, 189, 248, .16); color: #67e8f9; margin-right: 6px; }
.ck-tag.out { background: rgba(244, 114, 182, .14); color: #f9a8d4; }
.ck-tag.move { background: rgba(250, 204, 21, .14); color: #fde68a; }

@media (max-width: 1400px) {
    .erp-stat-row, .dash-cards { grid-template-columns: repeat(2, 1fr); }
    .dash-grid, .ck-grid { grid-template-columns: 1fr; }
    .ck-kpis { grid-template-columns: repeat(3, 1fr); }
}

/* ============================================================
   经营控制台（dashboardPage）
   ============================================================ */
.dash2 { background: #f5f7fb; min-height: calc(100vh - 50px); }
.dash2-head {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 16px; margin-bottom: 16px; flex-wrap: wrap;
}
.dash2-head-l h2 { font-size: 21px; font-weight: 700; color: #0f172a; margin: 0; letter-spacing: .5px; }
.dash2-head-l p { font-size: 12px; color: #94a3b8; margin: 7px 0 0; }
.dash2-head-r { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dash2-live {
    display: flex; align-items: center; gap: 16px;
    background: #fff; border: 1px solid #eef2f7; border-radius: 10px;
    padding: 8px 16px; font-size: 12px; color: #64748b;
    box-shadow: 0 2px 8px rgba(15,23,42,.04);
}
.dash2-live b { font-size: 15px; margin-left: 4px; }
.c-green { color: #16a34a !important; }
.c-red { color: #dc2626 !important; }
.c-blue { color: #2563eb !important; }
.c-orange { color: #ea580c !important; }

.dash2-kpi { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 14px; }
.dash2-card {
    background: #fff; border: 1px solid #eef2f7; border-radius: 14px;
    padding: 16px 18px 15px; cursor: pointer; position: relative; overflow: hidden;
    box-shadow: 0 4px 16px rgba(15,23,42,.05);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.dash2-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(15,23,42,.10); border-color: #dbe7fb; }
.dash2-card::after {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
    background: linear-gradient(180deg, #3b82f6, #93c5fd); opacity: .85;
}
.dash2-card.money::after { background: linear-gradient(180deg, #10b981, #6ee7b7); }
.dash2-card-top { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: #64748b; }
.dash2-card-top i { font-size: 17px; color: #c0cbdd; }
.dash2-card-num { font-size: 27px; font-weight: 700; color: #0f172a; margin: 9px 0 7px; letter-spacing: .3px; }
.dash2-card-num small { font-size: 12px; font-weight: 400; color: #94a3b8; margin-left: 4px; }
.dash2-card-sub { font-size: 12px; color: #94a3b8; line-height: 18px; }
.dash2-card-sub .up { color: #16a34a; margin-left: 4px; font-weight: 600; }
.dash2-card-sub .down { color: #dc2626; margin-left: 4px; font-weight: 600; }

.dash2-row { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; margin-bottom: 14px; }
.dash2-row.three { grid-template-columns: repeat(3, 1fr); }
.dash2-panel {
    background: #fff; border: 1px solid #eef2f7; border-radius: 14px;
    padding: 16px 18px; box-shadow: 0 4px 16px rgba(15,23,42,.05); min-width: 0;
}
.dash2-panel-head {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 12px; margin-bottom: 10px;
}
.dash2-panel-head h4 { font-size: 14px; font-weight: 700; color: #1e293b; margin: 0; }
.dash2-panel-head p { font-size: 11.5px; color: #a3adbf; margin: 5px 0 0; }
.dash2-total { font-size: 17px; font-weight: 700; color: #0f172a; }
.dash2-chart { width: 100%; }
.dash2-foot {
    display: flex; gap: 24px; flex-wrap: wrap;
    font-size: 12px; color: #94a3b8; padding: 4px 2px 0;
}
.dash2-foot b { color: #0f172a; font-size: 13px; }

.dash2-tabs { display: inline-flex; background: #f1f5f9; border-radius: 8px; padding: 2px; }
.dash2-tabs span {
    padding: 3px 13px; font-size: 12px; color: #64748b;
    border-radius: 7px; cursor: pointer; transition: all .15s;
}
.dash2-tabs span.on { background: #fff; color: #2563eb; font-weight: 600; box-shadow: 0 1px 4px rgba(15,23,42,.10); }

/* 库存结构明细 */
.dash2-struct { margin-top: 4px; }
.dash2-struct-item {
    display: flex; align-items: center; gap: 8px;
    font-size: 12px; color: #475569; padding: 5px 2px; cursor: pointer; border-radius: 6px;
}
.dash2-struct-item:hover { background: #f8fafc; }
.dash2-struct-item .dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.dash2-struct-item .nm { flex: 0 0 78px; }
.dash2-struct-item .bar { flex: 1; height: 5px; background: #f1f5f9; border-radius: 3px; overflow: hidden; }
.dash2-struct-item .bar i { display: block; height: 100%; border-radius: 3px; transition: width .5s ease; }
.dash2-struct-item .vl { flex: 0 0 auto; color: #0f172a; font-weight: 600; font-size: 11.5px; }

/* 待办列表（报表中心等页面复用，勿删） */
.dash2-todo {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 8px; border-radius: 9px; cursor: pointer; font-size: 13px; color: #475569;
    transition: background .15s;
}
.dash2-todo:hover { background: #f8fafc; }
.dash2-todo .ic {
    width: 28px; height: 28px; border-radius: 8px; background: #f1f5f9;
    display: flex; align-items: center; justify-content: center; color: #64748b; font-size: 14px;
}
.dash2-todo .nm { flex: 1; }
.dash2-todo .num {
    min-width: 26px; text-align: center; font-weight: 700; color: #94a3b8;
    font-size: 13px;
}
.dash2-todo .num.hot { color: #dc2626; }
.dash2-todo .ar { color: #cbd5e1; font-size: 12px; }

/* 待办审核（小卡片行） */
.dash2-todo-wrap { margin-bottom: 14px; }
.dash2-todo-head { display: flex; align-items: baseline; gap: 10px; margin: 0 2px 10px; }
.dash2-todo-head h4 { font-size: 14px; font-weight: 700; color: #1e293b; margin: 0; }
.dash2-todo-head p { font-size: 11.5px; color: #a3adbf; margin: 0; }
.dash2-todo-head p b { color: #ea580c; font-weight: 700; font-size: 13px; margin: 0 2px; }
.dash2-todo-grid { display: grid; grid-template-columns: repeat(9, 1fr); gap: 10px; }
.dash2-tcard {
    display: flex; align-items: flex-start; gap: 9px; min-width: 0;
    background: #fff; border: 1px solid #eef2f7; border-radius: 11px;
    padding: 10px 12px; cursor: pointer; position: relative; overflow: hidden;
    box-shadow: 0 3px 12px rgba(15,23,42,.045);
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.dash2-tcard::after {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: #e2e8f0;
}
.dash2-tcard.hot::after { background: linear-gradient(180deg, #f97316, #fdba74); }
.dash2-tcard:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(15,23,42,.10); border-color: #dbe7fb; }
.dash2-tcard .ic {
    width: 30px; height: 30px; border-radius: 9px; flex: 0 0 auto;
    background: #f1f5f9; color: #94a3b8; font-size: 15px;
    display: flex; align-items: center; justify-content: center;
}
.dash2-tcard.hot .ic { background: #fff3e6; color: #ea580c; }
.dash2-tcard .tx { flex: 1; min-width: 0; }
.dash2-tcard .nm {
    font-size: 11.5px; color: #64748b; line-height: 15px; height: 30px; overflow: hidden;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.dash2-tcard .num { font-size: 19px; font-weight: 700; color: #94a3b8; line-height: 24px; margin-top: 1px; }
.dash2-tcard.hot .num { color: #ea580c; }
.dash2-tcard .num small { font-size: 11px; font-weight: 400; color: #b0b9c9; margin-left: 3px; }

/* 生产进度 */
.dash2-prog { padding: 7px 0; border-bottom: 1px dashed #f1f5f9; }
.dash2-prog:last-child { border-bottom: none; }
.dash2-prog .row { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.dash2-prog .no { color: #2563eb; font-weight: 600; }
.dash2-prog .md { flex: 1; color: #94a3b8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash2-prog .pc { font-weight: 700; color: #0f172a; }
.dash2-prog .bar { height: 6px; background: #f1f5f9; border-radius: 3px; margin: 6px 0 4px; overflow: hidden; }
.dash2-prog .bar i {
    display: block; height: 100%; border-radius: 3px;
    background: linear-gradient(90deg, #3b82f6, #60a5fa); transition: width .5s ease;
}
.dash2-prog .sub { font-size: 11px; color: #a3adbf; }

/* 排行 */
.dash2-rank {
    display: flex; align-items: center; gap: 10px;
    padding: 7px 4px; font-size: 12.5px; color: #475569; border-bottom: 1px dashed #f6f8fb;
}
.dash2-rank:last-child { border-bottom: none; }
.dash2-rank .rk {
    width: 19px; height: 19px; border-radius: 6px; background: #f1f5f9; color: #94a3b8;
    font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.dash2-rank .rk1 { background: #fee2e2; color: #dc2626; }
.dash2-rank .rk2 { background: #fef3c7; color: #d97706; }
.dash2-rank .rk3 { background: #e0f2fe; color: #0284c7; }
.dash2-rank .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash2-rank .nm em { font-style: normal; color: #b0b9c9; font-size: 11px; margin-left: 6px; }
.dash2-rank .vl { font-weight: 600; color: #0f172a; }

/* 动态 */
.dash2-act {
    display: flex; align-items: flex-start; gap: 9px;
    padding: 7px 0; border-bottom: 1px dashed #f6f8fb;
}
.dash2-act:last-child { border-bottom: none; }
.dash2-act .tag {
    flex: 0 0 auto; font-size: 11px; padding: 1px 7px; border-radius: 5px; margin-top: 1px;
}
.dash2-act .tag.in { background: #e8f8ef; color: #16a34a; }
.dash2-act .tag.out { background: #fdecec; color: #dc2626; }
.dash2-act .tag.mv { background: #eef2ff; color: #4f46e5; }
.dash2-act .txt { flex: 1; min-width: 0; }
.dash2-act .l1 { font-size: 12.5px; color: #334155; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash2-act .l1 em { font-style: normal; color: #94a3b8; font-size: 11px; margin-left: 4px; }
.dash2-act .l2 { font-size: 11px; color: #a3adbf; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash2-act .q { font-size: 13px; font-weight: 700; }

@media (max-width: 1500px) {
    .dash2-kpi { grid-template-columns: repeat(2, 1fr); }
    .dash2-row.three { grid-template-columns: repeat(2, 1fr); }
    .dash2-todo-grid { grid-template-columns: repeat(5, 1fr); }
}
@media (max-width: 1100px) {
    .dash2-row, .dash2-row.three { grid-template-columns: 1fr; }
    .dash2-kpi { grid-template-columns: 1fr; }
    .dash2-todo-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ============ 六列统计卡（仓库页） ============ */
.erp-stat-row.cols6 { grid-template-columns: repeat(6, 1fr); }
.erp-stat-row.cols3 { grid-template-columns: repeat(3, 1fr); }
.erp-stat-row.cols4 { grid-template-columns: repeat(4, 1fr); }
.erp-stat { transition: transform .18s ease, box-shadow .18s ease; }
.erp-stat:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(15, 23, 42, .09); }
.erp-stat-sub { font-size: 11px; color: #b6c2d4; margin-top: 5px; line-height: 15px; }
.erp-stat-warn { border-color: #fecaca; background: linear-gradient(180deg, #fff, #fff7f7); }

/* ============ 采购申请单（独立页面） ============ */
.erp-card {
    background: #fff; border: 1px solid #eef2f7; border-radius: 14px;
    padding: 18px 22px 20px; margin-bottom: 14px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, .05);
}
.erp-card-title {
    font-size: 14.5px; font-weight: 700; color: #1e293b;
    padding-left: 11px; position: relative; margin-bottom: 16px;
}
.erp-card-title::before {
    content: ''; position: absolute; left: 0; top: 3px; bottom: 3px; width: 4px;
    border-radius: 2px; background: linear-gradient(180deg, #3b82f6, #60a5fa);
}
.erp-apply-total {
    margin-top: 14px; padding: 12px 18px; border-radius: 10px;
    background: #f8fafc; border: 1px dashed #dbe3ee;
    font-size: 13px; color: #475569;
    display: flex; justify-content: flex-end; gap: 18px; align-items: center;
}
.erp-apply-total b { color: #2563eb; font-size: 15px; }



/* ============ 采购申请单弹窗（列表页新增/编辑） ============ */
.erp-apply-dialog { max-width: 96vw; }
.erp-apply-dialog .el-dialog__body { max-height: 76vh; overflow-y: auto; padding: 4px 18px 8px; }
.erp-apply-dialog .erp-card {
    box-shadow: none; border-color: #eef2f7;
    padding: 14px 16px; margin-bottom: 10px;
}
.erp-apply-dialog .erp-card:last-child { margin-bottom: 0; }
.erp-apply-dialog .erp-card-title { margin-bottom: 12px; }

/* 明细表：行高压紧，只给图片列留大空间 */
.erp-apply-table .el-table__cell { padding-top: 6px; padding-bottom: 6px; }
.erp-apply-table td .cell { padding: 4px 8px; }
/* 附件列文本上传模式：隐藏空的 tip 占位，避免把行撑高 */
.erp-apply-table .el-upload__tip { display: none !important; }
.erp-apply-table td .el-input__inner { height: 30px; line-height: 30px; }
/* 附件列是文本按钮模式，去掉全局 80px 虚线方块 */
.erp-apply-table .el-upload.upload-no-border {
    width: auto; height: auto; line-height: normal; border: none;
}
.erp-sys-price { color: #94a3b8; font-size: 12.5px; }

/* 图片列：缩略图与上传格子保持小尺寸（44px），多图一行排列、超出横向滚动 */
.erp-img-cell .cell { padding: 0 6px !important; }
.erp-img-cell .avatar-uploader {
    display: flex; align-items: center; gap: 6px;
    overflow-x: auto; overflow-y: hidden;
    white-space: nowrap; padding: 1px 0 2px;
}
.erp-img-cell .avatar-uploader > .el-upload-list {
    display: flex; align-items: center; gap: 6px; margin: 0; flex: 0 0 auto;
}
.erp-img-cell .el-upload-list--picture-card .el-upload-list__item {
    width: 40px; height: 40px; line-height: 40px; margin: 0; flex: 0 0 40px; border-radius: 6px;
}
.erp-img-cell .el-upload-list--picture-card .el-upload-list__item img,
.erp-img-cell .el-upload-list--picture-card .el-upload-list__item-thumbnail {
    width: 40px; height: 40px; object-fit: cover; display: block;
}
.erp-img-cell .el-upload--picture-card {
    width: 40px; height: 40px; line-height: 38px; flex: 0 0 40px; border-radius: 6px;
    /* 上传格子固定在行首：order:-1 让它排在缩略图左边，sticky 让它在横向滚动时始终贴住左边缘，
       否则传了几张图之后按钮会被推到可视区外，得先拖动滚动条才能点到 */
    order: -1; position: sticky; left: 0; z-index: 2;
    margin-right: 6px; background: #fff;
    box-shadow: 7px 0 7px -7px rgba(15, 23, 42, .3);   /* 右侧投影：提示后面还有图 */
}
.erp-img-cell .el-upload--picture-card .el-icon-plus,
.erp-img-cell .el-upload--picture-card .avatar-uploader-icon {
    font-size: 14px; line-height: 38px; width: 38px; height: 38px;
}
.erp-img-cell .avatar-uploader::-webkit-scrollbar { height: 6px; }
.erp-img-cell .avatar-uploader::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
.erp-img-cell .avatar-uploader::-webkit-scrollbar-track { background: #f1f5f9; border-radius: 3px; }

/* 批次号：系统生成、只读展示（浅底提示不可编辑） */
.erp-readonly .el-input__inner {
    background: #f6f8fb;
    color: #475569;
    cursor: default;
}

/* 全站列表单元格内边距收窄（Element 默认左右各 12px）：
   列数多的表格一列省 8px，13 列就能省下 100px 左右，1440/1600 视口基本不再出横向滚动。
   采购申请单（6px）与申请单明细表（4px 8px）有自己更紧的规则，这里排除，避免互相覆盖。
   「操作」列（.erp-op-cell）另在下方单独设置 padding，本规则在它之前定义，不会盖掉。 */
.layui-body .el-table:not(.erp-purchase-table):not(.erp-apply-table) th .cell,
.layui-body .el-table:not(.erp-purchase-table):not(.erp-apply-table) td .cell {
    padding-left: 8px; padding-right: 8px;
}

/* 列表操作列：实体按钮（mini）横排，收紧左右内边距与按钮间距，
   保证待审核行「通过/驳回/查看/删除」4 个按钮也能挤在一行不换行。
   用 flex + gap 而不是 margin：inline-block 按钮之间的换行空白会额外占约 4px/个，
   4 个按钮累计溢出单元格被 overflow:hidden 裁掉（表现为「查看」只剩一半、末尾出省略号）。 */
.el-table td.erp-op-cell .cell {
    display: flex; align-items: center; justify-content: center;
    gap: 4px; padding: 0 6px; white-space: nowrap;
}
.el-table td.erp-op-cell .el-button { padding: 5px 8px; font-size: 12px; flex: 0 0 auto; }
.el-table td.erp-op-cell .el-button + .el-button { margin-left: 0; }

/* 全站表格操作列统一实体按钮组：<div class="erp-ops"> 包裹一排按钮。
   尺寸与 erp-op-cell 完全一致（padding 5/8、字号 12、间距 4），
   各个业务表格只需把 type="text" 换成实体 type，不用再单独调样式。 */
.erp-ops {
    display: flex; align-items: center; justify-content: center;
    gap: 4px; white-space: nowrap;
}
.el-table td .erp-ops .el-button {
    margin: 0; padding: 5px 8px; font-size: 12px; line-height: 1.5;
    border-radius: 6px; flex: 0 0 auto;
}
.el-table td .erp-ops .el-button + .el-button { margin-left: 0; }
/* 操作列里的「更多」下拉，外观与旁边的实体按钮对齐 */
.erp-ops .erp-ops-more {
    display: inline-flex; align-items: center; gap: 2px;
    height: 25px; padding: 0 8px; border-radius: 6px;
    border: 1px solid #dcdfe6; background: #fff; color: #606266;
    font-size: 12px; line-height: 1; cursor: pointer;
}
.erp-ops .erp-ops-more:hover { color: #409eff; border-color: #c6e2ff; background: #ecf5ff; }

/* ============ 采购申请单详情弹窗 ============ */
.erp-detail-dialog { max-width: 96vw; }
.erp-detail-dialog .el-dialog__body { max-height: 74vh; overflow-y: auto; padding: 6px 20px 12px; }
.erp-detail-title .t { font-size: 17px; font-weight: 600; color: #1f2937; line-height: 1.4; }
.erp-detail-title .s { font-size: 12.5px; color: #94a3b8; margin-top: 3px; }

/* 基础信息：3 列网格，label 在上、值在下 */
.erp-detail-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    border: 1px solid #eef2f7; border-radius: 10px; overflow: hidden; background: #fff;
}
.erp-detail-grid .item { padding: 11px 16px; border-bottom: 1px solid #f1f5f9; min-width: 0; }
.erp-detail-grid .item.full { grid-column: 1 / -1; border-bottom: none; }
.erp-detail-grid .item .k { display: block; font-size: 12px; color: #94a3b8; margin-bottom: 5px; }
.erp-detail-grid .item .v { font-size: 13.5px; color: #1f2937; font-weight: 500; word-break: break-all; }
.erp-detail-grid .item .v .unit { font-size: 11.5px; color: #94a3b8; font-weight: 400; margin-left: 3px; }

.erp-detail-sec { margin-top: 16px; }
.erp-detail-sec-t {
    font-size: 13.5px; font-weight: 600; color: #1e293b; margin-bottom: 8px;
    padding-left: 9px; position: relative;
}
.erp-detail-sec-t::before {
    content: ''; position: absolute; left: 0; top: 2px; bottom: 2px; width: 3px;
    border-radius: 2px; background: linear-gradient(180deg, #3b82f6, #60a5fa);
}
.erp-detail-imgs { display: flex; flex-wrap: wrap; gap: 10px; }
.erp-detail-imgs img {
    width: 92px; height: 92px; object-fit: cover; border-radius: 8px;
    border: 1px solid #eef2f7; cursor: zoom-in; background: #f8fafc;
}
.erp-detail-imgs img:hover { border-color: #93c5fd; }
.erp-detail-files { display: flex; flex-direction: column; gap: 6px; }
.erp-detail-file {
    display: inline-flex; align-items: center; gap: 7px; width: fit-content; max-width: 100%;
    padding: 6px 12px; border-radius: 8px; background: #f8fafc; border: 1px solid #eef2f7;
    font-size: 12.5px; color: #2563eb; text-decoration: none;
}
.erp-detail-file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.erp-detail-file:hover { background: #eff6ff; border-color: #bfdbfe; }
.erp-detail-empty {
    border: 1px dashed #e2e8f0; border-radius: 8px; padding: 20px;
    text-align: center; color: #b6c2d4; font-size: 13px; background: #fcfdfe;
}

/* ============ 手机分类入库弹窗 ============ */
.erp-in-dialog .el-dialog__body { padding: 6px 20px 4px; max-height: 76vh; overflow-y: auto; }
.erp-in-label { font-size: 13px; font-weight: 600; color: #334155; margin: 2px 0 8px; }

/* 批次勾选列表：一行一个批次，勾掉即从「可入库总数」里去掉 */
.erp-in-batches {
    max-height: 208px; overflow-y: auto;
    border: 1px solid #eef2f7; border-radius: 10px; background: #fbfdff;
}
.erp-in-batch-item {
    display: flex; align-items: center; gap: 12px;
    padding: 8px 14px; font-size: 12.5px; color: #475569;
    border-bottom: 1px solid #f1f5f9; cursor: pointer;
}
.erp-in-batch-item:last-child { border-bottom: none; }
.erp-in-batch-item:hover { background: #f4f9ff; }
.erp-in-batch-item.is-checked { background: #fff; }
.erp-in-batch-item .el-checkbox { margin-right: 0; }
.erp-in-batch-item .no { font-weight: 600; color: #2563eb; width: 132px; flex: 0 0 132px; }
.erp-in-batch-item .remark {
    color: #64748b; flex: 1 1 auto; min-width: 0;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.erp-in-batch-item .user { color: #475569; width: 70px; flex: 0 0 70px; }
.erp-in-batch-item .qty { margin-left: auto; color: #64748b; flex: 0 0 auto; white-space: nowrap; }
.erp-in-batch-item .qty b { color: #0f172a; }

.erp-in-tip { font-size: 12px; color: #94a3b8; margin: 8px 0 14px; }
.erp-in-tip .strong { color: #2563eb; }
.erp-in-pick { display: flex; gap: 10px; align-items: center; }
.erp-in-hint { font-size: 12px; color: #94a3b8; margin: 6px 0 12px; }

/* 分配明细表：单元格内边距收紧，操作列 88px 放得下「删除」，不会被右边框裁掉 */
.erp-in-table th .cell,
.erp-in-table td .cell { padding-left: 8px; padding-right: 8px; }
.erp-in-table td .el-input-number { width: 100%; }
.erp-in-table .el-input-number .el-input__inner { text-align: right; }
.erp-in-cap { color: #0f172a; }
/* 收货差异：超收/少收都属正常（采购量只是预估值），用中性色提示，不要用错误红 */
.erp-in-more { color: #b45309; }
.erp-in-less { color: #2563eb; }
.erp-in-same { color: #16a34a; }
.erp-in-foot {
    display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
    margin-top: 14px; padding: 12px 16px; border-radius: 9px;
    background: #f8fafc; border: 1px dashed #e2e8f0;
    font-size: 12.5px; color: #64748b;
}
.erp-in-foot b { color: #0f172a; }
.erp-in-foot .is-ok { color: #16a34a; font-weight: 500; }
/* 差异说明（多收/少收 N 台）：中性琥珀色，表示「与预估不同」而不是「出错」 */
.erp-in-foot .is-note { color: #b45309; font-weight: 500; }
.erp-in-foot .is-note b { color: #b45309; }
.erp-in-foot .is-over { color: #dc2626; }
.erp-in-foot .is-over b { color: #dc2626; }

/* ============ 附件上传小卡片（file-upload 的 chip 模式） ============
   text 模式默认是个蓝色「上传」按钮，传完也看不出有没有附件；
   chip 模式在已有文件时换成「📎 1/1」，点一下就重新选文件（父组件只留最后一个 = 覆盖上传） */
.erp-file-chip {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 10px; border-radius: 8px;
    background: #eff6ff; border: 1px solid #dbeafe; color: #2563eb;
    font-size: 12.5px; line-height: 1.15; white-space: nowrap; cursor: pointer;
    vertical-align: middle;
}
.erp-file-chip:hover { background: #dbeafe; border-color: #bfdbfe; }
.erp-file-chip i { font-size: 13px; }

/* 采购申请单列表：数值/时间列不换行；单元格左右内边距压到 6px，
   11 列合计能省下 130px 左右，才放得下一屏不横滚（默认 12px 会挤到省略号） */
.erp-purchase-table th .cell,
.erp-purchase-table td .cell { padding-left: 6px; padding-right: 6px; white-space: nowrap; }

/* ============ 仓内移动弹窗（本仓内 批次 → 另一个商品） ============
   每行左边是固定的来源批次（商品名 + 批次号 + 可用量），右边选目标商品。
   操作人与备注整批共用一条，固定在明细表下方。 */
.erp-move-from .n { font-size: 12.5px; color: #1e293b; line-height: 1.3; }
.erp-move-from .m { font-size: 11.5px; color: #94a3b8; line-height: 1.3; margin-top: 1px; }
.erp-move-foot {
    display: flex; align-items: center; gap: 12px;
    margin-top: 12px; padding-top: 12px; border-top: 1px dashed #e2e8f0;
}
.erp-move-foot .erp-move-field { display: flex; align-items: center; gap: 8px; }
.erp-move-foot .erp-move-field label {
    flex: 0 0 auto; font-size: 12.5px; color: #64748b; white-space: nowrap;
}
.erp-move-foot .erp-move-field .el-input { flex: 1; }

/* 下拉选项右侧的可用量（目标商品候选里显示「7298 台」） */
.el-select-dropdown__item .erp-opt-right { float: right; color: #94a3b8; font-size: 12px; margin-left: 12px; }

/* ============ 反审核确认弹窗 ============ */
.erp-unaudit-tip {
    font-size: 12.5px; line-height: 1.65; color: #475569;
    background: #fff7ed; border: 1px solid #fed7aa; border-radius: 8px;
    padding: 8px 12px; margin-bottom: 12px;
}
.erp-unaudit-tip b { color: #b45309; }
.erp-unaudit-label { font-size: 12.5px; color: #64748b; margin-bottom: 6px; }

/* 出库审核列表：13 列要塞进一屏，字号降到 12px、单元格内边距 6px 且不换行，
   否则单号 / 申请日期 / 审核时间 会被拆成两行 */
/* 必须覆盖到 fixed 列（.el-table__fixed-right 里的 td 不在 .el-table__body-wrapper 下），
   否则固定列的行高比正文高 16px，操作按钮会整体错位一行 */
.erp-out-table th .cell,
.erp-out-table td .cell {
    padding-left: 6px !important; padding-right: 6px !important;
    white-space: nowrap; font-size: 12px;
}

/* 出库审核的操作列一行最多三个按钮（查看详情 / 通过 / 拒绝），
   按钮左右内边距必须收到 4px 才能放进 150px 的列宽而不被裁；
   注意操作列是 fixed 列，DOM 在 .el-table__fixed-right 里，用 !important 压过全局的 5px 8px */
.erp-out-table .erp-ops .el-button { padding: 5px 4px !important; }

/* ============ 生产 / 加工 / 委外「新增」弹窗 ============ */
/* 明细行多（12~13 列）、列内有日期与数字输入，宽度按 1420px 设计，小屏用 96vw 兜底并允许表格内部横滚 */
.erp-prod-create-dialog { max-width: 96vw; }
.erp-prod-create-dialog .el-dialog__body { padding: 6px 18px 4px; }
.erp-prod-create-tip { font-size: 12px; color: #94a3b8; line-height: 1.6; margin: -2px 0 10px; }
.erp-prod-create-table td .cell,
.erp-prod-create-table th .cell { padding-left: 6px; padding-right: 6px; }
/* 行内输入框略微收紧，多列才塞得下 */
.erp-prod-create-table .el-input__inner { padding-left: 7px; padding-right: 7px; }
.erp-prod-create-table .el-table__cell { padding-top: 6px; padding-bottom: 6px; }

/* ============ 销售：新增销售申请单 / 新增客户订单 弹窗 ============ */
/* 明细列多（12 / 10 列）且有日期和数字输入，弹窗按 1280 / 1180 设计，小屏 96vw 兜底 */
.erp-sale-apply-dialog,
.erp-sale-order-dialog { max-width: 96vw; }
.erp-sale-apply-dialog .el-dialog__body,
.erp-sale-order-dialog .el-dialog__body { padding: 12px 18px 6px; }
.erp-sale-dlg-form .el-form-item { margin-bottom: 8px; }
.erp-sale-dlg-form .el-form-item__label { font-size: 12.5px; color: #64748b; }
/* 明细表行高压紧：默认 47px 一行，5 行就顶掉大半个弹窗 */
.erp-sale-apply-table .el-table__cell,
.erp-sale-order-table .el-table__cell { padding-top: 5px; padding-bottom: 5px; }
.erp-sale-apply-table th .cell,
.erp-sale-order-table th .cell { padding-left: 6px; padding-right: 6px; font-size: 12.5px; }
.erp-sale-apply-table td .cell,
.erp-sale-order-table td .cell { padding: 2px 6px; }
.erp-sale-apply-table .el-input__inner,
.erp-sale-order-table .el-input__inner { height: 30px; line-height: 30px; }
/* 数字输入的上下箭头默认占 22px，横向挤时收到 18px */
.erp-sale-apply-table .el-input-number.is-controls-right .el-input-number__increase,
.erp-sale-apply-table .el-input-number.is-controls-right .el-input-number__decrease { width: 18px; }
.erp-sale-apply-table .el-input-number.is-controls-right .el-input__inner { padding-left: 4px; padding-right: 20px; }
.erp-sale-dlg-foot { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.erp-sale-dlg-hint { font-size: 12px; color: #94a3b8; }
/* 数量超过可用库存：输入框标红（不额外占行高，避免撑破明细行） */
.erp-prod-create-table .erp-qty-invalid .el-input__inner {
    border-color: #dc2626;
    background: #fef2f2;
    color: #b91c1c;
}

/* ============ 长文案确认框（合并入库单等，需要多行排版） ============ */
/* Element 的 MessageBox 默认不解析 \n，且宽度固定 420px，多单号列表会挤成一坨 */
.erp-confirm-wide { width: 580px !important; }
.erp-confirm-wide .el-message-box__message { white-space: pre-line; line-height: 1.75; }
.erp-confirm-wide .el-message-box__message p { word-break: break-all; }

/* ============ 图片 / 附件资料（需求 16 / 20 / 75） ============
   按系列上传的问题图片、单据资料弹窗共用这套样式。
   尺寸取 72px：比表格里的 40px 大，能看清是哪张；又比 Element 默认 148px 小，一组多张也放得下。 */
.erp-card-tip { font-weight: 400; font-size: 12px; color: #94a3b8; margin-left: 8px; font-style: normal; }
.erp-imgcard { margin-top: 10px; }
.erp-imggroup {
    border: 1px solid #eef2f7; border-radius: 8px; padding: 8px 10px;
    margin-bottom: 8px; background: #fcfdff;
}
.erp-imggroup-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.erp-imggroup-head .k { font-size: 12px; color: #64748b; }
.erp-imggroup-del { color: #ef4444 !important; font-size: 12px; padding: 0 2px !important; }
.erp-imggroup-del:hover { color: #dc2626 !important; }

/* 分组内多图一行排列、超出横向滚动；上传格子固定在行首（order:-1 + sticky），不用拖滚动条才能点到 */
.erp-imggroup .avatar-uploader,
.erp-file-body .avatar-uploader {
    display: flex; align-items: center; gap: 8px;
    overflow-x: auto; overflow-y: hidden; white-space: nowrap; padding: 2px 0 4px;
}
.erp-imggroup .avatar-uploader > .el-upload-list,
.erp-file-body .avatar-uploader > .el-upload-list { display: flex; align-items: center; gap: 8px; margin: 0; flex: 0 0 auto; }
.erp-imggroup .el-upload-list--picture-card .el-upload-list__item,
.erp-file-body .el-upload-list--picture-card .el-upload-list__item {
    width: 72px; height: 72px; line-height: 72px; margin: 0; flex: 0 0 72px; border-radius: 6px;
}
.erp-imggroup .el-upload-list--picture-card .el-upload-list__item img,
.erp-imggroup .el-upload-list--picture-card .el-upload-list__item-thumbnail,
.erp-file-body .el-upload-list--picture-card .el-upload-list__item img,
.erp-file-body .el-upload-list--picture-card .el-upload-list__item-thumbnail {
    width: 72px; height: 72px; object-fit: cover; display: block;
}
.erp-imggroup .el-upload--picture-card,
.erp-file-body .el-upload--picture-card {
    width: 72px; height: 72px; line-height: 70px; flex: 0 0 72px; border-radius: 6px;
    margin: 0; order: -1; position: sticky; left: 0; z-index: 2; background: #fff;
}
.erp-imggroup .el-upload--picture-card .el-icon-plus,
.erp-imggroup .el-upload--picture-card .avatar-uploader-icon,
.erp-file-body .el-upload--picture-card .el-icon-plus,
.erp-file-body .el-upload--picture-card .avatar-uploader-icon {
    font-size: 20px; line-height: 70px; width: 70px; height: 70px;
}
.erp-imggroup .avatar-uploader::-webkit-scrollbar,
.erp-file-body .avatar-uploader::-webkit-scrollbar { height: 6px; }
.erp-imggroup .avatar-uploader::-webkit-scrollbar-thumb,
.erp-file-body .avatar-uploader::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }

.erp-file-tip {
    font-size: 12px; color: #475569; background: #f1f7ff; border: 1px solid #dbeafe;
    border-radius: 6px; padding: 7px 10px; margin-bottom: 10px; line-height: 1.7;
}
.erp-file-body { max-height: 66vh; overflow-y: auto; padding-right: 4px; }
.erp-file-sec { margin-top: 14px; padding-top: 10px; border-top: 1px dashed #eef2f7; }
/* 详情弹窗里的「按系列」图片行 */
.erp-detail-imgrow { margin-bottom: 8px; }
.erp-detail-imgrow-k { font-size: 12px; color: #475569; margin-bottom: 6px; }
.erp-detail-sec-tip { font-weight: 400; font-size: 12px; color: #94a3b8; margin-left: 8px; }

/* ============ 报损管理（需求 16 / 27 / 28 / 29） ============
   上方是报损单列表，下方两栏是「按分类 / 按来源仓」的小结。
   小结不用 el-table：只有两三列、行数少，用表格反而多一层表头显得重。 */
.erp-loss-sum {
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px;
}
.erp-loss-sum-box {
    border: 1px solid #eef2f7; border-radius: 10px; background: #fff;
    padding: 10px 14px 12px; min-height: 64px;
}
.erp-loss-sum-t { font-size: 12.5px; font-weight: 600; color: #475569; margin-bottom: 8px; }
.erp-loss-line {
    display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
    padding: 4px 0; border-bottom: 1px dashed #f1f5f9; font-size: 12.5px; color: #334155;
}
.erp-loss-line:last-child { border-bottom: none; }
.erp-loss-line-name { color: #475569; min-width: 76px; }
.erp-loss-line-cnt { color: #0f172a; font-weight: 600; }
.erp-loss-line-sub { color: #94a3b8; font-size: 12px; }
@media (max-width: 1200px) {
    .erp-loss-sum { grid-template-columns: 1fr; }
}

/* 详情弹窗里的纯文本段落（事由 / 驳回原因），与 .erp-detail-imgs 同级使用 */
.erp-detail-note {
    font-size: 13px; color: #334155; line-height: 1.75; white-space: pre-wrap;
    background: #f8fafc; border: 1px solid #eef2f7; border-radius: 8px; padding: 9px 12px;
}

/* ============ 供应商自助端（需求 21） ============ */
/* 提报单展开行：内嵌 el-table（见 supplierSubmitPage.js），这里只负责外壳与照片缩略图 */
.erp-expand { padding: 4px 14px 12px; background: #fbfdff; }
.erp-expand .el-table { border-radius: 6px; }
.erp-expand .el-table th { background: #f8fafc !important; }
.erp-expand-img {
    width: 34px; height: 34px; object-fit: cover; border-radius: 6px;
    border: 1px solid #eef2f7; cursor: zoom-in; margin-right: 4px; vertical-align: middle;
}
.erp-expand-img:hover { border-color: #93c5fd; }
.erp-expand-memo {
    margin-top: 8px; font-size: 12.5px; color: #475569; line-height: 1.7;
    background: #f8fafc; border-radius: 8px; padding: 7px 11px;
}
.erp-expand-memo.danger { background: #fef2f2; color: #b91c1c; }

/* 提报单详情弹窗 */
.erp-sup-head {
    display: flex; align-items: center; gap: 9px;
    padding: 0 0 11px; border-bottom: 1px solid #eef2f7; margin-bottom: 12px;
}
.erp-sup-head .t { font-size: 16px; font-weight: 600; color: #1f2937; }
.erp-sup-head .s { margin-left: auto; font-size: 12.5px; color: #94a3b8; }
.erp-sup-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    border: 1px solid #eef2f7; border-radius: 10px; overflow: hidden; background: #fff;
}
.erp-sup-grid .item { padding: 10px 15px; border-bottom: 1px solid #f1f5f9; min-width: 0; }
.erp-sup-grid .item .k { display: block; font-size: 12px; color: #94a3b8; margin-bottom: 4px; }
.erp-sup-grid .item .v { font-size: 13.5px; color: #1f2937; font-weight: 500; word-break: break-all; }
.erp-sup-memo {
    margin-top: 10px; font-size: 13px; color: #475569; line-height: 1.75;
    background: #f8fafc; border-radius: 9px; padding: 9px 13px;
}
.erp-sup-memo.danger { background: #fef2f2; color: #b91c1c; }
@media (max-width: 1200px) {
    .erp-sup-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============ 仪表盘六栅格（需求 80：板块可配宽窄与顺序） ============ */
/* 用 6 栅格而不是 2/3 栅格，是为了让「占 2/3」「占 1/3」「三等分」都能用整数列表达：
   span 6=整宽、4=2/3、3=半宽、2=1/3。改版前一模一样的版式都能配出来。 */
.dash2-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin-bottom: 14px; }
.dash2-grid > .dash2-cell { min-width: 0; }
.dash2-grid > .dash2-cell > .dash2-kpi,
.dash2-grid > .dash2-cell > .dash2-todo-wrap { margin-bottom: 0; }
/* 快捷入口（需求 81：多模块入口直达） */
.dash2-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.dash2-nav a {
    display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px;
    background: #fff; border: 1px solid #e2e8f0; border-radius: 999px;
    font-size: 12.5px; color: #334155; cursor: pointer; text-decoration: none;
    transition: all .16s ease; box-shadow: 0 2px 8px rgba(15,23,42,.04);
}
.dash2-nav a:hover { border-color: #bfdbfe; color: #2563eb; background: #f8fbff; transform: translateY(-1px); }
.dash2-nav a i { font-size: 14px; color: #94a3b8; }
.dash2-nav a:hover i { color: #2563eb; }

/* ============ 看板配置页（需求 80） ============ */
.cfg-sec { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 14px 16px; margin-bottom: 14px; }
.cfg-sec-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.cfg-sec-h h4 { font-size: 13.5px; font-weight: 700; color: #1e293b; margin: 0; }
.cfg-sec-h p { font-size: 11.5px; color: #94a3b8; margin: 4px 0 0; }
.cfg-row {
    display: flex; align-items: center; gap: 10px; padding: 9px 12px;
    border: 1px solid #eef2f7; border-radius: 8px; margin-bottom: 8px; background: #fbfdff;
}
.cfg-row.off { opacity: .55; background: #f8fafc; }
.cfg-row .idx { width: 22px; font-size: 12px; color: #94a3b8; text-align: center; }
.cfg-row .nm { flex: 1; min-width: 0; font-size: 13px; color: #334155; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cfg-row .key { font-size: 11px; color: #b6c2d4; font-family: Consolas, Monaco, monospace; }
.cfg-row .ops { display: flex; gap: 4px; }
.cfg-move {
    width: 24px; height: 24px; line-height: 22px; text-align: center; cursor: pointer;
    border: 1px solid #e2e8f0; border-radius: 6px; background: #fff; color: #64748b; font-size: 12px;
}
.cfg-move:hover { border-color: #bfdbfe; color: #2563eb; }
.cfg-move.disabled { opacity: .35; cursor: not-allowed; }

/* 断点：1440/1920 这类常见宽度保持六栅格真布局，窄屏再降级。
   注意单元格的 grid-column 是内联的 span N，所以降级时靠列数变化自动收敛（6/4 都会占满一行）。 */
@media (max-width: 1200px) {
    .dash2-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 900px) {
    .dash2-grid { grid-template-columns: 1fr; }
    .dash2-grid > .dash2-cell { grid-column: 1 / -1 !important; }
}

/* 采购列表展开行（需求 13）：按系列汇总 + 逐型号数量/单价/金额
   展开区在 el-table 的展开单元格里，背景要比正文淡一档，否则嵌套表格的边框会糊在一起 */
.pc-expand { padding: 6px 12px 2px 12px; background: #fbfdff; }
.pc-expand-tip {
    font-size: 12px; color: #64748b; line-height: 20px; margin-bottom: 8px;
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
}
.pc-expand-chip {
    display: inline-block; padding: 1px 8px; border-radius: 10px;
    background: #eef4ff; border: 1px solid #dbe7ff; color: #334155;
}
.pc-expand-chip b { color: #16a34a; }
.pc-series { margin-bottom: 10px; }
.pc-series-head {
    display: flex; align-items: center; gap: 10px; font-size: 12px; color: #64748b;
    padding: 0 0 6px 2px;
}
.pc-series-head b { font-size: 13px; color: #0f172a; }
.pc-series-head b.c-green { color: #16a34a; }
/* 展开行里的嵌套表压到最小高度，避免一行明细就撑出大片空白 */
.pc-expand .el-table { margin-bottom: 2px; }
.pc-expand .el-table th, .pc-expand .el-table td { padding: 4px 0; }
.pc-expand .el-table .cell { font-size: 12px; line-height: 20px; }

/* 单据抬头（报工入库单这类「单据式」页面）：编号 / 日期 / 三个合计并排，
   一眼看完这张单的关键数，不用再去表格底部找合计行 */
.erp-doc-head {
    display: grid;
    grid-template-columns: 1.25fr 1.05fr 1fr 1fr 1fr;
    background: #fff;
    border: 1px solid #e6edf5;
    border-radius: 10px;
    padding: 12px 4px;
    margin-bottom: 12px;
}
.erp-doc-cell { padding: 0 14px; border-right: 1px dashed #eef2f7; min-width: 0; }
.erp-doc-cell:last-child { border-right: none; }
.erp-doc-cell .k { display: block; font-size: 12px; color: #94a3b8; margin-bottom: 4px; }
.erp-doc-cell .v { font-size: 16px; font-weight: 700; color: #0f172a; line-height: 30px; }
.erp-doc-cell .v.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; letter-spacing: .3px; }
@media (max-width: 1200px) {
    .erp-doc-head { grid-template-columns: repeat(2, 1fr); row-gap: 10px; }
    .erp-doc-cell { border-right: none; }
}

/* 报工明细里的行内数字框：右对齐，和「生产数量 / 生产差异」两列看着是一列数 */
.erp-inline-num input { text-align: right; padding-right: 8px; }

/* ============ 报工入库单弹窗 ============ */
/* 11 列明细 + 单据头，宽度按 1240 设计；小屏靠 96vw 兜底。
   高度超过 90vh 时让 body 自己滚，别把弹窗顶出屏幕导致 footer 点不到 */
.erp-report-dlg { max-width: 96vw; margin-bottom: 0; }
.erp-report-dlg .el-dialog__body {
    padding: 4px 18px 8px;
    max-height: calc(90vh - 150px);
    overflow-y: auto;
}
.erp-report-dlg .erp-doc-head { padding: 10px 2px; margin-bottom: 10px; }
.erp-report-dlg .erp-doc-cell .v { font-size: 15px; line-height: 28px; }
.erp-report-dlg .erp-card {
    padding: 14px 16px 16px; border-radius: 10px; margin-bottom: 10px;
    box-shadow: none;
}
.erp-report-dlg .erp-card:last-child { margin-bottom: 0; }
.erp-report-dlg .erp-card-title { margin-bottom: 12px; }
.erp-report-dlg-sub { font-size: 12px; color: #94a3b8; line-height: 1.6; margin: 0 0 10px; }

/* ============ 加工报工补充弹窗 ============ */
/* 单据头已经由 .erp-doc-head 统一，这里只管标签条 / 当前单信息 / 超量标记 */
.erp-wrep-dlg .el-dialog__body { padding: 6px 18px 8px; max-height: calc(90vh - 150px); overflow-y: auto; }
.erp-wrep-dlg .erp-doc-head { margin-bottom: 10px; }
.wrep-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.wrep-tab {
    padding: 3px 12px; border-radius: 6px; background: #eff6ff; color: #2563eb;
    font-size: 12px; line-height: 20px; cursor: pointer; border: 1px solid #dbeafe;
    transition: all .15s;
}
.wrep-tab:hover { background: #dbeafe; }
.wrep-tab.on { background: #2563eb; color: #fff; border-color: #2563eb; }
.wrep-cur {
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px 16px;
    padding: 10px 14px; background: #f8fafc; border: 1px solid #eef2f7;
    border-radius: 10px; margin-bottom: 10px;
}
.wrep-cur .cell { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; min-width: 0; }
.wrep-cur .cell .k { color: #94a3b8; }
.wrep-cur .cell b { font-weight: 600; color: #0f172a; }
.wrep-flag { background: #fee2e2; color: #dc2626; border-radius: 4px; padding: 0 6px; font-size: 11px; }
@media (max-width: 1200px) { .wrep-cur { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ============ 一键出售弹窗 ============ */
/* 数量输入右对齐，跟表格其它数字列视觉一致；商品列吃掉剩余宽度不让右边留白 */
.erp-batch-sale-dlg .el-table .el-input__inner { text-align: right; }
.erp-batch-sale-dlg .erp-apply-total { background: #fffbf5; border: 1px dashed #fde3c0; }
