/* ONi Photo SaaS — 管理后台壳层（超管 / 门店） */

:root {
  --sidebar-w: 240px;
  --header-h: 56px;
  --surface: #ffffff;
  --surface-2: #faf8f7;
  --sidebar-bg: #1c1214;
  --sidebar-text: rgba(255, 255, 255, 0.72);
  --sidebar-text-active: #fff;
  --sidebar-accent: #c45a6a;
  --focus-ring: 0 0 0 3px rgba(139, 35, 50, 0.22);
}

/* —— 登录页 —— */
body.auth-page {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
}

.auth-layout {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
}

@media (min-width: 900px) {
  .auth-layout {
    grid-template-columns: 1fr 1fr;
  }
}

.auth-hero {
  display: none;
  padding: 48px 40px;
  background: linear-gradient(145deg, var(--brand-dark) 0%, var(--brand) 45%, #a83245 100%);
  color: #fff;
  flex-direction: column;
  justify-content: center;
}

@media (min-width: 900px) {
  .auth-hero {
    display: flex;
  }
}

.auth-hero .logo {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.auth-hero .logo small {
  font-size: 11px;
  font-weight: 700;
  vertical-align: super;
  opacity: 0.85;
}

.auth-hero p {
  font-size: 15px;
  line-height: 1.7;
  opacity: 0.88;
  max-width: 360px;
}

.auth-hero ul {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  opacity: 0.9;
}

.auth-hero li {
  padding: 8px 0;
  padding-left: 24px;
  position: relative;
}

.auth-hero li::before {
  content: "✓";
  position: absolute;
  left: 0;
  font-weight: 700;
}

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 28px 24px 32px;
  border: 1px solid var(--border);
}

.auth-card .auth-mobile-brand {
  text-align: center;
  margin-bottom: 24px;
}

@media (min-width: 900px) {
  .auth-card .auth-mobile-brand {
    display: none;
  }
}

.auth-card .auth-mobile-brand .logo {
  font-size: 22px;
  font-weight: 900;
  color: var(--brand);
}

.auth-card h1 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 700;
}

.auth-card .auth-sub {
  margin: 0 0 20px;
  font-size: 14px;
  color: var(--muted);
}

.auth-card label {
  font-weight: 500;
  color: var(--text);
}

.auth-card input,
.auth-card select {
  margin-bottom: 14px;
}

.auth-footer-links {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  text-align: center;
  color: var(--muted);
}

.auth-footer-links a {
  margin: 0 8px;
}

/* —— 后台应用壳 —— */
body.admin-app {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--surface-2);
}

.admin-shell {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
}

.admin-sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 200;
  transform: translateX(-100%);
  transition: transform 0.25s ease;
}

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

@media (min-width: 960px) {
  .admin-sidebar {
    transform: none;
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100dvh;
  }
}

.admin-sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 199;
}

.admin-sidebar-backdrop.show {
  display: block;
}

@media (min-width: 960px) {
  .admin-sidebar-backdrop {
    display: none !important;
  }
}

.admin-brand {
  padding: 20px 18px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-brand .name {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.3px;
}

.admin-brand .name span {
  color: var(--sidebar-accent);
}

.admin-brand .role {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 4px;
  opacity: 0.55;
}

.admin-nav {
  flex: 1;
  padding: 12px 10px;
  overflow-y: auto;
}

.admin-nav-section {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  padding: 12px 12px 6px;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 2px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--sidebar-text);
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  font-family: inherit;
}

.admin-nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--sidebar-text-active);
}

.admin-nav-item.active {
  background: rgba(139, 35, 50, 0.45);
  color: #fff;
}

.admin-nav-item .icon {
  width: 22px;
  text-align: center;
  font-size: 15px;
  opacity: 0.9;
}

.admin-sidebar-foot {
  padding: 12px 10px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-sidebar-foot a,
.admin-sidebar-foot button {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  color: var(--sidebar-text);
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
}

.admin-sidebar-foot a:hover,
.admin-sidebar-foot button:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.admin-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

@media (min-width: 960px) {
  .admin-main {
    margin-left: 0;
  }
}

.admin-header {
  height: var(--header-h);
  padding: 0 16px 0 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.admin-menu-btn {
  display: flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 10px;
  background: var(--surface-2);
  font-size: 20px;
  cursor: pointer;
}

@media (min-width: 960px) {
  .admin-menu-btn {
    display: none;
  }
}

.admin-page-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.admin-content {
  padding: 20px 16px 40px;
  flex: 1;
}

@media (min-width: 960px) {
  .admin-content {
    padding: 24px 28px 48px;
    max-width: 1280px;
  }
}

.admin-content .msg {
  margin-bottom: 16px;
}

/* —— 卡片与区块 —— */
.admin-panel {
  display: none;
}

.admin-panel.active {
  display: block;
}

.admin-panel .card {
  border: 1px solid var(--border);
  margin-bottom: 20px;
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.card-head h2 {
  margin: 0;
}

.card-desc {
  font-size: 13px;
  color: var(--muted);
  margin: 4px 0 0;
  line-height: 1.5;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.overview-store-banner {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 22px;
  margin-bottom: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.overview-store-name {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.overview-store-status {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.4;
}

.overview-store-status.is-expired {
  color: #c62828;
}

.overview-credits-hint {
  margin-top: 4px;
  font-size: 14px;
  font-weight: 600;
  color: #8b2332;
}

.overview-credits-hint.is-low,
.overview-credits-hint strong {
  color: #8b2332;
}

.store-credits-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #8b2332;
  background: #f8eef0;
  border: 1px solid #e8c9d0;
  white-space: nowrap;
}

.store-credits-chip.is-low {
  color: #9b1c1c;
  background: #fdecec;
  border-color: #f3b4b4;
}

.store-credits-sidebar {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #f6e6ea;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.store-credits-sidebar.is-low {
  color: #ffd7d7;
  background: rgba(180, 40, 40, 0.35);
  border-color: rgba(255, 160, 160, 0.35);
}

.album-credits-banner {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #8b2332;
  background: #f8eef0;
  border: 1px solid #e8c9d0;
}

.album-credits-banner.is-low {
  color: #9b1c1c;
  background: #fdecec;
  border-color: #f3b4b4;
}

.album-credits-inline {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 600;
  color: #8b2332;
}

.album-credits-inline.is-low {
  color: #9b1c1c;
}

.overview-ops-card .overview-ops-grid {
  margin-bottom: 0;
}

.overview-ops-card .stat-card {
  background: var(--surface-2, #f7f4f2);
}

.overview-ops-card .stat-card.highlight {
  border-color: rgba(139, 35, 50, 0.35);
  background: #fdf8f9;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.stat-card .label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.stat-card .value {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.stat-card .value.brand {
  color: var(--brand);
}

.stat-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.35;
}

/* —— 按钮增强 —— */
.btn {
  font-family: inherit;
  font-weight: 600;
  transition: background 0.15s, transform 0.1s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
  border-radius: 8px;
}

.btn-ghost {
  background: transparent;
  color: var(--brand);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: var(--surface-2);
}

.admin-header-actions .btn-secondary {
  padding: 8px 14px;
  font-size: 13px;
}

.layout-switch {
  font-size: 12px;
  font-weight: 600;
  color: var(--brand);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  white-space: nowrap;
}

.layout-switch:hover {
  background: var(--surface-2);
}

/* —— 表格 —— */
.table-wrap {
  overflow-x: auto;
  margin: 0 -4px;
  padding: 0 4px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.admin-table th {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding: 10px 12px;
  border-bottom: 2px solid var(--border);
  background: var(--surface-2);
}

.admin-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.admin-table tbody tr:hover td {
  background: rgba(139, 35, 50, 0.03);
}

.admin-table .actions {
  white-space: nowrap;
}

.admin-table .actions .btn {
  margin-right: 4px;
  margin-bottom: 4px;
}

/* —— 徽章 —— */
.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
}

.badge-plan-basic,
.badge-plan-payg {
  background: #eee;
  color: #444;
}

.badge-plan-pro,
.badge-plan-month {
  background: #fce4ec;
  color: var(--brand);
}

.badge-plan-quarter {
  background: #e3f2fd;
  color: #1565c0;
}

.badge-plan-year {
  background: #fff3e0;
  color: #e65100;
}

.plan-compare-4 {
  min-width: 640px;
}

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

.plan-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  margin: 0;
  padding: 14px 14px 12px;
  border: 1px solid var(--border, #eee2e4);
  border-radius: 14px;
  background: #fff;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
  font: inherit;
}

.plan-card:hover {
  border-color: #d4a5ad;
  box-shadow: 0 6px 18px rgba(139, 35, 50, 0.08);
}

.plan-card.is-featured {
  background: #fdf6f7;
}

.plan-card.is-selected {
  border-color: #8b2332;
  box-shadow: 0 0 0 2px rgba(139, 35, 50, 0.18);
  transform: translateY(-1px);
}

.plan-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.plan-card-name {
  font-size: 14px;
  font-weight: 800;
  color: #2a1a1c;
}

.plan-card-tag {
  flex-shrink: 0;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  background: #8b2332;
  color: #fff;
}

.plan-card-tag-alt {
  background: #e65100;
}

.plan-card-price {
  margin-bottom: 10px;
  color: #5c4046;
  line-height: 1.1;
}

.plan-card-price em {
  font-style: normal;
  font-size: 26px;
  font-weight: 900;
  color: #8b2332;
  letter-spacing: -0.02em;
}

.plan-card-price span {
  margin-left: 2px;
  font-size: 12px;
  font-weight: 600;
}

.plan-card-list {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
}

.plan-card-list li {
  position: relative;
  padding: 4px 0 4px 14px;
  font-size: 12px;
  line-height: 1.45;
  color: #5c4046;
}

.plan-card-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d4a5ad;
}

.plan-card.is-selected .plan-card-list li::before {
  background: #8b2332;
}

.plan-card-list strong {
  color: #2a1a1c;
  font-weight: 800;
}

.plan-card-foot {
  margin: 10px 0 0;
  padding-top: 8px;
  border-top: 1px dashed #efe4e6;
  font-size: 11px;
  font-weight: 700;
  color: #8b2332;
}

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

@media (max-width: 560px) {
  .plan-cards {
    grid-template-columns: 1fr;
  }
}

.badge-status-active {
  background: #e8f5e9;
  color: #2e7d32;
}

.badge-status-disabled,
.badge-status-suspended {
  background: #ffebee;
  color: #c62828;
}

.admin-table tr.is-store-disabled td {
  background: #fff8f8;
  color: #666;
}

.store-mobile-card.is-store-disabled {
  border-color: #ef9a9a;
  background: #fff8f8;
}

/* —— 表单分区 —— */
.form-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  margin: 20px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

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

.plan-compare-wrap {
  margin: 0 0 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.plan-compare-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  min-width: 320px;
  border: 1px solid var(--border, #eee2e4);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.plan-compare-table th,
.plan-compare-table td {
  padding: 11px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border, #eee2e4);
  vertical-align: middle;
}

.plan-compare-table thead th {
  background: #f7f2f3;
  font-weight: 700;
  font-size: 12px;
  color: #5c4046;
}

.plan-compare-table tbody tr:last-child td {
  border-bottom: 0;
}

.plan-compare-table td:first-child,
.plan-compare-table th:first-child {
  color: var(--muted, #7a6064);
  font-weight: 600;
  width: 28%;
}

.plan-compare-table .plan-col-pro {
  background: #fdf6f7;
  color: #2a1a1c;
}

.plan-compare-table thead .plan-col-pro {
  background: #f3e4e7;
  color: #8b2332;
}

.plan-badge-value {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  background: #8b2332;
  color: #fff;
  vertical-align: middle;
}

.plan-delta {
  display: inline-block;
  margin-left: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #8b2332;
}

.plan-compare-highlight td {
  background: #faf7f7;
}

.plan-compare-highlight .plan-col-pro {
  background: #f8e9ec;
}

.plan-compare-note {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--muted, #7a6064);
  line-height: 1.5;
}

.tpl-dist-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.tpl-dist-count {
  font-size: 13px;
  font-weight: 700;
  color: #5c4046;
}

.tpl-dist-count em {
  font-style: normal;
  color: #8b2332;
}

.tpl-dist-catalog {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 12px;
}

.tpl-dist-item {
  position: relative;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  border: 1.5px solid var(--border, #eee2e4);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  overflow: hidden;
  min-width: 0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tpl-dist-item:hover {
  border-color: #d4a5ad;
  box-shadow: 0 6px 16px rgba(139, 35, 50, 0.08);
}

.tpl-dist-item:has(input:checked) {
  border-color: #8b2332;
  box-shadow: 0 0 0 2px rgba(139, 35, 50, 0.16);
  background: #fff;
}

.tpl-dist-item input.tpl-dist-check {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #8b2332;
  cursor: pointer;
}

.tpl-dist-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  background:
    linear-gradient(45deg, #f3ecec 25%, transparent 25%),
    linear-gradient(-45deg, #f3ecec 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f3ecec 75%),
    linear-gradient(-45deg, transparent 75%, #f3ecec 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-color: #faf6f6;
  overflow: hidden;
  flex-shrink: 0;
}

.tpl-dist-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: transparent;
}

.tpl-dist-thumb-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 12px;
  font-weight: 700;
  color: #b89aa0;
}

.tpl-dist-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 10px 12px;
  border-top: 1px solid #f0e6e8;
}

.tpl-dist-meta strong {
  font-size: 13px;
  font-weight: 800;
  color: #2a1a1c;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tpl-dist-meta span {
  font-size: 11px;
  color: var(--muted, #7a6064);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 720px) {
  .tpl-dist-catalog {
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  }
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  line-height: 1.5;
  margin: 12px 0;
  cursor: pointer;
}

.checkbox-row input {
  width: auto;
  margin: 3px 0 0;
  flex-shrink: 0;
}

.link-block {
  word-break: break-all;
  font-size: 13px;
  padding: 12px 14px;
  background: var(--surface-2);
  border-radius: 8px;
  border: 1px solid var(--border);
  margin: 12px 0;
}

.link-block a {
  font-weight: 500;
}

.link-qr-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-start;
  margin-top: 12px;
}

.link-qr-row-studio {
  align-items: center;
  gap: 28px;
  padding: 8px 0 4px;
}

.link-qr-main {
  flex: 1;
  min-width: min(100%, 220px);
}

.link-qr-slot {
  flex-shrink: 0;
}

.link-qr-slot-lg .link-qr-wrap {
  padding: 16px 18px 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.link-qr-slot-lg .link-qr-canvas {
  width: 240px !important;
  height: 240px !important;
}

.link-qr-slot-lg .link-qr-caption {
  font-size: 13px;
  font-weight: 700;
  color: var(--brand);
  margin-top: 4px;
}

.link-qr-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px;
  background: var(--surface-2, #faf8f7);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

button.link-qr-wrap {
  font: inherit;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

button.link-qr-wrap:hover {
  border-color: var(--brand);
  box-shadow: 0 4px 14px rgba(139, 35, 50, 0.12);
}

button.link-qr-wrap:active {
  transform: scale(0.98);
}

button.link-qr-wrap:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.link-qr-hint {
  font-size: 10px;
  font-weight: 600;
  color: var(--brand);
  opacity: 0.85;
}

.link-qr-canvas {
  display: block;
  border-radius: 6px;
  pointer-events: none;
}

.link-qr-caption {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}

/* 二维码大图预览 */
.oni-qr-lightbox {
  position: fixed;
  inset: 0;
  z-index: 8000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.oni-qr-lightbox.hidden {
  display: none !important;
}

.oni-qr-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 12, 14, 0.55);
  backdrop-filter: blur(2px);
}

.oni-qr-lightbox-panel {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  background: #fff;
  border-radius: 14px;
  padding: 16px 18px 18px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22);
}

.oni-qr-lightbox-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.oni-qr-lightbox-head strong {
  font-size: 16px;
}

.oni-qr-lightbox-close {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: #f3eeed;
  color: #333;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.oni-qr-lightbox-close:hover {
  background: #e8e0df;
}

.oni-qr-lightbox-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 8px 0 4px;
}

.oni-qr-lightbox-canvas {
  width: min(72vw, 360px);
  height: min(72vw, 360px);
  max-width: 100%;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--border);
}

.oni-qr-lightbox-url {
  margin: 0;
  max-width: 100%;
  font-size: 12px;
  color: var(--muted);
  word-break: break-all;
  text-align: center;
  line-height: 1.4;
}

.oni-qr-lightbox-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.oni-qr-lightbox-actions .btn {
  flex: 1;
  min-height: 44px;
}

body.oni-qr-lightbox-open {
  overflow: hidden;
}

@media (max-width: 640px) {
  .link-qr-row-studio {
    flex-direction: column;
    align-items: stretch;
  }

  .link-qr-slot-lg {
    align-self: center;
  }

  .link-qr-slot-lg .link-qr-canvas {
    width: min(72vw, 220px) !important;
    height: min(72vw, 220px) !important;
  }
}

.link-qr-fail {
  font-size: 12px;
  color: #c62828;
}

.album-link-qr-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-start;
  margin-top: 10px;
}

.album-link-col {
  flex: 1;
  min-width: min(100%, 200px);
}

.album-link-note {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.album-qr-col {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex-shrink: 0;
}

.album-qr-col .link-qr-wrap {
  padding: 8px;
}

.album-qr-col .link-qr-canvas {
  width: 112px !important;
  height: 112px !important;
}

.meta-line {
  font-size: 12px;
  color: var(--muted);
  margin: 8px 0;
}

.meta-line code {
  font-size: 12px;
  background: var(--surface-2);
  padding: 2px 6px;
  border-radius: 4px;
}
.store-password-plain {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  background: #f4eef0;
  color: #8b2332;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.admin-table .muted,
.store-mobile-meta .muted {
  color: #998a8e;
  font-size: 12px;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.overview-quick-actions {
  gap: 12px;
  margin-top: 16px;
}

.overview-quick-actions .btn {
  min-height: 44px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 700;
}

.overview-quick-actions .overview-quick-btn {
  min-height: 48px;
  padding: 12px 22px;
  font-size: 15px;
}

/* —— 超管：门店详情管理 —— */
.admin-store-detail-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.admin-store-detail {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.admin-store-stats {
  margin: 0;
}

.admin-store-album-card {
  margin-top: 12px;
}

.admin-store-tpl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.admin-store-tpl-item {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #faf7f6;
}

.admin-store-tpl-thumb {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  cursor: zoom-in;
  flex-shrink: 0;
  border-radius: 6px;
  overflow: hidden;
  line-height: 0;
}

.admin-store-tpl-thumb:hover {
  outline: 2px solid rgba(139, 35, 50, 0.35);
  outline-offset: 1px;
}

.admin-store-tpl-item img,
.admin-store-tpl-empty {
  width: 48px;
  height: 64px;
  object-fit: cover;
  border-radius: 6px;
  background: #ebe6e3;
  flex-shrink: 0;
  display: block;
  pointer-events: none;
}

.admin-store-tpl-meta {
  min-width: 0;
  flex: 1;
}

.admin-store-tpl-item strong {
  display: block;
  font-size: 13px;
  margin-bottom: 2px;
}

.admin-store-tpl-item span {
  font-size: 11px;
  color: var(--muted);
}

.admin-store-tpl-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.admin-store-tpl-actions .btn {
  padding: 4px 10px;
  font-size: 12px;
}

.oni-img-lightbox-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.oni-img-lightbox-head-actions .btn {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.oni-img-lightbox-head-actions .btn:hover {
  background: rgba(255, 255, 255, 0.22);
}

/* —— 用户云相册：工具栏 + 左列表右详情 —— */
.album-workspace {
  padding: 16px 18px 20px;
}

.album-toolbar {
  display: grid;
  grid-template-columns: minmax(160px, 1.4fr) repeat(3, minmax(120px, 1fr));
  gap: 10px 12px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.album-toolbar-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.album-toolbar-field input,
.album-toolbar-field select {
  width: 100%;
  margin: 0;
  font-weight: 500;
  color: inherit;
}

.album-master-detail {
  display: grid;
  grid-template-columns: minmax(240px, 300px) 1fr;
  gap: 16px;
  align-items: start;
  min-height: 420px;
}

.album-side {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #faf7f6;
  padding: 10px;
  max-height: calc(100vh - 220px);
  overflow: auto;
  position: sticky;
  top: 12px;
}

.album-side-new {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-bottom: 8px;
  border: 1.5px dashed var(--brand);
  border-radius: 10px;
  background: #fdf8f9;
  color: var(--brand);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.album-side-new.active,
.album-side-new:hover {
  background: rgba(139, 35, 50, 0.08);
}

.album-side-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.album-side-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px;
  border: 2px solid transparent;
  border-radius: 10px;
  background: #fff;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.album-side-item:hover {
  border-color: #d4a5ad;
}

.album-side-item.active {
  border-color: var(--brand);
  background: #fdf8f9;
}

.album-side-thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  background: #ebe6e3;
  flex-shrink: 0;
}

.album-side-thumb-empty {
  border: 1px dashed var(--border);
  background:
    linear-gradient(135deg, #f3ecee 0%, #ebe4e2 100%);
  position: relative;
}

.album-side-thumb-empty::after {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1.5px solid #c9b4b8;
  border-radius: 4px;
  opacity: 0.7;
}

.album-side-meta {
  min-width: 0;
  flex: 1;
}

.album-side-meta strong {
  display: block;
  font-size: 13px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.album-side-meta span {
  font-size: 11px;
  color: var(--muted);
}

.album-list-empty {
  margin: 12px 4px 4px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

.album-detail {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  background: #fff;
}

.album-mobile-back {
  display: none;
  align-items: center;
  gap: 6px;
  margin: 0 0 10px;
  padding: 8px 4px;
  border: none;
  background: transparent;
  color: var(--brand);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.album-detail-title {
  margin: 0 0 6px;
  font-size: 18px;
}

.album-detail-desc {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.album-detail-actions {
  margin-top: 14px;
}

.album-photo-section {
  margin: 0 0 14px;
}

.album-photo-grid-wrap {
  margin: 0;
}

.album-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
}

.album-photo-grid .album-preview-thumb {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 10px;
}

.album-photo-grid-empty {
  padding: 8px 0 2px;
}

.album-upload-zone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  margin: 0 0 16px;
  padding: 20px 16px;
  border: 1.5px dashed #d4a5ad;
  border-radius: 12px;
  background: #fdf8f9;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.album-upload-zone:hover,
.album-upload-zone.is-dragover {
  background: rgba(139, 35, 50, 0.06);
  border-color: #8b2332;
}

.album-upload-zone.is-uploading {
  pointer-events: none;
  opacity: 0.85;
}

.album-upload-zone-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.album-upload-zone-inner strong {
  font-size: 15px;
  color: #2a1a1c;
}

.album-upload-zone-inner span {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

.album-upload-zone-cta {
  margin-top: 4px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 8px;
  background: #8b2332;
  color: #fff !important;
  font-size: 13px !important;
  font-weight: 700;
}

.album-upload-progress {
  margin-top: 4px;
}

.album-upload-progress.hidden {
  display: none !important;
}

.album-upload-progress-bar {
  height: 6px;
  border-radius: 999px;
  background: #efe4e6;
  overflow: hidden;
}

.album-upload-progress-bar i {
  display: block;
  height: 100%;
  width: 0;
  background: #8b2332;
  transition: width 0.2s ease;
}

.album-upload-progress-text {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 720px) {
  .album-photo-grid {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 8px;
  }
}

.album-create-pane label {
  display: block;
  margin-top: 10px;
}

.album-days-hint,
.tpl-list-quota {
  margin: 6px 0 12px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.tpl-list-quota.is-full {
  color: var(--brand);
  font-weight: 700;
}

#statStorageUsed.is-near-limit {
  color: var(--brand);
}

/* —— 看板分块 + 云盘图表 —— */
.dash-board {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dash-board-tabs {
  gap: 0;
  background: var(--card, #fff);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.dash-today-strip {
  padding: 14px 16px 16px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #fff9f9 0%, #fff 100%);
}

.dash-today-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.dash-today-head strong {
  font-size: 15px;
  font-weight: 800;
  color: #2a1a1c;
}

.dash-today-head span {
  font-size: 12px;
  color: var(--muted, #7a6064);
}

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

.dash-today-card {
  padding: 12px 12px 10px;
  border: 1px solid #f0e6e8;
  border-radius: 12px;
  background: #fff;
  min-width: 0;
}

.dash-today-card.is-primary {
  border-color: #e4b8bf;
  background: #fdf6f7;
}

.dash-today-label {
  font-size: 12px;
  font-weight: 700;
  color: #7a6064;
  margin-bottom: 4px;
}

.dash-today-value {
  font-size: 28px;
  font-weight: 900;
  line-height: 1.1;
  color: #8b2332;
  letter-spacing: -0.02em;
}

.dash-today-sub {
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted, #7a6064);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

@media (max-width: 480px) {
  .dash-today-grid {
    grid-template-columns: 1fr 1fr;
  }
  .dash-today-value {
    font-size: 24px;
  }
}

.dash-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-bottom: 1px solid var(--border);
  background: #faf7f7;
  scrollbar-width: thin;
}

.dash-tab {
  flex: 0 0 auto;
  appearance: none;
  border: 0;
  background: transparent;
  padding: 12px 16px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted, #7a6064);
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.dash-tab:hover {
  color: #2a1a1c;
  background: rgba(139, 35, 50, 0.04);
}

.dash-tab.active {
  color: #8b2332;
  border-bottom-color: #8b2332;
  background: #fff;
}

.dash-tab-panels {
  padding: 16px;
}

.dash-tab-panel {
  display: none;
}

.dash-tab-panel.active {
  display: block;
}

/* 旧折叠块样式保留，避免其它页面残留引用 */
.dash-block {
  background: var(--card, #fff);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.dash-block-summary {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 12px;
  padding: 14px 16px;
  cursor: pointer;
  user-select: none;
  position: relative;
  padding-right: 40px;
}

.dash-block-summary::-webkit-details-marker {
  display: none;
}

.dash-block-title {
  font-size: 16px;
  font-weight: 800;
  color: inherit;
}

.dash-block-desc {
  font-size: 12px;
  color: var(--muted);
  flex: 1 1 180px;
}

.dash-block-chevron {
  position: absolute;
  right: 16px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.15s ease;
}

.dash-block[open] .dash-block-chevron {
  transform: translateY(-30%) rotate(225deg);
}

.dash-block-body {
  padding: 0 16px 16px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.dash-empty {
  margin: 0;
}

.dash-resource-intro {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.dash-resource-intro strong {
  color: #8b2332;
}

.dash-resource-quotas {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.dash-quota-card {
  background: #faf7f7;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
}

.dash-quota-card.is-over {
  border-color: #d4a5ad;
  background: #fdf4f5;
}

.dash-quota-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.dash-quota-card-label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

.dash-quota-card-head strong {
  font-size: 15px;
  color: #2a1a1c;
  white-space: nowrap;
}

.dash-quota-card .dash-quota-track {
  margin: 0;
}

.dash-quota-card .dash-quota-caption {
  margin: 6px 0 0;
  font-size: 11px;
  line-height: 1.4;
}

.dash-resource-section {
  margin-top: 4px;
}

.dash-section-title {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 700;
  color: #2a1a1c;
}

.dash-storage {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 720px) {
  .dash-storage {
    grid-template-columns: 1fr;
  }
}

.dash-storage-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.dash-donut {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: conic-gradient(var(--brand) 0deg var(--used-deg, 0deg), #ebe4df var(--used-deg, 0deg) 360deg);
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.dash-donut-hole {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.dash-donut-hole strong {
  font-size: 26px;
  line-height: 1;
  color: var(--brand);
}

.dash-donut-hole span {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.dash-storage-summary {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dash-storage-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
}

.dash-storage-line.muted {
  color: var(--muted);
  font-size: 12px;
}

.dash-storage-bars-title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
}

.dash-bar-row {
  display: grid;
  grid-template-columns: 1fr 44px;
  grid-template-rows: auto auto;
  gap: 4px 8px;
  margin-bottom: 10px;
}

.dash-bar-label {
  grid-column: 1;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  gap: 8px;
}

.dash-bar-track {
  grid-column: 1;
  height: 10px;
  border-radius: 999px;
  background: #efe8e5;
  overflow: hidden;
}

.dash-bar-fill {
  height: 100%;
  border-radius: inherit;
  min-width: 0;
}

.dash-bar-pct {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-align: right;
}

.dash-quota-track {
  margin-top: 8px;
  height: 8px;
  border-radius: 999px;
  background: #efe8e5;
  overflow: hidden;
}

.dash-quota-fill {
  height: 100%;
  background: linear-gradient(90deg, #8B2332, #c47884);
  border-radius: inherit;
}

.dash-quota-caption {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.dash-ops-grid {
  margin: 0;
}

.overview-board-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.overview-board-title {
  margin: 0 0 4px;
  font-size: 18px;
}

.dash-board-host {
  min-height: 40px;
}

@media (max-width: 960px) {
  .album-toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .album-toolbar-search {
    grid-column: 1 / -1;
  }

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

  .album-side {
    position: static;
    max-height: none;
  }

  #panelAlbums.album-mobile-list .album-detail {
    display: none;
  }

  #panelAlbums.album-mobile-detail .album-side,
  #panelAlbums.album-mobile-detail .album-toolbar {
    display: none;
  }

  #panelAlbums.album-mobile-detail .album-mobile-back {
    display: inline-flex;
  }
}

/* —— 相册列表卡片（兼容） —— */
.admin-entity-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-entity-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.admin-entity-card h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.admin-entity-card .admin-entity-meta {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

.admin-entity-card .admin-entity-meta a {
  word-break: break-all;
}

.album-preview-strip {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 10px;
  margin: 0 0 4px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.album-preview-thumb {
  flex: 0 0 auto;
  display: block;
  width: 64px;
  height: 64px;
  padding: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-2);
  cursor: zoom-in;
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
}

.album-preview-thumb:hover {
  border-color: #c47884;
  box-shadow: 0 0 0 2px rgba(139, 35, 50, 0.12);
}

.album-preview-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

/* 相册照片大图预览 */
.oni-img-lightbox.hidden {
  display: none !important;
}

.oni-img-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.oni-img-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 10, 12, 0.72);
}

.oni-img-lightbox-panel {
  position: relative;
  width: min(920px, 100%);
  max-height: min(92vh, 860px);
  display: flex;
  flex-direction: column;
  background: #1c1214;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.35);
  color: #fff;
}

.oni-img-lightbox-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.06);
}

.oni-img-lightbox-head strong {
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.oni-img-lightbox-close {
  appearance: none;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  opacity: 0.85;
}

.oni-img-lightbox-close:hover {
  opacity: 1;
}

.oni-img-lightbox-body {
  position: relative;
  flex: 1 1 auto;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 48px;
}

.oni-img-lightbox-img {
  max-width: 100%;
  max-height: min(72vh, 720px);
  object-fit: contain;
  border-radius: 4px;
  background: #000;
}

.oni-img-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  appearance: none;
  border: 0;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.oni-img-nav:hover {
  background: rgba(255, 255, 255, 0.24);
}

.oni-img-nav.hidden {
  display: none !important;
}

.oni-img-prev {
  left: 8px;
}

.oni-img-next {
  right: 8px;
}

.oni-img-lightbox-meta {
  margin: 0;
  padding: 8px 14px 12px;
  text-align: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
}

body.oni-img-lightbox-open {
  overflow: hidden;
}

@media (max-width: 640px) {
  .oni-img-lightbox-body {
    padding: 12px 40px;
  }

  .oni-img-lightbox-img {
    max-height: 62vh;
  }
}

.album-preview-more {
  flex: 0 0 auto;
  align-self: center;
  min-width: 48px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px dashed var(--border);
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.album-preview-empty {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--muted);
}

body.admin-app-mobile .album-preview-thumb {
  width: 72px;
  height: 72px;
}

body.admin-app-mobile .album-preview-more {
  height: 72px;
}

/* 门店模板面板在壳层内全宽 */
.admin-panel .tpl-panel {
  padding: 20px;
}

.admin-panel .tpl-panel.card {
  margin-bottom: 0;
}

/* —— PC 模板两层：全宽列表 + 编辑（左侧图位） —— */
.tpl-list-view.hidden,
.tpl-editor-view.hidden {
  display: none !important;
}

.tpl-list-card {
  padding: 20px 22px 24px;
}

.tpl-list-intro {
  margin-bottom: 14px;
}

.tpl-list-title {
  margin: 0 0 6px;
  font-size: 18px;
}

.tpl-list-desc {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.tpl-list-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  align-items: flex-end;
  margin: 0 0 16px;
  padding: 12px 14px;
  background: #faf7f7;
  border: 1px solid var(--border, #e8e0e2);
  border-radius: 12px;
}

.tpl-filter-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 120px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.tpl-filter-search {
  flex: 1 1 180px;
  min-width: 160px;
}

.tpl-filter-field input,
.tpl-filter-field select {
  height: 38px;
  border: 1px solid var(--border, #e0d6d8);
  border-radius: 8px;
  padding: 0 10px;
  font-size: 13px;
  font-family: inherit;
  background: #fff;
  color: var(--text, #1c1214);
}

.tpl-filter-count {
  margin: 0 0 2px auto;
  font-size: 12px;
  font-weight: 700;
  color: var(--brand, #8b2332);
  white-space: nowrap;
}

.tpl-quick-toggle {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  border: none;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.tpl-quick-toggle.is-on {
  background: #fff;
  color: #8b2332;
}

.tpl-quick-toggle.is-off {
  background: #2e7d32;
  color: #fff;
}

.tpl-card-action.is-toggle-on {
  color: #2e7d32;
  background: rgba(46, 125, 50, 0.08);
}

.tpl-card-action.is-toggle-off {
  color: #8b2332;
}

.tpl-list-empty {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  padding: 28px 12px 8px;
}

.tpl-pc-gallery {
  display: grid !important;
  /* 更大卡片、更少列，预览看得更全 */
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
  width: 100%;
}

@media (min-width: 1280px) {
  .tpl-pc-gallery {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
  }
}

.tpl-pc-gallery .tpl-gallery-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 0;
  overflow: hidden;
  text-align: left;
  border-radius: 14px;
  min-height: 0;
  background: #fff;
  border: 1px solid var(--border, #e8e0e2);
  position: relative;
}

.tpl-pc-gallery .tpl-gallery-card.is-inactive {
  opacity: 0.78;
  background: #faf7f7;
}

.tpl-pc-gallery .tpl-gallery-open {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.tpl-pc-gallery .tpl-gallery-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 5 / 7;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(180deg, #f3eeeb 0%, #ebe4df 100%);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  flex-shrink: 0;
  padding: 10px 12px;
  box-sizing: border-box;
}

.tpl-pc-gallery .tpl-gallery-thumb.is-pending-preview::after {
  content: "预览生成中";
  position: absolute;
  inset: auto 12px 14px;
  z-index: 1;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: rgba(90, 70, 60, 0.55);
  text-align: center;
  pointer-events: none;
}

.tpl-status-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.3;
}

.tpl-status-badge.is-on {
  background: rgba(46, 125, 50, 0.92);
  color: #fff;
}

.tpl-status-badge.is-off {
  background: rgba(90, 90, 90, 0.88);
  color: #fff;
}

.tpl-origin-tag {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}

.tpl-origin-tag.is-custom {
  color: var(--brand, #8b2332);
}

.tpl-card-sub {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.tpl-status-inline.is-on {
  color: #2e7d32;
  font-weight: 700;
}

.tpl-status-inline.is-off {
  color: #777;
  font-weight: 700;
}

.tpl-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--border, #e8e0e2);
  background: #faf8f7;
}

.tpl-card-action {
  border: none;
  border-right: 1px solid var(--border, #e8e0e2);
  background: transparent;
  padding: 10px 4px;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  color: var(--brand, #8b2332);
  cursor: pointer;
}

.tpl-card-action:last-child {
  border-right: none;
}

.tpl-card-action:hover {
  background: rgba(139, 35, 50, 0.06);
}

.tpl-card-action:active {
  background: rgba(139, 35, 50, 0.1);
}

.tpl-card-action.is-danger {
  color: #a33;
}

.tpl-card-item.is-inactive .tpl-gallery-thumb img {
  filter: grayscale(0.35);
}

.tpl-pc-gallery .tpl-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  border-radius: 4px;
  display: block;
  background: transparent;
  max-height: none;
}

.tpl-pc-gallery .tpl-gallery-new {
  border-style: dashed;
  border-color: var(--brand);
  background: #fdf8f9;
}

.tpl-pc-gallery .tpl-gallery-new-visual {
  background: rgba(139, 35, 50, 0.06);
  border-bottom: 1px dashed rgba(139, 35, 50, 0.25);
}

.tpl-pc-gallery .tpl-gallery-new-visual span {
  font-size: 52px;
  font-weight: 300;
  line-height: 1;
  color: var(--brand);
}

.tpl-pc-gallery .tpl-gallery-card .meta {
  padding: 12px 14px 14px;
  width: 100%;
}

.tpl-pc-gallery .tpl-gallery-card .meta strong {
  font-size: 15px;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tpl-pc-gallery .tpl-gallery-enter {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--brand);
}

.tpl-card-item.just-saved {
  outline: 2px solid var(--brand, #8b2332);
  box-shadow: 0 0 0 4px rgba(139, 35, 50, 0.18);
  animation: tplJustSaved 1.6s ease;
}

@keyframes tplJustSaved {
  0% { transform: scale(0.98); }
  40% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

.tpl-busy-overlay {
  position: fixed;
  inset: 0;
  z-index: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(28, 18, 20, 0.45);
  backdrop-filter: blur(2px);
}

.tpl-busy-overlay.hidden {
  display: none !important;
}

.tpl-busy-card {
  width: min(360px, 100%);
  background: #fff;
  border-radius: 16px;
  padding: 28px 24px 22px;
  text-align: center;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

.tpl-busy-spinner {
  width: 36px;
  height: 36px;
  margin: 0 auto 14px;
  border-radius: 50%;
  border: 3px solid #efe4e6;
  border-top-color: #8b2332;
  animation: tplBusySpin 0.8s linear infinite;
}

@keyframes tplBusySpin {
  to { transform: rotate(360deg); }
}

.tpl-busy-title {
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 800;
  color: #1c1214;
}

.tpl-busy-bar {
  height: 8px;
  border-radius: 999px;
  background: #efe4e6;
  overflow: hidden;
}

.tpl-busy-bar i {
  display: block;
  height: 100%;
  width: 0;
  background: #8b2332;
  transition: width 0.25s ease;
}

.tpl-busy-sub {
  margin: 12px 0 0;
  font-size: 12px;
  color: #8a7a7d;
}

body.tpl-busy-open {
  overflow: hidden;
}

.tpl-editor-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.tpl-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 4px;
  border: none;
  background: transparent;
  color: var(--brand);
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}

.tpl-back-btn:hover {
  opacity: 0.85;
}

.tpl-editor-bar-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tpl-editor-bar-actions .btn {
  min-width: 120px;
}

.tpl-workspace-editor {
  grid-template-columns: minmax(220px, 280px) 1fr;
}

.tpl-slot-sidebar {
  position: sticky;
  top: 12px;
  max-height: calc(100vh - 140px);
  background: #faf7f6;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 12px;
  border-right: 1px solid var(--border);
}

.tpl-slot-sidebar-title {
  margin: 0;
  font-size: 15px;
}

.tpl-slot-sidebar-desc {
  font-size: 12px;
  color: var(--muted);
  margin: 8px 0 12px;
  line-height: 1.45;
}

.tpl-layer-panel {
  margin: 0 0 16px;
  padding: 0 0 14px;
  border-bottom: 1px solid var(--border, #e8dfda);
}

.tpl-layer-opts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tpl-layer-opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border, #e2d6d0);
  border-radius: 10px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  font: inherit;
  color: inherit;
}

.tpl-layer-opt:hover {
  border-color: #d4a5ad;
}

.tpl-layer-opt.is-active {
  border-color: var(--brand, #8b2332);
  background: rgba(139, 35, 50, 0.06);
  box-shadow: inset 0 0 0 1px rgba(139, 35, 50, 0.18);
}

.tpl-layer-opt-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.tpl-layer-opt-main strong {
  font-size: 13px;
  font-weight: 700;
}

.tpl-layer-opt-main span {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.35;
}

.tpl-layer-stack {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-shrink: 0;
}

.tpl-layer-stack i {
  display: block;
  min-width: 28px;
  padding: 2px 6px;
  border-radius: 4px;
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  line-height: 1.4;
}

.tpl-layer-stack i.is-frame {
  background: #8b2332;
  color: #fff;
}

.tpl-layer-stack i.is-photo {
  background: #c5d4e8;
  color: #3a4a5c;
}

.tpl-layer-panel--mobile {
  margin: 0 0 12px;
  padding: 12px;
  border: 1px solid var(--border, #e8dfda);
  border-radius: 12px;
  border-bottom: 1px solid var(--border, #e8dfda);
  background: #fff;
}

.tpl-layer-panel--mobile .tpl-layer-opts {
  flex-direction: row;
}

.tpl-layer-panel--mobile .tpl-layer-opt {
  flex: 1;
  padding: 10px;
}

.tpl-layer-panel--mobile .tpl-layer-stack {
  display: none;
}

/* 底图类型一行 */
.tpl-upload-mode-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 4px 0 8px;
}
.tpl-upload-mode-label {
  margin: 0;
  flex: 0 0 auto;
  white-space: nowrap;
}
.tpl-upload-mode-select {
  flex: 1 1 220px;
  min-width: 160px;
  margin: 0;
}
/* 识别操作 + 画布宽高 + 出血 同一行 */
.tpl-canvas-bleed-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin: 4px 0 8px;
}
.tpl-upload-mode-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  flex: 0 1 auto;
}
.tpl-upload-mode-actions .btn {
  white-space: nowrap;
}
.tpl-inline-field {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  flex: 0 1 auto;
  white-space: nowrap;
  font-size: 12px;
  color: var(--muted, #8a7a72);
}
.tpl-inline-field span {
  flex: 0 0 auto;
}
.tpl-inline-field input {
  width: 88px;
  margin: 0;
  padding: 6px 8px;
}
.tpl-inline-field #tplBleedMm {
  width: 72px;
}

.white-key-panel .key-color-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 6px 0 12px;
}

.key-color-preset {
  min-width: 36px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--border, #e2d6d0);
  border-radius: 8px;
  background: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.key-color-preset.is-active {
  border-color: var(--brand, #8b2332);
  box-shadow: inset 0 0 0 1px rgba(139, 35, 50, 0.25);
  background: rgba(139, 35, 50, 0.06);
}

#keyColorPicker {
  width: 40px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--border, #e2d6d0);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

#btnSampleKeyColor.is-active {
  border-color: var(--brand, #8b2332);
  color: var(--brand, #8b2332);
}

/* 取色模式：拾色器光标（热点在吸管尖） */
#slotCanvasStage.is-sampling-key-color,
#slotCanvasStage.is-sampling-key-color *,
#slotCanvasStage.is-sampling-key-color #slotCanvas,
#slotCanvasStage.is-sampling-key-color .slot-overlay-layer,
#slotCanvasStage.is-sampling-key-color .store-slot-el,
#slotCanvasStage.is-sampling-key-color .slot-canvas-stack,
#slotCanvasStage.is-sampling-key-color .slot-editor-wrap {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cg fill='none' stroke='%231a1a1a' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19.5 4.5l8 8'/%3E%3Cpath d='M17.2 6.8l8 8'/%3E%3Cpath d='M22.2 9.8l-9.4 9.4-1.6 4.8 4.8-1.6 9.4-9.4'/%3E%3Cpath d='M12.2 20.8l-1.5 1.5c-.8.8-2.2.8-3 0l-.4-.4c-.8-.8-.8-2.2 0-3l1.5-1.5'/%3E%3C/g%3E%3Ccircle cx='7.2' cy='24.8' r='2.2' fill='%238b2332' stroke='%231a1a1a' stroke-width='1.2'/%3E%3C/svg%3E") 4 28, crosshair !important;
}

#slotCanvasStage.is-sampling-key-color .slot-overlay-layer,
#slotCanvasStage.is-sampling-key-color .store-slot-el {
  pointer-events: none !important;
}

.tpl-slot-sidebar .slot-list {
  max-height: none;
  overflow: visible;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tpl-slot-sidebar .slot-list-item {
  background: #fff;
  cursor: pointer;
}

.tpl-slot-sidebar .slot-list-item:hover {
  border-color: #d4a5ad;
}

.tpl-editor-heading {
  margin: 0 0 8px;
  font-size: 17px;
}

.tpl-editor-hint {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 12px;
  line-height: 1.5;
}

.tpl-canvas-foot-tip {
  font-size: 12px;
  color: var(--muted);
  margin: 8px 0 0;
}

body.tpl-pc-in-editor .tpl-list-view {
  display: none !important;
}

/* 续费弹窗 */
.oni-modal[hidden] {
  display: none !important;
}

.oni-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.oni-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(28, 18, 20, 0.45);
}

/* 防止弹窗外壳缺失时 backdrop 裸露常驻遮罩主内容区 */
body > .oni-modal-backdrop {
  display: none !important;
}

.oni-modal-sheet {
  position: relative;
  width: min(440px, 100%);
  max-height: min(90vh, 640px);
  overflow: auto;
  background: #fff;
  border-radius: 14px;
  padding: 20px 18px 16px;
  box-shadow: 0 18px 48px rgba(40, 16, 20, 0.22);
}

.oni-modal-sheet h3 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 700;
  color: #2a1a1c;
}

.oni-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.ledger-source {
  display: inline-block;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f3ecee;
  color: #6b4a50;
}

.ledger-source-manual {
  background: #fde8ec;
  color: #8b2332;
}

.ledger-source-ledger {
  background: #eef4ea;
  color: #3d5c2e;
}

.ledger-mobile-card {
  background: #fff;
  border: 1px solid #eee2e4;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
}

.ledger-mobile-card strong {
  display: block;
  margin-bottom: 4px;
}

.ledger-mobile-meta {
  font-size: 13px;
  color: var(--muted, #7a6064);
  line-height: 1.5;
}

/* —— 门店：风格调整 —— */
.branding-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 14px;
  align-items: start;
}

@media (max-width: 959px) {
  .branding-layout {
    grid-template-columns: 1fr;
  }
}

.brand-preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 10px;
  margin-bottom: 8px;
}

.brand-preset-card {
  appearance: none;
  border: 1px solid var(--border, #e8e0dc);
  background: #fff;
  border-radius: 12px;
  padding: 10px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.brand-preset-card:hover {
  border-color: #d4b8be;
}

.brand-preset-card.is-selected {
  border-color: var(--brand, #8b2332);
  box-shadow: 0 0 0 2px rgba(139, 35, 50, 0.18);
}

.brand-preset-swatch {
  height: 36px;
  border-radius: 8px;
  margin-bottom: 8px;
}

.brand-preset-name {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text, #1a1a1a);
}

.brand-preset-hint {
  display: block;
  font-size: 11px;
  color: var(--muted, #666);
  margin-top: 2px;
}

.brand-color-input {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.brand-color-input input[type="color"] {
  width: 44px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border, #e8e0dc);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  flex-shrink: 0;
}

.brand-color-input input[type="text"] {
  flex: 1;
  min-width: 7.5rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.04em;
}

.brand-color-input .btn {
  flex-shrink: 0;
  white-space: nowrap;
}

.brand-color-input .btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.brand-logo-row {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

.brand-logo-preview {
  width: 88px;
  height: 88px;
  border-radius: 12px;
  border: 1px dashed #d8c6ca;
  background: #faf6f5;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 12px;
  color: var(--muted, #666);
  flex-shrink: 0;
}

.brand-logo-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.brand-logo-actions {
  flex: 1;
  min-width: 180px;
}

.brand-preview-phone {
  --brand: #8b2332;
  --brand-dark: #6e1b28;
  --brand-light: #a83245;
  --brand-accent: #a83245;
  --brand-bg: #fdf6f4;
  --brand-bg2: #f5e8e4;
  max-width: 360px;
  margin: 0 auto;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid #e6d8d4;
  box-shadow: 0 12px 36px rgba(28, 18, 20, 0.12);
  background: var(--brand-bg);
  font-family: "Noto Sans SC", sans-serif;
}

.bp-header {
  background: var(--brand);
  color: #fff;
  padding: 14px 16px;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.bp-logo {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.bp-logo.has-brand-logo .store-brand-name,
.bp-logo .logo-tm {
  font-size: 10px;
  font-weight: 700;
  vertical-align: super;
}

.bp-logo .logo-tm {
  color: var(--brand-accent);
}

.bp-logo img.store-brand-logo {
  height: 28px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
  display: block;
}

.bp-accent-pill {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  color: #fff;
  background: var(--brand-accent);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.bp-steps {
  display: flex;
  gap: 0;
  background: #fff;
  border-bottom: 2px solid var(--brand-bg2);
}

.bp-step {
  flex: 1;
  text-align: center;
  font-size: 11px;
  color: #999;
  padding: 10px 4px 8px;
  font-weight: 600;
  position: relative;
}

.bp-step span {
  display: inline-flex;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  margin-right: 4px;
  font-size: 10px;
  background: #eee;
  color: #888;
}

.bp-step.is-active {
  color: var(--brand);
}

.bp-step.is-active span {
  background: var(--brand-accent);
  color: #fff;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-accent) 24%, transparent);
}

.bp-step.is-active::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: -2px;
  height: 2px;
  border-radius: 2px;
  background: var(--brand-accent);
}

.bp-body {
  padding: 16px;
}

.bp-eyebrow {
  margin: 0 0 12px;
  font-size: 12px;
  color: #6b6b6b;
}

.bp-tpl-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.bp-tpl-card {
  position: relative;
  background: #fff;
  border: 1px solid #eadfdc;
  border-radius: 12px;
  padding: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #333;
}

.bp-tpl-card.is-selected {
  border-color: var(--brand-accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand-accent) 28%, transparent);
}

.bp-tpl-tag {
  position: absolute;
  top: 12px;
  right: 12px;
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  background: var(--brand-accent);
  padding: 2px 6px;
  border-radius: 999px;
}

.bp-tpl-thumb {
  height: 72px;
  border-radius: 8px;
  margin-bottom: 8px;
  background:
    linear-gradient(135deg, var(--brand-bg2), #fff),
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 8px,
      color-mix(in srgb, var(--brand) 10%, transparent) 8px,
      color-mix(in srgb, var(--brand) 10%, transparent) 16px
    );
}

.bp-tpl-thumb-alt {
  background:
    linear-gradient(160deg, #fff, var(--brand-bg)),
    radial-gradient(circle at 30% 40%, color-mix(in srgb, var(--brand-accent) 22%, transparent), transparent 55%);
}

.bp-btn-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 8px;
}

.bp-btn {
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: var(--brand);
  cursor: default;
}

.bp-btn:hover {
  background: var(--brand-dark);
}

.bp-btn-accent {
  background: transparent;
  color: var(--brand-accent);
  border: 1.5px solid var(--brand-accent);
}

.bp-btn-accent:hover {
  background: color-mix(in srgb, var(--brand-accent) 10%, transparent);
}

.bp-note {
  margin: 10px 0 0;
  font-size: 11px;
  color: #999;
  text-align: center;
  line-height: 1.45;
}

@media (max-width: 420px) {
  .mobile-bottom-nav .mobile-tab {
    font-size: 10px;
    padding: 6px 2px;
  }
}

/* —— 风格：色系二级菜单 —— */
.brand-family-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.brand-family-tab {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border, #e8e0dc);
  background: #fff;
  border-radius: 999px;
  padding: 8px 12px 8px 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--text, #1a1a1a);
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.brand-family-tab:hover {
  border-color: #d4b8be;
}

.brand-family-tab.is-active {
  border-color: var(--brand, #8b2332);
  background: #faf4f5;
  box-shadow: 0 0 0 2px rgba(139, 35, 50, 0.14);
}

.brand-family-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.brand-family-dot-custom {
  background: conic-gradient(from 180deg, #8b2332, #a67c2d, #3d6b4f, #2f4f7a, #6b2d5c, #8b2332);
}

.brand-family-label {
  line-height: 1;
}

.brand-custom-hint {
  grid-column: 1 / -1;
  padding: 14px 16px;
  border-radius: 12px;
  background: #faf6f5;
  border: 1px dashed #d8c6ca;
  color: var(--muted, #666);
  font-size: 13px;
  line-height: 1.6;
}

.brand-custom-hint p {
  margin: 0 0 10px;
}

@media (max-width: 640px) {
  .brand-family-tab {
    padding: 7px 10px 7px 8px;
    font-size: 12px;
  }
}
