:root {
  --bg: #f4f5f8;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #8a94a6;
  --line: #eceef2;
  --brand: #ff6a00;
  --brand-dark: #e85d00;
  --brand-soft: #fff4ec;
  --danger: #e5383b;
  --ok: #10b981;
  --ok-dark: #059669;
  --warn: #f59e0b;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(16,24,40,.04), 0 4px 16px rgba(16,24,40,.06);
  --mono: "Cascadia Mono", Consolas, ui-monospace, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button {
  cursor: pointer;
  border: 1px solid var(--brand);
  background: var(--brand);
  color: #fff;
  padding: 8px 16px;
  border-radius: 10px;
  font-weight: 700;
  transition: background .15s, box-shadow .15s, transform .05s;
}
button:hover { background: var(--brand-dark); }
button:active { transform: translateY(1px); }
button:disabled { opacity: .5; cursor: default; }
button.ghost { background: #fff; color: var(--text); border-color: var(--line); font-weight: 600; }
button.ghost:hover { background: #f7f8fa; }
button.small { padding: 4px 10px; font-size: 13px; border-radius: 8px; }
/* 看起来像按钮的链接 */
a.btn {
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none; background: var(--brand); color: #fff;
  border: 1px solid var(--brand); padding: 10px 16px; border-radius: 12px; font-weight: 700;
}
a.btn:hover { background: var(--brand-dark); }
a.btn.ghost { background: #fff; color: var(--text); border-color: var(--line); }
a.btn.ghost:hover { background: #f7f8fa; }
a.btn.small { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
input, select {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
  background: #fff;
  color: var(--text);
}
input:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px #ffe2cc; }

/* 页头 */
.topbar {
  display: flex; align-items: center; gap: 28px;
  background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
  padding: 12px 28px; position: sticky; top: 0; z-index: 10;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand .logo {
  background: linear-gradient(135deg, #ff8a2b, var(--brand)); color: #fff; border-radius: 12px; width: 40px; height: 40px;
  display: grid; place-items: center; font-weight: 800; letter-spacing: -2px; box-shadow: 0 4px 12px rgba(255,106,0,.35);
}
.brand b { display: block; font-size: 17px; font-weight: 800; letter-spacing: -.02em; }
.brand-logo { display: block; height: 60px; width: auto; margin: -8px 0; }
/* 平台名字跟 logo 用同一个橙色（logo 是 #f7941f，字稍微深一点好读），中间一条细竖线隔开 */
.brand-name { color: #e8850f; font-size: 17px; font-weight: 800; letter-spacing: .14em; padding-left: 12px; border-left: 2px solid #fbd3a3; line-height: 1.6; white-space: nowrap; }
.brand small { display: block; color: var(--brand); font-size: 11px; font-weight: 700; letter-spacing: .12em; }
.topbar nav { display: flex; gap: 4px; }
.topbar nav a { text-decoration: none; color: var(--muted); padding: 8px 14px; border-radius: 10px; font-weight: 700; }
.topbar nav a.on, .topbar nav a:hover { background: var(--brand-soft); color: var(--brand-dark); }
.topbar .right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.lang-switch { display: flex; background: #f1f2f5; border-radius: 12px; padding: 3px; }
.lang-switch button { background: transparent; border: 0; color: var(--muted); padding: 5px 12px; border-radius: 9px; }
.lang-switch button.on { background: #fff; color: var(--brand-dark); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.me { font-weight: 700; }

main { padding: 24px 28px; max-width: 1440px; margin: 0 auto; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }

/* 登录 */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.auth-card { width: 100%; max-width: 380px; padding: 28px; }
.auth-card h1 { font-size: 20px; margin: 0 0 6px; }
.auth-card p.hint { color: var(--muted); margin: 0 0 18px; }
.auth-card label { display: block; font-weight: 600; margin: 12px 0 4px; }
.auth-card input, .auth-card select { width: 100%; }
.auth-card button[type=submit] { width: 100%; margin-top: 18px; padding: 10px; }
.auth-card .err { color: var(--danger); min-height: 20px; margin-top: 10px; }
.auth-card .lang-switch { width: fit-content; margin: 0 0 16px auto; }

/* 工具条 */
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.toolbar input[type=search] { flex: 1 1 260px; min-width: 200px; }
.toolbar .count { color: var(--muted); margin-left: auto; }
.sync-status { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.sync-status .dot { width: 8px; height: 8px; border-radius: 50%; background: #9ca3af; }
.sync-status.ok .dot { background: var(--ok); }
.sync-status.err { color: var(--danger); }
.sync-status.err .dot { background: var(--danger); }
.sync-status.busy .dot { background: var(--warn); }

/* 表格 */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; color: var(--muted); letter-spacing: .03em; background: #fafafa; position: sticky; top: 0; }
td.num, th.num { text-align: right; white-space: nowrap; }
tr.voided td { color: #9ca3af; text-decoration: line-through; }
tr.flash { animation: flash 2.5s ease-out; }
@keyframes flash { from { background: #fef3c7; } to { background: transparent; } }
.order-no { font-weight: 700; }
.sub { color: var(--muted); font-size: 12px; }
.pill {
  display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600;
  color: #fff; white-space: nowrap;
}
.tag { display: inline-block; padding: 1px 6px; border-radius: 4px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.tag.web { background: #f3f4f6; color: #4b5563; }
.tag.red { background: #fee2e2; color: var(--danger); }
.tag.yellow { background: #fef3c7; color: #92400e; }
.tag.green { background: #dcfce7; color: #166534; }
.wa {
  display: inline-flex; align-items: center; gap: 4px; text-decoration: none;
  color: #fff; background: #22c55e; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 600;
}
.wa:hover { background: #16a34a; }
.empty { text-align: center; color: var(--muted); padding: 40px; }

/* 员工 */
.form-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; padding: 16px; border-bottom: 1px solid var(--line); }
.form-row label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
h2 { font-size: 18px; margin: 0 0 12px; }

/* 订单详情面板 */
tbody#rows tr[data-id] { cursor: pointer; }
tbody#rows tr[data-id]:hover td { background: #fff7ed; }
tbody#rows tr.selected td { background: #ffedd5; }
.drawer-backdrop { position: fixed; inset: 0; background: rgba(17,24,39,.35); z-index: 40; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(760px, 100vw); background: #fff; z-index: 50;
  box-shadow: -8px 0 24px rgba(0,0,0,.12); display: flex; flex-direction: column;
}
.drawer header { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.drawer header h3 { margin: 0; font-size: 18px; }
.drawer header .close { margin-left: auto; }
.drawer .body { overflow-y: auto; padding: 16px 18px; }
.info-grid { display: grid; grid-template-columns: 130px 1fr; gap: 6px 12px; margin-bottom: 16px; }
.info-grid dt { color: var(--muted); font-size: 12px; font-weight: 600; padding-top: 2px; }
.info-grid dd { margin: 0; }
.items td { vertical-align: middle; }
.items img, .items .noimg { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); display: block; background: #f3f4f6; }
.items .name { font-weight: 600; }
.totals { margin: 12px 0 0 auto; width: 300px; }
.totals div { display: flex; justify-content: space-between; padding: 3px 0; }
.totals .grand { font-weight: 700; font-size: 16px; border-top: 1px solid var(--line); margin-top: 4px; padding-top: 6px; }
.notice { padding: 8px 12px; border-radius: 8px; margin: 12px 0; font-size: 13px; }
.notice.ok { background: #dcfce7; color: #166534; }
.notice.warn { background: #fef3c7; color: #92400e; }
.history { font-size: 13px; color: var(--muted); padding-left: 18px; }
h4 { margin: 18px 0 8px; font-size: 14px; }

/* 看板 */
body.board-page main { max-width: none; padding: 12px 16px 0; }
.board {
  display: flex; gap: 12px; overflow-x: auto; align-items: stretch;
  height: calc(100vh - 140px); padding-bottom: 12px;
}
.col {
  flex: 1 0 290px; display: flex; flex-direction: column; background: #eef0f3;
  border-radius: var(--radius); border-top: 4px solid var(--c, #999); min-height: 0;
}
.col.over { background: #ffedd5; outline: 2px dashed var(--brand); }
.col.blocked { opacity: .55; }
.col-head { display: flex; align-items: center; gap: 6px; padding: 10px 12px 6px; font-weight: 700; }
.col-head .n { margin-left: auto; background: #fff; border-radius: 999px; padding: 0 8px; font-size: 12px; color: var(--muted); }
.col-head .sum { display: block; font-size: 11px; color: var(--muted); font-weight: 500; padding: 0 12px 6px; }
.cards { flex: 1; overflow-y: auto; padding: 4px 8px 10px; display: flex; flex-direction: column; gap: 8px; min-height: 40px; }
.kcard {
  background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; cursor: grab;
  box-shadow: 0 1px 2px rgba(0,0,0,.04); user-select: none;
}
.kcard:hover { border-color: #fdba74; }
.kcard.dragging { opacity: .4; }
.kcard.selected { outline: 2px solid var(--brand); }
.kcard.flash { animation: flash 2.5s ease-out; }
.kcard.voided { opacity: .6; }
.kcard .top { display: flex; align-items: baseline; gap: 6px; }
.kcard .top b { font-size: 15px; }
.kcard .top .total { margin-left: auto; font-weight: 700; }
.kcard .cust { font-weight: 600; margin: 2px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kcard .meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; color: var(--muted); font-size: 12px; }
.kcard .meta .wa { margin-left: auto; }
.kcard .tags { margin-top: 4px; display: flex; gap: 4px; flex-wrap: wrap; }
.board-tools { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.board-tools input[type=search] { width: 320px; max-width: 100%; }
.board-tools .hint { color: var(--muted); font-size: 12px; }

/* 设置 */
.stage-row td { vertical-align: middle; }
.stage-row input[type=text] { width: 100%; min-width: 120px; }
.stage-row input[type=color] { width: 44px; height: 32px; padding: 2px; }
.stage-key { font-family: Consolas, monospace; font-size: 12px; color: var(--muted); }

/* 扫码对货 */
.tag.picking { background: #ffedd5; color: #9a3412; }
.tag.picked { background: #dcfce7; color: #166534; }
.pick-list .row { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.pick-list .row:last-child { border-bottom: 0; }
.pick-list .row .who { flex: 1; min-width: 0; }
/* 待配货列表：卡片 */
.pick-list-head { display: flex; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.pick-list-head h2 { margin: 0 0 4px; }
.pick-list-head .sub { margin: 0; }
.pick-list-head input { margin-left: auto; width: 360px; max-width: 100%; font-size: 16px; padding: 11px 16px; border-radius: 12px; }
.order-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.order-grid > .empty { grid-column: 1 / -1; }
.ocard {
  background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
  padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; transition: transform .12s, box-shadow .12s;
}
.ocard:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(16,24,40,.1); }
.ocard-top { display: flex; align-items: baseline; justify-content: space-between; }
.ocard-no { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.ocard-total { font-family: var(--mono); font-weight: 700; color: var(--brand-dark); }
.ocard-cust { font-weight: 700; font-size: 15px; }
.ocard-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); font-size: 12px; }
.ocard-note {
  font-size: 12px; color: #6b7280; background: #f7f8fa; border-radius: 8px; padding: 6px 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ocard-tags { display: flex; gap: 6px; flex-wrap: wrap; min-height: 0; }
.ocard-tags:empty { display: none; }
.ocard-act { margin-top: auto; padding-top: 6px; }
.ocard-act button { width: 100%; padding: 10px; border-radius: 12px; }

/* 对货页：左边固定面板 + 右边商品卡片 */
.pick-layout { display: grid; grid-template-columns: 340px 1fr; gap: 24px; align-items: start; }
.pick-side { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 18px; }
.back-link { color: var(--muted); text-decoration: none; font-weight: 700; display: inline-flex; gap: 6px; padding: 4px 2px; }
.back-link:hover { color: var(--brand-dark); }
.scan-card {
  background: linear-gradient(140deg, #ff8a2b 0%, #ff6a00 55%, #f25400 100%); border-radius: 22px; padding: 20px;
  color: #fff; box-shadow: 0 12px 28px rgba(255,106,0,.3);
}
.scan-card .label { font-weight: 800; font-size: 13px; opacity: .9; margin-bottom: 12px; letter-spacing: .04em; }
.scan-card input {
  width: 100%; font-size: 26px; font-weight: 700; padding: 16px 18px; border-radius: 14px; color: #fff;
  background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.45); letter-spacing: .03em;
}
.scan-card input::placeholder { color: rgba(255,255,255,.65); }
.scan-card input:focus { box-shadow: 0 0 0 4px rgba(255,255,255,.35); border-color: #fff; }
.scan-card.lost input { background: rgba(127,29,29,.35); border-color: #fecaca; }
.scan-card .lost-hint { display: none; margin-top: 8px; font-size: 13px; font-weight: 700; }
.scan-card.lost .lost-hint { display: block; }
.prog-card { padding: 20px; }
.prog-card .title { color: var(--muted); font-size: 12px; font-weight: 800; display: flex; gap: 6px; align-items: center; }
.prog-card .title::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--brand); transform: rotate(45deg); }
.bar { height: 8px; background: #edf0f4; border-radius: 999px; overflow: hidden; margin: 14px 0 16px; }
.bar > div { height: 100%; background: linear-gradient(90deg, #ff8a2b, var(--brand)); border-radius: 999px; transition: width .25s; }
.bar.green > div { background: linear-gradient(90deg, #34d399, var(--ok)); }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat { background: #f7f8fa; border-radius: 14px; padding: 12px 14px; }
.stat small { color: var(--muted); font-size: 11px; font-weight: 800; }
.stat b { display: block; font-size: 30px; font-weight: 800; line-height: 1.2; font-family: var(--mono); }
.stat.hl b { color: var(--brand); }
.kv { border-top: 1px dashed var(--line); margin-top: 16px; padding-top: 12px; display: grid; gap: 8px; font-size: 13px; }
.kv div { display: flex; justify-content: space-between; gap: 10px; }
.kv span { color: var(--muted); white-space: nowrap; }
.kv b { text-align: right; }
.kv .note { color: var(--brand-dark); font-weight: 700; text-align: left; }
.side-actions { display: grid; gap: 8px; margin-top: 16px; }
.side-actions button { padding: 12px; font-size: 15px; border-radius: 12px; }

.pcards { display: flex; flex-direction: column; gap: 16px; }
.pcard {
  background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); padding: 16px 18px;
  transition: border-color .2s, background .2s;
}
.pcard .top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 12px; font-weight: 600;
  background: #f5f6f8; border: 1px solid var(--line); border-radius: 8px; padding: 3px 9px; color: #4b5563;
}
.chip.code::before { content: "||||"; letter-spacing: -1px; color: #9aa3b2; font-weight: 800; }
.badge { margin-left: auto; font-size: 12px; font-weight: 800; border-radius: 8px; padding: 3px 10px; }
.badge.need { background: #fff1e6; color: var(--brand-dark); border: 1px solid #ffd2b0; }
.badge.done { background: #dcfce7; color: #047857; border: 1px solid #a7f3d0; }
.badge.oos { background: #f3f4f6; color: #6b7280; border: 1px solid #e5e7eb; }
.badge.removed { background: #fee2e2; color: var(--danger); border: 1px solid #fecaca; }
.pcard .mid { display: flex; gap: 18px; align-items: center; margin: 14px 0; }
.pcard .mid img, .pcard .mid .noimg {
  width: 112px; height: 112px; object-fit: cover; border-radius: 14px; border: 1px solid var(--line); background: #f5f6f8; flex: none;
}
.pcard .info { flex: 1; min-width: 0; }
.pcard .pname { font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.pcard .opt { color: var(--muted); font-size: 13px; margin-top: 2px; }
.pcard .pline { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 12px; color: #4b5563; margin-top: 10px; }
.pcard .pline b { color: var(--text); }
.pcard .bar { margin: 6px 0 0; height: 6px; }
.pcard .tags { margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; }
.pcard .bot { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding-top: 14px; flex-wrap: wrap; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 14px; background: #fafbfc; overflow: hidden; }
.stepper button { background: transparent; border: 0; color: #6b7280; font-size: 20px; width: 46px; height: 46px; padding: 0; border-radius: 0; font-weight: 500; }
.stepper button:hover { background: #f1f2f5; color: var(--text); }
.stepper .val { display: flex; align-items: baseline; gap: 4px; padding: 0 8px; font-family: var(--mono); }
.stepper .val input {
  width: 56px; text-align: center; font-size: 22px; font-weight: 800; border: 0; background: transparent; padding: 4px 0; font-family: var(--mono);
}
.stepper .val input:focus { box-shadow: none; background: #fff; border-radius: 6px; }
.stepper .val small { color: var(--muted); font-size: 14px; }
.pcard .bot .spacer { flex: 1; }
button.green { background: var(--ok); border-color: var(--ok); padding: 11px 18px; border-radius: 12px; }
button.green:hover { background: var(--ok-dark); }
button.outline { background: #fff; color: #4b5563; border-color: var(--line); padding: 11px 16px; border-radius: 12px; }
button.outline:hover { background: #f7f8fa; }
button.outline.on { color: var(--danger); border-color: #fecaca; background: #fff5f5; }
.pcard.full { background: #f0fdf6; border-color: #a7f3d0; }
.pcard.oos { background: #fafafa; }
.pcard.oos .mid img { filter: grayscale(.8); opacity: .7; }
.pcard.removed { border-color: #fecaca; background: #fff8f8; }
.pcard.manual { box-shadow: inset 4px 0 0 #a855f7, var(--shadow); }
/* 刚扫的那个商品：黄色粗框，一直保持到扫下一个 */
.pcard.current {
  border: 4px solid #fbbf24; background: #fffbeb; padding: 13px 15px;
  box-shadow: 0 0 0 4px rgba(251,191,36,.18), var(--shadow); animation: pop .6s ease-out;
}
@keyframes pop { 0% { transform: scale(.985); } 60% { transform: scale(1.01); } 100% { transform: scale(1); } }
/* 扫好的商品：绿色、变淡一点，和没扫完的明显区分 */
.pcard.full:not(.current) { opacity: .82; }
.pcard.full .pname { color: #065f46; }
.done-divider { display: flex; align-items: center; gap: 12px; margin: 10px 0 2px; color: #047857; font-weight: 800; font-size: 13px; }
.done-divider::before, .done-divider::after { content: ""; flex: 1; height: 1px; background: #a7f3d0; }
.done-divider span { background: #ecfdf5; border: 1px solid #a7f3d0; border-radius: 999px; padding: 5px 14px; }
.tag.manual { background: #f3e8ff; color: #7e22ce; }
@media (max-width: 960px) {
  .pick-layout { grid-template-columns: 1fr; }
  .pick-side { position: static; }
}
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 80; display: grid; place-items: center; padding: 16px; }
.modal { background: #fff; border-radius: 22px; padding: 28px; max-width: 520px; width: 100%; text-align: center; box-shadow: 0 24px 60px rgba(0,0,0,.25); }
.modal.danger { border: 6px solid var(--danger); }
.modal h2 { color: var(--danger); font-size: 26px; }
.modal img { max-width: 160px; max-height: 160px; border-radius: 10px; margin: 8px auto; display: block; }
.modal .actions { display: flex; gap: 10px; justify-content: center; margin-top: 18px; }

/* 正在对货：荧光闪动，一眼看出是哪一单 */
.picking-glow {
  position: relative; z-index: 1;
  background: linear-gradient(90deg, #fff4ea, #fffaf5 45%, #fff) !important;
  animation: glow 1.8s ease-in-out infinite;
}
.pick-list .row.picking-glow { border-radius: 12px; margin: 4px 6px; }
.picking-glow .tag.picking {
  background: #ffe4cc; color: #9a3d00; font-weight: 800; animation: blink 1.8s ease-in-out infinite;
}
.picking-glow .tag.picking::before { content: "● "; color: #ff7a1a; }
@keyframes glow {
  0%, 100% { box-shadow: 0 0 0 2px #ffc79a, 0 0 6px 1px rgba(255,138,43,.18); }
  50%      { box-shadow: 0 0 0 2px #ff9a4d, 0 0 16px 4px rgba(255,138,43,.35); }
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .65; } }
@media (prefers-reduced-motion: reduce) {
  .picking-glow, .picking-glow .tag.picking { animation: none; box-shadow: 0 0 0 2px #ffb070; }
}

/* OFERTA 商品：红色标出（不参加整单折扣） */
.tag.offer { background: var(--danger); color: #fff; font-weight: 800; letter-spacing: .03em; }
.items tr.offer td { background: #fff1f1; }
.items tr.offer .name, .pcard .pname.offer-name { color: #c81e1e; }

/* 回到顶部 */
.to-top {
  position: fixed; right: 28px; bottom: 28px; z-index: 30; display: flex; flex-direction: column; align-items: center;
  width: 64px; height: 64px; border-radius: 50%; padding: 0; justify-content: center; font-size: 22px; line-height: 1;
  box-shadow: 0 8px 24px rgba(255,106,0,.4); opacity: 0; pointer-events: none; transform: translateY(10px);
  transition: opacity .2s, transform .2s;
}
.to-top span { font-size: 10px; font-weight: 700; margin-top: 2px; }
.to-top.show { opacity: 1; pointer-events: auto; transform: none; }

/* 点图片放大 */
img[data-zoom] { cursor: zoom-in; }
.zoom-bg {
  position: fixed; inset: 0; z-index: 90; background: rgba(15,23,42,.82); display: grid; place-items: center;
  padding: 24px; cursor: zoom-out; animation: fadein .15s ease-out;
}
.zoom-bg img { max-width: min(80vw, 560px); max-height: 60vh; border-radius: 16px; background: #fff; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.zoom-x { position: fixed; top: 18px; right: 24px; color: #fff; font-size: 28px; font-weight: 300; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  background: #111827; color: #fff; padding: 12px 20px; border-radius: 12px; z-index: 100; font-weight: 600;
  box-shadow: 0 10px 30px rgba(0,0,0,.2);
}
.toast.err { background: var(--danger); }

@media (max-width: 700px) {
  .topbar { flex-wrap: wrap; gap: 10px; padding: 10px 16px; }
  main { padding: 12px 16px; }
}

/* 自动录入 POS（订单详情里的区块） */
.pos-box { display: flex; flex-direction: column; gap: 6px; }
.pos-box .bar { margin: 4px 0; height: 6px; }
.pos-box .history { margin: 0; }
.pos-box button { align-self: flex-start; }

/* 订单详情：折扣率 */
.totals .disc-rate { color: var(--brand-dark); margin-left: 4px; }
.totals .sub { font-size: 11px; }

/* 订单详情：网店修改记录 */
.web-changes { display: grid; gap: 10px; font-size: 13px; }
.web-changes .wc { background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; padding: 8px 12px; display: grid; gap: 3px; }
.web-changes .wc-at { font-weight: 700; color: #92400e; font-size: 12px; }
.web-changes .wc-add { color: #047857; }
.web-changes .wc-del { color: var(--danger); }
.web-changes .wc-qty { color: #1d4ed8; }
.web-changes .wc-add, .web-changes .wc-del, .web-changes .wc-qty { display: flex; align-items: center; gap: 10px; padding: 3px 0; }
.web-changes .wc-img { width: 52px; height: 52px; flex: none; object-fit: cover; border-radius: 8px; border: 1px solid #fde68a; background: #fff; cursor: zoom-in; }
.web-changes .wc-img.noimg { cursor: default; }

/* 订单图片（发 WhatsApp） */
.order-img-modal { max-width: 760px; text-align: left; padding: 18px 20px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; }
.order-img-modal .oi-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.order-img-modal .oi-head button { margin-left: auto; }
.order-img-modal .oi-body { overflow-y: auto; }
.order-img-modal .oi-steps { background: #eff6ff; color: #1e3a8a; padding: 8px 12px; border-radius: 8px; font-size: 14px; }
.order-img-modal .oi-actions { display: flex; align-items: center; gap: 8px; margin: 10px 0; }
.order-img-modal .oi-img canvas { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; display: block; }
.order-img-modal .oi-page { margin-bottom: 18px; }

/* 订单详情：对货结果（在商品表里） */
.pick-head { display: flex; align-items: center; gap: 10px; margin: 4px 0 8px; flex-wrap: wrap; }
.pick-head button { margin-left: auto; }
.items tr.short td { background: #fee2e2; }
.items .miss, .pick-head .miss { color: var(--danger); font-weight: 700; font-size: 12px; }
.items .ok-mark, .pick-head .ok-mark { color: #16a34a; font-weight: 700; }
.items .pick-qty { width: 64px; text-align: right; }
.items .nowrap { white-space: nowrap; }
.pick-actions { display: flex; gap: 8px; margin-top: 10px; }
.totals .pick-refund { color: var(--danger); }
.totals .pick-final { color: var(--brand-dark); font-size: 18px; }
.totals #pickTotals { display: block; padding: 0; }
.order-img-modal .oi-bar { flex-wrap: wrap; margin: 0 0 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.order-img-modal .oi-bar button.copied { background: #e5e7eb; color: #6b7280; border-color: #d1d5db; }
.order-img-modal .oi-bar .wa-btn { background: #22c55e; border-color: #22c55e; }
.order-img-modal .oi-dl { display: flex; gap: 6px; margin-left: auto; }
.order-img-modal .oi-label { font-weight: 700; margin: 6px 0; }
/* 看板：对货进度 */
.kprog { flex-basis: 100%; display: flex; align-items: center; gap: 8px; font-size: 12px; color: #9a3412; }
.kprog-bar { flex: 1; height: 8px; background: #fde4cf; border-radius: 99px; overflow: hidden; }
.kprog-bar > div { height: 100%; background: #f97316; border-radius: 99px; transition: width .3s; }
/* 打印面单窗口 */
.label-modal { max-width: 860px; text-align: left; padding: 18px 20px; }
.label-modal .oi-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.label-modal .oi-head button { margin-left: auto; }
.lb-grid { display: grid; grid-template-columns: 1fr 360px; gap: 18px; }
.lb-form { display: flex; flex-direction: column; gap: 6px; }
.lb-form label { font-weight: 700; font-size: 13px; margin-top: 6px; }
.lb-form input { width: 100%; }
.lb-count { display: flex; gap: 6px; align-items: center; }
.lb-count input { width: 80px; text-align: center; font-size: 20px; font-weight: 700; }
.lb-count button { font-size: 20px; width: 44px; }
.lb-print { margin-top: 12px; font-size: 18px; padding: 12px; }
.lb-preview iframe { width: 100%; height: 540px; border: 1px solid var(--line); border-radius: 8px; background: #f3f4f6; }
@media (max-width: 760px) { .lb-grid { grid-template-columns: 1fr; } }
/* 发货扫码 */
.dispatch { max-width: 720px; }
.dispatch-scan input { width: 100%; font-size: 28px; padding: 16px; border: 3px solid var(--brand); border-radius: 14px; }
.dispatch-last { margin: 16px 0; padding: 18px; border-radius: 14px; font-size: 22px; font-weight: 700; min-height: 30px; }
.dispatch-last.ok { background: #dcfce7; color: #166534; }
.dispatch-last.warn { background: #fef3c7; color: #92400e; }
.dispatch-last.err { background: #fee2e2; color: var(--danger); }
.lb-ships { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.lb-ships button { padding: 10px 8px; font-size: 14px; font-weight: 700; text-align: center; }
.lb-ships button.on { background: var(--brand); color: #fff; border-color: var(--brand); }
/* 配货 / 对货 */
.pick-sec { margin: 18px 0 10px; }
.ocard-act { display: flex; flex-direction: column; gap: 6px; }
.mode-banner { font-size: 22px; font-weight: 800; text-align: center; padding: 10px; border-radius: 14px; margin-bottom: 10px; color: #fff; }
.mode-banner.prep { background: #22c55e; }
.mode-banner.check { background: #ea580c; }

.items .prep-diff { color: #1d4ed8; font-size: 11px; font-weight: 700; }
/* 扫码配货页面：照老板旧系统的配货界面（白 / 灰底，黑色选中，绿色“全配”，橙色主按钮） */
body.theme-prep { --bg: #f3f4f6; }
.prep-wrap { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; padding-bottom: 96px; }
.prep-head { position: sticky; top: 0; z-index: 15; background: #fff; border: 1px solid var(--line); border-radius: 18px;
  box-shadow: var(--shadow); padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.ph-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ph-back { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px;
  text-decoration: none; color: var(--text); font-size: 18px; font-weight: 700; }
.ph-no { font-family: var(--mono); font-size: 12px; color: var(--muted); font-weight: 700; }
.ph-cust { font-size: 16px; font-weight: 800; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: uppercase; }
.ph-pill { flex: none; font-size: 12px; font-weight: 800; color: #047857; background: #ecfdf5; border: 1px solid #a7f3d0; border-radius: 999px; padding: 3px 10px; font-family: var(--mono); }
.ph-pill.done { background: #10b981; color: #fff; border-color: #10b981; }
.ph-scan { display: flex; align-items: center; gap: 8px; border: 2px solid #34d399; border-radius: 12px; padding: 4px 6px 4px 10px; background: #f0fdf9; }
.ph-scan .dot { width: 8px; height: 8px; border-radius: 50%; background: #10b981; flex: none; box-shadow: 0 0 0 3px #d1fae5; }
.ph-scan .bars { font-family: var(--mono); letter-spacing: -1px; color: #9aa3b2; font-weight: 800; }
.ph-scan input { flex: 1; min-width: 0; border: 0; background: transparent; font-size: 15px; font-weight: 700; padding: 8px 4px; }
.ph-scan input:focus { box-shadow: none; }
.ph-scan .kbd-btn { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; flex: none; }
.ph-scan .kbd-btn.on { background: #10b981; color: #fff; border-color: #10b981; }
.ph-scan.lost { border-color: #f87171; background: #fef2f2; }
.ph-scan.lost .dot { background: #ef4444; box-shadow: 0 0 0 3px #fee2e2; }
.prep-head .lost-hint { display: none; color: var(--danger); font-size: 12px; font-weight: 700; }
.prep-head:has(.ph-scan.lost) .lost-hint { display: block; }
.ph-tools { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ph-tools .spacer { flex: 1; }
.ph-ship { font-size: 12px; font-weight: 700; color: #c2410c; background: #fff7ed; border: 1px solid #fed7aa; border-radius: 8px; padding: 3px 8px; }
.ph-note { font-size: 12px; color: #4b5563; background: #f3f4f6; border-radius: 8px; padding: 3px 8px; }
.ph-all { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; padding: 6px 12px; border-radius: 10px; font-size: 13px; font-weight: 800; }
.ph-all:hover { background: #d1fae5; }
.prep-filters { display: flex; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 6px; overflow-x: auto; }
.prep-filters button { background: transparent; color: #4b5563; border: 1px solid var(--line); border-radius: 10px; padding: 7px 12px;
  font-size: 13px; font-weight: 800; white-space: nowrap; }
.prep-filters button.on { background: #111827; color: #fff; border-color: #111827; }
.prep-wrap .pcard { border-radius: 16px; padding: 12px 14px; }
.prep-wrap .pcard.current { border: 2px solid #10b981; box-shadow: 0 0 0 4px #d1fae5, var(--shadow); background: #fff; }
.prep-wrap .pcard .badge.need { background: #f3f4f6; color: #4b5563; border-color: #e5e7eb; }
.prep-wrap .pcard .mid img, .prep-wrap .pcard .mid .noimg { width: 84px; height: 84px; border-radius: 12px; }
.prep-wrap .pcard .pname { font-size: 15px; }
.prep-wrap .bar > div { background: linear-gradient(90deg, #6ee7b7, #10b981); }
.prep-bottom { position: fixed; left: 50%; transform: translateX(-50%); bottom: 10px; z-index: 30; width: min(740px, calc(100% - 20px));
  display: flex; align-items: center; gap: 8px; background: #111827; color: #fff; border-radius: 16px; padding: 10px 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.prep-bottom .pb-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.prep-bottom small { color: #d1d5db; font-size: 11px; font-weight: 700; }
.prep-bottom small b { color: #fff; }
.prep-bottom #pbKinds { color: #6ee7b7; font-size: 12px; }
.prep-bottom .bar { margin: 0; height: 5px; background: #374151; }
.prep-bottom button { flex: none; padding: 11px 14px; border-radius: 12px; font-size: 15px; font-weight: 800; }
.prep-bottom button.ghost { background: transparent; color: #d1d5db; border-color: #4b5563; }
.prep-bottom .pb-finish { background: #ff6a00; border-color: #ff6a00; color: #fff; }
.prep-bottom .pb-finish:hover { background: #e85d00; }

/* 扫码框旁边的“手动输入”（手机 / PDA 默认不弹键盘） */
.scan-card .label { display: flex; align-items: center; }
.kbd-btn { margin-left: auto; background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.5); color: #fff;
  font-size: 12px; padding: 3px 10px; border-radius: 8px; font-weight: 700; }
.kbd-btn.on { background: #fff; color: var(--brand-dark); }

/* 手机 / PDA（窄屏）：扫码配货 / 对货页面 */
@media (max-width: 700px) {
  .topbar { flex-wrap: wrap; gap: 6px 10px; padding: 8px 12px; position: static; }
  .topbar .brand small, .topbar .brand-name { display: none; }
  .topbar .brand-logo { height: 34px; }
  .topbar nav { order: 3; width: 100%; overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .topbar nav a { white-space: nowrap; padding: 6px 10px; }
  main { padding: 10px 10px 90px; }
  .pick-list-head { flex-direction: column; align-items: stretch; gap: 8px; }
  .pick-list-head input { width: 100%; font-size: 16px; padding: 12px; }
  .pick-list-head h2 { margin: 4px 0; font-size: 20px; }
  .order-grid { grid-template-columns: 1fr; gap: 10px; }
  .ocard-act button { padding: 14px; font-size: 16px; }

  .pick-layout { gap: 10px; }
  .pick-side { position: sticky; top: 0; z-index: 15; gap: 6px; background: var(--bg); padding: 4px 0 6px; }
  .pick-side .back-link { display: none; }
  .mode-banner { font-size: 16px; padding: 6px; margin: 0; border-radius: 10px; }
  .scan-card { padding: 10px 12px; border-radius: 14px; }
  .scan-card .label { margin-bottom: 6px; }
  .scan-card input { font-size: 20px; padding: 10px 12px; }
  .prog-card { padding: 6px 12px; display: flex; align-items: center; gap: 10px; }
  .prog-card .title { display: none; }
  .prog-card .bar { margin: 0; flex: 1; }
  .prog-card .stats { display: flex; gap: 4px; align-items: baseline; }
  .prog-card .stat { padding: 0; background: none; }
  .prog-card .stat small { display: none; }
  .prog-card .stat b { font-size: 18px; }
  .prog-card .stat + .stat b::before { content: "/ "; color: var(--muted); }
  .prog-card .kv { display: none; }
  /* 完成 / 先放下：固定在屏幕最下面 */
  .side-actions { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; margin: 0; padding: 8px 10px;
    grid-template-columns: 2fr 1fr; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(0,0,0,.08); }
  .side-actions button { padding: 14px 8px; font-size: 16px; }

  .pcards { gap: 10px; }
  .pcard { padding: 12px; border-radius: 16px; }
  .pcard .mid { gap: 10px; margin: 8px 0; }
  .pcard .mid img, .pcard .mid .noimg { width: 72px; height: 72px; border-radius: 10px; }
  .pcard .pname { font-size: 15px; }
  .pcard .bot { gap: 8px; padding-top: 10px; }
  .pcard .bot .spacer { display: none; }
  .pcard .bot .stepper { width: 100%; justify-content: space-between; }
  .stepper button { width: 56px; height: 50px; font-size: 24px; }
  .pcard .bot button.green, .pcard .bot button.outline { flex: 1; padding: 14px 8px; font-size: 15px; }
  .to-top { bottom: 84px; }
  .modal { padding: 20px 16px; }
  .modal .actions { flex-direction: column; }
}
@media (max-width: 700px) {
  .theme-prep main { padding: 8px 8px 0; }
  .prep-wrap { padding-bottom: 92px; }
  .prep-bottom { bottom: 6px; width: calc(100% - 12px); padding: 8px 10px; }
  .prep-bottom button { padding: 12px 10px; }
  .prep-wrap .pcard .mid img, .prep-wrap .pcard .mid .noimg { width: 72px; height: 72px; }
}
/* 配货卡片：数量框和“全配 / 缺货”放一行（照参考界面） */
.prep-wrap .pcard .bot { flex-wrap: nowrap; gap: 8px; }
.prep-wrap .pcard .bot .stepper { width: auto !important; flex: 1; justify-content: space-between; max-width: 260px; }
.prep-wrap .pcard .bot .spacer { display: block; flex: 0 1 auto; }
.prep-wrap .pcard .bot button.green, .prep-wrap .pcard .bot button.outline { flex: none !important; padding: 10px 12px !important; font-size: 14px; }
@media (max-width: 700px) {
  .prep-wrap .stepper button { width: 44px; height: 46px; }
  .prep-wrap .stepper .val input { width: 46px; }
}
/* 正在配货：浅绿色（正在对货还是橙色） */
.picking-glow.prepping { background: linear-gradient(90deg, #ecfdf5, #f6fef9 45%, #fff) !important; animation-name: glow-green; }
.picking-glow.prepping .tag.picking { background: #d1fae5; color: #047857; }
.picking-glow.prepping .tag.picking::before { color: #10b981; }
.ocard.prepping .ocard-act button:not(.ghost) { background: #10b981; border-color: #10b981; }
.ocard.prepping .ocard-act button:not(.ghost):hover { background: #059669; }
.kcard.prepping .kprog { color: #047857; }
.kcard.prepping .kprog-bar { background: #d1fae5; }
.kcard.prepping .kprog-bar > div { background: #10b981; }
@keyframes glow-green {
  0%, 100% { box-shadow: 0 0 0 2px #a7f3d0, 0 0 6px 1px rgba(16,185,129,.18); }
  50%      { box-shadow: 0 0 0 2px #34d399, 0 0 16px 4px rgba(16,185,129,.32); }
}
@media (prefers-reduced-motion: reduce) { .picking-glow.prepping { box-shadow: 0 0 0 2px #6ee7b7; } }
/* 配货 / 对货页面：待处理 | 历史记录 */
.list-tabs { display: flex; gap: 6px; margin: 4px 0 10px; }
.list-tabs button, .list-tabs button:hover { background: #fff; color: #4b5563; border: 1px solid var(--line); border-radius: 10px; padding: 8px 16px; font-weight: 800; }
.list-tabs button.on, .list-tabs button.on:hover { background: #111827; color: #fff; border-color: #111827; }
.hist-bar { display: flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.hist-bar button { background: #fff; color: #4b5563; border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 700; }
.hist-bar button.on { background: var(--brand-soft); color: var(--brand-dark); border-color: var(--brand); }
.hist-day { margin: 14px 2px 6px; color: var(--muted); font-size: 13px; }
.hist-row { display: flex; gap: 10px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 10px 14px; margin-bottom: 8px; cursor: pointer; box-shadow: var(--shadow); }
.hist-row:hover { border-color: var(--brand); }
.hist-row.voided { opacity: .6; }
.hr-main { flex: 1; min-width: 0; }
.hr-top { display: flex; align-items: baseline; gap: 8px; }
.hr-no { font-size: 16px; }
.hr-cust { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 700; }
.hr-total { font-family: var(--mono); font-size: 13px; color: var(--brand-dark); font-weight: 700; }
.hr-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--muted); font-size: 12px; margin-top: 4px; }
.hr-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.hr-open { color: var(--muted); font-size: 12px; font-weight: 700; }
@media (max-width: 700px) {
  .list-tabs button { flex: 1; padding: 10px 6px; }
  .hist-row { padding: 10px; }
}
.hist-bar[hidden], #history[hidden], #grid[hidden] { display: none; }
/* 自动开单 */
.billing { max-width: 980px; }
.bill-row { display: flex; gap: 12px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 14px; margin-bottom: 8px; cursor: pointer; box-shadow: var(--shadow); }
.bill-row:hover { border-color: var(--brand); }
.bill-row.running { border: 2px solid #3b82f6; background: #f8fbff; }
.bill-row.running.paused { border-color: #f59e0b; background: #fffbeb; }
.bill-row .miss { color: var(--danger); font-weight: 700; }
.bill-row .okc { color: #047857; font-weight: 700; }
.bill-prog { margin-top: 6px; font-size: 13px; }
.bill-prog .bar { margin: 4px 0 0; height: 6px; }
.bill-fail { margin-top: 6px; font-size: 12px; color: #b45309; font-weight: 700; }
.bill-act { display: flex; flex-direction: column; gap: 6px; flex: none; }
.bill-act button { padding: 10px 14px; border-radius: 12px; font-weight: 800; }
@media (max-width: 700px) { .bill-row { flex-direction: column; align-items: stretch; } .bill-act button { width: 100%; } }
/* 看板：“配货中”“对货中”两列（不能拖进去） */
.col.virtual { background: #fafafa; }
.col.virtual .col-head span:first-child::before { content: "● "; color: var(--c); }
/* 员工权限 */
.perm-cell { max-width: 260px; }
.perm-cell .sub { display: block; margin-bottom: 4px; }
.perms-modal { text-align: left; max-width: 560px; }
.perms-modal h3 { margin: 0 0 4px; }
.perm-tools { display: flex; gap: 6px; margin: 10px 0; }
.perm-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.perm-item { display: flex; gap: 8px; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; cursor: pointer; }
.perm-item input { margin-top: 3px; width: 18px; height: 18px; }
.perm-item span { display: flex; flex-direction: column; }
.perm-item small { color: var(--muted); font-size: 12px; }
.perm-item:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.no-perm { max-width: 520px; margin: 60px auto; text-align: center; font-size: 18px; padding: 30px; }
@media (max-width: 600px) { .perm-list { grid-template-columns: 1fr; } }
/* 扫码框下面：刚扫到什么、还差几件 */
.last-hit { margin-top: 12px; border-radius: 14px; padding: 10px 12px; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.45); color: #fff; }
.last-hit .lh-top { display: flex; gap: 10px; align-items: center; }
.last-hit img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: #fff; flex: none; }
.last-hit .lh-text { min-width: 0; display: flex; flex-direction: column; }
.last-hit small { font-size: 11px; font-weight: 700; opacity: .9; }
.last-hit .lh-text b { font-size: 15px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.last-hit .lh-left { display: flex; align-items: baseline; justify-content: space-between; margin-top: 8px; padding: 6px 12px;
  border-radius: 10px; background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.4); font-weight: 700; font-size: 12px; }
.last-hit .lh-left b { font-size: 26px; font-family: var(--mono); }
.last-hit .lh-left b small { font-size: 12px; }
.last-hit.done .lh-left { background: rgba(16,185,129,.9); border-color: #a7f3d0; }
.last-hit.warn .lh-left { background: rgba(245,158,11,.9); }
.last-hit.bad { background: rgba(127,29,29,.55); border-color: #fecaca; }
/* 配货页（白底）上的样子 */
.prep-head .last-hit { margin-top: 0; background: #f9fafb; border: 1px solid var(--line); color: var(--text); padding: 8px 10px; }
.prep-head .last-hit .lh-left { background: #fff7ed; border-color: #fed7aa; color: #9a3412; margin-top: 6px; padding: 4px 10px; }
.prep-head .last-hit .lh-left b { font-size: 22px; }
.prep-head .last-hit.done .lh-left { background: #ecfdf5; border-color: #a7f3d0; color: #047857; }
.prep-head .last-hit.warn .lh-left { background: #fef3c7; border-color: #fde68a; color: #92400e; }
.prep-head .last-hit.bad { background: #fef2f2; border-color: #fecaca; color: var(--danger); }
.prep-head .last-hit small { color: var(--muted); }
/* 商品库位 */
.products-page { max-width: 1100px; }
.prod-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.prod-row { display: grid; grid-template-columns: 150px 1fr 180px 180px 70px; gap: 12px; align-items: center; background: #fff;
  border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; margin-bottom: 6px; }
.prod-row img, .prod-row .noimg { width: 150px; height: 150px; object-fit: cover; border-radius: 10px; cursor: zoom-in; border: 1px solid var(--line); background: #f3f4f6; }
.pr-info { min-width: 0; }
.pr-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-info .sub { margin-top: 3px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.pr-loc { display: flex; flex-direction: column; gap: 2px; font-size: 11px; font-weight: 700; color: var(--muted); }
.pr-loc input { font-family: var(--mono); font-weight: 800; font-size: 15px; text-transform: uppercase; padding: 8px 10px; }
.pr-saved { color: #047857; font-size: 12px; font-weight: 700; }
.prod-more { text-align: center; margin: 12px 0 30px; }
@media (max-width: 760px) {
  .prod-row { grid-template-columns: 110px 1fr 1fr; grid-template-areas: "img info info" "loose loose box" "saved saved saved"; }
  .prod-row > img, .prod-row > .noimg { grid-area: img; }
  .prod-row .pr-info { grid-area: info; }
  .prod-row .pr-loc:nth-of-type(1) { grid-area: loose; }
  .prod-row .pr-loc:nth-of-type(2) { grid-area: box; }
  .prod-row .pr-saved { grid-area: saved; }
  .pr-name { white-space: normal; }
}
/* 配货 / 对货卡片上的库位 */
.loc-chip { display: inline-flex; align-items: center; gap: 4px; font-family: var(--mono); font-size: 13px; font-weight: 800;
  border-radius: 8px; padding: 3px 9px; }
.loc-chip.loose { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.loc-chip.box { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
@media (max-width: 760px) { .prod-row img, .prod-row .noimg { width: 110px; height: 110px; } }
.ocard-act .reset-btn { color: var(--danger); border-color: #fecaca; background: #fff; font-size: 13px; padding: 8px; }
.ocard-act .reset-btn:hover { background: #fef2f2; }
/* 看板：消息提醒（在搜索框那一行右边，不盖住看板） */
.board-tools { position: relative; flex-wrap: nowrap; min-height: 38px; }
.board-tools .hint { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto; }
.notif-area { margin-left: auto; display: flex; gap: 6px; justify-content: flex-end; min-width: 0; overflow: hidden; flex: 1 1 auto; }
.notif { display: inline-flex; align-items: center; gap: 8px; max-width: 420px; min-width: 0; padding: 7px 10px 7px 12px; border-radius: 10px;
  font-size: 13px; font-weight: 700; border: 1px solid; cursor: pointer; animation: notif-in .35s ease-out; box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.notif .n-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif .n-x { opacity: .5; font-size: 11px; }
.notif.new { background: #ecfdf5; border-color: #6ee7b7; color: #065f46; }
.notif.stage { background: #eff6ff; border-color: #93c5fd; color: #1e3a8a; }
.notif.changed { background: #fffbeb; border-color: #fcd34d; color: #92400e; }
.notif.voided { background: #fef2f2; border-color: #fca5a5; color: #991b1b; }
.notif.out { opacity: 0; transform: translateY(-6px); transition: all .4s; }
@keyframes notif-in { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }
.notif-bell { flex: none; position: relative; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; font-size: 16px; }
.notif-bell b { position: absolute; top: -6px; right: -6px; background: var(--danger); color: #fff; font-size: 11px; border-radius: 999px; padding: 1px 6px; }
.notif-panel { position: absolute; right: 0; top: 44px; z-index: 30; width: 420px; max-width: calc(100vw - 24px); max-height: 60vh; overflow-y: auto;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 16px 40px rgba(0,0,0,.18); padding: 6px; }
.np-head { font-size: 12px; color: var(--muted); font-weight: 700; padding: 6px 8px; }
.np-empty { padding: 20px; text-align: center; color: var(--muted); }
.np-item { display: flex; justify-content: space-between; gap: 8px; width: 100%; text-align: left; background: #fff; color: var(--text);
  border: 0; border-radius: 8px; padding: 8px; font-size: 13px; font-weight: 600; }
.np-item:hover { background: #f7f8fa; }
.np-item small { color: var(--muted); flex: none; }
.np-item.new span::first-letter, .np-item.voided { }
@media (max-width: 900px) { .board-tools { flex-wrap: wrap; } .board-tools .hint { display: none; } }
.notif.prep { background: #ecfdf5; border-color: #34d399; color: #047857; }
.notif.check { background: #fff7ed; border-color: #fdba74; color: #9a3412; }
/* 看板提醒：荧光效果（按类型发不同颜色的光，一闪一闪） */
.notif { --g: 255,106,0; animation: notif-in .35s ease-out, notif-glow 1.6s ease-in-out .35s infinite; }
.notif.new { --g: 16,185,129; }
.notif.stage { --g: 59,130,246; }
.notif.changed { --g: 245,158,11; }
.notif.voided { --g: 239,68,68; }
.notif.prep { --g: 16,185,129; }
.notif.check { --g: 249,115,22; }
@keyframes notif-glow {
  0%, 100% { box-shadow: 0 0 0 1px rgba(var(--g),.35), 0 0 8px 1px rgba(var(--g),.35); }
  50%      { box-shadow: 0 0 0 2px rgba(var(--g),.7), 0 0 20px 6px rgba(var(--g),.55); }
}
.notif-area { overflow: clip; overflow-clip-margin: 26px; padding: 4px 6px; }
.notif-bell:has(b:not([hidden])) { animation: notif-glow 1.6s ease-in-out infinite; --g: 239,68,68; }
@media (prefers-reduced-motion: reduce) { .notif, .notif-bell { animation: none !important; box-shadow: 0 0 0 2px rgba(var(--g),.6), 0 0 12px rgba(var(--g),.5); } }
/* 营业统计 */
.stats-page { max-width: 1200px; }
.stats-filters { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.stats-filters .list-tabs { margin: 0; flex-wrap: wrap; }
.st-date { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-bottom: 12px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.kpi small { color: var(--muted); font-size: 12px; font-weight: 700; }
.kpi b { font-size: 24px; font-weight: 800; font-family: var(--mono); color: var(--text); }
.kpi span { color: var(--muted); font-size: 12px; }
.kpi.hero b { font-size: 30px; }
.chart-card { padding: 14px 16px; margin-bottom: 12px; }
.chart-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.chart-head h3 { margin: 0; font-size: 15px; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--text); margin-left: auto; }
.legend > span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.chart { width: 100%; }
.viz-tip { position: fixed; z-index: 100; background: var(--tip-bg); color: #fff; font-size: 12px; padding: 8px 10px; border-radius: 8px;
  pointer-events: none; box-shadow: 0 8px 20px rgba(0,0,0,.2); line-height: 1.5; }
.stage-bars { display: flex; flex-direction: column; gap: 8px; }
.sb-row { display: grid; grid-template-columns: 150px 1fr 260px; gap: 10px; align-items: center; font-size: 13px; }
.sb-name { font-weight: 700; }
.sb-track { height: 14px; background: #f3f4f6; border-radius: 4px; overflow: hidden; }
.sb-bar { display: block; height: 100%; border-radius: 0 4px 4px 0; }
.sb-val { color: var(--muted); font-family: var(--mono); font-size: 12px; }
.sb-val b { color: var(--text); }
details.chart-card summary { cursor: pointer; font-weight: 700; }
.sb-stack { display: flex; gap: 2px; }
.sb-stack .sb-bar { border-radius: 0; }
.sb-stack .sb-bar:last-child { border-radius: 0 4px 4px 0; }
#staffBars { margin: 10px 0 14px; }
.staff-table th.grp { text-align: center; border-bottom: 1px solid var(--line); }
.staff-table td, .staff-table th { white-space: nowrap; }
@media (max-width: 900px) { .kpis { grid-template-columns: repeat(2, 1fr); } .sb-row { grid-template-columns: 100px 1fr; } .sb-val { grid-column: 2; } }
/* 订单详情：转账凭证 */
.rc-box { margin: 10px 0 14px; }
.rc-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.rc-head .rc-pick { margin-left: auto; cursor: pointer; }
.rc-list { display: flex; gap: 10px; flex-wrap: wrap; align-items: stretch; }
.rc-item { margin: 0; width: 120px; display: flex; flex-direction: column; gap: 4px; }
.rc-item img { width: 120px; height: 120px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); cursor: zoom-in; background: #f3f4f6; }
.rc-item figcaption { font-size: 11px; color: var(--muted); line-height: 1.3; position: relative; }
.rc-item .rc-del { position: absolute; right: 0; top: 0; padding: 0 4px; }
.rc-drop { flex: 1; min-width: 200px; min-height: 120px; border: 2px dashed var(--line); border-radius: 10px; display: grid; place-items: center;
  color: var(--muted); font-size: 13px; text-align: center; padding: 10px; }
.rc-drop.over { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); }
/* 看板：换了列的卡片闪 3 下（用这一列的颜色发光，约 5 秒） */
.kcard.moved { position: relative; z-index: 2; animation: card-moved 1.6s ease-in-out 3; }
@keyframes card-moved {
  0%, 100% { box-shadow: 0 0 0 0 transparent; background: #fff; }
  40%      { box-shadow: 0 0 0 3px var(--c), 0 0 22px 6px color-mix(in srgb, var(--c) 55%, transparent);
             background: color-mix(in srgb, var(--c) 14%, #fff); transform: scale(1.02); }
}
@media (prefers-reduced-motion: reduce) { .kcard.moved { animation: none; box-shadow: 0 0 0 3px var(--c); } }
.list-tabs[hidden] { display: none; }

/* 小屏幕（例如对货电脑 1024×768）：顶部菜单一行、对货页面紧凑一点（老板 2026-10-24） */
@media (max-width: 1280px) {
  .topbar { gap: 12px; padding: 6px 14px; }
  .topbar nav { flex-wrap: nowrap; overflow-x: auto; min-width: 0; flex: 1 1 auto; scrollbar-width: none; gap: 2px; }
  .topbar nav::-webkit-scrollbar { display: none; }
  .topbar nav a { white-space: nowrap; padding: 6px 8px; font-size: 13px; }
  .topbar .brand-name { font-size: 13px; letter-spacing: .06em; padding-left: 8px; }
  .topbar .brand-logo { height: 46px; margin: -6px 0; }
  .topbar .right { gap: 8px; flex: none; }
  .topbar .right .me { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar .lang-switch button { padding: 4px 8px; }
}
@media (min-width: 701px) and (max-width: 1280px), (min-width: 701px) and (max-height: 820px) {
  main { padding: 12px 14px; }
  .pick-layout { grid-template-columns: 270px 1fr; gap: 14px; }
  /* 左边面板：不超过屏幕高度，“完成对货”一定看得到 */
  .pick-side { top: 6px; gap: 8px; max-height: calc(100vh - 12px); overflow-y: auto; scrollbar-width: thin; }
  .pick-side .back-link { padding: 0; font-size: 13px; }
  .scan-card { padding: 12px 14px; border-radius: 16px; }
  .scan-card .label { margin-bottom: 6px; }
  .scan-card input { font-size: 18px; padding: 10px 12px; }
  .last-hit { margin-top: 8px; padding: 8px 10px; }
  .last-hit img { width: 36px; height: 36px; }
  .last-hit .lh-text b { font-size: 13px; }
  .last-hit .lh-left { margin-top: 6px; padding: 4px 10px; }
  .last-hit .lh-left b { font-size: 20px; }
  .prog-card { padding: 12px 14px; }
  .prog-card .bar { margin: 8px 0 10px; }
  .stat { padding: 6px 10px; }
  .stat b { font-size: 22px; }
  .kv { margin-top: 10px; padding-top: 8px; gap: 4px; font-size: 12px; }
  .side-actions { margin-top: 10px; gap: 6px; }
  .side-actions button { padding: 9px; font-size: 14px; }
  /* 商品卡片：小一点，一屏能多看几个 */
  .pcards { gap: 10px; }
  .pcard { padding: 10px 14px; border-radius: 14px; }
  .pcard .mid { gap: 12px; margin: 8px 0; }
  .pcard .mid img, .pcard .mid .noimg { width: 72px; height: 72px; border-radius: 10px; }
  .pcard .pname { font-size: 15px; }
  .pcard .pline { margin-top: 4px; }
  .pcard .bot { padding-top: 8px; gap: 8px; }
  .stepper button { width: 38px; height: 38px; font-size: 18px; }
  .stepper .val input { font-size: 18px; width: 48px; }
  button.green, button.outline { padding: 8px 14px; }
  .chip { font-size: 11px; padding: 2px 7px; }
  .badge { font-size: 11px; padding: 2px 8px; }
  .loc-chip { font-size: 12px; padding: 2px 7px; }
  .pick-list-head h2 { font-size: 20px; margin: 4px 0; }
  .order-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
  .ocard-act button { padding: 8px; }
}
/* 看板：停留太久的单 */
.kcard.stale { border-left: 4px solid var(--danger); background: #fff5f5; }
.tag.stale-tag { background: #fee2e2; color: #b91c1c; font-weight: 800; }
.col-head .stale-n { background: #fee2e2; color: #b91c1c; margin-left: auto; margin-right: 4px; }
.col-head .stale-n + .n { margin-left: 0; }
.stale-btn { background: #fff; color: #b91c1c; border: 1px solid #fecaca; border-radius: 10px; padding: 6px 12px; font-weight: 800; white-space: nowrap; }
.stale-btn.on { background: #b91c1c; color: #fff; border-color: #b91c1c; }
.np-item.unread { background: #fff7ed; }
.np-item.unread span::before { content: "● "; color: var(--brand); }
.np-item.new span { color: #065f46; }
.np-item.voided span { color: #991b1b; }

/* 客户页面（2026-10-25） */
.customers-page { max-width: 1500px; }
.cust-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: start; }
.cust-layout:has(.cust-detail:not([hidden])) { grid-template-columns: minmax(0, 1fr) minmax(420px, 560px); }
.cust-list { padding: 0; overflow: hidden; }
.cust-list table { width: 100%; }
.cust-list tbody tr { cursor: pointer; }
.cust-list tbody tr:hover td { background: #fafaf9; }
.cust-list tbody tr.selected td { background: #ffedd5; }
.cust-note-mini { font-size: 12px; color: #92400e; max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.star { font-size: 13px; }
.cust-detail { position: sticky; top: 12px; max-height: calc(100vh - 110px); overflow: auto; padding: 14px 16px; }
.cd-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.cd-head h3 { margin: 0 0 2px; font-size: 20px; }
.cd-info { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 12px 0; font-size: 13px; }
.cd-info dt { color: var(--muted); font-weight: 700; }
.cd-info dd { margin: 0; }
.cd-note { background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; padding: 8px 10px; margin-bottom: 12px; }
.cd-note label { font-weight: 700; font-size: 13px; color: #92400e; display: block; margin-bottom: 4px; }
.cd-note textarea { width: 100%; box-sizing: border-box; resize: vertical; font: inherit; font-size: 14px; }
.cd-note-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 4px; }
.cd-kpis { grid-template-columns: repeat(2, 1fr); }
.cd-kpis .kpi b { font-size: 18px; }
.cd-ship { font-size: 13px; margin-bottom: 8px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cd-ship .tag { background: #e0f2fe; color: #075985; font-size: 12px; }
.cust-detail h4 { margin: 14px 0 6px; }
.cd-orders { width: 100%; font-size: 13px; }
.cd-orders tr[data-order] { cursor: pointer; }
.cd-orders tr[data-order]:hover td { background: #fafaf9; }
.cd-orders tr.voided td { color: var(--muted); text-decoration: line-through; }
.cd-orders tr.web-only td { color: var(--muted); }
.tag.danger { background: #fee2e2; color: var(--danger); text-decoration: none; }
@media (max-width: 1100px) {
  .cust-layout:has(.cust-detail:not([hidden])) { grid-template-columns: minmax(0, 1fr); }
  .cust-detail { position: static; max-height: none; order: -1; }
}
/* 订单详情里的客户备注 / 新老客户 */
.cust-badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 4px; background: #fef3c7; color: #92400e; margin-left: 4px; vertical-align: middle; }
.cust-badge.new { background: #dcfce7; color: #166534; }
.cust-link { font-size: 12px; margin-left: 6px; }
.od-cust-note { background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; padding: 6px 8px; margin: 4px 0 8px; font-size: 13px; }
.od-cust-note textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 13px; resize: vertical; }
.od-cust-note .bar { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-top: 3px; }

/* 店铺 logo（2026-10-25） */
.login-logo { margin: 4px 0 0; text-align: center; }
.login-logo img { width: 100%; max-width: 300px; height: auto; }
.login-sub { display: flex; align-items: center; gap: 12px; margin: 2px 0 18px; color: #e8850f; font-size: 18px; font-weight: 800; letter-spacing: .3em; text-indent: .3em; white-space: nowrap; }
.login-sub::before, .login-sub::after { content: ''; flex: 1; height: 2px; background: linear-gradient(90deg, transparent, #fbd3a3); }
.login-sub::after { background: linear-gradient(90deg, #fbd3a3, transparent); }

/* 库位标签页面（2026-10-26） */
.locations-page { max-width: 1400px; }
.loc-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.loc-card { padding: 14px 16px; }
.loc-card h3 { margin: 0 0 4px; }
.loc-table { width: 100%; font-size: 13px; }
.loc-table input { width: 100%; box-sizing: border-box; padding: 5px 8px; }
.loc-table .ls-seg { width: 80px; text-transform: uppercase; font-family: var(--mono); font-weight: 700; }
.loc-table .ls-levels { width: 70px; }
.loc-table .ls-slots { width: 110px; font-family: var(--mono); }
.loc-bar { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.loc-field { margin: 10px 0; display: grid; gap: 6px; }
.loc-checks { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.loc-checks .chk { display: inline-flex; align-items: center; gap: 4px; font-family: var(--mono); font-weight: 700; }
.loc-radio { display: flex; align-items: center; gap: 6px; }
.loc-field textarea { width: 100%; box-sizing: border-box; font: inherit; font-family: var(--mono); }
.loc-preview iframe { width: 100%; height: 520px; border: 1px solid var(--line); border-radius: 8px; margin-top: 10px; background: #fff; }
.loc-preview .btn { margin-top: 6px; }
@media (max-width: 1000px) { .loc-grid { grid-template-columns: minmax(0, 1fr); } }
/* 商品页面：连扫库位 */
.loc-scan-bar[hidden] { display: none; }
.loc-scan-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: #fff7ed; border: 2px solid #fdba74; border-radius: 12px; padding: 8px 12px; margin: 0 0 10px; font-weight: 700; color: #9a3412; }
.loc-scan-bar .list-tabs { margin: 0; }
.prod-row.loc-hit { animation: locHit 1.6s ease-out; }
@keyframes locHit { 0% { background: #bbf7d0; } 100% { background: transparent; } }

/* WhatsApp 快捷消息菜单（2026-10-26） */
.wa-menu { position: fixed; z-index: 1000; width: 360px; max-width: calc(100vw - 16px); max-height: 70vh; overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.18); padding: 6px; }
.wa-menu-head { font-weight: 800; font-size: 13px; color: #166534; padding: 6px 8px; }
.wa-menu-loading { padding: 6px 8px 10px; }
.wa-item { display: grid; gap: 2px; width: 100%; text-align: left; background: #fff; color: var(--text); border: 0; border-radius: 8px; padding: 8px 10px; font-weight: 400; cursor: pointer; }
.wa-item:hover:not(:disabled) { background: #dcfce7; }
.wa-item b { font-size: 14px; }
.wa-item span { font-size: 12px; color: var(--muted); white-space: normal; }
.wa-item:disabled { opacity: .5; cursor: not-allowed; }
.wa-item.plain { border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; margin-top: 4px; }
.wa-item.plain b { font-weight: 700; color: #15803d; }
/* 设置页：WhatsApp 模板 */
.wa-tpl { display: grid; grid-template-columns: 200px 1fr auto; gap: 8px; align-items: start; margin-bottom: 8px; }
.wa-tpl textarea { width: 100%; box-sizing: border-box; font: inherit; resize: vertical; min-height: 64px; }
@media (max-width: 800px) { .wa-tpl { grid-template-columns: 1fr; } }
.wa-item .wa-state { font-style: normal; font-size: 12px; font-weight: 700; color: #15803d; }
.wa-item.copied { background: #dcfce7; outline: 2px solid #22c55e; }
.wa-item.copy-failed .wa-state { color: var(--danger); }

.modal.success { border: 6px solid #22c55e; }
.modal.success h2 { color: #15803d; }
.modal.danger h2 { color: var(--danger); }
