:root {
  --bg: #f5f7fa;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --success: #16a34a;
  --danger: #dc2626;
  --warn: #d97706;
  --radius: 10px;
  --chipi: #f1f5f9;
  --catbg: #eff6ff;
  --hero-bg: linear-gradient(135deg, #1e3a8a, #2563eb 60%, #3b82f6);
  --hero-ink: #ffffff;
  --hero-ink-soft: rgba(255, 255, 255, .85);
  --hero-chip-bg: rgba(255, 255, 255, .16);
}

/* ===== 前台主题 ===== */
body.t-pc-default { --hero-bg: linear-gradient(135deg, #1e3a8a, #2563eb 60%, #3b82f6); --primary: #2563eb; --primary-dark: #1d4ed8; --hero-ink: #fff; --hero-ink-soft: rgba(255,255,255,.85); --hero-chip-bg: rgba(255,255,255,.16); }
body.t-pc-blue_simple { --hero-bg: linear-gradient(180deg, #3b82f6, #60a5fa); --primary: #3b82f6; --primary-dark: #2563eb; --hero-ink: #fff; --hero-ink-soft: rgba(255,255,255,.9); --hero-chip-bg: rgba(255,255,255,.18); }
body.t-pc-green { --hero-bg: linear-gradient(135deg, #065f46, #059669 60%, #10b981); --primary: #059669; --primary-dark: #047857; --hero-ink: #fff; --hero-ink-soft: rgba(255,255,255,.85); --hero-chip-bg: rgba(255,255,255,.16); }
body.t-pc-wide { --hero-bg: linear-gradient(135deg, #0e7490, #0891b2 60%, #22d3ee); --primary: #0891b2; --primary-dark: #0e7490; --hero-ink: #fff; --hero-ink-soft: rgba(255,255,255,.85); --hero-chip-bg: rgba(255,255,255,.16); }
body.t-pc-wide .shop-wrap { max-width: 1100px; }
body.t-pc-space { --hero-bg: linear-gradient(135deg, #0c4a6e, #0369a1 60%, #0284c7); --primary: #0284c7; --primary-dark: #0369a1; --hero-ink: #fff; --hero-ink-soft: rgba(255,255,255,.85); --hero-chip-bg: rgba(255,255,255,.16); }
body.t-pc-sunset { --hero-bg: linear-gradient(135deg, #9a3412, #ea580c 60%, #f97316); --primary: #ea580c; --primary-dark: #c2410c; --hero-ink: #fff; --hero-ink-soft: rgba(255,255,255,.85); --hero-chip-bg: rgba(255,255,255,.16); }
body.t-pc-minimal { --hero-bg: linear-gradient(180deg, #f8fafc, #e2e8f0); --primary: #475569; --primary-dark: #334155; --hero-ink: #1f2937; --hero-ink-soft: rgba(51,65,85,.75); --hero-chip-bg: rgba(0,0,0,.06); }
body.t-pc-minimal .store-avatar { border-color: #fff; }
body.t-pc-minimal .store-avatar span { color: #1f2937; }
body.t-pc-minimal .announce { background: rgba(255,255,255,.75); }
body.t-pc-minimal .announce-scroll span { color: #1f2937; }
body.t-pc-dark, body.t-m-dark {
  --bg: #0b1220; --card: #121c30; --text: #e5e9f2; --muted: #8b94a7; --line: #22304a;
  --primary: #3b82f6; --primary-dark: #2563eb; --chipi: #26344f; --catbg: #1d2c47;
  --hero-bg: linear-gradient(135deg, #0f172a, #1e293b 60%, #24344d);
  --hero-ink: #fff; --hero-ink-soft: rgba(255,255,255,.85); --hero-chip-bg: rgba(255,255,255,.12);
}
body.t-pc-dark .pc-cover, body.t-m-dark .pc-cover { background: #1a2438; }
body.t-pc-dark .pc-cover-fallback, body.t-m-dark .pc-cover-fallback { color: #46557a; }
body.t-pc-dark .modal, body.t-m-dark .modal { background: var(--card); }
body.t-m-blue_simple { --primary: #3b82f6; --primary-dark: #2563eb; }
body.t-m-dark { --bg: #0b1220; --card: #121c30; --text: #e5e9f2; --muted: #8b94a7; --line: #22304a; --primary: #3b82f6; --primary-dark: #2563eb; --chipi: #26344f; --catbg: #1d2c47; --hero-bg: linear-gradient(135deg, #0f172a, #1e293b 60%, #24344d); --hero-ink: #fff; --hero-ink-soft: rgba(255,255,255,.85); --hero-chip-bg: rgba(255,255,255,.12); }
body.t-m-dark .pc-cover { background: #1a2438; }
body.t-m-dark .pc-cover-fallback { color: #46557a; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
}
a { color: var(--primary); text-decoration: none; }
h1, h3 { margin: 0 0 12px; }
code { background: #f3f4f6; padding: 1px 6px; border-radius: 4px; font-size: 13px; }
.container { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.container.narrow { max-width: 660px; }
.center { text-align: center; }

.topbar { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.brand { font-size: 18px; font-weight: 700; color: var(--text); }
.topbar nav a { margin-left: 16px; color: var(--muted); font-size: 14px; }
.topbar nav a:hover { color: var(--primary); }

.hero { text-align: center; padding: 36px 16px 12px; }
.hero h1 { font-size: 24px; }
.hero p { color: var(--muted); }
.notice { background: #fffbeb; color: #92400e; border-bottom: 1px solid #fde68a; padding: 8px 16px; text-align: center; font-size: 14px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; padding: 16px 0 48px; }
.search-wrap { padding-top: 16px; }
.search-wrap input { padding: 11px 14px; font-size: 15px; border-radius: 10px; background: var(--card); color: var(--text); }
.cat-chips { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 12px; }
.chip { border: 1px solid var(--line); background: var(--card); color: var(--muted); border-radius: 99px; padding: 5px 14px; font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.chip i { font-style: normal; font-size: 11px; background: var(--chipi); border-radius: 99px; padding: 0 7px; line-height: 16px; }
.chip.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.chip.on i { background: rgba(255,255,255,.25); color: #fff; }

/* 店铺头部 */
.shop-hero { background: var(--hero-bg); padding: 28px 16px 56px; }
.shop-wrap { max-width: 900px; margin: 0 auto; }
.store-card { display: flex; align-items: center; gap: 16px; }
.store-avatar { width: 68px; height: 68px; border-radius: 50%; overflow: hidden; background: rgba(255,255,255,.2); border: 2px solid rgba(255,255,255,.85); display: flex; align-items: center; justify-content: center; flex-shrink: 0; box-shadow: 0 4px 14px rgba(0,0,0,.15); }
.store-avatar img { width: 100%; height: 100%; object-fit: cover; }
.store-avatar span { font-size: 30px; font-weight: 700; color: var(--hero-ink); }
.store-name-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.store-name { font-size: 22px; color: var(--hero-ink); margin: 0; }
.store-badge { display: inline-block; background: linear-gradient(90deg, #f59e0b, #f97316); color: #fff; font-size: 12px; padding: 2px 10px; border-radius: 99px; }
.store-contact { margin: 6px 0 0; font-size: 12px; color: var(--hero-ink-soft); display: flex; gap: 6px; flex-wrap: wrap; }
.store-contact span { background: var(--hero-chip-bg); border-radius: 99px; padding: 1px 10px; }
.store-contact a { color: var(--hero-ink); text-decoration: underline; }
.store-sales { margin: 4px 0 0; font-size: 12px; color: var(--hero-ink-soft); }
.store-sales b { color: #fbbf24; font-size: 13px; }
body.t-pc-minimal .store-sales b { color: #ea580c; }
.closed-bar { margin-top: 20px; background: rgba(220, 38, 38, .92); color: #fff; border-radius: 10px; padding: 8px 12px; font-size: 13px; text-align: center; }
.announce { display: flex; align-items: center; margin-top: 20px; background: rgba(255,255,255,.12); border-radius: 10px; padding: 8px 10px; overflow: hidden; }
.announce-tag { flex-shrink: 0; background: #dc2626; color: #fff; font-size: 12px; border-radius: 6px; padding: 2px 8px; margin-right: 10px; }
.announce-view { flex: 1; overflow: hidden; }
.announce-scroll { display: inline-flex; white-space: nowrap; animation: announce-scroll 16s linear infinite; }
.announce-scroll span { color: var(--hero-ink); font-size: 13px; }
.announce-scroll .dup { padding-left: 48px; }
@keyframes announce-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.shop-main { margin-top: -34px; position: relative; }
.pc-cover { height: 120px; border-radius: 8px; overflow: hidden; background: #eef2f7; display: flex; align-items: center; justify-content: center; margin-bottom: 2px; }
.pc-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pc-cover-fallback { font-size: 40px; font-weight: 700; color: #b6c2d4; }
.buy-total { font-size: 15px; margin: 4px 0 10px; text-align: right; }
.buy-total b { color: #e11d48; font-size: 18px; }

/* ===== 订单确认弹窗（参考站 1:1） ===== */
.co-modal { width: 520px; max-width: calc(100vw - 28px); border-radius: 16px; background: #fff; color: #1d2129; overflow: hidden; }
.co-head { position: relative; text-align: center; padding: 15px 16px 0; }
.co-head h3 { margin: 0; font-size: 16px; font-weight: 500; color: #1d2129; }
.co-head .btn-close { position: absolute; right: 14px; top: 12px; font-size: 22px; color: #86909c; }
.co-body { padding: 8px 20px 18px; font-size: 14px; line-height: 22px; }
.co-name-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.co-name { font-size: 16px; color: #1d2129; word-break: break-all; }
.co-qty-label { font-size: 14px; color: #86909c; flex-shrink: 0; }
.co-desc { margin: 12px 0 0; font-size: 13px; color: #86909c; line-height: 1.55; white-space: pre-wrap; word-break: break-all; }
.co-tags { display: flex; gap: 8px; margin-top: 10px; }
.co-tag { font-size: 12px; font-weight: 500; line-height: 22px; padding: 0 8px; border-radius: 2px; }
.t-green { background: #e8ffea; color: #00b42a; }
.t-blue { background: #e8f3ff; color: #165dff; }
.co-row { display: flex; align-items: center; justify-content: space-between; padding: 15px 0; color: #86909c; }
.co-row-name { flex-shrink: 0; font-size: 14px; }
.co-row-info { font-size: 14px; cursor: pointer; }
.co-star { color: #f53f3f; font-size: 12px; font-style: normal; margin-right: 2px; }
.co-input { flex: 1; margin-left: 12px; min-width: 0; background: #f2f3f5; border: 0; border-radius: 4px; padding: 8px 12px; font-size: 14px; color: #1d2129; }
.co-input:focus { outline: none; background: #fff; box-shadow: 0 0 0 1px #165dff; }
.co-price { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 0 14px; }
.co-price b { color: #165dff; font-weight: 600; font-size: 16px; }
.co-price span { color: #86909c; font-size: 13px; }
.co-pay { display: flex; flex-wrap: wrap; gap: 6px; }
.co-pay .channel-item { border-color: #e5e6eb; border-radius: 8px; padding: 7px 12px; color: #1d2129; margin: 0; }
.co-pay .channel-item:has(input:checked) { border-color: #165dff; background: #f0f7ff; color: #165dff; }
.co-btns { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.co-btn-cancel { background: transparent; color: #165dff; border: 0; border-radius: 8px; padding: 0 15px; height: 34px; font-size: 14px; cursor: pointer; }
.co-btn-pay { background: #165dff; color: #fff; border: 0; border-radius: 8px; padding: 0 15px; height: 34px; font-size: 14px; cursor: pointer; }
.co-btn-pay:disabled { opacity: .6; }
@media (max-width: 900px) {
  .co-modal { width: 100%; }
  .co-stepper-row { display: none; }
}
.product-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.pc-cat { font-size: 12px; color: var(--primary); background: var(--catbg); display: inline-block; padding: 2px 10px; border-radius: 99px; align-self: flex-start; }
.pc-name { font-size: 16px; font-weight: 600; margin: 0; }
.pc-desc { font-size: 13px; color: var(--muted); margin: 0; flex: 1; }
.pc-meta { display: flex; justify-content: space-between; align-items: center; }
.price { color: #e11d48; font-weight: 700; font-size: 18px; }
.stock { color: var(--muted); font-size: 13px; }

.btn { display: inline-block; border: 1px solid var(--line); border-radius: 8px; padding: 8px 16px; font-size: 14px; cursor: pointer; background: var(--card); color: var(--text); font-family: inherit; line-height: 1.5; }
.btn:hover { border-color: #cbd5e1; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-success { background: var(--success); border-color: var(--success); color: #fff; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-warn { background: var(--warn); border-color: var(--warn); color: #fff; }
.btn-ghost { background: transparent; color: #e5e7eb; border-color: transparent; }
.btn-ghost:hover { background: #1f2937; color: #fff; }
.btn-block { width: 100%; }
.btn-sm { padding: 4px 10px; font-size: 13px; }

input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 14px; font-family: inherit; background: var(--card); color: var(--text); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); }
label { font-size: 14px; color: var(--muted); display: block; margin-bottom: 4px; }
.form-row { margin-bottom: 12px; text-align: left; }
textarea { min-height: 90px; resize: vertical; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px; }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 16px 0; }
.panel-title { font-size: 15px; font-weight: 600; color: var(--text); margin: 0 0 12px; }
.m-iconnav { display: none; }
.m-fund-tabs { display: none; }
.contact-row { display: flex; gap: 8px; }
.contact-row input { flex: 1; min-width: 0; }
.fund-balance { font-size: 30px; font-weight: 700; color: #165dff; margin: 6px 0 10px; }
.fund-cols { display: flex; gap: 48px; margin-bottom: 14px; }
.fund-label { display: block; font-size: 12px; color: #86909c; }
.fund-num { display: block; font-size: 20px; font-weight: 700; color: #1d2129; margin-top: 2px; }
.fund-actions { display: flex; gap: 22px; flex-wrap: wrap; }
.fund-actions a { font-size: 13px; color: #165dff; }
.fund-card { margin-bottom: 12px; }
.fund-card .muted { margin-top: 10px; margin-bottom: 0; }
.panel.center { text-align: center; }
.panel h3 { font-size: 16px; }
.kv { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.kv:last-child { border-bottom: none; }
.kv span { color: var(--muted); flex-shrink: 0; }
.kv b { text-align: right; word-break: break-all; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 12px; }
.badge-pending { background: #fef3c7; color: #92400e; }
.badge-verify { background: #dbeafe; color: #1d4ed8; }
.badge-paid { background: #dcfce7; color: #166534; }
.badge-closed { background: #f3f4f6; color: #4b5563; }
.badge-stock_out { background: #fee2e2; color: #991b1b; }

.qr { max-width: 280px; width: 100%; border: 1px solid var(--line); border-radius: 8px; }
.qr-list { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin: 12px 0; }
.qr-item { text-align: center; }
.qr-item p { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.qr-sm { display: block; width: 130px; border: 1px solid var(--line); border-radius: 8px; margin: 4px 0 8px; }
.pay-amount { font-size: 18px; margin: 4px 0 8px; }
.pay-amount b { color: #e11d48; }
.hint { color: var(--muted); font-size: 13px; }
.err { color: var(--danger); font-size: 14px; }
.empty { text-align: center; color: var(--muted); padding: 24px 0; }
.page-title { font-size: 20px; margin: 24px 0 8px; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 600px; }
.table th, .table td { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: middle; }
.table th { color: var(--muted); font-weight: 500; background: #fafafa; white-space: nowrap; }

.modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 16px; }
.modal { background: var(--card); border-radius: 12px; width: 100%; max-width: 440px; max-height: 90vh; overflow: auto; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; font-size: 16px; }
.modal-body { padding: 16px; }
.btn-close { border: none; background: none; font-size: 24px; cursor: pointer; color: var(--muted); line-height: 1; }
.buy-title { font-weight: 600; margin: 0 0 12px; }
.stepper { display: flex; }
.stepper button { width: 40px; border: 1px solid var(--line); background: var(--card); font-size: 16px; cursor: pointer; color: var(--text); }
.stepper input { width: 70px; text-align: center; border-radius: 0; border-left: none; border-right: none; }
.channel-list { display: flex; gap: 10px; flex-wrap: wrap; }
.channel-item { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; cursor: pointer; margin: 0 8px 8px 0; }
.channel-item input { width: auto; margin: 0; }
.channel-item:has(input:checked) { border-color: var(--primary); background: #eff6ff; }

.footer { text-align: center; color: var(--muted); font-size: 13px; padding: 24px 0 40px; border-top: 1px solid var(--line); margin-top: 24px; }

/* 移动端底部导航（前台已按参考站移除，样式保留备用） */
.mobile-nav { display: none; }
@media (max-width: 760px) {
  .mobile-nav { display: none; }
}

/* 近7天销售图 */
.chart { display: flex; align-items: flex-end; gap: 8px; height: 150px; padding-top: 8px; }
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.chart-bar { width: 100%; max-width: 40px; background: linear-gradient(180deg, #60a5fa, #2563eb); border-radius: 6px 6px 0 0; min-height: 3px; position: relative; }
.chart-bar span { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font-size: 10px; color: var(--muted); white-space: nowrap; }
.chart-label { font-size: 11px; color: var(--muted); }
.cover-preview { display: block; width: 120px; border: 1px solid var(--line); border-radius: 8px; margin: 6px 0; }

/* ===== 管理后台（Arco 蓝白风格） ===== */
body.admin {
  --bg: #fafbfc;
  --card: #ffffff;
  --text: #1d2129;
  --muted: #86909c;
  --line: #e5e6eb;
  --primary: #165dff;
  --primary-dark: #0e42d2;
  --success: #00b42a;
  --danger: #f53f3f;
  --warn: #ff7d00;
  --radius: 8px;
  --chipi: #f2f3f5;
  --catbg: #e8f3ff;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg);
}
.admin-top {
  height: 64px;
  background: #f0f5fe;
  border-bottom: 1px solid #e5e6eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 60;
  flex-shrink: 0;
}
.admin-top-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.admin-logo { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, #165dff, #4080ff); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 700; flex-shrink: 0; }
.admin-home { font-size: 14px; color: #4e5969; }
.admin-home:hover { color: var(--primary); }
.admin-top-right { display: flex; align-items: center; gap: 18px; }
.admin-msg { font-size: 14px; color: #4e5969; display: inline-flex; align-items: center; gap: 6px; }
.admin-msg:hover { color: var(--primary); }
.admin-msg-badge { min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: #f53f3f; color: #fff; font-size: 11px; font-style: normal; line-height: 16px; text-align: center; }
.admin-shop { font-size: 14px; color: #1d2129; font-weight: 600; }
.logout-form { margin: 0; }
.admin-logout { border: none; background: transparent; color: #86909c; font-size: 13px; cursor: pointer; padding: 4px 6px; }
.admin-logout:hover { color: var(--primary); }
.store-switch { width: auto; max-width: 150px; padding: 5px 8px; font-size: 13px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--text); }
.m-admin-head { display: none; }
.m-admin-tabbar { display: none; }
.m-mod-grid { display: none; }
.admin-body { flex: 1; display: flex; min-height: 0; }
.admin-side {
  width: 128px;
  background: #fff;
  border-right: 1px solid var(--line);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  padding: 16px 0;
}
.admin-nav { display: flex; flex-direction: column; align-items: stretch; }
.admin-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 60px;
  padding: 0;
  color: #3d455f;
  font-size: 12px;
}
.admin-nav a svg { width: 21px; height: 21px; }
.admin-nav a:hover { color: var(--primary); background: #f5f7fa; }
.admin-nav a.on { color: var(--primary); font-weight: 600; }
.admin-sub {
  width: 120px;
  background: #fff;
  border-right: 1px solid var(--line);
  flex-shrink: 0;
  padding: 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.admin-sub .sub-title { font-size: 12px; color: var(--muted); padding: 4px 10px 8px; font-weight: 600; }
.admin-sub a { display: block; padding: 9px 12px; font-size: 13px; color: #4e5969; border-radius: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-sub a:hover { background: #f2f3f5; color: var(--text); }
.admin-sub a.on { color: var(--primary); background: #e8f3ff; font-weight: 600; }
.admin-main { flex: 1; padding: 20px; min-width: 0; }
.admin-main h1 { font-size: 20px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.stat .n { font-size: 22px; font-weight: 700; }
.stat .t { font-size: 13px; color: var(--muted); }
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; align-items: center; }
.filter-bar input, .filter-bar select { width: auto; }
.pager { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.pager a, .pager span { border: 1px solid var(--line); border-radius: 6px; padding: 4px 10px; font-size: 13px; color: var(--text); background: #fff; }
.pager span { background: #f3f4f6; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.secret-cell { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px; word-break: break-all; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.muted { color: var(--muted); font-size: 13px; }
/* ===== 后台登录页（参考站同款：左表单 + 右宣传区） ===== */
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 16px; background: #f0f2f5; }
.login-wrap { width: 100%; max-width: 960px; display: flex; background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 6px 24px rgba(29,33,41,.08); }
.login-side { flex: 1; padding: 48px 56px 24px; display: flex; flex-direction: column; }
.login-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 32px; }
.brand-logo { width: 52px; height: 52px; border-radius: 50%; background: #165dff; color: #fff; font-size: 26px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.brand-text h1 { font-size: 20px; font-weight: 700; color: #1d2129; margin: 0; }
.brand-text p { font-size: 13px; color: #86909c; margin: 4px 0 0; }
.login-card { width: 100%; max-width: 360px; }
.login-tab { display: inline-block; font-size: 16px; font-weight: 600; color: #165dff; border-bottom: 2px solid #165dff; padding-bottom: 6px; margin-bottom: 20px; }
.login-card form { display: flex; flex-direction: column; gap: 14px; }
.lg-input { width: 100%; height: 40px; border: 1px solid #e5e6eb; border-radius: 4px; padding: 0 12px; font-size: 14px; color: #1d2129; background: #fff; box-sizing: border-box; outline: none; transition: border-color .15s; }
.lg-input:focus { border-color: #165dff; }
.lg-input::placeholder { color: #a9aeb8; }
.lg-captcha { display: flex; align-items: center; gap: 10px; }
.lg-captcha .lg-input { flex: 1; }
.lg-cap-show { width: 120px; height: 40px; flex: none; display: flex; align-items: center; justify-content: center; background: #f2f3f5; border-radius: 4px; font-size: 14px; font-weight: 600; color: #4e5969; letter-spacing: 1px; user-select: none; }
.lg-btn { height: 40px; background: #165dff; color: #fff; border: none; border-radius: 4px; font-size: 15px; font-weight: 500; cursor: pointer; transition: opacity .15s; }
.lg-btn:hover { opacity: .9; }
.lg-links { margin-top: 16px; display: flex; justify-content: space-between; font-size: 13px; }
.lg-links a { color: #165dff; text-decoration: none; }
.login-copy { margin-top: auto; padding-top: 32px; font-size: 12px; color: #86909c; }
.login-ad { width: 40%; min-width: 340px; background: linear-gradient(160deg, #4080ff 0%, #165dff 60%, #0e42d2 100%); display: flex; align-items: center; justify-content: center; position: relative; }
.ad-inner { color: #fff; padding: 40px; }
.ad-inner h2 { font-size: 24px; font-weight: 700; margin: 0 0 12px; }
.ad-inner p { font-size: 14px; line-height: 1.8; opacity: .92; margin: 0; }
.ad-arrow { position: absolute; left: 24px; right: 24px; bottom: 28px; display: flex; justify-content: space-between; }
.ad-arrow span { width: 32px; height: 32px; border: 1px solid rgba(255,255,255,.5); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; cursor: pointer; }
.login-card .err { color: #f53f3f; font-size: 13px; margin: 0 0 12px; }

@media (max-width: 760px) {
  .login-ad { display: none; }
  .login-wrap { max-width: 400px; }
  .login-side { padding: 32px 24px 20px; }
  .login-brand { margin-bottom: 24px; }
  .brand-logo { width: 44px; height: 44px; font-size: 22px; }
  .brand-text h1 { font-size: 18px; }
}

@media (max-width: 760px) {
  body.admin { flex-direction: column; }
  .admin-top { display: none; }
  .m-admin-head { display: block; background: #fff; padding: 10px 16px 8px; border-bottom: 1px solid #e5e6eb; }
  .m-admin-titlebar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
  .m-admin-title { font-size: 18px; font-weight: 700; color: #1d2129; display: inline-flex; align-items: center; gap: 8px; }
  .m-admin-logo { font-style: normal; width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, #e8c35a, #c9a227); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; flex-shrink: 0; }
  .m-admin-title-btns { display: flex; align-items: center; gap: 14px; }
  .m-admin-title-btns a { font-size: 24px; line-height: 1; color: #4e5969; font-weight: 400; text-decoration: none; }
  .m-admin-user { display: flex; align-items: center; gap: 10px; padding-bottom: 4px; }
  .m-admin-avatar { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, #165dff, #4080ff); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700; flex-shrink: 0; }
  .m-admin-userinfo { flex: 1; min-width: 0; }
  .m-admin-shopname { display: block; font-size: 15px; font-weight: 600; color: #1d2129; }
  .m-admin-account { display: block; font-size: 12px; color: #86909c; }
  .m-admin-role { font-size: 11px; font-weight: 700; color: #7a4e00; background: linear-gradient(135deg, #ffd56b, #f7b733); border-radius: 6px; padding: 3px 8px; flex-shrink: 0; }
  .m-admin-msg { position: relative; flex-shrink: 0; color: #4e5969; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; }
  .m-admin-msg svg { width: 24px; height: 24px; }
  .m-admin-msg i { position: absolute; top: -2px; right: -2px; min-width: 15px; height: 15px; background: #f53f3f; color: #fff; font-size: 10px; border-radius: 99px; display: inline-flex; align-items: center; justify-content: center; padding: 0 3px; font-style: normal; }
  .admin-body { flex-direction: column; }
  .admin-side { display: none; }
  .admin-sub { display: none; }
  .admin-main { padding: 12px; padding-bottom: 72px; }
  .grid-2 { grid-template-columns: 1fr; }

  .dash-wrap { grid-template-columns: 1fr; gap: 12px; }
  .kpi-strip { display: flex; background: linear-gradient(135deg, #1676f4, #3b82f6); border-radius: 10px; padding: 14px 0; margin-bottom: 12px; }
  .kpi { flex: 1; background: none; border-radius: 0; padding: 0; text-align: center; display: flex; flex-direction: column; align-items: center; }
  .kpi + .kpi { border-left: 1px solid rgba(255,255,255,.28); }
  .kpi-n { font-size: 22px; line-height: 1.1; }
  .kpi-t { font-size: 12px; margin-top: 12px; }
  .stat-grid4 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 0; background: none; }
  .stat4 { background: #fff; border: 1px solid #e5e6eb; border-radius: 10px; padding: 12px 10px; }
  .stat4-pc { display: none; }
  .stat4-t { font-size: 12px; }
  .stat4-n { font-size: 22px; }
  .stat4-y { font-size: 11px; }

  .m-admin-tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; height: 56px; background: #fff; border-top: 1px solid #e5e6eb; z-index: 80; }
  .m-admin-tabbar a { flex: 1; display: flex; align-items: center; justify-content: center; font-size: 13px; color: #4e5969; }
  .m-admin-tabbar a.on { color: #165dff; font-weight: 600; }

  .pc-only { display: none !important; }
  .m-notice { display: flex; align-items: center; gap: 10px; background: #e8f3ff; border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; }
  .m-notice b { font-size: 13px; color: #165dff; white-space: nowrap; }
  .m-notice span { font-size: 13px; color: #4e5969; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  .m-iconnav { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 8px; margin-bottom: 14px; }
  .m-iconnav a { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 12px; color: #4e5969; text-decoration: none; }
  .m-iconnav .ic { width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; }
  .m-iconnav .ic svg { width: 26px; height: 26px; }
  .m-iconnav a.on { color: #165dff; font-weight: 600; }
  .m-fund-tabs { display: flex; gap: 22px; margin: 2px 0 14px; border-bottom: 1px solid #e5e6eb; }
  .m-fund-tabs a { padding: 6px 2px 10px; font-size: 14px; color: #4e5969; border-bottom: 2px solid transparent; margin-bottom: -1px; text-decoration: none; }
  .m-fund-tabs a.on { color: #165dff; font-weight: 600; border-bottom-color: #165dff; }

  .m-mod-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
  .m-mod-grid.m-mod-grid2 { grid-template-columns: repeat(2, 1fr); }
  .m-mod-grid a { background: #fff; border-radius: 10px; padding: 16px 8px; display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 13px; color: #4e5969; }
  .m-mod-grid a svg { width: 24px; height: 24px; color: #165dff; }
  .m-mod-grid a:active { background: #f5f7fa; }
  .sec-title.m-only { display: block !important; }
  .m-mod-grid.m-only { display: grid !important; }
}

/* ===== 仪表盘（参考平台同款） ===== */
.dash-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.dash-main { min-width: 0; }
.dash-side { display: flex; flex-direction: column; }
.dash-welcome { background: transparent; border: none; border-radius: 0; padding: 0 0 14px; margin-bottom: 12px; }
.dash-welcome-title { font-size: 16px; font-weight: 600; color: var(--text); }
.dash-welcome-time { font-size: 12px; color: var(--muted); margin-top: 4px; }
.kpi-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 14px; }
.kpi { background: linear-gradient(135deg, #1676f4, #3b82f6); border-radius: 10px; padding: 18px 12px; text-align: center; color: #fff; display: block; position: relative; overflow: hidden; }
.kpi + .kpi { border-left: none; }
.kpi-n { display: block; font-size: 26px; font-weight: 700; line-height: 1.2; color: #fff; }
.kpi-t { display: block; font-size: 13px; color: rgba(255,255,255,.95); margin-top: 6px; }
.kpi:hover { background: linear-gradient(135deg, #1266e6, #2f7af4); }
.kpi.hot { background: linear-gradient(135deg, #0d56c8, #1a6ce8); }
.kpi.hot .kpi-n { color: #fff; }
.sec-title { font-size: 14px; font-weight: 600; color: var(--text); margin: 4px 0 10px; }
.m-only { display: none !important; }
.stat-grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; background: #f7f8fa; border-radius: 8px; padding: 14px; }
.stat4 { background: transparent; border: none; border-radius: 0; padding: 0; }
.stat4-t { font-size: 12px; color: var(--muted); }
.stat4-n { font-size: 20px; font-weight: 700; color: var(--text); margin-top: 4px; }
.stat4-y { font-size: 12px; color: var(--muted); margin-top: 2px; }
.chart-panel { padding: 16px; }
.line-chart { width: 100%; height: 180px; display: block; }
.line-chart .line-grid line { stroke: #f0f1f3; stroke-width: 1; }
.line-labels { display: flex; justify-content: space-between; margin-top: 4px; }
.line-labels span { font-size: 11px; color: var(--muted); flex: 1; text-align: center; }
.side-panel { margin: 0 0 12px; }
.side-panel h3 { font-size: 14px; }
.side-menu { display: flex; flex-direction: column; }
.side-menu a { padding: 9px 10px; color: #4e5969; font-size: 14px; border-radius: 6px; }
.side-menu a:hover { background: #f2f3f5; color: var(--primary); }
.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.quick-item { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px; color: #4e5969; font-size: 12px; border-radius: 8px; }
.quick-item svg { width: 20px; height: 20px; }
.quick-item:hover { background: #f2f3f5; color: var(--primary); }
.side-alert { display: flex; flex-direction: column; gap: 8px; }
.side-alert a, .side-alert span { font-size: 13px; color: #4e5969; }
.side-alert a b { color: var(--danger); }
.side-announce { font-size: 13px; color: #4e5969; margin: 0; line-height: 1.7; word-break: break-word; }
.more-link { margin: 12px 0 0; }
@media (max-width: 900px) {
  .dash-wrap { grid-template-columns: 1fr; }
  .stat-grid4 { grid-template-columns: repeat(3, 1fr); }
  .stat4-pc { display: none; }
}

/* ===== 店铺设置（参考平台同款） ===== */
.set-icons { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 10px; margin: 14px 0; }
.set-icon { border: 1px solid var(--line); border-radius: 12px; padding: 14px 8px; text-align: center; font-size: 13px; color: var(--text); background: #fff; cursor: pointer; font-family: inherit; display: block; }
.set-icon .ic { display: block; font-size: 22px; margin-bottom: 4px; }
.set-icon:hover { border-color: var(--primary); }
a.set-icon { text-decoration: none; }
.set-tabs { display: flex; gap: 8px; overflow-x: auto; margin: 14px 0; padding-bottom: 4px; }
.set-tab-btn { flex-shrink: 0; border: 1px solid var(--line); background: #fff; color: var(--muted); border-radius: 99px; padding: 6px 16px; font-size: 13px; cursor: pointer; font-family: inherit; }
.set-tab-btn.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.set-pane .panel { margin: 0; }
.pill-grid { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.pill { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; font-size: 13px; color: var(--text); cursor: pointer; background: #fff; margin: 0; }
.pill input { width: auto; margin: 0; }
.pill:has(input:checked) { border-color: var(--primary); background: #eff6ff; color: var(--primary); }
.pill .dot { width: 14px; height: 14px; border-radius: 4px; display: inline-block; flex-shrink: 0; }
.pill-group { display: flex; gap: 8px; flex-wrap: wrap; }
.switch { position: relative; display: inline-block; width: 48px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; cursor: pointer; inset: 0; background: #cbd5e1; border-radius: 99px; transition: .2s; }
.switch .slider:before { content: ""; position: absolute; width: 20px; height: 20px; 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(22px); }
.switch-row { display: flex; align-items: center; gap: 12px; }
.switch-row label { margin: 0; }
.link-row { display: flex; gap: 8px; }
.link-row input { flex: 1; }
.link-sec { margin-bottom: 18px; }
.link-sec-title { font-size: 14px; font-weight: 600; color: #1d2129; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.link-sec-title .tag { font-size: 11px; font-weight: 600; color: #165dff; background: #e8f3ff; border-radius: 4px; padding: 1px 6px; }
.link-row + .link-row { margin-top: 8px; }
.btn-light { background: #f2f3f5; color: #4e5969; border: 1px solid #e5e6eb; }
.btn-light:active { background: #e5e6eb; }
.qr-box { width: 180px; margin: 4px auto 0; text-align: center; }
.qr-box img { width: 180px; height: 180px; display: block; border: 1px solid #e5e6eb; border-radius: 8px; }
.qr-box p { margin: 8px 0 0; font-size: 12px; color: #86909c; }
.req { color: var(--danger); }
.cover-preview.wide { max-width: 320px; width: 100%; }

/* ===== 经典发卡风（下单页式模板） ===== */
body.t-pc-classic .shop-top { display: none; }
.c-topnav { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.c-topnav-inner { display: flex; justify-content: space-between; align-items: center; height: 52px; }
.c-brand { font-weight: 700; font-size: 17px; color: var(--text); }
.c-topnav nav a { margin-left: 14px; color: var(--muted); font-size: 14px; }
.c-topnav nav a:hover { color: var(--primary); }
.classic-main { padding-bottom: 48px; }
.c-store { display: flex; align-items: center; gap: 12px; padding: 18px 0 8px; }
.c-store-avatar { width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #2563eb, #3b82f6); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 700; overflow: hidden; flex-shrink: 0; }
.c-store-avatar img { width: 100%; height: 100%; object-fit: cover; }
.c-store-name { font-size: 19px; font-weight: 700; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.c-store-meta { font-size: 12px; color: var(--muted); margin-top: 3px; display: flex; gap: 10px; flex-wrap: wrap; }
.c-notice { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; border-radius: 8px; padding: 10px 14px; font-size: 14px; margin: 10px 0; line-height: 1.7; }
.c-notice b { margin-right: 6px; }
.c-item { display: flex; gap: 12px; align-items: center; margin-bottom: 0; }
.c-thumb { width: 72px; height: 72px; border-radius: 8px; overflow: hidden; background: #eef2f7; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 26px; font-weight: 700; color: #b6c2d4; }
.c-thumb img { width: 100%; height: 100%; object-fit: cover; }
.c-info { flex: 1; min-width: 0; }
.c-name { font-size: 15px; font-weight: 600; margin: 0; }
.c-desc { font-size: 12px; color: var(--muted); margin: 2px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-meta { font-size: 12px; color: var(--muted); display: flex; gap: 10px; }
.c-meta .price { font-size: 15px; }
.c-buy { background: #dc2626; border-color: #dc2626; color: #fff; flex-shrink: 0; }
.c-buy:hover { background: #b91c1c; border-color: #b91c1c; color: #fff; }
.c-form { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-top: 16px; }
.c-form h3 { font-size: 15px; }
.c-form .form-row label { color: var(--text); }
.c-pay-btn { width: 100%; background: #dc2626; border-color: #dc2626; color: #fff; font-size: 16px; padding: 12px; }
.c-pay-btn:hover { background: #b91c1c; border-color: #b91c1c; color: #fff; }
#product-grid .c-item { margin-top: 10px; }
@media (max-width: 760px) {
  .c-topnav nav a { margin-left: 10px; font-size: 13px; }
  .c-item { padding: 12px; }
}

/* ===== 通用弹窗 / 商品管理 / 协作成员 / 分享 toast ===== */
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; padding: 0 16px 16px; }
.admin-modal-msg { margin: 0 0 4px; line-height: 1.6; word-break: break-word; font-size: 14px; color: var(--text); }
.mini-cover { width: 36px; height: 36px; border-radius: 8px; overflow: hidden; background: #eef2ff; color: var(--primary); display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }
.mini-cover img { width: 100%; height: 100%; object-fit: cover; }
.pcell { display: flex; align-items: center; gap: 10px; text-align: left; }
.pcell-txt { display: flex; flex-direction: column; line-height: 1.4; min-width: 0; }
.pcell-txt b { font-size: 14px; }
.pcell-txt .muted { margin-top: 2px; }
.badge-refund { background: #fce7f3; color: #9d174d; }
.badge-refunded { background: #e5e7eb; color: #4b5563; }
.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: rgba(17,24,39,.92); color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 14px; z-index: 300; white-space: nowrap; max-width: 90vw; text-align: center; }
.btn-close:hover { color: var(--danger); }

/* ===== 分站管理 ===== */
.store-switch { padding: 4px 14px 12px; border-bottom: 1px solid #e5e7eb; margin-bottom: 10px; }
.store-switch label { display: block; font-size: 11px; color: #9ca3af; margin-bottom: 4px; }
.store-switch select { width: 100%; padding: 7px 8px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 13px; background: #fff; color: #111827; }

/* ===== 参考站前台样式（1:1 发卡商城） ===== */
.shop-top { background: #fff; border-bottom: 1px solid #eef0f3; position: sticky; top: 0; z-index: 60; }
.shop-top-inner { max-width: 1440px; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; height: 80px; }
.shop-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.shop-logo { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, #165dff, #4080ff); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 19px; font-weight: 700; flex-shrink: 0; }
.shop-name { font-size: 18px; font-weight: 700; color: #c9a227; white-space: nowrap; }
.shop-badge { font-size: 12px; font-weight: 600; color: #16a34a; background: #e9feeb; border-radius: 4px; padding: 2px 10px; white-space: nowrap; }
.shop-contact { font-size: 14px; font-weight: 600; color: #07c160; white-space: nowrap; }
.shop-share { font-size: 14px; color: #4e5969; white-space: nowrap; }
.shop-share:hover { color: #165dff; }
.shop-nav { display: flex; align-items: center; gap: 18px; }
.shop-nav a { color: #4e5969; font-size: 14px; white-space: nowrap; }
.shop-nav a:hover { color: #165dff; }
.shop-nav .shop-nav-btn { color: #fff; background: #165dff; border-radius: 6px; padding: 7px 16px; font-size: 13px; }
.shop-nav .shop-nav-btn:hover { background: #0e42d2; color: #fff; }

.shop-main { max-width: 1440px; margin: 0 auto; padding: 16px 16px 48px; }
.shop-tabs { display: flex; align-items: center; justify-content: space-between; background: #fff; border-radius: 8px 8px 0 0; padding: 0 16px; height: 56px; }
.shop-tab { font-size: 14px; color: #165dff; font-weight: 500; border-bottom: 2px solid #165dff; line-height: 54px; }
.shop-search input { width: 240px; padding: 7px 12px; border: 1px solid #e5e6eb; border-radius: 6px; font-size: 13px; background: #fff; }
.shop-search input:focus { outline: none; border-color: #165dff; }

.shop-grid { display: grid; grid-template-columns: 300px 1fr; gap: 16px; align-items: start; margin-top: 16px; }
.shop-card { background: #fff; border-radius: 8px; padding: 16px; margin-bottom: 16px; }
.shop-card-title { font-size: 14px; color: #565960; margin-bottom: 12px; }
.cat-list { list-style: none; margin: 0; padding: 0; }
.cat-item { display: flex; justify-content: space-between; align-items: center; height: 40px; padding: 0 8px; border-radius: 6px; font-size: 14px; color: #4e5969; cursor: pointer; }
.cat-item:hover { color: #165dff; }
.cat-item.on { color: #165dff; font-weight: 500; }
.cat-item i { font-style: normal; font-size: 12px; color: #86909c; }
.cat-item.on i { color: #165dff; }
.notice-text { font-size: 14px; color: #4e5969; line-height: 1.8; word-break: break-word; white-space: pre-wrap; }
.shop-announce { background: #fff; border-radius: 8px; padding: 14px 16px; margin-top: 16px; }
.shop-announce.announce-closed { color: #ff4f11; }
.notice-contact { font-size: 13px; color: #86909c; margin-top: 6px; }

.goods-list { display: flex; flex-direction: column; }
.goods-item { display: flex; align-items: center; gap: 12px; height: 57px; padding: 0 8px; border-radius: 4px; cursor: pointer; }
.goods-item:hover { background: #f7f8fa; }
.goods-image { width: 24px; height: 24px; border-radius: 50%; background: #f0f2f5; flex-shrink: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.goods-image img { width: 100%; height: 100%; object-fit: cover; }
.goods-title { flex: 1; min-width: 0; font-size: 14px; color: #4e5969; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.goods-info { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.goods-price { display: flex; align-items: baseline; color: #165dff; font-weight: 600; }
.goods-price .currency { font-size: 14px; }
.goods-price .now-price { font-size: 16px; }
.stock { font-size: 10px; font-weight: 700; border-radius: 4px; padding: 2px 8px; }
.stock.rank0 { color: #ff4f11; background: #ffe5dc; }
.stock.rankmore { color: #2275ff; background: #f0f7ff; }

.kf-float { position: fixed; left: 0; top: 200px; z-index: 70; display: flex; flex-direction: column; }
.kf-fold { color: #fff; font-size: 11px; text-align: center; padding: 2px 0 6px; cursor: pointer; opacity: .9; }
.kf-btn { display: block; color: #fff; background: linear-gradient(135deg, #4a6bff, #165dff); font-size: 12px; font-weight: 700; padding: 9px 12px; border-radius: 0 8px 8px 0; margin-bottom: 4px; white-space: nowrap; }
.kf-btn:hover { background: #165dff; }

/* ===== 手机端店铺头部 ===== */
.m-shop-head { display: none; }

@media (max-width: 900px) {
  .shop-top-inner { display: none; }
  .m-shop-head { display: block; background: #fff; padding: 10px 16px 12px; border-bottom: 1px solid #eef0f3; }
  .m-shop-headbar { display: flex; align-items: center; justify-content: center; margin-bottom: 12px; position: relative; }
  .m-site-name { font-size: 17px; font-weight: 700; color: #1d2129; }
  .m-search-ico { position: absolute; right: 74px; top: 50%; transform: translateY(-50%); color: #4e5969; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; }
  .m-search-ico svg { width: 22px; height: 22px; }
  .m-query { font-size: 12px; font-weight: 600; color: #fff; background: #165dff; border-radius: 15px; padding: 5px 12px; position: absolute; right: 0; top: 50%; transform: translateY(-50%); text-decoration: none; }
  .m-search-row { margin-bottom: 10px; }
  .m-search-row input { width: 100%; box-sizing: border-box; padding: 8px 12px; border: 1px solid #e5e6eb; border-radius: 16px; font-size: 13px; background: #f5f7fa; }
  .m-search-row input:focus { outline: none; border-color: #165dff; background: #fff; }
  .m-shop-info { display: flex; align-items: flex-end; gap: 12px; }
  .m-brand-col { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; flex: 1; min-width: 0; }
  .m-logo { width: 54px; height: 54px; border-radius: 50%; background: linear-gradient(135deg, #f7d36b, #c9a227); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 700; flex-shrink: 0; overflow: hidden; }
  .m-logo img { width: 100%; height: 100%; object-fit: cover; }
  .m-name { font-size: 18px; font-weight: 700; color: #c9a227; display: block; }
  .m-right-col { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex-shrink: 0; }
  .m-shop-stats { display: flex; align-items: flex-end; gap: 20px; flex-shrink: 0; }
  .m-stat { display: flex; flex-direction: column; align-items: center; line-height: 1.2; }
  .m-stat b { font-size: 20px; font-weight: 700; color: #1d2129; }
  .m-stat i { font-style: normal; font-size: 12px; color: #86909c; margin-top: 2px; }
  .m-stat-dep b { color: #c9a227; }
  .m-badge { font-size: 11px; font-weight: 600; color: #16a34a; background: #e9feeb; border-radius: 4px; padding: 2px 6px; margin-left: 6px; vertical-align: 2px; }
  .m-contact { font-size: 13px; font-weight: 600; color: #07c160; flex-shrink: 0; text-decoration: none; }

  .shop-main { display: flex; flex-direction: column; padding: 0 0 48px; }
  .shop-announce { background: #fff; border-radius: 0; padding: 12px 16px; margin-top: 0; order: 1; border-bottom: 1px solid #eef0f3; }
  .shop-tabs { padding: 0 16px; border-radius: 0; height: 48px; order: 2; justify-content: flex-start; }
  .shop-tab { font-size: 14px; line-height: 46px; border-bottom: none; }
  .shop-search { display: none; }
  .shop-grid { grid-template-columns: 1fr; gap: 0; margin-top: 0; order: 3; }
  .shop-cats .shop-card { padding: 12px 16px; margin-bottom: 0; border-radius: 0; border-bottom: 1px solid #eef0f3; }
  .shop-cats .shop-card-title { margin-bottom: 8px; }
  .cat-list { display: flex; flex-direction: row; gap: 8px; overflow-x: auto; }
  .cat-item { flex-shrink: 0; height: 32px; padding: 0 14px; border-radius: 16px; background: #f2f3f5; font-size: 13px; }
  .cat-item:hover { background: #f2f3f5; }
  .cat-item.on { background: #e8f3ff; }
  .cat-item i { margin-left: 6px; background: transparent; padding: 0; line-height: inherit; color: inherit; }
  .shop-content { min-width: 0; }
  .shop-content .shop-card { padding: 12px 12px 16px; border-radius: 0; margin-bottom: 0; border-bottom: 1px solid #eef0f3; background: #f5f7fa; }
  .goods-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .goods-item { flex-direction: column; align-items: stretch; gap: 0; height: auto; padding: 10px; background: #fff; border-radius: 8px; border: 1px solid #eef0f3; }
  .goods-item:hover { background: #fff; }
  .goods-image { width: 100%; height: 88px; border-radius: 6px; font-size: 30px; font-weight: 700; color: #c9a227; background: #f7f8fa; flex-shrink: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; }
  .goods-image img { width: 100%; height: 100%; object-fit: cover; }
  .goods-title { width: 100%; font-size: 13px; color: #4e5969; margin: 8px 0; line-height: 1.45; max-height: 2.9em; overflow: hidden; white-space: normal; word-break: break-all; }
  .goods-info { justify-content: space-between; gap: 6px; }
  .goods-price .now-price { font-size: 17px; }
  .stock { padding: 2px 7px; }

  .kf-float { display: flex; left: auto; right: 0; top: 220px; }
  .kf-btn { border-radius: 8px 0 0 8px; padding: 8px 10px; }
  .kf-fold { color: #4e5969; }
}

/* ===== 订单查询页 ===== */
.query-page { max-width: 720px; margin: 0 auto; padding: 24px 16px 60px; }
.query-title { font-size: 22px; font-weight: 700; color: #1d2129; text-align: center; margin: 8px 0 10px; }
.query-sub { font-size: 14px; color: #4e5969; text-align: center; margin: 0 0 6px; }
.query-tip { font-size: 13px; color: #86909c; text-align: center; margin: 0 0 20px; }
.query-form { display: flex; gap: 10px; }
.query-form input { flex: 1; min-width: 0; padding: 11px 14px; border: 1px solid #e5e6eb; border-radius: 8px; font-size: 14px; background: #fff; }
.query-form input:focus { outline: none; border-color: #165dff; }
.query-form .btn { flex-shrink: 0; padding: 11px 22px; border-radius: 8px; }
.q-result { margin-top: 16px; }
.q-refund-row { margin-top: 14px; display: flex; justify-content: flex-end; }
.modal textarea { width: 100%; box-sizing: border-box; border: 1px solid #e5e6eb; border-radius: 8px; padding: 10px 12px; font-size: 14px; resize: vertical; min-height: 88px; }
.modal textarea:focus { outline: none; border-color: #165dff; }
.query-notice { margin-top: 24px; }
.q-disclaimer { font-size: 13px; color: #86909c; line-height: 1.8; }
.q-tips { margin-top: 14px; background: #fff; border-radius: 8px; padding: 14px 16px; }
.q-tips h3 { font-size: 15px; color: #1d2129; margin: 0 0 10px; }
.q-warn { font-size: 13px; color: #f53f3f; background: #fff2f0; border-radius: 6px; padding: 8px 12px; line-height: 1.7; }
.q-ok { font-size: 13px; color: #00b42a; line-height: 1.7; margin: 10px 0; }
.q-list { list-style: none; margin: 0; padding: 0; }
.q-list li { font-size: 13px; color: #4e5969; line-height: 2; }
