:root, html[data-theme="default"] {
  --bg: #0e1016;
  --bg-grad: radial-gradient(1200px 500px at 80% -10%, rgba(255,138,61,.12), transparent 60%),
             radial-gradient(900px 480px at -10% 8%, rgba(96,165,250,.10), transparent 55%),
             #0e1016;
  --panel: #161a24;
  --panel2: #1e2430;
  --line: #262d3a;
  --line-soft: #1f2631;
  --text: #eef1f6;
  --muted: #8b94a6;
  --brand: #ff8a3d;
  --brand-2: #ff5e62;
  --brand-soft: rgba(255, 138, 61, .12);
  --blue: #5aa2f5;
  --green: #4ade80;
  --red: #ff6b6b;
  --radius: 16px;
  --shadow: 0 8px 30px rgba(0,0,0,.35);
  --shadow-soft: 0 2px 12px rgba(0,0,0,.22);
  --topbar-bg: rgba(14,16,22,.72);
  --tabnav-bg: rgba(20,24,34,.9);
  --grad-voice: #141926;
  --grad-item: #141a25;
  --grad-card: #151a25;
  --grad-ghost: #1a202c;
  --toast-bg: #000c;
  --hero-grad: linear-gradient(120deg, #fff, #ffd9b8 55%, #ff9a5a);
}

/* ===== 主题：皓月白（浅色） ===== */
html[data-theme="light"] {
  --bg: #f2f5fa;
  --bg-grad: radial-gradient(1200px 500px at 80% -10%, rgba(255,138,61,.10), transparent 60%),
             radial-gradient(900px 480px at -10% 8%, rgba(96,165,250,.08), transparent 55%),
             #f2f5fa;
  --panel: #ffffff;
  --panel2: #eef2f8;
  --line: #dde4ee;
  --line-soft: #e6ebf3;
  --text: #1c2430;
  --muted: #6b7a90;
  --brand: #ff7a2d;
  --brand-2: #ff5e62;
  --brand-soft: rgba(255, 122, 61, .12);
  --blue: #3b82f6;
  --green: #16a34a;
  --red: #e5484d;
  --shadow: 0 8px 30px rgba(30,60,110,.10);
  --shadow-soft: 0 2px 12px rgba(30,60,110,.07);
  --topbar-bg: rgba(255,255,255,.8);
  --tabnav-bg: rgba(255,255,255,.92);
  --grad-voice: #f6f9fd;
  --grad-item: #f6f9fd;
  --grad-card: #ffffff;
  --grad-ghost: #f2f5fa;
  --toast-bg: rgba(20,28,40,.9);
  --hero-grad: linear-gradient(120deg, #ff7a2d, #ffab6b 55%, #e5484d);
}

/* ===== 主题：星海蓝（暗蓝） ===== */
html[data-theme="ocean"] {
  --bg: #0b1220;
  --bg-grad: radial-gradient(1200px 500px at 80% -10%, rgba(90,162,245,.14), transparent 60%),
             radial-gradient(900px 480px at -10% 8%, rgba(124,97,255,.10), transparent 55%),
             #0b1220;
  --panel: #111a2c;
  --panel2: #182338;
  --line: #24334c;
  --line-soft: #1c2940;
  --text: #e8eefc;
  --muted: #8ba0c0;
  --brand: #5aa2f5;
  --brand-2: #7c61ff;
  --brand-soft: rgba(90, 162, 245, .14);
  --blue: #5aa2f5;
  --green: #4ade80;
  --red: #ff6b6b;
  --shadow: 0 8px 30px rgba(0,0,0,.4);
  --shadow-soft: 0 2px 12px rgba(0,0,0,.28);
  --topbar-bg: rgba(11,18,32,.75);
  --tabnav-bg: rgba(17,26,44,.92);
  --grad-voice: #101a2c;
  --grad-item: #101a2c;
  --grad-card: #131e33;
  --grad-ghost: #182338;
  --toast-bg: #000c;
  --hero-grad: linear-gradient(120deg, #fff, #bcd8ff 55%, #7c9df5);
}

/* ===== 主题：暖阳（浅暖?===== */
html[data-theme="warm"] {
  --bg: #faf6ef;
  --bg-grad: radial-gradient(1200px 500px at 80% -10%, rgba(255,138,61,.12), transparent 60%),
             radial-gradient(900px 480px at -10% 8%, rgba(245,196,81,.10), transparent 55%),
             #faf6ef;
  --panel: #fffdf8;
  --panel2: #f4eddf;
  --line: #e7dcc8;
  --line-soft: #efe6d5;
  --text: #33291c;
  --muted: #8a7a63;
  --brand: #f97316;
  --brand-2: #e5484d;
  --brand-soft: rgba(249, 115, 22, .12);
  --blue: #3b82f6;
  --green: #15803d;
  --red: #dc2626;
  --shadow: 0 8px 30px rgba(90,60,20,.10);
  --shadow-soft: 0 2px 12px rgba(90,60,20,.07);
  --topbar-bg: rgba(255,253,248,.82);
  --tabnav-bg: rgba(255,253,248,.94);
  --grad-voice: #f8f2e6;
  --grad-item: #f8f2e6;
  --grad-card: #fffdf8;
  --grad-ghost: #f4eddf;
  --toast-bg: rgba(40,30,15,.9);
  --hero-grad: linear-gradient(120deg, #f97316, #f59e0b 55%, #e5484d);
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--text);
  font-family: -apple-system, "PingFang SC", "SF Pro Text", "Microsoft YaHei", sans-serif;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
#app { max-width: 430px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg-grad); }

/* 顶栏 */
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px; position: sticky; top: 0; background: var(--topbar-bg);
  backdrop-filter: blur(14px) saturate(1.4); z-index: 10; border-bottom: 1px solid var(--line-soft);
}
.store { font-weight: 700; font-size: 15px; letter-spacing: .2px; }
.points-chip {
  background: linear-gradient(135deg, rgba(255,138,61,.16), rgba(255,94,98,.14));
  color: var(--brand); border: 1px solid rgba(255,138,61,.35);
  padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.02);
}

/* 页面切换 */
.page { display: none; padding: 18px 16px 110px; flex: 1; }
.page.active { display: block; animation: slideIn .2s ease; }
@keyframes slideIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; } }

/* 首页 */
.hero { text-align: center; padding: 30px 0 20px; position: relative; }
.hero-title { font-size: 24px; font-weight: 800; letter-spacing: .3px;
  background: var(--hero-grad);
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { color: var(--muted); font-size: 13px; margin-top: 8px; }

.voice-bar {
  display: flex; gap: 10px; align-items: center;
  background: linear-gradient(180deg, var(--panel), var(--grad-voice));
  border: 1px solid var(--line); border-radius: 18px;
  padding: 12px; margin-bottom: 24px; box-shadow: var(--shadow-soft);
}
.mic-btn {
  width: 48px; height: 48px; border-radius: 50%; border: none; cursor: pointer;
  background: linear-gradient(135deg, #ff8a3d, #ff5e62); font-size: 20px; flex-shrink: 0;
  transition: transform .15s, box-shadow .2s; box-shadow: 0 4px 16px rgba(255,94,98,.4);
}
.mic-btn.listening { animation: pulse 1s infinite; background: linear-gradient(135deg, #ff5e62, #ff2d55); box-shadow: 0 0 0 8px rgba(255,45,85,.15); }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.1); } }
#textInput {
  flex: 1; background: var(--panel2); border: 1px solid var(--line); color: var(--text);
  border-radius: 12px; padding: 12px 14px; font-size: 14px; outline: none; transition: border-color .2s;
}
#textInput:focus { border-color: var(--brand); }
#textInput::placeholder { color: #5d6675; }
.send-btn {
  background: linear-gradient(135deg, #ff8a3d, #ff7a4d); color: #fff; border: none; border-radius: 12px;
  padding: 12px 18px; font-size: 14px; font-weight: 700; cursor: pointer;
  box-shadow: 0 4px 14px rgba(255,138,61,.3);
}
.send-btn:disabled { opacity: .5; box-shadow: none; }

/* ˿͹-һǿͣɺд */
#custNote {
  width: 100%; box-sizing: border-box;
  background: var(--panel2); border: 1px solid var(--line); color: var(--text);
  border-radius: 12px; padding: 12px 14px; font-size: 14px; line-height: 1.6;
  outline: none; resize: vertical; min-height: 96px; margin-bottom: 10px;
  transition: border-color .2s, box-shadow .2s; font-family: inherit;
}
#custNote:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(255,138,61,.12); }
#custNote::placeholder { color: #8a94a8; }

/* 六大金刚 */
.grid6 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 24px; }
.g-item {
  background: linear-gradient(180deg, var(--panel), var(--grad-item));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 6px 14px; text-align: center; cursor: pointer; font-size: 14px; font-weight: 600;
  transition: transform .15s, border-color .2s, box-shadow .2s; position: relative; overflow: hidden;
}
.g-item::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255,138,61,.6), transparent);
  opacity: 0; transition: opacity .25s;
}
.g-item:active { transform: scale(.96); border-color: var(--brand); box-shadow: var(--shadow-soft); }
.g-item:active::before { opacity: 1; }
.g-icon { display: flex; align-items: center; justify-content: center; font-size: 26px; margin-bottom: 10px;
  width: 52px; height: 52px; margin: 0 auto 10px; border-radius: 16px;
  background: linear-gradient(135deg, rgba(255,138,61,.14), rgba(255,94,98,.10));
  border: 1px solid rgba(255,138,61,.18); }
.g-item:nth-child(1) .g-icon { background: linear-gradient(135deg, rgba(255,138,61,.18), rgba(255,94,98,.08)); }
.g-item:nth-child(2) .g-icon { background: linear-gradient(135deg, rgba(90,162,245,.18), rgba(96,165,250,.06)); border-color: rgba(90,162,245,.2); }
.g-item:nth-child(3) .g-icon { background: linear-gradient(135deg, rgba(74,222,128,.16), rgba(74,222,128,.05)); border-color: rgba(74,222,128,.2); }
.g-item:nth-child(4) .g-icon { background: linear-gradient(135deg, rgba(245,196,81,.18), rgba(245,196,81,.06)); border-color: rgba(245,196,81,.22); }
.g-item:nth-child(5) .g-icon { background: linear-gradient(135deg, rgba(217,70,239,.16), rgba(217,70,239,.06)); border-color: rgba(217,70,239,.22); }
.g-item:nth-child(6) .g-icon { background: linear-gradient(135deg, rgba(56,189,248,.16), rgba(56,189,248,.06)); border-color: rgba(56,189,248,.2); }

/* 底部 Tab 导航 */
.tabnav {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: 100%; max-width: 430px;
  display: flex; z-index: 30; padding: 8px 12px calc(12px + env(safe-area-inset-bottom));
  background: var(--tabnav-bg); backdrop-filter: blur(16px) saturate(1.4);
  border-top: 1px solid var(--line-soft);
}
.tabnav .tn {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: none; border: 0; color: var(--muted); font-size: 10px; cursor: pointer; padding: 6px 0;
  transition: color .2s;
}
.tabnav .tn .ti { font-size: 19px; line-height: 1; filter: grayscale(1) opacity(.6); transition: .2s; }
.tabnav .tn.on { color: var(--brand); font-weight: 600; }
.tabnav .tn.on .ti { filter: none; opacity: 1; }

/* 卡片 */
.card {
  background: linear-gradient(180deg, var(--panel), var(--grad-card));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; margin-bottom: 14px; box-shadow: var(--shadow-soft);
}
.card h3 { font-size: 14px; color: var(--muted); font-weight: 700; margin-bottom: 14px; letter-spacing: .3px; }

.items .item {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px;
}
.items .item:last-child { border-bottom: none; }
.item .price { color: var(--brand); font-weight: 700; }
.item .tag { font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; margin-left: 8px; }

/* 结果?*/
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.back { background: none; border: none; color: var(--muted); font-size: 15px; cursor: pointer; padding: 4px; }
.scene-tag { background: var(--brand-soft); color: var(--brand); font-size: 12px; padding: 3px 10px; border-radius: 999px; }

.loading { text-align: center; padding: 50px 0; color: var(--muted); font-size: 14px; }
.spinner {
  width: 36px; height: 36px; margin: 0 auto 14px; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--brand); animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.variant {
  background: linear-gradient(180deg, var(--panel), var(--grad-card));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; margin-bottom: 12px; box-shadow: var(--shadow-soft);
}
.variant-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.variant-style { font-size: 12px; color: var(--brand); font-weight: 700; letter-spacing: .5px; }
.copy-btn {
  background: var(--panel2); color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; font-size: 12px; padding: 5px 12px; cursor: pointer;
}
.copy-btn.done { color: var(--green); border-color: var(--green); }
.variant-text { font-size: 15px; line-height: 1.75; white-space: pre-wrap; }

.result-actions { display: flex; gap: 10px; justify-content: center; margin-top: 6px; }
.ghost {
  background: linear-gradient(180deg, var(--panel2), var(--grad-ghost)); color: var(--text); border: 1px solid var(--line);
  border-radius: 12px; padding: 11px 18px; font-size: 14px; cursor: pointer; transition: border-color .2s, color .2s;
}
.ghost:hover { border-color: var(--brand); color: var(--brand); }
.ghost:disabled { opacity: .4; }
.primary {
  background: linear-gradient(135deg, #ff8a3d, #ff7a4d); color: #fff; border: none; border-radius: 12px;
  padding: 13px; font-size: 15px; font-weight: 700; cursor: pointer; width: 100%;
  box-shadow: 0 6px 18px rgba(255,138,61,.28);
}
.primary:disabled { opacity: .5; box-shadow: none; }
.danger {
  background: none; color: var(--red); border: 1px solid rgba(255,107,107,.4);
  border-radius: 12px; padding: 13px; font-size: 14px; width: 100%; cursor: pointer; margin-top: 4px;
}

/* 用户中心 */
.balance-card { text-align: center; padding: 26px 16px; }
.balance { font-size: 40px; font-weight: 800; color: var(--brand); }
.balance-label { color: var(--muted); font-size: 13px; margin: 4px 0 16px; }
.balance-card .row { display: flex; gap: 10px; justify-content: center; }

.ledger .lg-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px;
}
.ledger .lg-row:last-child { border-bottom: none; }
.lg-left { color: var(--muted); }
.lg-amt.plus { color: var(--green); font-weight: 600; }
.lg-amt.minus { color: var(--red); font-weight: 600; }
.lg-status { font-size: 11px; opacity: .7; }

/* 登录弹层 */
.mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 99;
  display: none; align-items: flex-end; justify-content: center;
}
.mask.show { display: flex; }
.dialog {
  background: var(--panel); border-radius: 20px 20px 0 0; padding: 24px 20px 32px;
  width: 100%; max-width: 430px;
}
.dialog h3 { font-size: 18px; margin-bottom: 6px; }
.dialog-sub { color: var(--muted); font-size: 13px; margin-bottom: 16px; }
.tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.tab {
  flex: 1; padding: 10px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel2); color: var(--muted); font-size: 14px; cursor: pointer;
}
.tab.on { border-color: var(--brand); color: var(--text); background: rgba(99,102,241,.12); font-weight: 600; }
.primary.wx { background: #07c160; border-color: #07c160; }
.primary.wx:hover { background: #06ad56; }
.dialog input {
  width: 100%; background: var(--panel2); border: 1px solid var(--line); color: var(--text);
  border-radius: 10px; padding: 12px; font-size: 15px; outline: none; margin-bottom: 12px;
}
.dialog input:focus { border-color: var(--brand); }
.quick { display: flex; gap: 10px; margin-bottom: 12px; }
.quick button {
  flex: 1; background: var(--panel2); border: 1px dashed var(--line); color: var(--muted);
  border-radius: 10px; padding: 8px; font-size: 13px; cursor: pointer;
}

/* 变体操作?*/
.variant-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.v-act {
  background: var(--panel2); color: var(--muted); border: 1px solid var(--line);
  border-radius: 8px; font-size: 12px; padding: 6px 12px; cursor: pointer;
}
.v-act:active { border-color: var(--brand); color: var(--brand); }
.v-act.on { color: var(--brand); border-color: var(--brand); background: var(--brand-soft); }

/* 海报弹层 */
.poster-dialog { max-height: 92vh; overflow-y: auto; }
.tpl-row { display: flex; gap: 8px; margin-bottom: 14px; }
.tpl-row button {
  flex: 1; background: var(--panel2); color: var(--muted); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px; font-size: 13px; cursor: pointer;
}
.tpl-row button.on { color: var(--brand); border-color: var(--brand); background: var(--brand-soft); }
.poster-wrap { background: #000; border-radius: 10px; overflow: hidden; margin-bottom: 14px; }
.poster-wrap img { display: block; width: 100%; }

/* 海报码选择（客服码/小程序码/无码?*/
.qr-row { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.qr-row .qr-btn {
  background: var(--panel2); color: var(--muted); border: 1px solid var(--line);
  border-radius: 8px; padding: 6px 12px; font-size: 12px; cursor: pointer;
}
.qr-row .qr-btn.on { color: var(--brand); border-color: var(--brand); background: var(--brand-soft); font-weight: 600; }

/* 报名登记/团购看板弹层 */
.reg-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0; }
.reg-stat {
  background: var(--panel2); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px; text-align: center;
}
.reg-stat b { display: block; font-size: 20px; color: var(--brand); }
.reg-stat span { font-size: 12px; color: var(--muted); }
.reg-toggle {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  background: var(--panel2); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px; margin-bottom: 12px; font-size: 13px; color: var(--text);
}
.reg-toggle input[type=checkbox] { width: auto; margin: 0; }
.reg-toggle input[type=number] { width: 70px; margin: 0; }
.reg-list { max-height: 40vh; overflow-y: auto; }
.reg-row {
  background: var(--panel2); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; margin-bottom: 8px; display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.reg-row .reg-via { font-size: 11px; color: var(--brand); background: var(--brand-soft); border-radius: 6px; padding: 1px 6px; }
.reg-row .reg-sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.reg-row .reg-time { font-size: 11px; color: var(--muted); white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.reg-row .reg-time input { width: 56px; margin: 0; padding: 6px; }
.reg-row .reg-time button { padding: 6px 10px; font-size: 12px; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 100px; transform: translateX(-50%) translateY(20px);
  background: var(--toast-bg); color: #fff; padding: 10px 20px; border-radius: 999px;
  font-size: 13px; opacity: 0; pointer-events: none; transition: all .25s; z-index: 100;
  max-width: 80vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== M2：品项管?/ 活动向导 / 活动列表 ===== */
.card-head { display: flex; justify-content: space-between; align-items: center; }
.link-btn { background: none; border: none; color: var(--brand); font-size: 13px; cursor: pointer; padding: 2px 4px; }
.page-tip { color: var(--muted); font-size: 12px; margin-bottom: 12px; line-height: 1.6; }

/* 品项管理?*/
.mg-item { border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 10px; background: var(--panel2); }
.mg-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.mg-name { font-weight: 600; font-size: 14px; }
.mg-price { color: var(--brand); font-weight: 700; }
.mg-override { font-size: 11px; color: var(--brand); border: 1px solid rgba(255,138,61,.4); border-radius: 4px; padding: 1px 5px; margin-left: 6px; }
.mg-meta { display: flex; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.mg-tag { background: var(--line); border-radius: 4px; padding: 1px 6px; }
.mg-tag.lock { color: #f0c674; }
.mg-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.mg-actions input { width: 84px; background: var(--bg); border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 6px 8px; font-size: 13px; }
.mg-actions button { background: var(--panel); border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 6px 10px; font-size: 12px; cursor: pointer; }
.mg-actions button.warn { color: var(--red); border-color: rgba(255,107,107,.4); }
.mg-actions button.danger { color: var(--red); border-color: rgba(255,107,107,.4); background: none; width: auto; padding: 6px 10px; font-size: 12px; border-radius: 8px; margin-top: 0; }

.form-grid { display: flex; flex-direction: column; gap: 10px; }
.form-row { display: flex; gap: 8px; }
.form-row input, .form-row select { flex: 1; min-width: 0; }
.form-grid input, .form-grid select {
  background: var(--panel2); border: 1px solid var(--line); color: var(--text);
  border-radius: 10px; padding: 10px 12px; font-size: 14px; outline: none;
}
.form-grid input:focus { border-color: var(--brand); }

/* 向导步骤 */
.wiz-steps { display: flex; gap: 6px; margin-bottom: 16px; }
.wiz-step { flex: 1; text-align: center; font-size: 12px; color: var(--muted); padding: 6px 0; border-bottom: 2px solid var(--line); }
.wiz-step.on { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
.wiz-title { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.wiz-sub { color: var(--muted); font-size: 13px; margin-bottom: 14px; }

.goal-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.goal-card { background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 14px; cursor: pointer; }
.goal-card.on { border-color: var(--brand); background: var(--brand-soft); }
.goal-name { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.goal-desc { font-size: 12px; color: var(--muted); }

.pick-item { display: flex; justify-content: space-between; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 8px; cursor: pointer; background: var(--panel2); }
.pick-item.on { border-color: var(--brand); background: var(--brand-soft); }
.pick-item .ck { font-size: 16px; }

.pb-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.pb-card { background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 14px; cursor: pointer; position: relative; }
.pb-card.on { border-color: var(--brand); background: var(--brand-soft); }
.pb-card .rec { position: absolute; top: -8px; right: 8px; background: var(--brand); color: #fff; font-size: 10px; border-radius: 999px; padding: 2px 8px; }
.pb-name { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.pb-desc { font-size: 12px; color: var(--muted); line-height: 1.5; }

.param-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.param-row label { flex-shrink: 0; width: 110px; font-size: 13px; color: var(--muted); }
.param-row input { flex: 1; background: var(--bg); border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 9px 10px; font-size: 14px; }

.wiz-nav { display: flex; gap: 10px; margin-top: 16px; }
.wiz-nav button { flex: 1; padding: 13px; border-radius: 12px; border: none; font-size: 15px; font-weight: 600; cursor: pointer; }
.wiz-nav .prev { background: var(--panel2); color: var(--text); border: 1px solid var(--line); }
.wiz-nav .next { background: var(--brand); color: #fff; }

/* 方案展示 */
.plan-block { background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 10px; }
.plan-block h4 { font-size: 13px; color: var(--brand); margin-bottom: 8px; }
.plan-block p, .plan-block li { font-size: 13px; line-height: 1.7; color: var(--text); }
.plan-block ul { padding-left: 18px; }
.margin-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.margin-cell { background: var(--bg); border-radius: 10px; padding: 10px 6px; text-align: center; }
.margin-val { font-size: 18px; font-weight: 700; color: var(--green); }
.margin-label { font-size: 11px; color: var(--muted); margin-top: 2px; }
.scen-row { display: flex; justify-content: space-between; font-size: 12px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.scen-row:last-child { border-bottom: none; }

/* 活动列表 */
.act-item { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; }
.act-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.act-title { font-weight: 600; font-size: 14px; }
.act-status { font-size: 11px; border-radius: 4px; padding: 2px 8px; }
.act-status.pending { color: #f0c674; background: rgba(240,198,116,.12); }
.act-status.running { color: var(--green); background: rgba(74,222,128,.12); }
.act-status.rejected { color: var(--red); background: rgba(255,107,107,.12); }
.act-status.done { color: var(--muted); background: var(--line); }
.act-meta { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.act-stats { display: flex; gap: 14px; font-size: 13px; margin-bottom: 10px; }
.act-stats b { color: var(--brand); }
.act-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.act-actions button { background: var(--panel2); border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 7px 12px; font-size: 12px; cursor: pointer; }
.act-actions button.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.act-actions button.ok { background: rgba(74,222,128,.15); border-color: rgba(74,222,128,.4); color: var(--green); }
.act-actions button.no { background: rgba(255,107,107,.12); border-color: rgba(255,107,107,.4); color: var(--red); }

/* ==================== M6 商业化（T43-T51?==================== */
/* 账户?*/
.acct-card { background: linear-gradient(145deg, rgba(255,138,61,.16), var(--panel) 60%); border-color: rgba(255,138,61,.3); }
.acct-top { display: flex; justify-content: space-between; align-items: flex-start; }
.acct-badges { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.badge { font-size: 11px; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.badge.lv { background: rgba(255,255,255,.08); border: 1px solid var(--line); color: var(--text); }
.badge.vip { background: linear-gradient(135deg, #f5c451, #e09b2d); color: #3a2606; font-weight: 700; }
.badge.vip.free { background: rgba(255,255,255,.06); border: 1px solid var(--line); color: var(--muted); font-weight: 400; }
.acct-rate { font-size: 12px; color: var(--muted); margin: 10px 0 0; }
.acct-chain { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 10px; }
.acct-chain span { font-size: 11px; color: var(--muted); background: var(--panel2); border-radius: 6px; padding: 3px 7px; }
.acct-chain span.me { background: rgba(255,138,61,.18); color: var(--brand); }
.acct-chain i { color: var(--muted); font-size: 10px; font-style: normal; }

/* 四宫格入?*/
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0; }
.u-item { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 4px; text-align: center; font-size: 12px; cursor: pointer; transition: .15s; }
.u-item:active { transform: scale(.95); border-color: var(--brand); }
.u-item .g-icon { display: block; font-size: 22px; margin-bottom: 5px; }
.agent-box { border-color: rgba(96,165,250,.3); background: linear-gradient(145deg, rgba(96,165,250,.09), var(--panel) 70%); }
.agent-box .grid4 { margin-bottom: 0; }
.mini-tag { font-size: 11px; font-weight: 400; color: #60a5fa; background: rgba(96,165,250,.15); border-radius: 6px; padding: 3px 8px; }

/* 功能被停用的入口 */
.g-item.locked, .u-item.locked { opacity: .38; position: relative; }
.g-item.locked::after, .u-item.locked::after { content: '🔒'; position: absolute; top: 6px; right: 8px; font-size: 11px; }

/* 充值档?*/
.pkg-list { display: flex; flex-direction: column; gap: 10px; }
.pkg { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; cursor: pointer; transition: .15s; }
.pkg:active { transform: scale(.99); }
.pkg.hot { border-color: var(--brand); box-shadow: 0 0 0 1px rgba(255,138,61,.25) inset; }
.pkg-l { display: flex; flex-direction: column; gap: 3px; }
.pkg-name { font-size: 15px; font-weight: 600; }
.pkg-pts { font-size: 12px; color: var(--muted); }
.pkg-pts b { color: var(--green); font-weight: 600; }
.pkg-r { text-align: right; }
.pkg-price { font-size: 20px; font-weight: 700; color: var(--brand); }
.pkg-unit { font-size: 11px; color: var(--muted); }
.pkg-hot-tag { font-size: 10px; background: var(--brand); color: #fff; border-radius: 5px; padding: 2px 6px; margin-left: 6px; vertical-align: 2px; }

/* 会员 */
.vip-cur { background: linear-gradient(135deg, rgba(245,196,81,.2), var(--panel) 70%); border: 1px solid rgba(245,196,81,.35); border-radius: 14px; padding: 14px 16px; margin-bottom: 12px; font-size: 13px; }
.vip-cur b { color: #f5c451; font-size: 15px; }
.vip-cur .exp { color: var(--muted); font-size: 12px; display: block; margin-top: 4px; }
.vip-list { display: flex; flex-direction: column; gap: 10px; }
.vip-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.vip-card.cur { border-color: #f5c451; }
.vip-head { display: flex; justify-content: space-between; align-items: baseline; }
.vip-name { font-size: 16px; font-weight: 700; }
.vip-price { font-size: 19px; font-weight: 700; color: var(--brand); }
.vip-price small { font-size: 11px; color: var(--muted); font-weight: 400; }
.vip-perks { list-style: none; padding: 0; margin: 10px 0 12px; display: flex; flex-direction: column; gap: 5px; }
.vip-perks li { font-size: 12px; color: var(--muted); display: flex; align-items: flex-start; gap: 6px; }
.vip-perks li::before { content: ''; width: 10px; height: 5px; min-width: 10px; margin-top: 5px;
  border-left: 2px solid var(--green); border-bottom: 2px solid var(--green);
  transform: rotate(45deg); }
.vip-gift { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.vip-gates { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 12px; }
.vip-buy { display: flex; gap: 8px; }
.vip-buy button { flex: 1; background: var(--panel2); border: 1px solid var(--line); color: var(--text); border-radius: 9px; padding: 9px; font-size: 12px; cursor: pointer; }
.vip-buy button.go { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }

/* 代理下发 */
.ch-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin-bottom: 10px; }
.ch-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.ch-name { font-size: 15px; font-weight: 600; }
.ch-meta { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.ch-meta b { color: var(--green); }
.ch-form { display: flex; gap: 8px; }
.ch-form input { flex: 1; background: var(--panel2); border: 1px solid var(--line); color: var(--text); border-radius: 9px; padding: 10px 12px; font-size: 14px; }
.ch-form button { background: var(--brand); border: none; color: #fff; border-radius: 9px; padding: 10px 18px; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.ch-quick { display: flex; gap: 6px; margin-top: 8px; }
.ch-quick button { flex: 1; background: var(--panel2); border: 1px solid var(--line); color: var(--muted); border-radius: 7px; padding: 6px; font-size: 11px; cursor: pointer; }

/* 功能权限管理 */
.ft-sub { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin-bottom: 10px; }
.ft-sub h4 { margin: 0 0 10px; font-size: 14px; display: flex; align-items: center; gap: 7px; }
.ft-grid { display: flex; flex-wrap: wrap; gap: 7px; }
.ft-chip { font-size: 12px; border-radius: 999px; padding: 6px 12px; border: 1px solid var(--line); background: var(--panel2); color: var(--muted); cursor: pointer; transition: .15s; }
.ft-chip.on { background: rgba(74,222,128,.15); border-color: rgba(74,222,128,.4); color: var(--green); }
.ft-chip.off { background: rgba(255,107,107,.1); border-color: rgba(255,107,107,.35); color: var(--red); }
.ft-chip.frozen { opacity: .5; cursor: not-allowed; }

/* 加盟政策 */
.fr-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin-bottom: 10px; }
.fr-top { display: flex; justify-content: space-between; align-items: baseline; }
.fr-name { font-size: 15px; font-weight: 600; }
.fr-fee { font-size: 19px; font-weight: 700; color: var(--brand); }
.fr-sub { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* 广告弹层 */
.ad-dialog { max-width: 340px; }
.ad-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.ad-type { font-size: 11px; background: rgba(96,165,250,.18); color: #60a5fa; border-radius: 6px; padding: 3px 8px; }
.ad-count { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ad-material { font-size: 13px; line-height: 1.7; color: var(--text); background: var(--panel2); border-radius: 10px; padding: 12px 14px; margin: 10px 0; text-align: left; }
.ad-sponsor { font-size: 11px; color: var(--muted); text-align: right; margin: 0 0 14px; }

.fine { font-size: 12px; color: var(--muted); line-height: 1.8; margin: 0; }

/* ===== 主题切换 ===== */
.theme-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 12px; }
.theme-item {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 12px;
  font-size: 13px; color: var(--text); font-weight: 600; transition: border-color .15s;
}
.theme-item:hover { border-color: var(--brand); }
.theme-item.on { border-color: var(--brand); box-shadow: 0 0 0 1px rgba(255,138,61,.3) inset; }
.theme-item i { width: 26px; height: 26px; border-radius: 8px; border: 1px solid rgba(128,128,128,.3); flex-shrink: 0; }
/* 浅色主题适配：品?会员徽章等仍需可读 */
html[data-theme="light"] .badge.vip, html[data-theme="warm"] .badge.vip { color: #fff; }
html[data-theme="light"] .poster-wrap, html[data-theme="warm"] .poster-wrap { background: #333; }

/* ===== M7 代理中心页面（下发积?差价/下级权限/加盟政策?==== */
.u-card { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; }
.u-info b { font-size: 14px; }
.u-lv { font-size: 11px; background: rgba(96,165,250,.18); color: #60a5fa; padding: 2px 9px; border-radius: 20px; margin-left: 6px; }
.u-ops { display: flex; gap: 8px; align-items: center; }
.u-ops .qty { width: 84px; padding: 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel2); color: var(--text); }
.sm { padding: 8px 14px; font-size: 13px; }
/* 兼容 loadFeatureManage 使用?.disabled 状?*/
.ft-chip.disabled { background: rgba(255,107,107,.1); border-color: rgba(255,107,107,.35); color: var(--red); }
.ft-chip .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--green); margin-right: 2px; }
.ft-chip.disabled .dot { background: var(--red); }

/* ===== M3 日报 / M4 对练 / M5 顾客 页面 ===== */
.kpi-card { display: flex; gap: 8px; }
.kpi { flex: 1; text-align: center; background: var(--panel2); border-radius: 14px; padding: 14px 6px; }
.kpi-num { font-size: 20px; font-weight: 700; }
.kpi-num.up { color: var(--green); }
.kpi-num.down { color: var(--red); }
.kpi-label { font-size: 11px; color: var(--muted); margin-top: 4px; }
.report-text { font-size: 14px; line-height: 1.9; color: var(--text); white-space: pre-wrap; }

/* ===== 日报经营看板（多排：今日/本周/本月/累计?===== */
.daily-board { padding: 14px; }
.daily-board .kpi-row { display: flex; gap: 8px; margin-bottom: 8px; }
.daily-board .kpi-row:last-of-type { margin-bottom: 10px; }
.daily-board .kpi { border-radius: 12px; padding: 12px 4px; background: var(--panel2); }
.daily-board .kpi-num { font-size: 19px; }
.daily-board .kpi-label { font-size: 10px; }
.daily-total {
  display: flex; justify-content: space-around; gap: 6px; flex-wrap: wrap;
  background: var(--brand-soft); border: 1px dashed var(--line); border-radius: 12px;
  padding: 10px 8px; font-size: 12px; color: var(--muted);
}
.daily-total b { color: var(--text); font-weight: 700; }
html[data-theme="light"] .daily-total b, html[data-theme="warm"] .daily-total b { color: #33291c; }

/* 语音报数 / 拍照小票 */
.daily-cap { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0; }
.cap-btn {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: var(--panel2); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 8px; font-size: 15px; cursor: pointer; transition: border-color .15s, transform .1s;
}
.cap-btn:active { transform: scale(.97); }
.cap-btn b { font-size: 14px; color: var(--text); }
.cap-btn small { font-size: 11px; color: var(--muted); }
.cap-btn.voice.recording { border-color: var(--red); background: rgba(255,107,107,.12); animation: pulse 1s infinite; }
.cap-btn.voice.recording b { color: var(--red); }
.cap-btn.cam { background: linear-gradient(160deg, rgba(90,162,245,.12), var(--panel2) 60%); border-color: rgba(90,162,245,.35); }
.cap-btn.cam b { color: var(--blue); }
.dl-pic {
  display: flex; align-items: center; gap: 10px; margin: 8px 0;
  background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px;
}
.dl-pic img { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; }
.dl-pic span { font-size: 12px; color: var(--muted); line-height: 1.5; }

/* ===== 库存补货建议卡片 ===== */
.inv-list { display: flex; flex-direction: column; gap: 8px; }
.inv-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px;
}
.inv-card.low { border-color: rgba(255,107,107,.45); background: rgba(255,107,107,.06); }
.inv-ic { font-size: 22px; width: 38px; height: 38px; border-radius: 10px; background: var(--panel); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.inv-main { flex: 1; min-width: 0; }
.inv-name { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.inv-name .warn { font-size: 10px; color: var(--red); background: rgba(255,107,107,.12); border-radius: 6px; padding: 1px 6px; }
.inv-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.inv-r {
  text-align: right; flex-shrink: 0;
}
.inv-r b { display: block; font-size: 16px; color: var(--brand); }
.inv-r small { font-size: 10px; color: var(--muted); }
.inv-empty { font-size: 13px; color: var(--muted); text-align: center; padding: 20px 0; }
.chat-box { max-height: 320px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 8px 2px; }
.bubble { max-width: 80%; padding: 10px 13px; border-radius: 14px; font-size: 13px; line-height: 1.6; }
.bubble.ai { align-self: flex-start; background: var(--panel2); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.bubble.me { align-self: flex-end; background: var(--blue); color: #fff; border-bottom-right-radius: 4px; }
.persona-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
/* ---- 鿨ƬϰҳM4 T33 ---- */
.dr-list { display: flex; flex-direction: column; gap: 8px; }
.dr-group { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); overflow: hidden; }
.dr-group summary { display: flex; align-items: center; gap: 8px; padding: 10px 14px; cursor: pointer; list-style: none; user-select: none; }
.dr-group summary::-webkit-details-marker { display: none; }
.dr-group summary:hover { background: var(--panel2); }
.dr-group-name { font-weight: 700; font-size: 14px; color: var(--text); }
.dr-group-cnt { font-size: 11px; background: rgba(255,138,61,.14); color: #e07a2a; border-radius: 20px; padding: 1px 8px; }
.dr-group[open] summary { border-bottom: 1px solid var(--line); }
.dr-group-body { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; padding: 12px; background: var(--panel); }
.dr-card { background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; position: relative; }
.dr-card-title { font-weight: 600; font-size: 13px; color: var(--text); }
.dr-card-body { font-size: 12px; line-height: 1.6; color: var(--muted); }
.dr-card .dr-copy { align-self: flex-end; font-size: 11px; padding: 3px 10px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); cursor: pointer; }
.dr-card .dr-copy:hover { color: var(--brand); border-color: rgba(255,138,61,.4); background: rgba(255,138,61,.08); }
.score-box { background: var(--panel2); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-top: 10px; }
.score-num { font-size: 26px; font-weight: 800; color: var(--blue); }
.score-dims { font-size: 12px; color: var(--muted); margin: 6px 0; }
.chip { padding: 7px 13px; border-radius: 20px; border: 1px solid var(--line); background: var(--panel2); color: var(--text); font-size: 13px; cursor: pointer; }
.chip.on { background: var(--blue); color: #fff; border-color: var(--blue); }
.mini { padding: 4px 10px; font-size: 11px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel2); color: var(--muted); cursor: pointer; }
.mini.danger { color: var(--red); border-color: rgba(255,107,107,.4); background: rgba(255,107,107,.1); }

/* ===== 🏪 ?AI 客服 ===== */
.kb-entry-card { background: linear-gradient(145deg, rgba(91,124,250,.14), var(--panel) 55%); border-color: rgba(91,124,250,.28); }
.kb-entry-card .mini-tag { color: #5b7cfa; background: rgba(91,124,250,.14); }
.kb-entry-card .primary { margin-top: 8px; }
.faq-row { display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; background: var(--panel2); }
.faq-row input { width: 100%; box-sizing: border-box; }
.faq-row .mini { align-self: flex-end; }

/* ===== 管理增强：素材库中心（归?搜索/瀑布?懒加载） ===== */
.lib-toolbar { display: flex; flex-direction: column; gap: 10px; }
.lib-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.lib-tabs .chip .cnt { opacity: .6; font-size: 11px; margin-left: 3px; }
.lib-actions { display: flex; gap: 8px; align-items: center; }
.lib-grid { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.lib-card { background: var(--panel2); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; transition: border-color .15s, transform .1s; }
.lib-card:hover { border-color: rgba(90,162,245,.4); transform: translateY(-1px); }
.lib-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 11px; color: var(--muted); }
.lib-scene { background: rgba(90,162,245,.14); color: #7db6f8; padding: 2px 8px; border-radius: 20px; font-weight: 600; }
.lib-style { background: rgba(255,138,61,.12); color: var(--brand); padding: 2px 8px; border-radius: 20px; }
.lib-time { margin-left: auto; white-space: nowrap; }
.lib-item { font-size: 11px; color: var(--muted); }
.lib-text { font-size: 13px; line-height: 1.65; color: var(--text); white-space: pre-wrap; word-break: break-word; }
.lib-actions { display: flex; gap: 6px; justify-content: flex-end; border-top: 1px dashed var(--line); padding-top: 8px; }
.v-act { border: 1px solid var(--line); background: var(--panel); color: var(--text); border-radius: 10px; padding: 5px 10px; font-size: 12px; cursor: pointer; }
.v-act.on { color: var(--brand); border-color: rgba(255,138,61,.4); background: rgba(255,138,61,.1); }
.v-act.danger { color: var(--red); border-color: rgba(255,107,107,.4); }
#custTagFilter { display: flex; flex-wrap: wrap; gap: 6px; }
#itRoleFilter { display: flex; flex-wrap: wrap; gap: 6px; }
/* 创作中心：做海报 / 做视频（独立入口?*/
.create-center .create-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.create-item { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 10px; border-radius: 14px; border: 1px solid var(--line); background: linear-gradient(160deg, var(--panel), var(--grad-card)); cursor: pointer; }
.create-item:active { transform: scale(.97); }
.create-item .create-icon { font-size: 30px; }
.create-item .create-title { font-size: 16px; font-weight: 800; color: var(--text); }
.create-item .create-sub { font-size: 11px; color: var(--muted); }
.create-item.locked { opacity: .4; cursor: not-allowed; position: relative; filter: grayscale(.6); }
.create-item.locked::after { content: '?'; position: absolute; top: 8px; right: 10px; font-size: 13px; }
.create-item.locked:active { transform: none; }
#createPosterBtn .create-icon { filter: drop-shadow(0 4px 8px rgba(255,138,61,.3)); }
#createVideoBtn .create-icon { filter: drop-shadow(0 4px 8px rgba(124,97,255,.3)); }
/* 视频生成弹层 */
.field-label { display: block; font-size: 12px; color: var(--muted); font-weight: 700; margin: 8px 0 4px; }
.vid-ref { display: flex; align-items: center; }
#vidStyles .style-chip { border: 1px solid var(--line); background: var(--panel); color: var(--text); border-radius: 20px; padding: 5px 12px; font-size: 12px; cursor: pointer; }
#vidStyles .style-chip.on { color: var(--brand); border-color: rgba(255,138,61,.5); background: rgba(255,138,61,.12); }
#vidProvider, #vidDuration { padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); font-size: 14px; background: var(--panel2); color: var(--text); }
.vid-thumb { position: relative; width: 72px; height: 72px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.vid-thumb img, .vid-thumb video { width: 100%; height: 100%; object-fit: cover; }
.vid-thumb .vid-del { position: absolute; top: 2px; right: 2px; background: rgba(0,0,0,.6); color: #fff; border: none; border-radius: 50%; width: 18px; height: 18px; font-size: 11px; line-height: 1; cursor: pointer; }
#vidResult video { width: 100%; border-radius: 12px; max-height: 320px; background: #000; }
.vid-job { border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin-top: 8px; font-size: 12px; }
.vid-job .vj-head { display: flex; justify-content: space-between; align-items: center; }
.vid-job .vj-status { font-weight: 700; }
.vid-job .vj-status.done { color: #22c55e; }
.vid-job .vj-status.failed { color: var(--red); }

/* M10 我的行业卡片 */
.ind-card { background: linear-gradient(145deg, rgba(34,197,94,.07), rgba(34,197,94,.02)); }
.ind-card .mini-tag { color: #22c55e; background: rgba(34,197,94,.12); }
.ind-current { margin: 6px 0 2px; display: flex; flex-direction: column; gap: 2px; }
.ind-current b { font-size: 15px; }
.ind-current .fine { color: var(--muted); }
.ind-edit { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.ind-edit label { font-size: 12px; color: var(--muted); margin-top: 4px; }
.ind-edit textarea, .ind-edit select, .ind-edit input { font-size: 13px; }
.ind-edit .row { display: flex; gap: 8px; margin-top: 8px; }
.ind-card .ghost { margin-top: 10px; }

/* 📤 发布设置卡片（我的页?*/
.pub-card .card-head { margin-bottom: 4px; }
.pub-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.pub-stat { background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
.pub-stat b { display: block; font-size: 14px; margin-bottom: 2px; }
.pub-stat span { font-size: 12px; color: var(--muted); }

/* 📤 一键转发弹?*/
.share-plat { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.sp-btn {
  background: var(--panel2); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px; text-align: left; cursor: pointer; display: block;
}
.sp-btn:active { border-color: var(--brand); transform: scale(.97); }
.sp-icon { font-size: 24px; display: block; margin-bottom: 4px; }
.sp-name { display: block; font-size: 14px; font-weight: 600; color: var(--text); }
.sp-desc { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.pub-note { margin-top: 12px; font-size: 12px; color: var(--muted); background: var(--panel2); border-radius: 8px; padding: 8px 10px; line-height: 1.5; }
.pub-accts { display: flex; flex-direction: column; gap: 8px; }
.pub-acct {
  display: flex; align-items: center; gap: 8px;
  background: var(--panel2); border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 10px; font-size: 13px;
}
.pub-acct > span:first-child { flex: 1; color: var(--text); }
.pub-acct-status { font-size: 12px; color: var(--muted); white-space: nowrap; }
.pub-bind-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pub-bind { flex: 1 1 45%; }
.pub-bind .sp-icon { font-size: 18px; }
.pub-bind .sp-name { font-size: 13px; }
.pub-bind .sp-desc { font-size: 11px; }

/* ----------  ---------- */
.ac-tabs { display: flex; gap: 8px; margin: 10px 0; overflow-x: auto; padding-bottom: 2px; }
.ac-tab { flex: 1; white-space: nowrap; padding: 9px 0; border-radius: 10px; border: 1px solid var(--line, #eee);
  background: var(--card, #fff); color: var(--muted, #666); font-size: 13px; cursor: pointer; }
.ac-tab.on { background: var(--accent, #d8a24a); color: #fff; border-color: transparent; }
.ac-pane { animation: fadeIn .2s; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; } }
.ac-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ac-kpi { background: var(--card, #fff); border: 1px solid var(--line, #eee); border-radius: 12px; padding: 12px 10px; text-align: center; }
.ac-kpi .v { font-size: 20px; font-weight: 700; color: var(--text, #111); }
.ac-kpi .l { font-size: 11px; color: var(--muted, #888); margin-top: 2px; }
.ac-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line, #f0f0f0); }
.ac-row:last-child { border-bottom: none; }
.ac-row .l { color: var(--text, #111); font-size: 14px; }
.ac-row .r { color: var(--muted, #666); font-size: 13px; }
.ac-feat-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line, #f0f0f0); }
.ac-acc { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line, #f0f0f0); }
.ac-lv { font-size: 11px; padding: 2px 8px; border-radius: 20px; background: rgba(216,162,74,.15); color: #9a6b1f; }
.agent-center-entry { background: linear-gradient(135deg,#d8a24a,#c07f2e); color: #fff; border: none; border-radius: 12px; }
/* Ȩ */
.ac-rights-feats { display: flex; flex-wrap: wrap; gap: 6px; }
.ac-rf { border: 1px solid var(--line,#e5e7eb); background:#f6f8fb; border-radius: 8px; padding: 5px 9px;
  font-size: 12px; color: var(--text,#333); cursor: pointer; }
.ac-rf.off { background:#fff0f0; border-color:#f5c6c6; color:#c0392b; }
.ac-rf:disabled { opacity:.55; cursor:not-allowed; }
.mask { display:none; align-items:center; justify-content:center; position:fixed; inset:0; background:rgba(0,0,0,.45); z-index:100;
  overflow-y:auto; -webkit-overflow-scrolling:touch; padding:24px 12px; box-sizing:border-box; }
/* ݳʱauto ߾ʣռʱСʱ㣨ⶥõҹף */
.mask > .dialog { margin: auto; }
.ac-open-mask { align-items: center; justify-content: center; }
.ac-open-mask .dialog { border-radius: 16px; }
/* ꣺ɵ KPI  */
.kpi[data-drill], .ac-kpi[data-drill] { cursor: pointer; transition: transform .12s, box-shadow .12s; }
.kpi[data-drill]:active, .ac-kpi[data-drill]:active { transform: scale(.97); }
.kpi[data-drill] .kpi-label::after, .ac-kpi[data-drill] .l::after { content: ''; }
/* ϸ */
#drillMask .dialog { border-radius: 16px; }
#drillList .ac-row { padding: 10px 2px; border-bottom: 1px solid var(--line, #f0f2f6); }
#drillList .ac-row:last-child { border-bottom: 0; }
/* Agent ̨״ */
.wg-legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted,#666); margin: 8px 0; }
.wg-bars { display: flex; align-items: flex-end; gap: 4px; height: 110px; border-bottom: 1px solid var(--line,#eee); padding: 0 2px; overflow-x: auto; }
.wg-col { flex: 1; min-width: 14px; display: flex; align-items: flex-end; gap: 2px; height: 100%; }
.wg-bar { flex: 1; min-width: 5px; border-radius: 3px 3px 0 0; background: var(--accent,#d8a24a); }
.wg-day { position: absolute; transform: translate(-50%, 12px); left: 50%; font-size: 9px; color: var(--muted,#aaa); white-space: nowrap; }
.wg-col { position: relative; }
.chip.on { background: var(--accent,#d8a24a); color: #fff; border-color: transparent; }
/* Agent ̨״ */
.wg-plot { display: flex; gap: 6px; align-items: stretch; }
.wg-refs { display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; font-size: 10px; color: var(--muted,#999); min-width: 34px; padding: 2px 4px 18px 0; border-bottom: 1px solid var(--line,#eee); }
.wg-bars { flex: 1; display: flex; align-items: flex-end; gap: 4px; height: 130px; border-bottom: 1px solid var(--line,#eee); border-left: 1px solid var(--line,#eee); padding: 0 2px; overflow-x: auto; }
.wg-col { flex: 1; min-width: 16px; display: flex; align-items: flex-end; gap: 2px; height: 100%; position: relative; }
.wg-bar { position: relative; flex: 1; min-width: 5px; border-radius: 3px 3px 0 0; }
.wg-val { position: absolute; top: -16px; left: 50%; transform: translateX(-50%); font-size: 9px; color: var(--muted,#777); white-space: nowrap; }
.wg-day { position: absolute; top: calc(100% + 4px); left: 50%; transform: translateX(-50%); font-size: 9px; color: var(--muted,#aaa); white-space: nowrap; }

/* ===== custom playbook/goal editor modal ===== */
.modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: none; align-items: center; justify-content: center; z-index: 999; padding: 16px; }
.modal { background: var(--panel,#fff); border: 1px solid var(--line,#ddd); border-radius: 16px; padding: 18px; max-width: 720px; width: 100
/* ===== custom playbook/goal editor modal ===== */
.modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: none; align-items: center; justify-content: center; z-index: 999; padding: 16px; }
.modal { background: var(--panel,#fff); border: 1px solid var(--line,#ddd); border-radius: 16px; padding: 18px; max-width: 720px; width: 100%; max-height: 84vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.ce-row { margin-bottom: 12px; }
.ce-row label { display: block; font-size: 12px; color: var(--muted,#888); margin-bottom: 5px; }
.ce-row input[type="text"], .ce-row textarea, .ce-row select { width: 100%; box-sizing: border-box; background: var(--bg,#fff); border: 1px solid var(--line,#ddd); color: var(--text,#222); border-radius: 8px; padding: 9px 10px; font-size: 13px; font-family: inherit; }
.ce-row textarea { resize: vertical; min-height: 58px; }
.ce-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ce-fields { border: 1px dashed var(--line,#ccc); border-radius: 10px; padding: 10px; margin-bottom: 12px; }
.ce-fields .ce-row { margin-bottom: 8px; }
.ce-fields-grid { display: grid; grid-template-columns: 1fr 1.6fr 1fr auto; gap: 6px; align-items: center; }
.ce-fields-grid input { width: 100%; box-sizing: border-box; background: var(--bg,#fff); border: 1px solid var(--line,#ddd); color: var(--text,#222); border-radius: 7px; padding: 7px 8px; font-size: 12px; font-family: inherit; }
.ce-del { background: none; border: 1px solid rgba(255,107,107,.4); color: var(--red,#ff6b6b); border-radius: 7px; padding: 5px 9px; cursor: pointer; font-size: 12px; }
.ce-hint { font-size: 11px; color: var(--muted,#999); line-height: 1.6; margin-top: 4px; }
.ce-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.ce-actions .prev { background: var(--panel2,#eee); color: var(--text,#222); border: 1px solid var(--line,#ddd); padding: 9px 16px; border-radius: 10px; cursor: pointer; font-size: 13px; }
.ce-actions .next { background: var(--brand,#4f6ef7); color: #fff; padding: 9px 18px; border-radius: 10px; cursor: pointer; font-size: 13px; border: 0; }
.ce-delbtn { margin-right: auto; }

/* 视频模板可视化卡片（参考海报风格） */
.vid-tpl-card { transition: transform .15s, box-shadow .15s, border-color .15s; }
.vid-tpl-card:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.vid-tpl-card.on { box-shadow: 0 4px 14px rgba(255,138,61,.3); }
@media (max-width: 480px) { #vidTemplateGrid { grid-template-columns: repeat(2,1fr) !important; } }
