:root {
  /* 品牌暖色 · 默认主题 */
  --cream: #fff8ef;
  --orange: #ff7414;
  --orange2: #ff7615;
  --brown: #2d1a12;
  --brown2: #321c12;
  --muted: #8a7264;
  --muted2: #b19b8c;
  --line: #f0dbc6;
  --line2: #f5dcc4;
  --card: rgba(255, 255, 255, 0.92);
  --shadow: 0 14px 38px rgba(101, 65, 28, 0.08);
  --green: #16a34a;
  --red: #dc2626;
  --sidebar: 260px;
  --sidebar-pad-x: 16px;
  --sidebar-pad-y: 20px;
  --nav-group-gap: 18px;
  --nav-item-gap: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --page-gap: 20px;
  --accent-bg: #fff5e9;
  --accent-bg-soft: #fff1e6;
  --accent-bg-alt: #fff8ef;
  --surface-table-head: #fffaf3;
  --surface-row-hover: #fff8ef;
  --surface-card-from: #fffdfa;
  --surface-card-to: #fff8ef;
  --accent-border-hover: #ffc89a;
  --banner-border: #f0c9a0;
  --banner-grad-from: #fff8ef;
  --banner-grad-to: #fff3e4;
  --banner-text: #8a4b12;
  --btn-grad-from: #ff9d2e;
  --btn-grad-to: #ff7414;
  --body-grad-from: #fff6ea;
  --body-grad-mid: #fffaf4;
  --avatar-grad-from: #ffe9cc;
  --avatar-grad-to: #ffd4a8;
  --skeleton-base: #f5ebe0;
  --skeleton-shine: #fff8ef;
  --overlay-backdrop: rgba(45, 26, 18, 0.45);
  --tooltip-bg: rgba(45, 26, 18, 0.92);
  --shadow-ui: rgba(45, 26, 18, 0.08);
  --focus-ring: rgba(255, 122, 26, 0.15);
  --accent-tint-06: rgba(255, 122, 26, 0.06);
  --accent-tint-10: rgba(255, 122, 26, 0.1);
  --accent-tint-12: rgba(255, 122, 26, 0.12);
  --accent-shadow-sm: rgba(255, 122, 26, 0.08);
  --accent-shadow-md: rgba(255, 122, 26, 0.12);
  --accent-shadow-lg: rgba(255, 122, 26, 0.28);
  --accent-inset: rgba(255, 122, 26, 0.25);
  --select-bg: #fff;
  --select-bg-hover: var(--surface-row-hover);
  --select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238a7264' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, sans-serif;
  color: var(--brown);
  background: linear-gradient(180deg, var(--body-grad-from) 0%, var(--body-grad-mid) 45%, #fff 100%);
  min-height: 100vh;
}
.hide { display: none !important; }

/* 本地有 token 时：pending 仅隐藏登录框；验证通过设为 ok 后再显示后台壳，避免错 tab 闪烁 */
html[data-pgm-authed="pending"] #installBox,
html[data-pgm-authed="pending"] #loginBox { display: none !important; }
html[data-pgm-authed="ok"] #installBox,
html[data-pgm-authed="ok"] #loginBox { display: none !important; }
html[data-pgm-authed="ok"] #adminApp { display: flex !important; }

/* 刷新时按 hash 预选 tab / 子视图，避免右侧内容先显示 HTML 默认页再跳转 */
html[data-pgm-boot-tab]:not([data-pgm-boot-tab="dashboard"]) #tab-dashboard { display: none !important; }
html[data-pgm-boot-tab="users"] #tab-users.hide,
html[data-pgm-boot-tab="admins"] #tab-admins.hide,
html[data-pgm-boot-tab="app"] #tab-app.hide,
html[data-pgm-boot-tab="recommend"] #tab-recommend.hide,
html[data-pgm-boot-tab="recommend-stats"] #tab-recommend-stats.hide,
html[data-pgm-boot-tab="theme"] #tab-theme.hide,
html[data-pgm-boot-tab="miniprogram-release"] #tab-miniprogram-release.hide {
  display: flex !important;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
html[data-pgm-boot-tab="miniprogram-changelog"] #tab-miniprogram-changelog.hide {
  display: flex !important;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: auto;
}
.miniprogram-preview-panel,
.mpi-preview {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-top: 14px;
  padding: 14px;
  border-radius: var(--radius-md, 12px);
  border: 1px dashed var(--line, #e8dfd4);
  background: var(--banner-grad-from, #fffaf3);
}
.miniprogram-preview-qrcode,
.mpi-preview__qr {
  width: 200px;
  height: 200px;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
  padding: 6px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}
.mpi-preview__meta { margin: 0; font-size: 12px; line-height: 1.5; }

.mpi-page { display: flex; flex-direction: column; gap: 12px; }

.mpi-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.mpi-head__title { margin: 0; font-size: 18px; font-weight: 700; color: var(--brown); }
.mpi-head__sub { margin: 4px 0 0; font-size: 13px; color: var(--muted); line-height: 1.45; }
.mpi-head > .btn { flex-shrink: 0; margin: 0; }

.mpi-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.mpi-step {
  position: relative;
  padding: 10px 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  text-align: center;
}
.mpi-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -9px;
  width: 8px;
  height: 2px;
  background: var(--line);
  transform: translateY(-50%);
  z-index: 1;
}
.mpi-step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-bottom: 4px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: var(--cream, #f5efe6);
  color: var(--muted);
}
.mpi-step__title { display: block; font-size: 12px; font-weight: 700; color: var(--brown); }
.mpi-step__sub { display: block; margin-top: 2px; font-size: 11px; color: var(--muted); line-height: 1.3; }
.mpi-step--active {
  border-color: var(--orange);
  box-shadow: 0 0 0 2px var(--accent-tint-12, rgba(232, 107, 23, 0.12));
}
.mpi-step--active .mpi-step__num { background: var(--orange); color: #fff; }
.mpi-step--done { border-color: #86efac; background: linear-gradient(180deg, #f6fff9, #fff); }
.mpi-step--done .mpi-step__num { background: #22c55e; color: #fff; }
.mpi-step--done:not(:last-child)::after { background: #86efac; }
.mpi-step--error { border-color: #fca5a5; background: #fff7f7; }
.mpi-step--error .mpi-step__num { background: #ef4444; color: #fff; }

.mpi-alert,
.mpi-banner {
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-line;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--brown);
}
.mpi-alert.is-warn,
.mpi-banner.is-warn { border-color: #fcd34d; background: #fffbeb; color: #92400e; }
.mpi-alert.is-error,
.mpi-banner.is-error { border-color: #fca5a5; background: #fef2f2; color: #991b1b; }
.mpi-alert.is-ok,
.mpi-banner.is-ok { border-color: #86efac; background: #f0fdf4; color: #166534; }

.mpi-card { margin: 0; padding: 0; overflow: hidden; }
.mpi-card--step { padding: 0; }
.mpi-card--active {
  border-color: var(--orange);
  box-shadow: 0 0 0 2px var(--accent-tint-12, rgba(232, 107, 23, 0.1));
}
.mpi-card--done { border-color: #d1fae5; }
.mpi-card--locked { opacity: 0.72; }
.mpi-card__summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.mpi-card__summary--static { cursor: default; }
.mpi-card__summary::-webkit-details-marker { display: none; }
.mpi-card__badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: var(--cream, #f5efe6);
  color: var(--muted);
}
.mpi-card--active .mpi-card__badge,
.mpi-card--step.mpi-card--active .mpi-card__badge { background: var(--orange); color: #fff; }
.mpi-card--done .mpi-card__badge { background: #22c55e; color: #fff; }
.mpi-card__head { flex: 1 1 auto; min-width: 0; }
.mpi-card__title { display: block; font-size: 15px; font-weight: 700; color: var(--brown); }
.mpi-card__desc { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); line-height: 1.4; }
.mpi-card__body {
  padding: 0 16px 16px;
  border-top: 1px solid var(--line2, #efe6d8);
}
.mpi-card > .mpi-card__body { border-top: none; padding-top: 0; }
details.mpi-card > .mpi-card__body { padding-top: 14px; }
details.mpi-card:not([open]) > .mpi-card__body { display: none; }

.mpi-card--step > .mpi-card__summary--static {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line2, #efe6d8);
}
.mpi-card--step > .mpi-card__body {
  padding: 14px 16px 16px;
  border-top: none;
}

.mpi-pill {
  flex: 0 0 auto;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: #fef3c7;
  color: #92400e;
}
.mpi-pill.is-ok { background: #dcfce7; color: #166534; }

.mpi-checklist {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mpi-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--brown);
}
.mpi-check em { margin-left: 6px; font-style: normal; font-size: 12px; color: #b45309; }
.mpi-check__icon {
  flex: 0 0 auto;
  width: 18px;
  text-align: center;
  font-weight: 700;
  color: var(--muted);
}
.mpi-check--done .mpi-check__icon { color: #16a34a; }
.mpi-check--pending .mpi-check__icon { color: #b45309; }
.mpi-check--optional { color: var(--muted); }

.mpi-nested {
  margin-bottom: 12px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--line2, #efe6d8);
  background: var(--cream, #faf6f0);
}
.mpi-nested__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--brown);
  list-style: none;
}
.mpi-nested__summary::-webkit-details-marker { display: none; }
.mpi-nested[open] .mpi-note { margin: 10px 0; }
.mpi-nested[open] .field { margin-top: 0; }

.mpi-nested-block {
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--line2, #efe6d8);
  background: #fff;
}
.mpi-nested-block__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.mpi-nested-block__label { font-size: 13px; font-weight: 600; color: var(--brown); }
.mpi-nested-block__text { margin: 0; font-size: 12px; line-height: 1.5; color: var(--muted); }
.mpi-nested-block__text.warn { color: #b45309; }

.mpi-inline-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.mpi-domain-details {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}
.mpi-domain-details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--brown);
}
.mpi-domain-grid {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}
.mpi-domain-block__label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--brown);
  margin-bottom: 4px;
}
.mpi-domain-block p {
  margin: 0;
  line-height: 1.6;
  word-break: break-all;
}
.mpi-domain-block code {
  display: inline-block;
  margin: 0 6px 4px 0;
  padding: 1px 6px;
  border-radius: 4px;
  background: #fff7ed;
  font-size: 11px;
}

.mpi-note {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}

.mpi-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: var(--cream);
  color: var(--muted);
}
.mpi-badge.is-ok { background: #dcfce7; color: #166534; }
.mpi-badge.is-warn { background: #fef3c7; color: #92400e; }

.mpi-fields { margin-top: 0; }
.mpi-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.mpi-actions--split {
  align-items: center;
  justify-content: space-between;
}
.mpi-actions__primary { display: flex; flex-wrap: wrap; gap: 10px; }

.mpi-inline-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--cream, #faf6f0);
}
.mpi-inline-row__main { flex: 1 1 200px; min-width: 0; }
.mpi-inline-row__label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.mpi-inline-row__value { margin: 0; font-size: 13px; font-weight: 600; color: var(--brown); line-height: 1.45; }
.mpi-inline-row__value.warn { color: #b45309; }

.mpi-category__advanced { margin-top: 10px; }
.mpi-category__advanced summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--muted);
  user-select: none;
}
.mpi-category__advanced .mpi-fields { margin-top: 10px; }

@media (max-width: 640px) {
  .mpi-flow { grid-template-columns: 1fr; }
  .mpi-step::after { display: none !important; }
  .mpi-actions--split { flex-direction: column; align-items: stretch; }
  .mpi-actions__primary { width: 100%; }
  .mpi-actions__primary .btn { flex: 1 1 auto; }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* 小程序更新日志 */
.cl-root,
.mp-changelog-root { padding-bottom: 12px; }
.cl-loading { padding: 24px; text-align: center; }

.cl { display: flex; flex-direction: column; gap: 14px; max-width: 1080px; }

.cl-hero { margin: 0; padding: 18px 20px; }
.cl-hero__top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px 24px;
}
.cl-hero__title { margin: 0 0 4px; font-size: 20px; line-height: 1.3; color: var(--brown); }
.cl-hero__desc { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.55; max-width: 520px; }
.cl-hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.cl-stat {
  min-width: 96px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fffdf9;
}
.cl-stat__label { display: block; font-size: 11px; color: var(--muted); margin-bottom: 2px; }
.cl-stat__value { font-size: 15px; color: var(--brown); font-weight: 700; }

.cl-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.cl-search-wrap { flex: 1 1 200px; min-width: 180px; }
.cl-search {
  width: 100%;
  padding: 9px 12px 9px 34px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238a7264' stroke-width='2'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='M11 11l3 3'/%3E%3C/svg%3E") 10px center no-repeat;
  font-size: 13px;
  color: var(--brown);
}
.cl-search:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px var(--accent-tint-12, rgba(232, 107, 23, 0.12));
}
.cl-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.cl-filter {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  transition: border-color .15s, color .15s, background .15s;
}
.cl-filter:hover { border-color: var(--orange); color: var(--orange); }
.cl-filter.is-active {
  border-color: var(--orange);
  background: var(--primary-soft, #fff5eb);
  color: var(--orange);
  font-weight: 600;
}
.cl-expand-all { margin-left: auto; white-space: nowrap; }

.cl-body {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.cl-rail {
  position: sticky;
  top: 12px;
  margin: 0;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}
.cl-rail__btn {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  gap: 2px 8px;
  align-items: center;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s, border-color .15s;
}
.cl-rail__btn:hover { background: var(--cream, #faf6f0); }
.cl-rail__btn.is-active {
  background: var(--primary-soft, #fff5eb);
  border-color: rgba(232, 107, 23, 0.35);
}
.cl-rail__btn--hidden { display: none; }
.cl-rail__ver {
  grid-row: 1 / 3;
  font-size: 13px;
  font-weight: 700;
  color: var(--orange);
  line-height: 1.2;
}
.cl-rail__name {
  font-size: 12px;
  color: var(--brown);
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cl-rail__date {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

.cl-feed { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.cl-empty {
  padding: 32px 20px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 14px;
  color: var(--muted);
  font-size: 13px;
}
.cl-empty p { margin: 0; }

.cl-card {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05);
  scroll-margin-top: 16px;
  transition: box-shadow .2s, border-color .2s;
}
.cl-card--hidden { display: none; }
.cl-card--latest {
  border-color: rgba(232, 107, 23, 0.45);
  box-shadow: 0 8px 28px rgba(232, 107, 23, 0.1);
}
.cl-card__toggle {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}
.cl-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
}
.cl-card__head-main { flex: 1; min-width: 0; }
.cl-card__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.cl-card__version {
  font-size: 18px;
  font-weight: 800;
  color: var(--brown);
  letter-spacing: -0.02em;
}
.cl-card__title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  color: var(--brown);
  line-height: 1.35;
}
.cl-card__summary {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
}
.cl-card:not([data-expanded="true"]) .cl-card__summary {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cl-card__head-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}
.cl-card__date { font-size: 12px; color: var(--muted); white-space: nowrap; }
.cl-card__chev {
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform .2s;
}
.cl-card[data-expanded="true"] .cl-card__chev { transform: rotate(-135deg); margin-top: 4px; }

.cl-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.cl-tag--feature { background: #eef8f1; color: #5f9f6d; }
.cl-tag--commerce { background: #fff4e8; color: var(--orange); }
.cl-tag--foundation { background: #eef4ff; color: #3d7fd6; }
.cl-tag--ops { background: #f4f0ff; color: #8b5cf6; }
.cl-badge-latest {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  background: var(--orange);
  color: #fff;
}

.cl-card__body {
  display: none;
  padding: 0 18px 16px;
  border-top: 1px solid var(--line);
  background: #fffdf9;
}
.cl-card[data-expanded="true"] .cl-card__body { display: block; }

.cl-items {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}
.cl-item {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 8px 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid rgba(240, 219, 198, 0.85);
}
.cl-item__label {
  font-size: 12px;
  font-weight: 700;
  color: var(--orange);
  line-height: 1.45;
}
.cl-item__text { margin: 0; font-size: 13px; line-height: 1.55; color: var(--brown); }
.cl-item__list { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.55; color: var(--brown); }
.cl-item__list li { margin: 4px 0; }

.cl-footnote {
  margin: 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--cream, #faf6f0);
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

@media (max-width: 900px) {
  .cl-body { grid-template-columns: 1fr; }
  .cl-rail {
    position: sticky;
    top: 0;
    z-index: 2;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    max-height: none;
    padding: 8px;
    gap: 6px;
  }
  .cl-rail__btn {
    flex: 0 0 auto;
    min-width: 140px;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
  }
  .cl-rail__ver { grid-row: auto; grid-column: 1; }
  .cl-expand-all { margin-left: 0; width: 100%; }
  .cl-toolbar { flex-direction: column; align-items: stretch; }
}
@media (max-width: 640px) {
  .cl-item { grid-template-columns: 1fr; gap: 4px; }
  .cl-hero__stats { width: 100%; }
  .cl-stat { flex: 1; min-width: 0; }
}

html[data-pgm-boot-tab="onboard"] #tab-onboard.hide,
html[data-pgm-boot-tab="tenants"] #tab-tenants.hide {
  display: flex !important;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
html[data-pgm-boot-users-view="pets"] #umViewUsers,
html[data-pgm-boot-users-view="records"] #umViewUsers,
html[data-pgm-boot-users-view="reminders"] #umViewUsers,
html[data-pgm-boot-users-view="audit"] #umViewUsers { display: none !important; }
html[data-pgm-boot-users-view="pets"] #umViewPets,
html[data-pgm-boot-users-view="records"] #umViewRecords,
html[data-pgm-boot-users-view="reminders"] #umViewReminders,
html[data-pgm-boot-users-view="audit"] #umViewAudit { display: flex !important; flex-direction: column; flex: 1 1 auto; min-height: 0; overflow: hidden; }
html[data-pgm-boot-admins-view="log"] #adminsViewAccounts,
html[data-pgm-boot-admins-view="security"] #adminsViewAccounts { display: none !important; }
html[data-pgm-boot-admins-view="log"] #adminsViewLog,
html[data-pgm-boot-admins-view="security"] #adminsViewSecurity { display: flex !important; flex-direction: column; flex: 1 1 auto; min-height: 0; overflow: hidden; }
html[data-pgm-boot-admins-view="security"] #adminsViewSecurity { align-items: flex-start; }
html[data-pgm-boot-app] #tab-app .settings-module { display: none !important; }
html[data-pgm-boot-app="base"] #tab-app .settings-module[data-app-module="base"],
html[data-pgm-boot-app="home"] #tab-app .settings-module[data-app-module="home"],
html[data-pgm-boot-app="growth"] #tab-app .settings-module[data-app-module="growth"],
html[data-pgm-boot-app="reminders"] #tab-app .settings-module[data-app-module="reminders"],
html[data-pgm-boot-app="me"] #tab-app .settings-module[data-app-module="me"],
html[data-pgm-boot-app="pet"] #tab-app .settings-module[data-app-module="pet"],
html[data-pgm-boot-app="help"] #tab-app .settings-module[data-app-module="help"],
html[data-pgm-boot-app="advanced"] #tab-app .settings-module[data-app-module="advanced"] { display: block !important; }

/* 路由与配置就绪后再显示右侧内容，避免骨架屏 / 表单填充闪烁 */
#adminApp:not(.shell--ready) .main { visibility: hidden; }

.muted { color: var(--muted); font-size: 13px; line-height: 1.55; }
.error { color: var(--red); font-size: 13px; margin-top: 10px; }
.ok-msg { color: var(--green); font-size: 13px; margin-top: 10px; }

.media-storage-status {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.5;
}
.media-storage-status__label { color: var(--muted); }
.media-storage-status__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.media-storage-status__dot--ok { background: #22c55e; box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.22); }
.media-storage-status__dot--warn { background: #f59e0b; box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.22); }
.media-storage-status__dot--error { background: #ef4444; box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.22); }
.media-storage-status__text { font-weight: 600; }
.media-storage-status__text--ok { color: #15803d; }
.media-storage-status__text--warn { color: #b45309; }
.media-storage-status__text--error { color: #b91c1c; }
.media-storage-status__meta { color: var(--muted); font-size: 13px; font-weight: 400; }

/* 内容区 · 统一提示语 */
.page-intro {
  margin: 0;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--banner-border);
  background: linear-gradient(180deg, var(--banner-grad-from), var(--banner-grad-to));
  color: var(--banner-text);
  font-size: 13px;
  line-height: 1.55;
}
.panel-hint {
  margin: -6px 0 14px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
}
.field-hint {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted2);
}
.hint-details {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--muted);
}
.hint-details summary {
  cursor: pointer;
  color: var(--orange);
  font-weight: 600;
  user-select: none;
  list-style: none;
}
.hint-details summary::-webkit-details-marker { display: none; }
.hint-details[open] summary { margin-bottom: 8px; }
.hint-details p { margin: 0 0 8px; }
.hint-details p:last-child { margin-bottom: 0; }

.panel > h3 + p.muted:not([id]):not(.ok-msg),
.panel > h3 + .panel-hint {
  margin: -6px 0 14px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
}
.panel-users__head p.muted,
.panel-users__head .panel-hint {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted2);
}
.field > p.muted,
.field > span.muted:not(.sensitive-input__hint),
label.field > span.muted:last-of-type {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted2);
}

/* 登录 / 安装 · 主流交互 */
.auth-page {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 32px 20px;
  background: linear-gradient(180deg, var(--body-grad-from) 0%, var(--body-grad-mid) 45%, #fff 100%);
}
.auth-page__glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 45% at 50% 0%, rgba(255, 157, 46, 0.16), transparent 60%),
    radial-gradient(ellipse 40% 35% at 80% 90%, rgba(255, 116, 20, 0.08), transparent 55%);
}
.auth-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  padding: 32px 32px 28px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 64px var(--shadow-ui), 0 0 0 1px rgba(255, 255, 255, 0.65) inset;
}
.auth-card--wide { max-width: 440px; }
.auth-card__header {
  margin-bottom: 24px;
  text-align: center;
}
.auth-card__header--login {
  margin-bottom: 20px;
}
.auth-card__header--login .auth-card__title {
  margin-top: 0;
}
.auth-card__logo {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  border-radius: 14px;
  background: var(--accent-bg);
  border: 1px solid var(--banner-border);
  box-shadow: 0 8px 24px var(--accent-shadow-sm);
  font-size: 26px;
  line-height: 1;
}
.auth-card__eyebrow {
  display: inline-block;
  margin: 0 0 8px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-bg);
  border: 1px solid var(--banner-border);
  color: var(--banner-text);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.auth-card__title {
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.03em;
  color: var(--brown2);
}
.auth-card__hint {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}
.auth-card__note {
  margin: -6px 0 0;
  min-height: 18px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted2);
}
.auth-card__note.error { color: var(--red); }

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 20px;
  padding: 4px;
  border-radius: var(--radius-md);
  background: var(--accent-bg-alt);
  border: 1px solid var(--line);
}
.auth-tabs__btn {
  height: 38px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.auth-tabs__btn:hover { color: var(--brown); }
.auth-tabs__btn.active {
  background: #fff;
  color: var(--brown2);
  box-shadow: 0 2px 8px var(--shadow-ui);
}
.auth-tabs__btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.auth-panel { animation: auth-panel-in .22s ease; }
@keyframes auth-panel-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
  padding: 11px 12px;
  border-radius: var(--radius-md);
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 13px;
  line-height: 1.5;
}
.auth-alert__icon {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-form { display: grid; gap: 14px; }
.auth-form__extras {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -2px 0 2px;
}
.auth-link {
  padding: 0;
  border: none;
  background: none;
  color: var(--orange);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: color .15s ease;
}
.auth-link:hover { color: var(--orange2); text-decoration: underline; }
.auth-link:focus-visible {
  outline: none;
  border-radius: 4px;
  box-shadow: 0 0 0 3px var(--focus-ring);
}
.auth-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--muted);
  user-select: none;
}
.auth-check input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--orange);
  cursor: pointer;
}

.auth-field {
  display: grid;
  gap: 6px;
  margin: 0;
}
.auth-field__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--brown);
}
.auth-field__optional {
  font-weight: 500;
  color: var(--muted2);
}

.auth-input {
  position: relative;
  display: flex;
  align-items: center;
}
.auth-input__icon {
  position: absolute;
  left: 13px;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--muted2);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
  transition: stroke .15s ease;
}
.auth-input:focus-within .auth-input__icon { stroke: var(--orange); }
.auth-input input {
  width: 100%;
  height: 44px;
  padding: 0 14px 0 40px;
  border: 1px solid var(--line2);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-family: inherit;
  color: var(--brown);
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.auth-input input::placeholder { color: var(--muted2); }
.auth-input input:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px var(--focus-ring);
}
.auth-input:has(.auth-input__toggle) input { padding-right: 42px; }
.auth-input--captcha input { padding-left: 40px; padding-right: 14px; }
.auth-input__toggle {
  position: absolute;
  right: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--muted2);
  cursor: pointer;
  transition: color .15s ease, background .15s ease;
}
.auth-input__toggle:hover {
  color: var(--brown);
  background: var(--accent-bg-alt);
}
.auth-input__toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--focus-ring);
}
.auth-input__eye {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-captcha { display: grid; gap: 6px; }
.auth-captcha__row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}
.auth-captcha__img-btn {
  padding: 0;
  border: 1px solid var(--line2);
  border-radius: var(--radius-md);
  background: #fff;
  cursor: pointer;
  line-height: 0;
  overflow: hidden;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.auth-captcha__img-btn:hover {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px var(--focus-ring);
}
.auth-captcha__img-btn img { display: block; width: 128px; height: 44px; }

.auth-submit {
  width: 100%;
  height: 44px;
  margin-top: 2px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-md);
}
.auth-submit:disabled {
  opacity: 0.72;
  cursor: not-allowed;
}
.auth-submit--loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}
.auth-submit--loading::after {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin-refresh .7s linear infinite;
}

.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0 0 16px;
  padding: 0;
  border: none;
  background: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: color .15s ease;
}
.auth-back svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.auth-back:hover { color: var(--brown); }
.auth-back:focus-visible {
  outline: none;
  border-radius: 4px;
  box-shadow: 0 0 0 3px var(--focus-ring);
}
.auth-forgot__title {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 800;
  color: var(--brown2);
}
.auth-forgot__lead {
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}
.auth-forgot__cards {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}
.auth-forgot__card {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--accent-bg-alt);
}
.auth-forgot__card-title {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--brown);
}
.auth-forgot__card-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}
.auth-forgot__note {
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--banner-border);
  background: var(--accent-bg);
  font-size: 12px;
  line-height: 1.55;
  color: var(--banner-text);
}

html[data-theme="neutral"] .auth-page__glow {
  background:
    radial-gradient(ellipse 60% 45% at 50% 0%, rgba(59, 130, 246, 0.14), transparent 60%),
    radial-gradient(ellipse 40% 35% at 80% 90%, rgba(37, 99, 235, 0.07), transparent 55%);
}

@media (max-width: 480px) {
  .auth-page { padding: 24px 16px; }
  .auth-card { padding: 24px 20px 22px; border-radius: 16px; }
  .auth-card__title { font-size: 22px; }
  .auth-captcha__row { grid-template-columns: 1fr; }
  .auth-captcha__img-btn { justify-self: start; }
}

/* 布局 · 主流后台壳层 */
.shell { display: flex; min-height: 100vh; background: var(--body-grad-from); }
.sidebar {
  width: var(--sidebar);
  flex-shrink: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 248, 239, 0.9));
  border-right: 1px solid var(--line);
  padding: var(--sidebar-pad-y) var(--sidebar-pad-x);
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 60;
}
.brand {
  padding: 6px 10px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.brand__icon {
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--accent-bg);
}
.brand__text { min-width: 0; }
.brand h1 { margin: 0; font-size: 17px; line-height: 1.25; color: var(--brown2); font-weight: 700; }
.brand p { margin: 4px 0 0; font-size: 11px; line-height: 1.4; color: var(--muted); }
.nav {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: var(--nav-group-gap);
  padding: 2px 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--line2) transparent;
}
.nav::-webkit-scrollbar { width: 5px; }
.nav::-webkit-scrollbar-thumb { background: var(--line2); border-radius: 99px; }
.nav button {
  border: 0;
  background: transparent;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  width: 100%;
  min-height: 40px;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--muted);
  cursor: pointer;
  transition: background .15s, color .15s, box-shadow .15s;
}
.nav button:hover { background: var(--surface-row-hover); color: var(--brown); }
.nav button.active {
  background: var(--accent-bg);
  color: var(--orange);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--accent-border-hover);
}
.nav button.active::before { display: none; }
.nav__icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.92;
}
.sidebar-foot {
  flex-shrink: 0;
  padding: 14px 6px 2px;
  border-top: 1px solid var(--line);
  margin-top: 4px;
}
.sidebar-foot__pill { width: 100%; text-align: center; font-weight: 600; }
.sidebar-foot__actions { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.sidebar-foot__btn { width: 100%; }
.pill {
  display: inline-block;
  border-radius: 999px;
  background: var(--accent-bg-soft);
  color: var(--orange);
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
}

.main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--body-grad-mid);
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.6);
}
.topbar__left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.topbar__main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.topbar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.topbar__hint { font-size: 12px; max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.topbar h2 { margin: 0; font-size: 18px; font-weight: 700; color: var(--brown2); letter-spacing: -0.01em; }
.topbar-icon-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
}
.topbar-icon-btn:hover { background: var(--surface-row-hover); border-color: var(--line); }
.topbar-icon-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.topbar-icon-btn.is-loading svg { animation: spin-refresh .8s linear infinite; }
@keyframes spin-refresh { to { transform: rotate(360deg); } }
.sidebar-collapse-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  cursor: pointer;
}
.sidebar-collapse-btn:hover { background: var(--surface-row-hover); color: var(--brown); }
.sidebar-collapse-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.shell.sidebar-collapsed .sidebar-collapse-btn svg { transform: rotate(180deg); }

.content {
  padding: var(--page-gap) 24px 88px;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: var(--page-gap);
}
.content > section[id^="tab-"]:not(.hide) {
  display: flex;
  flex-direction: column;
  gap: var(--page-gap);
  flex: 1;
  min-height: 0;
}

.topbar-user { position: relative; }
.topbar-user__trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  color: var(--brown);
  transition: background .15s, border-color .15s;
}
.topbar-user__trigger:hover { background: var(--surface-row-hover); border-color: var(--line2); }
.topbar-user__avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, var(--btn-grad-from), var(--btn-grad-to));
  color: #fff; font-weight: 700; font-size: 13px;
  display: inline-flex; align-items: center; justify-content: center;
}
.topbar-user__name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-user__chevron {
  width: 14px; height: 14px; stroke: var(--muted); fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.topbar-user__dropdown {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 160px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(45,26,18,.12); padding: 6px; z-index: 200;
}
.topbar-user__role { font-size: 11px; padding: 6px 10px 4px; }
.topbar-user__item {
  display: block; width: 100%; text-align: left;
  border: 0; background: transparent; cursor: pointer;
  padding: 8px 10px; border-radius: 8px; font-size: 13px; color: var(--brown);
  font-family: inherit;
}
.topbar-user__item:hover { background: var(--accent-bg); }
.topbar-user__item--danger { color: var(--red); }

.shell.sidebar-collapsed { --sidebar: 76px; }
.shell.sidebar-collapsed .brand__text,
.shell.sidebar-collapsed .nav button > span,
.shell.sidebar-collapsed .nav-group__label,
.shell.sidebar-collapsed .sidebar-foot__pill,
.shell.sidebar-collapsed .sidebar-foot__btn { display: none; }
.shell.sidebar-collapsed .brand { justify-content: center; padding-inline: 8px; padding-bottom: 20px; }
.shell.sidebar-collapsed .nav button { justify-content: center; padding: 12px; min-height: 44px; }
.shell.sidebar-collapsed .sidebar-foot__actions { display: none; }

/* 用户管理：面板撑满内容区，表格区内部滚动 */
#tab-users:not(.hide) {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
#tab-users .um-subnav { flex-shrink: 0; }
#tab-users .um-view:not(.hide) {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: min(480px, calc(100vh - 220px));
  overflow: hidden;
}
#tab-users .um-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin-bottom: 0;
}
#tab-users .um-toolbar,
#tab-users .um-pagination,
#tab-users .batch-bar,
#tab-users .um-empty-msg:not(.hide) {
  flex-shrink: 0;
}
#tab-users .um-table-wrap--scroll {
  flex: 1 1 auto;
  min-height: 160px;
  max-height: none;
  overflow: auto;
}

/* 管理员：与用户管理相同的撑满布局 */
#tab-admins:not(.hide) {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
#tab-admins .um-subnav { flex-shrink: 0; }
#tab-admins .um-view:not(.hide) {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
#adminsViewSecurity.um-view:not(.hide) {
  flex: 0 1 auto;
  min-height: auto;
}
#tab-admins .um-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin-bottom: 0;
}
#tab-admins .um-toolbar,
#tab-admins .um-pagination,
#tab-admins .um-empty-msg:not(.hide),
#tab-admins .admins-log-tip {
  flex-shrink: 0;
}
#tab-admins .um-table-wrap--scroll {
  flex: 1 1 auto;
  min-height: 160px;
  max-height: none;
  overflow: auto;
}
.admins-log-tip {
  margin: 0 18px 12px;
  padding-left: 2px;
  font-size: 12px;
  color: var(--muted2);
}
.admins-edit-tip {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}
.um-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

/* 管理员 · 修改密码 */
#adminsViewSecurity:not(.hide) {
  align-items: flex-start;
}
.admins-security-wrap {
  width: 100%;
  max-width: 520px;
}
.admins-security-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px 26px 26px;
  box-shadow: var(--shadow);
}
.admins-security-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 22px;
}
.admins-security-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent-bg-soft), var(--accent-bg));
  border: 1px solid var(--line2);
  color: var(--orange);
}
.admins-security-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.admins-security-head__text { min-width: 0; }
.admins-security-title {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 700;
  color: var(--brown2);
  line-height: 1.35;
}
.admins-security-title::before { display: none; }
.admins-security-tip {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
}
.admins-security-form {
  display: grid;
  gap: 14px;
}
.admins-security-form .field {
  margin-bottom: 0;
}
.admins-security-form .field > span {
  font-size: 13px;
  margin-bottom: 8px;
}
.admins-security-form input {
  height: 44px;
  border-radius: 12px;
  background: #fff;
}
.admins-security-show-pwd {
  margin: 0;
  font-size: 13px;
  color: var(--brown);
  user-select: none;
}
.admins-pwd-strength {
  display: grid;
  gap: 6px;
  margin-top: -4px;
}
.admins-pwd-strength__bar {
  height: 6px;
  border-radius: 99px;
  background: var(--accent-bg-alt);
  border: 1px solid var(--line2);
  overflow: hidden;
}
.admins-pwd-strength__fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 99px;
  background: var(--muted2);
  transition: width .2s ease, background .2s ease;
}
.admins-pwd-strength.is-weak .admins-pwd-strength__fill {
  width: 25%;
  background: #e74c3c;
}
.admins-pwd-strength.is-fair .admins-pwd-strength__fill {
  width: 50%;
  background: #f39c12;
}
.admins-pwd-strength.is-good .admins-pwd-strength__fill {
  width: 75%;
  background: var(--orange);
}
.admins-pwd-strength.is-strong .admins-pwd-strength__fill {
  width: 100%;
  background: var(--green);
}
.admins-pwd-strength__label {
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}
.admins-pwd-strength.is-weak .admins-pwd-strength__label { color: #c0392b; }
.admins-pwd-strength.is-fair .admins-pwd-strength__label { color: #b45309; }
.admins-pwd-strength.is-good .admins-pwd-strength__label { color: var(--orange); }
.admins-pwd-strength.is-strong .admins-pwd-strength__label { color: var(--green); }
.admins-security-notes {
  margin: 2px 0 0;
  padding: 12px 14px;
  list-style: none;
  font-size: 12px;
  line-height: 1.55;
  border-radius: 12px;
  background: var(--accent-bg-alt);
  border: 1px dashed var(--line2);
}
.admins-security-notes li + li { margin-top: 4px; }
.admins-security-notes li::before {
  content: '·';
  margin-right: 6px;
  color: var(--orange);
  font-weight: 700;
}
.admins-security-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding-top: 8px;
}
.admins-security-actions .btn-primary {
  min-width: 160px;
  padding: 12px 32px;
}
.admins-security-actions .btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: none;
  box-shadow: none;
}

.admin-role-select { min-width: 128px; width: auto; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 0; }
.stat-card--link { cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.stat-card--link:hover, .stat-card--link:focus-visible {
  transform: translateY(-1px);
  border-color: var(--accent-border-hover);
  box-shadow: 0 8px 24px var(--accent-shadow-sm);
}
.um-subnav {
  display: flex;
  gap: 2px;
  margin-bottom: 4px;
  padding: 0 2px;
  border-bottom: 1px solid var(--line);
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}
.um-subnav::-webkit-scrollbar { display: none; }
.um-subnav__btn {
  padding: 10px 14px;
  border-radius: 0;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: -1px;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
}
.um-subnav__btn:hover { color: var(--brown); background: transparent; }
.um-subnav__btn.active {
  background: transparent;
  border-bottom-color: var(--orange);
  color: var(--orange);
  font-weight: 600;
}
.um-view.hide { display: none; }
.um-tag--vip { background: #fff4e8; border-color: #f0bf8a; color: #b85c00; }
.um-tag--test { background: #eef6ff; border-color: #c5ddf5; color: #2a5f9e; }
.um-tag--follow { background: #fdf0f5; border-color: #f5c0d8; color: #a23d6a; }
.um-tag-checks { display: flex; flex-wrap: wrap; gap: 10px 16px; }
.um-tag-grid { align-items: start; }
.um-tag-grid textarea {
  width: 100%; min-height: 72px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line2);
  font-family: inherit; resize: vertical;
}
.um-check-inline { font-size: 13px; white-space: nowrap; }
.um-pet-sub { font-size: 11px; margin-top: 4px; }
.stat-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: none;
  transition: border-color .15s, box-shadow .15s;
}
.stat-card span { font-size: 13px; color: var(--muted); font-weight: 500; }
.stat-card b { display: block; margin-top: 8px; font-size: 28px; font-weight: 800; color: var(--brown2); letter-spacing: -0.02em; }

.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-shadow: none;
  margin-bottom: 0;
}
.panel h3 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
  color: var(--brown2);
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.01em;
}
.panel h3::before { display: none; }
/* 底部导航配置 */
.panel-tabbar__head { margin-bottom: 4px; }
.panel-tabbar__head h3 { margin-bottom: 6px; }
.panel-tabbar__tip { margin: 0; font-size: 13px; }
.field-compact { margin-bottom: 0; }
.tabbar-colors { margin: 16px 0 20px; }

.tabbar-live {
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  gap: 2px;
  padding: 8px 10px 6px;
  border-radius: 14px;
  border: 1px solid var(--line2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
  margin-bottom: 6px;
}
.tabbar-live-hint {
  margin: 0 0 14px;
  font-size: 11px;
  color: var(--muted2);
  text-align: center;
}
.tab-live-item {
  flex: 1;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 4px 2px 6px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-family: inherit;
  transition: background .15s;
}
.tab-live-item:hover { background: var(--accent-tint-06); }
.tab-live-item.is-active {
  background: var(--accent-tint-10);
  font-weight: 700;
}
.tab-live-item.is-active::after {
  content: '';
  width: 20px;
  height: 3px;
  border-radius: 99px;
  background: currentColor;
  margin-top: 1px;
}
.tab-live-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tab-live-icon img { width: 100%; height: 100%; object-fit: contain; }
.tab-live-fallback { font-size: 16px; line-height: 1; }
.tab-live-text { font-size: 11px; line-height: 1.2; }

.tabbar-icons-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  padding-top: 4px;
  border-top: 1px dashed var(--line);
}
.tabbar-icons-head h4 {
  margin: 0;
  font-size: 13px;
  color: var(--brown2);
}
.tabbar-spec {
  font-size: 11px;
  color: var(--muted);
  background: var(--accent-bg);
  padding: 4px 12px;
  border-radius: 99px;
  border: 1px solid var(--line);
}

.tabbar-grid-wrap {
  overflow-x: auto;
  margin-bottom: 14px;
  -webkit-overflow-scrolling: touch;
}
.tabbar-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.tab-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 6px;
  background: linear-gradient(180deg, var(--surface-card-from) 0%, var(--surface-card-to) 100%);
  transition: border-color .15s, box-shadow .15s;
  min-width: 0;
}
.tab-card:hover {
  border-color: #f5c99a;
  box-shadow: 0 4px 12px var(--accent-shadow-sm);
}
.tab-card__head {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 6px;
}
.tab-card__num {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--btn-grad-from), var(--btn-grad-to));
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.tab-card__name {
  flex: 1;
  min-width: 0;
  height: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--brown2);
  background: #fff;
}
.tab-card__name:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 2px var(--accent-tint-12);
}

.tab-card__icons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  align-items: start;
}

.tab-card__icons .upload-tile {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
}

.tab-card__icons .upload-tile__box {
  height: 52px;
  width: 100%;
  box-sizing: border-box;
}

.tab-card__icons .upload-tile__label {
  min-height: 28px;
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.25;
  word-break: keep-all;
}

.upload-tile--glyph {
  cursor: default;
}

.upload-tile--glyph:hover .upload-tile__box {
  border-color: #f5dcc4;
  background: #fff;
}

.upload-tile--glyph .upload-tile__box {
  border-style: solid;
  border-color: #f5dcc4;
  background: #fff;
}

.upload-tile__glyph-input {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  text-align: center;
  padding: 0;
  color: var(--brown2);
  font-family: inherit;
  box-sizing: border-box;
}

.upload-tile__glyph-input:focus {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--accent-inset);
}

.upload-tile__glyph-input::placeholder {
  color: var(--muted2);
  opacity: 0.7;
}

.upload-tile {
  position: relative;
  cursor: pointer;
  text-align: center;
}
.upload-tile__box {
  position: relative;
  height: 44px;
  border-radius: 8px;
  border: 1px dashed #e8cdb0;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: border-color .15s, background .15s;
}
.upload-tile:hover .upload-tile__box {
  border-color: var(--orange);
  background: var(--accent-bg);
}
.upload-tile.is-uploading .upload-tile__box {
  pointer-events: none;
  opacity: 0.65;
}
.upload-tile.is-uploading .upload-tile__mask {
  opacity: 1;
  background: rgba(45, 26, 18, 0.55);
  font-size: 0;
}
.upload-tile.is-uploading .upload-tile__mask::after {
  content: '上传中…';
  font-size: 10px;
}
.upload-tile.has-img .upload-tile__box {
  border-style: solid;
  border-color: #f5dcc4;
}
.upload-tile.has-default .upload-tile__box {
  border-style: solid;
  border-color: #e8cdb0;
  background: #fffaf8;
}
.upload-tile.has-default:hover .upload-tile__mask { opacity: 1; }
.upload-tile--builtin {
  cursor: pointer;
}
.upload-tile--builtin:hover .upload-tile__box {
  border-color: var(--orange);
  background: var(--accent-bg);
}
.upload-tile__box img {
  width: 72%;
  height: 72%;
  object-fit: contain;
}
.upload-tile__default-preview {
  opacity: 0.92;
}
.upload-tile[data-upload="selected"].has-default .upload-tile__default-preview {
  opacity: 1;
}
.upload-tile__placeholder {
  font-size: 18px;
  color: var(--muted2);
  line-height: 1;
}
.upload-tile__mask {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(45, 26, 18, 0.45);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  opacity: 0;
  transition: opacity .15s;
}
.upload-tile:hover .upload-tile__mask { opacity: 1; }
.upload-tile.has-img .upload-tile__mask { opacity: 0; }
.upload-tile.has-img:hover .upload-tile__mask { opacity: 1; }
.upload-tile__label {
  display: block;
  margin-top: 3px;
  font-size: 9px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0;
  line-height: 1.2;
}
.upload-tile__clear {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 16px;
  height: 16px;
  border: 0;
  border-radius: 50%;
  background: rgba(45, 26, 18, 0.75);
  color: #fff;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  z-index: 2;
  opacity: 0;
  transition: opacity .15s;
}
.upload-tile.has-img:hover .upload-tile__clear { opacity: 1; }
.upload-tile__clear:hover { background: var(--red); }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

label.field { display: block; margin-bottom: 14px; }
label.field > span {
  display: block; font-size: 12px; color: var(--muted);
  margin-bottom: 6px; font-weight: 600;
}
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 14px;
  font-size: 14px;
  background: rgba(255, 252, 248, 0.95);
  color: var(--brown);
  font-family: inherit;
}
input, select { height: 42px; }
textarea { min-height: 88px; padding: 12px 14px; resize: vertical; }
input[type="color"] { padding: 4px; height: 42px; cursor: pointer; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--orange);
  box-shadow: 0 0 0 3px var(--focus-ring);
}
input[type="checkbox"],
input[type="radio"] {
  width: auto;
  height: auto;
  min-height: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  accent-color: var(--orange);
}
input[type="checkbox"]:focus,
input[type="checkbox"]:focus-visible,
input[type="radio"]:focus,
input[type="radio"]:focus-visible {
  outline: none;
  border: none;
  box-shadow: none;
}

/* ── 下拉框（随主题） ── */
select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 34px;
  background-color: var(--select-bg);
  background-image: var(--select-chevron);
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px 16px;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
select:hover:not(:disabled):not(:focus) {
  border-color: var(--accent-border-hover);
  background-color: var(--select-bg-hover);
}
select:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px var(--focus-ring);
  background-color: var(--select-bg);
}
select:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background-color: var(--accent-bg-alt);
}
select option {
  background: #fff;
  color: var(--brown);
}
.um-sort-label select,
.um-pagination__select,
.admin-role-select,
.batch-bar select,
.recommend-list-toolbar__batch select,
.um-table select {
  height: 36px;
  padding: 0 30px 0 12px;
  font-size: 13px;
  border-radius: 10px;
  border: 1px solid var(--line2);
  width: auto;
  min-width: 0;
}
.um-pagination__select {
  padding-left: 10px;
  padding-right: 28px;
  background-position: right 8px center;
}
.recommend-list-toolbar__batch select {
  min-width: 96px;
}
label.field > select {
  width: 100%;
}

/* ── 自定义主题下拉（替代原生展开列表） ── */
.pgm-select {
  position: relative;
  display: inline-block;
  min-width: 0;
  vertical-align: middle;
}
.pgm-select--role { min-width: 128px; }
.pgm-select--sm { max-width: 100%; }
.pgm-select--block {
  display: block;
  width: 100%;
}
.pgm-select--batch { min-width: 96px; }
.pgm-select--cat {
  display: block;
  width: 100%;
  min-width: 0;
}
.pgm-select__native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  background: none !important;
  box-shadow: none !important;
}
.pgm-select__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 0 10px 0 12px;
  border: 1px solid var(--line2);
  border-radius: 10px;
  background: var(--select-bg);
  font-size: 13px;
  font-family: inherit;
  font-weight: 500;
  color: var(--brown);
  cursor: pointer;
  text-align: left;
  position: relative;
  z-index: 1;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.pgm-select--sm .pgm-select__trigger {
  height: 36px;
  padding-right: 8px;
}
.pgm-select__label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pgm-select__chevron {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  background: var(--select-chevron) center / 16px 16px no-repeat;
  transition: transform .15s ease;
}
.pgm-select.is-open .pgm-select__chevron {
  transform: rotate(180deg);
}
.pgm-select__trigger:hover:not(:disabled) {
  border-color: var(--accent-border-hover);
  background-color: var(--select-bg-hover);
}
.pgm-select.is-open .pgm-select__trigger,
.pgm-select__trigger:focus-visible {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px var(--focus-ring);
  background-color: var(--select-bg);
}
.pgm-select.is-disabled .pgm-select__trigger,
.pgm-select__trigger:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background-color: var(--accent-bg-alt);
}
.pgm-select__menu {
  position: fixed;
  z-index: 320;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--card);
  border: 1px solid var(--line2);
  border-radius: 12px;
  box-shadow: var(--shadow), 0 8px 24px var(--shadow-ui);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.pgm-select__option {
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.35;
  color: var(--brown);
  cursor: pointer;
  white-space: nowrap;
  transition: background .12s ease, color .12s ease;
}
.pgm-select__option:hover:not(.is-disabled) {
  background: var(--accent-bg);
  color: var(--brown);
}
.pgm-select__option.is-selected {
  background: var(--accent-bg-soft);
  color: var(--orange);
  font-weight: 600;
}
.pgm-select__option.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
label.field .pgm-select {
  display: block;
  width: 100%;
}
label.field .pgm-select__trigger {
  height: 42px;
}
.rec-ctrl--cat .pgm-select__trigger {
  height: 34px;
  padding: 0 28px 0 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.rec-ctrl--cat .pgm-select__trigger:hover:not(:disabled) {
  background-color: var(--select-bg-hover);
}
.rec-ctrl--cat .pgm-select.is-open .pgm-select__trigger,
.rec-ctrl--cat .pgm-select__trigger:focus-visible {
  border-color: transparent;
  box-shadow: none;
}
.um-sort-label .pgm-select,
.batch-bar .pgm-select,
.recommend-list-toolbar__batch .pgm-select,
.um-table .pgm-select {
  vertical-align: middle;
}
.check-line { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 8px 0 16px; }
.check-line input { width: auto; height: auto; }

.btn {
  border: 0;
  border-radius: var(--radius-md);
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, border-color .15s, box-shadow .15s, transform .15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  line-height: 1.3;
}
.btn-primary {
  color: #fff;
  background: var(--orange);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}
.btn-primary:hover { background: var(--orange2); box-shadow: 0 4px 12px var(--accent-shadow-md); }
.btn-outline {
  background: #fff;
  color: var(--brown);
  border: 1px solid var(--line2);
}
.btn-outline:hover { border-color: var(--accent-border-hover); color: var(--orange); background: var(--accent-bg); }
.btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; pointer-events: auto; }
.btn-ghost {
  background: transparent;
  color: var(--brown);
  border: 1px solid transparent;
}
.btn-ghost:hover { background: var(--surface-row-hover); border-color: var(--line); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 12px 10px; border-bottom: 1px solid var(--line2); text-align: left; vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: 12px; background: transparent; }
tbody tr:hover { background: var(--surface-row-hover); }
.inline-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; margin-top: 14px; align-items: end; }

.panel-users { margin-bottom: 18px; }
.panel-users__head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; margin-bottom: 14px;
}
.panel-users__head h3 { margin: 0 0 4px; }
.users-empty { margin: 8px 0 0; text-align: center; padding: 24px 0; }
.users-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.user-card {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px; border-radius: 16px;
  border: 1px solid var(--line2);
  background: #fff;
  cursor: pointer; transition: .15s;
}
.user-card:hover, .user-card:focus-visible {
  border-color: var(--accent-border-hover);
  box-shadow: 0 8px 20px var(--accent-shadow-md);
  outline: none;
}
.user-card__avatar {
  width: 52px; height: 52px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
  border: 2px solid #fff;
  box-shadow: 0 4px 12px var(--accent-shadow-sm);
}
.user-card__avatar--fallback, .user-detail__avatar--fallback {
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--avatar-grad-from), var(--avatar-grad-to));
  color: #fff; font-weight: 800; font-size: 20px;
}
.user-card__main { min-width: 0; flex: 1; }
.user-card__title-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.user-card__name { font-size: 15px; color: var(--brown); }
.user-card__id { font-size: 12px; color: var(--muted); margin-top: 4px; word-break: break-all; }
.user-card__stats {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px;
  font-size: 12px; color: var(--brown);
}
.user-card__stats span {
  padding: 2px 8px; border-radius: 99px;
  background: var(--accent-bg); border: 1px solid var(--line);
}
.user-card__time { font-size: 11px; color: var(--muted); margin-top: 8px; }
.user-badge {
  font-size: 11px; padding: 2px 8px; border-radius: 99px; font-weight: 700;
}
.user-badge--complete { background: #e8f8ee; color: #1f7a3f; }
.user-badge--partial { background: #fff4e5; color: #b85c00; }
.user-badge--empty { background: #f3f3f3; color: #777; }

.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal.hide { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(45, 26, 18, 0.45); }
.modal__card {
  position: relative; width: min(560px, 100%); max-height: min(86vh, 720px);
  overflow: auto; background: #fff; border-radius: 20px;
  border: 1px solid var(--line2);
  box-shadow: 0 24px 60px rgba(45, 26, 18, 0.22);
}
.modal__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid var(--line);
}
.modal__head h3 { margin: 0; font-size: 17px; }
.modal__close {
  width: 34px; height: 34px; border: 0; border-radius: 50%;
  background: var(--accent-bg); color: var(--brown); font-size: 22px; cursor: pointer;
}
.modal__body { padding: 18px; }
.user-detail__hero { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.user-detail__avatar {
  width: 72px; height: 72px; border-radius: 50%; object-fit: cover;
  border: 3px solid #fff; box-shadow: 0 8px 20px var(--accent-shadow-md);
}
.user-detail__name { font-size: 20px; font-weight: 800; color: var(--brown); }
.user-detail__status { font-size: 13px; color: var(--muted); margin-top: 4px; }
.user-detail__dl {
  display: grid; grid-template-columns: 110px 1fr; gap: 10px 12px;
  margin: 0; font-size: 13px;
}
.user-detail__dl dt { color: var(--muted); margin: 0; }
.user-detail__dl dd { margin: 0; word-break: break-all; }
.user-detail__dl code {
  font-size: 12px; background: var(--accent-bg-alt); padding: 2px 6px; border-radius: 6px;
}

.checklist { margin: 0; padding: 0; list-style: none; line-height: 1.75; }
.checklist__item {
  display: flex; align-items: flex-start; gap: 10px; margin: 6px 0;
  color: var(--muted);
}
.checklist__mark {
  display: block; flex-shrink: 0; width: 18px; height: 18px; margin-top: 2px; border-radius: 50%;
  border: 2px solid var(--line2); background: #fff;
}
.checklist__item--ok .checklist__mark {
  border-color: #2d8a4e; background: #e8f5ec;
  box-shadow: inset 0 0 0 3px #fff;
}
.checklist__item--ok .checklist__mark::after {
  content: ''; display: block; width: 6px; height: 10px; margin: 1px auto 0;
  border: 2px solid #2d8a4e; border-top: 0; border-left: 0;
  transform: rotate(45deg);
}
.checklist__item--warn .checklist__mark { border-color: #e67e22; background: var(--accent-bg); }
.checklist__item--optional .checklist__mark {
  border-color: #c5c9d0;
  background: #f4f5f7;
}
.checklist__item--optional .checklist__mark::after {
  content: '—';
  display: block;
  font-size: 11px;
  line-height: 14px;
  text-align: center;
  color: #9aa3b2;
  font-weight: 700;
}
.checklist__item--link { cursor: pointer; }
.checklist__item--link:hover span:last-child { color: var(--brown); }

.demo-banner {
  margin-bottom: 16px; padding: 14px 16px; border-radius: 14px;
  border: 1px solid var(--banner-border); background: linear-gradient(135deg, var(--banner-grad-from) 0%, var(--banner-grad-to) 100%);
}
.demo-banner strong { color: var(--banner-text); }
.demo-banner p { margin: 6px 0 0; font-size: 13px; }
.demo-banner code {
  font-size: 12px; background: rgba(255,255,255,.7); padding: 1px 5px; border-radius: 4px;
}
.nav--demo { opacity: 0.92; }

.toggle-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.toggle-row {
  display: grid; grid-template-columns: auto 32px 1fr auto;
  align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 12px;
  border: 1px solid var(--line2); background: #fff;
  cursor: pointer;
}
.toggle-row input[type=checkbox] { width: 18px; height: 18px; cursor: pointer; }
.toggle-row__icon {
  width: 32px; height: 32px; border-radius: 10px;
  background: var(--accent-bg); display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: var(--orange);
}
.toggle-row__name {
  border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 10px; font-size: 14px; min-width: 0;
}
.toggle-row__hint { font-size: 12px; white-space: nowrap; }
.toggle-row--me-menu { align-items: flex-start; padding-top: 10px; padding-bottom: 10px; }
.toggle-row--me-menu input[type=checkbox] { margin-top: 6px; }
.toggle-row--me-menu .toggle-row__icon { margin-top: 4px; }
.toggle-row__fields { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.toggle-row__desc {
  width: 100%;
  font-size: 12px;
  color: var(--muted, #8a7264);
  border: 1px solid var(--border, #ead6c1);
  border-radius: 8px;
  padding: 6px 10px;
  box-sizing: border-box;
}

.subhead { margin: 18px 0 10px; font-size: 14px; font-weight: 600; color: var(--brown); }

.panel-advanced { margin-top: 0; }
.panel-advanced summary {
  cursor: pointer; font-weight: 700; color: var(--brown);
  list-style: none; padding: 4px 0;
}
.panel-advanced summary::-webkit-details-marker { display: none; }
.panel-advanced[open] summary { margin-bottom: 12px; }

.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: var(--radius-sm); margin-left: 0; }

.icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 16px 12px;
  margin-top: 12px;
}
.icon-cell { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.icon-cell__label { font-size: 12px; color: var(--brown); text-align: center; line-height: 1.3; }
.icon-group__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 16px; }
.icon-group__head h3 { margin: 0; }
.icon-group .upload-tile { width: 72px; }
.icon-group .upload-tile__box { width: 72px; height: 72px; }

.icon-cell__scene { font-size: 11px; text-align: center; line-height: 1.25; max-width: 88px; }

.icon-cell__pages {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  max-width: 96px;
}
.icon-cell__page {
  font-size: 10px;
  line-height: 1.2;
  padding: 2px 6px;
  border-radius: 99px;
  background: var(--accent-bg);
  border: 1px solid var(--line2);
  color: var(--muted);
}

.icon-subgroup { margin-top: 16px; }
.icon-subgroup:first-of-type { margin-top: 4px; }
.icon-subgroup__title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--brown);
  padding-left: 10px;
  border-left: 3px solid var(--orange);
}

.icon-group__stats {
  font-size: 12px;
  font-weight: 600;
  color: var(--orange);
  background: var(--accent-bg);
  padding: 2px 10px;
  border-radius: 99px;
}

.icon-nav__badge {
  display: inline-block;
  margin-left: 6px;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--line2);
  color: var(--muted);
  vertical-align: middle;
}
.icon-nav__badge--done { color: #3d9960; border-color: #b8e4c8; }
.icon-nav__badge--partial { color: var(--orange); border-color: #ffd4a8; }

.icon-cell__slot {
  font-size: 10px;
  line-height: 1.2;
  padding: 2px 6px;
  border-radius: 4px;
  background: #edf6ff;
  border: 1px solid #c5dff5;
  color: #2985e3;
  font-family: ui-monospace, monospace;
}

.icon-cell__color {
  position: absolute;
  left: 4px;
  bottom: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(45, 26, 18, 0.18);
  pointer-events: none;
}

.icon-cell__color-label {
  font-size: 10px;
  text-align: center;
  line-height: 1.2;
  max-width: 88px;
}

.icon-group .upload-tile {
  position: relative;
}

.icon-section__intro { margin-top: 12px; }

.icon-nav {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 14px;
  margin-bottom: 16px;
}
.icon-nav--sticky {
  position: sticky;
  top: 0;
  z-index: 25;
  padding: 10px 0 12px;
  background: color-mix(in srgb, var(--card) 94%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  box-shadow: 0 4px 16px transparent;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.icon-nav--sticky.is-stuck {
  border-bottom-color: var(--line2);
  box-shadow: 0 4px 16px rgba(45, 26, 18, 0.06);
}
.icon-nav__sticky-sentinel {
  height: 1px;
  margin-top: -1px;
  pointer-events: none;
  visibility: hidden;
}
.icon-nav__link {
  font-size: 13px; padding: 6px 12px; border-radius: 99px;
  background: var(--accent-bg); border: 1px solid var(--line2); color: var(--brown);
  text-decoration: none; cursor: pointer; font-family: inherit; line-height: inherit;
}
button.icon-nav__link { appearance: none; -webkit-appearance: none; }
.icon-nav__link:hover { border-color: var(--orange); color: var(--orange); }

#iconGroupsRoot {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
#iconGroupsRoot > .icon-group {
  margin-bottom: 0;
  scroll-margin-top: 72px;
}

.media-tabbar-colors { margin-bottom: 12px; }

/* —— 用户管理 MVP —— */
.um-panel { padding: 0; overflow: hidden; }
.um-toolbar {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid var(--line2);
}
.um-toolbar__left, .um-toolbar__right { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.um-search {
  min-width: 220px; flex: 1; max-width: 360px;
  padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line2); background: #fff;
}
.um-sort-label { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.um-table-wrap { overflow-x: auto; }
.tenant-orders-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tenant-orders-table { min-width: 680px; }
.tenant-orders-table .um-code { font-size: 11px; word-break: break-all; }
.tenant-orders-table__status { white-space: nowrap; width: 1%; }
.order-status {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  border: 1px solid transparent;
}
.order-status--pending_pay {
  background: #fffbeb;
  border-color: #fde68a;
  color: #b45309;
}
.order-status--paid {
  background: #ecfdf5;
  border-color: #86efac;
  color: #15803d;
}
.order-status--closed {
  background: #f3f4f6;
  border-color: #d1d5db;
  color: #4b5563;
}
.order-status--refunded {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}
.order-status--unknown {
  background: var(--accent-bg);
  border-color: var(--line2);
  color: var(--muted);
}
.um-table-wrap--scroll {
  max-height: min(560px, calc(100vh - 320px));
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.um-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.um-table th, .um-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line2); vertical-align: middle; }
.um-table th { color: var(--muted); font-weight: 600; font-size: 12px; background: var(--surface-table-head); }
.um-table-wrap--scroll .um-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  box-shadow: 0 1px 0 var(--line2);
}
.um-date-label { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.um-date-input {
  padding: 7px 8px; border-radius: 8px; border: 1px solid var(--line2);
  font-size: 13px; font-family: inherit; color: var(--brown2); background: #fff;
  min-width: 0; width: 132px;
}
.um-date-input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 2px var(--focus-ring); }
.um-table--list tbody tr.um-row { cursor: pointer; transition: background .15s; }
.um-table--list tbody tr.um-row:hover { background: var(--surface-row-hover); }
.um-cell-user { min-width: 180px; }
.um-user-cell { display: flex; align-items: center; gap: 10px; }
.um-user-name { font-weight: 700; color: var(--brown); }
.um-user-meta { font-size: 11px; color: var(--muted); margin-top: 2px; }
.um-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.um-avatar--sm { width: 36px; height: 36px; }
.um-avatar--lg { width: 56px; height: 56px; }
.um-avatar-img { display: block; background: var(--accent-bg); }
.um-avatar--fallback {
  display: inline-flex; align-items: center; justify-content: center;
  box-sizing: border-box;
  background: linear-gradient(135deg, var(--avatar-grad-from), var(--avatar-grad-to)); color: var(--brown); font-weight: 700;
  line-height: 1;
}
.um-id { font-size: 11px; word-break: break-all; }
.um-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.um-tag {
  display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 11px;
  background: var(--accent-bg); border: 1px solid var(--line2); color: var(--brown);
}
.um-tag--collab { background: #eef6ff; border-color: #c5ddf5; color: #2a5f9e; }
.um-time { white-space: nowrap; font-size: 12px; color: var(--muted); }
.um-loading, .um-loading-block { padding: 32px; text-align: center; color: var(--muted); }
.um-empty, .um-empty-msg { padding: 24px; text-align: center; }
.um-pagination {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap;
  padding: 14px; border-top: 1px solid var(--line2);
}
.um-pagination__meta {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.um-pagination__size {
  display: flex; align-items: center; gap: 6px; font-size: 13px;
}
.um-pagination__total { font-size: 13px; white-space: nowrap; }
.um-pagination__nav {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.um-pagination__pages {
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
}
.um-pagination__page {
  min-width: 32px; height: 32px; padding: 0 6px;
  border: 1px solid var(--line2); border-radius: 8px;
  background: #fff; cursor: pointer; font-size: 13px; color: var(--brown);
  transition: border-color .12s, background .12s, color .12s;
}
.um-pagination__page:hover { border-color: var(--accent-border-hover); color: var(--orange); }
.um-pagination__page.is-active {
  background: var(--orange); border-color: var(--orange); color: #fff; font-weight: 700;
}
.um-pagination__ellipsis {
  padding: 0 4px; color: var(--muted); font-size: 13px; user-select: none;
}
.um-pagination .btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Skeleton */
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skeleton {
  background: linear-gradient(90deg, var(--skeleton-base) 25%, var(--skeleton-shine) 50%, var(--skeleton-base) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
  border-radius: 6px;
}
.skeleton--text { height: 14px; width: 100%; }
.skeleton--text-sm { height: 11px; width: 60%; margin-top: 6px; }
.skeleton--avatar { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; }
.skeleton--short { width: 48px; }
.skeleton--medium { width: 72px; }
.um-skeleton-row td { padding: 14px 12px; vertical-align: middle; }
.um-skeleton-user { display: flex; align-items: center; gap: 10px; }
.um-skeleton-block { padding: 8px 0; }
.um-skeleton-block__hero {
  display: flex; align-items: center; gap: 14px; margin-bottom: 20px;
}
.um-skeleton-block__lines { display: grid; gap: 10px; }
.skeleton--line { height: 12px; }
.skeleton--line:nth-child(1) { width: 90%; }
.skeleton--line:nth-child(2) { width: 70%; }
.skeleton--line:nth-child(3) { width: 55%; }

/* Confirm dialog */
.confirm-dialog {
  position: fixed; inset: 0; z-index: 300;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.confirm-dialog.hide { display: none; }
.confirm-dialog__backdrop {
  position: absolute; inset: 0; background: var(--overlay-backdrop);
}
.confirm-dialog__card {
  position: relative; width: min(400px, 100%);
  background: #fff; border-radius: 16px; padding: 22px 24px;
  box-shadow: 0 20px 60px rgba(45, 26, 18, 0.18);
  border: 1px solid var(--line);
}
.confirm-dialog__card h3 { margin: 0 0 10px; font-size: 17px; color: var(--brown2); }
.confirm-dialog__message { margin: 0 0 20px; font-size: 14px; line-height: 1.6; color: var(--muted); }
.confirm-dialog__input-wrap { margin: 0 0 16px; }
.confirm-dialog__input-wrap.hide { display: none; }
.confirm-dialog__input {
  width: 100%; padding: 10px 12px; font-size: 14px;
  border: 1px solid var(--line2); border-radius: 10px;
  background: #fff; color: var(--brown);
}
.confirm-dialog__input:focus {
  outline: none; border-color: var(--orange);
  box-shadow: 0 0 0 3px var(--focus-ring);
}
.confirm-dialog__input-hint { margin: 8px 0 0; font-size: 12px; }
.confirm-dialog__actions { display: flex; justify-content: flex-end; gap: 8px; }
.confirm-dialog__actions .btn--danger { background: var(--red); border-color: var(--red); color: #fff; }
.confirm-dialog__actions .btn--danger:hover { filter: brightness(1.05); }
.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: var(--radius-sm); }
.modal__card--wide { width: min(720px, 96vw); max-height: 90vh; display: flex; flex-direction: column; }
.modal__card--wide .modal__body--scroll { overflow-y: auto; max-height: calc(90vh - 64px); }
.modal__body--scroll { overflow-y: auto; }
.um-detail-hero { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; }
.um-detail-name { font-size: 18px; font-weight: 700; color: var(--brown); }
.um-detail-sub { font-size: 13px; color: var(--muted); margin-top: 4px; }
.um-detail-actions { margin-top: 10px; }
.um-tabs { display: flex; gap: 8px; border-bottom: 1px solid var(--line2); margin-bottom: 16px; }
.um-tab {
  padding: 10px 14px; border: 0; background: none; cursor: pointer; font-size: 13px; color: var(--muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.um-tab.active { color: var(--orange); border-bottom-color: var(--orange); font-weight: 700; }
.um-pet-grid { display: grid; gap: 12px; }
.um-pet-card {
  padding: 14px; border-radius: 12px; border: 1px solid var(--line2); background: #fffdf9;
}
.um-pet-card__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.um-pet-card__head-main { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.um-pet-card__meta, .um-pet-card__stats { font-size: 12px; color: var(--muted); margin-top: 6px; }
.um-pet-card__stats { margin-bottom: 10px; }
.um-role {
  display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 11px; font-weight: 600;
}
.um-role--owner { background: #fff0e0; color: #b85c00; }
.um-role--editor { background: #eaf6ef; color: #2d7a4a; }
.um-role--viewer { background: #f0eef8; color: #5a4a8a; }
.um-collab-list { display: grid; gap: 12px; }
.um-collab-row {
  padding: 12px; border-radius: 10px; border: 1px solid var(--line2); background: #fff;
}
.um-collab-row__sub { font-size: 12px; margin: 6px 0 10px; }
.um-section-title { font-size: 14px; margin: 18px 0 10px; color: var(--brown); }
.um-dl-compact dt { width: 72px; }
.um-pet-detail-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  padding-bottom: 12px; border-bottom: 1px solid var(--line2); margin-bottom: 4px;
}
.um-pet-detail-stats { display: flex; gap: 12px; font-size: 13px; color: var(--muted); }
.um-activity { list-style: none; padding: 0; margin: 0; }
.um-activity li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line2); }
.um-activity__dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--orange); margin-top: 6px; flex-shrink: 0;
}
.um-activity__time { font-size: 11px; margin-top: 4px; }
.um-link-btn {
  border: 0; background: none; padding: 0; color: var(--orange); cursor: pointer; font: inherit;
  text-decoration: underline;
}
.um-edit-box, .um-danger-box {
  margin-top: 18px; padding: 14px; border-radius: 12px; border: 1px solid var(--line2); background: #fffdf9;
}
.um-danger-box { border-color: #f0c8c8; background: #fff8f8; }
.um-danger-hint { font-size: 12px; margin: 0 0 10px; color: var(--red); line-height: 1.5; }
.um-section-title--danger { color: #b33; }
.um-form-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px;
}
.um-field-full { grid-column: 1 / -1; }
.um-form-grid .field span { font-size: 12px; color: var(--muted); }
.um-form-grid .field input { width: 100%; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line2); }
.um-btn-danger { color: #b33 !important; border-color: #e8b4b4 !important; }
.um-tag--archived { background: #f5f5f5; border-color: #ddd; color: #666; }
.um-pet-card--archived { opacity: 0.72; }
.um-invite-box {
  margin: 12px 0; padding: 12px; border-radius: 10px; border: 1px dashed var(--line2); background: #fff;
}
.um-invite-path { font-size: 11px; margin: 6px 0 10px; word-break: break-all; }
.um-hard-delete { margin-top: 12px; padding-top: 12px; border-top: 1px solid #f0c8c8; }
.error-inline { color: #c0392b; padding: 12px 0; }

/* P0: 导航分组 */
.nav-group {
  display: flex;
  flex-direction: column;
  gap: var(--nav-item-gap);
}
.nav-group:not(:first-child) .nav-group__label { padding-top: 4px; }
.nav-group--dev .nav-group__label { color: #b45309; }
.nav-group__label {
  padding: 0 12px 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted2);
}
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 12px; flex-wrap: wrap; line-height: 1.3; }
.crumb { color: var(--brown2); font-weight: 500; }
.crumb--muted { color: var(--muted); font-weight: 400; }
.crumb-sep { color: var(--line2); user-select: none; }

/* P0: Toast */
.toast-root {
  position: fixed; top: 20px; left: 50%; right: auto; bottom: auto;
  transform: translateX(-50%); z-index: 310;
  display: flex; flex-direction: column; align-items: center; gap: 10px; pointer-events: none;
  max-width: min(440px, calc(100vw - 32px)); width: max-content;
}
.toast {
  display: flex; align-items: flex-start; gap: 10px;
  pointer-events: auto; padding: 12px 16px; border-radius: 10px;
  font-size: 14px; font-weight: 500; line-height: 1.45; cursor: pointer;
  transform: translateY(-12px); opacity: 0;
  transition: transform .22s ease, opacity .22s ease, box-shadow .22s ease;
  border: 1px solid transparent;
  box-shadow: 0 10px 28px rgba(45, 26, 18, .12);
  max-width: 100%;
}
.toast__icon {
  flex-shrink: 0; width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; font-size: 12px; font-weight: 700; line-height: 1;
}
.toast__text { flex: 1; min-width: 0; }
.toast--show { transform: translateY(0); opacity: 1; }
.toast--success {
  background: #e9f9f0; border-color: #8ed9b0; color: #137a47;
}
.toast--success .toast__icon { background: var(--green); color: #fff; }
.toast--error {
  background: #fdecea; border-color: #f5a8a2; color: #b42318;
}
.toast--error .toast__icon { background: var(--red); color: #fff; }
.toast--info {
  background: var(--accent-bg); border-color: var(--accent-border-hover); color: var(--banner-text);
}
.toast--info .toast__icon {
  background: var(--orange); color: #fff; font-style: italic; font-size: 11px;
}

/* 粘性保存栏：有未保存更改时在视口底部固定显示 */
.sticky-save {
  position: fixed;
  left: var(--sidebar);
  right: 0;
  bottom: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(8px);
}
.sticky-save.hide { display: none; }
.sticky-save__actions { display: flex; gap: 8px; }
.sticky-save__label { font-size: 14px; color: var(--brown); font-weight: 600; }

.main.has-sticky-save {
  padding-bottom: 72px;
}

.card-template-list { display: flex; flex-direction: column; gap: 14px; }
.card-template {
  padding: 14px; border-radius: 14px;
  border: 1px solid var(--line2); background: rgba(255, 252, 248, 0.92);
}
.card-template__default {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px; cursor: pointer;
}
.card-template__default input { width: 16px; height: 16px; }
.card-template__key { font-size: 12px; }
.card-template__name { margin-bottom: 10px; }
.card-template__colors { margin-top: 0; }

.help-faq-list { display: flex; flex-direction: column; gap: 14px; }
.help-faq-group {
  padding: 14px; border-radius: 14px;
  border: 1px solid var(--line2); background: rgba(255, 252, 248, 0.92);
}
.help-faq-group__head {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line2);
}
.help-faq-group__title {
  flex: 1; min-width: 180px;
}
.help-faq-group__key {
  font-size: 12px; color: var(--brown-muted);
}
.help-faq-items { display: flex; flex-direction: column; gap: 12px; }
.help-faq-item {
  padding: 12px; border-radius: 12px; border: 1px solid var(--line2);
  background: rgba(255, 255, 255, 0.72);
}
.help-faq-item__head {
  display: flex; align-items: center; gap: 10px; margin-bottom: 8px;
}
.help-faq-item__id {
  font-size: 12px; color: var(--brown-muted);
}
.help-faq-item__q { margin-bottom: 8px; }
.help-faq-item__a { min-height: 72px; resize: vertical; }

.panel-trends__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 16px;
}
.panel-trends__head h3 { margin: 0; }
.trend-range {
  display: flex; gap: 4px; padding: 3px; border-radius: 10px;
  background: var(--accent-bg); border: 1px solid var(--line2);
}
.trend-range__btn {
  padding: 5px 12px; border-radius: 8px; border: 0; background: transparent;
  cursor: pointer; font-size: 12px; color: var(--muted); font-family: inherit;
}
.trend-range__btn.active {
  background: #fff; color: var(--orange); font-weight: 700;
  box-shadow: 0 1px 4px var(--shadow-ui);
}
.trend-range-custom {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
}
.panel-trends__controls {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin-left: auto;
}
@media (max-width: 900px) {
  .panel-trends__controls { margin-left: 0; width: 100%; }
}
.trend-chart__hit { fill: transparent; cursor: crosshair; }
.trend-tooltip {
  position: fixed; z-index: 250; pointer-events: none;
  padding: 6px 10px; border-radius: 8px; font-size: 12px; line-height: 1.4;
  background: var(--tooltip-bg); color: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
  transform: translate(-50%, calc(-100% - 8px));
  white-space: nowrap;
}
.trend-tooltip.hide { display: none; }
.trend-tooltip::after {
  content: ''; position: absolute; left: 50%; bottom: -4px;
  width: 8px; height: 8px; background: var(--tooltip-bg);
  transform: translateX(-50%) rotate(45deg);
}

/* P0: 概览待办 */
.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 22px; }
.todo-list { list-style: none; margin: 0; padding: 0; }
.todo-list__item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--line2); font-size: 13px;
}
.todo-list__item:last-child { border-bottom: 0; }
.todo-list__link {
  border: 0; background: none; color: var(--orange); font-weight: 600;
  cursor: pointer; font-size: 13px; padding: 0; white-space: nowrap;
}
.config-url-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.config-url-row code { font-size: 12px; word-break: break-all; }

/* P0: Filter 重置 */
.btn-filter-reset { font-size: 13px; }

.theme-quick-colors { margin-top: 12px; }

.settings-anchor-nav {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px;
}
.settings-anchor-nav a {
  font-size: 12px; color: var(--muted); text-decoration: none; padding: 6px 12px;
  border-radius: 99px; border: 1px solid var(--line2); background: #fff;
}
.settings-anchor-nav a:hover { color: var(--orange); border-color: var(--accent-border-hover); }

.settings-module-nav {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px;
}
.settings-module-nav__btn {
  font-size: 13px; color: var(--muted); padding: 8px 14px;
  border-radius: 12px; border: 1px solid var(--line2); background: #fff;
  cursor: pointer; line-height: 1.2;
}
.settings-module-nav__btn:hover { color: var(--orange); border-color: var(--accent-border-hover); }
.settings-module-nav__btn.is-active {
  color: var(--orange); border-color: var(--accent-border-hover); background: var(--accent-bg); font-weight: 600;
}
.settings-module__intro {
  margin: 0 0 14px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--line2);
  background: var(--accent-bg);
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}
.icon-group__head .icon-group__hint {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted2);
}
.me-menu-admin-list { display: flex; flex-direction: column; gap: 16px; }
.me-menu-admin-group__title {
  font-size: 13px; font-weight: 600; color: var(--brown);
  margin-bottom: 8px; padding-left: 2px;
}
.me-menu-admin-group__list { margin-top: 0; }

/* P1: Drawer */
.drawer-overlay {
  position: fixed; inset: 0; z-index: 110;
  pointer-events: none;
}
.drawer-overlay:not(.hide) { pointer-events: auto; }
.recommend-workspace { padding: 0; overflow: hidden; }
.recommend-head {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; justify-content: space-between;
  padding: 18px 18px 14px; border-bottom: 1px solid var(--line2);
}
.recommend-head h3 { margin: 0 0 4px; font-size: 17px; }
.recommend-head__status { margin: 0; font-size: 13px; }
.recommend-head__actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.recommend-stats {
  display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 10px 18px;
  border-bottom: 1px solid var(--line2); background: var(--accent-bg); font-size: 13px;
}
.recommend-stat strong { color: var(--brown); font-weight: 700; }

#tab-recommend-stats:not(.hide) {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.commerce-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  align-items: center;
  margin-bottom: 18px;
}
.commerce-stats-kpi-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}
.commerce-stat-card__sub {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.4;
}
.commerce-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
  gap: 16px;
  margin-bottom: 16px;
}
.commerce-panel { margin-bottom: 0; }
.commerce-panel--side h3 { margin: 0 0 8px; }
.commerce-panel--side .panel-hint { margin: 0 0 14px; }
.commerce-funnel {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}
.commerce-funnel-step {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}
.commerce-funnel-step__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: baseline;
}
.commerce-funnel-step__label {
  font-size: 13px;
  color: var(--brown2);
}
.commerce-funnel-step__value {
  font-size: 22px;
  color: var(--brown);
}
.commerce-funnel-step__rate {
  font-size: 12px;
  color: var(--orange);
  font-weight: 700;
}
.commerce-funnel-step__track {
  grid-column: 1 / -1;
  height: 8px;
  border-radius: 99px;
  background: var(--accent-bg);
  overflow: hidden;
}
.commerce-funnel-step__bar {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffb347 0%, var(--orange) 100%);
}
.commerce-funnel-step__arrow {
  color: var(--brown2);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}
.commerce-stages__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line2);
}
.commerce-stage {
  padding: 12px;
  border-radius: 12px;
  background: var(--accent-bg);
  border: 1px solid rgba(255, 116, 20, 0.1);
}
.commerce-stage__label {
  display: block;
  font-size: 12px;
  color: var(--brown2);
}
.commerce-stage__value {
  display: block;
  margin-top: 6px;
  font-size: 20px;
  color: var(--brown);
}
.commerce-stage__sub {
  display: block;
  margin-top: 4px;
  font-size: 11px;
}
.commerce-orders-form {
  display: grid;
  gap: 8px;
}
.commerce-orders-label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}
.commerce-orders-row {
  display: flex;
  gap: 10px;
  align-items: center;
}
.commerce-orders-row input {
  flex: 1;
  min-width: 0;
}
.commerce-orders-row .btn {
  flex-shrink: 0;
  margin: 0;
  white-space: nowrap;
}
.commerce-orders-note {
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 1.5;
}
.commerce-sources__list,
.commerce-scenes__table-wrap {
  overflow-x: auto;
}
.commerce-sources__list {
  display: grid;
  gap: 12px;
}
.commerce-source-row__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 13px;
}
.commerce-source-row__head strong { color: var(--brown); }
.commerce-source-row__track {
  height: 8px;
  border-radius: 99px;
  background: var(--accent-bg);
  overflow: hidden;
}
.commerce-source-row__bar {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #8ec89a 0%, #5f9f6d 100%);
}
.commerce-scenes__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.commerce-scenes__table th,
.commerce-scenes__table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line2);
  text-align: left;
  white-space: nowrap;
}
.commerce-scenes__table th {
  color: var(--brown2);
  font-weight: 600;
  background: rgba(255, 255, 255, 0.6);
}
.commerce-scene-name { font-weight: 600; color: var(--brown); }
.commerce-scene-metric {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 120px;
}
.commerce-scene-metric__bar {
  display: block;
  height: 6px;
  max-width: 80px;
  border-radius: 99px;
  background: var(--orange);
  opacity: 0.75;
}
.commerce-empty {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
}
#tab-recommend-stats > .panel { margin-bottom: 16px; }
#tab-recommend-stats > .panel:last-child { margin-bottom: 0; }

.recommend-toolbar { border-bottom: 1px solid var(--line2); }
.recommend-toolbar__main { flex: 1; min-width: 0; align-items: stretch; }
.recommend-filter-tabs {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
}
.recommend-filter-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line2);
  background: #fff; color: var(--brown2); font-size: 13px; cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.recommend-filter-tab:hover { border-color: var(--accent-border-hover); color: var(--brown); }
.recommend-filter-tab--active {
  border-color: var(--orange); background: #fff6eb; color: var(--brown); font-weight: 600;
}
.recommend-filter-tab__count {
  min-width: 18px; padding: 0 6px; border-radius: 999px; font-size: 11px; line-height: 18px;
  background: rgba(45, 26, 18, 0.08); color: var(--muted); text-align: center;
}
.recommend-filter-tab--active .recommend-filter-tab__count {
  background: rgba(232, 126, 44, 0.15); color: var(--orange);
}
.recommend-product-area { padding: 16px 18px 18px; }
.recommend-list-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line2);
  border-radius: 12px;
  background: #fffdfa;
}
.recommend-list-toolbar__left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  min-width: 0;
  flex: 1 1 220px;
}
.recommend-list-toolbar__batch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  flex: 1 1 320px;
  justify-content: flex-end;
}
.recommend-list-toolbar__batch.is-disabled {
  opacity: 0.55;
}
.recommend-list-toolbar__select {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--brown2);
  white-space: nowrap;
}
.recommend-list-toolbar__count {
  font-size: 13px;
  font-weight: 700;
  color: var(--orange);
  white-space: nowrap;
}
.recommend-list-toolbar__count.is-empty {
  color: var(--muted);
  font-weight: 500;
}
.recommend-list-toolbar__info {
  font-size: 13px;
}
.recommend-list-toolbar__batch .um-sort-label {
  margin: 0;
}
.recommend-pagination {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line2);
}
.recommend-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 48px 20px; border: 1px dashed var(--line2); border-radius: 14px;
  background: #fffdfa;
}
.recommend-empty__icon { font-size: 40px; margin-bottom: 12px; opacity: 0.85; }
.recommend-empty__title { margin: 0 0 8px; font-size: 16px; font-weight: 700; color: var(--brown); }
.recommend-empty__desc { margin: 0 0 16px; max-width: 360px; }
.recommend-empty__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.recommend-banner-field { margin-top: 14px; }
.recommend-banner-uploader {
  position: relative;
  margin-top: 8px;
}
.recommend-banner-preview {
  position: relative;
  width: 100%;
  aspect-ratio: 1500 / 250;
  border: 2px solid #fff;
  border-radius: 12px;
  box-shadow: 0 0 0 1px var(--line2), 0 10px 28px rgba(45, 26, 18, 0.07);
  background: linear-gradient(135deg, var(--banner-grad-from) 0%, var(--banner-grad-to) 100%);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: box-shadow .15s ease, transform .15s ease;
}
.recommend-banner-preview:hover,
.recommend-banner-preview:focus-visible {
  box-shadow: 0 0 0 1px rgba(232, 126, 44, 0.35), 0 12px 32px rgba(232, 126, 44, 0.12);
  outline: none;
}
.recommend-banner-preview:active { transform: scale(0.995); }
.recommend-banner-uploader.has-img .recommend-banner-preview {
  background: #fff;
}
.recommend-banner-uploader.is-uploading .recommend-banner-preview {
  pointer-events: none;
}
.recommend-banner-preview img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.recommend-banner-preview__empty {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px;
  text-align: center;
}
.recommend-banner-preview__empty--error .recommend-banner-preview__text {
  color: var(--red);
}
.recommend-banner-preview__icon {
  font-size: 28px;
  line-height: 1;
  opacity: 0.85;
}
.recommend-banner-preview__text {
  font-size: 13px;
  font-weight: 600;
  color: var(--brown2);
}
.recommend-banner-preview__ratio {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.recommend-banner-preview__mask {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(45, 26, 18, 0.48);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  transition: opacity .15s ease;
}
.recommend-banner-preview:hover .recommend-banner-preview__mask,
.recommend-banner-preview:focus-visible .recommend-banner-preview__mask,
.recommend-banner-uploader.is-uploading .recommend-banner-preview__mask {
  opacity: 1;
}
.recommend-banner-uploader.is-uploading .recommend-banner-preview__mask::after {
  content: '';
  width: 18px;
  height: 18px;
  margin-left: 8px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: recommend-icon-spin 0.8s linear infinite;
}
.recommend-banner-uploader__clear {
  position: absolute;
  top: -10px;
  right: -10px;
  z-index: 3;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 50%;
  background: #fff;
  color: var(--brown2);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.14);
  cursor: pointer;
  line-height: 26px;
  text-align: center;
  font-size: 18px;
  padding: 0;
}
.recommend-banner-uploader__clear:hover {
  background: var(--red);
  color: #fff;
}
.recommend-cat-list { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.recommend-cat-list--single {
  margin-bottom: 4px;
}
.recommend-cat-section__title {
  margin: 16px 0 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--brown2);
}
.recommend-cat-section__hint {
  margin: 6px 0 0;
  font-size: 13px;
}
.recommend-icon-style-field {
  margin-top: 12px;
  padding: 0;
  border: 0;
}
.recommend-icon-style-field legend {
  padding: 0;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--brown2);
}
.recommend-cat-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-sizing: border-box;
  transition: box-shadow 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}
.recommend-cat-card.is-dragging {
  opacity: 0.45;
}
.recommend-cat-card.is-drag-over {
  border-color: var(--accent, #ff7a1a);
  box-shadow: 0 0 0 2px rgba(255, 122, 26, 0.16);
}
.recommend-cat-card--fixed {
  border-style: dashed;
  background: #faf7f4;
}
.recommend-cat-card__pin {
  flex-shrink: 0;
  align-self: center;
  min-width: 28px;
  padding: 4px 6px;
  border-radius: 6px;
  background: #f3ebe3;
  color: #9a7b6a;
  font-size: 11px;
  line-height: 1.2;
  text-align: center;
}
.recommend-cat-card__fixed-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--brown2);
  white-space: nowrap;
}
.recommend-cat-card__title--readonly {
  width: 88px;
  min-width: 0;
  color: #8a7264;
  background: #f3ebe3;
  border-color: transparent;
}
.recommend-cat-card__hint {
  font-size: 12px;
  white-space: nowrap;
}
.recommend-cat-card--ghost {
  position: fixed;
  top: -9999px;
  left: -9999px;
  pointer-events: none;
  opacity: 0.92;
  box-shadow: 0 12px 28px rgba(45, 26, 18, 0.16);
}
.recommend-cat-card__drag {
  flex-shrink: 0;
  width: 28px;
  min-height: 56px;
  margin-top: 2px;
  border: none;
  border-radius: 8px;
  background: #faf7f4;
  color: #9a7b6a;
  font-size: 18px;
  line-height: 1;
  padding: 0;
  cursor: grab;
  touch-action: none;
}
.recommend-cat-card__drag:hover {
  background: #f3ebe3;
  color: var(--brown2);
}
.recommend-cat-card__drag:active {
  cursor: grabbing;
}
.recommend-cat-card__main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.recommend-cat-card__enabled {
  margin: 0;
  white-space: nowrap;
}
.recommend-cat-card__icon-cell {
  width: 56px;
  display: flex;
  justify-content: center;
}
.recommend-cat-card__title {
  width: 88px;
  min-width: 0;
}
.recommend-cat-card__foot {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
  min-height: 56px;
}
.recommend-cat-card__key {
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}
.recommend-cat-icon-uploader {
  position: relative;
  width: 56px;
}
.recommend-cat-icon-uploader__tile {
  cursor: pointer;
}
.recommend-cat-icon-uploader__box {
  position: relative;
  width: 56px;
  height: 56px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: #faf7f4;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.recommend-cat-icon-uploader__emoji {
  font-size: 28px;
  line-height: 1;
}
.recommend-cat-icon-uploader__box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.recommend-cat-icon-uploader__mask {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 12px;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.recommend-cat-icon-uploader__tile:hover .recommend-cat-icon-uploader__mask,
.recommend-cat-icon-uploader.is-uploading .recommend-cat-icon-uploader__mask {
  opacity: 1;
}
.recommend-cat-icon-uploader.is-uploading .recommend-cat-icon-uploader__mask::after {
  content: '';
  width: 18px;
  height: 18px;
  margin-left: 6px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: recommend-icon-spin 0.8s linear infinite;
}
@keyframes recommend-icon-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.recommend-cat-icon-uploader__clear {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 50%;
  background: #fff;
  color: var(--brown2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  line-height: 22px;
  text-align: center;
  font-size: 16px;
  padding: 0;
}
.recommend-cat-icon-uploader__clear:hover {
  background: var(--red);
  color: #fff;
}
.recommend-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.recommend-product-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  transition: border-color .15s ease, box-shadow .15s ease;
  position: relative;
  cursor: pointer;
}
.recommend-product-card__actions,
.recommend-product-card__actions * {
  cursor: auto;
}
.recommend-product-card__check,
.recommend-product-card__visibility {
  cursor: pointer;
}
.recommend-product-card:hover {
  border-color: var(--accent-border-hover);
  box-shadow: 0 8px 20px var(--shadow-ui);
}
.recommend-product-card--selected {
  border-color: #e87e2c;
  background: linear-gradient(180deg, #fff4ea 0%, #fffaf5 38%, #fff 100%);
  box-shadow:
    0 0 0 2px #e87e2c,
    0 0 0 6px rgba(232, 126, 44, 0.2),
    0 12px 28px rgba(232, 126, 44, 0.16);
}
.recommend-product-card--selected:hover {
  border-color: #d56f22;
  box-shadow:
    0 0 0 2px #d56f22,
    0 0 0 6px rgba(232, 126, 44, 0.24),
    0 14px 30px rgba(232, 126, 44, 0.18);
}
.recommend-product-card--selected.recommend-product-card--hidden {
  opacity: 0.88;
  background: linear-gradient(180deg, #fff0e3 0%, #fff8f2 38%, #faf7f3 100%);
}
.recommend-product-card--selected .recommend-product-card__cover {
  border-bottom-color: rgba(232, 126, 44, 0.28);
}
.recommend-product-card--selected .recommend-product-card__check {
  width: 28px;
  height: 28px;
  background: #e87e2c;
  border-color: #d56f22;
  box-shadow: 0 2px 10px rgba(232, 126, 44, 0.38);
}
.recommend-product-card--selected .recommend-product-card__check input {
  width: 16px;
  height: 16px;
  accent-color: #fff;
}
.recommend-product-card--selected .recommend-product-card__title {
  color: #b45309;
}
.recommend-product-card--hidden {
  opacity: 0.72;
  background: #faf7f3;
}
.recommend-product-card__cover {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--accent-bg-alt);
  border-bottom: 1px solid var(--line);
}
.recommend-product-card__check {
  position: absolute; top: 6px; left: 6px; z-index: 2;
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 6px;
  background: rgba(255, 255, 255, 0.92); border: 1px solid var(--line2);
  cursor: pointer;
}
.recommend-product-card__check input { width: 14px; height: 14px; margin: 0; cursor: pointer; }
.recommend-product-card__visibility {
  position: absolute; top: 6px; right: 6px; z-index: 2;
  padding: 2px 7px; border-radius: 999px; border: 1px solid var(--line2);
  background: rgba(255, 255, 255, 0.92); font-size: 10px; color: var(--brown2);
  cursor: pointer;
}
.recommend-product-card__visibility.is-hidden {
  background: rgba(45, 26, 18, 0.72); border-color: transparent; color: #fff;
}
.recommend-product-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.recommend-product-card__img--empty {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 12px;
}
.recommend-product-card__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px 10px;
}
.recommend-product-card__title {
  font-weight: 600;
  font-size: 13px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.recommend-product-card__meta { font-size: 11px; line-height: 1.3; }
.recommend-product-card__actions {
  display: grid;
  grid-template-columns: 66px 1fr;
  margin-top: 4px;
  border: 1px solid var(--line2);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
.rec-ctrl {
  display: flex;
  align-items: center;
  min-width: 0;
  margin: 0;
  cursor: pointer;
}
.rec-ctrl--sort {
  gap: 2px;
  padding: 0 6px 0 8px;
  border-right: 1px solid var(--line2);
  background: var(--accent-bg);
}
.rec-ctrl__label {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  user-select: none;
}
.rec-ctrl--sort input {
  width: 100%;
  min-width: 0;
  padding: 6px 0;
  border: 0;
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  color: var(--brown);
  text-align: center;
}
.rec-ctrl--sort input:focus {
  outline: none;
}
.rec-ctrl--cat {
  flex: 1;
  min-width: 0;
}
.rec-ctrl--cat select {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 0 28px 0 10px;
  border: 0;
  background-color: transparent;
  background-image: var(--select-chevron);
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 14px 14px;
  font-size: 12px;
  color: var(--brown2);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  text-overflow: ellipsis;
}
.rec-ctrl--cat select:hover:not(:disabled):not(:focus) {
  background-color: var(--select-bg-hover);
}
.rec-ctrl--cat select:focus {
  outline: none;
}
@media (max-width: 860px) {
  .recommend-cat-card {
    flex-wrap: wrap;
  }
  .recommend-cat-card__foot {
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    min-height: 0;
    padding-left: 40px;
  }
  .recommend-product-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .recommend-toolbar__main { flex-direction: column; align-items: stretch; }
  .recommend-list-toolbar__batch { justify-content: flex-start; }
  .recommend-filter-tabs { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; }
}

.drawer-overlay__backdrop {
  position: absolute; inset: 0; background: rgba(45, 26, 18, 0.4);
  opacity: 0; transition: opacity .22s;
}
.drawer-overlay:not(.hide) .drawer-overlay__backdrop { opacity: 1; }
.drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(560px, 96vw);
  height: 100%;
  max-height: 100dvh;
  background: #fff; border-left: 1px solid var(--line);
  box-shadow: -8px 0 32px rgba(45,26,18,.12);
  display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .25s ease;
}
.drawer-overlay:not(.hide) .drawer-panel { transform: translateX(0); }
.drawer-panel--wide { width: min(640px, 96vw); }
.drawer-panel--tenant-detail { width: min(760px, 96vw); }
.drawer-panel__head--tenant {
  align-items: flex-start;
  gap: 12px;
}
.drawer-panel__head-main { min-width: 0; flex: 1; }
.drawer-panel__eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.drawer-panel__head--tenant h3 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.drawer-panel__body--tenant {
  padding: 0;
  background: var(--body-grad-mid);
}
.drawer-overlay--stack { z-index: 120; }
.drawer-panel__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid var(--line2); flex-shrink: 0;
}
.drawer-panel__head h3 { margin: 0; font-size: 17px; }
.drawer-panel__close {
  border: 0; background: var(--accent-bg); width: 32px; height: 32px; border-radius: 10px;
  cursor: pointer; font-size: 20px; line-height: 1; color: var(--muted);
}
.drawer-panel__body {
  padding: 18px;
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.drawer-panel__body .um-tabs {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
  margin-top: -2px;
  padding-top: 2px;
}
.drawer-panel__body.modal__body--scroll { max-height: none; }

.nav-toggle {
  display: none; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line2);
  background: #fff; cursor: pointer; font-size: 18px; flex-shrink: 0;
}
.nav-backdrop { display: none; }

.um-th-sort { cursor: pointer; user-select: none; white-space: nowrap; }
.um-th-sort:hover { color: var(--orange); }
.um-th-sort.is-active { color: var(--orange); }
.um-th-sort.is-active::after { content: ' ↓'; font-size: 11px; }

.audit-target-link {
  border: 0; background: none; padding: 0; color: var(--orange);
  cursor: pointer; font-size: inherit; font-family: inherit;
}
.audit-target-link:hover { text-decoration: underline; }

/* P2: 概览趋势、批量操作、只读角色 */
.stat-card b { display: block; }
.stat-delta {
  display: block;
  font-size: 12px;
  margin-top: 4px;
  font-weight: 500;
}
.stat-delta--up { color: #1a9f5c; }
.stat-delta--down { color: #c0392b; }
.stat-delta--flat { color: var(--muted); }

.trend-grid-wrap { min-height: 80px; }
.trend-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.trend-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  background: var(--surface);
}
.trend-card__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}
.trend-card__head h4 { margin: 0; font-size: 14px; }
.trend-chart { width: 100%; height: 72px; display: block; }
.trend-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}

.batch-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--chip-bg, var(--accent-bg));
}
.batch-bar__tag { display: flex; align-items: center; gap: 6px; }
.um-cell-check { width: 36px; text-align: center; }

.admins-grid { align-items: start; }
.admin-form-stack { display: flex; flex-direction: column; gap: 12px; }
.admin-divider { border: none; border-top: 1px solid var(--line); margin: 20px 0; }
.sensitive-input {
  display: flex; align-items: center; gap: 8px;
}
.sensitive-input input { flex: 1; min-width: 0; }
.sensitive-input__toggle { flex-shrink: 0; white-space: nowrap; }
.sensitive-input__hint { display: block; margin-top: 6px; font-size: 12px; line-height: 1.5; }
.field--sensitive { margin-bottom: 14px; }
.um-ua-cell { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill--sm { font-size: 11px; padding: 2px 8px; }

body[data-admin-account-type="platform"] #tab-onboard { display: none !important; }
.nav-badge {
  margin-left: auto;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}
#nav button.nav-onboard--pending { position: relative; }
#nav button.nav-onboard--pending:not(.active) {
  background: linear-gradient(90deg, rgba(254, 243, 199, 0.35), transparent);
}
.tenant-onboard-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 4px 0 32px;
}

/* ── 客户开通向导 · 大气版 ── */
#tab-onboard.onboard-tab {
  gap: 0;
}
.onboard-page {
  margin: calc(-1 * var(--page-gap)) -24px 0;
  max-width: none;
  width: calc(100% + 48px);
}
.ob-page {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 0;
}
.ob-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 24px 48px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.ob-page--done .ob-shell {
  padding-top: 8px;
}

.ob-renew {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}
.ob-renew__head {
  margin-bottom: 16px;
}
.ob-renew__title {
  margin: 0 0 6px;
  font-size: 18px;
  color: var(--brown);
}
.ob-renew__hint {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}
.ob-renew__current {
  margin-bottom: 16px;
}
.ob-renew__checkout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 20px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line2);
}
.ob-renew__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-left: auto;
}
@media (max-width: 720px) {
  .ob-renew__checkout .btn,
  .ob-renew__actions .btn {
    width: 100%;
  }
  .ob-renew__actions {
    width: 100%;
    margin-left: 0;
  }
}

.ob-cred-change {
  margin-top: 0;
}
.ob-cred-change__head {
  margin-bottom: 16px;
}
.ob-cred-change__title {
  margin: 0 0 6px;
  font-size: 1.125rem;
}
.ob-cred-change__hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.5;
}
.ob-cred-change__current {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--surface-2, #f8f8f8);
}
.ob-cred-change__form {
  margin-top: 8px;
}
.ob-notice {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.875rem;
  line-height: 1.5;
}
.ob-notice--info {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
}
.ob-notice--warn {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

/* Hero */
.ob-hero {
  position: relative;
  overflow: hidden;
  padding: 40px 24px 36px;
  background: linear-gradient(135deg, var(--banner-grad-from) 0%, var(--banner-grad-to) 58%, #fff 100%);
  color: var(--brown);
  border-bottom: 1px solid var(--banner-border);
}
.ob-hero__glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 90% 10%, rgba(255, 157, 46, 0.2), transparent 55%),
    radial-gradient(ellipse 50% 40% at 8% 85%, rgba(255, 116, 20, 0.12), transparent 50%);
  pointer-events: none;
}
.ob-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px 40px;
  flex-wrap: wrap;
}
.ob-hero__inner--center {
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.ob-hero__copy { flex: 1 1 360px; min-width: 0; }
.ob-hero__eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--accent-bg);
  border: 1px solid var(--banner-border);
  color: var(--banner-text);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.ob-hero__title {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.ob-hero__desc {
  margin: 0;
  max-width: 520px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--muted);
}
.ob-hero__desc code {
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--accent-bg);
  color: var(--banner-text);
  font-size: 0.92em;
}
.ob-hero__aside {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  flex: 0 1 auto;
}
.ob-hero__stat {
  min-width: 120px;
  padding: 14px 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--banner-border);
}
.ob-hero__stat-label {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.ob-hero__stat strong {
  font-size: 16px;
  font-weight: 700;
}
.ob-hero__pill {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  background: #ecfdf3;
  border: 1px solid #86efac;
  color: #15803d;
  font-size: 13px;
  font-weight: 600;
}
.ob-hero__progress {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 28px auto 0;
  display: flex;
  align-items: center;
  gap: 14px;
}
.ob-hero__progress-track {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.ob-hero__progress-bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--btn-grad-from), var(--btn-grad-to));
  transition: width .4s ease;
}
.ob-hero__progress-text {
  flex: 0 0 auto;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}
.ob-hero--success {
  padding: 56px 24px 48px;
  background: linear-gradient(135deg, #ecfdf3 0%, #f0fdf4 58%, #fff 100%);
  color: var(--brown);
  border-bottom-color: #bbf7d0;
}
.ob-success-mark {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  background: #dcfce7;
  border: 2px solid #86efac;
  font-size: 36px;
  font-weight: 800;
  color: #15803d;
}
.ob-hero__chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}
.ob-hero__chip {
  padding: 8px 16px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 14px;
}
.ob-hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}
.ob-hero__actions .btn-outline {
  color: var(--brown);
  border-color: var(--line2);
  background: #fff;
}
.ob-hero__actions .btn-outline:hover {
  background: var(--accent-bg);
  border-color: var(--accent-border-hover);
}

/* Steps */
.ob-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
}
.ob-steps__item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  cursor: default;
  text-align: left;
  font: inherit;
  color: var(--brown);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.ob-steps__item.is-reachable { cursor: pointer; }
.ob-steps__item.is-reachable:hover {
  border-color: var(--accent-border-hover);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.1);
  transform: translateY(-1px);
}
.ob-steps__item:disabled,
.ob-steps__item.is-locked { opacity: 0.55; }
.ob-steps__item.is-active {
  border-color: var(--orange);
  box-shadow: 0 0 0 4px var(--accent-tint-12), 0 12px 32px rgba(15, 23, 42, 0.08);
}
.ob-steps__item.is-done {
  border-color: #86efac;
  background: linear-gradient(180deg, #f6fff9, #fff);
}
.ob-steps__index {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-bg);
  color: var(--orange);
  font-size: 14px;
  font-weight: 800;
}
.ob-steps__item.is-done .ob-steps__index {
  background: #dcfce7;
  color: #15803d;
}
.ob-steps__item.is-active .ob-steps__index {
  background: var(--orange);
  color: #fff;
}
.ob-steps__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.ob-steps__text strong {
  font-size: 15px;
  line-height: 1.3;
}
.ob-steps__text span {
  font-size: 12px;
  color: var(--muted);
}

/* Stage card */
.ob-stage {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.07);
  overflow: hidden;
}
.ob-stage__head {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 28px 32px 0;
}
.ob-stage__icon {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--btn-grad-from), var(--btn-grad-to));
  color: #fff;
  font-size: 18px;
  font-weight: 800;
}
.ob-stage__eyebrow {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--orange);
  letter-spacing: 0.04em;
}
.ob-stage__title {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.ob-stage__hint {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}
.ob-stage__body {
  padding: 24px 32px 8px;
  min-height: 140px;
}
.ob-stage__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 32px;
  border-top: 1px solid var(--line2);
  background: var(--surface-table-head);
}
.ob-stage__footer--checkout {
  flex-wrap: wrap;
  gap: 16px 20px;
}
.ob-stage__footer-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.ob-btn-xl {
  min-height: 44px;
  padding: 10px 24px !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  border-radius: 12px !important;
}

/* Done card */
.ob-done-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 24px;
  border: 1px solid #bbf7d0;
  border-radius: 16px;
  background: linear-gradient(180deg, #f6fff9, #fff);
}
.ob-done-card__icon {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #dcfce7;
  color: #15803d;
  font-size: 24px;
  font-weight: 800;
}
.ob-done-card__label {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  color: var(--muted);
}
.ob-done-card__title {
  display: block;
  font-size: 20px;
  margin-bottom: 4px;
}
.ob-done-card__detail {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

/* Form */
.ob-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 560px;
}
.ob-form__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.ob-field span { font-weight: 600; }
.ob-form__hint {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}

/* Checklist */
.ob-checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ob-checklist__item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  font-size: 14px;
}
.ob-checklist__item p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.ob-checklist__item.is-done {
  border-color: #bbf7d0;
  background: #f6fff9;
}
.ob-checklist__mark {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--line);
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}
.ob-checklist__item.is-done .ob-checklist__mark {
  border-color: #22c55e;
  background: #dcfce7;
  color: #15803d;
}

/* Plans grid */
.ob-plans {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.ob-alert {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid #fde68a;
  background: #fffbeb;
  color: #92400e;
  font-size: 13px;
}
.ob-alert strong { font-size: 14px; }
.ob-plans__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.ob-plan {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 24px 22px 20px;
  border: 2px solid var(--line);
  border-radius: 18px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: var(--brown);
  transition: border-color .18s, box-shadow .18s, transform .18s;
  overflow: hidden;
}
.ob-plan:hover {
  border-color: var(--accent-border-hover);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  transform: translateY(-2px);
}
.ob-plan.is-selected {
  border-color: var(--orange);
  box-shadow: 0 0 0 4px var(--accent-tint-12), 0 12px 28px rgba(15, 23, 42, 0.08);
}
.ob-plan__tier {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--line);
}
.ob-plan__badge {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-bg);
  color: var(--orange);
  font-size: 11px;
  font-weight: 700;
}
.ob-plan.is-recommended {
  border-color: var(--orange);
  background: linear-gradient(165deg, #fff9f2 0%, #fff 45%, #fff5e9 100%);
  box-shadow: 0 14px 32px var(--accent-shadow-md), 0 0 0 1px rgba(255, 122, 26, 0.18);
  transform: translateY(-3px);
}
.ob-plan.is-recommended:hover {
  border-color: var(--orange2);
  box-shadow: 0 18px 36px var(--accent-shadow-lg), 0 0 0 1px rgba(255, 122, 26, 0.22);
  transform: translateY(-4px);
}
.ob-plan.is-recommended .ob-plan__tier {
  height: 6px;
  background: linear-gradient(90deg, var(--orange2), var(--orange));
}
.ob-plan.is-recommended .ob-plan__badge {
  top: 0;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px 7px;
  border-radius: 0 0 12px 12px;
  background: linear-gradient(135deg, #ff8a3d 0%, var(--orange) 55%, #f06a00 100%);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow: 0 6px 16px var(--accent-shadow-lg);
  z-index: 1;
}
.ob-plan.is-recommended:hover .ob-plan__badge {
  transform: translateX(-50%);
}
.ob-plan__badge-star {
  font-size: 11px;
  line-height: 1;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.15));
}
.ob-plan.is-recommended .ob-plan__name {
  margin-top: 10px;
}
.ob-plan__name {
  margin: 6px 0 0;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.25;
}
.ob-plan__desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
  flex: 1;
}
.ob-plan__price {
  margin-top: 8px;
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
}
.ob-plan__meta {
  font-size: 12px;
  color: var(--muted);
}
.ob-plan__check {
  position: absolute;
  bottom: 16px;
  right: 16px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--line);
  font-size: 14px;
  font-weight: 700;
  color: transparent;
  transition: border-color .15s, background .15s, color .15s;
}
.ob-plan.is-selected .ob-plan__check {
  border-color: currentColor;
  background: currentColor;
  color: #fff;
}
.ob-plan--tier-0 .ob-plan__tier { background: #10b981; }
.ob-plan--tier-1 .ob-plan__tier { background: #3b82f6; }
.ob-plan--tier-2 .ob-plan__tier { background: #8b5cf6; }
.ob-plan--tier-3 .ob-plan__tier { background: #f59e0b; }
.ob-plan--tier-4 .ob-plan__tier { background: #f43f5e; }
.ob-plan--tier-0.is-selected { border-color: #10b981; box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12); }
.ob-plan--tier-1.is-selected { border-color: #3b82f6; box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12); }
.ob-plan--tier-2.is-selected { border-color: #8b5cf6; box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.12); }
.ob-plan--tier-3.is-selected { border-color: #f59e0b; box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12); }
.ob-plan--tier-4.is-selected { border-color: #f43f5e; box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.12); }
.ob-plan--tier-0.is-selected .ob-plan__check { border-color: #10b981; background: #10b981; }
.ob-plan--tier-1.is-selected .ob-plan__check { border-color: #3b82f6; background: #3b82f6; }
.ob-plan--tier-2.is-selected .ob-plan__check { border-color: #8b5cf6; background: #8b5cf6; }
.ob-plan--tier-3.is-selected .ob-plan__check { border-color: #f59e0b; background: #f59e0b; }
.ob-plan--tier-4.is-selected .ob-plan__check { border-color: #f43f5e; background: #f43f5e; }
.ob-plan--tier-0.is-selected .ob-plan__price { color: #10b981; }
.ob-plan--tier-1.is-selected .ob-plan__price { color: #3b82f6; }
.ob-plan--tier-2.is-selected .ob-plan__price { color: #8b5cf6; }
.ob-plan--tier-3.is-selected .ob-plan__price { color: #f59e0b; }
.ob-plan--tier-4.is-selected .ob-plan__price { color: #f43f5e; }
.ob-plan.is-recommended.is-selected {
  border-color: var(--orange);
  box-shadow: 0 0 0 4px var(--accent-tint-12), 0 14px 32px var(--accent-shadow-md);
}
.ob-plan.is-recommended.is-selected .ob-plan__check {
  border-color: var(--orange);
  background: var(--orange);
}
.ob-plan.is-recommended.is-selected .ob-plan__price {
  color: var(--orange);
}
.ob-plans__note {
  margin: 0;
  font-size: 12px;
  line-height: 1.65;
  color: var(--muted);
}

/* Checkout bar */
.ob-checkout {
  display: flex;
  align-items: center;
  gap: 12px 20px;
  flex: 1 1 auto;
  min-width: min(100%, 280px);
}
.ob-checkout__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.ob-checkout__label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ob-checkout__name {
  font-size: 16px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ob-checkout__term { font-size: 12px; color: var(--muted); }
.ob-checkout__price {
  margin-left: auto;
  font-size: 26px;
  font-weight: 800;
  color: var(--orange);
  white-space: nowrap;
}

.ob-pay-channels {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
  flex: 1 1 100%;
}
.ob-pay-channel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex: 1 1 140px;
  min-height: 48px;
  padding: 10px 16px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font-size: 14px;
  font-weight: 600;
  color: var(--brown);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s, box-shadow 0.15s;
}
.ob-pay-channel__icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: block;
  object-fit: contain;
}
.ob-pay-channel__label {
  line-height: 1.2;
}
.ob-pay-channel--wechat:hover:not(.is-active) {
  border-color: rgba(21, 186, 17, 0.45);
  background: rgba(21, 186, 17, 0.04);
}
.ob-pay-channel--wechat.is-active {
  border-color: #15BA11;
  background: rgba(21, 186, 17, 0.1);
  color: #15BA11;
  box-shadow: 0 0 0 1px rgba(21, 186, 17, 0.12);
}
.ob-pay-channel--alipay:hover:not(.is-active) {
  border-color: rgba(0, 159, 232, 0.45);
  background: rgba(0, 159, 232, 0.04);
}
.ob-pay-channel--alipay.is-active {
  border-color: #009FE8;
  background: rgba(0, 159, 232, 0.1);
  color: #009FE8;
  box-shadow: 0 0 0 1px rgba(0, 159, 232, 0.12);
}
.ob-pay-channel-single {
  width: 100%;
  flex: 1 1 100%;
  margin: 0;
  font-size: 13px;
}
.ob-pay-channel-single__inner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 600;
}
.ob-pay-channel-single--wechat .ob-pay-channel-single__inner {
  color: #15BA11;
  background: rgba(21, 186, 17, 0.08);
}
.ob-pay-channel-single--alipay .ob-pay-channel-single__inner {
  color: #009FE8;
  background: rgba(0, 159, 232, 0.08);
}

/* Orders */
.ob-orders {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
  overflow: hidden;
}
.ob-orders__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  cursor: pointer;
  list-style: none;
}
.ob-orders__summary::-webkit-details-marker { display: none; }
.ob-orders__title {
  font-size: 15px;
  font-weight: 700;
}
.ob-orders__hint {
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
}
.ob-orders[open] .ob-orders__summary {
  border-bottom: 1px solid var(--line2);
}
.ob-orders__body {
  padding: 16px 20px 20px;
}
.ob-orders__meta {
  margin: 0 0 10px;
  font-size: 12px;
}

@media (max-width: 720px) {
  .onboard-page {
    margin-left: -16px;
    margin-right: -16px;
    width: calc(100% + 32px);
  }
  .ob-shell { padding-left: 16px; padding-right: 16px; }
  .ob-hero { padding: 32px 16px 28px; }
  .ob-hero__aside { width: 100%; }
  .ob-steps {
    grid-template-columns: 1fr;
  }
  .ob-stage__head,
  .ob-stage__body,
  .ob-stage__footer {
    padding-left: 20px;
    padding-right: 20px;
  }
  .ob-stage__footer {
    flex-direction: column-reverse;
    align-items: stretch;
  }
  .ob-stage__footer .btn,
  .ob-stage__footer-actions .btn {
    width: 100%;
    justify-content: center;
  }
  .ob-stage__footer-actions {
    width: 100%;
    flex-direction: column-reverse;
  }
  .ob-form__grid {
    grid-template-columns: 1fr;
  }
  .ob-plans__grid {
    grid-template-columns: 1fr;
  }
  .ob-checkout {
    width: 100%;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line2);
  }
  .ob-hero__actions .btn {
    width: 100%;
    justify-content: center;
  }
}
@media (max-width: 420px) {
  .ob-plan__price { font-size: 26px; }
  .ob-checkout__price { font-size: 22px; }
}
.tenant-pay-drawer { text-align: center; }
.tenant-pay-drawer__title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: inherit;
  font-weight: inherit;
  line-height: 1.2;
}
.tenant-pay-drawer__title-icon {
  width: 22px;
  height: 22px;
}
#tenantPayDrawer.tenant-pay-drawer--wechat .drawer-panel__head {
  border-bottom-color: rgba(21, 186, 17, 0.25);
}
#tenantPayDrawer.tenant-pay-drawer--alipay .drawer-panel__head {
  border-bottom-color: rgba(0, 159, 232, 0.25);
}
.tenant-pay-drawer__amount { font-size: 28px; font-weight: 700; margin: 8px 0 16px; color: var(--ink); }
.tenant-pay-drawer__qr { display: inline-block; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; margin: 8px 0; }
.tenant-pay-drawer__qr canvas { display: block; }
.tenant-pay-drawer__error { color: #c0392b; background: #fff5f5; border: 1px solid #f5c2c2; border-radius: 10px; padding: 12px; text-align: left; margin: 12px 0; font-size: 13px; }
.tenant-pay-drawer__hint { text-align: left; margin: 12px 0; font-size: 13px; line-height: 1.6; }
.drawer-panel--narrow { width: min(420px, 100vw); }
.platform-plans-table input { width: 100%; min-width: 0; height: 36px; padding: 0 10px; font-size: 13px; border: 1px solid var(--line); border-radius: 8px; }
.platform-plans-table td { vertical-align: middle; }
.platform-plans-table__recommend { width: 72px; white-space: nowrap; }
.platform-plans-table__visible { width: 80px; white-space: nowrap; }
.platform-plans-visible { margin: 0; gap: 6px; font-size: 13px; font-weight: 600; }
.platform-plans-visible input { width: auto; height: auto; }
.platform-plans-row--hidden { opacity: 0.72; background: var(--accent-bg-alt); }
.platform-plans-row--hidden input:not([type="checkbox"]):not([type="radio"]) {
  background: var(--surface-row-hover);
}
.platform-plans-recommend--off { opacity: 0.45; pointer-events: none; }
.td-extend__btn--hidden { opacity: 0.75; border-style: dashed !important; }
.platform-plans-recommend { margin: 0; gap: 6px; font-size: 13px; font-weight: 600; }
.platform-plans-recommend input { width: auto; height: auto; }
.platform-plans-hint { margin: 0 0 12px; font-size: 13px; }
.platform-plans-hint code { padding: 1px 6px; border-radius: 6px; background: var(--accent-bg); font-size: 12px; }

.platform-settings-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.platform-settings-page__actions {
  display: flex;
  justify-content: flex-end;
  padding: 4px 0 8px;
}

/* ── 平台 · 客户详情抽屉 ── */
.td-page {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px 18px 24px;
}
.td-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-radius: 16px;
  border: 1px solid var(--banner-border);
  background: linear-gradient(135deg, var(--banner-grad-from), var(--banner-grad-to));
}
.td-hero--ok { border-color: #86efac; background: linear-gradient(135deg, #ecfdf3, #f0fdf4); }
.td-hero--warn { border-color: #fde68a; background: linear-gradient(135deg, #fffbeb, #fff8ef); }
.td-hero--danger { border-color: #fca5a5; background: linear-gradient(135deg, #fef2f2, #fff5f5); }
.td-hero--info { border-color: var(--banner-border); }
.td-hero__title {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.td-hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.td-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--line);
  font-size: 12px;
}
.td-chip__label {
  color: var(--muted);
  font-weight: 600;
}
.td-chip code { font-size: 11px; }
.td-hero__aside { flex: 0 0 auto; }

.td-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.td-stat {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 4px 14px rgba(45, 26, 18, 0.04);
}
.td-stat--wide { grid-column: 1 / -1; }
.td-stat__label {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.td-stat__value {
  display: block;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  word-break: break-all;
}
.td-stat__value--inline { display: flex; align-items: center; min-height: 28px; }
.td-stat__value--accent { color: var(--orange); }
.td-stat__sub {
  display: block;
  margin-top: 6px;
  font-size: 11px;
}
.td-code {
  font-size: 13px;
  font-weight: 600;
  word-break: break-all;
}

.td-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.td-pill--ok {
  background: #ecfdf3;
  border: 1px solid #86efac;
  color: #15803d;
}
.td-pill--muted {
  background: var(--accent-bg-alt);
  border: 1px solid var(--line);
  color: var(--muted);
}

.td-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
}

.td-card {
  padding: 18px 20px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 4px 14px rgba(45, 26, 18, 0.04);
}
.td-card--warn {
  border-color: #fecaca;
  background: linear-gradient(180deg, #fffafa, #fff);
}
.td-card--form .td-form { margin-top: 4px; }
.td-card__head { margin-bottom: 14px; }
.td-card__title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 800;
}
.td-card__hint {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
}

.td-kv {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.td-kv__row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 10px 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface-table-head);
  font-size: 13px;
}
.td-kv__row dt {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}
.td-kv__row dd { margin: 0; word-break: break-word; }
.td-kv__row--alert {
  background: #fffbeb;
  border: 1px solid #fde68a;
}

.td-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.td-form__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.td-field { margin-bottom: 0; }
.td-form__foot {
  display: flex;
  justify-content: flex-end;
  padding-top: 4px;
}
.td-extend {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.td-extend__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.td-extend__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.td-extend__btn { border-radius: 999px !important; }

.td-orders__meta { margin: 0 0 10px; font-size: 12px; }
.td-orders__table { overflow: auto; }
.td-orders__pagination { margin-top: 12px; }
.td-table th,
.td-table td { font-size: 12px; }

@media (max-width: 640px) {
  .drawer-panel--tenant-detail { width: 100%; max-width: 100vw; }
  .td-stats { grid-template-columns: 1fr; }
  .td-form__grid { grid-template-columns: 1fr; }
  .td-kv__row { grid-template-columns: 1fr; gap: 4px; }
  .td-hero { flex-direction: column; }
}

.um-dl { display: grid; grid-template-columns: 100px 1fr; gap: 8px 12px; font-size: 13px; margin: 12px 0 0; }
.um-dl dt { color: var(--muted); margin: 0; }
.um-dl dd { margin: 0; }
.um-drawer-section + .um-drawer-section { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }

body[data-admin-role="readonly"] .requires-write { display: none !important; }
body[data-admin-role="readonly"] .requires-super { display: none !important; }
body[data-admin-role="readonly"] .requires-sensitive-reveal { display: none !important; }
body[data-admin-account-type="tenant"] .requires-platform { display: none !important; }
body[data-admin-account-type="tenant"] .requires-platform-super { display: none !important; }
body[data-admin-account-type="tenant"] .requires-super { display: none !important; }
body[data-admin-role="readonly"] .sticky-save { display: none !important; }
body[data-admin-role="readonly"] .um-cell-check { display: none; }

.install-pwd-hint.error { color: var(--red); }

.topbar__row { display: flex; align-items: flex-start; gap: 12px; flex: 1; min-width: 0; }

@media (max-width: 960px) {
  .sidebar-collapse-btn { display: none; }
  .topbar__hint { display: none; }
  .topbar-user__name { display: none; }
  .trend-grid { grid-template-columns: 1fr; }
  .shell { flex-direction: column; }
  .nav-toggle { display: inline-flex; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 150;
    width: min(300px, 88vw); height: 100vh; transform: translateX(-100%);
    padding: 24px 20px;
    transition: transform .22s ease; border-right: 1px solid var(--line);
  }
  .sidebar.sidebar--open { transform: translateX(0); box-shadow: 8px 0 32px rgba(45,26,18,.12); }
  .nav-backdrop {
    display: block; position: fixed; inset: 0; z-index: 140;
    background: rgba(45,26,18,.35); opacity: 0; pointer-events: none;
    transition: opacity .2s;
  }
  .nav-backdrop.is-visible { opacity: 1; pointer-events: auto; }
  .nav { flex-direction: column; flex-wrap: nowrap; }
  .stats, .grid2, .grid3 { grid-template-columns: 1fr; }
  .commerce-layout { grid-template-columns: 1fr; }
  .commerce-stages__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .commerce-stats-kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .um-form-grid { grid-template-columns: 1fr; }
  .users-grid { grid-template-columns: 1fr; }
  .tabbar-grid { grid-template-columns: repeat(4, minmax(100px, 1fr)); }
  .inline-form { grid-template-columns: 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .drawer-panel, .drawer-panel--wide { width: 100%; max-width: 100vw; }
  .um-pagination { flex-direction: column; align-items: stretch; }
  .um-pagination__nav { justify-content: center; }
  .sticky-save { left: 0; padding: 12px 16px; }
}
