:root {
  --bg: #f4f6fa;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --surface-blue: #eff6ff;
  --text: #1f2937;
  --text-soft: #475569;
  --muted: #7b8798;
  --border: #e6eaf0;
  --border-strong: #d7dde6;
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #d97706;
  --info: #0ea5e9;
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-sm: 0 4px 14px rgba(16, 24, 40, .06);
  --shadow-md: 0 12px 30px rgba(16, 24, 40, .10);
  --radius: 14px;
  --radius-sm: 9px;
  --sidebar-w: 238px;
  --transition: .18s ease;
  --hover: #fbfcfe;
  --topbar-bg: rgba(255, 255, 255, .94);
  --ok-bg: #e9f9ef;
  --ok-text: #188a48;
  --pending-bg: #fff5e6;
  --pending-text: #c05621;
  --fail-bg: #fdecec;
  --fail-text: #c62828;
  --gray-bg: #f1f3f6;
  --gray-text: #667085;
  --blue-bg: #e8f3ff;
  --blue-text: #2167c4;
  --flash-ok-bg: #eaf7ee;
  --flash-ok-text: #166534;
  --flash-ok-border: #ccebd5;
  --flash-err-bg: #fdecec;
  --flash-err-text: #b42318;
  --flash-err-border: #f5cccc;
  --stripe: #fafbfd;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
  margin: 0;
  background:
    radial-gradient(circle at 12% -10%, rgba(59, 130, 246, .06), transparent 34%),
    var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

a {
  color: var(--primary-dark);
}

.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  color: var(--text);
  border-right: 1px solid var(--border);
  z-index: 40;
}

.sidebar .brand {
  height: 68px;
  display: flex;
  align-items: center;
  padding: 0 22px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .01em;
  border-bottom: 1px solid var(--border);
}

.sidebar .brand a {
  color: var(--text);
  text-decoration: none;
}

.sidebar .menu {
  flex: 1;
  overflow-y: auto;
  padding: 12px 10px;
  scrollbar-width: thin;
}

.sidebar .menu a,
.sidebar .menu .grp-head {
  display: flex;
  align-items: center;
  min-height: 40px;
  margin: 2px 0;
  padding: 0 14px;
  border-radius: 9px;
  color: var(--text-soft);
  text-decoration: none;
  font-size: 14px;
  border-left: none;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}

.sidebar .menu a:hover,
.sidebar .menu .grp-head:hover {
  background: var(--surface-soft);
  color: var(--text);
}

.sidebar .menu a.active {
  background: var(--surface-blue);
  color: var(--primary-dark);
  font-weight: 600;
}

/* 顶层主标签链接（无子标签：仪表盘/订单管理/商品列表等）：
   与分组头同为主标签层级，字重/颜色与有子标签的主标签(.grp-head)保持一致，
   右侧放与箭头同列的淡色圆点作主标签标识，与缩进小字、无标识的子标签区分开 */
.sidebar .menu > a {
  position: relative;
  font-weight: 600;
  color: var(--text);
}
.sidebar .menu > a::after {
  content: "";
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--muted);
  flex: none;
  margin-left: auto;
}

.sidebar .menu a.sub {
  padding-left: 30px;
  font-size: 13px;
}

.sidebar .menu .grp-head {
  cursor: pointer;
  justify-content: space-between;
  user-select: none;
}

.sidebar .menu .grp-head.cur {
  color: var(--text);
}

.sidebar .menu .grp-head .arrow {
  font-size: 10px;
  color: var(--muted);
  transition: transform .18s ease;
}

.sidebar .menu .grp-head.open .arrow {
  transform: rotate(90deg);
}

.sidebar .menu .grp-items {
  display: none;
  margin: 2px 0 4px;
}

.sidebar .menu .grp-items.open {
  display: block;
}

.sidebar .side-foot {
  padding: 14px 18px;
  border-top: 1px solid var(--border);
}

.sidebar .side-foot a {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
}

.sidebar .side-foot a:hover {
  color: var(--danger);
}

.main {
  flex: 1;
  min-width: 0;
  padding: 28px 30px 42px;
}

.container {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 24px 18px 40px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  padding: 20px 22px;
  margin-bottom: 18px;
}

.card h2 {
  margin: 0 0 16px;
  font-size: 17px;
  line-height: 1.35;
  color: var(--text);
}

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

.page-head h2 {
  margin: 0;
  font-size: 20px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 13px;
  transition: transform .05s ease, filter .05s ease;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition), transform .06s ease, opacity var(--transition);
}

.btn:hover {
  opacity: .92;
  box-shadow: var(--shadow-sm);
}

.btn:active {
  transform: translateY(1px);
  box-shadow: none;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 1px 2px rgba(37, 99, 235, .22);
}

.btn-success {
  background: var(--success);
  color: #fff;
}

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

.btn-gray {
  background: #64748b;
  color: #fff;
}

.btn-warn {
  background: var(--warning);
  color: #fff;
}

.btn-sm {
  min-height: 32px;
  padding: 5px 11px;
  font-size: 12px;
  border-radius: 7px;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
input[type="search"],
textarea,
select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text);
  background: var(--surface);
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="datetime-local"]:focus,
input[type="search"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .14);
  background: var(--surface);
}

textarea {
  resize: vertical;
  line-height: 1.6;
}

label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--text-soft);
}

.form-row {
  margin-bottom: 14px;
}

.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.toolbar form {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.flash-ok,
.flash-error {
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  font-size: 13px;
}

.flash-ok {
  background: var(--flash-ok-bg);
  color: var(--flash-ok-text);
  border: 1px solid var(--flash-ok-border);
}

.flash-error {
  background: var(--flash-err-bg);
  color: var(--flash-err-text);
  border: 1px solid var(--flash-err-border);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1.4;
  font-weight: 600;
}

.b-pending {
  background: var(--pending-bg);
  color: var(--pending-text);
}

.b-ok {
  background: var(--ok-bg);
  color: var(--ok-text);
}

.b-fail {
  background: var(--fail-bg);
  color: var(--fail-text);
}

.b-gray {
  background: var(--gray-bg);
  color: var(--gray-text);
}

.b-blue {
  background: var(--blue-bg);
  color: var(--blue-text);
}

/* 平台徽章品牌色（色板与选品搜索页 ugs-ptag 的 PLAT_COLOR 同源）：固定品牌色不随主题切换，
   小面积徽章以平台识别优先；未知平台回落 b-blue */
.pf-taobao { background: #ff6a00; color: #fff; }
.pf-douyin { background: #1f1f27; color: #fff; }
.pf-jd { background: #e2231a; color: #fff; }
.pf-pdd { background: #16b364; color: #fff; }
.pf-alipay { background: #1677ff; color: #fff; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow-xs);
}

.stat .num {
  font-size: 27px;
  font-weight: 700;
  line-height: 1.15;
}

.stat .lab {
  font-size: 12px;
  color: var(--muted);
  margin-top: 5px;
}

.num-pending {
  color: #d97706;
}

.num-total {
  color: #2563eb;
}

.num-today {
  color: #16a34a;
}

.num-success {
  color: #16a34a;
}

.num-fail {
  color: #dc2626;
}

.sumbar {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 13px;
  color: var(--text-soft);
}

.sumbar .v {
  color: var(--primary-dark);
  font-weight: 600;
}

/* 订单页头部统计卡：上排今日/昨日文字概览（不可点），下排状态直达胶囊（可点，点击=套对应筛选跳转） */
.order-stats {
  display: flex;
  flex-direction: column;
  gap: 9px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
}

.order-stats .os-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  align-items: baseline;
  font-size: 13px;
  color: var(--text-soft);
}

.order-stats .os-row .v {
  color: var(--primary-dark);
  font-weight: 700;
}

.order-stats .os-amt {
  color: var(--warning);
}

.order-stats .os-tail {
  margin-left: auto;
  color: var(--muted);
}

.order-stats .os-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 4px 3px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: 12.5px;
  line-height: 1.7;
  background: var(--surface);
  color: var(--text-soft);
  text-decoration: none;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition), box-shadow var(--transition);
}

.stat-chip:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
  box-shadow: var(--shadow-xs);
}

.stat-chip .cnt {
  min-width: 22px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--warning);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.stat-chip .cnt-ok { background: var(--success); }
.stat-chip .cnt-fail { background: var(--danger); }

.stat-chip.active-pending {
  border-color: var(--warning);
  color: var(--pending-text);
  background: var(--pending-bg);
}

.stat-chip.active-ok {
  border-color: var(--success);
  color: var(--ok-text);
  background: var(--ok-bg);
}

.stat-chip.active-fail {
  border-color: var(--danger);
  color: var(--fail-text);
  background: var(--fail-bg);
}

/* 下单预热页：商品面板 × 设备卡片（仅显示勾选「预热任务」的设备） */
.ph-goods {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 12px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ph-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ph-name {
  font-weight: 700;
  color: var(--text);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ph-counts {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
}

.ph-c {
  font-size: 12px;
  line-height: 1.7;
  padding: 1px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

.ph-c-ok { background: var(--ok-bg); color: var(--ok-text); }
.ph-c-warn { background: var(--pending-bg); color: var(--pending-text); }
.ph-c-fail { background: var(--fail-bg); color: var(--fail-text); }

.ph-act {
  margin-left: auto;
}

.ph-devs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ph-dev {
  flex: 1 1 200px;
  max-width: 300px;
  min-width: 0;
  border: 1px solid var(--border);
  border-left: 3px solid var(--muted);
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--surface-soft);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ph-dev.s-ready { border-left-color: var(--success); }
.ph-dev.s-stale { border-left-color: var(--warning); }
.ph-dev.s-limit { border-left-color: var(--danger); }

.ph-dev-top {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.ph-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
  flex: none;
}

.s-ready .ph-dot { background: var(--success); }
.s-stale .ph-dot { background: var(--warning); }
.s-limit .ph-dot { background: var(--danger); }

.ph-dev-name {
  font-weight: 600;
  font-size: 12.5px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ph-dev-status {
  font-size: 12.5px;
  font-weight: 600;
}

.s-ready .ph-dev-status { color: var(--ok-text); }
.s-stale .ph-dev-status { color: var(--pending-text); }
.s-limit .ph-dev-status { color: var(--fail-text); }
.s-none .ph-dev-status { color: var(--text-soft); font-weight: 400; }

.ph-dev-meta {
  font-size: 11.5px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  align-items: center;
}

.ph-rb-ok { color: var(--ok-text); }
.ph-rb-warn { color: var(--pending-text); }
.ph-rb-fail { color: var(--fail-text); }

.ph-empty {
  color: var(--muted);
  font-size: 12.5px;
}

.ph-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: center;
  margin: 8px 0 4px;
}

.ph-search {
  flex: 1 1 220px;
  width: auto;
  min-width: 180px;
  max-width: 380px;
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  font-size: 13px;
}

.ph-chip-row {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 0;
}

.ph-chip-row + .ph-chip-row {
  padding-left: 10px;
  border-left: 1px solid var(--border);
}

.ph-head {
  cursor: pointer;
  user-select: none;
  border-radius: 8px;
  margin: -4px -6px;
  padding: 4px 6px;
}

.ph-head:hover {
  background: var(--hover);
}

.ph-caret {
  display: inline-block;
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 6px solid var(--muted);
  margin-right: 2px;
  flex-shrink: 0;
  transition: transform .15s ease;
}

.ph-goods.open > .ph-head .ph-caret {
  transform: rotate(90deg);
}

.ph-goods > .ph-body {
  display: none;
}

.ph-goods.open > .ph-body {
  display: block;
}

.ph-goods.open > .ph-body > .ph-devs {
  display: flex;
}

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

.ph-add-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
}

.ph-add-grid .span2 {
  grid-column: 1 / -1;
}

.ph-exp-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ph-exp-preset {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: 12px;
  line-height: 1.2;
  cursor: pointer;
  background: var(--surface);
  color: var(--text-soft);
  user-select: none;
  transition: background .12s ease, color .12s ease, border-color .12s ease;
}

.ph-exp-preset.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.ph-exp-custom.active {
  padding: 3px 10px 3px 12px;
}

.ph-exp-custom .ph-exp-unit,
.ph-exp-custom input[type="number"] {
  display: none;
}

.ph-exp-custom.active .ph-exp-unit {
  display: inline;
}

.ph-exp-custom.active input[type="number"] {
  display: inline-block;
  width: 52px;
  height: 22px;
  padding: 0 6px;
  margin: 0;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 999px;
  background: #fff;
  color: #1f2937;
  font-size: 12px;
  text-align: center;
  flex: none;
  appearance: textfield;
  -moz-appearance: textfield;
}

.ph-exp-custom input[type="number"]::-webkit-inner-spin-button,
.ph-exp-custom input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.ph-add-err {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--fail-text);
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
  background: var(--surface);
  color: var(--text-soft);
  margin-right: 6px;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.chip a { color: inherit; text-decoration: none; }
.chip a:hover b, .chip a:hover { color: var(--primary-dark, #2563eb); }

.chip b {
  color: var(--primary-dark);
  margin-left: 5px;
}

.chip.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.chip.active b {
  color: #fff;
}

.table-tip {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}

.table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 11px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  padding: 10px 11px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

th {
  background: var(--surface-soft);
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

tr:last-child td {
  border-bottom: none;
}

tbody tr:hover td {
  background: var(--hover);
}

.cell-main {
  font-weight: 600;
}

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

.cell-sub.red {
  color: var(--danger);
}

.cell-sub.green {
  color: var(--success);
}

.cell-sub.orange {
  color: var(--warning);
}

/* 统一分页栏：共N条靠左，其余控件一行对齐靠右；窄屏自动换行 */
.pager {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin-top: 14px;
  font-size: 13px;
}

.pager-total {
  color: var(--text-soft);
  margin-right: auto;
}

.pager form {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pager select,
.pager-jump input[type="number"] {
  width: auto;
  height: 30px;
  padding: 0 6px;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
}

.pager-jump input[type="number"] {
  width: 56px;
  text-align: center;
}

.pager .btn {
  min-height: 0;
  height: 30px;
  padding: 0 10px;
}

.pager-btns {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.pager-btns a,
.pager-btns .is-current,
.pager-btns .is-disabled {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  padding: 0 9px;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  color: var(--text-soft);
  text-align: center;
  text-decoration: none;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.pager-btns a:hover {
  background: var(--surface-soft);
  color: var(--primary-dark);
  border-color: var(--primary);
}

.pager-btns .is-current {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  cursor: default;
}

.pager-btns .is-disabled {
  color: var(--muted);
  opacity: .5;
  cursor: not-allowed;
  background: none;
}

.pager-ellipsis {
  padding: 0 2px;
  color: var(--muted);
}

.manual-check-banner {
  background: #fff7f0;
  border-left: 4px solid var(--danger);
  padding: 10px 14px;
  border-radius: 6px;
  margin-bottom: 14px;
  font-size: 13px;
  line-height: 1.8;
}

.danger-text { color: var(--danger); }

.down-reason {
  color: var(--danger);
  font-size: 12px;
  margin-top: 3px;
  word-break: break-all;
  cursor: help;
}

.login-wrap {
  max-width: 410px;
  margin: 10vh auto;
}

.login-wrap .card {
  padding: 26px;
}

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

.switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 22px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch .slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #cbd5e1;
  border-radius: 22px;
  transition: .2s;
}

.switch .slider:before {
  content: "";
  position: absolute;
  height: 16px;
  width: 16px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: .2s;
}

.switch input:checked + .slider {
  background: var(--success);
}

.switch input:checked + .slider:before {
  transform: translateX(20px);
}

.mobile-topbar {
  display: none;
}

.sidebar-overlay {
  display: none;
}

@media (max-width: 900px) {
  .mobile-topbar {
    position: sticky;
    top: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    gap: 12px;
    height: 56px;
    padding: 0 14px;
    background: var(--topbar-bg);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);
  }

  .mobile-topbar .mobile-brand {
    flex: 1;
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
  }

  .menu-toggle {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: 10px;
    color: var(--text);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
  }

  .layout {
    display: block;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    height: 100vh;
    width: min(82vw, 300px);
    transform: translateX(-102%);
    transition: transform .22s ease;
    box-shadow: var(--shadow-md);
    z-index: 90;
  }

  body.nav-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 80;
    background: rgba(15, 23, 42, .38);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
  }

  body.nav-open .sidebar-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  .main {
    padding: 18px 14px 34px;
  }

  .container {
    padding: 16px 14px 32px;
  }

  .card {
    padding: 16px 14px;
    border-radius: 13px;
  }

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

  .stat {
    padding: 14px;
  }

  .stat .num {
    font-size: 23px;
  }

  .btn {
    min-height: 42px;
  }

  input[type="text"],
  input[type="password"],
  input[type="number"],
  input[type="date"],
  textarea,
  select {
    font-size: 16px;
  }
}

/* ============ 侧边栏折叠菜单：主次层次区分 ============ */
.sidebar .menu .grp-head {
  font-weight: 600;
  color: var(--text);
}

.sidebar .menu .grp-head.open,
.sidebar .menu .grp-head.cur {
  background: var(--surface-soft);
  color: var(--text);
}

.sidebar .menu .grp-head .arrow {
  color: var(--muted);
}

.sidebar .menu .grp-head.open .arrow,
.sidebar .menu .grp-head.cur .arrow {
  color: var(--primary);
}

.sidebar .menu .grp-items {
  position: relative;
}

.sidebar .menu .grp-items.open::before {
  content: "";
  position: absolute;
  left: 21px;
  top: 5px;
  bottom: 5px;
  width: 1px;
  background: var(--border);
}

.sidebar .menu a.sub {
  color: var(--muted);
  padding-left: 38px;
  min-height: 38px;
}

.sidebar .menu a.sub:hover {
  color: var(--text);
}

.sidebar .menu a.sub.active {
  color: var(--primary-dark);
  font-weight: 600;
  background: var(--surface-blue);
}

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

  .card h2 {
    font-size: 16px;
  }

  .sumbar {
    gap: 10px;
  }

  .order-stats {
    padding: 9px 12px;
    gap: 7px;
  }

  .order-stats .os-row {
    gap: 2px 12px;
    font-size: 12px;
  }

  .order-stats .os-tail {
    margin-left: 0;
    width: 100%;
  }

  .stat-chip {
    font-size: 12px;
  }

  .ph-head .ph-act {
    margin-left: 0;
  }

  .ph-dev {
    flex: 1 1 100%;
    max-width: none;
  }

  .pager {
    line-height: 2;
  }
}

@media (max-width: 900px) {
  .table-wrap {
    margin: 0 -14px;
    width: calc(100% + 28px);
    padding: 0 14px;
    border-radius: 0;
  }

  .table-scroll {
    min-width: 760px;
  }

  .table-stack thead {
    display: none;
  }

  .table-stack,
  .table-stack tbody,
  .table-stack tr,
  .table-stack td {
    display: block;
    width: 100%;
  }

  .table-stack tr {
    margin-bottom: 12px;
    padding: 5px 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: var(--shadow-xs);
  }

  .table-stack td {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px dashed var(--border);
    text-align: right;
  }

  .table-stack td:last-child {
    border-bottom: none;
  }

  .table-stack td::before {
    content: attr(data-label);
    flex-shrink: 0;
    min-width: 76px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    text-align: left;
  }

  .table-kv tr {
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
  }

  .table-kv tr:last-child {
    border-bottom: none;
  }

  .table-kv th,
  .table-kv td {
    display: block;
    width: 100%;
    padding: 3px 0;
    border-bottom: none;
    text-align: left;
  }

  .table-kv th {
    background: none;
    color: var(--muted);
    font-size: 12px;
  }

  .table-kv td {
    color: var(--text);
    padding-bottom: 8px;
  }

  [id$="-modal"] {
    padding: 12px;
  }

  [id$="-modal"] > div:not([id$="-modal-mask"]) {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 auto !important;
    max-height: calc(100vh - 24px);
    overflow-y: auto;
    border-radius: 13px;
  }

  dialog#role-dialog {
    width: calc(100% - 24px);
    max-width: 420px;
    margin: auto;
  }

  .uo-hero {
    flex-direction: column;
    align-items: stretch;
  }

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

  .uo-sync-row {
    flex-direction: column;
    gap: 14px;
  }

  .uo-sync-item {
    width: 100%;
    min-width: 0;
  }

  .uo-checks {
    flex-wrap: wrap;
    gap: 8px 14px;
  }

  .uo-filter {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .uo-filter-item {
    width: 100%;
    min-width: 0;
    align-items: stretch;
  }

  .uo-filter-item > label {
    width: auto;
  }

  .uo-filter-item input[type="text"],
  .uo-filter-item input[type="date"],
  .uo-filter-item select {
    width: 100%;
    min-width: 0;
  }

  #f-dates {
    width: 100%;
  }

  #f-dates input[type="date"] {
    flex: 1;
    min-width: 0;
  }

  .uo-modal-box {
    width: calc(100% - 24px);
  }
}

@media (max-width: 540px) {
  .uo-stats {
    grid-template-columns: 1fr;
  }
}

/* ============ 组件补充（主题变量化） ============ */
.col-resizer {
  background: var(--primary);
}

th:hover .col-resizer {
  opacity: 1;
}

/* ---- 表格列宽/列设置工具条（base.html 全局注入） ---- */
.table-ctl {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--muted);
}

.table-ctl .tsp {
  flex: 1;
}

.colw-set {
  position: relative;
  display: inline-block;
}

.colw-pop {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 60;
  min-width: 150px;
  max-height: 320px;
  overflow-y: auto;
  padding: 8px 10px;
  background: var(--surface, #fff);
  border: 1px solid var(--border, #d1d6dd);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .14);
}

.colw-pop.open {
  display: block;
}

.colw-pop .pop-ops {
  display: flex;
  gap: 10px;
  padding: 2px 2px 6px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border, #eceff3);
}

.colw-pop .pop-ops a {
  font-size: 12px;
  color: var(--primary, #2563eb);
  cursor: pointer;
}

.colw-pop label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 2px;
  margin: 0;
  font-size: 12px;
  color: var(--text, #333);
  cursor: pointer;
}

.colw-pop input[type="checkbox"] {
  width: auto;
  margin: 0;
}

/* 固定列宽模式：内容超出列宽即裁剪——长串不再把列顶宽（拖不窄根因），拖一列不再牵动其他列 */
table.colw-fixed {
  table-layout: fixed;
}

table.colw-fixed th,
table.colw-fixed td {
  overflow: hidden;
}

table.colw-fixed th {
  text-overflow: ellipsis;
}

/* 移动端堆叠模式不受固定列宽影响：恢复自动布局，解除 JS 设置的 inline min-width */
@media (max-width: 900px) {
  table.colw-fixed {
    table-layout: auto;
    min-width: 0 !important;
  }

  table.colw-fixed th,
  table.colw-fixed td {
    overflow: visible;
  }
}

body.colw-dragging {
  cursor: col-resize;
}

body.colw-dragging * {
  cursor: col-resize !important;
  user-select: none !important;
}

.dtpicker-pop {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  box-shadow: var(--shadow-md);
}

.dtpicker-head .nav-btn {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text);
}

.dtpicker-head .nav-btn:hover {
  background: var(--surface-soft);
}

.dtpicker-wd {
  color: var(--muted);
}

.dtpicker-day:hover {
  background: var(--surface-soft);
}

.dtpicker-day.selected {
  background: var(--primary);
  color: #fff;
}

.dtpicker-day.other {
  color: var(--muted);
}

.dtpicker-title {
  color: var(--text);
}

/* ============ 主题选择器 ============ */
.theme-picker {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
}

.theme-picker .tp-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 9px;
}

.theme-picker .tp-label b {
  font-weight: 600;
  color: var(--text-soft);
}

.theme-picker .tp-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.theme-picker .tp-opt {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 2px solid var(--border-strong);
  cursor: pointer;
  position: relative;
  padding: 0;
  background-clip: padding-box;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.theme-picker .tp-opt:hover {
  transform: scale(1.12);
}

.theme-picker .tp-opt:active {
  transform: scale(.96);
}

.theme-picker .tp-opt.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 22%, transparent);
}

.theme-picker .tp-opt[data-tip]:hover::after {
  content: attr(data-tip);
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 9px;
  background: #111827;
  color: #fff;
  font-size: 11px;
  line-height: 1.4;
  border-radius: 6px;
  white-space: nowrap;
  z-index: 20;
  pointer-events: none;
}

/* ============ 主题：Haze 现代（借鉴 DashboardPack Haze Dashboard） ============ */
html[data-theme="haze"] {
  --bg: #f7f7f8;
  --surface: #ffffff;
  --surface-soft: #fafafa;
  --surface-blue: #f2f0ff;
  --text: #1a1a1e;
  --text-soft: #3f3f46;
  --muted: #71717a;
  --border: #e7e7ea;
  --border-strong: #d7d7dc;
  --primary: #6d5df6;
  --primary-dark: #5846e8;
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #d97706;
  --info: #0ea5e9;
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .04);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, .05);
  --shadow-md: 0 14px 32px rgba(0, 0, 0, .10);
  --radius: 10px;
  --radius-sm: 7px;
  --hover: #fafafa;
  --topbar-bg: rgba(255, 255, 255, .92);
}

html[data-theme="haze"] body {
  background:
    radial-gradient(circle at 12% -10%, rgba(109, 93, 246, .07), transparent 34%),
    var(--bg);
}

/* ============ 主题：深色 ============ */
html[data-theme="dark"] {
  --bg: #f4f6fa;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --surface-blue: #eff6ff;
  --text: #1f2937;
  --text-soft: #475569;
  --muted: #7b8798;
  --border: #e6eaf0;
  --border-strong: #d7dde6;
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #d97706;
  --info: #0ea5e9;
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-sm: 0 4px 14px rgba(16, 24, 40, .06);
  --shadow-md: 0 12px 30px rgba(16, 24, 40, .10);
  --radius: 12px;
  --radius-sm: 8px;
  --hover: #fbfcfe;
  --topbar-bg: rgba(255, 255, 255, .94);
  --ok-bg: #e9f9ef;
  --ok-text: #188a48;
  --pending-bg: #fff5e6;
  --pending-text: #c05621;
  --fail-bg: #fdecec;
  --fail-text: #c62828;
  --gray-bg: #f1f3f6;
  --gray-text: #667085;
  --blue-bg: #e8f3ff;
  --blue-text: #2167c4;
  --flash-ok-bg: #eaf7ee;
  --flash-ok-text: #166534;
  --flash-ok-border: #ccebd5;
  --flash-err-bg: #fdecec;
  --flash-err-text: #b42318;
  --flash-err-border: #f5cccc;
  --stripe: #fafbfd;
}

html[data-theme="dark"] body {
  background: var(--bg);
}

html[data-theme="dark"] .mobile-topbar {
  background: var(--topbar-bg);
}

html[data-theme="dark"] .sidebar-overlay {
  background: rgba(15, 23, 42, .40);
}

html[data-theme="dark"] .sidebar {
  --surface: #1e293b;
  --surface-soft: #263449;
  --surface-blue: #1f2a45;
  --text: #e5eaf3;
  --text-soft: #b7c3d6;
  --muted: #8b9bb0;
  --border: #2c3b54;
  --border-strong: #3c4e6c;
  --primary: #60a5fa;
  --primary-dark: #93c5fd;
  --hover: #243450;
  background: #1e293b;
  color: #e5eaf3;
}

/* ============ 主题：Tabler 清爽 ============ */
html[data-theme="tabler"] {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --surface-blue: #eef4fb;
  --text: #1d273b;
  --text-soft: #475569;
  --muted: #6b7a90;
  --border: #e5e9f0;
  --border-strong: #d3dae3;
  --primary: #206bc4;
  --primary-dark: #1a569c;
  --success: #2fb344;
  --danger: #d63939;
  --warning: #f59f00;
  --info: #4299e1;
  --shadow-xs: 0 1px 2px rgba(30, 41, 59, .05);
  --shadow-sm: 0 4px 12px rgba(30, 41, 59, .06);
  --shadow-md: 0 14px 30px rgba(30, 41, 59, .12);
  --radius: 8px;
  --radius-sm: 6px;
  --hover: #f8fafc;
  --topbar-bg: rgba(255, 255, 255, .95);
}

html[data-theme="tabler"] body {
  background: var(--bg);
}

/* ============ 主题：翡翠绿 ============ */
html[data-theme="emerald"] {
  --bg: #f5faf7;
  --surface: #ffffff;
  --surface-soft: #f7fbf9;
  --surface-blue: #e9f7f0;
  --text: #1f2937;
  --text-soft: #475569;
  --muted: #6b7280;
  --border: #e3ebe7;
  --border-strong: #d0dcd5;
  --primary: #059669;
  --primary-dark: #047857;
  --success: #10b981;
  --danger: #dc2626;
  --warning: #d97706;
  --info: #0ea5e9;
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-sm: 0 4px 14px rgba(16, 24, 40, .06);
  --shadow-md: 0 14px 32px rgba(16, 24, 40, .10);
  --radius: 12px;
  --radius-sm: 8px;
  --hover: #f7fbf9;
  --topbar-bg: rgba(255, 255, 255, .94);
}

html[data-theme="emerald"] body {
  background:
    radial-gradient(circle at 12% -10%, rgba(5, 150, 105, .06), transparent 34%),
    var(--bg);
}

/* ============ 主题：紫罗兰 ============ */
html[data-theme="violet"] {
  --bg: #f9f7fc;
  --surface: #ffffff;
  --surface-soft: #faf8fd;
  --surface-blue: #f3eefe;
  --text: #231d3c;
  --text-soft: #4a4365;
  --muted: #746c8f;
  --border: #e8e3f1;
  --border-strong: #d7d0e5;
  --primary: #7c3aed;
  --primary-dark: #6d28d9;
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #d97706;
  --info: #0ea5e9;
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-sm: 0 4px 14px rgba(16, 24, 40, .06);
  --shadow-md: 0 14px 32px rgba(16, 24, 40, .10);
  --radius: 14px;
  --radius-sm: 9px;
  --hover: #faf8fd;
  --topbar-bg: rgba(255, 255, 255, .94);
}

html[data-theme="violet"] body {
  background:
    radial-gradient(circle at 12% -10%, rgba(124, 58, 237, .06), transparent 34%),
    var(--bg);
}

/* ============ 全局组件细节优化 ============ */
/* 侧边栏菜单：激活态左侧指示条 */
.sidebar .menu a,
.sidebar .menu .grp-head {
  position: relative;
}

.sidebar .menu a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 20px;
  border-radius: 0 3px 3px 0;
  background: var(--primary);
  transform: translateY(-50%) scaleY(0);
  transition: transform .18s ease;
}

.sidebar .menu a.active::before {
  transform: translateY(-50%) scaleY(1);
}

/* 表格斑马纹，提升长表格可读性 */
tbody tr:nth-child(even) td {
  background: var(--stripe);
}

tbody tr:hover td {
  background: var(--hover);
}

/* 分页器按钮化 */
.pager a {
  display: inline-block;
  min-width: 30px;
  padding: 4px 9px;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  color: var(--text-soft);
  text-align: center;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.pager a:hover {
  background: var(--surface-soft);
  color: var(--primary-dark);
  border-color: var(--primary);
}

/* 键盘导航焦点可见性 */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* 输入控件 hover 反馈 */
input[type="text"]:hover,
input[type="password"]:hover,
input[type="number"]:hover,
input[type="date"]:hover,
textarea:hover,
select:hover {
  border-color: var(--border-strong);
}

/* 移动端触控目标放大 */
@media (max-width: 900px) {
  .sidebar .menu a,
  .sidebar .menu .grp-head {
    min-height: 46px;
    border-radius: 10px;
    margin: 3px 0;
  }

  .theme-picker .tp-opt {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }

  .theme-picker .tp-options {
    gap: 10px;
  }

  .btn {
    min-height: 44px;
  }

  .btn-sm {
    min-height: 38px;
    padding: 7px 13px;
  }

  .pager a {
    min-width: 36px;
    padding: 7px 11px;
  }
}

/* ============ 大气化：整体字号与留白提升 ============ */
body {
  font-size: 15px;
}

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

.sidebar .menu a,
.sidebar .menu .grp-head {
  font-size: 15px;
  min-height: 46px;
  padding: 0 16px;
}

.sidebar .menu a.sub {
  font-size: 14px;
  min-height: 40px;
}

.main {
  padding: 32px 36px 48px;
}

.card {
  padding: 24px 26px;
  margin-bottom: 22px;
}

.card h2 {
  font-size: 19px;
  margin-bottom: 18px;
}

.page-head h2 {
  font-size: 24px;
}

.stat {
  padding: 20px 22px;
}

.stat .num {
  font-size: 32px;
}

.stat .lab {
  font-size: 13px;
}

.stat-grid {
  gap: 18px;
}

table {
  font-size: 14px;
}

th,
td {
  padding: 12px 14px;
}

.btn {
  font-size: 14px;
  min-height: 42px;
  padding: 9px 18px;
}

.btn-sm {
  font-size: 13px;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="date"],
textarea,
select {
  font-size: 14px;
  padding: 10px 13px;
}

.badge {
  font-size: 13px;
  padding: 4px 12px;
}

.toolbar {
  gap: 14px;
  margin-bottom: 16px;
}

label {
  font-size: 14px;
}

.chip {
  font-size: 13px;
}

/* 移动端保持紧凑，避免放大后溢出 */
@media (max-width: 900px) {
  body {
    font-size: 14px;
  }

  .main {
    padding: 20px 16px 36px;
  }

  .card {
    padding: 18px 16px;
    margin-bottom: 16px;
  }

  .card h2 {
    font-size: 17px;
    margin-bottom: 14px;
  }

  .page-head h2 {
    font-size: 21px;
  }

  .stat {
    padding: 15px;
  }

  .stat .num {
    font-size: 26px;
  }

  .stat-grid {
    gap: 11px;
  }

  table {
    font-size: 13px;
  }

  th,
  td {
    padding: 10px 11px;
  }

  .btn {
    min-height: 44px;
  }

  input[type="text"],
  input[type="password"],
  input[type="number"],
  input[type="date"],
  textarea,
  select {
    font-size: 16px;
  }
}

/* ============ 窄屏卡片式列表（订单/商品/设备页共用；各页媒体查询隐藏对应表格） ============ */
.mobile-cards { display: none; }

.ocard {
  border: 1px solid var(--border, #d1d6dd);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
  background: var(--surface, #fff);
}

.ocard-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.ocard-head .badge { flex: none; }
.ocard-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ocard-no { font-size: 12px; word-break: break-all; margin-top: 2px; }
.ocard-grid { display: grid; grid-template-columns: max-content 1fr; gap: 3px 12px; margin-top: 8px; font-size: 13px; }
.ocard-grid .k { color: var(--muted, #8a94a3); white-space: nowrap; }
.ocard-grid .v { word-break: break-all; text-align: right; }
.ocard-grid .v .badge { margin-left: 4px; }
.ocard-reason { margin-top: 6px; font-size: 12px; color: #c0392b; word-break: break-all; }
.ocard-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border, #e5e9f0); font-size: 12px; }
.ocard-foot .ops { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }

/* ===================== 订单管理页（凭证胶囊 + 桌面表分组排版，20260830） ===================== */
/* 查看凭证：轻量胶囊（图片图标），替代原深色重按钮；桌面表格与移动卡片共用 */
.voucher-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 11px;
  border: 1px solid var(--border-strong, #d7dde6);
  border-radius: 999px;
  background: var(--gray-bg, #f1f3f6);
  color: var(--gray-text, #667085);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.6;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), color var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.voucher-btn::before {
  content: "";
  flex: none;
  width: 13px;
  height: 13px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='3'/%3E%3Ccircle cx='9' cy='9' r='1.7' fill='%23000' stroke='none'/%3E%3Cpath d='m21 15.5-4-4a1.4 1.4 0 0 0-2 0L5.5 21'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='3'/%3E%3Ccircle cx='9' cy='9' r='1.7' fill='%23000' stroke='none'/%3E%3Cpath d='m21 15.5-4-4a1.4 1.4 0 0 0-2 0L5.5 21'/%3E%3C/svg%3E") no-repeat center / contain;
}

.voucher-btn:hover {
  background: var(--blue-bg, #e8f3ff);
  border-color: rgba(59, 130, 246, .4);
  color: var(--blue-text, #2167c4);
  box-shadow: var(--shadow-xs);
}

.ocard .voucher-btn { margin-top: 10px; }

/* 桌面大表：分组竖线分隔 + 顶对齐 + 标签弱化/值分级 */
#orders-table th + th,
#orders-table td + td { border-left: 1px solid var(--border, #e6eaf0); }

#orders-table td {
  vertical-align: top;
  line-height: 1.8;
  font-variant-numeric: tabular-nums;
}

#orders-table .gtitle { font-weight: 600; line-height: 1.45; }
#orders-table .nowrap { white-space: nowrap; }
#orders-table .sub { font-size: 12px; color: var(--text-soft, #475569); line-height: 1.7; }
#orders-table .lb { color: var(--muted, #7b8798); }
#orders-table .amt { font-weight: 600; }
#orders-table .mono {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Courier New", monospace;
  font-size: 11px;
  word-break: break-all;
}
#orders-table td .voucher-btn { margin-top: 7px; }

/* 列内超长文本：不换行省略显示，悬停出展开钮，点击浮层看全文 */
#orders-table td { position: relative; }
#orders-table td > div:not(.op-grid) {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#orders-table td .cell-expand,
#goods-table td .cell-expand,
#dg-table td .cell-expand,
#devices-table td .cell-expand,
#xy-orders-table td .cell-expand {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  display: none;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--border-strong, #d7dde6);
  border-radius: 7px;
  background: var(--surface, #fff);
  color: var(--gray-text, #667085);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  z-index: 5;
}
#orders-table td .cell-expand::before,
#goods-table td .cell-expand::before,
#dg-table td .cell-expand::before,
#devices-table td .cell-expand::before,
#xy-orders-table td .cell-expand::before {
  content: "";
  width: 12px;
  height: 12px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat center / contain;
}
#orders-table td.clipped:hover .cell-expand,
#goods-table td.clipped:hover .cell-expand,
#dg-table td.clipped:hover .cell-expand,
#devices-table td.clipped:hover .cell-expand,
#xy-orders-table td.clipped:hover .cell-expand { display: inline-flex; }
#orders-table td .cell-expand:hover,
#goods-table td .cell-expand:hover,
#dg-table td .cell-expand:hover,
#devices-table td .cell-expand:hover,
#xy-orders-table td .cell-expand:hover { color: var(--primary-dark, #2563eb); border-color: var(--primary, #3b82f6); }
/* 截断箭头常驻弱显示（2026-09-07 用户定规统一：订单/商品两页一致——纯悬停=用户看不见以为没加；
   动作钮说明常驻可见不是悬停）。截断格 0.35 透明度常驻，悬停全亮，格子 pointer 光标 */
#orders-table td.clipped .cell-expand,
#goods-table td.clipped .cell-expand,
#dg-table td.clipped .cell-expand,
#devices-table td.clipped .cell-expand,
#xy-orders-table td.clipped .cell-expand { display: inline-flex; opacity: .35; }
#orders-table td.clipped:hover .cell-expand,
#goods-table td.clipped:hover .cell-expand,
#dg-table td.clipped:hover .cell-expand,
#devices-table td.clipped:hover .cell-expand,
#xy-orders-table td.clipped:hover .cell-expand { opacity: 1; }
#orders-table td.clipped,
#goods-table td.clipped,
#dg-table td.clipped,
#devices-table td.clipped,
#xy-orders-table td.clipped { cursor: pointer; }
/* 闲鱼订单表：cell-main/cell-sub 是 span（同比价页），块级化+省略参与截断 */
#xy-orders-table td { position: relative; }
#xy-orders-table td > div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#xy-orders-table td > span.cell-main { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#xy-orders-table td > span.cell-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 展开浮层：锚在单元格上方，显示全部文本 */
#cell-expand-pop {
  position: fixed;
  z-index: 900;
  display: none;
  background: var(--surface, #fff);
  border: 1px solid var(--border-strong, #d7dde6);
  border-radius: 10px;
  box-shadow: var(--shadow-md);
}
#cell-expand-pop .cep-close {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--border, #e6eaf0);
  background: var(--surface, #fff);
  color: var(--muted, #7b8798);
  font-size: 14px;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  z-index: 1;
}
#cell-expand-pop .cep-close:hover { color: var(--fail-text, #c62828); border-color: var(--fail-text, #c62828); }
#cell-expand-pop .cep-body {
  padding: 12px 34px 12px 16px;
  overflow: auto;
  max-height: calc(60vh - 24px);
  font-size: 12.5px;
  line-height: 2;
  color: var(--text-soft, #475569);
}
#cell-expand-pop .cep-body > div { white-space: nowrap; }
#cell-expand-pop .lb { color: var(--muted, #7b8798); }
#cell-expand-pop .mono { font-family: ui-monospace, SFMono-Regular, Consolas, "Courier New", monospace; font-size: 11px; }
#cell-expand-pop .amt { font-weight: 600; }

/* 下拉面板统一入场动画 + 加载/空态行（2026-09-07 用户报「点击弹下拉白屏过渡」：
   fetch 型面板即点即出加载行消除空白期；动画从 opacity 0 起帧消灭生硬弹白盒） */
@keyframes dd-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.dd-loading, .dd-empty { padding: 8px 10px; font-size: 12px; color: var(--muted, #7b8798); }
.group-dropdown, .dg-gdrop, .er-dd, .or-dd, .dev-pick-list, .pw-dd, .dgs-list { animation: dd-in .14s ease; }

/* 批量执行中加载动画 + 结果行滑入（订单页执行结果弹窗） */
.obk-spin {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid var(--border-strong, #d7dde6);
  border-top-color: var(--primary, #3b82f6);
  border-radius: 50%;
  animation: obk-rotate .8s linear infinite;
  vertical-align: -2px;
  margin-right: 7px;
}
@keyframes obk-rotate { to { transform: rotate(360deg); } }
.obk-row-in { animation: obk-fade .25s ease; }
@keyframes obk-fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* 达人券链接池表（自动下单·预热tab）：同订单页的省略+展开钮，浮层复用 #cell-expand-pop。
   表是 fetch 后插入的，吃不到订单页 data-colw-auto 的 table-layout:fixed；
   不钉列宽时 nowrap 文案会把列撑开，截断检测永远为假，展开箭头就不出现。 */
#coupon-pool-list table.cp-table {
  width: 100%;
  table-layout: fixed;
  font-size: 12px;
}
#coupon-pool-list table.cp-table th:nth-child(1),
#coupon-pool-list table.cp-table td:nth-child(1) { width: 28px; }
#coupon-pool-list table.cp-table th:nth-child(2),
#coupon-pool-list table.cp-table td:nth-child(2) { width: 30%; }
#coupon-pool-list table.cp-table th:nth-child(3),
#coupon-pool-list table.cp-table td:nth-child(3) { width: 12%; }
#coupon-pool-list table.cp-table th:last-child,
#coupon-pool-list table.cp-table td:last-child { width: 52px; }
#coupon-pool-list td { position: relative; overflow: hidden; }
#coupon-pool-list td.clipped { padding-right: 28px; cursor: pointer; }
#coupon-pool-list td .cp-clip {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
#coupon-pool-list td .cell-expand {
  position: absolute;
  right: 3px;
  top: 50%;
  transform: translateY(-50%);
  display: none;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--border-strong, #d7dde6);
  border-radius: 6px;
  background: var(--surface, #fff);
  color: var(--gray-text, #667085);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  z-index: 5;
}
#coupon-pool-list td .cell-expand::before {
  content: "";
  width: 11px;
  height: 11px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat center / contain;
}
#coupon-pool-list td.clipped .cell-expand { display: inline-flex; opacity: .35; }
#coupon-pool-list td.clipped:hover .cell-expand { opacity: 1; }
#coupon-pool-list td .cell-expand:hover { color: var(--primary-dark, #2563eb); border-color: var(--primary, #3b82f6); }

/* 操作列快捷按钮组（参考卡卡云后台小彩色按钮，两列网格） */
#orders-table .op-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  align-items: stretch;
}
#orders-table .op-grid form { display: contents; }
.op-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 4px;
  border: none;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.6;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  transition: filter var(--transition), box-shadow var(--transition);
}
.op-chip:hover { filter: brightness(.96); box-shadow: var(--shadow-xs); text-decoration: none; }
.op-chip:active, .voucher-btn:active, .stat-chip:active { transform: translateY(1px); filter: brightness(.9); }
.op-blue { background: var(--blue-bg, #e8f3ff); color: var(--blue-text, #2167c4); }
.op-green { background: var(--ok-bg, #e9f9ef); color: var(--ok-text, #188a48); }
.op-red { background: var(--fail-bg, #fdecec); color: var(--fail-text, #c62828); }
.op-orange { background: var(--pending-bg, #fff5e6); color: var(--pending-text, #c05621); }
.op-cyan { background: #e0f7fa; color: #0e7490; }
.op-gray { background: var(--gray-bg, #f1f3f6); color: var(--gray-text, #667085); }

/* 列表表族字段分组样式（2026-09-07 起从商品列表页铺开：下单商品/设备列表同款；
   订单/比价/券池表走各自作用域不在此列） */
#goods-table td,
#dg-table td,
#devices-table td {
  vertical-align: top;
  line-height: 1.8;
  font-variant-numeric: tabular-nums;
  position: relative; /* 截断展开钮 absolute 定位的锚 */
}
#goods-table td + td,
#dg-table td + td,
#devices-table td + td { border-left: 1px solid var(--border, #e6eaf0); }
#goods-table .gtitle,
#dg-table .gtitle,
#devices-table .gtitle { font-weight: 600; line-height: 1.45; }
#goods-table .sub,
#dg-table .sub,
#devices-table .sub { font-size: 12px; color: var(--text-soft, #475569); line-height: 1.7; }
#goods-table .lb,
#dg-table .lb,
#devices-table .lb { color: var(--muted, #7b8798); }
#goods-table .amt,
#dg-table .amt,
#devices-table .amt { font-weight: 600; }
#goods-table .mono,
#dg-table .mono,
#devices-table .mono {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Courier New", monospace;
  font-size: 11px;
  word-break: break-all;
}
#goods-table td > div:not(.op-grid),
#dg-table td > div:not(.op-grid),
#devices-table td > div:not(.op-grid) {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#goods-table .op-grid,
#dg-table .op-grid,
#devices-table .op-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  align-items: stretch;
}
#goods-table .op-grid form,
#dg-table .op-grid form,
#devices-table .op-grid form { display: contents; }

@media (max-width: 700px) {
  .mobile-cards { display: block; }
}

/* ===================== 仪表盘 v2（业务整合版） ===================== */
.dash-hero {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}

.dash-hero .dash-kpi .num { font-size: 26px; }

.dh-ok { color: var(--success); }
.dh-fail { color: var(--danger); }
.dh-sep { color: var(--muted); margin: 0 2px; font-weight: 400; }

.dash-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: start;
}

.dash-main .card { margin-bottom: 0; }

/* 近7日趋势：纯 CSS 柱状图（无图表库依赖） */
.dash-chart {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  align-items: end;
  min-height: 100px;
  padding-top: 8px;
}

.dash-bar-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }

.dash-bar {
  width: 100%;
  max-width: 42px;
  min-height: 3px;
  background: linear-gradient(180deg, var(--primary) 0%, #93c5fd 100%);
  border-radius: 5px 5px 2px 2px;
  transition: height .3s ease;
}

.dash-bar-col:hover .dash-bar { filter: brightness(1.12); }

.dash-bar-num { font-size: 12px; font-weight: 600; color: var(--primary-dark); margin-top: 4px; min-height: 15px; }
.dash-bar-label { font-size: 11px; color: var(--muted); margin-top: 2px; white-space: nowrap; }

/* 订单总览四联块（可点跳对应筛选） */
.dash-order-sum { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }

.dos-item {
  display: block;
  text-align: center;
  padding: 10px 6px;
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  background: var(--surface-soft);
  transition: border-color var(--transition), background var(--transition);
}

.dos-item:hover { border-color: var(--primary); background: var(--surface-blue); }

.dos-num { font-size: 22px; font-weight: 700; }
.dos-lab { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* 业务模块状态卡 */
.dash-mods { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.dmod {
  display: block;
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 10px 12px;
  text-decoration: none;
  background: var(--surface);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.dmod:hover { border-color: var(--primary); box-shadow: var(--shadow-xs); }

.dmod-head { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.dmod-name { font-weight: 600; color: var(--text); font-size: 14px; }
.dmod-body { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; color: var(--text-soft); margin-top: 6px; }

@media (max-width: 1100px) {
  .dash-hero { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  .dash-main { grid-template-columns: 1fr; }
}

@media (max-width: 540px) {
  .dash-hero { grid-template-columns: 1fr 1fr; }
  .dash-order-sum { grid-template-columns: repeat(2, 1fr); }
  .dash-mods { grid-template-columns: 1fr; }
}

/* ===================== 窄屏统一适配（≤700px） =====================
   所有筛选/搜索工具栏、批量编辑表单、大表隐藏规则集中在这里（外链 CSS 首帧生效，
   页面底部的内联 <style> 会导致手机端首帧旧排版闪烁，禁止再往页面里加移动布局规则）。 */

@media (max-width: 700px) {
  /* 筛选工具栏：两列 grid，替代 flex wrap 的不可控收缩 */
  .toolbar form {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 10px 8px;
    align-items: end;
  }

  .toolbar form > * { width: auto !important; min-width: 0; }

  .toolbar form select,
  .toolbar form input[type=text] { width: 100% !important; }

  .toolbar form > button[type=submit],
  .toolbar form > a.btn { height: 38px; align-self: end; }

  /* 快捷日期按钮组：弹性换行，不强制一行塞满 6 个——按内容宽度排，
     塞得下就撑满一行、塞不下自然换成整齐的两行，字号保持可读 */
  .toolbar form .quick-range {
    grid-column: 1 / -1;
    display: flex !important;
    flex-wrap: wrap;
    gap: 6px;
    background: #eef1f6;
    border-radius: 10px;
    padding: 6px;
  }

  .toolbar form .quick-range .btn {
    flex: 1 1 88px;   /* 基准 88px，行内平分拉伸 */
    max-width: 130px; /* 防末行少量按钮被拉过宽 */
    min-height: 32px;
    padding: 0 6px;
    font-size: 12.5px;
    border: none;
    border-radius: 7px;
    background: var(--surface);
    color: var(--text-soft); /* btn-gray 是白字，背景被换成白色后必须补深色文字 */
    box-shadow: 0 1px 2px rgba(16, 24, 40, .08);
    margin: 0;
  }

  .toolbar form .quick-range .btn:hover { color: var(--primary-dark); }
  .toolbar form .quick-range .btn:active { background: var(--primary); color: #fff; }

  /* 创建/添加表单（m-grid）：首个字段与提交按钮整行，其余字段两列对齐，
     替代 flex 换行的参差排布（标签折行导致输入框高低不齐） */
  form.m-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 10px 8px;
    align-items: end;
  }

  form.m-grid > * { width: auto !important; min-width: 0; }
  form.m-grid > div:first-child { grid-column: 1 / -1; }
  form.m-grid > button[type=submit] { grid-column: 1 / -1; height: 40px; }
  form.m-grid label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  /* 商品卡片底部操作行：op-chip 胶囊两列 + 删除通栏（对齐桌面操作列语言，2026-09-07） */
  .gcard .ocard-foot {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    align-items: stretch;
  }

  .gcard .ocard-foot form { display: contents; }

  .gcard .ocard-foot .op-chip { min-height: 34px; padding: 0 8px; font-size: 12.5px; }

  .gcard .ocard-foot .op-red { grid-column: 1 / -1; }

  /* 设备手机卡片操作：胶囊触控高度（沿用 flex 换行布局） */
  .dcard .ocard-foot .op-chip { min-height: 34px; padding: 0 12px; font-size: 12.5px; }

  /* 批量编辑表单（商品/下单商品）：标题整行 + 字段两列 */
  #g-batch-form,
  #dg-batch-form {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 10px 8px;
    align-items: end;
  }

  #g-batch-form > div:first-child,
  #dg-batch-form > div:first-child {
    grid-column: 1 / -1;
    padding-bottom: 0 !important;
  }

  #g-batch-form > div:not(:first-child),
  #dg-batch-form > div:not(:first-child) { min-width: 0; }

  #g-batch-form > button,
  #dg-batch-form > button { height: 38px; }

  /* 卡片列表页：隐藏桌面大表与列宽工具条（.mobile-cards 在上方 700px 块里显示） */
  .table-wrap.hide-m,
  table.hide-m { display: none; }
  .table-ctl { display: none; }

  #goods-table { display: none; }
  #devices-table { display: none; }

  /* 弹窗：说明文字收紧、设备列表限高，避免首屏全被说明占满 */
  .modal-box p.muted { font-size: 12px; margin: 6px 0; line-height: 1.5; }
  #dev-list { max-height: 34vh !important; }
}

/* ===================== 顶部快捷标签栏（导航访问过的页面生成标签） ===================== */
.qtab-bar {
  position: sticky;   /* 冻结置顶：滚动时标签栏常驻 */
  top: 0;
  z-index: 55;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 6px 2px 8px;
  margin-bottom: 4px;
  background: var(--bg);
  box-shadow: 0 1px 0 var(--border);
  scrollbar-width: thin;
}

.qtab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  max-width: 180px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-soft);
  font-size: 13px;
  text-decoration: none;
  box-shadow: var(--shadow-xs);
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}

.qtab:hover { border-color: var(--primary); color: var(--primary-dark); }

.qtab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.qtab-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.qtab-close {
  font-style: normal;
  font-size: 15px;
  line-height: 1;
  padding: 0 1px;
  border-radius: 4px;
  opacity: .55;
}

.qtab-close:hover { opacity: 1; background: rgba(127, 137, 152, .18); }
.qtab.active .qtab-close:hover { background: rgba(255, 255, 255, .25); }

/* 清空按钮：透明底细线图标，与标签同高弱化存在感；hover 浮现浅红提示危险操作 */
.qtab-clear {
  position: sticky;
  right: 0;
  flex: none;
  margin-left: 2px;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  opacity: .75;
  box-shadow: -8px 0 8px -6px var(--bg);  /* 左缘渐隐提示下方还有标签 */
  transition: color var(--transition), background var(--transition), opacity var(--transition);
}

.qtab-clear:hover { color: var(--danger); background: var(--fail-bg); opacity: 1; }

.qtab-clear svg { width: 15px; height: 15px; display: block; }

/* 手机端隐藏标签栏：走侧边栏抽屉导航，顶栏下方空间留给内容 */
@media (max-width: 900px) {
  .qtab-bar { display: none; }
}

/* SPA 标签切换过渡：慢路只把「数据区」（表格/手机卡片/分页）淡出示忙，
   统计头/搜索栏/侧栏不动（用户定规：整页灰化像页面在闪）；新内容 180ms 淡入；预取命中(80ms内)全程无感。
   规则必须独立写：:not() 内含后代选择器在部分引擎无效，逗号分组会整组连坐丢弃。 */
.main.fh-spa-loading { pointer-events: none; }
.table-wrap { transition: opacity .15s ease; }
.mobile-cards { transition: opacity .15s ease; }
.pager { transition: opacity .15s ease; }
.main table { transition: opacity .15s ease; }
.main.fh-spa-loading table { opacity: .55; }
.main.fh-spa-loading .mobile-cards { opacity: .55; }
.main.fh-spa-loading .pager { opacity: .55; }
@keyframes fh-spa-fade-in { from { opacity:  0; } to { opacity: 1; } }
.main.fh-spa-enter { animation: fh-spa-fade-in .18s ease; }

/* 加链弹窗过期 chips：压过全局 input{width:100%}，自定义与快捷项同一套选中态 */
#ph-add-modal .ph-exp-presets {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
#ph-add-modal .ph-exp-presets .ph-exp-preset {
  flex: 0 0 auto;
  width: auto;
  max-width: 100%;
}
#ph-add-modal .ph-exp-presets .ph-exp-custom .ph-exp-unit,
#ph-add-modal .ph-exp-presets .ph-exp-custom input[type="number"] {
  display: none;
}
#ph-add-modal .ph-exp-presets .ph-exp-custom.active .ph-exp-unit {
  display: inline;
}
#ph-add-modal .ph-exp-presets .ph-exp-custom.active input[type="number"] {
  display: inline-block;
  width: 48px;
  min-width: 48px;
  max-width: 48px;
  height: 22px;
  padding: 0 4px;
  margin: 0;
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 999px;
  background: #fff;
  color: #1f2937;
  font-size: 12px;
  line-height: 22px;
  text-align: center;
  flex: none;
  box-shadow: none;
  appearance: textfield;
  -moz-appearance: textfield;
}
#ph-add-modal .ph-exp-presets .ph-exp-custom.active input[type="number"]:focus {
  outline: none;
  box-shadow: none;
  border-color: rgba(255,255,255,.95);
  background: #fff;
}

/* ===================== 订单页移动端 H5 重设计（20260903） =====================
   三层信息卡（商品/状态/金额 → 过程徽标行 → details 收纳长单号）+ 失败卡红底
   + 筛选 checkbox-hack 纯 CSS 折叠 + 统计头瓦片。全部 CSS 变量化随主题走，
   桌面（>700px）零变化：移动专属元素默认 display:none。 */
/* 20260921 顶部重设计：标题行动作钮类接管原内联 float 样式（桌面等值渲染；
   手机段 h2 变 flex 后 float 自然失效，由 flex 布局接管对齐） */
.or-title .h2-actions { float: right; display: flex; gap: 8px; align-items: center; }
.order-stats .ms-strip,
.mf-sw,
.mf-toggle,
.mf-chips,
.mf-f-apply { display: none; }

@media (max-width: 700px) {

  /* ---------- 0) 订单页卡片容器：flex 列 + 全子元素显式 order ----------
     顶部动线=标题行→统计面板→搜索栏→批量操作；列表/分页压尾。
     必须给每个直接子元素显式 order（列表/分页也在 .card 里，只给个别元素设
     order 会把 order:0 的列表排到搜索栏上面）。全部挂 .or-card 作用域，
     .order-stats 容器类被 xy_shops/price_watch 共用，不能裸写。 */
  .or-card { display: flex; flex-direction: column; }
  .or-card > h2.or-title { order: 0; }
  .or-card > .order-stats { order: 1; }
  .or-card > .toolbar.mf-toolbar { order: 2; margin: 0 0 12px; }
  .or-card > #ord-batch-box { order: 3; border-top-color: var(--border) !important; }
  #ord-batch-box .bat-note { display: none; } /* 手机收起长说明，只留「已选 N 项」 */
  .or-card > .order-cards { order: 4; }
  .or-card > .pager { order: 5; }

  /* ---------- 1) 标题行：flex 头行（标题左 / 入口钮右，基线对齐） ---------- */
  .or-card > h2.or-title {
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px; min-height: 38px; margin: 0 0 12px;
    font-size: 17px; line-height: 1.3;
  }
  .or-title .h2-cnt { display: none; } /* 总数与统计面板脚注重复，手机只留一处 */
  .or-title .h2-actions { float: none; flex: none; display: inline-flex; }
  .or-title .h2-actions .btn {
    min-height: 38px; padding: 0 12px; font-size: 13px; gap: 5px;
    background: var(--surface); border: 1px solid var(--border-strong); color: var(--text-soft);
    box-shadow: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  }
  .or-title .h2-actions .btn::before {
    content: ""; flex: none; width: 14px; height: 14px; background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 16a2 2 0 0 0 2-2H6a2 2 0 0 0 2 2zM8 1.918l-.797.161A4.002 4.002 0 0 0 4 6c0 .628-.134 2.197-.459 3.742-.16.767-.376 1.566-.663 2.258h10.244c-.287-.692-.502-1.49-.663-2.258C12.134 8.197 12 6.628 12 6a4.002 4.002 0 0 0-3.203-3.92L8 1.917zM14.22 12c.223.447.481.801.78 1H1c.299-.199.557-.553.78-1C2.68 10.2 3 6.88 3 6c0-2.42 1.72-4.44 4.005-4.901a1 1 0 1 1 1.99 0A4.002 4.002 0 0 1 13 6c0 .88.32 4.2 1.22 6z'/%3E%3C/svg%3E") center/contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 16a2 2 0 0 0 2-2H6a2 2 0 0 0 2 2zM8 1.918l-.797.161A4.002 4.002 0 0 0 4 6c0 .628-.134 2.197-.459 3.742-.16.767-.376 1.566-.663 2.258h10.244c-.287-.692-.502-1.49-.663-2.258C12.134 8.197 12 6.628 12 6a4.002 4.002 0 0 0-3.203-3.92L8 1.917zM14.22 12c.223.447.481.801.78 1H1c.299-.199.557-.553.78-1C2.68 10.2 3 6.88 3 6c0-2.42 1.72-4.44 4.005-4.901a1 1 0 1 1 1.99 0A4.002 4.002 0 0 1 13 6c0 .88.32 4.2 1.22 6z'/%3E%3C/svg%3E") center/contain no-repeat;
  }

  /* ---------- 2) 统计+快筛：合并成一块分段面板（今日/昨日两列 → 脚注行 → 三段快筛） ---------- */
  .or-card .order-stats .os-row { display: none; }
  .or-card > .order-stats { padding: 0; gap: 0; overflow: hidden; }
  .or-card .order-stats .ms-strip { display: grid; grid-template-columns: 1fr 1fr; margin: 0; }
  .or-card .order-stats .ms-cell { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 10px 12px 9px; }
  .or-card .order-stats .ms-cell + .ms-cell { border-left: 1px solid var(--border); } /* 50/50 竖分隔，列宽恒定不随内容参差 */
  .or-card .order-stats .ms-l { font-size: 12px; line-height: 1.2; color: var(--muted); }
  .or-card .order-stats .ms-d { font-size: 12px; line-height: 1.2; color: var(--text-soft); white-space: nowrap; }
  .or-card .order-stats .ms-d b { font-size: 20px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
  .or-card .order-stats .ms-a { font-size: 12.5px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
  .or-card .order-stats .ms-tail { grid-column: 1 / -1; padding: 7px 12px 8px; background: var(--surface); border-top: 1px solid var(--border); text-align: center; font-size: 12px; color: var(--muted); }
  /* 快筛：分段控件（stat-chip 类名/active-*/href 原样，base.html 全局 JS 依赖不动） */
  .or-card .order-stats .os-chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin: 0; border-top: 1px solid var(--border); background: var(--surface); }
  .or-card .order-stats .os-chips .stat-chip {
    flex: none; min-height: 42px; margin-right: 0; padding: 0 4px;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    border: none; border-left: 1px solid var(--border); border-radius: 0;
    background: transparent; line-height: 1.2; font-size: 12.5px; white-space: nowrap;
    touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  }
  .or-card .order-stats .os-chips .stat-chip:first-child { border-left: none; }
  /* 计数从三色实底徽章改彩色纯文字：颜色只当信息不当装饰 */
  .or-card .order-stats .os-chips .stat-chip .cnt { min-width: 0; padding: 0; border-radius: 0; background: none; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
  .or-card .order-stats .os-chips .cnt-pending { color: var(--warning); }
  .or-card .order-stats .os-chips .cnt-ok { color: var(--success); }
  .or-card .order-stats .os-chips .cnt-fail { color: var(--danger); }
  .or-card .order-stats .os-chips .stat-chip.active-pending { background: var(--pending-bg); color: var(--pending-text); box-shadow: inset 0 -2px 0 var(--warning); }
  .or-card .order-stats .os-chips .stat-chip.active-ok { background: var(--ok-bg); color: var(--ok-text); box-shadow: inset 0 -2px 0 var(--success); }
  .or-card .order-stats .os-chips .stat-chip.active-fail { background: var(--fail-bg); color: var(--fail-text); box-shadow: inset 0 -2px 0 var(--danger); }
  .or-card .order-stats .os-chips .stat-chip.active-pending .cnt,
  .or-card .order-stats .os-chips .stat-chip.active-ok .cnt,
  .or-card .order-stats .os-chips .stat-chip.active-fail .cnt { color: inherit; }

  /* ---------- 3) 筛选工具栏：贴合搜索组 + 双图标钮首行（checkbox-hack 机制不变） ---------- */
  /* .toolbar form 是共享移动规则（两列 grid !important），须用同级 !important + 更高优先级压回六列 */
  .toolbar form.m-form { display: grid !important; grid-template-columns: repeat(6, 1fr) !important; gap: 10px 8px; align-items: end; }
  .m-form .mf-f { min-width: 0; }
  /* 首行：关键词占 4 列 + 主色放大镜钮贴合其右（负 margin 吃掉列间距+1px 边框），筛选图标钮收尾 */
  .m-form .mf-f-kw { grid-area: 1 / 1 / 2 / 5; display: flex; }
  .m-form .mf-f-kw input[type=text] { width: 100% !important; min-width: 0; min-height: 40px; font-size: 16px; border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
  .m-form .mf-f-btn { grid-area: 1 / 5 / 2 / 6; display: flex; margin-left: -9px; }
  .m-form .mf-f-btn .btn {
    width: 100%; min-height: 40px; padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  }
  .m-form .mf-f-btn .btn::before {
    content: ""; flex: none; width: 16px; height: 16px; background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E") center/contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E") center/contain no-repeat;
  }
  .m-form .mf-t { display: none; } /* 手机隐藏按钮文字（放大镜钮/漏斗钮图标化） */
  /* 筛选开关 → 图标方钮，激活数角标浮右上角 */
  .m-form .mf-toggle {
    grid-area: 1 / 6 / 2 / 7; position: relative;
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 40px; border: 1px solid var(--border); border-radius: var(--radius-sm);
    background: var(--surface); color: var(--text-soft); font-size: 13px; cursor: pointer;
    user-select: none; -webkit-user-select: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  }
  .m-form .mf-toggle::before { content: ""; flex: none; width: 16px; height: 16px; background-color: currentColor; opacity: .85; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M1.5 2.5h13l-5 6v4.2L6.5 11V8.5z'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M1.5 2.5h13l-5 6v4.2L6.5 11V8.5z'/%3E%3C/svg%3E") center/contain no-repeat; }
  .m-form .mf-n {
    position: absolute; top: -5px; right: -5px;
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px;
    background: var(--primary); color: var(--surface);
    font-size: 10px; font-style: normal; font-weight: 600;
    border: 2px solid var(--surface);
  }
  .m-form .mf-sw:checked ~ .mf-toggle { background: var(--primary); border-color: var(--primary); color: var(--surface); }
  .m-form .mf-sw:checked ~ .mf-toggle .mf-n { background: var(--surface); color: var(--primary); }
  /* 激活筛选指示 chips：横向滑动，点击即展开面板 */
  .m-form .mf-chips { grid-area: 2 / 1 / 3 / 7; display: flex; gap: 6px; overflow-x: auto; padding: 1px 0 2px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .m-form .mf-chips::-webkit-scrollbar { display: none; }
  .m-form .mf-chip { display: inline-flex; align-items: center; flex: none; height: 26px; padding: 0 10px; border-radius: 999px; background: var(--blue-bg); color: var(--blue-text); font-size: 12px; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
  /* 收起态：除首行搜索区外全隐藏（display:none 的表单字段仍随 GET 提交，已设筛选不丢） */
  .m-form .mf-sw:not(:checked) ~ .mf-f:not(.mf-f-kw):not(.mf-f-btn) { display: none; }
  /* 展开态字段排布：两列半宽，设备/快捷日期/操作整行 */
  .m-form .mf-f-sf { grid-area: 3 / 1 / 4 / 4; }
  .m-form .mf-f-status { grid-area: 3 / 4 / 4 / 7; }
  .m-form .mf-f-down { grid-area: 4 / 1 / 5 / 4; }
  .m-form .mf-f-source { grid-area: 4 / 4 / 5 / 7; }
  .m-form .mf-f-dev { grid-area: 5 / 1 / 6 / 7; }
  .m-form .mf-f-dev .dev-pick { width: 100% !important; }
  .m-form .mf-f-date1 { grid-area: 6 / 1 / 7 / 4; }
  .m-form .mf-f-date2 { grid-area: 6 / 4 / 7 / 7; }
  .m-form .mf-f-date { width: auto !important; }
  .m-form .mf-f-quick { grid-area: 7 / 1 / 8 / 7; }
  .m-form .mf-f-quick .quick-range { flex-wrap: nowrap; align-items: center !important; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
  .m-form .mf-f-quick .quick-range::-webkit-scrollbar { display: none; }
  .m-form .mf-f-quick .quick-range .btn { flex: none; }
  .m-form .mf-f-apply { grid-area: 8 / 1 / 9 / 7; display: flex; gap: 8px; }
  .m-form .mf-f-apply .btn { flex: 1; min-height: 40px; }
  /* 字段控件：覆盖模板内联宽度（!important 限本作用域）；16px 防 iOS 聚焦缩放 */
  .m-form .mf-f select,
  .m-form .mf-f input[type=text] { width: 100% !important; min-width: 0; min-height: 40px; font-size: 16px; }
  .m-form .mf-f label { display: block; margin: 0 0 3px; font-size: 11px; color: var(--muted); }

  /* ---------- 3) 订单卡：三层信息结构（全部挂 .order-cards 作用域，不碰共用 .ocard） ---------- */
  .order-cards { padding-bottom: env(safe-area-inset-bottom); }
  .order-cards .oc-card { position: relative; display: flex; flex-direction: column; gap: 8px; margin: 0 0 10px; padding: 12px 12px 10px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: calc(var(--radius) + 2px); box-shadow: var(--shadow-xs); overflow: hidden; }
  /* 左侧状态色条：让状态在卡上有视觉分量 */
  .order-cards .oc-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--muted); opacity: .45; }
  .order-cards .oc-st-warn::before { background: var(--warning); opacity: 1; }
  .order-cards .oc-st-ok::before { background: var(--success); opacity: 1; }
  .order-cards .oc-st-danger::before { background: var(--danger); opacity: 1; }
  /* 异常卡（失败/待人工/已标失败）：浅红底 + 红边，一眼定位 */
  .order-cards .oc-alert { background: var(--fail-bg); border-color: var(--danger); }
  /* 第一层：商品/状态 + 金额/利润 */
  .order-cards .oc-main { display: flex; align-items: flex-start; gap: 10px; }
  .order-cards .oc-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
  .order-cards .oc-goods { font-size: 15px; font-weight: 600; line-height: 1.35; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .order-cards .oc-money { flex: none; max-width: 46%; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
  .order-cards .oc-amt { font-size: 18px; font-weight: 700; line-height: 1.15; color: var(--text); white-space: nowrap; font-variant-numeric: tabular-nums; }
  .order-cards .oc-amt i { font-style: normal; font-size: 11px; font-weight: 400; color: var(--muted); margin-left: 3px; }
  .order-cards .oc-profit { font-size: 12px; line-height: 1.3; white-space: nowrap; }
  .order-cards .oc-p-pos { color: var(--ok-text, #188a48); }
  .order-cards .oc-p-neg { color: var(--fail-text, #c62828); }
  .order-cards .oc-p-mut { color: var(--muted); }
  .order-cards .oc-xyhint { color: var(--muted); font-weight: 400; }
  /* 第二层：过程状态徽标行（下单/验证/来源/设备） */
  .order-cards .oc-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
  .order-cards .oc-tag { display: inline-flex; align-items: center; gap: 4px; min-width: 0; }
  .order-cards .oc-tag i { font-style: normal; font-size: 11px; color: var(--muted); }
  .order-cards .oc-dev { max-width: 110px; font-size: 12px; color: var(--text-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .order-cards .oc-vprice { font-style: normal; font-size: 11px; color: var(--muted); }
  .order-cards .oc-attach { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .order-cards .oc-attach b { margin-left: 2px; font-weight: 600; color: var(--text-soft); }
  /* 失败原因：永不折叠，最多 3 行，title 看全文 */
  .order-cards .oc-reason { display: flex; gap: 6px; padding: 6px 8px; border: 1px dashed var(--danger); border-radius: var(--radius-sm); background: var(--surface); font-size: 12px; line-height: 1.5; }
  .order-cards .oc-reason b { flex: none; color: var(--danger); }
  .order-cards .oc-reason span { min-width: 0; word-break: break-all; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; color: var(--fail-text); }
  /* 第三层：原生 details 收纳长信息 */
  .order-cards .oc-more { border-top: 1px dashed var(--border); }
  .order-cards .oc-more summary { list-style: none; display: flex; align-items: center; justify-content: center; gap: 5px; min-height: 34px; font-size: 12px; color: var(--text-soft); cursor: pointer; user-select: none; -webkit-user-select: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
  .order-cards .oc-more summary::-webkit-details-marker { display: none; }
  .order-cards .oc-more summary::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg); margin-top: -3px; transition: transform var(--transition); }
  .order-cards .oc-more[open] summary::after { transform: rotate(225deg); margin-top: 2px; }
  .order-cards .oc-kv { display: flex; flex-direction: column; gap: 6px; padding: 2px 0 6px; }
  .order-cards .oc-kv .r { display: flex; gap: 8px; font-size: 12px; line-height: 1.5; }
  .order-cards .oc-kv .k { flex: none; width: 64px; color: var(--muted); }
  .order-cards .oc-kv .v { min-width: 0; word-break: break-all; color: var(--text-soft); }
  /* 操作区：快捷芯片加高好按 + 主按钮突出 */
  .order-cards .oc-ops { display: flex; flex-wrap: wrap; gap: 6px; }
  .order-cards .oc-opf { display: inline-flex; margin: 0; padding: 0; }
  .order-cards .oc-ops .op-chip { min-height: 32px; padding: 0 12px; font-size: 12px; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }

  /* 订单手机卡片勾选框（批量操作，仅待处理卡渲染） */
  .oc-main .oc-check { flex: none; align-self: center; display: flex; align-items: center; padding: 4px 6px 4px 0; }
  .oc-main .oc-check input { width: 18px; height: 18px; }
  .order-cards .oc-ops .voucher-btn { min-height: 32px; touch-action: manipulation; }
  .order-cards .oc-foot { display: flex; align-items: center; gap: 10px; margin-top: -2px; padding-top: 8px; border-top: 1px solid var(--border); }
  .order-cards .oc-time { flex: 1; min-width: 0; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .order-cards .oc-go { flex: none; min-width: 84px; min-height: 36px; line-height: 36px; padding: 0 16px; border-radius: var(--radius-sm); text-align: center; touch-action: manipulation; }
  /* 空态 */
  .order-cards .oc-empty { padding: 28px 16px; border: 1px dashed var(--border); border-radius: calc(var(--radius) + 2px); background: var(--surface); text-align: center; font-size: 13px; color: var(--muted); }
  /* 按压反馈 */
  .order-cards .op-chip:active, .order-cards .oc-go:active, .order-cards .oc-more summary:active,
  .m-form .mf-toggle:active, .m-form .mf-chip:active { transform: scale(.96); }

  /* ---------- 4) 分页：紧凑横滑（兄弟选择器只命中订单页卡片列表后的 pager） ---------- */
  .order-cards ~ .pager { display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; overflow-x: auto; padding: 10px 2px calc(2px + env(safe-area-inset-bottom)); scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .order-cards ~ .pager::-webkit-scrollbar { display: none; }
  .order-cards ~ .pager * { flex: none; }
}

/* 尊重系统减弱动效偏好 */
@media (prefers-reduced-motion: reduce) {
  .order-cards *, .m-form .mf-toggle, .m-form .mf-chip { transition: none !important; animation: none !important; }
}

/* ===================== 订单详情页移动端 H5（20260903，设计语言同订单列表卡） =====================
   摘要卡（hero）+ KV 表堆叠 + 处理表单纵排 + 回执日志卡片化；桌面（>700px）零变化。 */
.od-hero-wrap { display: none; }
/* 订单处理手风琴（桌面默认）：details/分组壳用 display:contents 透传，
   表单仍是 .order-actions 的直接 flex 项——桌面布局与旧版完全一致；summary 只在手机显示 */
.od-act, .od-quick { display: contents; }
.od-act summary { display: none; }

@media (max-width: 700px) {

  /* 摘要卡：与列表 .oc-card 同款外壳（详情页不在 .order-cards 作用域内，独立成套） */
  .od-hero-wrap { display: block; margin: 2px 0 12px; }
  .od-hero { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 12px 12px 10px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: calc(var(--radius) + 2px); box-shadow: var(--shadow-xs); overflow: hidden; }
  .od-hero::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--muted); opacity: .45; }
  .od-hero.oc-st-warn::before { background: var(--warning); opacity: 1; }
  .od-hero.oc-st-ok::before { background: var(--success); opacity: 1; }
  .od-hero.oc-st-danger::before { background: var(--danger); opacity: 1; }
  .od-hero.od-alert { background: var(--fail-bg); border-color: var(--danger); }
  .od-hero .oc-main { display: flex; align-items: flex-start; gap: 10px; }
  .od-hero .oc-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
  .od-hero .oc-goods { font-size: 15px; font-weight: 600; line-height: 1.35; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .od-hero .oc-money { flex: none; max-width: 46%; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
  .od-hero .oc-amt { font-size: 18px; font-weight: 700; line-height: 1.15; color: var(--text); white-space: nowrap; font-variant-numeric: tabular-nums; }
  .od-hero .oc-amt i { font-style: normal; font-size: 11px; font-weight: 400; color: var(--muted); margin-left: 3px; }
  .od-hero .oc-profit { font-size: 12px; line-height: 1.3; white-space: nowrap; }
  .od-hero .oc-p-pos { color: var(--ok-text, #188a48); }
  .od-hero .oc-p-neg { color: var(--fail-text, #c62828); }
  .od-hero .oc-p-mut { color: var(--muted); }
  .od-hero .oc-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
  .od-hero .oc-tag { display: inline-flex; align-items: center; gap: 4px; min-width: 0; }
  .od-hero .oc-tag i { font-style: normal; font-size: 11px; color: var(--muted); }
  .od-hero .oc-vprice { font-style: normal; font-size: 11px; color: var(--muted); }
  .od-hero .oc-attach { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .od-hero .oc-attach b { margin-left: 2px; font-weight: 600; color: var(--text-soft); }
  .od-hero .oc-foot { display: flex; align-items: center; gap: 10px; padding-top: 8px; border-top: 1px solid var(--border); }
  .od-hero .oc-time { flex: 1; min-width: 0; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  /* KV 表堆叠：th 变小标签、td 变值行（订单详情/自动下单/充值字段明细共用） */
  .od-kv, .od-kv tbody { display: block; }
  .od-kv thead { display: none; }
  .od-kv tr { display: block; padding: 9px 0; border-bottom: 1px dashed var(--border); }
  .od-kv tr:last-child { border-bottom: none; }
  .od-kv th { display: block; width: auto; min-width: 0; padding: 0 0 4px; background: none; color: var(--muted); font-size: 11px; font-weight: 500; white-space: normal; }
  .od-kv td { display: block; padding: 0; border-bottom: none; text-align: left; font-size: 13px; line-height: 1.6; word-break: break-all; }
  /* 利润行的内嵌小表单（保存成本/标为系统单）：纵排占满行 */
  .od-kv td form { display: flex !important; flex-wrap: wrap; gap: 6px; width: 100%; margin: 8px 0 0 !important; }
  .od-kv td form input[type=text] { flex: 1; min-width: 0; width: auto !important; }
  /* 充值字段明细（td+td 两列）：首列作标签 */
  .od-kv-fields td:first-child { padding: 0 0 4px; color: var(--muted); font-size: 11px; }
  .od-kv-fields td:last-child { font-size: 13px; color: var(--text-soft); }

  /* 订单处理：手风琴折叠（发货/失败两大表单收成两条可点开行）+ 纯按钮三等分一行 */
  .order-actions { flex-direction: column; gap: 10px; }
  .od-act { display: block; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); overflow: hidden; }
  .od-act summary { display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 12px; list-style: none; cursor: pointer; user-select: none; -webkit-user-select: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
  .od-act summary::-webkit-details-marker { display: none; }
  .od-act summary b { font-size: 14px; }
  .od-act-ok summary b { color: var(--success); }
  .od-act-fail summary b { color: var(--danger); }
  .od-act-tip { font-size: 11px; color: var(--muted); }
  .od-act summary::after { content: ""; margin-left: auto; flex: none; width: 7px; height: 7px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg); transition: transform var(--transition); }
  .od-act[open] summary::after { transform: rotate(225deg); }
  .od-act-body { padding: 0 12px 12px; }
  .od-act-body .form-row { margin-bottom: 8px; }
  .od-act-body label { display: none; }
  .od-act-body textarea { height: 66px; font-size: 16px; }
  .od-act-body .btn { width: 100%; min-height: 40px; }
  .od-quick { display: flex; gap: 8px; }
  .od-quick form { flex: 1; margin: 0; }
  .od-quick .form-row { display: none; }
  .od-quick .btn { width: 100%; min-height: 38px; font-size: 12.5px; padding: 0 4px; }

  /* 回执日志：每条一卡，字段名前缀 */
  .od-logs, .od-logs tbody { display: block; }
  .od-logs thead { display: none; }
  .od-logs tr { display: block; padding: 8px 12px; margin-bottom: 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-soft); }
  .od-logs td { display: block; padding: 2px 0; font-size: 12px; line-height: 1.6; word-break: break-all; }
  .od-logs td[data-l]::before { content: attr(data-l) "·"; margin-right: 4px; color: var(--muted); font-size: 11px; }
  .od-logs td:first-child { font-size: 11px; }
}

/* ===================== 闲鱼两页重设计（20260903：订单=销售账本 / 店铺=舰队+凭证金库） =====================
   签名元素：闲鱼黄竖标（--xy-brand）只用于两页页头标题左侧，其余全部走系统 token。 */
:root { --xy-brand: #ffd21e; }

/* 页头标题黄竖标（两页共用） */
.xy-h2 { position: relative; padding-left: 13px !important; }
.xy-h2::before { content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 5px; height: 1.15em; border-radius: 3px; background: var(--xy-brand); }

/* ---------- 闲鱼订单：账本 ---------- */
/* 统计带：四格分栏，金额是头版数字（tabular 数字、放大），格间细分隔线 */
.xyo-stats { display: flex; align-items: stretch; gap: 0; margin: 2px 0 14px; padding: 12px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.xyo-stat { flex: 1 1 150px; min-width: 140px; display: flex; flex-direction: column; gap: 3px; padding: 2px 18px; border-left: 1px solid var(--border); }
.xyo-stat:first-child { border-left: none; padding-left: 2px; }
.xyo-stat .k { font-size: 12px; color: var(--muted); }
.xyo-stat .v { font-size: 19px; font-weight: 700; line-height: 1.25; font-variant-numeric: tabular-nums; color: var(--text); }
.xyo-stat .v small { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 4px; }
.xyo-stat .v.xy-money { font-size: 21px; }
.xyo-stat .v.xy-money i { font-style: normal; font-size: 13px; font-weight: 500; color: var(--text-soft); margin-right: 2px; }
.xyo-stat.warn .v { color: var(--pending-text); }
.xyo-stat.warn .v a { color: inherit; text-decoration: none; border-bottom: 1px dashed var(--pending-text); }
.xyo-stat .v.xy-zero { color: var(--muted); font-weight: 600; }
.xyo-stat .sub { font-size: 11px; color: var(--muted); }

/* 筛选行：状态 chips 带计数 + 快捷区间 + 搜索表单 */
.xyo-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.xyo-filters .chip { margin-right: 0; }
.xyo-filters .chip a { color: inherit; text-decoration: none; }
.xyo-filters .chip b { margin-left: 4px; font-variant-numeric: tabular-nums; }
.xyo-filters form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.xyo-quick { display: inline-flex; align-items: center; gap: 4px; padding: 0 8px; margin-left: 10px; }
.xyo-quick a { font-size: 12px; color: var(--text-soft); text-decoration: none; padding: 3px 8px; border-radius: 6px; border: 1px solid transparent; }
.xyo-quick a:hover { border-color: var(--border-strong); background: var(--surface-soft); }
.xyo-quick a.on { color: var(--primary-dark); background: var(--surface-blue); border-color: var(--primary); font-weight: 600; }

/* 账本表格 */
#xy-orders-table td.xy-mono { font-family: ui-monospace, SFMono-Regular, Consolas, "Courier New", monospace; font-size: 12px; color: var(--muted); }
#xy-orders-table td.xy-amt { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
#xy-orders-table td.xy-amt .cell-sub { font-weight: 500; }
#xy-orders-table .xy-st-main { display: inline-flex; align-items: center; }
#xy-orders-table .xy-st-sub { display: block; margin-top: 3px; }
/* 待处理退款行：琥珀左缘条（要动手的单一眼可见） */
#xy-orders-table tr.xy-att > td:first-child { box-shadow: inset 3px 0 0 0 var(--warning); }

/* 推送流水：降级为折叠流（mono 流 + 成败点），不再占平铺表格 */
.xyo-feed { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-soft); margin-top: 14px; }
.xyo-feed > summary { display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 14px; cursor: pointer; user-select: none; -webkit-user-select: none; font-size: 13px; font-weight: 600; color: var(--text-soft); list-style: none; }
.xyo-feed > summary::-webkit-details-marker { display: none; }
.xyo-feed > summary::after { content: ""; margin-left: auto; width: 7px; height: 7px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg); transition: transform var(--transition); }
.xyo-feed[open] > summary::after { transform: rotate(225deg); margin-top: 3px; }
.xyo-feed .xf-cap { font-size: 11px; font-weight: 400; color: var(--muted); }
.xyo-feed-body { max-height: 320px; overflow-y: auto; padding: 2px 14px 10px; }
.xf-row { display: grid; grid-template-columns: 150px minmax(180px, 1.4fr) auto auto 12px; gap: 12px; align-items: center; padding: 5px 0; border-top: 1px dashed var(--border); font-size: 12px; }
.xf-row:first-child { border-top: none; }
.xf-row .t { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.xf-row .no { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; color: var(--text-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xf-row .dot { width: 7px; height: 7px; border-radius: 50%; justify-self: center; }
.xf-row .dot.ok { background: var(--success); }
.xf-row .dot.bad { background: var(--danger); }

/* ---------- 闲鱼店铺：凭证金库 + 店铺舰队 ---------- */
/* 账户面板：凭证从宽表改为面板四槽 */
.xys-acc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; margin-top: 12px; }
.xys-acc { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); box-shadow: var(--shadow-xs); }
.xys-acc.off { background: var(--surface-soft); }
.xys-acc-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.xys-acc-head .nm { font-size: 15px; font-weight: 700; }
.xys-acc-head .aid { font-size: 11px; color: var(--muted); }
.xys-acc-head .rm { margin-left: auto; font-size: 12px; color: var(--muted); max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xys-creds { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.xys-cred { display: flex; flex-direction: column; gap: 2px; padding: 7px 9px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface-soft); min-width: 0; }
.xys-cred .lab { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.xys-cred .lab .led { width: 6px; height: 6px; border-radius: 50%; background: var(--border-strong); flex: none; }
.xys-cred.on { background: var(--ok-bg); border-color: rgba(22, 163, 74, .25); }
.xys-cred.on .lab { color: var(--ok-text); }
.xys-cred.on .lab .led { background: var(--success); }
.xys-cred .val { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11.5px; color: var(--text-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xys-acc-ops { display: flex; gap: 6px; flex-wrap: wrap; border-top: 1px dashed var(--border); padding-top: 10px; }

/* 店铺舰队：按管家账号分组 + 瓦片 grid */
.xys-fleet { margin-top: 4px; }
.xys-group { display: flex; align-items: baseline; gap: 10px; margin: 16px 0 8px; }
.xys-group .g-nm { font-size: 13px; font-weight: 700; color: var(--text-soft); }
.xys-group .g-line { flex: 1; border-top: 1px solid var(--border); }
.xys-group .g-n { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.xys-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(235px, 1fr)); gap: 10px; }
.xys-shop { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 11px 12px 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); box-shadow: var(--shadow-xs); transition: border-color var(--transition), box-shadow var(--transition); }
.xys-shop:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.xys-shop::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 2px; background: var(--border-strong); }
.xys-shop.ok::before { background: var(--success); }
.xys-shop.bad::before { background: var(--danger); }
.xys-shop.soon::before { background: var(--warning); }
.xys-shop-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.xys-shop-top .nm { font-size: 14px; font-weight: 600; color: var(--text); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xys-shop-sub { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xys-shop-foot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
/* 剩余天数 pill：>30 绿 / ≤30 琥珀 / ≤7 与已到期红 / 无期限灰 */
.xys-day { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.xys-day.ok { background: var(--ok-bg); color: var(--ok-text); }
.xys-day.warn { background: var(--pending-bg); color: var(--pending-text); }
.xys-day.bad { background: var(--fail-bg); color: var(--fail-text); }
.xys-day.none { background: var(--gray-bg); color: var(--gray-text); font-weight: 500; }
/* 服务代码 mono 小片 */
.xys-svc { display: inline-flex; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 10.5px; color: var(--gray-text); background: var(--gray-bg); border-radius: 5px; padding: 2px 6px; white-space: nowrap; }

/* ---------- 闲鱼两页：移动端 ---------- */
@media (max-width: 700px) {
  .xyo-stats { padding: 8px 0; }
  .xyo-stat { flex: 1 1 calc(50% - 18px); min-width: 0; padding: 6px 12px; }
  .xyo-stat:nth-child(odd) { border-left: none; padding-left: 2px; }
  .xyo-stat .v { font-size: 17px; }
  .xyo-stat .v.xy-money { font-size: 18px; }
  .xyo-filters form { margin-left: 0; width: 100%; }
  .xyo-filters form input[type=text] { flex: 1; min-width: 0; width: auto !important; }
  .xyo-quick { margin-left: 0; padding: 0 2px; }
  .xf-row { grid-template-columns: 1fr auto 12px; gap: 4px 10px; }
  .xf-row .no { grid-column: 1 / -1; }
  .xys-acc-grid { grid-template-columns: 1fr; }
  .xys-acc-head .rm { max-width: 100%; margin-left: 0; }
  .xys-tiles { grid-template-columns: 1fr; }
}

/* ===================== cpv 链接池·弹药库重构（2026-09-03）=====================
   库存是可数的券张：分段水位条（一块=一单可卖）是本层签名元素。
   色板 scoped：ink/mut/band/line + go(健康/库存) warn(带伤) bad(死链/停派)
   数字一律等宽计量体（内网后台不引外部字体）。 */
.cpv-goods {
  --cpv-ink: #17251f;
  --cpv-mut: #64766e;
  --cpv-band: #eff6f2;
  --cpv-line: #d5e2db;
  --cpv-go: #0f7b5e;
  --cpv-go-soft: #def2ea;
  --cpv-warn: #9a5b00;
  --cpv-warn-soft: #fbeedb;
  --cpv-bad: #b3261e;
  --cpv-bad-soft: #fbe9e7;
  --cpv-num: "JetBrains Mono", ui-monospace, Consolas, monospace;
  border: 1px solid var(--cpv-line);
  border-radius: 12px;
  background: var(--surface);
  margin-bottom: 12px;
  overflow: hidden;
}

/* 头带：名称 + 主操作，压一行 */
.cpv-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 14px; background: var(--cpv-band);
  border-bottom: 1px solid var(--cpv-line);
  cursor: pointer; user-select: none;
}
.cpv-goods:not(.open) .cpv-body { display: none; }
.cpv-caret {
  width: 0; height: 0; flex: none;
  border-left: 5px solid transparent; border-right: 5px solid transparent;
  border-top: 6px solid var(--cpv-mut);
  transition: transform .15s ease;
}
.cpv-goods.open .cpv-caret { transform: rotate(90deg); }
.cpv-title { font-weight: 700; color: var(--cpv-ink); min-width: 0; flex: 1 1 260px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cpv-kicker { font-size: 11px; letter-spacing: .12em; color: var(--cpv-mut); }
.cpv-act { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.cpv-act .btn { min-width: 0; }

/* 库存塔：大数字 + 拼接水位带 + 事实行 */
.cpv-tower {
  display: flex; align-items: stretch; gap: 16px; padding: 12px 14px 10px;
  border-bottom: 1px solid var(--cpv-line); flex-wrap: wrap;
}
.cpv-stockbox { display: flex; flex-direction: column; justify-content: center; min-width: 118px; }
.cpv-stocknum {
  font-family: var(--cpv-num); font-variant-numeric: tabular-nums;
  font-size: 40px; font-weight: 700; line-height: 1; color: var(--cpv-go);
}
.cpv-stocknum.is-zero { color: var(--cpv-bad); }
.cpv-stocklabel { font-size: 12px; color: var(--cpv-mut); margin-top: 4px; letter-spacing: .06em; }
.cpv-stockside { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 7px; justify-content: center; }
.cpv-belt { display: flex; gap: 3px; flex-wrap: wrap; align-content: center; min-height: 18px; }
.cpv-belt .cpv-seg { width: 12px; height: 16px; border-radius: 2px; }
.cpv-belt .cpv-seg.s-left { background: var(--cpv-go); }
.cpv-belt .cpv-seg.s-used { background: var(--cpv-go-soft); }
.cpv-belt .cpv-seg.s-bad  { background: repeating-linear-gradient(45deg, #e7cfcb 0 3px, #f6efee 3px 6px); }
.cpv-belt .cpv-seg.s-warn { background: var(--cpv-warn-soft); border: 1px solid #ecd7ae; }
.cpv-belt-note { font-size: 12px; color: var(--cpv-mut); }
.cpv-facts { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--cpv-mut); }
.cpv-facts b { color: var(--cpv-ink); font-weight: 600; font-family: var(--cpv-num); font-variant-numeric: tabular-nums; }

/* 链接表：状态并入水位格；时效合并列 */
.cpv-body { padding: 0 14px 12px; }
.cpv-rules { display: none; margin: 10px 0 2px; padding: 9px 12px; border-left: 3px solid var(--cpv-go);
  background: var(--cpv-band); border-radius: 0 8px 8px 0; font-size: 12px; color: var(--cpv-mut); line-height: 1.8; }
.cpv-rules.show { display: block; }
.cpv-rules b { color: var(--cpv-ink); }
.cpv-linkrules { font-size: 11px; color: var(--cpv-mut); text-decoration: underline dotted; cursor: pointer; user-select: none; }
.cpv-tablewrap { overflow-x: auto; margin-top: 8px; }
table.cpv-table { width: 100%; border-collapse: collapse; }
.cpv-table th {
  font-size: 11px; color: var(--cpv-mut); font-weight: 600; text-align: left;
  padding: 7px 8px; border-bottom: 1.5px solid var(--cpv-line); white-space: nowrap;
}
.cpv-table td { padding: 8px; border-bottom: 1px solid var(--cpv-line); font-size: 13px; vertical-align: middle; }
.cpv-table tr:last-child td { border-bottom: none; }
.cpv-table tr.cpv-next td { background: linear-gradient(90deg, rgba(15,123,94,.06), transparent 30%); }
.cpv-numcell { font-family: var(--cpv-num); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cpv-cell-main { font-weight: 600; color: var(--cpv-ink); max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cpv-cell-sub { font-size: 11.5px; color: var(--cpv-mut); margin-top: 2px; max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cpv-chiprow { display: flex; gap: 4px; flex-wrap: wrap; max-width: 260px; }
.cpv-chip { font-size: 11px; line-height: 1.6; padding: 1px 7px; border-radius: 999px;
  background: var(--cpv-band); color: var(--cpv-mut); border: 1px solid var(--cpv-line); white-space: nowrap; }

/* 分段水位条（每链一格） */
.cpv-bar { display: flex; align-items: center; gap: 8px; min-width: 150px; }
.cpv-bar-segs { display: flex; gap: 2px; }
.cpv-bar-segs .cpv-seg { width: 9px; height: 14px; border-radius: 1.5px; }
.cpv-bar-segs .cpv-seg.s-left { background: var(--cpv-go); }
.cpv-bar-segs .cpv-seg.s-used { background: var(--cpv-go-soft); }
.cpv-bar-segs.h-warn .cpv-seg.s-left { background: var(--cpv-warn); }
.cpv-bar-segs.h-warn .cpv-seg.s-used { background: var(--cpv-warn-soft); }
.cpv-bar-segs.h-bad .cpv-seg { background: repeating-linear-gradient(45deg, #e7cfcb 0 3px, #f6efee 3px 6px); }
.cpv-bar-num { font-family: var(--cpv-num); font-variant-numeric: tabular-nums; font-size: 12.5px; font-weight: 700; }
.cpv-bar-num.n-go { color: var(--cpv-go); }
.cpv-bar-num.n-zero { color: var(--cpv-bad); }
.cpv-badtag { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 999px;
  background: var(--cpv-bad-soft); color: var(--cpv-bad); margin-left: 6px; }
.cpv-warntag { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 999px;
  background: var(--cpv-warn-soft); color: var(--cpv-warn); margin-left: 6px; }
/* 可购次数旁的铅笔编辑钮（对齐比价页 .pw-sale-btn，配色 cpv-go） */
.cpv-edit-btn { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px;
  margin-left: 5px; padding: 0; border: 1px solid #cfdcd6; border-radius: 4px; background: #fff;
  color: #5f736b; cursor: pointer; vertical-align: middle; line-height: 1; }
.cpv-edit-btn:hover { border-color: var(--cpv-go); color: var(--cpv-go); }
.cpv-nexttag { display: inline-block; font-size: 10.5px; padding: 1px 7px; border-radius: 999px;
  background: var(--cpv-go); color: #fff; margin-left: 6px; letter-spacing: .05em; }
.cpv-empty { padding: 22px 0; text-align: center; color: var(--cpv-mut); font-size: 13px; }

/* cpv 链接表·列内超长文本（移植订单页 #orders-table 体系，原作用域不覆盖池表）：
   省略显示 + 悬停出展开钮 + 点击浮层看全文（浮层 #cell-expand-pop 全局共用） */
.cpv-table td { position: relative; }
.cpv-table td > div {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: none;
}
.cpv-table td .cell-expand {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  display: none;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid #d7dde6;
  border-radius: 7px;
  background: #fff;
  color: #667085;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(16,24,40,.08);
  z-index: 5;
}
.cpv-table td .cell-expand::before {
  content: "";
  width: 12px;
  height: 12px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat center / contain;
}
.cpv-table td.clipped:hover .cell-expand { display: inline-flex; }
.cpv-table td .cell-expand:hover { color: #0f7b5e; border-color: #0f7b5e; }

/* 设备页·抖音号弹层（同语言） */
.cpv-modal { position: fixed; inset: 0; background: rgba(15,30,24,.42); z-index: 1100;
  display: none; align-items: center; justify-content: center; }
.cpv-modal.show { display: flex; }
.cpv-card { background: var(--surface); border-radius: 14px; width: 460px; max-width: 92vw;
  overflow: hidden; border: 1px solid var(--cpv-line); }
.cpv-card-head { padding: 13px 18px; background: var(--cpv-band); border-bottom: 1px solid var(--cpv-line);
  display: flex; align-items: center; gap: 8px; }
.cpv-card-head b { color: #17251f; }
.cpv-card-body { padding: 16px 18px; }
.cpv-switchrow { display: flex; align-items: flex-start; gap: 12px; padding: 11px 12px;
  border: 1.5px solid var(--cpv-line); border-radius: 10px; background: var(--cpv-band); }
.cpv-switchrow.on { border-color: var(--cpv-go); background: var(--cpv-go-soft); }
.cpv-switch { position: relative; width: 42px; height: 24px; flex: none; margin-top: 1px; }
.cpv-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.cpv-switch i { position: absolute; inset: 0; border-radius: 999px; background: #aeb9c4; border: 1px solid rgba(23,37,31,.12); transition: background .15s; pointer-events: none; }
.cpv-switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
  border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.cpv-switch input:checked + i { background: var(--cpv-go); }
.cpv-switch input:checked + i::after { left: 21px; }
.cpv-switch input:focus-visible + i { outline: 2px solid var(--cpv-go); outline-offset: 2px; }
.cpv-switch-text b { display: block; font-size: 13.5px; color: #17251f; }
.cpv-switch-text span { display: block; font-size: 12px; color: var(--cpv-mut); margin-top: 2px; line-height: 1.6; }
.cpv-labels { margin-top: 12px; }
.cpv-labels > label { display: block; font-size: 12.5px; color: #17251f; margin-bottom: 5px; font-weight: 600; }
.cpv-labels textarea { width: 100%; box-sizing: border-box; border: 1px solid var(--cpv-line);
  border-radius: 8px; padding: 8px 10px; font-size: 13px; resize: vertical; background: var(--surface); color: var(--text); }
.cpv-preview { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 7px; min-height: 22px; }
.cpv-card-foot { padding: 12px 18px; border-top: 1px solid var(--cpv-line); display: flex;
  justify-content: flex-end; gap: 8px; }
.cpv-cur { font-size: 12px; color: var(--cpv-mut); margin-top: 10px; }
.cpv-cur b { color: var(--cpv-go); font-family: var(--cpv-num); }

/* 可购次数弹窗：快捷钮+数字输入（对齐 cpv 设计语言） */
.cpq-quick { min-width: 36px; border: 1px solid #d5e2db; border-radius: 6px;
  background: var(--surface); color: #17251f; font-family: ui-monospace, Consolas, monospace; }
.cpq-quick.on { border-color: #0f7b5e; background: #def2ea; color: #0f7b5e; font-weight: 700; }
.cpq-quick:hover { border-color: #0f7b5e; }
#cpq-modal input[type=number] { border: 1px solid #d5e2db; border-radius: 6px;
  font-family: ui-monospace, Consolas, monospace; font-size: 14px; }

/* 侦察设备组合框（cpv 设计语言）：收起态=当前选择触发条（点击展开），展开态=搜索框+列表面板 */
.dgs-root { position: relative; }
.dgs-field {
  display: flex; align-items: center; gap: 8px; padding: 0 10px;
  border: 1.5px solid var(--border, #d5e2db); border-radius: 8px;
  background: #fff; transition: border-color .15s, background .15s, box-shadow .15s;
  min-height: 38px; cursor: pointer; user-select: none; -webkit-user-select: none;
}
.dgs-field:hover { border-color: #9cc4b4; }
.dgs-field.focus { border-color: #0f7b5e; background: #fff; box-shadow: 0 0 0 3px rgba(15,123,94,.1); }
.dgs-field.picked { background: #eff6f2; border-color: #bfe3d6; }
.dgs-field.picked.focus { background: #fff; }
.dgs-field .dgs-dot { margin-top: 0; flex: none; }
.dgs-val {
  flex: 1; min-width: 0; font-size: 13px; color: #17251f; text-align: left;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dgs-field:not(.picked) .dgs-val { color: #8aa39a; }
.dgs-clear {
  display: none; align-items: center; justify-content: center;
  width: 20px; height: 20px; flex: none;
  border: none; border-radius: 50%; background: #d5e2db; color: #5c6f68;
  cursor: pointer; padding: 0; transition: background .12s;
}
.dgs-clear:hover { background: #b3c8be; color: #17251f; }
.dgs-caret { color: #8aa39a; flex: none; transition: transform .18s, color .15s; }
.dgs-field.focus .dgs-caret { transform: rotate(180deg); color: #0f7b5e; }
.dgs-drop {
  display: none; position: absolute; left: 0; right: 0; top: calc(100% + 4px);
  z-index: 20; background: #fff; border: 1px solid #d5e2db; border-radius: 10px;
  box-shadow: 0 8px 28px rgba(23,37,31,.14), 0 2px 8px rgba(23,37,31,.06);
  overflow: hidden;
}
.dgs-drop.open { display: block; }
.dgs-search {
  display: flex; align-items: center; gap: 8px; padding: 0 12px;
  border-bottom: 1px solid #e8f0ec; background: #fbfdfc;
}
.dgs-icon { color: #8aa39a; flex: none; }
.dgs-search:focus-within .dgs-icon { color: #0f7b5e; }
.dgs-search input {
  flex: 1; border: none; outline: none; background: transparent;
  font-size: 13px; color: #17251f; padding: 9px 0; min-width: 0;
}
.dgs-search input::placeholder { color: #9aab9f; font-size: 12.5px; }
.dgs-list { max-height: 224px; overflow-y: auto; overflow-x: hidden; padding: 4px 0; }
.dgs-item {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 8px 14px; cursor: pointer; font-size: 13px; color: #17251f;
  border-left: 3px solid transparent; transition: background .1s;
}
.dgs-item:hover { background: #eff6f2; }
.dgs-item.on { border-left-color: #0f7b5e; background: #eff6f2; }
.dgs-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #0f7b5e; flex: none;
  margin-top: 5px;
}
.dgs-dot.off { background: #c4c4c4; }
.dgs-dot.auto { background: transparent; border: 1.5px solid #8aa39a; width: 5px; height: 5px; }
.dgs-body { flex: 1; min-width: 0; }
.dgs-name {
  display: block; line-height: 1.45; word-break: break-all;
}
.dgs-id {
  display: block; font-family: ui-monospace, Consolas, monospace; font-size: 11px;
  color: #8aa39a; letter-spacing: .02em; margin-top: 1px;
}
.dgs-check { color: #0f7b5e; font-weight: 700; font-size: 13px; flex: none; margin-left: 2px; margin-top: 2px; }
.dgs-sep { height: 1px; background: #d5e2db; margin: 4px 10px; }
.dgs-auto .dgs-name { color: #64766e; }
.dgs-none { padding: 14px; text-align: center; color: #8aa39a; font-size: 12.5px; }


/* ===================== 设备列表：筛选搜索条（20260903 v2，状态chip × 分组 × 关键词 三维交集） =====================
   排版定式：chips 与 分组/搜索 控件同一自然流行——放得下全在一行，放不下整块换行左对齐；
   左缘细竖线分出「状态筛选 ｜ 分组/关键词定位」两组语义（右推 margin-left:auto 会在中窄桌面
   产生「下拉挤chips行尾、搜索掉下行右缘」的 Z 形参差，已弃用）。 */
.dev-fbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0;
  margin-left: 4px; padding-left: 14px; border-left: 1px solid var(--border); }
.dev-fbar select { width: 176px; min-width: 0; max-width: none; }
.dev-fbar input[type=text] { width: 248px; }
.dev-count { font-size: 12px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.dev-count b { color: var(--text); font-weight: 700; }
.dev-clear { font-size: 12px; color: var(--primary-dark); text-decoration: none; border-bottom: 1px dashed var(--primary-dark); white-space: nowrap; }
.dev-clear:hover { opacity: .8; }

@media (max-width: 700px) {
  /* 窄屏：chips 一行，分组/搜索另起一行占满（select 1份 + 搜索2份）；左缘分隔线取消（上下行关系已表达分组）；
     筛选激活后读数/清除再换一行右对齐——不与 select/搜索抢宽（select 会被挤到截断） */
  .dev-fbar { margin-left: 0; padding-left: 0; border-left: none; width: 100%; }
  .dev-fbar select { flex: 1 1 0; min-width: 0; width: auto !important; }
  .dev-fbar input[type=text] { flex: 2 1 0; width: auto !important; min-width: 0; }
  .dev-fbar .dev-count, .dev-fbar .dev-clear { flex-basis: 100%; order: 3; text-align: right; margin-left: auto; }
}

/* ===================== 可搜索下拉（替代原生 select 弹层） =====================
   触发器本身就是输入框：点进去直接打字过滤，弹层只列选项、不再套一层搜索框。 */
.ss-wrap {
  position: relative;
  display: inline-block;
  width: 100%;
  min-width: 0;
  vertical-align: middle;
}
.ss-wrap .ss-native {
  position: absolute;
  left: 0;
  top: 0;
  width: 100% !important;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}
.ss-btn {
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
  display: block;
  width: 100%;
  min-height: 38px;
  padding: 8px 28px 8px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background-color: var(--surface);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%2364748b' d='M1.2 1.3L6 6.1l4.8-4.8 1.2 1.2L6 8.5 0 2.5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 10px 7px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.4;
  text-align: left;
  cursor: text;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.ss-btn:hover { border-color: var(--primary); }
.ss-btn[aria-expanded="true"],
.ss-btn:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .14);
}
.ss-btn.placeholder { color: var(--muted); }
.ss-btn:disabled { opacity: .55; cursor: not-allowed; }
.ss-pop {
  position: fixed;
  z-index: 3600;
  display: none;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-md);
  min-width: 240px;
}
.ss-pop.open { display: block; }
.ss-list { max-height: 280px; overflow-y: auto; overflow-x: hidden; padding: 4px 0; }
.ss-opt {
  padding: 8px 12px;
  font-size: 13px;
  line-height: 1.4;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}
.ss-opt:hover,
.ss-opt.active { background: var(--surface-blue); }
.ss-opt.selected { font-weight: 600; color: var(--primary-dark); }
.ss-opt.disabled { opacity: .45; cursor: not-allowed; }
.ss-empty { padding: 16px 12px; text-align: center; color: var(--muted); font-size: 13px; }

.toolbar form .ss-wrap { width: 100%; }
.dev-fbar .ss-wrap { width: 176px; min-width: 0; }

@media (max-width: 700px) {
  .toolbar form .ss-wrap { width: 100% !important; }
  .dev-fbar .ss-wrap { flex: 1 1 0; width: auto !important; }
}

/* =====================================================================================
   全站手机端统一优化（20260921 并行七组产出：A商品/下单/设备 B仪表盘/详情/设置/登录
   C闲鱼订单侧 D闲鱼商品侧 E联盟+统计 F运营配置 G比价/营销/流水线/分析）
   全部规则页面作用域隔离（前缀 gd-/dg-/dv-/db-/st-/lg-/xo-/xr-/xc-/xrp-/xg-/xs-/xsp-/
   ud-/uo-/uc-/ugs-/sp-/sg-/rb-/cc-/cg-/dt-/so-/pw-/pm-/ls-/da-），桌面 >700px 零作用。
   G 组 da 块的 div. 前缀与 pm 块 #pr-edit-modal 前缀为压过页内 <style> 同名规则，勿清理。
   ===================================================================================== */
/* ########## 组A ########## */
/* ===================== goods 手机端（gd-*，gA 20260921） ===================== */
@media (max-width:700px){
  /* 标题行：标题左 / 创建钮右（幽灵描边 38px；桌面内联 float 不动） */
  .gd-title { display:flex; align-items:center; justify-content:space-between; gap:10px;
    min-height:38px; margin:0 0 12px; font-size:17px; line-height:1.3; }
  .gd-title .h2-actions { float:none; flex:none; display:inline-flex; }
  .gd-title .h2-actions .btn { min-height:38px; padding:0 12px; font-size:13px;
    background:var(--surface) !important; border:1px solid var(--border-strong); color:var(--text-soft);
    box-shadow:none; touch-action:manipulation; -webkit-tap-highlight-color:transparent; }
  .gd-title .h2-actions .btn:active { transform:scale(.97); }

  /* 贴合搜索组：输入 + 主色放大镜钮贴合（.toolbar form 前缀压过全局两列 grid） */
  .toolbar form.gd-search { display:flex !important; gap:0 !important; grid-template-columns:none !important; }
  .gd-search input[type=text] { flex:1; min-width:0; min-height:40px; font-size:16px;
    border-radius:var(--radius-sm) 0 0 var(--radius-sm); }
  .gd-search button[type=submit] { flex:none; width:48px !important; min-height:40px; padding:0;
    margin-left:-9px; font-size:0; border-radius:0 var(--radius-sm) var(--radius-sm) 0;
    display:inline-flex; align-items:center; justify-content:center; }
  .gd-search button[type=submit]::before { content:""; flex:none; width:16px; height:16px; background:currentColor;
    -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E") center/contain no-repeat;
    mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E") center/contain no-repeat; }

  /* 同步钮：通栏幽灵次级钮 */
  .toolbar form.gd-sync { display:grid !important; grid-template-columns:minmax(0,1fr) !important;
    gap:6px 0; flex:1 1 100%; }
  .gd-sync .btn { width:100%; min-height:40px; font-size:13px; }
  .gd-sync .muted { font-size:11.5px; text-align:center; }

  /* 状态 chips：三段面板（软底容器 + 发丝线 + 彩色纯文字计数） */
  .gd-chips { display:grid !important; grid-template-columns:repeat(3,minmax(0,1fr));
    gap:0; margin:0 0 12px; padding:0;
    background:var(--surface-soft); border:1px solid var(--border);
    border-radius:var(--radius); overflow:hidden; }
  .gd-chips .chip { display:inline-flex; align-items:center; justify-content:center; gap:5px;
    min-height:44px; margin:0; padding:0 4px; border:none;
    border-left:1px solid var(--border); border-radius:0;
    background:transparent; font-size:12.5px; white-space:nowrap; overflow:hidden;
    touch-action:manipulation; -webkit-tap-highlight-color:transparent; }
  .gd-chips .chip:first-child { border-left:none; }
  .gd-chips .chip b { margin:0; font-size:14px; font-weight:700;
    font-variant-numeric:tabular-nums; color:var(--text-soft); }
  .gd-chips .chip[data-f="1"] b { color:var(--success); }
  .gd-chips .chip[data-f="0"] b { color:var(--danger); }
  .gd-chips .chip.active { background:var(--surface); color:var(--text);
    box-shadow:inset 0 -2px 0 var(--primary); }
  .gd-chips .chip.active b { color:inherit; }
  .gd-chips .chip:active { transform:scale(.96); }

  #goods-cards { padding-bottom:env(safe-area-inset-bottom); }
}

/* ===================== down-goods 手机端（dg-*，gA 20260921） ===================== */
@media (max-width:700px){
  /* 标题行（同商品页语言） */
  .dg-title { display:flex; align-items:center; justify-content:space-between; gap:10px;
    min-height:38px; margin:0 0 12px; font-size:17px; line-height:1.3; }
  .dg-title .h2-actions { float:none; flex:none; display:inline-flex; }
  .dg-title .h2-actions .btn { min-height:38px; padding:0 12px; font-size:13px;
    background:var(--surface) !important; border:1px solid var(--border-strong); color:var(--text-soft);
    box-shadow:none; touch-action:manipulation; -webkit-tap-highlight-color:transparent; }
  .dg-title .h2-actions .btn:active { transform:scale(.97); }

  /* 筛选栏：关键词 + 贴合放大镜钮首行；下拉两列；清除通栏（下拉选中即提交） */
  .dg-filterbar { display:block !important; border-top:1px solid var(--border); margin:12px 0; padding:12px 0 0; }
  .dg-filterbar .dg-form { display:grid !important; grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px 8px; align-items:end; }
  .dg-form input[name=keyword] { grid-row:1; grid-column:1/2; width:100% !important; min-width:0;
    min-height:40px; font-size:16px; border-radius:var(--radius-sm) 0 0 var(--radius-sm); }
  .dg-form button[type=submit] { grid-row:1; grid-column:2; width:48px !important; min-height:40px;
    padding:0; margin-left:-9px; font-size:0; border-radius:0 var(--radius-sm) var(--radius-sm) 0;
    display:inline-flex; align-items:center; justify-content:center; }
  .dg-form button[type=submit]::before { content:""; flex:none; width:16px; height:16px; background:currentColor;
    -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E") center/contain no-repeat;
    mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E") center/contain no-repeat; }
  .dg-form select { width:100% !important; min-width:0; min-height:40px; font-size:16px; }
  .dg-form .dg-clear { grid-column:1/-1; display:flex; align-items:center; justify-content:center;
    min-height:38px; border:1px solid var(--border-strong); border-radius:var(--radius-sm);
    background:var(--surface); color:var(--text-soft); font-size:13px; text-decoration:none;
    touch-action:manipulation; -webkit-tap-highlight-color:transparent; }

  /* 手机卡（对齐商品页 gcard 语言） */
  #dg-cards { padding-bottom:env(safe-area-inset-bottom); }
  #dg-cards .dgcard-check { display:flex; align-items:center; padding:6px 0; flex:none; }
  #dg-cards .dgcard-check input { width:18px; height:18px; }
  #dg-cards .dg-status-strip { display:flex; flex-wrap:wrap; align-items:center; gap:4px 6px; margin-top:7px; }
  #dg-cards .dg-link-line { margin-top:8px; display:flex; align-items:center; gap:6px; min-width:0; }
  #dg-cards .dg-link-line .dg-url { flex:1; min-width:0;
    font-family:var(--mono, ui-monospace, Consolas, monospace);
    font-size:12px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  #dg-cards .dgcard .ocard-foot { display:grid; grid-template-columns:repeat(2,minmax(0,1fr));
    gap:6px; align-items:stretch; }
  #dg-cards .dgcard .ocard-foot form { display:contents; }
  #dg-cards .dgcard .ocard-foot .op-chip { min-height:34px; padding:0 8px; font-size:12.5px; }
  #dg-cards .dgcard .ocard-foot .op-red { grid-column:1/-1; }

  /* 编辑弹窗（#dgood-modal）：弹性行换行，密排字段不再挤压 */
  #dgood-modal .dg-sec { padding:8px 10px 4px; }
  #dgood-modal .form-row { flex-wrap:wrap; }
  #dgood-modal .dg-cell { min-width:140px; }
  #dgood-modal .dg-ph-box { padding:6px 8px 0; }
}

/* ===================== devices 手机端（dv-*，gA 20260921） ===================== */
@media (max-width:700px){
  /* 标题行：标题一行 + 动作区网格（刷新通栏领衔，设置钮幽灵化两列；桌面内联 flex 不动） */
  .dv-head { display:grid !important; grid-template-columns:minmax(0,1fr); gap:10px;
    align-items:center !important; justify-content:stretch !important; margin:0 0 12px; }
  .dv-title { font-size:17px; line-height:1.3; }
  .dv-actions { display:grid !important; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px;
    align-items:center; font-weight:400; }
  .dv-actions .btn { min-height:38px; padding:0 8px; font-size:13px;
    background:var(--surface) !important; border:1px solid var(--border-strong); color:var(--text-soft);
    box-shadow:none; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
    touch-action:manipulation; -webkit-tap-highlight-color:transparent; }
  .dv-actions .btn:active { transform:scale(.97); }
  .dv-actions > label { display:flex; align-items:center; justify-content:center; gap:6px;
    min-height:38px; padding:0 8px; font-size:13px;
    border:1px solid var(--border-strong); border-radius:var(--radius-sm);
    background:var(--surface); white-space:nowrap;
    touch-action:manipulation; -webkit-tap-highlight-color:transparent; }
  .dv-actions .btn-primary { order:-1; grid-column:1/-1; }
  .dv-actions > :nth-last-child(2) { grid-column:1/-1; }  /* 末位设置钮通栏，2 列不落单 */

  /* 状态 chips + 搜索/分组 + 更新时间：合并成一块分段面板，发丝线分隔 */
  .dv-chips { display:grid !important; grid-template-columns:repeat(5,minmax(0,1fr));
    gap:0; margin:0 0 12px; padding:0;
    background:var(--surface-soft); border:1px solid var(--border);
    border-radius:var(--radius); overflow:hidden; }
  .dv-chips .chip { display:inline-flex; align-items:center; justify-content:center; gap:4px;
    min-height:44px; margin:0; padding:0 2px; border:none;
    border-left:1px solid var(--border); border-radius:0;
    background:transparent; font-size:12px; white-space:nowrap; overflow:hidden;
    touch-action:manipulation; -webkit-tap-highlight-color:transparent; }
  .dv-chips .chip:first-child { border-left:none; }
  .dv-chips .chip b { margin:0; font-size:13px; font-weight:700;
    font-variant-numeric:tabular-nums; color:var(--text-soft); }
  .dv-chips .chip[data-f="online"] b { color:var(--success); }
  .dv-chips .chip[data-f="busy"] b,
  .dv-chips .chip[data-f="cooling"] b { color:var(--warning); }
  .dv-chips .chip[data-f="offline"] b { color:var(--danger); }
  .dv-chips .chip.active { background:var(--surface); color:var(--text);
    box-shadow:inset 0 -2px 0 var(--primary); }
  .dv-chips .chip.active b { color:inherit; }
  .dv-chips .chip:active { transform:scale(.96); }
  .dv-chips .dev-fbar { grid-column:1/-1; border-top:1px solid var(--border);
    padding:8px; margin:0; }
  .dv-chips .dev-fbar select,
  .dv-chips .dev-fbar input[type=text] { min-height:40px; font-size:16px; }
  .dv-chips .dev-fbar .dev-count,
  .dv-chips .dev-fbar .dev-clear { flex-basis:auto; order:0; }
  .dv-chips .dev-clear { font-size:13px; }
  .dv-chips > .muted { grid-column:1/-1; justify-self:end; padding:0 8px 7px; font-size:11.5px; }

  /* 手机卡：徽标一行换行；卡脚 ID 行 + 两列操作 */
  #device-cards { padding-bottom:env(safe-area-inset-bottom); }
  #device-cards .dv-tags { display:flex; flex-wrap:wrap; gap:4px 6px; margin-top:7px; }
  #device-cards .ocard-foot.dv-foot { display:flex; flex-direction:column; align-items:stretch; gap:8px; }
  #device-cards .dv-foot > .muted { font-size:11.5px; }
  #device-cards .dv-foot .dv-remark { display:none; }
  #device-cards .dv-ops { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; }
  #device-cards .dv-ops form { display:contents; }
  #device-cards .dv-ops .op-red { grid-column:1/-1; }
}

/* ########## 组B ########## */
/* ===================== 设置页手机端（20260921 gB） ===================== */
@media (max-width: 700px) {
  .st-card { margin-bottom: 12px; }
  .st-ta-accounts { width: 100% !important; }
  .st-w200 { width: 100% !important; }
  .st-code { white-space: normal; word-break: break-all; }
  .st-form-note { display: block; margin: 8px 0 0 !important; line-height: 1.6; }
  .st-save-inline { display: flex; width: 100%; min-height: 40px; margin-top: 8px; }
  .st-form .btn-primary { min-height: 44px; padding: 0 20px; }
}

/* ===================== 仪表盘手机端（20260921 gB） ===================== */
@media (max-width: 700px) {
  .db-sec { margin-bottom: 12px; }
  .db-chart-hint { display: none; }
  .db-chart-hint-m { display: block !important; }
  .db-btn-poll { width: 100%; min-height: 40px; margin: 8px 0 0 !important; }
  .db-logwrap { display: none; }
  .db-mlogs { display: block !important; }
  .db-mlog { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-soft); padding: 8px 12px; margin-bottom: 8px; }
  .db-mlog-time { font-size: 11px; }
  .db-mlog-main { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 12px; margin-top: 3px; }
  .db-mlog-main b { font-size: 12px; font-weight: 600; color: var(--text-soft); word-break: break-all; }
  .db-mlog-main .db-mst { color: var(--text-soft); }
  .db-mlog-res { font-size: 11px; line-height: 1.5; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-all; }
  .dmod { transition: none; }
  .dmod:active { border-color: var(--primary); background: var(--surface-blue); }
  /* 勿给 .dos-item 加 :active / transition 规则：会触发 Chromium 全页截图(captureBeyondViewport)
     重绘伪影（桌面瓦片瞬时画成 hover 态）；元素级渲染实为一致，为保桌面像素级零变化从略 */
}
@media (max-width: 540px) {
  /* KPI 五卡合并成一块分段面板：2 列发丝线 + 第 5 卡通栏 */
  .dash-hero { gap: 0; margin-bottom: 12px; background: var(--surface-soft); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
  .dash-hero .dash-kpi { background: none; border: none; border-radius: 0; box-shadow: none; padding: 11px 14px; }
  .dash-hero .dash-kpi:nth-child(odd) { border-right: 1px solid var(--border); }
  .dash-hero .dash-kpi:nth-child(n+3) { border-top: 1px solid var(--border); }
  .dash-hero .dash-kpi:last-child { grid-column: 1 / -1; text-align: center; padding: 9px 14px; }
  .dash-hero .dash-kpi .num { font-size: 21px; }
  .dash-hero .dash-kpi .lab { font-size: 11.5px; }
  /* 订单总览四联块同样面板化 */
  .dash-order-sum { gap: 0; }
  .dos-item { background: none; border: none; border-radius: 0; box-shadow: none; padding: 11px 14px; }
  .dash-order-sum .dos-item:nth-child(odd) { border-right: 1px solid var(--border); }
  .dash-order-sum .dos-item:nth-child(n+3) { border-top: 1px solid var(--border); }
  .dos-num { font-size: 20px; }
  .dash-main { gap: 12px; }
  .dash-chart { gap: 4px; }
}

/* ===================== 订单详情手机端（20260921 gB） ===================== */
@media (max-width: 700px) {
  .od-back { display: none; }                 /* hero 已有返回入口，手机去重 */
  .od-hero .oc-foot .btn { min-height: 38px; }
  .od-full-btn { width: 100%; min-height: 44px; margin-top: 8px; }
  .manual-check-banner { font-size: 12.5px; line-height: 1.75; }
  .od-kv td form .btn { flex: 1; min-height: 40px; }
  .od-kv td > a.btn { min-height: 38px; margin: 4px 0 2px; }
  .od-td-note { display: block; margin: 6px 0 0 !important; line-height: 1.65; }
  .od-fields-h { font-size: 14px; margin: 14px 0 10px; }
}

/* ===================== 登录页（20260921 gB，桌面手机统一） ===================== */
.lg-wrap { max-width: 400px; margin: 0 auto; padding: 8vh 20px calc(6vh + env(safe-area-inset-bottom)); }
.lg-card { background: var(--surface); border: 1px solid var(--border); border-radius: calc(var(--radius) + 2px); box-shadow: var(--shadow-md); padding: 32px 26px 24px; }
.lg-brand { display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: 24px; }
.lg-mark { width: 44px; height: 44px; margin-bottom: 12px; color: var(--primary); background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M3 9c1.8-2.4 5.2-2.4 7 0s5.2 2.4 7 0'%3E%3C/path%3E%3Cpath d='M3 15c1.8-2.4 5.2-2.4 7 0s5.2 2.4 7 0'%3E%3C/path%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M3 9c1.8-2.4 5.2-2.4 7 0s5.2 2.4 7 0'%3E%3C/path%3E%3Cpath d='M3 15c1.8-2.4 5.2-2.4 7 0s5.2 2.4 7 0'%3E%3C/path%3E%3C/svg%3E") center/contain no-repeat; }
.lg-title { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: .02em; color: var(--text); }
.lg-sub { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.lg-form .form-row { margin-bottom: 14px; }
.lg-form label { font-size: 13px; color: var(--text-soft); }
.lg-form input[type=password] { min-height: 48px; font-size: 16px; border-radius: var(--radius-sm); }
.lg-go { width: 100%; min-height: 48px; margin-top: 2px; font-size: 15px; font-weight: 600; letter-spacing: .12em; }
.lg-note { margin: 16px 0 0; text-align: center; font-size: 12px; color: var(--muted); }

/* ########## 组E ########## */
/* ===================== ud 联盟数据看板 手机端（20260921） ===================== */
@media (max-width: 700px) {
  /* 头部：标题/说明/时段逐行，控件两行栅格；时段下拉+刷新贴合组 */
  .ud-page .ud-hero { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center; margin-bottom: 12px; }
  .ud-page .ud-hero-main { display: contents; }
  .ud-page .ud-hero-main > h2 { grid-row: 1; grid-column: 1 / -1; margin: 0; font-size: 17px; line-height: 1.3; }
  .ud-page .ud-hero-main > .muted { grid-row: 2; grid-column: 1 / -1; margin: 0; font-size: 12px; line-height: 1.6; }
  .ud-page .ud-hero-main > .ud-range-bar { grid-row: 3; grid-column: 1 / -1; margin: 0; font-size: 12px; color: var(--text-soft); }
  .ud-page .ud-hero-main .ud-range-bar b { color: var(--text); }
  .ud-page .ud-hero-controls { grid-row: 4; grid-column: 1 / -1; display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
  .ud-page .ud-hero-controls > select { grid-row: 1; grid-column: 1; width: 100%; min-width: 0; min-height: 40px; border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
  .ud-page .ud-hero-controls > .btn-primary { grid-row: 1; grid-column: 2; margin-left: -9px; min-height: 40px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
  .ud-page #ud-dates { grid-row: 2; grid-column: 1 / -1; }
  .ud-page #ud-dates input[type=date] { min-width: 0; flex: 1; min-height: 40px; }
  .ud-page .ud-auto { grid-row: 3; grid-column: 1; justify-self: start; display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text-soft); font-size: 12.5px; }
  .ud-page .ud-hero-controls > .btn-gray { grid-row: 3; grid-column: 2; justify-self: end; min-height: 38px; padding: 0 12px; font-size: 13px; background: var(--surface); border: 1px solid var(--border-strong); color: var(--text-soft); box-shadow: none; }
  .ud-page .ud-hero-controls > .btn-primary:active, .ud-page .ud-hero-controls > .btn-gray:active, .ud-page .ud-auto:active { transform: scale(.96); }
  .ud-page .ud-chip { background: var(--surface-soft); color: var(--text-soft); }
  .ud-page .ud-chip.ok { background: var(--ok-bg); color: var(--ok-text); }
  .ud-page .ud-chip.run { background: var(--pending-bg); color: var(--pending-text); }
  .ud-page .ud-alert { background: var(--fail-bg); border-color: var(--danger); color: var(--fail-text); }
  /* KPI 六瓦片 → 一块分段面板（2 列发丝线，20px tabular） */
  .ud-page .ud-kpis { grid-template-columns: 1fr 1fr; gap: 0; margin-bottom: 12px; padding: 0; background: var(--surface-soft); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
  .ud-page .ud-kpi { border: none; border-left: 1px solid var(--border); background: transparent; padding: 10px 12px 9px; min-width: 0; }
  .ud-page .ud-kpi:nth-child(odd) { border-left: none; }
  .ud-page .ud-kpi:nth-child(n+3) { border-top: 1px solid var(--border); }
  .ud-page .ud-kpi-label { font-size: 11.5px; color: var(--muted); margin-bottom: 4px; }
  .ud-page .ud-kpi-val { font-size: 20px; font-weight: 700; color: var(--text); line-height: 1.25; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ud-page .ud-kpi-sub { font-size: 11.5px; margin-top: 4px; color: var(--muted); line-height: 1.5; }
  /* 图表卡：标题独占行、下拉紧凑、图高收缩 */
  .ud-page .ud-grid-2 { gap: 12px; margin-bottom: 12px; }
  .ud-page .ud-chart-card { padding: 12px; }
  .ud-page .ud-chart-card h3 { font-size: 14.5px; margin: 0 0 6px; flex-basis: 100%; }
  .ud-page .ud-chart-head { gap: 4px 8px; margin-bottom: 2px; }
  .ud-page .ud-chart-head .muted { font-size: 11px; }
  .ud-page .ud-chart-head select { max-width: 180px; padding: 5px 8px; }
  .ud-page .ud-legend-switch { gap: 10px; font-size: 12.5px; color: var(--text-soft); }
  .ud-page .ud-chart-lg { height: 280px; }
  .ud-page .ud-chart-md { height: 240px; }
  .ud-page .ud-goods-cell { max-width: 200px; }
}

/* ===================== uo 联盟订单明细 手机端（20260921） ===================== */
@media (max-width: 700px) {
  /* 标题行：标题左 / 同步订单幽灵钮右；说明两行截断 */
  .uo-page .uo-hero { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; margin-bottom: 12px; }
  .uo-page .uo-hero-main { display: contents; }
  .uo-page .uo-hero-main > h2 { grid-row: 1; grid-column: 1; margin: 0; font-size: 17px; line-height: 1.3; }
  .uo-page .uo-hero-main > .muted { grid-row: 2; grid-column: 1 / -1; margin: 0; font-size: 12px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .uo-page .uo-hero-actions { grid-row: 1; grid-column: 2; }
  .uo-page .uo-hero-actions .btn { min-height: 38px; padding: 0 12px; font-size: 13px; background: var(--surface); border: 1px solid var(--border-strong); color: var(--text-soft); box-shadow: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
  .uo-page .uo-hero-actions .btn:active { transform: scale(.96); }
  .uo-page .uo-alert { background: var(--fail-bg); border-color: var(--danger); color: var(--fail-text); }
  /* 同步设置卡：范围+平台一行、进度整行 */
  .uo-page .uo-sync-row { display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; align-items: start; }
  .uo-page .uo-sync-item { min-width: 0; }
  .uo-page .uo-sync-item:nth-child(1) { grid-row: 1; grid-column: 1; }
  .uo-page .uo-sync-item:nth-child(2) { grid-row: 1; grid-column: 2; }
  .uo-page .uo-sync-item:nth-child(3) { grid-row: 2; grid-column: 1 / -1; }
  .uo-page .uo-sync-item label { font-size: 11px; color: var(--muted); margin-bottom: 3px; }
  .uo-page .uo-sync-item select { min-height: 40px; }
  .uo-page .uo-checks { gap: 6px 12px; padding: 4px 0; }
  .uo-page .uo-checks label { font-size: 13px; min-height: 32px; }
  .uo-page #sync-progress { font-size: 12px; line-height: 1.6; color: var(--muted); }
  /* 筛选表单：两列栅格（时间/关键词/按钮整行） */
  .uo-page form.uo-filter { display: grid !important; grid-template-columns: 1fr 1fr; gap: 10px 8px; align-items: end; }
  .uo-page .uo-filter .uo-filter-item { flex-direction: column !important; align-items: stretch !important; flex: none !important; min-width: 0 !important; }
  .uo-page .uo-filter-item:nth-child(1) { grid-row: 1; grid-column: 1 / -1; }
  .uo-page .uo-filter-item:nth-child(2) { grid-row: 2; grid-column: 1; }
  .uo-page .uo-filter-item:nth-child(3) { grid-row: 2; grid-column: 2; }
  .uo-page .uo-filter-item:nth-child(4) { grid-row: 3; grid-column: 1 / -1; }
  .uo-page .uo-filter-item:nth-child(5) { grid-row: 4; grid-column: 1 / -1; display: flex !important; gap: 8px; }
  .uo-page .uo-filter-item:nth-child(5) .btn { flex: 1; min-height: 40px; }
  .uo-page .uo-filter-item > label { width: auto !important; font-size: 11px; color: var(--muted); margin-bottom: 3px; }
  .uo-page .uo-filter-item input[type="text"], .uo-page .uo-filter-item input[type="date"], .uo-page .uo-filter-item select { width: 100% !important; min-width: 0 !important; min-height: 40px; }
  .uo-page #f-dates { width: 100% !important; }
  .uo-page #f-dates input[type="date"] { min-height: 40px; flex: 1; }
  /* 四统计瓦片 → 一块 2×2 分段面板 */
  .uo-page .uo-stats { grid-template-columns: 1fr 1fr; gap: 0; margin-bottom: 12px; padding: 0; background: var(--surface-soft); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
  .uo-page .uo-stat { border: none; border-left: 1px solid var(--border); background: transparent; border-radius: 0; box-shadow: none; padding: 10px 12px 9px; min-width: 0; }
  .uo-page .uo-stat:nth-child(odd) { border-left: none; }
  .uo-page .uo-stat:nth-child(n+3) { border-top: 1px solid var(--border); }
  .uo-page .uo-stat-label { font-size: 11.5px; color: var(--muted); margin-bottom: 4px; }
  .uo-page .uo-stat-val { font-size: 20px; font-weight: 700; color: var(--text); line-height: 1.25; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .uo-page .uo-stat-sub { font-size: 11.5px; margin-top: 4px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  /* 巡检卡：手机收起长说明；长单号断行 */
  .uo-page #dy-attr-card { padding: 10px 12px; }
  .uo-page #dy-attr-card .uo-attr-hint { display: none; }
  .uo-page #dy-attr-meta { font-size: 12px; }
  .uo-page .uo-table code { font-size: 11px; word-break: break-all; }
  /* 弹窗贴边 */
  .uo-page .uo-modal-box { width: 94vw; max-height: 86vh; }
  .uo-page .dl-card { width: 94vw; max-height: 86vh; }
  .uo-page .dl-body { padding: 12px 14px; }
  .uo-page .dl-form input { min-width: 0; font-size: 16px; }
}

/* ===================== uc 万能转链 手机端（20260921） ===================== */
@media (max-width: 700px) {
  .uc-page .uc-desc { font-size: 12px; line-height: 1.6; margin: 0 0 10px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .uc-page .form-row { margin-bottom: 10px; }
  .uc-page textarea#conv-input { font-size: 16px; border-radius: var(--radius-sm); }
  .uc-page #conv-btn { min-height: 42px; }
  .uc-page #conv-btn:active { transform: scale(.96); }
  .uc-page .uc-hist h2 { margin-bottom: 10px; }
  .uc-page .uc-hist .toolbar { margin-bottom: 10px; gap: 8px; }
  .uc-page .uc-hist .chip { min-height: 36px; padding: 0 14px; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
  .uc-page .uc-hist .chip:active { transform: scale(.96); }
  /* 转链结果卡（JS 渲染）：主题变量化 + 长链接两行截断 */
  .uc-page .conv-card { background: var(--surface); border-color: var(--border); border-radius: calc(var(--radius) + 2px); padding: 12px 14px; }
  .uc-page .conv-head { gap: 6px 10px; }
  .uc-page .conv-plat { font-size: 14px; color: var(--text); }
  .uc-page .conv-link { font-size: 11.5px; color: var(--muted); flex-basis: 100%; word-break: break-all; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .uc-page .conv-body { background: var(--surface-soft); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 12px; line-height: 1.7; color: var(--text-soft); }
  .uc-page .conv-ok .conv-body { border-left: 3px solid var(--success); }
  .uc-page .conv-fail .conv-body { border-left: 3px solid var(--danger); }
  .uc-page .conv-foot { gap: 10px; }
  .uc-page .conv-foot .btn { min-height: 38px; }
  .uc-page .conv-cost { font-size: 12px; color: var(--muted); }
}

/* ===================== us 商品搜索 手机端（20260921） ===================== */
@media (max-width: 700px) {
  /* 搜索卡：贴合搜索组（关键词+搜索钮）+ 平台胶囊单行 */
  .ugs-page h2 { margin: 0 0 10px !important; }
  .ugs-page .ugs-search-card { padding: 12px; margin-bottom: 12px; }
  .ugs-page .ugs-row { gap: 8px; }
  .ugs-page .ugs-search-card .ugs-row:first-child { flex-wrap: nowrap; align-items: stretch; }
  .ugs-page .ugs-kw { min-width: 0 !important; min-height: 40px; border-radius: var(--radius-sm) 0 0 var(--radius-sm) !important; }
  .ugs-page #ugs-go { flex: none; margin-left: -9px; padding: 0 20px !important; min-height: 40px; align-self: center; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
  .ugs-page #ugs-go:active { transform: scale(.96); }
  .ugs-page .ugs-filters { font-size: 12px; color: var(--muted); align-self: center; flex: none; }
  .ugs-page .ugs-search-card .ugs-row:last-child { margin-top: 8px !important; }
  .ugs-page .ugs-hint { display: none; }
  .ugs-page .ugs-plat { min-height: 34px; box-sizing: border-box; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
  .ugs-page .ugs-plat:active { transform: scale(.95); }
  /* 侧栏筛选：默认折叠（配套模板尾部 JS）；标题触控加高、数值组可换行 */
  .ugs-page .ugs-main { display: block; }
  .ugs-page .ugs-side { position: static; max-height: none; overflow: visible; width: 100%; padding: 6px 12px 10px; margin-bottom: 12px; }
  .ugs-page .ugs-side-sec { padding: 2px 0; }
  .ugs-page .ugs-side-h { min-height: 42px; font-size: 13px; }
  .ugs-page .ugs-side .ugs-fgroup { margin: 6px 0; }
  .ugs-page .ugs-side .glabel { font-size: 12px; margin-bottom: 4px; }
  .ugs-page .ugs-chip { min-height: 32px; display: inline-flex; align-items: center; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
  .ugs-page .ugs-chip:active { transform: scale(.95); }
  .ugs-page .ugs-numgrp { flex-wrap: wrap; padding: 3px 10px; }
  .ugs-page .ugs-numgrp input { width: 64px !important; min-height: 34px; }
  /* 排序行：弹性换行（子菜单绝对定位，不能横滚裁切） */
  .ugs-page .ugs-sortrow { padding: 6px 10px; margin-bottom: 10px; gap: 0; }
  .ugs-page .ugs-stab { min-height: 36px; display: inline-flex; align-items: center; }
  .ugs-page .ugs-stab:active { opacity: .6; }
  /* 结果区：tabs+代理状态横滑、网格单列、按钮加高 */
  .ugs-page .ugs-bar { flex-wrap: nowrap; overflow-x: auto; margin-bottom: 10px; scrollbar-width: none; }
  .ugs-page .ugs-bar::-webkit-scrollbar { display: none; }
  .ugs-page .ugs-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; min-width: 0; flex: 1; }
  .ugs-page .ugs-tabs::-webkit-scrollbar { display: none; }
  .ugs-page .ugs-tab { flex: none; min-height: 34px; display: inline-flex; align-items: center; }
  .ugs-page #ugs-agent { flex: none; font-size: 12px; }
  .ugs-page .ugs-grid { grid-template-columns: 1fr; gap: 10px; }
  .ugs-page .ugs-ops .btn { min-height: 38px; }
  /* 转链结果弹窗：字段行堆叠 */
  .ugs-page .ugs-conv-line { flex-wrap: wrap; }
  .ugs-page .ugs-conv-line .lbl { width: auto; }
  .ugs-page .ugs-conv-pre { font-size: 12px; }
}

/* ===================== sp 订单利润分析 手机端（20260921） ===================== */
@media (max-width: 700px) {
  .sp-page > h2 { margin-bottom: 10px; }
  .sp-page > p.muted { font-size: 12px; line-height: 1.6; margin: 0 0 12px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .sp-page .toolbar { margin-bottom: 12px; }
  /* 统计瓦片 → 一块 2 列分段面板（inline 语义色保留） */
  .sp-page .stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; padding: 0; margin-bottom: 12px !important; background: var(--surface-soft); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
  .sp-page .stat-grid .stat { border: none; border-left: 1px solid var(--border); background: transparent; box-shadow: none; padding: 10px 12px 9px; min-width: 0; }
  .sp-page .stat-grid .stat:nth-child(odd) { border-left: none; }
  .sp-page .stat-grid .stat:nth-child(n+3) { border-top: 1px solid var(--border); }
  .sp-page .stat-grid .stat .num { font-size: 20px; font-weight: 700; line-height: 1.3; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sp-page .stat-grid .stat .lab { font-size: 11.5px; color: var(--muted); }
  .sp-page h3 { font-size: 14px; margin: 4px 0 8px !important; }
  /* 商品下拉整行：js-search-select 会把 select 包进 .ss-wrap 嵌在 div 里，
     工具栏 div 顺序=开始/结束/快捷日期/商品 → 第 4 个 div 即商品容器 */
  .sp-page .toolbar form > div:nth-of-type(4) { grid-column: 1 / -1; }
}

/* ===================== sg 商品销售统计 手机端（20260921） ===================== */
@media (max-width: 700px) {
  .sg-page > h2 { margin-bottom: 10px; }
  .sg-page > p.muted { font-size: 12px; line-height: 1.6; margin: 0 0 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .sg-page .toolbar { margin-bottom: 12px; }
  /* 商品下拉整行（同 sp：第 4 个 div 为商品容器，.ss-wrap 嵌于其中） */
  .sg-page .toolbar form > div:nth-of-type(4) { grid-column: 1 / -1; }
}

/* ########## 组F ########## */
/* ===================== 运营配置 5 页手机端适配（20260921，作用域前缀 rb-/cc-/cg-/dt-/so-） ===================== */
@media (max-width: 700px) {

  /* ---------- A. /risk-bans：tab 横滑 + 标题行 + 筛选面板 + 配置表单 ---------- */
  .rb-tabs { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .rb-tabs::-webkit-scrollbar { display: none; }
  .rb-head .btn { min-height: 38px; padding: 0 12px; font-size: 13px; gap: 5px;
    background: var(--surface); border: 1px solid var(--border-strong); color: var(--text-soft); box-shadow: none; }
  .rb-head > span:first-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
  .rb-head .muted { font-size: 12px !important; line-height: 1.5; }
  .rb-filters { background: var(--surface-soft); border: 1px solid var(--border); border-radius: var(--radius); padding: 3px 0; margin-bottom: 12px; }
  .rb-filters .toolbar { margin: 0; padding: 5px 10px; }
  .rb-filters .chip { min-height: 34px; display: inline-flex; align-items: center; padding: 0 13px; margin-right: 0; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
  .rb-filters .chip:active { transform: scale(.96); }
  .rb-filters .toolbar form { grid-column: 1 / -1; grid-template-columns: minmax(0,2fr) minmax(0,1fr) !important; gap: 8px; align-items: center; margin-left: 0 !important; padding-top: 5px; border-top: 1px solid var(--border); }
  .rb-filters .toolbar form input[type=text] { flex: 1; width: auto !important; min-width: 0; min-height: 40px; font-size: 16px; border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
  .rb-filters .toolbar form .btn { min-height: 40px; margin-left: -9px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
  .rb-filters .toolbar form .btn:active { transform: scale(.97); }
  .rb-cfg { display: grid !important; grid-template-columns: 1fr 1fr; gap: 8px 10px; align-items: center; }
  .rb-cfg label { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 13px; }
  .rb-cfg input[type=number] { width: 62px !important; flex: none; min-height: 36px; }
  .rb-cfg .btn { grid-column: 1 / -1; justify-self: start; min-height: 38px; }
  .rb-pane-note { font-size: 12px !important; line-height: 1.6; }

  /* ---------- B. /collect-config：参数表单三列网格 + 账号池筛选面板 ---------- */
  .cc-form { display: grid !important; grid-template-columns: repeat(3, minmax(0,1fr)) !important; grid-auto-flow: row dense; gap: 10px 8px; align-items: end; }
  .cc-form > div { min-width: 0 !important; }
  .cc-form .cc-w2 { grid-column: 1 / -1; }
  .cc-form label { display: block; margin: 0 0 3px; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .cc-form input, .cc-form select { width: 100% !important; min-width: 0; min-height: 40px; font-size: 16px; }
  .cc-form button[type=submit] { grid-column: 1 / -1; min-height: 40px; }
  .cc-filters { background: var(--surface-soft); border: 1px solid var(--border); border-radius: var(--radius); padding: 2px 0; margin-bottom: 12px; }
  .cc-filters .sumbar { margin: 0 !important; border: none; border-radius: 0; background: none; border-bottom: 1px solid var(--border); padding: 8px 10px 7px; gap: 5px 14px; font-size: 12px; }
  .cc-filters .toolbar { margin: 0 !important; padding: 5px 10px; }
  .cc-filters .toolbar + .toolbar { border-top: 1px solid var(--border); }
  .cc-filters .toolbar .muted { flex: none; }
  .cc-filters .chip { min-height: 34px; padding: 0 12px; margin-right: 0; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
  .cc-filters .chip:active { transform: scale(.96); }
  .cc-total-hide { display: none; }
  .cc-filters #mgr-heartbeat { flex-basis: 100%; margin-left: 0 !important; }
  #split-log { max-height: 40vh; }

  /* ---------- C. /convert-groups：贴合搜索组 + 卡片操作钮 ---------- */
  .cg-arch-row input { min-height: 40px; font-size: 16px; }
  .cg-arch-row .btn { min-height: 40px; }
  .cg-list-tools { margin-bottom: 12px; }
  .cg-search-form { flex-wrap: nowrap !important; min-width: 0; max-width: 100%; }
  .cg-search-form input[type=text] { flex: 1; width: auto !important; min-width: 0; min-height: 40px; font-size: 16px; border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
  .cg-search-form .btn { min-height: 40px; margin-left: -9px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
  .cg-search-form .btn:active { transform: scale(.97); }
  .cg-search-form .btn:last-child { margin-left: 0; border-radius: var(--radius-sm); }
  .mobile-cards .ocard .btn { min-height: 36px; }

  /* ---------- D. /dock-tasks：长单号两行截断（其余复用全局 ocard） ---------- */
  .dt-card .ocard-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

  /* ---------- E. /site-orders：统计分段面板 + 筛选表单显式排布 ---------- */
  .so-stats { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 0 !important; padding: 0 !important; margin-bottom: 12px !important; background: var(--surface-soft); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
  .so-stats .stat { border: none; border-radius: 0; box-shadow: none; background: none; padding: 10px 12px 9px; min-width: 0; }
  .so-stats .stat:nth-child(odd) { border-right: 1px solid var(--border); }
  .so-stats .stat:nth-child(n+3) { border-top: 1px solid var(--border); }
  .so-stats .stat .num { font-size: 20px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
  .so-stats .stat .lab { font-size: 11px; margin-top: 2px; line-height: 1.35; }
  .so-form > div:nth-child(1) { grid-area: 1 / 1 / 2 / 2; }
  .so-form > div:nth-child(2) { grid-area: 1 / 2 / 2 / 3; }
  .so-form .quick-range { grid-area: 2 / 1 / 3 / 3; }
  .so-form > div:nth-child(4) { grid-area: 3 / 1 / 4 / 2; min-width: 0; }
  .so-form > select { grid-area: 4 / 1 / 5 / 2; }
  .so-form > button[type=submit] { grid-area: 3 / 2 / 4 / 3; margin-left: -9px !important; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; min-height: 40px; width: auto !important; }
  .so-form > div:nth-child(4) input[type=text] { border-radius: var(--radius-sm) 0 0 var(--radius-sm); min-height: 40px; }
  .so-form > a.btn:nth-of-type(1) { grid-area: 4 / 2 / 5 / 3; }
  .so-form > a.btn:nth-of-type(2) { grid-area: 5 / 1 / 6 / 3; }
  .so-form > a.btn { min-height: 40px; }
  .so-sec-h { margin: 10px 0 6px; font-size: 14px; }
}

/* ########## 组G ########## */
/* ===== 闲鱼比价调价 手机端（gG 20260921）：仅 ≤700px 生效，桌面零变化 ===== */
@media (max-width: 700px) {
  .pw-page { display: flex; flex-direction: column; }
  .pw-page > .page-head { order: 0; }
  .pw-page > .order-stats { order: 1; }
  .pw-page > .pw-cfg { order: 2; }
  .pw-page > .pw-tools { order: 3; }
  .pw-page > .pw-listbar { order: 4; }
  .pw-page > #pw-table { order: 5; display: none; }
  /* 上行对运行时被包进 .table-wrap 的表格永不匹配（2026-10-05 审计实锤双渲染死规则），
     :has 补真身：包着 #pw-table 的 wrapper 才隐藏，下方日志表不受连坐 */
  .pw-page .table-wrap:has(> #pw-table) { order: 5; display: none; }
  .pw-page > .mobile-cards { order: 6; }
  .pw-page > .pager { order: 7; }

  /* 标题行：h2 左 / 引擎钮右（display:contents 提升子元素为网格项，桌面 DOM 不动） */
  .pw-page > .page-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .pw-page .pw-head-copy, .pw-page .pw-head-actions { display: contents; }
  .pw-head-copy h2 { grid-area: 1 / 1 / 2 / 2; margin: 0; font-size: 17px; line-height: 1.3; }
  .pw-head-copy .muted { grid-area: 2 / 1 / 3 / 3; margin: 3px 0 0; font-size: 11.5px; line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .pw-head-actions form:nth-of-type(2) { grid-area: 1 / 2 / 2 / 3; }
  .pw-head-actions form:nth-of-type(2) .btn { min-height: 38px; padding: 0 12px; font-size: 13px;
    background: var(--surface); border: 1px solid var(--border-strong); color: var(--text-soft);
    box-shadow: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
    display: inline-flex; align-items: center; gap: 5px; }
  .pw-head-actions form:nth-of-type(2) .btn::before { content: ""; flex: none; width: 14px; height: 14px; background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18.36 6.64a9 9 0 1 1-12.73 0'%3E%3C/path%3E%3Cline x1='12' y1='2' x2='12' y2='12'%3E%3C/line%3E%3C/svg%3E") center/contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18.36 6.64a9 9 0 1 1-12.73 0'%3E%3C/path%3E%3Cline x1='12' y1='2' x2='12' y2='12'%3E%3C/line%3E%3C/svg%3E") center/contain no-repeat; }
  .pw-head-actions .pw-dry { grid-area: 3 / 1 / 4 / 3; margin-top: 10px; }
  .pw-head-actions > button { grid-area: 4 / 1 / 5 / 3; margin-top: 8px; min-height: 40px; font-size: 13px;
    background: var(--surface); border: 1px solid var(--border-strong); color: var(--text-soft); box-shadow: none;
    touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
  .pw-head-actions > button:active, .pw-head-actions form:nth-of-type(2) .btn:active { transform: scale(.97); }

  /* 统计面板：两列瓦片+数据源整行+feed 脚注（发丝线分隔，状态用彩色纯文字） */
  .pw-page > .order-stats { padding: 0; gap: 0; overflow: hidden; margin-bottom: 12px; }
  .pw-stats .os-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0; font-size: 12px; }
  .pw-stats .os-row > span { display: flex; align-items: baseline; gap: 5px; min-width: 0; padding: 9px 12px 8px; }
  .pw-stats .os-row > span > b.v { font-size: 16px; font-variant-numeric: tabular-nums; }
  .pw-stats .os-row > span:nth-child(2n) { border-left: 1px solid var(--border); }
  .pw-stats .os-row > span:nth-child(-n+4) { border-bottom: 1px solid var(--border); }
  .pw-stats .os-row > span:nth-child(5) { grid-column: 1 / -1; border-bottom: 1px solid var(--border); }
  .pw-stats .os-row .badge { background: none; border: none; padding: 0; font-weight: 700; font-size: 12px; }
  .pw-stats .os-row .badge.b-ok { color: var(--ok-text); }
  .pw-stats .os-row .badge.b-fail { color: var(--fail-text); }
  .pw-stats .os-row .os-tail { grid-column: 1 / -1; margin-left: 0; padding: 7px 12px 8px; background: var(--surface);
    border-top: 1px solid var(--border); text-align: center; font-size: 11.5px; color: var(--muted); }

  /* 告警风控折叠条收紧 */
  .pw-page > .pw-cfg { margin-bottom: 12px; }
  .pw-cfg > summary { padding: 9px 12px; flex-wrap: nowrap; overflow: hidden; }
  .pw-cfg-title { font-size: 12.5px; }
  .pw-tag { flex: none; font-size: 11px; }
  .pw-cfg-body { padding: 10px 10px 12px; }
  .pw-cfg-form .pw-wrap { min-width: 0; }

  /* 搜索组：输入+主色放大镜钮贴合（负 margin 吃列距）；新增按钮整行 */
  .pw-page > .pw-tools { margin: 0 0 10px; }
  .pw-tools form { display: flex !important; gap: 0; align-items: stretch; }
  .pw-tools input[type=text] { flex: 1; min-width: 0; min-height: 40px; font-size: 16px;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
  .pw-tools form .btn { width: 46px; min-height: 40px; padding: 0; margin-left: -9px; font-size: 0;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    display: inline-flex; align-items: center; justify-content: center; touch-action: manipulation; }
  .pw-tools form .btn::before { content: ""; flex: none; width: 16px; height: 16px; background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E") center/contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E") center/contain no-repeat; }
  .pw-tools > .btn.btn-success { width: 100%; min-height: 42px; margin: 0; font-size: 13.5px; }

  /* 筛选条：chips 变三等分分段控件；批量区隐藏（手机卡无勾选框）；同步钮整行幽灵态 */
  .pw-page > .pw-listbar { display: grid; gap: 8px; padding: 0; border-top: none; margin: 0 0 12px; }
  .pw-filters { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--border);
    border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); }
  .pw-page .pw-filters .chip { margin: 0; min-height: 42px; justify-content: center; gap: 5px; border-radius: 0;
    border: none; border-left: 1px solid var(--border); touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
  .pw-page .pw-filters .chip:first-child { border-left: none; }
  .pw-page .pw-filters .chip:active { opacity: .72; }
  #pw-batch-form { display: none !important; }
  .pw-listbar > form:not(#pw-batch-form) .btn { width: 100%; min-height: 40px; font-size: 13px;
    background: var(--surface); border: 1px solid var(--border-strong); color: var(--text-soft); box-shadow: none; }

  /* 手机卡片：标题两行截断、按钮加高、销售编辑小钮加大触区 */
  .pw-page .ocard { margin: 0 0 10px; }
  .pw-page .ocard-title { font-size: 14.5px; white-space: normal; display: -webkit-box;
    -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.35; }
  .pw-page .ocard-no { font-size: 12px; line-height: 1.4; display: -webkit-box;
    -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
  .pw-page .ocard-grid { font-size: 12.5px; gap: 3px 10px; }
  .pw-page .pw-sale-btn { width: 26px; height: 26px; }
  .pw-page .ocard-foot .btn { min-height: 36px; font-size: 12.5px; }
  .pw-page .ocard-foot .btn:active { transform: scale(.97); }

  /* 分页：紧凑横滑 */
  .pw-page > .pager { display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; overflow-x: auto;
    padding: 4px 2px calc(2px + env(safe-area-inset-bottom)); scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .pw-page > .pager::-webkit-scrollbar { display: none; }
  .pw-page > .pager > * { flex: none; }

  /* 调价流水：堆叠成带小标签的日志卡 */
  .pw-flow-card { padding-top: 18px; }
  .pw-flow-card > h2 { font-size: 16px; margin: 0 0 10px; }
  .pw-flow-log thead { display: none; }
  .pw-flow-log, .pw-flow-log tbody { display: block; }
  .pw-flow-log tr { display: block; background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 8px 10px; margin-bottom: 8px; }
  .pw-flow-log td { display: flex; align-items: baseline; gap: 7px; padding: 1.5px 0; border: none;
    font-size: 12px; line-height: 1.5; white-space: normal; max-width: none !important; }
  .pw-flow-log td[data-l]::before { content: attr(data-l); flex: none; font-size: 10.5px; color: var(--muted); }
  .pw-flow-log td .badge { font-size: 11px; }

  /* 弹窗：贴屏宽、内边距收紧、主要输入 16px 防 iOS 聚焦缩放 */
  #pw-edit-modal .modal-box { min-width: 0; width: 94vw; max-width: 94vw; }
  #pw-edit-modal .modal-box, #pw-sale-modal .modal-box, #pw-sn-modal .modal-box, #pw-logs-modal .modal-box { padding: 14px; }
  #pw-edit-modal h3 { font-size: 15px; flex-wrap: wrap; gap: 8px; }
  .pw-bind-card .pw-wrap input, #pw-sale-modal input[type=number], #pw-sale-modal input[type=text],
  #pw-sn-modal input[type=text], .pw-cfg-form input[type=text] { font-size: 16px !important; }
  .pw-help-pop { left: -4px; width: min(500px, 78vw); }
}

/* ===== 营销策略 手机端（gG 20260921）：仅 ≤700px 生效，桌面零变化 ===== */
@media (max-width: 700px) {
  .pm-page { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .pm-page > h2 { grid-area: 1 / 1 / 2 / 2; display: flex; align-items: center; min-height: 38px;
    margin: 0 0 8px; font-size: 17px; line-height: 1.3; }
  .pm-page > .toolbar { display: contents; }          /* 按钮提升为网格项进标题行，桌面 DOM 不动 */
  .pm-page > .toolbar > span { display: none; }
  .pm-page > .toolbar > .btn { grid-area: 1 / 2 / 2 / 3; min-height: 38px; padding: 0 12px; font-size: 13px;
    background: var(--surface); border: 1px solid var(--border-strong); color: var(--text-soft); box-shadow: none;
    touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
  .pm-page > .toolbar > .btn:active { transform: scale(.97); }
  .pm-page > p.muted { grid-area: 2 / 1 / 3 / 3; margin: 0 0 12px; font-size: 12px; line-height: 1.65;
    display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
  .pm-page > #pr-table { display: none; }
  .pm-page > .mobile-cards { grid-column: 1 / -1; }

  .pm-cards .ocard { margin: 0 0 10px; }
  .pm-cards .ocard-title { font-size: 14.5px; white-space: normal; display: -webkit-box;
    -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.35; }
  .pm-cards .ocard-no { font-size: 12px; line-height: 1.4; display: -webkit-box;
    -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
  .pm-cards .ocard-grid { font-size: 12.5px; gap: 3px 10px; }
  .pm-cards .ocard-grid .v b { font-weight: 600; }
  .pm-cards .ocard-foot .btn { min-height: 36px; font-size: 12.5px; }
  .pm-cards .ocard-foot .btn:active { transform: scale(.97); }

  /* 弹窗：贴屏宽、内边距收紧、输入 16px 防 iOS 聚焦缩放（# 前缀压过页内 style 块） */
  #pr-edit-modal .modal-box { min-width: 0; width: 94vw; max-width: 94vw; }
  #pr-edit-modal .pr-modal-head { padding: 12px 14px 10px; }
  #pr-edit-modal .pr-modal form { padding: 12px 14px 14px; }
  #pr-edit-modal .pr-sec { padding: 10px 12px; }
  #pr-edit-modal input[type=text], #pr-edit-modal input[type=time], #pr-edit-modal select { font-size: 16px !important; }
  #pr-edit-modal .pr-modal-foot { flex-wrap: wrap; }
  #pr-edit-modal .pr-modal-foot .btn { flex: 1; min-height: 40px; }
  #pr-edit-modal .pr-modal-foot .pr-hint { flex-basis: 100%; margin-left: 0; }
  #pr-ana-modal .modal-box { min-width: 0; width: 94vw; max-width: 94vw; padding: 14px; }
  #pr-ana-modal > div[style*="max-height"] { -webkit-overflow-scrolling: touch; }
  .pr-tabs { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .pr-tabs::-webkit-scrollbar { display: none; }
  .pr-tab { flex: none; padding: 8px 12px; }
}

/* ===== 选品流水线 手机端（gG 20260921）：仅 ≤700px 生效，桌面零变化 ===== */
@media (max-width: 700px) {
  .ls-page { display: flex; flex-direction: column; }
  .ls-page > h2 { order: 0; display: block !important; margin: 0 0 8px; font-size: 17px; line-height: 1.3; }
  .ls-page > h2 > span { display: block; }
  .ls-page h2 span.muted { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    margin-top: 3px; font-size: 11.5px !important; line-height: 1.55; }
  .ls-page > h2 > span > span.muted:last-of-type { display: inline-block; -webkit-line-clamp: unset; margin-top: 4px; }  /* UI 版本号保留 */
  .ls-page > details { order: 1; margin: 0 0 10px; }
  .ls-page > details > summary { font-size: 12.5px; }
  .ls-page > details > div { font-size: 12.5px !important; line-height: 1.7; }

  /* 漏斗：单行横滑 */
  .ls-page > .lp-funnel { order: 2; flex-wrap: nowrap; overflow-x: auto; margin: 0 0 10px;
    padding-bottom: 2px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .ls-page > .lp-funnel::-webkit-scrollbar { display: none; }
  .ls-page .lp-chip { flex: none; font-size: 12.5px; padding: 6px 11px; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
  .ls-page .lp-chip:active { opacity: .72; }

  /* 筛选：关键词整行(16px) + 两列控件 + 复选整行（order 重排，不动 DOM/JS） */
  .ls-page > form { order: 3; display: grid !important; grid-template-columns: 1fr 1fr; gap: 8px;
    margin: 0 0 12px; font-size: 13px; }
  .ls-page > form input[name=keyword] { order: -1; grid-column: 1 / -1; width: 100% !important; }
  .ls-page > form select, .ls-page > form input { width: 100% !important; min-width: 0; min-height: 40px; font-size: 16px; }
  .ls-page > form .btn { min-height: 40px; font-size: 13px; }
  .ls-page > form label { order: 9; grid-column: 1 / -1; display: flex; align-items: center; gap: 6px;
    min-height: 30px; margin: 0; font-size: 12.5px; }
  .ls-page > form label input { width: auto !important; min-height: 0; min-width: 0; height: 17px; width: 17px; }

  .ls-page > .ls-twrap { order: 4; display: none; }
  .ls-page > .mobile-cards { order: 5; }
  .ls-page > .pager { order: 6; display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; overflow-x: auto;
    padding: 4px 2px calc(2px + env(safe-area-inset-bottom)); scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .ls-page > .pager::-webkit-scrollbar { display: none; }
  .ls-page > .pager > * { flex: none; }

  /* 工单卡：可点开详情、按压反馈 */
  .ls-cards .ocard { margin: 0 0 10px; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
  .ls-cards .ocard:active { transform: scale(.985); }
  .ls-cards .ocard-title { font-size: 14px; white-space: normal; display: -webkit-box;
    -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.4; }
  .ls-cards .ocard-no { font-size: 11.5px; line-height: 1.4; display: -webkit-box;
    -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
  .ls-cards .lp-st { flex: none; }
  .ls-cards .ocard-grid { font-size: 12.5px; gap: 3px 10px; }
  .ls-cards .ocard-grid .v b { font-weight: 600; }
  .ls-cards .lp-mism { margin-top: 4px; }

  /* 详情弹层：贴屏高度、输入 16px（覆盖 JS 生成的表单控件）、步骤条收紧 */
  .lp-modal { top: 2vh; max-height: 94vh; }
  .lp-modal input, .lp-modal textarea { font-size: 16px !important; }
  .lp-modal select { font-size: 16px !important; }
  .lp-steps { gap: 4px; }
  .lp-step { flex: 1 1 30%; min-width: 0; font-size: 11.5px; padding: 7px 4px; }
  .lp-kv { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  /* 0921 阶段2创建表单：高级/预热参数表窄屏整表横滚（行内多定宽输入被&nbsp;粘住无法折行） */
  #lpAdvBox, #lpPreheatBox { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  #lpAdvBox::-webkit-scrollbar, #lpPreheatBox::-webkit-scrollbar { display: none; }
  .lp-act input[type=number] { min-width: 56px; }   /* 16px 字号下 46px 宽截数字 */
}

/* ===== 设备数据分析 手机端（gG 20260921）：仅 ≤700px 生效，桌面零变化
   div. 前缀为压过页内 <style> 同名规则（body 内样式晚于 head 的 admin.css 加载），勿清理 ===== */
@media (max-width: 700px) {
  .da-head { display: grid; gap: 8px; margin-bottom: 12px; }
  .da-head h2 { margin: 0; font-size: 17px; line-height: 1.3; }
  .da-head .da-sub-note { margin-top: 2px; }
  .da-head .toolbar { margin: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0;
    border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); }
  .da-head .toolbar .btn { margin: 0; min-height: 40px; padding: 0 2px; border-radius: 0;
    border: none; border-left: 1px solid var(--border); font-size: 11.5px;
    background: var(--surface); color: var(--text-soft); box-shadow: none;
    touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
  .da-head .toolbar .btn:first-child { border-left: none; }
  .da-head .toolbar .btn.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
  .da-head .toolbar .btn:active { opacity: .8; }

  div.da-tabs { flex-wrap: nowrap; overflow-x: auto; margin-bottom: 12px; padding-bottom: 2px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  div.da-tabs::-webkit-scrollbar { display: none; }
  div.da-tab { flex: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
  div.da-tab:active { opacity: .8; }

  /* KPI：合并一块两列瓦片，发丝线分隔 */
  div.da-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-bottom: 12px;
    border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
  div.da-kpi { border: none; border-radius: 0; box-shadow: none; padding: 10px 12px 9px; }
  div.da-kpi:nth-child(odd) { border-right: 1px solid var(--border); }
  div.da-kpi:nth-child(-n+6) { border-bottom: 1px solid var(--border); }
  div.da-kpi .num { font-size: 20px; margin-top: 1px; }
  div.da-kpi .mini-bar { margin-top: 6px; }

  div.da-plat-head { padding: 10px 12px; gap: 4px 10px; }
  div.da-plat-name { font-size: 14px; }
  div.da-plat-meta { font-size: 11.5px; }
  div.da-legend { font-size: 10px; gap: 8px; flex-basis: 100%; }
  div.da-legend i { width: 8px; height: 8px; }

  /* 设备行：880px 十列横滚 → 卡片式（设备+成功率 / 分布条 / 四列带标签数值） */
  .da-scroll .da-row { min-width: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px 8px; align-items: center; padding: 10px 12px; }
  .da-row.da-row-hd { display: none; }   /* 排序表头为桌面机制 */
  .da-scroll .da-row:not(.da-row-hd) + .da-row:not(.da-row-hd) { border-top: 1px solid var(--border); }
  .da-scroll .da-dev { grid-column: 1 / 3; font-size: 13px; white-space: normal; }
  .da-scroll .da-dev .plats { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
  .da-scroll .da-badge-cell { grid-column: 3 / 5; display: flex; justify-content: flex-end; align-items: center; }
  .da-scroll .da-bar { grid-column: 1 / -1; height: 14px; }
  .da-scroll .da-c { display: flex; align-items: baseline; justify-content: flex-start; gap: 4px;
    text-align: left; font-size: 13px; min-width: 0; white-space: nowrap; }
  .da-scroll .da-c::before { flex: none; font-size: 10.5px; color: var(--muted); }
  .da-scroll .da-row > div:nth-child(4)::before { content: "成功"; }
  .da-scroll .da-row > div:nth-child(5)::before { content: "失败"; }
  .da-scroll .da-row > div:nth-child(6)::before { content: "回退"; }
  .da-scroll .da-row > div:nth-child(7)::before { content: "待核"; }
  .da-scroll .da-row > div:nth-child(8)::before { content: "进行"; }
  .da-scroll .da-row > div:nth-child(9)::before { content: "总单"; }
  .da-scroll .da-row > div:nth-child(10)::before { content: "利润"; }
  .da-scroll .da-row > div:nth-child(10) { grid-column: span 2; }  /* 利润带¥较长，占两列防 320px 溢出 */
}

/* ########## 组C（闲鱼订单侧） ########## */
/* ---- /xy/orders ---- */
@media (max-width: 700px) {
  .xo-card > .page-head .pw-head-copy { min-width: 0; }
  .xo-card .xy-h2 { font-size: 17px; }
  .xo-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

  /* 统计+快筛：融合为一块分段面板（surface-soft 底 + 发丝线分隔） */
  .xo-card .xyo-stats { display: grid; grid-template-columns: 1fr 1fr; margin: 2px 0 0; padding: 0; background: var(--surface-soft); border: 1px solid var(--border); border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; }
  .xo-card .xyo-stat { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 10px 12px 8px; border-left: 1px solid var(--border); border-top: 1px solid var(--border); background: none; }
  .xo-card .xyo-stat:nth-child(1), .xo-card .xyo-stat:nth-child(2) { border-top: none; }
  .xo-card .xyo-stat:nth-child(odd) { border-left: none; }
  .xo-card .xyo-stat .k { font-size: 11.5px; }
  .xo-card .xyo-stat .v { font-size: 17px; }
  .xo-card .xyo-stat .v.xy-money { font-size: 17px; }
  .xo-card .xyo-stat .sub { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .xo-card .xyo-filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; padding: 10px 12px 12px; background: var(--surface-soft); border: 1px solid var(--border); border-top: none; border-radius: 0 0 var(--radius) var(--radius); }
  .xo-card .xyo-filters .chip { margin: 0; background: var(--surface); min-height: 30px; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
  .xo-card .xyo-filters .chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }
  .xo-card .xyo-filters .chip.active b { color: #fff; }
  .xo-card .xyo-quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; padding: 0; width: calc(100% + 24px); flex: none; margin: 6px -12px 0; border-top: 1px solid var(--border); background: var(--surface); }
  .xo-card .xyo-quick a { display: flex; align-items: center; justify-content: center; min-height: 36px; padding: 0 4px; border-radius: 0; border: none; border-left: 1px solid var(--border); font-size: 12px; }
  .xo-card .xyo-quick a:first-child { border-left: none; }
  .xo-card .xyo-filters form { display: grid !important; grid-template-columns: repeat(6, 1fr); gap: 8px; align-items: end; width: calc(100% + 24px); margin: 0 -12px -12px; padding: 8px 12px 10px; border-top: 1px solid var(--border); background: var(--surface); }
  .xo-card .xyo-filters form input[type=text] { grid-area: 1 / 1 / 2 / 5; width: auto !important; min-width: 0; min-height: 40px; font-size: 16px; border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
  .xo-card .xyo-filters form > button[type=submit] { grid-area: 1 / 5 / 2 / 6; margin-left: -9px; min-height: 40px; padding: 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: var(--primary); border-color: var(--primary); color: #fff; }
  .xo-card .xyo-filters form > button[type=submit]::before { content: ""; display: block; width: 16px; height: 16px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E") center/contain no-repeat; }
  .xo-card .xo-t { font-size: 0; }
  .xo-card .xyo-filters form input.dtpicker[name=start] { grid-area: 2 / 1 / 3 / 4; width: auto !important; min-width: 0; min-height: 40px; }
  .xo-card .xyo-filters form input.dtpicker[name=end] { grid-area: 2 / 4 / 3 / 7; width: auto !important; min-width: 0; min-height: 40px; }
  .xo-card .xyo-filters form > a.btn { grid-column: 1 / -1; justify-self: end; min-height: 32px; padding: 0 12px; font-size: 12px; }

  /* 手机卡片列表（.mobile-cards >700px 全局隐藏；表格 .hide-m ≤700px 隐藏） */
  .xo-list { padding-bottom: env(safe-area-inset-bottom); }
  .xo-oc { position: relative; display: flex; flex-direction: column; gap: 7px; margin: 0 0 10px; padding: 11px 12px 10px 15px; background: var(--surface); border: 1px solid var(--border); border-radius: calc(var(--radius) + 2px); box-shadow: var(--shadow-xs); overflow: hidden; }
  .xo-oc::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--muted); opacity: .45; }
  .xo-oc.xo-att::before { background: var(--warning); opacity: 1; }
  .xo-main { display: flex; align-items: flex-start; gap: 10px; }
  .xo-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
  .xo-goods { font-size: 15px; font-weight: 600; line-height: 1.35; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .xo-st { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
  .xo-money { flex: none; max-width: 46%; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
  .xo-amt { font-size: 17px; font-weight: 700; line-height: 1.15; color: var(--text); white-space: nowrap; font-variant-numeric: tabular-nums; }
  .xo-amt i { font-style: normal; font-size: 11px; font-weight: 400; color: var(--muted); margin-left: 3px; }
  .xo-ref { font-size: 11.5px; color: var(--fail-text, #c62828); white-space: nowrap; }
  .xo-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 12px; }
  .xo-tag { display: inline-flex; align-items: center; gap: 4px; min-width: 0; max-width: 100%; }
  .xo-tag i { font-style: normal; font-size: 11px; color: var(--muted); }
  .xo-tag b { font-weight: 500; color: var(--text-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .xo-more { border-top: 1px dashed var(--border); }
  .xo-more > summary { display: flex; align-items: center; gap: 6px; min-height: 34px; cursor: pointer; user-select: none; -webkit-user-select: none; list-style: none; font-size: 12px; color: var(--muted); touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
  .xo-more > summary::-webkit-details-marker { display: none; }
  .xo-more > summary::after { content: ""; margin-left: auto; flex: none; width: 7px; height: 7px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg); transition: transform var(--transition); }
  .xo-more[open] > summary::after { transform: rotate(225deg); margin-top: 3px; }
  .xo-kv .r { display: flex; gap: 10px; padding: 3px 0; font-size: 12px; }
  .xo-kv .k { flex: none; color: var(--muted); font-size: 11px; padding-top: 1px; }
  .xo-kv .v { min-width: 0; color: var(--text-soft); word-break: break-all; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
  .xo-ops { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .xo-ops .op-chip { min-height: 34px; font-size: 12.5px; }
  .xo-empty { padding: 22px 12px; text-align: center; }

  /* 分页条：页码组窄屏换行（21 页码在 320px 单行溢出，全局组件不动、页内 scoped 兜底） */
  .xo-card .pager { gap: 6px; }
  .xo-card .pager .pager-btns { max-width: 100%; flex-wrap: wrap; }
  .xo-card .pager .pager-total { margin-right: 0; flex-basis: 100%; }
}

/* ---- /xy/refunds ---- */
@media (max-width: 700px) {
  .xr-card { display: flex; flex-direction: column; }
  .xr-card > h2 { order: 0; font-size: 17px; }
  .xr-card > .xr-sync { order: 1; }
  .xr-card > .xr-desc { order: 2; }
  .xr-card > .xr-warn { order: 3; }
  .xr-card > .xr-fbar { order: 4; }
  .xr-card > .xr-twrap { order: 5; }
  .xr-card > .xr-list { order: 6; }
  .xr-card > .pager { order: 7; }

  .xr-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 6px 0 10px; }

  /* 动作行：紧贴标题（同步钮 + 总数右对齐），去桌面分隔线 */
  .xr-sync { display: flex !important; align-items: center; gap: 10px; margin: 0 0 2px !important; padding: 0 !important; border-top: none !important; }
  .xr-sync .btn { min-height: 38px; padding: 0 14px; font-size: 13px; }
  .xr-sync .muted { margin-left: auto !important; white-space: nowrap; }

  /* 筛选面板：贴合搜索行 → 双下拉 → 双日期 → 清除 */
  .xr-fbar { margin: 0 0 12px !important; border-top: none !important; background: var(--surface-soft); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px !important; }
  .xr-fbar > form { display: grid !important; grid-template-columns: repeat(6, 1fr); gap: 8px; align-items: end; flex-wrap: nowrap !important; }
  .xr-fbar input[type=text] { grid-area: 1 / 1 / 2 / 5; width: auto !important; min-width: 0; min-height: 40px; font-size: 16px; border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
  .xr-fbar select { width: 100% !important; min-width: 0; min-height: 40px; font-size: 14px; }
  .xr-fbar select[name=status] { grid-area: 2 / 1 / 3 / 4; }
  .xr-fbar select[name=rtype] { grid-area: 2 / 4 / 3 / 7; }
  .xr-fbar input.dtpicker[name=start] { grid-area: 3 / 1 / 4 / 4; width: auto !important; min-width: 0; min-height: 40px; }
  .xr-fbar input.dtpicker[name=end] { grid-area: 3 / 4 / 4 / 7; width: auto !important; min-width: 0; min-height: 40px; }
  .xr-fbar form > button[type=submit] { grid-area: 1 / 5 / 2 / 6; margin-left: -9px; min-height: 40px; padding: 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: var(--primary); border-color: var(--primary); color: #fff; }
  .xr-fbar form > button[type=submit]::before { content: ""; display: block; width: 16px; height: 16px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E") center/contain no-repeat; }
  .xr-t { font-size: 0; }
  .xr-fbar form > a.btn { grid-column: 1 / -1; justify-self: end; min-height: 32px; padding: 0 12px; font-size: 12px; }

  /* 手机售后卡（表格 ≤700px 隐藏） */
  .xr-list { padding-bottom: env(safe-area-inset-bottom); }
  .xr-oc { position: relative; display: flex; flex-direction: column; gap: 7px; margin: 0 0 10px; padding: 11px 12px 10px 15px; background: var(--surface); border: 1px solid var(--border); border-radius: calc(var(--radius) + 2px); box-shadow: var(--shadow-xs); overflow: hidden; }
  .xr-oc::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--muted); opacity: .45; }
  .xr-oc.xr-pending::before { background: var(--warning); opacity: 1; }
  .xr-main { display: flex; align-items: flex-start; gap: 10px; }
  .xr-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
  .xr-st { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
  .xr-goods { font-size: 13px; color: var(--text-soft); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
  .xr-money { flex: none; max-width: 46%; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
  .xr-amt { font-size: 17px; font-weight: 700; line-height: 1.15; color: var(--text); white-space: nowrap; font-variant-numeric: tabular-nums; }
  .xr-amt i { font-style: normal; font-size: 11px; font-weight: 400; color: var(--muted); margin-left: 3px; }
  .xr-ref { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
  .xr-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 12px; }
  .xr-tag { display: inline-flex; align-items: center; gap: 4px; min-width: 0; max-width: 100%; }
  .xr-tag i { font-style: normal; font-size: 11px; color: var(--muted); }
  .xr-tag b { font-weight: 500; color: var(--text-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .xr-reason { font-size: 12px; line-height: 1.5; color: var(--text-soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .xr-reason i { font-style: normal; font-size: 11px; color: var(--muted); margin-right: 4px; }
  .xr-more { border-top: 1px dashed var(--border); }
  .xr-more > summary { display: flex; align-items: center; gap: 6px; min-height: 34px; cursor: pointer; user-select: none; -webkit-user-select: none; list-style: none; font-size: 12px; color: var(--muted); touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
  .xr-more > summary::-webkit-details-marker { display: none; }
  .xr-more > summary::after { content: ""; margin-left: auto; flex: none; width: 7px; height: 7px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg); transition: transform var(--transition); }
  .xr-more[open] > summary::after { transform: rotate(225deg); margin-top: 3px; }
  .xr-kv .r { display: flex; gap: 10px; padding: 3px 0; font-size: 12px; }
  .xr-kv .k { flex: none; color: var(--muted); font-size: 11px; padding-top: 1px; }
  .xr-kv .v { min-width: 0; color: var(--text-soft); word-break: break-all; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
  .xr-kv .v.time { font-family: inherit; }
  .xr-ops { display: flex; gap: 8px; align-items: stretch; }
  .xr-ops > .btn { flex: 0 0 96px; min-height: 40px; }
  .xr-ops form { flex: 1; display: flex !important; gap: 6px; align-items: center; margin: 0 !important; }
  .xr-ops form input[type=text] { flex: 1; min-width: 0; width: auto !important; min-height: 40px; font-size: 16px; }
  .xr-ops form .btn { min-height: 40px; white-space: nowrap; }
  .xr-empty { padding: 22px 12px; text-align: center; }

  /* 分页条窄屏兜底（同 xo） */
  .xr-card .pager { gap: 6px; }
  .xr-card .pager .pager-btns { max-width: 100%; flex-wrap: wrap; }
  .xr-card .pager .pager-total { margin-right: 0; flex-basis: 100%; }
}

/* ---- /xy/cards ---- */
.xc-note { display: none; } /* 手机专属折叠说明（>700px 恒隐藏） */
@media (max-width: 700px) {
  .xc-card > h2 { font-size: 17px; }
  .xc-card > .xc-desc { display: none; }
  .xc-note { display: block; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-soft); margin: 10px 0 12px; }
  .xc-note > summary { display: flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; cursor: pointer; user-select: none; -webkit-user-select: none; list-style: none; font-size: 12.5px; font-weight: 600; color: var(--text-soft); touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
  .xc-note > summary::-webkit-details-marker { display: none; }
  .xc-note > summary::after { content: ""; margin-left: auto; flex: none; width: 7px; height: 7px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg); transition: transform var(--transition); }
  .xc-note[open] > summary::after { transform: rotate(225deg); margin-top: 3px; }
  .xc-note-body { padding: 2px 12px 10px; font-size: 12px; line-height: 1.65; color: var(--text-soft); }
  .xc-note-body b { color: var(--text); }

  /* 动作行：三钮等宽一行（主钮保色，次钮转幽灵描边） */
  .xc-acts { display: flex !important; gap: 8px; margin: 0 0 12px !important; padding: 0 !important; border-top: none !important; flex-wrap: nowrap !important; }
  .xc-acts form { display: contents !important; }
  .xc-acts .btn { flex: 1 1 0; min-width: 0; min-height: 38px; padding: 0 4px; font-size: 12.5px; white-space: nowrap; }
  .xc-acts .btn-success { background: var(--surface); border: 1px solid var(--border-strong); color: var(--text-soft); box-shadow: none; }
  .xc-acts .btn-success:active { background: var(--surface-soft); }

  /* 主表横滚优化：收窄最小宽 + 卡种名称列冻结 */
  .xc-twrap .table-scroll { min-width: 640px; }
  .xc-twrap .table-scroll th:first-child,
  .xc-twrap .table-scroll td:first-child { position: sticky; left: 0; z-index: 2; }
  .xc-twrap .table-scroll th:first-child { background: var(--surface-soft); }
  .xc-twrap .table-scroll td:first-child { background: var(--surface); box-shadow: 1px 0 0 var(--border); }
  .xc-twrap tbody tr:hover td:first-child { background: var(--hover); }
}

/* ---- /xy/report ---- */
@media (max-width: 700px) {
  .xrp-card > h2 { font-size: 17px; }
  .xrp-card > .xrp-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 6px 0 10px; }

  /* 统计：2×2 瓦片 + 毛利通栏（分段面板，发丝线分隔） */
  .xrp-card .xrp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 0 0 12px; background: var(--surface-soft); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
  .xrp-card .xrp-grid .stat { min-width: 0; padding: 10px 12px 9px; border: none; border-left: 1px solid var(--border); border-top: 1px solid var(--border); border-radius: 0; box-shadow: none; background: none; }
  .xrp-card .xrp-grid .stat:nth-child(-n+2) { border-top: none; }
  .xrp-card .xrp-grid .stat:nth-child(odd) { border-left: none; }
  .xrp-card .xrp-grid .stat:nth-child(5) { grid-column: 1 / -1; border-left: none; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 10px 14px; background: var(--surface); }
  .xrp-card .xrp-grid .num { font-size: 19px; }
  .xrp-card .xrp-grid .stat:nth-child(5) .num { font-size: 21px; }
  .xrp-card .xrp-grid .lab { margin-top: 3px; }
  .xrp-card .xrp-grid .stat:nth-child(5) .lab { margin-top: 0; }

  /* 日期筛选：双日期 + 快捷段一行 */
  .xrp-card .xrp-fbar { border-bottom: none !important; margin: 0 0 12px !important; padding: 0 !important; }
  .xrp-card .xrp-fbar form { display: grid !important; grid-template-columns: repeat(8, 1fr); gap: 8px; align-items: end; flex-wrap: nowrap !important; }
  .xrp-card .xrp-fbar input.dtpicker[name=start] { grid-area: 1 / 1 / 2 / 4; width: auto !important; min-width: 0; min-height: 40px; }
  .xrp-card .xrp-fbar input.dtpicker[name=end] { grid-area: 1 / 4 / 2 / 7; width: auto !important; min-width: 0; min-height: 40px; }
  .xrp-card .xrp-fbar form > a.btn { grid-area: 1 / 7 / 2 / 9; min-height: 40px; padding: 0 4px; font-size: 12.5px; }
  .xrp-card .xrp-fbar form > button[type=submit] { grid-area: 2 / 1 / 3 / 3; min-height: 40px; padding: 0 4px; font-size: 12.5px; background: var(--primary); border-color: var(--primary); color: #fff; }
  .xrp-card .xrp-fbar form > button[data-range] { min-height: 40px; padding: 0 4px; font-size: 12.5px; background: var(--surface); border-color: var(--border-strong); color: var(--text-soft); box-shadow: none; }
  .xrp-card .xrp-fbar form > button[data-range="today"] { grid-area: 2 / 3 / 3 / 5; }
  .xrp-card .xrp-fbar form > button[data-range="7"] { grid-area: 2 / 5 / 3 / 7; }
  .xrp-card .xrp-fbar form > button[data-range="30"] { grid-area: 2 / 7 / 3 / 9; }

  /* 报表横滚优化：商品列宽度下限（防 40 字标题压到 76px 每行折 7 行）+ 订单号列冻结 */
  .xrp-twrap .table-scroll { min-width: 720px; }
  .xrp-twrap .table-scroll th, .xrp-twrap .table-scroll td { padding: 8px 9px; font-size: 12px; }
  .xrp-twrap .table-scroll th:nth-child(2) { min-width: 240px; }
  .xrp-twrap .table-scroll td:nth-child(2) { width: 240px; min-width: 240px; max-width: 240px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .xrp-twrap .table-scroll td:first-child, .xrp-twrap .table-scroll td:nth-child(10) { white-space: nowrap; }
  .xrp-twrap .badge { white-space: nowrap; }
  .xrp-twrap .table-scroll th:first-child,
  .xrp-twrap .table-scroll td:first-child { position: sticky; left: 0; z-index: 2; }
  .xrp-twrap .table-scroll th:first-child { background: var(--surface-soft); }
  .xrp-twrap .table-scroll td:first-child { background: var(--surface); box-shadow: 1px 0 0 var(--border); }
  .xrp-twrap tbody tr:hover td:first-child { background: var(--hover); }
}

/* ########## 组D（闲鱼商品侧） ########## */
/* ---------- xy_goods.html ---------- */
.xg-h2acts { display: none; }
@media (max-width: 700px) {
  .xg-card { display: flex; flex-direction: column; }
  .xg-card > .xg-title { order: 0; display: flex; align-items: center; gap: 10px; min-height: 38px; margin: 0 0 12px; font-size: 17px; line-height: 1.3; }
  .xg-title .xg-t { flex: 1; min-width: 0; }
  .xg-title .xg-h2acts { display: inline-flex; flex: none; gap: 8px; margin-left: auto; }
  .xg-title .xg-h2acts .btn { min-height: 38px; padding: 0 12px; font-size: 13px; gap: 5px; background: var(--surface); border: 1px solid var(--border-strong); color: var(--text-soft); box-shadow: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
  .xg-title .xg-h2acts .btn:active { transform: scale(.96); }
  .xg-title .xg-h2acts .btn::before { content: ""; flex: none; width: 14px; height: 14px; background: currentColor; -webkit-mask: var(--xg-ic) center/contain no-repeat; mask: var(--xg-ic) center/contain no-repeat; }
  .xg-title .xg-h2acts .xg-ic-sync { --xg-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 3a5 5 0 0 1 4.546 2.914.5.5 0 1 0 .908-.416A6 6 0 0 0 8 2a5.98 5.98 0 0 0-3.777 1.343V2.5a.5.5 0 0 0-1 0v2A.5.5 0 0 0 3.723 5h2a.5.5 0 0 0 0-1H4.602A5 5 0 0 1 8 3z'/%3E%3Cpath d='M2.5 6.5a.5.5 0 0 0-.5.5 6 6 0 0 0 9.277 5.016v.984a.5.5 0 0 0 1 0v-2a.5.5 0 0 0-.5-.5h-2a.5.5 0 0 0 0 1h1.351A4.999 4.999 0 0 1 3 7a.5.5 0 0 0-.5-.5z'/%3E%3C/svg%3E"); }
  .xg-title .xg-h2acts .xg-ic-add { --xg-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 2a.75.75 0 0 1 .75.75v4.5h4.5a.75.75 0 0 1 0 1.5h-4.5v4.5a.75.75 0 0 1-1.5 0v-4.5h-4.5a.75.75 0 0 1 0-1.5h4.5v-4.5A.75.75 0 0 1 8 2z'/%3E%3C/svg%3E"); }
  .xg-card > .xg-intro { order: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .xg-card > .xg-warn { order: 2; }
  .xg-card > .xg-acts { display: none !important; } /* 动作钮上移进标题行，总数由底部 pager 唯一呈现（内联 flex 须 !important 压掉） */
  .xg-card > .xg-filter { order: 3; margin: 0 0 12px !important; padding: 12px 0 0; border-top: 1px solid var(--border) !important; display: block; }
  .xg-card > table#xy-goods-table, .xg-card > .table-wrap, .xg-card > .table-ctl { order: 4; }
  #xy-goods-table { display: none; }
  .xg-card > .xg-cards { order: 5; padding-bottom: env(safe-area-inset-bottom); }
  .xg-card > .pager { order: 6; }
  /* 筛选表单：关键词+搜索贴合一行 / 状态+清除一行 */
  .xg-filter form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
  .xg-filter input[name=keyword] { order: 1; flex: 1 1 calc(100% - 60px); width: auto !important; min-width: 0; min-height: 40px; font-size: 16px; border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
  .xg-filter button[type=submit] { order: 2; flex: 0 0 60px; min-height: 40px; min-width: 0; margin-left: -8px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
  .xg-filter select { order: 3; flex: 1 1 auto; min-width: 0; min-height: 40px; font-size: 16px; }
  .xg-filter a.btn { order: 4; flex: 0 0 auto; min-height: 40px; }
  /* 商品卡：标题/状态 + 价格 → ID 行 → 底部操作 */
  .xg-cards .xg-gc { display: flex; flex-direction: column; gap: 7px; margin: 0 0 10px; padding: 11px 12px 10px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: calc(var(--radius) + 2px); box-shadow: var(--shadow-xs); }
  .xg-gc-main { display: flex; align-items: flex-start; gap: 10px; }
  .xg-gc-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
  .xg-gc-title { font-size: 15px; font-weight: 600; line-height: 1.35; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .xg-gc-tags { display: flex; flex-wrap: wrap; gap: 4px; }
  .xg-gc-money { flex: none; max-width: 46%; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
  .xg-gc-price { font-size: 17px; font-weight: 700; line-height: 1.15; color: var(--text); white-space: nowrap; font-variant-numeric: tabular-nums; }
  .xg-gc-meta { font-size: 11px; color: var(--muted); white-space: nowrap; }
  .xg-gc-ids { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .xg-gc-foot { display: flex; align-items: center; gap: 8px; padding-top: 8px; border-top: 1px dashed var(--border); }
  .xg-gc-time { flex: 1; min-width: 0; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .xg-gc-ops { display: flex; gap: 6px; flex: none; }
  .xg-gc-ops .btn { min-height: 32px; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
  .xg-empty { padding: 26px 14px; border: 1px dashed var(--border); border-radius: calc(var(--radius) + 2px); background: var(--surface); text-align: center; font-size: 13px; color: var(--muted); }
  /* 创建商品弹窗：内联 min-width 压掉，表单三列行收缩 */
  #xy-create-modal .modal-box { min-width: 0 !important; }
  #xy-create-modal .form-row { flex-wrap: wrap !important; }
  #xy-create-modal .form-row input, #xy-create-modal .form-row select, #xy-create-modal .form-row textarea { width: 100%; min-width: 0; }
}

/* ---------- xy_shops.html ---------- */
.xs-ms { display: none; }
@media (max-width: 700px) {
  /* 页头：纵排 + 说明 3 行截断 + CTA 整宽 40px */
  .xs-head { flex-direction: column; align-items: stretch; gap: 8px; margin-bottom: 12px; }
  .xs-head .pw-head-copy h2 { font-size: 17px; margin: 0 0 6px; }
  .xs-head .pw-head-copy .muted { line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .xs-head .pw-head-actions { display: flex; }
  .xs-head .pw-head-actions .btn { flex: 1; min-height: 40px; font-size: 13px; white-space: nowrap; justify-content: center; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
  .xs-head .pw-head-actions .btn:active { transform: scale(.97); }
  .xs-head .pw-head-actions form { flex: 1; display: flex; }
  /* 统计+快筛：合并分段面板（os-row 手机隐藏，换 4 列计数瓦片 + 脚注） */
  .xs-card .xs-stats { padding: 0; gap: 0; overflow: hidden; }
  .xs-stats .os-row { display: none; }
  .xs-stats .xs-ms { display: grid; grid-template-columns: repeat(4, 1fr); }
  .xs-ms .xs-cell { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 10px 4px 9px; text-align: center; }
  .xs-ms .xs-cell:nth-child(n+2) { border-left: 1px solid var(--border); }
  .xs-ms .xs-l { font-size: 11px; line-height: 1.2; color: var(--muted); white-space: nowrap; }
  .xs-ms .xs-v { font-size: 19px; font-weight: 700; line-height: 1.2; color: var(--text); font-variant-numeric: tabular-nums; }
  .xs-ms .xs-v-ok { color: var(--success); }
  .xs-ms .xs-v-warn { color: var(--warning); }
  .xs-ms .xs-v-bad { color: var(--danger); }
  .xs-ms .xs-tail { grid-column: 1 / -1; display: block; padding: 7px 12px 8px; background: var(--surface); border-top: 1px solid var(--border); text-align: center; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  /* 快筛 chips：三列分段控件，发丝线分隔，计数彩色纯文字 */
  .xs-stats .xyo-filters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin: 0 !important; border-top: 1px solid var(--border); background: var(--surface); }
  .xs-stats .xyo-filters .chip { display: flex; align-items: center; justify-content: center; gap: 5px; min-height: 42px; margin: 0; padding: 0 4px; border: none; border-left: 1px solid var(--border); border-radius: 0; background: transparent; font-size: 12.5px; line-height: 1.2; white-space: nowrap; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
  .xs-stats .xyo-filters .chip:nth-child(3n+1) { border-left: none; }
  .xs-stats .xyo-filters .chip b { margin-left: 2px; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
  .xs-stats .xyo-filters .chip[data-f="erp"] b { color: var(--success); }
  .xs-stats .xyo-filters .chip[data-f="noerp"] b { color: var(--danger); }
  .xs-stats .xyo-filters .chip[data-f="pro"] b { color: var(--blue-text); }
  .xs-stats .xyo-filters .chip[data-f="soon"] b { color: var(--warning); }
  .xs-stats .xyo-filters .chip.active { background: var(--blue-bg); color: var(--blue-text); border-color: var(--border); box-shadow: inset 0 -2px 0 var(--primary); }
  .xs-stats .xyo-filters .chip.active b { color: inherit; }
  .xs-stats .xyo-filters .chip:active { transform: scale(.96); }
  /* 店铺瓦片：双列自适应（320 单列）；组头收紧 */
  .xs-fleet .xys-tiles { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
  .xs-fleet .xys-group { margin: 12px 0 8px; }
  /* 凭证金库卡：凭证格手机单列化更易读 */
  .xs-acc .xys-creds { grid-template-columns: 1fr 1fr; gap: 6px; }
  .xs-acc .xys-acc { padding: 12px; gap: 8px; }
  .xs-acc .xys-acc-ops .btn { min-height: 34px; touch-action: manipulation; }
  /* 账号弹窗：压掉内联 min-width，表单控件满宽 */
  #xy-acc-modal .modal-box { min-width: 0 !important; }
  #xy-acc-modal .form-row { flex-wrap: wrap !important; }
  #xy-acc-modal .form-row input, #xy-acc-modal .form-row select { width: 100%; min-width: 0; }
  .xy-copy-row .lab { flex: 0 0 76px; }
}

/* ---------- xy_supply.html ---------- */
@media (max-width: 700px) {
  .xsp-card > .xsp-title { font-size: 17px; margin: 0 0 8px; }
  .xsp-card > .xsp-intro { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  /* 接入步骤表：th 变小标签、td 变正文（KV 堆叠） */
  .xsp-steps, .xsp-steps tbody { display: block; }
  .xsp-steps tr { display: block; padding: 9px 0; border-bottom: 1px dashed var(--border); }
  .xsp-steps tr:last-child { border-bottom: none; }
  .xsp-steps th { display: block; width: auto !important; min-width: 0; padding: 0 0 4px; background: none; color: var(--text); font-size: 13px; white-space: normal; }
  .xsp-steps td { display: block; padding: 0; border-bottom: none; font-size: 12.5px; line-height: 1.7; color: var(--text-soft); }
  .xsp-steps code { word-break: break-all; }
  /* 告警群表单：标签一行 + 输入/保存贴合一行 + 说明收尾 */
  .xsp-alert { display: block !important; border-top: 1px solid var(--border) !important; margin: 12px 0 0 !important; padding: 12px 0 0; }
  .xsp-alert form { display: flex !important; flex-wrap: wrap; gap: 8px; align-items: center; }
  .xsp-alert form > span:first-child { flex: 1 1 100%; font-size: 12px; line-height: 1.5; }
  .xsp-alert input[type=text] { flex: 1 1 calc(100% - 68px); width: auto !important; min-width: 0; min-height: 40px; font-size: 16px; border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
  .xsp-alert button[type=submit] { flex: 0 0 60px; min-height: 40px; min-width: 0; margin-left: -8px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
  .xsp-alert > .muted:last-child { display: block; font-size: 12px; line-height: 1.6; margin-top: 8px; }
  /* 货源商品/订单双表隐藏，卡片接管 */
  #xy-supply-table, #xy-supply-orders-table { display: none; }
  .xsp-card > .table-wrap, .xsp-card > .table-ctl { display: none; }
  /* 商品操作钮：两列 40px */
  .xsp-gacts { display: grid !important; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0 0 !important; padding: 12px 0 0; border-top: 1px solid var(--border) !important; }
  .xsp-gacts .btn { min-height: 40px; font-size: 13px; justify-content: center; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
  .xsp-gacts .btn:active { transform: scale(.97); }
  /* 货源商品卡 */
  .xsp-cards .xsp-gc { display: flex; flex-direction: column; gap: 7px; margin: 0 0 10px; padding: 11px 12px 10px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: calc(var(--radius) + 2px); box-shadow: var(--shadow-xs); }
  .xsp-gc-main { display: flex; align-items: flex-start; gap: 10px; }
  .xsp-gc-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
  .xsp-gc-title { font-size: 15px; font-weight: 600; line-height: 1.35; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .xsp-gc-tags { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
  .xsp-pool { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
  .xsp-pool-ok { color: var(--ok-text); }
  .xsp-pool-low { color: var(--fail-text); }
  .xsp-gc-money { flex: none; max-width: 46%; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
  .xsp-gc-price { font-size: 17px; font-weight: 700; line-height: 1.15; color: var(--text); white-space: nowrap; font-variant-numeric: tabular-nums; }
  .xsp-gc-cost { font-size: 11px; color: var(--muted); white-space: nowrap; }
  .xsp-gc-no { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .xsp-gc-foot { display: flex; align-items: center; gap: 8px; padding-top: 8px; border-top: 1px dashed var(--border); }
  .xsp-gc-time { flex: 1; min-width: 0; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .xsp-gc-ops { display: flex; gap: 6px; flex: none; }
  .xsp-gc-ops .btn { min-height: 32px; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
  /* 货源订单卡 */
  .xsp-ocards .xsp-oc { display: flex; flex-direction: column; gap: 7px; margin: 0 0 10px; padding: 11px 12px 10px; background: var(--surface); border: 1px solid var(--border); border-radius: calc(var(--radius) + 2px); box-shadow: var(--shadow-xs); }
  .xsp-oc-main { display: flex; align-items: flex-start; gap: 10px; }
  .xsp-oc-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
  .xsp-oc-title { font-size: 15px; font-weight: 600; line-height: 1.35; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .xsp-oc-meta { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .xsp-oc-money { flex: none; max-width: 46%; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
  .xsp-oc-amt { font-size: 17px; font-weight: 700; line-height: 1.15; color: var(--text); white-space: nowrap; font-variant-numeric: tabular-nums; }
  .xsp-oc-p { font-size: 12px; line-height: 1.3; white-space: nowrap; }
  .xsp-p-pos { color: var(--ok-text); }
  .xsp-p-neg { color: var(--fail-text); }
  .xsp-oc-more { border-top: 1px dashed var(--border); }
  .xsp-oc-more summary { list-style: none; display: flex; align-items: center; justify-content: center; gap: 5px; min-height: 34px; font-size: 12px; color: var(--text-soft); cursor: pointer; user-select: none; -webkit-user-select: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
  .xsp-oc-more summary::-webkit-details-marker { display: none; }
  .xsp-oc-more summary::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg); margin-top: -3px; transition: transform var(--transition); }
  .xsp-oc-more[open] summary::after { transform: rotate(225deg); margin-top: 2px; }
  .xsp-oc-kv { display: flex; flex-direction: column; gap: 6px; padding: 2px 0 6px; }
  .xsp-oc-kv .r { display: flex; gap: 8px; font-size: 12px; line-height: 1.5; }
  .xsp-oc-kv .k { flex: none; width: 60px; color: var(--muted); }
  .xsp-oc-kv .v { min-width: 0; word-break: break-all; color: var(--text-soft); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
  .xsp-empty { padding: 26px 14px; border: 1px dashed var(--border); border-radius: calc(var(--radius) + 2px); background: var(--surface); text-align: center; font-size: 13px; color: var(--muted); }
}

/* ########## 全局补丁：分页长页码 320px 溢出兜底（C 组发现，移动端限定） ########## */
@media (max-width: 700px) {
  .pager .pager-btns { max-width: 100%; flex-wrap: wrap; }
}
