/* 租户手机端 — 商家「我的」中心 */
:root {
  --primary: #fd847a;
  --primary-active: #f04a3e;
  --primary-light: #fff1ef;
  --primary-soft: #ff9a90;
  --primary-grad: linear-gradient(135deg, #ffb088 0%, #f04a3e 100%);
  --bg: #f4f5f7;
  --card: #fff;
  --text: #1a1d21;
  --text-secondary: #5c6370;
  --muted: #9aa0ab;
  --border: #eceef2;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 2px 8px rgba(20, 24, 40, .04);
  --shadow-md: 0 8px 24px rgba(20, 24, 40, .08);
  --shadow-lg: 0 16px 40px rgba(240, 74, 62, .12);
  --safe-bottom: env(safe-area-inset-bottom, 0);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
}
button, input, select, textarea { font: inherit; }
a { color: var(--primary-active); text-decoration: none; }

.page { display: none; min-height: 100vh; padding-bottom: calc(56px + var(--safe-bottom)); }
.page.active { display: block; }
.page--sub { padding-bottom: calc(16px + var(--safe-bottom)); }
.page--login { padding-bottom: 0; background: linear-gradient(180deg, #ffe8e5 0%, var(--bg) 40%); }

/* 登录 */
.login-wrap { padding: 64px 28px 40px; }
.login-brand { font-size: 24px; font-weight: 700; margin-bottom: 6px; }
.login-sub { font-size: 13px; color: var(--muted); margin-bottom: 36px; }
.login-field { margin-bottom: 14px; }
.login-field label { display: block; font-size: 13px; color: var(--text-secondary); margin-bottom: 6px; }
.login-field input {
  width: 100%; height: 44px; border: 1px solid var(--border); border-radius: 10px;
  padding: 0 14px; background: #fff;
}
.login-btn {
  width: 100%; height: 48px; margin-top: 18px; border: none; border-radius: 24px;
  background: var(--primary-grad); color: #fff; font-weight: 600; cursor: pointer;
  box-shadow: 0 6px 16px rgba(240, 74, 62, .3);
}
.login-btn--ghost { background: #fff; color: var(--primary-active); border: 1px solid var(--primary); margin-top: 10px; }
.login-tip { margin-top: 16px; font-size: 12px; color: var(--muted); text-align: center; }

/* 导航 */
.mp-nav {
  position: sticky; top: 0; z-index: 50; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: #fff; border-bottom: 1px solid var(--border);
}
.mp-nav--sub { justify-content: flex-start; padding: 0 12px; gap: 8px; }
.mp-nav-back {
  width: 32px; height: 32px; border: none; background: transparent;
  padding: 0; cursor: pointer; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.mp-nav-back img { width: 18px; height: 18px; object-fit: contain; }
.mp-nav-title {
  position: absolute; left: 50%; transform: translateX(-50%);
  font-size: 16px; font-weight: 600; max-width: 60%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mp-nav-action { margin-left: auto; font-size: 14px; color: var(--primary-active); border: none; background: none; cursor: pointer; }

/* 底栏 */
.tabbar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0;
  width: 100%; max-width: 480px;
  height: calc(56px + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  display: flex; background: #fff; border-top: 1px solid var(--border); z-index: 100;
}
.tabbar.hidden { display: none; }
.tabbar-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; border: none; background: none; color: var(--muted); font-size: 11px; cursor: pointer;
}
.tabbar-item.active { color: var(--primary-active); }
.tabbar-item .tab-icon { width: 24px; height: 24px; object-fit: contain; display: block; margin: 0 auto 2px; }

/* 首页简报 */
.home-body { padding: 16px 12px; }
.home-hello { font-size: 18px; font-weight: 600; margin-bottom: 4px; }
.home-desc { font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.stat-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat-row--4 { grid-template-columns: 1fr 1fr; }
.stat-card {
  background: var(--card); border-radius: var(--radius-lg); padding: 16px;
  box-shadow: var(--shadow-sm); border: 1px solid rgba(255,255,255,.8);
}
.stat-card .n { font-size: 26px; font-weight: 700; color: var(--primary-active); }
.stat-card .l { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* 业绩中心 */
.perf-tabs {
  display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap;
}
.perf-tab {
  border: none; background: #f3f3f3; color: var(--text-secondary);
  font-size: 12px; padding: 5px 12px; border-radius: 14px; cursor: pointer;
}
.perf-tab.active {
  background: var(--primary); color: #fff; font-weight: 600;
}
.perf-metrics {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center;
}
.perf-metric-n {
  font-size: 18px; font-weight: 700; color: var(--text);
  font-family: Arial, sans-serif; line-height: 1.2;
}
.perf-metric-l { font-size: 11px; color: var(--muted); margin-top: 4px; }
.perf-goal { margin-top: 14px; }
.perf-goal-head {
  display: flex; justify-content: space-between; font-size: 12px;
  color: var(--text-secondary); margin-bottom: 6px;
}
.perf-goal-bar {
  height: 6px; background: #f0f0f0; border-radius: 3px; overflow: hidden;
}
.perf-goal-bar i {
  display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--primary-active));
  border-radius: 3px; transition: width .25s;
}
.perf-detail-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px;
}
.perf-detail-item {
  background: #fafafa; border-radius: 10px; padding: 14px 12px; text-align: center;
}
.perf-detail-item .n { font-size: 18px; font-weight: 700; color: var(--primary-active); }
.perf-detail-item .l { font-size: 12px; color: var(--muted); margin-top: 4px; }
.perf-chart {
  display: flex; align-items: flex-end; gap: 6px; height: 120px;
  padding: 8px 0 0;
}
.perf-bar-col {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  height: 100%; min-width: 0;
}
.perf-bar {
  width: 70%; max-width: 28px; background: var(--primary); border-radius: 4px 4px 0 0;
  min-height: 4px;
}
.perf-bar-lab { font-size: 10px; color: var(--muted); margin-top: 4px; white-space: nowrap; }
.perf-top-row {
  display: flex; align-items: center; gap: 10px; padding: 10px 0;
  border-bottom: 1px solid var(--border); font-size: 13px;
}
.perf-top-row:last-child { border-bottom: none; }
.perf-top-rank {
  width: 22px; height: 22px; border-radius: 6px; background: var(--primary-light);
  color: var(--primary-active); font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.perf-top-rank.top { background: var(--primary); color: #fff; }
.perf-top-name { flex: 1; min-width: 0; }
.perf-top-amt { color: var(--primary-active); font-weight: 600; white-space: nowrap; }

/* 我的 */
.mine-top {
  background: linear-gradient(180deg, #fd847a 0%, #fda197 55%, transparent 100%);
  padding: 12px 16px 28px;
}
.mine-tools { display: flex; justify-content: flex-end; gap: 14px; }
.mine-tools button {
  border: none; background: rgba(255,255,255,.25);
  width: 32px; height: 32px; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center; padding: 0;
}
.mine-tools button img { width: 18px; height: 18px; object-fit: contain; filter: brightness(0) invert(1); }
.mine-profile { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.mine-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: #fff;
  color: var(--primary-active); font-size: 22px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid rgba(255,255,255,.8);
}
.mine-name { font-size: 18px; font-weight: 700; color: #fff; }
.mine-role {
  display: inline-block; margin-top: 4px; font-size: 11px; padding: 1px 8px;
  border-radius: 10px; background: rgba(255,255,255,.25); color: #fff;
}
.mine-id { margin-top: 6px; font-size: 12px; color: rgba(255,255,255,.85); }
.mine-id button {
  margin-left: 6px; border: none; background: rgba(255,255,255,.2);
  color: #fff; font-size: 11px; padding: 1px 6px; border-radius: 4px; cursor: pointer;
}
.mine-body { padding: 0 12px 20px; margin-top: -12px; }
.mine-card {
  background: var(--card); border-radius: var(--radius-lg); padding: 16px;
  margin-bottom: 12px; box-shadow: var(--shadow-sm);
}
.mine-card-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px; font-size: 15px; font-weight: 600;
}
.mine-card-head .more { font-size: 13px; font-weight: 400; color: var(--muted); border: none; background: none; cursor: pointer; }

.order-status-row {
  display: flex; justify-content: space-between; text-align: center;
}
.order-status-item {
  flex: 1; border: none; background: none; cursor: pointer; padding: 4px 0; position: relative;
}
.order-status-item .ico {
  width: 40px; height: 40px; margin: 0 auto 6px;
  display: flex; align-items: center; justify-content: center;
  background: none; border-radius: 0;
}
.order-status-item .ico img { width: 32px; height: 32px; object-fit: contain; display: block; }
.order-status-item .lab { font-size: 13px; color: #666; }
.order-status-item .badge {
  position: absolute; top: 0; right: calc(50% - 22px);
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
  background: var(--primary-active); color: #fff; font-size: 10px;
  display: none; align-items: center; justify-content: center;
}
.order-status-item .badge.show { display: flex; }

.func-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 8px;
}
.func-item {
  border: none; background: none; cursor: pointer; text-align: center; padding: 0;
}
.func-item .ico {
  width: 44px; height: 44px; margin: 0 auto 6px; border-radius: 14px;
  background: #f8f9fb; display: flex; align-items: center; justify-content: center;
}
.func-item .ico img { width: 24px; height: 24px; object-fit: contain; opacity: .8; }
.func-item .lab { font-size: 12px; color: var(--text-secondary); }

/* 列表/表单通用 */
.list-body { padding: 12px; }
.card-item {
  background: var(--card); border-radius: var(--radius-lg); padding: 16px;
  margin-bottom: 10px; cursor: pointer; box-shadow: var(--shadow-sm);
  border: 1px solid transparent; transition: transform .15s;
}
.card-item:active { transform: scale(.99); }
.card-item-head { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 6px; }
.card-item-head .st { color: var(--primary-active); font-size: 13px; }
.card-item-meta { font-size: 13px; color: var(--muted); }
.card-item-amt { margin-top: 8px; font-size: 16px; font-weight: 700; color: var(--primary-active); }
.empty { text-align: center; padding: 48px 20px; color: var(--muted); font-size: 14px; }

.detail-body { padding: 12px 12px 80px; }
.block { background: var(--card); border-radius: var(--radius); padding: 14px; margin-bottom: 10px; }
.block-title { font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.row { display: flex; justify-content: space-between; font-size: 13px; padding: 6px 0; color: var(--text-secondary); }
.row span:last-child { color: var(--text); text-align: right; max-width: 65%; }
.goods-line {
  display: flex; justify-content: space-between; gap: 8px;
  padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px;
}
.goods-line:last-child { border-bottom: none; }
.footer-bar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0;
  width: 100%; max-width: 480px; padding: 10px 12px calc(10px + var(--safe-bottom));
  background: #fff; border-top: 1px solid var(--border);
  display: flex; gap: 10px; z-index: 80;
}
.footer-bar.hidden { display: none; }
.btn {
  flex: 1; height: 42px; border-radius: 21px; border: none; font-weight: 600; cursor: pointer;
}
.btn-primary { background: var(--primary-grad); color: #fff; box-shadow: 0 4px 12px rgba(240, 74, 62, .25); }
.btn-outline { background: #fff; color: var(--primary-active); border: 1px solid var(--primary); }
.btn-block { width: 100%; }

.form-body { padding: 12px; }
.form-card { background: var(--card); border-radius: var(--radius-lg); padding: 4px 16px; margin-bottom: 12px; box-shadow: var(--shadow-sm); }
.form-row {
  display: flex; align-items: center; gap: 12px;
  min-height: 48px; border-bottom: 1px solid var(--border);
}
.form-row:last-child { border-bottom: none; }
.form-row label { width: 88px; flex-shrink: 0; font-size: 14px; color: var(--text-secondary); }
.form-row input, .form-row select, .form-row textarea {
  flex: 1; border: none; outline: none; background: transparent; padding: 12px 0; font-size: 15px;
}
.form-row textarea { resize: none; min-height: 72px; }
.form-switch { margin-left: auto; }
.switch {
  width: 44px; height: 24px; border-radius: 12px; background: #ddd; position: relative; cursor: pointer; border: none;
}
.switch.on { background: var(--primary); }
.switch::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px;
  border-radius: 50%; background: #fff; transition: left .2s;
}
.switch.on::after { left: 22px; }

.prod-card {
  display: flex; gap: 12px; align-items: center;
  background: var(--card); border-radius: var(--radius); padding: 12px; margin-bottom: 10px;
}
.prod-thumb {
  width: 56px; height: 56px; border-radius: 8px; background: var(--primary-light);
  display: flex; align-items: center; justify-content: center; color: var(--primary); font-size: 12px; flex-shrink: 0;
}
.prod-info { flex: 1; min-width: 0; }
.prod-name { font-size: 15px; font-weight: 500; }
.prod-meta { font-size: 12px; color: var(--muted); margin-top: 4px; }
.prod-price { color: var(--primary-active); font-weight: 700; font-size: 15px; }

.fab {
  position: fixed; right: max(16px, calc(50% - 224px)); bottom: calc(72px + var(--safe-bottom));
  width: 52px; height: 52px; border-radius: 26px; border: none;
  background: var(--primary); color: #fff; font-size: 28px; line-height: 1;
  box-shadow: 0 4px 14px rgba(240,74,62,.35); cursor: pointer; z-index: 60;
  display: flex; align-items: center; justify-content: center; padding: 0;
}
.fab img { width: 26px; height: 26px; object-fit: contain; filter: brightness(0) invert(1); }
.fab.hidden { display: none; }

.toast {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%);
  background: rgba(0,0,0,.75); color: #fff; padding: 10px 18px; border-radius: 8px;
  font-size: 14px; z-index: 999; display: none; max-width: 80%; text-align: center;
}
.toast.show { display: block; }

.radio-group { display: flex; flex-direction: column; gap: 0; width: 100%; }
.radio-group--inline {
  flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 20px;
}
.radio-group--inline .radio-option {
  border-bottom: none; padding: 0; white-space: nowrap;
}
.radio-option {
  display: flex; align-items: center; gap: 8px; padding: 10px 0;
  border-bottom: 1px solid var(--border); cursor: pointer; font-size: 14px;
}
.radio-option:last-child { border-bottom: none; }
.form-row--choice { align-items: center; min-height: 48px; padding-top: 0; }
.form-row--choice > label { padding-top: 0; }
.form-tip { font-size: 12px; color: #999; margin: 0 4px 12px; line-height: 1.5; }
.form-unit { font-size: 12px; color: var(--muted); margin-left: 6px; flex-shrink: 0; }
.form-row .radio-group { flex: 1; }

.msg-dot {
  position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 8px; background: #f56c6c; color: #fff; font-size: 10px; line-height: 16px;
  text-align: center; display: none;
}
.msg-dot.show { display: block; }

.search-bar { padding: 10px 12px; background: #fff; border-bottom: 1px solid var(--border); }
.search-bar input {
  width: 100%; height: 36px; border: 1px solid var(--border); border-radius: 18px;
  padding: 0 14px; background: #f8f8f8;
}

.todo-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px; cursor: pointer;
}
.todo-item:last-child { border-bottom: none; }
.todo-item .tag { font-size: 11px; padding: 2px 8px; border-radius: 10px; background: var(--primary-light); color: var(--primary-active); }

.scan-hint { font-size: 12px; color: var(--muted); text-align: center; margin-top: 8px; }
.scan-preview { cursor: pointer; user-select: none; }
.scan-preview:active { opacity: 0.85; }
.stocktake-meta { padding: 0 16px 8px; font-size: 13px; color: var(--text-secondary); }
.st-line {
  display: grid; grid-template-columns: 1fr auto 48px; gap: 8px; align-items: center;
  padding: 12px 16px; background: var(--card); border-bottom: 1px solid var(--border);
}
.st-line--diff { background: #fffbf0; }
.st-line-name { font-weight: 600; font-size: 14px; }
.st-line-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.st-line-actual { display: flex; align-items: center; gap: 4px; }
.st-qty-btn {
  width: 28px; height: 28px; border: 1px solid var(--border); border-radius: 6px;
  background: #fff; font-size: 16px; line-height: 1; cursor: pointer;
}
.st-qty-input { width: 44px; height: 28px; text-align: center; border: 1px solid var(--border); border-radius: 6px; }
.st-line-diff { text-align: right; font-weight: 600; font-size: 14px; }
.st-diff-plus { color: #67c23a; }
.st-diff-minus { color: #f56c6c; }

.finance-mini { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.finance-mini-item { text-align: center; padding: 8px 4px; background: #fafafa; border-radius: 8px; }
.finance-mini-item .n { font-size: 16px; font-weight: 700; color: var(--primary-active); }
.finance-mini-item .l { font-size: 11px; color: var(--muted); margin-top: 2px; }

.scan-box { padding: 16px 12px; }
.scan-preview {
  height: 180px; border-radius: var(--radius); background: #111; color: #aaa;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  font-size: 14px;
}
.scan-preview-icon { width: 48px; height: 48px; object-fit: contain; opacity: .85; filter: brightness(0) invert(1); }

.share-poster {
  background: linear-gradient(135deg, #fff1ef, #fff); border-radius: var(--radius);
  padding: 24px; text-align: center; border: 1px solid var(--border); margin-bottom: 12px;
}
.share-poster-title { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.share-poster-sub { font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.share-qr {
  width: 120px; height: 120px; margin: 0 auto; background: #fff; border: 1px dashed #ccc;
  display: flex; align-items: center; justify-content: center; font-size: 12px; color: #999;
}

.proxy-line {
  display: grid; grid-template-columns: 1fr 64px 64px 32px; gap: 6px; align-items: center;
  padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px;
}
.proxy-line select, .proxy-line input { width: 100%; height: 32px; border: 1px solid var(--border); border-radius: 6px; padding: 0 6px; }

[data-perm] { display: none; }
body.perm-all [data-perm],
body.perm-customer [data-perm="customer"],
body.perm-finance [data-perm="finance"],
body.perm-field [data-perm="field"],
body.perm-warehouse [data-perm="warehouse"] { display: block; }

.order-tabs {
  display: flex; gap: 8px; padding: 10px 12px; background: #fff;
  border-bottom: 1px solid var(--border); overflow-x: auto; flex-wrap: nowrap;
  -webkit-overflow-scrolling: touch;
}
.order-tabs::-webkit-scrollbar { display: none; }
.order-tab {
  flex-shrink: 0; border: none; background: #f3f3f3; color: var(--text-secondary);
  font-size: 12px; padding: 6px 12px; border-radius: 14px; cursor: pointer;
}
.order-tab.active { background: var(--primary); color: #fff; font-weight: 600; }

.credit-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px;
}
.credit-item {
  background: #fafafa; border-radius: 8px; padding: 10px; text-align: center;
}
.credit-item .n { font-size: 15px; font-weight: 700; color: var(--text); }
.credit-item .l { font-size: 11px; color: var(--muted); margin-top: 2px; }
.credit-item.warn .n { color: #e6a23c; }
.credit-item.danger .n { color: #f56c6c; }
.credit-item.ok .n { color: #67c23a; }

.stock-actions {
  display: flex; gap: 10px; padding: 10px 12px; background: #fff;
  border-bottom: 1px solid var(--border);
}
.stock-act-btn {
  flex: 1; height: 36px; border: 1px dashed var(--primary); border-radius: 8px;
  background: var(--primary-light); color: var(--primary-active); font-size: 13px; cursor: pointer;
}
.stock-act-btn--out { border-color: #e6a23c; background: #fdf6ec; color: #e6a23c; }

.stock-loc-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 0; border-bottom: 1px dashed var(--border); font-size: 12px; color: var(--text-secondary);
}
.stock-loc-row:last-child { border-bottom: none; }
.stock-loc-row .loc-code { font-family: monospace; color: var(--text); }

/* ========== 钱包风格 UI ========== */
.page-wallet { background: var(--bg); padding-bottom: 24px; }
.page-wallet .mp-nav { display: none; }

.wallet-top {
  background: linear-gradient(165deg, #ffc9a8 0%, #ff9a7a 38%, #f04a3e 100%);
  padding: 0 12px 10px; border-radius: 0 0 20px 20px;
}
.wallet-nav { display: flex; align-items: center; justify-content: space-between; height: 40px; }
.wallet-nav-back {
  width: 36px; height: 36px; border: none; border-radius: 50%;
  background: rgba(255,255,255,.22); display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0;
}
.wallet-nav-back img { width: 18px; height: 18px; filter: brightness(0) invert(1); }
.wallet-nav-title { font-size: 17px; font-weight: 600; color: #fff; }
.wallet-nav-placeholder { width: 36px; }
.wallet-balance-card {
  background: #fff; border-radius: 16px; padding: 22px 20px;
  box-shadow: var(--shadow-lg); text-align: center;
}
.wallet-balance-card--compact { padding: 12px 14px 14px; text-align: left; }
.wallet-card-user { margin-bottom: 10px; }
.wallet-card-user-name { font-size: 15px; font-weight: 700; color: var(--text); line-height: 1.3; }
.wallet-card-user-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.wallet-balance-row { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.wallet-balance-label { font-size: 12px; color: var(--muted); flex-shrink: 0; }
.wallet-balance-amt { font-size: 26px; font-weight: 800; color: var(--text); line-height: 1; }
.wallet-mini-stats--inline { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.wallet-stat-chip {
  display: inline-flex; align-items: center; gap: 4px;
  background: #f4f5f7; border-radius: 8px; padding: 4px 8px; font-size: 11px;
}
.wallet-stat-chip em { color: var(--muted); font-style: normal; }
.wallet-stat-chip b { font-weight: 700; color: var(--text); }
.wallet-stat-chip b.warn { color: #e6a23c; }
.wallet-stat-chip b.muted { color: var(--text-secondary); }
.wallet-card-foot { font-size: 11px; color: var(--muted); text-align: center; margin-top: 8px; }

.wallet-cta-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wallet-cta-row--inset { margin-top: 0; }
.wallet-btn {
  height: 48px; border: none; border-radius: 24px; font-size: 15px; font-weight: 600; cursor: pointer;
}
.wallet-btn--primary { background: var(--primary-grad); color: #fff; box-shadow: 0 6px 16px rgba(240, 74, 62, .35); }
.wallet-btn--dark { background: #2d3138; color: #fff; }
.wallet-btn--sm { height: 38px; font-size: 13px; border-radius: 19px; box-shadow: none; }
.wallet-btn--primary.wallet-btn--sm { box-shadow: 0 4px 10px rgba(240, 74, 62, .25); }
.wallet-btn--full { width: 100%; margin-top: 8px; }

.wallet-body { padding: 10px 12px 24px; }
.wallet-section { background: #fff; border-radius: 16px; padding: 14px; margin-bottom: 10px; box-shadow: var(--shadow-sm); }
.wallet-section--form { border: 1px solid rgba(240, 74, 62, .12); }
.wallet-section-head { display: flex; justify-content: space-between; align-items: center; font-size: 15px; font-weight: 700; margin-bottom: 14px; }
.wallet-section-close { border: none; background: #f4f5f7; color: var(--muted); font-size: 12px; padding: 4px 10px; border-radius: 12px; cursor: pointer; }

.wallet-poster-card { text-align: center; }
.wallet-poster-badge { display: inline-block; font-size: 11px; font-weight: 600; color: var(--primary-active); background: var(--primary-light); padding: 4px 12px; border-radius: 20px; margin-bottom: 10px; }
.wallet-poster-title { font-size: 16px; font-weight: 700; }
.wallet-poster-sub { font-size: 11px; color: var(--muted); margin: 4px 0 12px; }
.wallet-qr {
  width: 108px; height: 108px; margin: 0 auto; border-radius: 14px;
  background: linear-gradient(145deg, #fafbfc, #f0f2f5); border: 2px dashed #e0e4ea;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  font-size: 13px; color: var(--text-secondary); font-weight: 600;
}
.wallet-qr small { font-size: 11px; color: var(--muted); font-weight: 400; }
.wallet-poster-foot { margin-top: 12px; font-size: 12px; color: var(--muted); }
.wallet-channel-row { display: flex; gap: 12px; justify-content: center; margin-top: 16px; }
.wallet-channel {
  flex: 1; max-width: 120px; border: none; background: #f8f9fb; border-radius: 14px;
  padding: 12px 8px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text-secondary);
}
.wallet-channel .ico {
  width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, #fff1ef, #ffe0db);
  display: flex; align-items: center; justify-content: center;
}
.wallet-channel .ico img { width: 22px; height: 22px; object-fit: contain; }

.wallet-link-chip { display: flex; align-items: center; gap: 10px; background: #f8f9fb; border-radius: 12px; padding: 12px 14px; }
.wallet-link-text { flex: 1; font-size: 13px; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wallet-link-copy { flex-shrink: 0; border: none; background: var(--primary-light); color: var(--primary-active); font-size: 12px; font-weight: 600; padding: 6px 14px; border-radius: 16px; cursor: pointer; }

.wallet-field { margin-bottom: 14px; }
.wallet-field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.wallet-field input, .wallet-field select {
  width: 100%; height: 46px; border: 1px solid var(--border); border-radius: 12px;
  padding: 0 14px; font-size: 15px; background: #fafbfc; outline: none;
}
.wallet-field input:focus, .wallet-field select:focus { border-color: var(--primary-soft); background: #fff; box-shadow: 0 0 0 3px rgba(253, 132, 122, .15); }

.wallet-activity { display: flex; flex-direction: column; }
.wallet-act-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid #f4f5f7; }
.wallet-act-item:last-child { border-bottom: none; }
.wallet-act-icon { width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.wallet-act-icon img { width: 22px; height: 22px; object-fit: contain; }
.wallet-act-icon--out { background: #fff4e8; }
.wallet-act-main { flex: 1; min-width: 0; }
.wallet-act-title { font-size: 14px; font-weight: 600; }
.wallet-act-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.wallet-act-right { text-align: right; flex-shrink: 0; }
.wallet-act-amt { font-size: 15px; font-weight: 700; }
.wallet-act-amt.neg { color: #e6a23c; }
.wallet-act-badge { display: inline-block; font-size: 10px; padding: 2px 8px; border-radius: 10px; margin-top: 4px; }
.wallet-act-badge.pending { background: #fff7e6; color: #d48806; }
.wallet-act-badge.paid { background: #f6ffed; color: #389e0d; }
.wallet-act-badge.rejected { background: #fff1f0; color: #cf1322; }
.wallet-act-empty { text-align: center; padding: 20px; font-size: 13px; color: var(--muted); }

.wallet-tips { font-size: 13px; color: var(--text-secondary); line-height: 1.7; }
.wallet-tips p { margin-bottom: 8px; padding-left: 12px; position: relative; }
.wallet-tips p::before { content: ''; position: absolute; left: 0; top: 8px; width: 4px; height: 4px; border-radius: 50%; background: var(--primary-soft); }

.form-row--block { flex-direction: column; align-items: stretch; gap: 8px; }
.form-row--block label { width: auto; }
.img-upload-preview {
  width: 100%; max-width: 160px; aspect-ratio: 1; border-radius: 10px;
  border: 1px dashed var(--border); background: #fafafa;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 13px; cursor: pointer; overflow: hidden;
}
.img-upload-preview.has-img { border-style: solid; padding: 0; }
.img-upload-preview img { width: 100%; height: 100%; object-fit: cover; }

.detail-preview-wrap { margin-top: 10px; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.detail-preview-label { font-size: 11px; color: var(--muted); padding: 6px 10px; background: #fafafa; border-bottom: 1px solid var(--border); }
.detail-preview { padding: 10px; font-size: 14px; min-height: 48px; }
.detail-preview img { max-width: 100%; border-radius: 6px; margin: 6px 0; }

.sku-line {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px 0;
  border-bottom: 1px solid var(--border); font-size: 13px;
}
.sku-line input, .sku-line select { width: 100%; height: 32px; border: 1px solid var(--border); border-radius: 6px; padding: 0 8px; }
.sku-line-head { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; font-weight: 600; }

.prod-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.hidden { display: none !important; }
