/* 戎归公社后台：工作台风格，扁平、紧凑、以内容为先 */

:root {
  color-scheme: light;
  --bg: #eef3fb;
  --surface: #ffffff;
  --surface-subtle: #f5f8fd;
  --surface-inset: #e9eff8;
  --line: #e1e9f4;
  --line-soft: #edf2f9;
  --line-strong: #cbd9ea;
  --ink: #12233d;
  --ink-2: #3a4d68;
  --muted: #647792;
  --muted-2: #93a3ba;
  --brand: #1f6feb;
  --brand-hover: #1558c4;
  --brand-soft: #eaf2ff;
  --brand-line: #bfd7fb;
  --ok: #12a150;
  --ok-soft: #e7f8ee;
  --ok-line: #b6e7c8;
  --warn: #d97400;
  --warn-soft: #fdf3e5;
  --warn-line: #f4dcb0;
  --info: #1f6feb;
  --info-soft: #eaf2ff;
  --info-line: #bfd7fb;
  --danger: #e0342c;
  --danger-soft: #fdecea;
  --danger-line: #f6c8c4;
  --sidebar-bg: #0d2a4d;
  --sidebar-bg-top: #123a68;
  --sidebar-line: rgba(255, 255, 255, 0.1);
  --sidebar-fg: #c3d5ec;
  --sidebar-muted: #7b94b6;
  --radius: 9px;
  --radius-sm: 6px;
  --radius-lg: 14px;
  --shadow-card: 0 8px 24px rgba(20, 55, 110, 0.07);
  --shadow-raise: 0 14px 30px rgba(20, 55, 110, 0.14);
  --shadow-overlay: 0 20px 48px rgba(15, 40, 80, 0.2);
  --mp-scale: 0.56;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    "Hiragino Sans GB",
    "Microsoft YaHei",
    "Noto Sans CJK SC",
    sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid rgba(31, 111, 235, 0.5);
  outline-offset: 1px;
}

a {
  color: inherit;
}

img,
svg {
  display: block;
}

svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  stroke-width: 1.9;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

/* ---------- 应用外壳 ---------- */

.app-shell {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  min-height: 100vh;
}

.app-sidebar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  height: 100vh;
  flex-direction: column;
  padding: 18px 14px 16px;
  background:
    linear-gradient(180deg, var(--sidebar-bg-top), var(--sidebar-bg) 240px);
  color: var(--sidebar-fg);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.06);
}

.sidebar-brand {
  display: flex;
  min-height: 46px;
  align-items: center;
  gap: 11px;
  padding: 2px 8px 16px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(140deg, #3d8bff, #1f6feb);
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(31, 111, 235, 0.45);
}

.brand-copy {
  display: grid;
  min-width: 0;
  line-height: 1.25;
}

.brand-copy strong {
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
}

.brand-copy small {
  margin-top: 2px;
  color: var(--sidebar-muted);
  font-size: 11px;
}

.sidebar-nav {
  display: grid;
  align-content: start;
  gap: 20px;
  padding-top: 6px;
  overflow-y: auto;
  scrollbar-width: none;
}

.sidebar-nav::-webkit-scrollbar {
  display: none;
}

.nav-section {
  display: grid;
  gap: 3px;
}

.nav-section > p {
  margin: 0 10px 7px;
  color: var(--sidebar-muted);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.4px;
}

.nav-link,
.nav-button {
  position: relative;
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 11px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--sidebar-fg);
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 500;
  text-align: left;
  text-decoration: none;
  width: 100%;
  transition: background 0.14s ease, color 0.14s ease, box-shadow 0.14s ease;
}

.nav-link:hover,
.nav-button:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.nav-link.is-active {
  background: linear-gradient(135deg, #2a7ef5, #1f6feb);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 10px 22px rgba(10, 60, 140, 0.45);
}

.nav-link.is-active::before {
  content: none;
}

.nav-link svg,
.nav-button svg {
  width: 18px;
  height: 18px;
  color: var(--sidebar-muted);
  stroke-width: 1.8;
}

.nav-link.is-active svg,
.nav-link:hover svg,
.nav-button:hover svg {
  color: #ffffff;
}

.sidebar-footer {
  display: grid;
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--sidebar-line);
}

.sidebar-backdrop {
  display: none;
}

/* ---------- 顶栏 ---------- */

.app-main {
  min-width: 0;
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
}

.topbar-heading {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.crumbs {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13.5px;
}

.crumbs strong {
  color: var(--ink);
  font-weight: 600;
}

.crumbs span[aria-hidden] {
  color: var(--muted-2);
}

.topbar-search {
  position: relative;
  flex: 1 1 auto;
  max-width: 420px;
  min-width: 0;
}

.topbar-search > svg {
  position: absolute;
  left: 13px;
  top: 50%;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  color: var(--muted-2);
  pointer-events: none;
}

.topbar-search input {
  width: 100%;
  min-height: 38px;
  padding: 6px 14px 6px 38px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--surface-inset);
  color: var(--ink);
  font-size: 13px;
  transition: border-color 0.14s ease, background 0.14s ease,
    box-shadow 0.14s ease;
}

.topbar-search input::placeholder {
  color: var(--muted-2);
}

.topbar-search input:focus {
  border-color: var(--brand-line);
  outline: none;
  background: var(--surface);
  box-shadow: 0 0 0 4px rgba(31, 111, 235, 0.12);
}

.command-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 40;
  display: grid;
  gap: 2px;
  max-height: 320px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-raise);
}

.command-menu[hidden] {
  display: none;
}

.command-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  font-size: 13px;
  text-align: left;
  width: 100%;
}

.command-item svg {
  width: 16px;
  height: 16px;
  color: var(--muted);
}

.command-item span {
  flex: 1 1 auto;
}

.command-item small {
  color: var(--muted-2);
  font-size: 11.5px;
}

.command-item:hover,
.command-item.is-active {
  background: var(--brand-soft);
  color: var(--brand);
}

.command-item:hover svg,
.command-item.is-active svg {
  color: var(--brand);
}

.command-empty {
  padding: 14px 10px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.topbar-icon {
  position: relative;
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease;
}

.topbar-icon:hover {
  background: var(--surface-inset);
  color: var(--brand);
}

.topbar-icon svg {
  width: 18px;
  height: 18px;
}

.topbar-icon .topbar-dot {
  position: absolute;
  top: 6px;
  right: 7px;
  width: 8px;
  height: 8px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: #f5222d;
}

.topbar-divider {
  width: 1px;
  height: 22px;
  margin: 0 4px;
  background: var(--line);
}

.topbar-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
}

.app-topbar .mobile-menu-button {
  display: none;
}

/* ---------- 页面骨架 ---------- */

.page-content {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 22px 24px 64px;
}

.page-content.is-settings,
.page-content.is-narrow {
  max-width: 1240px;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 18px;
}

.page-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0;
}

.page-description {
  max-width: 62ch;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.page-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  padding-top: 2px;
}

.page-actions .button {
  white-space: nowrap;
}

.page-heading-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 12px;
  font-weight: 600;
}

/* 旧顶栏标题样式保留给未迁移页面 */
.topbar-heading h1 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.topbar-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

/* ---------- 按钮 ---------- */

.button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: 9px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.14s ease, border-color 0.14s ease,
    color 0.14s ease, box-shadow 0.14s ease, transform 0.14s ease;
}

.button svg {
  width: 16px;
  height: 16px;
}

.button:active {
  transform: translateY(1px);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.button-primary {
  border-color: transparent;
  background: linear-gradient(135deg, #2f82f6, #1f6feb 70%);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(31, 111, 235, 0.3);
}

.button-primary:hover {
  background: linear-gradient(135deg, #1f6feb, #1558c4);
  box-shadow: 0 10px 22px rgba(31, 111, 235, 0.36);
}

.button-secondary {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 2px 6px rgba(20, 55, 110, 0.05);
}

.button-secondary:hover {
  border-color: var(--brand-line);
  background: var(--brand-soft);
  color: var(--brand);
}

.button-danger {
  border-color: var(--danger-line);
  background: var(--surface);
  color: var(--danger);
  box-shadow: none;
}

.button-danger:hover {
  background: var(--danger-soft);
}

.button-ghost {
  background: transparent;
  color: var(--muted);
  box-shadow: none;
}

.button-ghost:hover {
  background: var(--surface-inset);
  color: var(--ink);
}

.button-small {
  min-height: 30px;
  padding: 0 11px;
  font-size: 12px;
  border-radius: 8px;
}

.button-block {
  width: 100%;
}

.button.is-busy {
  position: relative;
  color: transparent;
  pointer-events: none;
}

.button.is-busy::before {
  position: absolute;
  width: 13px;
  height: 13px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #ffffff;
  border-radius: 50%;
  content: "";
  animation: admin-spin 0.7s linear infinite;
}

.button-secondary.is-busy::before,
.button-danger.is-busy::before,
.button-ghost.is-busy::before {
  border-color: rgba(31, 35, 40, 0.25);
  border-top-color: var(--ink);
}

@keyframes admin-spin {
  to {
    transform: rotate(360deg);
  }
}

.icon-button {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.icon-button:hover {
  border-color: var(--line);
  background: var(--surface-subtle);
  color: var(--ink);
}

.icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.icon-button svg {
  width: 16px;
  height: 16px;
}

.icon-button.is-small {
  width: 26px;
  height: 26px;
}

.icon-button.is-small svg {
  width: 14px;
  height: 14px;
}

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--brand);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

.text-button:hover {
  color: var(--brand-hover);
  text-decoration: underline;
}

.text-button.is-danger {
  color: var(--danger);
}

/* ---------- 表单 ---------- */

.field {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.field > span,
.field-label {
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 500;
}

.field input,
.field select,
.field textarea,
.select-control {
  width: 100%;
  min-height: 38px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.field textarea {
  min-height: 76px;
  resize: vertical;
  line-height: 1.55;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--muted-2);
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.select-control:focus {
  border-color: var(--brand);
  outline: none;
  box-shadow: 0 0 0 4px rgba(31, 111, 235, 0.13);
}

.field input:disabled,
.field select:disabled,
.field textarea:disabled {
  background: var(--surface-subtle);
  color: var(--muted);
  cursor: not-allowed;
}

.field-error,
.form-error {
  margin: 0;
  color: var(--danger);
  font-size: 12.5px;
}

.field-error {
  display: flex;
  align-items: center;
  gap: 4px;
}

.field-hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.field-grid {
  display: grid;
  gap: 12px 16px;
}

.field-grid.is-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field-grid.is-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field-grid.is-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.form-section {
  display: grid;
  gap: 12px;
  padding: 16px 18px 18px;
  border-top: 1px solid var(--line-soft);
}

.form-section:first-child {
  border-top: 0;
}

.form-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.form-section-header h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}

.form-section-header p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.switch-field {
  display: flex;
  min-height: 40px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-subtle);
}

.switch-copy {
  display: grid;
  gap: 1px;
}

.switch-copy strong {
  font-size: 13px;
  font-weight: 500;
}

.switch-copy small {
  color: var(--muted);
  font-size: 12px;
}

.switch-field input {
  width: 17px;
  height: 17px;
  accent-color: var(--brand);
  cursor: pointer;
}

/* ---------- 表面容器 ---------- */

.surface {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.surface-header {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line-soft);
}

.surface-header h2,
.surface-header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

.surface-header p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.surface-body {
  display: grid;
  gap: 12px;
  padding: 18px 20px;
}

.content-surface {
  margin-top: 16px;
}

.summary-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 16px;
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
}

.summary-line strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

/* ---------- 状态页签 / 概览 ---------- */

.status-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  margin: 14px 0 12px;
}

.status-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  transition: background 0.12s ease, color 0.12s ease;
}

.status-tab:hover {
  background: var(--brand-soft);
  color: var(--brand);
}

.status-tab.is-active {
  background: var(--brand);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 8px 18px rgba(31, 111, 235, 0.28);
}

.status-tab span {
  color: inherit;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 400;
  opacity: 0.75;
}

/* ---------- 表格 ---------- */

.table-scroll {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th {
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}

.data-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}

.data-table tbody tr:hover {
  background: var(--surface-subtle);
}

.data-table tbody tr:last-child td,
.responsive-table tr:last-child {
  border-bottom: 0;
}

.table-title {
  display: grid;
  gap: 1px;
}

.table-title strong,
.table-title-button {
  font-size: 13px;
  font-weight: 600;
}

.table-title span {
  color: var(--muted);
  font-size: 12px;
}

.table-title-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.table-title-button:hover strong {
  color: var(--brand);
  text-decoration: underline;
}

.table-count {
  padding: 12px 16px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 12px;
}

.row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

/* ---------- 状态标签 ---------- */

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-subtle);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  white-space: nowrap;
}

.status-pill.is-draft,
.status-pill.is-off-shelf {
  border-color: var(--line);
  background: var(--surface-inset);
  color: var(--muted);
}

.status-pill.is-published,
.status-pill.is-active {
  border-color: var(--ok-line);
  background: var(--ok-soft);
  color: var(--ok);
}

.status-pill.is-scheduled {
  border-color: var(--info-line);
  background: var(--info-soft);
  color: var(--info);
}

.status-pill.is-archived,
.status-pill.is-disabled,
.status-pill.is-ended {
  border-color: var(--line);
  background: var(--surface-subtle);
  color: var(--muted-2);
}

/* ---------- 工具条 ---------- */

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-soft);
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-field {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 260px;
}

.search-field svg {
  position: absolute;
  left: 9px;
  width: 15px;
  height: 15px;
  color: var(--muted-2);
  pointer-events: none;
}

.search-field input {
  width: 100%;
  min-height: 38px;
  padding: 6px 12px 6px 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
}

.search-field input:focus {
  border-color: var(--brand);
  outline: none;
  box-shadow: 0 0 0 4px rgba(31, 111, 235, 0.13);
}

.select-control {
  width: auto;
  min-width: 130px;
  min-height: 32px;
  padding-right: 26px;
  font-size: 13px;
}

/* ---------- 空状态 / 锁定态 ---------- */

.empty-state {
  display: grid;
  justify-items: start;
  gap: 4px;
  padding: 28px 16px 30px;
}

.empty-state h3 {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
}

.empty-state p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
}

.locked-state {
  display: grid;
  justify-items: start;
  gap: 4px;
  padding: 28px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.locked-state svg {
  width: 18px;
  height: 18px;
  color: var(--muted);
}

.locked-state h3 {
  margin: 6px 0 0;
  font-size: 14px;
  font-weight: 600;
}

.locked-state p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
}

.inline-alert {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 12px 0;
  padding: 9px 12px;
  border: 1px solid var(--warn-line);
  border-radius: var(--radius);
  background: var(--warn-soft);
  color: var(--warn);
  font-size: 13px;
}

.inline-alert.is-info {
  border-color: var(--info-line);
  background: var(--info-soft);
  color: var(--info);
}

.inline-alert p {
  margin: 0;
}

.inline-alert svg {
  margin-top: 1px;
}

/* ---------- 活动编辑器 ---------- */

#activityEditorView {
  margin-top: 4px;
}

.activity-editor-header {
  display: grid;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.editor-crumb-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.editor-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.editor-header-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.editor-title-copy h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0;
}

.editor-title-copy p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12.5px;
}

.editor-tabs {
  display: flex;
  gap: 2px;
  margin: 12px 0 14px;
  border-bottom: 1px solid var(--line);
}

.editor-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  margin-bottom: -1px;
  transition: color 0.12s ease, border-color 0.12s ease;
}

.editor-tab svg {
  width: 15px;
  height: 15px;
}

.editor-tab:hover {
  color: var(--ink);
}

.editor-tab.is-active {
  border-bottom-color: var(--brand);
  color: var(--ink);
  font-weight: 600;
}

.editor-panel {
  display: grid;
  gap: 12px;
}

.activity-form {
  overflow: hidden;
}

.activity-form__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: start;
}

.activity-form__main,
.activity-form__aside {
  min-width: 0;
}

.activity-form__aside {
  border-left: 1px solid var(--line);
  background: var(--surface-subtle);
}

.activity-form__aside .form-section {
  gap: 14px;
  padding: 18px;
}

.activity-form__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.activity-form__footer p {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
}

.field-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.field-count {
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
  font-weight: 400;
}

.required-mark {
  margin-left: 3px;
  color: var(--danger);
  font-weight: 600;
}

.duration-chip {
  flex: 0 0 auto;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.duration-chip.is-invalid {
  border-color: rgba(224, 52, 44, 0.32);
  background: rgba(224, 52, 44, 0.06);
  color: var(--danger);
}

.activity-card-preview {
  display: flex;
  min-height: 148px;
  overflow: hidden;
  border: 1px solid rgba(189, 161, 105, 0.18);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 7px 18px rgba(45, 68, 62, 0.07);
}

.activity-card-preview__cover {
  display: flex;
  width: 104px;
  flex: 0 0 104px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #e8ede9;
  color: var(--muted);
  font-size: 11.5px;
}

.activity-card-preview__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.activity-card-preview__body {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: flex-start;
  padding: 12px;
}

.activity-card-preview__status {
  padding: 1px 6px;
  border-radius: 2px;
  background: #c51f2d;
  color: #ffffff;
  font-size: 10.5px;
}

.activity-card-preview__status.is-upcoming {
  background: #a97f3d;
}

.activity-card-preview__status.is-ended {
  background: #8a9691;
}

.activity-card-preview__title {
  width: 100%;
  margin-top: 7px;
  overflow: hidden;
  color: #1f3f45;
  font-family: "STSong", "Songti SC", "SimSun", serif;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-card-preview__desc {
  display: -webkit-box;
  width: 100%;
  margin-top: 5px;
  overflow: hidden;
  color: #74817c;
  font-size: 11.5px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.activity-card-preview__button {
  margin-top: auto;
  padding: 4px 10px;
  border-radius: 999px;
  background: #c51f2d;
  color: #ffffff;
  font-size: 11px;
}

.cover-preview--panel {
  width: 100%;
}

.cover-link {
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

.cover-link summary {
  color: var(--muted);
  cursor: pointer;
  font-size: 12.5px;
}

.cover-link[open] summary {
  margin-bottom: 8px;
}

@media (max-width: 1200px) {
  .activity-form__layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .activity-form__aside {
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

.save-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12.5px;
}

.save-state::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted-2);
  content: "";
}

.save-state.is-dirty {
  color: var(--warn);
}

.save-state.is-dirty::before {
  background: var(--warn);
}

/* ---------- 兑换类目与商品 ---------- */

.category-stack {
  display: grid;
  gap: 10px;
}

.category-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.category-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-soft);
}

.category-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.category-title strong {
  font-size: 13.5px;
  font-weight: 600;
}

.category-meta {
  color: var(--muted);
  font-size: 12px;
}

.category-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
}

.category-empty {
  padding: 16px;
  color: var(--muted);
  font-size: 13px;
}

.product-list {
  display: grid;
}

.product-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-top: 1px solid var(--line-soft);
}

.product-row:first-child {
  border-top: 0;
}

.product-row:hover {
  background: var(--surface-subtle);
}

.product-image {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-inset);
  color: var(--muted-2);
  font-size: 11px;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-copy {
  display: grid;
  min-width: 0;
  flex: 1 1 auto;
  gap: 1px;
}

.product-copy strong {
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-copy p {
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-title-line {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.product-meta {
  display: flex;
  flex: 0 0 auto;
  gap: 14px;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.product-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 2px;
}

/* ---------- 发布检查 ---------- */

.readiness-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 12px;
  align-items: start;
}

.readiness-list {
  display: grid;
}

.readiness-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 16px;
  border-top: 1px solid var(--line-soft);
}

.readiness-item:first-child {
  border-top: 0;
}

.readiness-icon {
  display: grid;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  place-items: center;
  margin-top: 1px;
  border-radius: 50%;
}

.readiness-icon svg {
  width: 13px;
  height: 13px;
}

.readiness-item.is-complete .readiness-icon {
  background: var(--ok-soft);
  color: var(--ok);
}

.readiness-item.is-blocked .readiness-icon {
  background: var(--warn-soft);
  color: var(--warn);
}

.readiness-copy {
  display: grid;
  flex: 1 1 auto;
  gap: 1px;
  min-width: 0;
}

.readiness-copy strong {
  font-size: 13px;
  font-weight: 600;
}

.readiness-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.readiness-item .button {
  flex: 0 0 auto;
}

.readiness-summary {
  padding: 14px 16px;
}

.readiness-score {
  display: grid;
  gap: 6px;
}

.readiness-score span {
  color: var(--muted);
  font-size: 12px;
}

.readiness-score strong {
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  line-height: 1;
}

.readiness-score-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.readiness-progress {
  height: 4px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--surface-inset);
}

.readiness-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 2px;
  background: var(--ok);
  transition: width 0.2s ease;
}

.readiness-summary-body {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
}

/* ---------- 抽屉 ---------- */

.drawer {
  width: min(560px, 100vw);
  max-width: 100vw;
  height: 100%;
  max-height: 100%;
  margin: 0 0 0 auto;
  padding: 0;
  border: 0;
  border-left: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-overlay);
}

.drawer::backdrop {
  background: rgba(31, 35, 40, 0.35);
}

.drawer[open] {
  display: block;
}

.drawer-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.drawer-panel {
  display: grid;
  gap: 14px;
  align-content: start;
}

.drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.drawer-header h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.drawer-header p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12.5px;
}

.drawer-tabs {
  display: flex;
  gap: 2px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
}

.drawer-tab {
  padding: 9px 10px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  margin-bottom: -1px;
}

.drawer-tab:hover {
  color: var(--ink);
}

.drawer-tab.is-active {
  border-bottom-color: var(--brand);
  color: var(--ink);
  font-weight: 600;
}

.drawer-body {
  display: grid;
  gap: 14px;
  flex: 1 1 auto;
  padding: 16px 18px;
  overflow-y: auto;
}

.drawer-panel > h3 {
  margin: 0;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13px;
  font-weight: 600;
}

.drawer-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
}

/* ---------- 对话框 ---------- */

.app-dialog,
.confirm-dialog {
  width: min(460px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-overlay);
}

.app-dialog::backdrop,
.confirm-dialog::backdrop {
  background: rgba(31, 35, 40, 0.35);
}

.dialog-card {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.dialog-heading {
  display: grid;
  gap: 3px;
}

.dialog-heading.has-icon {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.dialog-icon {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: var(--radius-sm);
  background: var(--danger-soft);
  color: var(--danger);
}

.dialog-icon.is-info {
  background: var(--info-soft);
  color: var(--info);
}

.dialog-copy h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.dialog-heading > h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.dialog-heading > p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.dialog-copy {
  display: grid;
  gap: 3px;
}

.dialog-copy p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.dialog-details {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-subtle);
  color: var(--muted);
  font-size: 12.5px;
  list-style: none;
}

.dialog-details li::before {
  margin-right: 6px;
  color: var(--muted-2);
  content: "·";
}

.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

/* ---------- 提示条 ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 60;
  max-width: min(420px, calc(100vw - 32px));
  padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: #10294a;
  color: #ffffff;
  font-size: 13px;
  opacity: 0;
  transform: translate(-50%, 8px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast.is-error {
  background: var(--danger);
}

/* ---------- 账号 ---------- */

.user-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-left: 4px;
}

.user-avatar,
.user-table-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(140deg, #3d8bff, #1f6feb);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 6px 14px rgba(31, 111, 235, 0.28);
}

.user-copy {
  display: grid;
  line-height: 1.25;
}

.user-copy strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.user-copy small {
  color: var(--muted);
  font-size: 11px;
}

.user-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 2px;
  padding: 0 0 0 10px;
  border: 0;
  border-left: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12.5px;
}

.user-action:hover {
  color: var(--brand);
  text-decoration: underline;
}

.user-action svg {
  width: 14px;
  height: 14px;
}

/* ---------- 图片与上传 ---------- */

.file-drop {
  display: grid;
}

.file-drop input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.file-drop label {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
}

.file-drop label:hover {
  border-color: var(--line-strong);
  background: var(--surface-subtle);
}

.file-drop p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.image-field-row {
  display: grid;
  gap: 10px;
}

.image-preview {
  display: grid;
  min-height: 120px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-subtle);
  color: var(--muted);
  font-size: 12px;
}

.image-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.image-preview.is-wide {
  aspect-ratio: 16 / 9;
}

.cover-editor {
  display: grid;
  grid-template-columns: minmax(240px, 400px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.cover-preview {
  display: grid;
  aspect-ratio: 16 / 9;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-subtle);
  color: var(--muted);
  font-size: 12px;
}

.cover-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-controls {
  display: grid;
  gap: 10px;
}

.meta-text {
  color: var(--muted);
  font-size: 12px;
}

/* ---------- Banner ---------- */

.banner-layout {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  gap: 14px;
  margin-top: 16px;
  align-items: stretch;
}

.banner-layout > .surface:last-child .surface-body {
  gap: 20px;
  padding: 20px;
}

.banner-layout .file-drop label {
  min-height: 96px;
  flex-direction: column;
  border-style: dashed;
  border-color: var(--line-strong);
  background: var(--surface-subtle);
}

.banner-layout .file-drop label:hover {
  background: var(--surface-inset);
}

.banner-layout .file-drop label svg {
  width: 20px;
  height: 20px;
}

.banner-layout .file-drop p {
  margin-top: 8px;
}

/* ---------- 小程序首页预览 ---------- */

.mp-preview {
  display: flex;
  justify-content: center;
  padding: 16px;
  background: var(--surface-subtle);
  border-radius: 0 0 var(--radius) var(--radius);
}

.mp-scale {
  position: relative;
  width: calc(406px * var(--mp-scale));
  height: calc(860px * var(--mp-scale));
}

.mp-phone {
  position: absolute;
  top: 0;
  left: 0;
  width: 406px;
  height: 860px;
  padding: 8px;
  border-radius: 46px;
  background: #1c2126;
  box-shadow: 0 14px 32px rgba(31, 35, 40, 0.22);
  transform: scale(var(--mp-scale));
  transform-origin: top left;
}

.mp-screen {
  position: relative;
  width: 390px;
  height: 844px;
  overflow: hidden;
  border-radius: 38px;
  background: #f5f7f5;
}

.mp-viewport {
  height: 762px;
  overflow-y: auto;
  background: #f5f7f5;
  scrollbar-width: none;
}

.mp-viewport::-webkit-scrollbar {
  display: none;
}

.mp-page {
  min-height: 762px;
  padding-bottom: 27px;
  background: #f5f7f5;
}

.mp-hero {
  position: relative;
  height: 447px;
  overflow: hidden;
  background: #dfecea;
}

.mp-hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mp-hero__placeholder {
  display: flex;
  height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #7c928d;
  font-size: 12px;
}

.mp-hero__placeholder svg {
  width: 22px;
  height: 22px;
}

.mp-hero__shade {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 114px;
  background: linear-gradient(180deg, transparent, rgba(22, 58, 62, 0.3));
}

.mp-hero__caption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 13px 16px;
  background: rgba(112, 129, 111, 0.66);
  color: #ffffff;
  font-family: "STSong", "Songti SC", "SimSun", serif;
  font-size: 19px;
  letter-spacing: 2px;
  text-align: center;
}

.mp-nav {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 5;
}

.mp-nav__bar {
  position: relative;
  height: 40px;
  margin-top: 47px;
}

.mp-nav__brand {
  position: absolute;
  top: 0;
  right: 102px;
  bottom: 0;
  left: 102px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.mp-nav__mark {
  display: flex;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #b58d4a;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
}

.mp-nav__mark span {
  display: flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(181, 141, 74, 0.62);
  border-radius: 50%;
  color: #9e6f29;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 14px;
  font-weight: 700;
}

.mp-nav__title {
  overflow: hidden;
  color: #1f211f;
  font-family: "STSong", "Songti SC", "SimSun", serif;
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
}

.mp-nav__capsule {
  position: absolute;
  top: 4px;
  right: 7px;
  display: flex;
  width: 87px;
  height: 32px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid rgba(31, 35, 40, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.6);
}

.mp-nav__capsule i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #4b5359;
  opacity: 0.7;
}

.mp-island {
  position: absolute;
  top: 11px;
  left: 50%;
  z-index: 20;
  width: 125px;
  height: 37px;
  margin-left: -62.5px;
  border-radius: 19px;
  background: #05070a;
  pointer-events: none;
}

.mp-content {
  position: relative;
  z-index: 3;
  margin-top: -9px;
  padding: 17px 15px 0;
  border-radius: 13px 13px 0 0;
  background: #f5f7f5;
}

.mp-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 11px;
}

.mp-section-title {
  color: #21383a;
  font-size: 19px;
  font-weight: 600;
  line-height: 24.8px;
}

.mp-section-subtitle {
  margin-top: 4px;
  color: #8a9691;
  font-size: 11px;
  line-height: 15.2px;
}

.mp-activity {
  display: flex;
  min-height: 146px;
  overflow: hidden;
  border: 1px solid rgba(189, 161, 105, 0.18);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 7px 18px rgba(45, 68, 62, 0.07);
}

.mp-activity__cover {
  display: flex;
  width: 123px;
  height: 145px;
  flex: 0 0 123px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #e8ede9;
  color: #8a9691;
  font-size: 11px;
}

.mp-activity__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mp-activity__body {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: flex-start;
  padding: 12px 12px 11px;
}

.mp-activity__status {
  padding: 2px 6px;
  border-radius: 2px;
  background: #c51f2d;
  color: #ffffff;
  font-size: 10px;
  line-height: 12.8px;
}

.mp-activity__title {
  margin-top: 7px;
  color: #1f3f45;
  font-family: "STSong", "Songti SC", "SimSun", serif;
  font-size: 21px;
  font-weight: 600;
  line-height: 28px;
}

.mp-activity__desc {
  display: -webkit-box;
  margin-top: 5px;
  overflow: hidden;
  color: #74817c;
  font-size: 11px;
  line-height: 17.05px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.mp-activity__button {
  display: block;
  width: 184px;
  min-width: 90px;
  margin: auto auto 0;
  padding: 6px 11px;
  border-radius: 17px;
  background: #c51f2d;
  color: #ffffff;
  font-size: 11px;
  line-height: 15.4px;
  text-align: center;
}

.mp-tabbar {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 6;
  height: 82px;
  background: #ffffff;
}

.mp-tabbar__items {
  display: flex;
  height: 50px;
}

.mp-tab {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  color: #6f7974;
}

.mp-tab.is-active {
  color: #a6372f;
}

.mp-tab img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.mp-tab span {
  font-size: 10px;
  line-height: 12px;
}

.mp-home-indicator {
  position: absolute;
  bottom: 8px;
  left: 50%;
  width: 134px;
  height: 5px;
  margin-left: -67px;
  border-radius: 3px;
  background: #111111;
  opacity: 0.92;
}

/* ---------- 侧栏账号卡 ---------- */

.sidebar-account {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 11px;
  border: 1px solid var(--sidebar-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
}

.sidebar-account__avatar {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(140deg, #3d8bff, #1f6feb);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
}

.sidebar-account__copy {
  display: grid;
  min-width: 0;
  line-height: 1.3;
}

.sidebar-account__copy strong {
  overflow: hidden;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-account__copy small {
  color: var(--sidebar-muted);
  font-size: 11px;
}

.sidebar-footer .nav-button {
  min-height: 38px;
}

/* ---------- 仪表板 ---------- */

.dash-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

/* ---------- 兑换订单 ---------- */

.order-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.order-kpi {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.order-kpi__icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 11px;
  background: var(--surface-inset);
  color: var(--ink-2);
}

.order-kpi__icon.is-warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.order-kpi__icon.is-info {
  background: var(--info-soft);
  color: var(--info);
}

.order-kpi__icon.is-ok {
  background: var(--ok-soft);
  color: var(--ok);
}

.order-kpi__icon svg {
  width: 19px;
  height: 19px;
}

.order-kpi div {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.order-kpi span {
  color: var(--muted);
  font-size: 12px;
}

.order-kpi strong {
  color: var(--ink);
  font-size: 23px;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.order-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 16px 12px;
}

.order-toolbar .status-tabs {
  margin: 0;
}

.order-toolbar .search-field {
  width: min(340px, 100%);
}

.order-table {
  min-width: 920px;
}

.order-status.is-pending {
  border-color: var(--warn-line);
  background: var(--warn-soft);
  color: var(--warn);
}

.order-status.is-shipped {
  border-color: var(--info-line);
  background: var(--info-soft);
  color: var(--info);
}

.order-status.is-completed {
  border-color: var(--ok-line);
  background: var(--ok-soft);
  color: var(--ok);
}

.table-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 12.5px;
}

.order-detail-dialog {
  width: min(920px, calc(100vw - 32px));
}

.order-detail-card {
  display: block;
  max-height: min(88vh, 820px);
  padding: 0;
  overflow: hidden;
}

.order-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line);
}

.order-detail-head h2 {
  margin: 3px 0 0;
  font-size: 18px;
  line-height: 1.3;
}

.order-detail-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12.5px;
}

.order-detail-body {
  display: grid;
  gap: 16px;
  max-height: calc(88vh - 150px);
  padding: 18px 20px;
  overflow-y: auto;
}

.order-detail-section {
  display: grid;
  gap: 10px;
}

.order-detail-section + .order-detail-section {
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}

.order-detail-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.order-detail-section__head h3 {
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
}

.order-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 18px;
}

.order-detail-row {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  align-items: baseline;
  gap: 10px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--surface-subtle);
}

.order-detail-row > span {
  color: var(--muted);
  font-size: 12px;
}

.order-detail-row > strong {
  overflow-wrap: anywhere;
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 600;
}

.order-detail-row > strong.is-mono {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
}

.order-item-list {
  display: grid;
  gap: 8px;
}

.order-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.order-item__image {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--surface-inset);
  color: var(--muted);
}

.order-item__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.order-item__body {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.order-item__body strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-item__body span,
.order-item__body small {
  color: var(--muted);
  font-size: 12px;
}

.order-item > b {
  color: var(--ink);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.order-detail-card > .dialog-actions {
  padding: 12px 20px;
  border-top: 1px solid var(--line);
}

.order-timeline {
  display: grid;
  gap: 0;
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
}

.order-timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  padding: 0 0 16px;
}

.order-timeline li:last-child {
  padding-bottom: 0;
}

.order-timeline li:not(:last-child)::before {
  position: absolute;
  top: 8px;
  bottom: -2px;
  left: 5px;
  width: 1px;
  background: var(--line);
  content: "";
}

.order-timeline__dot {
  z-index: 1;
  width: 11px;
  height: 11px;
  margin-top: 4px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--info);
  box-shadow: 0 0 0 1px var(--info-line);
}

.order-timeline li:first-child .order-timeline__dot {
  background: var(--ok);
  box-shadow: 0 0 0 1px var(--ok-line);
}

.order-timeline div {
  display: grid;
  gap: 4px;
}

.order-timeline strong {
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.55;
}

.order-timeline small {
  color: var(--muted);
  font-size: 11.5px;
}

.order-logistics-empty {
  padding: 12px 14px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--surface-subtle);
  color: var(--muted);
  font-size: 12.5px;
}

.input-suffix {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.input-suffix span {
  color: var(--muted);
  font-size: 12.5px;
}

@media (max-width: 900px) {
  .order-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .order-toolbar,
  .table-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .order-toolbar .search-field {
    width: 100%;
    min-width: 0;
  }

  .order-detail-grid {
    grid-template-columns: 1fr;
  }

  .order-detail-head,
  .order-detail-body {
    padding-right: 16px;
    padding-left: 16px;
  }
}

.kpi-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.16s ease, transform 0.16s ease;
}

.kpi-card:hover {
  box-shadow: var(--shadow-raise);
  transform: translateY(-2px);
}

.kpi-icon {
  display: grid;
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 16px;
}

.kpi-icon svg {
  width: 24px;
  height: 24px;
  stroke-width: 1.9;
}

.kpi-icon.is-blue {
  background: var(--brand-soft);
  color: #1f6feb;
}

.kpi-icon.is-green {
  background: var(--ok-soft);
  color: #12a150;
}

.kpi-icon.is-orange {
  background: var(--warn-soft);
  color: #e08a00;
}

.kpi-icon.is-purple {
  background: #f1ecfe;
  color: #7c4dff;
}

.kpi-body {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.kpi-label {
  color: var(--muted);
  font-size: 12.5px;
}

.kpi-value {
  color: var(--ink);
  font-size: 26px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  line-height: 1.15;
}

.kpi-foot {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

.kpi-foot.is-up {
  color: var(--ok);
}

.kpi-foot svg {
  width: 13px;
  height: 13px;
}

.dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.dash-card {
  min-width: 0;
}

.dash-card-body {
  padding: 18px 20px 20px;
}

.dash-card-body.is-flush {
  padding: 0;
}

.dash-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.dash-select {
  min-height: 32px;
  padding: 4px 28px 4px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 12.5px;
}

.dash-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--brand);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.dash-link svg {
  width: 14px;
  height: 14px;
}

.dash-link:hover {
  color: var(--brand-hover);
}

/* 柱状图 */

.bar-chart {
  display: flex;
  align-items: stretch;
  gap: 18px;
  height: 220px;
  padding-top: 6px;
  overflow-x: auto;
}

.bar-col {
  display: grid;
  grid-template-rows: 20px minmax(0, 1fr) 20px;
  align-items: end;
  justify-items: center;
  gap: 6px;
  min-width: 56px;
  flex: 1 1 0;
}

.bar-value {
  color: var(--ink);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.bar-track {
  display: flex;
  width: 100%;
  max-width: 52px;
  height: 100%;
  align-items: flex-end;
  overflow: hidden;
  border-radius: 10px;
  background: var(--surface-inset);
}

.bar-fill {
  width: 100%;
  min-height: 8px;
  border-radius: 10px;
  background: linear-gradient(180deg, #5aa0fb, #1f6feb);
  transition: height 0.4s ease;
}

.bar-col.is-alt .bar-fill {
  background: linear-gradient(180deg, #7dc8a2, #12a150);
}

.bar-label {
  max-width: 100%;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 排行榜 */

.rank-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rank-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rank-num {
  display: grid;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-inset);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
}

.rank-num.is-1 {
  background: #fff1d6;
  color: #d98600;
}

.rank-num.is-2 {
  background: #eaf1fb;
  color: #5b7ca6;
}

.rank-main {
  display: grid;
  min-width: 0;
  flex: 1 1 auto;
  gap: 6px;
}

.rank-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.rank-top strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-top span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.rank-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-inset);
}

.rank-track span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #5aa0fb, #1f6feb);
}

/* 活动动态 */

.activity-feed {
  margin: 0;
  padding: 0;
  list-style: none;
}

.feed-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line-soft);
}

.feed-row:last-child {
  border-bottom: 0;
}

.feed-row:hover {
  background: var(--surface-subtle);
}

.feed-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand);
}

.feed-icon svg {
  width: 18px;
  height: 18px;
}

.feed-icon.is-draft {
  background: var(--surface-inset);
  color: var(--muted);
}

.feed-icon.is-ended {
  background: var(--surface-inset);
  color: var(--muted-2);
}

.feed-main {
  display: grid;
  min-width: 0;
  flex: 1 1 auto;
  gap: 3px;
}

.feed-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.feed-title strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feed-meta {
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feed-time {
  flex: 0 0 auto;
  color: var(--muted-2);
  font-size: 12px;
  white-space: nowrap;
}

/* 漏斗 */

.funnel {
  display: grid;
  gap: 14px;
}

.funnel-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center;
  gap: 12px;
}

.funnel-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12.5px;
}

.funnel-meta strong {
  color: var(--ink);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.funnel-track {
  display: flex;
  height: 20px;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: var(--surface-inset);
}

.funnel-bar {
  height: 100%;
  border-radius: 7px;
  transition: width 0.4s ease;
}

.funnel-bar.is-1 {
  background: linear-gradient(90deg, #5aa0fb, #1f6feb);
}

.funnel-bar.is-2 {
  background: linear-gradient(90deg, #58c7a5, #12a150);
}

.funnel-bar.is-3 {
  background: linear-gradient(90deg, #f3b95f, #e08a00);
}

.funnel-bar.is-4 {
  background: linear-gradient(90deg, #a682f7, #7c4dff);
}

.funnel-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 2px;
  padding-top: 14px;
  border-top: 1px dashed var(--line-strong);
  color: var(--muted);
  font-size: 13px;
}

.funnel-total strong {
  color: var(--ink);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

/* 关注提醒 */

.alert-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.alert-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line-soft);
}

.alert-item:last-child {
  border-bottom: 0;
}

.alert-item p {
  margin: 0;
  flex: 1 1 auto;
  color: var(--ink-2);
  font-size: 13px;
}

.alert-icon {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--warn-soft);
  color: #e08a00;
}

.alert-icon svg {
  width: 16px;
  height: 16px;
}

.alert-icon.is-ok {
  background: var(--ok-soft);
  color: var(--ok);
}

.alert-item a {
  flex: 0 0 auto;
  color: var(--brand);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
}

.alert-item a:hover {
  text-decoration: underline;
}

.alert-empty {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px;
  color: var(--muted);
  font-size: 13px;
}

/* 快捷操作 */

.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.quick-tile {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 16px 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink-2);
  text-decoration: none;
  transition: border-color 0.14s ease, box-shadow 0.14s ease,
    transform 0.14s ease;
}

.quick-tile:hover {
  border-color: var(--brand-line);
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
}

.quick-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
}

.quick-icon svg {
  width: 20px;
  height: 20px;
}

.quick-icon.is-blue {
  background: var(--brand-soft);
  color: #1f6feb;
}

.quick-icon.is-green {
  background: var(--ok-soft);
  color: #12a150;
}

.quick-icon.is-orange {
  background: var(--warn-soft);
  color: #e08a00;
}

.quick-icon.is-purple {
  background: #f1ecfe;
  color: #7c4dff;
}

.quick-label {
  font-size: 12px;
  font-weight: 500;
  text-align: center;
}

.dash-loading {
  padding: 40px 20px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

@media (max-width: 1100px) {
  .dash-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dash-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 520px) {
  .dash-kpi-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .kpi-card {
    padding: 16px;
  }

  .quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- 登录 ---------- */

.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #eff4fc 0%, #e2ecfa 55%, #dbe8fb 100%);
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 100vh;
}

.login-brand-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 32px;
  padding: 40px 44px;
  background:
    radial-gradient(120% 80% at 90% 0%, rgba(60, 140, 255, 0.35), transparent 55%),
    linear-gradient(160deg, #123a68, #0a2140 72%);
  color: #ffffff;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.login-brand .brand-mark {
  width: 30px;
  height: 30px;
  font-size: 16px;
}

.login-brand-copy {
  display: grid;
  line-height: 1.3;
}

.login-brand-copy strong {
  font-size: 14px;
  font-weight: 600;
}

.login-brand-copy small {
  color: var(--sidebar-muted);
  font-size: 12px;
}

.login-brand-message h1 {
  max-width: 22ch;
  margin: 0;
  font-size: 26px;
  font-weight: 600;
  line-height: 1.35;
}

.login-brand-message p {
  max-width: 40ch;
  margin: 10px 0 0;
  color: #9aa4ad;
  font-size: 13px;
}

.login-panel {
  display: grid;
  align-content: center;
  justify-items: stretch;
  gap: 4px;
  width: 100%;
  max-width: 400px;
  margin: auto;
  padding: 38px 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.login-panel h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}

.login-subtitle {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 13px;
}

.login-form {
  display: grid;
  gap: 14px;
}

/* ---------- 响应式 ---------- */

@media (max-width: 1024px) {
  .banner-layout,
  .readiness-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .cover-editor {
    grid-template-columns: minmax(0, 1fr);
  }

  .cover-preview {
    max-width: 320px;
  }
}

@media (max-width: 820px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .app-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 240px;
    transform: translateX(-100%);
    transition: transform 0.18s ease;
  }

  .sidebar-open .app-sidebar {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 25;
    display: block;
    background: rgba(31, 35, 40, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
  }

  .sidebar-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .app-topbar {
    padding: 0 14px;
  }

  .app-topbar .mobile-menu-button {
    display: inline-flex;
  }

  .topbar-search,
  .topbar-icon,
  .topbar-divider {
    display: none;
  }

  .topbar-heading {
    flex: 1 1 auto;
  }

  .page-content {
    padding: 16px 14px 56px;
  }

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

  .page-actions {
    width: 100%;
  }

  .page-actions .button {
    flex: 1 1 auto;
  }

  .field-grid.is-2,
  .field-grid.is-3,
  .field-grid.is-4 {
    grid-template-columns: minmax(0, 1fr);
  }

  .toolbar {
    flex-wrap: nowrap;
  }

  .toolbar-group {
    flex: 0 0 auto;
  }

  .toolbar-group:first-child {
    flex: 1 1 auto;
    min-width: 0;
  }

  .search-field {
    min-width: 0;
    flex: 1 1 auto;
  }

  .editor-tabs {
    overflow-x: auto;
  }

  .editor-tab {
    flex: 0 0 auto;
  }

  .editor-title-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .editor-header-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .summary-line {
    gap: 4px 12px;
  }

  .login-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .login-brand-panel {
    min-height: 180px;
    padding: 24px;
  }

  .login-brand-message h1 {
    margin-top: 24px;
    font-size: 20px;
  }

  .login-panel {
    padding: 28px 20px 40px;
  }

  /* 移动端表格改为卡片行 */
  .responsive-table thead {
    display: none;
  }

  .responsive-table tr {
    display: grid;
    gap: 6px;
    padding: 12px;
    border-bottom: 1px solid var(--line-soft);
  }

  .responsive-table tr:last-child {
    border-bottom: 0;
  }

  .responsive-table td {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    padding: 0;
    border: 0;
    text-align: left;
  }

  .responsive-table td:first-child {
    grid-template-columns: minmax(0, 1fr);
  }

  .responsive-table td[data-label]::before {
    color: var(--muted);
    content: attr(data-label);
    font-size: 12px;
  }

  .responsive-table .row-actions {
    display: flex;
    flex-wrap: wrap;
    grid-template-columns: minmax(0, 1fr);
    justify-content: flex-start;
    padding-top: 4px;
    border-top: 1px solid var(--line-soft);
  }

  .responsive-table .row-actions::before {
    display: none;
  }
}

@media (max-width: 520px) {
  .crumbs span:first-child,
  .crumbs span[aria-hidden] {
    display: none;
  }

  .crumbs strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .user-copy,
  .user-action span {
    display: none;
  }

  .status-tab {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .status-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
  }

  .category-card-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .product-row {
    flex-wrap: wrap;
  }

  .product-meta {
    flex: 1 1 100%;
    order: 3;
  }
}

.status-pill.is-offline {
  background: #eef1f4;
  color: #58636d;
}

.rule-list {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.rule-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--surface-color);
}

.rule-row__main {
  min-width: 0;
}

.rule-row__title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rule-row p {
  margin: 7px 0 0;
  color: var(--text-muted);
  font-size: 13px;
}

.rule-row__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.rule-item-editor {
  display: grid;
  gap: 10px;
}

.rule-item-editor__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--text-primary);
  font-size: 14px;
}

.rule-item-list {
  display: grid;
  gap: 9px;
}

.rule-item-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 82px 34px;
  align-items: center;
  gap: 8px;
}

.rule-item-row select,
.rule-item-row input {
  min-width: 0;
}

.variant-stock-editor {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: #fafbfc;
}

.variant-stock-editor__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.variant-stock-editor__header span,
.variant-stock-editor__empty {
  color: var(--text-muted);
  font-size: 12px;
}

.variant-stock-editor__empty {
  margin: 0;
}

.variant-stock-list {
  display: grid;
  gap: 8px;
}

.variant-stock-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px 24px;
  align-items: center;
  gap: 8px;
}

.variant-stock-row > span {
  overflow: hidden;
  color: var(--text-primary);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.variant-stock-row small {
  color: var(--text-muted);
  font-size: 12px;
}

.activity-form.is-locked {
  opacity: 0.72;
}

.activity-form.is-locked input,
.activity-form.is-locked textarea,
.activity-form.is-locked select {
  cursor: not-allowed;
}

@media (max-width: 720px) {
  .rule-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .rule-row__actions {
    align-self: flex-end;
  }
}

.coupon-admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}

.coupon-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.coupon-stat {
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: #fafbfc;
}

.coupon-stat span {
  display: block;
  color: var(--text-muted);
  font-size: 12px;
}

.coupon-stat strong {
  display: block;
  margin-top: 5px;
  color: var(--text-primary);
  font-size: 22px;
}

.coupon-generate-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-top: 16px;
}

.coupon-generate-row .field {
  flex: 1;
}

.inline-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.import-preview {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: #fafbfc;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
}

.import-preview strong {
  color: var(--text-primary);
}

.import-preview p {
  margin: 5px 0 0;
}

.import-preview ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.import-preview.is-success {
  border-color: #b4d6bd;
  background: #f2fbf4;
}

.import-preview.is-error {
  border-color: #e5b8b8;
  background: #fff6f6;
}

.coupon-batch-list {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.coupon-batch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
}

.coupon-batch-row p {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 12px;
}

.mono-text {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
}

.table-empty {
  padding: 24px;
  color: var(--text-muted);
  text-align: center;
}

@media (max-width: 980px) {
  .coupon-admin-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .coupon-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .coupon-generate-row,
  .inline-actions,
  .coupon-batch-row {
    align-items: stretch;
    flex-direction: column;
  }
}
