/* ============ 玻璃镜片 MES · 设计系统（参考小工单风格） ============ */
:root {
  --primary: #2E7D32;
  --primary-light: #E8F5E9;
  --primary-dark: #1B5E20;
  --success: #00A870;
  --success-light: #E3F9EF;
  --danger: #E5484D;
  --danger-light: #FDECEE;
  --warning: #ED7B2F;
  --warning-light: #FDF0E7;
  --text-1: #1D2129;
  --text-2: #4E5969;
  --text-3: #86909C;
  --bg: #F0F7F0;
  --card: #FFFFFF;
  --line: #E5E6EB;
  --radius: 12px;
  --shadow: 0 1px 4px rgba(29,33,41,.06);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
/* 全局紧凑化：整页等比缩放 0.88（字体/行距/列距/边距同比例缩小，布局不错位）；打印恢复 1.0 见下方 @media print */
html { zoom: 0.82; }
body {
  font-family: "Microsoft YaHei", "微软雅黑", "PingFang SC", "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--text-1);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
#app { min-height: 100vh; }

/* ---------- 通用 ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 8px 12px; margin-bottom: 6px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; border-radius: 8px; padding: 8px 14px; font-size: 15px; cursor: pointer;
  transition: .15s; font-family: inherit;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:active { background: var(--primary-dark); }
.btn-ghost { background: var(--primary-light); color: var(--primary); }
.btn-dim { background:#fff; color:var(--text-3); border:1px dashed var(--line); }
.btn-dim:hover { color:var(--text-2); border-color:var(--text-3); }
.btn-back-lg { min-width:120px; padding:10px 24px; font-size:17px; background:var(--primary); color:#fff; }
.btn-back-lg:active { background:var(--primary-dark); }
.proc-dept { font-size:11px; color:var(--text-3); background:#F7F8FA; border-radius:4px; padding:2px 6px; align-self:center; flex-shrink:0; }
.cat-header { background:var(--primary-light); color:var(--primary); font-weight:600; padding:4px 8px; border-radius:6px; display:inline-block; }
/* v10.33 权限配置矩阵 */
.perm-table { width:100%; border-collapse:collapse; font-size:13px; }
.perm-table th, .perm-table td { border-bottom:1px solid var(--line); padding:5px 6px; }
.perm-table th { color:var(--text-2); font-weight:600; white-space:nowrap; }
.perm-group-row td { background:#F7F8FA; color:var(--text-2); font-weight:600; font-size:12px; padding:3px 6px; }
.btn-danger { background: var(--danger-light); color: var(--danger); }
.btn-success { background: var(--success-light); color: var(--success); }
/* v10.77：当前工序报工主按钮——有权实心绿（可操作/通行），无权灰色禁用（btn-dim + disabled） */
.btn-report-ok { background: var(--success); color: #fff; font-weight: 600; border-color: var(--success); }
.btn-report-ok:active { background: #008f5f; }
.btn-block { width: 100%; padding: 13px; font-size: 17px; font-weight: 500; }
.btn-sm { padding: 4px 10px; font-size: 14px; border-radius: 6px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.input, select.input, textarea.input {
  width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px;
  font-size: 16px; background: #fff; font-family: inherit; outline: none; color: var(--text-1);
}
.input:focus { border-color: var(--primary); }
label.field { display: block; margin-bottom: 10px; font-size: 14px; color: var(--text-2); }
label.field .input, label.field select { margin-top: 6px; }
.tag { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 13px; }
.tag-blue { background: var(--primary-light); color: var(--primary); }
.tag-green { background: var(--success-light); color: var(--success); }
.tag-red { background: var(--danger-light); color: var(--danger); }
.tag-orange { background: var(--warning-light); color: var(--warning); }
.tag-gray { background: #F2F3F5; color: var(--text-3); }
.muted { color: var(--text-3); font-size: 13px; }
.num { font-variant-numeric: tabular-nums; color: var(--primary); font-weight: 600; text-decoration: underline; }
.qnum { font-variant-numeric: tabular-nums; }
.pname-hl { color: #1B6BD4; font-weight: 700; }
/* v3.8：仅产品清单表格的型号列——蓝粗体（不动全局 .pname-hl）；v3.12 字号+1px（14px） */
.pname-bold { color: #1B6BD4; font-weight: 700; font-size: 14px; }
/* v3.7：转产起始工序标识行（绿底纹+蓝粗体+字号+1px） */
.convert-line { background: var(--success-light); color: #1B6BD4; font-weight: 700; font-size: 16px;
  padding: 2px 6px; border-radius: 6px; margin-top: 4px; display: inline-block; }
.convert-line .cv-plain { color: var(--text-2); font-weight: 400; font-size: 15px; }
.bc-line { display: flex; align-items: baseline; gap: 8px; min-width: 0; flex-wrap: wrap; font-size: 16px; }
.flex { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap8 { gap: 8px; } .gap12 { gap: 12px; }
.mt8{margin-top:8px}.mt12{margin-top:12px}.mt16{margin-top:16px}.mb8{margin-bottom:8px}.mb12{margin-bottom:12px}

/* ---------- 登录 ---------- */
/* v10.29 登录页：精简品牌区 + 大按钮 + 紧凑布局 */
html:has(.login-wrap) { zoom: 1; }
.login-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: calc(env(safe-area-inset-top, 0px) + 24px) 24px calc(env(safe-area-inset-bottom, 0px) + 24px);
  background: linear-gradient(160deg, #1B5E20 0%, #43A047 100%); }
.login-brand { text-align: center; color: #fff; margin-bottom: 28px; }
.login-brand-img { width: 80px; height: 80px; object-fit: contain; border-radius: 20px;
  background: rgba(255,255,255,.15); padding: 10px; box-shadow: 0 6px 20px rgba(0,30,80,.25); }
.login-brand h1 { font-size: 28px; letter-spacing: 4px; margin-top: 14px; color: #fff; }
.login-card { width: 100%; max-width: 400px; background: #fff; border-radius: 18px; padding: 28px 22px 22px;
  box-shadow: 0 14px 40px rgba(0,35,90,.28); }
.login-field { display: block; font-size: 15px; font-weight: 600; margin-bottom: 16px; color: var(--text-1); }
.login-input { padding: 14px 14px !important; font-size: 17px !important; border-radius: 12px !important; margin-top: 6px; }
.pwd-wrap { position: relative; margin-top: 6px; }
.pwd-wrap .login-input { padding-right: 46px !important; margin-top: 0; }
.pwd-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  border: none; background: transparent; font-size: 20px; line-height: 1; padding: 8px; cursor: pointer; }
.login-remember { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text-2);
  margin: 0 0 16px; cursor: pointer; user-select: none; }
.login-remember input { width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer; }
.login-btn { height: 54px; font-size: 18px; border-radius: 12px; letter-spacing: 8px; font-weight: 600; }
.login-shake { animation: loginShake .4s; }
@keyframes loginShake {
  0%,100% { transform: translateX(0); }
  20% { transform: translateX(-8px); } 40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); } 80% { transform: translateX(5px); }
}

/* ---------- 移动端布局 ---------- */
.mobile-shell { max-width: 100%; min-height: 100vh; padding-bottom: 70px; }
.page { padding: 10px; }
.page-title { font-size: 18px; font-weight: 600; padding: 14px 14px 4px; }
.header-bar { background: #fff; padding: 12px 14px; position: sticky; top: 0; z-index: 20; box-shadow: var(--shadow); }

/* 底部Tab */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; background: #fff;
  display: flex; border-top: 1px solid var(--line); z-index: 30; padding-bottom: env(safe-area-inset-bottom);
}
.tabbar .tab-item { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 8px 0 6px;
  color: var(--text-3); font-size: 12px; cursor: pointer; text-decoration: none; }
.tabbar .tab-item.active { color: var(--primary); font-weight: 500; }
.tabbar .tab-icon { font-size: 22px; line-height: 1; margin-bottom: 3px; }

/* KPI 卡 */
.kpi-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.kpi-row-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 12px; }
.kpi { background: #fff; border-radius: var(--radius); padding: 7px 10px; box-shadow: var(--shadow); }
.kpi .k-label { font-size: 13px; color: var(--text-3); }
.kpi .k-value { font-size: 20px; font-weight: 600; margin-top: 4px; }
.kpi .k-sub { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.k-value.blue{color:var(--primary)} .k-value.green{color:var(--success)} .k-value.red{color:var(--danger)} .k-value.orange{color:var(--warning)}

/* 批次卡片 */
.batch-card { background: #fff; border-radius: var(--radius); padding: 11px 12px; margin-bottom: 8px;
  box-shadow: var(--shadow); cursor: pointer; transition: .15s; }
.batch-card:active { transform: scale(.99); background: #F1F8E9; }
.batch-card .b-code { font-weight: 600; font-size: 16px; }
.batch-card .b-sub { color: var(--text-2); font-size: 14px; margin-top: 3px; }
.mini-steps { display: flex; gap: 4px; margin-top: 10px; overflow-x: auto; }
.mini-steps .ms { flex: 1; min-width: 34px; height: 5px; border-radius: 3px; background: #E5E6EB; }
.mini-steps .ms.done { background: var(--success); }
.mini-steps .ms.cur { background: var(--primary); }
.mini-steps .ms.out { background: var(--warning); }

/* 工序步骤条（报工选择） */
.steps-v { display: flex; flex-direction: column; gap: 0; }
.step-item { display: flex; gap: 12px; cursor: pointer; }
.step-item .s-rail { display: flex; flex-direction: column; align-items: center; }
.step-item .s-dot { width: 26px; height: 26px; border-radius: 50%; background: #E5E6EB; color: var(--text-3);
  display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.step-item .s-dot.done { background: var(--success); color: #fff; }
.step-item .s-dot.cur { background: var(--primary); color: #fff; }
.step-item .s-line { width: 2px; flex: 1; background: var(--line); min-height: 18px; }
.step-item .s-body { flex: 1; padding-bottom: 18px; }
.step-item .s-name { font-size: 16px; font-weight: 500; }
.step-item .s-meta { font-size: 13px; color: var(--text-3); margin-top: 2px; }
.step-item .s-meta b { color: var(--text-2); font-weight: 500; }
.step-item .s-actions { margin-top: 8px; display: flex; gap: 8px; }

/* 大数字输入 */
.num-input { display: flex; align-items: center; }
.num-input button { width: 44px; height: 44px; border: 1px solid var(--line); background: #fff;
  font-size: 20px; cursor: pointer; color: var(--text-2); }
.num-input button:first-child { border-radius: 8px 0 0 8px; }
.num-input button:last-child { border-radius: 0 8px 8px 0; }
.num-input input { width: 100%; height: 44px; border: 1px solid var(--line); border-left: none; border-right: none;
  text-align: center; font-size: 18px; font-weight: 600; outline: none; font-family: inherit; }
.num-input input:focus { border-color: var(--primary); }

/* 弹层 */
.mask { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 50; display: flex;
  align-items: flex-end; justify-content: center; }
@media (min-width: 768px) { .mask { align-items: center; } }
.sheet { background: #fff; width: 100%; max-width: 520px; border-radius: 16px 16px 0 0;
  padding: 16px; max-height: 88vh; overflow-y: auto; }
/* 宽弹层：工序流配置器表格列多（rc-grid 合计约 680-730px），520px 会把工序列 1fr 挤塌 */
.sheet.wide { max-width: 1200px; }
@media (min-width: 768px) { .sheet { border-radius: 16px; } }
.sheet-title { font-size: 17px; font-weight: 600; margin-bottom: 16px; display: flex; justify-content: space-between; }
.toast-wrap { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); z-index: 10000; width: 90%;
  max-width: 400px; text-align: center; pointer-events: none; }
.toast { background: rgba(29,33,41,.88); color: #fff; padding: 10px 16px; border-radius: 8px;
  font-size: 15px; display: inline-block; margin-bottom: 8px; }
.toast.err { background: var(--danger); } .toast.ok { background: var(--success); }

/* ---------- 桌面管理端 ---------- */
.admin-shell { display: flex; min-height: 100vh; }
.sidebar { width: 220px; background: #fff; border-right: 1px solid var(--line); padding: 16px 12px;
  position: fixed; top: 0; bottom: 0; left: 0; overflow-y: auto; z-index: 40; }
.sidebar .logo { display: flex; align-items: center; gap: 10px; padding: 6px 8px 18px; }
.sidebar .logo .logo-icon { width: 36px; height: 36px; border-radius: 9px; background: var(--primary);
  color: #fff; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.sidebar .logo b { font-size: 16px; }
.nav-group-title { font-size: 12px; color: var(--text-3); padding: 14px 10px 6px; letter-spacing: 1px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px;
  color: var(--text-2); cursor: pointer; font-size: 15px; margin-bottom: 2px; }
.nav-item:hover { background: #F2F3F5; }
.nav-item.active { background: var(--primary-light); color: var(--primary); font-weight: 500; }
.nav-item .ni { width: 18px; text-align: center; }
.admin-main { flex: 1; margin-left: 220px; padding: 18px 22px; max-width: 1400px; }
.admin-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.admin-top h2 { font-size: 20px; }

/* 表格 */
.tbl-wrap { overflow-x: auto; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 600px; }
.tbl th { text-align: left; padding: 12px 14px; color: var(--text-3); font-weight: 500;
  border-bottom: 1px solid var(--line); background: #FAFBFC; white-space: nowrap; }
.tbl td { padding: 11px 14px; border-bottom: 1px solid #F2F3F5; white-space: nowrap; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tr:hover td { background: #F1F8E9; }

/* 进度条 */
.pbar { height: 8px; background: #F2F3F5; border-radius: 4px; overflow: hidden; min-width: 80px; }
.pbar .pfill { height: 100%; background: var(--primary); border-radius: 4px; }
.pbar .pfill.green { background: var(--success); }

/* 柱状图（纯CSS） */
.bars { display: flex; align-items: flex-end; gap: 8px; height: 130px; padding: 10px 4px 0; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.bar-v { font-size: 10px; color: var(--text-3); white-space: nowrap; overflow: hidden; max-width: 100%; text-overflow: ellipsis; }
.bar { width: 100%; max-width: 34px; background: var(--primary-light); border-radius: 4px 4px 0 0; position: relative; }
.bar i { position: absolute; bottom: 0; left: 0; right: 0; background: var(--primary); border-radius: 4px 4px 0 0; }
.bar-label { font-size: 10px; color: var(--text-3); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }

/* 红绿灯 */
.light { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.light .dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.green { background: var(--success); box-shadow: 0 0 6px var(--success); }
.dot.yellow { background: var(--warning); box-shadow: 0 0 6px var(--warning); }
.dot.red { background: var(--danger); box-shadow: 0 0 6px var(--danger); }

/* 报工表单 */
.reason-row { display: flex; gap: 8px; margin-bottom: 8px; align-items: center; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 6px 14px; border-radius: 20px; background: #F2F3F5; font-size: 14px; cursor: pointer;
  color: var(--text-2); border: 1px solid transparent; }
.chip.on { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }
.chip.dmg.on { background: var(--danger-light); color: var(--danger); border-color: var(--danger); }

.empty { text-align: center; padding: 40px 0; color: var(--text-3); font-size: 14px; }
.empty .e-icon { font-size: 40px; margin-bottom: 8px; opacity: .4; }

/* 桌面下移动组件居中 */
@media (min-width: 768px) {
  .mobile-shell { max-width: 480px; margin: 0 auto; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
  .tabbar { left: 50%; transform: translateX(-50%); max-width: 480px; }
}

/* 移动端管理入口（admin也用） */
@media (max-width: 767px) {
  .admin-shell { flex-direction: column; }
  .sidebar { position: static; width: 100%; border-right: none; border-bottom: 1px solid var(--line);
    padding: 10px 12px; }
  .sidebar .nav-group-title { display: none; }
  .sidebar .navs { display: flex; gap: 6px; overflow-x: auto; }
  .nav-item { flex-shrink: 0; padding: 8px 12px; margin-bottom: 0; }
  .admin-main { margin-left: 0; padding: 14px; }
}

/* ============ v2 新增：扫码 / 交接 / 订单 / 工序流 ============ */
.scan-entry { display:flex; align-items:center; gap:14px; background:linear-gradient(135deg,#1B5E20,#43A047);
  border-radius:14px; padding:16px 18px; margin-bottom:12px; color:#fff; cursor:pointer; box-shadow:0 4px 14px rgba(0,82,217,.25); }
.scan-entry .scan-icon { font-size: 30px; }
.scan-entry .scan-txt b { font-size: 17px; display:block; }
.scan-entry .scan-txt span { font-size: 13px; opacity:.85; }

.mini-steps { display:flex; gap:3px; margin-top:10px; }
.mini-steps i { flex:1; height:5px; border-radius:3px; background:#E5E6EB; }
.mini-steps i.s-done { background:var(--success); }
.mini-steps i.s-cur { background:var(--primary); }
.mini-steps i.s-out { background:var(--warning); }
/* 进度条带工序名标注：每段上方显示工序名，进度一目了然 */
.mini-steps.labeled { align-items:flex-end; }
.mini-steps.labeled .ms-col { flex:1; min-width:0; display:flex; flex-direction:column; align-items:center; gap:3px; }
.mini-steps.labeled .ms-col i { flex:0 0 auto; width:100%; height:5px; }
.mini-steps.labeled .ms-label { font-size:12.5px; line-height:1.1; color:var(--text-3); max-width:100%;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap; text-align:center; }
.mini-steps.labeled .ms-label.sm { font-size:12px; }
.mini-steps.labeled .ms-col .ms-label { color:var(--text-2); }
.mini-steps.labeled .ms-col:has(i.s-cur) .ms-label { color:var(--primary); font-weight:600; }

.step-card { padding:10px 12px; }
.step-card.step-cur { border-left:3px solid var(--primary); }
.step-card.step-lock { opacity:.55; }
/* v10.19 G1：点入批次滚动定位后的短暂高亮 */
.step-card.step-flash { animation: stepFlash 1.6s ease; }
@keyframes stepFlash {
  0% { background: var(--primary-light); }
  100% { background: transparent; }
}
.step-dot { width:30px; height:30px; border-radius:50%; background:#F2F3F5; color:var(--text-3);
  display:flex; align-items:center; justify-content:center; font-size: 14px; font-weight:600; flex-shrink:0; }
.step-dot.s-done { background:var(--success-light); color:var(--success); }
.step-dot.s-cur { background:var(--primary); color:#fff; }
.step-dot.s-out { background:var(--warning-light); color:var(--warning); }
.receive-tip { margin-top:8px; background:var(--warning-light); color:var(--warning);
  border-radius:8px; padding:8px 10px; font-size: 13.5px; line-height:1.6; }

.scan-view { position:relative; border-radius:12px; overflow:hidden; background:#000; height:300px; }
.scan-view video { width:100%; height:100%; object-fit:cover; }
.scan-frame { position:absolute; top:50%; left:50%; transform:translate(-50%,-50%);
  width:200px; height:200px; border:2px solid rgba(255,255,255,.9); border-radius:12px;
  box-shadow:0 0 0 9999px rgba(0,0,0,.35); }

.qr-card { display:flex; gap:16px; align-items:center; background:#fff; border-radius:12px;
  padding:16px; margin-bottom:12px; box-shadow:var(--shadow); }
.qr-card canvas { border:1px solid var(--line); border-radius:8px; flex-shrink:0; }
.qr-info { flex:1; line-height:1.8; }

.step-mini-row { display:flex; align-items:center; gap:8px; padding:6px 0; border-bottom:1px dashed #F2F3F5; font-size: 14px; }
.step-mini-row:last-child { border-bottom:none; }
.step-no { width:24px; height:24px; border-radius:6px; background:#F2F3F5; color:var(--text-3);
  font-size: 13px; display:flex; align-items:center; justify-content:center; font-weight:600; flex-shrink:0; }
.step-no.s-done { background:var(--success-light); color:var(--success); }
.step-no.s-cur { background:var(--primary); color:#fff; }
.step-no.s-out { background:var(--warning-light); color:var(--warning); }
.tag-blue-bg { background:var(--primary-light); color:var(--primary); }

.hov-row { padding:8px 0; border-bottom:1px dashed #F2F3F5; font-size: 14px; line-height:1.8; }
.hov-row:last-child { border-bottom:none; }

.order-item-row { display:flex; align-items:center; gap:8px; padding:8px 0; border-top:1px dashed #F2F3F5; margin-top:8px; font-size: 14px; }
.pbar { height:7px; background:#F2F3F5; border-radius:4px; width:70px; overflow:hidden; flex-shrink:0; }
.pbar i { display:block; height:100%; background:var(--primary); border-radius:4px; }

.route-summary { color:var(--primary); font-size: 13px; margin-top:4px; }
.route-step-row { display:flex; align-items:center; gap:4px; padding:3px 0; border-bottom:1px dashed #F2F3F5; font-size:12px; white-space:nowrap; overflow:hidden; }
.route-step-row:last-child { border-bottom:none; }
/* CR-036 工序流配置器表格化；v10.86 rc-grid 嵌套 grid（rc-head/rc-row 各自独立 grid 容器，列模板一致） */
/* 外层容器：提供统一边框和溢出控制 */
.rc-grid-wrap { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
/* 表头/数据行：各自是独立 grid 容器，列模板完全一致（保证对齐） */
.rc-head, .rc-row {
  display: grid;
  grid-template-columns: 40px 150px 80px 180px 70px 150px 120px minmax(100px,auto);
  column-gap: 4px; align-items: center;
  font-size: 13px;
}
/* 完整模式：列模板不变，rc-col-state / rc-col-pack 从 display:none → display:block */
.rc-col-state, .rc-col-pack { display: none; }
.rc-full .rc-col-state { display: block; }
.rc-full .rc-col-pack { display: block; }
/* 表头 */
.rc-head {
  background: #f8f9fa;
  font-size: 15px; font-weight: 500; color: var(--text-1);
  padding: 5px 6px;
  border-bottom: 1px solid var(--line);
}
.rc-head span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 数据行 */
.rc-row {
  padding: 4px 6px;
  font-size: 13px; line-height: 1.3;
  border-bottom: 1px dashed var(--line);
  cursor: grab;
}
.rc-row:last-of-type { border-bottom: none; }
.rc-row:hover { background: #FAFBFC; }
.rc-row.dragging { opacity: 0.4; }
.rc-row .input { min-width: 0; padding: 2px 4px; font-size: 13px; border-radius: 4px; border: 1px solid var(--line); }
.rc-row .btn-sm { padding: 1px 6px; font-size: 13px; border-radius: 4px; }
.rc-row .muted { font-size: 12px; }
/* 检查项展开：全宽横跨（grid-column 在嵌套 grid 内生效） */
.rc-checks {
  grid-column: 1 / -1;
  margin-top: 2px; padding: 4px 6px;
  background: #FAFBFC; border-radius: 4px;
  font-size: 11px;
}
.rc-checks textarea { width: 100%; box-sizing: border-box; font-size: 11px; padding: 3px 4px; }
/* 旧 rc-step-card（废弃保留以防遗漏引用） */
.rc-step-card { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 6px; background: #fff; cursor: grab; }
.rc-step-card:hover { border-color: var(--primary); }
.rc-step-card.dragging { opacity: 0.45; }
.chips { display:flex; flex-wrap:wrap; gap:8px; }
.chip { padding:6px 14px; background:var(--primary-light); color:var(--primary); border-radius:16px; font-size: 14px; cursor:pointer; }

/* 分类字典列表式布局 */
.dict-list { border:1px solid var(--line); border-radius:8px; overflow:hidden; }
.dict-row { display:flex; align-items:center; justify-content:space-between;
  padding:8px 12px; border-bottom:1px solid var(--line); background:#fff; }
.dict-row:last-child { border-bottom:none; }
.dict-row:hover { background:#F7F8FA; }
.dict-name { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.dict-actions { display:flex; gap:6px; flex-shrink:0; }

.btn-warning { background:var(--warning-light); color:var(--warning); }

.admin-shell { display:flex; min-height:100vh; }
/* 手机端顶栏和导航（桌面端隐藏） */
.admin-m-top, .admin-m-nav, .admin-m-more { display:none; }

.admin-side { width:170px; background:#fff; border-right:1px solid var(--line); padding:12px 8px;
  display:flex; flex-direction:column; gap:2px; position:sticky; top:0; height:100vh; }
.admin-logo { font-weight:700; font-size: 17px; padding:6px 4px 12px; white-space:nowrap; overflow:hidden;
  display:flex; align-items:center; gap:8px; text-align:left; }
.admin-logo-img { margin:0 !important; vertical-align:middle; }
.admin-nav { padding:10px 12px; border-radius:8px; cursor:pointer; color:var(--text-2); font-size: 17px; font-weight:400; }
.admin-nav:hover { background:#F7F8FA; }
.admin-nav.active { background:var(--primary-light); color:var(--primary); font-weight:700; }
/* v10.128：退出按钮——淡红底 + 尺寸缩小18% + 字体加大2px */
.admin-nav-logout { margin-top:auto; padding:11px 13px; font-size:18px; font-weight:700;
  text-align:center; color:#fff; background:rgba(229,72,77,0.5); border-radius:10px; }
.admin-nav-logout:hover { background:rgba(229,72,77,0.65); color:#fff; }
.admin-nav-top { padding:10px 12px; font-weight:400; font-size:17px; background:#FFF3CD; color:var(--text-1); border-radius:8px; }
.admin-nav-top:hover { background:#FFE9A8; }
.admin-nav-top.active { background:#FFF3CD; color:var(--primary); font-weight:700; }
.admin-main { flex:1; min-width:0; }

/* ===== 手机端（≤768px） ===== */
@media (max-width:768px) {
  .admin-shell { flex-direction:column; }
  .admin-side { display:none; }  /* 隐藏桌面左边栏 */

  /* 顶栏：员工信息 + 退出 */
  /* v10.84：顶部用户栏+导航整体锁定在页面上部 */
  .admin-m-top { display:flex; align-items:center; justify-content:space-between; box-sizing:border-box;
    padding:8px 16px; height:60px; background:#fff; border-bottom:1px solid var(--line);
    position:fixed; top:0; left:0; right:0; z-index:100; }
  .admin-m-user { display:flex; align-items:baseline; gap:8px; min-width:0; }
  .admin-m-name { font-size:18px; font-weight:700; color:var(--text-1); }
  .admin-m-role { font-size:15px; font-weight:600; color:var(--text-3); background:#F2F3F5; padding:2px 8px; border-radius:10px; }
  /* v10.128：手机端退出按钮——淡红底 + 尺寸缩小18% + 字体加大2px */
.admin-m-logout { font-size:16px; font-weight:700; padding:6px 13px; cursor:pointer; flex-shrink:0;
  background:rgba(229,72,77,0.5); color:#fff; border-radius:10px; line-height:1.2; }
.admin-m-logout:active { background:rgba(229,72,77,0.65); }

  /* 大按钮导航行（固定 报工/报工审批/报工记录/更多，等分铺满） */
  .admin-m-nav { display:flex; gap:6px; padding:8px 10px; background:#fff; border-bottom:1px solid var(--line);
    position:fixed; top:60px; left:0; right:0; z-index:100; }
  .admin-m-nav-btn { flex:1 1 0; min-width:0; padding:9px 2px; border-radius:10px; font-size:16px; font-weight:400;
    background:#F2F3F5; color:var(--text-2); cursor:pointer; white-space:nowrap; text-align:center; overflow:hidden; }
  .admin-m-nav-btn.active { background:var(--primary); color:#fff; font-weight:700; }
  .admin-m-nav-report { font-size:16px; background:#FFF3CD; color:var(--text-1); }
  .admin-m-nav-report.active { background:#FFE9A8; color:var(--primary); font-weight:700; }
  .admin-m-nav-btn.admin-m-nav-more { flex:0 0 64px; }
  .admin-m-nav-btn .tab-badge { margin-left:2px; }

  /* 更多菜单遮罩 */
  .admin-m-more { display:block; position:fixed; inset:0; background:rgba(0,0,0,.4); z-index:200;
    display:flex; align-items:flex-end; animation:fadeIn .2s; }
  .admin-m-more-menu { background:#fff; border-radius:16px 16px 0 0; width:100%; padding:16px 16px calc(env(safe-area-inset-bottom,0px)+16px);
    max-height:75vh; overflow-y:auto; animation:slideUp .25s; }
  .admin-m-more-title { font-size:13px; color:var(--text-3); padding:4px 4px 12px; text-align:center; border-bottom:1px solid var(--line); margin-bottom:8px; }
  .admin-m-more-item { padding:14px 12px; font-size:18px; font-weight:400; border-radius:10px; cursor:pointer; color:var(--text-1); display:flex; align-items:center; gap:8px; }
  .admin-m-more-item:hover { background:#F7F8FA; }
  .admin-m-more-item.active { background:var(--primary-light); color:var(--primary); font-weight:700; }
  .admin-m-more-item .tab-badge { margin-left:auto; }
  .admin-m-more-close { margin-top:10px; padding:14px; text-align:center; color:var(--text-3); font-size:15px;
    background:#F2F3F5; border-radius:10px; cursor:pointer; }

  /* v10.120：顶部固定栏（用户栏60px+导航约55px），内容区避让 */
  .admin-main { padding:120px 12px 12px; }
  .notif-bar-admin { margin:0 -12px 8px; border-radius:0; }
}
@keyframes fadeIn { from{opacity:0} to{opacity:1} }
@keyframes slideUp { from{transform:translateY(100%)} to{transform:translateY(0)} }
.avatar { width:44px; height:44px; border-radius:50%; background:var(--primary); color:#fff;
  display:flex; align-items:center; justify-content:center; font-size: 18px; font-weight:600; }
.list-row { display:flex; justify-content:space-between; align-items:center; gap:10px; padding:2px 0; border-bottom:1px dashed #E8EAED; }
.list-row:last-child { border-bottom:none; }
.proc-bar-row { display:flex; align-items:center; gap:8px; padding:1px 0; font-size: 13px; }
.proc-name { width:140px; flex-shrink:0; color:var(--text-2); font-size: 13px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.proc-bar { flex:1; height:8px; background:#F2F3F5; border-radius:4px; overflow:hidden; }
.proc-bar i { display:block; height:100%; background:var(--primary); border-radius:4px; }
.chart { display:flex; align-items:flex-end; gap:6px; height:110px; padding-top:10px; }
.chart-col { flex:1; display:flex; flex-direction:column; align-items:center; height:100%; justify-content:flex-end; }
.chart-v { font-size: 10px; color:var(--text-3); margin-bottom:2px; }
.chart-bar { width:100%; max-width:28px; height:80%; background:#F2F3F5; border-radius:4px; display:flex; align-items:flex-end; }
.chart-bar i { display:block; width:100%; background:var(--primary); border-radius:4px; }
.chart-l { font-size: 10px; color:var(--text-3); margin-top:3px; }
.batch-card { cursor:pointer; }
.tbl { width:100%; border-collapse:collapse; font-size: 13px; }
.tbl th { text-align:left; color:var(--text-3); font-weight:500; padding:4px 8px; border-bottom:1px solid var(--line); white-space:nowrap; }
.tbl td { padding:2px 8px; border-bottom:1px solid #F2F3F5; white-space:nowrap; }
/* v3.8：基础数据-产品清单表格——列宽固定、长内容换行不截断、行列纵向对齐（密集）
   v3.11：width:auto 左对齐打包（不再 100% 拉伸），投产/产出列左移且宽度固定 256px */
.prod-tbl { table-layout: fixed; width: auto; min-width: 860px; }
.prod-tbl th { white-space: normal; word-break: break-all; vertical-align: bottom; padding:3px 6px; }
.prod-tbl td { white-space: normal; word-break: break-all; vertical-align: top; padding:2px 6px; }
.prod-tbl td.td-num { text-align: right; }
/* v3.9→v3.10：工单管理清单——行距减半后再减10px（已触底归零，行间直接相接；仅本清单，不动全局 .card/.list-row） */
.wo-list .card.wo-card { padding:0 12px; margin-bottom:0; }

/* ============ v3 新增：HB品牌 / 品质工序 / 审核 / 二维码打印 ============ */
.tag-purple { background:#F1EBFF; color:#7B3FE4; }

/* Logo（登录页 + 管理端侧栏） */
.login-logo-img { width:64px; height:64px; object-fit:contain; margin-bottom:10px; }
.admin-logo-img { width:28px; height:28px; object-fit:contain; vertical-align:-7px; margin-right:6px; }

/* Tab 上的待审核角标 */
.tab-badge { display:inline-block; min-width:17px; height:17px; padding:0 4px; border-radius:9px;
  background:var(--danger); color:#fff; font-size: 10px; line-height:17px; text-align:center;
  margin-left:3px; vertical-align:middle; }

/* 品质工序小角标（chip / proc-name 内嵌） */
.qtag { font-style:normal; font-size: 10px; padding:1px 5px; border-radius:8px;
  background:#F1EBFF; color:#7B3FE4; margin-left:4px; vertical-align:1px; }

/* 报工数量恒等式提示行 */
.calc-line { margin:10px 0 2px; padding:9px 12px; border-radius:8px; background:#F7F8FA;
  border:1px dashed var(--line); color:var(--text-2); font-size: 14px; line-height:1.7; }

/* 二维码打印区域（窗口打印时仅输出此区域） */
.print-area { text-align:center; padding:22px 12px; background:#fff; border:1px solid var(--line);
  border-radius:12px; }
.print-title { font-size: 16px; font-weight:600; margin-bottom:12px; }
.print-qr { width:190px; height:190px; margin:0 auto 10px; display:block; }
.print-code { font-size: 20px; font-weight:700; letter-spacing:1px; margin-bottom:6px; }
.print-sub { font-size: 14px; color:var(--text-2); line-height:1.7; }

@media print {
  html { zoom: 1; }   /* 打印恢复原尺寸，保证二维码/打印区大小不变 */
  body * { visibility:hidden !important; }
  .print-area, .print-area * { visibility:visible !important; }
  .print-area { position:fixed; left:0; top:0; width:100%; border:none; padding:24px 0; }
  .mask { position:static; background:none; display:block; overflow:visible; }
  .sheet { max-width:100%; max-height:none; overflow:visible; padding:0; }
}

/* ============ v4 新增（CR-007）：通知 / 附件 / 抽检 / 看板 / 物料员 ============ */

/* 站内通知红条（员工端置顶 + 管理端内容区顶部） */
.notif-bar { position:sticky; top:0; z-index:25; background:var(--danger); color:#fff;
  padding:9px 14px; font-size: 14px; cursor:pointer; box-shadow:0 2px 8px rgba(229,72,77,.35); }
.notif-bar-admin { position:static; margin:0 0 4px; border-radius:0 0 10px 10px; }

/* 通知中心列表 */
.notif-row { display:flex; align-items:flex-start; gap:10px; padding:10px 6px;
  border-bottom:1px dashed #F2F3F5; cursor:pointer; border-radius:6px; }
.notif-row:hover { background:#F1F8E9; }
.notif-row:last-child { border-bottom:none; }
.notif-row.unread { background:#FFF9F2; }
.notif-row.unread b { color:var(--text-1); }
.notif-row.hasmeta { border-left:3px solid var(--primary); }
.notif-row.hasmeta:hover { background:var(--primary-light); }

/* 抽检检查项逐项确认 */
.check-block { border:1px solid #E3D9F5; background:#FAF7FF; border-radius:10px; padding:12px; margin-bottom:12px; }
.check-row { display:flex; align-items:center; gap:8px; padding:7px 0; border-bottom:1px dashed #F0E9FA; }
.check-row:last-of-type { border-bottom:none; }
.check-name { flex:1; font-size: 14.5px; color:var(--text-2); min-width:0; }
.check-row .input { padding:6px 8px; font-size: 14px; }

/* 附件管理 */
.attach-paste { display:flex; align-items:center; gap:12px; border:2px dashed var(--primary);
  background:var(--primary-light); border-radius:12px; padding:14px 16px; cursor:pointer;
  outline:none; font-size: 14px; }
.attach-paste:focus { border-color:var(--primary-dark); background:#E8F5E9; }
.attach-paste-icon { font-size: 26px; }
.attach-row { display:flex; align-items:center; gap:10px; padding:8px 0; border-bottom:1px dashed #F2F3F5; }
.attach-row:last-child { border-bottom:none; }
.attach-thumb { width:52px; height:52px; object-fit:cover; border-radius:8px; border:1px solid var(--line);
  cursor:pointer; flex-shrink:0; }
.attach-file-icon { display:flex; align-items:center; justify-content:center; font-size: 24px;
  background:#F2F3F5; color:var(--text-3); }
.attach-name { font-size: 14px; word-break:break-all; }
.attach-preview-mask { position:fixed; inset:0; background:rgba(0,0,0,.82); z-index:120;
  display:flex; flex-direction:column; align-items:center; justify-content:center; padding:20px; }
.attach-preview-mask img { max-width:92%; max-height:80vh; border-radius:8px; }

/* 看板：近7天按工序表格 */
.week-tbl td, .week-tbl th { font-size: 13px; }
.week-tbl .qtag { margin-left:2px; }

/* 外协超期标红行（看板 + 物料员） */
.mat-overdue { background:var(--danger-light); border-radius:8px; padding:10px 8px !important; }
.mat-proc-row { padding:10px 0; border-bottom:1px dashed #F2F3F5; }
.mat-proc-row:last-child { border-bottom:none; }

/* 工艺文档查看（富文本容器） */
.tech-doc-view { border:1px solid var(--line); border-radius:10px; padding:12px 14px;
  background:#FAFBFC; font-size: 14.5px; line-height:1.9; color:var(--text-2); overflow-wrap:anywhere; }
.tech-doc-view img { max-width:100%; border-radius:8px; }
.tech-doc-view ul, .tech-doc-view ol { padding-left:20px; }

/* ============ CR-008 v4.1：统计下钻 + 基础数据升级 ============ */
/* 可下钻区域（KPI/分布行/表格行）：hover 提示可点 */
.drillable { cursor:pointer; transition:background .15s; border-radius:8px; }
.kpi.drillable:hover { border-color:var(--primary); box-shadow:0 2px 10px rgba(22,93,255,.12); }
.proc-bar-row.drillable:hover { background:#F1F8E9; }
tr.drillable:hover { background:#F1F8E9; }
.list-row.drillable:hover { background:#F1F8E9; }
.chart-col.drillable:hover .chart-l { color:var(--primary); font-weight:600; }

/* 日期输入框：手势光标（点击任意位置弹日历，见 app.js showPicker） */
input[type="date"] { cursor:pointer; }

/* 下钻弹层汇总条 */
.sheet .list-row.drillable { padding:10px 6px; }

/* 2026-09-15 报工页待报工单据强调：标题蓝色加粗+2px，明细行整体+2px */
.pending-title { font-size: 17px; font-weight: 700; color: #1677FF; }
.pending-item { font-size: 17px; }
.pending-item .muted { font-size: 15px; }

/* 待报工单据行溯源标签（外购/外协分类+数量） */
.pending-tag { color: var(--text-3); font-size: 14px; }

/* 2026-09-15 全局清单规范：固定列宽工具类 */
.cell { display:inline-block; flex-shrink:0; vertical-align:middle; }
