* {
  box-sizing: border-box;
}

:root {
  color: #2b2344;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
}

html {
  min-height: 100%;
  background: #f7f5fd;
}

body {
  min-width: 0;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: #f7f5fd;
}

.backend-login {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #f3f1fb;
}

.backend-login.hidden { display: none; }

.login-panel[hidden] { display: none; }

.login-panel {
  width: min(420px, 100%);
  padding: 34px;
  border: 1px solid #e5e0f5;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 24px 60px rgba(54, 40, 105, 0.16);
}

.login-brand { display: flex; align-items: center; gap: 12px; color: #221c3f; }
.login-panel h1 { margin: 28px 0 8px; color: #221c3f; font-size: 25px; }
.login-panel > p { margin: 0 0 24px; color: #6f6a8a; font-size: 13px; line-height: 1.7; }
.login-panel label { display: grid; gap: 8px; margin-top: 16px; color: #4a4367; font-size: 13px; font-weight: 700; }
.login-panel input { width: 100%; height: 44px; padding: 0 13px; border: 1px solid #ddd6f2; border-radius: 10px; outline: none; color: #221c3f; font-size: 16px; }
.login-panel input:focus { border-color: #6d3ef0; box-shadow: 0 0 0 3px rgba(109, 62, 240, 0.12); }
.login-panel input::placeholder { color: #6f6a8a; }
.login-submit { width: 100%; justify-content: center; margin-top: 24px; }
.login-submit:disabled { cursor: wait; opacity: 0.6; }
.login-error { display: block; min-height: 20px; margin-top: 10px; color: #b52d45; font-size: 12px; text-align: center; }
.login-panel > .login-hint { margin: -16px 0 20px; padding: 9px 12px; border-radius: 9px; background: #f4f1fb; color: #514969; font-size: 12px; line-height: 1.6; }
.login-hint b { color: #30284e; }
.security-note { display: grid; gap: 5px; margin: 20px 0 4px; padding: 13px 14px; border: 1px solid #ddd6f2; border-radius: 10px; background: #f8f6fd; color: #514969; }
.security-note strong { font-size: 13px; color: #30284e; }
.security-note span { font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; }
.pc-login-note.is-pending { color: #9a5a16; }
.admin-shell.is-locked { visibility: hidden; }

button {
  font: inherit;
}

/* ===== 整体框架 ===== */
.admin-shell {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  display: grid;
  grid-template-columns: 288px minmax(0, 1fr);
  background: #ffffff;
  border-radius: 0;
  box-shadow: none;
}

/* ===== 左侧导航 ===== */
.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 32px 22px 26px;
  overflow-y: auto;
  background: #fbfaff;
  border-right: 1px solid #eee9fb;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 10px;
  margin-bottom: 52px;
}

.brand-mark {
  width: 43px;
  height: 43px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 19px;
  font-weight: 800;
  background: linear-gradient(135deg, #9a6bff 0%, #6d3ef0 100%);
  box-shadow: 0 10px 20px rgba(109, 62, 240, 0.28);
}

.brand-text strong {
  display: block;
  font-size: 18px;
  color: #221c3f;
}

.brand-text span {
  display: block;
  margin-top: 2px;
  color: #9a95b8;
  font-size: 13px;
}

.nav {
  display: grid;
  gap: 7px;
}

.nav button {
  height: 55px;
  border: 0;
  border-radius: 12px;
  padding: 0 17px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: #6f6a8a;
  background: transparent;
  text-align: left;
  font-size: 17px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav button svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.nav button:hover {
  background: #f2eefc;
  color: #4a3f75;
}

.nav button.active {
  background: #ece5ff;
  color: #6d3ef0;
  font-weight: 600;
}

.sidebar-footer {
  margin-top: auto;
  padding: 12px 8px 0;
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid #eee9fb;
}

button.sidebar-footer {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

button.sidebar-footer:hover { background: #f2eefc; }

.sidebar-footer .avatar {
  width: 43px;
  height: 43px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-weight: 700;
  background: linear-gradient(135deg, #ff8fb8 0%, #9a6bff 100%);
}

.sidebar-footer strong {
  display: block;
  font-size: 16px;
  color: #221c3f;
}

.sidebar-footer span {
  display: block;
  font-size: 13px;
  color: #9a95b8;
}

/* ===== 右侧工作区 ===== */
.workspace {
  min-width: 0;
  min-height: 100vh;
  padding: clamp(26px, 2.2vw, 42px) clamp(28px, 2.6vw, 52px) 48px;
  background: #f7f5fd;
}

/* 顶栏：标题 + 右侧按钮组（照参考图） */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.topbar-heading h1 {
  margin: 0;
  font-size: 22px;
  color: #221c3f;
}

.topbar-heading p {
  margin: 4px 0 0;
  color: #8b86a8;
  font-size: 13px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: #221c3f;
  cursor: pointer;
  transition: background 0.15s ease;
}

.icon-btn:hover {
  background: #3a3159;
}

.icon-btn svg {
  width: 17px;
  height: 17px;
}

.primary-btn {
  height: 40px;
  margin-left: 6px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ffffff;
  font-weight: 600;
  background: linear-gradient(135deg, #8b5cf6 0%, #6d3ef0 100%);
  box-shadow: 0 12px 24px rgba(109, 62, 240, 0.3);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(109, 62, 240, 0.36);
}

.primary-btn svg {
  width: 15px;
  height: 15px;
}

/* ===== 主内容占位区 ===== */
.content-placeholder {
  display: grid;
  gap: 20px;
}

.placeholder-note {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 16px 20px;
  border-radius: 14px;
  border: 1px dashed #cfc4f2;
  background: #ffffff;
}

.placeholder-note strong {
  color: #221c3f;
  font-size: 15px;
}

.placeholder-note span {
  color: #9a95b8;
  font-size: 13px;
}

.placeholder-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
}

.placeholder-card {
  min-height: 180px;
  padding: 20px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid #eee9fb;
  box-shadow: 0 10px 26px rgba(84, 60, 180, 0.07);
  display: grid;
  gap: 14px;
  align-content: start;
}

.placeholder-card.wide {
  grid-column: 1 / -1;
}

/* 骨架占位 */
.skeleton-line {
  height: 14px;
  border-radius: 999px;
  background: #e9e4f8;
}

.w-30 { width: 30%; }
.w-40 { width: 40%; }
.w-50 { width: 50%; }
.w-60 { width: 60%; }

.skeleton-block {
  height: 96px;
  border-radius: 12px;
  background: #f0edfa;
}

.skeleton-row {
  height: 40px;
  border-radius: 10px;
  background: #f0edfa;
}

.skeleton-table {
  display: grid;
  gap: 10px;
}

/* ===== 模块页面切换 ===== */
.module-page {
  display: none;
}

.module-page.active {
  display: block;
}

.panel-card {
  background: #ffffff;
  border: 1px solid #eee9fb;
  border-radius: 16px;
  box-shadow: 0 10px 26px rgba(84, 60, 180, 0.07);
  padding: 22px 24px;
}

.panel-plain {
  padding: 20px 22px;
}

/* ===== 发布账号授权：页签 + 工具条 ===== */
.page-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 18px;
}

.page-tab {
  height: 36px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #6f6a8a;
  font-size: 14px;
  cursor: pointer;
}

.page-tab:hover {
  background: #f2eefc;
}

.page-tab.active {
  background: #ece5ff;
  color: #6d3ef0;
  font-weight: 600;
}

.tab-primary {
  margin-left: auto;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.toolbar-search {
  flex: 1;
  height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid #e5e0f5;
  border-radius: 12px;
  background: #fbfaff;
  color: #9a95b8;
}

.toolbar-search input {
  flex: 1;
  border: 0;
  outline: none;
  background: transparent;
  font: inherit;
  color: #2b2344;
}

.toolbar-search svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.toolbar-select {
  height: 42px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #e5e0f5;
  border-radius: 12px;
  background: #fbfaff;
  color: #4a3f75;
  font-size: 14px;
  cursor: pointer;
}

.toolbar-select:hover {
  background: #f2eefc;
}

.toolbar-select svg {
  width: 16px;
  height: 16px;
  color: #9a95b8;
}

.toolbar-select.sm {
  height: 30px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 13px;
}

/* ===== 发布账号授权：表格 ===== */
.perm-table {
  width: 100%;
  border-collapse: collapse;
}

.perm-table th {
  padding: 10px 12px;
  text-align: left;
  color: #9a95b8;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom: 1px solid #eee9fb;
}

.perm-table td {
  padding: 14px 12px;
  border-bottom: 1px solid #f4f1fc;
  vertical-align: middle;
}

.perm-table tbody tr:hover {
  background: #fbfaff;
}

.col-check {
  width: 36px;
}

.col-check input,
.perm-table td input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: #6d3ef0;
}

.col-actions {
  text-align: right;
  white-space: nowrap;
}

.user-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-cell strong {
  display: block;
  font-size: 14px;
  color: #221c3f;
}

.user-cell small {
  display: block;
  margin-top: 2px;
  color: #9a95b8;
  font-size: 12px;
}

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-weight: 700;
  font-size: 14px;
}

.av-1 { background: #6d3ef0; }
.av-2 { background: #ff8fb8; }
.av-3 { background: #38bdf8; }
.av-4 { background: #f59e0b; }
.av-5 { background: #10b981; }
.av-6 { background: #8b5cf6; }
.av-7 { background: #f472b6; }
.av-8 { background: #64748b; }

.pill {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.pill-green { background: #e5f9ef; color: #17a673; }
.pill-blue { background: #e8f1ff; color: #3b82f6; }
.pill-gray { background: #eef0f5; color: #6f7688; }
.pill-purple { background: #efe9ff; color: #6d3ef0; }

.permission-select {
  min-width: 128px;
  padding: 7px 9px;
  border: 1px solid #e5e0f5;
  border-radius: 8px;
  background: #ffffff;
}

.pc-login-note { display: block; margin-top: 4px; color: #6d3ef0; font-size: 11px; }
.primary-ghost { border-color: #cfc4f2; color: #6d3ef0; }
.account-summary { margin-left: auto; color: #8b86a8; font-size: 13px; }

.cell-select {
  border: 0;
  background: transparent;
  font: inherit;
  color: #4a3f75;
  cursor: pointer;
  outline: none;
}

.scope-tags {
  color: #4a3f75;
  font-size: 13px;
}

.scope-tags em {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f2eefc;
  color: #6d3ef0;
  font-size: 11px;
  font-style: normal;
}

.ghost-btn {
  height: 32px;
  margin-left: 6px;
  padding: 0 14px;
  border: 1px solid #e5e0f5;
  border-radius: 999px;
  background: #ffffff;
  color: #4a3f75;
  font-size: 13px;
  cursor: pointer;
}

.ghost-btn:hover {
  border-color: #cfc4f2;
  background: #f7f5fd;
}

.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
}

.pager {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pager-num {
  min-width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #6f6a8a;
  font-size: 13px;
  cursor: pointer;
}

.pager-num:hover {
  background: #f2eefc;
}

.pager-num.active {
  background: #6d3ef0;
  color: #ffffff;
}

.pager-next {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #221c3f;
  color: #ffffff;
  cursor: pointer;
}

.pager-next.prev {
  background: #eef0f5;
  color: #6f7688;
}

.pager-next svg {
  width: 15px;
  height: 15px;
}

.showing {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #9a95b8;
  font-size: 13px;
}

/* ===== 活动板块管理：状态页签 + 工具条 ===== */
.sections-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.sections-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sections-tools .toolbar-search {
  width: 220px;
  flex: none;
}

.icon-btn.sm {
  width: 36px;
  height: 36px;
}

.icon-btn.sm svg {
  width: 15px;
  height: 15px;
}

.status-tabs {
  display: flex;
  gap: 6px;
}

.status-tab {
  height: 36px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: #f2eefc;
  color: #6f6a8a;
  font-size: 14px;
  cursor: pointer;
}

.status-tab em {
  margin-left: 4px;
  font-style: normal;
  color: #9a95b8;
  font-size: 12px;
}

.status-tab.active {
  background: linear-gradient(135deg, #8b5cf6 0%, #6d3ef0 100%);
  color: #ffffff;
}

.status-tab.active em {
  color: rgba(255, 255, 255, 0.75);
}

/* ===== 活动卡片列表 ===== */
.event-list {
  display: grid;
  gap: 14px;
}

.event-card {
  display: grid;
  grid-template-columns: 132px 1.6fr 1fr 0.9fr 0.8fr 76px;
  align-items: center;
  gap: 18px;
  padding: 14px 18px 14px 14px;
  border: 1px solid #eee9fb;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(84, 60, 180, 0.06);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.event-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(84, 60, 180, 0.12);
}

.event-thumb {
  width: 132px;
  height: 96px;
  border-radius: 12px;
}

.thumb-a { background: linear-gradient(135deg, #c7b8ff 0%, #8b5cf6 100%); }
.thumb-b { background: linear-gradient(135deg, #ffd9c2 0%, #ff8fb8 100%); }
.thumb-c { background: linear-gradient(135deg, #b7e3ff 0%, #38bdf8 100%); }
.thumb-d { background: linear-gradient(135deg, #ffe3f1 0%, #f472b6 100%); }
.thumb-e { background: linear-gradient(135deg, #d4f3e3 0%, #10b981 100%); }
.thumb-f { background: linear-gradient(135deg, #e2d6ff 0%, #6d3ef0 100%); }

.event-body {
  min-width: 0;
}

.event-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.tag-normal { background: #e8f1ff; color: #3b82f6; }
.tag-elderly { background: #fff3dd; color: #d97706; }
.tag-recent { background: #f3e8ff; color: #7c3aed; }

.event-body h3 {
  margin: 8px 0 6px;
  font-size: 15px;
  color: #221c3f;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.event-body p {
  margin: 0;
  color: #8b86a8;
  font-size: 12px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.event-meta {
  display: grid;
  gap: 8px;
}

.meta-line {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #6f6a8a;
  font-size: 12px;
  white-space: nowrap;
}

.meta-line svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: #b3add2;
}

.event-progress {
  display: grid;
  gap: 8px;
}

.progress-head {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.progress-head strong {
  font-size: 15px;
  color: #6d3ef0;
}

.progress-head span {
  font-size: 11px;
  color: #9a95b8;
}

.progress-track {
  height: 7px;
  border-radius: 999px;
  background: #f0edfa;
  overflow: hidden;
}

.progress-track i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #8b5cf6 0%, #6d3ef0 100%);
}

.event-quota {
  display: flex;
  align-items: center;
  gap: 8px;
}

.event-quota svg {
  width: 18px;
  height: 18px;
  color: #6d3ef0;
}

.event-quota strong {
  font-size: 15px;
  color: #221c3f;
}

.event-quota span {
  font-size: 11px;
  color: #9a95b8;
}

.event-price {
  align-self: center;
  justify-self: end;
  min-width: 64px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f3e8ff;
  color: #6d3ef0;
  font-weight: 800;
  font-size: 16px;
  text-align: center;
}

.activity-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

#topPrimaryAction {
  min-width: 132px;
  white-space: nowrap;
}

.activity-kpi {
  min-width: 0;
  padding: 16px 18px;
  border: 1px solid #e8e5ef;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(34, 28, 63, 0.05);
}

.activity-kpi span,
.activity-kpi small {
  display: block;
  color: #7b778d;
  font-size: 12px;
}

.activity-kpi strong {
  display: block;
  margin: 8px 0 5px;
  color: #221c3f;
  font-size: 27px;
  line-height: 1;
}

.section-catalog {
  overflow: hidden;
  margin-bottom: 14px;
  border: 1px solid #e8e5ef;
  border-radius: 8px;
  background: #ffffff;
}

.section-table-head,
.section-table-row {
  display: grid;
  grid-template-columns: minmax(130px, 0.8fr) minmax(240px, 2fr) 80px 70px 120px;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 0 14px;
}

.section-table-head {
  min-height: 34px;
  border-bottom: 1px solid #ece9f1;
  background: #f7f6f9;
  color: #888396;
  font-size: 11px;
  font-weight: 700;
}

.section-table-row {
  color: #625d70;
  font-size: 12px;
}

.section-table-row + .section-table-row {
  border-top: 1px solid #f0edf3;
}

.section-table-row.is-disabled {
  opacity: 0.58;
  background: #f6f5f8;
}

.section-name {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.section-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #1c8f7b;
}

.section-name em {
  padding: 2px 6px;
  border-radius: 4px;
  background: #e7f5ef;
  color: #13745f;
  font-size: 10px;
  font-style: normal;
}

.section-desc {
  overflow: hidden;
  color: #827e91;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.section-status {
  width: fit-content;
  padding: 3px 7px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 700;
}

.section-status.on {
  background: #e7f5ef;
  color: #13745f;
}

.section-status.off {
  background: #f0eef3;
  color: #777282;
}

.section-row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.section-row-actions button,
.event-actions button {
  padding: 5px 8px;
  border: 1px solid #dcd8e6;
  border-radius: 6px;
  background: #ffffff;
  color: #4a4367;
  font-size: 11px;
  cursor: pointer;
}

.activity-kind-filter {
  min-width: 112px;
  outline: none;
}

.event-thumb {
  object-fit: cover;
}

.event-actions {
  display: grid;
  gap: 6px;
  justify-items: stretch;
}

.event-actions .event-price {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 7px 8px;
  border-radius: 6px;
  font-size: 13px;
}

.event-actions button.danger {
  border-color: #f0c7cd;
  color: #b52d45;
}

.activity-empty {
  display: grid;
  place-items: center;
  gap: 5px;
  min-height: 180px;
  color: #827e91;
  font-size: 12px;
}

.activity-empty strong {
  color: #4a4367;
  font-size: 14px;
}

[data-page="sections"] .pager {
  display: none;
}

/* ===== 响应式 ===== */
@media (max-width: 980px) {
  body {
    min-width: 0;
  }

  .admin-shell {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    border-radius: 0;
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    top: auto;
    z-index: 20;
    flex-direction: row;
    align-items: center;
    height: auto;
    gap: 12px;
    padding: 14px 16px;
    overflow-x: auto;
    overflow-y: hidden;
    border-right: 0;
    border-bottom: 1px solid #eee9fb;
  }

  .brand {
    margin-bottom: 0;
  }

  .nav {
    grid-auto-flow: column;
    overflow-x: auto;
  }

  .sidebar-footer {
    display: none;
  }

  .workspace {
    padding: 20px 16px 24px;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .placeholder-grid {
    grid-template-columns: 1fr;
  }

  .event-card {
    grid-template-columns: 96px 1fr;
    row-gap: 12px;
  }

  .event-thumb {
    width: 96px;
    height: 72px;
  }

  .sections-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .activity-kpi-grid,
  .section-catalog {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-catalog {
    overflow-x: auto;
  }

  .section-table-head,
  .section-table-row {
    min-width: 720px;
  }

  .perm-table {
    display: block;
    overflow-x: auto;
  }
}

/* ===== 总览 Dashboard（仿参考图：KPI + 图表 + 榜单 + 表格） ===== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.kpi-card {
  padding: 16px 18px;
  background: #ffffff;
  border: 1px solid #eee9fb;
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(84, 60, 180, 0.06);
}

.kpi-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.kpi-ico {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #f2eeff;
  color: #6d3ef0;
  display: grid;
  place-items: center;
}

.kpi-ico svg {
  width: 16px;
  height: 16px;
}

.kpi-label {
  font-size: 12.5px;
  font-weight: 600;
  color: #6f6a8a;
}

.kpi-more {
  margin-left: auto;
  border: 0;
  background: none;
  color: #b5aecf;
  font-size: 15px;
  letter-spacing: 1px;
  cursor: pointer;
}

.kpi-value-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.kpi-detail {
  margin: 7px 0 0;
  color: #8b86a8;
  font-size: 12px;
}

.kpi-mark {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
}

.empty-state {
  margin: 12px 0;
  color: #8b86a8;
  font-size: 13px;
  text-align: center;
}

.admin-message {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 100;
  max-width: min(360px, calc(100vw - 48px));
  padding: 12px 16px;
  border-radius: 10px;
  background: #221c3f;
  box-shadow: 0 12px 28px rgba(34, 28, 63, 0.22);
  color: #ffffff;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.admin-message.error { background: #b52d45; }
.admin-message.show { opacity: 1; transform: translateY(0); }

.kpi-value {
  font-size: 26px;
  font-weight: 800;
  color: #221c3f;
  letter-spacing: -0.5px;
}

.trend {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 800;
}

.trend.up {
  color: #128a4d;
  background: #e5f7ec;
}

.trend.down {
  color: #d5455c;
  background: #fdeaee;
}

/* --- 网格与卡片 --- */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.dash-card {
  min-width: 0;
  padding: 18px 20px;
  background: #ffffff;
  border: 1px solid #eee9fb;
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(84, 60, 180, 0.06);
}

.dash-card.span-2 {
  grid-column: span 2;
}

.dash-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.dash-head h3 {
  margin: 0;
  font-size: 14.5px;
  font-weight: 800;
  color: #221c3f;
}

.dash-head p {
  margin: 3px 0 0;
  font-size: 12px;
  color: #8b86a8;
}

.view-all {
  font-size: 12px;
  font-weight: 700;
  color: #6d3ef0;
  text-decoration: none;
}

/* --- 折线图 --- */
.line-chart {
  width: 100%;
  height: auto;
}

.line-chart .line-a {
  stroke: #6d3ef0;
  stroke-width: 2.4;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.line-chart .line-b {
  stroke: #d9d2f4;
  stroke-width: 2;
  stroke-linejoin: round;
}

.chart-axis,
.chart-loading,
.chart-empty {
  fill: #8b86a8;
  font-size: 10px;
}

.chart-loading,
.chart-empty {
  font-size: 12px;
}

.chart-point {
  fill: #6d3ef0;
  stroke: #ffffff;
  stroke-width: 2px;
}

.chart-tip rect {
  fill: #ffffff;
  stroke: #e7e1f8;
}

.chart-tip-date {
  fill: #221c3f;
  font-size: 11px;
  font-weight: 700;
}

.chart-tip-value {
  fill: #6d3ef0;
  font-size: 10px;
}

.legend {
  display: flex;
  gap: 14px;
  font-size: 11.5px;
  color: #6f6a8a;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.dot-a { background: #6d3ef0; }
.dot-b { background: #d9d2f4; }
.dot-c { background: #f0a24b; }

/* --- 环形图 --- */
.donut-wrap {
  position: relative;
  width: 168px;
  margin: 6px auto 10px;
}

.donut-wrap svg {
  width: 100%;
  height: auto;
  display: block;
}

.donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.donut-center strong {
  font-size: 12.5px;
  color: #6f6a8a;
}

.donut-center span {
  font-size: 22px;
  font-weight: 800;
  color: #221c3f;
}

.donut-legend {
  list-style: none;
  margin: 0;
  padding: 0;
}

.donut-legend li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 2px;
  font-size: 12.5px;
  color: #4a4367;
}

.donut-legend em {
  margin-left: auto;
  font-style: normal;
  font-weight: 800;
  color: #221c3f;
}

/* --- 热门活动榜 --- */
.top-list {
  display: grid;
  gap: 14px;
}

.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.top-name {
  font-size: 13px;
  font-weight: 700;
  color: #221c3f;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-value {
  font-size: 14px;
  font-weight: 800;
  color: #6d3ef0;
}

.top-sub {
  margin-top: 3px;
  font-size: 11.5px;
  color: #8b86a8;
}

.top-bar {
  margin-top: 7px;
  height: 6px;
  border-radius: 999px;
  background: #f0ecfc;
  overflow: hidden;
}

.top-bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #8b5cf6, #6d3ef0);
}

/* --- 柱状图 --- */
.bar-chart {
  width: 100%;
  height: auto;
}

.growth-bar {
  fill: #e9e4fb;
}

.growth-bar.active {
  fill: #6d3ef0;
  filter: drop-shadow(0 6px 10px rgba(109, 62, 240, 0.35));
}

.bar-hi rect {
  fill: #221c3f;
}

.bar-hi text {
  fill: #ffffff;
  font-size: 9px;
}

/* --- 最近发布表格 --- */
.mini-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.mini-table th {
  padding: 0 10px 10px;
  text-align: left;
  font-size: 11.5px;
  font-weight: 700;
  color: #8b86a8;
  border-bottom: 1px solid #f0ecfa;
}

.mini-table td {
  padding: 11px 10px;
  color: #3c3560;
  border-bottom: 1px solid #f6f3fc;
  white-space: nowrap;
}

.mini-table td:first-child {
  font-weight: 700;
  color: #221c3f;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-pill {
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
}

.status-pill.on { color: #128a4d; background: #e5f7ec; }
.status-pill.scheduled { color: #2f6bd8; background: #e8f1ff; }
.status-pill.archived { color: #b07a1f; background: #fdf3df; }
.status-pill.done { color: #6f6a8a; background: #f0eef8; }

/* --- 运营提示 --- */
.insight-list {
  display: grid;
  gap: 14px;
}

.insight-item {
  display: flex;
  gap: 12px;
}

.insight-ico {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #f2eeff;
  color: #6d3ef0;
  display: grid;
  place-items: center;
}

.insight-ico svg {
  width: 16px;
  height: 16px;
}

.insight-item strong {
  font-size: 13px;
  color: #221c3f;
}

.insight-item p {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.55;
  color: #8b86a8;
}

.ai-assist-btn {
  width: 100%;
  height: 42px;
  margin-top: 18px;
  border: 0;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  background: linear-gradient(135deg, #7bd7f6 0%, #8b5cf6 55%, #6d3ef0 100%);
  box-shadow: 0 12px 24px rgba(109, 62, 240, 0.28);
  cursor: pointer;
}

.ai-assist-btn svg {
  width: 15px;
  height: 15px;
}

/* ===== 小区管理（仿 Listings 参考图：左列表 + 右地图） ===== */
.comm-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.comm-title {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  color: #221c3f;
}

.comm-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.comm-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 0 14px;
  border: 1px solid #eee9fb;
  border-radius: 12px;
  background: #ffffff;
  color: #8b86a8;
}

.comm-search svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.comm-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: none;
  font-size: 13px;
  color: #221c3f;
}

.comm-search .kbd {
  flex: 0 0 auto;
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid #eee9fb;
  background: #f7f5fd;
  font-size: 11px;
  color: #a29dbd;
}

.filter-btn {
  width: 40px;
  height: 40px;
  border: 1px solid #eee9fb;
  border-radius: 12px;
  background: #ffffff;
  color: #4a4367;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.filter-btn svg {
  width: 17px;
  height: 17px;
}

.comm-layout {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 16px;
  align-items: start;
}

.comm-list {
  display: grid;
  gap: 12px;
}

.comm-card {
  display: flex;
  gap: 16px;
  padding: 14px;
  background: #ffffff;
  border: 1px solid #eee9fb;
  border-radius: 16px;
  box-shadow: 0 8px 22px rgba(84, 60, 180, 0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.comm-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(84, 60, 180, 0.12);
}

.comm-thumb {
  flex: 0 0 auto;
  width: 96px;
  height: 118px;
  border-radius: 12px;
  color: #ffffff;
  font-size: 30px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.comm-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
}

.comm-info h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: #221c3f;
}

.comm-card-heading {
  display: flex;
  align-items: center;
  gap: 8px;
}

.comm-actions {
  display: flex;
  align-self: flex-start;
  flex-direction: column;
  gap: 6px;
}

.ghost-btn:disabled {
  cursor: wait;
  opacity: 0.55;
}

.comm-addr {
  margin: 0;
  font-size: 12px;
  color: #8b86a8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.comm-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-ico {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid #efeafd;
  background: #fbfaff;
  font-size: 11.5px;
  font-weight: 600;
  color: #4a4367;
}

.chip-ico svg {
  width: 13px;
  height: 13px;
  color: #6d3ef0;
}

.comm-meta {
  font-size: 11.5px;
  color: #a29dbd;
}

/* --- 地图面板 --- */
.comm-map {
  position: sticky;
  top: 24px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #eee9fb;
  border-radius: 16px;
  box-shadow: 0 8px 22px rgba(84, 60, 180, 0.06);
}

.map-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  font-size: 13.5px;
  color: #221c3f;
}

.map-badge {
  font-size: 11px;
  font-weight: 700;
  color: #128a4d;
}

.map-canvas {
  position: relative;
  height: 560px;
  border-top: 1px solid #f1eefb;
}

.map-canvas > svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.map-pill {
  position: absolute;
  transform: translate(-50%, -100%);
  padding: 5px 10px 12px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 6px 16px rgba(34, 28, 63, 0.18);
  font-size: 11.5px;
  font-weight: 800;
  color: #6d3ef0;
  white-space: nowrap;
}

.map-pill::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 3px;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #ffffff;
}

.map-pill.hi {
  color: #e2703a;
}

.map-zoom {
  position: absolute;
  right: 12px;
  bottom: 44px;
  display: flex;
  flex-direction: column;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e3e6ec;
  background: #ffffff;
}

.map-zoom button {
  width: 30px;
  height: 30px;
  border: 0;
  background: none;
  font-size: 15px;
  color: #4a4367;
  cursor: pointer;
}

.map-zoom button + button {
  border-top: 1px solid #e3e6ec;
}

.map-scale {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  color: #8b86a8;
}

.map-scale i {
  width: 46px;
  height: 3px;
  border-radius: 2px;
  background: #6f6a8a;
}

/* ============================================================
   资讯管理：列表 + 新建发布（写作页）+ 查看弹窗
   ============================================================ */
.art-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.art-search {
  flex: 0 0 auto;
  width: 250px;
  height: 38px;
  border-radius: 999px;
  background: #f7f5fd;
}

.art-search input {
  font-size: 13px;
}

.art-panel {
  padding: 6px 0;
}

.art-list {
  display: grid;
}

.art-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid #f1eefb;
  transition: background 0.18s ease;
}

.art-row:last-child {
  border-bottom: 0;
}

.art-row:hover {
  background: #faf9ff;
}

.art-row.is-offline .art-thumb,
.art-row.is-offline .art-main {
  opacity: 0.5;
}

.art-thumb {
  width: 88px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 1px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  object-fit: cover;
}

.editor-actions button:disabled,
.rich-editor-toolbar button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.art-main {
  min-width: 0;
}

.art-title-line {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.art-title {
  color: #221c3f;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cat-tag {
  flex: 0 0 auto;
  padding: 3px 11px;
  border-radius: 999px;
  background: #f1ecff;
  color: #6d3ef0;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}

.art-summary {
  margin: 7px 0 0;
  color: #6f6a8a;
  font-size: 13px;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.art-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 10px;
  color: #8f8aa8;
  font-size: 12px;
}

.art-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.art-meta-item svg {
  width: 14px;
  height: 14px;
  color: #a9a3c4;
}

.art-meta-link {
  padding: 2px 9px;
  border-radius: 6px;
  background: #f2f6ff;
  color: #3a63d8;
  font-size: 11.5px;
}

.art-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
}

.art-side-ops {
  display: flex;
  align-items: center;
  gap: 8px;
}

.art-op-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 11px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #6d3ef0;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.art-op-link svg {
  width: 14px;
  height: 14px;
}

.art-op-link:hover {
  background: #f4f0fe;
}

.art-op-link.danger {
  color: #c0392f;
}

.art-op-link.danger:hover {
  background: #fdeeec;
}

.art-op-link.ok {
  color: #128a4d;
}

.art-op-link.ok:hover {
  background: #e9f8f0;
}

.art-preview {
  height: 32px;
  padding: 0 16px;
  border: 1px solid #e2dcf5;
  border-radius: 9px;
  background: #ffffff;
  color: #4a4367;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.16s ease, color 0.16s ease;
}

.art-preview:hover {
  border-color: #c6b8f7;
  color: #6d3ef0;
}

.art-empty {
  padding: 70px 0;
  color: #9a95b8;
  font-size: 13px;
  text-align: center;
}

/* ---- 编辑器（新建发布） ---- */
.art-editor-view {
  display: grid;
  gap: 16px;
}

.art-editor-view[hidden] {
  display: none;
}

.editor-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.editor-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px 6px 4px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #6f6a8a;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.editor-back svg {
  width: 17px;
  height: 17px;
}

.editor-back:hover {
  color: #6d3ef0;
  background: #f4f0fe;
}

.editor-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.editor-hint {
  color: #9a95b8;
  font-size: 12px;
}

.editor-sheet {
  display: flex;
  flex-direction: column;
  min-height: 68vh;
  padding: 38px 48px 44px;
  border: 1px solid #f0edf9;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(84, 60, 180, 0.06);
}

.editor-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 30px;
}

.editor-meta-row select {
  height: 36px;
  padding: 0 12px;
  border: 1px solid #e8e3f7;
  border-radius: 10px;
  background: #fbfaff;
  color: #4a4367;
  font-size: 13px;
  outline: none;
  cursor: pointer;
}

.editor-meta-row select:focus {
  border-color: #6d3ef0;
  box-shadow: 0 0 0 3px rgba(109, 62, 240, 0.1);
}

.editor-title-row {
  display: flex;
  align-items: flex-start;
  gap: 18px;
}

#artTitleInput {
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: #221c3f;
  font-family: inherit;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.45;
}

#artTitleInput::placeholder,
.editor-author::placeholder {
  color: #c4bfd6;
  font-weight: 500;
}

.title-count {
  flex: 0 0 auto;
  padding-top: 12px;
  color: #a9a3bd;
  font-size: 12.5px;
}

.editor-author {
  margin-top: 4px;
  padding: 12px 0 16px;
  border: 0;
  border-bottom: 1px solid #f4f1fb;
  outline: none;
  background: transparent;
  color: #4a4367;
  font-family: inherit;
  font-size: 13.5px;
}

.article-media-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 22px;
  padding: 14px;
  border: 1px solid #eeeaf8;
  border-radius: 12px;
  background: #fbfaff;
}

.article-cover-preview {
  width: 144px;
  aspect-ratio: 16 / 9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  overflow: hidden;
  border-radius: 10px;
  background: #f0ecfa center / cover no-repeat;
  color: #625b7d;
  font-size: 13px;
  font-weight: 700;
}

.article-cover-preview.has-image span,
.article-cover-preview.has-image small {
  display: none;
}

.article-cover-preview small {
  color: #9690ad;
  font-size: 10px;
  font-weight: 500;
}

.article-media-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.text-btn {
  border: 0;
  background: transparent;
  color: #817a9d;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.rich-editor-shell {
  margin-top: 22px;
  overflow: hidden;
  border: 1px solid #e8e3f7;
  border-radius: 12px;
  background: #fff;
}

.rich-editor-toolbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 46px;
  padding: 6px 10px;
  border-bottom: 1px solid #eeeaf8;
  background: #fbfaff;
}

.rich-editor-toolbar button {
  min-width: 34px;
  height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #514969;
  font-size: 12px;
  cursor: pointer;
}

.rich-editor-toolbar button:hover,
.rich-editor-toolbar button:focus-visible {
  background: #eee8ff;
  color: #5e34d6;
  outline: none;
}

.toolbar-separator {
  width: 1px;
  height: 20px;
  margin: 0 3px;
  background: #dfd9ef;
}

.paste-tip {
  margin-left: auto;
  color: #8d86a7;
  font-size: 11.5px;
}

.rich-editor-body {
  min-height: 42vh;
  padding: 24px 28px;
  outline: none;
  color: #3b3556;
  font-size: 15px;
  line-height: 1.9;
  overflow-wrap: anywhere;
}

.rich-editor-body:empty::before {
  color: #aaa3bd;
  content: attr(data-placeholder);
  pointer-events: none;
}

.rich-editor-body img,
.art-modal-body img {
  max-width: 100% !important;
  height: auto !important;
}

.rich-editor-body p,
.rich-editor-body div {
  max-width: 100%;
}

.rich-editor-body:focus {
  box-shadow: inset 0 0 0 2px rgba(109, 62, 240, 0.08);
}

.rich-upload-state {
  min-height: 0;
  padding: 0 28px;
  color: #6d3ef0;
  font-size: 12px;
}

.rich-upload-state:not(:empty) {
  padding-top: 10px;
  padding-bottom: 10px;
  border-top: 1px solid #f1edf9;
}

/* ---- 查看弹窗 ---- */
.art-modal-mask {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: grid;
  place-items: center;
  padding: 40px;
  background: rgba(34, 28, 63, 0.42);
}

.art-modal-mask[hidden] {
  display: none;
}

.art-modal {
  width: min(720px, 100%);
  max-height: 84vh;
  overflow: auto;
  padding: 26px 32px 22px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 30px 80px rgba(30, 20, 70, 0.3);
}

.art-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.art-modal-close {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: #f4f2fb;
  color: #6f6a8a;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.art-modal-close:hover {
  background: #ebe7f9;
  color: #221c3f;
}

.art-modal h3 {
  margin: 14px 0 0;
  color: #221c3f;
  font-size: 19px;
  line-height: 1.55;
}

.art-modal-meta {
  margin: 10px 0 0;
  color: #8f8aa8;
  font-size: 12.5px;
}

.art-modal-body {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #f2effb;
  color: #3b3556;
  font-size: 14px;
  line-height: 1.95;
  overflow-wrap: anywhere;
}

.art-modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid #f2effb;
  color: #8f8aa8;
  font-size: 12.5px;
}

.art-modal-body p {
  margin: 0 0 12px;
}

.art-modal-body p:last-child {
  margin-bottom: 0;
}

/* ===== 全屏后台的窄屏收敛 ===== */
@media (max-width: 1180px) {
  .admin-shell {
    grid-template-columns: 259px minmax(0, 1fr);
  }

  .workspace {
    padding: 24px;
  }

  .kpi-grid,
  .activity-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dash-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .comm-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .admin-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    position: relative;
    top: auto;
    height: auto;
  }
}

@media (max-width: 680px) {
  .workspace {
    padding: 18px 14px 28px;
  }

  .kpi-grid,
  .activity-kpi-grid,
  .dash-grid,
  .section-catalog {
    grid-template-columns: minmax(0, 1fr);
  }

  .dash-card.span-2 {
    grid-column: span 1;
  }
}
