/* style.css —— 小程序 WXSS 逐条移植（类名与 miniprogram 一致） + 网页外壳（tabBar/调整页/手机框） */

/* ===== 外壳 ===== */
html, body { background: #e8e9ec; }
body { font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", sans-serif; font-size: 14px; color: #1f2329; margin: 0; }
.phone { max-width: 414px; margin: 0 auto; min-height: 100vh; background: #f7f7fa; position: relative; box-shadow: 0 0 30px rgba(0,0,0,.08); }
.page { display: none; padding-bottom: 64px; }
.page.on { display: block; }
#err-banner { display: none; background: #fff1f0; color: #fa5151; font-size: 12px; padding: 8px 14px; line-height: 1.7; }

/* ===== tabBar（对齐 app.json） ===== */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 414px;
  background: #fff; border-top: 1px solid #000; display: flex; z-index: 60; padding-bottom: env(safe-area-inset-bottom);
  border-top-width: .5px; border-top-color: rgba(0,0,0,.25);
}
.tb { flex: 1; text-align: center; padding: 5px 0 4px; cursor: pointer; color: #9aa0a6; user-select: none; }
.tb img { width: 26px; height: 26px; display: block; margin: 0 auto; }
.tb .l { font-size: 10px; margin-top: 1px; }
.tb.on { color: #07c160; }
.tb.on .l { font-weight: 600; }

/* ===== 调整弹层（底部上浮，对齐 pages/adjust → sheet） ===== */
.sheet-qval {
  width: 100%; box-sizing: border-box; background: #f2f3f5; border: none; border-radius: 11px;
  padding: 12px 12px; font-size: 19px; font-weight: 700; text-align: center;
  font-family: inherit; outline: none; margin-bottom: 10px;
}
.sheet .note { margin-bottom: 14px; }

/* ===== app.wxss ===== */
:root { --green: #07c160; --red: #fa5151; --amber: #f08200; --blue: #3c7ddd; }
.container { padding: 12px 14px 24px; }
.muted { color: #9aa0a6; font-size: 12px; }
.num { font-variant-numeric: tabular-nums; }
.green { color: var(--green); }
.red { color: var(--red); }
.amber { color: var(--amber); }
.btn-primary {
  background: var(--green); color: #fff; border-radius: 12px; border: none; width: 100%;
  font-size: 15px; font-weight: 600; padding: 12px 0; text-align: center; cursor: pointer; display: block;
}
.btn-danger { background: var(--red); }
.btn-ghost {
  background: #fff; color: #5f6672; border: 1px solid #e3e5e8;
  border-radius: 12px; font-size: 14px; padding: 10px 0; text-align: center; cursor: pointer; width: 100%; display: block;
}
.link-btn { color: var(--blue); font-size: 13px; background: none; padding: 0; line-height: 1.6; display: inline; border: none; cursor: pointer; }
.card { background: #fff; border-radius: 14px; padding: 14px; box-shadow: 0 1px 3px rgba(0,0,0,.04); margin-bottom: 12px; }
.empty { text-align: center; color: #9aa0a6; font-size: 13px; padding: 40px 0; line-height: 2; white-space: pre-line; }
.swatch { width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; box-shadow: inset 0 -2px 3px rgba(0,0,0,.18), inset 0 1.5px 2px rgba(255,255,255,.5); display: inline-block; border: none; }

/* ===== icons.wxss（原型 SVG 一比一） ===== */
.ic { width: 20px; height: 20px; display: inline-block; background-size: 100% 100%; background-repeat: no-repeat; background-position: center; flex-shrink: 0; }
.ic-main { background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%2307c160%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%205v14M5%2012h14%22%2F%3E%3Crect%20x%3D%223%22%20y%3D%223%22%20width%3D%2218%22%20height%3D%2218%22%20rx%3D%224%22%2F%3E%3C%2Fsvg%3E"); }
.ic-out { background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23e6484d%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M7%203v8a2%202%200%200%200%202%202h2%22%2F%3E%3Cpath%20d%3D%22M9%2021c3%200%205-2%205-5V9%22%2F%3E%3Ccircle%20cx%3D%2218%22%20cy%3D%225%22%20r%3D%222.5%22%2F%3E%3Ccircle%20cx%3D%226%22%20cy%3D%225%22%20r%3D%222.5%22%2F%3E%3C%2Fsvg%3E"); }
.ic-imp { background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%233c7ddd%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%203v12m0%200l-4-4m4%204l4-4%22%2F%3E%3Cpath%20d%3D%22M4%2017v2a2%202%200%200%200%202%202h12a2%202%200%200%200%202-2v-2%22%2F%3E%3C%2Fsvg%3E"); }
.ic-bk { background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%237a5cc7%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cellipse%20cx%3D%2212%22%20cy%3D%225.5%22%20rx%3D%227%22%20ry%3D%222.8%22%2F%3E%3Cpath%20d%3D%22M5%205.5v6c0%201.5%203.1%202.8%207%202.8s7-1.3%207-2.8v-6%22%2F%3E%3Cpath%20d%3D%22M5%2011.5v6c0%201.5%203.1%202.8%207%202.8s7-1.3%207-2.8v-6%22%2F%3E%3C%2Fsvg%3E"); }
.ic-doc { background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%239aa0a6%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Crect%20x%3D%224%22%20y%3D%223%22%20width%3D%2216%22%20height%3D%2218%22%20rx%3D%222%22%2F%3E%3Cpath%20d%3D%22M8%208h8M8%2012h8M8%2016h5%22%2F%3E%3C%2Fsvg%3E"); }

/* ===== stock.wxss ===== */
.sum-card .nums { display: flex; gap: 10px; margin-bottom: 12px; }
.sum-card .n { flex: 1; text-align: center; }
.sum-card .v { font-size: 21px; font-weight: 800; }
.sum-card .k { font-size: 11px; color: #9aa0a6; margin-top: 2px; }
.act-row { display: flex; gap: 6px; }
.act {
  flex: 1; border: none; border-radius: 12px; padding: 10px 0 8px; margin: 0; cursor: pointer;
  font-size: 11px; font-weight: 600; line-height: 1.5; color: inherit; font-family: inherit;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.act .ic { margin: 0; }
.act-main { background: rgba(7,193,96,.1); color: #07a858; }
.act-out { background: rgba(250,81,81,.08); color: #e6484d; }
.act-imp { background: rgba(60,125,221,.09); color: #3c7ddd; }
.act-bk { background: rgba(122,92,199,.09); color: #7a5cc7; }
.searchbar { background: #fff; border-radius: 12px; padding: 9px 14px; margin-bottom: 10px; display: flex; align-items: center; }
.searchbar input { font-size: 13.5px; width: 100%; border: none; outline: none; background: none; font-family: inherit; }
.ph::placeholder, .ph { color: #b9bec7; }
.chips { white-space: nowrap; overflow-x: auto; margin-bottom: 10px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  display: inline-block; padding: 5px 14px; border-radius: 15px; background: #fff;
  font-size: 12.5px; color: #5f6672; margin-right: 8px; font-weight: 600; cursor: pointer;
}
.chip.on { background: #07c160; color: #fff; }
.bead-list { background: #fff; border-radius: 14px; overflow: hidden; }
.brow { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-bottom: 1px solid #f2f3f5; cursor: pointer; }
.brow:last-child { border-bottom: none; }
.brow .swatch { width: 34px; height: 34px; }
.binfo { flex: 1; }
.bc { font-weight: 700; font-size: 14.5px; letter-spacing: .5px; }
.bs { font-size: 10.5px; margin-top: 1px; }
.bn { text-align: right; }
.bv { font-size: 15.5px; font-weight: 700; }
.bu { font-size: 10.5px; color: #9aa0a6; }

.mask { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 99; display: flex; align-items: flex-end; justify-content: center; }
.sheet {
  background: #fff; border-radius: 20px 20px 0 0; padding: 8px 18px 18px;
  width: 100%; max-width: 414px; box-sizing: border-box; max-height: 82vh; overflow-y: auto;
}
.grip { width: 36px; height: 4.5px; border-radius: 3px; background: #e3e5e8; margin: 6px auto 12px; }
.h4 { font-size: 16.5px; font-weight: 700; margin-bottom: 6px; }
.sub { margin-bottom: 12px; line-height: 1.7; }
.rows { margin-bottom: 10px; }
.rrow { display: flex; gap: 8px; margin-bottom: 8px; align-items: center; }
.rcode, .rqty, .rdel { flex: 1; }
.rcode { min-width: 0; background: #f2f3f5; border: none; border-radius: 11px; padding: 11px 10px; font-size: 15px; text-transform: uppercase; font-family: inherit; outline: none; }
.rqty { min-width: 0; background: #f2f3f5; border: none; border-radius: 11px; padding: 11px 8px; font-size: 15px; text-align: center; font-family: inherit; outline: none; }
.rdel { min-width: 0; height: 40px; border: none; border-radius: 10px; background: #ffecec; color: #fa5151; font-size: 14px; line-height: 40px; padding: 0; margin: 0; cursor: pointer; font-family: inherit; }
.row-between { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sm { font-size: 11px; }
.imp-text { width: 100%; box-sizing: border-box; min-height: 140px; background: #f2f3f5; border: none; border-radius: 11px; padding: 11px 12px; font-size: 13px; line-height: 1.7; margin-bottom: 10px; font-family: inherit; resize: vertical; outline: none; }
.imp-table { background: #f8f9fb; border-radius: 11px; padding: 6px 12px; }
.imp-hd, .imp-tr { display: flex; align-items: center; padding: 7px 0; font-size: 12.5px; border-bottom: 1px solid #eceef1; }
.imp-hd { color: #9aa0a6; font-size: 11px; }
.imp-tr:last-child { border-bottom: none; }
.imp-hd span, .imp-tr span { flex: 1; }
.imp-hd span:last-child, .imp-tr span:last-child { flex: 1.4; text-align: right; }
.imp-code { font-weight: 700; letter-spacing: .5px; }
.imp-new { color: #07a858; font-weight: 600; }
.imp-skip { padding: 8px 0; font-size: 11px; color: #9aa0a6; line-height: 1.7; }
.bk-btn { background: #7a5cc7; }
.bk-err { margin-top: 10px; color: #fa5151; font-size: 12px; line-height: 1.7; background: #fff5f5; border-radius: 10px; padding: 10px 12px; white-space: pre-line; }
.bk-preview { margin-top: 12px; background: #f6f2fd; border-radius: 12px; padding: 12px; font-size: 12.5px; line-height: 2; }
.bk-title { font-weight: 700; }
.bk-warn { color: #fa5151; margin: 6px 0 10px; }
.bk-ok-btn { margin-top: 10px; }

/* ===== adjust.wxss ===== */
.head { display: flex; align-items: center; gap: 12px; }
.head .big { width: 46px; height: 46px; }
.hc { font-size: 17px; font-weight: 700; }
.ht .muted { margin-top: 2px; }
.seg { display: flex; gap: 8px; margin-bottom: 12px; }
.seg-i {
  flex: 1; text-align: center; padding: 10px 0; border-radius: 11px;
  background: #f2f3f5; font-size: 14px; font-weight: 600; color: #5f6672; cursor: pointer;
}
.seg-i.on { background: rgba(7,193,96,.12); color: #07a858; }
.seg-i.on.out { background: rgba(250,81,81,.1); color: #e6484d; }
.note { background: #f2f3f5; border: none; border-radius: 11px; padding: 11px 13px; font-size: 13.5px; margin-bottom: 12px; width: 100%; box-sizing: border-box; font-family: inherit; outline: none; }
.tip { text-align: center; margin-top: 10px; line-height: 1.7; }

/* ===== pattern.wxss ===== */
.pat-card { display: flex; gap: 12px; align-items: flex-start; }
.pat-thumb {
  width: 76px; height: 76px; border-radius: 11px; flex-shrink: 0; overflow: hidden;
  background: repeating-conic-gradient(#f0f0f1 0 25%, #fff 0 50%) 0 0/14px 14px;
  border: .5px solid rgba(0,0,0,.06);
  display: flex; align-items: center; justify-content: center;
}
.pat-thumb-img { width: 100%; height: 100%; display: block; object-fit: cover; }
.pat-thumb-empty { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; background: #fff; }
.pat-info { flex: 1; min-width: 0; }
.pat-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.pt {
  flex: 1; text-align: center; padding: 8px 0; border-radius: 10px; background: #fff; cursor: pointer;
  font-size: 13px; font-weight: 600; color: #9aa0a6;
}
.pt.on { background: #e8f8ef; color: #07a858; }
.pat-card.sel { outline: 2px solid #07c160; }
.pat-name { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.st { font-size: 10px; padding: 2px 8px; border-radius: 9px; font-weight: 600; flex-shrink: 0; }
.st-todo { background: #eef1f5; color: #7a828c; }
.st-doing { background: #fff4e0; color: #e08600; }
.st-done { background: #e8f8ef; color: #07a858; }
.pat-meta { font-size: 11.5px; color: #9aa0a6; margin-top: 4px; line-height: 1.7; }
.pat-actions { display: flex; gap: 8px; margin-top: 10px; }
.pb {
  flex: 1; border-radius: 10px; font-size: 12.5px; font-weight: 600; padding: 7px 0;
  margin: 0; line-height: 1.6; border: none; cursor: pointer; font-family: inherit;
}
.pb-main { background: #07c160; color: #fff; }
.pb-warn { background: #f08200; color: #fff; }
.pb-del { background: #ffecec; color: #fa5151; flex: 0 0 64px; }
.pb-ghost { background: #f2f3f5; color: #5f6672; }
.calc-bar {
  position: fixed; left: 50%; transform: translateX(-50%) translateY(90px); width: 386px; bottom: 124px;
  background: #07c160; color: #fff; border-radius: 14px; padding: 12px 16px; cursor: pointer;
  display: flex; justify-content: space-between; font-size: 13.5px; font-weight: 600;
  opacity: 0; transition: all .25s; z-index: 50; box-sizing: border-box;
}
.calc-bar.show { transform: translateX(-50%); opacity: 1; }
.crop-wrap { position: relative; border-radius: 12px; overflow: hidden; background: #111; margin-bottom: 10px; }
.crop-img { width: 100%; display: block; }
.crop-keep { position: absolute; left: 0; right: 0; top: 0; background: rgba(7,193,96,.14); border-bottom: 2.5px solid rgba(7,193,96,.95); }
.lbl { margin-bottom: 7px; }
.usage-list { max-height: 380px; overflow-y: auto; }
.urow { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.urow.lack .uc { color: #fa5151; }
.uc { width: 44px; font-weight: 700; font-size: 13.5px; }
.ubar { flex: 1; height: 8px; background: #f2f3f5; border-radius: 4px; overflow: hidden; }
.ubar-i { height: 100%; border-radius: 4px; }
.un { text-align: right; width: 88px; }
.unv { font-weight: 700; font-size: 13.5px; }
.uns { font-size: 10px; color: #9aa0a6; }
/* 详情行 V2：色号 → 用量 → 进度条(库存/用量比) → 库存 → 余/缺 */
.uq { width: 52px; text-align: right; font-weight: 700; font-size: 13px; }
.uh { width: 58px; text-align: right; font-size: 12px; color: #5f6672; }
.ug { width: 66px; text-align: right; font-size: 12px; font-weight: 700; }
/* 核对页：行序号 + 色号可编辑 */
.ridx { width: 16px; text-align: center; font-size: 10.5px; color: #9aa0a6; }
.uc-edit {
  width: 64px; min-width: 0; background: #f2f3f5; border: none; border-radius: 9px;
  padding: 8px 8px; font-size: 13.5px; font-weight: 700; text-align: center;
  font-family: inherit; outline: none;
}
.uc-edit:focus { background: #fff; box-shadow: 0 0 0 1.5px #07c160 inset; }
/* 低库存阈值输入 */
.lowat-in {
  width: 56px; background: #f2f3f5; border: none; border-radius: 8px;
  padding: 4px 6px; font-size: 13px; font-weight: 700; text-align: center;
  font-family: inherit; outline: none;
}

/* ===== scan.wxss ===== */
.steps { display: flex; gap: 6px; margin-bottom: 14px; }
.step { flex: 1; text-align: center; font-size: 11px; color: #9aa0a6; padding: 7px 0; border-radius: 9px; background: #fff; }
.step .dot { display: inline-block; width: 17px; height: 17px; line-height: 17px; border-radius: 50%; background: #eef1f5; color: #9aa0a6; font-size: 10px; margin-right: 4px; }
.step.cur { background: #e8f8ef; color: #07a858; font-weight: 700; }
.step.cur .dot { background: #07c160; color: #fff; }
.step.done { color: #07c160; }
.step.done .dot { background: rgba(7,193,96,.15); color: #07a858; }
.upload-zone { background: #fff; border: 1.5px dashed #cfd4db; border-radius: 16px; padding: 46px 20px; text-align: center; margin-bottom: 12px; cursor: pointer; }
.up-icon { font-size: 26px; color: #07c160; margin-bottom: 8px; }
.t1 { font-size: 15px; font-weight: 700; }
.t2 { font-size: 11.5px; color: #9aa0a6; margin-top: 6px; line-height: 1.8; }
.demo-row { display: flex; gap: 10px; margin-top: 4px; }
.demo-btn { flex: 1; background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.05); cursor: pointer; }
.demo-img { width: 100%; height: 150px; display: block; background: #f2f3f5; object-fit: cover; }
.demo-name { font-size: 11.5px; font-weight: 600; color: #5f6672; text-align: center; padding: 8px 0; }
.demo-tip { font-size: 10.5px; text-align: center; margin-top: 8px; }
.img-wrap { position: relative; border-radius: 14px; overflow: hidden; background: #111; margin-bottom: 12px; }
.the-img { width: 100%; display: block; }
.the-img.dim { opacity: .85; }
.tip2 { margin: 6px 0 8px; }
.sel-wrap { position: relative; border-radius: 14px; overflow: hidden; background: #111; margin-bottom: 12px; touch-action: none; user-select: none; }
.sel-wrap img { width: 100%; display: block; pointer-events: none; }
.sel-mask { position: absolute; background: rgba(0,0,0,.5); }
.sel-box {
  position: absolute; box-sizing: border-box; cursor: move;
  border: 2px solid #07c160; border-radius: 3px;
  background: rgba(7,193,96,.06);
  box-shadow: 0 0 0 1px rgba(0,0,0,.35);
}
.sel-tag {
  position: absolute; left: -2px; top: -2px; height: 20px; line-height: 20px;
  background: #07c160; color: #fff; font-size: 10px; font-weight: 600;
  padding: 0 8px; border-radius: 8px 0 8px 0; white-space: nowrap;
}
/* 识别区把手：上边横条 = 拖动调高度（从上往下），右下圆点 = 调宽度 */
.sel-handle {
  position: absolute; left: 50%; top: -14px; transform: translateX(-50%);
  width: 64px; height: 24px; border-radius: 12px; cursor: ns-resize;
  background: #07c160; border: 2.5px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.35);
}
.sel-handle::after {
  content: ''; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 26px; height: 2px; border-radius: 1px;
  background: rgba(255,255,255,.9); box-shadow: 0 -4px 0 rgba(255,255,255,.9), 0 4px 0 rgba(255,255,255,.9);
}
.sel-handle2 {
  position: absolute; right: -11px; bottom: -11px;
  width: 22px; height: 22px; border-radius: 50%; cursor: ew-resize;
  background: #07c160; border: 2.5px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.35);
}
.imp-clear {
  display: flex; align-items: center; gap: 8px;
  margin: 10px 2px 2px; font-size: 12.5px; color: #3a3f47; cursor: pointer;
}
.imp-clear input { width: 16px; height: 16px; accent-color: #07c160; flex: 0 0 auto; }

/* 数量输入框：去掉上下步进箭头（无使用场景），手机端靠 inputmode 弹数字键盘 */
input[type=number] { -moz-appearance: textfield; appearance: textfield; }
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.ocr-log {
  background: #1c1e22; border-radius: 12px; padding: 12px 14px; min-height: 120px;
  font-family: Consolas, Menlo, monospace; font-size: 10.8px; line-height: 2.1;
}
.ocr-log .ln { animation: lnIn .25s forwards; opacity: 0; word-break: break-all; }
.ocr-log .dim { color: #555b63; }
.ocr-log .fix { color: #f5c26b; }
.ocr-log .ok { color: #7ddcac; }
@keyframes lnIn { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.stat-row { display: flex; gap: 8px; margin: 0 0 12px; }
.sc { flex: 1; background: #fff; border-radius: 12px; padding: 11px 0; text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,.04); }
.sv { font-size: 19px; font-weight: 800; }
.sk { font-size: 10.5px; color: #9aa0a6; }
.rows-card { padding: 10px 10px 4px; }
.rqty { width: 72px; background: #f2f3f5; border: none; border-radius: 9px; padding: 8px 10px; text-align: right; font-size: 13.5px; font-family: inherit; outline: none; }
.have { width: 64px; font-size: 10.5px; text-align: right; }
.scan-rdel { width: 30px; height: 32px; border-radius: 9px; background: #ffecec; color: #fa5151; border: none; cursor: pointer; font-size: 15px; line-height: 32px; padding: 0; margin: 0; flex-shrink: 0; font-family: inherit; }
.placeholder { background: #e5e7eb; }
.rcode-add { width: 90px; background: #f2f3f5; border: none; border-radius: 9px; padding: 8px 10px; font-size: 12.5px; font-family: inherit; outline: none; }
.rqty-add { width: 72px; background: #f2f3f5; border: none; border-radius: 9px; padding: 8px 10px; font-size: 12.5px; font-family: inherit; outline: none; }
.add-btn {
  background: #e8f8ef; color: #07a858; border: none; border-radius: 9px; font-size: 12px; cursor: pointer;
  padding: 8px 12px; margin: 0; line-height: 1.4; flex-shrink: 0; font-family: inherit;
}
/* 识别结果逐排查看：点排号切换，一次只显示一排 */
.row-col {
  width: 100%; background: transparent; border-radius: 12px; padding: 0;
}
.row-col-h { font-size: 12px; font-weight: 700; margin-bottom: 7px; display: flex; justify-content: space-between; align-items: center; }
.rc-item { display: flex; align-items: center; gap: 5px; margin-bottom: 7px; }
.rc-item .swatch { width: 22px; height: 22px; }
.rc-item .ridx { width: 13px; }
.rc-item .uc-edit { width: 54px; padding: 7px 3px; font-size: 12.5px; }
.rc-item .rqty { width: 52px; padding: 7px 5px; font-size: 12.5px; }
.rc-item .scan-rdel { width: 26px; height: 28px; line-height: 28px; font-size: 13px; }
.rc-item-full { gap: 8px; }
.rc-item-full .swatch { width: 28px; height: 28px; }
.rc-item-full .ridx { width: 16px; }
.rc-item-full .uc-edit { flex: 1; width: auto; min-width: 64px; padding: 9px 8px; font-size: 13.5px; }
.rc-item-full .rqty { flex: 0 0 92px; padding: 9px 10px; font-size: 13.5px; }
.rc-item-full .scan-rdel { width: 32px; height: 36px; line-height: 36px; }
.name-input { background: #fff; border: none; border-radius: 12px; padding: 11px 14px; font-size: 13.5px; margin-top: 12px; width: 100%; box-sizing: border-box; font-family: inherit; outline: none; }

/* ===== record.wxss ===== */
.rec-tabs { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.rt { flex: 1; text-align: center; padding: 8px 0; border-radius: 10px; background: #fff; cursor: pointer; font-size: 13px; font-weight: 600; color: #9aa0a6; }
.rt.on { background: #e8f8ef; color: #07a858; }
.manage-btn { font-size: 13px; color: #3c7ddd; padding: 8px 4px; cursor: pointer; }
.manage-btn.active { color: #e6484d; }
.rec-list { background: #fff; border-radius: 14px; overflow: hidden; }
.rec { display: flex; align-items: center; gap: 11px; padding: 11px 14px; border-bottom: 1px solid #f2f3f5; cursor: pointer; }
.rec:last-child { border-bottom: none; }
.rec.sel { outline: 2px solid #fa5151; outline-offset: -2px; }
.ck { width: 21px; height: 21px; border-radius: 50%; border: 1.6px solid #ccc; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; flex-shrink: 0; box-sizing: border-box; }
.ck.on { background: #fa5151; border-color: #fa5151; }
.rico { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; flex-shrink: 0; }
.rico.in { background: rgba(7,193,96,.1); color: #07a858; }
.rico.out { background: rgba(250,81,81,.08); color: #e6484d; }
.rico.imp { background: rgba(60,125,221,.09); color: #3c7ddd; }
.rmain { flex: 1; min-width: 0; }
.rt1 { font-size: 13.5px; font-weight: 600; }
.rt2 { font-size: 11px; color: #9aa0a6; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rside { text-align: right; flex-shrink: 0; }
.rin { font-size: 12px; font-weight: 700; }
.undo-btn { background: none; color: #e6484d; font-size: 11px; padding: 0; margin: 4px 0 0; border: none; cursor: pointer; line-height: 1.5; display: inline-block; font-family: inherit; }
.del-sel { margin-top: 12px; }
.del-sel.dis { background: #b5b5ba; pointer-events: none; }
.stat-grid { display: flex; }
.sg { flex: 1; text-align: center; }
.stat-grid .sv { font-size: 18px; font-weight: 800; }
.stat-grid .sk { font-size: 10.5px; color: #9aa0a6; margin-top: 2px; }
.card-title { font-size: 14px; font-weight: 700; margin-bottom: 10px; }
.bc-row { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.lb { width: 34px; font-size: 12px; font-weight: 700; }
.track { flex: 1; height: 20px; background: #f2f3f5; border-radius: 10px; overflow: hidden; }
.fill {
  height: 100%; border-radius: 10px; color: #fff; font-size: 10.5px;
  display: flex; align-items: center; justify-content: flex-end; padding-right: 7px; min-width: 30px;
}

/* ===== toast ===== */
#toast {
  position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%);
  background: rgba(0,0,0,.78); color: #fff; font-size: 12.5px; padding: 9px 18px;
  border-radius: 999px; z-index: 999; display: none; max-width: 82vw; text-align: center; line-height: 1.6;
}

/* 标注总数校验徽章 + 复制日志（scan 核对页） */
.total-check { text-align: center; font-size: 11.5px; padding: 7px 10px; border-radius: 9px; margin-bottom: 10px; }
.total-check.ok { color: #07a858; background: #e8f8ef; }
.total-check.bad { color: #fa5151; background: #ffecec; }
.copy-log { text-align: right; font-size: 10px; color: #b7bcc3; padding: 4px 4px 0; cursor: pointer; }

/* 归格模块按钮/预览 */
.gg-btn { display:inline-block; width:auto; padding:10px 18px; border-radius:10px; background:#07c160; color:#fff; font-size:14px; font-weight:600; cursor:pointer; margin-right:10px; }
.gg-btn.ghost { background:#fff; color:#5f6672; border:1px solid #e3e5e8; }
#gg-preview img { max-width:100%; border:1px solid #e5e8ec; border-radius:8px; display:block; margin-top:6px; }

.gg-ar { width: 26px; height: 26px; padding: 0; border-radius: 6px; background: #fff; color: #2a2f36; border: 1px solid #e3e5e8; font-size: 11px; cursor: pointer; flex-shrink: 0; line-height: 1; }
.gg-ar:active { background: #eef2f8; }

/* 色块图纸：色号点选高亮 */
.gpchips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.gpchip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border: 1px solid #e3e5e8; border-radius: 14px; background: #fff; font-size: 12px; cursor: pointer; }
.gpchip.on { border-color: #2f7ef7; background: #eaf2ff; }
.gpchip i { font-style: normal; color: #7a828c; font-size: 11px; }
.gptool-on { border-color: #2f7ef7 !important; color: #2f7ef7 !important; background: #eaf2ff !important; font-weight: 600; }
