/* ============================================================
   洪奕内衣 · 产品资料扫码查询  —— 工业工单风
   ============================================================ */
:root {
  --ink: #1b1d21;
  --paper: #f3efe6;
  --card: #ffffff;
  --accent: #f05a1a;
  --accent-dark: #c9440f;
  --danger: #d92d20;
  --muted: #6b665c;
  --line: #1b1d21;
  --tag-bg: #efe9db;
  --radius: 4px;
  --shadow-hard: 3px 3px 0 var(--ink);
  --shadow-hard-sm: 2px 2px 0 var(--ink);
  --font-stack: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Helvetica Neue", Arial, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  /* 防止顶部橡皮筋滚动触发浏览器/微信自带下拉刷新 */
  overscroll-behavior-y: none;
}

body {
  font-family: var(--font-stack);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  /* 允许双指/双击缩放（manipulation 放开 pinch-zoom），仅禁用浏览器默认橡皮筋下拉刷新 */
  touch-action: manipulation;
  overscroll-behavior-y: none;
  -webkit-text-size-adjust: 100%;
}

/* 弹层/看图器内部允许正常滚动与缩放，不把橡皮筋传到页面层 */
.ec-sheet, .modal, .modal-mask, .img-viewer, .lightbox {
  overscroll-behavior: contain;
  touch-action: manipulation;
}

img {
  display: block;
  max-width: 100%;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
  touch-action: manipulation; /* 移动端：禁用双击缩放/误触，避免点按视口跳动 */
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

input,
textarea,
select {
  font-family: inherit;
  font-size: 1rem;
}

#app {
  min-height: 100vh;
  min-height: 100dvh;
}

/* ---------------- 通用布局 ---------------- */
.page {
  max-width: 640px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--paper);
  position: relative;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--ink);
  color: #fff;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 14px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 4px solid var(--accent);
}

.topbar .brand {
  flex: 1;
  min-width: 0;
}

.topbar .brand-name {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.2;
}

.topbar .brand-sub {
  font-size: 0.72rem;
  color: #b9b4a8;
  letter-spacing: 0.18em;
  margin-top: 1px;
}

.topbar .title {
  flex: 1;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 顶部返回链接（返回首页 / 返回后台）：白字加粗，避免与背景同化被忽视 */
.topbar .back-link {
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
  flex-shrink: 0;
  padding: 6px 8px;
}
.topbar .back-link:active {
  opacity: 0.7;
}

.icon-btn {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  border-radius: var(--radius);
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
}

.icon-btn:active {
  background: #fff;
  color: var(--ink);
}

.container {
  padding: 14px;
  padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px));
}

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 52px;
  padding: 0 20px;
  font-size: 1.05rem;
  font-weight: 700;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow-hard-sm);
  transition: transform 0.12s linear, box-shadow 0.12s linear,
    background-color 0.12s linear;
  user-select: none;
  text-decoration: none;
}

.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 var(--ink);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:active {
  background: var(--accent-dark);
}

.btn-dark {
  background: var(--ink);
  color: #fff;
}

.btn-danger {
  background: var(--danger);
  color: #fff;
  border-color: var(--ink);
}

.btn-ghost {
  background: transparent;
  box-shadow: none;
}

.btn-block {
  width: 100%;
}

.btn-sm {
  min-height: 40px;
  padding: 0 12px;
  font-size: 0.92rem;
  box-shadow: 2px 2px 0 var(--ink);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ---------------- 搜索 ---------------- */
.search-box {
  position: relative;
  margin-bottom: 14px;
}

.search-box input {
  width: 100%;
  height: 54px;
  padding: 0 16px 0 48px;
  font-size: 1.05rem;
  font-weight: 600;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-hard-sm);
  outline: none;
}

.search-box input:focus {
  border-color: var(--accent);
}

.search-box .search-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  color: var(--ink);
}

/* ---------------- 工单卡片 ---------------- */
.meta-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--muted);
}

.meta-line .count b {
  color: var(--accent);
  font-size: 1.05rem;
}
.meta-line .count .count-total {
  color: var(--muted);
  font-weight: 700;
  font-size: 0.85rem;
}

.product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.product-card {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.12s linear, box-shadow 0.12s linear;
}

.product-card:active {
  transform: translate(2px, 2px);
  box-shadow: var(--shadow-hard-sm);
}

.product-card .cover {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--tag-bg);
  border-bottom: 2px solid var(--line);
  overflow: hidden;
}

.product-card .cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-card .cover .no-img {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.8rem;
}

.product-card .cover .no-img .big {
  font-size: 2rem;
}

.product-card .img-count {
  position: absolute;
  right: 6px;
  bottom: 6px;
  background: var(--ink);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 2px;
}

.product-card .info {
  padding: 10px 10px 12px;
}

.product-card .p-code {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-card .p-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #3a372f;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-card .p-cat {
  display: inline-block;
  margin-top: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 2px;
}

.tag-plain {
  display: inline-block;
  margin-top: 8px;
  background: var(--tag-bg);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 2px;
  border: 1px solid #d8d1c0;
}

/* ---------------- 空状态 ---------------- */
.empty-state {
  text-align: center;
  padding: 64px 24px;
  color: var(--muted);
}

.empty-state .big {
  font-size: 3.2rem;
  display: block;
  margin-bottom: 12px;
}

.empty-state h3 {
  font-size: 1.15rem;
  color: var(--ink);
  margin-bottom: 6px;
}

.empty-state p {
  font-size: 0.92rem;
}

/* ---------------- 首页底部 ---------------- */
.home-footer {
  margin-top: 28px;
  text-align: center;
  border-top: 2px dashed #c9c2b2;
  padding-top: 18px;
}

.home-footer a {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.05em;
}

.home-footer a:active {
  color: var(--accent);
}

.home-footer .stamp {
  margin-top: 8px;
  font-size: 0.72rem;
  color: #a8a193;
  letter-spacing: 0.2em;
}

/* ============================================================
   全屏图片查看器（详情页）
   ============================================================ */
.viewer {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #000;
  display: flex;
  flex-direction: column;
  touch-action: none;
}

.viewer-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 12px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0));
  color: #fff;
  pointer-events: none;
}

.viewer-top > * {
  pointer-events: auto;
}

.viewer-top .v-code {
  flex: 1;
  min-width: 0;
}

.viewer-top .v-code .c1 {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.viewer-top .v-code .c2 {
  font-size: 0.78rem;
  color: #cfcfcf;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.viewer-top .icon-btn {
  border-color: #fff;
  background: rgba(0, 0, 0, 0.35);
}

.viewer-stage {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.viewer-track {
  display: flex;
  height: 100%;
  will-change: transform;
}

.viewer-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 64px 8px 96px;
}

.viewer-slide .slide-img-wrap {
  transform-origin: center center;
  will-change: transform;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  max-height: 100%;
}

.viewer-slide img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none;
}

.viewer-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 5;
  padding: 10px 12px calc(12px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0));
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.viewer-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.viewer-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  border: none;
  padding: 0;
}

.viewer-dots .dot.on {
  background: var(--accent);
  width: 20px;
  border-radius: 4px;
}

.viewer-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.viewer-actions .v-btn {
  min-height: 44px;
  padding: 0 16px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--radius);
  color: #fff;
  background: rgba(0, 0, 0, 0.4);
  font-size: 0.92rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.viewer-actions .v-btn:active {
  background: #fff;
  color: #000;
}

.viewer-page {
  position: absolute;
  top: calc(64px + env(safe-area-inset-top, 0px));
  right: 14px;
  z-index: 4;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 2px;
  font-variant-numeric: tabular-nums;
}

/* 底部信息抽屉 */
.sheet-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 120;
}

.sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 640px;
  background: var(--card);
  border-top: 4px solid var(--accent);
  border-radius: 8px 8px 0 0;
  z-index: 121;
  padding: 18px 18px calc(20px + env(safe-area-inset-bottom, 0px));
  max-height: 70vh;
  overflow-y: auto;
}

.sheet h3 {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 2px;
}

.sheet .sheet-code {
  font-size: 0.95rem;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 12px;
  font-variant-numeric: tabular-nums;
}

.sheet .row {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px dashed #d8d1c0;
  font-size: 0.95rem;
}

.sheet .row .k {
  flex-shrink: 0;
  width: 64px;
  font-weight: 800;
  color: var(--ink);
}

.sheet .row .v {
  flex: 1;
  color: #3a372f;
  word-break: break-all;
  white-space: pre-wrap;
}

.sheet .thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 0 4px;
  -webkit-overflow-scrolling: touch;
}

.sheet .thumbs img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border: 2px solid var(--line);
  border-radius: 2px;
  flex-shrink: 0;
}

.sheet .thumbs img.on {
  border-color: var(--accent);
  outline: 2px solid var(--accent);
}

/* ============================================================
   管理后台
   ============================================================ */
.admin-head {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.admin-head .btn {
  flex: 1;
}

.admin-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* 品类筛选条 */
.cat-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 10px;
  overflow-x: auto;
  padding: 2px 1px 6px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.cat-bar::-webkit-scrollbar { display: none; }
.cat-filter-label {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--muted);
  white-space: nowrap;
  margin-right: 2px;
}
.cat-chip {
  flex-shrink: 0;
  min-height: 32px;
  padding: 0 14px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--line);
}
.cat-chip:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--line); }
.cat-chip.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--line);
  box-shadow: 2px 2px 0 var(--line);
}

.admin-row {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard-sm);
  padding: 7px 9px;
  display: flex;
  gap: 9px;
  align-items: center;
}

.admin-row .a-thumb {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border: 2px solid var(--line);
  border-radius: 2px;
  object-fit: cover;
  background: var(--tag-bg);
}

.admin-row .a-thumb.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--muted);
}

.admin-row .a-info {
  flex: 1;
  min-width: 0;
}

.admin-row .a-code {
  font-size: 0.98rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.admin-row .a-name {
  font-size: 0.83rem;
  color: #3a372f;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.admin-row .a-meta {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 1px;
}

.admin-row .a-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(58px, 64px));
  gap: 5px;
  flex-shrink: 0;
}

.admin-row .a-actions .btn {
  min-height: 34px;
  height: 34px;
  padding: 0 6px;
  font-size: 0.78rem;
  width: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 可见/隐藏徽标 */
.vis-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 3px;
  border: 2px solid var(--line);
  vertical-align: middle;
  margin-left: 4px;
}
.vis-badge.vis-on {
  background: var(--accent);
  color: #fff;
  border-color: var(--line);
}
.vis-badge.vis-off {
  background: #fff;
  color: var(--muted);
}
.btn-warn {
  background: #fff;
  color: var(--danger);
  border-color: var(--danger);
}
.btn-warn:active {
  box-shadow: none;
  transform: translate(2px, 2px);
}

/* 扫码可见开关 */
.switch-row {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 6px 0;
  user-select: none;
}
.switch-row input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.switch-track {
  position: relative;
  width: 52px;
  height: 30px;
  background: #cfc8b8;
  border: 2px solid var(--line);
  border-radius: 4px;
  flex-shrink: 0;
  transition: background 150ms linear;
}
.switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 2px;
  transition: transform 150ms linear;
}
.switch-row input:checked + .switch-track {
  background: var(--accent);
}
.switch-row input:checked + .switch-track .switch-thumb {
  transform: translateX(22px);
}
.switch-txt {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
}

.data-panel {
  margin-top: 22px;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard-sm);
  padding: 14px;
}

.data-panel h4 {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.data-panel .storage-bar {
  height: 14px;
  border: 2px solid var(--line);
  border-radius: 2px;
  background: #eee;
  margin: 10px 0 4px;
  overflow: hidden;
}

.data-panel .storage-bar i {
  display: block;
  height: 100%;
  background: var(--accent);
  width: 0%;
}

.data-panel .storage-bar i.warn {
  background: var(--danger);
}

.data-panel .storage-txt {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 12px;
}

.data-panel .dp-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

/* 超窄屏（<360px）每行 2 个，避免按钮文字过挤 */
@media (max-width: 360px) {
  .data-panel .dp-actions {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---------------- 表单 ---------------- */
.form-card {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  padding: 16px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.95rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.form-group label .req {
  color: var(--danger);
  margin-left: 2px;
}

.form-group label .hint {
  font-weight: 500;
  font-size: 0.78rem;
  color: var(--muted);
  margin-left: 6px;
}

.form-group input[type="text"],
.form-group input[type="password"],
.modal input[type="text"],
.modal input[type="password"],
.form-group textarea {
  width: 100%;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  min-height: 50px;
  font-size: 1.02rem;
  font-weight: 600;
  background: #fff;
  outline: none;
}

.form-group textarea {
  min-height: 88px;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.upload-zone {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.upload-zone label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 86px;
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  background: var(--tag-bg);
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
}

.upload-zone label .u-icon {
  font-size: 1.6rem;
}

.upload-zone label .u-sub {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 600;
}

.upload-zone label:active {
  background: #e6dfce;
}

.upload-zone input {
  display: none;
}

/* iOS 微信内输入框字号不小于 16px，避免聚焦自动缩放 */
#fUrl {
  font-size: 16px !important;
}

.img-edit-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.img-edit-item {
  position: relative;
  aspect-ratio: 1;
  border: 2px solid var(--line);
  border-radius: 2px;
  overflow: hidden;
  background: var(--tag-bg);
}

.img-edit-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.img-edit-item .cover-badge {
  position: absolute;
  left: 0;
  top: 0;
  background: var(--accent);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 6px;
}

.img-edit-item .rm-btn {
  position: absolute;
  right: 2px;
  top: 2px;
  width: 28px;
  height: 28px;
  border-radius: 2px;
  background: var(--danger);
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  border: 2px solid #000;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.img-edit-item .set-cover {
  position: absolute;
  left: 2px;
  bottom: 2px;
  height: 26px;
  padding: 0 8px;
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(27, 29, 33, 0.85);
  color: #fff;
  border: 1px solid #fff;
  border-radius: 2px;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.form-actions .btn {
  flex: 1;
}

/* ============================================================
   二维码页
   ============================================================ */
.qr-card {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  padding: 22px 18px;
  text-align: center;
}

.qr-card .qr-product-code {
  font-size: 1.5rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.qr-card .qr-product-name {
  font-size: 0.95rem;
  color: var(--muted);
  font-weight: 600;
  margin: 2px 0 14px;
}

.qr-box {
  display: inline-block;
  padding: 14px;
  border: 3px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  line-height: 0;
}

.qr-box canvas,
.qr-box img {
  margin: 0 auto;
}
/* qrcode.js 内部：canvas 用于绘制并转成 img，电脑浏览器实际显示 img；
   全局 img{display:block} 会把回退 canvas/隐藏元素也显示出来，这里隐藏 canvas 只显示最终二维码 */
.qr-box canvas {
  display: none !important;
}
.qr-box img {
  display: block !important;
  width: 240px;
  height: 240px;
}

.qr-url {
  margin-top: 12px;
  font-size: 0.75rem;
  color: var(--muted);
  word-break: break-all;
  background: var(--paper);
  border: 1px dashed #c9c2b2;
  border-radius: 2px;
  padding: 8px;
  text-align: left;
  line-height: 1.45;
}

.qr-tip {
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
}

.qr-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}
.qr-actions-row3 {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.qr-actions-row3 .btn {
  display: flex; align-items: center; justify-content: center;
  padding: 10px 4px; font-size: .8rem; white-space: nowrap;
  text-decoration: none; text-align: center; line-height: 1.3;
}

/* ---------------- 确认弹窗 ---------------- */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal {
  width: 100%;
  max-width: 360px;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  padding: 20px 18px 18px;
}

.modal h3 {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.modal p {
  font-size: 0.95rem;
  color: #3a372f;
  margin-bottom: 16px;
  word-break: break-all;
}

.modal .modal-actions {
  display: flex;
  gap: 10px;
}

.modal .modal-actions .btn {
  flex: 1;
  min-height: 46px;
}

/* ---------------- toast ---------------- */
.toast {
  position: fixed;
  top: calc(20px + env(safe-area-inset-top, 0px));
  left: 50%;
  transform: translateX(-50%) translateY(-80px);
  z-index: 300;
  background: var(--ink);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 12px 22px;
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard-sm);
  max-width: 86vw;
  text-align: center;
  opacity: 0;
  transition: transform 0.18s ease, opacity 0.18s ease;
  pointer-events: none;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ---------------- 加载提示 ---------------- */
.loading-hint {
  text-align: center;
  padding: 40px 0;
  color: var(--muted);
  font-weight: 600;
}

/* ---------------- 桌面端适配 ---------------- */
@media (min-width: 560px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ===== 工票系统 · 工序管理 ===== */
.proc-add {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}
.proc-add .field {
  flex: 1;
  min-height: 52px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 0 14px;
  font-size: 1rem;
  font-weight: 600;
  background: var(--card);
}
.proc-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.proc-toolbar .btn { flex: 1 1 auto; }
.proc-hint {
  font-size: 0.85rem;
  color: var(--gray-text, #6b665c);
  line-height: 1.55;
  background: var(--card);
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  margin-bottom: 16px;
}
.proc-hint b { color: var(--accent); }
/* 导入预览 */
.pi-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 180px;
  overflow-y: auto;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  background: var(--paper);
  margin: 10px 0;
}
.pi-chip {
  display: inline-block;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 3px 10px;
  font-size: 0.9rem;
  font-weight: 700;
}
.pi-num { color: var(--accent); font-size: 1.1em; }
.pi-more { width: 100%; margin: 4px 0 0; color: var(--gray-text, #6b665c); font-size: 0.85rem; }
.pi-tip { margin-top: 8px; font-size: 0.85rem; color: var(--gray-text, #6b665c); }
.proc-list { display: flex; flex-direction: column; gap: 10px; }
.proc-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 3px 3px 0 var(--line);
  padding: 12px 14px;
}
.proc-no {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  border-radius: var(--radius);
}
.proc-name {
  flex: 1;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--ink);
  word-break: break-all;
}
.proc-btns { display: flex; gap: 6px; align-items: center; }
.proc-move, .proc-edit, .proc-del {
  min-width: 40px;
  min-height: 38px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  font-weight: 800;
  cursor: pointer;
  font-size: 0.85rem;
}
.proc-move { color: var(--ink); }
.proc-move:disabled { opacity: 0.35; cursor: not-allowed; }
.proc-move:not(:disabled):active, .proc-edit:active, .proc-del:active { transform: translate(1px,1px); }
.proc-edit { color: var(--ink); }
.proc-del { color: var(--danger); border-color: var(--danger); }

/* ===== 编辑产品 · 工序匹配 ===== */
.proc-edit {
  border: 2px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
}
.proc-edit-head,
.proc-edit-row {
  display: grid;
  grid-template-columns: 52px 1fr 110px;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
}
.proc-edit-head {
  background: var(--ink);
  color: #fff;
  font-weight: 800;
  font-size: 0.82rem;
}
.proc-edit-row {
  border-top: 2px solid var(--line);
  background: #fff;
}
.proc-edit-row.on { background: #fff6f0; }
.pec-check { display: flex; align-items: center; justify-content: center; }
.pec-check input { width: 22px; height: 22px; accent-color: var(--accent); }
.pec-name { font-weight: 700; font-size: 0.98rem; color: var(--ink); word-break: break-all; }
.pec-price {
  width: 100%;
  min-height: 42px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 0 8px;
  font-size: 0.95rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.proc-edit-total {
  padding: 10px 12px;
  border-top: 2px solid var(--line);
  background: var(--paper);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--ink);
}
.proc-edit-total b { color: var(--accent); font-size: 1.05rem; }
.proc-empty {
  padding: 20px 16px;
  background: var(--card);
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  font-weight: 600;
  color: var(--muted);
  line-height: 1.7;
  text-align: center;
}
.proc-empty a { color: var(--accent); font-weight: 800; }

/* ===== 生产工单 ===== */
.order-row {
  display: grid;
  grid-template-columns: 1fr 1fr 110px 44px;
  gap: 8px;
  margin-bottom: 10px;
}
.order-row .o-del {
  border: 2px solid var(--danger);
  color: var(--danger);
  background: #fff;
  border-radius: var(--radius);
  font-weight: 800;
  cursor: pointer;
}
.order-rows-empty {
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 18px 14px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
}
.order-qr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  padding: 4px;
}
.order-qr-item {
  border: 2px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 3px 3px 0 var(--line);
  background: #fff;
  padding: 14px;
  text-align: center;
}
.oqr-box { display: flex; justify-content: center; cursor: pointer; }
.oqr-box canvas { display: block; border: 1px solid #eee; }
.oqr-label { font-weight: 800; margin-top: 10px; font-size: 1rem; color: var(--ink); }
.oqr-qty { color: var(--accent); font-weight: 700; font-size: 0.9rem; margin-top: 2px; }
.oqr-copies { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 10px; padding-top: 8px; border-top: 1px dashed #d8d0c2; font-weight: 800; font-size: 0.88rem; color: var(--ink); }
.oqr-copy-input { width: 64px; text-align: center; border: 2px solid var(--line, #1a1a1a); border-radius: 6px; padding: 5px 4px; font-size: 0.95rem; font-weight: 900; color: #d9480f; background: #fff; }
.oqr-copy-input:focus { outline: none; border-color: var(--accent, #e8590c); }

.order-list { display: flex; flex-direction: column; gap: 12px; }
.order-card {
  display: block;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 3px 3px 0 var(--line);
  padding: 12px 14px;
}
.order-card-main { min-width: 0; }
.order-card-title { font-weight: 800; font-size: 1.05rem; color: var(--ink); }
.order-card-meta { font-size: 0.9rem; color: var(--muted); margin: 4px 0 8px; }
.order-card-meta b { color: var(--ink); font-variant-numeric: tabular-nums; }
.progress-bar {
  height: 12px;
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: 3px;
  overflow: hidden;
}
.progress-bar i {
  display: block; height: 100%;
  background: var(--accent);
  transition: width 150ms linear;
}
.progress-bar.big { height: 18px; margin-top: 10px; }
.order-steps { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.ostep {
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 3px;
  padding: 2px 8px;
  color: var(--ink);
}
.order-card-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  margin-top: 12px; padding-top: 10px; border-top: 2px dashed var(--line); }

/* ====== 工单按床号分组折叠（obed = order by bed） ====== */
.obed-list { display: flex; flex-direction: column; gap: 12px; }
.obed-card { border: 2px solid var(--line, #1a1a1a); border-radius: 8px; background: #fff; box-shadow: 3px 3px 0 rgba(26,26,26,.12); overflow: hidden; }
.obed-card.obed-unassigned { border-style: dashed; border-color: #d0342c; }
.obed-card.obed-all-done { background: #faf7ef; }
.obed-head { width: 100%; display: flex; align-items: center; gap: 10px; padding: 13px 14px; background: var(--ink, #1a1a1a); color: #fff; border: none; cursor: pointer; text-align: left; }
.obed-head:active { background: #000; }
.obed-arrow { color: #ff8a3d; font-size: .8rem; transition: transform .2s; flex: none; width: 16px; text-align: center; }
.obed-arrow.open { transform: rotate(90deg); }
.obed-no { font-weight: 900; font-size: 1.02rem; letter-spacing: .5px; flex: none; }
.obed-codes { flex: 1; min-width: 0; font-size: .82rem; font-weight: 700; color: #e8e2d6; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.obed-meta { flex: none; font-size: .76rem; font-weight: 700; color: #cfc8ba; white-space: nowrap; }
.obed-wip { color: #ffb08a; font-style: normal; font-weight: 800; }
.obed-done { color: #7fd99a; font-style: normal; font-weight: 800; }
.obed-pct { flex: none; font-weight: 900; color: #ff8a3d; font-size: .95rem; min-width: 44px; text-align: right; }
.obed-progress { height: 5px; background: #e7e2d6; }
.obed-progress i { display: block; height: 100%; background: var(--accent, #e8590c); transition: width .3s; }
/* 混款床：同一床号下有两个及以上未裁剪款 —— 醒目红框 + 警告条 */
.obed-card.obed-mixed { border-color: #d0342c; box-shadow: 3px 3px 0 rgba(208,52,44,.22); }
.obed-codes-mixed { color: #ffb3ab !important; }
.obed-mixwarn { padding: 9px 14px; background: #fdeceb; color: #a51f18; font-size: .8rem; line-height: 1.5; border-bottom: 1px solid #f3c3bf; }
.obed-mixwarn b { color: #d0342c; }
.obed-body { border-top: 2px dashed #e0d9ca; background: #fffdf8; }
.obed-colhead { display: flex; align-items: center; gap: 6px; padding: 7px 12px; font-size: .76rem; font-weight: 800; color: #8a8375; border-bottom: 1.5px solid #e7e0d1; background: #faf6ec; }
.obed-colhead span { flex: none; }
.obed-colhead .obed-col-qty { margin-left: auto; }
.obed-colhead .obed-col-rate { min-width: 48px; text-align: center; }
.obed-colhead .obed-col-prog { min-width: 42px; text-align: center; }
.obed-row { width: 100%; display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-bottom: 1px solid #efe9db; background: #fffdf8; border-left: none; border-right: none; border-top: none; border-radius: 0; text-align: left; cursor: pointer; font-family: inherit; }
.obed-row:last-child { border-bottom: none; }
.obed-row.is-done { background: #f7faf7; }
.obed-row:active { background: #f3eee2; }
.obed-chip { flex: none; min-width: 38px; text-align: center; font-size: .76rem; font-weight: 800; color: #fff; background: #e8a33d; border-radius: 3px; padding: 3px 7px; }
/* 工单行备注（打印在工票上）：可直接输入并保存，不必点进详情 */
.obed-note {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px 6px 20px; border-bottom: 1px solid #efe9db; background: #fffcf2;
}
.obed-note.has-note { background: #fff6dd; }
.obed-note-input {
  flex: 1 1 auto; min-width: 0; box-sizing: border-box;
  font-size: .82rem; color: var(--ink);
  border: 1.5px solid #e3d9c3; border-radius: 4px; padding: 5px 8px; background: #fff;
}
.obed-note.has-note .obed-note-input { border-color: #e8c26b; }
.obed-note-input::placeholder { color: #b5ac97; font-weight: 600; }
.obed-note-save {
  flex: 0 0 auto; cursor: pointer;
  font-size: .8rem; font-weight: 800; color: #fff;
  background: var(--orange, #e08a2e); border: none; border-radius: 4px; padding: 6px 14px; font-family: inherit;
}
.obed-note-save:active { opacity: .8; }
.obed-size { flex: none; min-width: 46px; font-weight: 800; font-size: .95rem; color: var(--ink); }
.obed-row-qty { margin-left: auto; flex: none; font-weight: 700; font-size: .82rem; color: #666; font-variant-numeric: tabular-nums; }
.obed-rate { flex: none; min-width: 48px; text-align: center; }
.obed-dot { display: inline-block; min-width: 40px; font-size: .72rem; font-weight: 800; border-radius: 999px; padding: 2px 8px; border: 1.5px solid #cfc9bd; background: #f0eee9; color: #9a948a; font-variant-numeric: tabular-nums; }
.obed-dot.part { background: #fff0e8; color: var(--accent, #e8590c); border-color: var(--accent, #e8590c); }
.obed-dot.full { background: #e6f4ea; color: #1a7f37; border-color: #1a7f37; }
.obed-prog-btn { flex: none; min-width: 42px; text-align: center; font-size: .78rem; font-weight: 800; color: var(--accent, #e8590c); }

/* 工单工序详细进度弹窗（仿 ERP 计划详细进度：横向条形图） */
.op-modal { max-width: 560px; width: calc(100vw - 28px); max-height: 88vh; overflow-y: auto; }
.op-head { margin-bottom: 10px; }
.op-title { font-size: 1.02rem; font-weight: 800; color: var(--ink); word-break: break-all; }
.op-sub { font-size: .82rem; color: var(--muted); margin-top: 4px; }
.op-time { display: inline-block; font-size: .72rem; font-weight: 700; color: #8a6d2f; background: #fff7e6; border: 1px solid #f0d9ad; border-radius: 3px; padding: 2px 8px; margin-top: 7px; }
.op-overview { font-size: .85rem; color: #555; margin: 8px 0 6px; }
.op-overview b { color: var(--ink); font-variant-numeric: tabular-nums; }
.op-h4 { margin: 12px 0 4px; font-size: .95rem; }
.op-h4 small { color: var(--muted); font-weight: 700; margin-left: 6px; }
.op-axis { display: flex; justify-content: space-between; font-size: .68rem; color: #a09a8d; margin: 2px 2px 0; font-variant-numeric: tabular-nums; }
.op-steps { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.op-step-label { display: flex; align-items: baseline; gap: 8px; font-size: .9rem; color: var(--ink); margin-bottom: 3px; }
.op-step-label span { font-weight: 700; }
.op-step-label b { margin-left: auto; flex: none; font-weight: 800; color: var(--accent, #e8590c); font-variant-numeric: tabular-nums; }
.op-step-who { font-size: .72rem; font-weight: 800; color: #b06a00; background: #fff4e0; border: 1px solid #f0d9ad; border-radius: 3px; padding: 0 6px; }
.op-step-track { height: 16px; background: #efe9db; border: 1.5px solid var(--line); border-radius: 2px; overflow: hidden; }
.op-step-track i { display: block; height: 100%; width: 0; background: var(--accent, #e8590c); }
.op-step.is-full .op-step-track i { background: #1a7f37; }
.op-step.is-full .op-step-label b { color: #1a7f37; }
.op-step-track i.op-zero { background: #d9d3c6; }
.op-who { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 6px 2px 2px; }
.op-who-tag { font-size: .7rem; font-weight: 800; color: var(--muted); margin-right: 2px; }
.op-who-pill { display: inline-flex; align-items: baseline; gap: 3px; font-size: .78rem; font-weight: 700; color: var(--ink); background: #f2f4f7; border: 1px solid #dfe3ea; border-radius: 3px; padding: 1px 7px; }
.op-who-pill b { color: var(--accent, #e8590c); font-style: normal; font-variant-numeric: tabular-nums; }
.op-nostep { padding: 20px; text-align: center; color: var(--muted); font-size: .9rem; }
.op-manage { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 16px; padding-top: 12px; border-top: 2px dashed #e0d9ca; }
.op-manage .btn-sm { padding: 9px 4px; font-size: .8rem; margin: 0; width: 100%; justify-content: center; }

/* 整床工序进度看板 */
.order-card.is-done { background: #faf7ef; }
.o-badge { font-size: 0.72rem; font-weight: 800; border: 1.5px solid var(--line); border-radius: 3px; padding: 1px 7px; margin-left: 8px; white-space: nowrap; }
.o-badge-done { background: #e7f6ec; color: #1a7f37; border-color: #1a7f37; }
.o-badge-wip { background: #fff0e8; color: var(--accent); border-color: var(--accent); }
.order-stepprog { margin-top: 10px; display: flex; flex-direction: column; gap: 7px; }
.sp-item { font-size: 0.8rem; }
.sp-label { display: flex; align-items: center; gap: 6px; font-weight: 700; margin-bottom: 3px; color: var(--ink); }
.sp-label span { flex: 0 0 auto; }
.sp-label em.sp-owner { font-style: normal; font-weight: 800; color: var(--accent); font-size: 0.74rem; }
.sp-label b { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 800; white-space: nowrap; }
.sp-bar { height: 9px; border: 1.5px solid var(--line); border-radius: 2px; background: #fff; overflow: hidden; }
.sp-bar i { display: block; height: 100%; background: var(--ink); width: 0; }
.sp-item.sp-full .sp-bar i { background: #1a7f37; }
.sp-item.sp-full .sp-label b { color: #1a7f37; }
.sp-item.sp-miss .sp-bar { border-color: var(--danger); background: #fdecea; }
.sp-item.sp-miss .sp-label b { color: var(--danger); }
.sp-item.sp-miss .sp-bar i { background: var(--danger); }

/* 已生成工单页筛选 */
.ol-search { position: relative; display: flex; align-items: center; margin: 10px 0 8px; }
.ol-search-ic { position: absolute; left: 14px; font-size: 18px; color: #6b665c; pointer-events: none; }
.ol-search-input { padding-left: 42px; height: 50px; font-size: 16px; }
.ol-search-clear { position: absolute; right: 10px; width: 30px; height: 30px; border: 2px solid var(--line); background: var(--paper); font-size: 15px; line-height: 1; color: var(--ink); cursor: pointer; }
.ol-filter { display: flex; gap: 8px; margin: 4px 0 12px; }
.ol-chip {
  flex: 1; font-size: 0.85rem; font-weight: 800; padding: 9px 6px;
  border: 2px solid var(--line); border-radius: 3px; background: var(--card);
  color: var(--ink); cursor: pointer; font-family: inherit;
}
.ol-chip.active { background: var(--ink); color: #fff; box-shadow: 2px 2px 0 var(--accent); }
/* 生成时间筛选 */
.ol-time { margin: 0 0 12px; padding: 10px 12px; background: #faf6ec; border: 1.5px dashed #e2d6b6; border-radius: 6px; }
.ol-time-label { font-size: .8rem; font-weight: 800; color: var(--ink); margin-bottom: 7px; }
.ol-time-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.otq { font-size: .78rem; font-weight: 700; color: var(--ink); background: #fff; border: 1.5px solid var(--line); border-radius: 999px; padding: 4px 12px; cursor: pointer; }
.otq.active { background: var(--ink); color: #fff; box-shadow: 2px 2px 0 var(--accent); border-color: var(--ink); }
.ol-time-range { display: flex; align-items: center; gap: 8px; }
.ol-date { flex: 1; min-width: 0; padding: 7px 8px; font-size: .85rem; }
.ol-date-sep { color: var(--muted); font-size: .8rem; }
.ol-time-clear { margin-top: 8px; width: 100%; font-size: .78rem; font-weight: 700; color: var(--danger, #c0392b); background: #fff; border: 1.5px solid #e0b4ad; border-radius: 6px; padding: 7px; cursor: pointer; }

/* ===== 工人扫码录入页 ===== */
.work-card { position: relative; text-align: center; padding-top: 26px; }
.work-tag {
  display: inline-block;
  background: var(--ink); color: #fff;
  font-weight: 800; font-size: 0.8rem;
  padding: 4px 14px; border-radius: 3px;
  letter-spacing: 2px; margin-bottom: 10px;
}
.work-product { font-size: 1.5rem; font-weight: 800; color: var(--ink); word-break: break-all; }
.work-spec { font-size: 1.1rem; font-weight: 700; color: var(--accent); margin-top: 4px; }
.work-overview {
  display: flex; justify-content: center; gap: 24px;
  margin-top: 12px; font-size: 0.95rem; color: var(--muted);
}
.work-overview b { color: var(--ink); font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.work-step {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 3px 3px 0 var(--line);
  padding: 11px 12px;
  margin-bottom: 10px;
}
.work-step.locked { opacity: 0.55; background: var(--paper); }
.ws-head { display: flex; align-items: center; gap: 9px; }
.ws-no {
  width: 28px; height: 28px; flex: 0 0 28px;
  background: var(--ink); color: #fff;
  border-radius: 3px; font-weight: 800; font-size: .92rem;
  display: flex; align-items: center; justify-content: center;
}
.ws-title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ws-name { font-weight: 800; font-size: 1.05rem; color: var(--ink); line-height: 1.25; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ws-lock { font-size: 0.75rem; color: var(--muted); font-weight: 700; }
.ws-finish { font-size: .78rem; font-weight: 800; color: #1a7f37; }
/* 工序完成者：✓ 谁谁已完成（读 work_logs 聚合，只读展示） */
.ws-done-by {
  font-size: .78rem; font-weight: 700; color: #625b43; line-height: 1.35; margin-top: 2px;
  background: #faf7ee; border-left: 3px solid #8a7a3a; padding: 2px 7px; border-radius: 0 4px 4px 0;
}
.ws-done-by b { color: #3a3a2a; }
.ws-free { font-size: .75rem; font-weight: 800; color: var(--accent); white-space: nowrap; }
/* 工序备注：名下方小字，不再单独占大框 */
.ws-subnote {
  font-size: .85rem; color: #d21f1f; font-weight: 800; line-height: 1.3;
  background: #fdecec; border-left: 3px solid #d21f1f;
  padding: 3px 8px; border-radius: 0 4px 4px 0; margin-top: 2px;
}
/* 认领按钮/标签：工序名行右侧，紧凑 */
.ws-claim-btn {
  white-space: nowrap; flex: 0 0 auto;
  min-height: 32px; padding: 5px 12px; font-size: .85rem;
}
.ws-claim-btn.free { box-shadow: 2px 2px 0 var(--line); }
.ws-claim-btn.mine {
  background: #fff; color: var(--danger); border: 2px solid var(--danger);
  border-radius: var(--radius); font-weight: 800; cursor: pointer;
}
.ws-claim-tag {
  white-space: nowrap; flex: 0 0 auto;
  font-size: .76rem; font-weight: 800; color: #6b665c;
  background: var(--paper); border: 1.5px solid var(--line);
  border-radius: 4px; padding: 4px 8px; max-width: 38vw;
  overflow: hidden; text-overflow: ellipsis;
}
.ws-prog { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
.ws-bar { flex: 1; height: 10px; background: var(--paper); border: 2px solid var(--line); border-radius: 3px; overflow: hidden; }
.ws-bar i { display: block; height: 100%; background: var(--accent); }
.ws-num { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ink); font-size: 0.9rem; }
.ws-actions { display: grid; grid-template-columns: auto 110px 1fr; gap: 8px; }
.ws-hint { font-size: 0.85rem; color: var(--muted); font-weight: 600; padding: 4px 2px; }
.ws-claimed-hint { background: var(--paper); border: 2px dashed var(--danger); color: var(--danger); border-radius: var(--radius); padding: 10px 12px; font-weight: 800; font-size: 0.9rem; text-align: center; }
.work-step[data-claimed="1"] { background: #faf6ee; }

/* ---------------- 员工 / 工资 ---------------- */
.modal-card {
  width: 100%;
  max-width: 380px;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  padding: 22px 20px 20px;
  position: relative;
}
.modal-close {
  position: absolute;
  top: 10px; right: 12px;
  width: 34px; height: 34px;
  line-height: 32px;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
  color: var(--ink);
}
.wc-title { font-size: 1.15rem; font-weight: 800; text-align: center; margin-bottom: 6px; }
.wc-qr { display: flex; align-items: center; justify-content: center; padding: 12px; background: #fff; border: 2px solid var(--line); border-radius: var(--radius); }
.wc-qr canvas, .wc-qr img { display: block; }

.worker-bar {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--ink); color: #fff;
  border: 2px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-hard-sm);
  padding: 10px 14px; margin-bottom: 12px;
  font-weight: 700; font-size: 0.95rem;
}
.worker-bar-link { color: var(--accent); font-weight: 800; text-decoration: none; font-size: 0.9rem; }

.worker-list { display: flex; flex-direction: column; gap: 10px; }
.worker-card {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard-sm);
  padding: 12px 14px;
}
.worker-main { min-width: 0; flex: 1; }
.worker-name { font-size: 1.05rem; font-weight: 800; color: var(--ink); }
.worker-phone { font-size: 0.85rem; color: var(--muted); font-weight: 600; margin-top: 2px; }
.worker-btns { display: flex; gap: 8px; flex-shrink: 0; }

.wage-tools { display: flex; gap: 8px; margin: 14px 0 4px; }
.wage-tools .btn { flex: 1; }
.lock-tip {
  margin: 10px 0 4px; padding: 10px 12px; font-size: 0.82rem; font-weight: 700;
  border: 2px solid var(--line); border-left-width: 6px; border-radius: 3px;
  background: #fdecea; color: var(--danger); line-height: 1.5;
}
.lock-tip b { color: var(--ink); }
.lock-tip-off { background: var(--paper); color: #6b665c; border-left-color: #b9b2a4; }
.wage-head-card { padding: 16px; }
.wage-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.wsum-item { text-align: center; }
.wsum-num { font-size: 1.4rem; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.wsum-num.wage { color: var(--accent); }
.wsum-label { font-size: 0.78rem; color: var(--muted); font-weight: 600; margin-top: 4px; }

.wage-card { padding: 14px 16px; margin-top: 12px; }
.wage-card-head { display: flex; align-items: center; justify-content: space-between; }
.wage-name { font-size: 1.1rem; font-weight: 800; color: var(--ink); }
.wage-total { font-size: 1.3rem; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }
.wage-qty { font-size: 0.85rem; color: var(--muted); font-weight: 600; margin: 4px 0 10px; }
.wstep-list { display: flex; flex-direction: column; gap: 6px; border-top: 2px dashed var(--line); padding-top: 10px; }
.wstep-row { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; font-size: 0.9rem; font-weight: 600; }
.wstep-wage { color: var(--accent); font-weight: 800; font-variant-numeric: tabular-nums; min-width: 70px; text-align: right; }
/* 统一工资：车间计件 + 裁剪工资 */
.wsum-row { grid-column: 1 / -1; }
.wsum-split { grid-column: 1 / -1; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.wsum-tag { font-size: 0.8rem; font-weight: 800; padding: 5px 12px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--paper); white-space: nowrap; }
.wsum-tag.wsum-piece { color: #1f5fa8; border-color: #9fc0e8; background: #eef5fc; }
.wsum-tag.wsum-cut { color: var(--accent); border-color: #f0c39a; background: #fdf1e6; }
.wrole { font-size: 0.68rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; vertical-align: middle; margin-left: 6px; }
.wrole-cut { color: #fff; background: var(--accent); }
.wrole-piece { color: #1f5fa8; background: #dcebfb; }
.wrole-wh { color: #555; background: #e7e7e7; }
.wstep-group + .wstep-group { margin-top: 10px; }
.wstep-gtitle { font-size: 0.78rem; font-weight: 800; color: var(--muted); margin-bottom: 4px; }
.wstep-row.cut span:first-child { color: #7a4a16; }
.wstep-kind { font-style: normal; font-size: 0.68rem; font-weight: 800; color: #fff; background: var(--accent); border-radius: 4px; padding: 1px 5px; margin-left: 4px; }
.wstep-bed { font-style: normal; font-size: 0.66rem; font-weight: 800; color: #114b8a; background: #e3efff; border: 1px solid #a9cff5; border-radius: 4px; padding: 0 5px; margin-left: 5px; }
.wstep-cs { font-style: normal; font-size: 0.64rem; font-weight: 700; color: #555; background: #f0f0f0; border-radius: 4px; padding: 0 5px; margin-left: 4px; }
.wstep-pr { font-style: normal; font-size: 0.64rem; font-weight: 800; color: #1d7a45; background: #e6f6ed; border: 1px solid #b6e3c8; border-radius: 4px; padding: 0 5px; margin-left: 4px; }

/* 统一工资：员工明细按款号分层（后台） */
.wprod-block { border: 1.5px solid var(--line); border-radius: 10px; overflow: hidden; }
.wprod-block + .wprod-block { margin-top: 8px; }
.wprod-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: #faf7f2; border-bottom: 1px dashed #eee2d0; }
.wprod-code { font-weight: 900; font-size: 0.95rem; color: var(--accent); }
.wprod-bed { font-size: 0.74rem; font-weight: 700; color: #8a6d3b; background: #fbf3e3; border: 1px solid #f0ddb8; padding: 1px 7px; border-radius: 999px; }
.wprod-sum { margin-left: auto; font-size: 0.84rem; font-weight: 800; color: var(--ink); white-space: nowrap; }
.wprod-sum b { color: var(--accent); }
.wprod-block .wstep-list { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; border-top: 0; }
.wstep-inner { display: flex; flex-direction: column; gap: 6px; }
.wstep-inner .wstep-row { font-size: 0.85rem; }

/* 员工中心计件明细筛选：按天/按周/自定义 + 款号筛选（款号内按床号） */
.me-detail-wrap .me-detail-tips { font-size: 0.8rem; color: var(--muted); background: #fbf7f0; border: 1px dashed #ecdcbe; padding: 8px 10px; border-radius: 8px; margin: 10px 0; line-height: 1.5; }
.me-detail-filter { background: var(--card); border: 2px solid var(--line); border-radius: 12px; padding: 12px; margin: 12px 0 10px; }
.mdf-mode { display: flex; gap: 8px; }
.mdf-chip { flex: 1; height: 40px; border: 2px solid var(--line); background: var(--card); color: var(--ink); font-weight: 800; font-size: 0.9rem; cursor: pointer; border-radius: 10px; }
.mdf-chip.active { background: var(--ink); color: #fff; }
.mdf-custom { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.mdf-date { flex: 1; min-width: 0; height: 42px; font-size: 0.9rem; font-weight: 700; }
.mdf-sep { font-weight: 700; color: var(--gray); }
.mdf-code-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.mdf-code-label { font-weight: 800; font-size: 0.85rem; color: var(--muted); white-space: nowrap; }
.mdf-code { flex: 1; min-width: 0; height: 42px; font-weight: 700; }
.me-detail-box .loading { padding: 20px; text-align: center; color: var(--muted); }
.me-bed-tag { display: inline-block; font-size: 0.72rem; font-weight: 700; color: #8a6d3b; background: #fbf3e3; border: 1px solid #f0ddb8; padding: 0 5px; border-radius: 4px; vertical-align: middle; }

/* 工资时间段筛选 */
.wage-filter-card { padding: 16px; margin-bottom: 12px; }
.wf-label { font-weight: 800; font-size: 0.95rem; margin-bottom: 8px; }
.wf-range { display: flex; align-items: center; gap: 8px; }
.wf-date { flex: 1; min-width: 0; height: 46px; font-size: 0.95rem; font-weight: 700; }
.wf-sep { font-weight: 700; color: var(--gray); }
.wf-chips { display: flex; gap: 8px; margin: 12px 0; }
.wf-chip { flex: 1; height: 40px; border: 2px solid var(--line); background: var(--card); color: var(--ink); font-weight: 800; font-size: 0.9rem; cursor: pointer; border-radius: var(--radius); }
.wf-chip.active { background: var(--ink); color: #fff; }
.wf-actions { display: flex; gap: 10px; }
.wf-actions .btn { flex: 1; }
.wf-sel-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.wf-sel-title { font-size: 0.82rem; font-weight: 700; color: var(--ink); margin-right: auto; }
.wf-sel-kw { flex: 1; min-width: 120px; }
.wf-sel-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px 10px; max-height: 220px; overflow: auto; background: var(--bg, #faf7f2); border: 1px dashed rgba(0,0,0,.15); border-radius: 8px; padding: 10px; }
.wf-sel-item { display: flex; align-items: center; gap: 6px; font-size: 0.86rem; color: var(--ink); cursor: pointer; }
.wf-sel-item input { accent-color: var(--accent, #e8712f); }
.wf-sel-foot { font-size: 0.8rem; color: var(--gray); margin-top: 8px; }
.wf-sel-foot b { color: var(--accent, #e8712f); }
.wsum-range { grid-column: 1 / -1; font-size: 0.85rem; font-weight: 700; color: var(--gray); margin-bottom: 10px; }
.wsum-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }

/* ===== 客户生产进度二维码（管理员生成 + 客户只读页） ===== */
.cp-valid { display: flex; gap: 8px; }
.cp-vbtn { flex: 1; border: 1.5px solid rgba(0,0,0,.18); background: #fff; color: var(--ink,#1b1d21); border-radius: 8px; padding: 8px 0; font-size: .88rem; font-weight: 600; cursor: pointer; transition: all .15s ease; }
.cp-vbtn.active { border-color: var(--accent,#e8712f); background: var(--accent,#e8712f); color: #fff; }
.cp-result { border-top: 1px dashed rgba(0,0,0,.15); padding-top: 14px; }
.cp-url { font-size: .8rem; color: var(--gray,#6b665c); word-break: break-all; background: rgba(0,0,0,.04); border-radius: 6px; padding: 8px 10px; margin-bottom: 8px; }
.cp-url b { color: var(--ink,#1b1d21); font-size: .78rem; }
.cp-info { font-size: .82rem; color: var(--gray,#6b665c); text-align: center; margin-bottom: 12px; }
.cp-qr { text-align: center; }
.cp-actions { display: flex; gap: 8px; margin-top: 12px; justify-content: center; }
.cp-actions .btn { flex: 1; justify-content: center; }

/* 客户只读页 */
.cp-view-lock { text-align: center; padding: 40px 12px; color: var(--gray,#6b665c); }
.cp-view-lock h3 { color: var(--ink,#1b1d21); margin: 10px 0 6px; }
.cp-view-head { }
.cp-view-badge { display: inline-block; background: var(--accent,#e8712f); color: #fff; border-radius: 20px; padding: 3px 12px; font-size: .8rem; font-weight: 700; margin-bottom: 10px; }
.cp-view-title { font-size: 1.25rem; font-weight: 800; color: var(--ink,#1b1d21); margin: 0 0 4px; }
.cp-view-name { color: var(--gray,#6b665c); font-size: .9rem; font-weight: 500; }
.cp-view-sub { color: var(--gray,#6b665c); font-size: .8rem; margin-bottom: 14px; }
.cp-overview { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; background: linear-gradient(135deg,#241f1a,#1b1d21); border-radius: 12px; padding: 14px 8px; margin-bottom: 10px; }
.cp-ov-item { text-align: center; }
.cp-ov-num { font-size: 1.5rem; font-weight: 800; color: #fff; }
.cp-ov-label { font-size: .72rem; color: rgba(255,255,255,.62); margin-top: 2px; }
.cp-cut-hint { font-size: .78rem; color: var(--accent,#e8712f); font-weight: 600; margin-bottom: 8px; }
.cp-privacy-tip { font-size: .74rem; color: var(--gray,#6b665c); text-align: center; padding: 8px 0 12px; border-bottom: 1px dashed rgba(0,0,0,.12); margin-bottom: 14px; }
.cp-od-list { display: flex; flex-direction: column; gap: 12px; }
.cp-od-block { border: 1px solid rgba(0,0,0,.10); border-radius: 10px; padding: 12px; }
.cp-od-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.cp-od-chip { background: var(--accent,#e8712f); color: #fff; border-radius: 6px; padding: 2px 9px; font-weight: 700; font-size: .85rem; }
.cp-od-size { font-weight: 700; font-size: .9rem; }
.cp-od-meta { margin-left: auto; font-size: .78rem; color: var(--gray,#6b665c); }
.cp-pct { color: var(--accent,#e8712f); font-size: .9rem; }
.cp-done-badge { font-style: normal; background: #1e7e34; color: #fff; border-radius: 10px; padding: 1px 7px; font-size: .7rem; font-weight: 700; margin-left: 4px; }
.cp-steps { display: flex; flex-direction: column; gap: 6px; }
.cp-step { }
.cp-step-label { display: flex; justify-content: space-between; font-size: .78rem; color: var(--ink,#1b1d21); margin-bottom: 3px; }
.cp-step-label b { color: var(--gray,#6b665c); font-weight: 600; }
.cp-step-track { height: 7px; background: rgba(0,0,0,.08); border-radius: 6px; overflow: hidden; }
.cp-step-track i { display: block; height: 100%; background: var(--accent,#e8712f); border-radius: 6px; }
.cp-step.is-full .cp-step-track i { background: #1e7e34; }
.cp-view-foot { text-align: center; color: var(--gray,#6b665c); font-size: .74rem; margin-top: 18px; }

/* 款号工价查询 */
.price-tools { display: flex; gap: 8px; margin: 14px 0 10px; align-items: stretch; }
.price-tools .search-box { flex: 1; }
.price-tools .btn { flex: none; align-self: stretch; }
.price-summary { font-size: 0.9rem; font-weight: 700; color: var(--gray); margin: 4px 0 12px; }
.price-summary b { color: var(--ink); }
.price-card { padding: 14px; margin-bottom: 12px; }
.price-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.price-code { font-size: 1.2rem; font-weight: 800; letter-spacing: 0.5px; }
.price-sum { font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; white-space: nowrap; }
.price-name { font-size: 0.92rem; color: var(--gray); font-weight: 600; margin: 2px 0 10px; }
.price-cat { background: var(--paper); border: 1.5px solid var(--line); border-radius: 3px; padding: 0 6px; font-size: 0.78rem; margin-left: 6px; }
.pricestep-list { display: flex; flex-direction: column; gap: 6px; border-top: 2px dashed var(--line); padding-top: 10px; }
.pricestep-row { display: flex; justify-content: space-between; align-items: center; font-size: 0.92rem; font-weight: 700; }
.pricestep-wage { color: var(--accent); font-weight: 800; font-variant-numeric: tabular-nums; min-width: 70px; text-align: right; }
.price-zero { color: var(--gray); font-weight: 700; font-size: 0.82rem; }

/* 工卡计划汇总 */
.sum-total-card { background: var(--ink); color: #fff; border-color: var(--ink); }
.sum-total-title { font-size: 0.86rem; font-weight: 800; letter-spacing: 1px; color: #f5c7b0; }
.sum-big { font-size: 1.7rem; font-weight: 800; margin: 6px 0 10px; font-variant-numeric: tabular-nums; }
.sum-big b { color: var(--accent); }
.sum-unit { font-size: 0.86rem; font-weight: 700; color: #d9d4c8; }
.sum-total-card .progress-bar { background: #3a3d42; }
.sum-sub { margin-top: 10px; font-size: 0.82rem; color: #cfcabd; font-weight: 700; }
.sum-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.sum-label { font-size: 1.08rem; font-weight: 800; color: var(--ink); }
.sum-extra { font-size: 0.82rem; font-weight: 600; color: var(--gray); margin-left: 6px; }
.sum-badge { flex-shrink: 0; font-size: 0.76rem; font-weight: 800; border: 2px solid var(--line); border-radius: 4px; padding: 2px 8px; background: var(--paper); white-space: nowrap; }
.sum-badge.done { background: #e7f6ec; border-color: #1a7f37; color: #1a7f37; }
.sum-nums { font-size: 0.88rem; color: var(--gray); font-weight: 700; margin-bottom: 8px; }
.sum-nums b { color: var(--ink); font-variant-numeric: tabular-nums; }
.sum-rate { margin-top: 8px; font-size: 0.82rem; font-weight: 800; color: var(--gray); }
.sum-rate.done { color: #1a7f37; }
.sum-rate.zero { color: var(--danger); }

.me-card { padding-top: 26px; }
.me-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.me-stat { background: var(--paper); border: 2px solid var(--line); border-radius: var(--radius); padding: 14px 8px; }
.me-stat b { display: block; font-size: 1.5rem; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.me-stat b.wage { color: var(--accent); }
.me-stat span { font-size: 0.82rem; color: var(--muted); font-weight: 600; }

.me-log-head { display: flex; align-items: center; justify-content: space-between; margin: 20px 0 10px; }
.me-log-head h3 { margin: 0; }
.log-list { display: flex; flex-direction: column; gap: 8px; }
.log-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--card); border: 2px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-hard-sm); padding: 10px 14px;
}
.log-main { min-width: 0; }
.log-title { font-weight: 800; font-size: 0.95rem; color: var(--ink); }
.log-step { font-size: 0.82rem; color: var(--muted); font-weight: 600; margin-top: 2px; }
.log-wage { font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; flex-shrink: 0; }
.me-undo {
  margin-left: 8px;
  padding: 2px 10px;
  min-height: 0;
  height: auto;
  font-size: 0.72rem;
  font-weight: 700;
  border-width: 1.5px;
  vertical-align: middle;
}
.log-step .btn.me-undo:hover { background: var(--danger); color: #fff; border-color: var(--danger); }

/* ---------------- 工单打印 / 颜色尺码下拉 ---------------- */
.orders-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 22px 0 12px; }
.orders-head h3 { margin: 0; }
.order-qr-actions { display: flex; gap: 10px; margin-bottom: 14px; }
.order-row select.field { -webkit-appearance: none; appearance: none; background: #fff; }

/* ---------------- 员工个人页按天分组 ---------------- */
.me-today {
  margin-top: 12px;
  background: var(--ink);
  color: #fff;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard-sm);
  padding: 10px 12px;
  font-size: 1rem;
  font-weight: 700;
}
.me-today b { font-variant-numeric: tabular-nums; }
.me-today b.wage { color: var(--accent); }
.day-group { margin-bottom: 16px; }
.day-head {
  display: flex; align-items: center; justify-content: space-between;
  border-left: 6px solid var(--accent);
  background: var(--paper);
  border-top: 2px solid var(--line);
  border-right: 2px solid var(--line);
  border-bottom: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 12px;
  margin-bottom: 8px;
}
.day-date { font-weight: 800; font-size: 0.95rem; color: var(--ink); }
.day-sum { font-size: 0.88rem; font-weight: 700; color: #3a372f; font-variant-numeric: tabular-nums; }
.day-sum b { color: var(--accent); font-weight: 800; }

/* ---------------- 工人撤销录入 ---------------- */
.ws-mine {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
  margin: 8px 0 2px;
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 6px 10px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #3a372f;
}
.ws-mine b { color: var(--accent); font-variant-numeric: tabular-nums; }
.ws-undo {
  border: 2px solid var(--danger);
  background: #fff;
  color: var(--danger);
  border-radius: var(--radius);
  font-weight: 800;
  font-size: 0.82rem;
  padding: 6px 10px;
  cursor: pointer;
  min-height: 34px;
}
.ws-undo:active { transform: translate(1px, 1px); }

/* ---------------- 工单床号 / 编号 ---------------- */
.oqr-no {
  background: var(--ink); color: #fff;
  font-weight: 800; font-size: 0.9rem;
  text-align: center; padding: 6px 8px;
  border: 2px solid var(--line); border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0;
  font-variant-numeric: tabular-nums;
}
.order-card-title .o-no {
  display: inline-block; background: var(--accent); color: #fff;
  font-weight: 800; font-size: 0.78rem; padding: 2px 8px;
  border-radius: var(--radius); margin-right: 8px;
  font-variant-numeric: tabular-nums; vertical-align: middle;
}
.work-tag .work-no { font-weight: 800; color: var(--accent); margin-left: 6px; }

/* ---------------- 工单认领 ---------------- */
.claim-card {
  margin-top: 12px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard-sm);
  padding: 10px 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-weight: 800; font-size: 0.95rem;
}
.claim-card.free { background: #fff; color: var(--ink); }
.claim-card.mine { background: #fff; color: var(--ink); border-color: var(--accent); }
.claim-card.taken { background: var(--paper); color: #3a372f; }
.claim-btn { white-space: nowrap; min-height: 40px; }
.order-claim-row {
  display: flex; align-items: center; gap: 10px;
  margin-top: 10px; padding-top: 10px;
  border-top: 2px dashed var(--line);
  font-size: 0.88rem; font-weight: 700; color: #3a372f;
}
.order-claim-row .o-assign {
  flex: 1; height: 40px; font-weight: 700; -webkit-appearance: none; appearance: none; background: #fff;
}

/* ---------------- 颜色/尺码管理 ---------------- */
.btn-outline { background:#fff; color:var(--ink); border:2px solid var(--ink); }
.opt-mg-cols { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.opt-mg-head { font-weight:800; margin-bottom:8px; }
.opt-mg-tags { display:flex; flex-wrap:wrap; gap:6px; min-height:46px; border:2px dashed var(--line); border-radius:var(--radius); padding:8px; align-content:flex-start; }
.opt-tag { display:inline-flex; align-items:center; gap:6px; background:var(--paper); border:2px solid var(--line); border-radius:var(--radius); padding:4px 8px; font-size:.85rem; font-weight:700; }
.opt-tag b { cursor:pointer; color:var(--danger); font-weight:800; line-height:1; }
.opt-mg-add { display:flex; gap:6px; margin-top:8px; }
.opt-mg-add .field { flex:1; height:40px; font-size:.9rem; }

/* ---------------- 工序认领（扫码页，紧凑在工序名行右侧） ---------------- */
/* 认领按钮/标签样式见 .ws-claim-btn / .ws-claim-tag（工序卡区） */

/* ---------------- 员工"我的认领"入口 + 列表 ---------------- */
.claim-entry {
  display:flex; align-items:center; justify-content:space-between;
  margin-top:12px; padding:14px 16px;
  background:var(--ink); color:#fff; text-decoration:none;
  border:2px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow-hard-sm);
  font-weight:800; font-size:1rem;
}
.claim-badge {
  display:none; align-items:center; justify-content:center;
  min-width:24px; height:24px; padding:0 7px;
  background:var(--danger); color:#fff; border-radius:999px;
  font-size:.82rem; font-weight:800; font-variant-numeric:tabular-nums;
}
.claim-item {
  background:var(--card); border:2px solid var(--line); border-radius:var(--radius);
  box-shadow:var(--shadow-hard-sm); padding:12px 14px; margin-bottom:12px;
}
.claim-item-head { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.claim-step { font-weight:800; color:var(--accent); font-size:1rem; }
.claim-no { font-size:.8rem; font-weight:700; color:var(--muted); font-variant-numeric:tabular-nums; }
.claim-prod { font-weight:800; color:var(--ink); margin:4px 0 2px; }
.claim-spec { font-size:.85rem; color:var(--muted); font-weight:600; margin-bottom:8px; }
.claim-go { margin-top:10px; width:100%; display:block; text-align:center; }
.ostep em.ostep-owner { font-style:normal; color:var(--accent); font-weight:800; }

/* ---------------- 一键完成本工序剩余 ---------------- */
.ws-done:disabled { background: var(--muted); border-color: var(--muted); opacity: .55; cursor: not-allowed; box-shadow: none; }
.ws-done { flex: 1; min-width: 0; }

/* ---------------- 工序备注 / 工序级撤销 ---------------- */
.ws-note {
  margin: 8px 0 2px;
  padding: 8px 10px;
  background: #fff4e5;
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  color: #7a3a00;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.45;
}
.ws-note::before { content: ""; }

/* 编辑产品页：勾选工序下的注意事项输入框 */
.pec-note-row { grid-column: 1 / -1; margin: 2px 0 4px; }
.pec-note-row .field { width: 100%; height: 42px; font-size: 0.85rem; background: #fffaf3; border-color: var(--accent); }

/* 完工后也显示撤销（按钮更醒目） */
.ws-mine .ws-undo { white-space: nowrap; }

/* ============================================================
   全局下拉刷新（所有页面顶部下拉松手即刷新当前页）
   ============================================================ */
.ptr-indicator {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 64px;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.5px;
  border-bottom: 3px solid var(--accent);
  transform: translate3d(0, -80px, 0);
  pointer-events: none;
  will-change: transform;
}
.ptr-indicator .ptr-icon {
  width: 20px; height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.35);
  border-top-color: var(--accent);
  border-radius: 50%;
  display: inline-block;
  transform: rotate(0deg);
}
.ptr-indicator .ptr-icon.ptr-spinning {
  animation: ptr-spin 0.7s linear infinite;
  border-top-color: var(--accent);
  border-right-color: var(--accent);
}
@keyframes ptr-spin {
  to { transform: rotate(360deg); }
}

/* ============================================================
   网页内扫一扫（摄像头取景全屏 + 扫描框）
   ============================================================ */
.scan-open { margin-top: 22px; font-size: 18px; min-height: 52px; padding: 0 26px; }
.me-scan { width: 100%; margin: 12px 0 14px; font-size: 18px; min-height: 52px; }
.scan-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: #000;
  overflow: hidden;
}
.scan-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.scan-frame {
  position: absolute; left: 50%; top: 44%;
  width: min(70vw, 280px); aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.scan-frame::after {
  content: "";
  position: absolute; left: 6%; right: 6%; top: 50%;
  height: 2px; background: var(--accent);
  box-shadow: 0 0 10px rgba(240, 90, 26, 0.9);
  animation: scan-line 1.8s ease-in-out infinite alternate;
}
@keyframes scan-line {
  from { transform: translateY(-90px); }
  to   { transform: translateY(90px); }
}
.sf-corner { position: absolute; width: 30px; height: 30px; border: 0 solid var(--accent); }
.sf-corner.tl { top: 0; left: 0; border-top-width: 5px; border-left-width: 5px; }
.sf-corner.tr { top: 0; right: 0; border-top-width: 5px; border-right-width: 5px; }
.sf-corner.bl { bottom: 0; left: 0; border-bottom-width: 5px; border-left-width: 5px; }
.sf-corner.br { bottom: 0; right: 0; border-bottom-width: 5px; border-right-width: 5px; }
.scan-tip {
  position: absolute; left: 0; right: 0; bottom: 18%;
  text-align: center; color: #fff; font-weight: 700; font-size: 16px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.7);
}
.scan-close {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  width: 46px; height: 46px; border-radius: 50%;
  border: 2px solid #fff; background: rgba(0,0,0,0.45);
  color: #fff; font-size: 30px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.scan-close:active { background: var(--accent); border-color: var(--accent); }
.scan-toolbar {
  position: absolute; left: 0; right: 0; bottom: 6%;
  display: flex; justify-content: center; padding: 0 20px;
}
.scan-album {
  border: 2px solid #fff; background: rgba(0,0,0,0.55); color: #fff;
  font-weight: 800; font-size: 16px; padding: 12px 22px; border-radius: 6px;
  cursor: pointer; min-height: 46px;
}
.scan-album:active { background: var(--accent); border-color: var(--accent); }

/* ===== 款号工序设置（pc-*）===== */
.pc-pick {
  display: flex; align-items: center; gap: 10px;
  padding: 14px; margin-bottom: 16px;
}
.pc-pick-label { font-weight: 800; font-size: 16px; white-space: nowrap; color: var(--ink); }
.pc-pick-select {
  flex: 1; height: 48px; padding: 0 12px;
  border: 2px solid var(--line); background: var(--card);
  font-size: 16px; font-weight: 700; color: var(--ink);
  border-radius: 4px; min-width: 0;
}
.pc-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 860px) {
  .pc-grid { grid-template-columns: 1fr 1fr; align-items: start; }
}
.pc-panel { padding: 14px; }
.pc-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px; padding-bottom: 10px;
  border-bottom: 2px solid var(--ink);
}
.pc-panel-head h3 { font-size: 18px; font-weight: 800; color: var(--ink); margin: 0; }
.pc-count {
  background: var(--ink); color: var(--paper);
  font-weight: 800; font-size: 13px; padding: 3px 10px; border-radius: 4px;
  font-variant-numeric: tabular-nums;
}
.pc-search {
  width: 100%; height: 46px; padding: 0 12px; margin-bottom: 10px;
  border: 2px solid var(--line); border-radius: 4px; background: var(--paper);
  font-size: 16px; box-sizing: border-box;
}
.pc-newproc { display: flex; gap: 8px; margin-bottom: 12px; }
.pc-newproc input {
  flex: 1; height: 42px; padding: 0 10px; min-width: 0;
  border: 2px solid var(--line); border-radius: 4px; background: var(--paper);
  font-size: 15px; box-sizing: border-box;
}
.pc-newproc .btn { white-space: nowrap; }
.pc-list { display: flex; flex-direction: column; gap: 8px; }
.pc-lib { max-height: 480px; overflow-y: auto; padding-right: 2px; }
.pc-empty {
  padding: 22px 12px; text-align: center; color: var(--muted, #6b665c);
  font-size: 14px; border: 2px dashed var(--ink, #1b1d21); border-radius: 4px;
}
.pc-row {
  display: grid;
  grid-template-columns: 26px minmax(0,1fr) auto;
  grid-template-rows: auto auto;
  column-gap: 8px; row-gap: 4px;
  padding: 8px 10px;
  border: 2px solid var(--ink); background: var(--card); border-radius: 4px;
  align-items: center;
}
.pc-no {
  grid-row: 1 / 3;
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff; font-weight: 800; font-size: 13px;
  border-radius: 4px; font-variant-numeric: tabular-nums;
}
.pc-name {
  grid-column: 2 / 4; font-weight: 800; font-size: 15px; color: var(--ink);
  line-height: 1.3; word-break: break-all;
}
.pc-price-wrap {
  grid-column: 2; display: flex; align-items: center; gap: 5px; min-width: 0;
}
.pc-price {
  width: 84px; height: 32px; padding: 0 6px;
  border: 2px solid var(--ink); border-radius: 4px; background: var(--paper);
  font-size: 14px; font-weight: 800; text-align: right;
  font-variant-numeric: tabular-nums; box-sizing: border-box;
}
.pc-price-unit { font-size: 13px; font-weight: 700; color: var(--muted, #6b665c); }
.pc-ops { grid-column: 3; grid-row: 2; display: flex; flex-direction: row; gap: 5px; }
.pc-op {
  width: 30px; height: 30px; padding: 0;
  border: 2px solid var(--ink); background: var(--paper);
  color: var(--ink); font-size: 11px; line-height: 1;
  border-radius: 4px; cursor: pointer; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.pc-op:active { background: var(--ink); color: #fff; }
.pc-op.pc-remove { border-color: var(--danger, #d92d20); color: var(--danger, #d92d20); font-size: 12px; }
.pc-op.pc-remove:active { background: var(--danger, #d92d20); color: #fff; }
/* 每道工序「按序锁定 / 不受限」小药丸开关（默认锁定） */
.pc-seqlock {
  display: inline-flex; align-items: center; gap: 3px;
  margin-left: 7px; padding: 2px 8px;
  border: 2px solid var(--ink); border-radius: 999px;
  background: var(--paper); color: var(--ink);
  font-size: 11px; font-weight: 800; line-height: 1.5;
  cursor: pointer; vertical-align: middle; white-space: nowrap;
  transition: background 120ms linear, color 120ms linear, border-color 120ms linear;
}
.pc-seqlock.is-on { background: var(--ink); color: #fff; border-color: var(--ink); }
.pc-seqlock:not(.is-on) { border-color: var(--accent); color: var(--accent); background: #fff4ef; }
.pc-save { margin-top: 14px; }
.pc-lib-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 11px 12px;
  border: 2px solid var(--ink); background: var(--card); border-radius: 4px;
  cursor: pointer; user-select: none;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform 150ms linear, box-shadow 150ms linear;
}
.pc-lib-row:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.pc-lib-row.is-added {
  background: #fdece7; border-color: var(--danger, #d92d20);
  cursor: default; box-shadow: none; opacity: 0.85;
}
.pc-lib-name { font-weight: 800; font-size: 15px; color: var(--ink); word-break: break-all; }
.pc-lib-tag {
  flex-shrink: 0; font-size: 13px; font-weight: 800;
  padding: 3px 9px; border-radius: 4px; border: 2px solid var(--ink);
}
.is-added .pc-lib-tag { border-color: var(--danger, #d92d20); color: var(--danger, #d92d20); background: #fff; }
.pc-add-tag { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ===== 产品编辑页：本款已配工序（紧凑单行：编号+工序+工价，备注紧随）===== */
.pec-rows { display: flex; flex-direction: column; }
.pec-line {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-top: 2px solid var(--line);
  background: #fff;
}
.pec-rows .pec-line:first-child { border-top: none; }
.pec-no {
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  background: var(--ink); color: #fff; font-weight: 800; font-size: 0.85rem;
  border-radius: 3px; font-variant-numeric: tabular-nums;
}
.pec-line .pec-name { font-weight: 800; font-size: 0.98rem; color: var(--ink); word-break: break-all; }
.pec-price-box { display: flex; align-items: center; gap: 4px; }
.pec-line .pec-price {
  width: 86px; min-height: 40px; height: 40px;
  border: 2px solid var(--line); border-radius: var(--radius);
  padding: 0 8px; font-size: 0.95rem; font-weight: 800; text-align: right;
  font-variant-numeric: tabular-nums; box-sizing: border-box; background: var(--paper);
}
.pec-unit { font-size: 0.82rem; font-weight: 700; color: var(--muted); }
.pec-note2 {
  grid-column: 2 / -1;
  width: 100%; height: 38px;
  border: 2px solid var(--accent); border-radius: var(--radius);
  padding: 0 10px; font-size: 0.86rem; font-weight: 600;
  background: #fffaf3; box-sizing: border-box; color: var(--ink);
}
.pec-note2::placeholder { color: #b08a78; font-weight: 600; }

/* ===== 月结锁定：工资页提示条 + 员工端锁定记录 ===== */
.wl-banner {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 12px; padding: 10px 12px;
  background: #fdece7; border: 2px solid var(--danger, #d92d20);
  border-radius: 4px; color: var(--ink);
  font-size: 0.9rem; font-weight: 700;
}
.wl-banner .wl-icon { font-size: 1.15rem; }
.wl-banner .wl-txt { flex: 1; line-height: 1.35; }
.wl-banner .wl-txt b { color: var(--danger, #d92d20); }
.wl-banner .btn { flex-shrink: 0; }
.me-locked-tag {
  display: inline-block; margin-left: 6px;
  font-size: 0.78rem; font-weight: 800; color: var(--muted, #6b665c);
  border: 1.5px solid var(--muted, #6b665c); border-radius: 4px;
  padding: 1px 7px; vertical-align: middle;
}
.log-row.is-locked { opacity: 0.6; }

/* 员工中心 计件明细：已锁定分组默认折叠 */
.me-lock-fold { margin: 8px 2px 2px; border: 1.5px dashed var(--muted, #6b665c); border-radius: 4px; background: #fafaf7; }
.me-lock-fold-head {
  width: 100%; display: flex; align-items: center; gap: 6px; padding: 6px 8px;
  background: transparent; border: 0; cursor: pointer; text-align: left;
  font-size: 0.84rem; color: var(--muted, #6b665c);
}
.me-lock-fold-head:hover { background: #f1f0ea; }
.me-lock-fold-tit { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1 1 auto; }
.me-lock-fold-sum { font-size: 0.78rem; font-weight: 700; white-space: nowrap; flex: 0 0 auto; }
.me-lock-fold-sum b { color: var(--muted, #6b665c); }
.me-lock-fold-caret { flex: 0 0 auto; font-size: 0.7rem; color: var(--muted, #6b665c); transition: transform .15s ease; }
.me-lock-fold.is-open .me-lock-fold-caret { transform: rotate(90deg); }
.me-lock-fold-body { border-top: 1px dashed var(--muted, #6b665c); }
.me-lock-list { padding: 2px 0; }
.me-lock-list .log-row { padding-left: 10px; padding-right: 10px; }
.me-log-empty { padding: 10px 8px; font-size: .82rem; color: var(--muted, #6b665c); background: #fafaf7; border-radius: 4px; margin: 6px 2px 0; }

/* 员工中心：撤销操作引导提示 */
.me-undo-hint {
  margin: 0 0 12px; padding: 9px 12px;
  background: var(--paper); border: 2px dashed var(--ink); border-radius: 4px;
  font-size: 0.82rem; line-height: 1.5; color: var(--muted, #6b665c);
}
.me-undo-hint b { color: var(--ink); }

/* ===== 我的认领：已完成区 ===== */
.claim-done-section { margin-top: 18px; border-top: 2px dashed var(--line); padding-top: 14px; }
.claim-done-toggle {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 14px;
  background: var(--paper); border: 2px solid var(--ink); border-radius: 4px;
  font-size: 1rem; font-weight: 800; color: var(--ink); cursor: pointer;
}
.claim-done-toggle:active { background: #e7e0d0; }
.claim-done-count { color: var(--accent); font-variant-numeric: tabular-nums; }
.claim-done-arrow { font-size: 0.85rem; }
.claim-done-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.claim-done-item { background: #f3f4f0; opacity: 0.96; }
.claim-done-go { background: var(--paper); color: var(--ink); border: 2px solid var(--ink); }

/* 已完成认领：完成时间（右下角） */
.claim-time {
  text-align: right; font-size: 0.82rem; font-weight: 700; color: var(--muted, #6b665c);
  margin: 4px 0 8px; font-variant-numeric: tabular-nums;
}
/* 月结锁定：日期范围选择 */
.wl-range { display: flex; flex-direction: column; gap: 8px; margin: 6px 0 4px; }
.wl-range label { font-size: 0.92rem; font-weight: 800; color: var(--ink); }
.wl-range input[type="date"] {
  width: 100%; height: 46px; padding: 0 12px; box-sizing: border-box;
  border: 2px solid var(--line); border-radius: 4px; background: var(--paper);
  font-size: 1rem; font-weight: 700; color: var(--ink);
}
.wl-range-hint { font-size: 0.8rem; color: var(--muted, #6b665c); margin: 2px 0 0; }

/* ===== 首页待领取工序角标 + 待领取列表 ===== */
.pending-entry {
  display: flex; align-items: center; gap: 8px;
  background: var(--card); color: var(--ink);
  border: 2px solid var(--ink); border-radius: 4px;
  font-weight: 800; font-size: 1rem; min-height: 52px;
  box-shadow: 3px 3px 0 var(--ink);
}
.pending-entry:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.pending-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px; padding: 0 7px;
  background: var(--danger, #d92d20); color: #fff;
  border-radius: 999px; font-size: 0.82rem; font-weight: 800;
  font-variant-numeric: tabular-nums; border: 2px solid #fff;
}
.claim-ops { display: flex; gap: 8px; margin-top: 10px; }
.claim-ops .btn { flex: 1; }

/* 待领取：工种筛选条 + 工种标签 */
.pn-cat-bar {
  display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px;
  -webkit-overflow-scrolling: touch; margin-bottom: 4px;
}
.pn-chip {
  flex-shrink: 0; border: 2px solid var(--ink); background: var(--card);
  color: var(--ink); font-weight: 800; font-size: 0.92rem;
  padding: 0 14px; min-height: 40px; border-radius: 4px; cursor: pointer;
  box-shadow: 2px 2px 0 var(--ink); white-space: nowrap;
}
.pn-chip span { font-variant-numeric: tabular-nums; margin-left: 3px; }
.pn-chip.active { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: none; }
.pn-cat-tag {
  font-size: 0.72rem; font-weight: 800; color: var(--accent);
  border: 1.5px solid var(--accent); border-radius: 4px; padding: 1px 7px;
  margin-right: 6px; white-space: nowrap;
}

/* 待领取：款号搜索框（输入款号/床号缩小工序范围） */
.pn-kw-bar { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; }
.pn-kw {
  flex: 1; min-height: 42px; border: 2px solid var(--ink); border-radius: 4px;
  background: var(--card); color: var(--ink); font-size: 0.95rem; font-weight: 700;
  padding: 0 12px; box-shadow: 2px 2px 0 var(--ink); outline: none;
}
.pn-kw::placeholder { color: var(--gray); font-weight: 600; }
.pn-kw:focus { border-color: var(--accent); box-shadow: 2px 2px 0 var(--accent); }
.pn-kw-clear {
  flex-shrink: 0; border: 2px solid var(--danger); background: var(--card);
  color: var(--danger); font-weight: 800; font-size: 0.85rem;
  padding: 0 12px; min-height: 42px; border-radius: 4px; cursor: pointer;
  box-shadow: 2px 2px 0 var(--danger);
}
.pn-kw-clear:active { transform: translate(2px, 2px); box-shadow: none; }
.pn-kw-go {
  flex-shrink: 0; min-height: 42px; padding: 0 18px; border-radius: 4px; cursor: pointer;
  border: 2px solid var(--ink); background: var(--accent); color: #fff;
  font-weight: 800; font-size: 0.9rem; box-shadow: 2px 2px 0 var(--ink);
}
.pn-kw-go:active { transform: translate(2px, 2px); box-shadow: none; }

/* 首页员工入口：员工中心（炭黑铭牌按钮） */
.home-worker-actions { display: flex; flex-direction: column; }
.home-worker-btn { font-size: 18px; font-weight: 800; letter-spacing: .5px; }
.btn-ink { background: var(--ink); color: #fff; border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--accent); }
.btn-ink:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--accent); }

/* 工单卡片管理按钮：改数量（描边）/ 清录入（警示橙底） */
.btn-warning { background: #f05a1a; color: #fff; border: 2px solid #1b1d21; box-shadow: 2px 2px 0 #1b1d21; }
.btn-warning:active { transform: translate(2px,2px); box-shadow: 0 0 0 #1b1d21; }
.order-card-btns .btn { width: 100%; margin: 0; }

/* 弹窗右上角关闭 X（管理工单选择弹窗用） */
.modal { position: relative; }
.modal-x {
  position: absolute; top: 8px; right: 10px;
  width: 34px; height: 34px; line-height: 30px;
  background: none; border: none; font-size: 26px; color: var(--muted);
  cursor: pointer; padding: 0;
}
.modal-x:active { color: var(--ink); }

/* 清空录入（按工序）弹窗 */
.rs-steps { display: flex; flex-direction: column; gap: 8px; margin-bottom: 4px; }
.rs-step {
  display: flex; align-items: center; gap: 10px;
  border: 2px solid var(--line); border-radius: 4px;
  background: #fff; padding: 10px 12px;
}
.rs-step.is-zero { background: #f3efe6; }
.rs-step-info { flex: 1; min-width: 0; }
.rs-step-name { font-weight: 800; font-size: 15px; color: var(--ink); }
.rs-step-name .sp-owner { font-style: normal; color: var(--accent); font-weight: 700; margin-left: 4px; font-size: 13px; }
.rs-step-done { font-size: 13px; color: var(--muted); margin-top: 2px; font-variant-numeric: tabular-nums; }
.rs-step-done b { color: var(--ink); font-size: 15px; }
.rs-step.is-zero .rs-step-done { color: #9a948a; }
.rs-clear-one { flex: 0 0 auto; white-space: nowrap; }
.btn:disabled, .btn[disabled] { opacity: .45; box-shadow: none; cursor: not-allowed; transform: none; }

/* ===== 仓库工作台 ===== */
.wh-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.wh-user {
  flex: 0 0 auto; margin-top: 6px;
  border: 2px solid var(--line); background: var(--ink); color: #fff;
  font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 4px;
}
.wh-tabs { display: flex; gap: 8px; margin: 6px 0 14px; }
.wh-tab {
  flex: 1; min-height: 46px; font-size: 15px; font-weight: 800;
  background: #fff; color: var(--ink); border: 2px solid var(--line);
  border-radius: 4px; box-shadow: 2px 2px 0 var(--line); cursor: pointer;
}
.wh-tab b { color: var(--accent); margin-left: 4px; font-variant-numeric: tabular-nums; }
.wh-tab.active { background: var(--ink); color: #fff; box-shadow: 2px 2px 0 var(--accent); }
.wh-tab.active b { color: #ffd9c6; }
.wh-item { border-left: 6px solid var(--accent); }
.wh-item-done { border-left-color: #2e9e5b; background: #fbfaf6; }
.wh-done-tag {
  display: inline-block; margin-top: 8px; font-weight: 800; color: #2e9e5b;
  border: 2px solid #2e9e5b; border-radius: 4px; padding: 4px 12px; font-size: 14px; background: #fff;
}
.wh-meta { font-size: 13px; color: var(--muted); margin-top: 8px; font-variant-numeric: tabular-nums; }
.wh-item .claim-spec b { color: var(--ink); }

/* ===== 员工类型选择（管理员登记员工）===== */
.role-pick {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  margin-top: 10px; border: 2px solid var(--line); border-radius: 4px;
  background: #fbfaf6; padding: 8px 10px;
}
.role-pick-label { font-size: 14px; font-weight: 800; color: var(--ink); margin-right: 2px; }
.role-opt { display: inline-flex; align-items: center; gap: 4px; font-size: 15px; font-weight: 700; cursor: pointer; }
.role-opt input { width: 18px; height: 18px; accent-color: var(--accent); }
.role-tag {
  display: inline-block; margin-left: 8px; font-size: 12px; font-weight: 800;
  border: 1.5px solid var(--line); border-radius: 3px; padding: 1px 7px; vertical-align: middle;
  font-variant-numeric: tabular-nums;
}
.role-workshop { background: #eef2ff; color: #3a4b9c; border-color: #3a4b9c; }
.role-cutting  { background: #fdf3e3; color: #b26a00; border-color: #b26a00; }
.role-warehouse{ background: #eaf7ee; color: #1f7a45; border-color: #1f7a45; }

/* ==================== 仓库 / 返修 扩展样式 ==================== */
/* 仓库顶部汇总卡 */
.wh-summary { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; margin:12px 0; }
.wh-sum-item { background:var(--card); border:2px solid var(--line); box-shadow:3px 3px 0 var(--line);
  padding:10px 6px; text-align:center; }
.wh-sum-n { display:block; font-size:22px; font-weight:800; font-variant-numeric:tabular-nums; line-height:1.1; }
.wh-sum-l { display:block; font-size:12px; color:var(--muted); margin-top:4px; }

/* 4 个标签页时均分 */
.wh-tabs-4 .wh-tab { flex:1 1 0; text-align:center; padding:10px 4px; font-size:14px; }
.wh-tabs-4 .wh-tab b { color:var(--accent); font-weight:800; }

/* 弹窗表单字段 */
.wh-fld-label { display:block; font-size:13px; font-weight:700; margin:12px 0 4px; }
.wh-input { width:100%; box-sizing:border-box; min-height:46px; border:2px solid var(--line); background:#fff;
  padding:10px 12px; font-size:16px; font-family:inherit; border-radius:4px; }
textarea.wh-input { min-height:64px; resize:vertical; }

/* 待入库进度 */
.wh-prog { display:flex; justify-content:space-between; font-size:14px; margin:8px 0 2px; color:var(--muted); }
.wh-prog b { color:var(--ink); }
.wh-canin { font-size:15px; font-weight:800; color:var(--accent); margin:4px 0 8px; }
.wh-prod { font-size:15px; font-weight:700; margin:4px 0; }

/* ---- 待入库按款分组紧凑表格（宽屏）---- */
.wg-card { border:2px solid var(--line); box-shadow:3px 3px 0 var(--line); background:var(--card);
  border-radius:4px; overflow:hidden; margin-bottom:14px; }
.wg-head { display:flex; align-items:center; gap:10px; background:var(--ink); color:#fff; padding:9px 12px; }
.wg-code { font-weight:900; font-size:17px; font-variant-numeric:tabular-nums; white-space:nowrap; }
.wg-name { font-size:13px; opacity:.85; flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.wg-meta { font-size:12px; font-weight:800; background:rgba(255,255,255,.16); color:#ffd9a6;
  padding:3px 9px; border-radius:4px; white-space:nowrap; }
.wg-meta b { color:#fff; font-variant-numeric:tabular-nums; }
.wg-cols, .wg-row { display:grid; gap:10px; align-items:center; padding:8px 12px; }
.wg-cols { grid-template-columns: 1.15fr 1fr 1.1fr 1.2fr .5fr auto;
  background:#f7f1e4; font-size:12px; font-weight:800; color:var(--muted); border-top:2px solid var(--line); }
.wg-row { grid-template-columns: 1.15fr 1fr 1.1fr 1.2fr .5fr auto;
  border-top:2px solid #e8e1d2; font-size:14px; font-weight:700; }
.wg-row:first-of-type { border-top:2px solid #e8e1d2; }
.wg-no { font-variant-numeric:tabular-nums; white-space:nowrap; }
.wg-col { white-space:nowrap; }
.wg-col b { color:var(--ink); }
.wg-sku { font-size:12px; font-weight:600; color:var(--muted); font-variant-numeric:tabular-nums;
  white-space:normal; word-break:break-all; line-height:1.25; }
.wg-prog { font-weight:600; color:var(--muted); font-variant-numeric:tabular-nums; }
.wg-prog b { color:var(--ink); }
.wg-canim { font-weight:900; color:var(--accent); font-variant-numeric:tabular-nums; text-align:right; }
.wg-canim b { color:var(--accent); }
/* 窄屏（手机）：去掉"计划/产出"整列，保留 单号/颜色尺码/商品编码/待入/按钮 5 列 */
@media (max-width:560px) {
  .wg-cols { grid-template-columns: 1.1fr 1fr 1fr .5fr auto; }
  .wg-row { grid-template-columns: 1.1fr 1fr 1fr .5fr auto; }
  .wg-progcol, .wg-prog { display:none; }
  .wg-no { font-size:12px; }
  .wg-sku { font-size:11px; }
}

/* 流水类型标签 */
.wh-kind { font-size:12px; font-weight:800; padding:2px 8px; border:2px solid var(--line); border-radius:4px; white-space:nowrap; }
.wh-kind-in { background:var(--accent); color:#fff; }
.wh-kind-repair_out, .wh-kind-out { background:var(--danger); color:#fff; }
.wh-kind-return_back { background:var(--ink); color:#fff; }
.wh-kind-return { background:var(--ink); color:#fff; }
.wh-ledger-out { opacity:.92; }
.wh-reason { background:#fdf1ec; border-left:4px solid var(--danger); padding:8px 10px; font-size:14px; margin:8px 0; }
.wh-returning { border-color:var(--danger); }

/* 库存盘点 */
.inv-loc { border:2px solid var(--line); box-shadow:3px 3px 0 var(--line); background:var(--card); margin-bottom:12px; border-radius:4px; overflow:hidden; }
.inv-loc-head { display:flex; justify-content:space-between; align-items:center; background:var(--ink); color:#fff;
  padding:10px 12px; font-size:15px; }
.inv-loc-head span { font-weight:800; font-variant-numeric:tabular-nums; }
.inv-row { display:flex; justify-content:space-between; align-items:center; gap:8px; padding:10px 12px; border-top:2px solid #e5dfd2; }
.inv-row:first-of-type { border-top:none; }
.inv-prod { font-weight:800; font-size:15px; }
.inv-spec { color:var(--muted); font-size:13px; flex:1; text-align:center; }
.inv-qty { font-weight:800; font-size:17px; color:var(--accent); font-variant-numeric:tabular-nums; }

/* 返修卡片 */
.rp-card { border:2px solid var(--danger); box-shadow:3px 3px 0 var(--danger); background:#fff; border-radius:4px;
  padding:12px; margin-bottom:12px; }
.rp-card-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:6px; }
.rp-prod { font-size:15px; font-weight:700; margin:4px 0; }
.rp-meta { font-size:13px; color:var(--muted); margin-top:6px; }
.rp-status { font-size:12px; font-weight:800; padding:3px 10px; border:2px solid var(--line); border-radius:4px; white-space:nowrap; }
.rp-st-open { background:var(--danger); color:#fff; border-color:var(--danger); }
.rp-st-doing { background:#fff3d6; color:#8a5a00; border-color:#d9a400; }
.rp-st-ret { background:var(--ink); color:#fff; border-color:var(--ink); }
.rp-st-done { background:#e8f3e8; color:#1d6b2f; border-color:#1d6b2f; }
.rp-problem { background:#fdf1ec; border:2px dashed var(--danger); border-radius:4px; padding:8px 10px;
  font-size:14px; margin:8px 0; display:flex; gap:8px; align-items:flex-start; }
.rp-problem-tag { flex:none; background:var(--danger); color:#fff; font-size:12px; font-weight:800; padding:2px 8px; border-radius:3px; }
.repair-summary { color:var(--danger); font-weight:700; }

/* 返修待领卡（车间待领页置顶） */
.repair-claim-card { border-color:var(--danger); box-shadow:3px 3px 0 var(--danger); }
.repair-badge { background:var(--danger); color:#fff; font-size:12px; font-weight:800; padding:2px 8px; border-radius:4px; }

/* 管理员货位 */
.aw-loc-form .input { width:100%; box-sizing:border-box; margin-bottom:0; }
.aw-loc-line { display:flex; justify-content:space-between; align-items:center; gap:8px;
  border:2px solid var(--line); background:#fff; box-shadow:2px 2px 0 var(--line); border-radius:4px;
  padding:10px 12px; margin-bottom:8px; font-size:15px; }
.aw-loc-line.is-off { opacity:.5; }
.btn-danger { background:var(--danger); color:#fff; border-color:var(--line); }

/* 员工中心「我的返修」入口 */
.claim-entry-repair { border-color:var(--danger); }
.claim-badge-repair { background:var(--danger); }

/* 我的返修页：待认领区块 */
.claim-sec-t { font-weight:800; color:var(--danger); font-size:.92rem; margin-bottom:8px; }
.repair-item.repair-open { border-color:var(--danger); box-shadow:3px 3px 0 var(--danger); }
.repair-tag { font-size:12px; font-weight:800; padding:2px 8px; border-radius:4px; background:var(--accent); color:#fff; flex:none; }
.repair-tag-open { background:var(--danger); }

@media (max-width:420px) {
  .wh-summary { grid-template-columns:repeat(2,1fr); }
}
.wh-user-box { display:flex; flex-direction:column; align-items:flex-end; gap:6px; flex:none; }
.wh-user-box .wh-user { margin:0; }
/* 库存盘点行内返修出库按钮 */
.inv-row { flex-wrap:wrap; }
.inv-repair { flex:none; min-height:38px; padding:6px 12px; font-size:13px; }
@media (max-width:420px) {
  .inv-prod { width:100%; }
  .inv-spec { flex:1 1 auto; text-align:left; }
}

/* ============ 裁剪车间 ============ */
.cut-header { display:flex; justify-content:space-between; align-items:flex-start; gap:12px;
  border:2px solid var(--line); background:var(--card); box-shadow:3px 3px 0 var(--line);
  border-radius:4px; padding:14px 16px; margin:14px 0; }
.cut-header .page-title { margin:0 0 4px; font-size:22px; }
.cut-header .wh-user { color:var(--gray); font-size:14px; }
.cut-section { margin-bottom:22px; }
.cut-section-title { font-size:18px; margin:0 0 10px; display:flex; align-items:center; gap:8px; }
.cut-bed-card, .cut-rm-card { border:2px solid var(--line); background:var(--card);
  box-shadow:3px 3px 0 var(--line); border-radius:4px; padding:14px; margin-bottom:12px; }
.cut-bed-card.cut-bed-hit { box-shadow:0 0 0 3px var(--accent), 3px 3px 0 var(--line); }
.cut-bed-head { display:flex; justify-content:space-between; align-items:baseline; gap:8px; margin-bottom:10px; }
.cut-bed-no { font-size:20px; font-weight:800; letter-spacing:.5px; }
.cut-bed-meta { color:var(--gray); font-size:14px; font-weight:700; white-space:nowrap; }
.cut-bed-prod { flex:1; min-width:0; font-size:18px; font-weight:800; color:var(--orange, #d2691e); word-break:break-all; }
.cut-bed-pname { font-size:12px; font-weight:600; color:var(--gray); }
.cut-order-list { border:2px dashed var(--line); border-radius:4px; padding:8px 10px; margin-bottom:12px; background:var(--paper); }
.cut-order-line { font-size:15px; padding:3px 0; border-bottom:1px dashed #c9c2b2; }
.cut-order-line:last-child { border-bottom:0; }
.cut-qty { font-weight:800; color:var(--accent); font-variant-numeric:tabular-nums; }
/* 裁剪师傅按单录入实际裁剪数量 */
.cut-order-edit { display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; padding:7px 0; }
.cut-order-info { min-width:0; flex:1 1 auto; line-height:1.4; }
.cut-actual-wrap { flex:0 0 auto; display:inline-flex; align-items:center; gap:5px; font-size:14px; font-weight:800; color:var(--ink); white-space:nowrap; }
.cut-actual-input { width:78px; height:36px; padding:0 6px; border:2px solid var(--ink); border-radius:4px; background:#fff; font-size:16px; font-weight:800; text-align:center; font-variant-numeric:tabular-nums; box-sizing:border-box; }
.cut-actual-input.is-invalid { border-color:var(--danger,#d92d20); background:#fdeceb; }
/* 车间可用数（扣损耗）提示 */
.cut-shop-hint { flex:1 1 100%; font-size:12.5px; color:#6b5526; background:#fdf3e0; border:1px dashed #e4b96a; border-radius:6px; padding:4px 8px; font-variant-numeric:tabular-nums; }
.cut-shop-hint b { color:var(--accent,#e8610d); font-size:14px; }
/* 全局裁剪损耗率设置卡片 */
.cwl-head { display:block; margin-bottom:10px; }
.cwl-head b { font-size:16px; color:var(--ink); }
.cwl-sub { display:block; margin-top:4px; font-size:12.5px; line-height:1.6; color:#555; }
.cwl-row { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.cwl-row label { font-weight:800; color:var(--ink); font-size:14px; }
.cwl-input { width:84px; height:40px; padding:0 8px; border:2px solid var(--ink); border-radius:6px; font-size:16px; font-weight:800; text-align:center; box-sizing:border-box; }
.cwl-quick { flex:1 1 auto; font-size:12.5px; color:#777; }
.cwl-quick b { color:var(--ink); }
.cwl-quick a { color:var(--accent,#e8610d); font-weight:700; cursor:pointer; text-decoration:underline; margin:0 2px; }
.cwl-state { font-weight:800; font-size:13px; }
.cwl-state:not(:empty) { }
/* 开关 */
.cwl-switch { display:inline-flex; align-items:center; gap:8px; cursor:pointer; }
.cwl-switch input { display:none; }
.cwl-switch i { position:relative; width:46px; height:26px; border-radius:999px; background:#ccc; transition:background .18s; flex-shrink:0; }
.cwl-switch i::after { content:""; position:absolute; top:3px; left:3px; width:20px; height:20px; border-radius:50%; background:#fff; box-shadow:0 1px 3px rgba(0,0,0,.3); transition:left .18s; }
.cwl-switch input:checked + i { background:var(--accent,#e8610d); }
.cwl-switch input:checked + i::after { left:23px; }
.cwl-switch:has(input:disabled) { opacity:.6; }
.cut-bed-ops { display:flex; gap:10px; }
.cut-bed-ops .cut-bed-done { flex:1; }
.cut-rm-card { border-color:var(--danger); box-shadow:3px 3px 0 var(--danger); }
.cut-rm-card.is-mine { border-color:var(--accent); box-shadow:3px 3px 0 var(--accent); }
.cut-rm-head { font-size:16px; margin-bottom:8px; line-height:1.6; }
.cut-rm-tag { background:var(--danger); color:#fff; font-size:12px; font-weight:800; padding:2px 8px; border-radius:4px; margin-right:6px; }
.is-mine .cut-rm-tag { background:var(--accent); }
.cut-rm-photos { display:flex; flex-wrap:wrap; gap:8px; margin:8px 0; }
.cut-rm-photo, .rm-rec-photo { width:88px; height:88px; object-fit:cover; border:2px solid var(--line); border-radius:4px; }
.cut-rm-foot { display:flex; justify-content:space-between; align-items:center; gap:10px; margin-top:8px; flex-wrap:wrap; }
.cut-rm-foot .wh-meta { flex:1; color:var(--gray); font-size:13px; }

/* ============ 补裁（工单页 + 裁剪页拍照） ============ */
.rm-block { border:2px solid var(--line); border-radius:4px; background:var(--paper); padding:12px 14px; margin:16px 0; }
.rm-block-head { display:flex; justify-content:space-between; align-items:center; gap:10px; margin-bottom:10px; }
.rm-block-head h3 { margin:0; font-size:17px; }
.rm-rec { border:2px solid var(--line); background:var(--card); border-radius:4px; padding:10px 12px; margin-bottom:10px; }
.rm-rec.ok { border-color:#2e7d32; }
.rm-rec.warn { border-color:var(--accent); box-shadow:2px 2px 0 var(--accent); }
.rm-rec-head { display:flex; justify-content:space-between; align-items:center; gap:8px; font-size:15px; margin-bottom:6px; }
.rm-rec-tag { font-size:12px; font-weight:800; padding:2px 8px; border-radius:4px; background:var(--danger); color:#fff; }
.rm-rec.ok .rm-rec-tag { background:#2e7d32; }
.rm-rec.warn .rm-rec-tag { background:var(--accent); }
.rm-rec-desc { font-size:15px; line-height:1.6; margin-bottom:6px; }
.rm-rec-donelabel { font-size:13px; color:var(--gray); font-weight:700; margin-top:6px; }
.rm-rec-photos { display:flex; flex-wrap:wrap; gap:8px; margin:6px 0; }
.rm-rec-foot { display:flex; justify-content:space-between; align-items:center; gap:10px; margin-top:8px; flex-wrap:wrap; }
.rm-rec-place { font-size:14px; font-weight:700; color:var(--ink); flex:1; }
.rm-photo-prev { display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
.rm-thumb { position:relative; width:72px; height:72px; }
.rm-thumb img { width:100%; height:100%; object-fit:cover; border:2px solid var(--line); border-radius:4px; }
.rm-thumb-x { position:absolute; top:-8px; right:-8px; background:var(--danger); color:#fff; width:22px; height:22px;
  line-height:22px; text-align:center; border-radius:50%; font-size:13px; font-weight:800; cursor:pointer; border:2px solid var(--line); }

/* 工单页裁剪状态横幅 */
.cut-state { border:2px solid var(--line); border-radius:4px; padding:10px 14px; margin:12px 0; font-weight:800; font-size:16px; }
.cut-state.ok { background:#eaf4ea; border-color:#2e7d32; color:#2e7d32; }
.cut-state.locked { background:#fdecec; border-color:var(--danger); color:var(--danger); }
.cut-state.locked span { display:block; font-weight:600; font-size:14px; margin-top:4px; line-height:1.5; }

/* ============ 管理员员工视角 ============ */
.view-tag { display:inline-block; background:var(--accent); color:#fff; font-size:11px; font-weight:800;
  padding:1px 7px; border-radius:4px; margin-left:6px; vertical-align:middle; letter-spacing:.5px; }
.view-bar { display:flex; align-items:center; gap:10px; flex-wrap:wrap; background:var(--ink); color:#fff;
  border:2px solid var(--line); border-radius:4px; padding:10px 12px; margin:12px 0; font-size:14px; }
.view-bar .btn { flex:none; }
.btn-sm { min-height:38px; padding:6px 14px; font-size:14px; }

/* 裁剪未分床工单提示 */
.cut-bed-card.cut-bed-unassigned { border-color:var(--accent); box-shadow:3px 3px 0 var(--accent); }
.cut-bed-warn { margin:0 0 8px; padding:8px 10px; background:#fdecec; border:2px solid var(--danger);
  border-radius:4px; color:var(--danger); font-size:14px; font-weight:700; line-height:1.5; }

/* ===== 员工中心紧凑排版 ===== */
.me-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin:10px 0 4px; }
.me-cell { margin-top:0; flex-direction:column; align-items:flex-start; gap:2px;
  padding:12px 14px; min-height:64px; position:relative; }
.me-cell .me-cell-t { font-size:1rem; font-weight:800; line-height:1.3; }
.me-cell .me-cell-s { font-size:.78rem; font-weight:600; opacity:.75; }
.me-cell .claim-badge { position:absolute; top:10px; right:10px; margin:0; }
/* 待领取工序入口：横跨整行 + 橙底强调 */
.claim-entry-pending { grid-column:1 / -1; background:var(--accent); border-color:var(--accent); color:#fff; }
.claim-entry-pending .me-cell-s { opacity:.92; }
.claim-entry-pending .claim-badge-pending { background:#fff; color:var(--accent); }
.me-card { padding-top:18px; }
.me-card .work-tag { margin-bottom:6px; }
.me-card .work-product { margin:2px 0 0; font-size:1.35rem; }
.me-today { margin-top:10px; padding:8px 12px; font-size:.95rem; }
.me-stats { gap:10px; margin-top:10px; }
.me-stat { padding:10px 8px; }
.me-stat b { font-size:1.3rem; }
.me-scan { margin:12px 0 0; min-height:48px; font-size:1.05rem; }
.me-log-head { margin:16px 0 8px; }
.me-undo-hint { padding:8px 10px; font-size:.78rem; }

/* ===== 管理后台首页：图标宫格 + 紧凑操作行 ===== */
.admin-quick h4 { margin-bottom: 10px; }
.admin-tiles { display:grid; grid-template-columns:repeat(3, 1fr); gap:8px; }
.admin-tile { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px;
  background:var(--card); border:2px solid var(--line); border-radius:4px; box-shadow:2px 2px 0 var(--line);
  padding:14px 4px; min-height:78px; text-decoration:none; color:var(--ink); font-weight:700;
  font-size:.72rem; line-height:1.2; text-align:center; transition:transform .1s linear, box-shadow .1s linear; }
.admin-tile:active { transform:translate(2px,2px); box-shadow:0 0 0 var(--line); }
.admin-tile .at-icon { font-size:1.7rem; line-height:1; }
.admin-tile.tile-primary { background:var(--accent); border-color:var(--line); color:#fff; box-shadow:2px 2px 0 var(--line); }
.admin-mini { padding:12px 14px; }
.admin-mini h4 { margin-bottom:8px; font-size:.95rem; }
.mini-row { display:flex; flex-wrap:wrap; gap:8px; }
.mini-row .btn { flex:1 1 auto; min-width:calc(50% - 8px); justify-content:center; }
@media (min-width:620px) {
  .admin-tiles { grid-template-columns:repeat(4, 1fr); }
}

/* ===== 工卡计划汇总（环形完工率 + 展开明细） ===== */
.sum-total-row { display:flex; align-items:center; gap:16px; padding:14px 16px; }
.sum-ring { flex:none; }
.sum-total-info { flex:1; min-width:0; }
.sum-total-row .sum-total-title { font-size:15px; font-weight:800; margin-bottom:2px; }
.sum-total-row .sum-big { font-size:1.3rem; font-weight:800; }
.sum-total-row .sum-big b { color:var(--accent); font-size:1.5rem; }
.sum-total-row .sum-sub { color:var(--gray); font-size:.8rem; margin-top:2px; }
.ring-svg { display:block; }
.ring-bg { fill:none; stroke:#e6e0d2; stroke-width:7; }
.ring-fg { fill:none; stroke:var(--accent); stroke-width:7; stroke-linecap:butt;
  transform:rotate(-90deg); transform-origin:50% 50%; transition:stroke-dasharray .3s linear; }
.ring-txt { font-size:15px; font-weight:800; fill:var(--ink); font-variant-numeric:tabular-nums; }

.sum-card2 { padding:0; overflow:hidden; }
.sum2-head { display:flex; align-items:center; gap:12px; padding:12px 14px; cursor:pointer; }
.sum2-main { flex:1; min-width:0; }
.sum2-label { font-size:1.05rem; font-weight:800; }
.sum2-extra { font-size:.8rem; font-weight:600; color:var(--gray); }
.sum2-meta { font-size:.82rem; color:var(--gray); margin-top:3px; }
.sum2-meta b { color:var(--ink); }
.sum2-done { color:#2e7d32; font-weight:800; }
.sum2-ring { flex:none; }
.sum2-ring .ring-svg { width:48px; height:48px; }
.sum2-arrow { flex:none; color:var(--gray); font-size:1rem; transition:transform .15s; }
.sum-card2.open .sum2-arrow { transform:rotate(180deg); }
.sum2-detail { display:none; border-top:2px dashed var(--line); padding:12px 14px; background:var(--paper); }

.gd-table { width:100%; }
.gd-thead, .gd-row { display:grid; grid-template-columns:56px 44px 48px 1fr 44px; gap:8px; align-items:center; }
.gd-thead { font-size:.78rem; font-weight:800; color:var(--gray); padding-bottom:6px; border-bottom:2px solid var(--line); margin-bottom:6px; }
.gd-row { padding:7px 0; border-bottom:1px dashed #c9c2b2; font-size:.92rem; }
.gd-color { font-weight:800; }
.gd-size, .gd-qty { text-align:center; font-variant-numeric:tabular-nums; }
.gd-bar { height:12px; background:#e6e0d2; border:2px solid var(--line); border-radius:3px; overflow:hidden; }
.gd-bar-fill { display:block; height:100%; background:var(--accent); }
.gd-bar-fill.done { background:#2e7d32; }
.gd-pct { text-align:right; font-weight:800; font-variant-numeric:tabular-nums; font-size:.85rem; }

.gbar-title { margin:14px 0 8px; font-size:.9rem; font-weight:800; }
.gbar-line { display:grid; grid-template-columns:84px 1fr 48px; gap:6px; align-items:center; margin-bottom:6px; }
.gbar-name { font-size:.8rem; text-align:right; color:var(--ink); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.gbar-track { height:14px; background:#e6e0d2; border:1.5px solid var(--line); border-radius:3px; overflow:hidden; }
.gbar-fill { display:block; height:100%; background:var(--accent); }
.gbar-num { font-size:.82rem; font-weight:800; font-variant-numeric:tabular-nums; }
.sum2-empty { color:var(--gray); font-size:.85rem; padding:8px 0; }

/* ============ 商品编码（SKU）编辑与选择 ============ */
.sku-tip {
  font-size:.8rem; color:var(--gray); line-height:1.5; margin-bottom:8px;
  padding:8px 10px; background:var(--paper); border:2px solid var(--line);
}
.sku-rows { display:flex; flex-direction:column; gap:8px; margin-bottom:10px; }
.sku-row {
  display:grid; grid-template-columns: 1fr 72px 38px; gap:6px; align-items:stretch;
  padding:6px; background:#fff; border:2px solid var(--line); border-radius:4px;
}
.sku-row .sku-color,
.sku-row .sku-size,
.sku-row .sku-code {
  width:100%; padding:8px; font-size:.88rem; border:2px solid var(--line);
  border-radius:4px; background:#fff; font-family:inherit; min-width:0;
}
.sku-row .sku-color { grid-column:1; grid-row:1; }
.sku-row .sku-size { grid-column:2; grid-row:1; text-align:center; font-weight:800; }
.sku-row .sku-del { grid-column:3; grid-row:1; }
.sku-row .sku-code {
  grid-column:1; grid-row:2; font-weight:800; font-variant-numeric:tabular-nums;
  background:var(--paper);
}
.sku-row .sku-spec {
  grid-column:2 / 4; grid-row:2; display:flex; align-items:center; justify-content:center;
  padding:0 6px; font-size:.82rem; font-weight:800; color:var(--ink);
  background:var(--ink); color:#fff; border-radius:4px; white-space:nowrap; overflow:hidden;
  text-overflow:ellipsis; line-height:1.2;
}
.sku-row .sku-spec.is-empty { background:var(--paper); color:var(--gray); font-weight:600; }
.sku-row .sku-color:focus,
.sku-row .sku-size:focus,
.sku-row .sku-code:focus { outline:none; border-color:var(--accent); }
.sku-del {
  width:38px; min-height:38px; border:2px solid var(--line); background:#fff; color:var(--danger);
  font-weight:800; font-size:1rem; border-radius:4px; cursor:pointer; line-height:1;
  box-shadow:2px 2px 0 var(--line);
}
.sku-del:active { transform:translate(2px,2px); box-shadow:none; }
@media (max-width:420px) {
  .sku-row { grid-template-columns: 1fr 60px 36px; }
}

/* 开工单页的 SKU 快速选择 chips */
.sku-pick { display:flex; flex-wrap:wrap; gap:8px; }
.sku-chip {
  display:flex; flex-direction:column; align-items:flex-start; gap:2px;
  border:2px solid var(--line); background:#fff; border-radius:4px;
  padding:7px 12px; cursor:pointer; box-shadow:3px 3px 0 var(--line);
  font-family:inherit; text-align:left;
}
.sku-chip b { font-size:.92rem; font-weight:800; color:var(--ink); font-variant-numeric:tabular-nums; }
.sku-chip span { font-size:.72rem; color:var(--gray); }
.sku-chip:active { transform:translate(3px,3px); box-shadow:none; }
.sku-chip:active, .sku-chip:focus-visible { outline:none; border-color:var(--accent); background:#fff6f0; }

/* ============ 二维码标签打印设置 ============ */
.orders-head-btns { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.qrps-list { display:flex; flex-direction:column; gap:10px; }
.qrps-opt {
  display:flex; align-items:flex-start; gap:10px; padding:11px 12px;
  border:2px solid var(--line); border-radius:4px; background:#fff; cursor:pointer;
  box-shadow:2px 2px 0 var(--line);
}
.qrps-opt.on { border-color:var(--accent); background:#fff6f0; }
.qrps-opt input { margin-top:3px; width:18px; height:18px; flex:0 0 auto; accent-color:var(--accent); }
.qrps-opt span { display:flex; flex-direction:column; gap:3px; }
.qrps-opt b { font-size:.95rem; color:var(--ink); }
.qrps-opt small { font-size:.78rem; color:var(--gray); line-height:1.5; }

/* ============ 产品库管理（独立页 · 紧凑卡片） ============ */
.ap-head { display:flex; gap:10px; margin:14px 0 10px; }
.ap-vis-bar { margin-top:8px; }
.ap-search {
  position:relative; display:flex; align-items:center; margin:10px 0 2px;
}
.ap-search-ic {
  position:absolute; left:14px; font-size:15px; opacity:.55; pointer-events:none;
}
.ap-search input {
  width:100%; height:42px; padding:0 40px 0 38px;
  border:2px solid var(--ink); border-radius:8px; background:#fff;
  font-size:15px; color:var(--ink); box-shadow:2px 2px 0 rgba(20,20,20,.12);
  box-sizing:border-box;
}
.ap-search input:focus { outline:none; border-color:var(--accent); box-shadow:2px 2px 0 rgba(240,90,26,.25); }
.ap-search-x {
  position:absolute; right:8px; width:28px; height:28px; border:none;
  background:rgba(0,0,0,.08); color:var(--ink); border-radius:50%;
  font-size:13px; line-height:1; cursor:pointer; flex:none;
}
.ap-search-x:active { background:rgba(0,0,0,.2); }
.ap-grid {
  display:grid; grid-template-columns:repeat(4, 1fr); gap:9px;
  margin-top:12px;
}
.ap-grid.ap-empty { display:block; }
.ap-card {
  display:flex; flex-direction:column;
  border:2px solid var(--ink); border-radius:4px; background:#fff;
  box-shadow:2px 2px 0 var(--ink); overflow:hidden;
}
.ap-card.is-hidden { opacity:.68; box-shadow:2px 2px 0 var(--line); border-color:var(--line); }
.ap-cover {
  position:relative; display:block; width:100%;
  aspect-ratio:1/1; background:var(--paper);
  border-bottom:2px solid var(--ink); overflow:hidden;
}
.ap-cover img { width:100%; height:100%; object-fit:cover; display:block; }
.ap-cover-ph {
  display:flex; align-items:center; justify-content:center;
  width:100%; height:100%; font-size:1.7rem; color:var(--gray);
}
.ap-cover .vis-badge {
  position:absolute; top:5px; left:5px; font-size:.62rem; padding:1px 6px;
  border:1.5px solid var(--ink); border-radius:3px; background:#fff; font-weight:800; line-height:1.5;
}
.ap-cover .vis-off { color:#fff; background:var(--ink); }
.ap-cover .vis-on { color:#fff; background:var(--accent); border-color:var(--accent); }
.ap-body { padding:6px 7px 4px; }
.ap-code { font-weight:800; font-size:.82rem; color:var(--ink); line-height:1.2; word-break:break-all; }
.ap-name {
  font-size:.72rem; color:#555; margin-top:2px; line-height:1.25;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.ap-meta { font-size:.66rem; color:var(--gray); margin-top:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ap-actions {
  margin-top:auto; display:grid; grid-template-columns:1fr 1fr; gap:5px;
  padding:0 7px 7px;
}
.ap-actions .btn {
  text-align:center; padding:7px 2px; font-size:.76rem; line-height:1.2;
  min-height:0; gap:3px; box-shadow:2px 2px 0 var(--ink); border-width:2px;
}
.ap-actions .btn:active { box-shadow:0 0 0 var(--ink); }
.chip-num {
  display:inline-block; min-width:16px; margin-left:2px; padding:0 4px;
  background:var(--paper); border:1px solid var(--line); border-radius:3px;
  font-size:.68rem; font-weight:800; line-height:1.5;
}
.cat-chip.active .chip-num { background:rgba(255,255,255,.25); border-color:transparent; color:#fff; }
@media (max-width:560px) {
  .ap-grid { grid-template-columns:repeat(3, 1fr); }
}
@media (max-width:420px) {
  .ap-grid { grid-template-columns:repeat(2, 1fr); gap:8px; }
  .ap-meta { display:none; }
  .ap-name { -webkit-line-clamp:2; display:-webkit-box; -webkit-box-orient:vertical; white-space:normal; }
}

/* ===== 材料库（编辑页只读用量 + 设置页单位）===== */
.mat-line .mat-qty {
  margin-left: auto;
  font-weight: 800;
  color: var(--orange);
  font-size: 1.02rem;
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  white-space: nowrap;
}
.mat-line .mat-unit {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}
.pc-newproc-mat { flex-wrap: wrap; }
.mc-unit-input { flex: 0 0 110px; min-width: 96px; }
.mc-lib-unit { color: var(--muted); font-weight: 700; font-size: 0.82rem; }

/* ===== 材料列表（全局）===== */
.ml-list { display: flex; flex-direction: column; gap: 8px; }
.ml-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: 6px;
}
.ml-name { font-weight: 800; font-size: 1.02rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.ml-unit {
  font-size: .78rem; font-weight: 700; color: var(--orange);
  border: 1.5px solid var(--orange); border-radius: 4px; padding: 1px 7px; background: #fff;
}
.ml-nounit { color: var(--muted); border-color: var(--line); }
.ml-meta { font-size: .8rem; color: var(--muted); font-weight: 700; white-space: nowrap; }
.ml-ops { display: flex; gap: 6px; }
@media (max-width: 560px) {
  .ml-row { grid-template-columns: 1fr auto; }
  .ml-meta { grid-column: 1 / -1; }
}

/* ===== 生产概览（后台首页）===== */
.ov-panel h4 { margin: 0 0 10px; }
.ov-loading { font-size: .9rem; color: var(--muted); padding: 6px 2px; }
.ov-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.ov-cell {
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: 6px;
  padding: 10px 8px;
  text-align: center;
}
.ov-cell.is-link { cursor: pointer; transition: transform .08s, box-shadow .08s; }
.ov-cell.is-link:active { transform: translate(1px,1px); box-shadow: none; }
.ov-cell.is-hot { border-color: var(--orange); background: #fff4ec; }
.ov-icon { font-size: 1.1rem; line-height: 1; }
.ov-val { font-size: 1.18rem; font-weight: 900; margin: 3px 0 1px; color: var(--ink); }
.ov-cell.is-hot .ov-val { color: var(--orange); }
.ov-label { font-size: .72rem; font-weight: 700; color: var(--muted); }
.ov-sub { display: block; font-size: .66rem; font-weight: 700; color: var(--muted); opacity: .8; margin-top: 1px; }
@media (max-width: 620px) { .ov-grid { grid-template-columns: repeat(2, 1fr); } }

/* ===== 操作记录 ===== */
.au-list { display: flex; flex-direction: column; gap: 8px; }
.au-row {
  display: grid; grid-template-columns: 64px 1fr; gap: 10px;
  background: var(--paper); border: 2px solid var(--line); border-radius: 6px; padding: 9px 11px;
}
.au-time { font-size: .78rem; font-weight: 800; color: var(--muted); padding-top: 1px; }
.au-action { font-weight: 800; font-size: .92rem; }
.au-target { font-size: .82rem; font-weight: 700; color: var(--orange); margin-top: 1px; word-break: break-all; }
.au-detail { font-size: .76rem; color: var(--muted); margin-top: 1px; }

/* ===== 员工工资条 ===== */
.wage-slip { margin: 12px 0; padding: 14px; background: #fff; }
.wage-slip-loading { font-size: .88rem; color: var(--muted); text-align: center; padding: 6px; }
.wage-slip-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.wage-slip-tag {
  background: var(--ink); color: #fff; font-weight: 900; font-size: .8rem;
  padding: 2px 10px; border-radius: 4px;
}
.wage-slip-month { font-weight: 800; color: var(--muted); font-size: .9rem; margin-left: auto; }
.wage-slip-total {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 8px;
  border: 2px solid var(--orange); border-radius: 6px; background: #fff4ec; padding: 10px; margin-bottom: 10px;
}
.wst-item { text-align: center; }
.wst-item b { display: block; font-size: 1.3rem; font-weight: 900; color: var(--ink); }
.wst-item b.wage { color: var(--orange); }
.wst-item span { font-size: .74rem; font-weight: 700; color: var(--muted); }
.wage-slip-steps { display: flex; flex-direction: column; gap: 5px; }
.ws-step-line {
  display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: baseline;
  font-size: .86rem; padding: 4px 2px; border-bottom: 1px dashed var(--line);
}
.ws-step-n { font-weight: 700; }
.ws-step-q { color: var(--muted); font-weight: 700; font-size: .8rem; }
.ws-step-w { color: var(--orange); font-size: .92rem; }
.ws-empty { font-size: .84rem; color: var(--muted); text-align: center; padding: 8px; }

/* ===== 工资条：锁定区间折叠 + 底部本月累计 ===== */
.wsl-lock { margin: 8px 0; border: 1px solid #d8c9bc; border-radius: 6px; background: #faf5f0; overflow: hidden; }
.wsl-lock-head {
  display: flex; align-items: center; gap: 6px; width: 100%; text-align: left;
  background: #efe6db; border: 0; padding: 9px 10px; cursor: pointer; font: inherit;
}
.wsl-lock-tit { font-size: .86rem; font-weight: 800; color: var(--muted); }
.wsl-lock-sum { font-size: .82rem; font-weight: 700; color: var(--muted); }
.wsl-lock-caret { margin-left: auto; color: var(--muted); font-size: .78rem; transition: transform .15s; }
.wsl-lock-head.wsl-open .wsl-lock-caret { transform: rotate(90deg); }
.wsl-lock-body { padding: 8px 10px; border-top: 1px dashed #d8c9bc; }
.wsl-lock-body .ws-step-n, .wsl-lock-body .ws-step-w { color: var(--muted); }
.wsl-lock-body .ws-step-w { font-weight: 800; }
.wsl-total {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 8px;
  border: 2px dashed #cfc4b8; border-radius: 6px; background: #f3eee8; padding: 10px; margin-top: 10px;
}
.wsl-total .wst-item b { color: var(--ink); }
.wsl-total .wst-item b.wage { color: var(--orange); }
.wsl-total-l { color: #957d68; }

/* ===== 后台板块长按排序 ===== */
.sort-banner {
  display: none;
  align-items: center;
  gap: 6px;
  background: var(--ink);
  color: #fff;
  border-radius: 6px;
  padding: 9px 12px;
  font-size: .84rem;
  font-weight: 700;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.sort-banner.show { display: flex; }
.sort-banner b { color: #ffd9c2; }
.panel-head { cursor: grab; user-select: none; -webkit-user-select: none; }
.panel-head:active { cursor: grabbing; }
.sortable-panel.is-sorting {
  outline: 2px dashed var(--orange);
  outline-offset: 2px;
  box-shadow: 3px 3px 0 var(--orange);
}
.sort-handle {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-bottom: 8px;
}
.sort-handle .sort-hint { font-size: .76rem; font-weight: 700; color: var(--orange); margin-right: auto; }

/* ===== 离线缓存提示条（断网显示本机已缓存资料）===== */
.offline-banner {
  position: fixed; left: 0; right: 0; top: 0; z-index: 9999;
  background: var(--ink); color: var(--paper);
  border-bottom: 3px solid var(--orange);
  padding: 10px 14px; font-size: .82rem; font-weight: 700; line-height: 1.5;
  text-align: center; box-shadow: 0 3px 0 rgba(0,0,0,.25);
  animation: slideDown .25s ease-out;
}
@keyframes slideDown { from { transform: translateY(-100%); } to { transform: translateY(0); } }
/* 强制改密：遮罩不响应点击关闭 */
.modal-mask.modal-static { z-index: 10001; }
.modal-mask.modal-static .modal { border-color: var(--danger); }

/* ===== 质量统计 / 不良率 ===== */
.ql-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 8px; }
.ql-list { display: flex; flex-direction: column; gap: 6px; }
.ql-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--paper); border: 2px solid var(--line); border-radius: 4px;
  padding: 8px 10px;
}
.ql-row .ql-name { font-weight: 700; font-size: .86rem; flex: 1 1 auto; min-width: 0; }
.ql-row .ql-num { font-size: .82rem; color: var(--muted, #6b6f76); white-space: nowrap; }
.ql-row .ql-rate { font-weight: 800; padding: 2px 8px; border: 2px solid currentColor; border-radius: 4px; font-size: .8rem; white-space: nowrap; }
.ql-row.ql-detail { border-style: dashed; }
.ql-row .ql-reason { flex-basis: 100%; font-size: .8rem; color: var(--danger); font-weight: 700; }
.ql-row .ql-time { font-size: .72rem; color: var(--muted, #999); white-space: nowrap; }
.ov-num.ov-bad { color: var(--danger); }
.ov-num.ov-warn { color: var(--orange); }
.ov-num.ov-good { color: #1a7f37; }
.ql-rate.ov-bad { color: var(--danger); }
.ql-rate.ov-warn { color: var(--orange); }

/* 员工中心 · 手机号行 */
.me-phone-line {
  margin-top: 12px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: var(--paper); border: 2px solid var(--line); border-radius: 4px; padding: 8px 10px;
}
.me-phone-label { font-size: .84rem; font-weight: 700; color: var(--ink); }
.me-phone-num { font-size: 1rem; font-weight: 800; letter-spacing: .5px; flex: 1 1 auto; }
.me-phone-line .btn-sm { flex: 0 0 auto; }
/* 员工中心头部：手机号 + 累计件数/累计工资 合并成一行（紧凑） */
.me-headline { margin-top: 10px; padding: 7px 10px; }
.me-head-stats { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; white-space: nowrap; }
.me-hs { font-size: .8rem; font-weight: 700; color: var(--muted, #6b6f76); background: var(--card); border: 1.5px solid var(--line); border-radius: 4px; padding: 3px 7px; }
.me-hs b { color: var(--ink); margin: 0 1px; }
.me-hs b.wage { color: var(--orange); }

/* SKU 可售库存视图 */
.si-row .ql-name { flex: 1 1 60%; }
.si-spec { font-size: .8rem; font-weight: 700; color: var(--ink); margin-top: 3px; }
.si-sku {
  font-size: .72rem; font-weight: 800; color: var(--orange);
  background: var(--paper); border: 1.5px solid var(--orange); border-radius: 4px;
  padding: 1px 6px; margin-left: 6px;
}
.si-stats { font-size: .82rem; color: var(--muted, #6b6f76); white-space: nowrap; text-align: right; }
.si-stats b { color: var(--ink); font-size: .95rem; margin: 0 2px; }
.si-stats b.ov-good { color: #1a7f37; }
.si-stats b.ov-bad { color: var(--danger); }
.si-stats b.ov-warn { color: var(--orange); }

/* ============================================================
   客户模块（下单闭环）：客户中心 / 下单 / 采购单 / 配货 / 客户管理
   ============================================================ */
.cust-tag {
  display: inline-block; background: var(--accent); color: #fff;
  font-size: .78rem; font-weight: 800; letter-spacing: 2px;
  padding: 4px 12px; border: 2px solid var(--ink); box-shadow: var(--shadow-hard-sm);
  margin-bottom: 12px;
}
.cust-hero {
  background: var(--ink); color: #fff; padding: 22px 20px;
  border: 2px solid var(--ink); box-shadow: var(--shadow-hard);
  margin-bottom: 18px; position: relative;
}
.cust-hero-tag {
  display: inline-block; background: var(--accent); color: #fff;
  font-size: .74rem; font-weight: 800; letter-spacing: 2px; padding: 3px 10px;
  margin-bottom: 10px;
}
.cust-hero-name { font-size: 1.55rem; font-weight: 900; letter-spacing: .5px; }
.cust-hero-sub { color: #cfc9bd; font-size: .88rem; margin-top: 6px; }
.cust-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.cust-tile {
  position: relative; display: block; background: var(--card);
  border: 2px solid var(--ink); box-shadow: var(--shadow-hard-sm);
  padding: 18px 14px; text-decoration: none; color: var(--ink);
  transition: transform .08s ease;
}
.cust-tile:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.cust-tile-primary { grid-column: 1 / -1; background: var(--accent); color: #fff; }
.cust-tile-ic { font-size: 1.7rem; line-height: 1; margin-bottom: 8px; }
.cust-tile-t { font-weight: 900; font-size: 1.05rem; }
.cust-tile-d { font-size: .78rem; color: var(--muted); margin-top: 4px; }
.cust-tile-primary .cust-tile-d { color: #ffe4d6; }
.cust-badge {
  position: absolute; top: 10px; right: 10px; min-width: 22px; height: 22px;
  background: var(--danger); color: #fff; border: 2px solid var(--ink);
  border-radius: 11px; font-size: .8rem; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center; padding: 0 6px;
}
.cust-badge-ok { background: #1a7f37; }
.cust-sec-t { font-size: 1.05rem; font-weight: 900; margin: 6px 0 12px; padding-left: 10px; border-left: 5px solid var(--accent); }
.cust-page-t { font-size: 1.3rem; font-weight: 900; margin: 4px 0 16px; }
.cust-logout { margin-top: 24px; text-align: center; }
.cust-tabs { display: flex; gap: 8px; margin: 4px 0 16px; flex-wrap: wrap; }
.cust-tab {
  flex: 1; min-width: 70px; text-align: center; padding: 9px 6px;
  background: var(--card); border: 2px solid var(--ink); font-weight: 800;
  font-size: .9rem; text-decoration: none; color: var(--ink); box-shadow: var(--shadow-hard-sm);
}
.cust-tab.active { background: var(--ink); color: #fff; }
.cust-tab:active { transform: translate(1px,1px); }

/* 采购单卡片 */
.po-list { display: flex; flex-direction: column; gap: 14px; }
.po-card {
  background: var(--card); border: 2px solid var(--ink);
  box-shadow: var(--shadow-hard-sm); padding: 14px; position: relative;
}
.po-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.po-seq { font-weight: 900; font-size: .95rem; }
.po-status { font-size: .76rem; font-weight: 800; padding: 3px 10px; border: 2px solid var(--ink); white-space: nowrap; }
.po-status.st-pending { background: #fff3e0; color: var(--accent-dark); }
.po-status.st-packing { background: #e8f0fe; color: #1a56db; }
.po-status.st-packed { background: #e6f6ec; color: #1a7f37; }
.po-status.st-delivered { background: #ece9e2; color: var(--muted); }
.po-cust { font-size: .85rem; color: var(--muted); margin-bottom: 6px; }
.po-lines { border-top: 2px dashed #d8d2c4; border-bottom: 2px dashed #d8d2c4; padding: 8px 0; }
.po-line { display: flex; align-items: baseline; gap: 8px; padding: 3px 0; font-size: .9rem; }
.po-line-name { font-weight: 700; flex: 1; min-width: 0; }
.po-line-code { color: var(--muted); font-weight: 600; font-size: .82rem; }
.po-line-spec { color: var(--muted); font-size: .84rem; white-space: nowrap; }
.po-line-qty { font-weight: 800; white-space: nowrap; }
.po-line-amt { font-weight: 800; color: var(--accent-dark); white-space: nowrap; min-width: 64px; text-align: right; }
.po-card-foot { display: flex; align-items: center; gap: 10px; padding-top: 8px; font-size: .84rem; }
.po-total-qty { color: var(--muted); }
.po-total-amt { margin-left: auto; color: var(--accent-dark); font-size: 1.05rem; }
.po-time { color: var(--muted); white-space: nowrap; }
.po-remark { margin-top: 8px; font-size: .84rem; background: var(--tag-bg); padding: 6px 10px; border-left: 4px solid var(--accent); }
.po-remark.wh { border-left-color: #e67e22; background: rgba(230,126,34,.08); color: #b45f06; }
.po-packed-info { margin-top: 10px; background: #f4faf6; border: 2px solid #b7e0c6; padding: 10px; }
.po-pack-note { font-size: .86rem; font-weight: 700; margin-bottom: 8px; }
.po-pack-by, .po-deliver-by { font-size: .78rem; color: var(--muted); margin-top: 6px; }
.po-deliver-by { color: #1a7f37; font-weight: 700; }
.po-photos { display: flex; gap: 8px; flex-wrap: wrap; }
.po-photo { width: 84px; height: 84px; object-fit: cover; border: 2px solid var(--ink); cursor: zoom-in; }
.po-actions { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }

/* 下单页 */
.co-prod {
  display: flex; align-items: center; gap: 12px; background: var(--card);
  border: 2px solid var(--ink); box-shadow: var(--shadow-hard-sm);
  padding: 10px; margin-bottom: 10px;
}
.co-prod-cover { width: 56px; height: 56px; object-fit: cover; border: 2px solid var(--ink); flex-shrink: 0; }
.co-prod-noimg { display: flex; align-items: center; justify-content: center; font-size: 26px; background: var(--tag-bg); }
.co-prod-info { flex: 1; min-width: 0; }
.co-prod-name { font-weight: 800; font-size: .95rem; }
.co-prod-code { color: var(--muted); font-weight: 600; font-size: .82rem; }
.co-prod-cat { font-size: .78rem; color: var(--muted); }
.co-prod-price { color: var(--accent-dark); font-weight: 900; margin-top: 2px; }
.co-prod-price-unit { font-size: .76rem; color: var(--muted); font-weight: 600; }
.co-add { flex-shrink: 0; }
.co-cart-sec { margin-top: 20px; }
.co-cart-count { color: var(--accent); font-size: .9rem; }
.co-line { background: var(--card); border: 2px solid var(--ink); padding: 10px; margin-bottom: 10px; box-shadow: var(--shadow-hard-sm); }
.co-line-head { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; font-size: .92rem; }
.co-line-head b { flex: 1; min-width: 0; }
.co-line-code { color: var(--muted); font-weight: 600; font-size: .8rem; }
.co-line-del { width: 28px; height: 28px; border: 2px solid var(--danger); color: var(--danger); font-weight: 800; }
.co-line-fields { display: flex; gap: 8px; align-items: center; }
.co-f-color, .co-f-size { flex: 1; min-width: 0; padding: 8px; font-size: .9rem; }
.co-qty { display: flex; align-items: center; gap: 4px; }
.co-qty-btn { width: 34px; height: 38px; border: 2px solid var(--ink); background: var(--tag-bg); font-size: 1.2rem; font-weight: 900; }
.co-f-qty { width: 56px; text-align: center; padding: 8px 2px; font-weight: 800; }
.co-line-amt { text-align: right; color: var(--accent-dark); font-weight: 900; margin-top: 6px; }
.co-submit-bar {
  position: sticky; bottom: 0; display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 2px solid var(--ink); box-shadow: var(--shadow-hard);
  padding: 12px; margin-top: 14px; z-index: 5;
}
.co-total { flex: 1; font-size: .95rem; }
.co-total b { color: var(--accent-dark); font-size: 1.3rem; }

/* 客户管理 · 款式授权 */
.ca-search { margin-bottom: 12px; }
.ca-list { display: flex; flex-direction: column; gap: 8px; max-height: 60vh; overflow-y: auto; }
.ca-row {
  display: flex; align-items: center; gap: 10px; background: var(--card);
  border: 2px solid var(--ink); padding: 10px; cursor: pointer;
}
.ca-row.on { background: #fff4ec; box-shadow: var(--shadow-hard-sm); }
.ca-chk { width: 22px; height: 22px; flex-shrink: 0; accent-color: var(--accent); }
.ca-prod { flex: 1; min-width: 0; }
.ca-prod-name { font-weight: 800; font-size: .92rem; }
.ca-prod-code { color: var(--muted); font-weight: 600; font-size: .8rem; }
.ca-prod-cat { font-size: .76rem; color: var(--muted); }
.ca-price-wrap { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.ca-price { width: 86px; padding: 8px; font-weight: 800; text-align: right; }
.ca-price-unit { font-size: .76rem; color: var(--muted); white-space: nowrap; }
.ca-foot { display: flex; gap: 10px; margin-top: 16px; align-items: center; }
.ca-foot .btn-acc { flex: 1; }

/* 配货拍照弹窗 */
.pk-add-btn { display: block; width: 100%; text-align: center; margin-top: 10px; padding: 12px; border: 2px dashed var(--ink); font-weight: 800; }

/* 仓库 5 tab 平铺（固定两行，避免单行过窄在 iOS 上把容器挤成竖条） */
.wh-tabs { width: 100%; box-sizing: border-box; }
.wh-tabs-5 { flex-wrap: wrap; gap: 8px; }
.wh-tabs-5 .wh-tab {
  flex: 0 0 calc(33.333% - 6px); min-width: 0; box-sizing: border-box;
  min-height: 44px; text-align: center; padding: 10px 2px; font-size: 13px;
  white-space: nowrap; overflow: hidden;
}
.wh-tabs-5 .wh-tab b { color: var(--accent); font-weight: 800; }
.wh-header { flex-wrap: wrap; }
.wh-header > div { min-width: 0; flex: 1 1 auto; }
.wh-header .wh-user-box { flex: 0 0 auto; }
@media (max-width: 420px) {
  .wh-tabs-5 .wh-tab { flex: 0 0 calc(50% - 4px); font-size: 13px; padding: 9px 4px; }
}

/* 款式授权：隐藏款标记 */
.ca-prod-hidden {
  display: inline-block; font-size: .7rem; font-weight: 800; color: #fff;
  background: var(--muted); padding: 1px 7px; border-radius: 2px; margin-left: 4px;
  vertical-align: middle; letter-spacing: 1px;
}

/* ============================================================
   客户管理增强 + 退货闭环 + 订单汇总（工业铭牌风）
   ============================================================ */

/* 仓库 6 tab：固定两行 */
.wh-tabs-6 { flex-wrap: wrap; gap: 8px; }
.wh-tabs-6 .wh-tab {
  flex: 0 0 calc(33.333% - 6px); min-width: 0; box-sizing: border-box;
  min-height: 44px; text-align: center; padding: 10px 2px; font-size: 13px;
  white-space: nowrap; position: relative; overflow: visible;
}
.wh-tabs-6 .wh-tab .wh-tab-label { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.wh-tabs-6 .wh-tab b { color: var(--accent); font-weight: 800; }
/* 微信风红色角标 */
.wh-tab .wh-badge {
  position: absolute; top: -7px; right: -6px; z-index: 2;
  min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box;
  background: #f22b2b; color: #fff; border: 2px solid var(--card, #f3ede1);
  border-radius: 9px; font-size: 11px; font-weight: 800; line-height: 14px;
  text-align: center; font-style: normal; letter-spacing: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,.3); white-space: nowrap;
}
.wh-tab.active .wh-badge { border-color: var(--ink, #23212a); }
@media (max-width: 420px) {
  .wh-tabs-6 .wh-tab { flex: 0 0 calc(50% - 4px); font-size: 12.5px; padding: 9px 2px; }
}

/* 后台客户卡片：统计行 + 按钮换行 */
.cst-card .worker-main { width: 100%; }
.cst-stats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cst-chip {
  display: inline-block; font-size: .74rem; font-weight: 800; letter-spacing: .3px;
  background: #efe9dd; color: var(--ink); border: 1.5px solid var(--ink);
  padding: 2px 8px; border-radius: 2px;
}
.cst-chip-warn { background: var(--accent); color: #fff; border-color: var(--accent); }
.cst-chip-ok { background: #2e7d32; color: #fff; border-color: #2e7d32; }
.cst-btns { flex-wrap: wrap; }
.cst-btns .btn { margin: 3px 0; }

/* 弹窗表单字段 */
.dlg-field { margin: 12px 0; }
.dlg-field label { display: block; font-size: .8rem; font-weight: 800; margin-bottom: 5px; color: var(--ink); }
.dlg-field .field { width: 100%; box-sizing: border-box; }

/* 客户详情页头部 */
.cust-detail-head { margin-bottom: 14px; }
.cdh-name { font-size: 1.25rem; font-weight: 900; }
.cdh-sub { color: var(--muted); font-size: .85rem; margin-top: 2px; }
.cdh-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0; }
.cdh-stat {
  background: #f5f1e7; border: 1.5px solid var(--ink); border-radius: 3px;
  padding: 10px 4px; text-align: center;
}
.cdh-stat b { display: block; font-size: 1.05rem; font-weight: 900; color: var(--ink); word-break: break-all; }
.cdh-stat span { font-size: .7rem; color: var(--muted); }
.cdh-stat-warn b { color: var(--accent); }
.cdh-ops { display: flex; flex-wrap: wrap; gap: 8px; }
.cdh-ops .btn { flex: 1 1 auto; }
.cd-sec { margin: 20px 0 10px; font-size: 1rem; }
.cust-quick { display: flex; gap: 10px; margin: 12px 0; flex-wrap: wrap; }
.cust-quick-link {
  flex: 1 1 140px; text-align: center; padding: 11px 8px; font-weight: 800; font-size: .85rem;
  background: #fff; border: 2px solid var(--ink); color: var(--ink); text-decoration: none; border-radius: 2px;
}
.cust-quick-link:active { background: var(--ink); color: #fff; }

/* 收款提醒卡 */
.rm-card {
  border: 2px solid var(--ink); border-radius: 3px; padding: 12px 14px; margin-bottom: 10px;
  background: #fff; box-shadow: 3px 3px 0 var(--ink);
}
.rm-card.is-open { border-left: 6px solid var(--accent); }
.rm-card.is-settled { opacity: .72; border-left: 6px solid #2e7d32; }
.rm-card-head { display: flex; justify-content: space-between; align-items: center; }
.rm-card-head b { font-size: 1.2rem; font-weight: 900; }
.rm-status { font-size: .74rem; font-weight: 800; padding: 2px 9px; border-radius: 2px; color: #fff; }
.rm-st-warn { background: var(--accent); }
.rm-st-ok { background: #2e7d32; }
.rm-note { margin-top: 6px; font-size: .86rem; }
.rm-card-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; gap: 8px; flex-wrap: wrap; }
.rm-card-foot span { color: var(--muted); font-size: .76rem; }

/* 退货单卡 */
.rt-card.rt-st-pending_customer { border-left: 6px solid var(--accent); }
.rt-card.rt-st-confirmed { border-left: 6px solid #b58900; }
.rt-card.rt-st-abnormal { border-left: 6px solid #c62828; }
.rt-card.rt-st-received { border-left: 6px solid #2e7d32; }
.rt-card.rt-st-rejected { border-left: 6px solid var(--muted); opacity: .8; }
.rt-st-pending { background: var(--accent); color: #fff; }
.rt-st-confirmed { background: #b58900; color: #fff; }
.rt-st-abnormal { background: #c62828; color: #fff; }
.rt-st-received { background: #2e7d32; color: #fff; }
.rt-st-rejected { background: var(--muted); color: #fff; }
.rt-reason { font-size: .86rem; margin: 4px 0; font-weight: 700; }
.rt-note { font-size: .82rem; margin-top: 6px; color: var(--ink); background: #f5f1e7; padding: 6px 9px; border-radius: 2px; }
.rt-note-reject { background: #fbe9e7; }
.rt-abnormal-block { margin-top: 8px; border: 2px dashed #c62828; border-radius: 3px; padding: 8px; }
.rt-ab-title { color: #c62828; font-weight: 800; font-size: .84rem; margin-bottom: 6px; }
.rt-ab-photos { margin-top: 4px; }
.rt-ab-tip { font-size: .8rem; color: #c62828; font-weight: 700; margin-bottom: 8px; }

/* 退货明细编辑行 */
.rt-items { margin-top: 4px; }
.rt-empty { font-size: .8rem; color: var(--muted); padding: 10px; border: 1.5px dashed #bbb; border-radius: 3px; text-align: center; }
.rt-line { display: flex; gap: 5px; margin-bottom: 6px; flex-wrap: nowrap; align-items: center; }
.rt-line .field { padding: 8px 6px; font-size: .85rem; min-width: 0; }
.rt-line .rt-name { flex: 1 1 auto; }
.rt-del { flex: 0 0 auto; border: none; background: #fbe9e7; color: #c62828; font-weight: 900; width: 34px; height: 36px; border-radius: 2px; }

/* 订单汇总面板 + 时间段切换 */
.sum-panel {
  background: var(--ink); color: #fff; border-radius: 4px; padding: 14px 16px; margin-bottom: 14px;
  box-shadow: 4px 4px 0 var(--accent);
}
.sum-title { font-weight: 900; font-size: .95rem; margin-bottom: 10px; }
.sum-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.sum-cell { text-align: center; }
.sum-cell b { display: block; font-size: 1.02rem; font-weight: 900; color: #ffb38a; word-break: break-all; }
.sum-cell span { font-size: .68rem; color: #cfc9bd; }
.sum-cell-warn b { color: #ff7043; }
.sum-tip { margin-top: 10px; font-size: .8rem; color: #ffb38a; font-weight: 700; }
.sum-tip-ok { color: #81c784; }
.sum-range { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.sum-rg {
  flex: 1 1 auto; padding: 9px 4px; border: 2px solid var(--ink); background: #fff;
  font-weight: 800; font-size: .82rem; border-radius: 2px; min-width: 0;
}
.sum-rg.active { background: var(--ink); color: #fff; }
.sum-custom { display: flex; gap: 6px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.sum-custom .field { flex: 1 1 130px; padding: 9px; min-width: 0; }
.sum-dash { color: var(--muted); font-weight: 800; }
.sum-custom .btn { flex: 0 0 auto; }

/* 订单收款标记 */
.po-settled { font-size: .74rem; font-weight: 800; color: #2e7d32; border: 1.5px solid #2e7d32; padding: 3px 9px; border-radius: 2px; }
.po-unsettled { font-size: .74rem; font-weight: 800; color: var(--accent); border: 1.5px solid var(--accent); padding: 3px 9px; border-radius: 2px; }
.po-status.st-cancelled { background: #e0e0e0; color: #8a8a8a; text-decoration: line-through; }
.po-card.st-cancelled { opacity: .72; }
.po-mod, .po-cancel { margin-left: 6px; }
.po-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; padding-top: 10px; border-top: 1.5px dashed var(--line); }

/* ===== 电商风下单页 ===== */
.ec-shop { min-height: 100vh; padding-bottom: 76px; }
.ec-catalog-wrap { padding-bottom: 20px; }
.ec-page-t { font-size: 1.15rem; font-weight: 900; margin: 14px 0 12px; letter-spacing: 1px; }
.ec-clear { height: 8px; }
/* 产品网格（紧凑，一行 4 个） */
.ec-prod {
  background: var(--card); border: 1.5px solid var(--ink); border-radius: 3px;
  overflow: hidden; box-shadow: 2px 2px 0 rgba(23, 20, 15, .85); cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}
.ec-prod:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 rgba(23, 20, 15, .85); }
.ec-prod-img {
  width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; background: #f1ece3;
}
.ec-prod-noimg { display: flex; align-items: center; justify-content: center; font-size: 1.7rem; color: #b9ac93; }
.ec-prod-name {
  font-size: .7rem; font-weight: 800; padding: 4px 5px 1px; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 1.85em;
}
.ec-prod-bot { display: flex; align-items: center; justify-content: space-between; gap: 3px; padding: 2px 5px 6px; }
.ec-prod-price { color: var(--accent); font-weight: 900; font-size: .8rem; white-space: nowrap; }
.ec-prod-price-unit { font-size: .6rem; color: var(--muted); font-weight: 700; }
.ec-prod-pick {
  background: var(--ink); color: #fff; font-size: .62rem; font-weight: 800;
  padding: 3px 7px; border-radius: 2px; letter-spacing: 0; white-space: nowrap; flex: 0 0 auto;
}
#coCatalog { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
#coCatalog .loading, #coCatalog .empty { grid-column: 1 / -1; }
@media (min-width: 760px) { #coCatalog { grid-template-columns: repeat(5, 1fr); gap: 10px; } }
@media (min-width: 1080px) { #coCatalog { grid-template-columns: repeat(6, 1fr); } }
/* 超窄屏仍保 4 列但更紧凑 */
@media (max-width: 360px) {
  #coCatalog { gap: 5px; }
  .ec-prod-name { font-size: .64rem; }
  .ec-prod-price { font-size: .72rem; }
  .ec-prod-pick { font-size: .58rem; padding: 2px 5px; }
}

/* 底部采购车栏 */
.ec-cartbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: flex; align-items: center; gap: 10px;
  background: var(--ink); color: #fff; padding: 10px 14px;
  border-top: 3px solid var(--accent);
  box-shadow: 0 -4px 14px rgba(0, 0, 0, .25);
}
.ec-cart-ic { position: relative; background: none; border: none; font-size: 1.5rem; cursor: pointer; padding: 2px 6px; }
.ec-cart-ic i {
  position: absolute; top: -4px; right: -6px; background: var(--accent); color: #fff;
  font-style: normal; font-size: .66rem; font-weight: 900; min-width: 17px; height: 17px; line-height: 17px;
  text-align: center; border-radius: 9px; padding: 0 4px; border: 1.5px solid #fff;
}
.ec-cart-sum { flex: 1; min-width: 0; }
.ec-cart-sum b { display: block; color: #ffb38a; font-size: 1.12rem; font-weight: 900; }
.ec-cart-sum span { font-size: .72rem; color: #cfc9bd; }
.ec-cart-go {
  background: var(--accent); color: #fff; border: none; font-weight: 900; font-size: .92rem;
  padding: 12px 22px; border-radius: 2px; letter-spacing: 1px; box-shadow: 3px 3px 0 rgba(0,0,0,.35);
}
.ec-cart-go:disabled { opacity: .5; }

/* 底部弹层（规格选择 / 购物车） */
.ec-mask { position: fixed; inset: 0; background: rgba(20, 17, 12, .55); z-index: 70; opacity: 0; transition: opacity .2s ease; }
.ec-mask.show { opacity: 1; }
.ec-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 71;
  background: var(--card); max-height: 86vh; overflow-y: auto;
  border-top: 4px solid var(--accent); border-radius: 14px 14px 0 0;
  padding: 16px 16px calc(18px + env(safe-area-inset-bottom));
  transform: translateY(100%); transition: transform .24s cubic-bezier(.2, .8, .3, 1);
  box-shadow: 0 -6px 24px rgba(0, 0, 0, .3);
}
.ec-sheet.show { transform: translateY(0); }
.ec-sheet-x {
  position: absolute; top: 10px; right: 12px; width: 34px; height: 34px; border-radius: 50%;
  border: 2px solid var(--ink); background: #fff; font-weight: 900; font-size: .95rem; cursor: pointer; z-index: 2;
}
/* 规格弹层头部 */
.ec-sp-head { display: flex; gap: 12px; padding-right: 36px; margin-bottom: 6px; }
.ec-sp-cover {
  width: 96px; height: 96px; object-fit: cover; border: 2px solid var(--ink); border-radius: 4px; flex: 0 0 auto; background: #f1ece3;
}
.ec-sp-head .ec-prod-noimg { width: 96px; height: 96px; }
.ec-sp-info { flex: 1; min-width: 0; }
.ec-sp-name { font-size: .95rem; font-weight: 900; line-height: 1.35; }
.ec-sp-code { font-size: .72rem; color: var(--muted); font-weight: 700; }
.ec-sp-price { color: var(--accent); font-weight: 900; font-size: 1.15rem; margin: 4px 0; }
.ec-sp-sel { font-size: .78rem; color: var(--ink); background: #fff; border: 1.5px solid var(--line); padding: 4px 9px; border-radius: 2px; display: inline-block; font-weight: 700; }
.ec-sp-sec h4 { font-size: .84rem; font-weight: 900; margin: 14px 0 8px; letter-spacing: 1px; }
.ec-opt-loading { grid-column: 1 / -1; font-size: .8rem; color: var(--muted); font-weight: 700; padding: 8px 2px; }
/* 颜色卡片网格 */
.ec-colors { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ec-color {
  border: 2px solid var(--ink); background: #fff; border-radius: 4px; padding: 10px 4px;
  font-size: .78rem; font-weight: 800; cursor: pointer; text-align: center; min-width: 0;
}
.ec-color.active { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 2px 2px 0 rgba(0,0,0,.3); }
.ec-color-custom { border-style: dashed; color: var(--muted); }
/* 尺码步进器行 */
.ec-sizes { display: flex; flex-direction: column; gap: 8px; }
.ec-size-row {
  display: flex; align-items: center; justify-content: space-between;
  background: #fff; border: 2px solid var(--ink); border-radius: 4px; padding: 8px 12px;
}
.ec-size-info b { font-size: .92rem; font-weight: 900; margin-right: 8px; }
.ec-size-info span { font-size: .7rem; color: #1a7f37; font-weight: 700; }
.ec-size-custom {
  border: 2px dashed var(--line); background: none; border-radius: 4px; padding: 9px;
  font-weight: 800; font-size: .8rem; color: var(--muted); cursor: pointer;
}
/* 步进器 */
.ec-stepper { display: inline-flex; align-items: center; gap: 0; border: 2px solid var(--ink); border-radius: 3px; overflow: hidden; }
.ec-step {
  width: 32px; height: 30px; background: #fff; border: none; font-size: 1.05rem; font-weight: 900;
  cursor: pointer; color: var(--ink); line-height: 1;
}
.ec-step:active { background: var(--accent); color: #fff; }
.ec-stepper i { font-style: normal; min-width: 34px; text-align: center; font-weight: 900; font-size: .9rem; border-left: 1.5px solid var(--line); border-right: 1.5px solid var(--line); align-self: stretch; display: flex; align-items: center; justify-content: center; background: #faf7f0; }
.ec-sp-bar {
  display: flex; align-items: center; gap: 12px; margin-top: 16px; padding-top: 12px;
  border-top: 2px solid var(--line); position: sticky; bottom: -18px; background: var(--card);
}
.ec-sp-total { flex: 1; font-weight: 900; font-size: 1.05rem; color: var(--accent); }
.ec-sp-add {
  background: var(--accent); color: #fff; border: none; font-weight: 900; font-size: .95rem;
  padding: 12px 26px; border-radius: 2px; letter-spacing: 1px; box-shadow: 3px 3px 0 rgba(0,0,0,.3);
}
/* 购物车弹层 */
.ec-cart-t { font-size: 1rem; font-weight: 900; margin: 4px 0 12px; }
.ec-cart-lines { display: flex; flex-direction: column; gap: 8px; }
.ec-cart-line {
  display: flex; align-items: center; gap: 10px; background: #fff; border: 2px solid var(--ink);
  border-radius: 4px; padding: 9px 11px;
}
.ec-cl-info { flex: 1; min-width: 0; }
.ec-cl-info b { font-size: .86rem; font-weight: 800; display: block; }
.ec-cl-spec { font-size: .75rem; color: var(--muted); margin-top: 2px; }
.ec-cl-del {
  background: none; border: none; color: #c62828; font-size: .74rem; font-weight: 800; cursor: pointer;
  text-decoration: underline; flex: 0 0 auto; padding: 4px;
}
.ec-cart-remark { margin-top: 14px; }
.ec-cart-remark label { display: block; font-size: .8rem; font-weight: 800; margin-bottom: 5px; }
.ec-cart-remark .field { width: 100%; padding: 9px; }
@media (max-width: 380px) { .ec-colors { grid-template-columns: repeat(3, 1fr); } }

/* ============ 手写下单 ============ */
.ec-page-hd { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.btn-hw {
  background: var(--ink); color: #fff; border: 2px solid var(--ink); font-weight: 900;
  padding: 8px 14px; border-radius: 3px; box-shadow: 3px 3px 0 var(--accent); white-space: nowrap;
}
.btn-hw:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--accent); }
.ec-hw-sheet { max-height: 88vh; }
.hw-input {
  width: 100%; border: 2.5px solid var(--ink); border-radius: 4px; padding: 12px;
  font-size: 1rem; font-family: inherit; line-height: 1.5; resize: vertical; background: #fffdf6;
}
.hw-tips { margin-top: 8px; font-size: .78rem; color: #6b6355; line-height: 1.6; }
.hw-tips code { background: #efe6d2; padding: 1px 5px; border-radius: 3px; color: var(--ink); font-weight: 700; word-break: break-all; }
.hw-parse-btn { width: 100%; margin-top: 12px; font-size: 1.05rem; padding: 13px; }
.hw-warn {
  margin-top: 10px; background: #fff4e5; border-left: 4px solid var(--accent);
  padding: 8px 10px; font-size: .82rem; font-weight: 700; color: #8a3c00; border-radius: 0 3px 3px 0;
}
.hw-rows { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.hw-row { border: 2px solid var(--ink); border-radius: 4px; background: #fffdf6; padding: 10px 12px; box-shadow: 3px 3px 0 rgba(23,20,15,.12); }
.hw-prod { font-weight: 900; font-size: .92rem; margin-bottom: 8px; }
.hw-prod em { font-style: normal; color: var(--accent); font-size: .82rem; margin-left: 4px; }
.hw-spec { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hw-color {
  background: var(--accent); color: #fff; font-weight: 900; padding: 5px 12px; border-radius: 3px; font-size: .85rem;
}
.hw-color-sel { border: 2px solid #d0342c; border-radius: 3px; padding: 5px 8px; font-weight: 800; font-size: .85rem; background: #fff; }
.hw-size {
  background: var(--ink); color: #fff; font-weight: 900; padding: 5px 12px; border-radius: 3px; font-size: .9rem;
  min-width: 52px; text-align: center;
}
.hw-row .ec-stepper { margin-left: auto; }
.hw-del {
  border: 2px solid #d0342c; background: #fff; color: #d0342c; font-weight: 900;
  border-radius: 3px; padding: 5px 10px; font-size: .8rem;
}
.hw-del:active { background: #d0342c; color: #fff; }


/* ============== 材料质检（material QC） ============== */
/* 列表卡片 */
.qc-card { border: 2px solid var(--line,#1a1a1a); background:#fff; border-radius:6px; margin-bottom:12px; box-shadow:3px 3px 0 rgba(26,26,26,.12); overflow:hidden; }
.qc-card-main { display:flex; gap:12px; padding:12px; cursor:pointer; }
.qc-card-main:active { background:#faf3ea; }
.qc-thumb { width:72px; height:72px; object-fit:cover; border:2px solid var(--line,#1a1a1a); border-radius:4px; flex:0 0 72px; background:#eee; }
.qc-thumb-empty { display:flex; align-items:center; justify-content:center; font-size:.72rem; color:#999; background:#f0ece4; }
.qc-card-info { flex:1; min-width:0; }
.qc-no { font-weight:900; font-size:.78rem; color:#e8590c; letter-spacing:.5px; }
.qc-name { font-weight:800; font-size:1.02rem; margin:2px 0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.qc-sub { font-size:.8rem; color:#555; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.qc-perm { font-size:.72rem; color:#888; margin-top:4px; }
.qc-card-ops { display:flex; gap:8px; padding:0 12px 12px; }
.qc-card-ops .btn-sm { flex:1; padding:7px 4px; font-size:.82rem; }
.qc-del-btn { background:#fff; color:#d0342c; border:2px solid #d0342c; font-weight:900; }
.qc-del-btn:active { background:#d0342c; color:#fff; }

/* 编辑页 */
.qc-grid-2 { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
@media (max-width:380px){ .qc-grid-2 { grid-template-columns:1fr; } }
.qc-section-title { margin:18px 0 10px; padding:6px 10px; background:var(--ink,#1a1a1a); color:#fff; font-weight:900; font-size:.9rem; border-radius:4px; letter-spacing:1px; }
.qc-photo-bar { display:flex; gap:10px; margin-bottom:10px; flex-wrap:wrap; }
.qc-add-photo { display:inline-block; border:2px dashed #b0a89a; background:#faf7f0; color:#555; padding:10px 16px; border-radius:6px; font-weight:800; font-size:.88rem; cursor:pointer; }
.qc-add-photo:active { background:#f0e9d8; }
.qc-add-label { border-color:#e8590c; color:#e8590c; background:#fff6ef; }
.qc-photo-empty { border:2px dashed #d8d0c2; background:#faf7f0; border-radius:6px; padding:16px; font-size:.8rem; color:#999; line-height:1.6; }
.qc-photo-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(104px,1fr)); gap:10px; }
.qc-photo { position:relative; }
.qc-photo img { width:100%; height:104px; object-fit:cover; border:2px solid var(--line,#1a1a1a); border-radius:4px; cursor:zoom-in; display:block; }
.qc-photo-tag { position:absolute; left:0; bottom:0; right:0; background:rgba(26,26,26,.78); color:#fff; font-size:.66rem; text-align:center; padding:2px 0; border-radius:0 0 2px 2px; }
.qc-photo-del { position:absolute; top:2px; right:2px; width:24px; height:24px; border-radius:50%; border:2px solid #fff; background:#d0342c; color:#fff; font-weight:900; font-size:.8rem; line-height:1; display:flex; align-items:center; justify-content:center; cursor:pointer; box-shadow:0 1px 3px rgba(0,0,0,.4); }
.qc-perm-box { display:grid; grid-template-columns:repeat(auto-fill,minmax(110px,1fr)); gap:10px; }
.qc-perm-sw { display:flex; align-items:center; gap:8px; border:2px solid var(--line,#1a1a1a); border-radius:6px; padding:10px; font-weight:800; font-size:.88rem; cursor:pointer; background:#fff; }
.qc-perm-sw input { width:20px; height:20px; accent-color:#e8590c; }
.qc-perm-sw:has(input:checked) { background:#fff2e8; border-color:#e8590c; color:#d9480f; }

/* 扫码公开报告页 */
.qc-lock { text-align:center; padding:34px 18px; }
.qc-lock h3 { margin:12px 0 8px; font-weight:900; }
.qcview-head { display:flex; align-items:center; justify-content:space-between; gap:10px; border-bottom:3px solid #e8590c; padding-bottom:10px; margin-bottom:12px; flex-wrap:wrap; }
.qcview-badge { background:var(--ink,#1a1a1a); color:#fff; font-weight:900; padding:6px 12px; border-radius:4px; font-size:.9rem; letter-spacing:.5px; }
.qcview-who { font-size:.76rem; color:#888; }
.qcview-title { font-size:1.4rem; font-weight:900; margin:4px 0 14px; }
.qcview-photos { display:grid; grid-template-columns:repeat(auto-fill,minmax(140px,1fr)); gap:10px; margin-bottom:14px; }
.qcview-photo { width:100%; height:160px; object-fit:cover; border:2px solid var(--line,#1a1a1a); border-radius:4px; cursor:zoom-in; }
.qcview-photo.is-label { grid-column:1 / -1; height:auto; max-height:420px; width:100%; border-color:#e8590c; }
.qcview-photo-flag { grid-column:1 / -1; margin-top:-8px; background:#fff2e8; color:#d9480f; border:2px solid #e8590c; border-top:none; border-radius:0 0 4px 4px; padding:4px 10px; font-size:.78rem; font-weight:800; }
.qcview-sec { background:var(--ink,#1a1a1a); color:#fff; font-weight:900; padding:6px 10px; border-radius:4px; font-size:.9rem; margin:16px 0 8px; letter-spacing:1px; }
.qcview-rows { border:2px solid var(--line,#1a1a1a); border-radius:6px; overflow:hidden; }
.qcview-row { display:flex; border-bottom:1px solid #e5ddcf; }
.qcview-row:last-child { border-bottom:none; }
.qcview-k { flex:0 0 96px; background:#f7f2e8; padding:9px 10px; font-weight:800; font-size:.82rem; color:#555; border-right:2px solid var(--line,#1a1a1a); display:flex; align-items:center; }
.qcview-v { flex:1; padding:9px 12px; font-size:.9rem; white-space:pre-wrap; word-break:break-word; }
.qcview-foot { text-align:center; color:#999; font-size:.74rem; margin-top:20px; }

/* 材料质检 OCR 识别按钮/提示 */
.qc-ocr-btn { background:#eef5ff; color:#1668dc; border:2px solid #1668dc; font-weight:900; }
.qc-ocr-btn:disabled { opacity:.5; cursor:not-allowed; background:#f0ece4; color:#999; border-color:#c8c0b2; }
.qc-ocr-btn:active:not(:disabled) { background:#dbe9ff; }
.qc-ocr-tip { margin-top:8px; border:2px solid #1668dc; background:#eef5ff; color:#0b4fa8; border-radius:6px; padding:8px 12px; font-size:.82rem; line-height:1.6; font-weight:700; }
.qc-ocr-tip.err { border-color:#d0342c; background:#fdecea; color:#a02018; }

/* ============== 裁剪工资面板（cutting wage） ============== */
.cw-panel { border:2px solid var(--line,#1a1a1a); border-radius:8px; background:#fff; box-shadow:3px 3px 0 rgba(26,26,26,.12); overflow:hidden; }
.cw-head { width:100%; display:flex; align-items:center; justify-content:space-between; padding:14px 16px; background:var(--ink,#1a1a1a); color:#fff; border:none; cursor:pointer; font-weight:900; font-size:1.02rem; }
.cw-head:active { background:#000; }
.cw-title { letter-spacing:1px; }
.cw-arrow { color:#ff8a3d; font-size:.85rem; transition:transform .2s; }
.cw-body { padding:14px 16px; }
.cw-range { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:10px; }
.cw-rng { display:flex; align-items:center; gap:5px; border:2px solid var(--line,#1a1a1a); border-radius:6px; padding:7px 12px; font-weight:800; font-size:.86rem; cursor:pointer; background:#fff; }
.cw-rng input { accent-color:#e8590c; width:17px; height:17px; }
.cw-rng:has(input:checked) { background:#fff2e8; border-color:#e8590c; color:#d9480f; }
.cw-dates { display:flex; align-items:center; gap:8px; margin-bottom:12px; flex-wrap:wrap; }
.cw-dates input[type="date"] { border:2px solid var(--line,#1a1a1a); border-radius:6px; padding:8px 10px; font-size:.88rem; font-weight:700; }
.cw-summary { display:flex; gap:10px; background:#f7f2e8; border:2px solid var(--line,#1a1a1a); border-radius:6px; padding:12px; margin-bottom:12px; }
.cw-sum-item { flex:1; text-align:center; display:flex; flex-direction:column; gap:2px; }
.cw-sum-item b { font-size:1.25rem; color:#d9480f; }
.cw-sum-item span { font-size:.74rem; color:#666; font-weight:700; }
.cw-loading { color:#888; font-size:.86rem; font-weight:700; }
.cw-err { color:#d0342c; font-size:.86rem; font-weight:800; }
/* 裁剪工资补发（单件裁剪价页顶部） */
.cwbf-ok { padding:14px; text-align:center; font-size:.86rem; font-weight:700; color:#2f9e44; background:#ebfbee; border:2px solid #2f9e44; border-radius:6px; }
.cwbf-err { padding:14px; text-align:center; font-size:.86rem; font-weight:700; color:#d0342c; background:#fff; border:2px dashed #d0342c; border-radius:6px; line-height:1.5; }
.cwbf-head { display:flex; flex-direction:column; gap:4px; margin-bottom:10px; }
.cwbf-head b { font-size:1rem; color:#1a1a1a; }
.cwbf-sub { font-size:.76rem; color:#777; font-weight:700; line-height:1.5; }
.cwbf-rows { display:flex; flex-direction:column; gap:6px; margin-bottom:10px; }
.cwbf-row { display:grid; grid-template-columns: 1.4rem 3.6rem 1fr auto auto auto; align-items:center; gap:8px; padding:8px 10px; border:2px solid #1a1a1a; border-radius:5px; background:#fff; font-size:.82rem; font-weight:700; cursor:pointer; position:relative; }
.cwbf-row:has(.cwbf-chk:not(:checked)) { border-color:#aaa; opacity:.72; }
.cwbf-row-nop { border:2px dashed #d0342c; opacity:.8; cursor:default; }
.cwbf-chk { width:18px; height:18px; accent-color:#d9480f; cursor:pointer; justify-self:start; }
.cwbf-rowwrap { display:flex; flex-direction:column; gap:5px; }
.cwbf-ignore { align-self:flex-end; border:2px dashed #d0342c; color:#d0342c; background:#fff; border-radius:5px; padding:3px 9px; font-size:.74rem; font-weight:800; cursor:pointer; }
.cwbf-ignore:disabled { opacity:.5; cursor:default; }
.cwbf-row-ign { border-color:#999; background:#f6f4ef; }
.cwbf-rowwarpi { display:grid; grid-template-columns:1fr auto; align-items:center; gap:8px; }
.cwbf-restore { border:2px solid #2f9e44; color:#2f9e44; background:#fff; border-radius:5px; padding:4px 10px; font-size:.76rem; font-weight:800; cursor:pointer; }
.cwbf-restore:disabled { opacity:.5; cursor:default; }
.cwbf-bed { background:#1a1a1a; color:#fff; border-radius:4px; padding:2px 6px; text-align:center; font-size:.78rem; }
.cwbf-code { color:#1a1a1a; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cwbf-qty { color:#555; }
.cwbf-cutby { color:#888; font-size:.76rem; }
.cwbf-amt { color:#d9480f; font-weight:800; }
.cwbf-noprice { color:#d0342c; font-size:.76rem; font-weight:800; }
.cwbf-total { background:#fff3bf; border:2px solid #e67700; border-radius:5px; padding:8px 10px; font-size:.84rem; font-weight:700; color:#1a1a1a; margin-bottom:8px; }
.cwbf-total b { color:#d9480f; }
.cwbf-warn { background:#fff; border:2px dashed #d0342c; border-radius:5px; padding:8px 10px; font-size:.8rem; font-weight:700; color:#d0342c; margin-bottom:8px; line-height:1.5; }
.cw-empty { border:2px dashed #d8d0c2; border-radius:6px; padding:16px; font-size:.82rem; color:#999; line-height:1.7; text-align:center; }
.cwrs-head { display:flex; flex-direction:column; gap:4px; margin-bottom:10px; }
.cwrs-head b { font-size:1rem; color:#1a1a1a; }
.cwrs-sub { font-size:.76rem; color:#777; font-weight:700; line-height:1.5; }
.cwrs-sub b { color:#d9480f; }
.cwrs-btn { width:100%; text-align:center; }
.cw-bed { border:2px solid var(--line,#1a1a1a); border-radius:6px; margin-bottom:8px; overflow:hidden; }
.cw-bed-head { width:100%; display:flex; align-items:center; gap:8px; padding:11px 12px; background:#fff; border:none; cursor:pointer; text-align:left; }
.cw-bed-head:active { background:#faf3ea; }
.cw-bed-no { font-weight:900; font-size:.92rem; }
.cw-bed-meta { flex:1; font-size:.74rem; color:#888; font-weight:700; }
.cw-bed-amt { font-weight:900; color:#d9480f; font-size:.98rem; }
.cw-bed-arrow { color:#e8590c; font-size:.75rem; }
.cw-bed-body { border-top:1px dashed #d8d0c2; background:#fdfbf6; }
.cw-line { display:flex; align-items:center; gap:8px; padding:9px 12px; border-bottom:1px solid #eee6d8; font-size:.84rem; }
.cw-line:last-child { border-bottom:none; }
.cw-line-name { flex:1; min-width:0; font-weight:700; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cw-line-code { color:#999; font-size:.76rem; font-weight:700; }
.cw-line-qty { color:#555; font-weight:700; white-space:nowrap; }
.cw-line-amt { color:#d9480f; font-weight:900; white-space:nowrap; min-width:64px; text-align:right; }
.cw-empty-btn { display:inline-block; margin-top:6px; text-decoration:none; }

/* 裁剪车间：工资面板上方管理员设置入口 */
.cut-wage-setup { display:flex; align-items:center; gap:10px; margin-bottom:10px; flex-wrap:wrap; }
.cut-wage-setup-tip { font-size:.76rem; color:#888; font-weight:700; }

/* ============== 单件裁剪价集中设置（cut price） ============== */
.cpp-toolbar { display:flex; align-items:center; gap:10px; padding:12px 14px; flex-wrap:wrap; }
.cpp-set-count { font-size:.82rem; font-weight:800; color:#d9480f; white-space:nowrap; }
.cpp-list { padding:0 14px 6px; }
.cpp-row { display:flex; align-items:center; gap:10px; padding:10px 12px; border:2px solid var(--line,#1a1a1a); border-radius:6px; margin-bottom:8px; background:#fff; box-shadow:2px 2px 0 rgba(26,26,26,.08); }
.cpp-row-set { border-color:#e8590c; background:#fff7f1; }
.cpp-prod { flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; }
.cpp-code { font-weight:900; font-size:.95rem; }
.cpp-name { font-size:.78rem; color:#777; font-weight:700; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cpp-price { display:flex; align-items:center; gap:6px; flex:none; }
.cpp-input { width:92px; min-height:40px; text-align:right; font-weight:900; font-size:1rem; color:#d9480f; }
.cpp-unit { font-size:.78rem; color:#888; font-weight:800; }

/* 工单页一键填数量 */
.o-qty-fill { display:flex; align-items:center; gap:8px; margin-top:6px; flex-wrap:wrap; }
.o-qty-input { width:110px; flex:0 0 auto; text-align:center; font-weight:800; }
.o-qty-fill .btn { flex:0 0 auto; }
.o-qty-hint { font-size:.76rem; color:#999; font-weight:700; }

/* ============ v140 仓库需求发布 + 车间需求货品 ============ */
.wh-tabs-7 .wh-tab { padding:.42rem .18rem; font-size:.78em; }
.wh-tabs-8 { flex-wrap: wrap; }
.wh-tabs-8 .wh-tab { flex:0 0 calc(25% - 6px); padding:.42rem .1rem; font-size:.74em; line-height:1.25; }
.rq-form { background:var(--card); border:1px solid var(--line); border-radius:14px; padding:16px; margin-bottom:16px; }
.rq-form-t { margin:0 0 4px; font-size:1rem; }
.rq-form-sub { margin:0 0 12px; font-size:.78rem; color:#8a7a66; line-height:1.5; }
.rq-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-bottom:12px; }
.rq-fld { display:flex; flex-direction:column; gap:4px; }
.rq-fld span { font-size:.72rem; color:#8a7a66; font-weight:700; }
.rq-fld-wide { grid-column:1 / -1; }
.rq-submit { width:100%; }
.rq-sec { margin-top:16px; }
.rq-block-head { font-size:.86rem; margin-bottom:8px; color:#3a2b1a; }
.rq-empty { font-size:.78rem; color:#9aa; padding:6px 0 10px; }
.rq-list { display:flex; flex-direction:column; gap:10px; }
.rq-item { background:var(--card); border:1px solid var(--line); border-left:4px solid #cfa85c; border-radius:12px; padding:12px 14px; }
.rq-item.done { border-left-color:#4caf7d; opacity:.82; }
.rq-item.cancelled { border-left-color:#bbb; opacity:.6; }
.rq-item-head { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:4px; margin-bottom:4px; }
.rq-no { font-size:.72rem; color:#8a7a66; font-weight:700; }
.rq-who { font-size:.72rem; color:#9a7b3a; font-weight:700; margin-left:auto; white-space:nowrap; }
.rq-status { font-size:.7rem; padding:2px 8px; border-radius:99px; font-weight:800; }
.rq-st-active { background:#fff3dd; color:#b07d1d; }
.rq-st-done { background:#e6f6ec; color:#2e8b57; }
.rq-st-cancel { background:#eee; color:#888; }
.rq-prod { font-weight:800; font-size:.95rem; }
.rq-spec { font-size:.85rem; color:#555; margin-top:2px; }
.rq-due { font-size:.76rem; color:#b05a1d; font-weight:700; margin-top:4px; }
.rq-due.is-overdue, .rq-item .rq-due.is-overdue { color:#e03030; }
.rq-note { font-size:.76rem; color:#7a6a55; margin-top:3px; }
.rq-prog { display:flex; align-items:center; gap:8px; margin-top:8px; }
.rq-prog-bar { height:8px; border-radius:99px; background:#fff0d6; flex:1; min-width:40px; overflow:hidden; position:relative; }
.rq-prog-bar::after { content:""; position:absolute; left:0; top:0; bottom:0; width:0; }
.rq-prog-bar { background:linear-gradient(90deg,#e8c57a,#cfa85c); }
.rq-prog > span { font-size:.72rem; color:#8a7a66; font-weight:700; }
.rq-done-meta { font-size:.75rem; color:#8a7a66; margin-top:6px; }
.rq-ops { margin-top:10px; }
.rq-sub-note { font-size:.8rem; color:#8a7a66; line-height:1.5; margin:6px 0 10px; }
.rq-summary { font-size:.82rem; color:#3a2b1a; margin-bottom:10px; }

/* 车间端需求货品卡 */
.wrq-item .rq-prod { font-size:1.05rem; }
.claim-entry-req { background:#fffbef; border-color:#ecd9a8; }
.claim-entry-req .me-cell-t { color:#9a6f1d; }
.claim-badge-req { background:#b07d1d; color:#fff; }

/* v142.1 仓库发布 宽 pan Safari 溢出修复 */
.rq-grid { min-width: 0; }
.rq-fld { min-width: 0; }
.rq-fld .field, .rq-fld select.field, .rq-fld input.field {
  width: 100%; box-sizing: border-box; min-width: 0; height: 42px;
  padding: 8px 10px; font-size: .86rem;
  background: #fff; border: 1px solid var(--line); border-radius: 9px;
  -webkit-appearance: none; appearance: none;
}
.rq-fld select.field {
  background-image: linear-gradient(45deg, transparent 50%, #8a7a66 50%),
    linear-gradient(135deg, #8a7a66 50%, transparent 50%);
  background-position: calc(100% - 16px) calc(50% - 2px), calc(100% - 11px) calc(50% - 2px);
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 30px;
}
.rq-fld-wide { min-width: 0; }
.rq-fld-wide input.field { width: 100%; }
/* 需求发布：多型号批量行 */
.rq-batch-head { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-bottom:12px; }
.rq-batch-rows { display:flex; flex-direction:column; gap:10px; margin-bottom:10px; }
.rq-row { display:grid; grid-template-columns:auto 1.4fr 1fr 1fr 1fr 34px; gap:8px; align-items:end; position:relative;
  border:1px dashed var(--line); border-radius:10px; padding:8px; background:rgba(0,0,0,.015); }
.rq-row-idx { align-self:center; font-weight:800; color:#b9a98e; font-size:.85rem; text-align:center; min-width:20px; }
.rq-del-row { align-self:center; height:34px; width:34px; border-radius:8px; background:#f7ece8; color:#c0392b; border:1px solid #f0d6cf; font-weight:800; }
.rq-del-row:disabled { opacity:.3; cursor:not-allowed; }
.rq-add-row { width:100%; border-style:dashed; color:#2c2c2c; background:transparent; border-color:#d8cbb8; }
@media (max-width:560px){ .rq-batch-head{grid-template-columns:1fr;} .rq-row{grid-template-columns:1fr 1fr;} .rq-row-prod{grid-column:1/-1;} .rq-row-idx{grid-column:1/-1; text-align:left;} }

/* ===== 旺店通 ERP 对接页 (#/hywork/erp) ===== */
.erp-status { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: .95rem; padding: 10px 12px; border-radius: 10px; margin-bottom: 10px; }
.erp-status.is-on { background: #e6f6ed; color: #1d7a45; border: 1px solid #b6e3c8; }
.erp-status.is-off { background: #f3f1ec; color: #6f675c; border: 1px solid var(--line); }
.erp-dot { width: 10px; height: 10px; border-radius: 50%; background: currentColor; flex: none; box-shadow: 0 0 0 3px rgba(0,0,0,.04); }
.erp-mode-tag { margin-left: auto; font-size: .72rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: rgba(0,0,0,.08); }
.erp-statline { font-size: .8rem; color: var(--gray); margin-bottom: 12px; }
.erp-statline b { color: #1b1d21; }
.erp-ok-n { color: #1d7a45 !important; }
.erp-fail-n { color: #c0392b !important; }
.erp-switch { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: .9rem; padding: 10px 0; border-top: 1px dashed var(--line); }
.erp-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 12px; }
.erp-mode { display: block; border: 2px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; background: #fff; font-weight: 800; font-size: .88rem; line-height: 1.3; }
.erp-mode input { display: none; }
.erp-mode small { font-weight: 600; color: var(--gray); font-size: .7rem; }
.erp-mode.sel { border-color: #1b1d21; background: #f6f4ef; box-shadow: 0 2px 0 #1b1d21; }
.erp-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.erp-form label { display: flex; flex-direction: column; gap: 4px; font-size: .76rem; font-weight: 700; color: var(--gray); }
.erp-form label:nth-child(5), .erp-form label:nth-child(6) { grid-column: 1 / -1; }
.erp-form .field { width: 100%; height: 40px; box-sizing: border-box; }
.erp-tip { font-size: .74rem; color: var(--gray); line-height: 1.6; background: #fbf7ee; border: 1px dashed #ddcba4; border-radius: 8px; padding: 8px 10px; margin: 12px 0; }
.erp-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.erp-dry-pre { white-space: pre-wrap; word-break: break-all; background: #1b1d21; color: #d6f5d6; border-radius: 8px; padding: 10px; font-size: .72rem; line-height: 1.5; max-height: 46vh; overflow: auto; margin: 0; }
.erp-q-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.erp-q-tools { display: flex; align-items: center; gap: 8px; }
.erp-filter { width: auto; height: 36px; padding: 4px 8px; font-size: .8rem; }
.erp-rows { display: flex; flex-direction: column; gap: 8px; }
.erp-row { border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; background: #fff; }
.erp-row-success { background: #f7fcf9; }
.erp-row-failed { border-color: #e6b3aa; background: #fdf4f2; }
.erp-row-main { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.erp-r-code { font-weight: 800; font-size: .9rem; }
.erp-r-sku { font-size: .7rem; font-weight: 800; color: #5a3d00; background: #fdeccb; border: 1px solid #e6cd95; border-radius: 4px; padding: 2px 6px; font-family: inherit; line-height: 1.4; cursor: pointer; }
button.erp-r-sku:hover { outline: 2px solid rgba(232,89,12,.4); }
.erp-r-sku-none { color: #9a938a; background: #f2f0ec; border-color: var(--line); font-weight: 700; }
.erp-r-cs { font-size: .8rem; color: var(--gray); }
.erp-r-qty { font-weight: 800; color: #114b8a; font-size: .82rem; }
.erp-r-bed { font-size: .7rem; font-weight: 800; color: #8a5a00; background: #fbeccb; border-radius: 4px; padding: 0 5px; }
.erp-r-time { margin-left: auto; font-size: .7rem; color: var(--gray); }
.erp-r-resp { font-size: .7rem; color: #9c4a3c; background: rgba(0,0,0,.03); border-radius: 6px; padding: 6px 8px; margin: 6px 0 0; word-break: break-all; white-space: pre-wrap; max-height: 120px; overflow: auto; }
.erp-row-actions { display: flex; align-items: center; gap: 8px; margin-top: 7px; }
.erp-r-wh { font-size: .7rem; color: var(--gray); }
.erp-badge { font-size: .68rem; font-weight: 800; border-radius: 999px; padding: 1px 8px; }
.erp-b-ok { background: #e6f6ed; color: #1d7a45; }
.erp-b-fail { background: #fbe0db; color: #c0392b; }
.erp-b-pend { background: #fff2d6; color: #8a5a00; }
@media (max-width: 560px) {
  .erp-form { grid-template-columns: 1fr; }
  .erp-modes { grid-template-columns: 1fr; }
}


/* ============ v171 仓库端只读生产进度 ============ */
.pg-filter { display:flex; gap:6px; margin-top:8px; flex-wrap:wrap; }
.pg-fbtn { border:1px solid var(--line); background:var(--card); color:#666; border-radius:999px;
  padding:5px 14px; font-size:.8rem; font-weight:700; cursor:pointer; }
.pg-fbtn.on { background:#2b2b2b; color:#fff; border-color:#2b2b2b; }
.op-modal-readonly { max-height:88vh; overflow-y:auto; }
.op-readonly-tag { display:inline-block; background:#fff4e6; color:#d9480f; border:1px solid #ffd8a8;
  font-size:.72rem; font-weight:800; padding:3px 10px; border-radius:999px; margin-bottom:8px; }

/* ===== 全站 ICP 备案页脚（备案要求：首页底部居中 + 链接工信部）===== */
.icp-footer {
  text-align: center;
  padding: 18px 12px calc(20px + env(safe-area-inset-bottom));
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.6;
  color: #9a948a;
}
.icp-footer a { color: #9a948a; text-decoration: none; }
.icp-footer a:hover { color: #6b665c; text-decoration: underline; }
@media print {
  .icp-footer { display: none !important; }
}
