/* ==========================================================================
   提卡网 · 全局样式
   设计系统：CSS 变量 + 暗/亮双主题，无任何第三方依赖
   ========================================================================== */

/* ---------- 1. 主题变量 ---------- */
:root {
  --brand: #6d5efc;
  --brand-2: #00c6ff;
  --brand-grad: linear-gradient(135deg, #6d5efc 0%, #00c6ff 100%);
  --success: #16a34a;
  --success-soft: rgba(22, 163, 74, .12);
  --danger: #e5484d;
  --danger-soft: rgba(229, 72, 77, .12);
  --warn: #f59e0b;
  --warn-soft: rgba(245, 158, 11, .14);

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow: 0 8px 24px rgba(15, 23, 42, .10);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, .18);

  --font: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", -apple-system,
    BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "SFMono-Regular", "JetBrains Mono", Consolas, "Liberation Mono", Menlo, monospace;

  --maxw: 1080px;

  /* 默认主题：清爽亮色（未设置 data-theme 时生效） */
  --bg: #f4f6fb;
  --bg-glow-1: rgba(109, 94, 252, .14);
  --bg-glow-2: rgba(0, 198, 255, .12);
  --surface: #ffffff;
  --surface-2: #f7f9fd;
  --surface-3: #eef2f9;
  --border: #e2e8f2;
  --border-strong: #cdd7e6;
  --text: #131a2b;
  --text-dim: #5a6683;
  --text-mute: #8a95ad;
  --shadow: 0 8px 24px rgba(15, 23, 42, .08);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, .16);
  color-scheme: light;
}

/* 暗色主题（默认） */
html[data-theme="dark"] {
  --bg: #0b0e17;
  --bg-glow-1: rgba(109, 94, 252, .18);
  --bg-glow-2: rgba(0, 198, 255, .12);
  --surface: #141b2c;
  --surface-2: #1b2438;
  --surface-3: #222d45;
  --border: #27324c;
  --border-strong: #35425f;
  --text: #e9edf7;
  --text-dim: #97a3c0;
  --text-mute: #6b7793;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --shadow-lg: 0 30px 70px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

/* 亮色主题：变量已在 :root 定义（默认），此处仅显式声明以兼容 data-theme="light" */
html[data-theme="light"] { color-scheme: light; }

/* ---------- 2. 基础重置 ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(720px 420px at 12% -6%, var(--bg-glow-1), transparent 62%),
    radial-gradient(640px 420px at 92% 4%, var(--bg-glow-2), transparent 60%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.3; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

button, input, select, textarea { font: inherit; color: inherit; }

/* 可见的键盘焦点样式（无障碍要求，禁止移除） */
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------- 3. 布局 ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 64px;
}

.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; }

.brand-mark {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: var(--brand-grad);
  color: #fff;
  font-size: 16px;
  box-shadow: 0 6px 16px rgba(109, 94, 252, .45);
}

.nav { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.nav-link {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--text-dim);
  font-weight: 600;
  font-size: 14px;
  transition: .18s;
}
.nav-link:hover, .nav-link.active { color: var(--text); background: var(--surface-2); }

main { padding: 36px 0 72px; }

/* ---------- 4. 通用组件 ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: .18s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.btn-primary { background: var(--brand-grad); color: #fff; box-shadow: 0 8px 20px rgba(109, 94, 252, .35); }
.btn-ghost { background: transparent; border-color: var(--border-strong); color: var(--text-dim); }
.btn-ghost:hover { color: var(--text); border-color: var(--brand); }
.btn-danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 7px; }
.btn-block { width: 100%; }

.field { display: block; margin-bottom: 16px; }
.field-label { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 600; color: var(--text-dim); }

.input, .select, .textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  transition: .18s;
}
.input::placeholder, .textarea::placeholder { color: var(--text-mute); }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(109, 94, 252, .18);
}
.textarea { min-height: 150px; resize: vertical; font-family: var(--mono); font-size: 13px; line-height: 1.7; }
.input-mono { font-family: var(--mono); letter-spacing: 1px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.badge-ok { background: var(--success-soft); color: var(--success); }
.badge-no { background: var(--danger-soft); color: var(--danger); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-info { background: rgba(109, 94, 252, .14); color: var(--brand); }

.muted { color: var(--text-dim); }
.mono { font-family: var(--mono); }

/* ---------- 5. 首页 Hero ---------- */
.hero { text-align: center; padding: 28px 0 34px; }
.hero h1 { font-size: clamp(28px, 5vw, 44px); letter-spacing: -.5px; }
.hero h1 .grad {
  background: var(--brand-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p { margin-top: 12px; color: var(--text-dim); font-size: 16px; }

.stat-row { display: flex; justify-content: center; gap: 34px; margin-top: 26px; flex-wrap: wrap; }
.stat-item { text-align: center; }
.stat-item b { display: block; font-size: 26px; font-weight: 800; background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-item span { font-size: 13px; color: var(--text-mute); }

/* ---------- 6. 商品网格 ---------- */
.section-title { display: flex; align-items: baseline; gap: 12px; margin: 34px 0 18px; }
.section-title h2 { font-size: 20px; }
.section-title span { font-size: 13px; color: var(--text-mute); }

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

.product {
  position: relative;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  transition: .2s;
  text-align: left;
  width: 100%;
  display: block;
}
.product:hover { border-color: var(--brand); transform: translateY(-3px); box-shadow: var(--shadow); }
.product.is-active { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(109, 94, 252, .18); }
.product-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.product-name { font-weight: 700; font-size: 16px; }
.product-desc { margin-top: 8px; font-size: 13px; color: var(--text-dim); min-height: 40px; }
.product-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--border); }
.product-price { font-weight: 800; font-size: 19px; color: var(--brand); }
.product-price small { font-size: 12px; font-weight: 600; }

/* ---------- 7. 提卡面板 ---------- */
.redeem { padding: 26px; margin-top: 8px; }
.redeem-steps { display: flex; gap: 10px; margin-bottom: 22px; flex-wrap: wrap; }
.step-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 14px 6px 6px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 13px; font-weight: 600; color: var(--text-dim);
}
.step-chip b {
  width: 22px; height: 22px; display: grid; place-items: center;
  border-radius: 50%; background: var(--surface-3); font-size: 12px;
}
.step-chip.on { color: var(--text); border-color: var(--brand); }
.step-chip.on b { background: var(--brand-grad); color: #fff; }

.selected-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px dashed var(--border-strong);
  margin-bottom: 18px;
}
.selected-bar .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px rgba(109, 94, 252, .18); }

.result {
  margin-top: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  animation: rise .3s ease;
}
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.result-head { padding: 12px 18px; font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.result-ok .result-head { background: var(--success-soft); color: var(--success); }
.result-no .result-head { background: var(--danger-soft); color: var(--danger); }
.result-warn .result-head { background: var(--warn-soft); color: var(--warn); }
.result-body { padding: 18px; background: var(--surface); }

.content-box {
  position: relative;
  padding: 16px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-all;
}
.copy-float { position: absolute; top: 10px; right: 10px; }

/* ---------- 8. 表格 ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { background: var(--surface-2); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-mute); font-weight: 700; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--surface-2); }
td.wrap { white-space: normal; max-width: 320px; word-break: break-all; font-family: var(--mono); font-size: 12.5px; }

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

/* ---------- 9. 后台布局 ---------- */
.admin-head { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; flex-wrap: wrap; }
.tabs { display: flex; gap: 6px; padding: 5px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; }
.tab { padding: 8px 18px; border: none; background: transparent; border-radius: 999px; font-weight: 600; font-size: 14px; color: var(--text-dim); cursor: pointer; transition: .18s; }
.tab.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: rise .25s ease; }

.kpi-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 22px; }
.kpi { padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.kpi span { font-size: 13px; color: var(--text-mute); }
.kpi b { display: block; margin-top: 6px; font-size: 26px; font-weight: 800; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolbar .input, .toolbar .select { width: auto; min-width: 160px; }
.spacer { margin-left: auto; }

/* ---------- 10. 弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 100;
  display: none; align-items: center; justify-content: center;
  padding: 20px;
  background: rgba(6, 9, 18, .62);
  backdrop-filter: blur(4px);
}
.modal-mask.open { display: flex; }
.modal {
  width: 100%; max-width: 460px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  animation: rise .25s ease;
  max-height: 90dvh; overflow: auto;
}
.modal-head { padding: 18px 22px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-head h3 { font-size: 17px; }
.modal-body { padding: 22px; }
.modal-foot { padding: 16px 22px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }
.icon-btn { width: 32px; height: 32px; display: grid; place-items: center; border: none; background: transparent; border-radius: 8px; color: var(--text-dim); cursor: pointer; font-size: 18px; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

/* 登录遮罩 */
.lock {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center;
  padding: 20px;
  background: var(--bg);
  background-image:
    radial-gradient(720px 420px at 30% 0%, var(--bg-glow-1), transparent 62%),
    radial-gradient(640px 420px at 80% 10%, var(--bg-glow-2), transparent 60%);
}
.lock[hidden] { display: none; }
.lock-box { width: 100%; max-width: 380px; padding: 30px; text-align: center; }

/* ---------- 11. Toast ---------- */
#toast-wrap { position: fixed; top: 20px; right: 20px; z-index: 300; display: flex; flex-direction: column; gap: 10px; }
.toast {
  min-width: 220px; max-width: 340px;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand);
  box-shadow: var(--shadow);
  font-size: 14px; font-weight: 600;
  animation: slideIn .28s ease;
}
.toast.ok { border-left-color: var(--success); }
.toast.err { border-left-color: var(--danger); }
.toast.warn { border-left-color: var(--warn); }
@keyframes slideIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }

/* ---------- 12. 页脚 ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 26px 0; text-align: center; color: var(--text-mute); font-size: 13px; }
.site-footer a { color: var(--text-dim); }
.site-footer a:hover { color: var(--brand); }

/* ---------- 13. 工具类 ---------- */
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.mt-0 { margin-top: 0; } .mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.hidden { display: none !important; }
.text-center { text-align: center; }
.nowrap { white-space: nowrap; }

/* ---------- 14. 响应式 ---------- */
@media (max-width: 640px) {
  .header-inner { height: 58px; }
  .nav-link { padding: 8px 10px; font-size: 13px; }
  .hero { padding: 16px 0 24px; }
  main { padding: 22px 0 48px; }
  .redeem { padding: 18px; }
  .stat-row { gap: 22px; }
  .toolbar .input, .toolbar .select { width: 100%; min-width: 0; }
  .toolbar .spacer { margin-left: 0; width: 100%; }
  #toast-wrap { left: 12px; right: 12px; }
  .toast { max-width: none; }
}

/* ---------- 15. 支付方式与二维码 ---------- */
.pay-channels { display: grid; gap: 10px; }

.pay-channel {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  cursor: pointer;
  transition: .18s;
  text-align: left;
  width: 100%;
}
.pay-channel:hover { border-color: var(--brand); }
.pay-channel.is-active {
  border-color: var(--brand);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(109, 94, 252, .16);
}
.pay-channel .pc-icon {
  width: 34px; height: 34px; flex: none;
  display: grid; place-items: center;
  border-radius: 9px;
  background: var(--brand-grad);
  color: #fff; font-size: 15px; font-weight: 700;
}
.pay-channel .pc-body { flex: 1; min-width: 0; }
.pay-channel .pc-name { font-weight: 700; font-size: 14px; }
.pay-channel .pc-hint { font-size: 12px; color: var(--text-mute); }
.pay-channel .pc-radio {
  width: 18px; height: 18px; flex: none;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
}
.pay-channel.is-active .pc-radio {
  border-color: var(--brand);
  background: radial-gradient(circle, var(--brand) 0 44%, transparent 46%);
}

.qr-image {
  width: 220px; height: 220px;
  margin: 0 auto;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  padding: 8px;
}
.qr-holder img { display: block; margin: 0 auto; }

/* 打印时隐藏交互元素 */
@media print {
  .site-header, .site-footer, .btn, #toast-wrap { display: none !important; }
}

/* ==========================================================================
   16. 前台重构（v2）—— 首页 / 提卡页 / 代理专区
   --------------------------------------------------------------------------
   说明：以上 1~15 段是原有样式，后台管理页依赖其中的类名，不要删除。
   本段只做「增强 + 新增」，新组件统一加前缀避免冲突。
   ========================================================================== */

/* ---------- 16.1 通用增强 ---------- */
.grad {
  background: var(--brand-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.btn-lg { padding: 14px 26px; font-size: 15px; border-radius: var(--radius); }
.btn-block.btn-lg { padding: 15px 26px; }

.section { padding: 12px 0 44px; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin: 26px 0 20px;
  flex-wrap: wrap;
}
.section-head h2 { font-size: clamp(20px, 2.4vw, 26px); letter-spacing: -.3px; }
.section-sub { margin-top: 8px; color: var(--text-dim); font-size: 14px; }

.page-head { padding: 34px 0 10px; }
.page-head h1 { font-size: clamp(24px, 3.4vw, 34px); letter-spacing: -.4px; }

/* ---------- 16.2 首页 Hero ---------- */
.hero-v2 { padding: 44px 0 26px; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: 48px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 13px 5px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .2px;
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 3px rgba(109, 94, 252, .16);
}
.eyebrow-edit { color: var(--brand); border-color: rgba(109, 94, 252, .4); }
.eyebrow-edit::before { background: var(--brand-2); box-shadow: 0 0 0 3px rgba(0, 198, 255, .2); }

.hero-copy h1 {
  margin-top: 18px;
  font-size: clamp(30px, 4.4vw, 48px);
  line-height: 1.22;
  letter-spacing: -1px;
}
.hero-lead {
  margin-top: 16px;
  max-width: 46ch;
  color: var(--text-dim);
  font-size: 16px;
  line-height: 1.75;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }

.hero-copy .stat-row {
  justify-content: flex-start;
  gap: 40px;
  margin-top: 34px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.hero-copy .stat-item { text-align: left; }
.hero-copy .stat-item b { font-size: 24px; }

/* Hero 右侧的悬浮卡片（纯装饰，aria-hidden） */
.hero-art { position: relative; min-height: 260px; display: grid; place-items: center; }

.card-float {
  position: relative;
  width: 100%;
  max-width: 320px;
  padding: 20px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  transform: rotate(-3deg);
}
.card-float::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: var(--brand-grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: .55;
  pointer-events: none;
}
.cf-top { display: flex; align-items: center; justify-content: space-between; }
.cf-chip {
  padding: 3px 9px;
  border-radius: 6px;
  background: rgba(109, 94, 252, .12);
  color: var(--brand);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
}
.cf-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px var(--success-soft); }
.cf-code {
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .5px;
  word-break: break-all;
}
.cf-bar { margin-top: 14px; height: 5px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.cf-bar i { display: block; height: 100%; width: 72%; border-radius: inherit; background: var(--brand-grad); }
.cf-foot { display: flex; justify-content: space-between; margin-top: 12px; font-size: 12px; color: var(--text-mute); }
.cf-ok { color: var(--success); font-weight: 700; }

.card-float-2 {
  position: absolute;
  right: -8px;
  bottom: -6px;
  width: 210px;
  padding: 14px 16px;
  transform: rotate(3deg);
  box-shadow: var(--shadow);
}
.card-float-2::before { display: none; }
.cf-line { display: flex; justify-content: space-between; font-size: 12px; padding: 5px 0; color: var(--text-mute); }
.cf-line b { color: var(--text); font-weight: 700; }
.c-ok { color: var(--success) !important; }

/* ---------- 16.3 商品橱窗 ---------- */
.product-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.product-grid .product {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  padding: 22px;
  overflow: hidden;
}
.product-grid .product::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--brand-grad);
  opacity: 0;
  transition: opacity .2s;
}
.product-grid .product:hover::after { opacity: 1; }
.product-grid .product-desc { min-height: 44px; line-height: 1.65; }
.product-grid .product-foot { margin-top: auto; flex-wrap: wrap; gap: 10px; }
.product-grid .product-price { font-size: 22px; letter-spacing: -.5px; }
.product-grid .product-price small { font-size: 12px; color: var(--text-mute); font-weight: 600; }

/* ---------- 16.4 三步流程 ---------- */
.flow-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  counter-reset: flow;
}
.flow-item {
  position: relative;
  padding: 24px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: .2s;
}
.flow-item:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.flow-num {
  display: block;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--brand);
  opacity: .75;
}
.flow-item h3 { margin-top: 10px; font-size: 17px; }
.flow-item p { margin-top: 8px; color: var(--text-dim); font-size: 14px; line-height: 1.7; }

/* ---------- 16.5 FAQ ---------- */
.faq { display: grid; gap: 10px; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 0 18px;
  transition: border-color .2s;
}
.faq-item[open] { border-color: var(--border-strong); }
.faq-item summary {
  padding: 16px 0;
  cursor: pointer;
  font-weight: 700;
  font-size: 15px;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 20px;
  font-weight: 400;
  color: var(--text-mute);
  transition: transform .2s;
  flex: none;
}
.faq-item[open] summary::after { transform: rotate(45deg); color: var(--brand); }
.faq-body { padding: 0 0 18px; color: var(--text-dim); font-size: 14px; line-height: 1.8; max-width: 70ch; }

/* ---------- 16.6 页脚 ---------- */
.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  text-align: left;
  padding-top: 4px;
}
.footer-brand { display: flex; align-items: center; gap: 8px; font-weight: 800; color: var(--text); font-size: 15px; }
.brand-mark.sm { width: 22px; height: 22px; border-radius: 7px; font-size: 12px; }
.footer-note { margin-top: 6px; font-size: 12px; }
.footer-nav { display: flex; gap: 20px; flex-wrap: wrap; font-size: 13px; }

/* ---------- 16.7 提卡页面板 ---------- */
.panel { padding: 26px; }
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.panel-head h2 { font-size: 19px; }

.help-list {
  margin: 0;
  padding-left: 20px;
  color: var(--text-dim);
  font-size: 14px;
  line-height: 2;
}
.help-list strong { color: var(--text); }

/* ==========================================================================
   17. 代理专区
   ========================================================================== */

/* ---------- 17.1 密码门 ---------- */
.agent-gate {
  min-height: calc(100dvh - 260px);
  display: grid;
  place-items: center;
  padding: 40px 0 60px;
}
.gate-card {
  width: 100%;
  max-width: 420px;
  padding: 34px 30px 28px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.gate-lock {
  width: 56px; height: 56px;
  margin: 0 auto 16px;
  display: grid; place-items: center;
  border-radius: 18px;
  background: var(--brand-grad);
  font-size: 24px;
  box-shadow: 0 12px 28px rgba(109, 94, 252, .35);
}
.gate-title { font-size: 22px; letter-spacing: -.3px; }
.gate-sub { margin-top: 8px; color: var(--text-dim); font-size: 14px; line-height: 1.7; }
.gate-field { margin-top: 24px; margin-bottom: 0; text-align: left; }

.gate-input-wrap { position: relative; }
.gate-input-wrap .input { padding-right: 62px; }
.gate-eye {
  position: absolute;
  right: 6px; top: 50%;
  transform: translateY(-50%);
  padding: 6px 10px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.gate-eye:hover { background: var(--surface-3); }

.gate-msg {
  margin-top: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--danger);
  min-height: 0;
  opacity: 0;
  transition: opacity .18s;
}
.gate-msg.show { opacity: 1; }

.gate-card .btn-block { margin-top: 18px; }
.gate-tip { margin-top: 16px; font-size: 12px; color: var(--text-mute); line-height: 1.7; }

/* ---------- 17.2 内容区 ---------- */
.agent-shell { padding: 30px 0 60px; }

.agent-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding-bottom: 20px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--border);
}
.agent-title { margin-top: 14px; font-size: clamp(24px, 3.2vw, 34px); letter-spacing: -.5px; }
.agent-sub { margin-top: 8px; color: var(--text-dim); font-size: 15px; }
.agent-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.agent-blocks { display: grid; gap: 22px; }

/* 通用块 */
.blk { margin: 0; }
/* 正文排版：代理页的内容块（.blk-text）与商品详情（.md-body）共用同一套规则，
   避免两处写法不一致 —— 用户在不同页面看到同样的 Markdown 应该有同样的样子。 */
.blk-text, .md-body { color: var(--text); font-size: 15.5px; line-height: 1.85; }
.blk-text > *:first-child, .md-body > *:first-child { margin-top: 0; }
.blk-text > *:last-child, .md-body > *:last-child { margin-bottom: 0; }
.blk-text h2, .blk-text h3, .blk-text h4,
.md-body h2, .md-body h3, .md-body h4 { margin: 26px 0 10px; letter-spacing: -.2px; }
.blk-text h2, .md-body h2 { font-size: 21px; }
.blk-text h3, .md-body h3 { font-size: 18px; }
.blk-text h4, .md-body h4 { font-size: 16px; }
.blk-text p, .md-body p { margin: 12px 0; }
.blk-text ul, .blk-text ol, .md-body ul, .md-body ol { margin: 12px 0; padding-left: 22px; }
.blk-text li, .md-body li { margin: 6px 0; }
.blk-text blockquote, .md-body blockquote {
  margin: 16px 0;
  padding: 12px 16px;
  border-left: 3px solid var(--brand);
  border-radius: 0 10px 10px 0;
  background: var(--surface-2);
  color: var(--text-dim);
}
.blk-text code, .md-body code {
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--surface-3);
  font-family: var(--mono);
  font-size: .92em;
}
.blk-text hr, .md-body hr { margin: 22px 0; border: none; border-top: 1px solid var(--border); }
.blk-text a, .md-body a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.md-body strong { font-weight: 700; }
.md-body img { max-width: 100%; border-radius: 12px; }

.blk-note {
  display: flex;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid rgba(245, 158, 11, .35);
  border-radius: var(--radius);
  background: var(--warn-soft);
  color: var(--text);
  font-size: 14.5px;
  line-height: 1.75;
}
.blk-note-icon {
  flex: none;
  width: 22px; height: 22px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--warn);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}
.blk-note-body p:first-child { margin-top: 0; }
.blk-note-body p:last-child { margin-bottom: 0; }
.blk-note-body a { color: var(--brand); text-decoration: underline; }

.blk-divider { border: none; border-top: 1px solid var(--border); margin: 6px 0; }

.blk-image, .blk-video { display: grid; gap: 10px; }
.blk-image img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.blk-image figcaption, .blk-video figcaption {
  font-size: 13px;
  color: var(--text-mute);
  text-align: center;
}

.video-el {
  width: 100%;
  border-radius: var(--radius);
  background: #000;
  border: 1px solid var(--border);
}
.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border);
}
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* 可下拉播放的链接 */
.blk-link {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  transition: border-color .2s;
}
.blk-link[open] { border-color: var(--border-strong); }
.blk-link-sum {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 18px;
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  font-size: 15px;
  transition: background .18s;
}
.blk-link-sum::-webkit-details-marker { display: none; }
.blk-link-sum:hover { background: var(--surface-2); }
.blk-link-icon {
  flex: none;
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 8px;
  background: var(--brand-grad);
  color: #fff;
  font-size: 10px;
}
.blk-link-title { flex: 1; min-width: 0; }
.blk-link-chev {
  flex: none;
  font-size: 12px;
  font-weight: 600;
  color: var(--brand);
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(109, 94, 252, .1);
}
.blk-link[open] .blk-link-chev { color: var(--text-mute); background: var(--surface-3); }
.blk-link-body { padding: 0 18px 18px; }
.blk-link-desc { margin: 0 0 14px; color: var(--text-dim); font-size: 14px; line-height: 1.7; }

.blk-link-simple {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: .18s;
}
.blk-link-simple:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.blk-link-simple .blk-link-title { font-weight: 700; font-size: 15px; }
.blk-link-simple .blk-link-desc { margin: 0; font-size: 13px; color: var(--text-mute); }
.blk-link-arrow { flex: none; color: var(--brand); font-size: 16px; }

/* ---------- 17.3 编辑模式 ---------- */
.blk-edit {
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.ed-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.ed-type {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .5px;
  color: var(--brand);
  text-transform: uppercase;
}
.ed-ops { display: flex; gap: 6px; }
.ed-op {
  min-width: 30px;
  padding: 4px 9px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: .15s;
}
.ed-op:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.ed-op:disabled { opacity: .35; cursor: not-allowed; }
.ed-op-del:hover { border-color: var(--danger); color: var(--danger); background: var(--danger-soft); }

.ed-body { padding: 16px; display: grid; gap: 14px; }
.ed-field { display: block; }
.ed-label { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 700; color: var(--text-dim); }
.ed-textarea { min-height: 150px; font-family: var(--mono); font-size: 13px; line-height: 1.7; }
.ed-hint { display: block; margin-top: 6px; font-size: 11.5px; color: var(--text-mute); }
.ed-with-btn { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ed-with-btn .input { flex: 1; min-width: 180px; }

.editor-bar {
  position: sticky;
  bottom: 16px;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 26px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-lg);
}
.editor-add { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.editor-add-label { font-size: 12px; font-weight: 700; color: var(--text-mute); }
.chip-btn {
  padding: 7px 13px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: .15s;
}
.chip-btn:hover { border-color: var(--brand); color: var(--brand); background: rgba(109, 94, 252, .06); }
.editor-ops { display: flex; align-items: center; gap: 8px; }
.editor-state { font-size: 12px; font-weight: 600; color: var(--text-mute); }
.editor-state.is-dirty { color: var(--warn); }

/* ---------- 17.4 媒体库 ---------- */
.media-list {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  max-height: 60vh;
  overflow: auto;
}
.media-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface-2);
  display: grid;
}
.media-thumb { aspect-ratio: 4 / 3; display: grid; place-items: center; background: var(--surface-3); overflow: hidden; }
.media-thumb img { width: 100%; height: 100%; object-fit: cover; }
.media-icon { font-size: 26px; color: var(--text-mute); }
.media-meta { display: flex; justify-content: space-between; gap: 6px; padding: 7px 9px; font-size: 11px; color: var(--text-mute); }
.media-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-acts { display: flex; gap: 6px; padding: 0 9px 9px; }
.media-acts .btn { flex: 1; padding: 5px 8px; font-size: 12px; }

.toast-info { border-left-color: var(--brand-2); }

/* ---------- 17.5 响应式 ---------- */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-art { display: none; }
  .hero-copy .stat-row { gap: 28px; }
  .footer-inner { flex-direction: column; }
}

@media (max-width: 620px) {
  .container { padding: 0 16px; }
  .hero-v2 { padding: 28px 0 16px; }
  .hero-copy h1 { letter-spacing: -.4px; }
  .hero-actions .btn { flex: 1; }
  .panel { padding: 20px; }
  .gate-card { padding: 26px 20px 22px; }
  .agent-head-actions { width: 100%; }
  .agent-head-actions .btn { flex: 1; }
  .editor-bar { bottom: 8px; padding: 10px 12px; }
  .editor-add-label { display: none; }
  .media-list { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .product-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .card-float, .card-float-2 { transform: none; }
}

.media-size { color: var(--text-mute); flex: none; }

/* ====================================================================== *
 * 18. 商品详情页 / 首页商品封面
 * ====================================================================== */
.page-main { padding: 26px 20px 60px; }

.crumb {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-mute);
  margin: 4px 0 18px;
}
.crumb a { color: var(--text-dim); text-decoration: none; }
.crumb a:hover { color: var(--brand); }
.crumb-sep { opacity: .5; }

.pd-loading, .pd-missing {
  text-align: center;
  color: var(--text-mute);
  padding: 48px 24px;
  font-size: 14px;
}
.pd-missing h2 { font-size: 20px; color: var(--text); margin-bottom: 8px; }

.pd-hero {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 34px;
  align-items: start;
  padding: 30px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.pd-cover {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--border);
  aspect-ratio: 4 / 3;
}
.pd-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

.pd-name { font-size: clamp(22px, 2.4vw, 30px); letter-spacing: -.4px; margin-bottom: 10px; }
.pd-tagline { color: var(--text-dim); font-size: 15px; line-height: 1.7; margin-bottom: 18px; }

.pd-meta {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 14px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.pd-price { font-size: 30px; font-weight: 800; color: var(--brand); letter-spacing: -.5px; }
.pd-stock, .pd-valid {
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-dim);
}
.pd-stock.is-ok { color: var(--ok, #12a150); background: rgba(18, 161, 80, .1); }
.pd-stock.is-no { color: var(--danger, #e5484d); background: rgba(229, 72, 77, .1); }

.pd-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }

.pd-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.pd-points li {
  position: relative;
  padding-left: 22px;
  font-size: 13.5px;
  color: var(--text-dim);
}
.pd-points li::before {
  content: "✓";
  position: absolute; left: 0; top: 0;
  color: var(--brand);
  font-weight: 700;
}

.pd-detail { margin-top: 26px; }
.panel-title { font-size: 18px; margin-bottom: 16px; letter-spacing: -.2px; }
.pd-empty { font-size: 14px; color: var(--text-mute); }
.pd-back { margin-top: 28px; font-size: 14px; }
.pd-back a { color: var(--text-dim); text-decoration: none; }
.pd-back a:hover { color: var(--brand); }

/* 首页商品卡封面 */
.product-cover {
  display: block;
  margin: -4px 0 14px;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--surface-2);
}
.product-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-name { text-decoration: none; color: inherit; }
.product-name:hover { color: var(--brand); }

@media (max-width: 860px) {
  .pd-hero { grid-template-columns: 1fr; gap: 22px; padding: 22px; }
  .pd-cover { aspect-ratio: 16 / 9; }
}

/* ====================================================================== *
 * 19. 管理工作台（admin.html）
 * ====================================================================== */
.wb-top { position: sticky; top: 0; z-index: 40; }
.wb-top-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  max-width: 1400px; margin: 0 auto; padding: 12px 22px;
}
.wb-top-right { display: flex; align-items: center; gap: 12px; }

.wb {
  display: grid;
  grid-template-columns: 208px 1fr;
  gap: 26px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 22px 60px;
  align-items: start;
}

.wb-side {
  position: sticky;
  top: 74px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.wb-side .tab {
  text-align: left;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
}
.wb-side .tab.active {
  background: var(--brand-soft, rgba(109, 94, 252, .12));
  color: var(--brand);
  box-shadow: none;
}
.wb-side-foot { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); display: grid; gap: 6px; }
.wb-side-link { font-size: 13px; color: var(--text-dim); text-decoration: none; padding: 4px 14px; }
.wb-side-link:hover { color: var(--brand); }

.wb-main { min-width: 0; }
.wb-page-head { margin-bottom: 20px; }
.wb-page-head h1 { font-size: 24px; letter-spacing: -.4px; margin-bottom: 6px; }
.wb-page-head p { font-size: 13.5px; }

/* 告警条 */
.alert-list { display: grid; gap: 10px; margin-bottom: 20px; }
.alert {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.6;
  border: 1px solid transparent;
}
.alert-danger { background: rgba(229, 72, 77, .09); border-color: rgba(229, 72, 77, .3); color: #b3261e; }
.alert-warn { background: rgba(245, 165, 36, .12); border-color: rgba(245, 165, 36, .35); color: #8a5a00; }
.alert-info { background: var(--surface-2); border-color: var(--border); color: var(--text-dim); }

/* 7 天趋势 */
.trend {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  align-items: end;
  height: 150px;
  padding: 16px 18px 8px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  margin-bottom: 6px;
}
.trend-col { display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.trend-bar { flex: 1; width: 100%; display: flex; align-items: flex-end; }
.trend-bar i {
  display: block; width: 100%;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, var(--brand), rgba(109, 94, 252, .35));
  min-height: 3px;
}
.trend-col span { font-size: 11px; color: var(--text-mute); }

/* KPI 里的涨跌 */
.kpi i { font-style: normal; font-size: 12px; color: var(--text-mute); }
.kpi i.up { color: #12a150; }
.kpi i.down { color: #e5484d; }

/* 商品表格里的缩略图与名称 */
.pt-name { display: flex; align-items: center; gap: 10px; }
.pt-cover {
  width: 52px; height: 38px;
  border-radius: 7px;
  object-fit: cover;
  flex: none;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.pt-cover-empty {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; color: var(--text-mute);
}
.pt-name em { display: block; font-style: normal; font-size: 12px; color: var(--text-mute); margin-top: 2px; }
tr.row-off { opacity: .55; }
td.nowrap, th.nowrap { white-space: nowrap; }

/* 商品弹窗 */
.modal-wide { max-width: 940px; }
.pm-cover-preview {
  margin: -4px 0 16px;
  border-radius: 12px;
  border: 1px dashed var(--border);
  background: var(--surface-2);
  min-height: 90px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  font-size: 13px;
}
.pm-cover-preview img { width: 100%; max-height: 200px; object-fit: cover; }

.md-toolbar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.md-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: stretch;
}
.md-split .textarea { min-height: 280px; }
.md-preview {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 14px 16px;
  max-height: 280px;
  overflow: auto;
}
.md-preview-head {
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 10px;
}

@media (max-width: 940px) {
  .wb { grid-template-columns: 1fr; gap: 16px; }
  .wb-side {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 8px;
  }
  .wb-side-foot { display: none; }
  .md-split { grid-template-columns: 1fr; }
  .md-split .textarea { min-height: 200px; }
  .md-preview { max-height: none; }
}

/* 布局兜底：这两个是纯容器，主要是防止 grid 子项溢出 */
.pd-info { min-width: 0; }
.agent-head-main { min-width: 0; }
/* 没有封面图时收成单列，避免内容被挤在左侧 380px 里 */
.pd-hero.no-cover { grid-template-columns: 1fr; }

/* 弹窗统一：标题栏与按钮固定，中间内容自己滚动。
   商品编辑弹窗内容很长，如果整块滚动，保存按钮会掉到屏幕外。 */
.modal { display: flex; flex-direction: column; overflow: hidden; }
.modal-head, .modal-foot { flex: none; }
.modal-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
