/* ==========================================================================
   商家端界面 · 极简版（2026-10-24）
   设计语言源自用户提供的参考图：浅灰底 + 白卡片 + 大圆角 + 灰底输入框
   + 胶囊标签 + 底部黑色大按钮。原则：一屏一件事，一眼能看懂。
   ========================================================================== */

:root {
  --bg: #f5f6f8;
  --panel: #ffffff;
  --fill: #f2f3f5;
  --fill-2: #ebedf0;
  --line: #eceef1;
  --text: #141414;
  --sub: #6e7278;
  --hint: #a9adb4;
  --accent: #6c5ce7;
  --accent-soft: #efedff;
  --accent-line: #c9c4f5;
  --ok: #12b76a;
  --warn: #f79009;
  --danger: #e5484d;
  --r-card: 20px;
  --r-input: 14px;
  --r-pill: 999px;
  --shadow-card: 0 1px 2px rgba(17, 24, 39, .03);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--text);
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "PingFang SC", "Segoe UI", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; cursor: pointer; }
a { color: var(--accent); text-decoration: none; }
input, textarea, select { font-family: inherit; }
[hidden] { display: none !important; }

.site-footer {
  margin-top: auto;
  padding: 20px 16px calc(20px + var(--safe-b));
  text-align: center;
  font-size: 12px;
  color: var(--hint);
}
.site-footer a { color: inherit; }

/* ---------- 公共排版 ---------- */
.page-title { margin: 0 0 4px; font-size: 20px; font-weight: 700; letter-spacing: -.2px; }
.page-sub { margin: 0 0 18px; color: var(--sub); font-size: 13px; }
.hint { margin: 8px 0 0; color: var(--hint); font-size: 12px; line-height: 1.6; }
.empty { padding: 56px 16px; color: var(--hint); font-size: 14px; text-align: center; }
.req { margin-left: 2px; color: #f04438; font-style: normal; }

/* ==========================================================================
   登录 / 注册
   ========================================================================== */
.auth-screen {
  min-height: 100vh;
  padding: 32px 20px calc(32px + var(--safe-b));
  display: grid;
  place-items: center;
  background: var(--bg);
}
.auth-box { width: 100%; max-width: 400px; }
.auth-brand { margin-bottom: 26px; text-align: center; }
.auth-brand .logo-mark {
  width: 54px; height: 54px; margin: 0 auto 14px;
  display: grid; place-items: center;
  border-radius: 18px; background: var(--text); color: #fff; font-size: 26px;
}
.auth-brand h2 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -.3px; }
.auth-brand p { margin: 6px 0 0; color: var(--hint); font-size: 13px; }

.auth-tabs {
  display: flex; gap: 4px; margin-bottom: 20px; padding: 4px;
  border-radius: var(--r-pill); background: var(--fill-2);
}
.auth-tabs button {
  flex: 1; padding: 9px 4px; border: 0; border-radius: var(--r-pill);
  background: transparent; color: var(--sub); font-size: 14px; font-weight: 500;
  transition: .16s;
}
.auth-tabs button.on { background: #fff; color: var(--text); font-weight: 600; box-shadow: 0 1px 3px rgba(17, 24, 39, .1); }
.auth-foot { margin-top: 16px; display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.auth-box .field { margin-bottom: 14px; }
#authForm > .btn { margin-top: 6px; }
.auth-box .btn.ghost { margin-top: 10px; }

.shop-login-notice {
  margin: 14px 0 0; padding: 12px 14px; border-radius: 12px;
  background: var(--accent-soft); color: #4a3fc0; font-size: 13px; line-height: 1.6;
}
.phone-auth-note { margin: 12px 0 0; color: var(--hint); font-size: 12px; line-height: 1.65; }
.phone-code-row { display: flex; align-items: flex-end; gap: 10px; margin-bottom: 14px; }
.phone-code-row .field { flex: 1; min-width: 0; margin-bottom: 0; }
.phone-code-row > .btn { flex: 0 0 auto; width: auto; height: 50px; padding: 0 16px; font-size: 14px; }
#admissionStatus h3 { margin: 0 0 10px; font-size: 18px; }

/* ==========================================================================
   应用外壳
   ========================================================================== */
#app { flex: 1; width: 100%; background: var(--bg); }

.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  background: rgba(245, 246, 248, .92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, .04);
}
.topbar .logo { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1 1 auto; font-size: 15px; font-weight: 600; }
.topbar .logo-mark {
  flex: 0 0 auto; width: 26px; height: 26px; display: grid; place-items: center;
  border-radius: 9px; background: var(--text); color: #fff; font-size: 13px;
}
.topbar .logo > div { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .logo small { display: none; }
.env { margin-left: auto; display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
/* 顶栏胶囊压到 11px，保证 375px 宽也能一行放下「素材 / 扫码 / 退出」 */
.topbar .chip { padding: 5px 10px; background: #fff; font-size: 11px; }
.topbar .env .chip:last-child { color: var(--sub); }

.test-banner { display: none !important; }

/* 一级导航：胶囊分段 */
.nav {
  position: sticky; top: 51px; z-index: 25;
  display: flex; gap: 6px;
  padding: 10px 16px 12px;
  overflow-x: auto;
  background: var(--bg);
  scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }
.nav-btn {
  flex: 0 0 auto;
  padding: 9px 12px;
  border: 0; border-radius: var(--r-pill);
  background: var(--fill-2); color: var(--sub);
  font-size: 13.5px; font-weight: 500; white-space: nowrap;
  transition: .16s;
}
.nav-btn.on { background: #fff; color: var(--text); font-weight: 600; box-shadow: 0 1px 3px rgba(17, 24, 39, .1); }

.wrap { width: 100%; max-width: 720px; margin: 0 auto; padding: 0 16px; }
.tabpane { display: none; }
.tabpane.on { display: block; padding-bottom: 40px; }

/* ==========================================================================
   卡片 / 分区
   ========================================================================== */
.card {
  padding: 18px;
  margin-bottom: 12px;
  border-radius: var(--r-card);
  background: var(--panel);
  box-shadow: var(--shadow-card);
}
.card-title {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 14px; font-size: 16px; font-weight: 600;
}
.step {
  width: 22px; height: 22px; display: grid; place-items: center;
  border-radius: 8px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 700;
}
.section-desc { margin: -6px 0 14px; color: var(--sub); font-size: 13px; line-height: 1.65; }
.note {
  margin: 0 0 12px; padding: 12px 14px;
  border-radius: 12px; background: #fff8e8; color: #8a5a00;
  font-size: 12px; line-height: 1.65;
}
.note:empty { display: none; }
.privacy-note { background: var(--fill); color: var(--sub); }
.state-pill {
  padding: 3px 9px; border-radius: var(--r-pill);
  background: var(--fill); color: var(--sub); font-size: 11px; font-weight: 500;
}

/* ==========================================================================
   表单
   ========================================================================== */
.field { margin-bottom: 20px; }
.field:last-child { margin-bottom: 0; }
.field > label,
.field > .label-row label {
  display: block; margin-bottom: 9px;
  font-size: 15px; font-weight: 600; color: var(--text);
}
.label-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.label-row label { margin-bottom: 0 !important; }
.label-hint { color: var(--hint); font-size: 12px; font-weight: 400; }

.field input, .field textarea, .field select {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid transparent; border-radius: var(--r-input);
  background: var(--fill); color: var(--text);
  font-size: 15px; line-height: 1.5;
  outline: none;
  transition: .16s;
  -webkit-appearance: none; appearance: none;
}
.field input::placeholder, .field textarea::placeholder { color: var(--hint); }
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--accent); background: #fff;
  box-shadow: 0 0 0 4px rgba(108, 92, 231, .1);
}
.field textarea { min-height: 96px; resize: vertical; }
.field select {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23a9adb4' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center;
  padding-right: 40px;
}
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; }
@media (max-width: 560px) {
  .row2, .row3 { grid-template-columns: 1fr; }
}

/* ==========================================================================
   按钮
   ========================================================================== */
.btn {
  display: block; width: 100%; height: 50px;
  border: 0; border-radius: var(--r-pill);
  background: var(--text); color: #fff;
  font-size: 16px; font-weight: 600; letter-spacing: .3px;
  transition: .16s;
}
.btn:active { transform: scale(.985); opacity: .9; }
.btn:disabled { background: #d6d8dd; color: #fff; cursor: not-allowed; transform: none; }
.btn.ghost { background: var(--fill-2); color: var(--text); }
.btn.ghost:disabled { background: var(--fill); color: var(--hint); }
.btn.sm { display: inline-block; width: auto; height: 38px; padding: 0 16px; font-size: 14px; }
.btn.danger-outline { background: #fff; color: var(--danger); box-shadow: inset 0 0 0 1.5px #f7d4d5; }
.btnrow { display: flex; gap: 10px; margin-top: 14px; }
.btnrow > .btn { flex: 1; }

/* 底部操作条：随内容吸底，内容短时不会遮住页脚 */
.actionbar {
  position: sticky; bottom: 0; z-index: 40;
  margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw);
  padding: 12px 16px calc(12px + var(--safe-b));
  background: linear-gradient(to top, #fff 78%, rgba(255, 255, 255, .92));
  box-shadow: 0 -6px 22px rgba(17, 24, 39, .06);
}
.actionbar .btn { max-width: 688px; margin: 0 auto; }

/* 订单 / 明细里的次要说明 */
.sub { display: block; margin-top: 2px; color: var(--hint); font-size: 11px; }

/* ==========================================================================
   胶囊 / 标签
   ========================================================================== */
.chip {
  display: inline-flex; align-items: center;
  padding: 6px 12px; border-radius: var(--r-pill);
  background: var(--fill); color: var(--sub);
  font-size: 12px; font-weight: 500; white-space: nowrap;
}
.chip.info { background: #fff; color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); }
.chip.ok { background: #e9f9f1; color: #0a8f52; }
.chip.warn { background: #fff4e5; color: #b25c00; }
button.chip { border: 0; transition: .16s; }
button.chip.info { font-weight: 600; }

/* 类型筛选条 */
.segbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.segbar .chip { padding: 9px 18px; font-size: 14px; }

/* 标签编辑器（主推菜 / 核心卖点） */
.tagbox {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 14px;
  border-radius: var(--r-input); background: var(--fill);
  min-height: 56px;
}
.tagbox .tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px 8px 14px; border-radius: var(--r-pill);
  background: #fff; color: var(--text); font-size: 14px; font-weight: 500;
  box-shadow: 0 1px 2px rgba(17, 24, 39, .06);
}
.tagbox .tag button {
  width: 18px; height: 18px; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: var(--fill-2); color: var(--sub);
  font-size: 12px; line-height: 1; padding: 0;
}
.tag-add {
  padding: 8px 14px; border: 1.5px dashed var(--accent-line); border-radius: var(--r-pill);
  background: transparent; color: var(--accent); font-size: 14px; font-weight: 500;
}
.tag-input {
  width: 132px; padding: 8px 14px;
  border: 1.5px solid var(--accent); border-radius: var(--r-pill);
  background: #fff; color: var(--text); font-size: 14px; outline: none;
}
.tagbox .empty-tag { color: var(--hint); font-size: 13px; align-self: center; }

/* 推荐添加 */
.suggest { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.suggest-tip { width: 100%; color: var(--hint); font-size: 12px; }
.suggest button {
  padding: 7px 13px; border: 1.5px dashed var(--accent-line); border-radius: var(--r-pill);
  background: transparent; color: var(--accent); font-size: 13px;
}

/* 折叠区 */
.adv { margin-top: 12px; border-radius: var(--r-card); background: var(--panel); box-shadow: var(--shadow-card); overflow: hidden; }
.adv > summary {
  padding: 16px 18px; color: var(--sub); font-size: 14px; font-weight: 500;
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between;
}
.adv > summary::-webkit-details-marker { display: none; }
.adv > summary::after { content: "›"; font-size: 18px; color: var(--hint); transform: rotate(90deg); transition: .16s; }
.adv[open] > summary::after { transform: rotate(-90deg); }
.adv .adv-body { padding: 0 18px 18px; }
/* 折叠区里的卡片用细描边而不是灰底，避免和白底输入框糊在一起 */
.adv .adv-body .card { margin-bottom: 10px; padding: 16px; border-radius: 16px; box-shadow: 0 0 0 1px var(--line); }
.adv.on-white { background: transparent; box-shadow: none; border-radius: 0; border-top: 1px solid var(--line); margin-top: 4px; }
.adv.on-white > summary { padding: 14px 0; }

/* ==========================================================================
   素材库
   ========================================================================== */
.uploadbox {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 34px 16px; margin-bottom: 12px;
  border: 1.5px dashed #d3d6dc; border-radius: 18px;
  background: #fff; color: var(--sub); text-align: center;
  transition: .16s; cursor: pointer;
}
.uploadbox:hover, .uploadbox.over { border-color: var(--accent); background: var(--accent-soft); }
.uploadbox .plus { font-size: 26px; font-weight: 300; line-height: 1; color: var(--hint); }
.uploadbox b { color: var(--text); font-size: 15px; font-weight: 600; }
.uploadbox span { color: var(--hint); font-size: 12px; max-width: 100%; line-height: 1.55; }
/* 格式清单比主文案更次要，单独压一号，避免 390px 下把整页撑宽 */
.uploadbox .upload-hint { font-size: 11.5px; }
.uploadbox.is-hidden { display: none; }

.thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.thumbs:empty { display: none; }
/* 选完即传：没有待传文件时不显示「上传到素材库」按钮（上传失败时它会重新出现，用于重试） */
.upload-actions { margin: 0 0 12px; }
.thumbs:empty + .upload-actions { display: none; }
.thumb { position: relative; width: 74px; height: 74px; border-radius: 12px; overflow: hidden; background: var(--fill); }
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb button {
  position: absolute; top: 4px; right: 4px;
  width: 20px; height: 20px; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff;
  font-size: 12px; line-height: 1; padding: 0;
}

.asset-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
@media (min-width: 560px) { .asset-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.asset-card {
  position: relative; overflow: hidden;
  border-radius: 14px; background: #fff; box-shadow: var(--shadow-card);
}
.asset-card.off { opacity: .45; }
.asset-card img, .asset-card video { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; background: var(--fill); }
/* 视频角标：黑底白字贴在封面左上，一眼区分「这是视频不是图片」 */
.media-badge {
  position: absolute; top: 7px; left: 7px; z-index: 1;
  padding: 2px 7px; border-radius: 999px;
  background: rgba(0, 0, 0, .58); color: #fff;
  font-size: 10px; line-height: 1.5; letter-spacing: .3px;
}
.ac-body { padding: 8px 9px 9px; }
.ac-meta { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.ac-meta .chip, .ac-meta .state-pill { flex: 0 0 auto; padding: 2px 6px; font-size: 9.5px; white-space: nowrap; }
.ac-cap { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 6px 0 0; color: var(--hint); font-size: 11px; line-height: 1.45; }
.ac-name { overflow: hidden; color: var(--hint); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.ac-ops { display: flex; gap: 6px; margin-top: 8px; }
.ac-ops button {
  flex: 1; padding: 5px 0; border: 0; border-radius: 9px;
  background: var(--fill); color: var(--sub); font-size: 11.5px;
}
.ac-ops button.danger { color: var(--danger); background: #fdeeee; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 0; }
.tags .tag { padding: 2px 7px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); font-size: 10px; }
.tags .tag button { display: none; }
.asset-summary { margin: 0 0 12px; color: var(--hint); font-size: 12px; }

/* ==========================================================================
   二维码
   ========================================================================== */
.qrpanel {
  display: flex; flex-direction: column; align-items: center;
  padding: 26px 18px 22px; margin-bottom: 12px;
  border-radius: var(--r-card); background: #fff; box-shadow: var(--shadow-card); text-align: center;
}
.qrframe {
  width: 208px; height: 208px; padding: 10px; margin-bottom: 16px;
  border-radius: 18px; background: #fff; box-shadow: 0 0 0 1px var(--line);
}
.qrframe img { width: 100%; height: 100%; display: block; border-radius: 10px; }
.qrframe img:not([src]) { display: none; }
.qrpanel b { font-size: 17px; font-weight: 600; }
.qrstate {
  display: inline-flex; margin-top: 8px; padding: 5px 12px;
  border-radius: var(--r-pill); background: #e9f9f1; color: #0a8f52;
  font-size: 12px; font-weight: 500;
}
.qrstate.paused { background: #fff4e5; color: #b25c00; }
.cc-url {
  width: 100%; margin-top: 14px; padding: 10px 12px;
  border-radius: 12px; background: var(--fill);
  color: var(--hint); font-size: 11px; word-break: break-all;
}
.cc-url:empty { display: none; }

/* ==========================================================================
   数据统计
   ========================================================================== */
.stat-cards {
  display: grid; grid-template-columns: 1fr 1fr;
  margin-bottom: 12px; padding: 20px 8px;
  border-radius: var(--r-card); background: #fff; box-shadow: var(--shadow-card);
}
.stat-card { display: flex; flex-direction: column-reverse; gap: 6px; padding: 0 16px; }
.stat-card + .stat-card { border-left: 1px solid var(--line); }
.sc-num { font-size: 30px; font-weight: 700; line-height: 1.1; letter-spacing: -.5px; }
.sc-label { color: var(--sub); font-size: 13px; }

/* ==========================================================================
   魔力值
   ========================================================================== */
.magic-hero {
  padding: 24px; margin-bottom: 12px;
  border-radius: var(--r-card); background: var(--text); color: #fff;
}
.magic-kicker { color: rgba(255, 255, 255, .6); font-size: 12px; font-weight: 500; }
.magic-balance { display: flex; align-items: baseline; gap: 8px; margin: 10px 0 6px; }
.magic-balance strong { font-size: 44px; font-weight: 700; line-height: 1; letter-spacing: -1px; }
.magic-balance span { color: rgba(255, 255, 255, .68); font-size: 14px; }
.magic-hero p { margin: 0; color: rgba(255, 255, 255, .6); font-size: 12px; }
.recharge-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.recharge-pack {
  position: relative; padding: 28px 10px 14px; border: 1.5px solid transparent; border-radius: var(--r-input);
  background: var(--fill); color: var(--text); text-align: center; transition: .16s;
  /* button 默认会把内容垂直居中，档位文字行数不同就会错位，这里强制顶对齐 */
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
}
.recharge-pack:active { transform: scale(.98); }
.recharge-pack strong { display: block; font-size: 21px; font-weight: 700; line-height: 1.2; }
.recharge-pack span { display: block; margin-top: 5px; color: var(--sub); font-size: 10.5px; line-height: 1.45; }
.recharge-pack em {
  position: absolute; top: 7px; left: 50%; transform: translateX(-50%);
  padding: 2px 7px; border-radius: var(--r-pill);
  background: #fdeeee; color: var(--danger);
  font-style: normal; font-size: 9.5px; font-weight: 600; white-space: nowrap;
}
.custom-recharge { display: grid; gap: 12px; }
@media (min-width: 560px) { .custom-recharge { grid-template-columns: 1fr 180px; align-items: end; } }

/* ==========================================================================
   AI 授权
   ========================================================================== */
.ai-consent-card { padding: 16px; border-radius: var(--r-input); background: var(--fill); }
.ai-consent-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ai-consent-head h4 { margin: 8px 0 0; font-size: 15px; }
.ai-consent-card p { margin: 10px 0; color: var(--sub); font-size: 12px; line-height: 1.7; }
.ai-consent-meta { color: var(--hint); font-size: 11px; }
.ai-consent-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.ai-consent-actions .btn { width: auto; flex: 1; }
.consent-doc { line-height: 1.75; }
.consent-doc .consent-summary { padding: 12px; border-radius: 12px; background: #fff8e8; color: #8a5a00; font-size: 13px; }
.consent-doc ul { padding-left: 20px; color: var(--sub); font-size: 13px; }
.consent-check { display: flex; gap: 9px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); font-size: 13px; }
.consent-check input { margin-top: 4px; flex: 0 0 auto; width: auto; }
.consent-version { margin-top: 10px; color: var(--hint); font-size: 11px; }
#paymentNotice { margin-top: 14px; }
#paymentNotice:empty { display: none; }

/* ==========================================================================
   店铺登录 / 账号
   ========================================================================== */
.shop-session-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.shop-session-card .card-title { margin-bottom: 8px; }
.shop-session-summary { margin: 0 0 6px; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.shop-session-help { margin: 0; color: var(--hint); font-size: 12px; line-height: 1.6; }
.shop-session-actions { display: flex; flex-shrink: 0; gap: 10px; }
.shop-session-actions .btn { width: auto; height: 42px; padding: 0 16px; font-size: 14px; }
@media (max-width: 640px) {
  .shop-session-card { align-items: stretch; flex-direction: column; gap: 16px; }
  .shop-session-actions .btn { flex: 1; }
}

/* ==========================================================================
   弹层 / 加载 / 提示
   ========================================================================== */
.modal { position: fixed; inset: 0; z-index: 90; display: none; place-items: center; padding: 20px; background: rgba(17, 20, 24, .45); }
.modal.on { display: grid; }
.modal-box {
  position: relative; width: 100%; max-width: 520px; max-height: 82vh; overflow: auto;
  padding: 20px; border-radius: var(--r-card); background: #fff;
}
.modal-close { position: absolute; top: 12px; right: 14px; border: 0; background: none; color: var(--hint); font-size: 24px; line-height: 1; }
.modal-box h3 { margin: 0 0 12px; font-size: 17px; }

#loading { position: fixed; inset: 0; z-index: 100; display: none; place-items: center; background: rgba(255, 255, 255, .86); backdrop-filter: blur(2px); }
#loading.on { display: grid; }
.spinner { width: 32px; height: 32px; margin: 0 auto 12px; border: 3px solid var(--fill-2); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
#loading .txt { color: var(--sub); font-size: 13px; text-align: center; }

.toast {
  position: fixed; left: 50%; bottom: 96px; z-index: 200;
  max-width: 82vw; padding: 11px 20px;
  border-radius: var(--r-pill); background: rgba(20, 20, 20, .92); color: #fff;
  font-size: 14px; text-align: center;
  opacity: 0; transform: translateX(-50%) translateY(12px); pointer-events: none; transition: .22s;
}
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ==========================================================================
   旧结构兜底（概览 / 推广任务 / 门店 / 商户中心 / 成员 等未暴露的页签）
   这些页签没有导航入口，保留样式只为不出现无样式裸奔。
   ========================================================================== */
.overview-kicker { color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: .06em; }
.overview-hero { padding: 24px; margin-bottom: 12px; border-radius: var(--r-card); background: var(--text); color: #fff; }
.overview-hero h2 { margin: 6px 0 8px; font-size: 21px; }
.overview-hero p { margin: 0 0 16px; color: rgba(255, 255, 255, .65); font-size: 13px; }
.overview-hero .overview-kicker { color: rgba(255, 255, 255, .6); }
.overview-grid { display: grid; gap: 12px; }
.overview-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.overview-title-row h3 { margin: 2px 0 0; font-size: 16px; }
.overview-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.overview-metric { padding: 14px; border-radius: var(--r-input); background: var(--fill); }
.overview-metric b { display: block; font-size: 22px; }
.overview-metric span { display: block; margin-top: 4px; color: var(--sub); font-size: 11px; }
.overview-metric.accent { background: var(--accent-soft); }
.overview-metric.accent b { color: var(--accent); }
.overview-loading { grid-column: 1 / -1; padding: 24px; color: var(--hint); font-size: 12px; text-align: center; }
.funnel-line { display: flex; align-items: center; gap: 5px; margin-top: 14px; }
.funnel-step { flex: 1; min-width: 0; }
.funnel-step .funnel-bar { height: 6px; overflow: hidden; border-radius: var(--r-pill); background: var(--fill-2); }
.funnel-step .funnel-bar i { display: block; height: 100%; min-width: 4px; border-radius: inherit; background: var(--accent); }
.funnel-step small { display: block; overflow: hidden; margin-top: 5px; color: var(--hint); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.funnel-arrow { color: #d3d6dc; font-size: 12px; }
.overview-footnote { margin: 10px 0 0; color: var(--hint); font-size: 11px; }
.readiness-score { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 700; }
.readiness-list { display: grid; gap: 8px; }
.readiness-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--fill); }
.readiness-item > span { width: 22px; height: 22px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: var(--fill-2); color: var(--hint); font-size: 11px; font-weight: 700; }
.readiness-item.done > span { background: #e9f9f1; color: var(--ok); }
.readiness-item div { min-width: 0; flex: 1; }
.readiness-item b { display: block; font-size: 13px; }
.readiness-item small { display: block; overflow: hidden; color: var(--hint); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.readiness-item button { border: 0; background: transparent; color: var(--accent); font-size: 12px; }
.quick-grid { display: grid; gap: 10px; }
@media (min-width: 560px) { .quick-grid { grid-template-columns: 1fr 1fr; } }
.quick-card { display: grid; grid-template-columns: 30px 1fr; column-gap: 10px; padding: 14px; border: 0; border-radius: var(--r-input); background: var(--fill); color: var(--text); text-align: left; }
.quick-card > span { grid-row: 1 / 3; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: #fff; color: var(--accent); font-size: 10px; font-weight: 700; }
.quick-card b { font-size: 13px; }
.quick-card small { margin-top: 2px; color: var(--hint); font-size: 11px; }
.overview-campaign { display: flex; align-items: center; gap: 11px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.overview-campaign:last-child { border-bottom: 0; }
.overview-campaign .campaign-dot { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: var(--ok); }
.overview-campaign.paused .campaign-dot { background: var(--warn); }
.overview-campaign > div { min-width: 0; flex: 1; }
.overview-campaign b { display: block; overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.overview-campaign small { color: var(--hint); font-size: 11px; }
.overview-campaign button { padding: 5px 10px; border: 0; border-radius: var(--r-pill); background: var(--fill); color: var(--sub); font-size: 11px; }

.cat-pick { display: flex; gap: 8px; flex-wrap: wrap; }
.cat-pick .chip { cursor: pointer; }
.platform-pick { display: flex; gap: 8px; }
.plat-btn { flex: 1; padding: 12px; border: 1.5px solid transparent; border-radius: var(--r-input); background: var(--fill); color: var(--sub); font-size: 14px; }
.plat-btn.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.drop { display: none; }

.camp-card { display: flex; gap: 14px; padding: 14px; margin-bottom: 12px; border-radius: var(--r-input); background: var(--fill); }
.cc-qr { width: 104px; height: 104px; flex: 0 0 auto; padding: 6px; border-radius: 12px; background: #fff; }
.cc-qr img { width: 100%; height: 100%; display: block; }
.cc-main { flex: 1; min-width: 0; }
.cc-title { font-size: 15px; font-weight: 600; }
.cc-sub { color: var(--hint); font-size: 12px; }
.cc-stats { display: flex; gap: 14px; margin: 8px 0; color: var(--sub); font-size: 12px; }
.cc-stats b { margin-left: 2px; color: var(--text); font-size: 15px; }
.cc-ops { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }

.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th, .tbl td { padding: 9px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.tbl th { color: var(--sub); font-weight: 600; font-size: 12px; }
.bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.bar-name { width: 84px; font-size: 13px; }
.bar-track { flex: 1; height: 8px; overflow: hidden; border-radius: var(--r-pill); background: var(--fill-2); }
.bar-fill { height: 100%; border-radius: var(--r-pill); background: var(--accent); }
.bar-val { width: 32px; text-align: right; color: var(--sub); font-size: 13px; }
.top-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.top-item { position: relative; overflow: hidden; border-radius: 12px; background: var(--fill); }
.top-item img { width: 100%; height: 72px; object-fit: cover; display: block; }
.ti-badge { position: absolute; top: 4px; right: 4px; padding: 1px 6px; border-radius: 6px; background: rgba(20, 20, 20, .8); color: #fff; font-size: 11px; }
.ti-name { padding: 4px 6px; color: var(--hint); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trend-bars { display: flex; align-items: flex-end; gap: 6px; height: 130px; }
.tb { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; }
.tb-bar { width: 100%; max-width: 34px; min-height: 3px; border-radius: 5px 5px 0 0; background: var(--accent); }
.tb-label { margin-top: 4px; color: var(--hint); font-size: 10px; }
.tb-val { font-size: 11px; }
.rec-row { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.rec-row img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; }
.tabs { display: flex; gap: 4px; padding: 4px; margin-bottom: 14px; border-radius: var(--r-pill); background: var(--fill-2); }
.tab { flex: 1; padding: 8px; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--sub); font-size: 13px; }
.tab.on { background: #fff; color: var(--text); font-weight: 600; }
.res-block { margin-bottom: 12px; }
.res-block label { display: flex; justify-content: space-between; margin-bottom: 5px; color: var(--sub); font-size: 12px; }
.res-block textarea { width: 100%; padding: 12px 14px; border: 1.5px solid transparent; border-radius: var(--r-input); background: var(--fill); color: var(--text); font: inherit; outline: none; }
.script-item { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.script-item:last-child { border-bottom: none; }
.script-time { min-width: 56px; color: var(--accent); font-weight: 600; }
.hist-item { display: flex; align-items: center; gap: 10px; padding: 9px; border-radius: 12px; cursor: pointer; }
.hist-item:hover { background: var(--fill); }
.hist-item img { width: 38px; height: 38px; border-radius: 8px; object-fit: cover; }
.hist-item .h-name { font-size: 13px; font-weight: 500; }
.hist-item .h-time { color: var(--hint); font-size: 11px; }
.qr-card { text-align: center; }
.qr-box { width: 200px; height: 200px; margin: 4px auto 12px; padding: 10px; border-radius: 14px; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.qr-box img { width: 100%; height: 100%; display: block; }
.share-url { margin-bottom: 10px; padding: 8px 10px; border-radius: 10px; background: var(--fill); color: var(--hint); font-size: 12px; word-break: break-all; }
.qr-actions { display: flex; gap: 8px; }
.merchant-qr-card { display: grid; gap: 20px; }
@media (min-width: 720px) { .merchant-qr-card { grid-template-columns: 1fr 300px; align-items: center; } }
.merchant-qr-copy h3 { margin: 6px 0 10px; font-size: 22px; }
.merchant-qr-copy > p { margin: 0 0 16px; color: var(--sub); line-height: 1.7; }
.merchant-qr-state { display: inline-flex; padding: 5px 11px; border-radius: var(--r-pill); background: #e9f9f1; color: #0a8f52; font-size: 12px; font-weight: 600; }
.merchant-qr-state.paused { background: #fff4e5; color: #b25c00; }
.merchant-qr-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 14px; }
.merchant-qr-actions .btn { width: auto; height: 42px; padding: 0 16px; font-size: 14px; }
.merchant-qr-image-wrap { display: flex; flex-direction: column; align-items: center; padding: 18px; border-radius: 18px; background: var(--fill); text-align: center; }
.merchant-qr-image-wrap img { width: 200px; height: 200px; padding: 8px; border-radius: 14px; background: #fff; }
.merchant-qr-image-wrap b { margin-top: 12px; font-size: 15px; }
.merchant-qr-image-wrap span { margin-top: 4px; color: var(--hint); font-size: 12px; }
.billing-scroll { overflow-x: auto; }
.billing-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.billing-table th, .billing-table td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.billing-table th { color: var(--sub); font-weight: 600; }
.billing-credit { color: #0a8f52; font-weight: 700; }
.billing-debit { color: var(--danger); font-weight: 700; }
.order-status { display: inline-block; padding: 3px 8px; border-radius: var(--r-pill); background: var(--fill); color: var(--sub); }
.order-status.paid { background: #e9f9f1; color: #0a8f52; }
.order-status.closed { background: #fdeeee; color: var(--danger); }
.manual-pay > h3 { padding-right: 30px; font-size: 18px; }
.manual-pay-amount { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; padding: 14px 16px; border-radius: 14px; background: var(--fill); }
.manual-pay-amount span { color: var(--sub); font-size: 13px; }
.manual-pay-amount strong { color: #d97706; font-size: 26px; }
.payment-channel-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-bottom: 12px; }
.payment-channel-choice { padding: 11px; border: 1.5px solid transparent; border-radius: 12px; background: var(--fill); color: var(--sub); font-weight: 600; }
.payment-channel-choice.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.manual-pay-code-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 15px; border-radius: 14px; background: var(--fill); }
.manual-pay-code-wrap img { display: block; width: min(300px, 72vw); height: min(380px, 82vw); object-fit: contain; border-radius: 10px; background: #fff; }
.manual-pay-code-wrap span { color: var(--hint); font-size: 12px; }
.manual-pay-tip { margin: 12px 0; padding: 11px 13px; border-radius: 12px; background: #fff8e8; color: #8a5a00; font-size: 12px; line-height: 1.7; }
.dist-result { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.dist-result img { width: 128px; height: 128px; padding: 6px; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.dist-result > div { flex: 1; min-width: 220px; }
.dist-url { width: 100%; margin: 0 0 10px; padding: 9px 11px; border: 1.5px solid transparent; border-radius: 10px; background: var(--fill); color: var(--sub); font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; }
.publish-row { display: flex; gap: 8px; margin-top: 10px; }
