:root {
  --bg: #1a1612;
  --panel: #252018;
  --border: #4a3d30;
  --text: #f0e8dc;
  --muted: #b8a894;
  --accent: #6b8db8;
  --danger: #c45c5c;
  --ok: #5a9a6e;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  color-scheme: dark;
}
.login-view {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
}
.login-card h1 { margin: 0 0 8px; font-size: 1.35rem; }
.login-hint--small {
  font-size: 0.82rem;
  margin-top: 0.65rem;
  line-height: 1.5;
}
.login-hint--small code {
  font-size: 0.78rem;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.25);
}
.login-card--disabled {
  max-width: 420px;
}
.login-hint { margin: 0 0 20px; color: var(--muted); font-size: 0.88rem; }
.login-card label {
  display: block;
  margin-bottom: 14px;
  font-size: 0.82rem;
  color: var(--muted);
}
.login-card input {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #1a1612;
  color: var(--text);
}
.login-mode-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.login-mode-tab {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 0.88rem;
}
.login-mode-tab.active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.login-actions--code {
  margin-bottom: 8px;
}
.login-forgot-row {
  margin: 6px 0 0;
  text-align: right;
}
.login-forgot-link {
  border: none;
  background: none;
  padding: 0;
  color: var(--accent);
  font-size: 0.82rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.login-forgot-link:hover {
  opacity: 0.85;
}
.login-actions--forgot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.my-account-password-box {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(180, 160, 130, 0.16);
}
.my-account-password-box__title {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
}
.my-account-password-box__hint {
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.45;
}
.login-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.login-tab {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.login-tab.active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.login-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}
.login-actions .btn-primary { flex: 1; }

/* ── 管理员账号库 ── */
.admin-account-banner {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.82rem;
  line-height: 1.5;
  border: 1px solid transparent;
}
.admin-account-banner--warn {
  color: #c9a86a;
  background: rgba(200, 160, 80, 0.1);
  border-color: rgba(200, 160, 80, 0.28);
}
.admin-account-banner--ok {
  color: #8ab89a;
  background: rgba(90, 154, 110, 0.1);
  border-color: rgba(90, 154, 110, 0.24);
}
.admin-account-banner code {
  font-size: 0.78rem;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.22);
}
.admin-account-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.admin-account-summary {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}
.admin-account-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.85rem;
}
.admin-account-grid--empty {
  display: block;
  padding: 2rem 1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
  border: 1px dashed rgba(180, 160, 130, 0.28);
  border-radius: 12px;
}
.admin-account-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid rgba(180, 160, 130, 0.22);
  background: rgba(28, 24, 20, 0.55);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.admin-account-card:hover {
  border-color: rgba(200, 170, 120, 0.38);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
}
.admin-account-card--super {
  border-color: rgba(200, 160, 80, 0.35);
  background: linear-gradient(145deg, rgba(42, 34, 24, 0.9), rgba(28, 24, 20, 0.65));
}
.admin-account-card--disabled {
  opacity: 0.62;
}
.admin-account-card__head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}
.admin-account-card__avatar {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(180, 150, 100, 0.16);
  color: #d4b896;
  font-size: 1rem;
}
.admin-account-card--super .admin-account-card__avatar {
  background: rgba(200, 160, 80, 0.22);
  color: #e8c89a;
}
.admin-account-card__title {
  min-width: 0;
  flex: 1;
}
.admin-account-card__name {
  display: block;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-account-card__id {
  font-size: 0.72rem;
  color: var(--muted);
}
.admin-account-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.25rem;
}
.admin-account-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  border: 1px solid transparent;
}
.admin-account-badge--super {
  color: #e8c89a;
  background: rgba(200, 160, 80, 0.14);
  border-color: rgba(200, 160, 80, 0.28);
}
.admin-account-badge--admin {
  color: #a8c4e8;
  background: rgba(100, 140, 200, 0.12);
  border-color: rgba(100, 140, 200, 0.24);
}
.admin-account-badge--active {
  color: #8ab89a;
  background: rgba(90, 154, 110, 0.14);
  border-color: rgba(90, 154, 110, 0.26);
}
.admin-account-badge--disabled {
  color: #a08080;
  background: rgba(140, 100, 100, 0.12);
  border-color: rgba(140, 100, 100, 0.22);
}
.admin-account-card__contact {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--muted);
}
.admin-account-card__contact span {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}
.admin-account-card__contact i {
  width: 14px;
  text-align: center;
  color: #9a8878;
}
.admin-account-card__contact em {
  font-style: normal;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-account-card__actions {
  display: flex;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.35rem;
  border-top: 1px solid rgba(180, 160, 130, 0.12);
}
body.admin-account-modal-open { overflow: hidden; }
.admin-account-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}
.admin-account-modal[hidden] { display: none !important; }
.admin-account-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 6, 4, 0.72);
  backdrop-filter: blur(4px);
}
.admin-account-modal__dialog {
  position: relative;
  width: min(480px, 100%);
  max-height: calc(100vh - 2.5rem);
  overflow: auto;
  border-radius: 14px;
  border: 1px solid rgba(180, 160, 130, 0.28);
  background: #1e1a16;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}
.admin-account-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem 0.75rem;
  border-bottom: 1px solid rgba(180, 160, 130, 0.14);
}
.admin-account-modal__head h3 {
  margin: 0;
  font-size: 1.05rem;
}
.admin-account-modal__sub {
  margin: 0.25rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}
.admin-account-modal__close {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.admin-account-modal__close:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}
.admin-account-modal__body {
  padding: 1rem 1.15rem;
}
.admin-account-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 0.85rem;
}
.admin-account-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: var(--muted);
}
.admin-account-field:nth-child(1),
.admin-account-field:nth-child(2),
.admin-account-field:nth-child(3) {
  grid-column: 1 / -1;
}
.admin-account-field input,
.admin-account-field select {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #16120e;
  color: var(--text);
  font-size: 0.88rem;
}
.admin-account-super-box {
  margin-top: 1rem;
  padding: 0.85rem;
  border-radius: 10px;
  background: rgba(200, 160, 80, 0.08);
  border: 1px solid rgba(200, 160, 80, 0.22);
}
.admin-account-super-box__head {
  display: flex;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
  font-size: 0.82rem;
}
.admin-account-super-box__head i {
  color: #e8c89a;
  margin-top: 0.15rem;
}
.admin-account-super-box__head strong {
  display: block;
  margin-bottom: 0.15rem;
}
.admin-account-super-box__head p {
  margin: 0;
  font-size: 0.76rem;
  color: var(--muted);
  line-height: 1.45;
}
.admin-account-super-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.admin-account-super-row input {
  flex: 1;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #16120e;
  color: var(--text);
}
.admin-account-disable-text {
  margin: 0 0 0.5rem;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--muted);
}
.admin-account-modal__foot {
  padding: 0.75rem 1.15rem 1rem;
  border-top: 1px solid rgba(180, 160, 130, 0.14);
}
.admin-account-modal__status {
  margin: 0 0 0.65rem;
  min-height: 1.2em;
  font-size: 0.78rem;
  color: var(--muted);
}
.admin-account-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}
.btn-primary--danger {
  background: #9a4848;
  border-color: #9a4848;
}
.btn-primary--danger:hover {
  background: #b05555;
  border-color: #b05555;
}
.settings-main--solo {
  width: 100%;
}
.my-account-pane {
  max-width: 640px;
}
.my-account-profile__card {
  padding: 1rem;
  margin-bottom: 1.25rem;
  border-radius: 12px;
  border: 1px solid rgba(180, 160, 130, 0.22);
  background: rgba(28, 24, 20, 0.55);
}
.my-account-profile__head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.my-account-profile__contact {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}
.my-account-form__actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}
.my-account-status {
  margin: 0.75rem 0 0;
  min-height: 1.2em;
  font-size: 0.8rem;
  color: var(--muted);
}
.my-account-verify-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}
.my-account-verify-tab {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 0.78rem;
  cursor: pointer;
}
.my-account-verify-tab.active {
  border-color: var(--accent);
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}
@media (max-width: 520px) {
  .admin-account-form-grid { grid-template-columns: 1fr; }
  .admin-account-field:nth-child(1),
  .admin-account-field:nth-child(2),
  .admin-account-field:nth-child(3) { grid-column: auto; }
}

.app-view {
  height: 100vh;
  overflow: hidden;
}
.app-container {
  display: flex;
  height: 100vh;
  width: 100%;
}

/* ── 侧栏（沿用客户端导航样式） ── */
.sidebar {
  width: 260px;
  background: rgba(22, 18, 14, 0.96);
  backdrop-filter: blur(12px);
  border-right: 1px solid rgba(140, 110, 80, 0.35);
  display: flex;
  flex-direction: column;
  padding: 1.1rem 0 0;
  flex-shrink: 0;
  overflow: hidden;
  transition: width 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.sidebar-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-shrink: 0;
  padding: 0 14px 1rem 1.25rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid rgba(210, 180, 140, 0.25);
}
.sidebar-toggle {
  flex-shrink: 0;
  width: 34px;
  height: 30px;
  border-radius: 10px;
  border: 1px solid rgba(200, 170, 130, 0.22);
  background: rgba(255, 255, 255, 0.06);
  color: #dcc8a8;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: background 0.2s, color 0.2s;
}
.sidebar-toggle:hover { background: rgba(255, 240, 210, 0.1); color: #f5e6cc; }
.sidebar-nav {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 0.25rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.sidebar-nav::-webkit-scrollbar {
  display: none;
}
.logo-area { padding: 0; }
.logo {
  font-size: 1.45rem;
  font-weight: 700;
  background: linear-gradient(135deg, #f5e7d3, #e2c6a3);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.25;
}
.logo span {
  font-size: 0.78rem;
  color: #b8a27b;
  display: block;
  font-weight: 500;
}
.nav-section-label {
  margin: 0.65rem 1.5rem 0.35rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a7a68;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.75rem 1.5rem;
  margin: 4px 10px;
  border-radius: 60px;
  font-weight: 500;
  font-size: 0.88rem;
  color: #ece2d4;
  cursor: pointer;
  transition: background 0.25s, color 0.25s, padding 0.28s, margin 0.28s, gap 0.28s;
}
.nav-item span {
  overflow: hidden;
  white-space: nowrap;
  max-width: 10rem;
}
.nav-item i {
  width: 24px;
  flex-shrink: 0;
  font-size: 1.05rem;
  text-align: center;
}
.nav-item.active {
  background: rgba(235, 205, 167, 0.22);
  color: #ffefcf;
  border-left: 3px solid #e8bc7e;
}
.nav-item:hover:not(.active) {
  background: rgba(255, 240, 210, 0.12);
  color: #f7e5cc;
}
.sidebar-foot {
  flex-shrink: 0;
  margin-top: auto;
  padding: 12px 16px 16px;
  border-top: 1px solid rgba(210, 180, 140, 0.2);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.admin-user { color: var(--muted); font-size: 0.8rem; }
.config-version {
  font-family: monospace;
  font-size: 0.72rem;
  color: var(--accent);
  background: rgba(107, 141, 184, 0.12);
  padding: 2px 8px;
  border-radius: 4px;
  align-self: flex-start;
}
.sidebar-foot-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}
.sidebar-foot-actions .btn-ghost.active {
  background: rgba(235, 205, 167, 0.22);
  color: #ffefcf;
  border-color: rgba(232, 188, 126, 0.45);
}
.btn-ghost--sm {
  padding: 6px 10px;
  min-width: 36px;
}

.app-container.nav-collapsed .sidebar { width: 72px; }
.app-container.nav-collapsed .sidebar-head {
  flex-direction: column;
  align-items: center;
  padding: 0 0.45rem 0.75rem;
}
.app-container.nav-collapsed .sidebar-toggle { order: -1; margin-bottom: 0.4rem; }
.app-container.nav-collapsed .logo span,
.app-container.nav-collapsed .nav-item span,
.app-container.nav-collapsed .nav-section-label,
.app-container.nav-collapsed .admin-user,
.app-container.nav-collapsed .config-version { display: none !important; }
.app-container.nav-collapsed .nav-item {
  justify-content: center;
  padding: 0.7rem 0.35rem;
  margin: 3px 6px;
  gap: 0;
}
.app-container.nav-collapsed .nav-item.active { border-left: none; border-radius: 12px; }

/* ── 主内容区 ── */
.main-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: var(--bg);
}
.page-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 18px 24px 12px;
  border-bottom: 1px solid var(--border);
}
.page-header__main { min-width: 0; }
.page-header__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  flex-shrink: 0;
  flex-wrap: wrap;
}
.page-header__status {
  margin: 0;
  min-height: 1.25rem;
  font-size: 0.82rem;
  text-align: right;
}
.page-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: linear-gradient(120deg, #e8dcc8, #c4a882);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.page-title__icon {
  color: var(--accent);
  font-size: 1.05rem;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  background: none;
}
.page-sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}
.admin-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px 24px 28px;
  min-height: 0;
}
.admin-page {
  display: none;
  max-width: none;
  width: 100%;
}
.admin-page[data-page="console"] {
  max-width: none;
  width: 100%;
}
.admin-page.active {
  display: block;
}

/* ── 分层设置布局（除控制台外通用） ── */
.settings-layout,
.promotion-layout {
  display: flex;
  align-items: stretch;
  min-height: min(72vh, 680px);
  margin-bottom: 1.25rem;
  padding: 0;
  overflow: hidden;
}
.settings-nav,
.promotion-nav {
  width: 220px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0.85rem 0.65rem;
  border-right: 1px solid rgba(180, 160, 130, 0.22);
  background: rgba(0, 0, 0, 0.18);
}
.settings-nav__section,
.promotion-nav__section {
  margin: 0 0 0.45rem;
  padding: 0 0.55rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.settings-nav__section + .settings-nav__section,
.promotion-nav__section + .promotion-nav__section {
  margin-top: 0.85rem;
}
.settings-nav-item,
.promotion-nav-item,
.cloud-nav-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  width: 100%;
  border: none;
  border-radius: 10px;
  padding: 0.65rem 0.7rem;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.settings-nav-item i,
.promotion-nav-item i,
.cloud-nav-item i {
  width: 18px;
  margin-top: 0.12rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
  flex-shrink: 0;
}
.mj-emoji {
  font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif;
  font-style: normal;
  line-height: 1;
  letter-spacing: 0;
}
.promotion-nav-item__emoji {
  width: 1.35rem;
  margin-top: 0.05rem;
  text-align: center;
  font-size: 1.05rem;
  flex-shrink: 0;
}
.promotion-pane__emoji {
  margin-right: 0.35rem;
  font-size: 1.05em;
  vertical-align: -0.06em;
}
.cloud-nav-item {
  align-items: center;
}
.cloud-nav-item i {
  margin-top: 0;
  opacity: 0.85;
}
.settings-nav-item__text,
.promotion-nav-item__text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  flex: 1;
}
.settings-nav-item__label,
.promotion-nav-item__label {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.25;
}
.settings-nav-item__sub,
.promotion-nav-item__sub {
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.3;
}
.cloud-nav-item span:not(.cloud-nav-badge) {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.settings-nav-item:hover,
.promotion-nav-item:hover,
.cloud-nav-item:hover:not(.active) {
  background: rgba(255, 255, 255, 0.05);
}
.settings-nav-item.active,
.promotion-nav-item.active,
.cloud-nav-item.active {
  background: rgba(107, 141, 184, 0.16);
  box-shadow: inset 0 0 0 1px rgba(107, 141, 184, 0.28);
}
.settings-nav-item.active i,
.promotion-nav-item.active i,
.cloud-nav-item.active {
  color: #ffefcf;
}
.settings-nav-item.active i,
.promotion-nav-item.active i {
  color: #a8c4e8;
}
.settings-main,
.promotion-main,
.cloud-main {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  padding: 1.2rem 1.35rem 1.15rem;
  scrollbar-width: thin;
}
.settings-pane[hidden],
.promotion-pane[hidden] {
  display: none !important;
}
.settings-pane,
.promotion-pane {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 0;
}
.settings-pane:not(.active),
.promotion-pane:not(.active) {
  display: none;
}
.settings-pane.active,
.promotion-pane.active {
  display: flex;
}
.settings-pane__head,
.promotion-pane__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(180, 160, 130, 0.16);
}
.settings-pane__title,
.promotion-pane__title {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  font-weight: 700;
}
.settings-pane__lead,
.promotion-pane__lead {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
  max-width: 42rem;
}
.settings-pane__foot,
.promotion-pane__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(180, 160, 130, 0.16);
}
.settings-usage,
.promotion-usage {
  margin-top: 0;
  margin-bottom: 0;
  padding: 1rem 1.25rem 1.05rem;
  border-color: rgba(180, 160, 130, 0.28);
  background: rgba(0, 0, 0, 0.12);
}
.settings-usage__title,
.promotion-usage__title {
  margin: 0 0 0.65rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
}
.settings-usage__title i,
.promotion-usage__title i {
  margin-right: 0.4rem;
  color: #a8c4e8;
  opacity: 0.9;
}
.settings-usage__list,
.promotion-usage__list {
  margin: 0;
  padding-left: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--muted);
}
.settings-usage__list strong,
.promotion-usage__list strong {
  color: #e8dcc8;
  font-weight: 600;
}
.settings-layout--compact {
  min-height: min(56vh, 520px);
}
.moderation-main {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.moderation-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 400px);
  gap: 1.25rem;
  align-items: stretch;
  min-height: min(68vh, 680px);
}
.moderation-split .moderation-list {
  max-height: min(68vh, 680px);
  margin-bottom: 0;
  order: 2;
}
.moderation-detail {
  order: 1;
  min-height: min(68vh, 680px);
  padding: 0;
  border: 1px solid rgba(180, 160, 130, 0.28);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.moderation-detail[hidden] {
  display: none !important;
}
.moderation-detail:not([hidden]) {
  max-height: min(68vh, 680px);
  overflow: hidden;
}
.moderation-detail-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  color: var(--muted);
  font-size: 0.95rem;
  text-align: center;
}
.moderation-pane-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ── 控制台 ── */
.console-kpi-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.console-kpi-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(74, 61, 48, 0.45);
  background: linear-gradient(145deg, rgba(36, 28, 20, 0.95), rgba(16, 12, 8, 0.88));
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 240, 210, 0.05);
  min-height: 88px;
}
.console-kpi-card--clickable {
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
}
.console-kpi-card--clickable:hover {
  border-color: rgba(107, 141, 184, 0.55);
  transform: translateY(-1px);
}
.console-kpi-card__icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
}
.console-kpi-card--version .console-kpi-card__icon {
  background: rgba(107, 141, 184, 0.18);
  color: #a8c4e8;
}
.console-kpi-card--maint .console-kpi-card__icon {
  background: rgba(196, 92, 92, 0.16);
  color: #e8a8a8;
}
.console-kpi-card--maint.console-kpi-card--ok .console-kpi-card__icon {
  background: rgba(90, 154, 110, 0.16);
  color: #9fd4ad;
}
.console-kpi-card--moderation .console-kpi-card__icon {
  background: rgba(180, 140, 90, 0.18);
  color: #e8c89a;
}
.console-kpi-card--calls .console-kpi-card__icon {
  background: rgba(122, 158, 200, 0.18);
  color: #9ec4e8;
}
.console-kpi-card--users .console-kpi-card__icon {
  background: rgba(140, 120, 180, 0.18);
  color: #c8b8e8;
}
.console-kpi-card__body { min-width: 0; flex: 1; }
.console-kpi-card__label {
  font-size: 0.74rem;
  color: var(--muted);
}
.console-kpi-card__value {
  margin: 0.2rem 0 0.15rem;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.2;
}
.console-kpi-card__sub {
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.35;
}
.console-kpi-card__sub--up { color: var(--ok); }
.console-kpi-card__sub--down { color: #e08a7a; }
.console-kpi-card__sub--warn { color: #e8c89a; }

.console-quick-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(74, 61, 48, 0.4);
  background: linear-gradient(165deg, rgba(32, 26, 20, 0.92), rgba(18, 14, 10, 0.85));
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
}
.console-quick-actions__label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 4px;
}
.console-quick-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(74, 61, 48, 0.45);
  background: rgba(0, 0, 0, 0.14);
  color: var(--text);
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.console-quick-btn:hover {
  background: rgba(107, 141, 184, 0.12);
  border-color: rgba(107, 141, 184, 0.35);
}
.console-quick-btn i { color: #a8c4e8; font-size: 0.85rem; }

.console-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(74, 61, 48, 0.35);
}
.console-panel-head__icon {
  margin-right: 0.45rem;
  color: #a8c4e8;
  opacity: 0.9;
}
.console-panel-head__hint {
  font-size: 0.75rem;
  color: var(--muted);
}
.console-settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  flex: 1;
}
.console-settings-block {
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(74, 61, 48, 0.4);
  background: linear-gradient(165deg, rgba(32, 26, 20, 0.95), rgba(18, 14, 10, 0.88));
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.console-settings-block--maint {
  border-color: rgba(180, 140, 90, 0.28);
}
.console-settings-block--ai {
  border-color: rgba(107, 141, 184, 0.22);
}
.user-device-lock-pane {
  max-width: 560px;
}
.console-field-hint--flat {
  padding-left: 0;
  margin-top: -6px;
}
.console-fieldset {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px 8px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.console-fieldset .admin-field__label {
  margin-bottom: 4px;
}
.admin-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  cursor: pointer;
}
.admin-check input {
  accent-color: var(--accent);
}
.console-field-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}
.console-field-hint {
  margin: -4px 0 0;
  padding-left: 3.1rem;
  font-size: 0.76rem;
  color: var(--muted);
  line-height: 1.45;
}

/* ── 统一表单控件（控制台 / 全局） ── */
.admin-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.admin-field__label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #c8b8a4;
}
.admin-field__hint {
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.35;
}
.admin-control {
  display: block;
  width: 100%;
  padding: 9px 11px;
  border-radius: 8px;
  border: 1px solid rgba(120, 100, 78, 0.45);
  background: rgba(12, 10, 8, 0.85);
  color: var(--text);
  font: inherit;
  font-size: 0.84rem;
  line-height: 1.45;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  appearance: none;
  -webkit-appearance: none;
}
.admin-control::placeholder {
  color: rgba(184, 168, 148, 0.45);
}
.admin-control:hover {
  border-color: rgba(160, 135, 105, 0.55);
  background: rgba(16, 13, 10, 0.92);
}
.admin-control:focus {
  outline: none;
  border-color: rgba(122, 158, 200, 0.75);
  box-shadow: 0 0 0 3px rgba(122, 158, 200, 0.14);
  background: rgba(18, 15, 12, 0.96);
}
.admin-control--compact {
  padding: 3px 6px;
  font-size: 0.78rem;
  border-radius: 5px;
  min-height: 28px;
}
.admin-control--textarea {
  min-height: 4.5rem;
  resize: vertical;
}
.admin-control--select {
  cursor: pointer;
  padding-right: 2rem;
  background-image: linear-gradient(45deg, transparent 50%, #b8a894 50%), linear-gradient(135deg, #b8a894 50%, transparent 50%);
  background-position: calc(100% - 16px) calc(50% + 2px), calc(100% - 11px) calc(50% + 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.admin-switch {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(74, 61, 48, 0.28);
  background: rgba(0, 0, 0, 0.12);
  transition: border-color 0.15s, background 0.15s;
}
.admin-switch:hover {
  border-color: rgba(120, 100, 78, 0.45);
  background: rgba(0, 0, 0, 0.18);
}
.admin-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}
.admin-switch__track {
  flex-shrink: 0;
  width: 2.35rem;
  height: 1.3rem;
  margin-top: 1px;
  border-radius: 999px;
  background: rgba(60, 50, 40, 0.9);
  border: 1px solid rgba(100, 85, 65, 0.55);
  position: relative;
  transition: background 0.18s, border-color 0.18s;
}
.admin-switch__track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 50%;
  background: #d8ccb8;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  transition: transform 0.18s, background 0.18s;
}
.admin-switch input:checked + .admin-switch__track {
  background: rgba(74, 111, 160, 0.55);
  border-color: rgba(122, 158, 200, 0.65);
}
.admin-switch input:checked + .admin-switch__track::after {
  transform: translateX(1.05rem);
  background: #eef4fc;
}
.admin-switch__text {
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text);
}

/* ── 支付收款开关组 ── */
.payment-switch-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(201, 162, 39, 0.22);
  background: linear-gradient(165deg, rgba(32, 26, 20, 0.95), rgba(18, 14, 10, 0.88));
}
.payment-switch-group__head {
  margin-bottom: 2px;
}
.payment-switch-group__title {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.payment-switch-group__title i {
  color: #c9a227;
  opacity: 0.9;
}
.payment-switch-group__lead {
  margin: 0.35rem 0 0;
  font-size: 0.76rem;
  line-height: 1.45;
  color: var(--muted);
}
.payment-switch-group__hint {
  margin: 2px 0 0;
}
.payment-switch-row {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  grid-template-areas: 'track icon body badge';
  align-items: center;
  gap: 0 12px;
  cursor: pointer;
  user-select: none;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(74, 61, 48, 0.35);
  background: rgba(0, 0, 0, 0.14);
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s, opacity 0.18s;
}
.payment-switch-row:hover:not(.payment-switch-row--disabled) {
  border-color: rgba(120, 100, 78, 0.5);
  background: rgba(0, 0, 0, 0.2);
}
.payment-switch-row input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}
.payment-switch-row .admin-switch__track {
  grid-area: track;
  margin-top: 0;
}
.payment-switch-row input:checked + .admin-switch__track {
  background: rgba(74, 111, 160, 0.55);
  border-color: rgba(122, 158, 200, 0.65);
}
.payment-switch-row input:checked + .admin-switch__track::after {
  transform: translateX(1.05rem);
  background: #eef4fc;
}
.payment-switch-row--mock input:checked + .admin-switch__track {
  background: rgba(180, 130, 60, 0.55);
  border-color: rgba(212, 168, 90, 0.65);
}
.payment-switch-row--mock input:checked + .admin-switch__track::after {
  background: #fff8ec;
}
.payment-switch-row__icon {
  grid-area: icon;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  font-size: 0.9rem;
  flex-shrink: 0;
  background: rgba(60, 50, 40, 0.55);
  color: #b8a894;
  transition: background 0.18s, color 0.18s;
}
.payment-switch-row__icon--master {
  background: rgba(74, 111, 160, 0.2);
  color: #8eb4dc;
}
.payment-switch-row__icon--mock {
  background: rgba(180, 130, 60, 0.18);
  color: #d4a85a;
}
.payment-switch-row__icon--wechat {
  background: rgba(46, 125, 90, 0.18);
  color: #6fcf97;
}
.payment-switch-row__icon--alipay {
  background: rgba(61, 110, 168, 0.18);
  color: #7eb0e8;
}
.payment-switch-row__body {
  grid-area: body;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}
.payment-switch-row__title {
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
}
.payment-switch-row__desc {
  font-size: 0.74rem;
  line-height: 1.4;
  color: var(--muted);
}
.payment-switch-row__badge {
  grid-area: badge;
  flex-shrink: 0;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid rgba(120, 100, 78, 0.4);
  background: rgba(40, 34, 28, 0.65);
  color: #9a8a78;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}
.payment-switch-row--on {
  border-color: rgba(76, 140, 90, 0.45);
  background: rgba(46, 90, 58, 0.12);
  box-shadow: inset 0 0 0 1px rgba(76, 140, 90, 0.08);
}
.payment-switch-row--on .admin-switch__track {
  background: rgba(76, 140, 90, 0.55);
  border-color: rgba(120, 190, 130, 0.65);
}
.payment-switch-row--on .admin-switch__track::after {
  background: #eef8f0;
}
.payment-switch-row--on .payment-switch-row__badge {
  border-color: rgba(76, 140, 90, 0.55);
  background: rgba(46, 90, 58, 0.35);
  color: #a8ddb4;
}
.payment-switch-row--mock.payment-switch-row--on {
  border-color: rgba(201, 162, 39, 0.45);
  background: rgba(120, 90, 30, 0.12);
  box-shadow: inset 0 0 0 1px rgba(201, 162, 39, 0.08);
}
.payment-switch-row--mock.payment-switch-row--on .admin-switch__track {
  background: rgba(180, 130, 60, 0.55);
  border-color: rgba(212, 168, 90, 0.65);
}
.payment-switch-row--mock.payment-switch-row--on .admin-switch__track::after {
  background: #fff8ec;
}
.payment-switch-row--mock.payment-switch-row--on .payment-switch-row__badge {
  border-color: rgba(201, 162, 39, 0.55);
  background: rgba(120, 90, 30, 0.35);
  color: #e8c96a;
}
.payment-switch-row--mock.payment-switch-row--on .payment-switch-row__icon--mock {
  background: rgba(180, 130, 60, 0.35);
  color: #f0c878;
}
.payment-switch-row--on .payment-switch-row__icon--master {
  background: rgba(74, 111, 160, 0.35);
  color: #b8d4f0;
}
.payment-switch-row--disabled {
  opacity: 0.52;
  cursor: not-allowed;
  pointer-events: none;
}
.payment-switch-row--channel {
  grid-column: 1 / -1;
}
.payment-switch-row--channel.payment-switch-row--on {
  border-color: rgba(107, 141, 184, 0.4);
  background: rgba(50, 70, 100, 0.12);
}
.payment-switch-row--channel.payment-switch-row--on .payment-switch-row__badge {
  border-color: rgba(107, 141, 184, 0.5);
  background: rgba(50, 70, 100, 0.35);
  color: #b8cce8;
}

/* ── 支付通道卡片（微信 / 支付宝） ── */
.payment-channel-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 680px;
  margin-bottom: 4px;
}
.payment-channel-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(74, 61, 48, 0.35);
  background: linear-gradient(165deg, rgba(32, 26, 20, 0.95), rgba(18, 14, 10, 0.88));
  transition: border-color 0.18s, opacity 0.18s;
}
.payment-channel-card--wechat {
  border-color: rgba(46, 125, 90, 0.22);
}
.payment-channel-card--alipay {
  border-color: rgba(61, 110, 168, 0.22);
}
.payment-channel-card--wechat.payment-channel-card--on {
  border-color: rgba(46, 125, 90, 0.42);
  box-shadow: inset 0 0 0 1px rgba(46, 125, 90, 0.06);
}
.payment-channel-card--alipay.payment-channel-card--on {
  border-color: rgba(61, 110, 168, 0.42);
  box-shadow: inset 0 0 0 1px rgba(61, 110, 168, 0.06);
}
.payment-channel-card--inactive .payment-channel-card__fields {
  opacity: 0.72;
}
.payment-channel-card__head {
  margin-bottom: -2px;
}
.payment-channel-card__title {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.payment-channel-card--wechat .payment-channel-card__title i {
  color: #6fcf97;
}
.payment-channel-card--alipay .payment-channel-card__title i {
  color: #7eb0e8;
}
.payment-channel-card .payment-switch-row--channel {
  grid-column: auto;
  margin: 0;
}
.payment-channel-card__fields {
  padding-top: 10px;
  border-top: 1px dashed rgba(120, 100, 78, 0.28);
}
.payment-channel-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
}
.payment-channel-form--alipay {
  grid-template-columns: 1fr 1fr;
}
.payment-channel-form .admin-field--full {
  grid-column: 1 / -1;
}
.payment-channel-form .admin-field__hint {
  margin-top: 2px;
}
.payment-channel-form__key {
  min-height: 5.5rem;
  font-family: ui-monospace, 'Cascadia Code', Consolas, monospace;
  font-size: 0.76rem;
  line-height: 1.4;
  resize: vertical;
}
.payment-channel-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  max-width: 680px;
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid rgba(74, 61, 48, 0.28);
}
.payment-channel-foot__status {
  margin: 0;
  flex: 1;
  min-width: 12rem;
}
@media (max-width: 720px) {
  .payment-channel-stack,
  .payment-channel-foot {
    max-width: none;
  }
  .payment-channel-form,
  .payment-channel-form--alipay {
    grid-template-columns: 1fr;
  }
  .payment-channel-form .admin-field--full {
    grid-column: auto;
  }
}

/* ── 收款订单列表 ── */
.payment-order-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 16px;
  margin-bottom: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(74, 61, 48, 0.35);
  background: rgba(0, 0, 0, 0.12);
}
.payment-order-toolbar__fields {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 14px;
  flex: 1;
  min-width: 0;
}
.payment-order-toolbar__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.payment-order-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.payment-order-field--search {
  flex: 1 1 220px;
  min-width: 180px;
  max-width: 320px;
}
.payment-order-field:not(.payment-order-field--search) {
  flex: 0 0 auto;
  min-width: 118px;
}
.payment-order-field__label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #9a8a78;
}
.payment-order-summary {
  margin: 0 0 10px;
  font-size: 0.76rem;
  color: var(--muted);
  line-height: 1.45;
  min-height: 1.1em;
}
.payment-order-panel {
  border-radius: 12px;
  border: 1px solid rgba(74, 61, 48, 0.35);
  background: linear-gradient(165deg, rgba(32, 26, 20, 0.95), rgba(18, 14, 10, 0.88));
  overflow: hidden;
}
.payment-order-list {
  min-height: 8rem;
}
.payment-order-table-wrap {
  overflow-x: auto;
}
.payment-order-table {
  min-width: 720px;
}
.payment-order-table th {
  padding: 10px 14px;
  white-space: nowrap;
  background: rgba(0, 0, 0, 0.18);
}
.payment-order-table td {
  padding: 10px 14px;
  vertical-align: top;
}
.payment-order-table__id {
  font-family: ui-monospace, 'Cascadia Code', Consolas, monospace;
  font-size: 0.78rem;
  color: #c8b8a4;
  word-break: break-all;
}
.payment-order-table__amount {
  font-weight: 600;
  color: #e8dcc8;
  white-space: nowrap;
}
.payment-order-table__time {
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
}
.payment-order-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  border: 1px solid transparent;
}
.payment-order-badge--paid {
  color: #a8ddb4;
  background: rgba(46, 90, 58, 0.35);
  border-color: rgba(76, 140, 90, 0.45);
}
.payment-order-badge--pending {
  color: #e8c96a;
  background: rgba(120, 90, 30, 0.28);
  border-color: rgba(201, 162, 39, 0.4);
}
.payment-order-badge--expired {
  color: #b8a894;
  background: rgba(60, 50, 40, 0.35);
  border-color: rgba(120, 100, 78, 0.35);
}
.payment-order-badge--wechat {
  color: #a8ddb4;
  background: rgba(46, 90, 58, 0.22);
  border-color: rgba(76, 140, 90, 0.32);
}
.payment-order-badge--alipay {
  color: #b8cce8;
  background: rgba(50, 70, 100, 0.28);
  border-color: rgba(107, 141, 184, 0.35);
}
.payment-order-badge--muted {
  color: #9a8a78;
  background: rgba(40, 34, 28, 0.55);
  border-color: rgba(120, 100, 78, 0.28);
}
.payment-order-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 2.5rem 1.5rem;
  text-align: center;
}
.payment-order-empty__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  margin-bottom: 0.35rem;
  background: rgba(60, 50, 40, 0.45);
  color: #9a8a78;
  font-size: 1.1rem;
}
.payment-order-empty__title {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}
.payment-order-empty__desc {
  margin: 0;
  font-size: 0.76rem;
  color: var(--muted);
  line-height: 1.45;
  max-width: 22rem;
}
.payment-order-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  padding: 10px 14px;
  border-top: 1px solid rgba(74, 61, 48, 0.35);
  background: rgba(0, 0, 0, 0.12);
  font-size: 0.78rem;
  color: var(--muted);
}
.payment-order-pager__info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
}
.payment-order-pager__nav {
  display: flex;
  align-items: center;
  gap: 8px;
}
.payment-order-pager__page {
  min-width: 3.5rem;
  text-align: center;
  font-weight: 600;
  color: #c8b8a4;
}
@media (max-width: 640px) {
  .payment-order-field--search {
    flex: 1 1 100%;
    max-width: none;
  }
  .payment-order-toolbar__actions {
    width: 100%;
    justify-content: flex-end;
  }
}

.btn-tool {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid rgba(122, 158, 200, 0.35);
  background: linear-gradient(180deg, rgba(58, 72, 92, 0.55), rgba(32, 40, 52, 0.75));
  color: #dce8f4;
  font-size: 0.8rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.12s;
}
.btn-tool i { font-size: 0.78rem; opacity: 0.9; }
.btn-tool:hover {
  border-color: rgba(158, 196, 232, 0.55);
  background: linear-gradient(180deg, rgba(74, 96, 124, 0.65), rgba(42, 54, 70, 0.85));
}
.btn-tool:active { transform: scale(0.98); }
.btn-tool.is-spinning i { animation: admin-spin 0.75s linear infinite; }
@keyframes admin-spin {
  to { transform: rotate(360deg); }
}

.console-monitor-toolbar { margin-bottom: 14px; }
.console-monitor-toolbar__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.monitor-usage-toggle {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid rgba(120, 100, 78, 0.45);
  background: rgba(0, 0, 0, 0.22);
}
.monitor-usage-toggle__btn {
  border: none;
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.monitor-usage-toggle__btn.active {
  color: #ffefcf;
  background: rgba(107, 141, 184, 0.35);
  box-shadow: inset 0 0 0 1px rgba(107, 141, 184, 0.35);
}
.table-toggle-label {
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: underline dotted rgba(200, 184, 164, 0.45);
  text-underline-offset: 0.18em;
}
.table-toggle-label:hover {
  color: #ffefcf;
}
.user-points-balance {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.console-settings-block__title {
  margin: 0 0 10px;
  font-size: 0.84rem;
  font-weight: 600;
  color: #e8dcc8;
}
.console-settings-block__title i {
  margin-right: 0.4rem;
  color: var(--muted);
  font-size: 0.8rem;
}
.console-panel-extra--flat {
  margin: 0;
  padding-top: 0;
  border-top: none;
}
.console-panel-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(74, 61, 48, 0.35);
}
.console-panel-foot .btn-primary i { margin-right: 0.35rem; }

.console-monitor-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  min-height: 0;
  flex: 1;
}
.console-monitor-col {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.console-monitor-col .panel-sub { margin-top: 0; }
.console-monitor-col .panel-sub i { margin-right: 0.35rem; opacity: 0.75; }

.console-mid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr);
  gap: 16px;
  margin-bottom: 14px;
}
.console-feature-panel {
  display: flex;
  flex-direction: column;
  min-height: 280px;
}
.console-feature-breakdown {
  flex: 1;
  min-height: 200px;
  overflow: auto;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(74, 61, 48, 0.32);
  background: rgba(0, 0, 0, 0.12);
}
.console-feature-bar {
  display: grid;
  grid-template-columns: 5.25rem minmax(0, 1fr) 2.75rem;
  gap: 10px;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(74, 61, 48, 0.22);
  font-size: 0.8rem;
}
.console-feature-bar__label {
  text-align: right;
  color: #e8dcc8;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.console-feature-bar__count {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-size: 0.78rem;
}
.console-feature-bar:last-child { border-bottom: none; }
.console-feature-bar__track {
  height: 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.2);
  overflow: hidden;
}
.console-feature-bar__fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #6b8db8, #9ec4e8);
}
.console-usage { margin-bottom: 0; }

.console-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: stretch;
  margin-bottom: 16px;
}
.console-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}
.console-panel--monitor {
  max-height: none;
  min-height: 520px;
}
.console-panel--monitor .console-monitor-split {
  margin-top: 4px;
}
.console-monitor-col .panel-sub {
  margin: 0 0 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #d8ccb8;
}
.console-panel-extra {
  margin: 12px 0;
  padding-top: 12px;
  border-top: 1px solid rgba(74, 61, 48, 0.35);
  display: grid;
  gap: 10px;
}
.console-panel-extra label {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
}
.console-panel-extra select {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #1a1612;
  color: var(--text);
}
.form-grid--compact { gap: 10px; }
.panel-desc--inline {
  margin: 0;
  font-size: 0.78rem;
}
.panel-toolbar--split {
  flex-wrap: wrap;
  align-items: flex-start;
}
.panel-toolbar__lead {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.console-chart-panel { margin-top: 0; }
.chart-range-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-end;
  margin-left: auto;
}
.chart-range-btn {
  padding: 5px 9px;
  border-radius: 6px;
  border: 1px solid rgba(120, 100, 78, 0.45);
  background: rgba(18, 15, 12, 0.72);
  color: var(--text);
  font: inherit;
  font-size: 0.72rem;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s, background 0.15s;
}
.chart-range-btn:hover {
  border-color: rgba(160, 135, 105, 0.55);
  background: rgba(24, 20, 16, 0.88);
}
.chart-range-btn.active {
  border-color: rgba(122, 158, 200, 0.75);
  background: linear-gradient(165deg, rgba(36, 48, 62, 0.95), rgba(22, 30, 42, 0.92));
  color: #e8f0fa;
}
.active-users-chart {
  width: 100%;
  min-height: 280px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(74, 61, 48, 0.32);
  background: rgba(0, 0, 0, 0.1);
}
.active-users-chart-svg {
  width: 100%;
  height: auto;
  display: block;
}
.chart-axis-label {
  fill: var(--muted);
  font-size: 10px;
}
.chart-axis-end-label {
  fill: #c8b8a4;
  font-size: 11px;
  font-weight: 600;
}
.chart-axis-line {
  stroke: rgba(120, 100, 78, 0.55);
  stroke-width: 1.2;
}
.chart-grid-line {
  stroke: rgba(74, 61, 48, 0.35);
  stroke-width: 1;
}
.chart-line {
  fill: none;
  stroke: #7a9ec8;
  stroke-width: 2.5;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.chart-area {
  fill: url(#chartAreaGrad);
  opacity: 0.35;
}
.chart-dot {
  fill: #9ec4e8;
  stroke: #1a1612;
  stroke-width: 1.5;
}
.monitor-overview--console {
  margin-bottom: 14px;
}
.monitor-overview--cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.monitor-stat-card {
  position: relative;
  overflow: hidden;
  min-height: 92px;
}
.monitor-stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--monitor-accent, #7a9ec8);
  opacity: 0.9;
}
.monitor-stat-card .console-kpi-card__icon {
  background: rgba(122, 158, 200, 0.16);
  color: var(--monitor-accent, #a8c4e8);
}
.monitor-stream--console,
.monitor-ranking--console {
  flex: 1;
  min-height: 180px;
  max-height: 220px;
  overflow: auto;
  border: 1px solid rgba(74, 61, 48, 0.35);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.12);
  padding: 2px;
}
.monitor-card--accent { position: relative; overflow: hidden; }
.monitor-card--accent::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--monitor-accent, #7a9ec8);
  opacity: 0.85;
}
.monitor-overview--compact {
  grid-template-columns: repeat(2, 1fr);
  margin-bottom: 10px;
}
.monitor-stream--scroll,
.monitor-ranking--scroll {
  max-height: 120px;
  overflow: auto;
}
@media (max-width: 1100px) {
  .console-kpi-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .console-mid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .console-top { grid-template-columns: 1fr; }
  .console-settings-grid { grid-template-columns: 1fr; }
  .console-monitor-split { grid-template-columns: 1fr; }
  .console-kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .monitor-overview--cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 240, 210, 0.04);
}
.panel--narrow { max-width: 480px; }
.panel--spaced { margin-top: 16px; }
.panel-block-title {
  margin: 0 0 14px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}
.panel-block-title--inline { margin: 0; }
.panel-desc {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.82rem;
}
.panel-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.panel-toolbar .panel-desc { margin: 0; }
.panel-hint { font-weight: 400; color: var(--muted); font-size: 0.78rem; }
.form-grid { display: grid; gap: 12px; margin-bottom: 14px; }
.form-grid label { display: block; font-size: 0.82rem; color: var(--muted); }
.form-grid textarea, .form-grid select {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #1a1612;
  color: var(--text);
}
.check-row { display: flex !important; align-items: center; gap: 8px; color: var(--text) !important; }
.btn-primary, .btn-ghost, .btn-small {
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
}
.btn-primary {
  background: linear-gradient(180deg, #7a9ec8, #4a6fa0);
  color: #fff;
  padding: 8px 16px;
}
.btn-primary:disabled {
  opacity: 0.65;
  cursor: wait;
}
[hidden] {
  display: none !important;
}
.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 6px 12px;
}
.btn-small {
  background: #3a3028;
  color: var(--text);
  padding: 4px 10px;
  border: 1px solid var(--border);
}
.feature-list, .quota-list { display: grid; gap: 8px; }
.feature-row, .quota-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(0,0,0,0.15);
  border: 1px solid rgba(74,61,48,0.5);
}
.feature-key { font-family: monospace; font-size: 0.78rem; color: var(--muted); }
.feature-cat { font-size: 0.72rem; color: var(--muted); }
.feature-auto-hint {
  font-size: 0.75rem;
  color: var(--ok);
  min-width: 50px;
  text-align: right;
}
.feature-auto-hint.auto-error { color: var(--danger); }
.quota-row { grid-template-columns: minmax(140px, 1.1fr) minmax(100px, 1fr) minmax(100px, 1fr); }
.quota-period-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: end;
}
.user-tier-quota-period,
.user-tier-quota-block > .quota-period-fields {
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.quota-period-custom-wrap[hidden] { display: none !important; }
.feature-label,
.quota-info { min-width: 0; }
.feature-label-name,
.quota-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.35;
}
.feature-label .feature-key,
.quota-info .feature-key {
  margin-top: 2px;
  font-family: 'JetBrains Mono', 'Consolas', monospace;
  font-size: 0.72rem;
}
.settings-pane__head--compact {
  margin-bottom: 8px;
}
.settings-pane__head--compact .settings-pane__lead {
  margin-bottom: 0;
}
.settings-usage--compact {
  padding: 10px 14px;
}
.settings-usage--compact .settings-usage__title {
  margin: 0;
  cursor: pointer;
  list-style: none;
}
.settings-usage--compact .settings-usage__list {
  margin: 10px 0 0;
  font-size: 0.78rem;
}
.settings-usage--compact .settings-usage__list code {
  font-size: 0.72rem;
}
.settings-usage--compact > summary {
  list-style: none;
}
.settings-usage--compact > summary::-webkit-details-marker {
  display: none;
}
.stats-feature-cell { min-width: 10rem; }
.quota-row input {
  width: 100%;
  padding: 6px 8px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: #1a1612;
  color: var(--text);
}

/* ── AI 配额卡片（章节列表风格，可扩展） ── */
.quota-tier-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 2px 0 8px;
}
.quota-tier-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  min-width: 88px;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid rgba(120, 100, 78, 0.45);
  background: rgba(18, 15, 12, 0.72);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  font: inherit;
}
.quota-tier-btn:hover {
  border-color: rgba(160, 135, 105, 0.55);
  background: rgba(24, 20, 16, 0.88);
}
.quota-tier-btn.active {
  border-color: rgba(122, 158, 200, 0.75);
  background: linear-gradient(165deg, rgba(36, 48, 62, 0.95), rgba(22, 30, 42, 0.92));
  box-shadow: inset 0 1px 0 rgba(180, 210, 240, 0.08), 0 0 0 1px rgba(122, 158, 200, 0.12);
}
.quota-tier-btn__label {
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.2;
}
.quota-tier-btn__code {
  font-size: 0.66rem;
  color: var(--muted);
  background: transparent;
  padding: 0;
}
.quota-tier-btn.active .quota-tier-btn__code {
  color: rgba(180, 210, 240, 0.75);
}
.quota-tier-hint {
  margin: 0 0 10px;
  font-size: 0.76rem;
  color: var(--muted);
  line-height: 1.4;
}
.quota-anonymous-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(120, 100, 78, 0.35);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.74rem;
  color: var(--muted);
}
.quota-feature-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(172px, 200px));
  gap: 10px;
  align-items: stretch;
}
.quota-feature-card {
  display: flex;
  flex-direction: column;
  min-height: 132px;
  min-width: 0;
  padding: 10px 11px;
  border-radius: 8px;
  border: 1px solid rgba(74, 61, 48, 0.42);
  background: linear-gradient(165deg, rgba(28, 22, 16, 0.92), rgba(14, 11, 8, 0.88));
  box-shadow: inset 0 1px 0 rgba(255, 240, 210, 0.04);
  transition: border-color 0.12s, background 0.12s;
}
.quota-feature-card:hover {
  border-color: rgba(120, 100, 78, 0.55);
}
.quota-feature-card__head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  margin-bottom: 8px;
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(74, 61, 48, 0.28);
}
.quota-feature-card__title {
  font-size: 0.84rem;
  font-weight: 600;
  color: #e8dcc8;
  line-height: 1.25;
}
.quota-feature-card__key {
  font-size: 0.62rem;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.22);
  padding: 1px 5px;
  border-radius: 4px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.quota-feature-card__badge {
  font-size: 0.64rem;
  font-weight: 600;
  color: #a8c4e8;
  background: rgba(122, 158, 200, 0.12);
  padding: 2px 6px;
  border-radius: 999px;
  white-space: nowrap;
}
.quota-feature-card__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.quota-feature-card__row {
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  min-width: 0;
}
.quota-feature-card__label {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
}
.quota-feature-card__period {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.quota-feature-card__period .quota-period-type {
  flex: 1;
  min-width: 0;
}
.quota-feature-card__period .quota-period-custom-days {
  width: 44px;
  flex-shrink: 0;
}
.quota-feature-card__period .quota-period-custom-days[hidden] {
  display: none;
}
.quota-feature-card__row .admin-control--compact {
  width: 100%;
}
.quota-feature-card__pending {
  margin: 0;
  font-size: 0.68rem;
  color: var(--muted);
  font-style: italic;
}

/* 旧配额矩阵（保留类名兼容，已不再使用） */
.quota-matrix-scroll {
  overflow-x: auto;
  margin-top: 4px;
}
.quota-matrix {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 0.78rem;
}
.quota-matrix th,
.quota-matrix td {
  padding: 4px 7px;
  border-bottom: 1px solid rgba(74, 61, 48, 0.32);
  vertical-align: middle;
  white-space: nowrap;
}
.quota-matrix thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(22, 18, 14, 0.98);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  text-align: left;
  padding-top: 6px;
  padding-bottom: 6px;
}
.quota-matrix tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}
.quota-matrix__feature {
  min-width: 4.8rem;
  max-width: 7rem;
  font-weight: 500;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
}
.quota-matrix__period {
  width: 4.8rem;
}
.quota-matrix__period-read {
  width: 4.2rem;
  color: var(--muted);
  font-size: 0.74rem;
}
.quota-matrix__custom {
  width: 3.2rem;
}
.quota-matrix__custom .quota-period-custom-days {
  width: 100%;
  max-width: 52px;
}
.quota-matrix__custom .quota-period-custom-days[hidden] {
  display: none;
}
.quota-matrix__tier {
  width: 4.2rem;
  text-align: center;
}
.quota-matrix__tier input {
  width: 100%;
  max-width: 64px;
  margin: 0 auto;
  text-align: center;
}
.quota-matrix__tier--na {
  text-align: center;
  color: var(--muted);
  font-size: 0.72rem;
}
.quota-matrix__limit,
.quota-matrix__minute {
  width: 4.2rem;
}
.quota-matrix__limit input,
.quota-matrix__minute input {
  width: 100%;
  max-width: 64px;
}
.quota-matrix--anonymous {
  min-width: 360px;
}

/* 旧配额卡片样式（其它页可能仍引用 quota-field） */
.quota-period-hint {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
  margin-left: 4px;
}
.feature-period-panel {
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}
.feature-period-panel__title {
  margin: 0 0 6px;
  font-size: 0.95rem;
}
.feature-period-panel__lead {
  margin: 0 0 12px;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
}
.feature-period-list {
  display: grid;
  gap: 10px;
}
.feature-period-list > .feature-period-row {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(260px, 2fr);
  gap: 12px 16px;
  align-items: end;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
}
.feature-period-row__info {
  min-width: 0;
  padding-bottom: 2px;
}
.feature-period-row__info .feature-key {
  display: block;
  margin-top: 4px;
  font-size: 0.72rem;
  color: var(--muted);
}
.user-tier-quota-list {
  display: grid;
  gap: 16px;
}
.user-tier-quota-block {
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid rgba(74, 61, 48, 0.4);
  background: linear-gradient(165deg, rgba(28, 22, 16, 0.92), rgba(14, 11, 8, 0.85));
  box-shadow: inset 0 1px 0 rgba(255, 240, 210, 0.04);
}
.user-tier-quota-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(74, 61, 48, 0.28);
}
.user-tier-quota-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #e8dcc8;
}
.user-tier-quota-code {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.22);
  color: var(--muted);
}
.user-tier-quota-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px 16px;
}
.quota-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.quota-field__label {
  font-size: 0.76rem;
  font-weight: 600;
  color: #c8b8a4;
}
.quota-field__input {
  min-width: 0;
}
.quota-list {
  gap: 12px;
}
.quota-row {
  padding: 14px 16px;
  gap: 14px 16px;
  border-radius: 10px;
  align-items: end;
}
.quota-row__info {
  min-width: 0;
  padding-bottom: 2px;
}
.ai-p-delete {
  color: #e8a8a8 !important;
  border-color: rgba(196, 92, 92, 0.35) !important;
}
.ai-p-delete:hover {
  background: rgba(196, 92, 92, 0.12) !important;
  border-color: rgba(196, 92, 92, 0.5) !important;
}
@media (max-width: 1100px) {
  .user-tier-quota-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .quota-feature-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quota-tier-btn { min-width: calc(50% - 4px); flex: 1; }
  .user-tier-quota-grid { grid-template-columns: 1fr; }
  .quota-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
}
.status-text, .error-text { font-size: 0.82rem; margin-top: 10px; }
.status-text { color: var(--ok); }
.error-text { color: var(--danger); }

/* M1-4: 统计表格 */
.stats-empty { color: var(--muted); font-size: 0.85rem; margin: 0; }
.stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.stats-table th {
  text-align: left;
  padding: 8px 12px;
  border-bottom: 2px solid var(--border);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.stats-table td {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(74,61,48,0.3);
}
.stats-table tbody tr:hover {
  background: rgba(107,141,184,0.06);
}
.stats-ok { color: var(--ok); }
.stats-err { color: var(--danger); }

/* 修改密码面板输入框 */
.form-grid input[type="password"] {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #1a1612;
  color: var(--text);
}

/* ── 云服务配置面板 ── */
.cloud-nav-badge {
  flex-shrink: 0;
  font-size: 0.65rem;
  padding: 1px 6px;
  border-radius: 8px;
  background: rgba(90, 154, 110, 0.2);
  color: var(--ok);
}
.cloud-service-list {
  display: block;
}
.cloud-card {
  display: none;
  background: rgba(0,0,0,0.15);
  border: 1px solid rgba(74,61,48,0.5);
  border-radius: 10px;
  overflow: hidden;
}
.cloud-card.active {
  display: block;
}
.cloud-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(74,61,48,0.3);
}
.cloud-card-title {
  font-size: 0.95rem;
  font-weight: 600;
}
.cloud-card-desc {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 2px;
}
.cloud-card-hint {
  margin: 0 16px;
  padding: 10px 12px;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--muted);
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 8px;
}
.cloud-card-hint i {
  margin-right: 6px;
  color: #3b82f6;
}
.cloud-card-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px 16px;
}
.cloud-form-section-title {
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.cloud-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.cloud-form-grid--keys {
  grid-template-columns: 1fr 1fr;
}
.cloud-form-grid label {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
}
.cloud-form-grid input,
.cloud-form-grid select {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #1a1612;
  color: var(--text);
  font-size: 0.85rem;
}
@media (max-width: 800px) {
  .cloud-form-grid,
  .cloud-form-grid--keys { grid-template-columns: 1fr; }
}
.cloud-card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-top: 1px solid rgba(74,61,48,0.3);
}
.cloud-status {
  font-size: 0.82rem;
  color: var(--ok);
  margin-left: auto;
}

/* ── AI 服务商配置面板 ── */
.ai-provider-nav-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 4px;
}
.ai-provider-nav-list .settings-nav-item__label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 148px;
}
.ai-provider-list {
  display: grid;
  gap: 12px;
}
.ai-provider {
  background: rgba(0,0,0,0.15);
  border: 1px solid rgba(74,61,48,0.5);
  border-radius: 10px;
  overflow: hidden;
}
.ai-provider--active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(107,141,184,0.3);
}
.ai-provider-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(74,61,48,0.3);
}
.ai-provider-header__identity {
  flex: 1;
  min-width: 0;
}
.ai-provider-name-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 320px;
}
.ai-provider-name-field__label {
  font-size: 0.74rem;
  font-weight: 600;
  color: #c8b8a4;
}
.ai-provider-name {
  font-size: 0.95rem;
  font-weight: 600;
}
.ai-provider-model {
  font-size: 0.76rem;
  color: var(--muted);
  margin-top: 8px;
}
.ai-provider-badge--builtin {
  background: rgba(107, 141, 184, 0.15);
  color: #4a6a8a;
  margin-right: 6px;
}
.ai-provider--builtin {
  border-color: rgba(107, 141, 184, 0.45);
}
.ai-provider-name-readonly {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text, #3d3024);
}
.ai-provider-nav-item--builtin .settings-nav-item__label {
  font-weight: 600;
}
.cloud-nav-badge--builtin {
  background: rgba(107, 141, 184, 0.2);
  color: #4a6a8a;
}
.ai-provider-badge {
  flex-shrink: 0;
  font-size: 0.75rem;
  color: var(--ok);
  background: rgba(90,154,110,0.15);
  padding: 4px 10px;
  border-radius: 10px;
  font-weight: 600;
}
.ai-provider-body {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 16px;
  padding: 14px 16px;
}
.ai-provider-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.ai-provider-field__label {
  font-size: 0.76rem;
  font-weight: 600;
  color: #c8b8a4;
}
.ai-provider-body label {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
}
.ai-provider-body input {
  display: block;
  width: 100%;
}
.ai-provider-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  padding: 12px 16px;
  border-top: 1px solid rgba(74,61,48,0.3);
}
.ai-p-status {
  font-size: 0.82rem;
  color: var(--ok);
  margin-left: auto;
  max-width: 400px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ai-provider-add {
  border-top: 1px solid var(--border);
  padding-top: 14px;
}
.ai-provider-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.ai-provider-preset-btn.active {
  border-color: var(--accent, #6b8db8);
  color: var(--accent, #6b8db8);
}
.ai-provider-preset-hint {
  margin: 0 0 12px;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.45;
}
.ai-provider-add h3 {
  margin: 0 0 10px;
  font-size: 0.88rem;
  color: var(--muted);
}
.ai-provider-form {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(220px, 2fr) minmax(140px, 1fr) minmax(120px, 1fr) auto;
  gap: 14px 16px;
  align-items: end;
}
.ai-provider-form__submit {
  white-space: nowrap;
  padding: 9px 16px;
}
.ai-provider-form__submit i { margin-right: 0.35rem; }
.ai-provider-field--wide { min-width: 0; }
.ai-provider-form label {
  font-size: 0.82rem;
  color: var(--muted);
}
.ai-provider-form input {
  display: block;
  width: 100%;
}

.monitor-overview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.monitor-card {
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #1a1612;
}
.monitor-card-label {
  font-size: 0.78rem;
  color: var(--muted);
}
.monitor-card-value {
  font-size: 1.35rem;
  font-weight: 600;
  margin: 4px 0;
}
.monitor-card-sub {
  font-size: 0.75rem;
  color: var(--muted);
}
.panel-sub {
  margin: 16px 0 8px;
  font-size: 0.9rem;
  color: var(--muted);
}
.user-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
  align-items: center;
}
.user-filter input,
.user-filter select {
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #1a1612;
  color: var(--text);
}
.user-bulk-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  border: 1px solid rgba(180, 130, 100, 0.22);
  background: rgba(120, 60, 60, 0.08);
}
.user-bulk-select-all {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--muted);
  cursor: pointer;
}
.user-bulk-count {
  font-size: 0.82rem;
  color: var(--text);
  font-weight: 600;
}
.user-bulk-delete-summary {
  margin: 0 0 0.75rem;
  font-size: 0.92rem;
  line-height: 1.55;
}
.user-bulk-delete-warn {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.6;
}
.user-tier-table .user-row-check {
  width: 36px;
  text-align: center;
}
.user-tier-table .user-row-check input {
  width: 15px;
  height: 15px;
  cursor: pointer;
}
.user-tier-actions .user-delete-btn {
  color: #c08080;
}
.user-tier-actions .user-delete-btn:hover {
  color: #e09090;
  border-color: rgba(200, 100, 100, 0.35);
}
.user-pagination {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--muted);
}
.empty-hint {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 8px 0;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.data-table th {
  text-align: left;
  padding: 8px 12px;
  border-bottom: 2px solid var(--border);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.78rem;
}
.data-table td {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(74, 61, 48, 0.3);
}
.data-table tbody tr:hover {
  background: rgba(107, 141, 184, 0.06);
}
.user-tier-table .user-tier-months {
  width: 4.2rem;
  margin-left: 4px;
}
.user-tier-expired-tag {
  display: inline-block;
  margin-left: 6px;
  font-size: 0.72rem;
  color: #b45309;
  font-weight: 600;
}
.user-tier-actions {
  white-space: nowrap;
}
.user-tier-actions .btn-small + .btn-small {
  margin-left: 6px;
}
.monitor-stream,
.monitor-ranking {
  overflow-x: auto;
}

.form-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
  margin-top: 12px;
}
.form-actions-row .btn-primary,
.form-actions-row .btn-secondary {
  flex-shrink: 0;
}
.form-actions-row label {
  flex: 1;
  min-width: 200px;
}

.email-reg-status {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(154, 138, 118, 0.35);
  background: rgba(255, 252, 246, 0.85);
  font-size: 0.82rem;
  line-height: 1.45;
  color: #5c4a38;
}
.email-reg-status strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.88rem;
}
.email-reg-status--ok {
  border-color: rgba(76, 140, 90, 0.45);
  background: rgba(232, 248, 236, 0.9);
}
.email-reg-status--warn {
  border-color: rgba(180, 110, 60, 0.45);
  background: rgba(255, 244, 230, 0.95);
}
.email-reg-status--closed {
  border-color: rgba(140, 130, 120, 0.4);
  background: rgba(255, 252, 246, 0.72);
  color: #6b5c4e;
}

.panel-desc--tight { margin: 0.35rem 0 0.65rem; font-size: 0.78rem; }
.panel-sub--feed { margin: 0.85rem 0 0.45rem; font-size: 0.82rem; color: #6d5e4c; }
.console-panel-extra--feed { margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px dashed rgba(140, 120, 100, 0.35); }
.pm-feed-list { display: flex; flex-direction: column; gap: 0.65rem; }
.pm-feed-empty {
  margin: 0;
  padding: 1.35rem 1rem;
  font-size: 0.84rem;
  color: var(--muted);
  text-align: center;
  border: 1px dashed rgba(180, 160, 130, 0.35);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.12);
}
.pm-feed-row {
  display: grid;
  grid-template-columns: 6.5rem minmax(14rem, 2.4fr) minmax(12rem, 1.35fr) minmax(12rem, 1.35fr) 2.85rem;
  gap: 0.75rem;
  align-items: center;
  padding: 0.7rem 0.8rem;
  border-radius: 10px;
  border: 1px solid rgba(180, 160, 130, 0.22);
  background: rgba(0, 0, 0, 0.14);
}
.pm-feed-row select,
.pm-feed-row input {
  font: inherit;
  font-size: 0.86rem;
  padding: 0.58rem 0.68rem;
  border: 1px solid rgba(180, 160, 130, 0.35);
  border-radius: 8px;
  background: rgba(26, 22, 18, 0.85);
  color: var(--text);
  min-width: 0;
  width: 100%;
}
.pm-feed-row select:focus,
.pm-feed-row input:focus {
  outline: none;
  border-color: rgba(107, 141, 184, 0.65);
  box-shadow: 0 0 0 2px rgba(107, 141, 184, 0.18);
}
.pm-feed-del {
  color: #e08a7a;
  border-color: rgba(196, 92, 92, 0.35) !important;
}
.pm-feed-del:hover { background: rgba(196, 92, 92, 0.12) !important; }

.promotion-save-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.78rem 1.85rem;
  font-size: 0.98rem;
  font-weight: 700;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
  letter-spacing: 0.02em;
}
.promotion-save-btn i { margin-right: 0.45rem; }
.promotion-save-btn:hover {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
  transform: translateY(-1px);
}
.quotas-save-btn {
  padding: 0.78rem 1.85rem;
  font-size: 0.98rem;
  font-weight: 700;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
  letter-spacing: 0.02em;
}
.quotas-save-btn i { margin-right: 0.45rem; }
.quotas-save-btn:hover:not(:disabled) {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
  transform: translateY(-1px);
}
.quotas-save-btn:disabled {
  opacity: 0.65;
  cursor: wait;
}
.task-pricing-save-btn {
  padding: 0.78rem 1.85rem;
  font-size: 0.98rem;
  font-weight: 700;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
  letter-spacing: 0.02em;
}
.task-pricing-save-btn i { margin-right: 0.45rem; }
.task-pricing-save-btn:hover:not(:disabled) {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
  transform: translateY(-1px);
}
.task-pricing-save-btn:disabled {
  opacity: 0.65;
  cursor: wait;
}

.promotion-layout {
  min-height: min(78vh, 760px);
}
.promotion-pane--promo .promotion-pane__title { color: #f0dcc0; }
.promotion-pane--activity .promotion-pane__title { color: #c8e8d0; }
.promotion-pane--notice .promotion-pane__title { color: #c8daf0; }
.promotion-nav-item[data-promotion-pane="promo"].active {
  background: rgba(180, 140, 90, 0.16);
  box-shadow: inset 0 0 0 1px rgba(180, 140, 90, 0.28);
}
.promotion-nav-item[data-promotion-pane="promo"].active i { color: #e8c89a; }
.promotion-nav-item[data-promotion-pane="promo"].active .promotion-nav-item__emoji { filter: none; opacity: 1; }
.promotion-nav-item[data-promotion-pane="activity"].active {
  background: rgba(90, 180, 120, 0.14);
  box-shadow: inset 0 0 0 1px rgba(90, 180, 120, 0.28);
}
.promotion-nav-item[data-promotion-pane="activity"].active i { color: #9ae8b4; }
.promotion-nav-item[data-promotion-pane="notice"].active {
  background: rgba(90, 140, 180, 0.14);
  box-shadow: inset 0 0 0 1px rgba(90, 140, 180, 0.28);
}
.promotion-nav-item[data-promotion-pane="notice"].active i { color: #9ab4e8; }
.promotion-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.16);
  border: 1px solid rgba(180, 160, 130, 0.2);
  width: fit-content;
  flex-shrink: 0;
}
.promotion-toggle__label { font-size: 0.84rem; font-weight: 600; color: var(--text); }
.pm-feed-editor {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 0;
  width: 100%;
}
.pm-feed-table-head {
  display: grid;
  grid-template-columns: 6.5rem minmax(14rem, 2.4fr) minmax(12rem, 1.35fr) minmax(12rem, 1.35fr) 2.85rem;
  gap: 0.75rem;
  padding: 0 0.8rem;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-transform: none;
}
.promotion-pane__count {
  font-size: 0.78rem;
  color: var(--muted);
}

/* 公告&推广 · 公众号式编辑工作台 */
.pm-broadcast-workbench {
  display: flex;
  flex: 1;
  min-height: 0;
  gap: 0;
  border: 1px solid rgba(180, 160, 130, 0.22);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.1);
  min-height: min(62vh, 640px);
}
.pm-broadcast-workbench__sidebar {
  width: min(240px, 32%);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid rgba(180, 160, 130, 0.2);
  background: rgba(0, 0, 0, 0.16);
}
.pm-broadcast-workbench__sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid rgba(180, 160, 130, 0.18);
}
.pm-broadcast-workbench__count { font-weight: 600; }
.pm-broadcast-item-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0.45rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.pm-broadcast-item-list__empty {
  margin: 0;
  padding: 1.2rem 0.65rem;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}
.pm-broadcast-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.28rem;
  width: 100%;
  padding: 0.65rem 0.68rem;
  border: 1px solid rgba(180, 160, 130, 0.22);
  border-radius: 8px;
  background: rgba(26, 22, 18, 0.55);
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: var(--text);
  transition: background 0.12s, border-color 0.12s;
}
.pm-broadcast-item:hover {
  background: rgba(40, 34, 28, 0.72);
  border-color: rgba(180, 160, 130, 0.38);
}
.pm-broadcast-item.is-active {
  background: rgba(255, 252, 244, 0.92);
  border-color: rgba(107, 141, 184, 0.45);
  color: #2a2018;
}
.pm-broadcast-item.is-active .pm-broadcast-item__digest,
.pm-broadcast-item.is-active .pm-broadcast-item__meta {
  color: #6d5e4c;
}
.pm-broadcast-item__title {
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pm-broadcast-item__emoji {
  display: inline-block;
  margin-right: 0.28rem;
  font-size: 0.92em;
  vertical-align: -0.05em;
}
.pm-broadcast-item__digest {
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pm-broadcast-item__meta {
  display: flex;
  justify-content: space-between;
  width: 100%;
  font-size: 0.66rem;
  color: var(--muted);
}
.pm-broadcast-workbench__add {
  margin: 0.45rem 0.5rem 0.55rem;
  width: calc(100% - 1rem);
}
.pm-broadcast-workbench__editor {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.wx-mp-editor {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.wx-mp-editor__empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 2rem;
  color: var(--muted);
  font-size: 0.88rem;
}
.wx-mp-editor__empty i { font-size: 2rem; opacity: 0.45; }
.wx-mp-editor__workspace {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0.85rem 0.95rem 1rem;
}
.wx-mp-editor__form {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.wx-mp-publish-mode {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.1rem;
}
.wx-mp-publish-mode__opt {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.86rem;
  color: var(--text);
  cursor: pointer;
}
.wx-mp-cover-upload {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.wx-mp-cover-upload__preview {
  width: 100%;
  max-width: 360px;
  aspect-ratio: 900 / 383;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22) center/cover no-repeat;
  border: 1px dashed rgba(180, 160, 130, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.82rem;
}
.wx-mp-cover-upload__preview.has-image { color: transparent; border-style: solid; }
.wx-mp-cover-upload__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.wx-mp-cover-upload__status {
  font-size: 0.78rem;
  color: var(--muted);
}
.wx-mp-field {
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
}
.wx-mp-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}
.wx-mp-field__label {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--muted);
}
.wx-mp-field__label small {
  font-weight: 500;
  opacity: 0.85;
}
.wx-mp-field--title .admin-control {
  font-size: 1.05rem;
  font-weight: 700;
  padding: 0.65rem 0.75rem;
}
.wx-mp-field__body {
  min-height: 12rem;
  font-family: 'Noto Serif SC', 'Songti SC', Georgia, serif;
  line-height: 1.75;
}
.wx-mp-editor__row-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.55rem;
  padding-top: 0.25rem;
}
.wx-mp-preview-publish-btn {
  min-width: 7.5rem;
}
.wx-mp-delete-btn { color: #e08a7a !important; }

/* 公告&推广 · 前端预览浮窗 */
body.pm-feed-preview-modal-open { overflow: hidden; }
.pm-feed-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}
.pm-feed-preview-modal[hidden] { display: none !important; }
.pm-feed-preview-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 6, 4, 0.62);
  backdrop-filter: blur(2px);
}
.pm-feed-preview-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  max-height: min(92vh, 860px);
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  border: 1px solid rgba(180, 160, 130, 0.35);
  background: #2a241c;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}
.pm-feed-preview-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(180, 160, 130, 0.22);
  background: rgba(0, 0, 0, 0.2);
}
.pm-feed-preview-modal__head h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #f0e6d8;
}
.pm-feed-preview-modal__close {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.25rem 0.45rem;
  border-radius: 6px;
}
.pm-feed-preview-modal__close:hover { color: #fff; background: rgba(255,255,255,0.08); }
.pm-feed-preview-modal__body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  background: #e4ddd4;
}
.pm-feed-preview-modal__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid rgba(180, 160, 130, 0.22);
  background: rgba(0, 0, 0, 0.18);
}
.pm-feed-preview-modal__status {
  margin: 0;
  flex: 1;
  min-width: 8rem;
  font-size: 0.82rem;
  color: var(--muted);
}
.pm-feed-preview-modal__actions {
  display: flex;
  gap: 0.55rem;
  flex-shrink: 0;
}
.pm-feed-preview-stage {
  position: relative;
  min-height: min(68vh, 620px);
  display: flex;
  flex-direction: column;
}
.pm-feed-preview-stage .pm-broadcast-split__article-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: #e4ddd4;
  background-image:
    radial-gradient(circle at 20% 28%, rgba(160, 130, 100, 0.16) 0%, transparent 38%),
    radial-gradient(circle at 82% 72%, rgba(120, 90, 60, 0.12) 0%, transparent 42%);
}
.pm-feed-preview-stage .pm-broadcast-split__article-bg__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(48px);
  pointer-events: none;
}
.pm-feed-preview-stage .pm-broadcast-split__article-bg__orb--1 {
  width: min(38vw, 300px);
  height: min(38vw, 300px);
  top: 8%;
  left: 4%;
  background: radial-gradient(circle, rgba(226, 184, 122, 0.38) 0%, transparent 70%);
  opacity: 0.6;
}
.pm-feed-preview-stage .pm-broadcast-split__article-bg__orb--2 {
  width: min(34vw, 260px);
  height: min(34vw, 260px);
  bottom: 6%;
  right: 3%;
  background: radial-gradient(circle, rgba(180, 140, 95, 0.34) 0%, transparent 72%);
  opacity: 0.55;
}
.pm-feed-preview-stage .pm-broadcast-split__article-bg__grid {
  position: absolute;
  inset: 0;
  opacity: 0.11;
  background-image:
    linear-gradient(rgba(60, 42, 27, 0.85) 1px, transparent 1px),
    linear-gradient(90deg, rgba(60, 42, 27, 0.85) 1px, transparent 1px);
  background-size: 28px 28px;
}
.pm-feed-preview-stage .pm-broadcast-split__article-bg__vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 94% 90% at 50% 48%, transparent 32%, rgba(45, 35, 25, 0.08) 100%);
}
.pm-feed-preview-stage .pm-broadcast-split__article-scroll {
  position: relative;
  z-index: 1;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.pm-feed-preview-stage .pm-broadcast-split__article-pad {
  flex: 0 0 auto;
  padding: 1rem clamp(1.25rem, 5vw, 3rem) 0;
}
.pm-feed-preview-stage .pm-broadcast-split__article-tail {
  flex: 1 0 auto;
  min-height: max(10rem, 28vh);
  width: 100%;
}
.pm-feed-preview-stage .wx-oa-article--panel {
  width: 100%;
  max-width: min(580px, 100%);
  margin: 0 auto;
  padding: 1.15rem 1.05rem 1.65rem;
  box-sizing: border-box;
  background: #fffef9;
  border: none;
  border-radius: 0;
  box-shadow: none;
}
.pm-feed-preview-stage .wx-oa-article__title {
  margin: 0 0 0.65rem;
  font-family: 'Noto Serif SC', 'Songti SC', 'PingFang SC', Georgia, serif;
  font-size: 1.22rem;
  font-weight: 700;
  line-height: 1.45;
  color: #6b2800;
}
.pm-feed-preview-stage .wx-oa-article__author-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(120, 100, 80, 0.2);
  font-size: 0.82rem;
}
.pm-feed-preview-stage .wx-oa-article__author-label { color: #888; font-weight: 500; }
.pm-feed-preview-stage .wx-oa-article__author {
  font-weight: 900;
  color: #1a1610;
}
.pm-feed-preview-stage .wx-oa-article__date {
  margin-left: auto;
  color: #888;
  font-size: 0.78rem;
}
.pm-feed-preview-stage .wx-oa-article__cover {
  width: 100%;
  aspect-ratio: 900 / 383;
  margin: 0 0 1.15rem;
  border-radius: 2px;
  background-size: cover;
  background-position: center;
  background-color: #ddd2c4;
}
.pm-feed-preview-stage .wx-oa-article__cover--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #ece4da 0%, #ddd2c4 100%);
  color: #999;
  font-size: 0.78rem;
}
.pm-feed-preview-stage .wx-oa-article__body {
  font-family: 'Noto Serif SC', 'Songti SC', 'PingFang SC', Georgia, serif;
  font-size: 0.94rem;
  line-height: 1.85;
  color: #2a241c;
  white-space: pre-wrap;
  word-break: break-word;
}
.pm-feed-preview-stage .wx-oa-article__read-more-wrap {
  margin-top: 1.75rem;
  padding-top: 1.15rem;
  border-top: 1px solid rgba(120, 100, 80, 0.2);
  text-align: center;
}
.pm-feed-preview-stage .wx-oa-article__read-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 8.5rem;
  padding: 0.55rem 1.15rem;
  border-radius: 6px;
  border: 1px solid rgba(120, 100, 80, 0.25);
  background: #f5efe6;
  color: #6b2800;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
}
.btn-primary--sm {
  padding: 0.42rem 0.85rem;
  font-size: 0.82rem;
}

@media (max-width: 900px) {
  .page-header {
    flex-direction: column;
    align-items: stretch;
  }
  .page-header__actions {
    width: 100%;
    flex-direction: column-reverse;
    align-items: stretch;
  }
  .page-header__status { text-align: center; }
  .promotion-save-btn { width: 100%; }
  .quotas-save-btn { width: 100%; }
  .task-pricing-save-btn { width: 100%; }
  .settings-layout,
  .promotion-layout {
    flex-direction: column;
    min-height: 0;
  }
  .settings-nav,
  .promotion-nav {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    border-right: none;
    border-bottom: 1px solid rgba(180, 160, 130, 0.22);
  }
  .settings-nav__section,
  .promotion-nav__section {
    width: 100%;
  }
  .settings-nav-item,
  .promotion-nav-item,
  .cloud-nav-item {
    flex: 1 1 160px;
  }
  .moderation-split {
    grid-template-columns: 1fr;
  }
  .moderation-detail-card {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto auto auto;
  }
  .moderation-detail-main,
  .moderation-detail-footer {
    display: contents;
  }
  .moderation-detail-preview {
    grid-column: 1;
    grid-row: 1;
    border-right: none;
    border-bottom: 1px solid rgba(180, 160, 130, 0.22);
  }
  .moderation-detail-actions {
    grid-column: 1;
    grid-row: 2;
    border-left: none;
    border-bottom: 1px solid rgba(180, 160, 130, 0.22);
  }
  .moderation-detail-footer__info {
    grid-column: 1;
    grid-row: 3;
    border-right: none;
    border-bottom: 1px solid rgba(180, 160, 130, 0.22);
  }
  .moderation-detail-footer__actions {
    grid-column: 1;
    grid-row: 4;
  }
  .moderation-detail-preview__meta {
    white-space: normal;
  }
  .pm-feed-table-head,
  .pm-feed-row { grid-template-columns: 1fr; }
  .pm-feed-table-head { display: none; }
  .promotion-pane__head { flex-direction: column; align-items: flex-start; }
  .pm-broadcast-workbench { flex-direction: column; min-height: 0; }
  .pm-broadcast-workbench__sidebar { width: 100%; max-height: 38vh; border-right: none; border-bottom: 1px solid rgba(180, 160, 130, 0.2); }
  .wx-mp-field-row { grid-template-columns: 1fr; }
}

.moderation-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}
.moderation-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-height: min(68vh, 680px);
  overflow: auto;
  margin-bottom: 0;
  padding: 0.65rem;
  border: 1px solid rgba(180, 160, 130, 0.22);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.08);
}
.moderation-row {
  display: grid;
  grid-template-columns: 4.75rem 1fr auto;
  gap: 0.75rem;
  align-items: center;
  width: 100%;
  text-align: left;
  padding: 0.72rem 0.85rem;
  border: 1px solid rgba(180, 160, 130, 0.25);
  border-radius: 10px;
  background: rgba(255, 252, 245, 0.65);
  cursor: pointer;
}
.moderation-row--reviewed {
  opacity: 0.82;
}
.moderation-row.active,
.moderation-row:hover {
  border-color: rgba(90, 120, 160, 0.45);
  background: rgba(240, 246, 255, 0.85);
  opacity: 1;
}
.moderation-row__lead {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.22rem;
  width: 100%;
  min-width: 0;
  text-align: center;
}
.moderation-row__kind {
  font-size: 0.78rem;
  font-weight: 700;
  color: #4a6280;
  line-height: 1.2;
  width: 100%;
  text-align: center;
}
.moderation-row__status {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.moderation-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.06rem 0.34rem;
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  border: 1px solid transparent;
}
.moderation-status-badge--pending {
  color: #8a7968;
  background: rgba(120, 110, 100, 0.12);
  border-color: rgba(120, 110, 100, 0.22);
}
.moderation-status-badge--approved {
  color: #3d7a52;
  background: rgba(90, 154, 110, 0.16);
  border-color: rgba(90, 154, 110, 0.28);
}
.moderation-status-badge--rejected {
  color: #a84848;
  background: rgba(196, 92, 92, 0.14);
  border-color: rgba(196, 92, 92, 0.28);
}
.moderation-status-badge--read {
  color: #6a5a48;
  background: rgba(120, 100, 80, 0.12);
  border-color: rgba(120, 100, 80, 0.22);
}
.feedback-detail-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0.5rem 0.25rem 1rem;
}
.feedback-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.feedback-detail-head h4 {
  margin: 0 0 0.35rem;
}
.feedback-detail-meta {
  margin: 0;
  font-size: 0.86rem;
  color: #7a6a58;
}
.feedback-detail-section h5 {
  margin: 0 0 0.45rem;
  font-size: 0.92rem;
}
.feedback-detail-images {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.65rem;
}
.feedback-detail-image {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(140, 110, 80, 0.18);
}
.feedback-detail-image img {
  width: 100%;
  display: block;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.feedback-detail-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}
.feedback-detail-actions textarea,
.feedback-detail-section textarea {
  width: 100%;
  min-height: 88px;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(140, 110, 80, 0.22);
  resize: vertical;
}
.moderation-row__title {
  font-size: 0.9rem;
  color: #3a3028;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}
.moderation-row__user {
  font-size: 0.72rem;
  color: #8a7968;
  font-weight: 400;
}
.moderation-row__time {
  font-size: 0.76rem;
  color: #8a7968;
  white-space: nowrap;
}
.moderation-detail-card {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  flex: 1;
  min-height: 0;
  height: 100%;
  padding: 0;
}
.moderation-detail-main,
.moderation-detail-footer {
  display: contents;
}
.moderation-detail-preview {
  grid-column: 1;
  grid-row: 1;
  padding: 0;
  overflow: hidden;
  border-right: 1px solid rgba(180, 160, 130, 0.22);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: stretch;
  min-height: 0;
  height: 100%;
}
.moderation-detail-actions {
  grid-column: 2;
  grid-row: 1;
  padding: 1rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-height: 0;
  min-width: 0;
  background: rgba(255, 252, 245, 0.04);
  border-left: 1px solid rgba(180, 160, 130, 0.18);
}
.moderation-detail-footer__info {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  padding: 0.28rem 0.65rem;
  border-top: 1px solid rgba(180, 160, 130, 0.22);
  border-right: 1px solid rgba(180, 160, 130, 0.18);
  min-width: 0;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.14);
}
.moderation-detail-footer__actions {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  align-items: center;
  justify-content: stretch;
  padding: 0.28rem 0.5rem;
  min-width: 0;
  border-top: 1px solid rgba(180, 160, 130, 0.22);
  background: rgba(0, 0, 0, 0.14);
}
.moderation-detail-preview__body {
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 0;
  padding: 0.65rem;
  box-sizing: border-box;
}
.moderation-detail-preview__body--media-only,
.moderation-detail-preview__body--text-only {
  padding: 0.65rem;
}
.moderation-detail-preview__body--empty {
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.88rem;
}
.moderation-detail-preview__body--empty p {
  margin: 0;
}
.moderation-detail-footer__sep {
  flex-shrink: 0;
  color: rgba(180, 160, 130, 0.45);
  font-size: 0.72rem;
  line-height: 1;
}
.moderation-detail-footer__actions--readonly {
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  padding: 0.38rem 0.75rem;
}
.moderation-footer-note {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.moderation-detail-preview__info-main {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}
.moderation-detail-preview__kind {
  flex-shrink: 0;
  padding: 0.04rem 0.32rem;
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 700;
  color: #9ec4e8;
  background: rgba(90, 120, 160, 0.2);
  border: 1px solid rgba(120, 150, 190, 0.24);
  line-height: 1.35;
}
.moderation-detail-preview__status {
  flex-shrink: 0;
  padding: 0.04rem 0.32rem;
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 700;
  color: #e8c89a;
  background: rgba(180, 140, 90, 0.16);
  border: 1px solid rgba(200, 160, 110, 0.22);
  line-height: 1.35;
  white-space: nowrap;
}
.moderation-detail-preview__label {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.68rem;
  font-weight: 600;
  color: #d8ccb8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.moderation-detail-preview__meta {
  flex: 1 1 100%;
  min-width: 0;
  font-size: 0.64rem;
  color: var(--muted);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.moderation-detail-actions__title {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
  color: #c4ad8a;
}
.moderation-actions-label {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1;
  min-height: 0;
  width: 100%;
}
.moderation-actions-label textarea {
  flex: 1;
  min-height: 0;
  width: 100%;
  resize: none;
  padding: 0.85rem 0.75rem;
  font-size: 0.9rem;
  line-height: 1.55;
  border-radius: 10px;
  box-sizing: border-box;
}
.moderation-actions-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  width: 100%;
}
.moderation-actions-btns .btn-primary,
.moderation-actions-btns .btn-ghost {
  padding: 0.48rem 0.65rem;
  min-height: 0;
  font-size: 0.88rem;
  font-weight: 700;
  justify-content: center;
  border-radius: 8px;
}
.moderation-reject-btn {
  border: 1px solid rgba(196, 92, 92, 0.45);
  color: #e8a8a8;
}
.moderation-reject-btn:hover {
  background: rgba(196, 92, 92, 0.12);
  border-color: rgba(196, 92, 92, 0.65);
}
.moderation-detail-actions--readonly {
  justify-content: flex-start;
}
.moderation-result-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 700;
  width: fit-content;
}
.moderation-result-badge--approved {
  background: rgba(90, 154, 110, 0.18);
  color: #9fd4ad;
}
.moderation-result-badge--rejected {
  background: rgba(196, 92, 92, 0.16);
  color: #e8a8a8;
}
.moderation-media {
  margin: 0;
  flex: 1 1 auto;
  align-self: stretch;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(180, 160, 130, 0.28);
  box-sizing: border-box;
}
.moderation-media img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  margin: 0 auto;
  border-radius: 8px;
  border: 1px solid rgba(180, 160, 130, 0.35);
  object-fit: contain;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}
.moderation-preview {
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: 100%;
  margin: 0;
  padding: 1rem 1.15rem;
  font-size: 0.94rem;
  line-height: 1.65;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.14);
  border: 1px solid rgba(180, 160, 130, 0.28);
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  box-sizing: border-box;
}
.moderation-preview--note {
  min-height: 120px;
  font-size: 0.88rem;
}

@media (max-width: 700px) {
  .sidebar { width: 72px; }
  .nav-section-label,
  .nav-item span,
  .logo span,
  .admin-user,
  .config-version { display: none !important; }
  .nav-item { justify-content: center; padding: 0.7rem 0.35rem; }
  .admin-content { padding: 12px 14px 20px; }
}

/* ── 闭关标语库 ── */
.settings-pane__title-icon {
  margin-right: 0.35rem;
  color: var(--accent);
  font-size: 0.92em;
}
.retreat-quotes-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 0.15rem;
}
.retreat-quote-stat {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  border: 1px solid rgba(140, 120, 100, 0.28);
  background: rgba(0, 0, 0, 0.14);
  color: var(--muted);
}
.retreat-quote-stat__icon {
  color: var(--muted);
  font-size: 0.82rem;
}
.retreat-quote-stat--discipline .retreat-quote-stat__icon {
  color: #c4a574;
}
.retreat-quote-stat strong {
  color: var(--text);
  font-weight: 700;
}
.retreat-quote-stat--enabled {
  color: #5a9a6e;
  border-color: rgba(90, 154, 110, 0.28);
  background: rgba(90, 154, 110, 0.1);
}
.retreat-quotes-filter {
  margin-bottom: 0.35rem;
}
.retreat-quotes-filter input[type="search"] {
  flex: 1 1 220px;
  min-width: 180px;
}
.retreat-quote-form-card {
  margin-bottom: 1rem;
  padding: 0.85rem 1rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(140, 120, 100, 0.28);
  background: rgba(0, 0, 0, 0.1);
}
.retreat-quote-form-card .panel-sub {
  margin: 0 0 0.65rem;
  font-size: 0.88rem;
  color: var(--text);
}
.form-grid--retreat-quote {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 0;
}
.form-grid--retreat-quote .form-grid__full {
  grid-column: 1 / -1;
}
.form-grid--retreat-quote textarea {
  width: 100%;
  min-height: 64px;
  resize: vertical;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #1a1612;
  color: var(--text);
  font-family: inherit;
}
.form-grid--retreat-quote .admin-switch {
  margin-top: 0.15rem;
}
.retreat-quotes-table-wrap {
  overflow-x: auto;
  flex: 1;
  min-height: 0;
}
.retreat-quotes-table__text {
  max-width: 380px;
  line-height: 1.45;
  word-break: break-word;
}
.retreat-quotes-table__actions {
  white-space: nowrap;
}
.retreat-quotes-table__actions .btn-small {
  padding: 0.22rem 0.5rem;
  font-size: 0.72rem;
  margin-right: 0.25rem;
}
.retreat-quote-cat {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  border: 1px solid transparent;
}
.retreat-quote-cat__icon {
  font-size: 0.78rem;
  opacity: 0.9;
}
.retreat-quote-cat--discipline .retreat-quote-cat__icon {
  color: #9a7a45;
}
.retreat-quote-cat--focus {
  color: #6b8db8;
  background: rgba(107, 141, 184, 0.14);
  border-color: rgba(107, 141, 184, 0.28);
}
.retreat-quote-cat--encourage {
  color: #b87858;
  background: rgba(184, 120, 88, 0.14);
  border-color: rgba(184, 120, 88, 0.28);
}
.retreat-quote-cat--discipline {
  color: #7a6a9a;
  background: rgba(122, 106, 154, 0.14);
  border-color: rgba(122, 106, 154, 0.28);
}
.retreat-quote-cat--writing {
  color: #5a8a62;
  background: rgba(90, 138, 98, 0.14);
  border-color: rgba(90, 138, 98, 0.28);
}
.retreat-quotes-table .admin-switch {
  padding: 4px 8px;
  border: none;
  background: transparent;
}
.retreat-quotes-table .admin-switch:hover {
  background: rgba(107, 141, 184, 0.08);
}
@media (max-width: 900px) {
  .form-grid--retreat-quote { grid-template-columns: 1fr; }
}

.verify-tpl-toolbar { margin-bottom: 12px; }
.verify-tpl-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}
.verify-tpl-field textarea {
  width: 100%;
  min-height: 88px;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 13px;
  line-height: 1.5;
  resize: vertical;
}
.verify-tpl-preview {
  margin-top: 12px;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 12px;
  line-height: 1.55;
  max-height: 320px;
  overflow: auto;
}
.verify-tpl-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.verify-tpl-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid rgba(107, 141, 184, 0.28);
  border-radius: 8px;
  background: rgba(107, 141, 184, 0.08);
  color: inherit;
  font-size: 12px;
  line-height: 1.3;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.verify-tpl-chip:hover {
  background: rgba(107, 141, 184, 0.16);
  border-color: rgba(107, 141, 184, 0.45);
}
.verify-tpl-chip code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 11px;
  color: #4a6280;
}
.verify-tpl-chip--sample code {
  color: #8a5a32;
}
.verify-tpl-status--draft {
  color: #8a5a32 !important;
}

.task-pricing-modules {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 0.75rem;
}
.task-pricing-module {
  min-height: 0;
  width: 100%;
  max-width: none;
}
.task-pricing-module__head {
  margin-bottom: 8px;
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(74, 61, 48, 0.28);
}
.task-pricing-module__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.task-pricing-module__title {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: #e8dcc8;
}
.task-pricing-module__title i {
  color: var(--muted);
  font-size: 0.82rem;
}
.task-pricing-module__lead {
  margin: 6px 0 0;
  font-size: 0.68rem;
  color: var(--muted);
  line-height: 1.35;
}
.task-pricing-module__panel {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.task-pricing-module__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.task-pricing-module:not(.is-expanded):not(.task-pricing-module--single) .task-pricing-module__body .task-pricing-tier:nth-child(n + 2) {
  display: none;
}
.task-pricing-tier {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.task-pricing-tier__metric {
  flex-shrink: 0;
  min-width: 5.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #e8dcc8;
  white-space: nowrap;
}
.task-pricing-tier__input-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  max-width: 12rem;
  padding: 5px 8px;
  border-radius: 8px;
  border: 1px solid rgba(120, 100, 78, 0.45);
  background: rgba(12, 10, 8, 0.85);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.task-pricing-tier__input-wrap:focus-within {
  border-color: rgba(154, 123, 42, 0.55);
  box-shadow: 0 0 0 2px rgba(154, 123, 42, 0.12);
}
.task-pricing-tier__input-wrap .task-pricing-reward-input {
  flex: 1;
  min-width: 0;
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.84rem;
  font-variant-numeric: tabular-nums;
  outline: none;
  appearance: textfield;
  -moz-appearance: textfield;
}
.task-pricing-tier__input-wrap .task-pricing-reward-input::-webkit-outer-spin-button,
.task-pricing-tier__input-wrap .task-pricing-reward-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.task-pricing-tier__unit {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 600;
  color: #c8b8a4;
}
.task-pricing-module__toggle {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  margin-top: 1px;
  border: 1px solid rgba(120, 100, 78, 0.45);
  border-radius: 8px;
  background: rgba(12, 10, 8, 0.85);
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, transform 0.15s;
}
.task-pricing-module__toggle:hover {
  border-color: rgba(154, 123, 42, 0.55);
  color: #e8dcc8;
}
.task-pricing-module.is-expanded .task-pricing-module__toggle i {
  transform: rotate(180deg);
}
.task-pricing-module__toggle i {
  display: inline-block;
  transition: transform 0.15s;
}
.task-pricing-total {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.share-card-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 1.25rem;
  align-items: start;
}
.share-card-editor,
.share-card-preview-panel {
  padding: 1rem 1.1rem;
}
.share-card-form {
  margin-top: 0.75rem;
}
.share-card-image-row {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  flex-wrap: wrap;
}
.share-card-image-preview {
  width: 120px;
  height: 120px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(180, 160, 130, 0.28);
  background: rgba(0, 0, 0, 0.18);
}
.share-card-image-preview img,
.share-card-mock__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.share-card-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
}
.share-card-preview-panel {
  border-left: 1px solid rgba(180, 160, 130, 0.16);
}
.share-card-mock {
  display: flex;
  gap: 0.75rem;
  padding: 0.85rem;
  border-radius: 12px;
  background: rgba(255, 252, 244, 0.96);
  border: 1px solid rgba(168, 152, 130, 0.35);
  color: #2a241c;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
.share-card-mock__thumb {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
  flex: 0 0 64px;
  background: #ece4d8;
}
.share-card-mock__body {
  min-width: 0;
}
.share-card-mock__title {
  margin: 0 0 0.35rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: #1a1610;
  line-height: 1.35;
}
.share-card-mock__desc {
  margin: 0 0 0.45rem;
  font-size: 0.76rem;
  font-weight: 400;
  line-height: 1.5;
  color: #6d5e4c;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.share-card-mock__host {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 400;
  color: #8a7a68;
}
.share-card-preview-note {
  margin-top: 0.75rem;
}
.btn-primary--dirty {
  box-shadow: 0 0 0 2px rgba(212, 168, 83, 0.45);
}
.share-card-usage {
  margin-top: 1rem;
}
@media (max-width: 960px) {
  .share-card-layout {
    grid-template-columns: 1fr;
  }
  .share-card-preview-panel {
    border-left: none;
    border-top: 1px solid rgba(180, 160, 130, 0.16);
  }
}

/* CDK 礼包控制台 */
.gift-cdk-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.9fr);
  gap: 1rem;
  align-items: start;
}
.gift-cdk-editor,
.gift-cdk-side {
  padding: 1rem 1.1rem;
}
.gift-cdk-form .admin-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.gift-cdk-grant-block {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(180, 160, 130, 0.18);
}
.gift-cdk-batch-list {
  display: grid;
  gap: 0.55rem;
  max-height: 320px;
  overflow: auto;
}
.gift-cdk-batch-item {
  display: grid;
  gap: 0.2rem;
  width: 100%;
  text-align: left;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(180, 160, 130, 0.22);
  background: rgba(255, 250, 240, 0.55);
  cursor: pointer;
}
.gift-cdk-batch-item.is-active,
.gift-cdk-batch-item:hover {
  border-color: rgba(201, 162, 39, 0.45);
  background: rgba(201, 162, 39, 0.08);
}
.gift-cdk-batch-item__title {
  font-weight: 700;
}
.gift-cdk-batch-item__meta,
.gift-cdk-batch-item__time {
  font-size: 0.78rem;
  color: var(--admin-muted, #7a6f60);
}
.gift-cdk-code-panel {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(180, 160, 130, 0.18);
}
.gift-cdk-code-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}
.gift-cdk-code-list {
  display: grid;
  gap: 0.45rem;
  max-height: 280px;
  overflow: auto;
}
.gift-cdk-code-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.5rem;
  align-items: center;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.45);
}
.gift-cdk-code-row--off {
  opacity: 0.55;
}
.gift-cdk-code-row code {
  font-size: 0.82rem;
}
@media (max-width: 960px) {
  .gift-cdk-layout {
    grid-template-columns: 1fr;
  }
  .gift-cdk-form .admin-field-row {
    grid-template-columns: 1fr;
  }
}

.user-points-edit {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 9rem;
}
.user-points-edit .user-points-input {
  width: 5.5rem;
  min-width: 0;
}
.user-points-cell .btn-small {
  white-space: nowrap;
}

.website-content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 1rem;
  align-items: start;
}
.website-content-editor,
.website-content-preview {
  padding: 1rem 1.1rem;
}
.website-content-section-head {
  margin-top: 1.25rem;
}
.website-social-field {
  display: grid;
  gap: 0.65rem;
  padding: 0.75rem 0;
  border-top: 1px solid rgba(180, 160, 130, 0.16);
}
.website-pricing-preview {
  display: grid;
  gap: 0.65rem;
}
.website-pricing-preview__card {
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  border: 1px solid rgba(180, 160, 130, 0.22);
  background: rgba(255, 250, 240, 0.45);
}
.website-pricing-preview__card.is-featured {
  border-color: rgba(201, 162, 39, 0.45);
}
.website-pricing-preview__badge {
  display: inline-block;
  margin-bottom: 0.35rem;
  font-size: 0.72rem;
  color: #8a6a28;
}
.website-pricing-preview__meta,
.website-pricing-preview__intro {
  font-size: 0.78rem;
  color: var(--muted);
}
@media (max-width: 960px) {
  .website-content-layout {
    grid-template-columns: 1fr;
  }
}
