/* ===== H5 车间填报端 ===== */
body.h5 {
  background: var(--c-bg);
  padding-bottom: env(safe-area-inset-bottom);
  -webkit-touch-callout: none;
}

.h5-app { max-width: 560px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }
.h5-body { flex: 1; padding: 12px 14px 96px; }

/* 顶部 */
.h5-header {
  position: sticky; top: 0; z-index: 20;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: #fff;
  padding: 14px 16px 18px;
}
.h5-header.plain { background: #fff; color: var(--c-text); border-bottom: 1px solid var(--c-border); }
.h5-header h1 { font-size: 17px; font-weight: 620; letter-spacing: -0.01em; }
.h5-header .sub { font-size: 12px; opacity: 0.85; margin-top: 2px; }
.h5-header .avatar-lg {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.22); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px;
}

/* 汇总卡（悬浮在蓝色头部下） */
.h5-hero {
  margin: -12px 14px 0;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 6px 20px rgba(16, 24, 40, 0.09);
  padding: 15px 16px;
  display: flex;
  gap: 8px;
}
.h5-hero .col-item { flex: 1; text-align: center; }
.h5-hero .col-item + .col-item { border-left: 1px solid var(--c-border); }
.h5-hero .v { font-size: 19px; font-weight: 650; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.h5-hero .k { font-size: 11.5px; color: var(--c-text-3); margin-top: 2px; }

/* 卡片列表 */
.h5-list { display: flex; flex-direction: column; gap: 10px; }
.h5-card {
  background: #fff; border-radius: 12px; border: 1px solid var(--c-border);
  padding: 13px 14px; box-shadow: var(--shadow-sm);
  position: relative;
}
.h5-card:active { background: #fafbfe; }
.h5-card .title { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.h5-card .meta { font-size: 12.5px; color: var(--c-text-3); margin-top: 3px; }
.h5-card .qty { font-size: 15px; font-weight: 650; color: var(--c-primary); font-variant-numeric: tabular-nums; }
.h5-card .arrow { color: #cbd5e1; flex: none; display: flex; }

/* 工序行 */
.proc-row {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid #f1f4f9;
}
.proc-row:last-child { border-bottom: none; }
.proc-row:active { background: #fafbfe; }
.proc-row .p-name { font-size: 14px; font-weight: 500; }
.proc-row .p-meta { font-size: 12px; color: var(--c-text-3); margin-top: 2px; }
.proc-row.disabled { opacity: 0.5; }

/* 人员选择 chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--c-border-strong);
  background: #fff;
  font-size: 13.5px;
  cursor: pointer;
  user-select: none;
  transition: all 0.14s;
}
.chip.on {
  background: var(--c-primary);
  border-color: var(--c-primary);
  color: #fff;
  font-weight: 500;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.28);
}
.chip .t { font-size: 10.5px; opacity: 0.65; margin-left: 3px; }

/* 每人一行 */
.person-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 0;
  border-bottom: 1px dashed #eef2f8;
}
.person-row:last-child { border-bottom: none; }
.person-row .nm { flex: 1; min-width: 0; font-size: 14px; }
.person-row input {
  width: 92px; height: 38px; text-align: right;
  font-size: 15px; font-weight: 600;
  border: 1px solid var(--c-border-strong); border-radius: 9px;
  padding: 0 10px; font-family: var(--mono);
  background: #fff; color: var(--c-text);
}
.person-row input:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12); }
.person-row .unit { font-size: 12px; color: var(--c-text-3); width: 26px; }

/* 底部动作条 */
.h5-actions {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--c-border);
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  display: flex; gap: 10px; align-items: center;
  z-index: 30;
  max-width: 560px; margin: 0 auto;
}

/* 底部导航 */
.h5-tabbar {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: #fff; border-top: 1px solid var(--c-border);
  display: flex; z-index: 30;
  padding-bottom: env(safe-area-inset-bottom);
  max-width: 560px; margin: 0 auto;
}
.h5-tabbar .tab {
  flex: 1; text-align: center; padding: 8px 0 6px; color: var(--c-text-3); font-size: 11px;
  cursor: pointer;
}
.h5-tabbar .tab.active { color: var(--c-primary); }
.h5-tabbar .tab svg { width: 21px; height: 21px; display: block; margin: 0 auto 2px; }
.h5-tabbar .tab .dot {
  position: absolute; margin-left: 10px; margin-top: -2px;
  min-width: 15px; height: 15px; padding: 0 4px; border-radius: 8px;
  background: #ef4444; color: #fff; font-size: 10px; line-height: 15px; text-align: center;
}

/* 分区标题 */
.h5-sec { font-size: 12.5px; color: var(--c-text-3); margin: 18px 4px 8px; display: flex; align-items: center; justify-content: space-between; }

/* 数字大字 */
.big-num { font-size: 30px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }

/* 登录 */
#h5-login {
  min-height: 100vh; display: flex; flex-direction: column; justify-content: center;
  padding: 24px 22px;
  background: radial-gradient(700px 420px at 20% 0%, #dbeafe 0%, transparent 60%), #f5f7fb;
}
.h5-login-card { background: #fff; border-radius: 18px; padding: 26px 22px; box-shadow: 0 16px 40px rgba(15, 23, 42, 0.1); }
