:root {
  --red: #c41e3a;
  --red-dark: #9a1729;
  --red-soft: #fff5f7;
  --red-hover: #d63851;
  --ink: #1a1a1a;
  --muted: #6b7280;
  --line: #e5e7eb;
  --paper: #ffffff;
  --canvas: #f9fafb;
  --gold: #f59e0b;
  --green: #10b981;
  --amber: #f59e0b;
  --blue: #3b82f6;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --radius: 12px;
  --radius-lg: 16px;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--canvas); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; transition: var(--transition); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.eyebrow { margin: 0 0 8px; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.eyebrow.red { color: var(--red); }

.login-layout { min-height: 100vh; display: grid; grid-template-columns: minmax(360px, .9fr) 1.35fr; }
.brand-panel { position: relative; overflow: hidden; padding: 48px; color: white; background: linear-gradient(145deg, #7c1015 0%, #a2181f 55%, #691014 100%); display: flex; flex-direction: column; }
.brand-panel::before, .brand-panel::after { content: ""; position: absolute; border-radius: 50%; border: 1px solid rgba(255,255,255,.12); }
.brand-panel::before { width: 560px; height: 560px; right: -300px; top: -150px; }
.brand-panel::after { width: 380px; height: 380px; left: -230px; bottom: -170px; }
.brand-mark, .mini-mark { display: grid; place-items: center; width: 88px; height: 62px; border-radius: 50% 50% 10px 10px; color: var(--red); background: white; font-family: serif; font-weight: 900; box-shadow: 0 8px 24px rgba(0,0,0,.15); }
.brand-copy { margin: auto 0; max-width: 470px; position: relative; z-index: 1; }
.brand-copy h1 { margin: 14px 0 24px; font-size: clamp(44px, 5.4vw, 78px); line-height: 1.04; letter-spacing: -.05em; }
.brand-copy p { font-size: 17px; opacity: .72; }
.brand-foot { font-size: 12px; letter-spacing: .16em; opacity: .54; }
.login-panel { display: grid; place-items: center; padding: 40px; background: #fbfaf8; }
.login-card { width: min(430px, 100%); padding: 42px; background: white; border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); }
.login-card h2 { margin: 0; font-size: 34px; letter-spacing: -.04em; }
.login-card > .muted { margin: 8px 0 30px; }
.mobile-logo { display: none; }
.field { display: grid; gap: 8px; margin: 18px 0; }
.field > span { font-size: 13px; font-weight: 700; }
.field input, .field select, .field textarea, .search-input { width: 100%; border: 1px solid var(--line); border-radius: 11px; padding: 12px 14px; color: var(--ink); background: #fff; outline: none; transition: .18s border, .18s box-shadow; }
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .search-input:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(158, 23, 29, .09); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.form-grid .full { grid-column: 1 / -1; }
.form-error { margin: 12px 0; padding: 11px 13px; border-radius: 9px; color: #88151b; background: var(--red-soft); font-size: 13px; }
.security-note { margin: 22px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; text-align: center; }
.security-note span { color: var(--green); }

.button { border: 0; border-radius: var(--radius); padding: 10px 18px; font-size: 14px; font-weight: 600; transition: var(--transition); box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.button:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.button:active { transform: translateY(0); }
.button:disabled { cursor: not-allowed; opacity: .6; transform: none; }
.button.primary { color: white; background: var(--red); }
.button.primary:hover { background: var(--red-hover); box-shadow: var(--shadow-lg); }
.button.secondary { color: var(--red); background: var(--red-soft); border: 1px solid var(--red); }
.button.secondary:hover { background: var(--red); color: white; }
.button.ghost { color: var(--ink); background: white; border: 1px solid var(--line); }
.button.ghost:hover { border-color: var(--red); color: var(--red); }
.button.danger { color: #dc2626; background: #fef2f2; border: 1px solid #fecaca; }
.button.danger:hover { background: #dc2626; color: white; border-color: #dc2626; }
.button.small { padding: 6px 12px; font-size: 13px; }
.button.wide { width: 100%; padding: 14px; font-size: 15px; }
.icon-button { border: 0; padding: 8px; border-radius: var(--radius); background: transparent; color: var(--muted); font-size: 20px; }
.icon-button:hover { background: var(--canvas); color: var(--ink); }

.app-layout { min-height: 100vh; display: grid; grid-template-columns: 260px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: linear-gradient(180deg, #1f2937 0%, #111827 100%); color: white; z-index: 20; box-shadow: var(--shadow-xl); }
.sidebar-brand { min-height: 80px; display: flex; align-items: center; gap: 14px; padding: 20px 24px; border-bottom: 1px solid rgba(255,255,255,.1); }
.mini-mark { width: 48px; height: 36px; font-size: 11px; box-shadow: var(--shadow); flex: 0 0 auto; border-radius: 8px; }
.sidebar-brand strong, .sidebar-brand small { display: block; }
.sidebar-brand strong { font-size: 16px; font-weight: 700; }
.sidebar-brand small { margin-top: 4px; color: rgba(255,255,255,.6); font-size: 11px; font-weight: 500; }
.nav { padding: 20px 16px; display: grid; gap: 2px; overflow-y: auto; }
.nav-section { margin: 20px 12px 8px; color: rgba(255,255,255,.5); font-size: 10px; letter-spacing: .1em; font-weight: 700; }
.nav-button { width: 100%; display: flex; align-items: center; gap: 12px; padding: 11px 14px; border: 0; border-radius: 10px; color: rgba(255,255,255,.8); background: transparent; text-align: left; font-size: 14px; font-weight: 500; }
.nav-button:hover { color: white; background: rgba(255,255,255,.08); }
.nav-button.active { color: white; background: var(--red); box-shadow: 0 4px 12px rgba(196, 30, 58, 0.4); }
.nav-icon { width: 22px; text-align: center; font-size: 16px; }
.sidebar-footer { margin-top: auto; padding: 18px; display: flex; align-items: center; gap: 12px; border-top: 1px solid rgba(255,255,255,.1); }
.admin-avatar { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--red); font-weight: 700; box-shadow: var(--shadow); }
.admin-identity { min-width: 0; flex: 1; }
.admin-identity strong, .admin-identity small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-identity strong { font-size: 13px; font-weight: 600; }
.admin-identity small { margin-top: 3px; color: rgba(255,255,255,.5); font-size: 11px; }
.sidebar-footer .icon-button { color: rgba(255,255,255,.6); }

.main { min-width: 0; background: var(--canvas); }
.topbar { height: 80px; display: flex; align-items: center; gap: 20px; padding: 20px 40px; background: white; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.topbar h2 { margin: 0; font-size: 28px; font-weight: 700; letter-spacing: -.02em; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.status-pill { display: flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 20px; color: var(--green); background: #ecfdf5; font-size: 12px; font-weight: 600; }
.status-pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }
.menu-button { display: none; border: 0; background: transparent; font-size: 24px; color: var(--ink); }
.content { padding: 32px 40px 60px; max-width: 1600px; }
.page-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.page-toolbar .search-input { max-width: 320px; }
.page-toolbar .spacer { flex: 1; }

.dashboard-heading, .settings-heading { margin-bottom: 24px; }
.dashboard-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.dashboard-heading h3, .settings-heading h3 { margin: 0; font-size: 20px; }
.dashboard-heading p, .settings-heading p { margin: 8px 0 0; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.dashboard-caption { flex: 0 0 auto; color: var(--muted); font-size: 12px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.stat-card { container-type: inline-size; min-width: 0; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: white; color: var(--ink); text-align: left; box-shadow: 0 2px 6px rgba(17,24,39,.03); }
.stat-card:hover { transform: translateY(-3px); border-color: #d1d5db; box-shadow: 0 8px 24px rgba(17,24,39,.07); }
.stat-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stat-label { color: var(--muted); font-size: 13px; font-weight: 500; }
.stat-icon { flex: 0 0 auto; display: grid; place-items: center; width: 40px; height: 40px; color: var(--red); background: var(--red-soft); border-radius: 12px; }
.stat-icon svg, .dashboard-list-icon svg { width: 22px; height: 22px; }
.stat-card--sample .stat-icon { color: #a66b14; background: #fff8e9; }
.stat-card--gift .stat-icon { color: #5968ae; background: #f0f2ff; }
.stat-card--survey .stat-icon { color: #22836d; background: #edf8f4; }
.stat-number { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin: 18px 0 20px; font-variant-numeric: tabular-nums; }
.stat-number strong { min-width: 0; font-size: clamp(28px, 2.5vw, 38px); font-weight: 700; line-height: 1.2; letter-spacing: -.035em; overflow-wrap: anywhere; }
.stat-number--long strong { font-size: clamp(16px, 15cqi, 34px); }
.stat-number > span { color: var(--muted); font-size: 12px; }
.stat-card-foot { display: flex; justify-content: space-between; gap: 8px; padding-top: 14px; border-top: 1px solid #f0f1f4; color: var(--muted); font-size: 12px; }
.stat-card-foot > span { color: #9ca3af; }
.dashboard-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 28px; }
.dashboard-panel { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: white; }
.dashboard-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 24px; border-bottom: 1px solid #f0f1f4; }
.dashboard-panel h3 { margin: 0; font-size: 16px; }
.dashboard-panel > header > span { color: var(--muted); font-size: 12px; }
.dashboard-list { padding: 0 24px; }
.dashboard-list-item { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 96px; padding: 20px 0; border: 0; border-bottom: 1px solid #f0f1f4; background: white; color: var(--ink); text-align: left; }
.dashboard-list-item:last-child { border-bottom: 0; }
.dashboard-list-item:hover .dashboard-list-copy strong { color: var(--red); }
.dashboard-list-icon { flex: 0 0 auto; display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid #eef0f3; border-radius: 12px; background: #fafbfc; color: #667085; }
.dashboard-list-copy { flex: 1; min-width: 0; }
.dashboard-list-copy strong { display: block; font-size: 14px; font-weight: 600; }
.dashboard-list-copy small { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.dashboard-list-copy b { color: var(--ink); font-variant-numeric: tabular-nums; }
.task-count { flex: 0 1 auto; min-width: 30px; padding: 5px 9px; border-radius: 8px; background: #f3f4f6; color: var(--muted); font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; text-align: center; }
.task-count.has-pending { color: var(--red); background: var(--red-soft); }
.dashboard-arrow { color: #9ca3af; font-size: 22px; }
.stat-card:focus-visible, .dashboard-list-item:focus-visible, .settings-destinations button:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.setting-value { min-width: 160px; max-width: 480px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.7; font-size: 13px; }
.setting-description { max-width: 300px; min-width: 160px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.settings-destinations { margin-top: 28px; }
.settings-destinations h3 { margin: 0 0 14px; font-size: 15px; }
.settings-destinations > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.settings-destinations button { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: white; color: var(--ink); text-align: left; }
.settings-destinations button:hover { border-color: var(--red); }
.settings-destinations strong { display: block; font-size: 14px; font-weight: 600; }
.settings-destinations small { display: block; margin-top: 7px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.settings-destinations button > span:last-child { color: var(--muted); }
.audit-filter { padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: white; }
.audit-filter-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.audit-filter .field { min-width: 0; margin: 0; }
.audit-filter .field input, .audit-filter .field select { min-width: 0; padding: 10px 12px; font-size: 13px; }
.audit-path { grid-column: span 2; }
.audit-filter-foot { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; margin-top: 22px; padding-top: 18px; border-top: 1px solid #f0f1f4; }
.audit-periods, .audit-filter-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.audit-periods > span { color: var(--muted); font-size: 12px; margin-right: 4px; }
.audit-results-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin: 22px 0 12px; color: var(--muted); font-size: 13px; }
.audit-results-head small { font-size: 12px; }
.audit-time { min-width: 165px; white-space: nowrap; }
.audit-route { min-width: 200px; max-width: 400px; overflow-wrap: anywhere; font-size: 12px; line-height: 1.6; font-family: ui-monospace, monospace; }

.table-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: white; box-shadow: var(--shadow); }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 16px 20px; color: var(--muted); background: #f9fafb; border-bottom: 2px solid var(--line); font-size: 11px; letter-spacing: .08em; text-align: left; text-transform: uppercase; white-space: nowrap; font-weight: 600; }
td { padding: 18px 20px; border-bottom: 1px solid #f3f4f6; font-size: 14px; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: var(--transition); }
tbody tr:hover { background: #fafbfc; }
.cell-title { font-weight: 600; color: var(--ink); }
.cell-sub { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.member-invitation-link { border:0; border-radius:8px; background:transparent; color:var(--red); padding:6px 8px; text-align:left; cursor:pointer; white-space:nowrap; }
.member-invitation-link span { display:block; font-size:12px; margin-top:4px; }
.member-invitation-link:hover,.member-invitation-link:focus-visible { background:#fff2f2; text-decoration:underline; }
.thumb { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; background: #f3f4f6; }
.thumb--catalog { object-fit: contain; object-position: center; padding: 2px; }
.row-actions { display: flex; gap: 8px; justify-content: flex-end; white-space: nowrap; }
.badge { display: inline-flex; padding: 4px 10px; border-radius: 12px; font-size: 11px; font-weight: 600; letter-spacing: .02em; }
.badge.green { color: #059669; background: #d1fae5; }
.badge.amber { color: #d97706; background: #fef3c7; }
.badge.gray { color: #6b7280; background: #f3f4f6; }
.badge.red { color: #dc2626; background: #fee2e2; }
.empty { padding: 80px 20px; text-align: center; color: var(--muted); }
.empty strong { display: block; margin-bottom: 8px; color: var(--ink); font-size: 16px; }
.pagination { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 16px 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; background: #fafbfc; }

/* 编辑页面布局 - 替代弹窗 */
.editor-breadcrumb { margin-bottom: 20px; }
.editor-card { width: 100%; max-width: 1200px; margin: 0 auto; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: white; box-shadow: var(--shadow-lg); }
.editor-card > header { padding: 32px 40px 28px; border-bottom: 1px solid var(--line); background: linear-gradient(to bottom, #fafbfc, white); }
.editor-card > header h3 { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.editor-card > header p:last-child { margin: 10px 0 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.editor-card > form { padding: 32px 40px 40px; }
.catalog-form { display: grid; gap: 24px; }
.catalog-form-section { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: white; box-shadow: var(--shadow); }
.catalog-section-head { display: flex; align-items: flex-start; gap: 16px; padding: 20px 24px; border-bottom: 1px solid var(--line); background: #fafbfc; }
.catalog-section-head h4 { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.catalog-section-head p { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.catalog-section-number { flex: 0 0 auto; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; color: white; background: var(--red); font-size: 14px; font-weight: 700; box-shadow: 0 2px 8px rgba(196, 30, 58, 0.3); }
.catalog-section-body { padding: 24px; }
.catalog-section-body > .field { margin: 0; }
.catalog-section-body > .field + .field { margin-top: 20px; }
.catalog-form .field > span { font-size: 13px; font-weight: 600; letter-spacing: .01em; }
.catalog-form .field > span em { color: var(--red); font-style: normal; }
.catalog-form .field input, .catalog-form .field select, .catalog-form .field textarea { border-color: var(--line); background: white; }
.catalog-form .field input, .catalog-form .field select { min-height: 48px; }
.catalog-form .field textarea { min-height: 140px; line-height: 1.65; }
.catalog-settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 24px; }
.catalog-settings-grid .field { margin: 0; align-content: start; }
.editor-actions { display: flex; justify-content: flex-end; gap: 12px; padding-top: 8px; }
.catalog-form .modal-actions { margin-top: 8px; padding-top: 24px; border-top: 1px solid var(--line); }
.image-uploader { display: grid; grid-template-columns: 280px 1fr; gap: 28px; align-items: center; padding: 24px; border: 2px dashed var(--line); border-radius: var(--radius-lg); background: #fafbfc; }
.image-preview { width: 280px; height: 210px; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); color: var(--muted); background-color: #f9fafb; background-image: linear-gradient(45deg, rgba(255,255,255,.8) 25%, transparent 25%), linear-gradient(-45deg, rgba(255,255,255,.8) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, rgba(255,255,255,.8) 75%), linear-gradient(-45deg, transparent 75%, rgba(255,255,255,.8) 75%); background-size: 20px 20px; background-position: 0 0, 0 10px, 10px -10px, -10px 0; font-size: 12px; text-align: center; box-shadow: var(--shadow); }
.image-preview img { display: none; width: 100%; height: 100%; min-width: 0; min-height: 0; max-width: 100%; max-height: 100%; padding: 12px; object-fit: contain; object-position: center; background: rgba(255,255,255,.9); }
.image-preview > span { display: grid; gap: 6px; padding: 20px; }
.image-preview > span strong { color: var(--ink); font-size: 14px; }
.image-preview > span small { line-height: 1.5; }
.image-preview.has-image img { display: block; }
.image-preview.has-image span { display: none; }
.image-upload-copy { min-width: 0; display: grid; justify-items: start; gap: 10px; }
.image-upload-label { color: var(--red); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.image-upload-copy strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; }
.image-upload-copy small, .upload-status { color: var(--muted); font-size: 12px; line-height: 1.6; }
.image-file-button { display: inline-block; margin-top: 8px; }
.upload-status { display: block; margin-top: 12px; min-height: 18px; overflow-wrap: anywhere; }

/* 删除弹窗样式，所有内容改为页面形式 */
.detail-page { width: 100%; max-width: 900px; margin: 0 auto; }
.detail-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: white; box-shadow: var(--shadow-lg); margin-bottom: 24px; }
.detail-card > header { padding: 28px 32px; border-bottom: 1px solid var(--line); background: #fafbfc; }
.detail-card > header h3 { margin: 0; font-size: 22px; font-weight: 700; }
.detail-card > header p { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.detail-card > .detail-body { padding: 32px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 28px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.detail-item { padding: 16px; border-radius: var(--radius); background: #fafbfc; border: 1px solid var(--line); }
.detail-item small { display: block; margin-bottom: 6px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.detail-item strong { font-size: 14px; font-weight: 600; }
.code-block { padding: 14px; border-radius: var(--radius); overflow-wrap: anywhere; color: var(--ink); background: #f9fafb; font-family: ui-monospace, 'SF Mono', Monaco, monospace; font-size: 13px; border: 1px solid var(--line); }
.toast-region { position: fixed; right: 24px; bottom: 24px; z-index: 200; display: grid; gap: 12px; }
.toast { min-width: 280px; max-width: 420px; padding: 16px 20px; border-radius: var(--radius); color: white; background: #1f2937; box-shadow: var(--shadow-xl); font-size: 14px; animation: toast-in .3s cubic-bezier(0.4, 0, 0.2, 1); }
.toast.error { background: var(--red); }
.loading { min-height: 300px; display: grid; place-items: center; color: var(--muted); }
.spinner { width: 32px; height: 32px; border: 3px solid var(--line); border-top-color: var(--red); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } }

/* 表单字段 */
.field { display: grid; gap: 8px; margin: 20px 0; }
.field > span { font-size: 13px; font-weight: 600; color: var(--ink); }
.field input, .field select, .field textarea, .search-input { width: 100%; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; color: var(--ink); background: white; outline: none; transition: var(--transition); font-size: 14px; }
.field textarea { min-height: 100px; resize: vertical; line-height: 1.6; }
.field input:focus, .field select:focus, .field textarea:focus, .search-input:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(196, 30, 58, 0.1); }
.field input:hover, .field select:hover, .field textarea:hover, .search-input:hover { border-color: #d1d5db; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.form-grid .full { grid-column: 1 / -1; }
.form-error { margin: 14px 0; padding: 12px 16px; border-radius: var(--radius); color: #991b1b; background: #fee2e2; font-size: 13px; border: 1px solid #fecaca; }
.field-hint { margin-top: 6px; font-size: 12px; font-weight: 400; color: var(--muted); line-height: 1.5; }
.field.checkbox { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.field.checkbox input { flex: 0 0 auto; width: 18px; height: 18px; margin: 0; accent-color: var(--red); cursor: pointer; }
.field.checkbox span { font-size: 14px; font-weight: 500; color: var(--ink); }
.modal-actions .spacer { flex: 1; }

/* 提问内容与说明卡片 */
.cell-wrap { max-width: 400px; white-space: normal; line-height: 1.6; }
.quote-block { margin: 0 0 20px; padding: 16px 20px; border-left: 4px solid var(--gold); border-radius: 0 var(--radius) var(--radius) 0; background: #fffbeb; line-height: 1.7; white-space: pre-wrap; }
.notice-card { margin-bottom: 20px; padding: 18px 20px; border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: var(--radius); background: #fffbeb; font-size: 14px; line-height: 1.7; color: var(--muted); }
.notice-card strong { display: block; margin-bottom: 6px; font-size: 15px; color: var(--ink); font-weight: 600; }
.inline-input { width: 140px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius); font: inherit; color: var(--ink); background: white; transition: var(--transition); }
.inline-input:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(196, 30, 58, 0.1); }
.page-toolbar select.search-input { max-width: 180px; cursor: pointer; }

/* 问卷编辑器：题目卡片列表 */
.section-head { display: flex; align-items: center; gap: 12px; margin: 28px 0 16px; padding-top: 24px; border-top: 1px solid var(--line); }
.section-head h4 { margin: 0; font-size: 16px; font-weight: 600; }
.section-head .spacer { flex: 1; }
.question-list { display: grid; gap: 16px; }
.question-card { padding: 20px 22px 18px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: white; box-shadow: var(--shadow); }
.question-card .field { margin: 0 0 14px; }
.question-card .field:last-child { margin-bottom: 0; }
.question-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.question-card-head .spacer { flex: 1; }
.question-index { font-size: 13px; font-weight: 600; letter-spacing: .04em; color: var(--muted); }
.question-card-head select.inline-input { width: 120px; }
.question-card-foot { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 20px; margin-top: 6px; }
.question-card-foot .field { margin-bottom: 0; }
.question-card textarea { min-height: 90px; }
.question-card .field[hidden] { display: none; }

/* 问卷结果：选项占比条 */
.stat-block { margin-bottom: 28px; }
.stat-block h4 { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; font-size: 15px; font-weight: 600; line-height: 1.6; }
.stat-block > .muted { margin: 0 0 14px; font-size: 13px; }
.stat-row { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; font-size: 14px; }
.stat-label { flex: 0 0 180px; overflow-wrap: anywhere; font-weight: 500; }
.stat-bar { flex: 1; height: 10px; border-radius: 20px; background: var(--canvas); overflow: hidden; border: 1px solid var(--line); }
.stat-bar span { display: block; height: 100%; border-radius: 20px; background: linear-gradient(90deg, var(--gold), #fbbf24); transition: width .5s ease; }
.stat-value { flex: 0 0 110px; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 500; }
.answer-line { margin-bottom: 10px; }
.answer-line:last-child { margin-bottom: 0; }
.answer-line small { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.answer-line strong { font-size: 14px; font-weight: 500; }

@media (max-width: 1120px) {
  .audit-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-panels { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .login-layout { display: block; }
  .brand-panel { display: none; }
  .login-panel { min-height: 100vh; padding: 22px; }
  .login-card { padding: 30px 24px; }
  .mobile-logo { display: block; margin-bottom: 38px; font-weight: 800; }
  .mobile-logo span { margin-right: 7px; padding: 6px 8px; border-radius: 7px; color: white; background: var(--red); }
  .app-layout { display: block; }
  .sidebar { position: fixed; left: -270px; width: 252px; transition: .22s left; box-shadow: 20px 0 50px rgba(0,0,0,.2); }
  .app-layout.menu-open .sidebar { left: 0; }
  .menu-button { display: block; }
  .topbar { height: 86px; padding: 15px 20px; }
  .topbar h2 { font-size: 21px; }
  .topbar-actions .button { display: none; }
  .status-pill { display: none; }
  .content { padding: 22px 18px 42px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-caption { display: none; }
  .settings-table .table-card { border: 0; background: transparent; box-shadow: none; overflow: visible; }
  .settings-table .table-scroll { overflow: visible; }
  .settings-table table, .settings-table tbody { display: block; }
  .settings-table thead { display: none; }
  .settings-table tr { display: block; margin-bottom: 16px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: white; }
  .settings-table td { display: block; padding: 0; border: 0; }
  .settings-table td + td { margin-top: 16px; }
  .settings-table td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 6px; color: var(--muted); font-size: 11px; }
  .settings-table .setting-value, .settings-table .setting-description { min-width: 0; max-width: none; }
  .settings-name { overflow-wrap: anywhere; }
  .page-toolbar { flex-wrap: wrap; }
  .page-toolbar .search-input { max-width: none; flex: 1 1 100%; order: 3; }
}
@media (max-width: 520px) {
  .audit-filter { padding: 18px; }
  .audit-filter-grid { grid-template-columns: minmax(0, 1fr); }
  .audit-path { grid-column: auto; }
  .audit-filter-actions { width: 100%; justify-content: flex-end; }
  .form-grid, .detail-grid, .catalog-settings-grid, .settings-destinations > div { grid-template-columns: 1fr; }
  .stat-row { flex-wrap: wrap; }
  .stat-label { flex: 1 1 100%; }
  .cell-wrap { max-width: 200px; }
  .page-toolbar select.search-input { max-width: none; flex: 1 1 100%; }
  .stat-card { padding: 16px; }
  .stat-card-top { align-items: flex-start; }
  .stat-icon { width: 30px; height: 30px; border-radius: 9px; }
  .stat-icon svg { width: 19px; height: 19px; }
  .stat-number { margin: 16px 0; }
  .dashboard-panel > header { padding: 18px; }
  .dashboard-list { padding: 0 18px; }
  .dashboard-list-item { gap: 10px; }
  .modal { padding: 10px; }
  .modal-card { max-height: calc(100vh - 20px); }
  .editor-card > header, .editor-card > form { padding-left: 18px; padding-right: 18px; }
  .catalog-section-head, .catalog-section-body { padding-left: 15px; padding-right: 15px; }
  .image-uploader { grid-template-columns: 1fr; }
  .image-preview { width: 100%; height: 180px; }
  .modal-card.wide .modal-body { padding: 20px 18px 24px; }
  .modal-card.wide .image-uploader { grid-template-columns: 1fr; padding: 15px; }
  .modal-card.wide .image-preview { width: 100%; height: 180px; }
}
.home-assets-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; padding: 24px; }
.home-asset { min-width: 0; padding: 18px; border: 1px solid #e9e0d6; border-radius: 10px; }
.home-asset h4 { margin: 0 0 14px; }
.home-asset-art { position: relative; container-type: inline-size; overflow: hidden; border-radius: 8px; margin-bottom: 16px; background: #eee5da; }
.home-asset-preview { display: block; width: 100%; height: 100%; object-fit: cover; }
.home-asset-preview[hidden] { display: none; }
.home-asset[data-key="member_cover"] .home-asset-art { background: #c1b8b3; }
.home-asset[data-key="member_cover"] .home-asset-preview { object-fit: contain; }
.home-asset[data-key="member_cover"] .home-asset-preview, .home-asset[data-key="sample_cover"] .home-asset-preview { filter: saturate(.65) brightness(.94) contrast(.94); }
.home-asset-copy { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 10px; text-align: center; color: #fff; }
.home-asset-copy[hidden], .home-legacy-hint[hidden] { display: none; }
.home-asset-copy strong { font-size: 18px; line-height: 1.4; word-break: break-all; text-shadow: 0 2px 3px #000d, 0 0 7px #0008; }
.home-asset-art--banner .home-asset-copy { left: 53%; right: 7%; top: 14%; bottom: 14%; padding: 0; flex-direction: column; color: #ffe7a8; }
@font-face { font-family: "LkkBannerYanSong"; src: url("https://res.lkkchefs.com/fonts/banner/founder-yansong-sc-large-c4d6b8968d9bc247.ttf") format("truetype"); font-style: normal; font-weight: 400; font-display: swap; }
.home-asset-art--banner strong { white-space: pre-wrap; font-family: "LkkBannerYanSong", "KaiTi", "STKaiti", "Kaiti SC", serif; font-size: 12.48cqw; font-weight: 400; line-height: 1.08; letter-spacing: .5943cqw; text-shadow: .2971cqw .5943cqw .5943cqw #59120ecc, 0 0 1.4857cqw #59120e66; }
.home-asset-art--banner small { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; margin-top: 6px; font-size: 3.1cqw; line-height: 1.45; word-break: break-all; }
.home-editor-fields { border: 0; padding: 0; margin: 0; min-width: 0; }
.home-image-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.home-asset input[readonly] { color: var(--muted); font-size: 12px; background: #faf6ef; }
.home-publish-controls { border-top: 1px solid var(--line); }
.home-save-status { min-height: 24px; color: #226e42; }
.home-asset .button { margin-top: 12px; }
.home-carousel-editor { border-top: 1px solid var(--line); }
.home-carousel-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 24px 24px 0; }
.home-carousel-heading h3 { margin: 0 0 8px; }
.home-carousel-heading p { margin: 0; }
.home-banner-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.home-banner-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: -6px 0 16px; }
.home-banner-actions .button { margin: 0; padding: 7px 10px; font-size: 12px; }
.home-banner-actions .danger { color: #b52521; }
.home-carousel-empty { padding: 0 24px 24px; color: var(--muted); }
.invitation-editor-fields { border: 0; margin: 0; padding: 0; min-width: 0; }
.invitation-tier-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 24px 0 14px; }
.invitation-tier-heading h4 { margin: 0; }
.invitation-tier-heading span { color: var(--muted); font-size: 13px; }
.invitation-tier-table { margin-bottom: 16px; }
.invitation-tier-table .inline-input { width: 140px; }
.invitation-save-status { min-height: 24px; color: #226e42; }
.invitation-poster-preview { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 24px; margin-top: 24px; padding: 24px; }
.invitation-poster-preview img { width: 180px; height: auto; border-radius: 8px; }
.mq-fields { border: 0; padding: 0; margin: 24px 0 0; min-width: 0; }
.mq-images { display: flex; flex-wrap: wrap; gap: 12px; margin: 12px 0 20px; }
.mq-image { width: 104px; }
.mq-image img { display: block; width: 104px; height: 104px; object-fit: cover; border-radius: 8px; background: #f4eadf; }
.mq-image button { margin-top: 6px; }
.mq-publish-hint { font-size: 13px; line-height: 1.7; color: var(--muted); }
.mq-save-status { min-height: 24px; color: #226e42; }
.role-permissions-head { display:flex; align-items:center; justify-content:space-between; gap:16px; margin:28px 0 18px; }
.role-permissions-head h4 { margin:0 0 8px; font-size:17px; }
.role-permissions-head p { margin:0; font-size:13px; color:var(--muted); line-height:1.7; }
.role-selected { flex-shrink:0; border-radius:20px; padding:8px 14px; background:#f8efe8; color:var(--red); font-size:13px; }
.role-permissions-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,230px),1fr)); gap:16px; margin-bottom:20px; }
.role-module { min-width:0; margin:0; padding:14px 16px 18px; border:1px solid #e9e2da; border-radius:12px; }
.role-module legend { padding:0 6px; color:#40362e; font-size:14px; font-weight:600; }
.role-permission { display:flex; align-items:flex-start; gap:10px; padding:8px 0; font-size:13px; line-height:1.5; cursor:pointer; }
.role-permission input { flex:0 0 16px; width:16px; height:16px; margin:2px 0 0; accent-color:var(--red); }
@media(max-width:600px) { .role-permissions-head { align-items:flex-start; flex-direction:column; } }
/* Scheduled encrypted backups; no database import actions. */
.backup-status { display:flex; align-items:center; justify-content:space-between; gap:24px; padding:24px; margin-bottom:20px; border:1px solid #e7d8bd; border-radius:16px; background:#fff9ed; }
.backup-status.is-protected { background:#f0f8f4; border-color:#c8e2d4; }
.backup-status .eyebrow { margin:0 0 8px; color:#766954; }
.backup-status h3 { margin:0 0 8px; }
.backup-status p { margin:0; color:#746b61; font-size:13px; }
.backup-status>strong { font-size:20px; white-space:nowrap; }
.backup-metrics { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; margin-bottom:20px; }
.backup-metrics article { padding:22px; border:1px solid #e9e2da; border-radius:14px; background:#fff; display:flex; flex-direction:column; gap:10px; }
.backup-metrics small { color:#7c7368; }
.backup-metrics strong { font-size:26px; }
.backup-metrics .backup-metric-date { font-size:17px; line-height:1.6; }
.backup-metrics span { font-size:12px; color:#81786d; line-height:1.7; }
.backup-actions h3 { margin:0; }
.backup-policy { margin-top:24px; }
.backup-policy .form-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.backup-policy-save { grid-column:1/-1; display:flex; justify-content:flex-end; }
@media(max-width:760px) {
  .backup-status { align-items:flex-start; flex-direction:column; padding:20px; gap:14px; }
  .backup-metrics { grid-template-columns:1fr; gap:10px; }
  .backup-metrics article { padding:18px; }
  .backup-actions { flex-wrap:wrap; }
  .backup-actions h3 { width:100%; }
  .backup-policy .form-grid { grid-template-columns:1fr; }
}
