:root {
  --ink: #25302c;
  --muted: #7f8983;
  --line: #e7e2d9;
  --canvas: #f6f3ed;
  --paper: #fffefa;
  --jade: #3f7662;
  --jade-deep: #285746;
  --jade-soft: #e7f0e9;
  --coral: #d9795d;
  --gold: #d7a957;
  --shadow: 0 18px 45px rgba(49, 57, 48, 0.08);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
  font-size: 16px;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--canvas); }
button, input { font: inherit; }
button { border: 0; cursor: pointer; }
button:focus-visible, input:focus-visible { outline: 3px solid rgba(63,118,98,.3); outline-offset: 2px; }

.app-shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.side-nav { display: flex; flex-direction: column; padding: 28px 18px 20px; background: #f0eee8; border-right: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 10px 35px; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; color: #fff; background: var(--jade); border-radius: 12px; font-size: 20px; box-shadow: 0 8px 20px rgba(63,118,98,.2); }
.brand strong { display: block; font-size: 16px; letter-spacing: .04em; }
.brand small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.nav-label { padding: 0 12px 8px; color: #9a9c94; font-size: 12px; letter-spacing: .12em; }
.nav-list { display: grid; gap: 5px; }
.nav-item { display: flex; align-items: center; gap: 11px; width: 100%; padding: 13px 12px; color: #68746d; background: transparent; border-radius: 10px; text-align: left; font-size: 16px; }
.nav-item:hover { background: rgba(255,255,255,.7); color: var(--ink); }
.nav-item.active { color: var(--jade-deep); background: #fffefa; box-shadow: 0 5px 18px rgba(39,58,46,.06); font-weight: 700; }
.nav-symbol { width: 20px; text-align: center; font-size: 16px; }
.side-footer { margin-top: auto; padding: 13px 12px; color: #89928a; border-top: 1px solid var(--line); font-size: 12px; line-height: 1.6; }
.side-footer b { color: var(--jade); font-weight: 700; }

.content { min-width: 0; padding: 0 40px 46px; }
.topbar { display: flex; align-items: center; justify-content: space-between; height: 84px; }
.breadcrumbs { color: var(--muted); font-size: 14px; }
.breadcrumbs b { color: var(--ink); font-weight: 700; }
.top-actions { display: flex; align-items: center; gap: 18px; }
.membership-quick-link { min-height: 34px; padding: 0 11px; color: var(--jade-deep); background: var(--jade-soft); border: 1px solid #c4dbcb; border-radius: 7px; font-size: 12px; font-weight: 700; }
.membership-quick-link:hover { background: #dcece0; }
.status { display: inline-flex; align-items: center; gap: 7px; color: #5f7467; font-size: 13px; }
.status-dot { width: 7px; height: 7px; background: #55a275; border-radius: 50%; box-shadow: 0 0 0 4px rgba(85,162,117,.12); }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; color: #fff; background: #b99372; border-radius: 50%; font-size: 13px; font-weight: 700; }

.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 25px; margin: 6px 0 24px; }
.page-heading h1 { margin: 0; font-family: Georgia, "Songti SC", serif; font-size: clamp(28px, 3vw, 39px); font-weight: 500; letter-spacing: -.03em; }
.page-heading p { margin: 8px 0 0; color: var(--muted); font-size: 16px; }
.heading-note { display: inline-flex; align-items: center; gap: 8px; padding: 11px 14px; color: #6a746b; background: #ece8df; border-radius: 8px; font-size: 14px; white-space: nowrap; }
.heading-note strong { color: var(--jade); }

.hero-strip { position: relative; overflow: hidden; display: flex; align-items: center; min-height: 130px; margin-bottom: 18px; padding: 26px 30px; color: #fff; background: #3d5d50; border-radius: 16px; box-shadow: var(--shadow); }
.hero-strip::after { content: ""; position: absolute; inset: 0; background: rgba(36,71,56,.72) url("https://images.unsplash.com/photo-1500530855697-b586d89ba3ee?auto=format&fit=crop&w=1200&q=85") center/cover; background-blend-mode: multiply; opacity: .86; }
.hero-copy { position: relative; z-index: 1; max-width: 580px; }
.eyebrow { margin: 0 0 6px; color: #c4dfce; font-size: 12px; letter-spacing: .13em; }
.hero-copy h2 { margin: 0; font-family: Georgia, "Songti SC", serif; font-size: 25px; font-weight: 500; }
.hero-copy p { margin: 8px 0 0; color: rgba(255,255,255,.78); font-size: 15px; }
.hero-stats { position: relative; z-index: 1; display: flex; gap: 28px; margin-left: auto; padding-right: 8px; }
.hero-stat strong { display: block; font-size: 24px; font-weight: 500; }
.hero-stat span { color: rgba(255,255,255,.68); font-size: 13px; }

.workbench { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(360px, .8fr); gap: 18px; }
.panel { background: var(--paper); border: 1px solid rgba(224,219,208,.82); border-radius: 14px; box-shadow: 0 8px 24px rgba(56,59,50,.035); }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 22px 23px 16px; }
.panel-title { margin: 0; font-size: 20px; font-weight: 750; }
.panel-caption { margin: 5px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.step-label { display: inline-flex; align-items: center; gap: 7px; color: var(--jade); font-size: 14px; font-weight: 700; }
.step-no { display: grid; place-items: center; width: 20px; height: 20px; color: #fff; background: var(--jade); border-radius: 50%; font-size: 11px; }
.category-row { display: flex; gap: 8px; padding: 0 23px 17px; overflow-x: auto; scrollbar-width: none; }
.category-row::-webkit-scrollbar { display: none; }
.category-chip { flex: 0 0 auto; padding: 10px 14px; color: #788077; background: #f5f2ec; border: 1px solid #eee9e0; border-radius: 7px; font-size: 15px; }
.category-chip.active { color: var(--jade-deep); background: var(--jade-soft); border-color: #c4dbcb; font-weight: 700; }
.template-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 0 23px 24px; }
.template-card { position: relative; overflow: hidden; min-width: 0; padding: 0; background: #f4f0e9; border: 2px solid transparent; border-radius: 11px; text-align: left; }
.template-card:hover { transform: translateY(-2px); box-shadow: 0 9px 20px rgba(42,50,43,.12); }
.template-card.selected { border-color: var(--jade); box-shadow: 0 0 0 3px rgba(63,118,98,.12); }
.template-card img { display: block; width: 100%; aspect-ratio: 1 / 1.12; object-fit: cover; }
.template-card-mood { position: absolute; left: 8px; bottom: 49px; padding: 5px 8px; color: #fff; background: rgba(35,49,41,.76); border-radius: 6px; font-size: 12px; font-weight: 700; }
.template-card-copy { padding: 9px 10px 11px; }
.template-card-title { display: block; color: var(--ink); font-size: 16px; font-weight: 700; }
.template-card-meta { display: block; margin-top: 4px; color: #94958d; font-size: 13px; }
.selected-mark { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 23px; height: 23px; color: #fff; background: var(--jade); border-radius: 50%; font-size: 13px; }

.upload-panel { display: flex; flex-direction: column; min-height: 100%; }
.upload-stage { display: flex; flex: 1; flex-direction: column; justify-content: center; margin: 0 23px; padding: 21px; background: #fbfaf7; border: 1px dashed #cdc9bd; border-radius: 12px; text-align: center; }
.upload-stage.has-photo { padding: 12px; border-style: solid; border-color: #cfe0d3; background: #f2f8f3; }
.upload-preview { width: 100%; max-height: 255px; border-radius: 9px; object-fit: cover; }
.upload-icon { display: grid; place-items: center; width: 50px; height: 50px; margin: 0 auto 15px; color: var(--jade); background: var(--jade-soft); border-radius: 14px; font-size: 22px; }
.upload-title { margin: 0; font-size: 19px; font-weight: 700; }
.upload-hint { margin: 7px auto 15px; max-width: 260px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.secondary-btn, .primary-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 18px; border-radius: 8px; font-size: 16px; font-weight: 700; transition: .18s ease; }
.secondary-btn { color: var(--jade-deep); background: #eaf3ec; }
.secondary-btn:hover { background: #dcece0; }
.primary-btn { color: #fff; background: var(--jade); box-shadow: 0 8px 18px rgba(63,118,98,.18); }
.primary-btn:hover { background: var(--jade-deep); transform: translateY(-1px); }
.primary-btn:disabled { cursor: wait; opacity: .72; transform: none; }
.demo-link { margin-top: 13px; color: #737c74; background: none; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.upload-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 17px 23px 22px; }
.privacy-note { color: #788078; font-size: 13px; line-height: 1.5; }
.privacy-note b { color: var(--jade); }
.ai-generated-footer { margin: 18px 0 8px; color: #66736b; font-size: 12px; line-height: 1.5; text-align: center; }
.generation-error { margin: 12px 23px 0; padding: 11px 12px; color: #9c3f32; background: #fff0eb; border-radius: 8px; font-size: 14px; line-height: 1.5; }
.generate-btn { min-width: 148px; }
.progress-wrap { margin-top: 17px; text-align: left; }
.progress-hint { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.progress-label { display: flex; justify-content: space-between; color: #728177; font-size: 11px; }
.progress-track { height: 5px; margin-top: 8px; overflow: hidden; background: #e5eee7; border-radius: 10px; }
.progress-bar { width: 74%; height: 100%; background: var(--jade); border-radius: inherit; animation: load 1.6s ease-in-out infinite alternate; }
@keyframes load { from { width: 26%; } to { width: 88%; } }

.recent-section { margin-top: 28px; }
.section-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; }
.section-row h2 { margin: 0; font-size: 20px; }
.section-row button { color: var(--jade); background: none; font-size: 14px; font-weight: 700; }
.recent-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.recent-card { overflow: hidden; background: var(--paper); border: 1px solid var(--line); border-radius: 11px; }
.artwork-open { display: block; width: 100%; padding: 0; color: inherit; background: transparent; text-align: left; }
.artwork-open:hover img { transform: scale(1.025); }
.artwork-open img { transition: transform .2s ease; }
.recent-card img { display: block; width: 100%; aspect-ratio: 1.1 / 1; object-fit: cover; }
.recent-card-body { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 11px 11px; }
.recent-card-body strong { display: block; font-size: 14px; }
.recent-card-body span { display: block; margin-top: 3px; color: #969990; font-size: 12px; }
.more-btn { width: 24px; height: 24px; color: #7e8980; background: #f3f1eb; border-radius: 50%; }

.library-view, .providers-view { animation: fade-in .22s ease; }
@keyframes fade-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.library-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
.library-card { overflow: hidden; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; }
.library-card img { display: block; width: 100%; aspect-ratio: 1 / 1.12; object-fit: cover; }
.library-info { padding: 12px; }
.library-info strong { font-size: 15px; }
.library-info p { margin: 5px 0 0; color: #969990; font-size: 13px; }
.empty-state { padding: 58px 20px; color: var(--muted); background: var(--paper); border: 1px dashed #d9d4c9; border-radius: 14px; text-align: center; }
.empty-state strong { display: block; margin-bottom: 6px; color: var(--ink); }

.provider-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 15px; }
.provider-card { padding: 19px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; }
.provider-card.is-default { border-color: #b8d0be; box-shadow: 0 0 0 3px rgba(63,118,98,.08); }
.provider-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.provider-name { display: flex; align-items: center; gap: 10px; }
.provider-logo { display: grid; place-items: center; width: 35px; height: 35px; color: #fff; background: #556c92; border-radius: 9px; font-size: 14px; font-weight: 800; }
.provider-card:nth-child(2) .provider-logo { background: #b98458; }
.provider-card:nth-child(3) .provider-logo { background: #8a6b9b; }
.provider-card:nth-child(4) .provider-logo { background: #4b8a82; }
.provider-name strong { display: block; font-size: 14px; }
.provider-name span { display: block; margin-top: 3px; color: #959a92; font-size: 11px; }
.switch { position: relative; display: inline-flex; align-items: center; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch-track { width: 36px; height: 20px; padding: 3px; background: #d9d8d0; border-radius: 20px; transition: .2s; }
.switch-track::after { content: ""; display: block; width: 14px; height: 14px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.18); }
.switch input:checked + .switch-track { background: var(--jade); }
.switch input:checked + .switch-track::after { transform: translateX(16px); }
.provider-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 20px 0 15px; }
.meta-box { padding: 10px; background: #f7f5f0; border-radius: 8px; }
.meta-box span { display: block; color: #949a92; font-size: 10px; }
.meta-box strong { display: block; margin-top: 4px; font-size: 13px; }
.provider-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.provider-actions button { color: var(--jade); background: none; font-size: 11px; font-weight: 700; }
.default-badge { padding: 5px 8px; color: var(--jade-deep); background: var(--jade-soft); border-radius: 5px; font-size: 10px; font-weight: 700; }
.provider-editor { margin-top: 19px; padding: 20px; background: #eeece5; border-radius: 13px; }
.provider-editor h3 { margin: 0 0 15px; font-size: 14px; }
.storage-editor { margin-top: 16px; }
.wechat-editor { margin-top: 16px; }
.storage-hint { margin: -6px 0 17px; color: #6d786f; font-size: 13px; line-height: 1.6; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.field { display: grid; gap: 6px; margin-bottom: 13px; }
.field label { color: #788078; font-size: 11px; font-weight: 700; }
.field input, .field select, .field textarea { width: 100%; height: 38px; padding: 0 11px; color: var(--ink); background: #fffefa; border: 1px solid #d9d5cb; border-radius: 7px; font-size: 12px; }
.field textarea { height: auto; min-height: 72px; padding-top: 9px; resize: vertical; line-height: 1.45; }
.platform-checks { display: flex; align-items: center; gap: 18px; min-height: 38px; color: var(--ink); font-size: 13px; }
.platform-checks label { display: inline-flex; align-items: center; gap: 7px; color: var(--ink); font-size: 13px; font-weight: 500; }
.platform-checks input { width: 18px; height: 18px; accent-color: var(--jade); }
.field input::placeholder { color: #abb0a8; }
.editor-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }

.membership-view { display: grid; gap: 16px; animation: fade-in .22s ease; }
.membership-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.membership-stat { padding: 16px 18px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; }
.membership-stat span { display: block; color: var(--muted); font-size: 12px; }
.membership-stat strong { display: block; margin-top: 8px; color: var(--jade-deep); font-size: 26px; font-weight: 700; }
.membership-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 15px; background: #eeece5; border-radius: 10px; }
.membership-search { display: flex; flex: 1; gap: 8px; max-width: 620px; }
.membership-toolbar-actions { display: flex; align-items: center; gap: 8px; }
.membership-toolbar-actions input { width: 190px; min-height: 40px; padding: 0 10px; color: var(--ink); background: #fffefa; border: 1px solid #d9d5cb; border-radius: 7px; font-size: 12px; }
.membership-search input, .membership-search select, .member-edit-grid input, .member-edit-grid select, .member-actions input, .member-actions select, .membership-plan-fields input { width: 100%; min-height: 40px; padding: 0 10px; color: var(--ink); background: #fffefa; border: 1px solid #d9d5cb; border-radius: 7px; font-size: 13px; }
.membership-search input { min-width: 200px; }
.membership-search select { max-width: 150px; }
.membership-toolbar .primary-btn, .membership-toolbar .secondary-btn, .membership-plans-panel .primary-btn { min-height: 40px; padding: 0 14px; font-size: 13px; }
.membership-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .75fr); gap: 16px; align-items: start; }
.membership-panel { min-width: 0; padding: 18px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; }
.referral-admin-panel, .referral-commissions-panel { margin-top: 16px; }
.referral-settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 260px)); gap: 12px; }
.referral-settings-grid label { display: grid; gap: 6px; color: #788078; font-size: 12px; font-weight: 700; }
.referral-settings-grid input { width: 100%; min-height: 40px; padding: 0 10px; color: var(--ink); background: #fffefa; border: 1px solid #d9d5cb; border-radius: 7px; font-size: 13px; }
.form-hint { margin: 12px 0 0; color: #788078; font-size: 12px; }
.referral-withdrawals-panel, .customer-service-panel { margin-top: 16px; }
.withdrawal-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.withdrawal-filters .secondary-btn { min-height: 34px; padding: 0 12px; font-size: 12px; }
.withdrawal-filters .is-active { color: #285746; background: #e2efe5; border-color: #b9d3c3; }
.referral-withdrawals-panel .member-table .primary-btn { min-height: 32px; padding: 0 10px; font-size: 12px; }
.customer-service-config { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.customer-service-config img, .customer-service-empty { width: 140px; height: 140px; object-fit: contain; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.customer-service-empty { display: grid; place-items: center; color: #788078; font-size: 13px; }
.customer-service-upload { display: grid; gap: 10px; max-width: 360px; color: #59635b; font-size: 13px; }
.customer-service-upload input { max-width: 100%; }
.customer-service-upload .primary-btn { width: fit-content; }
.membership-panel .section-row { margin-bottom: 14px; }
.membership-panel h2 { margin: 0; font-size: 18px; }
.table-count { color: #8a928a; font-size: 12px; }
.member-table-wrap { overflow-x: auto; }
.member-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.member-table th { padding: 0 10px 10px; color: #90968f; border-bottom: 1px solid var(--line); font-size: 11px; font-weight: 700; text-align: left; white-space: nowrap; }
.member-table td { padding: 12px 10px; border-bottom: 1px solid #eeeae2; vertical-align: middle; white-space: nowrap; }
.member-table tbody tr[data-membership-select] { cursor: pointer; transition: background .16s ease; }
.member-table tbody tr[data-membership-select]:hover, .member-table tbody tr.is-selected { background: #f1f7f2; }
.member-table tbody tr:last-child td { border-bottom: 0; }
.table-subtext { display: block; margin-top: 4px; color: #9a9f98; font-size: 11px; }
.tier-badge, .order-status { display: inline-flex; align-items: center; padding: 5px 8px; color: var(--jade-deep); background: var(--jade-soft); border-radius: 5px; font-size: 11px; font-weight: 700; }
.tier-badge.is-free { color: #737c74; background: #f0eee8; }
.order-status { color: #9a6b2d; background: #fff4dd; }
.order-status.is-paid { color: #397858; background: #e8f4eb; }
.table-empty { padding: 34px 10px; color: var(--muted); text-align: center; }
.membership-pagination { display: flex; align-items: center; justify-content: center; gap: 14px; padding-top: 14px; color: var(--muted); font-size: 12px; }
.membership-pagination .secondary-btn { min-height: 34px; padding: 0 12px; font-size: 12px; }
.membership-pagination .secondary-btn:disabled { cursor: default; opacity: .45; }
.member-profile { display: flex; align-items: center; gap: 11px; padding: 0 0 16px; border-bottom: 1px solid var(--line); }
.member-avatar { display: grid; place-items: center; width: 42px; height: 42px; color: #fff; background: var(--jade); border-radius: 50%; font-size: 18px; font-weight: 700; }
.member-profile strong, .member-profile span { display: block; }
.member-profile span { margin-top: 4px; color: var(--muted); font-size: 12px; }
.member-edit-grid, .member-actions { display: grid; gap: 10px; margin-top: 16px; }
.member-edit-grid { grid-template-columns: 1fr 1fr; }
.member-edit-grid label, .member-actions label, .membership-plan-fields label { display: grid; gap: 5px; color: #788078; font-size: 11px; font-weight: 700; }
.member-edit-grid label:last-child { grid-column: 1 / -1; }
.full-btn { width: 100%; min-height: 40px; margin-top: 12px; font-size: 13px; }
.member-actions { grid-template-columns: 1fr 1fr; padding-top: 16px; border-top: 1px solid var(--line); }
.detail-empty { display: grid; place-items: center; min-height: 240px; color: var(--muted); text-align: center; }
.detail-empty strong { display: block; color: var(--ink); }
.detail-empty span { margin-top: 7px; font-size: 13px; }
.membership-plans-panel, .membership-orders-panel { padding-bottom: 20px; }
.membership-plan-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.membership-plan-card { padding: 14px; background: #f8f6f1; border: 1px solid #e8e3d9; border-radius: 9px; }
.plan-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.plan-card-head strong, .plan-card-head span { display: block; }
.plan-card-head > div span { margin-top: 3px; color: #9a9f98; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; }
.plan-price { color: var(--jade-deep); font-size: 16px; font-weight: 700; }
.membership-plan-fields { display: grid; grid-template-columns: 1.3fr .7fr .7fr .8fr; gap: 8px; }
.membership-plan-fields .plan-description { grid-column: 1 / -1; }
.mono-text { color: #737c74; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 22px; background: rgba(35,44,38,.54); }
.confirm-modal { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 22px; width: min(560px, 100%); padding: 18px; background: var(--paper); border-radius: 16px; box-shadow: 0 24px 70px rgba(28,35,30,.28); }
.confirm-modal > img { width: 170px; height: 206px; border-radius: 10px; object-fit: cover; }
.confirm-copy { display: flex; flex-direction: column; justify-content: center; }
.confirm-step { color: var(--jade); font-size: 14px; font-weight: 700; }
.confirm-copy h2 { margin: 10px 0 8px; font-family: Georgia, "Songti SC", serif; font-size: 26px; font-weight: 500; line-height: 1.25; }
.confirm-copy p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.6; }
.confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 24px; }

.preview-modal { display: flex; flex-direction: column; width: min(760px, 100%); max-height: min(92vh, 920px); overflow: hidden; background: #18231e; border: 1px solid rgba(255,255,255,.12); border-radius: 16px; box-shadow: 0 24px 80px rgba(0,0,0,.36); }
.preview-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 18px; color: #fff; }
.preview-header h2 { margin: 0; font-size: 19px; }
.preview-header span { display: block; margin-top: 4px; color: rgba(255,255,255,.64); font-size: 13px; }
.preview-close { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 auto; color: #fff; background: rgba(255,255,255,.12); border-radius: 50%; font-size: 28px; line-height: 1; }
.preview-close:hover { background: rgba(255,255,255,.22); }
.preview-media { display: grid; place-items: center; min-height: 240px; max-height: calc(92vh - 145px); padding: 0 18px; overflow: auto; background: #101713; }
.preview-image { display: block; width: auto; max-width: 100%; height: auto; max-height: calc(92vh - 165px); object-fit: contain; }
.preview-fallback { margin: 30px; color: rgba(255,255,255,.78); font-size: 16px; text-align: center; }
.preview-footer { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 13px 18px 16px; }
.preview-arrow { display: grid; place-items: center; width: 48px; height: 48px; color: #fff; background: rgba(255,255,255,.12); border-radius: 50%; font-size: 27px; line-height: 1; }
.preview-arrow:hover:not(:disabled) { background: rgba(255,255,255,.22); }
.preview-arrow:disabled { cursor: default; opacity: .35; }
.preview-original { min-width: 128px; min-height: 46px; text-decoration: none; }

.toast { position: fixed; right: 24px; bottom: 24px; z-index: 20; max-width: 300px; padding: 12px 15px; color: #fff; background: #283a31; border-radius: 8px; box-shadow: 0 10px 30px rgba(31,39,33,.22); font-size: 12px; opacity: 0; pointer-events: none; transform: translateY(8px); transition: .22s ease; }
.toast.show { opacity: 1; transform: translateY(0); }
.admin-login-page { display: grid; min-height: 100vh; place-items: center; padding: 24px; background: #f4f5f1; }
.admin-login-form { width: min(100%, 380px); display: flex; flex-direction: column; padding: 34px; background: #fff; border: 1px solid #dfe6df; border-radius: 8px; box-shadow: 0 14px 42px rgba(30, 58, 42, .08); }
.admin-login-mark { display: grid; width: 48px; height: 48px; place-items: center; color: #fff; background: #3f7662; border-radius: 8px; font-size: 24px; font-weight: 700; }
.admin-login-form h1 { margin: 22px 0 4px; color: #20312c; font-size: 26px; }
.admin-login-form p { margin: 0 0 24px; color: #728078; font-size: 14px; }
.admin-login-form label { margin: 0 0 7px; color: #344a3d; font-size: 14px; font-weight: 600; }
.admin-login-form input { width: 100%; height: 44px; box-sizing: border-box; margin-bottom: 18px; padding: 0 12px; border: 1px solid #cbd8ce; border-radius: 6px; background: #fff; color: #20312c; font-size: 16px; }
.admin-login-form input:focus { outline: 2px solid #78a98d; outline-offset: 1px; }
.admin-login-form button { min-height: 46px; margin-top: 8px; }
.logout-button { border: 0; background: transparent; color: #53645a; cursor: pointer; font-size: 13px; }
.logout-button:hover { color: #254a36; }

@media (max-width: 1050px) {
  .content { padding: 0 24px 35px; }
  .workbench { grid-template-columns: 1fr; }
  .upload-stage { min-height: 300px; }
  .recent-grid, .library-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .membership-layout { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .app-shell { display: block; }
  .side-nav { position: sticky; top: 0; z-index: 10; display: flex; flex-direction: row; align-items: center; height: 66px; padding: 0 14px; background: rgba(246,243,237,.95); backdrop-filter: blur(12px); border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { padding: 0; }
  .brand-mark { width: 34px; height: 34px; border-radius: 10px; }
  .brand small, .nav-label, .side-footer { display: none; }
  .nav-list { display: flex; margin-left: auto; }
  .nav-item { width: auto; padding: 9px; border-radius: 8px; }
  .nav-item span:last-child { display: none; }
  .content { padding: 0 14px 30px; }
  .topbar { height: 63px; }
  .status { display: none; }
  .page-heading { display: block; margin-top: 12px; }
  .heading-note { margin-top: 15px; }
  .hero-strip { display: block; min-height: 176px; padding: 24px; }
  .hero-stats { gap: 20px; margin: 20px 0 0; }
  .template-grid { grid-template-columns: repeat(2, 1fr); padding: 0 15px 18px; }
  .panel-head { padding: 18px 15px 14px; }
  .category-row { padding: 0 15px 15px; }
  .upload-stage { margin: 0 15px; min-height: 260px; }
  .upload-foot { display: block; padding: 15px; }
  .privacy-note { margin-bottom: 12px; }
  .generate-btn { width: 100%; }
  .recent-grid, .library-grid, .provider-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .membership-stats { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .membership-toolbar { align-items: stretch; flex-direction: column; }
  .membership-search { max-width: none; }
  .membership-toolbar-actions { flex-wrap: wrap; }
  .membership-toolbar-actions input { flex: 1; min-width: 180px; }
  .membership-plan-grid { grid-template-columns: 1fr; }
  .membership-plan-fields { grid-template-columns: 1fr 1fr; }
  .membership-plan-fields .plan-description { grid-column: 1 / -1; }
  .member-actions { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .toast { right: 14px; bottom: 14px; left: 14px; max-width: none; }
  .confirm-modal { grid-template-columns: 90px minmax(0, 1fr); gap: 14px; padding: 14px; }
  .confirm-modal > img { width: 90px; height: 118px; }
  .confirm-copy h2 { font-size: 22px; }
  .confirm-copy p { font-size: 14px; }
  .confirm-actions { grid-template-columns: 1fr; margin-top: 17px; }
  .modal-backdrop { padding: 12px; }
  .preview-modal { width: 100%; max-height: 94vh; border-radius: 13px; }
  .preview-header { padding: 12px 13px; }
  .preview-header h2 { font-size: 18px; }
  .preview-media { max-height: calc(94vh - 140px); padding: 0 8px; }
  .preview-image { max-height: calc(94vh - 158px); }
  .preview-footer { padding: 10px 11px 12px; }
  .preview-arrow { width: 46px; height: 46px; }
  .preview-original { min-width: 116px; padding: 0 12px; font-size: 15px; }
}
@media (max-width: 420px) {
  .recent-grid, .library-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .hero-copy h2 { font-size: 22px; }
  .page-heading h1 { font-size: 30px; }
  .membership-search { display: grid; grid-template-columns: 1fr 1fr; }
  .membership-search input { grid-column: 1 / -1; min-width: 0; }
  .membership-search button { grid-column: 1 / -1; }
  .member-edit-grid { grid-template-columns: 1fr; }
  .member-edit-grid label:last-child { grid-column: auto; }
}
