/* =========================================================================
   Mall Proto · Design System v2
   方向：暗色高级感商城（consumer） + 明亮精密后台（ops）
   原则：真 SVG 图标 / 层级靠留白与光影 / 单一强调色 / 数字等宽对齐
   ========================================================================= */

/* ---------- 1. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro SC", "SF Pro Text",
               "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  letter-spacing: -0.006em;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
::selection { background: rgba(124, 107, 255, .3); }

/* ---------- 2. Theme tokens ---------- */
.theme-shop {
  --bg: #F5F6F8;
  --bg-2: #FFFFFF;
  --surface: #FFFFFF;
  --elev: #FFFFFF;
  --line: rgba(12,16,28,.08);
  --line-strong: rgba(12,16,28,.15);
  --text: #0B0E14;
  --text-2: #454C5C;
  --muted: #868D9C;
  --accent: #4F46E5;
  --accent-2: #0D9488;
  --accent-ink: #FFFFFF;
  --price: #0B0E14;
  --ok: #0C9A6E;
  --warn: #B4730A;
  --danger: #D92D20;
  --ok-bg: rgba(12,154,110,.09);
  --warn-bg: rgba(180,115,10,.09);
  --danger-bg: rgba(217,45,32,.08);
  --accent-bg: rgba(79,70,229,.07);
  --shadow-1: 0 1px 2px rgba(12,16,28,.05);
  --shadow-2: 0 6px 20px rgba(12,16,28,.08);
  --shadow-3: 0 26px 64px rgba(12,16,28,.16);
  --glass: rgba(255,255,255,.86);
  --r: 14px;
  color-scheme: light;
}

.theme-admin {
  --bg: #F4F5F7;
  --bg-2: #FFFFFF;
  --surface: #FFFFFF;
  --elev: #FFFFFF;
  --line: rgba(12,16,28,.085);
  --line-strong: rgba(12,16,28,.16);
  --text: #0B0E14;
  --text-2: #454C5C;
  --muted: #868D9C;
  --accent: #635BFF;
  --accent-2: #0F9D74;
  --accent-ink: #FFFFFF;
  --price: #0B0E14;
  --ok: #0C9A6E;
  --warn: #B4730A;
  --danger: #D92D20;
  --ok-bg: rgba(12,154,110,.10);
  --warn-bg: rgba(180,115,10,.10);
  --danger-bg: rgba(217,45,32,.09);
  --accent-bg: rgba(99,91,255,.09);
  --shadow-1: 0 1px 2px rgba(12,16,28,.05);
  --shadow-2: 0 4px 14px rgba(12,16,28,.07);
  --shadow-3: 0 24px 60px rgba(12,16,28,.16);
  --glass: rgba(255,255,255,.85);
  --r: 14px;
  color-scheme: light;
}

body.theme-shop { background: var(--bg); color: var(--text); }
body.theme-admin { background: var(--bg); color: var(--text); }

/* ---------- 3. Icon ---------- */
.i {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1em; height: 1em; flex: none; vertical-align: -0.1em;
}
.i svg { width: 100%; height: 100%; display: block; }

/* ---------- 4. Type ---------- */
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -0.022em; }
.t-display { font-size: 30px; line-height: 1.15; font-weight: 720; letter-spacing: -0.035em; }
.t-h1 { font-size: 21px; line-height: 1.25; }
.t-h2 { font-size: 17px; line-height: 1.3; }
.t-h3 { font-size: 15px; line-height: 1.35; }
.t-sm { font-size: 12.5px; }
.t-xs { font-size: 11.5px; }
.muted { color: var(--muted); }
.text-2 { color: var(--text-2); }
.mono { font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace; font-variant-numeric: tabular-nums; }
.num { font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.up { text-transform: uppercase; letter-spacing: .08em; font-size: 10.5px; font-weight: 650; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }

/* ---------- 5. Layout ---------- */
.row { display: flex; align-items: center; gap: 10px; }
.col { display: flex; flex-direction: column; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.wrap { flex-wrap: wrap; }
.g4 { gap: 4px; } .g6 { gap: 6px; } .g8 { gap: 8px; } .g12 { gap: 12px; }
.g16 { gap: 16px; } .g20 { gap: 20px; } .g24 { gap: 24px; }
.mt4 { margin-top: 4px; } .mt6 { margin-top: 6px; } .mt8 { margin-top: 8px; }
.mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt20 { margin-top: 20px; }
.mt24 { margin-top: 24px; } .mt32 { margin-top: 32px; }
.mb8 { margin-bottom: 8px; } .mb12 { margin-bottom: 12px; } .mb16 { margin-bottom: 16px; }
.hide { display: none !important; }
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ---------- 6. Button ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 14px;
  border-radius: 10px; border: 1px solid var(--line-strong);
  background: transparent; color: var(--text);
  font-size: 13px; font-weight: 550; letter-spacing: -0.005em;
  cursor: pointer; white-space: nowrap;
  transition: background .16s ease, border-color .16s ease, transform .08s ease, opacity .16s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: rgba(128,128,160,.09); }
.btn:active { transform: scale(.985); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn .i { font-size: 15px; opacity: .9; }

.btn-primary {
  background: #0B0E14; color: #fff;
  border-color: transparent;
  box-shadow: none;
}
.btn-primary:hover { background: #1B2130; filter: none; }

.btn-ink {
  background: var(--text); color: var(--bg-2);
  border-color: transparent; font-weight: 600;
}
.theme-admin .btn-ink { background: #0B0E14; color: #fff; }
.btn-ink:hover { opacity: .88; background: var(--text); }

.btn-danger { color: var(--danger); border-color: rgba(217,45,32,.28); background: var(--danger-bg); }
.btn-danger:hover { background: var(--danger-bg); filter: brightness(.97); }
.btn-ghost { border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: rgba(128,128,160,.1); color: var(--text); }
.btn-sm { height: 30px; padding: 0 11px; font-size: 12.5px; border-radius: 8px; }
.btn-sm .i { font-size: 13px; }
.btn-lg { height: 50px; padding: 0 22px; font-size: 15px; border-radius: 13px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .42; cursor: not-allowed; }

/* ---------- 7. Card ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-1);
}
.card-hd {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 15px 18px; border-bottom: 1px solid var(--line);
}
.card-hd h3 { font-size: 14.5px; }
.card-bd { padding: 18px; }
.card-pad { padding: 18px; }

/* ---------- 8. Badge ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 8px; border-radius: 6px;
  font-size: 11.5px; font-weight: 600; letter-spacing: 0;
  background: var(--accent-bg); color: var(--accent);
  white-space: nowrap;
}
.badge .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-gray { background: rgba(128,128,160,.12); color: var(--muted); }

/* ---------- 9. Form ---------- */
.field { display: flex; flex-direction: column; gap: 7px; }
.field > label { font-size: 12.5px; font-weight: 550; color: var(--text-2); }
.field .hint { font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.input, .select, .textarea {
  width: 100%; height: 38px; padding: 0 12px;
  background: rgba(128,128,160,.06);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 13px; outline: none;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.theme-admin .input, .theme-admin .select, .theme-admin .textarea { background: #F7F8FA; border-color: rgba(12,16,28,.13); }
.textarea { height: auto; min-height: 82px; padding: 10px 12px; resize: vertical; line-height: 1.6; }
.input::placeholder, .textarea::placeholder { color: var(--muted); }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-bg);
  background: var(--elev);
}
.theme-admin .input:focus, .theme-admin .select:focus, .theme-admin .textarea:focus { background: #fff; }
.input[readonly] { color: var(--muted); }
.select { appearance: none; background-image: none; cursor: pointer; }

/* ---------- 10. Segmented ---------- */
.seg {
  display: inline-flex; padding: 3px; gap: 2px;
  background: rgba(128,128,160,.1);
  border-radius: 10px; border: 1px solid transparent;
}
.seg button {
  border: 0; background: transparent; color: var(--muted);
  font-size: 12.5px; font-weight: 550; padding: 5px 12px;
  border-radius: 7px; cursor: pointer; transition: .15s;
}
.seg button:hover { color: var(--text); }
.seg button.on {
  background: var(--elev); color: var(--text);
  box-shadow: var(--shadow-1);
}

/* ---------- 11. Table ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left; padding: 10px 14px;
  font-size: 10.5px; font-weight: 650; letter-spacing: .07em; text-transform: uppercase;
  color: var(--muted);
  background: transparent; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table td { padding: 13px 14px; border-bottom: 1px solid var(--line); font-size: 13px; vertical-align: middle; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: rgba(128,128,160,.045); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num, .table .mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12.5px; font-variant-numeric: tabular-nums; }

/* ---------- 12. Stat ---------- */
.stat { padding: 16px 18px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.stat .k { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; font-weight: 550; }
.stat .v { font-size: 27px; font-weight: 700; letter-spacing: -0.035em; margin-top: 8px; font-variant-numeric: tabular-nums; }
.stat .v em { font-size: 14px; font-weight: 600; font-style: normal; color: var(--muted); letter-spacing: -0.01em; }
.stat .d { font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.stat.hot { border-color: rgba(217,45,32,.24); background: linear-gradient(180deg, rgba(217,45,32,.045), transparent); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }

/* ---------- 13. Alert ---------- */
.alert { display: flex; gap: 11px; padding: 13px 15px; border-radius: 12px; font-size: 12.5px; line-height: 1.6; }
.alert .i { font-size: 16px; margin-top: 1px; }
.alert-warn { background: var(--warn-bg); color: var(--warn); }
.alert-info { background: var(--accent-bg); color: var(--accent); }
.alert-danger { background: var(--danger-bg); color: var(--danger); }
.alert-ok { background: var(--ok-bg); color: var(--ok); }

/* ---------- 14. Note（设计说明） ---------- */
.note {
  border: 1px solid var(--accent-bg);
  background: var(--accent-bg);
  border-radius: 12px; padding: 12px 14px;
  font-size: 12px; line-height: 1.7; color: var(--text-2);
}
.note .t {
  display: block; font-size: 10.5px; font-weight: 700;
  letter-spacing: .09em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 6px;
}
.note b, .note strong { color: var(--text); font-weight: 620; }
.note .mono { color: var(--text); }

/* ---------- 15. Empty ---------- */
.empty { padding: 44px 20px; text-align: center; color: var(--muted); font-size: 12.5px; }
.empty .i { font-size: 30px; opacity: .35; margin-bottom: 10px; }

/* =========================================================================
   商城（暗色）
   ========================================================================= */
.stage {
  min-height: 100vh; padding: 36px 20px 64px;
  display: flex; flex-direction: column; align-items: center;
  background:
    radial-gradient(900px 420px at 50% -10%, #EDEEF4, transparent 64%),
    radial-gradient(620px 360px at 88% 6%, #EAF2F0, transparent 62%);
  background-color: var(--bg);
}
.stage-head { width: 100%; max-width: 1080px; margin-bottom: 22px; }
.stage-head h1 { font-size: 19px; margin-bottom: 5px; }
.stage-head .sub { font-size: 12.5px; color: var(--muted); }

.btn-bar { display: flex; gap: 8px; }

/* 手机外框：贴近真机 */
.phone {
  width: 390px; height: 844px;
  border-radius: 52px; padding: 10px;
  background: linear-gradient(160deg, #2A2D38 0%, #14161C 42%, #22252E 100%);
  box-shadow:
    0 0 0 1px rgba(255,255,255,.08),
    0 40px 90px rgba(0,0,0,.75),
    0 8px 24px rgba(0,0,0,.5);
  position: relative; flex: none;
}
.phone-screen {
  width: 100%; height: 100%; border-radius: 43px; overflow: hidden;
  background: #fff; position: relative;
  display: flex; flex-direction: column;
}
.island {
  position: absolute; top: 11px; left: 50%; transform: translateX(-50%);
  width: 108px; height: 26px; border-radius: 20px; background: #05060A; z-index: 40;
}
.statusbar {
  height: 46px; flex: none; display: flex; align-items: flex-end; justify-content: space-between;
  padding: 0 26px 6px; font-size: 12px; font-weight: 650; color: var(--text);
  letter-spacing: 0;
}
.statusbar .ico { display: flex; gap: 5px; align-items: center; font-size: 12px; opacity: .85; }
.s-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; }
.s-scroll::-webkit-scrollbar { width: 0; height: 0; }

/* 玻璃顶栏 */
.gbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 10px;
  height: 46px; padding: 0 16px;
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--line);
}
.gbar .ttl { font-size: 14.5px; font-weight: 620; }
.icon-btn {
  width: 30px; height: 30px; margin-left: -6px;
  display: grid; place-items: center; border-radius: 9px;
  border: 0; background: transparent; color: var(--text-2);
  font-size: 18px; cursor: pointer; transition: .15s;
}
.icon-btn:hover { background: rgba(128,128,160,.14); color: var(--text); }

/* 底部 tabbar */
.tabbar {
  height: 62px; flex: none; display: flex; align-items: stretch;
  background: var(--glass); backdrop-filter: blur(18px) saturate(160%);
  border-top: 1px solid var(--line); padding-bottom: 6px;
}
.tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; font-size: 10px; font-weight: 550; color: var(--muted);
}
.tabbar a .i { font-size: 19px; }
.tabbar a.on { color: var(--text); }
.tabbar a.on .i { color: var(--accent); }

/* 底部购买栏 */
.buybar {
  flex: none; padding: 12px 16px 22px; display: flex; gap: 10px; align-items: center;
  background: var(--glass); backdrop-filter: blur(18px) saturate(160%);
  border-top: 1px solid var(--line);
}

/* 商品视觉：极浅色板 + 深色字标（极简，不用重色块） */
.tile {
  position: relative; overflow: hidden;
  background: linear-gradient(145deg, var(--t1, #F2F3F7), var(--t2, #E9EBF1));
  display: grid; place-items: center;
  box-shadow: inset 0 0 0 1px rgba(12,16,28,.04);
}
.tile::before {
  content: ''; position: absolute; inset: -30%;
  background: radial-gradient(closest-side, rgba(255,255,255,.9), transparent 70%);
  transform: translate(-18%, -22%);
}
.tile .mark {
  position: relative; font-size: 26px; font-weight: 800; letter-spacing: -.04em;
  color: rgba(11,14,20,.3);
}
.tile .grain {
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(115deg, rgba(11,14,20,.035) 0 1px, transparent 1px 7px);
  opacity: .6;
}

/* 商城通用区块 */
.s-sec { margin-top: 22px; padding: 0 16px; }
.s-sec-hd { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.s-sec-hd .t { font-size: 15.5px; font-weight: 650; letter-spacing: -.025em; }
.s-sec-hd .m { font-size: 11.5px; color: var(--muted); }

/* 价格 */
.price { color: var(--price); font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.price .sym { font-size: .62em; font-weight: 600; margin-right: 1px; opacity: .85; }
.price .dec { font-size: .68em; opacity: .9; }
.price-xl { font-size: 30px; }
.price-lg { font-size: 24px; }
.price-md { font-size: 18px; }
.price-sm { font-size: 15px; }
.price-old { color: var(--muted); text-decoration: line-through; font-size: 12px; font-weight: 450; letter-spacing: 0; }

/* SKU 选项 */
.sku {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 13px; border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: #F8F9FB;
  font-size: 12.5px; font-weight: 550; color: var(--text-2);
  cursor: pointer; transition: .15s;
}
.sku:hover { border-color: rgba(12,16,28,.24); color: var(--text); background: #fff; }
.sku.on {
  border-color: var(--accent);
  background: #fff; color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79,70,229,.1);
}
.sku .x { font-size: 10.5px; color: var(--muted); font-weight: 500; }
.sku.on .x { color: rgba(79,70,229,.62); }
.sku.off {
  opacity: .42; cursor: not-allowed; text-decoration: line-through;
  border-style: dashed; background: transparent;
}

/* 数量 */
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 10px; overflow: hidden; }
.stepper button {
  width: 34px; height: 34px; border: 0; background: transparent;
  color: var(--text-2); font-size: 15px; cursor: pointer; display: grid; place-items: center;
}
.stepper button:hover:not([disabled]) { background: rgba(128,128,160,.12); color: var(--text); }
.stepper button[disabled] { opacity: .3; cursor: not-allowed; }
.stepper .v {
  width: 44px; height: 34px; display: grid; place-items: center;
  border-left: 1px solid var(--line); border-right: 1px solid var(--line);
  font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums;
}

/* 价格明细表 */
.pb { font-size: 12.5px; }
.pb-row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; }
.pb-row .k { color: var(--muted); }
.pb-row .v { font-variant-numeric: tabular-nums; font-family: ui-monospace, Menlo, monospace; font-size: 12px; }
.pb-row .v.minus { color: var(--ok); }
.pb-row.total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 12px; align-items: center; }
.pb-row.total .k { color: var(--text); font-weight: 600; font-size: 13px; }

/* 卡密框 */
.secret {
  position: relative; border-radius: 12px; padding: 14px 14px;
  background: #F7F8FA;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 13.5px; letter-spacing: .04em; line-height: 1.85;
  word-break: break-all; color: var(--text);
}
.secret .mask { color: var(--muted); letter-spacing: .12em; }
.secret .tools { position: absolute; top: 8px; right: 8px; display: flex; gap: 6px; }
.secret .tools button {
  height: 24px; padding: 0 9px; border-radius: 7px; border: 1px solid var(--line);
  background: #fff; color: var(--text-2);
  font-size: 10.5px; font-weight: 600; cursor: pointer;
}
.secret .tools button:hover { background: #F0F1F5; color: var(--text); }

/* 时间线 */
.tl { position: relative; padding-left: 22px; }
.tl::before { content: ''; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 1px; background: var(--line-strong); }
.tl-i { position: relative; padding-bottom: 16px; }
.tl-i:last-child { padding-bottom: 0; }
.tl-i::before {
  content: ''; position: absolute; left: -22px; top: 5px;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--surface); border: 1.5px solid var(--line-strong); box-sizing: border-box;
}
.tl-i.done::before { background: var(--ok); border-color: var(--ok); }
.tl-i.now::before { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-bg); }
.tl-i .h { font-size: 12.5px; font-weight: 600; }
.tl-i .m { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* =========================================================================
   后台（明亮）
   ========================================================================= */
.admin { display: flex; min-height: 100vh; }

.side {
  width: 232px; flex: none; background: #0B0D12; color: #A8AEBD;
  display: flex; flex-direction: column; padding: 16px 12px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  scrollbar-width: none;
}
.side::-webkit-scrollbar { width: 0; }
.side .brand {
  display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px;
  color: #fff; font-weight: 680; font-size: 14.5px; letter-spacing: -.02em;
}
.side .brand .logo {
  width: 28px; height: 28px; border-radius: 9px;
  background: linear-gradient(145deg, #8B7CFF, #635BFF);
  display: grid; place-items: center; font-size: 14px; color: #fff;
  box-shadow: 0 4px 14px rgba(99,91,255,.4);
}
.side .grp {
  padding: 16px 10px 7px; font-size: 10px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: #565E6E;
}
.side .nav {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 9px; font-size: 13px; font-weight: 500;
  color: #A8AEBD; cursor: pointer; transition: .14s; position: relative;
}
.side .nav .i { font-size: 16px; opacity: .75; }
.side .nav:hover { background: rgba(255,255,255,.055); color: #E8EAF0; }
.side .nav.on { background: rgba(255,255,255,.09); color: #fff; font-weight: 560; }
.side .nav.on .i { color: #A99DFF; opacity: 1; }
.side .nav .cnt {
  margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px;
  display: grid; place-items: center; border-radius: 6px;
  background: rgba(255,107,107,.18); color: #FF8A8A;
  font-size: 10.5px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.side .foot { margin-top: auto; padding: 12px 10px 4px; border-top: 1px solid rgba(255,255,255,.08); }
.side .foot .who { display: flex; align-items: center; gap: 9px; }
.side .foot .av {
  width: 28px; height: 28px; border-radius: 8px; flex: none;
  background: linear-gradient(145deg,#3A3F52,#22252F);
  display: grid; place-items: center; font-size: 11px; color: #C9CEDB; font-weight: 600;
}

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top {
  height: 58px; flex: none; display: flex; align-items: center; gap: 14px;
  padding: 0 22px; background: var(--glass);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.crumb { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.crumb b { color: var(--text); font-weight: 600; }
.crumb .i { font-size: 13px; opacity: .5; }
.top .search {
  display: flex; align-items: center; gap: 8px;
  height: 32px; padding: 0 12px; min-width: 240px;
  background: rgba(128,128,160,.09); border: 1px solid transparent;
  border-radius: 9px; font-size: 12.5px; color: var(--muted);
}
.top .av {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(145deg,#0B0E14,#2A3040); color: #fff;
  display: grid; place-items: center; font-size: 11.5px; font-weight: 600;
}
.content { padding: 22px; flex: 1; max-width: 1360px; width: 100%; }

/* 侧滑抽屉 */
.drawer-mask {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(8,10,16,.42); backdrop-filter: blur(3px);
  display: flex; justify-content: flex-end;
  animation: fadeIn .18s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.drawer {
  width: 580px; max-width: 94vw; background: var(--bg-2); height: 100%;
  display: flex; flex-direction: column; box-shadow: var(--shadow-3);
  animation: slideIn .22s cubic-bezier(.22,.8,.3,1);
}
@keyframes slideIn { from { transform: translateX(24px); opacity: .6; } to { transform: none; opacity: 1; } }
.drawer-hd { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.drawer-bd { flex: 1; overflow-y: auto; padding: 22px; }
.drawer-ft { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; background: var(--surface); }

/* 金额面板 */
.money { border-radius: 12px; border: 1px solid var(--line); background: rgba(128,128,160,.04); padding: 14px 16px; }
.money .ln { display: flex; justify-content: space-between; font-size: 12.5px; padding: 5px 0; }
.money .ln .k { color: var(--muted); }
.money .ln .v { font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.money .ln.sum { border-top: 1px solid var(--line); margin-top: 7px; padding-top: 11px; font-weight: 650; }
.money .ln.sum .v { font-size: 15px; font-weight: 700; }
.money .ln .v.ok { color: var(--ok); }
.money .ln .v.bad { color: var(--danger); }

/* 进度条 */
.pbar { height: 5px; border-radius: 10px; background: rgba(128,128,160,.14); overflow: hidden; }
.pbar > i { display: block; height: 100%; border-radius: 10px; }

/* 筛选栏 */
.filterbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.filterbar .field { min-width: 156px; }

/* 提示：待处理卡 */
.todo { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.todo-i {
  display: flex; align-items: center; gap: 11px; padding: 13px 14px;
  border-radius: 12px; border: 1px solid var(--line); background: var(--surface);
  cursor: pointer; transition: .15s;
}
.todo-i:hover { border-color: var(--line-strong); box-shadow: var(--shadow-2); }
.todo-i .ic {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  display: grid; place-items: center; font-size: 16px;
}
.todo-i .t { font-size: 12.5px; font-weight: 620; }
.todo-i .d { font-size: 11px; color: var(--muted); margin-top: 1px; }

/* 画廊（索引页） */
.gal { max-width: 1140px; margin: 0 auto; padding: 44px 24px 80px; }
.gal-head h1 { font-size: 30px; letter-spacing: -.035em; }
.gal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.gal-grid.c4 { grid-template-columns: repeat(4, 1fr); }
.gal-grid.c4 .g-thumb { height: 118px; }
.g-card {
  border-radius: 16px; overflow: hidden; border: 1px solid var(--line);
  background: var(--surface); transition: .18s; display: flex; flex-direction: column;
}
.g-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-3); border-color: var(--line-strong); }
.g-thumb { height: 140px; position: relative; display: grid; place-items: center; overflow: hidden; }
.g-thumb .i { font-size: 26px; color: #0B0E14; opacity: .3; }
.g-card .bd { padding: 15px 16px 17px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.g-card .bd h4 { font-size: 13.5px; font-weight: 620; }
.g-card .bd p { margin: 0; font-size: 11.5px; color: var(--muted); line-height: 1.6; flex: 1; }
.g-card .bd .go { font-size: 11.5px; font-weight: 600; color: var(--accent); display: flex; align-items: center; gap: 4px; }
.g-tag {
  position: absolute; top: 10px; right: 10px;
  font-size: 10px; font-weight: 700; letter-spacing: .02em;
  padding: 3px 8px; border-radius: 6px;
  background: #fff; color: #0B0E14; border: 1px solid var(--line);
}

/* =========================================================================
   v3 · 双端应用外壳（移动 / PC 自适应）
   断点由 body[data-vp] 驱动：JS 依据窗口宽度自动设置，也可手动切换。
   ========================================================================= */
body { background: var(--bg); }

.app {
  width: 100%; min-height: 100vh;
  display: flex; flex-direction: column;
  background: #fff; position: relative; margin: 0 auto;
}

/* ---------- PC ---------- */
body[data-vp="desktop"] { background: #F5F6F8; }
body[data-vp="desktop"] .app {
  max-width: 1180px;
  box-shadow: 0 0 0 1px var(--line);
  border-radius: 0 0 18px 18px;
}
body[data-vp="desktop"] .pbody { padding: 0 28px 56px; }

/* ---------- 移动 ---------- */
body[data-vp="mobile"] { background: #EDEFF3; padding: 26px 0; }
body[data-vp="mobile"] .app {
  max-width: 400px; min-height: 780px;
  border-radius: 26px; overflow: hidden;
  box-shadow: 0 22px 56px rgba(12,16,28,.16), 0 0 0 1px var(--line);
}
body[data-vp="mobile"][data-fit="1"] { padding: 0; background: #fff; }
body[data-vp="mobile"][data-fit="1"] .app {
  border-radius: 0; box-shadow: none; min-height: 100vh; max-width: none;
}

/* ---------- PC 顶部导航 ---------- */
.tnav { display: none; }
body[data-vp="desktop"] .tnav {
  display: flex; align-items: center; gap: 26px;
  height: 64px; padding: 0 28px;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 30;
  background: rgba(255,255,255,.92); backdrop-filter: blur(14px);
}
.tnav .logo { display: flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 700; letter-spacing: -.02em; }
.tnav .logo .mk { width: 27px; height: 27px; border-radius: 8px; background: #0B0E14; color: #fff; display: grid; place-items: center; font-size: 13px; }
.tlinks { display: flex; gap: 22px; }
.tlinks a { font-size: 13px; color: var(--text-2); font-weight: 500; position: relative; padding: 7px 0; }
.tlinks a:hover { color: var(--text); }
.tlinks a.on { color: var(--text); font-weight: 620; }
.tlinks a.on::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--text); border-radius: 2px; }
.tnav .sp { flex: 1; }
.tnav .tsearch {
  display: flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 12px; width: 248px;
  background: #F2F3F7; border-radius: 10px; color: var(--muted); font-size: 12.5px;
}
.tnav .tsearch input { border: 0; background: transparent; outline: none; width: 100%; font-size: 12.5px; color: var(--text); }

/* ---------- 移动顶部栏 ---------- */
.mbar { display: none; }
body[data-vp="mobile"] .mbar {
  display: flex; align-items: center; gap: 10px;
  height: 48px; padding: 0 14px;
  position: sticky; top: 0; z-index: 30;
  background: var(--glass); backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--line);
}
.mbar .ttl { font-size: 14.5px; font-weight: 620; }

/* ---------- 可见性工具 ---------- */
.only-m, .flex-only-m { display: none !important; }
body[data-vp="mobile"] .only-m { display: block !important; }
body[data-vp="mobile"] .flex-only-m { display: flex !important; }
body[data-vp="desktop"] .only-d { display: block !important; }
body[data-vp="desktop"] .flex-only-d { display: flex !important; }
.only-d, .flex-only-d { display: none !important; }

/* ---------- 布局工具 ---------- */
.pad { padding: 0 16px; }
body[data-vp="desktop"] .pad { padding: 0; }
.sec { margin-top: 26px; }
.sec-hd { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.sec-hd .t { font-size: 16px; font-weight: 650; letter-spacing: -.025em; }
body[data-vp="desktop"] .sec-hd .t { font-size: 18px; }
.sec-hd .m { font-size: 11.5px; color: var(--muted); }

.goods-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px; }
body[data-vp="desktop"] .goods-grid { grid-template-columns: repeat(4, 1fr); gap: 18px; }

.split { display: grid; gap: 18px; }
body[data-vp="desktop"] .split { grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: start; }
body[data-vp="desktop"] .split-ck { grid-template-columns: 1fr 380px; gap: 32px; align-items: start; }

/* ---------- 移动底栏 / 购买栏 ---------- */
.tabbar {
  display: none; height: 62px; align-items: stretch;
  background: var(--glass); backdrop-filter: blur(18px) saturate(160%);
  border-top: 1px solid var(--line); padding-bottom: 6px;
  position: sticky; bottom: 0; z-index: 25;
}
body[data-vp="mobile"] .tabbar { display: flex; }
.tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; font-size: 10px; font-weight: 550; color: var(--muted);
}
.tabbar a .i { font-size: 19px; }
.tabbar a.on { color: var(--text); }
.tabbar a.on .i { color: var(--accent); }

.buybar {
  padding: 12px 16px 20px; display: flex; gap: 10px; align-items: center;
  background: var(--glass); backdrop-filter: blur(18px) saturate(160%);
  border-top: 1px solid var(--line);
  position: sticky; bottom: 0; z-index: 25;
}
body[data-vp="desktop"] .buybar {
  position: static; padding: 0; border: 0; background: transparent;
  backdrop-filter: none; margin-top: 22px;
}

/* ---------- 商品卡 ---------- */
.g {
  border-radius: 15px; overflow: hidden; background: var(--surface);
  border: 1px solid var(--line); display: flex; flex-direction: column;
  transition: .16s;
}
body[data-vp="desktop"] .g:hover { border-color: var(--line-strong); box-shadow: var(--shadow-2); transform: translateY(-2px); }
/* 虚拟商品：缩略图只做辨识，商品名与价格才是主体 */
.g .tile { height: 84px; }
body[data-vp="desktop"] .g .tile { height: 108px; }
.g .tile .mark { font-size: 19px; }
body[data-vp="desktop"] .g .tile .mark { font-size: 22px; }
.g .bd { padding: 10px 11px 12px; display: flex; flex-direction: column; gap: 7px; }
body[data-vp="desktop"] .g .bd { padding: 13px 14px 16px; gap: 9px; }
.g .nm { font-size: 12px; line-height: 1.45; height: 34px; overflow: hidden; color: var(--text-2); }
body[data-vp="desktop"] .g .nm { font-size: 13px; height: 38px; }
.g .ft { display: flex; align-items: center; justify-content: space-between; }
.g .sold { font-size: 10px; color: var(--muted); }

/* ---------- 页脚 ---------- */
.foot { margin-top: auto; padding: 30px 16px 26px; border-top: 1px solid var(--line); background: #FAFBFC; }
body[data-vp="desktop"] .foot { padding: 36px 28px 30px; }
.foot .cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
body[data-vp="desktop"] .foot .cols { grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; }
.foot .ct { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.foot a { display: block; font-size: 12px; color: var(--text-2); padding: 4px 0; }
.foot a:hover { color: var(--text); }
.foot .cp { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* =========================================================================
   原型导航器（浮层）
   ========================================================================= */
.pnav {
  position: fixed; right: 16px; bottom: 16px; z-index: 9998;
  font-family: var(--font, sans-serif);
}
.pnav-btn {
  display: flex; align-items: center; gap: 7px;
  height: 34px; padding: 0 13px; border-radius: 20px;
  background: #0B0E14; color: #fff; border: 1px solid rgba(255,255,255,.14);
  font-size: 11.5px; font-weight: 600; cursor: pointer;
  box-shadow: 0 8px 24px rgba(12,16,28,.28);
}
.pnav-panel {
  position: absolute; right: 0; bottom: 42px; width: 244px;
  background: #fff; border: 1px solid var(--line, rgba(12,16,28,.1));
  border-radius: 14px; padding: 12px;
  box-shadow: 0 24px 60px rgba(12,16,28,.22);
}
.pnav-panel .lb { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #868D9C; margin: 4px 0 7px; }
.pnav-seg { display: flex; gap: 3px; padding: 3px; background: #F2F3F7; border-radius: 9px; margin-bottom: 12px; }
.pnav-seg button {
  flex: 1; height: 26px; border: 0; border-radius: 7px; background: transparent;
  font-size: 11.5px; font-weight: 600; color: #868D9C; cursor: pointer;
}
.pnav-seg button.on { background: #fff; color: #0B0E14; box-shadow: 0 1px 2px rgba(12,16,28,.1); }
.pnav-list { display: flex; flex-direction: column; gap: 2px; max-height: 240px; overflow: auto; }
.pnav-list a {
  font-size: 12px; color: #454C5C; padding: 6px 8px; border-radius: 7px;
  display: flex; align-items: center; justify-content: space-between;
}
.pnav-list a:hover { background: #F5F6F8; color: #0B0E14; }
.pnav-list a.on { background: #EEEDFE; color: #4F46E5; font-weight: 600; }
.pnav-reset {
  width: 100%; height: 28px; margin-top: 10px; border-radius: 8px;
  border: 1px solid rgba(12,16,28,.1); background: #fff; color: #D92D20;
  font-size: 11.5px; font-weight: 600; cursor: pointer;
}
.pnav-reset:hover { background: #FEF2F2; }

/* =========================================================================
   后台 · 窄屏降级（后台本身是桌面场景）
   ========================================================================= */
@media (max-width: 1320px) {
  .content { max-width: none; }
}
@media (max-width: 1180px) {
  .side { width: 66px; padding: 16px 8px; }
  .side .brand { justify-content: center; padding: 4px 0 16px; }
  .side .brand .nm, .side .grp, .side .nav .tx, .side .foot .who .grow { display: none; }
  .side .nav { justify-content: center; padding: 9px 0; font-size: 0; gap: 0; }
  .side .nav .i { font-size: 17px; }
  .side .nav .cnt { position: absolute; top: 3px; right: 4px; min-width: 14px; height: 14px; font-size: 9px; }
  .side .foot { display: flex; justify-content: center; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .todo { grid-template-columns: repeat(2, 1fr); }
  .cols, .card-fix { grid-template-columns: 1fr !important; }
}
@media (max-width: 860px) {
  .top .search { display: none; }
  .crumb { font-size: 12px; }
  .content { padding: 14px; }
  .grid-4 { grid-template-columns: 1fr; }
  .todo { grid-template-columns: 1fr; }
  .drawer { width: 100%; }
  .table th, .table td { padding: 10px; }
  .frm, .filterbar .field { min-width: 0; }
  .frm { grid-template-columns: 1fr; }
  .need-scroll { overflow-x: auto; }
}

/* 移动端内容左右留白（PC 由 .pbody 的 28px 承担） */
body[data-vp="mobile"] .pbody { padding: 0 16px 26px; }
body[data-vp="mobile"] .cover { border-radius: 14px; }

/* 防止 grid/flex 子项的 min-content 撑破移动视口 */
body[data-vp="mobile"] .split { grid-template-columns: minmax(0, 1fr); }
.split > *, .split > * > * { min-width: 0; }
body[data-vp="mobile"] .gal-wrap { min-width: 0; }
body[data-vp="mobile"] .qty > div:first-child,
body[data-vp="mobile"] .pb-row .k { min-width: 0; }
body[data-vp="mobile"] .app { overflow-x: hidden; }

/* 查单页：PC 下 tab 与卡片居中对齐 */
body[data-vp="desktop"] .ptabs { margin: 0 auto 6px; }

/* 类目图标：替代商品图占位（虚拟商品不需要大图） */
.cico {
  width: 44px; height: 44px; border-radius: 12px; flex: none;
  display: grid; place-items: center; font-size: 20px;
  background: var(--c-bg, #F2F3F7); color: var(--c-fg, #454C5C);
}
.cico.v1 { --c-bg: #EEECFA; --c-fg: #4F46E5; }
.cico.v2 { --c-bg: #E9F0F9; --c-fg: #1D4ED8; }
.cico.v3 { --c-bg: #FAF2E3; --c-fg: #B4730A; }
.cico.v4 { --c-bg: #E8F4F0; --c-fg: #0C9A6E; }
.cico.v5 { --c-bg: #F3EEFA; --c-fg: #7C3AED; }
.cico.v6 { --c-bg: #F2F3F7; --c-fg: #5B6373; }

/* =========================================================================
   精简版商城（列表式）—— 不做卡片、不做 SKU、不做价格明细
   ========================================================================= */
.sl { max-width: 820px; margin: 0 auto; width: 100%; }

.sl-top {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 12px;
  height: 56px; padding: 0 16px;
  background: var(--glass); backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid var(--line);
}
.sl-logo { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 720; letter-spacing: -.03em; }
.sl-logo .mk { width: 26px; height: 26px; border-radius: 8px; background: #0B0E14; color: #fff; display: grid; place-items: center; font-size: 12px; }
.sl-tip {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 16px; font-size: 11.5px; color: var(--muted);
  border-bottom: 1px solid var(--line); background: #FAFBFC;
}
.sl-tip .i { font-size: 12px; color: var(--accent-2); }

/* 列表行：桌面 4 列，移动 2 行 */
.sl-item {
  display: grid; grid-template-columns: 1fr 92px 78px 88px;
  align-items: center; gap: 12px;
  padding: 15px 16px; border-bottom: 1px solid var(--line);
  transition: background .12s;
}
.sl-item:hover { background: #FCFDFF; }
.sl-item .nm { font-size: 14px; font-weight: 620; letter-spacing: -.015em; }
.sl-item .sb { font-size: 11.5px; color: var(--muted); margin-top: 4px; display: flex; align-items: center; gap: 6px; }
.sl-item .pr { font-size: 16px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.sl-item .st { font-size: 11.5px; color: var(--muted); text-align: right; }
.sl-item .st.out { color: var(--danger); }
.sl-item .go { justify-self: end; }

body[data-vp="mobile"] .sl-item {
  grid-template-columns: 1fr auto; grid-template-areas: "info price" "meta go";
  row-gap: 10px; padding: 14px 16px;
}
body[data-vp="mobile"] .sl-item .info { grid-area: info; }
body[data-vp="mobile"] .sl-item .pr { grid-area: price; }
body[data-vp="mobile"] .sl-item .st { grid-area: meta; text-align: left; }
body[data-vp="mobile"] .sl-item .go { grid-area: go; }

/* 查单面板 */
.sl-query { padding: 16px; border-bottom: 1px solid var(--line); background: #FCFDFF; }
.sl-query .f { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; }
body[data-vp="mobile"] .sl-query .f { grid-template-columns: 1fr; }
.sl-result { margin-top: 12px; }

/* 下单页 */
.sl-order { max-width: 560px; margin: 0 auto; padding: 18px 16px 90px; }
.sl-card { border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.sl-card + .sl-card { margin-top: 12px; }
.sl-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.sl-row:last-child { border-bottom: 0; }
.sl-row .k { font-size: 12.5px; color: var(--muted); }
.sl-row .v { font-size: 13px; font-weight: 600; }

/* 交付内容（出码） */
.sl-out { padding: 4px 0; }
.sl-field { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.sl-field:last-child { border-bottom: 0; }
.sl-field .k { font-size: 11.5px; color: var(--muted); width: 56px; flex: none; }
.sl-field .v {
  flex: 1; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14px;
  letter-spacing: .02em; word-break: break-all;
}
.sl-field button {
  height: 26px; padding: 0 10px; border-radius: 7px; border: 1px solid var(--line);
  background: #fff; font-size: 11px; font-weight: 600; color: var(--text-2); cursor: pointer; flex: none;
}
.sl-field button:hover { background: #F0F1F5; }

/* 支付方式：极简三行 */
.sl-pay { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); cursor: pointer; }
.sl-pay:last-child { border-bottom: 0; }
.sl-pay .rd { width: 15px; height: 15px; border-radius: 50%; border: 1.5px solid var(--line-strong); flex: none; display: grid; place-items: center; }
.sl-pay.on .rd { border-color: var(--accent); }
.sl-pay.on .rd::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.sl-pay .nm { font-size: 13px; }
.sl-pay .tag { margin-left: auto; font-size: 11px; color: var(--muted); }

/* 后台：输入框在白色卡片上要有存在感，否则看起来像纯文本 */
.theme-admin .input, .theme-admin .select, .theme-admin .textarea {
  height: 36px; font-size: 13px; color: var(--text);
}
.theme-admin .textarea { height: auto; }
.theme-admin .input::placeholder { color: #A8AEBD; }

/* 后台窄屏：侧栏折叠时隐藏品牌文字与底部前台链接 */
@media (max-width: 1180px) {
  .side .brand .nm { display: none; }
  .side .sfoot .who .grow { display: none; }
  .side .sfoot { padding: 8px 0 4px; border-top: 1px solid rgba(255,255,255,.08); }
  .side .frontlink { display: none !important; }
  .side { justify-content: flex-start; }
}

/* =========================================================================
   后台 · 窄屏（<=760）：侧栏改成顶部标签，表格变成卡片行
   ========================================================================= */
.adm-mnav { display: none; }

@media (max-width: 760px) {
  .side { display: none !important; }
  .adm-mnav {
    display: flex; gap: 4px; padding: 8px 12px;
    background: var(--surface); border-bottom: 1px solid var(--line);
    position: sticky; top: 58px; z-index: 19;
  }
  .adm-mnav a {
    flex: 1; text-align: center; padding: 8px 0; border-radius: 9px;
    font-size: 12.5px; font-weight: 600; color: var(--muted);
  }
  .adm-mnav a.on { background: #0B0E14; color: #fff; }

  .content { padding: 12px !important; }
  .card { border-radius: 12px; }
  .card-pad, .card-bd { padding: 14px !important; }
  .top { padding: 0 12px; gap: 8px; }
  .top .crumb { font-size: 12px; }

  /* 表格 → 卡片行 */
  .table thead { display: none; }
  .table, .table tbody { display: block; width: 100%; }
  .table tr {
    display: block; padding: 12px 14px;
    border-bottom: 1px solid var(--line);
  }
  .table tbody tr:last-child { border-bottom: 0; }
  .table td {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; border: 0; padding: 3px 0; font-size: 12.5px;
  }
  .table td::before {
    content: attr(data-l); color: var(--muted); font-size: 11.5px; flex: none;
  }
  .table td:first-child {
    display: block; padding: 0 0 6px; font-size: 14px; font-weight: 620;
  }
  .table td:first-child::before { display: none; }
  .table .num, .table .mono { font-size: 12.5px; }

  /* 统计条：两列 */
  .content .card-pad[style*="flex"] { gap: 18px !important; }
  .content .card-pad[style*="flex"] > div { min-width: 84px; }
}

/* 后台移动端：操作列整体右对齐，不要把「·」当独立元素撑开 */
@media (max-width: 760px) {
  .table td .acts { display: inline-flex; align-items: center; gap: 10px; }
  .table td[data-l="操作"] { justify-content: flex-end; }
  .table td[data-l="操作"]::before { margin-right: auto; }
  /* 订单详情展开行在移动端保持竖排 */
  .table tr.detail-row { display: block; padding: 0; }
  .table tr.detail-row > td { display: block; }
  .table tr.detail-row > td::before { display: none; }
}

/* 操作列：移动端不显示字段名（内容自解释），统计条改两列网格 */
@media (max-width: 760px) {
  .table td[data-l="操作"]::before { content: none; }
  .content .card-pad[style*="flex"] {
    display: grid !important; grid-template-columns: 1fr 1fr; gap: 14px 18px !important;
  }
}

/* 后台移动端：顶栏改为可换行，筛选条单独一行 */
@media (max-width: 760px) {
  .top { height: auto !important; flex-wrap: wrap; padding: 10px 12px !important; row-gap: 8px; }
  .top .crumb { flex: 1 1 auto; white-space: nowrap; }
  .top .seg { order: 3; width: 100%; overflow-x: auto; }
  .top .seg button { flex: 1; white-space: nowrap; font-size: 11.5px; padding: 5px 6px; }
  .top .input { order: 4; width: 100% !important; }
  .adm-mnav { position: static; top: auto; }
}
