:root {
  /* 8N 零售工作台：贴近九讯云 NEO 的浅灰蓝手机壳 */
  --bg: #f5f7fa;
  --bg-accent: #e8eef6;
  --surface: #ffffff;
  --ink: #1f2329;
  --muted: #8a9199;
  --line: #ebeef2;
  --primary: #2b6de5;
  --primary-dark: #1a56c8;
  --primary-soft: #e8f0fe;
  --neo-hero: linear-gradient(165deg, #2b6de5 0%, #3d82f5 42%, #1a56c8 100%);
  --neo-bottom-h: 56px;
  --warn: #c27a0e;
  --warn-soft: #fff6e8;
  --danger: #e84026;
  --danger-soft: #fef1ef;
  --ok: #00a870;
  --ok-soft: #e8f8f1;
  --amount-sales: #0a59f7;
  --amount-profit: #00a870;
  --shadow: 0 10px 32px rgba(10, 40, 100, 0.08);
  --shadow-sm: 0 2px 10px rgba(10, 40, 100, 0.05);
  --radius: 16px;
  --radius-sm: 10px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.12, 0.64, 1);
  --font: "Noto Sans SC", "PingFang SC", "HarmonyOS Sans", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html, body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  font-family: var(--font);
  color: var(--ink);
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.55;
  background-color: var(--bg);
  background-image:
    radial-gradient(1200px 480px at 12% -10%, rgba(10, 89, 247, 0.10), transparent 55%),
    radial-gradient(900px 420px at 100% 0%, rgba(0, 71, 212, 0.06), transparent 50%),
    linear-gradient(180deg, #f7f9fc 0%, var(--bg) 42%, #e9eef6 100%);
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea {
  font: inherit;
  touch-action: manipulation;
}

.app {
  width: min(1240px, calc(100% - 36px));
  margin: 0 auto;
  padding: 24px 0 56px;
}

.approve-home-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff7e8;
  border: 1px solid #ffd8a8;
  color: #7a4b00;
}
.approve-home-alert[hidden] {
  display: none !important;
}
.approve-home-alert strong {
  color: #c2410c;
}

.header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 20px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(228, 232, 238, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: box-shadow 0.28s var(--ease), transform 0.28s var(--ease);
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #2f7bff 0%, var(--primary) 55%, var(--primary-dark) 100%);
  color: white;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.04em;
  box-shadow: 0 8px 18px rgba(10, 89, 247, 0.28);
}

.brand h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.3;
}

.brand p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
}

.store-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  background: #f0f3f8;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.store-switcher[hidden] {
  display: none !important;
}

.store-switcher-label {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  font-weight: 500;
}

.store-switcher select {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  background: #fff;
  min-width: 120px;
  max-width: 180px;
  color: var(--ink);
}

.store-switcher select:disabled {
  color: var(--ink);
  opacity: 1;
  background: #eef2f8;
  cursor: default;
}

.section-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.dashboard-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.dashboard-total {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.dashboard-total-card {
  min-width: 148px;
  padding: 12px 14px 12px 16px;
  border-radius: var(--radius-sm);
  background: #f5f7fb;
  border: 1px solid var(--line);
  border-left: 3px solid var(--primary);
}

.dashboard-total-card--sales {
  border-left-color: var(--primary);
  background: var(--primary-soft);
}

.dashboard-total-card--profit {
  border-left-color: var(--ok);
  background: var(--ok-soft);
}

.dashboard-total-card--count {
  border-left-color: #5b6b7c;
  background: #f3f5f7;
}

.dashboard-total-card .k {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.dashboard-total-card .v {
  margin-top: 4px;
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.dashboard-total-card .v.sales {
  color: var(--amount-sales);
}

.dashboard-total-card .v.profit-pos {
  color: var(--amount-profit);
}

.dashboard-total-card .v.profit-neg {
  color: var(--danger);
}

.dashboard-total-card .v.profit-zero {
  color: var(--muted);
}

.dashboard-total-card .v.count {
  color: var(--muted);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.dash-store-card {
  display: block;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.28s var(--ease), box-shadow 0.28s var(--ease), transform 0.28s var(--ease-spring);
}

.dash-store-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

.dash-store-card.is-disabled {
  opacity: 0.72;
}

.dash-store-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.dash-store-meta {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.dash-store-metrics {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.dash-metric {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}

.dash-metric .k {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.dash-metric .v {
  font-size: 17px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.dash-metric .v.sales {
  color: var(--amount-sales);
}

.dash-metric .v.profit-pos {
  color: var(--amount-profit);
}

.dash-metric .v.profit-neg {
  color: var(--danger);
}

.dash-metric .v.profit-zero {
  color: var(--muted);
}

.dash-metric .v.count {
  color: var(--muted);
  font-size: 16px;
}

.panel-block {
  margin-bottom: 22px;
}

.auth-store-list {
  display: grid;
  gap: 4px;
  max-width: 220px;
}

.auth-store-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  cursor: pointer;
}

.person-name-block {
  display: grid;
  gap: 4px;
  line-height: 1.35;
}

.tel-link {
  color: var(--primary-dark);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid rgba(10, 89, 247, 0.35);
}

.tel-link:hover {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tel-link.muted {
  color: var(--muted);
  font-weight: 500;
  border-bottom-color: rgba(102, 120, 114, 0.35);
}

.tel-link.muted:hover {
  color: var(--primary-dark);
  border-bottom-color: var(--primary-dark);
}

.person-name-block .field-note {
  display: inline-block;
  min-width: 3em;
  margin-right: 4px;
  font-size: 12px;
  font-weight: 600;
  opacity: 0.85;
}

.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 18px;
  padding: 5px;
  width: fit-content;
  max-width: 100%;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 9px 16px;
  cursor: pointer;
  font-weight: 500;
  font-size: 14px;
  transition:
    background 0.28s var(--ease),
    color 0.28s var(--ease),
    transform 0.28s var(--ease-spring),
    box-shadow 0.28s var(--ease);
}

.tab:hover {
  color: var(--ink);
  background: rgba(10, 89, 247, 0.06);
}

.tab.active {
  background: linear-gradient(135deg, #2f7bff, var(--primary));
  color: white;
  font-weight: 600;
  box-shadow: 0 6px 16px rgba(10, 89, 247, 0.28);
}

.tab:active {
  transform: scale(0.97);
}

.panel[hidden] {
  display: none !important;
}

.pay-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.pay-card {
  display: block;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.28s var(--ease), box-shadow 0.28s var(--ease), transform 0.28s var(--ease-spring);
}

.pay-card:hover {
  border-color: #c5ced9;
  box-shadow: var(--shadow);
}

.pay-card.is-active {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(10, 89, 247, 0.14);
  background: var(--primary-soft);
}

.pay-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.pay-card-ico {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #0a6cff;
}

.pay-card-ico svg {
  width: 28px;
  height: 28px;
  display: block;
}

.pay-card-ico.pay-alipay { color: #0a6cff; }
.pay-card-ico.pay-wechat { color: #09bb07; }
.pay-card-ico.pay-cash { color: #d9891a; }
.pay-card-ico.pay-union { color: #c0392b; }
.pay-card-ico.pay-bank { color: #2c4f8a; }
.pay-card-ico.pay-credit { color: #6c3483; }
.pay-card-ico.pay-other { color: var(--primary); }

.pay-card .label {
  font-size: 12px;
  color: var(--muted);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pay-card .value {
  margin-top: 6px;
  font-size: 17px;
  font-weight: 700;
}

.fin-stat-ico {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  margin-right: 4px;
  vertical-align: -2px;
  color: var(--muted);
}
.fin-stat-ico svg { width: 14px; height: 14px; display: block; }
.fin-stat-ico--in { color: #16a34a; }
.fin-stat-ico--out { color: #dc2626; }
.fin-stat-ico--net { color: #2563eb; }

.badge-with-ico {
  gap: 4px;
}
.badge-with-ico svg {
  width: 12px;
  height: 12px;
  display: block;
  flex: 0 0 auto;
}

.chip-pay {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.chip-pay-ico {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  overflow: hidden;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.chip-pay-ico svg {
  width: 18px;
  height: 18px;
  display: block;
}
.chip-pay-ico.pay-alipay { color: #0a6cff; }
.chip-pay-ico.pay-wechat { color: #09bb07; }
.chip-pay-ico.pay-cash { color: #d9891a; }
.chip-pay-ico.pay-union { color: #c0392b; }
.chip-pay-ico.pay-bank { color: #2c4f8a; }
.chip-pay-ico.pay-credit { color: #6c3483; }

.pay-io {
  margin-top: 8px;
  display: grid;
  gap: 4px;
}

.pay-io-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.pay-io-row span {
  flex: none;
  opacity: 0.85;
}

.pay-io-row strong {
  font-weight: 700;
  text-align: right;
  word-break: break-all;
}

.pay-io-in {
  color: var(--amount-profit);
}

.pay-io-out {
  color: var(--danger);
}

.pay-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.pay-option {
  position: relative;
  cursor: pointer;
}

.pay-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pay-option span {
  display: block;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 8px;
  background: #f7f9fc;
  color: var(--ink);
}

.pay-option input:checked + span {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-weight: 600;
}

.form-grid select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 13px;
  min-height: 46px;
  outline: none;
  background: #f7f9fc;
  font: inherit;
  color: var(--ink);
  line-height: 1.4;
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% - 3px), calc(100% - 12px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 36px;
}

.form-grid select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(10, 89, 247, 0.12);
  background-color: white;
}

.badge-income {
  background: var(--ok-soft);
  color: var(--ok);
}

.badge-expense {
  background: var(--danger-soft);
  color: var(--danger);
}

@media (max-width: 900px) {
  .pay-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pay-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.btn {
  border: 0;
  border-radius: var(--radius-sm);
  padding: 10px 15px;
  cursor: pointer;
  transition:
    background 0.28s var(--ease),
    border-color 0.28s var(--ease),
    color 0.28s var(--ease),
    box-shadow 0.28s var(--ease),
    transform 0.22s var(--ease-spring);
  white-space: nowrap;
  font-weight: 500;
  font-size: 14px;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: linear-gradient(135deg, #2f7bff, var(--primary));
  color: white;
  box-shadow: 0 6px 16px rgba(10, 89, 247, 0.24);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 8px 20px rgba(10, 89, 247, 0.3);
}

.btn-ghost {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn-ghost:hover {
  background: #f0f3f8;
  border-color: #c5ced9;
}

.btn-danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.btn-small {
  padding: 6px 10px;
  font-size: 13px;
  border-radius: 6px;
  font-weight: 600;
}

.file-btn {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

/* label.btn 的 display 会盖掉原生 hidden，备份按钮必须强制隐藏 */
.file-btn[hidden],
#importBackupLabel[hidden],
#btnExport[hidden],
#btnOpenInbound[hidden] {
  display: none !important;
}

.stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.stat-card {
  display: block;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 15px 16px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.28s var(--ease), box-shadow 0.28s var(--ease), transform 0.28s var(--ease-spring);
}

.stat-card:hover {
  border-color: #c5ced9;
  box-shadow: var(--shadow);
}

.stat-card.is-active {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(10, 89, 247, 0.18);
  background: #fff;
}

.stat-card--pending.is-active {
  border-color: #b86a1e;
  box-shadow: 0 0 0 2px rgba(184, 106, 30, 0.14);
}

.stat-card--profit.is-active {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(10, 89, 247, 0.12);
}

.stat-card .label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.stat-card .value {
  margin-top: 8px;
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.stat-card .value .sub {
  margin-top: 4px;
  font-size: 13px;
  font-weight: 600;
  opacity: 0.9;
}

.stat-card--pending {
  background: #fffaf4;
  border-color: #e0c49a;
  border-left: 3px solid var(--warn);
  box-shadow: var(--shadow-sm);
}

.stat-card--pending .label {
  color: #7a4e12;
  font-weight: 600;
}

.stat-card--pending .value {
  color: #8a4b0a;
  font-size: 24px;
}

.stat-card--cost {
  background: var(--primary-soft);
  border-color: var(--line);
  border-left: 3px solid var(--primary);
  box-shadow: var(--shadow-sm);
}

.stat-card--cost .value.sales {
  color: var(--amount-sales);
}

.stat-card--profit {
  background: var(--ok-soft);
  border-color: var(--line);
  border-left: 3px solid var(--ok);
  box-shadow: var(--shadow-sm);
}

.stat-card--profit .label {
  color: var(--muted);
  font-weight: 600;
}

.stat-card--profit .value,
.stat-card--profit .value.sales {
  color: var(--amount-sales);
  font-size: 20px;
}

.stat-card--profit .value .sub {
  color: var(--muted);
}

.stat-card--profit .value .sub.profit-pos {
  color: var(--amount-profit);
}

.stat-card--profit .value .sub.profit-neg {
  color: var(--danger);
}

.stat-card--profit .value .sub.profit-zero {
  color: var(--muted);
}

.stat-card .value.sales {
  color: var(--amount-sales);
}

.stat-card .value.count {
  color: var(--muted);
}

.toolbar {
  display: flex;
  gap: 14px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.search-box {
  flex: 1;
  min-width: 260px;
}

.search-box input {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  outline: none;
  box-shadow: var(--shadow-sm);
}

.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(10, 89, 247, 0.1);
}

.filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.toolbar-time {
  margin-top: -4px;
  margin-bottom: 14px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.filter-label {
  color: var(--muted);
  font-size: 12px;
  margin-right: 4px;
  font-weight: 500;
}

.chip {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.28s var(--ease), border-color 0.28s var(--ease), color 0.28s var(--ease), transform 0.22s var(--ease-spring);
}

.chip:hover {
  border-color: #c5ced9;
  color: var(--ink);
}

.chip.active {
  background: linear-gradient(135deg, #2f7bff, var(--primary));
  border-color: transparent;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(10, 89, 247, 0.24);
}

.chip:active {
  transform: scale(0.97);
}

.table-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: auto;
  min-height: 360px;
}

/* 有几条显示几条，不预留空白高度（调店审核等短列表） */
.table-wrap--auto {
  min-height: 0;
  margin-bottom: 14px;
}

.table-wrap--auto .empty {
  padding: 28px 16px;
}

.table {
  --row-font: 16px;
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

.table th,
.table td {
  padding: 13px 12px;
  text-align: left;
  border-bottom: 1px solid #e8eeea;
  vertical-align: middle;
  font-size: var(--row-font);
  line-height: 1.45;
  white-space: nowrap;
}

.table th {
  position: sticky;
  top: 0;
  background: #eef2f8;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  z-index: 1;
  border-bottom: 1px solid var(--line);
}

.table tr:hover td {
  background: #f3f7f5;
}

.qty-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  padding: 3px 10px;
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}

.qty-cell .muted {
  margin-top: 4px;
  font-size: 12px;
}

.qty-inline {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary, var(--primary));
}

.imei-cell {
  font-size: var(--row-font);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
  color: #243a31;
}

.product-cell,
.spec-cell {
  min-width: 0;
}

.product-brand,
.spec-main,
.product-model,
.spec-sub {
  font-size: var(--row-font);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.01em;
  line-height: 1.4;
}

.product-model,
.spec-sub {
  margin-top: 6px;
  color: var(--ink);
  background: #eef2f8;
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--line);
}

.price-cell {
  font-size: var(--row-font);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  line-height: 1.35;
  white-space: nowrap;
}

.price-cost {
  color: var(--muted);
}

.price-sale {
  color: var(--ink);
}

.person-cell {
  font-size: var(--row-font);
  font-weight: 600;
  color: var(--ink);
}

.time-cell {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.55;
  white-space: nowrap;
}

.time-label {
  display: inline-block;
  min-width: 1.2em;
  margin-right: 6px;
  color: var(--primary);
  font-weight: 700;
}

.pay-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  padding: 5px 10px 5px 6px;
  border-radius: 6px;
  line-height: 1.35;
  white-space: nowrap;
}

.pay-icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  color: currentColor;
  flex-shrink: 0;
  overflow: hidden;
  background: transparent !important;
}
.pay-icon svg {
  width: 22px;
  height: 22px;
  display: block;
}

.pay-alipay {
  color: #0a6cff;
  background: #e8f2ff;
}
.pay-alipay .pay-icon { background: linear-gradient(145deg, #3d9eff, #0a6cff); }

.pay-wechat {
  color: #1a9f4b;
  background: #e9f8ef;
}
.pay-wechat .pay-icon { background: linear-gradient(145deg, #2fce68, #09bb07); }

.pay-cash {
  color: #9a5b16;
  background: #fff4e5;
}
.pay-cash .pay-icon { background: linear-gradient(145deg, #f0b14a, #d9891a); }

.pay-union {
  color: #c0392b;
  background: #fdeceb;
}
.pay-union .pay-icon { background: linear-gradient(145deg, #e74c3c, #c0392b); }

.pay-bank {
  color: #2c4f8a;
  background: #eaf0f8;
}
.pay-bank .pay-icon { background: linear-gradient(145deg, #4f79bd, #2c4f8a); }

.pay-credit {
  color: #6c3483;
  background: #f5eaf8;
}
.pay-credit .pay-icon { background: linear-gradient(145deg, #a569bd, #6c3483); }

.pay-other {
  color: var(--primary);
  background: #e8f3ec;
}
.pay-other .pay-icon { background: var(--primary); }

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  writing-mode: horizontal-tb;
  letter-spacing: 0.02em;
}

.table .btn-small {
  font-size: 13px;
  font-weight: 700;
  padding: 7px 10px;
}

.table .actions {
  gap: 6px;
  max-width: 168px;
}

.badge-in {
  background: var(--ok-soft);
  color: var(--ok);
}

.badge-out {
  background: var(--warn-soft);
  color: var(--warn);
}

.badge-pending {
  background: #e8eef8;
  color: #2f4f8a;
}

.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(900px 420px at 20% -10%, rgba(10, 89, 247, 0.14), transparent 55%),
    linear-gradient(180deg, #f7f9fc 0%, var(--bg) 100%);
}

/* 防止 display:grid 盖掉 hidden，导致登录后仍停在登录页 */
.auth-screen[hidden],
#appMain[hidden],
#adminApp[hidden],
#gateScreen[hidden],
.auth-card[hidden],
.panel[hidden] {
  display: none !important;
}

.auth-card {
  width: min(420px, 100%);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(228, 232, 238, 0.95);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 32px 28px 28px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  animation: hwModalIn 0.4s var(--ease-spring);
}

.auth-card::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 4px;
  background: linear-gradient(90deg, #2f7bff, var(--primary), var(--primary-dark));
}

.auth-brand {
  text-align: center;
  margin-bottom: 24px;
}

.auth-brand .brand-mark {
  margin: 0 auto 14px;
}

.auth-brand h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.auth-brand p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.auth-actions {
  display: grid;
  gap: 10px;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0;
  color: var(--muted);
  font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-form label {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.auth-form span {
  font-size: 13px;
  color: var(--muted);
}

.auth-form input,
.auth-form select {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  min-height: 44px;
  outline: none;
  background: #f7f9fc;
  font: inherit;
}

.auth-form input:focus,
.auth-form select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(10, 89, 247, 0.1);
  background: white;
}

.code-row {
  display: flex;
  gap: 8px;
}

.code-row input {
  flex: 1;
  min-width: 0;
}

.auth-tip {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.link-btn {
  margin-top: 12px;
  border: 0;
  background: transparent;
  color: var(--primary-dark);
  cursor: pointer;
  font-size: 13px;
  text-decoration: underline;
  width: 100%;
}

.user-pill {
  background: var(--primary-soft);
  color: var(--primary-dark);
  border: 1px solid rgba(10, 89, 247, 0.16);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
}

.admin-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  flex: 1;
  min-width: 220px;
}

.date-range {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.date-range label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.date-range input[type="date"] {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  background: white;
  font: inherit;
}

.perf-cell {
  min-width: 110px;
}

.perf-cell .perf-amount {
  font-weight: 700;
  color: var(--primary-dark);
}

.perf-cell .perf-sub {
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted);
}

.date-range[hidden] {
  display: none !important;
}

#adminTableBody select {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  background: #fafbfd;
  font: inherit;
}

.money {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.profit-pos { color: var(--amount-profit); }
.profit-neg { color: var(--danger); }
.profit-zero { color: var(--muted); }

.money.profit-pos,
.money.sales {
  color: var(--amount-profit);
}

.money.sales {
  color: var(--amount-sales);
}

.muted {
  color: var(--muted);
  font-size: 12px;
}

.actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.empty {
  text-align: center;
  padding: 72px 20px;
  color: var(--muted);
}

.empty h3 {
  margin: 0 0 8px;
  color: var(--ink);
}

.modal {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: calc(100vw - 24px);
}

.modal::backdrop {
  background: rgba(12, 28, 56, 0.42);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.modal-card {
  width: min(860px, 100%);
  background: var(--surface);
  border-radius: 18px;
  border: 1px solid rgba(228, 232, 238, 0.95);
  box-shadow: 0 24px 64px rgba(10, 40, 100, 0.18);
  overflow: visible;
  animation: hwModalIn 0.32s var(--ease-spring);
}

@keyframes hwModalIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-head,
.modal-foot {
  border-radius: 0;
  background: var(--surface);
}

.modal-head,
.modal-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 28px;
}

.modal-head {
  border-bottom: 1px solid var(--line);
}

.modal-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.modal-foot {
  border-top: 1px solid var(--line);
  justify-content: flex-end;
  gap: 12px;
  padding-top: 18px;
  padding-bottom: 18px;
}

.modal-body {
  padding: 26px 28px 22px;
  max-height: min(72vh, 760px);
  overflow: auto;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 6px;
  background: #eef2f8;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  color: var(--muted);
}

.icon-btn:hover {
  background: #e4ebe7;
  color: var(--ink);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 22px;
}

.form-grid label {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* 防止 display:flex 盖掉 hidden，导致「数量」等字段该藏却还显示 */
.form-grid label[hidden],
.form-grid [hidden],
.inbound-form-body [hidden],
#inboundQtyWrap[hidden],
#inboundImeiWrap[hidden],
#inboundSpecFields[hidden] {
  display: none !important;
}

.form-grid label.full,
.form-grid .full {
  grid-column: 1 / -1;
}

.imei-row {
  display: flex;
  gap: 12px;
  align-items: stretch;
}


.imei-row input {
  flex: 1;
  min-width: 0;
}

.imei-row .btn {
  flex-shrink: 0;
  min-height: 48px;
  padding-left: 18px;
  padding-right: 18px;
}

.field-tip {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.inbound-batch-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: #f5f7fb;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.inbound-batch-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}

.inbound-batch-bar .field-tip {
  flex: 1;
  min-width: 200px;
  margin: 0;
}

.inbound-batch-bar .btn {
  flex: none;
}

.autocomplete-field {
  position: relative;
}

.suggest-list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% - 4px);
  z-index: 20;
  max-height: 240px;
  overflow: auto;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 14px 36px rgba(16, 36, 72, 0.14);
}

.brand-suggest {
  max-height: min(320px, 50vh);
  z-index: 25;
}

.suggest-item {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 10px 12px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink);
}

.suggest-item:hover,
.suggest-item.active {
  background: var(--primary-soft);
}

.suggest-item .brand-tag {
  color: var(--muted);
  font-size: 12px;
  flex-shrink: 0;
}

.suggest-empty {
  padding: 12px;
  color: var(--muted);
  font-size: 13px;
}

.scan-card {
  width: min(520px, 100%);
}

.scan-tip {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 14px;
}

.qr-reader {
  overflow: hidden;
  border-radius: 16px;
  background: #10231c;
  min-height: 260px;
}

.qr-reader video {
  border-radius: 16px;
}

#qrReader__scan_region {
  min-height: 260px;
}

#qrReader__dashboard_section_csr button,
#qrReader__dashboard_section_swaplink {
  margin-top: 8px;
}

.form-grid span {
  font-size: 14px;
  color: var(--muted);
}

.form-grid input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 13px;
  min-height: 46px;
  outline: none;
  background: #f7f9fc;
  font: inherit;
  color: var(--ink);
  line-height: 1.4;
}

.form-grid input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(10, 89, 247, 0.1);
  background: white;
}

.phone-summary {
  background: #f4f8f6;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 16px;
  line-height: 1.7;
}

.modal-card--wide {
  width: min(980px, 100%);
}

/* 入库弹窗：与详情同宽，内容摊开少滚动 */
.modal-card--inbound {
  width: min(980px, calc(100vw - 24px));
}

.modal-card--inbound .inbound-form-body,
.modal-card--inbound .modal-body {
  max-height: min(78vh, 820px);
  padding-bottom: 28px;
}

.modal-card--inbound .form-grid {
  grid-template-columns: 1fr 1fr;
  gap: 18px 20px;
  align-items: start;
}

.modal-card--inbound .form-grid > .full,
.modal-card--inbound .form-grid > label.full {
  grid-column: 1 / -1;
}

/* 分类 + 搜索并排，更像详情摊开 */
.inbound-top-row {
  display: grid;
  grid-template-columns: minmax(200px, 0.9fr) minmax(280px, 1.4fr);
  gap: 18px 20px;
  grid-column: 1 / -1;
}

@media (max-width: 720px) {
  .inbound-top-row {
    grid-template-columns: 1fr;
  }
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.detail-item {
  background: #f5f7fb;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  min-height: 74px;
}

.detail-item.span-2 {
  grid-column: span 2;
}

.detail-item .k {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.detail-item .v {
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  word-break: break-all;
}

.multiple-strong {
  color: #a85d12;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.multiple-text {
  margin-top: 4px;
  color: #8a5a1a;
  font-size: 13px;
  font-weight: 600;
}

@media (max-width: 900px) {
  .detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .detail-item.span-2 {
    grid-column: span 1;
  }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  background: rgba(24, 36, 49, 0.92);
  color: white;
  padding: 12px 18px;
  border-radius: 999px;
  box-shadow: 0 12px 32px rgba(16, 36, 72, 0.22);
  z-index: 50;
  font-size: 14px;
  font-weight: 500;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: hwToastIn 0.28s var(--ease-spring);
}

@keyframes hwToastIn {
  from {
    opacity: 0;
    transform: translate(-50%, 8px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.review-notify {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 60;
  width: 168px;
  border: 0;
  border-radius: 16px;
  padding: 14px 14px 12px;
  text-align: left;
  cursor: pointer;
  color: white;
  background: linear-gradient(145deg, #f25545, #c62828);
  box-shadow: 0 12px 28px rgba(200, 48, 48, 0.28);
  animation: notifyPulse 2.2s ease-in-out infinite;
  transition: transform 0.28s var(--ease-spring);
}

.review-notify:active {
  transform: scale(0.97);
}

.review-notify[hidden] {
  display: none !important;
}

.review-notify-dot {
  position: absolute;
  top: -8px;
  right: -8px;
  min-width: 28px;
  height: 28px;
  padding: 0 7px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #ff3b30;
  border: 2px solid white;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 6px 14px rgba(255, 59, 48, 0.45);
}

.review-notify-title {
  display: block;
  font-size: 18px;
  font-weight: 700;
}

.review-notify-desc {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  opacity: 0.92;
  line-height: 1.4;
}

/* 工作通知：左下角（与右下角收款审核对称） */
.work-notify {
  position: fixed;
  left: 22px;
  bottom: 22px;
  z-index: 60;
  width: 168px;
  border: 0;
  border-radius: 16px;
  padding: 14px 14px 12px;
  text-align: left;
  cursor: pointer;
  color: white;
  background: linear-gradient(145deg, #2f7bff, var(--primary-dark));
  box-shadow: 0 12px 28px rgba(10, 89, 247, 0.32);
  animation: notifyPulse 2.2s ease-in-out infinite;
  transition: transform 0.28s var(--ease-spring);
}

.work-notify:active {
  transform: scale(0.97);
}

.work-notify[hidden] {
  display: none !important;
}

.work-notify-dot {
  position: absolute;
  top: -8px;
  right: -8px;
  min-width: 28px;
  height: 28px;
  padding: 0 7px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #ff9500;
  border: 2px solid white;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  box-shadow: 0 6px 14px rgba(255, 149, 0, 0.45);
}

.work-notify-title {
  display: block;
  font-size: 18px;
  font-weight: 700;
}

.work-notify-desc {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  opacity: 0.92;
  line-height: 1.4;
}

@keyframes notifyPulse {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

/* —— 平板 / 窄屏 —— */
@media (max-width: 900px) {
  .app {
    width: min(100%, calc(100% - 20px));
    padding: 18px 0 calc(36px + env(safe-area-inset-bottom, 0px));
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .header {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .header-actions {
    justify-content: flex-start;
  }

  .brand h1 {
    font-size: 18px;
  }

  .header {
    padding: 12px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .modal-card--inbound .form-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }

  .tabs {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .tabs::-webkit-scrollbar {
    display: none;
  }

  .tab {
    flex: none;
    white-space: nowrap;
  }

  .table-wrap {
    min-height: 280px;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
  }

  .table-wrap--auto {
    min-height: 0;
  }

  .modal-card {
    width: min(860px, calc(100vw - 16px));
    border-radius: 18px;
  }

  .modal-head,
  .modal-foot,
  .modal-body {
    padding-left: 18px;
    padding-right: 18px;
  }

  .modal-body {
    max-height: min(70dvh, 640px);
  }
}

/* —— 手机 H5 / APP —— */
@media (max-width: 640px) {
  .app {
    width: 100%;
    padding: 12px 12px calc(28px + env(safe-area-inset-bottom, 0px));
  }

  .brand {
    gap: 10px;
  }

  .brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    font-size: 20px;
  }

  .brand h1 {
    font-size: 18px;
    line-height: 1.3;
  }

  .brand p {
    font-size: 12px;
  }

  .header-actions {
    gap: 8px;
  }

  .header-actions .btn {
    flex: 1 1 calc(50% - 8px);
    min-height: 44px;
    padding: 10px 12px;
    font-size: 14px;
  }

  .tabs {
    margin-bottom: 14px;
    padding: 4px;
    border-radius: 12px;
  }

  .tab {
    padding: 10px 14px;
    font-size: 14px;
    min-height: 42px;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 14px;
  }

  .stat-card {
    padding: 12px 12px;
    border-radius: 14px;
  }

  .stat-card .label {
    font-size: 12px;
  }

  .stat-card .value {
    font-size: 20px;
    margin-top: 6px;
  }

  .stat-card--pending .value {
    font-size: 24px;
  }

  .stat-card--profit .value {
    font-size: 16px;
  }

  .pay-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .pay-card {
    padding: 12px;
    border-radius: 12px;
  }

  .pay-card .value {
    font-size: 15px;
  }

  .pay-io-row {
    font-size: 12px;
  }

  .toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 10px;
  }

  .search-box {
    min-width: 0;
    width: 100%;
  }

  .search-box input {
    min-height: 44px;
    font-size: 16px; /* 避免 iOS 自动放大 */
    border-radius: 12px;
  }

  .filters {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 6px;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .filters::-webkit-scrollbar {
    display: none;
  }

  .chip {
    flex: none;
    min-height: 36px;
    padding: 8px 12px;
    font-size: 13px;
  }

  .toolbar-time {
    margin-top: 0;
  }

  .table {
    --row-font: 14px;
  }

  .table th,
  .table td {
    padding: 10px 8px;
  }

  .table th {
    font-size: 12px;
  }

  .actions {
    gap: 6px;
  }

  .actions .btn {
    min-height: 36px;
    padding: 8px 10px;
    font-size: 13px;
  }

  .empty {
    padding: 48px 16px;
  }

  .auth-screen {
    min-height: 100dvh;
    align-items: flex-start;
    padding: calc(20px + env(safe-area-inset-top, 0px)) 14px calc(24px + env(safe-area-inset-bottom, 0px));
  }

  .auth-card {
    width: 100%;
    padding: 22px 16px;
    border-radius: 18px;
  }

  .auth-brand h1 {
    font-size: 20px;
  }

  .auth-form input,
  .code-row .btn,
  .btn-block {
    min-height: 46px;
    font-size: 16px;
  }

  .code-row {
    flex-wrap: wrap;
  }

  .code-row .btn {
    flex: 1 1 auto;
  }

  .modal {
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
  }

  .modal-card,
  .scan-card {
    width: 100%;
    max-width: 100%;
    min-height: 100%;
    height: 100%;
    border-radius: 0;
    display: flex;
    flex-direction: column;
  }

  .modal-head {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: calc(14px + env(safe-area-inset-top, 0px)) 16px 14px;
  }

  .modal-head h2 {
    font-size: 18px;
  }

  .modal-body {
    flex: 1;
    padding: 16px;
    max-height: none;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  .modal-foot {
    position: sticky;
    bottom: 0;
    z-index: 2;
    flex-wrap: wrap;
    justify-content: stretch;
    gap: 8px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  }

  .modal-foot .btn {
    flex: 1 1 calc(50% - 8px);
    min-height: 44px;
  }

  .imei-row {
    flex-direction: column;
  }

  .imei-row .btn {
    width: 100%;
  }

  .pay-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .toast {
    left: 12px;
    right: 12px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    transform: none;
    width: auto;
    text-align: center;
    border-radius: 14px;
    font-size: 14px;
  }

  .review-notify {
    right: 12px;
    left: auto;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    width: min(168px, calc(100vw - 24px));
    padding: 14px 12px;
  }

  .review-notify-title {
    font-size: 16px;
  }

  .work-notify {
    left: 12px;
    right: auto;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    width: min(168px, calc(100vw - 24px));
    padding: 14px 12px;
  }

  .work-notify-title {
    font-size: 16px;
  }
}

/* 超小屏 */
@media (max-width: 380px) {
  .stats,
  .pay-summary {
    grid-template-columns: 1fr 1fr;
  }

  .stat-card--profit .value {
    font-size: 15px;
  }

  .header-actions .btn {
    flex: 1 1 100%;
  }
}

/* 开启系统弹窗提醒条 */
.push-permission-bar {
  position: fixed;
  left: 12px;
  right: 12px;
  top: calc(12px + env(safe-area-inset-top, 0px));
  z-index: 75;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--primary);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(16, 36, 72, 0.14);
}

.push-permission-bar[hidden] {
  display: none !important;
}

.push-permission-tip {
  margin: 0;
  flex: 1 1 200px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink);
  font-weight: 500;
}

.push-permission-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.push-permission-actions .btn {
  min-height: 40px;
}

/* 以 APP 全屏打开时，顶栏避开刘海 */
@media (display-mode: standalone), (display-mode: fullscreen) {
  .app {
    padding-top: calc(12px + env(safe-area-inset-top, 0px));
  }

  .header {
    padding-top: calc(12px + env(safe-area-inset-top, 0px));
  }
}

/* —— 手机 H5 加强：看板、门店、入库、表格 —— */
@media (max-width: 640px) {
  .store-switcher {
    width: 100%;
    justify-content: space-between;
  }

  .store-switcher select {
    flex: 1;
    min-width: 0;
    max-width: none;
    min-height: 40px;
    font-size: 16px;
  }

  .user-pill {
    width: 100%;
    justify-content: center;
  }

  .dashboard-hero {
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
  }

  .dashboard-total {
    width: 100%;
  }

  .dashboard-total-card {
    flex: 1 1 calc(50% - 10px);
    min-width: 0;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .date-range {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 8px;
  }

  .date-range label {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .date-range input[type="date"] {
    width: 100%;
    min-height: 44px;
    font-size: 16px;
  }

  .modal-card--inbound,
  .modal-card--wide {
    width: 100%;
  }

  .modal-card--inbound .form-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .modal-card--inbound .inbound-form-body,
  .modal-card--inbound .modal-body {
    max-height: none;
  }

  .inbound-top-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .inbound-batch-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .inbound-batch-bar .btn {
    width: 100%;
  }

  .form-grid input,
  .form-grid select,
  .form-grid textarea {
    font-size: 16px;
  }

  .table-wrap {
    margin-left: -4px;
    margin-right: -4px;
    border-radius: 10px;
  }

  .table {
    min-width: 720px;
  }

  .work-notify,
  .review-notify {
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  }
}

/* —— 华为风丝滑补强 —— */
.panel {
  animation: hwPanelIn 0.34s var(--ease);
}

@keyframes hwPanelIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stat-card:active,
.pay-card:active,
.dash-store-card:active {
  transform: scale(0.985);
}

.dash-store-card:hover {
  border-color: var(--primary);
  box-shadow: 0 12px 28px rgba(10, 89, 247, 0.12);
}

.form-grid input:focus,
.form-grid textarea:focus,
.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(10, 89, 247, 0.14);
  outline: none;
  transition: border-color 0.22s var(--ease), box-shadow 0.22s var(--ease);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* —— PWA 提示条 / 本地数据说明（不改业务逻辑） —— */
.auth-local-tip {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--warn-soft, #fff6e8);
  border: 1px solid #f0d7a8;
  color: #7a4e12;
  font-size: 13px;
  line-height: 1.45;
}

.auth-local-tip a {
  color: var(--primary, #0a59f7);
  font-weight: 600;
}

.pwa-banner {
  position: fixed;
  left: 12px;
  right: 12px;
  z-index: 80;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 32px rgba(10, 40, 100, 0.14);
  backdrop-filter: blur(10px);
}

.pwa-banner[hidden] {
  display: none !important;
}

.pwa-banner p {
  margin: 0;
  flex: 1 1 180px;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 500;
}

.pwa-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pwa-banner--tip {
  top: calc(12px + env(safe-area-inset-top, 0px));
  border-left: 4px solid var(--warn, #c27a0e);
}

.pwa-banner--install {
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  border-left: 4px solid var(--primary, #0a59f7);
}

.pwa-banner--update {
  bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  border-left: 4px solid var(--ok, #00a870);
}

@media (max-width: 640px) {
  .pwa-banner {
    padding: 12px;
  }

  .pwa-banner-actions .btn {
    min-height: 40px;
  }

  /* 有安装条时，避免挡住通知球 */
  body:has(#pwaInstallBar:not([hidden])) .work-notify,
  body:has(#pwaInstallBar:not([hidden])) .review-notify {
    bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  }
}

/* 弹窗安全区：强化刘海/底部 Home 条 */
@media (max-width: 640px) {
  .modal-head {
    padding-top: calc(14px + env(safe-area-inset-top, 0px));
  }

  .modal-foot {
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }

  .form-grid input,
  .form-grid select,
  .form-grid textarea,
  .auth-form input,
  .search-box input {
    font-size: 16px;
  }
}

/* ========== 8N NEO 工作台视觉 ========== */
.neo-auth {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0;
  background: var(--bg);
}
.neo-auth-hero {
  background: var(--neo-hero);
  color: #fff;
  padding: 48px 24px 56px;
  position: relative;
  overflow: hidden;
}
.neo-auth-hero::after {
  content: "";
  position: absolute;
  inset: auto -20% -40% 20%;
  height: 180px;
  background: radial-gradient(circle, rgba(255,255,255,.18), transparent 70%);
  pointer-events: none;
}
.neo-auth-hero-inner {
  width: min(420px, 100%);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.neo-auth-mark {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(255,255,255,.2);
  border: 1px solid rgba(255,255,255,.35);
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 14px;
}
.neo-auth-mark.brand-mark--logo {
  background: transparent;
  border: none;
  padding: 0;
  overflow: hidden;
}
.neo-auth-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.neo-auth-sub {
  margin-top: 8px;
  font-size: 14px;
  opacity: 0.88;
}
.neo-auth-card {
  width: min(420px, calc(100% - 32px));
  margin: -28px auto 32px;
  z-index: 2;
}
.neo-auth .auth-brand .brand-mark { display: none; }
.neo-auth .auth-brand h1 { font-size: 20px; }
.neo-auth .auth-local-tip {
  background: #fff7e8;
  border: 1px solid #ffd8a8;
  color: #7a4b00;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.45;
  margin: 0 0 14px;
}

.neo-app {
  padding-bottom: calc(var(--neo-bottom-h) + 28px + env(safe-area-inset-bottom, 0px));
}
.neo-topbar {
  margin-bottom: 12px;
  padding: 10px 12px;
  background: var(--neo-hero);
  border: none;
  color: #fff;
  box-shadow: none;
}
.neo-topbar .brand h1,
.neo-topbar .brand p,
.neo-top-brand h1,
.neo-top-brand p {
  color: #fff;
}
.neo-top-brand p {
  opacity: 0.85;
  font-size: 12px;
}
.neo-topbar .brand-mark {
  background: rgba(255,255,255,.2);
  border: 1px solid rgba(255,255,255,.35);
  color: #fff;
  font-size: 13px;
  width: 40px;
  height: 40px;
}
.neo-topbar .user-pill {
  background: rgba(255,255,255,.16);
  border-color: rgba(255,255,255,.28);
  color: #fff;
}
.neo-top-actions {
  flex-wrap: wrap;
  gap: 6px;
}
.neo-topbar .btn-ghost {
  color: #fff;
  border-color: rgba(255,255,255,.35);
  background: transparent;
}
.neo-topbar .btn-primary {
  background: #fff;
  color: var(--primary);
  border-color: #fff;
}
.neo-topbar .store-switcher-label { color: rgba(255,255,255,.85); }
.neo-topbar .store-switcher select {
  background: rgba(255,255,255,.95);
  border-radius: 8px;
}

.panel-home {
  display: grid;
  gap: 14px;
}
.neo-kpi {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.neo-kpi-card {
  background: var(--surface);
  border-radius: 14px;
  padding: 14px 12px 12px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  min-height: 92px;
  position: relative;
  overflow: hidden;
}
.neo-kpi-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--primary);
}
.neo-kpi-card--sales::before { background: #0a59f7; }
.neo-kpi-card--profit::before { background: #00a870; }
.neo-kpi-label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}
.neo-kpi-value {
  font-size: clamp(18px, 4.5vw, 26px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.15;
  word-break: break-all;
}
.neo-kpi-unit {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}
.neo-kpi-note {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.neo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 10px;
  box-shadow: var(--shadow-sm);
}
.neo-grid-item {
  appearance: none;
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 10px 4px;
  cursor: pointer;
  font: inherit;
  color: var(--ink);
  position: relative;
  border-radius: 12px;
  transition: background 0.18s var(--ease), transform 0.18s var(--ease);
}
.neo-grid-item:active {
  transform: scale(0.96);
  background: var(--primary-soft);
}
.neo-grid-ico {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}
.neo-ico-inv { background: linear-gradient(145deg, #3b82f6, #1d4ed8); }
.neo-ico-in { background: linear-gradient(145deg, #22c55e, #15803d); }
.neo-ico-rev { background: linear-gradient(145deg, #f59e0b, #d97706); }
.neo-ico-fin { background: linear-gradient(145deg, #8b5cf6, #6d28d9); }
.neo-ico-note { background: linear-gradient(145deg, #06b6d4, #0891b2); }
.neo-ico-dash { background: linear-gradient(145deg, #0ea5e9, #0369a1); }
.neo-ico-work { background: linear-gradient(145deg, #64748b, #334155); }
.neo-ico-org { background: linear-gradient(145deg, #ef4444, #b91c1c); }
.neo-ico-move { background: linear-gradient(145deg, #a855f7, #7e22ce); }
.neo-grid-label {
  font-size: 12px;
  font-weight: 500;
  text-align: center;
  line-height: 1.25;
}
.neo-grid-badge {
  position: absolute;
  top: 4px;
  right: calc(50% - 28px);
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
  line-height: 1;
}
.neo-grid-badge[hidden] { display: none !important; }

.neo-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  min-height: var(--neo-bottom-h);
  padding: 4px 2px calc(4px + env(safe-area-inset-bottom, 0px));
  background: #fff;
  border-top: 1px solid #eef0f3;
  box-shadow: none;
}
.neo-bottom-item {
  flex: 1;
  max-width: 88px;
  appearance: none;
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  font: inherit;
  font-size: 10px;
  color: #9aa1a9;
  cursor: pointer;
  padding: 4px;
  border-radius: 10px;
  text-decoration: none;
}
.neo-bottom-item.is-active {
  color: var(--primary);
  font-weight: 600;
}
.neo-bottom-item.is-active .neo-bottom-ico svg {
  /* 激活时实心感：略放大 */
  transform: scale(1.05);
}
.neo-bottom-ico {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  line-height: 1;
  color: inherit;
}
.neo-bottom-ico svg {
  display: block;
}
.neo-bottom-nav[hidden],
body:not(.neo-logged-in) .neo-bottom-nav {
  display: none !important;
}

.neo-subtabs {
  margin-bottom: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* 管理后台同系 */
.neo-admin-app .neo-topbar { margin-bottom: 14px; }
.neo-admin-modules {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 10px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.neo-admin-modules .neo-grid-item {
  text-decoration: none;
  flex-direction: column !important;
  align-items: center !important;
  min-width: 0;
}
.neo-admin-modules .neo-grid-label {
  display: block;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .neo-subtabs { display: none; }
  .neo-kpi { gap: 8px; }
  .neo-kpi-card { padding: 12px 10px; min-height: 86px; }
  .neo-grid { grid-template-columns: repeat(4, 1fr); }
  .neo-admin-modules { grid-template-columns: repeat(4, 1fr); }
  .neo-top-actions .btn-small { padding: 6px 8px; min-height: 34px; font-size: 12px; }
}

/* 平板～小桌面 */
@media (min-width: 721px) and (max-width: 1099px) {
  .neo-bottom-nav { display: none !important; }
  .neo-app { padding-bottom: 40px; width: min(1100px, calc(100% - 40px)); }
  .neo-kpi { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .neo-kpi-card { min-height: 108px; padding: 18px 16px; }
  .neo-kpi-value { font-size: 28px; }
  .neo-grid {
    grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
    gap: 12px 8px;
    padding: 18px 14px;
  }
  .neo-grid-item { padding: 14px 8px; }
  .neo-grid-ico { width: 48px; height: 48px; border-radius: 15px; font-size: 16px; }
  .neo-grid-label { font-size: 13px; }
  .neo-subtabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 14px;
    padding: 10px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
  }
  .neo-subtabs .tab {
    border-radius: 999px;
    padding: 8px 14px;
  }
}

/* 电脑宽屏：左侧导航贴顶 + 右侧内容 */
@media (min-width: 1100px) {
  .neo-bottom-nav { display: none !important; }

  .neo-app {
    width: min(1360px, calc(100% - 56px));
    padding: 20px 0 48px;
    display: grid;
    grid-template-columns: 208px minmax(0, 1fr);
    grid-template-areas:
      "top top"
      "alert alert"
      "nav main";
    column-gap: 20px;
    row-gap: 14px;
    align-items: start;
  }

  .neo-topbar {
    grid-area: top;
    margin-bottom: 0;
    padding: 12px 18px;
    border-radius: 18px;
  }

  .neo-top-actions {
    justify-content: flex-end;
    max-width: 62%;
  }

  .approve-home-alert {
    grid-area: alert;
    margin: 0;
  }

  .neo-subtabs {
    grid-area: nav;
    position: sticky;
    top: 16px;
    align-self: start;
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    margin: 0;
    padding: 14px 10px;
    width: 100% !important;
    max-width: none;
    box-sizing: border-box;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    overflow: visible;
  }

  .neo-subtabs .tab {
    width: 100%;
    justify-content: flex-start;
    text-align: left;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 14px;
    white-space: nowrap;
    box-shadow: none;
  }

  .neo-subtabs .tab.active {
    background: var(--primary-soft) !important;
    color: var(--primary) !important;
    font-weight: 600;
    box-shadow: none !important;
  }

  .panel-home,
  .neo-app > .panel {
    grid-area: main;
    margin: 0;
    min-width: 0;
  }

  .panel-home {
    gap: 16px;
  }

  .neo-kpi {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }

  .neo-kpi-card {
    min-height: 118px;
    padding: 20px 18px 16px;
    border-radius: 16px;
  }

  .neo-kpi-label { font-size: 13px; margin-bottom: 10px; }
  .neo-kpi-value { font-size: 32px; }
  .neo-kpi-unit { font-size: 13px; }
  .neo-kpi-note { font-size: 13px; }

  /* 固定 5 列，图标铺满，减少右侧空档 */
  .neo-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    padding: 22px 18px;
    border-radius: 18px;
  }

  .neo-grid-item {
    padding: 18px 10px;
    border-radius: 14px;
  }

  .neo-grid-item:hover {
    background: var(--primary-soft);
  }

  .neo-grid-ico {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    font-size: 18px;
  }

  .neo-grid-label {
    font-size: 13px;
  }

  .neo-admin-app {
    width: min(1360px, calc(100% - 56px));
  }

  .neo-admin-modules {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    padding: 18px 14px;
  }
}

@media (max-width: 420px) {
  .neo-grid { grid-template-columns: repeat(3, 1fr); }
  .neo-admin-modules { grid-template-columns: repeat(3, 1fr); }
}

/* 换机申请弹窗（对齐九讯云提示风格） */
.device-bind-card {
  width: min(360px, calc(100vw - 32px));
}
.device-bind-input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 12px 16px;
  background: #f3f5f8;
  font: inherit;
  outline: none;
}
.device-bind-input:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(10, 89, 247, 0.12);
}
.device-bind-tip {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
}
.device-bind-foot {
  display: flex;
  gap: 10px;
  justify-content: stretch;
}
.device-bind-foot .btn {
  flex: 1;
  border-radius: 999px;
  justify-content: center;
}

/* ========== 手机 H5 / App 壳（九讯云式） ========== */
:root {
  --m-purple: #8b93f7;
  --m-bg: #f3f5f8;
}

body.neo-logged-in {
  background: var(--m-bg);
  margin: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}
html:has(body.neo-logged-in) {
  background: var(--m-bg);
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

/* 登录：手机全屏壳（对齐九讯云 NEO） */
.neo-auth--mobile.auth-screen {
  min-height: 100vh;
  min-height: 100dvh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: stretch;
  place-items: unset;
  padding: 0 !important;
  margin: 0;
  box-sizing: border-box;
  width: 100%;
  max-width: 100vw;
  overflow: hidden;
  background:
    radial-gradient(110% 70% at 50% -8%, #e4e8ff 0%, transparent 58%),
    linear-gradient(180deg, #fbfbff 0%, #eef1f8 42%, #f4f6fa 100%);
}
/* 关键：不得被上面的 display:flex 盖掉 hidden，否则登录页和首页会叠在一起上下滑 */
.neo-auth--mobile.auth-screen[hidden],
.auth-screen.neo-auth--mobile[hidden] {
  display: none !important;
}
.neo-auth--mobile .neo-auth-hero,
.neo-auth--mobile .auth-brand { display: none !important; }

.m-login-shell {
  width: 100%;
  max-width: none;
  margin: 0;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  padding:
    calc(40px + env(safe-area-inset-top, 0px))
    28px
    calc(16px + env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  overflow: hidden;
}

.m-login-hero {
  text-align: center;
  margin: 0 0 28px;
  flex: 0 0 auto;
}
.m-login-hero.is-compact {
  margin-bottom: 18px;
}
.m-login-hero.is-compact .m-login-logo {
  width: 58px;
  height: 58px;
  margin-bottom: 10px;
  border-radius: 16px;
}
.m-login-hero.is-compact .m-login-name {
  font-size: 18px;
}
.m-login-logo {
  width: 88px;
  height: 88px;
  margin: 0 auto 18px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background: transparent;
  border: none;
  box-shadow: none;
  overflow: visible;
  animation: m-logo-pop 0.7s var(--ease-spring) both;
}
.m-login-logo .m-logo-mark {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 22px;
}
.m-login-name {
  font-size: 26px;
  font-weight: 800;
  color: #1a1f2c;
  letter-spacing: 0.04em;
  animation: m-logo-fade 0.55s ease 0.12s both;
}
@keyframes m-logo-pop {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes m-logo-fade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.brand-mark--logo {
  padding: 0;
  overflow: hidden;
  background: transparent !important;
  box-shadow: none;
  border: none;
}
.brand-mark--logo svg {
  width: 100%;
  height: 100%;
  display: block;
}
.neo-topbar .brand-mark--logo {
  background: transparent !important;
  border: none !important;
  width: 40px;
  height: 40px;
  border-radius: 11px;
}
.m-login-hint {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.m-login-hint[hidden] { display: none !important; }

.neo-auth--mobile .m-login-card.auth-card,
.neo-auth--mobile .m-login-card.neo-auth-card,
.neo-auth--mobile .m-reg-card.auth-card {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  overflow: visible !important;
  animation: none !important;
  border-radius: 0 !important;
}
.neo-auth--mobile .m-login-card.auth-card::before,
.neo-auth--mobile .m-reg-card.auth-card::before {
  display: none !important;
  content: none !important;
}

.neo-auth--mobile .m-login-form {
  display: flex !important;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}
.neo-auth--mobile .m-login-form .m-field {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 12px !important;
  margin: 0 !important;
  padding: 0 18px !important;
  min-height: 50px;
  border: 1.5px solid #343a46 !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.78) !important;
  box-sizing: border-box;
  width: 100%;
}
.neo-auth--mobile .m-field-ico {
  flex: 0 0 auto !important;
  width: 22px !important;
  height: 22px !important;
  text-align: center;
  font-size: 13px !important;
  font-weight: 700;
  color: #5b6472 !important;
  line-height: 0;
  display: inline-grid !important;
  place-items: center;
}
.neo-auth--mobile .m-field-ico svg {
  width: 20px;
  height: 20px;
  display: block;
}
.neo-auth--mobile .m-login-form .m-field input {
  flex: 1 1 auto !important;
  width: auto !important;
  min-width: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 13px 0 !important;
  min-height: 46px !important;
  outline: none !important;
  font: inherit;
  font-size: 16px !important; /* 防止 iOS 自动放大 */
  color: #1a1f2c;
}
.neo-auth--mobile .m-login-form .m-field input::placeholder {
  color: #9aa3b2;
}
.neo-auth--mobile .m-eye {
  appearance: none !important;
  flex: 0 0 auto !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #8a93a3 !important;
  font: inherit !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  padding: 8px 2px !important;
  min-height: auto !important;
  width: 28px !important;
  height: 28px !important;
  border-radius: 0 !important;
  display: inline-grid !important;
  place-items: center;
  line-height: 0;
  cursor: pointer;
}
.neo-auth--mobile .m-eye svg {
  width: 20px;
  height: 20px;
  display: block;
}
.neo-auth--mobile .m-eye .m-eye-hide[hidden],
.neo-auth--mobile .m-eye .m-eye-show[hidden] {
  display: none !important;
}

.neo-auth--mobile .m-login-btn.btn {
  margin-top: 8px;
  width: 100%;
  border-radius: 999px !important;
  min-height: 50px !important;
  background: #9aa3f5 !important;
  border-color: #9aa3f5 !important;
  box-shadow: none !important;
  font-size: 17px;
  font-weight: 600;
  color: #fff !important;
  letter-spacing: 0.04em;
}
.neo-auth--mobile .m-forgot {
  appearance: none;
  display: block;
  margin: 16px 0 0;
  padding: 0;
  border: none;
  background: none;
  text-align: left;
  color: #6b7785;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
}
.neo-auth--mobile .m-back-login.m-forgot {
  margin-top: 14px;
  text-align: center;
  width: 100%;
  color: #5b6472;
  font-size: 14px;
  font-weight: 600;
}

.m-reg-title {
  font-size: 20px;
  font-weight: 700;
  color: #1a1f2c;
  margin: 0 0 4px;
  text-align: center;
}
.m-reg-sub {
  margin: 0 0 18px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}
.m-reg-form { gap: 12px !important; }

.neo-auth--mobile .m-login-foot {
  margin-top: auto;
  padding-top: 20px;
  width: 100%;
  text-align: center;
  flex: 0 0 auto;
}
/* 仅前台登录页锁滚动；管理后台不要套这条，否则会滚不动像卡住 */
body.m-on-login {
  overflow: hidden;
  height: 100%;
}
body.m-on-login #appMain,
body.m-on-login .neo-bottom-nav {
  display: none !important;
}
.neo-auth--mobile .m-login-brand {
  font-size: 13px;
  color: #8a93a3;
  margin-bottom: 12px;
  letter-spacing: 0.04em;
}
.neo-auth--mobile .m-agree {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  color: #8a93a3;
  text-align: left;
  line-height: 1.45;
  max-width: 320px;
  margin: 0 auto;
}
.neo-auth--mobile .m-agree input {
  margin-top: 2px;
  accent-color: #6b78f0;
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}
.neo-auth--mobile .m-agree span {
  color: #8a93a3;
}

.neo-auth--mobile #bindCard.auth-card {
  width: calc(100% - 0px);
  margin: 24px 0 0;
  padding: 20px 16px !important;
}

@media (max-width: 380px) {
  .m-login-shell {
    padding-left: 22px;
    padding-right: 22px;
  }
  .m-login-logo {
    width: 78px;
    height: 78px;
    border-radius: 20px;
  }
}

@media (min-width: 768px) {
  .neo-auth--mobile.auth-screen {
    align-items: stretch;
    justify-content: stretch;
    height: 100dvh;
    overflow: hidden;
  }
  .m-login-shell {
    width: 100%;
    max-width: none;
    height: 100%;
    min-height: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
  }
}

/* App 壳：手机全宽，不留左右空白边 */
.neo-app--mobile {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 12px calc(var(--neo-bottom-h) + 16px + env(safe-area-inset-bottom, 0px)) !important;
  display: block !important;
  background: var(--m-bg);
  box-sizing: border-box;
  min-height: 100dvh;
}
.m-topbar {
  margin: 0 -12px 10px !important;
  border-radius: 0 0 16px 16px !important;
  padding: 10px 12px !important;
  display: flex;
  align-items: center;
  gap: 8px;
}
.m-topbar[hidden] { display: none !important; }
/* 业务子页：精简顶栏（返回 + 标题 + 入库等） */
.m-topbar.is-biz .brand-mark { display: none; }
.m-topbar.is-biz .m-top-brand h1 { font-size: 17px; }
.m-topbar.is-biz .m-top-brand p { display: none; }
.m-topbar.is-biz .store-switcher { display: none !important; }
.m-back {
  appearance: none;
  border: none;
  background: rgba(255,255,255,.18);
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  flex: 0 0 auto;
}
.m-back[hidden] { display: none !important; }
.m-top-actions {
  margin-left: auto;
  max-width: 48%;
  justify-content: flex-end;
}
.m-top-actions .user-pill,
.m-top-actions #btnOpenAdmin,
.m-top-actions #btnRequestStoreTransfer,
.m-top-actions #btnLogout,
.m-top-actions #btnExport,
.m-top-actions #importBackupLabel {
  display: none !important;
}
body.m-shell-tab .approve-home-alert {
  margin-top: 4px;
}
.m-home {
  padding-top: 4px;
}

.m-home { gap: 10px !important; }
.m-search-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 0 4px;
}
.m-store-chip {
  appearance: none;
  border: none;
  background: transparent;
  border-radius: 0;
  padding: 8px 2px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  box-shadow: none;
  white-space: nowrap;
  max-width: 78px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.m-chip-caret {
  font-size: 10px;
  color: var(--muted);
  transform: translateY(1px);
}
.m-search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border-radius: 999px;
  padding: 0 12px;
  min-height: 36px;
  border: 1px solid #e8ebf0;
  box-shadow: none;
}
.m-search--block { margin: 0 0 10px; width: 100%; box-sizing: border-box; }
.m-search--menu {
  width: 100%;
  min-height: 40px;
  border-radius: 10px;
  background: #f3f5f8;
  border: none;
}
.m-search-ico { color: var(--muted); font-size: 14px; }
.m-search input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 14px;
  min-width: 0;
  padding: 8px 0;
}
.m-scan-btn {
  appearance: none;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  color: #4b5563;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}
.m-scan-btn[hidden] { display: none !important; }

.m-icon-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px 4px;
  background: #fff;
  border-radius: 12px;
  padding: 14px 8px 12px;
  box-shadow: 0 1px 4px rgba(15, 35, 80, 0.04);
}
.m-icon-item {
  position: relative;
  appearance: none;
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 4px;
  font: inherit;
  cursor: pointer;
}
.m-icon-item[hidden] { display: none !important; }
.m-icon-sq {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(20, 40, 90, 0.12);
}
.m-icon-sq svg {
  width: 24px;
  height: 24px;
  display: block;
  flex: 0 0 auto;
}
.m-c-blue { background: linear-gradient(160deg, #5b9bff 0%, #2b6de5 100%); }
.m-c-blue2 { background: linear-gradient(160deg, #6eb6ff 0%, #3a82f0 100%); }
.m-c-purple { background: linear-gradient(160deg, #b39afc 0%, #7c5cfc 100%); }
.m-c-orange { background: linear-gradient(160deg, #ffb14a 0%, #f17c1d 100%); }
.m-c-teal { background: linear-gradient(160deg, #3adcc4 0%, #0d9488 100%); }
.m-c-green { background: linear-gradient(160deg, #4ade80 0%, #059669 100%); }
.m-c-red { background: linear-gradient(160deg, #ff8a9a 0%, #e11d48 100%); }
.m-c-gray { background: linear-gradient(160deg, #a8b4c4 0%, #64748b 100%); }
.m-icon-txt {
  font-size: 13px;
  font-weight: 700;
  color: #1f2329;
  line-height: 1.25;
  text-align: center;
  letter-spacing: 0.01em;
}
.m-icon-badge {
  position: absolute;
  top: 0;
  right: 8px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.m-icon-badge[hidden] { display: none !important; }

.m-card {
  background: #fff;
  border-radius: 12px;
  padding: 12px 12px 8px;
  box-shadow: 0 1px 4px rgba(15, 35, 80, 0.04);
}
.m-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.m-card-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}
.m-card-head--todo {
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}
.m-todo-title {
  display: inline-flex;
  align-items: center;
  margin: 0 !important;
  padding: 5px 12px 5px 10px;
  border-radius: 6px 14px 14px 6px;
  background: linear-gradient(90deg, #ff9a3c 0%, #ffb36a 100%);
  color: #fff !important;
  font-size: 13px !important;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(255, 140, 40, 0.25);
}
.m-notice-head {
  color: var(--primary) !important;
}
.m-todo-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.m-todo-tab {
  appearance: none;
  border: none;
  background: transparent;
  border-radius: 0;
  padding: 4px 2px;
  font: inherit;
  font-size: 13px;
  color: #6b7280;
  cursor: pointer;
  position: relative;
}
.m-todo-tab.is-on {
  background: transparent;
  color: var(--primary);
  font-weight: 600;
}
.m-dot {
  display: inline-grid;
  place-items: center;
  min-width: 14px;
  height: 14px;
  margin-left: 3px;
  padding: 0 3px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  vertical-align: top;
}
.m-dot[hidden] { display: none !important; }
.m-todo-list,
.m-notice-list,
.m-msg-list,
.m-contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.m-todo-item,
.m-notice-item {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 8px;
  padding: 11px 2px;
  border-top: 1px solid #f0f2f5;
  font-size: 13px;
  line-height: 1.45;
  color: #374151;
  cursor: pointer;
}
.m-todo-item:first-child,
.m-notice-item:first-child { border-top: none; }
.m-todo-tag {
  flex: 0 0 auto;
  color: #059669;
  background: #e8f8f1;
  font-weight: 600;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 4px;
  line-height: 1.5;
}
.m-todo-empty,
.m-muted {
  padding: 16px 4px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.m-card-more {
  appearance: none;
  border: none;
  width: 100%;
  background: #f5f7fa;
  color: #6b7280;
  font: inherit;
  font-size: 13px;
  padding: 10px;
  cursor: pointer;
  border-radius: 8px;
  margin-top: 4px;
}
.m-notice-item {
  justify-content: space-between;
}
.m-notice-title { font-weight: 600; font-size: 13px; color: var(--ink); }
.m-notice-date { font-size: 12px; color: var(--muted); margin-top: 2px; }
.m-tag {
  flex: 0 0 auto;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  background: #fee2e2;
  color: #dc2626;
}
.m-tag-off { background: #e0eaff; color: #2563eb; }
.m-perf-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  text-align: center;
  padding: 6px 0 4px;
}
.m-perf-label { font-size: 12px; color: var(--muted); }
.m-perf-val { font-size: 18px; font-weight: 700; margin-top: 4px; }
.m-perf-note { margin: 8px 0 4px; font-size: 12px; color: var(--muted); text-align: center; }
.m-link {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--primary);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.m-page-title {
  font-size: 17px;
  font-weight: 700;
  text-align: center;
  padding: 8px 0 14px;
  color: var(--ink);
}
.m-msg-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 12px;
  border-bottom: 1px solid #f0f2f5;
  background: #fff;
  cursor: pointer;
}
.m-msg-item:first-child {
  border-radius: 12px 12px 0 0;
}
.m-msg-item:last-child {
  border-bottom: none;
  border-radius: 0 0 12px 12px;
}
.m-msg-list {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(15, 35, 80, 0.04);
}
.m-msg-body { flex: 1; min-width: 0; }
.m-msg-title { font-weight: 600; font-size: 15px; color: var(--ink); }
.m-msg-desc {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.m-msg-time { font-size: 12px; color: var(--muted); flex: 0 0 auto; align-self: flex-start; padding-top: 2px; }
.m-msg-ico-wrap { position: relative; flex: 0 0 auto; }
.m-msg-ico-wrap .m-icon-sq {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 15px;
}
.m-msg-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.m-menu-panel { padding: 0 !important; }
.m-menu-search { padding: 8px 0 10px; }
.m-menu-body {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 0;
  min-height: 62vh;
  background: #fff;
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
  border-top: 1px solid #eef0f3;
}
.m-menu-cats {
  background: #f3f5f8;
  padding: 4px 0;
  overflow-y: auto;
  max-height: calc(100dvh - 150px);
}
.m-menu-cat {
  appearance: none;
  border: none;
  width: 100%;
  background: transparent;
  text-align: left;
  padding: 14px 10px;
  font: inherit;
  font-size: 13px;
  color: #6b7280;
  cursor: pointer;
  border-left: 3px solid transparent;
}
.m-menu-cat.is-on {
  background: #fff;
  color: var(--primary);
  font-weight: 600;
  border-left-color: var(--primary);
}
.m-menu-apps {
  padding: 14px 10px 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px 6px;
  align-content: start;
  max-height: calc(100dvh - 150px);
  overflow-y: auto;
}
.m-menu-sec {
  grid-column: 1 / -1;
  margin: 4px 0 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}
.m-menu-sec:first-child { margin-top: 0; }

.m-contacts-org {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}
.m-contacts-filters {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 0 12px;
  margin: 0 0 2px;
}
.m-contacts-chip {
  appearance: none;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #5b6472;
  border-radius: 999px;
  padding: 6px 12px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  flex: 0 0 auto;
}
.m-contacts-chip.is-on {
  background: #e8f0fe;
  border-color: #2b6de5;
  color: #1a56c8;
}
.m-contact-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 2px 6px;
  margin-top: 4px;
  border-top: none;
  list-style: none;
}
.m-contact-group--chat span {
  color: #12b76a;
}
.m-contact-group span {
  font-size: 13px;
  font-weight: 700;
  color: #1f2329;
}
.m-contact-group small {
  font-size: 12px;
  color: #8a9199;
  font-weight: 600;
}
.m-contact-avatar-dot {
  position: absolute;
  top: -1px;
  right: -1px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ef4444;
  border: 2px solid #fff;
  box-sizing: border-box;
}
.m-contact-unread {
  margin-left: 4px;
  min-width: 16px;
  height: 16px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}
.m-contact-last {
  margin-top: 4px;
  font-size: 12px;
  color: #8a9199;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.m-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 2px;
  border-top: 1px solid #f0f2f5;
}
.m-contact-item:first-child { border-top: none; }
.m-contact-avatar {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #dbeafe;
  color: #1d4ed8;
  display: grid;
  place-items: center;
  font-weight: 700;
  flex: 0 0 auto;
  margin-top: 2px;
  appearance: none;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
  overflow: hidden;
}
.m-contact-avatar.has-photo {
  background: #e2e8f0;
  color: transparent;
}
.m-contact-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}
.m-contact-main.m-contact-open-profile {
  cursor: pointer;
}
.m-contact-main { flex: 1; min-width: 0; }
.m-contact-name {
  font-weight: 700;
  font-size: 15px;
  color: #1f2329;
  display: flex;
  align-items: center;
  gap: 6px;
}
.m-contact-me {
  font-size: 11px;
  font-weight: 700;
  color: #1a56c8;
  background: #e8f0fe;
  border-radius: 999px;
  padding: 1px 7px;
}
.m-contact-meta {
  margin-top: 6px;
  display: grid;
  gap: 3px;
  font-size: 12px;
  color: #5b6472;
  line-height: 1.35;
}
.m-contact-meta em {
  font-style: normal;
  color: #8a9199;
  margin-right: 6px;
  font-weight: 600;
}
.m-contact-tags { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 4px; }
.m-pill {
  font-size: 11px;
  padding: 1px 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: #4338ca;
}
.m-contact-desc {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.m-contact-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.m-round-btn {
  appearance: none;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e8f0fe;
  color: var(--primary);
  font: inherit;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  text-decoration: none;
  flex: 0 0 auto;
  padding: 0;
  line-height: 0;
}
.m-round-btn svg {
  display: block;
}
.m-round-btn--im {
  background: #e8f8ef;
  color: #12b76a;
  position: relative;
}
.m-round-btn--tel {
  background: #e8f0fe;
  color: #2b6de5;
}
.m-im-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  box-sizing: border-box;
}
.m-im-dot[hidden] { display: none !important; }
/* 兼容旧类名 */
.m-round-btn--wechat {
  background: #e8f8ef;
  color: #12b76a;
}

/* —— 我的信息 / 他人资料 —— */
.m-mine-profile-entry {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  appearance: none;
  border: none;
  cursor: pointer;
  padding: 14px 14px !important;
  margin-bottom: 12px;
  font: inherit;
}
.m-mine-profile-ico {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(160deg, #6eb6ff, #2b6de5);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  flex: 0 0 auto;
}
.m-mine-profile-txt {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.m-mine-profile-txt strong {
  font-size: 15px;
  font-weight: 700;
  color: #1f2329;
}
.m-mine-profile-txt small {
  font-size: 12px;
  color: #8a9199;
}
.m-mine-profile-arrow {
  color: #c0c6d0;
  font-size: 22px;
  line-height: 1;
}
.m-profile-sheet {
  position: fixed;
  inset: 0;
  z-index: 82;
  display: flex;
  flex-direction: column;
  background: #f3f5f8;
}
.m-profile-sheet[hidden] { display: none !important; }
.m-profile-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 12px 10px;
  background: #fff;
  border-bottom: 1px solid #e8ecf1;
}
.m-profile-head-title {
  flex: 1;
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  color: #1f2329;
}
.m-profile-head-act {
  appearance: none;
  border: none;
  background: transparent;
  color: #2b6de5;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  min-width: 40px;
}
.m-profile-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 0 calc(16px + env(safe-area-inset-bottom, 0px));
}
.m-profile-hero {
  background: linear-gradient(180deg, #dbeafe 0%, #f3f5f8 100%);
  padding: 18px 16px 14px;
}
.m-profile-hero-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.m-profile-av {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(160deg, #93c5fd, #2563eb);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 700;
  flex: 0 0 auto;
}
.m-profile-hero-main { flex: 1; min-width: 0; }
.m-profile-name {
  font-size: 20px;
  font-weight: 800;
  color: #1f2329;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.m-profile-eno {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  background: rgba(255,255,255,.7);
  border-radius: 999px;
  padding: 2px 8px;
}
.m-profile-sign {
  margin-top: 8px;
  font-size: 13px;
  color: #64748b;
}
.m-profile-card {
  margin: 10px 12px 0;
  background: #fff;
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 1px 2px rgba(20,40,80,.04);
}
.m-profile-card-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 15px;
  font-weight: 700;
  color: #1f2329;
}
.m-profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 10px;
}
.m-profile-kv {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 13px;
}
.m-profile-kv em {
  font-style: normal;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 600;
}
.m-profile-kv b {
  font-weight: 600;
  color: #1f2329;
  word-break: break-all;
}
.m-profile-kv b.is-link { color: #2563eb; }
.m-profile-block {
  margin-top: 8px;
  font-size: 13px;
  color: #475569;
  line-height: 1.55;
  white-space: pre-wrap;
}
.m-profile-block-ico {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: #ede9fe;
  color: #6d28d9;
  font-size: 11px;
  font-weight: 700;
  margin-right: 6px;
  vertical-align: middle;
}
.m-profile-muted { color: #94a3b8; }
.m-profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.m-profile-tag {
  background: #e8f0fe;
  color: #1d4ed8;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
}
.m-profile-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}
.m-profile-field span {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
}
.m-profile-field input,
.m-profile-field textarea {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
  background: #f8fafc;
}
.m-profile-field textarea { min-height: 72px; resize: vertical; }
.m-profile-field.is-sys input {
  color: #334155;
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
  cursor: default;
}
.m-profile-sys-hint {
  margin: 2px 0 10px;
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.4;
}
.m-profile-row-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-top: 1px solid #f1f5f9;
  font-size: 14px;
  color: #1f2329;
}
.m-profile-row-link:first-of-type { border-top: none; padding-top: 0; }
.m-profile-row-link small { color: #94a3b8; }
.m-profile-views {
  text-align: center;
  font-size: 12px;
  color: #94a3b8;
  padding: 14px 12px 8px;
}
.m-profile-foot {
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  gap: 4px;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px));
  background: #fff;
  border-top: 1px solid #e8ecf1;
}
.m-profile-foot[hidden] { display: none !important; }
.m-profile-act {
  flex: 1;
  appearance: none;
  border: none;
  background: transparent;
  color: #2b6de5;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font: inherit;
  cursor: pointer;
  padding: 6px;
}
.m-profile-act span { font-size: 20px; line-height: 1; }
.m-profile-act small { font-size: 11px; font-weight: 600; }

/* —— 站内聊天窗 —— */
.m-chat-sheet {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  background: #eef1f6;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.m-chat-sheet[hidden] { display: none !important; }
.m-chat-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 12px 10px;
  background: #fff;
  border-bottom: 1px solid #e8ecf1;
}
.m-chat-back {
  appearance: none;
  border: none;
  background: #f1f4f8;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 26px;
  line-height: 1;
  color: #1f2329;
  cursor: pointer;
  flex: 0 0 auto;
}
.m-chat-peer-av {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(160deg, #6eb6ff 0%, #2b6de5 100%);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 700;
  flex: 0 0 auto;
  overflow: hidden;
}
.m-chat-peer-av.has-photo {
  background: #e2e8f0;
  padding: 0;
}
.m-chat-peer-av.has-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.m-chat-title-wrap { min-width: 0; flex: 1 1 auto; }
.m-chat-title {
  font-size: 17px;
  font-weight: 700;
  color: #1f2329;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.m-chat-sub {
  font-size: 12px;
  color: #8a9199;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.m-chat-list {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 14px 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.m-chat-bubble {
  max-width: 78%;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 15px;
  line-height: 1.45;
  word-break: break-word;
  box-shadow: 0 1px 2px rgba(20, 40, 80, 0.06);
}
.m-chat-bubble.is-me {
  align-self: flex-end;
  background: #2b6de5;
  color: #fff;
  border-bottom-right-radius: 4px;
}
.m-chat-bubble.is-peer {
  align-self: flex-start;
  background: #fff;
  color: #1f2329;
  border-bottom-left-radius: 4px;
}
.m-chat-bubble img {
  display: block;
  max-width: 100%;
  border-radius: 10px;
}
.m-chat-bubble audio {
  width: min(220px, 100%);
  display: block;
}
.m-chat-bubble .m-chat-emoji-only {
  font-size: 28px;
  line-height: 1.2;
}
.m-chat-meta {
  font-size: 11px;
  opacity: 0.7;
  margin-top: 4px;
}
.m-chat-emoji {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 10px;
  background: #fff;
  border-top: 1px solid #e8ecf1;
  max-height: 140px;
  overflow-y: auto;
}
.m-chat-emoji[hidden] { display: none !important; }
.m-chat-emoji button {
  appearance: none;
  border: none;
  background: #f5f7fa;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
}
.m-chat-composer {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
  background: #fff;
  border-top: 1px solid #e8ecf1;
}
.m-chat-tool {
  appearance: none;
  border: none;
  background: #f1f4f8;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: #5b6472;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  font-size: 18px;
  padding: 0;
}
.m-chat-tool.is-rec {
  background: #fee2e2;
  color: #e11d48;
}
.m-chat-composer textarea {
  flex: 1 1 auto;
  min-width: 0;
  resize: none;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 8px 10px;
  font: inherit;
  font-size: 15px;
  max-height: 96px;
  min-height: 36px;
  background: #f8fafc;
}
.m-chat-send {
  appearance: none;
  border: none;
  background: #2b6de5;
  color: #fff;
  border-radius: 12px;
  padding: 0 14px;
  min-height: 36px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  flex: 0 0 auto;
}
.m-chat-voice-tip {
  position: absolute;
  left: 50%;
  bottom: 88px;
  transform: translateX(-50%);
  background: rgba(20, 24, 36, 0.88);
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  pointer-events: none;
}
.m-chat-voice-tip[hidden] { display: none !important; }
.m-chat-empty {
  text-align: center;
  color: #8a9199;
  font-size: 13px;
  padding: 40px 12px;
}

.m-mine {
  background: linear-gradient(180deg, #e8f1ff 0%, var(--bg) 120px);
  margin: 0 -12px;
  padding: 0 12px 8px !important;
}
.m-mine-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 4px 16px;
  margin: 0 0 12px;
  background: transparent;
  border-radius: 0;
}
.m-avatar {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #cfe0ff;
  color: #2b6de5;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 700;
  box-shadow: none;
  overflow: hidden;
  flex: 0 0 auto;
}
.m-avatar--btn {
  appearance: none;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
}
.m-avatar-letter { line-height: 1; }
.m-avatar-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.m-avatar.has-photo {
  background: #e2e8f0;
  color: transparent;
}
.m-avatar-cam {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #1f2937;
  color: #fff;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
  z-index: 1;
}
.m-profile-av.has-photo {
  padding: 0;
  overflow: hidden;
  background: #e2e8f0;
}
.m-profile-av.has-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.m-mine-name { font-size: 18px; font-weight: 700; color: var(--ink); }
.m-mine-meta { margin-top: 4px; font-size: 13px; color: #64748b; }
.m-mine-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px 8px;
  margin-bottom: 12px;
  padding: 16px 8px 12px;
}
.m-mine-item {
  appearance: none;
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  padding: 4px;
}
.m-set-item span:not(.m-icon-sq) {
  font-weight: 700;
  font-size: 13px;
}
.m-mine-item[hidden] { display: none !important; }
.m-settings-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding-bottom: 8px;
}
.m-set-item {
  appearance: none;
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font: inherit;
  font-size: 12px;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  padding: 8px 4px;
}
.m-set-item small {
  color: var(--muted);
  font-size: 11px;
}
.m-support-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding: 14px 14px;
  text-decoration: none;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}
.m-support-art {
  color: var(--primary);
  font-size: 18px;
  font-weight: 400;
}
.m-link--accent { color: #f97316; font-weight: 700; }
.m-perf-card .m-perf-val { color: #f97316; }

.neo-bottom-item { position: relative; }
.neo-bottom-badge {
  position: absolute;
  top: 2px;
  right: 18%;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.neo-bottom-badge[hidden] { display: none !important; }

/* 覆盖：宽屏也保留底部导航，App 全宽铺满 */
@media (min-width: 721px) {
  .neo-bottom-nav { display: flex !important; }
  .neo-subtabs { display: none !important; }
  .neo-app--mobile {
    width: 100% !important;
    max-width: none !important;
    padding-bottom: calc(var(--neo-bottom-h) + 16px + env(safe-area-inset-bottom, 0px)) !important;
  }
}
@media (min-width: 1100px) {
  .neo-bottom-nav { display: flex !important; }
  .neo-app--mobile {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    grid-template-columns: none !important;
    grid-template-areas: none !important;
    column-gap: 0 !important;
    row-gap: 0 !important;
  }
  .neo-subtabs { display: none !important; }
}

@media (max-width: 380px) {
  .m-icon-grid { grid-template-columns: repeat(4, 1fr); }
  .m-menu-apps { grid-template-columns: repeat(3, 1fr); }
}

/* —— 库存管理：手机卡片列表（替代宽表格） —— */
.m-inv-stats.stats {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  margin: 0 0 12px;
  padding: 2px 2px 6px;
  grid-template-columns: none;
}
.m-inv-stats.stats::-webkit-scrollbar { display: none; }
.m-inv-stats .stat-card {
  flex: 0 0 auto;
  min-width: 118px;
  max-width: 150px;
  padding: 12px 12px;
  border-radius: 12px;
}
.m-inv-stats .stat-card .label {
  font-size: 11px;
  white-space: nowrap;
}
.m-inv-stats .stat-card .value {
  font-size: 20px;
  margin-top: 6px;
}
.m-inv-stats .stat-card--profit .value {
  font-size: 15px;
}
.m-inv-toolbar {
  margin-bottom: 8px !important;
}
.m-inv-search.search-box input {
  background: #f3f5f8;
  border: none;
  box-shadow: none;
  border-radius: 10px;
}
.m-inv-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 8px;
}
.m-inv-card {
  background: #fff;
  border-radius: 12px;
  padding: 12px 12px 10px;
  box-shadow: 0 1px 4px rgba(15, 35, 80, 0.05);
}
.m-inv-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.m-inv-cat,
.m-inv-store {
  font-size: 12px;
  color: var(--muted);
}
.m-inv-store {
  margin-left: auto;
}
.m-inv-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}
.m-inv-card-spec {
  margin-top: 4px;
  font-size: 13px;
  color: #4b5563;
}
.m-inv-card-meta {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
  word-break: break-all;
}
.m-inv-card-prices {
  display: flex;
  gap: 16px;
  margin-top: 10px;
  font-size: 13px;
  color: #6b7280;
}
.m-inv-card-prices b {
  color: var(--ink);
  font-weight: 700;
  margin-left: 4px;
}
.m-inv-sale {
  color: #f97316 !important;
}
.m-inv-card-foot {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}
.m-inv-actions {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.m-inv-actions .btn {
  flex: 1 1 auto;
  min-width: 72px;
}
/* 空状态仍显示在卡片区下方 */
.m-inv .empty {
  display: block;
  margin-top: 8px;
  background: #fff;
  border-radius: 12px;
}
.m-inv .m-inv-table-wrap .empty {
  /* empty 挂在 table-wrap 里，手机要单独露出 */
}
.m-inv .m-inv-table-wrap {
  display: block !important;
  border: none;
  box-shadow: none;
  background: transparent;
  min-height: 0;
  overflow: visible;
}
.m-inv .m-inv-table-wrap .table {
  display: none !important;
}
.m-inv .m-inv-table-wrap .empty[hidden] {
  display: none !important;
}

/* —— 收款审核：手机卡片 —— */
.m-review-stats.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}
.m-review-stats .stat-card {
  padding: 12px 10px;
  border-radius: 12px;
  min-width: 0;
}
.m-review-stats .stat-card .label {
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.m-review-stats .stat-card .value {
  font-size: 16px;
  margin-top: 6px;
  word-break: break-all;
}
.m-review-stats .stat-card--pending .value {
  font-size: 22px;
}
.m-stat-unit {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.m-review-stats .stat-card--profit .value {
  font-size: 15px;
}
.m-review-stats .stat-card--profit .value .sub {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #059669;
}
.m-review-tip {
  margin: 0 0 12px;
  padding: 10px 12px;
  background: #fff7ed;
  color: #9a3412;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.45;
}
.m-review-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.m-review-card {
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 1px 4px rgba(15, 35, 80, 0.05);
}
.m-review-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.m-review-time {
  font-size: 12px;
  color: var(--muted);
}
.m-review-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}
.m-review-card-spec {
  margin-top: 4px;
  font-size: 13px;
  color: #4b5563;
}
.m-review-card-meta {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
  word-break: break-all;
}
.m-review-card-prices {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  margin-top: 10px;
  font-size: 13px;
  color: #6b7280;
  align-items: center;
}
.m-review-card-prices b {
  margin-left: 4px;
  color: var(--ink);
  font-weight: 700;
}
.m-review-remark {
  margin-top: 8px;
  font-size: 12px;
  color: #6b7280;
  background: #f5f7fa;
  border-radius: 8px;
  padding: 8px 10px;
}
.m-review-actions {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.m-review-actions .btn {
  flex: 1 1 auto;
  min-height: 40px;
}
.m-review-table-wrap {
  border: none;
  box-shadow: none;
  background: transparent;
  min-height: 0;
  overflow: visible;
}
.m-review-table-wrap .table {
  display: none !important;
}
.m-review-table-wrap .empty[hidden] {
  display: none !important;
}
.m-review .empty {
  margin-top: 8px;
  background: #fff;
  border-radius: 12px;
}

/* —— 出库历史 —— */
.m-ob-hist-stats.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}
.m-ob-hist-stats .stat-card {
  padding: 12px 10px;
  border-radius: 12px;
  min-width: 0;
}
.m-ob-hist-stats .stat-card .label {
  font-size: 11px;
}
.m-ob-hist-stats .stat-card .value {
  font-size: 16px;
  margin-top: 6px;
}
.m-ob-hist-stats .stat-card--pending .value {
  font-size: 20px;
}
.m-ob-hist-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.m-ob-hist-card {
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 1px 4px rgba(15, 35, 80, 0.05);
}
.m-ob-hist-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.m-ob-hist-time {
  font-size: 12px;
  color: var(--muted);
}
.m-ob-hist-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}
.m-ob-hist-spec {
  margin-top: 4px;
  font-size: 13px;
  color: #4b5563;
}
.m-ob-hist-meta {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
  word-break: break-all;
}
.m-ob-hist-prices {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  margin-top: 10px;
  font-size: 13px;
  color: #6b7280;
  align-items: center;
}
.m-ob-hist-prices b {
  margin-left: 4px;
  font-weight: 700;
}
.m-ob-hist-actions {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.m-ob-hist-actions .btn {
  flex: 1 1 auto;
  min-height: 40px;
}
.m-ob-hist .empty {
  margin-top: 8px;
  background: #fff;
  border-radius: 12px;
}
