:root {
  /* ===== 品牌基础（全域） ===== */
  --brand-900: #1B2845;
  --brand-700: #2C3E66;
  --brand-500: #3A4F80;
  --accent: #F5A623;
  --accent-strong: #E8951A;
  --link: #2F6FD0;
  --danger: #E25A4D;

  /* ===== 语义状态（全域） ===== */
  --status-success: #18A957;  --status-success-bg: #E6F6EE;
  --status-info: #2F6FD0;    --status-info-bg: #E8F1FD;
  --status-warning: #F5A623; --status-warning-bg: #FFF4E0;
  --status-danger: #E25A4D;   --status-danger-bg: #FCEAE8;

  /* ===== 前台 fx- ===== */
  --fx-bg: #F2F4F7;
  --fx-surface: #FFFFFF;
  --fx-surface-subtle: #F5F5F7;
  --fx-border: #E3E7EE;
  --fx-text: #1B2845;
  --fx-text-muted: #6B7684;
  --fx-text-disabled: #8A94A6;

  /* ===== 后台 ad- ===== */
  --ad-sidebar-bg: #1B2845;
  --ad-sidebar-text: rgba(255,255,255,.78);
  --ad-sidebar-text-hover: #FFFFFF;
  --ad-sidebar-active: rgba(255,255,255,.12);
  --ad-content-bg: #F4F6F9;
  --ad-surface: #FFFFFF;
  --ad-surface-subtle: #F5F7FA;
  --ad-border: #E6E9F0;
  --ad-text: #1B2845;
  --ad-text-muted: #5B6573;
  --ad-text-disabled: #6B7684;

  /* ===== 排版 ===== */
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SFMono-Regular", "JetBrains Mono", "Consolas", "Menlo", "Courier New", monospace;
  --fs-xs: 12px; --fs-sm: 14px; --fs-base: 16px; --fs-md: 18px;
  --fs-lg: 20px; --fs-xl: 24px; --fs-2xl: 32px; --fs-3xl: 40px;
  --fw-regular: 400; --fw-medium: 500; --fw-semibold: 600; --fw-bold: 700;
  --lh-tight: 1.25; --lh-snug: 1.4; --lh-base: 1.5; --lh-loose: 1.8;

  /* ===== 间距 ===== */
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-6: 24px; --space-8: 32px; --space-12: 48px;

  /* ===== 圆角 ===== */
  --radius-xs: 4px; --radius-sm: 6px; --radius-md: 8px;
  --radius-lg: 12px; --radius-xl: 16px; --radius-pill: 9999px;

  /* ===== 阴影 / 层级 ===== */
  --shadow-card: 0 6px 18px rgba(27,40,69,.08);
  --shadow-card-rest: 0 1px 2px rgba(27,40,69,.04);
  --shadow-pop: 0 4px 16px rgba(27,40,69,.12);
  --shadow-modal: 0 12px 40px rgba(27,40,69,.18);
  --shadow-nav: 0 2px 8px rgba(27,40,69,.08);
  --z-nav: 50; --z-modal: 100; --z-toast: 200;

  /* ===== 断点（参考） ===== */
  --bp-sm: 640px; --bp-md: 768px; --bp-lg: 1024px; --bp-xl: 1200px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--ad-content-bg);
  color: var(--ad-text);
  font-size: 14px;
  line-height: var(--lh-base);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; cursor: pointer; }
button { font-family: inherit; }

/* ============ Layout ============ */
.admin { display: flex; min-height: 100vh; }

/* ---- Sidebar ---- */
.sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--ad-sidebar-bg);
  color: var(--ad-sidebar-text);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-brand .logo {
  width: 30px; height: 30px;
  background: var(--accent);
  color: var(--brand-900);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px;
}
.sidebar-brand .name { color: #fff; font-weight: 700; font-size: 15px; letter-spacing: .5px; }
.sidebar-brand .site { font-size: 11px; color: rgba(255,255,255,.5); margin-top: 1px; }

.nav-group { padding: 14px 12px 4px; }
.nav-group-title {
  font-size: 11px;
  color: rgba(255,255,255,.42);
  padding: 0 8px 8px;
  letter-spacing: .5px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--ad-sidebar-text);
  cursor: pointer;
  margin-bottom: 2px;
  transition: background .15s, color .15s;
  user-select: none;
}
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 1.6; }
.nav-item:hover { background: rgba(255,255,255,.06); color: var(--ad-sidebar-text-hover); }
.nav-item.active { background: var(--ad-sidebar-active); color: var(--ad-sidebar-text-hover); font-weight: 600; }
.nav-item .badge-dot {
  margin-left: auto;
  background: var(--accent);
  color: var(--brand-900);
  font-size: 10px; font-weight: 700;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: var(--radius-pill);
  display: flex; align-items: center; justify-content: center;
}
.sidebar-foot {
  margin-top: auto;
  padding: 12px;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex; align-items: center; gap: 10px;
}
.sidebar-foot .avatar {
  width: 32px; height: 32px; border-radius: var(--radius-pill);
  background: var(--brand-700); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600;
}
.sidebar-foot .who { font-size: 12px; color: rgba(255,255,255,.8); line-height: 1.3; }
.sidebar-foot .who b { color: #fff; font-weight: 600; }
.sidebar-foot .who span { color: rgba(255,255,255,.45); }

/* ---- Main ---- */
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.topbar {
  height: 56px;
  background: #fff;
  border-bottom: 1px solid var(--ad-border);
  display: flex;
  align-items: center;
  padding: 0 var(--space-6);
  gap: 16px;
  position: sticky; top: 0; z-index: var(--z-nav);
}
.topbar .crumb { font-size: 13px; color: var(--ad-text-muted); }
.topbar .crumb b { color: var(--ad-text); font-weight: 600; }
.topbar .crumb .sep { margin: 0 8px; color: var(--ad-text-disabled); }
.topbar .title { font-size: var(--fs-lg); font-weight: 600; color: var(--ad-text); }
.topbar .spacer { flex: 1; }
.topbar .env {
  font-size: 12px; color: var(--status-info);
  background: var(--status-info-bg);
  padding: 5px 10px; border-radius: var(--radius-pill); font-weight: 500;
}
.topbar .tb-avatar {
  width: 34px; height: 34px; border-radius: var(--radius-pill);
  background: var(--brand-900); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600;
  cursor: pointer;
}

.content { flex: 1; padding: var(--space-6); overflow-y: auto; }
.view { display: none; }
.view.active { display: block; }

/* ============ KPI ============ */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}
.kpi-card {
  background: var(--ad-surface);
  border: 1px solid var(--ad-border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
}
.kpi-card .k-label { font-size: 13px; color: var(--ad-text-muted); display: flex; align-items: center; gap: 6px; }
.kpi-card .k-label .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand-500); }
.kpi-card .k-value { font-size: 26px; font-weight: 700; color: var(--ad-text); margin: 8px 0 2px; letter-spacing: .3px; }
.kpi-card .k-value small { font-size: 14px; font-weight: 500; color: var(--ad-text-muted); margin-left: 2px; }
.kpi-card .k-sub { font-size: 12px; color: var(--ad-text-disabled); }
.kpi-card .k-sub .up { color: var(--status-success); font-weight: 600; }
.kpi-card .k-sub .down { color: var(--status-danger); font-weight: 600; }

/* ============ Panel ============ */
.panel {
  background: var(--ad-surface);
  border: 1px solid var(--ad-border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-6);
  overflow: hidden;
}
.panel-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--ad-border);
}
.panel-head h3 { font-size: 15px; font-weight: 600; margin: 0; }
.panel-head .sub { font-size: 12px; color: var(--ad-text-muted); }
.panel-head .spacer { flex: 1; }
.panel-body { padding: 18px; }

/* ============ Sub tabs (in-view) ============ */
.subtabs {
  display: flex; gap: 4px;
  border-bottom: 1px solid var(--ad-border);
  padding: 0 12px;
  background: var(--ad-surface);
  margin-bottom: var(--space-6);
}
.subtab {
  padding: 11px 14px;
  font-size: 13px; color: var(--ad-text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
}
.subtab:hover { color: var(--ad-text); }
.subtab.active { color: var(--ad-text); font-weight: 600; border-bottom-color: var(--brand-900); }
.subpanel { display: none; }
.subpanel.active { display: block; }

/* ============ Toolbar / Batch ============ */
.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar .spacer { flex: 1; }
.search-input {
  height: 34px; padding: 0 12px; width: 240px;
  background: var(--ad-surface-subtle);
  border: 1px solid var(--ad-border);
  border-radius: var(--radius-xs);
  font-size: 13px; outline: none; color: var(--ad-text);
}
.search-input:focus { border-color: var(--link); box-shadow: 0 0 0 2px rgba(47,111,208,.12); }
.search-input::placeholder { color: var(--ad-text-disabled); }

.filter-chip {
  height: 32px; padding: 0 12px;
  background: var(--ad-surface-subtle);
  border: 1px solid var(--ad-border);
  border-radius: var(--radius-sm);
  font-size: 13px; color: var(--ad-text); cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
.filter-chip.active { background: var(--brand-900); color: #fff; border-color: var(--brand-900); }

.batchbar {
  display: none;
  align-items: center; gap: 10px;
  background: var(--ad-surface-subtle);
  border: 1px solid var(--ad-border);
  border-radius: var(--radius-xs);
  padding: 8px 12px; margin-bottom: 12px;
  font-size: 13px;
}
.batchbar.show { display: flex; }
.batchbar .count { color: var(--ad-text); font-weight: 600; }
.batchbar .spacer { flex: 1; }

/* ============ Table ============ */
.table-wrap { overflow-x: auto; border: 1px solid var(--ad-border); border-radius: var(--radius-md); background: var(--ad-surface); }
table.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table thead th {
  background: var(--ad-surface-subtle);
  color: var(--ad-text-muted);
  font-size: 12px; font-weight: 600;
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--ad-border);
  white-space: nowrap;
}
.admin-table tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--ad-border);
  color: var(--ad-text);
  vertical-align: middle;
}
.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-table tbody tr:hover { background: #F0F3F8; }
.admin-table .col-check { width: 38px; }
.admin-table .num { font-variant-numeric: tabular-nums; }
.admin-table .muted { color: var(--ad-text-muted); }
.admin-table .mono { font-family: var(--font-mono); font-size: 12px; color: var(--brand-700); }
.row-check, .select-all { width: 15px; height: 15px; cursor: pointer; accent-color: var(--brand-900); }
.row-actions { display: flex; gap: 4px; }
.link-btn {
  background: none; border: 0; padding: 4px 8px; cursor: pointer;
  font-size: 13px; color: var(--link); border-radius: var(--radius-xs);
}
.link-btn:hover { background: var(--status-info-bg); }
.link-btn.danger { color: var(--danger); }
.link-btn.danger:hover { background: var(--status-danger-bg); }
.link-btn.ok { color: var(--status-success); }
.link-btn.ok:hover { background: var(--status-success-bg); }

/* ============ Chips ============ */
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 500;
  padding: 3px 9px; border-radius: var(--radius-pill);
  line-height: 1.4; white-space: nowrap;
}
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip-success { color: var(--status-success); background: var(--status-success-bg); }
.chip-info { color: var(--status-info); background: var(--status-info-bg); }
.chip-warning { color: #B07700; background: var(--status-warning-bg); }
.chip-danger { color: var(--status-danger); background: var(--status-danger-bg); }
.chip-type {
  color: var(--link); background: #E5F1FF;
  font-size: 12px; font-weight: 500; padding: 3px 9px; border-radius: var(--radius-pill);
}
.chip-type::before { display: none; }
.chip-mute { color: var(--ad-text-muted); background: var(--ad-surface-subtle); font-size: 12px; padding: 3px 9px; border-radius: var(--radius-pill); }
.chip-mute::before { display: none; }
/* License 风险四档：绿/黄/橙/红 —— 商业专有 = accent 橙系（令牌 5.1.4） */
.chip-accent { color: #9A5B00; background: #FFEDD6; }
/* 会员等级（令牌 8.3）：终身会员 = 深蓝底 + 金色描边 */
.chip-life { color: #FFFFFF; background: var(--brand-900); border: 1px solid var(--accent); }
.chip-life::before { background: var(--accent); }

/* ============ Buttons (rectangular, admin) ============ */
.btn {
  height: 34px; padding: 0 16px;
  border-radius: var(--radius-xs);
  font-size: 13px; font-weight: 600;
  cursor: pointer; border: 1px solid transparent;
  display: inline-flex; align-items: center; gap: 6px;
  transition: background .15s, opacity .15s, border-color .15s;
  white-space: nowrap;
}
.btn-primary { background: var(--brand-900); color: #fff; }
.btn-primary:hover { background: var(--brand-700); }
.btn-secondary { background: #fff; color: var(--ad-text); border-color: var(--ad-border); }
.btn-secondary:hover { background: var(--ad-surface-subtle); }
.btn-danger { background: #fff; color: var(--danger); border-color: var(--status-danger-bg); }
.btn-danger:hover { background: var(--status-danger-bg); }
.btn-ghost { background: var(--ad-surface-subtle); color: var(--ad-text-muted); }
.btn-ghost:hover { color: var(--ad-text); }
.btn-accent { background: var(--accent); color: var(--brand-900); }
.btn-accent:hover { background: var(--accent-strong); }
.btn-sm { height: 28px; padding: 0 12px; font-size: 12px; }

/* ============ Save status bar (config pages) ============ */
.savestatus {
  display: flex; align-items: center; gap: 10px;
  background: var(--ad-surface); border: 1px solid var(--ad-border);
  border-radius: var(--radius-md); padding: 12px 18px; margin-bottom: var(--space-6);
  font-size: 13px;
}
.savestatus .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--status-success); }
.savestatus .txt { color: var(--ad-text-muted); }
.savestatus .txt b { color: var(--ad-text); font-weight: 600; }
.savestatus .spacer { flex: 1; }
.savestatus .hint { font-size: 12px; color: var(--status-warning); background: var(--status-warning-bg); padding: 4px 10px; border-radius: var(--radius-xs); display: none; }
.savestatus.dirty .hint { display: inline-block; }

/* ============ Switch ============ */
.switch { position: relative; display: inline-block; width: 40px; height: 22px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .track {
  position: absolute; inset: 0; cursor: pointer;
  background: #CFD6E2; border-radius: var(--radius-pill); transition: .2s;
}
.switch .track::before {
  content: ""; position: absolute; height: 16px; width: 16px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: .2s;
}
.switch input:checked + .track { background: var(--status-success); }
.switch input:checked + .track::before { transform: translateX(18px); }

/* ============ Form ============ */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-size: 13px; font-weight: 500; color: var(--ad-text); }
.form-field label .req { color: var(--danger); margin-left: 2px; }
.form-field .hint { font-size: 12px; color: var(--ad-text-muted); }
.form-input, .form-select, .form-textarea {
  height: 36px; padding: 0 12px;
  background: var(--ad-surface-subtle);
  border: 1px solid var(--ad-border);
  border-radius: var(--radius-xs);
  font-size: 13px; color: var(--ad-text); outline: none; font-family: inherit;
  width: 100%;
}
.form-textarea { height: auto; padding: 10px 12px; line-height: 1.6; resize: vertical; min-height: 76px; }
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--link); box-shadow: 0 0 0 2px rgba(47,111,208,.12); background: #fff; }
.form-input::placeholder, .form-textarea::placeholder { color: var(--ad-text-disabled); }
.form-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%235B6573' stroke-width='1.4' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 30px; }

/* ============ Pricing cards ============ */
.plan-config-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.plan-config {
  background: var(--ad-surface); border: 1px solid var(--ad-border);
  border-radius: var(--radius-md); padding: 18px; display: flex; flex-direction: column;
}
.plan-config.hot { border-color: var(--brand-900); box-shadow: 0 6px 18px rgba(27,40,69,.08); }
.plan-config .flag { font-size: 11px; color: #fff; background: var(--brand-900); padding: 2px 10px; border-radius: var(--radius-pill); align-self: flex-start; margin-bottom: 10px; }
.plan-config .pname { font-size: 15px; font-weight: 600; }
.plan-config .price-row { display: flex; align-items: baseline; gap: 8px; margin: 10px 0; }
.plan-config .price-row .p { font-size: 24px; font-weight: 700; }
.plan-config .price-row .promo { font-size: 12px; color: var(--accent-strong); font-weight: 600; }
.plan-config .feat-list { list-style: none; padding: 0; margin: 8px 0 14px; flex: 1; }
.plan-config .feat-list li { font-size: 12px; color: var(--ad-text-muted); padding: 5px 0; border-bottom: 1px dashed var(--ad-border); display: flex; gap: 6px; }
.plan-config .feat-list li::before { content: "✓"; color: var(--brand-900); font-weight: 700; }
.plan-config .row2 { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-top: 1px solid var(--ad-border); font-size: 13px; }
.plan-config .row2 .sw { display: flex; align-items: center; gap: 8px; }

/* ============ List rows (ops) ============ */
.list-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border: 1px solid var(--ad-border);
  border-radius: var(--radius-md); background: var(--ad-surface); margin-bottom: 10px;
}
.list-row .handle { color: var(--ad-text-disabled); cursor: grab; }
.list-row .lr-main { flex: 1; }
.list-row .lr-main .t { font-size: 14px; font-weight: 500; }
.list-row .lr-main .d { font-size: 12px; color: var(--ad-text-muted); margin-top: 2px; }

/* ============ Modal ============ */
.modal-mask {
  position: fixed; inset: 0;
  background: rgba(27,40,69,.55);
  display: none; align-items: flex-start; justify-content: center;
  z-index: var(--z-modal); padding: 60px 20px; overflow-y: auto;
}
.modal-mask.show { display: flex; }
.modal {
  background: #fff; border-radius: var(--radius-xl);
  width: 560px; max-width: 100%;
  box-shadow: var(--shadow-modal);
  animation: modalIn .2s ease;
  margin: auto;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.modal-head {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 22px; border-bottom: 1px solid var(--ad-border);
  position: relative;
}
.modal-head h3 { font-size: var(--fs-lg); font-weight: 700; margin: 0; }
.modal-head .sub { font-size: 12px; color: var(--ad-text-muted); }
.modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 32px; height: 32px; border: 0; border-radius: var(--radius-pill);
  background: var(--ad-surface-subtle); color: var(--ad-text-muted);
  cursor: pointer; font-size: 18px; display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: #E5E9F0; color: var(--ad-text); }
.modal-body { padding: 22px; max-height: 64vh; overflow-y: auto; }
.modal-foot {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-top: 1px solid var(--ad-border);
}
.modal-foot .spacer { flex: 1; }
.field-divider { height: 1px; background: var(--ad-border); margin: 18px 0; }
.upload-drop {
  border: 1.5px dashed var(--ad-border); border-radius: var(--radius-md);
  padding: 22px; text-align: center; color: var(--ad-text-muted); font-size: 13px;
  background: var(--ad-surface-subtle); cursor: pointer;
}
.upload-drop:hover { border-color: var(--link); color: var(--link); }

/* ============ Pagination ============ */
.pagination { display: flex; align-items: center; gap: 6px; margin-top: 16px; font-size: 13px; }
.pagination .pg {
  min-width: 32px; height: 32px; padding: 0 8px;
  border: 1px solid var(--ad-border); border-radius: var(--radius-sm);
  background: #fff; color: var(--ad-text); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.pagination .pg:hover { background: var(--ad-surface-subtle); }
.pagination .pg.active { background: var(--brand-900); color: #fff; border-color: var(--brand-900); }
.pagination .pg:disabled { color: var(--ad-text-disabled); cursor: not-allowed; }
.pagination .pg-jump { display: flex; align-items: center; gap: 6px; margin-left: auto; color: var(--ad-text-muted); }
.pagination .pg-jump input { width: 48px; height: 30px; text-align: center; border: 1px solid var(--ad-border); border-radius: var(--radius-xs); font-size: 13px; }

/* ============ Toast ============ */
.toast {
  position: fixed; top: 90px; left: 50%; transform: translateX(-50%);
  background: rgba(27,40,69,.92); color: #fff;
  padding: 12px 22px; border-radius: var(--radius-pill);
  font-size: 14px; z-index: var(--z-toast);
  opacity: 0; pointer-events: none; transition: opacity .2s;
  display: flex; align-items: center; gap: 8px;
}
.toast.show { opacity: 1; }

.empty-tip { text-align: center; color: var(--ad-text-disabled); padding: 40px 0; font-size: 13px; }
.section-note { font-size: 12px; color: var(--ad-text-muted); margin: -6px 0 14px; }

/* ============ 站点设置（富文本）============ */
.site-editor-wrap { display: flex; gap: 16px; min-height: 540px; }
.site-side {
  width: 200px; flex-shrink: 0;
  background: #fff; border: 1px solid var(--ad-border);
  border-radius: var(--radius-md);
  padding: 12px;
  align-self: flex-start;
  position: sticky; top: 16px;
}
.side-group + .side-group { margin-top: 14px; }
.side-group-title { font-size: 12px; font-weight: 700; color: var(--ad-text-muted); padding: 4px 8px 6px; }
.side-item {
  padding: 8px 10px; font-size: 13px; cursor: pointer;
  border-radius: var(--radius-sm); color: var(--ad-text);
  display: flex; align-items: center; justify-content: space-between;
}
.side-item:hover { background: var(--ad-surface-subtle); }
.side-item.active { background: var(--brand-900); color: #fff; font-weight: 600; }
.side-item .badge { font-size: 11px; padding: 1px 6px; border-radius: var(--radius-pill); background: var(--ad-surface-subtle); color: var(--ad-text-muted); }
.side-item.active .badge { background: rgba(255,255,255,.18); color: #fff; }
.site-main { flex: 1; min-width: 0; }

.editor-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px;
  padding: 6px 8px; border: 1px solid var(--ad-border); border-bottom: 0;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  background: var(--ad-surface-subtle);
}
.editor-toolbar button {
  min-width: 30px; height: 28px; padding: 0 8px;
  background: transparent; border: 1px solid transparent;
  border-radius: var(--radius-sm); cursor: pointer;
  font-size: 13px; color: var(--ad-text);
  display: inline-flex; align-items: center; justify-content: center;
}
.editor-toolbar button:hover { background: #fff; border-color: var(--ad-border); }
.editor-toolbar button.active { background: var(--brand-900); color: #fff; border-color: var(--brand-900); }
.editor-toolbar .tb-sep { width: 1px; height: 18px; background: var(--ad-border); margin: 0 4px; }

.site-editor {
  min-height: 380px; padding: 16px 18px;
  border: 1px solid var(--ad-border);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  background: #fff;
  outline: none;
  font-size: 14px; line-height: 1.7; color: var(--ad-text);
  overflow-y: auto;
}
.site-editor:focus { border-color: var(--brand-700); box-shadow: 0 0 0 3px rgba(20,38,74,.08); }
.site-editor h1 { font-size: 22px; font-weight: 700; margin: 14px 0 10px; }
.site-editor h2 { font-size: 18px; font-weight: 700; margin: 12px 0 8px; }
.site-editor h3 { font-size: 15px; font-weight: 700; margin: 10px 0 6px; }
.site-editor p { margin: 8px 0; }
.site-editor ul, .site-editor ol { padding-left: 24px; margin: 8px 0; }
.site-editor img { max-width: 100%; height: auto; border-radius: var(--radius-sm); margin: 6px 0; }
.site-editor a { color: var(--link); text-decoration: underline; }

/* ============ 物流模板 ============ */
.logi-status-chip { font-size: 12px; padding: 2px 8px; border-radius: var(--radius-pill); }
.logi-status-chip.on { background: rgba(16,185,129,.12); color: var(--status-success); }
.logi-status-chip.off { background: rgba(156,163,175,.18); color: var(--ad-text-muted); }

/* ============ 账号中心 ============ */
.account-modal { max-width: 760px; }
.account-wrap { display: flex; gap: 0; min-height: 440px; }
.account-side { width: 180px; flex-shrink: 0; border-right: 1px solid var(--ad-border); padding: 16px 8px; background: var(--ad-surface-subtle); }
.account-side .side-item.active { background: var(--brand-900); color: #fff; }
.account-main { flex: 1; padding: 18px 22px; min-width: 0; }
.account-pane { display: none; }
.account-pane.active { display: block; }
.account-pane h4 { margin: 0 0 14px; font-size: 16px; font-weight: 700; }
.account-row { display: flex; gap: 12px; align-items: center; padding: 8px 0; font-size: 13px; border-bottom: 1px dashed var(--ad-border); }
.account-row .lbl { width: 90px; color: var(--ad-text-muted); }
.account-row .val { flex: 1; }
.account-row .val.mono { font-family: ui-monospace, monospace; }
.account-qr {
  width: 168px; height: 168px;
  background: #fff;
  border: 1px solid var(--ad-border);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  margin: 8px auto;
}
.account-foot {
  margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--ad-border);
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.account-foot .left { font-size: 12px; color: var(--ad-text-muted); }
.account-foot .right { display: flex; gap: 8px; }
.scan-tip { text-align: center; font-size: 12px; color: var(--ad-text-muted); margin-top: 6px; }
.scan-count { text-align: center; font-size: 12px; color: var(--brand-700); margin-top: 6px; font-weight: 600; }

/* ============ SKU 多图/多规格/售后多选 ============ */
.sku-img-list {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px;
  margin-top: 8px;
}
.sku-img-slot {
  position: relative;
  aspect-ratio: 1 / 1;
  border: 1px dashed var(--ad-border);
  border-radius: var(--radius-sm);
  background: var(--ad-surface-subtle);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.sku-img-slot img { width: 100%; height: 100%; object-fit: cover; }
.sku-img-slot .del {
  position: absolute; top: 2px; right: 2px;
  width: 20px; height: 20px; line-height: 18px; text-align: center;
  background: rgba(0,0,0,.6); color: #fff; border-radius: 50%;
  font-size: 14px; cursor: pointer; user-select: none;
}
.sku-img-empty {
  font-size: 12px; color: var(--ad-text-disabled);
}
.checkbox-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px;
  margin-top: 6px;
}
.checkbox-item {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--ad-text); cursor: pointer;
  padding: 4px 0;
}
.checkbox-item input { width: 14px; height: 14px; accent-color: var(--brand-900); }
.sku-attr-list {
  display: flex; flex-direction: column; gap: 8px; margin-top: 6px;
}
.sku-attr-row {
  display: grid; grid-template-columns: 1.2fr 1.5fr 1fr 0.8fr 32px; gap: 8px; align-items: center;
}
.sku-attr-row .attr-del {
  width: 28px; height: 32px; border: 1px solid var(--ad-border);
  background: #fff; border-radius: var(--radius-sm); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--ad-text-muted);
}
.sku-attr-row .attr-del:disabled { opacity: .4; cursor: not-allowed; }
.sku-img-input {
  font-size: 12px; padding: 6px 8px;
  border: 1px solid var(--ad-border); border-radius: var(--radius-sm);
  background: #fff; cursor: pointer;
}
.sku-img-mini {
  width: 28px; height: 28px; border-radius: 4px;
  background-size: cover; background-position: center;
  background-color: var(--ad-surface-subtle);
  border: 1px solid var(--ad-border);
}

/* ============ 首页广告卡管理 ============ */
.promo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.promo-card-edit {
  background: #fff; border: 1px solid var(--ad-border);
  border-radius: var(--radius-md); padding: 12px;
}
.promo-card-edit.off { opacity: .55; }
.promo-card-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.promo-card-head .idx { font-size: 12px; font-weight: 700; color: var(--ad-text-muted); }
.promo-preview {
  position: relative; width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px dashed var(--ad-border);
  border-radius: var(--radius-sm);
  background: var(--ad-surface-subtle);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  margin-bottom: 10px;
}
.promo-preview img { width: 100%; height: 100%; object-fit: cover; }
.promo-preview .tip { font-size: 12px; color: var(--ad-text-disabled); }
.promo-preview .tip b { display: block; font-size: 13px; color: var(--ad-text-muted); margin-top: 2px; }
.promo-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.promo-row .form-input, .promo-row .form-select { flex: 1; }
.promo-row .lbl { font-size: 12px; color: var(--ad-text-muted); width: 56px; flex-shrink: 0; }
.promo-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.switch-mini { display: flex; align-items: center; gap: 6px; font-size: 12px; cursor: pointer; }
.switch-mini input { width: 16px; height: 16px; accent-color: var(--brand-900); }

/* ============ VIP 套餐卡片操作 ============ */
.plan-actions {
  display: flex; gap: 6px; justify-content: flex-end;
  margin-top: 10px; padding-top: 10px;
  border-top: 1px dashed var(--ad-border);
}

/* ============ 字段状态 ============ */
.form-input[readonly], .form-select[disabled] { background: var(--ad-surface-subtle); color: var(--ad-text-muted); }
.muted { color: var(--ad-text-muted); }
