:root {
  --brand: #e06a1f;
  --brand-dark: #b8531a;
  --brand-light: #fff3e6;
  --bg: #f5f6f8;
  --card: #ffffff;
  --text: #1a1d24;
  --text-2: #6b7280;
  --text-3: #9aa1ab;
  --line: #eceef2;
  --green: #16a34a;
  --green-light: #e7f7ee;
  --red: #e5484d;
  --red-light: #fdecec;
  --orange: #f59e0b;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
  --radius: 14px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }

/* 布局 */
#app { max-width: 560px; margin: 0 auto; min-height: 100vh; position: relative; }
.page { padding: 16px 16px 90px; display: none; }
.page.active { display: block; animation: fade .18s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* 顶部栏 */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: linear-gradient(135deg, #33281d 0%, #4a3a28 100%);
  padding: 14px 16px 10px; display: flex; align-items: center; justify-content: space-between;
  box-shadow: 0 2px 8px rgba(47, 111, 237, .18);
}
.topbar .title { font-size: 20px; font-weight: 700; color: #fff; }
.topbar .sub { font-size: 12px; color: rgba(255, 255, 255, .85); }
.store-switch { margin-right: 10px; flex-shrink: 0; }
.store-sel { font-size: 13px; padding: 6px 8px; border-radius: 8px; border: 1px solid rgba(255,255,255,.4); background: rgba(255,255,255,.16); color: #fff; max-width: 40vw; }

/* 卡片 */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: 12px; }
.card h3 { margin: 0 0 12px; font-size: 15px; font-weight: 700; color: var(--text); border-left: 4px solid var(--brand); padding-left: 10px; }
.card .row { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; }
.card .row .k { color: var(--text-2); }
.card .row .v { font-weight: 600; }
.card .row.total { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 10px; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; border-radius: 12px; padding: 12px 16px; font-size: 15px; font-weight: 600;
  cursor: pointer; transition: .15s; background: var(--brand); color: #fff; width: 100%;
}
.btn:active { transform: scale(.98); opacity: .9; }
.btn.secondary { background: var(--brand-light); color: var(--brand-dark); }
.btn.ghost { background: var(--card); color: var(--text); border: 1px solid var(--line); }
.btn.danger { background: var(--red); }
.btn.small { padding: 7px 12px; font-size: 13px; width: auto; border-radius: 10px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* 表单 */
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 13px; color: #4b5563; margin-bottom: 6px; }
.input, .select, .textarea {
  width: 100%; border: 1px solid #cbd5e1; border-radius: 11px; padding: 11px 12px;
  font-size: 15px; background: #fff; color: var(--text); outline: none; font-family: inherit;
}
.input::placeholder, .select::placeholder, .textarea::placeholder { color: #8a94a6; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); }
.textarea { min-height: 64px; resize: vertical; }
.fields-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fields-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }

/* 底部导航 */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 560px; background: var(--card); border-top: 1px solid var(--line);
  display: flex; z-index: 30; padding-bottom: var(--safe-bottom);
}
.tabbar .tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 0 6px; color: var(--text-3); font-size: 11px; cursor: pointer; user-select: none;
}
.tabbar .tab .ico { font-size: 21px; line-height: 1; }
.tabbar .tab.active { color: var(--brand); font-weight: 600; }

/* 列表 */
.list-item {
  display: flex; align-items: center; justify-content: space-between; padding: 12px 2px;
  border-bottom: 1px solid var(--line);
}
.list-item:last-child { border-bottom: none; }
.list-item .li-title { font-weight: 600; font-size: 15px; }
.list-item .li-sub { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.list-item .li-right { text-align: right; }
.li-amount { font-weight: 700; font-size: 15px; }
.li-amount.pos { color: var(--red); }
.li-amount.neg { color: var(--green); }

/* v217 客户列表一键操作：不进详情就能打电话 / 记跟进 */
.cust-quick { display: flex; gap: 6px; margin-top: 6px; justify-content: flex-end; }
.cq-btn {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line);
  background: #fff; font-size: 15px; line-height: 1; padding: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.cq-btn:active { background: var(--bg-2, #f1f3f5); transform: scale(.94); }
.cq-btn.gray { opacity: .45; }

/* v217 首页「今天该干啥」清单 */
.todo-line { display: flex; align-items: center; gap: 10px; padding: 9px 0; cursor: pointer; border-top: 1px solid var(--line); }
.todo-line:first-of-type { border-top: none; }
.todo-line:active { opacity: .6; }
.tl-i { width: 32px; height: 32px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.tl-t { flex: 1; font-size: 14px; font-weight: 600; min-width: 0; }
.tl-s { font-size: 12px; color: var(--text-2); font-weight: 400; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-go { font-size: 18px; color: var(--text-3); flex-shrink: 0; }
.tag { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 20px; background: var(--brand-light); color: var(--brand-dark); }
.tag.gray { background: #f0f1f3; color: var(--text-2); }
.tag.green { background: var(--green-light); color: var(--green); }
.tag.red { background: var(--red-light); color: var(--red); }
.tag.orange { background: #fef3e2; color: var(--orange); }
.empty { text-align: center; color: var(--text-3); padding: 40px 0; font-size: 14px; }

/* 统计卡 */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; }
.stat .n { font-size: 22px; font-weight: 700; margin-top: 2px; }
.stat .n.red { color: var(--red); }
.stat .n.green { color: var(--green); }
.stat .lbl { font-size: 12px; color: var(--text-2); }

/* 报表 月度/年度 切换条 */
.seg { display: flex; background: #eef0f3; border-radius: 12px; padding: 4px; margin-bottom: 4px; }
.seg .seg-btn { flex: 1; text-align: center; padding: 9px 0; border-radius: 9px; font-size: 14px; font-weight: 500; color: var(--text-2); cursor: pointer; transition: .15s; }
.seg .seg-btn.active { background: #fff; color: var(--brand); font-weight: 700; box-shadow: 0 1px 3px rgba(0,0,0,.08); }

/* 年度报告 月度趋势柱状图 */
.bar-wrap { display: flex; align-items: flex-end; gap: 6px; height: 170px; padding-top: 18px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.bar-val { font-size: 10px; color: var(--text-2); margin-bottom: 3px; white-space: nowrap; }
.bar { width: 100%; max-width: 26px; background: linear-gradient(180deg, #f0a04a, #e06a1f); border-radius: 5px 5px 0 0; min-height: 2px; }
.bar-lbl { font-size: 10px; color: var(--text-2); margin-top: 4px; }

/* 登录页 */
.login-wrap { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 24px; }
.login-logo { text-align: center; margin-bottom: 28px; }
.login-logo .lg-ico { font-size: 48px; }
.login-logo .lg-name { font-size: 22px; font-weight: 700; margin-top: 8px; }
.login-logo .lg-sub { font-size: 13px; color: var(--text-2); margin-top: 2px; }

/* 悬浮加号按钮 */
.fab {
  position: fixed; right: 16px; bottom: 84px; z-index: 25;
  width: 54px; height: 54px; border-radius: 50%; background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 300;
  box-shadow: 0 4px 14px rgba(47, 111, 237, .4); cursor: pointer;
}
.fab:active { transform: scale(.94); }

/* 弹窗 */
.mask { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 40; display: none; align-items: flex-end; justify-content: center; }
.mask.show { display: flex; }
.sheet {
  background: var(--card); width: 100%; max-width: 560px; border-radius: 18px 18px 0 0;
  padding: 18px 16px calc(18px + var(--safe-bottom)); max-height: 88vh; overflow-y: auto;
  animation: slideup .22s ease;
}
@keyframes slideup { from { transform: translateY(30px); opacity: .6; } to { transform: none; opacity: 1; } }
.sheet .sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.sheet .sheet-head .t { font-size: 17px; font-weight: 700; }
.sheet .close { font-size: 22px; color: var(--text-3); cursor: pointer; line-height: 1; }

/* 销售单明细行 */
.order-line { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.order-line .ol-name { flex: 1; font-weight: 500; }
.order-line .ol-input { width: 70px; text-align: center; font-size: 16px; }
.order-line .ol-input::placeholder { color: #8b95a5; }

/* 提成规则提示 */
.rule-tip { background: var(--brand-light); color: var(--brand-dark); border-radius: 10px; padding: 10px 12px; font-size: 12.5px; line-height: 1.6; margin-bottom: 12px; }

/* 表格 */
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; color: var(--text-2); font-weight: 500; padding: 6px 4px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 8px 4px; border-bottom: 1px solid var(--line); }
.tbl td.num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tr.dim td { color: var(--text-3); }

/* 分段标题 */
.sec-title { font-size: 13px; color: var(--text-2); margin: 18px 0 8px; font-weight: 600; }
.mt0 { margin-top: 0; }

.money { font-variant-numeric: tabular-nums; }
.danger-text { color: var(--red); font-size: 12px; }

/* 回执已上传徽标 */
.receipt-badge { display: inline-block; background: #e9f7ee; color: #1d9e75; border-radius: 6px; padding: 1px 6px; font-size: 11px; margin-left: 4px; }

/* 打印发货单 */
#print-area { display: none; }
@media print {
  /* 只打印 #print-area，其余（#app 主界面/#mask 弹层等）全部 display:none 彻底移出排版，
     避免 visibility:hidden 仍占空间导致打印出多张空白页 */
  body > *:not(#print-area) { display: none !important; }
  #print-area { display: block !important; width: 100%; padding: 0 4mm; color: #000; box-sizing: border-box;
    -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .no-print { display: none !important; }
}
.print-doc { font-size: 13px; color: #111; line-height: 1.5; }
.print-doc .pd-head { display: flex; align-items: center; justify-content: center; gap: 14px; padding-bottom: 10px; margin-bottom: 12px; border-bottom: 2px solid #111; }
.print-doc .pd-logo { width: 58px; height: 58px; object-fit: contain; flex-shrink: 0; }
.print-doc .pd-head-txt { text-align: center; }
.print-doc .pd-shop { font-size: 20px; font-weight: 800; letter-spacing: 1px; }
.print-doc .pd-addr { font-size: 11px; color: #555; margin-top: 2px; }
.print-doc .pd-title { font-size: 16px; font-weight: 700; margin-top: 5px; letter-spacing: 6px; }
.print-doc .pd-meta { display: flex; justify-content: space-between; font-size: 12.5px; margin: 7px 0; }
.print-doc table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.print-doc th { border: 1px solid #111; padding: 6px; text-align: left; font-weight: 700; background: #f2f2f2; }
.print-doc td { border: 1px solid #111; padding: 5px 6px; text-align: left; }
.print-doc td.num, .print-doc th.num { text-align: right; }
.print-doc .pd-totals { margin-top: 10px; }
.print-doc .pd-totals .row { display: flex; justify-content: space-between; padding: 3px 0; }
.print-doc .pd-totals .row.grand { font-weight: 800; font-size: 15px; border-top: 2px solid #111; margin-top: 6px; padding-top: 7px; }
.print-doc .pd-note { margin-top: 10px; font-size: 12px; color: #333; }
.print-doc .pd-sign { margin-top: 28px; display: flex; justify-content: space-between; font-size: 13px; }
.print-doc .pd-receipt { margin-top: 12px; text-align: center; }
.print-doc .pd-receipt img { max-width: 240px; max-height: 240px; border: 1px solid #999; }

/* ============ 全屋智能方案（封面 + 内容页） ============ */
.print-doc .pd-page { page-break-after: always; }
.print-doc .pd-page:last-child { page-break-after: auto; }

/* 封面：深墨色高级感 + 欧普橙 */
.print-doc .pd-cover {
  background: linear-gradient(180deg, #221924 0%, #1a1320 55%, #120e16 100%); color: #f2f5f8; text-align: center;
  padding: 40px 36px; box-sizing: border-box; min-height: 250mm;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border-bottom: 1px solid #1a1320;
}
.print-doc .pd-cover .cov-logo { width: 84px; height: 84px; object-fit: contain; margin-bottom: 26px; }
.print-doc .pd-cover .cov-brand { font-size: 13px; letter-spacing: 5px; color: #ED7D31; font-weight: 700; margin-bottom: 26px; }
.print-doc .pd-cover .cov-title { font-size: 32px; font-weight: 800; letter-spacing: 3px; line-height: 1.4; margin-bottom: 14px; color: #ffffff; }
.print-doc .pd-cover .cov-sub { font-size: 14px; color: #b8b0b8; letter-spacing: 2px; line-height: 1.8; }
.print-doc .pd-cover .cov-line { width: 60px; height: 3px; background: #ED7D31; margin: 28px auto; border-radius: 2px; }
.print-doc .pd-cover .cov-customer { font-size: 17px; font-weight: 600; color: #eef2f6; margin-top: 10px; }
.print-doc .pd-cover .cov-date { font-size: 13px; color: #9a929a; margin-top: 8px; }

/* 内容页章节标题 */
.print-doc .pd-sec { margin-bottom: 18px; }
.print-doc .pd-sec .sec-no { display: inline-block; font-size: 11px; color: #ED7D31; letter-spacing: 2px; font-weight: 700; margin-bottom: 6px; padding: 2px 9px; border: 1px solid #ED7D31; border-radius: 20px; background: #fff4e6; }
.print-doc .pd-sec .sec-title { font-size: 21px; font-weight: 800; color: #221924; border-left: 5px solid #ED7D31; padding-left: 12px; line-height: 1.3; }
.print-doc .pd-sec .sec-lead { font-size: 12.5px; color: #5c6672; margin-top: 8px; line-height: 1.7; }

/* 理念/手法 卡片 */
.print-doc .pd-cards { display: flex; gap: 10px; flex-wrap: wrap; }
.print-doc .pd-card {
  flex: 1 1 30%; min-width: 120px; border: 1px solid #e5e7eb; border-top: 3px solid #ED7D31; border-radius: 10px;
  padding: 12px 14px; box-sizing: border-box; background: #fafafa;
}
.print-doc .pd-card .c-title { font-size: 14px; font-weight: 800; color: #ED7D31; margin-bottom: 6px; }
.print-doc .pd-card .c-body { font-size: 11.5px; color: #444; line-height: 1.7; }
.print-doc .pd-card.dark { background: #221924; border-color: #221924; border-top: 3px solid #ED7D31; }
.print-doc .pd-card.dark .c-title { color: #ED7D31; }
.print-doc .pd-card.dark .c-body { color: #e8e4e8; }

/* 智能场景 */
.print-doc .pd-scene { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.print-doc .pd-scene .s-item {
  flex: 1 1 22%; min-width: 100px; text-align: center; border: 1px solid #ED7D31; border-radius: 10px;
  padding: 14px 8px; background: #fff8f2;
}
.print-doc .pd-scene .s-item .s-ico { font-size: 24px; margin-bottom: 6px; }
.print-doc .pd-scene .s-item .s-name { font-size: 13px; font-weight: 700; color: #221924; }

/* 高亮条 */
.print-doc .pd-hl {
  background: #fff4e6; border-left: 4px solid #ED7D31; border-radius: 6px;
  padding: 10px 14px; font-size: 12.5px; color: #5a4a20; line-height: 1.7; margin-top: 10px;
}

/* v366：方案册插图 + 区域效果图入打印 */
.print-doc .pd-illus { margin-top: 14px; }
.print-doc .pd-illus svg { display: block; }
.print-doc .pd-aimg { margin: 6px 0 10px; border-radius: 8px; overflow: hidden; border: 1px solid #eceff2; }
.print-doc .pd-aimg img { width: 100%; display: block; max-height: 240px; object-fit: contain; }
.print-doc .pd-aimg-note { font-size: 11.5px; color: #5c6672; line-height: 1.6; padding: 6px 10px; background: #fafbfc; border-top: 1px solid #f0f2f5; }
.print-doc .pd-aimg-note b { color: #ED7D31; }
.print-doc .cov-glow { margin-top: 26px; }
.print-doc .cov-glow svg { display: block; margin: 0 auto; }

/* 开单页折叠区（v211）：低频选项收起来，录单不再滚半天 */
.fold { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 12px; }
.fold-hd { display: flex; align-items: center; gap: 8px; padding: 13px 16px; cursor: pointer; user-select: none; }
.fold-hd .fk { font-size: 14px; font-weight: 600; color: var(--text); flex-shrink: 0; }
.fold-hd .fs { font-size: 12px; color: var(--text-3); flex: 1; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fold-hd .fs.on { color: var(--green); font-weight: 600; }
.fold-hd .fs.warn { color: #d46b08; }
.fold-hd .fa { font-size: 12px; color: var(--brand); flex-shrink: 0; font-weight: 600; }
.fold-bd { padding: 0 16px 4px; }
/* v214 入口重排：首页三个大按钮 + 人话注解 */
.big-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.big-3.two { grid-template-columns: repeat(2, 1fr); }
.big-3.one { grid-template-columns: 1fr; }
.big-act { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border: none; padding: 16px 6px 13px; display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; font-family: inherit; -webkit-appearance: none; }
.big-act:active { transform: scale(.97); opacity: .9; }
.big-act .bi { font-size: 26px; line-height: 1.1; }
.big-act .bt { font-size: 14px; font-weight: 700; color: var(--text); }
.big-act .bs { font-size: 11px; color: var(--text-3); }
.m-tip { font-size: 12px; color: var(--text-3); font-weight: 400; margin-top: 1px; line-height: 1.35; }
.tipq { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--text-3); color: var(--text-3); font-size: 12px; margin-left: 3px; vertical-align: 1px; cursor: pointer; }
/* 折叠区里的入口行（.fold 不是 .card，.card .row 的 flex 不生效，这里补上） */
.fold-bd .row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; cursor: pointer; }
.fold-bd .row + .row { border-top: 1px solid var(--line); }
.fold-bd .row .k { color: var(--text); }
.fold-bd .sec-title:first-child { margin-top: 0; }

/* v285 销售单卡片「商品明细」规整版式：一行一个商品，数量/单价/小计右对齐，超过 3 项折叠 */
.oi-wrap { margin: 6px 0 8px; background: #fafbfc; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }
.oi-row { display: flex; align-items: baseline; gap: 8px; padding: 3px 0; font-size: 13.5px; }
.oi-row + .oi-row { border-top: 1px dashed #eceff3; }
.oi-n { flex: 1 1 auto; min-width: 0; color: var(--text); word-break: break-all; }
/* v428 单据明细里的商品编码：放名称前面，小灰字、不换行（长名换行时编码整体留在上一行） */
.oi-code { color: #9aa1ab; font-size: .88em; margin-right: 5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.oi-q { flex: none; color: #6b7280; font-variant-numeric: tabular-nums; }
.oi-p { flex: none; color: #9aa1ab; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.oi-a { flex: none; min-width: 62px; text-align: right; font-weight: 600; color: #111827; font-variant-numeric: tabular-nums; }
.oi-more { font-size: 12.5px; color: #e06a1f; padding: 4px 0 1px; cursor: pointer; -webkit-tap-highlight-color: transparent; }

/* ---------------------------------------------------------------- v318 排版统一
   🔴 根因修复：.li-title / .li-sub 原来只写在 .list-item 下（见上面「列表」段），
   于是「客户列表 / 库存列表 / 我的页」这些用 .list-item 的地方是对的，
   而所有用 .card 的列表（领料退料、销售单、售后、进货、报价、经销商调货…）
   里这两个类**完全没生效** —— 标题不粗、副标题不小不灰，
   整张卡所有字一个字号一个颜色，看着就是「乱」。
   这里全局补齐卡片/弹层里的层级（内联 style 仍然优先，不影响已有覆盖）。 */
.card .li-title, #sheet .li-title { font-weight: 600; font-size: 15px; }
.card .li-sub, #sheet .li-sub { font-size: 12px; color: var(--text-2); margin-top: 2px; }

/* 明细行里的补充信息（谁领的 · 哪个仓），弱化成右侧一行小字 */
.oi-p b { font-weight: 600; }
/* 赠品小标（原来是 emoji，字库认不出时就是个方框，换成纯文字，跟结算单一致） */
.oi-gift { color: #d46b08; font-size: 11px; }

/* 领料/退料明细行：一行一块，行多了不再糊成一片 */
.mat-line { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; }
.ml-lab { font-size: 12px; color: var(--text-3); flex-shrink: 0; }
/* v292 stock warning on sale card: one product per line, red=out of stock, orange=low */
.sw-wrap { margin: 6px 0 8px; background: #fffaf5; border: 1px solid #ffe0cc; border-radius: 8px; padding: 6px 10px; }
.sw-title { font-size: 12.5px; font-weight: 600; color: #b45309; padding: 1px 0 3px; }
.sw-q { flex: none; font-weight: 600; font-variant-numeric: tabular-nums; }
.sw-q.out { color: #e5484d; }
.sw-q.low { color: #d46b08; }
.sw-tag { flex: none; font-size: 11.5px; padding: 1px 6px; border-radius: 6px; }
.sw-tag.out { background: #ffe9e7; color: #e5484d; }
.sw-tag.low { background: #fff3e0; color: #d46b08; }

/* v314 order progress axis: band on the card + full timeline in the sheet */
.pg-band { margin: 6px 0 8px; padding: 6px 10px; background: #f7f9fc; border: 1px solid #fff3e6; border-radius: 8px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.pg-top { display: flex; align-items: center; gap: 6px; }
.pg-dots { display: flex; align-items: center; gap: 5px; flex: 1; }
.pg-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.pg-num { font-size: 12px; color: #6b7280; font-variant-numeric: tabular-nums; }
.pg-more { font-size: 12px; color: #e06a1f; }
.pg-cur { font-size: 13px; margin-top: 3px; }
.pg-list { margin-top: 8px; }
.pg-row { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #eef0f3; }
.pg-row.cur { background: #fffbeb; border-radius: 8px; padding: 8px; }
.pg-ico { flex: none; width: 18px; font-size: 13px; line-height: 1.5; }
.pg-lbl { font-size: 14px; font-weight: 600; }
.pg-who { font-size: 13px; color: #374151; margin-top: 1px; }
.pg-note { font-size: 12.5px; color: #6b7280; margin-top: 1px; }
.pg-owner { font-size: 12.5px; color: #b45309; margin-top: 1px; }
.pg-sub { font-size: 12.5px; color: #9aa1ab; margin-top: 3px; line-height: 1.6; }
/* v343：进度轴上「这一步的时间被管理员手改过」的角标，以及行尾的「改 ›」提示 */
.pg-edit { font-size: 11px; color: #b45309; background: #fff7e6; border-radius: 4px; padding: 0 4px; margin-left: 5px; vertical-align: 1px; font-weight: 500; }
.pg-editbtn { flex: none; align-self: center; font-size: 12px; color: #e06a1f; }
.pg-alert { font-size: 13px; padding: 8px 10px; border-radius: 8px; background: #f7f9fc; color: #374151; margin-bottom: 6px; }
.pg-alert.warn { background: #fff7e6; color: #b45309; }
.pg-alert.late { background: #fff1f0; color: #e5484d; font-weight: 600; }
.pg-alert.done { background: #e8f5e9; color: #16a34a; }

/* ---- v345 选商品浮层：一次看全，名字完整换行显示（老板：选产品还是看不全） ---- */
.ps-head {
  position: sticky; top: 0; z-index: 1;
  padding: 6px 10px; font-size: 12px; color: var(--text-3);
  background: #f7f8fa; border-bottom: 1px solid #eef0f3;
}
.ps-hit { padding: 8px 10px; border-bottom: 1px solid #f1f3f5; cursor: pointer; }
.ps-hit:active { background: #fff3e6; }
.ps-name {
  font-size: 14px; color: var(--text); line-height: 1.35;
  white-space: normal; overflow-wrap: anywhere; word-break: break-word;
}
.ps-sub { font-size: 12px; color: var(--text-3); margin-top: 2px; white-space: normal; overflow-wrap: anywhere; word-break: break-word; }
.ps-meta { font-size: 12px; color: var(--text-3); margin-top: 2px; }

/* ---- v345 选商品浮层结束 ---- */

/* ---- v408 每天首单礼炮彩蛋雨（鼓舞士气） ---- */
@keyframes grwj-confetti-fall {
  0% { transform: translateY(-6vh) rotate(0deg); opacity: 1; }
  100% { transform: translateY(106vh) rotate(720deg); opacity: .6; }
}
@keyframes grwj-celebrate-pop {
  0% { transform: translate(-50%, -50%) scale(.4); opacity: 0; }
  55% { transform: translate(-50%, -50%) scale(1.12); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}
@keyframes grwj-danmaku {
  0% { transform: translateX(0); opacity: 0; }
  6% { opacity: 1; }
  94% { opacity: 1; }
  100% { transform: translateX(-160vw); opacity: 0; }
}

/* ---------------------------------------------------------------- v842 界面优化
   ① 手机窄屏：报表 5 个页签能左右滑、表格能横着拖，不再把「年度报告」「成交」切掉；
   ② 电脑宽屏：内容区放宽、指标卡一行 4 个、弹层宽一点（手机 390px 完全不碰）；
   ③ 长列表：明细「展开全部」做成一条更好点、更明显的操作条。
   两段媒体查询互斥：<560 只管手机，>=1024 只管电脑。 */
@media (max-width: 560px) {
  .seg.seg-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
  .seg.seg-scroll .seg-btn { flex: 0 0 auto; white-space: nowrap; padding: 9px 12px; }
  #rp-body { overflow-x: auto; }
}
@media (min-width: 1024px) {
  #app { max-width: 1040px; }
  .tabbar { max-width: 1040px; }
  .sheet { max-width: 720px; }
  .page.active { padding-left: 24px; padding-right: 24px; }
  .stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .page-skeleton .empty { padding: 28px 0; }
}
.oi-more { padding: 8px 10px; margin: 4px -10px -2px; border-radius: 8px; background: #f6f8fa; text-align: center; }
.page-skeleton { background: var(--card); }
