:root {
  --theme: #16b597;
  --theme-dark: #12917a;
  --header-bg: #16213e;
  --text: #1a1a2e;
  --muted: #64748b;
  --bg: #f0f4f8;
  --card: #fff;
  --radius: 12px;
  --shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
  --max-width: 1200px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--theme); text-decoration: none; }
a:hover { color: var(--theme-dark); }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 16px; width: 100%; }

/* Header */
.site-header {
  background: var(--header-bg);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  overflow: visible;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 16px;
  overflow: visible;
}

.logo {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}

.logo span { color: var(--theme); }

.header-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  overflow: visible;
  position: relative;
  z-index: 210;
}

/* Language dropdown */
.lang-dropdown {
  position: relative;
  z-index: 220;
}

.lang-dropdown__trigger {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  color: #e8eaed;
  transition: background 0.2s, transform 0.15s;
  padding: 0;
}

.lang-dropdown__trigger:hover,
.lang-dropdown.is-open .lang-dropdown__trigger {
  background: rgba(255, 255, 255, 0.18);
}

.lang-dropdown__icon {
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  line-height: 1;
  font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
}

.lang-icon-char {
  font-size: 13px;
  font-weight: 500;
  opacity: 0.95;
}

.lang-icon-a {
  font-size: 11px;
  font-weight: 700;
  opacity: 0.85;
  margin-left: -1px;
}

.lang-dropdown__panel {
  display: none;
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  min-width: 168px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.14), 0 2px 8px rgba(0, 0, 0, 0.06);
  padding: 8px 0;
  z-index: 300;
  pointer-events: auto;
}

.lang-dropdown.is-open .lang-dropdown__panel {
  display: block;
  animation: langDropIn 0.18s ease;
}

@keyframes langDropIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.lang-dropdown__arrow {
  position: absolute;
  top: -5px;
  right: 14px;
  width: 10px;
  height: 10px;
  background: #fff;
  transform: rotate(45deg);
  box-shadow: -2px -2px 4px rgba(0, 0, 0, 0.04);
  border-radius: 2px 0 0 0;
}

.lang-dropdown__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.lang-dropdown__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 18px;
  text-decoration: none;
  color: #3d4450;
  font-size: 0.9rem;
  transition: background 0.12s;
}

.lang-dropdown__item:hover {
  background: #f4f5f7;
}

.lang-dropdown__item.is-active .lang-dropdown__label {
  color: var(--theme);
  font-weight: 600;
}

.lang-dropdown__flag {
  font-size: 1.15rem;
  line-height: 1;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.lang-dropdown__label {
  white-space: nowrap;
}

/* 侧栏底部浅色背景 */
.lang-dropdown--light .lang-dropdown__trigger {
  background: #eef0f3;
  color: #5c6370;
}

.lang-dropdown--light .lang-dropdown__trigger:hover,
.lang-dropdown--light.is-open .lang-dropdown__trigger {
  background: #e4e7eb;
}

.lang-dropdown--light .lang-dropdown__panel {
  left: 0;
  right: auto;
}

.lang-dropdown--light .lang-dropdown__arrow {
  left: 14px;
  right: auto;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(22, 181, 151, 0.2);
  border: 1px solid rgba(22, 181, 151, 0.45);
  color: #fff;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 7px 12px;
  border-radius: 6px;
}

.nav-toggle:hover { background: rgba(22, 181, 151, 0.35); }

.nav-toggle-text { display: none; }
@media (min-width: 480px) {
  .nav-toggle-text { display: inline; }
}

.badge-nav {
  background: linear-gradient(135deg, #e94560, #ff6b6b);
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  margin-right: 4px;
}

.header-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }

/* Nav drawer + tree */
.nav-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 150;
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
}

.nav-drawer-backdrop.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.nav-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: min(320px, 88vw);
  height: 100vh;
  background: #fff;
  z-index: 160;
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.18);
  transform: translateX(-100%);
  transition: transform 0.28s ease;
}

.nav-drawer.is-open { transform: translateX(0); }

.nav-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  background: var(--header-bg);
  color: #fff;
}

.nav-drawer-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-drawer-title .fa { color: var(--theme); }

.nav-drawer-close {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
}

.nav-drawer-close:hover { background: rgba(255, 255, 255, 0.1); }

.nav-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0 20px;
}

.nav-drawer-foot {
  padding: 14px 18px;
  border-top: 1px solid #eee;
  background: #fafbfc;
}

.nav-drawer-foot {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.nav-tree-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-tree-node { margin: 0; }

.nav-tree-row {
  display: flex;
  align-items: stretch;
  min-height: 42px;
}

.nav-tree-spacer,
.nav-tree-toggle {
  flex-shrink: 0;
  width: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-tree-toggle {
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.9rem;
  transition: transform 0.2s, color 0.15s;
}

.nav-tree-toggle:hover { color: var(--theme); }

.nav-tree-node.is-expanded > .nav-tree-row .nav-tree-toggle {
  transform: rotate(90deg);
  color: var(--theme);
}

.nav-tree-link {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px 10px 0;
  color: var(--text);
  font-size: 0.9rem;
  border-left: 3px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}

.nav-tree-link:hover {
  background: #eef8f5;
  color: var(--theme-dark);
  border-left-color: var(--theme);
}

.nav-tree-link.is-active {
  background: #eef8f5;
  color: var(--theme-dark);
  border-left-color: var(--theme);
  font-weight: 600;
}

.products-empty {
  text-align: center;
  color: var(--muted);
  padding: 2rem 1rem;
}

.empty-state {
  text-align: center;
  padding: 48px 24px;
  background: var(--card);
  border-radius: 16px;
  border: 1px dashed #cbd5e1;
  margin-bottom: 24px;
}

.empty-state__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ecfdf5, #f0fdfa);
  color: var(--theme);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}

.empty-state__title {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.95rem;
}

.btn-sm {
  padding: 8px 18px;
  font-size: 0.85rem;
  border-radius: 8px;
}

.nav-tree-highlight {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.12), rgba(91, 33, 182, 0.08));
  font-weight: 600;
}

.nav-tree-highlight .nav-tree-label { color: #5b21b6; }

.nav-tree-branch {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.2s;
}

.nav-tree-branch.is-expanded {
  max-height: 2000px;
  opacity: 1;
}

.nav-tree-branch.is-collapsed { max-height: 0; opacity: 0; }

.nav-tree-branch > .nav-tree-list {
  padding-left: 12px;
  border-left: 2px solid #e8ecef;
  margin-left: 18px;
}

body.nav-drawer-open { overflow: hidden; }

.btn {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  transition: 0.2s;
}

.btn-primary { background: var(--theme); color: #fff; }
.btn-primary:hover { background: var(--theme-dark); color: #fff; }

.btn-outline {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.btn-outline:hover { border-color: #fff; color: #fff; }

.btn-vip { background: linear-gradient(135deg, #e94560, #c73e54); color: #fff; }

/* Hero */
.hero {
  background: linear-gradient(135deg, #16213e 0%, #0f3460 55%, #16b597 110%);
  color: #fff;
  padding: 48px 0 40px;
  margin-bottom: 8px;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 100% 0%, rgba(22, 181, 151, 0.25), transparent 55%);
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.site-main > .hero + .container {
  padding-top: 20px;
}

.hero h1 { font-size: 1.75rem; margin-bottom: 12px; max-width: 720px; }

.hero p { opacity: 0.9; max-width: 640px; margin-bottom: 20px; }

.hero-stats { display: flex; gap: 24px; flex-wrap: wrap; font-size: 0.9rem; opacity: 0.85; }

/* Section */
.section { margin-bottom: 32px; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 16px;
  gap: 12px;
}

.section-head h2 {
  font-size: 1.25rem;
  border-left: 4px solid var(--theme);
  padding-left: 12px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.35;
}

.section-head h2 .fa {
  color: var(--theme);
  font-size: 0.95em;
  opacity: 0.9;
}

.section-head small,
.section-head__hint {
  color: var(--muted);
  font-size: 0.875rem;
  margin: 8px 0 0;
  line-height: 1.5;
}

.section-head--card {
  background: linear-gradient(135deg, #fff 0%, #f0fdfa 55%, #ecfdf5 100%);
  border: 1px solid rgba(22, 181, 151, 0.12);
  border-radius: 16px;
  padding: 18px 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 16px rgba(22, 181, 151, 0.06);
  align-items: stretch;
}

.section-head--card h2 {
  border-left: none;
  padding-left: 0;
}

.section-head--compact {
  padding: 14px 18px;
  margin-bottom: 16px;
}

.section-head__main { flex: 1; min-width: 0; }

/* Product grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.product-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(15, 23, 42, 0.04);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.card-thumb {
  display: block;
  aspect-ratio: 16/9;
  background: #e8ecef;
  overflow: hidden;
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-body { padding: 16px; flex: 1; display: flex; flex-direction: column; }

.card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-title:hover { color: var(--theme); }

.card-desc {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 12px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }

.tag {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 4px;
  background: #eef8f5;
  color: var(--theme-dark);
}

.tag-vip { background: #fff0f0; color: #e94560; }

.tag-pay { background: #fff8e6; color: #b8860b; }

.card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--muted);
  border-top: 1px solid #eee;
  padding-top: 10px;
}

/* Detail */
.breadcrumb {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 16px;
}

.breadcrumb li + li::before { content: "/"; margin-right: 8px; color: #ccc; }

.breadcrumb--chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.breadcrumb__chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--card);
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--muted);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
  transition: border-color 0.2s, color 0.2s;
}

.breadcrumb__chip:hover {
  border-color: var(--theme);
  color: var(--theme-dark);
}

.breadcrumb__sep {
  color: #cbd5e1;
  font-size: 0.75rem;
}

.page-detail {
  padding-top: 16px;
  padding-bottom: 48px;
}

.article-box {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 24px;
}

.article-box--detail {
  border-radius: 18px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.detail-header {
  padding: 22px 22px 0;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  border-bottom: 1px solid #f1f5f9;
}

.detail-subtitle {
  color: var(--muted);
  margin: 0 0 4px;
  font-size: 0.95rem;
  line-height: 1.5;
}

.article-box--detail .article-meta,
.article-box--detail .tags,
.article-box--detail .product-buy-bar,
.article-box--detail .download-dock,
.article-box--detail .product-gallery,
.article-box--detail .article-cover,
.article-box--detail .product-video-wrap {
  margin-left: 22px;
  margin-right: 22px;
}

.article-box--detail .article-meta {
  margin-top: 16px;
}

.article-box--detail .product-buy-bar,
.article-box--detail .download-dock {
  margin-top: 0;
}

.article-title { font-size: 1.5rem; margin-bottom: 12px; line-height: 1.4; }

.article-box--detail .article-title {
  font-size: 1.35rem;
  margin-bottom: 10px;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--muted);
  font-size: 0.875rem;
  padding-bottom: 16px;
  border-bottom: 1px solid #eee;
  margin-bottom: 20px;
}

.article-cover {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 20px;
}

.article-content { font-size: 1rem; }

.article-content--prose {
  margin: 0 22px 22px;
  padding: 20px 22px;
  background: #f8fafc;
  border-radius: 14px;
  border: 1px solid #eef2f6;
  font-size: 1rem;
  line-height: 1.75;
  color: #334155;
}

.article-content--prose:empty::before {
  content: "暂无详细说明";
  color: var(--muted);
  font-style: italic;
}

.article-content h3 { margin: 20px 0 10px; color: var(--header-bg); }
.article-content p, .article-content li { margin-bottom: 10px; }
.article-content ol, .article-content ul { padding-left: 1.5rem; }

.article-content--prose > *:first-child { margin-top: 0; }
.article-content--prose > *:last-child { margin-bottom: 0; }
.article-content--prose p {
  margin-bottom: 12px;
}
.article-content--prose ul,
.article-content--prose ol {
  margin: 12px 0;
  padding-left: 1.35rem;
}

.pay-box {
  background: linear-gradient(135deg, #f8f9fa, #eef8f5);
  border: 1px dashed var(--theme);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  margin: 24px 0;
}

.pay-box h3 { margin-bottom: 8px; }

.pay-box p { color: var(--muted); margin-bottom: 16px; }

/* Footer */
.site-footer {
  margin-top: auto;
  background: var(--header-bg);
  color: #aaa;
  padding: 24px 0;
  font-size: 0.875rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
}

.footer-inner a { color: #ccc; }

.float-bar {
  position: fixed;
  right: 16px;
  bottom: 80px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 90;
}

.float-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--card);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--theme);
  font-size: 1.1rem;
}

.float-btn:hover { background: var(--theme); color: #fff; }

/* Admin */
.admin-page { padding: 24px 0 48px; }
.admin-title { margin-bottom: 20px; font-size: 1.5rem; }
.admin-grid { display: grid; gap: 24px; }
@media (min-width: 900px) {
  .admin-grid { grid-template-columns: 360px 1fr; }
}
.admin-form label { display: block; margin-bottom: 12px; font-size: 0.9rem; }
.admin-form input[type="text"],
.admin-form input[type="number"],
.admin-form select {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
}
.admin-form .chk { display: flex; align-items: center; gap: 8px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.admin-table th, .admin-table td { padding: 10px 8px; border-bottom: 1px solid #eee; text-align: left; }
.admin-table .row-child td:first-child + td { color: var(--muted); }
.admin-table code { font-size: 0.8rem; }
.link-btn { background: none; border: none; color: #e94560; cursor: pointer; padding: 0; }
.flash-msg {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 0.9rem;
}
.flash-success { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.flash-warn { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.flash-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }

.admin-subhead { font-size: 0.95rem; margin: 12px 0 8px; color: var(--muted); }
.locale-fields { display: grid; gap: 10px; margin-bottom: 14px; }
.locale-field { display: block; }
.locale-field-label { display: block; font-size: 0.8rem; color: var(--muted); margin-bottom: 4px; }
.locale-field input { width: 100%; }
.admin-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-tab {
  padding: 8px 14px;
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  text-decoration: none;
  border: 1px solid #e5e7eb;
  font-size: 0.875rem;
}
.admin-tab.is-active { background: var(--theme); color: #fff; border-color: var(--theme); }
.admin-table-wrap { overflow-x: auto; }
.cell-clip { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.locale-panel { margin-top: 16px; }
.locale-panel h2 { font-size: 1rem; margin-bottom: 12px; }
.product-edit-form textarea { width: 100%; font-family: inherit; }

/* 产品编辑 · Tab */
.product-edit-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e8ecef;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}
.product-edit-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  padding: 0 12px;
  background: linear-gradient(180deg, #f8fafb 0%, #f1f5f4 100%);
  border-bottom: 1px solid #e2e8f0;
  overflow-x: auto;
}
.product-edit-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 14px 18px;
  margin: 0;
  border: none;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: #64748b;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.product-edit-tab:hover {
  color: var(--theme-dark);
  background: rgba(255, 255, 255, 0.6);
}
.product-edit-tab.is-active {
  color: var(--theme-dark);
  border-bottom-color: var(--theme);
  background: #fff;
}
.product-edit-tab__code {
  font-size: 0.72rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: #e2e8f0;
  color: #475569;
  font-weight: 600;
}
.product-edit-tab.is-active .product-edit-tab__code {
  background: #d1fae5;
  color: #047857;
}
.product-edit-tab__req {
  font-size: 0.68rem;
  color: #b45309;
  background: #fef3c7;
  padding: 1px 6px;
  border-radius: 4px;
}
.product-edit-panels {
  padding: 24px;
  min-height: 320px;
}
.product-edit-panel {
  display: none;
  animation: productTabIn 0.2s ease;
}
.product-edit-panel.is-active {
  display: block;
}
@keyframes productTabIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
.product-edit-panel__title {
  margin: 0 0 6px;
  font-size: 1.1rem;
  color: #1e293b;
}
.product-edit-panel__title code {
  font-size: 0.85rem;
  color: var(--muted);
  margin-left: 6px;
}
.product-edit-panel__hint {
  margin: 0 0 20px;
  font-size: 0.82rem;
  color: var(--muted);
}
.product-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px 20px;
}
.product-field--full { grid-column: 1 / -1; }
.product-field--checks {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding-top: 4px;
}
.product-field__label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 6px;
}
.product-field input[type="text"],
.product-field input[type="number"],
.product-field select,
.product-field textarea {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.9rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.product-field input:focus,
.product-field select:focus,
.product-field textarea:focus {
  outline: none;
  border-color: var(--theme);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}
.product-field__code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.5;
}
.product-edit-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid #e8ecef;
  background: #fafbfc;
}
.tag-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.tag-picker__chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  font-size: 0.88rem;
  transition: border-color 0.15s, background 0.15s;
}
.tag-picker__chip:has(input:checked) {
  border-color: var(--tag-color, #64748b);
  background: color-mix(in srgb, var(--tag-color, #64748b) 12%, white);
}
.tag-picker__chip input { position: absolute; opacity: 0; width: 0; height: 0; }
.tag-picker__chip code {
  font-size: 0.72rem;
  color: var(--muted);
  background: transparent;
}
.tag-picker__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--tag-color, #64748b);
  flex-shrink: 0;
}
.tag-picker__chip[data-hidden-tag] { opacity: 0.65; }

/* 订单状态 */
.order-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.82rem;
}
.order-status--pending { background: #fef3c7; color: #b45309; }
.order-status--paid { background: #d1fae5; color: #047857; }
.order-status--cancelled { background: #f1f5f9; color: #64748b; }
.order-status--refunded { background: #fee2e2; color: #b91c1c; }
.order-pay-snapshot {
  margin: 16px 0;
  padding: 14px 16px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  font-size: 0.9rem;
}
.order-pay-snapshot p { margin: 6px 0; }
.order-pay-snapshot__head {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* 收款方式图标 */
.pay-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}
.pay-icon--sm { width: 28px; height: 28px; font-size: 1.1rem; }
.pay-icon--md {
  width: 40px;
  height: 40px;
  font-size: 1.45rem;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}
.pay-icon--lg {
  width: 56px;
  height: 56px;
  font-size: 1.85rem;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}
.pay-icon__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: inherit;
}
.pay-icon--image.pay-icon--md,
.pay-icon--image.pay-icon--lg { padding: 4px; background: #fff; }

.pay-icon-picker { margin-bottom: 0; }
.pay-icon-picker--compact .pay-icon-picker__main {
  display: grid;
  grid-template-columns: auto 1fr minmax(140px, 200px) 48px;
  gap: 10px 12px;
  align-items: start;
}
.pay-icon-picker__preview {
  display: flex;
  align-items: flex-start;
}
.pay-icon-picker__label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 6px;
}
.pay-icon-picker__color {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  cursor: pointer;
}
.pay-icon-picker__color input[type="color"] {
  width: 100%;
  height: 36px;
  padding: 2px;
  border: 1px solid #dfe3e8;
  border-radius: 8px;
  cursor: pointer;
}
.pay-icon-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.pay-icon-preset {
  width: 34px;
  height: 34px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.pay-icon-preset:hover {
  border-color: var(--theme);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.15);
}

.pay-method-select {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}
.pay-method-option { cursor: pointer; }
.pay-method-option input { position: absolute; opacity: 0; pointer-events: none; }
.pay-method-option__box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  min-width: 140px;
  transition: border-color 0.15s, background 0.15s;
}
.pay-method-option input:checked + .pay-method-option__box {
  border-color: var(--theme);
  background: rgba(16, 185, 129, 0.06);
}
.pay-method-option--disabled { opacity: 0.5; cursor: not-allowed; }
.pay-method-option__text { font-size: 0.9rem; }
.pay-method-option__text em { font-style: normal; color: var(--muted); font-size: 0.8rem; }
@media (max-width: 720px) {
  .product-edit-grid { grid-template-columns: 1fr; }
  .product-edit-tabs { padding: 0 8px; }
  .product-edit-tab { padding: 12px 14px; font-size: 0.85rem; }
}

/* 商品媒体上传 */
.media-block { margin-bottom: 28px; }
.media-block__title { margin: 0 0 12px; font-size: 1rem; color: #334155; }
.media-block__hint { font-size: 0.8rem; color: var(--muted); margin: 8px 0 0; }
.media-existing,
.media-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}
.media-thumb-card {
  position: relative;
  width: 120px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: #f8fafc;
}
.media-thumb-card:has(input:checked) { border-color: var(--theme); }
.media-thumb-card input {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  accent-color: var(--theme);
}
.media-thumb-card img {
  display: block;
  width: 100%;
  height: 90px;
  object-fit: cover;
}
.media-thumb-card__label {
  display: block;
  text-align: center;
  font-size: 0.72rem;
  padding: 4px;
  background: #f1f5f9;
  color: #64748b;
}
.media-thumb-card--new { border-style: dashed; border-color: var(--theme); }
.media-upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 28px 20px;
  border: 2px dashed #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  cursor: pointer;
  text-align: center;
  color: #64748b;
  transition: border-color 0.15s, background 0.15s;
}
.media-upload-zone:hover {
  border-color: var(--theme);
  background: #eef8f5;
  color: var(--theme-dark);
}
.media-upload-zone .fa { font-size: 1.8rem; }
.media-upload-input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
}
.media-upload-zone { position: relative; }
.media-upload-zone__hint {
  display: block;
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 2px;
}
.media-upload-zone--compact {
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  min-height: 0;
  text-align: left;
}
.media-upload-zone--compact .fa { font-size: 1.1rem; flex-shrink: 0; }
.media-upload-zone__text {
  font-size: 0.8rem;
  line-height: 1.35;
}
.media-upload-zone__text em {
  display: block;
  font-style: normal;
  font-size: 0.68rem;
  color: #94a3b8;
  font-weight: normal;
}
.payment-qr-upload__body {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.payment-qr-upload__current {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}
.payment-qr-upload__img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
  border: 1px solid #e2e8f0;
}
.payment-qr-upload__zone { margin: 0; flex: 1; min-width: 160px; }
.payment-qr-upload__preview img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: #fff;
}
.payment-icon-upload__img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
  border: 1px solid #e2e8f0;
}
.payment-icon-upload__current {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.payment-icon-upload__preview img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: #fff;
  margin-top: 6px;
}
.option-chip--sm {
  font-size: 0.75rem;
  gap: 6px;
}
.option-chip--sm span { line-height: 1.3; }
.nav-form__row--align-start {
  align-items: flex-start;
}
.nav-form__row--align-start .payment-qr-upload {
  flex: 1;
  min-width: 0;
}
.media-video-current {
  margin-bottom: 16px;
}
.media-video-current video {
  width: 100%;
  max-width: 560px;
  border-radius: 8px;
  background: #000;
}
.video-upload-progress {
  margin: 14px 0 12px;
}
.video-upload-progress__track {
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}
.video-upload-progress__bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--theme), #38bdf8);
  border-radius: 999px;
  transition: width 0.15s ease-out;
}
.video-upload-progress__text {
  margin: 8px 0 0;
  font-size: 0.82rem;
  color: #64748b;
}
.video-upload-error {
  margin: 0 0 10px;
  padding: 8px 12px;
  font-size: 0.85rem;
  color: #b91c1c;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
}
.media-upload-zone.is-disabled {
  pointer-events: none;
  opacity: 0.55;
}
.tag-price {
  background: #fff7ed;
  color: #c2410c;
  font-weight: 600;
}
.product-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.product-gallery__item {
  display: block;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e8ecef;
}
.product-gallery__item img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}
.product-gallery__item:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.product-video-wrap {
  margin-bottom: 24px;
}
.product-video-wrap__title {
  margin: 0 0 12px;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}
.product-video-wrap__title .fa {
  color: var(--theme);
  margin-right: 6px;
}
.product-video {
  width: 100%;
  max-width: 720px;
  border-radius: 8px;
  background: #000;
}
.admin-form textarea {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  min-height: 60px;
}

/* Admin nav form + tree */
.admin-nav-layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Nav form card */
.nav-form-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 16px rgba(22, 33, 62, 0.06);
  border: 1px solid rgba(22, 181, 151, 0.12);
  overflow: hidden;
}

.nav-form-card__header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: linear-gradient(135deg, #f0faf8 0%, #fff 55%);
  border-bottom: 1px solid #e8f4f1;
}

.nav-form-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--theme), var(--theme-dark));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  box-shadow: 0 4px 12px rgba(22, 181, 151, 0.35);
  flex-shrink: 0;
}

.nav-form-card__icon--edit {
  background: linear-gradient(135deg, #5b7cfa, #4f46e5);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.nav-form-card__title {
  margin: 0 0 4px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
}

.nav-form-card__desc {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.nav-form {
  padding: 20px 24px 24px;
}

.nav-form__section + .nav-form__section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px dashed #e8ecef;
}

.nav-form__section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--theme-dark);
  margin-bottom: 14px;
}

.nav-form__section-title .fa {
  opacity: 0.85;
}

/* Locale input cards */
.locale-input-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.locale-input-card {
  background: #f8fafb;
  border: 1px solid #e8ecef;
  border-radius: 10px;
  padding: 12px 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.locale-input-card.is-default {
  border-color: rgba(22, 181, 151, 0.35);
  background: linear-gradient(180deg, #f6fcfa 0%, #f8fafb 100%);
}

.locale-input-card:focus-within {
  border-color: var(--theme);
  box-shadow: 0 0 0 3px rgba(22, 181, 151, 0.12);
}

.locale-input-card__head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.locale-input-card__tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  background: var(--theme);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.locale-input-card.is-default .locale-input-card__tag {
  background: linear-gradient(135deg, var(--theme), var(--theme-dark));
}

.locale-input-card__name {
  font-size: 0.78rem;
  color: var(--muted);
}

.locale-input-card__req {
  font-style: normal;
  font-size: 0.68rem;
  color: var(--theme-dark);
  background: #e0f5f0;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: auto;
}

.locale-input-card__input {
  width: 100%;
  border: none;
  background: #fff;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.9rem;
  color: var(--text);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
  outline: none;
}

.locale-input-card__input::placeholder {
  color: #b0b8c4;
}

/* Nav field row */
.nav-form__row {
  display: grid;
  grid-template-columns: 2fr 2fr 1fr 88px;
  gap: 14px;
  align-items: end;
}

.nav-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
}

.nav-field__hint {
  display: block;
  margin-top: 4px;
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: normal;
}
.nav-field__label {
  font-size: 0.78rem;
  font-weight: 500;
  color: #5c6370;
}

.nav-field input,
.nav-field select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #dfe3e8;
  border-radius: 8px;
  font-size: 0.9rem;
  background: #fff;
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}

.nav-field input:hover,
.nav-field select:hover {
  border-color: #c5cdd8;
}

.nav-field input:focus,
.nav-field select:focus {
  border-color: var(--theme);
  box-shadow: 0 0 0 3px rgba(22, 181, 151, 0.15);
}

.nav-field select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

/* Option chips */
.nav-form__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid #eef0f3;
  background: linear-gradient(180deg, transparent, #fafbfc 40%);
  margin-left: -24px;
  margin-right: -24px;
  margin-bottom: -24px;
  padding-left: 24px;
  padding-right: 24px;
  padding-bottom: 20px;
  border-radius: 0 0 12px 12px;
}

.nav-form__options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.option-chip {
  position: relative;
  cursor: pointer;
  margin: 0;
}

.option-chip input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.option-chip span {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 500;
  color: #5c6370;
  background: #fff;
  border: 1px solid #dfe3e8;
  transition: all 0.2s;
  user-select: none;
}

.option-chip:hover span {
  border-color: var(--theme);
  color: var(--theme-dark);
}

.option-chip input:checked + span,
.option-chip--on span {
  background: linear-gradient(135deg, var(--theme), var(--theme-dark));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 2px 8px rgba(22, 181, 151, 0.35);
}

.nav-form__submit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  font-weight: 600;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(22, 181, 151, 0.3);
  transition: transform 0.15s, box-shadow 0.15s;
}

.nav-form__submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(22, 181, 151, 0.4);
}

.nav-form__footer-btns {
  display: flex;
  gap: 10px;
  align-items: center;
}

@media (max-width: 960px) {
  .nav-form__row {
    grid-template-columns: 1fr 1fr;
  }
  .nav-field--narrow { grid-column: span 1; }
}

@media (max-width: 640px) {
  .nav-form-card__header { padding: 16px; }
  .nav-form { padding: 16px; }
  .nav-form__row { grid-template-columns: 1fr; }
  .nav-form__footer {
    flex-direction: column;
    align-items: stretch;
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 16px;
    padding-right: 16px;
  }
  .nav-form__submit,
  .nav-form__footer-btns .btn { width: 100%; justify-content: center; }
  .locale-input-grid { grid-template-columns: 1fr; }
}
.admin-nav-tree-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.admin-nav-tree-head h2 { margin: 0; }
.admin-nav-tree-toolbar { display: flex; gap: 8px; }
.btn-sm { padding: 6px 12px; font-size: 0.8rem; }
.admin-nav-tree-hint {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 12px;
}
.admin-nav-tree-wrap {
  border: 1px solid #e8ecef;
  border-radius: 8px;
  overflow: hidden;
  background: #fafbfc;
}
.admin-nav-tree-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.admin-nav-tree-children {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  transition: max-height 0.25s ease, opacity 0.2s;
}
.admin-nav-tree-children.is-collapsed {
  display: none;
}
.admin-nav-tree-node.is-collapsed > .admin-nav-tree-row {
  border-bottom-color: #eee;
}
.admin-nav-tree-row {
  border-bottom: 1px solid #e8ecef;
  background: #fff;
}
.admin-nav-tree-row:hover { background: #f6fbf9; }
.admin-nav-tree-header {
  background: #eef2f6;
  font-weight: 600;
  font-size: 0.8rem;
  color: #555;
  position: sticky;
  top: 0;
  z-index: 2;
}
.admin-nav-tree-row-inner {
  display: grid;
  grid-template-columns:
    28px
    44px
    minmax(120px, 1.4fr)
    repeat(var(--locale-cols, 2), minmax(64px, 0.7fr))
    minmax(120px, 1.2fr)
    108px;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  font-size: 0.85rem;
}
.admin-nav-tree-toggle,
.admin-nav-tree-leaf {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.admin-nav-tree-toggle {
  border: none;
  background: #eef8f5;
  color: var(--theme-dark);
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}
.admin-nav-tree-toggle:hover {
  background: var(--theme);
  color: #fff;
}
.admin-nav-tree-node:not(.is-expanded) > .admin-nav-tree-row .admin-nav-tree-toggle {
  background: #f0f0f0;
  color: #666;
}
.col-id { color: var(--muted); font-variant-numeric: tabular-nums; }
.col-title { font-weight: 500; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.col-url code { font-size: 0.75rem; word-break: break-all; }
.col-locale { color: #444; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.col-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.col-actions form { display: inline; margin: 0; }
.nav-meta-badge {
  font-style: normal;
  font-size: 0.7rem;
  background: #ffe8ec;
  color: #c0392b;
  padding: 1px 6px;
  border-radius: 4px;
}
.nav-meta-hidden {
  font-style: normal;
  font-size: 0.7rem;
  background: #eee;
  color: #666;
  padding: 1px 6px;
  border-radius: 4px;
}
.nav-meta-hl {
  font-style: normal;
  font-size: 0.7rem;
  background: #ede9fe;
  color: #5b21b6;
  padding: 1px 6px;
  border-radius: 4px;
}
.admin-nav-tree-wrap .admin-nav-tree-children .admin-nav-tree-row {
  background: #fcfcfd;
}
.admin-nav-tree-wrap .admin-nav-tree-children .admin-nav-tree-children .admin-nav-tree-row {
  background: #f8f9fa;
}
@media (max-width: 900px) {
  .admin-nav-tree-row-inner {
    grid-template-columns: 28px 1fr;
    grid-template-areas:
      "toggle title"
      ". meta"
      ". actions";
  }
  .admin-nav-tree-toggle { grid-area: toggle; }
  .col-title { grid-area: title; }
  .col-id, .col-locale, .col-url {
    grid-column: 2;
    display: block;
  }
  .col-actions { grid-area: actions; grid-column: 2; }
  .admin-nav-tree-header { display: none; }
}

/* 商品分类管理 */
.admin-cat-page {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.admin-cat-form-card { margin-bottom: 0; }
.admin-cat-tree-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.04);
  padding: 20px 24px;
  border: 1px solid #e8ecef;
}
.admin-cat-tree-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.admin-cat-tree-card__head h2 {
  margin: 0 0 6px;
  font-size: 1.15rem;
  color: #1a1d24;
}
.admin-cat-tree-card__head h2 .fa { color: var(--theme); margin-right: 6px; }
.admin-cat-tree-card__tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.cat-selected-count {
  font-size: 0.8rem;
  color: var(--muted);
  padding: 6px 10px;
  background: #f3f4f6;
  border-radius: 6px;
  margin-right: 4px;
}
.btn-danger {
  background: #dc2626;
  color: #fff;
  border: 1px solid #b91c1c;
}
.btn-danger:hover:not(:disabled) { background: #b91c1c; color: #fff; }
.btn-danger:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.admin-cat-tree-wrap {
  border-radius: 10px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}
.admin-cat-row-inner {
  grid-template-columns:
    36px
    28px
    52px
    minmax(90px, 0.9fr)
    minmax(140px, 1.4fr)
    56px
    88px
    88px !important;
}
.col-check {
  display: flex;
  align-items: center;
  justify-content: center;
}
.cat-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--theme);
  cursor: pointer;
}
.col-slug .slug-pill {
  display: inline-block;
  padding: 2px 8px;
  background: #eef2f6;
  border-radius: 4px;
  font-size: 0.78rem;
  color: #475569;
  border: 1px solid #e2e8f0;
}
.col-name {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.cat-name-text { font-weight: 500; color: #1e293b; }
.cat-child-count {
  font-size: 0.72rem;
  color: var(--muted);
}
.col-order {
  font-variant-numeric: tabular-nums;
  color: #64748b;
  text-align: center;
}
.col-vis { display: flex; align-items: center; }
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 500;
}
.status-badge--on { background: #ecfdf5; color: #047857; }
.status-badge--off { background: #f1f5f9; color: #64748b; }
.col-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
}
.btn-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #64748b;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn-action:hover {
  background: #f8fafc;
  color: var(--theme-dark);
  border-color: var(--theme);
}
.btn-action--edit:hover { color: var(--theme); }
.btn-action--danger { color: #dc2626; border-color: #fecaca; }
.btn-action--danger:hover {
  background: #fef2f2;
  border-color: #f87171;
  color: #b91c1c;
}
.cat-delete-one { display: inline; margin: 0; }
.admin-cat-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--muted);
  margin: 0;
}
.admin-cat-empty .fa { font-size: 2rem; display: block; margin-bottom: 12px; opacity: 0.5; }
@media (max-width: 900px) {
  .admin-cat-row-inner {
    grid-template-columns: 36px 28px 1fr;
    grid-template-areas:
      "check toggle title"
      ". . slug"
      ". . meta"
      ". . actions";
  }
  .col-check { grid-area: check; }
  .admin-nav-tree-toggle { grid-area: toggle; }
  .col-name { grid-area: title; }
  .col-slug { grid-area: slug; }
  .col-id, .col-order, .col-vis { grid-area: meta; grid-column: 3; }
  .col-actions { grid-area: actions; grid-column: 3; }
}

/* Admin shell */
.admin-body { margin: 0; background: #f0f2f5; }
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: #1a1d24;
  color: #b8bcc8;
  display: flex;
  flex-direction: column;
  padding: 20px 0;
}
.admin-brand {
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 0 20px 20px;
  text-decoration: none;
}
.admin-menu { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.admin-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  color: inherit;
  text-decoration: none;
  font-size: 0.9rem;
}
.admin-menu a:hover, .admin-menu a.active { background: rgba(22, 181, 151, 0.15); color: #16b597; }
.admin-sidebar-foot {
  padding: 16px 20px 0;
  border-top: 1px solid #2d323c;
  font-size: 0.8rem;
}
.admin-user-label { display: block; margin-bottom: 8px; color: #fff; }
.admin-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.admin-topbar {
  background: #fff;
  padding: 16px 24px;
  border-bottom: 1px solid #e5e7eb;
}
.admin-topbar h1 { margin: 0; font-size: 1.25rem; }
.admin-content { padding: 24px; flex: 1; }
.admin-cards {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  margin-bottom: 24px;
}
.admin-card {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  transition: box-shadow 0.2s;
}
.admin-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.1); }
.admin-card i { font-size: 1.5rem; color: var(--theme); }
.admin-card h3 { margin: 12px 0 6px; font-size: 1rem; }
.admin-card p { margin: 0; font-size: 0.85rem; color: var(--muted); }
.admin-muted { font-size: 0.875rem; color: var(--muted); }

.admin-login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a1d24 0%, #2d3a4a 100%);
}
.admin-login-card {
  width: 100%;
  max-width: 380px;
  background: #fff;
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 8px 32px rgba(0,0,0,.2);
}
.admin-login-card h1 { margin: 0 0 24px; font-size: 1.35rem; text-align: center; }
.admin-login-hint { text-align: center; margin-top: 16px; font-size: 0.875rem; }
.admin-login-hint a { color: var(--theme); }
.btn-block { width: 100%; margin-top: 8px; }

@media (max-width: 768px) {
  .admin-shell { flex-direction: column; }
  .admin-sidebar { width: 100%; }
  .admin-menu { flex-direction: row; flex-wrap: wrap; }
}

@media (max-width: 768px) {
  .site-header .header-inner { flex-wrap: nowrap; }
  .hero {
    padding: 28px 0 24px;
    margin-bottom: 4px;
  }
  .hero h1 { font-size: 1.25rem; line-height: 1.35; }
  .hero p { font-size: 0.9rem; margin-bottom: 14px; }
  .hero-stats {
    gap: 12px 16px;
    font-size: 0.78rem;
  }
  .hero-stats span { display: inline-flex; align-items: center; gap: 6px; }
  .header-inner { min-height: 52px; gap: 8px; }
  .logo { font-size: 1rem; max-width: 42vw; overflow: hidden; text-overflow: ellipsis; }
  .header-actions .btn-outline {
    padding: 6px 10px;
    font-size: 0.78rem;
  }
  .header-account__name { max-width: 56px; }
  .header-account__bal { display: none; }
  .site-main > .container,
  .site-main .container {
    padding-left: 14px;
    padding-right: 14px;
  }
  .section { margin-bottom: 24px; }
  .section-head--card {
    padding: 14px 16px;
    border-radius: 14px;
  }
  .section-head--card h2 { font-size: 1.05rem; }
  .section-head__hint { font-size: 0.8rem; }
  .product-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .card-body { padding: 14px; }
  .card-thumb { aspect-ratio: 16/10; }
  .page-detail { padding-top: 12px; padding-bottom: 24px; }
  .article-box--detail .detail-header,
  .article-box--detail .article-meta,
  .article-box--detail .tags,
  .article-box--detail .product-buy-bar,
  .article-box--detail .download-dock,
  .article-box--detail .product-gallery,
  .article-box--detail .article-cover,
  .article-box--detail .product-video-wrap,
  .article-content--prose {
    margin-left: 14px;
    margin-right: 14px;
  }
  .detail-header { padding: 16px 14px 0; }
  .article-box--detail .article-title { font-size: 1.15rem; }
  .article-content--prose {
    padding: 16px 18px;
    font-size: 0.95rem;
  }
  .product-buy-bar {
    padding: 16px;
    margin-bottom: 16px;
    border-radius: 14px;
    position: sticky;
    bottom: 0;
    z-index: 40;
    box-shadow: 0 -4px 24px rgba(15, 23, 42, 0.1);
  }
  .product-buy-bar {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  .product-buy-bar .btn-lg {
    width: 100%;
  }
  .site-footer {
    padding: 20px 0 calc(20px + env(safe-area-inset-bottom, 0px));
  }
  .footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
  .float-bar {
    bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    right: 12px;
  }
  .float-btn {
    width: 40px;
    height: 40px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12);
  }
  .empty-state { padding: 36px 20px; }
}

/* ========== 前台充值页 ========== */
.recharge-hero {
  background: linear-gradient(135deg, #0f766e 0%, #14b8a6 45%, #5eead4 100%);
  color: #fff;
  padding: 36px 0 40px;
  margin-bottom: 28px;
}
.recharge-hero__title {
  margin: 0 0 10px;
  font-size: 1.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 12px;
}
.recharge-hero__desc {
  margin: 0;
  opacity: 0.92;
  font-size: 1rem;
  max-width: 560px;
}
.recharge-section { padding-bottom: 48px; }
.recharge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.recharge-card {
  position: relative;
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.recharge-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
}
.recharge-card--closed {
  opacity: 0.92;
  background: linear-gradient(180deg, #fafafa 0%, #fff 100%);
}
.recharge-card__ribbon {
  position: absolute;
  top: 14px;
  right: -32px;
  background: #94a3b8;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 36px;
  transform: rotate(35deg);
  z-index: 1;
}
.recharge-card__head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 20px 12px;
  border-bottom: 1px solid #f1f5f9;
}
.recharge-card__icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
}
.recharge-card__icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 12px;
  padding: 4px;
}
.recharge-card__name {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
}
.recharge-card__network {
  font-size: 0.78rem;
  color: var(--muted);
}
.recharge-card__body { padding: 16px 20px 20px; }
.recharge-field {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 10px 12px;
  background: #f8fafc;
  border-radius: 10px;
}
.recharge-field__label {
  width: 100%;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.recharge-field__value {
  flex: 1;
  font-size: 0.92rem;
  word-break: break-all;
}
.recharge-field__value--mono {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.85rem;
}
.recharge-copy-btn {
  border: none;
  background: var(--theme);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s;
}
.recharge-copy-btn:hover { background: var(--theme-dark); }
.recharge-copy-btn.is-copied { background: #059669; }
.recharge-qr {
  text-align: center;
  margin: 12px 0;
  padding: 12px;
  background: #fff;
  border: 1px dashed #e2e8f0;
  border-radius: 12px;
}
.recharge-qr img {
  max-width: 180px;
  border-radius: 8px;
}
.recharge-instructions p {
  margin: 6px 0 0;
  font-size: 0.88rem;
  color: var(--muted);
  white-space: pre-wrap;
  line-height: 1.55;
}
.recharge-card__foot {
  margin: 0;
  padding: 10px 20px 16px;
  font-size: 0.82rem;
  color: #b45309;
  background: #fffbeb;
  border-top: 1px solid #fde68a;
}
.recharge-empty {
  text-align: center;
  padding: 60px 24px;
  color: var(--muted);
}
.recharge-empty .fa { font-size: 2.5rem; margin-bottom: 12px; opacity: 0.4; }

/* ========== 后台收款方式 ========== */
.admin-payments-page { max-width: 1100px; }
.admin-payments-toolbar {
  margin: 0 0 12px;
  padding: 8px 12px;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.45;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e8ecef;
}
.admin-payments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.admin-pay-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: 0 1px 6px rgba(15, 23, 42, 0.04);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.admin-pay-card:hover { box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08); }
.admin-pay-card--closed { border-color: #fde68a; background: linear-gradient(180deg, #fffbeb 0%, #fff 40%); }
.admin-pay-card--hidden { opacity: 0.65; border-style: dashed; }
.admin-pay-card__head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}
.admin-pay-card__titles { flex: 1; min-width: 0; }
.admin-pay-card__titles h3 {
  margin: 0 0 4px;
  font-size: 1.05rem;
  font-weight: 700;
}
.admin-pay-card__title-link {
  color: inherit;
  text-decoration: none;
}
.admin-pay-card__title-link:hover {
  color: var(--theme-dark);
  text-decoration: underline;
}
.admin-pay-card__titles code {
  font-size: 0.75rem;
  color: var(--muted);
}
.admin-pay-card__badges {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-end;
}
.admin-pay-badge {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.admin-pay-badge--on { background: #d1fae5; color: #047857; }
.admin-pay-badge--open { background: #dbeafe; color: #1d4ed8; }
.admin-pay-badge--closed { background: #fef3c7; color: #b45309; }
.admin-pay-badge--muted { background: #f1f5f9; color: #64748b; }
.admin-pay-card__meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px 10px;
  margin: 0 0 10px;
  font-size: 0.78rem;
}
.admin-pay-card__meta div { display: flex; gap: 6px; }
.admin-pay-card__meta dt { color: var(--muted); font-weight: 600; }
.admin-pay-card__meta dd { margin: 0; word-break: break-all; }
.admin-pay-card__meta-wide { grid-column: 1 / -1; flex-direction: column; }
.admin-pay-card__actions {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 6px;
  align-items: stretch;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
}
.admin-pay-btn-edit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  font-weight: 600;
}
.admin-pay-toggle-form,
.admin-pay-delete-form {
  margin: 0;
  display: flex;
}
.admin-pay-btn-toggle,
.admin-pay-delete-form button {
  white-space: nowrap;
  height: 100%;
}
@media (max-width: 400px) {
  .admin-pay-card__actions {
    grid-template-columns: 1fr 1fr;
  }
  .admin-pay-btn-edit { grid-column: 1 / -1; }
}
.admin-payments-empty {
  text-align: center;
  padding: 24px;
  color: var(--muted);
  background: #f8fafc;
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: 0.88rem;
}
.admin-payments-empty .fa { font-size: 1.5rem; margin-bottom: 6px; opacity: 0.35; }
.admin-payments-create {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
.admin-payments-create__summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 0.9rem;
  font-weight: 600;
  background: #f8fafc;
  user-select: none;
}
.admin-payments-create__summary::-webkit-details-marker { display: none; }
.admin-payments-create__icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--theme);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}
.admin-payments-create__body { border-top: 1px solid #e8ecef; }
.admin-payments-create__body.nav-form-card { box-shadow: none; border: none; border-radius: 0; }

/* 收款表单紧凑布局 */
.nav-form--compact { padding: 14px 16px 16px; }
.nav-form--compact .nav-form__section + .nav-form__section {
  margin-top: 12px;
  padding-top: 12px;
}
.nav-form--compact .nav-form__section--tight {
  margin-top: 10px;
  padding-top: 10px;
}
.nav-form--compact .nav-form__section-title {
  margin-bottom: 8px;
  font-size: 0.75rem;
}
.nav-form--compact .nav-form__section--inline-head .nav-form__section-title {
  margin-bottom: 8px;
}
.nav-form--compact .locale-input-grid {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
}
.nav-form--compact .locale-input-card {
  padding: 8px 10px;
}
.nav-form--compact .locale-input-card__head { margin-bottom: 4px; }
.nav-form--compact .locale-input-card__input {
  padding: 7px 10px;
  font-size: 0.85rem;
}
.nav-form--compact .nav-field input,
.nav-form--compact .nav-field select,
.nav-form--compact .nav-field textarea {
  padding: 7px 10px;
  font-size: 0.85rem;
}
.nav-form--compact .nav-form__row {
  gap: 10px;
  margin-bottom: 10px;
}
.nav-form--compact .nav-form__row--3 {
  grid-template-columns: 1.2fr 1fr 72px;
}
.nav-form--compact .nav-form__row--2 {
  grid-template-columns: 1fr 1fr;
}
.nav-form--compact .nav-form__row--pay-media {
  display: grid;
  grid-template-columns: 1fr 100px;
  gap: 10px;
  align-items: end;
}
.nav-form--compact .payment-qr-upload { margin: 0; }
.nav-form--compact .nav-field--network input { min-width: 0; }
.nav-form--compact .nav-field { gap: 4px; }
.nav-form--compact .nav-field__label { font-size: 0.72rem; }
.nav-form__footer--compact {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #eef2f6;
}
.nav-form-card--compact .nav-form-card__header--compact {
  padding: 12px 16px;
  gap: 12px;
}
.nav-form-card--compact .nav-form-card__title {
  font-size: 1rem;
  margin-bottom: 2px;
}
.nav-form-card--compact .nav-form-card__desc { font-size: 0.78rem; }
.nav-form-card__back {
  margin-left: auto;
  flex-shrink: 0;
}
.nav-form--compact .admin-pay-status-box {
  margin: 10px 0;
  padding: 10px 12px;
  border-radius: 8px;
}
.nav-form--compact .admin-pay-status-box__title {
  margin-bottom: 8px;
  font-size: 0.75rem;
}
.nav-form--compact .admin-pay-status-options {
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.nav-form--compact .admin-pay-status-option {
  padding: 8px 10px;
  gap: 8px;
  border-radius: 8px;
  border-width: 1px;
}
.nav-form--compact .admin-pay-status-option__icon {
  width: 32px;
  height: 32px;
  font-size: 0.95rem;
  border-radius: 8px;
}
.nav-form--compact .admin-pay-status-option__text strong { font-size: 0.82rem; }
.nav-form--compact .admin-pay-status-option__text small { font-size: 0.68rem; }
.nav-form--compact .admin-pay-edit-note {
  padding: 8px 10px;
  margin-bottom: 8px;
  font-size: 0.78rem;
}
@media (max-width: 900px) {
  .pay-icon-picker--compact .pay-icon-picker__main {
    grid-template-columns: auto 1fr;
  }
  .pay-icon-picker--compact .pay-icon-picker__upload-col {
    grid-column: 1 / -1;
  }
  .pay-icon-picker--compact .pay-icon-picker__color {
    grid-column: auto;
  }
  .nav-form--compact .nav-form__row--pay-media {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .pay-icon-picker--compact .pay-icon-picker__main {
    grid-template-columns: auto 1fr 48px;
  }
  .pay-icon-picker--compact .pay-icon-picker__upload-col {
    grid-column: 1 / -1;
  }
  .nav-form--compact .nav-form__row--3,
  .nav-form--compact .nav-form__row--2,
  .nav-form--compact .admin-pay-status-options {
    grid-template-columns: 1fr;
  }
}

.admin-pay-status-box {
  margin: 16px 0;
  padding: 16px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}
.admin-pay-status-box__title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--theme-dark);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.admin-pay-status-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.admin-pay-status-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.admin-pay-status-option:has(input:checked) {
  border-color: var(--theme);
  background: rgba(22, 181, 151, 0.06);
}
.admin-pay-status-option input { flex-shrink: 0; accent-color: var(--theme); }
.admin-pay-status-option__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--theme);
}
.admin-pay-status-option__text strong {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 2px;
}
.admin-pay-status-option__text small {
  font-size: 0.75rem;
  color: var(--muted);
}
.admin-pay-edit-note {
  font-size: 0.85rem;
  color: #b45309;
  background: #fffbeb;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 12px;
}
.btn-sm {
  padding: 6px 12px;
  font-size: 0.82rem;
}
.btn-danger-outline {
  background: transparent;
  border: 1px solid #fecaca;
  color: #dc2626;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
}
.btn-danger-outline:hover {
  background: #fef2f2;
}
.pay-method-option--closed .pay-method-option__box {
  border-color: #fde68a;
  background: #fffbeb;
}
.pay-method-tag {
  display: inline-block;
  font-style: normal;
  font-size: 0.72rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: #fef3c7;
  color: #b45309;
  margin-left: 6px;
}
.pay-method-tag--muted {
  background: #f1f5f9;
  color: #64748b;
}

/* 后台订单详情 */
.admin-orders-hint {
  margin: 0 0 16px;
  padding: 10px 14px;
  background: #f0f9ff;
  border-radius: 8px;
  font-size: 0.88rem;
  color: #0369a1;
}
.admin-order-detail__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.admin-order-detail__no {
  margin: 0 0 6px;
  font-size: 1.25rem;
}
.admin-order-detail__meta {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}
.order-status--lg {
  padding: 6px 14px;
  font-size: 0.9rem;
}
.admin-order-detail__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.admin-order-panel {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px;
}
.admin-order-panel__title {
  margin: 0 0 14px;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}
.admin-order-dl {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 10px 12px;
  margin: 0;
  font-size: 0.88rem;
}
.admin-order-dl dt {
  color: var(--muted);
  font-weight: 600;
}
.admin-order-dl dd { margin: 0; }
.admin-order-dl--full { grid-column: 1 / -1; display: block; }
.admin-order-dl--full dt { margin-bottom: 4px; }
.order-pay-snapshot--compact { margin: 0; }
.admin-order-status-form { margin-top: 8px; }
.admin-order-status-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}
.admin-order-status-pick {
  cursor: pointer;
}
.admin-order-status-pick input { position: absolute; opacity: 0; pointer-events: none; }
.admin-order-status-pick .order-status {
  display: inline-block;
  padding: 10px 16px;
  border: 2px solid transparent;
  border-radius: 10px;
  transition: border-color 0.15s, transform 0.15s;
}
.admin-order-status-pick:has(input:checked) .order-status {
  border-color: var(--theme);
  box-shadow: 0 0 0 3px rgba(22, 181, 151, 0.15);
}
.admin-order-status-pick.is-current .order-status { opacity: 1; }

/* 网站设置 */
.admin-site-settings-hint {
  margin: 0 0 16px;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
}
.site-settings-card .product-edit-panels {
  min-height: 280px;
}
.site-settings-fields {
  grid-template-columns: 1fr 1fr;
  align-items: start;
}
.site-settings-fields .nav-field--wide {
  grid-column: 1 / -1;
}
.site-settings-fields .nav-field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #dfe3e8;
  border-radius: 8px;
  font-size: 0.9rem;
  resize: vertical;
  min-height: 60px;
  font-family: inherit;
}
.site-settings-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 16px 24px 20px;
  border-top: 1px solid #e8ecef;
  background: #fafbfc;
}
@media (max-width: 720px) {
  .site-settings-fields {
    grid-template-columns: 1fr;
  }
  .site-settings-footer {
    padding: 14px 16px 16px;
  }
  .site-settings-footer .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ========== 登录 / 注册弹窗 ========== */
.login-modal-page {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  font-family: inherit;
}
.auth-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
}
.auth-modal {
  position: relative;
  width: 100%;
  max-width: 380px;
  padding: 22px 24px 20px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(15, 23, 42, 0.04);
}
.auth-modal--register {
  max-width: 400px;
}
.auth-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 1rem;
  text-decoration: none;
  border-radius: 8px;
  transition: color 0.15s, background 0.15s;
}
.auth-modal__close:hover {
  color: #475569;
  background: #f1f5f9;
}
.auth-modal__header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding-right: 28px;
}
.auth-modal__logo {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--theme) 0%, #0f766e 100%);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
  box-shadow: 0 4px 12px rgba(22, 181, 151, 0.25);
}
.auth-modal__site {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  line-height: 1.3;
}
.auth-modal__site strong {
  font-size: 0.92rem;
  color: #1e293b;
  font-weight: 600;
}
.auth-modal__site span {
  font-size: 0.72rem;
  color: #94a3b8;
}
.auth-modal__intro {
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
}
.auth-modal__title {
  margin: 0 0 4px;
  font-size: 1.2rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
}
.auth-modal__title::after {
  content: "";
  display: block;
  width: 28px;
  height: 2px;
  margin-top: 6px;
  background: var(--theme);
  border-radius: 1px;
}
.auth-modal__switch {
  margin: 0;
  font-size: 0.8rem;
  color: #94a3b8;
  line-height: 1.45;
}
.auth-modal__switch a {
  color: var(--theme-dark);
  font-weight: 500;
  text-decoration: none;
  margin-left: 2px;
}
.auth-modal__switch a:hover {
  text-decoration: underline;
}
.auth-modal__switch .fa {
  font-size: 0.75em;
  vertical-align: 0.05em;
}
.auth-modal__error {
  margin: 0 0 10px;
  padding: 7px 10px;
  font-size: 0.8rem;
  color: #b91c1c;
  background: #fef2f2;
  border-radius: 8px;
  border: 1px solid #fecaca;
}
.auth-modal__form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.auth-modal__field {
  position: relative;
}
.auth-modal__field input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 0.9rem;
  background: #f8fafc;
  color: var(--text);
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.auth-modal__field input::placeholder {
  color: #94a3b8;
}
.auth-modal__field input:hover {
  border-color: #cbd5e1;
  background: #fff;
}
.auth-modal__field input:focus {
  outline: none;
  border-color: var(--theme);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(22, 181, 151, 0.12);
}
.auth-modal__field--password input {
  padding-right: 38px;
}
.auth-modal__pw-toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: none;
  color: #94a3b8;
  width: 32px;
  height: 32px;
  padding: 0;
  cursor: pointer;
  font-size: 0.9rem;
  border-radius: 6px;
}
.auth-modal__pw-toggle:hover {
  color: #64748b;
  background: #f1f5f9;
}
.auth-modal__field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.auth-modal__hint {
  margin: -2px 0 0;
  font-size: 0.72rem;
  color: #94a3b8;
  line-height: 1.35;
  text-align: center;
}
.auth-modal__options {
  margin: 0;
  font-size: 0.78rem;
}
.auth-modal__remember {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: #64748b;
  user-select: none;
}
.auth-modal__remember input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.auth-modal__remember-box {
  width: 14px;
  height: 14px;
  border: 1.5px solid #cbd5e1;
  border-radius: 3px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, background 0.15s;
}
.auth-modal__remember input:checked + .auth-modal__remember-box {
  background: var(--theme);
  border-color: var(--theme);
}
.auth-modal__remember input:checked + .auth-modal__remember-box::after {
  content: "";
  width: 3px;
  height: 7px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-1px, -1px);
}
.auth-modal__submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 4px;
  padding: 11px 16px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.3);
}
.auth-modal__submit:hover {
  filter: brightness(1.05);
  box-shadow: 0 6px 18px rgba(14, 165, 233, 0.38);
  transform: translateY(-1px);
}
.auth-modal__submit:active {
  transform: translateY(0);
}
.auth-modal__submit .fa {
  font-size: 0.95rem;
  opacity: 0.95;
}
@media (max-width: 420px) {
  .auth-modal {
    padding: 18px 18px 16px;
    border-radius: 12px;
  }
  .auth-modal__field-row {
    grid-template-columns: 1fr;
  }
}

/* ========== 用户注册（页面） ========== */
.auth-page {
  padding: 40px 0 56px;
  background: var(--bg, #f4f5f7);
}
.auth-panel {
  max-width: 420px;
  margin: 0 auto;
  padding: 28px 28px 24px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}
.auth-panel__title {
  margin: 0 0 6px;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text);
}
.auth-panel__lead {
  margin: 0 0 20px;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
}
.auth-panel__form {
  display: grid;
  gap: 14px;
}
.auth-panel__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 520px) {
  .auth-panel__row { grid-template-columns: 1fr; }
}
.auth-panel__field {
  display: grid;
  gap: 6px;
}
.auth-panel__field span {
  font-size: 0.85rem;
  color: #475569;
}
.auth-panel__field input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.95rem;
}
.auth-panel__field input:focus {
  outline: none;
  border-color: var(--theme);
}
.auth-panel__hint {
  margin: -6px 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}
.auth-panel__foot {
  margin: 18px 0 0;
  text-align: center;
  font-size: 0.88rem;
  color: var(--muted);
}
.auth-panel__foot a {
  color: var(--theme-dark);
  text-decoration: none;
  margin-left: 4px;
}
.auth-panel__foot a:hover { text-decoration: underline; }

.auth-alert {
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 0.88rem;
  margin-bottom: 14px;
  line-height: 1.45;
}
.auth-alert--error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}
.auth-alert--success {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

/* 弹窗/容器内仍用旧 auth-field 类 */
.auth-field { display: grid; gap: 6px; }
.auth-field__label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #475569;
}
.auth-field input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.95rem;
}
.auth-field__hint { font-size: 0.75rem; color: var(--muted); }
.auth-alert--success { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.header-account {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  font-size: 0.85rem;
  text-decoration: none;
  max-width: 200px;
}
.header-account:hover { border-color: var(--theme); color: var(--theme); }
.header-account__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 88px;
}
.header-account__bal {
  font-size: 0.78rem;
  color: var(--theme);
  font-weight: 600;
  white-space: nowrap;
}
.header-logout-form {
  display: inline;
  margin: 0;
}
.header-logout-form button { vertical-align: middle; }

/* 商品购买 / 付费下载 */
.btn-lg {
  padding: 12px 28px;
  font-size: 1.05rem;
  font-weight: 600;
}
.auth-alert--success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.9rem;
}
.checkout-modal__sub {
  margin: -8px 0 16px;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.45;
}

/* 详情页：付费下载区 */
.dl-svg {
  display: block;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.dl-svg--chevron { width: 18px; height: 18px; opacity: 0.45; }
.dl-svg--unlock { width: 20px; height: 20px; }

.download-dock {
  margin-bottom: 24px;
  padding: 0;
  border-radius: 18px;
  background: #fff;
  border: 1px solid #e8ecf1;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 12px 40px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}
.download-dock--unlocked {
  border-color: rgba(22, 181, 151, 0.28);
  box-shadow: 0 1px 2px rgba(22, 181, 151, 0.06), 0 12px 40px rgba(22, 181, 151, 0.1);
}

.product-gallery--detail {
  display: block;
  margin: 0 22px 14px;
}
.product-gallery--detail .product-gallery__item {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  border: none;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.08);
}
.product-gallery--detail .product-gallery__item img {
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  display: block;
}
.article-cover--detail {
  display: block;
  width: calc(100% - 44px);
  margin: 0 22px 14px;
  max-height: none;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.08);
}

.download-dock__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 14px 18px;
  background: #f8fafc;
  border-bottom: 1px solid #eef2f6;
}
.download-dock__badge {
  margin: 0;
  flex: 1 1 100%;
  font-size: 0.78rem;
  color: #64748b;
  line-height: 1.35;
}
.download-dock__badge--ok {
  color: #0d9488;
  font-weight: 500;
}
@media (min-width: 769px) {
  .download-dock__badge {
    flex: 1 1 auto;
    text-align: right;
    max-width: 52%;
  }
}

.download-dock__price {
  text-align: left;
}
.download-dock__price-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 2px;
}
.download-dock__price-value {
  font-size: 1.65rem;
  font-weight: 800;
  color: #0f766e;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.download-dock__platforms {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  padding: 16px 20px 12px;
}
.dl-platform {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #eef2f6;
  border-radius: 14px;
  background: #fafbfc;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  font-family: inherit;
  text-align: left;
  box-sizing: border-box;
}
.dl-platform:hover {
  background: #fff;
  border-color: #cbd5e1;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}
.dl-platform__icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.dl-platform__icon .dl-svg { width: 24px; height: 24px; }
.dl-platform--pc .dl-platform__icon {
  background: linear-gradient(145deg, #2dd4bf 0%, #0d9488 100%);
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.35);
}
.dl-platform--ios .dl-platform__icon {
  background: linear-gradient(145deg, #60a5fa 0%, #1d4ed8 100%);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}
.dl-platform--android .dl-platform__icon {
  background: linear-gradient(145deg, #4ade80 0%, #15803d 100%);
  box-shadow: 0 4px 12px rgba(21, 128, 61, 0.35);
}
.dl-platform__body { flex: 1; min-width: 0; }
.dl-platform__name {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  color: #1e293b;
  letter-spacing: -0.01em;
}
.dl-platform__sub {
  display: block;
  margin-top: 3px;
  font-size: 0.72rem;
  color: #94a3b8;
}
.dl-platform--pc:not(.dl-platform--locked) .dl-platform__sub { color: #0d9488; }
.dl-platform--ios:not(.dl-platform--locked) .dl-platform__sub { color: #2563eb; }
.dl-platform--android:not(.dl-platform--locked) .dl-platform__sub { color: #16a34a; }

.dl-platform__arrow {
  flex-shrink: 0;
  color: #94a3b8;
  display: flex;
  align-items: center;
}
.dl-platform--locked {
  background: #fff;
  border-style: dashed;
  border-color: #e2e8f0;
}
.dl-platform--locked:hover {
  border-color: #16b597;
  border-style: solid;
  background: #f0fdfa;
  box-shadow: 0 4px 16px rgba(22, 181, 151, 0.1);
}
.dl-platform--locked .dl-platform__sub { color: #64748b; }
.dl-platform--locked:hover .dl-platform__sub { color: #0d9488; }
.dl-platform__lock {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #f1f5f9;
  color: #94a3b8;
  transition: background 0.2s, color 0.2s;
}
.dl-platform--locked:hover .dl-platform__lock {
  background: #ccfbf1;
  color: #0d9488;
}
.download-dock--unlocked .dl-platform--locked { display: none; }

.download-dock__cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: calc(100% - 36px);
  margin: 0 18px 16px;
  padding: 13px 16px;
  border: none;
  border-radius: 10px;
  background: var(--theme);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(22, 181, 151, 0.3);
  transition: background 0.15s, transform 0.15s;
  font-family: inherit;
}
.download-dock__cta:hover {
  background: var(--theme-dark);
}
.download-dock__cta-main {
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.download-dock__cta-price {
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.2);
  font-size: 1.05rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.download-dock__empty {
  margin: 0;
  padding: 16px 20px 20px;
  font-size: 0.88rem;
  color: var(--muted);
  text-align: center;
}

/* 移动端：图片完整展示 + 紧凑下载卡片（不 sticky 遮挡） */
@media (max-width: 768px) {
  .page-detail {
    padding-bottom: 20px;
  }
  .product-gallery--detail {
    margin: 0 14px 12px;
  }
  .article-cover--detail {
    width: calc(100% - 28px);
    margin: 0 14px 12px;
    border-radius: 10px;
  }
  .article-box--detail .download-dock {
    margin: 0 14px 16px;
    width: auto;
    padding: 0 !important;
    border-radius: 12px;
    position: static;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.08);
  }

  .download-dock__header {
    padding: 10px 12px;
    gap: 4px;
    background: #fff;
    border-bottom: 1px solid #f1f5f9;
  }
  .download-dock__price-value {
    font-size: 1.35rem;
  }
  .download-dock__badge {
    font-size: 0.72rem;
    flex: 1 1 100%;
    text-align: left;
  }

  .download-dock__platforms {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 10px 12px;
    background: #fff;
  }
  .download-dock__platforms:has(.dl-platform:nth-child(2):last-child) {
    grid-template-columns: repeat(2, 1fr);
  }
  .dl-platform {
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 6px;
    border-radius: 10px;
    border: 1px solid #e8ecf1;
    background: #fafbfc;
    position: relative;
    text-align: center;
    min-height: 0;
  }
  .dl-platform:active {
    transform: scale(0.97);
    background: #f0fdfa;
  }
  .dl-platform__icon {
    width: 40px;
    height: 40px;
    border-radius: 11px;
  }
  .dl-platform__icon .dl-svg {
    width: 20px;
    height: 20px;
  }
  .dl-platform__name {
    font-size: 0.7rem;
    font-weight: 700;
  }
  .dl-platform__sub,
  .dl-platform__arrow {
    display: none !important;
  }
  .dl-platform__lock {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 18px;
    height: 18px;
    border-radius: 5px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  }
  .dl-platform__lock .dl-svg {
    width: 11px;
    height: 11px;
  }
  .dl-platform--locked {
    border-color: #e2e8f0;
  }

  .download-dock__cta {
    width: 100%;
    margin: 0;
    padding: 12px 14px;
    border-radius: 0 0 12px 12px;
    gap: 10px;
    justify-content: space-between;
    background: var(--theme);
    box-shadow: none;
  }
  .download-dock__cta-main {
    font-size: 0.88rem;
    font-weight: 700;
  }
  .download-dock__cta-price {
    padding: 4px 10px;
    font-size: 0.9rem;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.12);
  }
  .download-dock__empty {
    padding: 10px 12px 12px;
    font-size: 0.8rem;
  }

  /* 未付费：底部固定仅一条支付栏，不挡正文图片 */
  .download-dock--pay {
    margin-bottom: calc(56px + env(safe-area-inset-bottom, 0px));
  }
  .download-dock--pay .download-dock__cta {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    border-radius: 0;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.12);
  }
}

/* 兼容旧类名（列表等） */
.product-buy-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  margin-bottom: 24px;
  background: linear-gradient(135deg, #ecfdf5 0%, #f0fdfa 100%);
  border: 1px solid rgba(22, 181, 151, 0.25);
  border-radius: 14px;
}
.product-buy-bar__price strong { font-size: 1.5rem; color: var(--theme-dark); }
.product-buy-bar__label {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 4px;
}
.product-buy-bar__muted { margin: 0; color: var(--muted); flex: 1; }

/* 后台：详情页下载按钮（卡片布局，覆盖 .admin-form label） */
.product-field--dl { margin-top: 4px; }
.product-edit-form .dl-panel label {
  display: inline-flex;
  margin-bottom: 0;
  font-size: inherit;
  font-weight: inherit;
  cursor: pointer;
}
.product-edit-form .dl-panel input[type="url"],
.product-edit-form .dl-panel .dl-input {
  display: block;
  width: 100%;
  margin: 0;
}

.dl-panel {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}
.dl-panel__head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  background: linear-gradient(135deg, #f0fdfa 0%, #f8fafc 55%, #fff 100%);
  border-bottom: 1px solid #e8ecf1;
}
.dl-panel__icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--theme), var(--theme-dark));
  color: #fff;
  font-size: 1.1rem;
  box-shadow: 0 4px 12px rgba(22, 181, 151, 0.35);
}
.dl-panel__title {
  margin: 0 0 4px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e293b;
}
.dl-panel__hint {
  margin: 0;
  font-size: 0.78rem;
  color: #64748b;
  line-height: 1.45;
}

.dl-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 16px 18px 18px;
}
.dl-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: var(--dl-bg, #f8fafc);
  transition: border-color 0.2s, box-shadow 0.2s, opacity 0.2s;
}
.dl-card.is-on {
  border-color: var(--dl-accent, var(--theme));
  box-shadow: 0 0 0 1px var(--dl-accent, var(--theme)), 0 4px 14px rgba(15, 23, 42, 0.08);
  background: #fff;
}
.dl-card.is-off { opacity: 0.72; }

.dl-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.dl-card__plat {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.dl-card__icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--dl-accent, var(--theme));
  color: #fff;
  font-size: 1.05rem;
  flex-shrink: 0;
}
.dl-card__name {
  font-size: 0.88rem;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.2;
}

.dl-card__toggle { position: relative; flex-shrink: 0; }
.dl-card__toggle .dl-enabled-cb {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
}
.dl-switch {
  display: block;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: #cbd5e1;
  cursor: pointer;
  transition: background 0.2s;
  position: relative;
}
.dl-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s;
}
.dl-enabled-cb:checked + .dl-switch {
  background: var(--dl-accent, var(--theme));
}
.dl-enabled-cb:checked + .dl-switch::after {
  transform: translateX(20px);
}
.dl-enabled-cb:focus-visible + .dl-switch {
  outline: 2px solid var(--dl-accent, var(--theme));
  outline-offset: 2px;
}

.dl-card__segments {
  display: flex;
  padding: 3px;
  background: #f1f5f9;
  border-radius: 9px;
  gap: 2px;
}
.dl-segment { flex: 1; position: relative; }
.dl-segment input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
}
.dl-segment label {
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 6px 8px;
  font-size: 0.78rem;
  font-weight: 500;
  color: #64748b;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
  user-select: none;
}
.dl-segment input:checked + label {
  background: #fff;
  color: var(--dl-accent, var(--theme-dark));
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.1);
}

.dl-card__body { min-height: 40px; }
.dl-field[hidden] { display: none !important; }
.dl-input {
  width: 100%;
  padding: 9px 11px;
  font-size: 0.82rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.dl-input:focus {
  outline: none;
  border-color: var(--dl-accent, var(--theme));
  box-shadow: 0 0 0 3px rgba(22, 181, 151, 0.15);
}
.dl-file-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dl-file-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--dl-accent, var(--theme-dark));
  background: #fff;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.dl-file-btn:hover {
  border-color: var(--dl-accent, var(--theme));
  background: var(--dl-bg, #f8fafc);
}
.dl-file-btn input { display: none; }
.dl-file-name {
  font-size: 0.75rem;
  color: var(--dl-accent, var(--theme));
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dl-file-name:hover { text-decoration: underline; }
.dl-file-name--empty { color: #94a3b8; pointer-events: none; }

@media (max-width: 1100px) {
  .dl-cards { grid-template-columns: 1fr; }
}

/* 购买弹窗 */
.checkout-modal[hidden] { display: none !important; }
body.checkout-open .checkout-modal {
  display: flex !important;
  z-index: 3000;
}
.js-pay-download,
[data-open-checkout],
#btn-pay-download {
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.checkout-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.checkout-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}
.checkout-modal__dialog {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 18px;
  padding: 24px 22px 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2);
}
.checkout-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  border: none;
  background: #f1f5f9;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
}
.checkout-modal__title {
  margin: 0 0 8px;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.checkout-modal__product {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.9rem;
}
.checkout-modal__price {
  color: var(--theme-dark);
  margin-left: 8px;
}
.checkout-form__section { margin-bottom: 18px; }
.checkout-form__label {
  margin: 0 0 10px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #334155;
}
.checkout-pay-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.checkout-pay-option input { position: absolute; opacity: 0; pointer-events: none; }
.checkout-pay-option__box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 10px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  text-align: center;
}
.checkout-pay-option:has(input:checked) .checkout-pay-option__box {
  border-color: var(--theme);
  background: rgba(22, 181, 151, 0.08);
}
.checkout-pay-option--closed .checkout-pay-option__box {
  opacity: 0.55;
  cursor: not-allowed;
}
.checkout-pay-option__icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}
.checkout-pay-option__icon img { max-width: 100%; max-height: 100%; }
.checkout-pay-option__name { font-size: 0.85rem; font-weight: 600; }
.checkout-pay-option__tag {
  font-size: 0.68rem;
  color: #b45309;
  background: #fef3c7;
  padding: 2px 6px;
  border-radius: 4px;
}
.checkout-pay-detail {
  margin-bottom: 18px;
  padding: 14px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}
.checkout-pay-detail[hidden] { display: none !important; }
.checkout-pay-panel[hidden] { display: none !important; }
.checkout-pay-panel p { margin: 8px 0; font-size: 0.88rem; }
.checkout-instructions { white-space: pre-wrap; color: var(--muted); }
.checkout-pay-detail__hint {
  margin: 10px 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}
.checkout-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 480px) {
  .checkout-form__row { grid-template-columns: 1fr; }
}
.checkout-login-hint {
  font-size: 0.88rem;
  color: #b45309;
  background: #fffbeb;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 12px;
}
.checkout-empty { color: var(--muted); font-size: 0.9rem; }
.checkout-copy-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.checkout-copy-row code { word-break: break-all; }

.order-success-page { padding: 40px 0 60px; }
.order-success-card {
  max-width: 520px;
  margin: 0 auto;
  text-align: center;
  background: #fff;
  border-radius: 18px;
  padding: 36px 28px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
}
.order-success-card__icon {
  font-size: 3rem;
  color: var(--theme);
  margin-bottom: 12px;
}
.order-success-card__no { margin: 12px 0; }
.order-success-card__meta { color: var(--muted); font-size: 0.9rem; }
.order-success-card__tip {
  margin: 20px 0;
  font-size: 0.88rem;
  color: var(--muted);
  text-align: left;
}
.order-success-card__balance { margin: 8px 0; font-size: 0.95rem; }
.order-success-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 8px;
}

.checkout-balance-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
}
.checkout-balance-box__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0;
  font-size: 0.9rem;
}
.checkout-balance-box__row + .checkout-balance-box__row { margin-top: 8px; }
.checkout-balance-box__row--deduct strong { color: #b45309; }
.checkout-balance-box__muted { color: var(--muted); }
.checkout-balance-warn { margin-bottom: 12px; font-size: 0.88rem; }
.checkout-balance-warn a { margin-left: 4px; font-weight: 600; }
.checkout-balance-foot {
  margin-top: 10px;
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
}

.account-page { padding: 28px 0 48px; }
.account-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 768px) {
  .account-layout { grid-template-columns: 1fr; }
}
.account-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 10px;
}
@media (max-width: 768px) {
  .account-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }
}
.account-nav__item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.88rem;
  color: var(--text);
  text-decoration: none;
}
.account-nav__item:hover { background: #f1f5f9; }
.account-nav__item.is-active {
  background: rgba(13, 148, 136, 0.1);
  color: var(--theme);
  font-weight: 600;
}
.account-head { margin-bottom: 20px; }
.account-head h1 { font-size: 1.35rem; margin: 0 0 6px; }
.account-head__sub { margin: 0; color: var(--muted); font-size: 0.9rem; }
.account-main--narrow { max-width: 420px; }
.account-balance-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  padding: 20px 22px;
  background: linear-gradient(135deg, #0f172a 0%, #134e4a 100%);
  color: #fff;
  border-radius: 16px;
  margin-bottom: 24px;
}
.account-balance-card__label { font-size: 0.85rem; opacity: 0.85; }
.account-balance-card__value { font-size: 1.75rem; font-weight: 700; flex: 1; }
.account-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 900px) {
  .account-panels { grid-template-columns: 1fr; }
}
.account-panel {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px 18px;
}
.account-panel__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.account-panel__head h2 { font-size: 1rem; margin: 0; }
.account-panel__head a { font-size: 0.85rem; }
.account-order-list { list-style: none; margin: 0; padding: 0; }
.account-order-list li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px;
  padding: 10px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.88rem;
}
.account-order-list li:last-child { border-bottom: none; }
.account-order-list__meta { color: var(--muted); font-size: 0.8rem; }
.account-empty { color: var(--muted); font-size: 0.88rem; margin: 0; }
.account-form .auth-field { margin-bottom: 14px; }
.account-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.account-table th,
.account-table td {
  padding: 10px 8px;
  text-align: left;
  border-bottom: 1px solid #f1f5f9;
}
.account-table th { color: var(--muted); font-weight: 600; }
.account-order-detail p { margin: 8px 0; }
