*, *::before, *::after { box-sizing: border-box; }

:root {
  --bg: #f5f6f8;
  --card: #ffffff;
  --line: #e8e9ee;
  --text: #1c1c1e;
  --muted: #8a8a8e;
  --brand: #ff6b6b;
  --brand-dark: #f04f4f;
  --green: #17a673;
  --green-bg: #e8f7f0;
  --red-bg: #fdecec;
  --radius: 14px;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  line-height: 1.5;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- 顶栏 / 导航 ---------- */
.top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px 10px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.brand { font-weight: 700; font-size: 16px; }
.me { font-size: 12px; color: var(--muted); }

.tabs {
  display: flex; gap: 6px;
  padding: 10px 14px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
  /* 总账号有 7 个板块，窄屏一行放不下：宁可横向滑，也不能把「导入截团」折成两行 */
  overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  flex: 1 0 auto; text-align: center; padding: 9px 11px; white-space: nowrap;
  border-radius: 10px; color: var(--text); font-weight: 600; font-size: 14px;
  background: #f2f3f6;
}
.tabs a.on { background: var(--brand); color: #fff; }
.tabs a:hover { text-decoration: none; }

.wrap { max-width: 760px; margin: 0 auto; padding: 16px 14px 60px; }
main.wrap > h2:first-child { margin-top: 4px; }

h1 { font-size: 22px; margin: 0 0 6px; }
h2 { font-size: 17px; margin: 22px 0 10px; }
h2.sec { display: flex; align-items: baseline; gap: 8px; }
h3 { font-size: 15px; margin: 0 0 10px; color: #333; }
.muted { color: var(--muted); font-size: 13px; }
.sm2 { font-size: 12px; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
}
.card.hero { background: linear-gradient(135deg, #fff 0%, #fff6f4 100%); }
.card .t { font-weight: 700; font-size: 16px; }

.row { display: flex; align-items: center; }
.row.between { justify-content: space-between; }
.gap { gap: 8px; flex-wrap: wrap; }

.stats { display: flex; gap: 16px; margin: 8px 0 4px; font-size: 13px; color: #444; }
.stats b { font-size: 15px; }

.share { display: flex; gap: 6px; margin: 10px 0 10px; }
.share .link { flex: 1; min-width: 0; font-size: 12px; color: var(--muted); background: #f7f7f9; border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; }
.share .link[done] { color: var(--green); }

.kpis { display: flex; gap: 10px; margin: 14px 0; }
.kpis.tight { margin: 10px 0 14px; }
.kpi {
  flex: 1; background: #fafafc; border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 10px; text-align: center;
}
.kpi span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.kpi b { font-size: 19px; }

/* ---------- 表单 ---------- */
label { display: block; font-size: 13px; color: var(--muted); margin: 14px 0 6px; }
input {
  width: 100%; font-size: 16px; padding: 12px;
  border: 1px solid #e2e3e8; border-radius: 10px;
  background: #fafafa; color: var(--text);
  -webkit-appearance: none; appearance: none;
  font-family: inherit;
}
input:focus { outline: none; border-color: var(--brand); background: #fff; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

button, .btn {
  display: inline-block; font-family: inherit; font-size: 14px; font-weight: 600;
  padding: 11px 16px; border: none; border-radius: 10px;
  background: #eef0f4; color: var(--text); cursor: pointer;
  text-align: center; line-height: 1.2;
}
button:hover, .btn:hover { text-decoration: none; filter: brightness(.97); }
button:active { transform: scale(.99); }
.btn.sm { padding: 8px 12px; font-size: 13px; }
button.primary, .btn.primary { background: var(--brand); color: #fff; width: 100%; padding: 14px; font-size: 16px; margin-top: 18px; }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: #444; }
button.ghost { background: transparent; border: 1px solid var(--line); color: #555; }
button:disabled { background: #ccc !important; color: #fff; }

#addItem { margin-top: 8px; }

.item-row { display: grid; grid-template-columns: 1.3fr .9fr .5fr .7fr .5fr 34px; gap: 5px; margin-bottom: 6px; }
.item-row input { padding: 9px; font-size: 14px; }
.item-row .del { padding: 0; background: #f5f5f7; color: #999; font-size: 18px; border-radius: 8px; }

select, textarea {
  width: 100%; font-family: inherit; font-size: 16px; padding: 12px;
  border: 1px solid #e2e3e8; border-radius: 10px; background: #fafafa; color: var(--text);
  -webkit-appearance: none; appearance: none;
}
select { background-image: linear-gradient(45deg, transparent 50%, #999 50%), linear-gradient(135deg, #999 50%, transparent 50%); background-position: calc(100% - 18px) 20px, calc(100% - 13px) 20px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
select:focus, textarea:focus { outline: none; border-color: var(--brand); background-color: #fff; }
#copyText { font-size: 14px; line-height: 1.6; background: #fafafa; resize: vertical; }

.err { color: #c0392b; font-size: 13px; margin-top: 10px; min-height: 18px; }

/* ---------- 表格 ---------- */
.tablewrap { overflow-x: auto; padding: 14px 12px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { padding: 10px 8px; text-align: left; border-bottom: 1px solid #f0f1f4; vertical-align: top; }
.tbl th { font-size: 12px; color: var(--muted); font-weight: 500; white-space: nowrap; }
.tbl .num { text-align: right; white-space: nowrap; }
.tbl tr:last-child td { border-bottom: none; }

/* 团详情里直接改商品/售价：输入框要能看出边界，又不能把行撑高 */
.tbl td input { width: 100%; min-width: 64px; padding: 6px 8px; margin: 0;
  border: 1px solid #e6e8ee; border-radius: 8px; font-size: 13.5px; background: #fff; color: inherit; }
.tbl td input:focus { border-color: #ff8a5c; outline: none; }
/* 手机上 5 列挤在一起，「保存」会被输入框的 min-width 顶出屏幕，按列定宽 */
#itemEditTbl { table-layout: fixed; }
#itemEditTbl th:nth-child(2), #itemEditTbl td:nth-child(2) { width: 54px; }
#itemEditTbl th:nth-child(3), #itemEditTbl td:nth-child(3) { width: 74px; }
#itemEditTbl th:nth-child(4), #itemEditTbl td:nth-child(4) { width: 74px; }
#itemEditTbl th:nth-child(5), #itemEditTbl td:nth-child(5) { width: 58px; }
#itemEditTbl td input { min-width: 0; padding: 6px 6px; }
#itemEditTbl .p-save { padding: 6px 8px; font-size: 12.5px; }

/* 利润页的商品价目：四列，商品名自适应，两个价格框定宽（手机上也要能填） */
#priceTbl { table-layout: fixed; }
#priceTbl th:nth-child(2), #priceTbl td:nth-child(2),
#priceTbl th:nth-child(3), #priceTbl td:nth-child(3) { width: 66px; }
#priceTbl th:nth-child(4), #priceTbl td:nth-child(4) { width: 72px; }
#priceTbl td input { min-width: 0; padding: 6px 5px; text-align: right; }
#priceTbl .itlead { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
#priceTbl .tag { font-size: 10.5px; padding: 1px 5px; }
code { background: #f3f3f6; border-radius: 5px; padding: 2px 6px; font-size: 13px; letter-spacing: .5px; }

.badge { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 20px; font-weight: 600; }
.badge.open { background: var(--red-bg); color: var(--brand-dark); }
.badge.closed { background: #eef0f4; color: #666; }
.badge.ok { background: var(--green-bg); color: var(--green); }
.badge.wait { background: #fff4e5; color: #b4700a; }

/* ---------- 核销结果 ---------- */
.order {
  background: var(--card); border-radius: var(--radius); padding: 14px 16px;
  margin-bottom: 10px; box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.order.verified { opacity: .62; }
.order .head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.order .code { font-size: 18px; font-weight: 700; letter-spacing: 2px; }
.order .lines { margin: 10px 0; font-size: 13px; color: #444; }
.order .lines div { display: flex; justify-content: space-between; padding: 2px 0; }

/* ---------- 顾客下单页 ---------- */
body.shop { background: #fff7f0; }
body.shop .wrap { padding-top: 14px; }
.p-item { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid #f1f1f4; gap: 10px; }
.p-item:last-of-type { border-bottom: none; }
.pi-l { flex: 1 1 auto; min-width: 0; }
.pi-n { font-weight: 600; }
.stepper { flex: 0 0 auto; display: flex; align-items: center; gap: 4px; }
.stepper button { width: 34px; height: 34px; padding: 0; border-radius: 50%; background: #f2f3f6; font-size: 18px; font-weight: 500; flex: 0 0 auto; }
.stepper .qty { flex: 0 0 46px; width: 46px; text-align: center; padding: 8px 0; font-size: 15px; border-radius: 8px; }
.stepper .qty::-webkit-outer-spin-button, .stepper .qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.bar { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.bar .sum { flex: 1; font-size: 14px; color: #555; }
.bar .sum b { font-size: 20px; color: var(--brand-dark); }
.bar button { margin-top: 0; width: auto; flex: 0 0 auto; padding: 14px 22px; }
.closed-tip { margin-top: 16px; padding: 12px; background: #fff0f0; color: #b02a2a; border-radius: 10px; text-align: center; font-size: 14px; }

.bigcode { font-size: 34px; font-weight: 800; letter-spacing: 6px; margin: 8px 0 6px; color: var(--brand-dark); }
.ok-tip { margin-top: 14px; padding: 10px; background: var(--green-bg); color: var(--green); border-radius: 10px; font-size: 13px; }
.card.center { text-align: center; }

/* ---------- 二维码 / 录单 / 核销记录 ---------- */
.qrbox { text-align: center; padding: 10px 0 4px; }
.qrbox img { width: 180px; height: 180px; background: #fff; border-radius: 10px; }

.m-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid #f1f1f4; }
.m-row:last-of-type { border-bottom: none; }
.m-name { font-size: 14px; }
.m-qty { width: 68px; flex: 0 0 68px; text-align: center; padding: 9px 0; font-size: 15px; }
.m-qty::-webkit-outer-spin-button, .m-qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
#manualForm .primary { margin-top: 14px; }

.vrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid #f1f1f4; font-size: 14px; }
.vrow:last-child { border-bottom: none; }

/* ---------- 登录 ---------- */
body.center { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; }
.login { width: 100%; max-width: 360px; padding: 26px 22px; }
.login h1 { text-align: center; font-size: 21px; }
.login .hint { text-align: center; color: var(--muted); font-size: 13px; margin: 0 0 6px; }

@media (max-width: 420px) {
  .item-row { grid-template-columns: 1.1fr .8fr .5fr .7fr .5fr 30px; gap: 4px; }
  .item-row input { padding: 8px 6px; font-size: 13px; }
  .grid2 { grid-template-columns: 1fr; }
  .kpis { flex-wrap: wrap; }
  .kpi { min-width: 45%; }
}

/* ---------- v4：云服务版补充 ---------- */
.toast {
  position: fixed; left: 50%; bottom: 42px; transform: translateX(-50%);
  background: rgba(28, 28, 30, .92); color: #fff; padding: 10px 18px;
  border-radius: 10px; font-size: 14px; z-index: 99; max-width: 80vw;
  transition: opacity .4s; box-shadow: 0 4px 16px rgba(0,0,0,.18);
}
.toast.bad { background: #c0392b; }
.toast.out { opacity: 0; }
#copyText { width: 100%; }
.vrow button, .vrow .btn { flex: 0 0 auto; }
#lookupForm input { flex: 1; min-width: 0; }
#lookupForm button { flex: 0 0 auto; }
.order .pick { accent-color: #ff6b6b; }
.login .err { text-align: center; }

/* 商品行：窄屏三行，宽屏一行（覆盖上面的固定列宽） */
.item-row {
  display: grid; gap: 6px; margin-bottom: 8px;
  grid-template-columns: 1fr 1fr 1fr 1fr 34px;
  grid-template-areas:
    "name  name  name  name  name"
    "spec  unit  price cost  del"
    "limit limit limit limit del";
}
.item-row .i-name { grid-area: name; }
.item-row .i-spec { grid-area: spec; }
.item-row .i-unit { grid-area: unit; }
.item-row .i-price { grid-area: price; }
.item-row .iw-cost { grid-area: cost; }
.iwrap { position: relative; min-width: 0; }
.iwrap > span {
  position: absolute; left: 7px; top: 50%; transform: translateY(-50%);
  font-size: 11px; color: #b0b0b8; pointer-events: none; line-height: 1;
}
.iwrap > input { width: 100%; padding-left: 21px; background: #fffdf4; }
.item-row .i-limit { grid-area: limit; }
.item-row .del { grid-area: del; align-self: stretch; font-size: 18px; }
@media (min-width: 560px) {
  .item-row {
    grid-template-columns: 1.3fr .9fr .45fr .6fr .6fr .5fr 32px;
    grid-template-areas: "name spec unit price cost limit del";
  }
}

/* ---------- 总览（总账号） ---------- */
.ovhead { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.ovhead h2 { margin: 0; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 2px; }
.seg a { white-space: nowrap; flex: 0 0 auto; }
.seg a {
  font-size: 12px; padding: 6px 11px; border: 1px solid var(--line);
  border-radius: 999px; color: #555; background: #fff;
}
.seg a.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.seg a:hover { text-decoration: none; }
/* 自定义时间段：两个日期 + 查看，手机上一行放得下 */
.rangebar { display: flex; align-items: center; gap: 6px; margin: 8px 0 4px; }
.rangebar[hidden] { display: none; }
.rangebar input { flex: 1 1 0; width: auto; min-width: 0; font-size: 14px; padding: 9px 10px; }
.rangebar .btn { flex: 0 0 auto; white-space: nowrap; }
.today { font-size: 15px; color: #333; margin: 2px 0 0; }
.today b { font-size: 26px; color: var(--brand); margin: 0 2px; }
.kpis.small .kpi { padding: 10px 6px; }
.kpis.small .kpi b { font-size: 15px; }

.card.link { display: block; color: inherit; margin-bottom: 10px; }
.card.link:hover { text-decoration: none; border-color: #ffd0ca; }

.tag {
  font-size: 11px; padding: 2px 8px; border-radius: 999px; white-space: nowrap;
  background: #f0f1f4; color: #666;
}
.tag.ok { background: var(--green-bg); color: var(--green); }
.tag.wait { background: #fff4e5; color: #b26a00; }
.tag.off { background: #f0f1f4; color: #8a8a8e; }
.warn { color: #b26a00; }

.bars { display: flex; align-items: flex-end; gap: 4px; height: 64px; margin: 14px 0 6px; }
.bars i {
  flex: 1; display: block; background: linear-gradient(180deg, #ffb3a7, #ff6b6b);
  border-radius: 3px 3px 0 0; min-height: 2px;
}
.barsx { display: flex; gap: 4px; font-size: 10px; color: var(--muted); }
.barsx span { flex: 1; text-align: center; }

/* 总览的 3 个 KPI 在窄屏也保持一行，别被通用规则折成 2+1 */
@media (max-width: 420px) {
  .kpis.small { flex-wrap: nowrap; }
  .kpis.small .kpi { min-width: 0; }
  .kpis.small .kpi b { font-size: 14px; }
}
.tbl .open-n { color: var(--green); font-size: 11px; white-space: nowrap; }
.locked {
  padding: 12px 14px; border: 1px dashed var(--line); border-radius: 11px;
  background: #f7f7f9; color: #444; font-size: 15px;
}

/* ---------- 核销看板：汇总 + 待核销明细 ---------- */
.glist { margin-top: 10px; }
.grow {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 0; border-top: 1px dashed #eee;
  font-size: 13px;
}
.grow .tag { margin-left: 6px; }
.grow .tar { flex: 0 0 auto; text-align: right; font-size: 13px; }
.grow .tar b { font-size: 16px; }

/* 待核销商品汇总（汇总卡底部） */
.pitems { margin-top: 12px; padding-top: 11px; border-top: 1px dashed #e8e3d9; }
.pitems .ph {
  display: flex; align-items: baseline; justify-content: space-between;
  font-size: 12px; color: #8b8378; letter-spacing: .3px; margin-bottom: 4px;
}
.pitems .pi {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 7px 0; font-size: 14px;
}
.pitems .pi + .pi { border-top: 1px solid #f6f1e7; }
.pitems .pi .n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pitems .pi .q { flex: 0 0 auto; white-space: nowrap; color: var(--text); }
.pitems .pi .q b { font-size: 17px; font-weight: 650; color: var(--text); }
.pitems .pi .q em { font-style: normal; font-size: 12.5px; color: #6b6358; margin-left: 3px; }
.pitems .pi .q i { font-style: normal; margin-left: 2px; }

.plist { padding-top: 6px; }
.phead {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 0 10px; border-bottom: 1px solid #f1f1f4;
}
.pickall { display: flex; align-items: center; gap: 7px; margin: 0; font-size: 13px; color: #444; }
.pickall input, .prow input[type="checkbox"] {
  width: 18px; height: 18px; margin: 0; flex: 0 0 auto; accent-color: var(--brand);
}
.prow {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 0; border-bottom: 1px solid #f1f1f4; cursor: pointer;
}
.prow:last-child { border-bottom: none; }
.prow.on { background: #fff8f7; }
.prow .pl { flex: 1 1 auto; min-width: 0; }
.prow .pl1 { display: block; font-size: 14px; }
.prow .pl1 .pcode {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  letter-spacing: .5px; margin-right: 7px;
}
.prow .pl2 {
  display: block; font-size: 12px; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.prow .pl3 { display: block; font-size: 12px; }
.prow .pr { flex: 0 0 auto; font-weight: 700; font-size: 15px; }
/* 三个 KPI 在窄屏也保持一行 */
.kpis.three { flex-wrap: nowrap; }
.kpis.three .kpi { flex: 1 1 0; min-width: 0; }
.kpis.three .kpi b { font-size: 18px; }

/* 底部悬浮的批量核销按钮 */
body.vpage .wrap { padding-bottom: 104px; }
.pbar {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(14px + env(safe-area-inset-bottom));
  width: min(430px, calc(100% - 28px)); z-index: 20;
  display: none;
}
.pbar.show { display: block; }
.pbar .btn.primary {
  margin-top: 0;
  box-shadow: 0 8px 22px -8px rgba(240, 79, 79, .85);
}

@media (max-width: 420px) {
  .kpis.three .kpi b { font-size: 17px; }
  .kpis.three .kpi { padding: 10px 6px; }
}

/* ---------- 商品统计 ---------- */
.rk { display: inline-block; min-width: 18px; color: #a0a0a8; font-size: 12px; }
.rk.top { color: var(--brand); font-weight: 600; }
.itname { max-width: 168px; }
.bar2 { height: 4px; background: #f1f1f4; border-radius: 2px; margin-top: 5px; overflow: hidden; }
.bar2 i { display: block; height: 100%; background: var(--brand); border-radius: 2px; }
.stbox { padding: 2px 0 8px; border-bottom: 1px dashed #eee; }
.stbox:last-child { border-bottom: none; padding-bottom: 0; }
.sth { font-size: 13px; font-weight: 500; color: #333; padding: 6px 0 0; }

/* ---------- 利润 ---------- */
.neg { color: #c0392b; }
.missmark { color: #b8860b; }
.warncard { border-left: 3px solid #f0b429; }
.warncard .warn { color: #8a6d00; font-size: 13px; line-height: 1.6; }
.hero .tag { vertical-align: middle; margin-left: 6px; font-size: 12px; }
/* 利润页表格：固定列宽，避免数字列把商品名挤成换行 */
.tbl.fix { table-layout: fixed; }
.tbl.fix th:nth-child(2), .tbl.fix td:nth-child(2) { width: 76px; }
.tbl.fix th:nth-child(3), .tbl.fix td:nth-child(3) { width: 78px; }
.tbl.fix th:nth-child(4), .tbl.fix td:nth-child(4) { width: 62px; }
.tbl.fix .itname { max-width: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- 接龙导入：截图识别 + 逐条核对 ---------- */
.lingpick { display: flex; align-items: center; gap: 10px; margin: 12px 0 4px; flex-wrap: wrap; }
.filebtn {
  display: inline-flex; align-items: center; gap: 6px; margin: 0;
  padding: 10px 14px; border: 1px dashed #d8c9c2; border-radius: 11px;
  background: #fffaf8; color: #b3553f; font-size: 14px; font-weight: 500; cursor: pointer;
}
.filebtn:active { background: #fdf0ec; }
.filebtn:disabled { opacity: .5; }
.ocrstate {
  margin-top: 10px; padding: 10px 12px; border-radius: 10px; font-size: 13px; line-height: 1.6;
  background: #f4f6fa; color: #555c66;
}
.ocrstate.ok { background: var(--green-bg); color: #14724f; }
.ocrstate.bad { background: var(--red-bg); color: #b23b3b; }

/* 被当成图片/缩略图跳过的行：默认收起，点开能逐行核对有没有误杀 */
.ocrskip {
  margin-top: 6px; padding: 8px 10px; border: 1px dashed #cfe0d6; border-radius: 9px;
  background: #fff;
}
.ocrskip summary { font-size: 12.5px; color: #14724f; cursor: pointer; list-style: none; }
.ocrskip summary::before { content: '▸ '; }
.ocrskip[open] summary::before { content: '▾ '; }
.ocrskiprow {
  display: flex; gap: 8px; align-items: baseline;
  font-size: 12.5px; color: #4d544e; padding: 4px 0; border-top: 1px dashed #eef1ee;
}
.ocrskiprow .why { flex: 0 0 auto; font-size: 11px; color: #8a9490; }
.ocrskiprow .txt { flex: 1 1 auto; word-break: break-all; }

.review { margin-top: 14px; }
.rvhead { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.rvhead b { font-size: 15px; }
.rvhead span { font-size: 12px; color: var(--muted); }
.rvhint { font-size: 12px; color: var(--muted); line-height: 1.6; margin-bottom: 10px; }

/* 团长本人那一行：默认排除，关键词可改 */
.ownbar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  font-size: 12.5px; color: #6b6459; background: #f6f4ef;
  border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 10px; margin-bottom: 10px;
}
.ownbar span { flex: 0 0 auto; }
.ownbar b { color: var(--ink); }
.ownbar input {
  flex: 1 1 110px; min-width: 90px; margin: 0; padding: 6px 9px;
  font-size: 13px; border: 1px solid var(--line); border-radius: 8px; background: #fff;
}

/* 本团没有的商品：就地补进团，不用退出去重开团 */
.missbar {
  background: #fff8ef; border: 1px solid #f0d3ae; border-radius: 10px;
  padding: 9px 10px; margin-bottom: 10px;
}
.missbar .rvh { color: #96601f; margin-bottom: 7px; }
.missrow {
  display: flex; align-items: center; gap: 6px; margin-top: 6px;
  font-size: 12.5px; color: #6b6459;
}
.missrow .mname {
  flex: 1 1 auto; min-width: 0; font-weight: 600; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.missrow .mcnt { flex: 0 0 auto; font-style: normal; color: #a8865c; }
.missrow .munit { flex: 0 0 52px; margin: 0; padding: 6px 7px; font-size: 13px; }
.missrow .mprice { flex: 0 0 74px; margin: 0; padding: 6px 7px; font-size: 13px; }
.missrow .mitem { flex: 0 0 auto; white-space: nowrap; }

.rrow {
  border: 1px solid var(--line); border-radius: 11px; padding: 9px 11px; margin-bottom: 8px;
  background: #fff;
}
.rraw {
  font-size: 11.5px; color: #9a948d; margin-bottom: 6px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rmain { display: flex; align-items: center; gap: 6px; }
.rname {
  flex: 1 1 auto; min-width: 0; margin: 0; padding: 8px 10px; font-size: 15px;
  border: 1px solid var(--line); border-radius: 9px; background: #fcfcfd;
}
.rqty {
  flex: 0 0 62px; width: 62px; margin: 0; padding: 8px 6px; font-size: 15px; text-align: center;
  border: 1px solid var(--line); border-radius: 9px; background: #fcfcfd;
}
.rname:focus, .rqty:focus { border-color: var(--brand); background: #fff; }
.runit { color: var(--muted); font-size: 13px; flex: 0 0 auto; }
.rdel {
  flex: 0 0 auto; width: 30px; height: 30px; padding: 0; margin: 0; line-height: 1;
  border: none; background: transparent; color: #c2bcb4; font-size: 15px; cursor: pointer;
}
.rflag { font-size: 12px; color: #b26a00; background: #fdf6e7; border-radius: 7px; padding: 3px 8px; margin-top: 6px; display: inline-block; }

/* 纯表情昵称（🍂/🦄）OCR 认不出来，这里摆一块原图让人照着填 */
.rnickshot {
  display: flex; align-items: center; gap: 8px; margin-top: 7px;
  background: #f4f7fb; border: 1px solid #e2e9f2; border-radius: 9px; padding: 7px 9px;
}
.rnickshot img { height: 38px; max-width: 56%; border-radius: 5px; display: block; background: #fff; }
.rnickshot span { font-size: 12px; color: #5c6b7a; line-height: 1.5; }

/* 表情面板：认不出的表情点一下就行，点过就学会，下次自动填。
   横着滑一排，不占版面 —— 竖着换行会把一屏挤满。 */
.emopal {
  display: flex; flex-wrap: nowrap; gap: 5px; margin-top: 7px;
  padding: 7px; background: #fbfcfe; border: 1px solid #e6edf5; border-radius: 9px;
  overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.emopal::-webkit-scrollbar { display: none; }
.emobtn {
  flex: 0 0 auto; width: 40px; height: 40px; padding: 0; font-size: 24px; line-height: 1;
  background: #fff; border: 1px solid #e3eaf2; border-radius: 9px;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.emobtn:active { background: #eef4fb; transform: scale(0.94); }
.rnickshot img.emobig { height: 54px; width: auto; max-width: 54px; image-rendering: pixelated; }

/* 待复核：识别不确定或缺字段的行，左侧红条 + 淡红底，扫一眼就能挑出来 */
.rrow.abn { border-color: #e8c4c0; background: #fffaf9; box-shadow: inset 3px 0 0 #d9534f; }
.rrow.abn .rflag { color: #b23b3b; background: #fdeceb; }
.abnnum { color: #c0392b; }
.warnline { color: #b26a00; }

.skipbox {
  margin-top: 4px; padding: 11px 12px; border: 1px dashed #e3d6b8; border-radius: 11px; background: #fffdf6;
}
.skipbox .rvh { font-size: 12.5px; color: #9a6b28; margin-bottom: 6px; }
.skiprow {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 12.5px; color: #6b6358; padding: 5px 0;
}
.skiprow span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.rvsum {
  margin: 14px 0 10px; padding: 12px 14px; border-radius: 11px; background: #fafafc;
  border: 1px solid var(--line); font-size: 14px;
}
.rvsum b { font-size: 17px; }
.review.done .rvhead b { color: var(--green); }

.mrgbox {
  margin: 0 0 10px; padding: 9px 12px; border-radius: 10px; font-size: 12.5px; line-height: 1.6;
  background: #f3f5f9; color: #5b6470;
}
.skipbox.other { background: #fafafc; border-color: #e6e6ec; }
.skipbox.other summary {
  font-size: 12.5px; color: #8a8a8e; cursor: pointer; list-style: none;
}
.skipbox.other summary::before { content: '▸ '; }
.skipbox.other[open] summary::before { content: '▾ '; }
.rvsum .rvcamp { font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.rvsum .rvcamp b { font-size: 13px; color: var(--text); }

/* ---------- 接龙核对：四栏 + 品类 + 文案 ---------- */
.rmain.second { margin-top: 6px; }
.rroom {
  flex: 0 0 84px; width: 84px; margin: 0; padding: 8px 8px; font-size: 14px;
  border: 1px solid var(--line); border-radius: 9px; background: #fcfcfd; text-align: center;
}
.ritem {
  flex: 1 1 auto; min-width: 0; margin: 0; padding: 8px 8px; font-size: 14px;
  border: 1px solid var(--line); border-radius: 9px; background: #fcfcfd;
  -webkit-appearance: none; appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #9a948d 50%), linear-gradient(135deg, #9a948d 50%, transparent 50%);
  background-position: calc(100% - 14px) 15px, calc(100% - 9px) 15px;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 26px;
}
.rqty2 {
  flex: 0 0 62px; width: 62px; margin: 0; padding: 8px 4px; font-size: 14px; text-align: center;
  border: 1px solid var(--line); border-radius: 9px; background: #fcfcfd;
}
.rroom:focus, .ritem:focus, .rqty2:focus { border-color: var(--brand); background: #fff; }
.rroom::placeholder, .rqty2::placeholder { color: #c9c3bb; font-size: 12.5px; }

/* 公共信息（门店 / 商品 / 电话） */
.metabox {
  margin: 14px 0 0; padding: 11px 12px; border-radius: 11px;
  background: #f8f9fb; border: 1px solid var(--line);
}
.metabox .rvh { font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.mrow { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.mrow:last-child { margin-bottom: 0; }
.mrow label { flex: 0 0 62px; margin: 0; font-size: 13px; color: #6b6358; }
.mrow input {
  flex: 1 1 auto; min-width: 0; margin: 0; padding: 8px 10px; font-size: 14px;
  border: 1px solid var(--line); border-radius: 9px; background: #fff;
}

/* 品类：每样货一行，各选各的截止时间 */
.catbox {
  margin: 12px 0 0; padding: 11px 12px; border-radius: 11px;
  background: #f4f8f5; border: 1px solid #dfe9e1;
}
.catbox .rvh { font-size: 12.5px; color: #5c6b5f; margin-bottom: 8px; }
.catrows { display: flex; flex-direction: column; gap: 6px; }
.catrow { display: flex; align-items: center; gap: 8px; }
.catnm {
  flex: 1 1 auto; min-width: 0; font-size: 13.5px; color: #33413a;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.catsel {
  flex: 0 0 auto; width: 148px; margin: 0; padding: 7px 8px; font-size: 13px;
  border: 1px solid #dfe9e1; border-radius: 9px; background: #fff; color: #3f4a42;
}
.catout { margin-top: 9px; font-size: 13px; color: #3f4a42; line-height: 1.7; }

/* 生成好的文案 */
.copyout {
  width: 100%; margin: 0 0 6px; padding: 12px; font-size: 13.5px; line-height: 1.75;
  border: 1px solid var(--line); border-radius: 11px; background: #fffdf7;
  color: #2f2a25; font-family: inherit; resize: vertical;
}
.copyedit { font-size: 12px; color: var(--muted); line-height: 1.7; margin: 0 0 10px; }
.copyedit b { color: #4a4238; }
.linkbtn {
  border: none; background: none; padding: 0 0 0 6px; margin: 0;
  color: var(--brand); font-size: 12px; text-decoration: underline; cursor: pointer;
}

/* 数据备份 */
.setbox {
  margin-top: 14px; padding: 10px 12px; border: 1px dashed #d9dde4; border-radius: 11px;
  background: #fafbfc;
}
.setbox summary { font-size: 13px; color: #5b6470; cursor: pointer; list-style: none; }
.setbox summary::before { content: '▸ '; }
.setbox[open] summary::before { content: '▾ '; }
.setbox input { margin: 8px 0; font-size: 13px; }
.okline { font-size: 12.5px; color: #14724f; }
/* AI 复核：贴在核对表某一行下面的一小条，别抢主输入框的注意力 */
.raiv { display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  margin-top: 6px; padding: 6px 8px; border-radius: 8px;
  background: #f4f7ff; border: 1px solid #dfe7fb; font-size: 12.5px; color: #3b4657; }
.raiv.same { background: #f7f9f8; border-color: #e6ebe8; color: #6b7684; }
.raivtag { flex: none; padding: 1px 6px; border-radius: 6px; background: #e3ecff;
  color: #2f5bc4; font-size: 11.5px; font-weight: 600; letter-spacing: .2px; }
.raiv.same .raivtag { background: #e8eeea; color: #5b7a68; }
.raiv em { font-style: normal; color: #8a93a3; font-size: 12px; }
.raivtxt { flex: 1 1 auto; min-width: 0; word-break: break-all; }
.raivnote { flex: 1 0 100%; color: #8a93a3; font-size: 11.5px; }
.raiv .btn.sm { flex: none; padding: 5px 10px; font-size: 12.5px; }
.aivline { color: #2f5bc4; }
.errline { color: #c0392b; }
.vischk { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: #3b4657; }
.vischk input { width: auto; margin: 0; }
.skiprow .why { flex: 0 0 auto; font-style: normal; font-size: 11.5px; color: #a5a09a; margin-left: 8px; }

/* ---------- 门店管理（只有总账号看得到） ---------- */
.strow { padding: 12px 0; border-bottom: 1px solid var(--line); }
.strow:last-child { border-bottom: 0; }
.strow.newrow { background: #fff8f8; border-radius: 12px; padding: 12px 10px; margin-top: 8px; border-bottom: 0; }
.stl1 { display: flex; align-items: center; gap: 8px; }
.stcode {
  flex: 0 0 auto; font: 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--muted); background: #f2f3f6; border-radius: 6px; padding: 6px 7px;
}
.stl1 .st-name { flex: 1 1 auto; min-width: 0; padding: 9px 10px; font-size: 15px; }
.stl1 .st-del {
  flex: 0 0 34px; width: 34px; height: 34px; padding: 0;
  background: #f5f5f7; color: #999; font-size: 18px; border-radius: 8px;
}
.stl2 { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.stl2 label {
  margin: 0; font-size: 11.5px; color: var(--muted);
  display: flex; flex-direction: column; gap: 3px;
}
/* 前缀就两位、排序就一两位，别跟 11 位电话平分宽度（均分会把电话截断） */
.stl2 label:nth-child(1) { flex: 0 0 76px; }
.stl2 label:nth-child(2) { flex: 1 1 0; min-width: 0; }
.stl2 label:nth-child(3) { flex: 0 0 58px; }
/* input 默认 size=20 撑出 180px 的 min-content，不加 min-width:0 排序框会被挤到下一行 */
.stl2 input { width: 100%; min-width: 0; padding: 8px 9px; font-size: 14px; }
.stmeta { margin-top: 6px; }
.stfoot { display: flex; gap: 10px; margin-top: 16px; }
.stfoot button { flex: 1; width: auto; margin-top: 0; }
