:root {
  --forest-950: #08150f;
  --forest-900: #0d2118;
  --forest-850: #123023;
  --forest-800: #173b2c;
  --forest-700: #24563e;
  --moss-500: #6f9b68;
  --moss-400: #8aad6f;
  --leaf-300: #bfd29d;
  --cream-100: #f5f0e4;
  --cream-200: #e9e0ce;
  --wood-700: #6b4e35;
  --wood-500: #9b7652;
  --wood-300: #c6a77f;
  --ink: #17221b;
  --muted: #6f796f;
  --line: rgba(23, 59, 44, 0.14);
  --white: #fffdf8;
  --danger: #9d3f35;
  --warning: #a36927;
  --success: #397555;
  --shadow: 0 24px 70px rgba(22, 43, 31, 0.13);
  --radius: 22px;
  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--cream-100);
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
  line-height: 1.65;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background:
    radial-gradient(circle at 8% 10%, rgba(111, 155, 104, 0.18), transparent 26rem),
    radial-gradient(circle at 92% 8%, rgba(155, 118, 82, 0.12), transparent 30rem),
    linear-gradient(145deg, var(--cream-100), #eee8da 52%, #e5eadb);
}

.page-grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.15;
  background-image:
    linear-gradient(rgba(23, 59, 44, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 59, 44, 0.08) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

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

.container {
  width: min(calc(100% - 40px), var(--max-width));
  margin-inline: auto;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid transparent;
  background: rgba(245, 240, 228, 0.82);
  backdrop-filter: blur(18px);
}

.site-header.is-scrolled {
  border-color: var(--line);
}

.nav {
  position: relative;
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px 14px 14px 4px;
  color: var(--cream-100);
  background: var(--forest-800);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

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

.brand-copy strong {
  letter-spacing: 0.12em;
}

.brand-copy small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.56rem;
  letter-spacing: 0.14em;
}

.nav-links,
.auth-header-links {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #425047;
  font-size: 0.9rem;
}

.nav-links a,
.auth-header-links a {
  transition: color 160ms ease;
}

.nav-links a:hover,
.auth-header-links a:hover {
  color: var(--forest-700);
}

.admin-link {
  color: var(--wood-700);
  font-weight: 700;
}

.logout-form {
  margin: 0;
}

.logout-form button {
  padding: 0;
  border: 0;
  color: var(--danger);
  background: transparent;
  cursor: pointer;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
}

.nav-toggle span:not(.sr-only) {
  display: block;
  height: 2px;
  margin: 4px 0;
  background: var(--forest-800);
}

.flash-stack {
  display: grid;
  padding-top: 18px;
  gap: 8px;
}

.flash {
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--white);
  box-shadow: 0 10px 28px rgba(20, 45, 31, 0.08);
  font-size: 0.9rem;
}

.flash-success { border-color: rgba(57, 117, 85, 0.35); color: var(--success); }
.flash-error { border-color: rgba(157, 63, 53, 0.35); color: var(--danger); }
.flash-warning { border-color: rgba(163, 105, 39, 0.35); color: var(--warning); }

.button {
  display: inline-flex;
  min-height: 48px;
  padding: 0 20px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-2px);
}

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

.button-primary {
  color: var(--cream-100);
  background: var(--forest-800);
}

.button-primary:hover:not(:disabled) {
  background: var(--forest-700);
}

.button-secondary {
  border-color: var(--line);
  color: var(--forest-800);
  background: var(--white);
}

.button-ghost {
  border-color: transparent;
  color: var(--wood-700);
  background: rgba(155, 118, 82, 0.08);
}

.button-danger {
  color: #fff;
  background: var(--danger);
}

.button-light {
  color: var(--forest-900);
  background: var(--cream-100);
}

.button-small {
  min-height: 38px;
  padding-inline: 14px;
  font-size: 0.82rem;
}

.button-block {
  width: 100%;
}

.eyebrow {
  display: flex;
  margin: 0 0 16px;
  align-items: center;
  gap: 10px;
  color: var(--wood-700);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.eyebrow span {
  width: 26px;
  height: 1px;
  background: currentColor;
}

.auth-layout {
  display: grid;
  min-height: calc(100vh - 150px);
  padding: 72px 0;
  grid-template-columns: 1.08fr 0.92fr;
  align-items: center;
  gap: 9vw;
}

.auth-story h1 {
  margin: 0;
  color: var(--forest-900);
  font-size: clamp(3.2rem, 7vw, 6.3rem);
  line-height: 1.02;
  letter-spacing: -0.065em;
}

.auth-story h1 strong {
  color: var(--wood-500);
  font-weight: 800;
}

.auth-story > p:not(.eyebrow) {
  max-width: 590px;
  color: #56645a;
  font-size: 1.05rem;
}

.forest-lines {
  position: relative;
  width: min(100%, 500px);
  height: 110px;
  margin-top: 36px;
  border-bottom: 1px solid rgba(23, 59, 44, 0.15);
}

.forest-lines i {
  position: absolute;
  bottom: 0;
  width: 82px;
  height: 95px;
  border: 1px solid rgba(23, 59, 44, 0.18);
  border-radius: 100% 0 18px 18px;
  background: linear-gradient(160deg, rgba(111, 155, 104, 0.25), rgba(23, 59, 44, 0.04));
  transform-origin: bottom center;
}

.forest-lines i:nth-child(1) { left: 5%; height: 66px; transform: rotate(-9deg); }
.forest-lines i:nth-child(2) { left: 20%; height: 94px; transform: rotate(-4deg); }
.forest-lines i:nth-child(3) { left: 36%; height: 72px; transform: rotate(3deg); }
.forest-lines i:nth-child(4) { left: 54%; height: 102px; transform: rotate(7deg); }
.forest-lines i:nth-child(5) { left: 72%; height: 63px; transform: rotate(12deg); }

.auth-card {
  padding: clamp(28px, 5vw, 48px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 253, 248, 0.9);
  box-shadow: var(--shadow);
}

.auth-card-heading h2,
.form-heading h1,
.page-hero h1,
.dashboard-hero h1 {
  margin: 0;
  color: var(--forest-900);
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.12;
  letter-spacing: -0.045em;
}

.auth-card-heading > p:last-child,
.form-heading > p:last-child,
.page-hero > p:not(.eyebrow),
.dashboard-hero .lead {
  margin: 12px 0 0;
  color: var(--muted);
}

.form-stack {
  display: grid;
  margin-top: 26px;
  gap: 18px;
}

.form-grid {
  display: grid;
  padding: 34px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.compact-grid {
  margin-top: 20px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.field {
  display: grid;
  gap: 8px;
}

.field > span {
  color: #344239;
  font-size: 0.86rem;
  font-weight: 700;
}

.field small {
  color: var(--muted);
  font-size: 0.74rem;
}

.field input,
.search-form input,
.inline-actions input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(23, 59, 44, 0.18);
  border-radius: 12px;
  outline: none;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.field input:focus,
.search-form input:focus,
.inline-actions input:focus {
  border-color: var(--moss-500);
  box-shadow: 0 0 0 4px rgba(111, 155, 104, 0.14);
}

.field-wide {
  grid-column: 1 / -1;
}

.input-action {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.input-action input {
  flex: 1;
}

.form-row {
  display: flex;
  align-items: center;
  gap: 15px;
}

.form-row-between {
  justify-content: space-between;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.text-link {
  color: var(--forest-700);
  font-weight: 700;
}

.muted {
  color: var(--muted);
  font-size: 0.82rem;
}

.auth-switch {
  margin: 24px 0 0;
  color: var(--muted);
  text-align: center;
}

.auth-switch a {
  color: var(--wood-700);
  font-weight: 800;
}

.form-page {
  padding-top: 70px;
  padding-bottom: 90px;
}

.form-page.narrow {
  max-width: 680px;
}

.form-heading {
  max-width: 760px;
  margin-bottom: 34px;
}

.page-hero {
  padding-top: 72px;
  padding-bottom: 36px;
}

.page-hero-row,
.section-title-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
}

.page-hero h1 {
  font-size: clamp(2.5rem, 5vw, 4.6rem);
}

.section-block {
  padding-top: 30px;
  padding-bottom: 80px;
}

.section-title-row h2,
.info-panel h2,
.install-guide h2 {
  margin: 0;
  color: var(--forest-900);
}

.dashboard-hero {
  display: flex;
  padding-top: 70px;
  padding-bottom: 35px;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
}

.status-card {
  min-width: 320px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.82);
}

.status-card p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.75rem;
}

.status-card strong {
  display: block;
  color: var(--forest-800);
}

.status-card a {
  display: inline-block;
  margin-top: 12px;
  color: var(--wood-700);
  font-size: 0.82rem;
  font-weight: 700;
}

.status-card.is-active { border-color: rgba(57, 117, 85, 0.3); }
.status-card.is-inactive { border-color: rgba(163, 105, 39, 0.28); }

.metrics-grid,
.admin-metrics {
  display: grid;
  padding-top: 16px;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.metric-card {
  display: grid;
  min-height: 160px;
  padding: 24px;
  align-content: space-between;
}

.metric-card > span {
  color: var(--muted);
  font-size: 0.8rem;
}

.metric-card > strong {
  color: var(--forest-800);
  font-size: 2.6rem;
  line-height: 1;
}

.metric-card small {
  color: var(--muted);
}

.empty-state {
  padding: 50px;
  text-align: center;
}

.empty-state strong {
  display: block;
  color: var(--forest-900);
  font-size: 1.3rem;
}

.empty-state p {
  margin: 8px 0 20px;
  color: var(--muted);
}

.table-panel {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

th,
td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  color: #5c685e;
  background: rgba(23, 59, 44, 0.035);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover {
  background: rgba(111, 155, 104, 0.045);
}

.status-pill {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--forest-800);
  background: rgba(111, 155, 104, 0.15);
  font-size: 0.72rem;
  font-weight: 700;
}

.status-pending_review,
.status-pending_payment,
.status-refund_pending,
.status-pending { color: var(--warning); background: rgba(163, 105, 39, 0.12); }
.status-rejected,
.status-disabled { color: var(--danger); background: rgba(157, 63, 53, 0.11); }
.status-approved,
.status-active,
.status-refunded { color: var(--success); background: rgba(57, 117, 85, 0.12); }

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

.settings-card {
  padding: 28px;
}

.settings-card-wide {
  grid-column: 1 / -1;
}

.settings-card h2 {
  margin: 0 0 18px;
  color: var(--forest-900);
  font-size: 1.2rem;
}

.avatar-preview {
  display: grid;
  width: 92px;
  height: 92px;
  margin-bottom: 22px;
  overflow: hidden;
  place-items: center;
  border-radius: 28px 28px 28px 8px;
  color: var(--cream-100);
  background: var(--forest-700);
  font-size: 2rem;
  font-weight: 800;
}

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

.phone-grid {
  display: grid;
  margin: 24px 0 6px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.notice {
  margin-bottom: 20px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 253, 248, 0.8);
}

.notice-warning { border-color: rgba(163, 105, 39, 0.35); color: var(--warning); }
.notice-success { border-color: rgba(57, 117, 85, 0.3); color: var(--success); }

.plan-grid {
  display: grid;
  padding-top: 22px;
  padding-bottom: 30px;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.plan-card {
  position: relative;
  padding: 32px;
  overflow: hidden;
}

.plan-card.featured {
  border-color: rgba(36, 86, 62, 0.45);
  background: linear-gradient(155deg, var(--forest-850), var(--forest-800));
  color: var(--cream-100);
  transform: translateY(-10px);
}

.plan-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--forest-900);
  background: var(--leaf-300);
  font-size: 0.68rem;
  font-weight: 800;
}

.plan-name {
  margin: 0 0 20px;
  color: var(--wood-500);
  font-weight: 800;
  letter-spacing: 0.12em;
}

.plan-card.featured .plan-name {
  color: var(--leaf-300);
}

.plan-card h2 {
  margin: 0;
  font-size: 2.8rem;
  line-height: 1;
}

.plan-days {
  color: var(--muted);
}

.plan-card.featured .plan-days,
.plan-card.featured li {
  color: rgba(245, 240, 228, 0.72);
}

.plan-card ul {
  display: grid;
  min-height: 115px;
  padding: 0;
  margin: 26px 0;
  gap: 9px;
  list-style: none;
  color: var(--muted);
  font-size: 0.86rem;
}

.plan-card li::before {
  margin-right: 8px;
  content: "•";
  color: var(--moss-500);
}

.info-panel,
.install-guide {
  padding: 32px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.info-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.info-grid b {
  color: var(--ink);
}

.slot-counter {
  display: grid;
  min-width: 180px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.8);
  text-align: right;
}

.slot-counter span {
  color: var(--muted);
  font-size: 0.75rem;
}

.slot-counter strong {
  color: var(--forest-800);
  font-size: 2rem;
}

.store-grid,
.admin-nav-grid,
.plan-admin-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.store-card,
.admin-nav-card {
  padding: 26px;
}

.store-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--moss-400);
  box-shadow: 0 0 0 5px rgba(111, 155, 104, 0.12);
}

.store-card h2 {
  margin: 22px 0 8px;
  color: var(--forest-900);
}

.store-card p,
.store-card small {
  color: var(--muted);
}

.admin-nav-card {
  display: grid;
  min-height: 140px;
  align-content: space-between;
  color: var(--forest-900);
}

.admin-nav-card strong {
  font-size: 1.15rem;
}

.admin-nav-card span {
  color: var(--muted);
  font-size: 0.84rem;
}

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

.search-form {
  display: flex;
  gap: 8px;
}

.search-form input {
  min-width: 280px;
}

.inline-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.inline-actions form {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.inline-actions input {
  width: 112px;
  min-height: 38px;
}

.check-field {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 0.86rem;
}

.download-list {
  display: grid;
  gap: 14px;
}

.download-card {
  display: flex;
  padding: 26px;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.download-card h2 {
  margin: 12px 0 5px;
}

.download-card p,
.install-guide li {
  color: var(--muted);
}

.install-guide {
  margin-top: 20px;
}

code {
  padding: 2px 6px;
  border-radius: 6px;
  color: var(--forest-800);
  background: rgba(23, 59, 44, 0.08);
}

.error-shell {
  display: grid;
  min-height: calc(100vh - 150px);
  place-items: center;
}

.error-card {
  width: min(100%, 680px);
  padding: 54px;
  text-align: center;
}

.error-code {
  color: rgba(23, 59, 44, 0.12);
  font-size: 5rem;
  line-height: 1;
}

.footer {
  display: flex;
  min-height: 110px;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.78rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 980px) {
  .auth-layout { gap: 40px; grid-template-columns: 1fr; }
  .auth-card { max-width: 620px; }
  .metrics-grid,
  .admin-metrics,
  .plan-grid,
  .store-grid,
  .plan-admin-grid { grid-template-columns: repeat(2, 1fr); }
  .info-grid { grid-template-columns: repeat(2, 1fr); }
  .plan-card.featured { transform: none; }
}

@media (max-width: 760px) {
  .container { width: min(calc(100% - 28px), var(--max-width)); }
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 68px;
    right: 0;
    left: 0;
    display: none;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--white);
    box-shadow: var(--shadow);
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .nav-links.is-open { display: flex; }
  .auth-header-links { gap: 10px; }
  .dashboard-hero,
  .page-hero-row,
  .section-title-row { align-items: stretch; flex-direction: column; }
  .status-card { min-width: 0; }
  .metrics-grid,
  .admin-metrics,
  .settings-grid,
  .plan-grid,
  .store-grid,
  .admin-nav-grid,
  .plan-admin-grid,
  .form-grid,
  .info-grid,
  .phone-grid { grid-template-columns: 1fr; }
  .settings-card-wide,
  .field-wide { grid-column: auto; }
  .input-action,
  .search-form,
  .download-card { align-items: stretch; flex-direction: column; }
  .search-form input { min-width: 0; }
  .footer { align-items: start; flex-direction: column; justify-content: center; gap: 5px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

textarea {
  width: 100%;
  min-height: 110px;
  padding: 13px 14px;
  border: 1px solid rgba(23, 59, 44, 0.18);
  border-radius: 12px;
  outline: none;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
  resize: vertical;
}

textarea:focus {
  border-color: var(--moss-500);
  box-shadow: 0 0 0 4px rgba(111, 155, 104, 0.14);
}

.store-layout,
.order-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.75fr);
  align-items: start;
  gap: 20px;
}

.purchase-panel {
  position: sticky;
  top: 96px;
  padding: 28px;
}

.purchase-panel h2,
.order-summary h2,
.order-summary h3,
.action-panel h2 {
  margin-top: 0;
  color: var(--forest-900);
}

.purchase-panel > p:not(.eyebrow),
.action-panel > p {
  color: var(--muted);
  font-size: 0.88rem;
}

.order-summary {
  padding: 30px;
}

.order-summary dl {
  display: grid;
  margin: 0 0 24px;
  gap: 0;
}

.order-summary dl > div {
  display: flex;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  justify-content: space-between;
  gap: 20px;
}

.order-summary dt {
  color: var(--muted);
  font-size: 0.84rem;
}

.order-summary dd {
  margin: 0;
  text-align: right;
}

.order-summary .price {
  color: var(--wood-700);
  font-size: 1.2rem;
  font-weight: 800;
}

.order-actions {
  display: grid;
  gap: 18px;
}

.action-panel {
  padding: 28px;
}

.danger-zone {
  border-color: rgba(157, 63, 53, 0.24);
}

.payment-methods {
  display: grid;
  margin: 20px 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.payment-method {
  display: grid;
  min-height: 340px;
  padding: 20px;
  place-items: center;
  border: 1px dashed rgba(23, 59, 44, 0.22);
  border-radius: 14px;
  text-align: center;
}

/* 收款码：不限制高度，竖版截图也不会被压扁；尽量占满容器 */
.payment-method img {
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
}

.payment-placeholder {
  color: var(--muted);
  font-size: 0.78rem;
}

.proof-preview {
  display: block;
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.proof-preview img {
  display: block;
  width: 100%;
  max-height: 560px;
  object-fit: contain;
  background: #f0ece2;
}

.refund-reason {
  margin: 18px 0;
  padding: 18px;
  border-left: 3px solid var(--wood-500);
  color: #4e5a51;
  background: rgba(155, 118, 82, 0.07);
}

@media (max-width: 980px) {
  .store-layout,
  .order-layout { grid-template-columns: 1fr; }
  .purchase-panel { position: static; }
}

.payment-setting-image {
  display: block;
  width: 180px;
  height: 180px;
  margin: 0 0 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  object-fit: contain;
  background: var(--white);
}

.danger-panel {
  padding: 30px;
  border-color: rgba(157, 63, 53, 0.28);
}

.warning-list {
  display: grid;
  padding-left: 20px;
  gap: 8px;
  color: #5b665d;
}

.warning-list li::marker {
  color: var(--danger);
}

.delete-code-box {
  display: flex;
  margin: 24px 0;
  padding: 18px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(23, 59, 44, 0.035);
}

.delete-code-box p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.delete-form {
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.notification-message {
  min-width: 320px;
  max-width: 520px;
  white-space: normal;
}

.notification-error-row td {
  color: var(--danger);
  background: rgba(157, 63, 53, 0.045);
  white-space: normal;
}

.status-sent {
  color: var(--success);
  background: rgba(57, 117, 85, 0.12);
}

.status-failed {
  color: var(--danger);
  background: rgba(157, 63, 53, 0.11);
}

.profile-summary {
  display: flex;
  align-items: center;
  gap: 22px;
}

.dashboard-avatar {
  display: grid;
  width: 92px;
  height: 92px;
  flex: 0 0 auto;
  overflow: hidden;
  place-items: center;
  border: 1px solid rgba(23, 59, 44, 0.2);
  border-radius: 28px 28px 28px 8px;
  color: var(--cream-100);
  background: linear-gradient(145deg, var(--forest-700), var(--forest-900));
  box-shadow: 0 18px 45px rgba(22, 43, 31, 0.18);
  font-size: 2rem;
  font-weight: 800;
}

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

.security-layout {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 18px;
}

.security-status {
  display: grid;
  padding: 30px;
  align-content: center;
  text-align: center;
}

.security-status span {
  color: var(--muted);
}

.security-status strong {
  color: var(--forest-800);
  font-size: 4rem;
  line-height: 1.1;
}

.security-status p {
  color: var(--muted);
  font-size: 0.84rem;
}

.security-layout .form-stack {
  margin-top: 0;
}

.recovery-codes-panel {
  padding: 30px;
}

.recovery-code-grid {
  display: grid;
  margin-top: 22px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.recovery-code-grid code {
  padding: 14px;
  text-align: center;
  letter-spacing: 0.08em;
}

@media (max-width: 760px) {
  .security-layout,
  .recovery-code-grid { grid-template-columns: 1fr; }
}

.filter-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-form input,
.filter-form select {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink);
  background: var(--white);
}

.filter-form input {
  min-width: 250px;
}

.audit-details {
  max-width: 480px;
  white-space: normal;
}

.audit-details code {
  display: block;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

@media (max-width: 760px) {
  .filter-form {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .filter-form input {
    min-width: 0;
  }
}

.store-sidebar {
  display: grid;
  gap: 18px;
}

.store-card-actions {
  display: flex;
  margin-top: 20px;
  flex-wrap: wrap;
  gap: 8px;
}

.store-sidebar .purchase-panel {
  position: static;
}

.store-data-actions {
  display: flex;
  gap: 10px;
}

.data-meta {
  display: flex;
  margin-bottom: 14px;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.78rem;
}

.order-status-tabs {
  display: flex;
  margin-bottom: 18px;
  padding: 6px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 253, 248, 0.72);
  gap: 4px;
}

.order-status-tabs a {
  display: inline-flex;
  min-width: max-content;
  padding: 10px 14px;
  align-items: center;
  gap: 8px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.84rem;
}

.order-status-tabs a.active {
  color: var(--cream-100);
  background: var(--forest-800);
}

.order-status-tabs b {
  min-width: 22px;
  padding: 1px 6px;
  border-radius: 999px;
  text-align: center;
  background: rgba(255, 255, 255, 0.14);
  font-size: 0.7rem;
}

.fbs-table-panel {
  max-width: 100%;
}

.fbs-table {
  min-width: 2300px;
}

.fbs-table th,
.fbs-table td {
  vertical-align: top;
}

.nowrap {
  white-space: nowrap;
}

.multi-line,
.product-name-cell {
  min-width: 170px;
  white-space: pre-line;
}

.product-name-cell {
  min-width: 260px;
}

.product-photo-list {
  display: flex;
  width: 150px;
  flex-wrap: wrap;
  gap: 5px;
}

.product-photo-list img {
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: cover;
  background: var(--white);
}

.pagination {
  display: flex;
  margin-top: 20px;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px;
}

.pagination a {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
}

.pagination a.active {
  color: var(--cream-100);
  background: var(--forest-800);
}

@media (max-width: 760px) {
  .store-data-actions,
  .data-meta {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }
}

.grouped-fbs-table {
  min-width: 1900px;
}

.grouped-cell > div {
  display: grid;
  min-width: 190px;
  gap: 3px;
}

.grouped-cell > div + div {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.grouped-cell b {
  color: var(--forest-900);
}

.grouped-cell span {
  color: var(--muted);
  font-size: 0.8rem;
  white-space: normal;
}

.browser-limit-cell {
  display: grid;
  min-width: 230px;
  gap: 6px;
}

.browser-limit-cell small {
  color: var(--muted);
  white-space: nowrap;
}

.browser-limit-cell form {
  display: flex;
  align-items: center;
  gap: 6px;
}

.browser-limit-cell input {
  width: 86px;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--white);
}

.monitor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.75fr);
  align-items: start;
  gap: 20px;
}

.monitor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.monitor-card {
  padding: 24px;
}

.monitor-card-top,
.monitor-card-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
}

.monitor-card h2 {
  margin: 20px 0 8px;
}

.monitor-card p,
.monitor-card small {
  display: block;
  color: var(--muted);
}

.monitor-card-actions {
  justify-content: flex-start;
  margin-top: 20px;
}

@media (max-width: 980px) {
  .monitor-layout { grid-template-columns: 1fr; }
  .monitor-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .monitor-grid { grid-template-columns: 1fr; }
}

.delete-choice-list {
  display: grid;
  padding: 18px;
  gap: 14px;
  border: 1px solid rgba(163, 105, 39, 0.25);
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.65);
}

.whitelist-panel {
  margin-bottom: 24px;
  padding: 24px;
}

.whitelist-panel h2 {
  margin-top: 0;
}

.whitelist-panel p {
  color: var(--muted);
  font-size: 0.86rem;
}

.whitelist-list {
  display: grid;
  margin-top: 14px;
  gap: 8px;
}

.whitelist-list form {
  display: flex;
  padding: 10px 12px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,.55);
}

.procurement-groups {
  display: grid;
  gap: 20px;
}

.procurement-card {
  padding: 24px;
  /* 让卡片跟随页面宽度，不要被宽表格撑开整页 */
  min-width: 0;
}

.procurement-head,
.procurement-actions,
.procurement-status-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.procurement-head h2 {
  margin: 0 0 8px;
}

.procurement-head p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
}

.procurement-summary,
.procurement-actions,
.procurement-status-actions {
  align-items: center;
}

.procurement-actions,
.procurement-status-actions {
  margin: 20px 0;
}

.procurement-card .table-panel {
  margin-top: 18px;
}

.field-group {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.field-group legend {
  padding: 0 8px;
  color: var(--forest-900);
  font-weight: 800;
}

.mapping-panel {
  margin-top: 22px;
  padding: 26px;
}

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

.mapping-list form {
  display: flex;
  padding: 12px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,.55);
}

.mapping-form {
  margin-top: 18px;
}

.failure-details summary {
  color: var(--danger);
  cursor: pointer;
  font-weight: 700;
}

.failure-details form {
  margin-top: 10px;
}

.procurement-thumb {
  width: 52px;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: cover;
  background: var(--white);
}

/* ---- 店铺后台同步进度条 ---- */
.sync-progress {
  margin-bottom: 18px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(111, 155, 104, 0.16), rgba(198, 167, 127, 0.14));
}

.sync-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--forest-800);
}

.sync-progress-head strong {
  font-size: 1rem;
}

.sync-progress-head span {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.sync-progress-bar {
  position: relative;
  overflow: hidden;
  height: 12px;
  margin: 12px 0 10px;
  border-radius: 999px;
  background: rgba(23, 59, 44, 0.12);
}

.sync-progress-bar > span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--forest-700), var(--moss-500));
  transition: width 0.4s ease;
}

.sync-progress-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: translateX(-100%);
  animation: sync-shimmer 1.6s infinite;
}

@keyframes sync-shimmer {
  to { transform: translateX(100%); }
}

.sync-progress-text {
  margin: 0;
  color: var(--ink);
  font-size: 0.95rem;
}

.sync-progress-hint {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.sync-progress.is-error .sync-progress-bar > span {
  background: var(--danger);
}

/* ---- 店铺订单表：固定顶部横向滚动条 + 固定第一列 ---- */
.fbs-scroll-hint {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.8rem;
}

.fbs-table-shell {
  position: relative;
  min-width: 0;
}

.fbs-scroll-top {
  position: sticky;
  top: 76px;
  z-index: 6;
  overflow-x: auto;
  overflow-y: hidden;
  height: 20px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--cream-100);
  box-shadow: 0 8px 14px -12px rgba(8, 21, 15, 0.6);
}

.fbs-scroll-top-inner {
  height: 1px;
}

.fbs-scroll-top::-webkit-scrollbar {
  height: 12px;
}

.fbs-scroll-top::-webkit-scrollbar-track {
  background: transparent;
}

.fbs-scroll-top::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(23, 59, 44, 0.32);
}

.scroll-table thead th:first-child,
.scroll-table tbody td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--white);
  box-shadow: 1px 0 0 var(--line), 12px 0 18px -14px rgba(8, 21, 15, 0.5);
}

.scroll-table thead th:first-child {
  z-index: 3;
  background: #ece7db;
}

.scroll-table tbody tr:hover td:first-child {
  background: #f1f5ea;
}

@media (max-width: 900px) {
  .fbs-scroll-top {
    top: 64px;
  }
}

/* ---- 一键采买：订单明细表（与店铺订单同样的左右滑动 + 内容居中） ---- */
.procurement-line-panel {
  margin-top: 18px;
  min-width: 0;
  max-width: 100%;
}

.procurement-line-table {
  min-width: 1460px;
}

.procurement-line-table th,
.procurement-line-table td {
  text-align: center;
  vertical-align: middle;
}

.procurement-line-table td:first-child {
  width: 76px;
}

.procurement-line-table .product-name-cell {
  min-width: 260px;
}

.procurement-status-actions {
  justify-content: center;
}

.procurement-actions {
  justify-content: center;
}

/* 「确认已采买 / 标记失败」已挪到卡片顶部操作区，去掉多余外边距 */
.procurement-actions .procurement-status-actions {
  margin: 0;
  align-items: center;
}

/* ---- 订单 / 采买 搜索栏 ---- */
.search-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.search-bar input[type="search"] {
  flex: 1 1 320px;
  min-width: 200px;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  color: var(--ink);
  font-size: 0.9rem;
}

.search-bar input[type="search"]:focus {
  outline: 2px solid rgba(111, 155, 104, 0.55);
  outline-offset: 1px;
}

.search-bar .button {
  height: 44px;
}

.search-summary {
  margin: -2px 0 14px;
  color: var(--muted);
  font-size: 0.84rem;
}

.search-summary b {
  color: var(--forest-800);
}

/* ---- 右下角「扫码怎么用」---- */
.scan-help {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  max-width: min(92vw, 380px);
}

.scan-help details {
  position: relative;
}

.scan-help summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  color: var(--cream-100);
  background: var(--forest-800);
  box-shadow: 0 12px 26px -12px rgba(8, 21, 15, 0.7);
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  float: right;
}

.scan-help summary::-webkit-details-marker {
  display: none;
}

.scan-help summary:hover {
  background: var(--forest-700);
}

.scan-help-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 12px);
  width: min(92vw, 380px);
  max-height: 62vh;
  overflow-y: auto;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
  box-shadow: var(--shadow);
  color: var(--ink);
  font-size: 0.86rem;
  line-height: 1.7;
}

.scan-help-panel h3 {
  margin: 0 0 10px;
  font-size: 0.98rem;
}

.scan-help-panel ol {
  margin: 0;
  padding-left: 20px;
}

.scan-help-panel li {
  margin-bottom: 8px;
}

.scan-help-panel b {
  color: var(--forest-800);
}

.scan-help-tip {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(163, 105, 39, 0.1);
}

.scan-help-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

@media (max-width: 760px) {
  .scan-help {
    right: 12px;
    bottom: 12px;
  }
  .scan-help summary {
    padding: 9px 13px;
    font-size: 0.8rem;
  }
}

/* ---- 店铺页：备货已迁移到采买页的提示 ---- */
.store-ship-hint {
  margin: -4px 0 14px;
  padding: 10px 14px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--muted);
  background: rgba(111, 155, 104, 0.08);
  font-size: 0.82rem;
}

/* ---- 宽屏模式：订单页 / 采买页，一次看更多内容 ---- */
.store-data-page .container,
.procurement-page .container {
  width: min(calc(100% - 32px), 1700px);
}

.store-data-page .fbs-table,
.procurement-page .procurement-line-table {
  font-size: 0.8rem;
}

.store-data-page .fbs-table th,
.store-data-page .fbs-table td,
.procurement-page .procurement-line-table th,
.procurement-page .procurement-line-table td {
  padding: 9px 11px;
}

.store-data-page .fbs-table {
  min-width: 1680px;
}

.procurement-page .procurement-line-table {
  min-width: 1360px;
}

.store-data-page .fbs-table .product-photo-list {
  width: 108px;
}

.store-data-page .fbs-table .product-photo-list img {
  width: 34px;
  height: 34px;
}

.procurement-page .procurement-line-table .product-name-cell {
  min-width: 200px;
}

.store-data-page .fbs-table .grouped-cell > div {
  min-width: 150px;
}

.store-data-page .search-bar,
.procurement-page .search-bar {
  max-width: 900px;
}

@media (max-width: 900px) {
  .store-data-page .container,
  .procurement-page .container {
    width: min(calc(100% - 20px), 1700px);
  }
}

/* ---- 让「配送服务 / 方式」这类长名字换行，避免单列吃掉 400+ px ---- */
.fbs-table .grouped-cell b,
.fbs-table .grouped-cell strong {
  white-space: normal;
  overflow-wrap: anywhere;
}

.store-data-page .fbs-table .grouped-cell > div {
  min-width: 140px;
}

/* ---- 搜索 + 排序 工具条 ---- */
.sort-bar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.sort-bar label {
  color: var(--muted);
  font-size: 0.84rem;
}

.sort-bar select {
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  color: var(--ink);
  font-size: 0.86rem;
}

.sort-bar select:focus {
  outline: 2px solid rgba(111, 155, 104, 0.55);
  outline-offset: 1px;
}

.list-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.list-toolbar .search-bar {
  flex: 1 1 460px;
  margin-bottom: 0;
}

.list-toolbar .sort-bar {
  margin: 0;
}

/* ---- 一键复制小按钮 ---- */
.copy-btn {
  margin-left: 5px;
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--muted);
  font-size: 0.66rem;
  line-height: 1.6;
  font-family: inherit;
  cursor: pointer;
  vertical-align: middle;
  white-space: nowrap;
}

.copy-btn:hover {
  color: var(--forest-800);
  border-color: var(--forest-700);
  background: var(--white);
}

.copy-btn.is-copied {
  color: var(--success);
  border-color: var(--success);
  background: rgba(57, 117, 85, 0.12);
}

/* ---- 工具条下方的一句话说明 ---- */
.toolbar-hint {
  margin: -6px 0 14px;
  color: var(--muted);
  font-size: 0.78rem;
}

.toolbar-hint b {
  color: var(--forest-800);
}

/* ---- 店铺列表页：一键刷新所有店铺 ---- */
.refresh-all-panel {
  padding: 20px 22px;
  margin-bottom: 18px;
}

.refresh-all-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.refresh-all-head strong {
  color: var(--forest-900);
  font-size: 1.02rem;
}

.refresh-all-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.refresh-all-panel .sync-progress {
  margin: 16px 0 0;
  background: rgba(111, 155, 104, 0.1);
}

.refresh-all-panel .notice {
  margin: 14px 0 0;
}

/* ---- 加入商品卡：提示与确认勾选 ---- */
.mapping-hint {
  margin: 6px 0 12px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.7;
}

.mapping-hint b {
  color: var(--forest-800);
}

.mapping-confirm {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  color: var(--ink);
  font-size: 0.84rem;
  cursor: pointer;
}

.mapping-confirm input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
}

.mapping-form .inline-actions {
  flex-wrap: wrap;
}

/* ---- 采买卡片：标题行 + 卡片信息 ---- */
.card-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.card-title-row h2 {
  margin: 0;
}

.card-title-row .button {
  margin-bottom: 2px;
}

.card-meta {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.card-meta b {
  color: var(--forest-800);
}

/* ---- 主页：插件工具面板 ---- */
.plugin-tools-panel {
  padding: 22px 24px;
}

.plugin-tools-head h2 {
  margin: 4px 0 6px;
}

.plugin-tools-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.plugin-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.plugin-tool {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(111, 155, 104, 0.14), rgba(198, 167, 127, 0.12));
  color: var(--ink);
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.plugin-tool:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: var(--forest-700);
  box-shadow: 0 12px 24px -16px rgba(8, 21, 15, 0.7);
}

.plugin-tool:disabled {
  opacity: 0.55;
  cursor: progress;
}

.plugin-tool strong {
  color: var(--forest-900);
  font-size: 0.96rem;
}

.plugin-tool span {
  color: var(--muted);
  font-size: 0.78rem;
}

.plugin-tools-status {
  margin: 16px 0 0;
  padding: 10px 14px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--muted);
  font-size: 0.82rem;
}

.plugin-tools-status.is-ok {
  color: var(--success);
  border-color: rgba(57, 117, 85, 0.35);
  background: rgba(57, 117, 85, 0.08);
}

.plugin-tools-status.is-error {
  color: var(--danger);
  border-color: rgba(157, 63, 53, 0.35);
  background: rgba(157, 63, 53, 0.08);
}
.plugin-tools-foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.plugin-tools-hint {
  color: var(--muted);
  font-size: 0.78rem;
}

/* ---- 数据大屏 ---- */
.screen-date {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.screen-date label {
  color: var(--muted);
  font-size: 0.84rem;
}

.screen-date input[type="date"] {
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.88rem;
}

.screen-sync {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.82rem;
}

.screen-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 16px;
  padding: 24px 26px;
  border-radius: 20px;
  background: linear-gradient(135deg, #173b2c, #0d2118);
  color: var(--cream-100);
  box-shadow: var(--shadow);
}

.screen-metric {
  display: grid;
  gap: 2px;
}

.screen-metric > span {
  color: rgba(245, 240, 228, 0.7);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}

.screen-metric > strong {
  font-size: 2.6rem;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}

.screen-metric > small {
  color: rgba(245, 240, 228, 0.6);
  font-size: 0.76rem;
}

.screen-metric-range > strong {
  font-size: 1.05rem;
  line-height: 1.5;
  font-weight: 700;
}

.screen-h2 {
  margin: 30px 0 14px;
  font-size: 1.1rem;
}

.screen-store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}

.screen-store-card {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
  box-shadow: 0 12px 30px -24px rgba(8, 21, 15, 0.7);
}

.screen-store-card.is-empty {
  opacity: 0.65;
}

.screen-store-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.screen-store-head strong {
  color: var(--forest-900);
  font-size: 1rem;
}

.screen-store-orders {
  color: var(--forest-800);
  font-size: 0.86rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.screen-store-body {
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin: 12px 0 8px;
}

.screen-store-body > div {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.screen-store-body b {
  color: var(--forest-900);
  font-size: 1.5rem;
  font-variant-numeric: tabular-nums;
}

.screen-store-body span {
  color: var(--muted);
  font-size: 0.78rem;
}

.screen-store-body .is-cancel b {
  color: var(--danger);
}

.screen-store-card small {
  color: var(--muted);
  font-size: 0.74rem;
}

.screen-table-panel {
  max-width: 100%;
}

.screen-table {
  min-width: 720px;
}

.screen-table th,
.screen-table td {
  text-align: left;
  vertical-align: middle;
}

.screen-table .screen-index {
  width: 46px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.screen-table .screen-name {
  min-width: 260px;
  white-space: normal;
}

.screen-table .screen-qty b {
  color: var(--forest-900);
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
}

.screen-cancel {
  margin-left: 8px;
  color: var(--danger);
  font-size: 0.74rem;
}
/* ---- 数据大屏：金额样式 ---- */
.screen-store-body .is-money b {
  color: var(--forest-800);
  font-size: 1.1rem;
}

.screen-table .screen-money {
  color: var(--forest-900);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ---- 数据大屏：对比 / 排行 / 时段分布 ---- */
.screen-diff {
  color: rgba(245, 240, 228, 0.6);
  font-size: 0.74rem;
  font-style: normal;
}

.screen-diff.is-up { color: #a8e6b0; }
.screen-diff.is-down { color: #ffb3a7; }

.screen-h2 small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 400;
}

.screen-store-card {
  position: relative;
}

.screen-rank {
  position: absolute;
  top: 12px;
  left: 14px;
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 8px;
  background: rgba(23, 59, 44, 0.08);
  color: var(--forest-800);
  font-size: 0.78rem;
  font-weight: 800;
}

.screen-store-card.rank-1 .screen-rank { background: #f0d17a; color: #5a4208; }
.screen-store-card.rank-2 .screen-rank { background: #d9dee3; color: #3b4650; }
.screen-store-card.rank-3 .screen-rank { background: #e6c39a; color: #5b3c1c; }

.screen-store-head,
.screen-store-body,
.screen-store-card > small {
  padding-left: 34px;
}

.screen-rank-inline {
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 7px;
  background: rgba(23, 59, 44, 0.07);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.screen-rank-inline.top {
  background: var(--forest-800);
  color: var(--cream-100);
}

.screen-hours {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(28px, 1fr);
  gap: 4px;
  padding: 18px 20px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
  overflow-x: auto;
}

.screen-hour {
  display: grid;
  grid-template-rows: 14px 1fr 16px;
  align-items: end;
  justify-items: center;
  gap: 2px;
  height: 150px;
}

.screen-hour-count {
  color: var(--forest-800);
  font-size: 0.68rem;
  font-weight: 700;
}

.screen-hour-bar {
  width: 100%;
  max-width: 26px;
  min-height: 2px;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, var(--moss-400), var(--forest-700));
}

.screen-hour small {
  color: var(--muted);
  font-size: 0.6rem;
  white-space: nowrap;
}

/* ---- 数据大屏：商品排行口径切换 ---- */
.screen-h2-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin: 30px 0 14px;
}

.screen-h2-row .screen-h2 {
  margin: 0;
}

.screen-rank-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 253, 248, 0.7);
}

.screen-rank-tabs a {
  padding: 5px 12px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 0.8rem;
}

.screen-rank-tabs a.active {
  color: var(--cream-100);
  background: var(--forest-800);
}

/* ---- 数据大屏：商品缩略图 ---- */
.screen-table .screen-thumb-cell {
  width: 66px;
  padding-right: 6px;
}

.screen-thumb {
  display: block;
  width: 52px;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  object-fit: cover;
}

.screen-table {
  min-width: 840px;
}


.image-zoom-popup {
  position: fixed;
  z-index: 10000;
  pointer-events: none;
  padding: 6px;
  border: 1px solid rgba(36, 71, 52, 0.22);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(13, 38, 25, 0.28);
  animation: image-zoom-in 120ms ease-out;
}

.image-zoom-popup img {
  display: block;
  max-width: min(72vw, 720px);
  max-height: min(72vh, 720px);
  object-fit: contain;
  border-radius: 8px;
}

@keyframes image-zoom-in {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}


.plan-original-price {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 2px;
  color: #78867b;
  font-size: 0.9rem;
}

.plan-discount-badge {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 999px;
  background: #e6f3e7;
  color: #2f6e3c;
  font-weight: 700;
}

.form-hint {
  min-height: 1.35em;
  margin: 5px 0 0;
  color: #6f7d71;
  font-size: 0.9rem;
}

.form-hint.success { color: #2f6e3c; }
.form-hint.error { color: #a63b2e; }

.invite-empty,
.invite-card {
  max-width: 760px;
}

.invite-card h2 {
  margin: 8px 0;
  font-size: clamp(2rem, 5vw, 4rem);
  letter-spacing: 0.08em;
}


.screen-date-wrap {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.screen-refresh-form {
  margin: 0;
}

@media (max-width: 760px) {
  .screen-date-wrap { justify-items: start; }
}


img[data-image-zoom] {
  cursor: zoom-in;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: grid;
  padding: 28px;
  place-items: center;
  background: rgba(7, 18, 12, 0.78);
  backdrop-filter: blur(5px);
}

.image-lightbox img {
  display: block;
  max-width: min(92vw, 1400px);
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.45);
}

.image-lightbox-close {
  position: fixed;
  top: 18px;
  right: 22px;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

body.image-lightbox-open {
  overflow: hidden;
}


/* ---- 数据大屏大数字自适应 ---- */
.screen-summary {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  min-width: 0;
}

.screen-metric {
  min-width: 0;
}

.screen-metric > strong {
  font-size: clamp(1.5rem, 2.4vw, 2.6rem);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.screen-store-head strong,
.screen-store-body b {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.screen-store-body {
  flex-wrap: wrap;
}

.screen-store-body > div {
  min-width: 0;
}

.screen-store-body b {
  font-size: clamp(1.05rem, 2.4vw, 1.5rem);
}

.screen-table .screen-money {
  min-width: 90px;
  white-space: normal;
  overflow-wrap: anywhere;
}


.screen-rank-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.screen-store-filter {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.screen-store-filter label {
  color: var(--muted);
  font-size: 0.8rem;
}

.screen-store-filter select {
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--white);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.8rem;
}

@media (max-width: 760px) {
  .screen-rank-controls { justify-content: flex-start; }
}


.plugin-update-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-bottom: 18px;
  padding: 12px 16px;
  border: 1px solid rgba(111, 155, 104, 0.28);
  border-radius: 12px;
  background: rgba(230, 243, 231, 0.55);
}

.plugin-update-notice > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.plugin-update-notice span {
  color: var(--muted);
  font-size: 0.76rem;
}

.plugin-update-notice strong {
  color: var(--forest-900);
  font-size: 0.94rem;
}

.plugin-update-notice small {
  color: var(--muted);
  font-size: 0.76rem;
}

.auth-features {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  opacity: 0.72;
  text-align: center;
}


#monitor-whitelist {
  scroll-margin-top: 96px;
}


/* ---- 数据大屏指标框加大版：彻底解决长数字溢出 ---- */
.screen-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding: 28px;
  overflow: hidden;
}

.screen-metric {
  min-width: 0;
  min-height: 116px;
  padding: 16px 18px;
  border: 1px solid rgba(245, 240, 228, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.055);
  align-content: start;
}

.screen-metric > strong {
  display: block;
  max-width: 100%;
  font-size: clamp(1.2rem, 1.75vw, 2.25rem);
  line-height: 1.18;
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.screen-metric > small,
.screen-metric > em {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.screen-store-grid {
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
}

.screen-store-body .is-money b {
  font-size: clamp(1rem, 1.7vw, 1.35rem);
  overflow-wrap: anywhere;
}

@media (max-width: 1050px) {
  .screen-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .screen-summary { grid-template-columns: 1fr; padding: 20px; }
  .screen-metric { min-height: 100px; }
}


/* ===== 数据大屏：森林数据风主题 ===== */
body.screen-page {
  color: #edf3e8;
  background: #07140e;
}

body.screen-page::before {
  background:
    radial-gradient(circle at 12% 8%, rgba(111, 155, 104, 0.24), transparent 24rem),
    radial-gradient(circle at 88% 18%, rgba(198, 167, 127, 0.15), transparent 26rem),
    radial-gradient(circle at 52% 88%, rgba(35, 86, 62, 0.35), transparent 30rem),
    linear-gradient(145deg, #07140e 0%, #0b2117 48%, #10281d 100%);
}

body.screen-page .page-grain {
  opacity: 0.22;
  background-image:
    repeating-radial-gradient(ellipse at 18% 20%, transparent 0 31px, rgba(191, 210, 157, 0.08) 32px 33px, transparent 34px 67px),
    repeating-radial-gradient(ellipse at 78% 72%, transparent 0 43px, rgba(198, 167, 127, 0.06) 44px 45px, transparent 46px 89px),
    linear-gradient(rgba(191, 210, 157, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(191, 210, 157, 0.035) 1px, transparent 1px);
  background-size: auto, auto, 64px 64px, 64px 64px;
  mask-image: linear-gradient(to bottom, black 0%, rgba(0,0,0,.86) 62%, transparent 100%);
}

.screen-page .site-header {
  border-bottom-color: rgba(191, 210, 157, 0.14);
  background: rgba(7, 20, 14, 0.84);
}

.screen-page .brand-copy strong,
.screen-page .nav-links a,
.screen-page .nav-links button {
  color: #f5f0e4;
}

.screen-page .brand-copy small,
.screen-page .nav-links a:hover {
  color: #c9d7b7;
}

.screen-page .brand-mark {
  border: 1px solid rgba(198, 167, 127, 0.48);
  background: linear-gradient(145deg, #c6a77f, #806342);
  color: #102418;
  box-shadow: 0 8px 24px rgba(198, 167, 127, 0.22);
}

.screen-page .nav-links a.admin-link {
  color: #e6c98d;
}

.screen-hero {
  position: relative;
  margin-top: 28px;
  padding: 30px 34px;
  overflow: hidden;
  border: 1px solid rgba(191, 210, 157, 0.18);
  border-radius: 28px;
  background:
    linear-gradient(120deg, rgba(24, 60, 42, 0.92), rgba(10, 28, 18, 0.96)),
    radial-gradient(circle at 85% 20%, rgba(198, 167, 127, 0.16), transparent 22rem);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.36);
}

.screen-hero::after {
  position: absolute;
  right: -80px;
  bottom: -135px;
  width: 390px;
  height: 390px;
  content: "";
  border: 1px solid rgba(198, 167, 127, 0.14);
  border-radius: 50%;
  box-shadow: 0 0 0 28px rgba(198, 167, 127, 0.035), 0 0 0 72px rgba(191, 210, 157, 0.025);
  pointer-events: none;
}

.screen-hero h1 {
  color: #f7f1e4;
  font-size: clamp(2rem, 4vw, 3.35rem);
  letter-spacing: -0.045em;
  text-shadow: 0 5px 30px rgba(198, 167, 127, 0.13);
}

.screen-hero > div:first-child > p:not(.eyebrow) {
  max-width: 700px;
  color: rgba(237, 243, 232, 0.72);
}

.screen-hero .eyebrow {
  color: #cbb888;
}

.screen-hero .eyebrow span {
  background: #c6a77f;
  box-shadow: 0 0 18px rgba(198, 167, 127, 0.55);
}

.screen-date-wrap {
  position: relative;
  z-index: 1;
}

.screen-date,
.screen-refresh-form {
  padding: 10px;
  border: 1px solid rgba(191, 210, 157, 0.18);
  border-radius: 16px;
  background: rgba(5, 17, 11, 0.46);
  backdrop-filter: blur(12px);
}

.screen-date label {
  color: rgba(237, 243, 232, 0.68);
}

.screen-date input[type="date"],
.screen-store-filter select {
  border-color: rgba(191, 210, 157, 0.24);
  background: rgba(245, 240, 228, 0.94);
  color: #102418;
}

.screen-dashboard {
  position: relative;
  padding-bottom: 40px;
}

.screen-sync {
  color: rgba(237, 243, 232, 0.6);
}

.screen-summary {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(198, 167, 127, 0.2);
  background:
    linear-gradient(135deg, rgba(25, 65, 45, 0.9), rgba(8, 25, 16, 0.98)),
    radial-gradient(circle at 80% 0%, rgba(198, 167, 127, 0.13), transparent 26rem);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.screen-summary::before {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background-image: repeating-radial-gradient(ellipse at 35% 0%, transparent 0 28px, rgba(191, 210, 157, 0.055) 29px 30px, transparent 31px 62px);
  opacity: 0.8;
}

.screen-metric {
  position: relative;
  z-index: 1;
  overflow: hidden;
  border-color: rgba(191, 210, 157, 0.14);
  background: linear-gradient(145deg, rgba(255,255,255,.075), rgba(255,255,255,.025));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.screen-metric::after {
  position: absolute;
  top: 0;
  left: 18px;
  width: 42px;
  height: 2px;
  content: "";
  border-radius: 0 0 8px 8px;
  background: linear-gradient(90deg, #c6a77f, #6f9b68);
  box-shadow: 0 0 16px rgba(198, 167, 127, 0.42);
}

.screen-metric > span {
  display: flex;
  align-items: center;
  gap: 7px;
  color: rgba(237, 243, 232, 0.68);
}

.screen-kicker {
  display: inline-grid;
  width: 21px;
  height: 21px;
  place-items: center;
  border: 1px solid rgba(198, 167, 127, 0.34);
  border-radius: 7px;
  color: #dfc38d;
  font-size: 0.66rem;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
}

.screen-metric > strong {
  color: #f8f2e7;
  text-shadow: 0 4px 30px rgba(198, 167, 127, 0.12);
}

.screen-metric > small {
  color: rgba(237, 243, 232, 0.52);
}

.screen-page .screen-h2 {
  color: #f2eadb;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.screen-page .screen-h2 small {
  color: rgba(237, 243, 232, 0.45);
}

.screen-h2-row {
  margin-top: 36px;
}

.screen-rank-tabs {
  border-color: rgba(191, 210, 157, 0.16);
  background: rgba(5, 17, 11, 0.42);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}

.screen-rank-tabs a {
  color: rgba(237, 243, 232, 0.56);
}

.screen-rank-tabs a:hover {
  color: #f2eadb;
}

.screen-rank-tabs a.active {
  color: #102418;
  background: linear-gradient(135deg, #e1c58f, #aa8755);
  box-shadow: 0 6px 18px rgba(198, 167, 127, 0.25);
}

.screen-store-grid {
  gap: 16px;
}

.screen-store-card {
  position: relative;
  overflow: hidden;
  border-color: rgba(191, 210, 157, 0.15);
  background: linear-gradient(145deg, rgba(245, 240, 228, 0.96), rgba(225, 234, 214, 0.9));
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.25);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.screen-store-card::before {
  position: absolute;
  top: -48px;
  right: -48px;
  width: 140px;
  height: 140px;
  content: "";
  border: 1px solid rgba(36, 86, 62, 0.1);
  border-radius: 50%;
  box-shadow: 0 0 0 18px rgba(36, 86, 62, 0.035);
}

.screen-store-card:hover {
  transform: translateY(-3px);
  border-color: rgba(198, 167, 127, 0.48);
  box-shadow: 0 28px 65px rgba(0, 0, 0, 0.34);
}

.screen-store-head strong {
  color: #123023;
}

.screen-store-orders {
  color: #2a6246;
}

.screen-store-body b {
  color: #173b2c;
}

.screen-store-body .is-money b {
  color: #8a6538;
}

.screen-store-progress {
  position: relative;
  height: 7px;
  margin: 12px 0 0 34px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(23, 59, 44, 0.1);
}

.screen-store-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #9b7652, #c6a77f 52%, #6f9b68);
  box-shadow: 0 0 16px rgba(155, 118, 82, 0.4);
}

.screen-store-card.rank-1 {
  border-color: rgba(198, 167, 127, 0.62);
  box-shadow: 0 24px 65px rgba(198, 167, 127, 0.18);
}

.screen-rank {
  border: 1px solid rgba(36, 86, 62, 0.12);
  background: rgba(23, 59, 44, 0.08);
}

.screen-store-card.rank-1 .screen-rank { background: linear-gradient(145deg, #f7df9a, #c9a45c); color: #4f3907; }
.screen-store-card.rank-2 .screen-rank { background: linear-gradient(145deg, #f2f4f5, #b9c1c7); color: #3b4650; }
.screen-store-card.rank-3 .screen-rank { background: linear-gradient(145deg, #efc99d, #b77a45); color: #4d2e13; }

.screen-hours {
  border-color: rgba(191, 210, 157, 0.16);
  background: linear-gradient(180deg, rgba(245, 240, 228, 0.96), rgba(225, 234, 214, 0.86));
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.2);
}

.screen-hour-bar {
  background: linear-gradient(180deg, #d5b675, #6f9b68 58%, #24563e);
  box-shadow: 0 0 16px rgba(111, 155, 104, 0.25);
}

.screen-hour-count,
.screen-hour small {
  color: #365843;
}

.screen-table-panel {
  border-color: rgba(191, 210, 157, 0.16);
  background: linear-gradient(180deg, rgba(245, 240, 228, 0.98), rgba(229, 237, 219, 0.92));
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.26);
}

.screen-table th {
  color: #6d654f;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.screen-table td {
  color: #26392d;
}

.screen-table tbody tr:hover {
  background: rgba(198, 167, 127, 0.09);
}

.screen-table .screen-name {
  color: #173b2c;
  font-weight: 700;
}

.screen-table .screen-money {
  color: #8a6538;
  font-weight: 800;
}

.screen-thumb {
  border-color: rgba(155, 118, 82, 0.28);
  box-shadow: 0 8px 20px rgba(36, 86, 62, 0.12);
}

.screen-rank-inline.top-1 { background: linear-gradient(145deg, #f7df9a, #c9a45c); color: #4f3907; }
.screen-rank-inline.top-2 { background: linear-gradient(145deg, #f2f4f5, #b9c1c7); color: #3b4650; }
.screen-rank-inline.top-3 { background: linear-gradient(145deg, #efc99d, #b77a45); color: #4d2e13; }

@media (max-width: 760px) {
  .screen-hero { padding: 24px; }
  .screen-date,
  .screen-refresh-form { width: 100%; }
  .screen-store-progress { margin-left: 34px; }
}


/* ---- 一键采买：数量高光 ---- */
.procurement-qty-cell {
  min-width: 92px;
}

.procurement-qty-highlight {
  display: inline-grid;
  min-width: 62px;
  padding: 7px 10px 5px;
  place-items: center;
  border: 1px solid rgba(198, 167, 127, 0.65);
  border-radius: 13px;
  background: linear-gradient(145deg, #fff1bd, #e6bd69 58%, #c99c4f);
  color: #4f3907;
  box-shadow: 0 8px 20px rgba(198, 167, 127, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.85);
  line-height: 1.05;
}

.procurement-qty-highlight b {
  font-size: 1.08rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.procurement-qty-highlight small {
  color: rgba(79, 57, 7, 0.68);
  font-size: 0.62rem;
  line-height: 1;
}

.procurement-total-highlight {
  display: inline-flex;
  margin: 0 4px;
  padding: 4px 10px;
  border: 1px solid rgba(198, 167, 127, 0.6);
  border-radius: 999px;
  background: linear-gradient(145deg, #fff1bd, #e6bd69);
  color: #4f3907;
  font-weight: 800;
  box-shadow: 0 5px 16px rgba(198, 167, 127, 0.25);
}


/* ---- 店铺回传数据 / 跨境结算 ---- */
.finance-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.72);
  width: fit-content;
}

.finance-tabs a {
  padding: 8px 16px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.86rem;
}

.finance-tabs a.active {
  background: var(--forest-800);
  color: var(--cream-100);
  font-weight: 700;
}

.finance-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin-bottom: 18px;
  padding: 18px 20px;
}

.finance-actions h2 {
  margin: 0 0 3px;
  color: var(--forest-900);
  font-size: 1rem;
}

.finance-actions p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.history-sync-form {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.history-sync-form label,
.history-sync-form span {
  color: var(--muted);
  font-size: 0.78rem;
}

.history-sync-form input[type="date"] {
  height: 34px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.finance-table-panel {
  overflow-x: auto;
  padding: 10px;
}

.finance-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
}

.finance-table th,
.finance-table td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

.finance-table th {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.finance-table td {
  color: var(--ink);
  font-size: 0.8rem;
}

.finance-table tbody tr:hover {
  background: rgba(111, 155, 104, 0.06);
}

.cost-form {
  display: flex;
  align-items: center;
  gap: 5px;
}

.cost-form input {
  width: 92px;
  height: 30px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.finance-profit {
  color: var(--success);
  font-weight: 800;
}

.finance-profit.is-positive {
  color: #2f6e3c;
}


/* ---- 订单 / 采买数量高光增强 ---- */
.order-quantity-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 190px;
}

.order-qty-highlight {
  display: inline-grid;
  min-width: 58px;
  padding: 6px 9px 4px;
  place-items: center;
  border: 1px solid rgba(198, 167, 127, 0.72);
  border-radius: 12px;
  background: linear-gradient(145deg, #fff2c6, #ecc36b 58%, #d09f4f);
  color: #4e3706;
  box-shadow: 0 6px 18px rgba(198, 167, 127, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  line-height: 1.05;
}

.order-qty-highlight b {
  font-size: 1.08rem;
  font-variant-numeric: tabular-nums;
}

.order-qty-highlight small {
  color: rgba(78, 55, 6, 0.68);
  font-size: 0.62rem;
  line-height: 1;
}

.order-product-name {
  max-width: 320px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.25;
}

.procurement-qty-highlight {
  min-width: 68px;
  padding: 8px 11px 5px;
  box-shadow: 0 10px 24px rgba(198, 167, 127, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.procurement-qty-highlight b {
  font-size: 1.18rem;
}


/* ---- 一键采买：勾选采买 ---- */
.selected-purchase-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0;
  padding: 12px 16px;
  border-color: rgba(198, 167, 127, 0.4);
  background: linear-gradient(135deg, rgba(255, 242, 198, 0.72), rgba(244, 238, 223, 0.9));
}

.procurement-line-table input[type="checkbox"] {
  width: 19px;
  height: 19px;
  accent-color: #b98a3d;
  cursor: pointer;
}

.procurement-line-table a.copy-btn {
  display: inline-block;
  margin-left: 4px;
  color: var(--forest-700);
  text-decoration: underline;
}


/* ---- SKU 共用资料弹窗 ---- */
.sku-modal[hidden] { display: none; }

.sku-modal {
  position: fixed;
  inset: 0;
  z-index: 10020;
  display: grid;
  padding: 24px;
  place-items: center;
}

.sku-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 21, 14, 0.68);
  backdrop-filter: blur(5px);
}

.sku-modal-card {
  position: relative;
  width: min(760px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px;
  border: 1px solid rgba(198, 167, 127, 0.4);
  border-radius: 22px;
  background: var(--white);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.35);
}

.sku-modal-card h2 {
  margin: 0 0 4px;
  color: var(--forest-900);
}

.sku-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--cream-100);
  color: var(--forest-900);
  font-size: 22px;
  cursor: pointer;
}

.sku-modal-card textarea {
  resize: vertical;
}

/* 店铺订单字体稍微加粗 */
.store-data-page .fbs-table th { font-weight: 700; }
.store-data-page .fbs-table td { font-weight: 500; }
.store-data-page .fbs-table .grouped-cell { font-weight: 600; }

/* 体验版额度 */
.trial-quota-panel {
  margin-top: 24px;
  margin-bottom: 24px;
  padding: 24px;
}

.trial-quota-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.trial-quota-head h2 {
  margin: 4px 0 8px;
  font-size: 24px;
}

.trial-quota-head p {
  margin: 0;
  color: var(--muted, #68756d);
}

.trial-quota-head > strong {
  color: var(--green, #173b2c);
  font-size: 38px;
  line-height: 1;
  white-space: nowrap;
}

.trial-quota-head > strong small {
  margin-left: 6px;
  color: var(--muted, #68756d);
  font-size: 15px;
  font-weight: 500;
}

.quota-bar {
  height: 12px;
  margin: 22px 0 16px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9efe9;
}

.quota-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2f8f62, #8abf65);
}

.quota-costs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  color: var(--ink, #23352c);
  font-size: 14px;
}

.quota-costs span {
  padding: 8px 12px;
  border: 1px solid #dfe8df;
  border-radius: 999px;
  background: #f7faf6;
}

@media (max-width: 700px) {
  .trial-quota-head {
    flex-direction: column;
  }

  .trial-quota-head > strong {
    font-size: 32px;
  }
}

.monitor-competitor-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid #dfe8df;
  border-radius: 10px;
  background: #f7faf6;
}

.monitor-competitor-line small {
  flex: 1 1 180px;
  margin: 0;
}

.monitor-competitor-line .copy-btn {
  margin-left: 0;
}

.monitor-competitor-line .button-small {
  margin-left: auto;
}


.payment-qr-link {
  display: block;
  width: 100%;
}

.payment-qr-link img {
  cursor: zoom-in;
}

.payment-hint {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.7;
}

@media (max-width: 700px) {
  .payment-methods {
    grid-template-columns: 1fr;
  }
  .payment-method {
    min-height: 0;
    padding: 10px;
  }
  .payment-method img {
    max-width: 100%;
  }
  .image-lightbox {
    padding: 8px;
  }
  .image-lightbox img {
    max-width: 100vw;
    max-height: 92vh;
  }
}

/* 数据大屏：多店铺选择 */
.screen-store-picker {
  position: relative;
  display: block;
}

.screen-store-picker summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(191, 210, 157, 0.24);
  border-radius: 9px;
  background: rgba(245, 240, 228, 0.94);
  color: #102418;
  font-size: 0.8rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.screen-store-picker summary::-webkit-details-marker {
  display: none;
}

.screen-store-picker summary::after {
  content: "▾";
  color: #55705e;
  font-size: 0.72rem;
}

.screen-store-picker[open] summary::after {
  content: "▴";
}

.screen-store-picker summary span {
  color: #55705e;
  font-size: 0.72rem;
}

.screen-store-picker-form {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 30;
  width: 310px;
  padding: 12px;
  border: 1px solid rgba(155, 182, 143, 0.55);
  border-radius: 14px;
  background: #fbfaf4;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.24);
}

.screen-store-checklist {
  display: grid;
  gap: 6px;
  max-height: 230px;
  overflow: auto;
  margin-bottom: 10px;
}

.screen-store-checklist label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 8px;
  color: #263c2e;
  font-size: 0.82rem;
  cursor: pointer;
}

.screen-store-checklist label:hover {
  background: #edf4e9;
}

.screen-store-checklist input {
  width: 16px;
  height: 16px;
  accent-color: #2f7b50;
}

.screen-store-picker-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.screen-store-picker-actions .button {
  flex: 0 0 auto;
}

/* 手机：店铺选择面板改为在按钮下方就地展开，避免 fixed + top:100% 跑到屏幕外 */
@media (max-width: 520px) {
  .screen-rank-controls {
    width: 100%;
    justify-content: flex-start;
  }

  .screen-store-picker {
    display: block;
    width: 100%;
  }

  .screen-store-picker summary {
    width: 100%;
    justify-content: space-between;
    min-height: 44px;
    padding: 0 14px;
  }

  .screen-store-picker-form {
    position: static;
    width: auto;
    margin-top: 8px;
    padding: 14px 12px;
  }

  .screen-store-checklist {
    max-height: 320px;
    gap: 4px;
    margin-bottom: 12px;
  }

  .screen-store-checklist label {
    padding: 13px 10px;
    font-size: 0.95rem;
  }

  .screen-store-checklist input {
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
  }

  .screen-store-picker-actions {
    position: sticky;
    bottom: 0;
    padding-top: 10px;
    background: #fbfaf4;
  }

  .screen-store-picker-actions .button {
    flex: 1 1 0;
    min-height: 44px;
  }
}

/* 手机 PWA 安装入口 */
.pwa-install-link {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid rgba(47, 109, 77, 0.28);
  border-radius: 999px;
  background: rgba(47, 109, 77, 0.07);
  color: var(--forest-700, #2f6d4d);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  font-family: inherit;
  cursor: pointer;
}

.pwa-install-link.is-available {
  color: #102418;
  border-color: #d8b94f;
  background: #f1d77b;
  font-weight: 800;
}
@media (max-width: 760px) {
  body {
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* 当前菜单高亮：不改变原来的导航排版 */
.nav-links > a.active {
  color: #102418;
  border-radius: 6px;
  background: #f1d77b;
  box-shadow: 0 0 0 4px #f1d77b, 0 0 0 6px rgba(216, 185, 79, 0.18);
}

.screen-page .nav-links > a.active {
  color: #102418;
  background: #f1d77b;
}

.screen-page .nav-links > a.active:hover {
  color: #102418;
}

.screen-page .pwa-install-link {
  color: #f5f0e4;
  border-color: rgba(245, 240, 228, 0.28);
  background: rgba(255, 255, 255, 0.08);
}

.screen-page .pwa-install-link.is-available {
  color: #102418;
  border-color: #d8b94f;
  background: #f1d77b;
}

.finance-plugin-status {
  display: block;
  width: 100%;
  color: var(--muted);
  font-size: 0.78rem;
}

.finance-plugin-status.is-progress {
  color: #8a6a16;
}

.finance-plugin-status.is-success {
  color: var(--success, #397555);
}

.finance-plugin-status.is-error {
  color: var(--danger, #9d3f35);
}

.finance-plugin-progress {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eee7;
}

.finance-plugin-progress > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2f8f62, #d4b54b);
  transition: width 320ms ease;
}

.finance-plugin-progress.is-error > span {
  background: var(--danger, #9d3f35);
}

.finance-plugin-progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: 4px;
}

.finance-plugin-progress-row .finance-plugin-progress {
  flex: 1;
}

.finance-plugin-progress-label {
  min-width: 44px;
  text-align: right;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--forest-800);
  font-variant-numeric: tabular-nums;
}

.finance-plugin-progress-row.is-error .finance-plugin-progress-label {
  color: var(--danger, #9d3f35);
}

/* ---- 回传数据：筛选、汇总、取消状态 ---- */
.finance-filters {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-bottom: 16px;
  padding: 14px 18px;
}

.finance-filter-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.finance-filter-field > span {
  color: var(--muted);
  font-size: 0.72rem;
}

.finance-filter-field input,
.finance-filter-field select {
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font-size: 0.82rem;
}

.finance-filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.finance-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
  padding: 14px 18px;
}

.finance-summary-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.finance-summary-item > span {
  color: var(--muted);
  font-size: 0.74rem;
}

.finance-summary-item > strong {
  color: var(--forest-900);
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
}

.finance-summary-item.is-profit > strong {
  color: var(--success, #397555);
}

.status-cancelled {
  color: #5b6b5f;
  background: rgba(91, 107, 95, 0.14);
}

/* ---- 回传数据：勾选删除 ---- */
.finance-delete-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.finance-delete-count {
  color: var(--muted);
  font-size: 0.8rem;
}

.finance-delete-message {
  font-size: 0.8rem;
}

.finance-delete-message.is-progress { color: #8a6a16; }
.finance-delete-message.is-success { color: var(--success, #397555); }
.finance-delete-message.is-error { color: var(--danger, #9d3f35); }

.settlement-select-col {
  display: none;
  width: 42px;
  text-align: center;
}

.settlement-table.is-delete-mode .settlement-select-col {
  display: table-cell;
}

/* ---- 回传数据：亏损状态 ---- */
.status-loss {
  color: var(--danger, #9d3f35);
  background: rgba(157, 63, 53, 0.16);
}

.finance-profit.is-negative {
  color: var(--danger, #9d3f35);
}

/* ---- 发货逾期提醒 ---- */
.status-overdue {
  color: #fff;
  background: #d0342c;
  font-weight: 800;
}

.overdue-banner {
  margin-bottom: 14px;
  padding: 14px 18px;
  border-color: rgba(208, 52, 44, 0.4);
  background: rgba(208, 52, 44, 0.08);
}

.overdue-banner strong {
  display: block;
  color: #b02a22;
  font-size: 0.95rem;
}

.overdue-banner p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.overdue-panel {
  padding: 20px 22px;
  border-color: rgba(208, 52, 44, 0.35);
  background: linear-gradient(135deg, rgba(208, 52, 44, 0.09), rgba(255, 253, 248, 0.6));
}

.overdue-panel-head h2 {
  margin: 0;
  color: #b02a22;
  font-size: 1.1rem;
}

.overdue-panel-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.overdue-store-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.overdue-store {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid rgba(208, 52, 44, 0.28);
  border-radius: 12px;
  background: #fff;
}

.overdue-store strong { color: var(--forest-900); font-size: 0.95rem; }
.overdue-store-count { color: #b02a22; font-weight: 800; font-size: 0.85rem; }
.overdue-store small { color: var(--muted); font-size: 0.75rem; }

/* ---- SKU 监控：按店铺查找 ---- */
.monitor-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-bottom: 16px;
  padding: 14px 18px;
}

.monitor-store-filter {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.monitor-store-filter label {
  color: var(--muted);
  font-size: 0.82rem;
}

.monitor-store-filter select {
  height: 38px;
  min-width: 220px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.85rem;
}

.monitor-filter-hint {
  color: var(--muted);
  font-size: 0.78rem;
}

@media (max-width: 640px) {
  .monitor-store-filter {
    width: 100%;
  }
  .monitor-store-filter select {
    flex: 1 1 auto;
    min-width: 0;
  }
}

/* ---- 店铺：绑定店铺弹窗 ---- */
.store-hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.bind-modal-card {
  width: min(520px, 100%);
}

@media (max-width: 640px) {
  .store-hero-actions {
    width: 100%;
    justify-content: space-between;
  }
  .bind-modal-card {
    padding: 22px 18px;
  }
}

/* ---- 店铺：顶部操作栏（一键刷新 / 绑定店铺 / 购买位置 同一行） ---- */
.store-action-bar {
  margin-bottom: 18px;
  padding: 16px 18px;
}

.store-action-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.store-action-form {
  display: inline-flex;
  margin: 0;
}

.store-action-note {
  color: var(--muted);
  font-size: 0.8rem;
}

.store-action-bar .sync-progress,
.store-action-bar .notice {
  margin: 16px 0 0;
}

@media (max-width: 640px) {
  .store-action-row {
    display: grid;
    grid-template-columns: 1fr;
  }
  .store-action-form,
  .store-action-row .button {
    width: 100%;
  }
}

/* ---- 店铺：三块操作说明卡 ---- */
.store-action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.store-action-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 20px;
}

.store-action-card h3 {
  margin: 0;
  color: var(--forest-900);
  font-size: 1rem;
}

.store-action-card p {
  flex: 1;
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.65;
}

.store-action-card .store-action-form {
  margin: 0;
}

.store-action-warn {
  color: var(--danger, #9d3f35);
  font-size: 0.74rem;
}

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

/* ---- 店铺：列表标题 + 拖动排序 ---- */
.store-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.store-list-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin: 26px 0 14px;
}

.store-list-head h2 {
  margin: 0;
  color: var(--forest-900);
  font-size: 1.1rem;
}

.store-list-hint {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.store-list-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.store-sort-status {
  color: var(--muted);
  font-size: 0.78rem;
}

.store-sort-status.is-progress { color: #8a6a16; }
.store-sort-status.is-success { color: var(--success, #397555); }
.store-sort-status.is-error { color: var(--danger, #9d3f35); }

.store-card { position: relative; }

.store-grid.is-sorting .store-card {
  cursor: grab;
  touch-action: none;
  user-select: none;
  padding-bottom: 32px;
  border-color: rgba(212, 181, 75, 0.75);
}

.store-grid.is-sorting .store-card::after {
  content: "⠿ 按住拖动";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  text-align: center;
  color: #9a7f22;
  font-size: 0.72rem;
}

.store-grid.is-sorting .store-card-actions {
  pointer-events: none;
  opacity: 0.5;
}

/* 鼠标拖动源卡片 */
.store-grid.is-sorting .store-card.is-dragging {
  cursor: grabbing;
  opacity: 0.7;
  border: 2px dashed #d4b54b;
  box-shadow: 0 0 0 3px rgba(212, 181, 75, 0.35);
}

/* 触屏拖动时浮起的卡片 */
.store-card.is-floating {
  pointer-events: none;
  will-change: transform;
  transform-origin: center center;
  opacity: 0.97;
  border-color: #d4b54b;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.34), 0 0 0 3px rgba(212, 181, 75, 0.4);
}

.store-grid.is-sorting .store-card.is-dragging::after,
.store-card.is-floating::after {
  content: "松开即可放置";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  text-align: center;
  color: #9a7f22;
  font-size: 0.72rem;
}

/* 原位占位：虚线框，呼吸提示 */
.store-card-placeholder {
  border: 2px dashed rgba(212, 181, 75, 0.9);
  border-radius: 18px;
  background: rgba(212, 181, 75, 0.1);
  animation: store-placeholder-pulse 1.4s ease-in-out infinite;
}

@keyframes store-placeholder-pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

@media (max-width: 1400px) {
  .store-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .store-list-head { align-items: flex-start; }
  .store-list-actions { width: 100%; justify-content: space-between; }
}

/* 进度条默认收起，点刷新时由 JS 展开 */
.sync-progress[hidden] { display: none; }

/* ---- 店铺子菜单（进店后的功能切换） ---- */
.store-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
  margin-bottom: 8px;
}

.store-subnav a {
  padding: 9px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.8);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.store-subnav a:hover {
  border-color: var(--moss-500);
  color: var(--forest-800);
}

.store-subnav a.active {
  border-color: var(--forest-800);
  background: var(--forest-800);
  color: var(--cream-100);
}

.store-danger-panel {
  margin-top: 22px;
}

@media (max-width: 640px) {
  .store-subnav { gap: 6px; }
  .store-subnav a {
    flex: 1 1 auto;
    padding: 8px 12px;
    font-size: 0.8rem;
    text-align: center;
  }
}

/* ---- 数据大屏：店铺排行（领奖台式布局） ---- */
.screen-store-grid.podium {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: stretch;
}

.screen-store-grid.podium > .screen-store-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  grid-column: span 2;
  padding: 16px 18px 14px;
  text-align: center;
}

/* 冠军居中、亚军季军第二层左右 */
.screen-store-grid.podium > .screen-store-card.rank-1 { grid-column: 3 / 5; }
.screen-store-grid.podium > .screen-store-card.rank-2 { grid-column: 2 / 4; }
.screen-store-grid.podium > .screen-store-card.rank-3 { grid-column: 4 / 6; }

.screen-store-grid.podium .screen-store-rank-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.screen-store-grid.podium .screen-rank {
  position: static;
  top: auto;
  left: auto;
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.screen-medal {
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(23, 59, 44, 0.08);
  color: #4a6353;
  font-size: 0.72rem;
  font-weight: 700;
}

.screen-store-card.rank-1 .screen-medal { background: rgba(212, 181, 75, 0.3); color: #6b4f06; }
.screen-store-card.rank-2 .screen-medal { background: rgba(160, 172, 182, 0.32); color: #3b4650; }
.screen-store-card.rank-3 .screen-medal { background: rgba(196, 138, 88, 0.3); color: #5b3c1c; }

.screen-store-grid.podium .screen-store-name {
  display: block;
  color: #123023;
  font-size: 0.95rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.screen-store-grid.podium .screen-store-main {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  padding: 6px 0 2px;
}

.screen-store-grid.podium .screen-store-main b {
  color: #173b2c;
  font-size: 2rem;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.screen-store-grid.podium .screen-store-main b.is-amount {
  font-size: 1.5rem;
  color: #8a6538;
  overflow-wrap: anywhere;
}

.screen-store-grid.podium .screen-store-main span {
  color: var(--muted);
  font-size: 0.8rem;
}

.screen-store-grid.podium .screen-store-sub {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 14px;
  padding-top: 8px;
  border-top: 1px solid rgba(23, 59, 44, 0.1);
}

.screen-store-grid.podium .screen-store-sub > div {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.screen-store-grid.podium .screen-store-sub span {
  color: var(--muted);
  font-size: 0.72rem;
}

.screen-store-grid.podium .screen-store-sub b {
  color: #173b2c;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}

.screen-store-grid.podium .screen-store-sub .is-cancel b { color: var(--danger); }

.screen-store-grid.podium .screen-store-progress {
  margin: 10px 0 0;
}

.screen-store-grid.podium .screen-store-card > small {
  padding-left: 0;
  font-size: 0.7rem;
}

.screen-store-grid.podium > .screen-store-card.rank-1 {
  border-color: rgba(198, 167, 127, 0.78);
  box-shadow: 0 26px 70px rgba(198, 167, 127, 0.3);
}

@media (max-width: 1050px) {
  .screen-store-grid.podium { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .screen-store-grid.podium > .screen-store-card.rank-1 { grid-column: 2 / 4; }
  .screen-store-grid.podium > .screen-store-card.rank-2 { grid-column: 1 / 3; }
  .screen-store-grid.podium > .screen-store-card.rank-3 { grid-column: 3 / 5; }
}

@media (max-width: 640px) {
  .screen-store-grid.podium { grid-template-columns: 1fr; }
  .screen-store-grid.podium > .screen-store-card,
  .screen-store-grid.podium > .screen-store-card.rank-1,
  .screen-store-grid.podium > .screen-store-card.rank-2,
  .screen-store-grid.podium > .screen-store-card.rank-3 {
    grid-column: 1 / -1;
  }
}

/* ---- 数据大屏：商品排行紧凑化 + 图片可放大 ---- */
.screen-table th,
.screen-table td {
  padding: 8px 10px;
}

.screen-table thead th {
  padding-top: 10px;
  padding-bottom: 10px;
}

.screen-table .screen-thumb-cell {
  width: 54px;
  padding-right: 4px;
}

.screen-thumb {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  cursor: zoom-in;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.screen-thumb:hover {
  transform: scale(1.12);
  box-shadow: 0 10px 24px rgba(36, 86, 62, 0.25);
}

.screen-table .screen-name {
  min-width: 220px;
  font-size: 0.82rem;
  line-height: 1.45;
}

.screen-table .screen-qty b {
  font-size: 0.98rem;
}

.screen-table .screen-index {
  width: 38px;
}

.screen-table .screen-rank-inline {
  width: 22px;
  height: 22px;
  font-size: 0.74rem;
}

/* ---- 数据大屏：领奖台 v2（冠军元素 + 更紧凑） ---- */
.screen-store-grid.podium > .screen-store-card {
  gap: 3px;
  padding: 12px 14px 10px;
}

.screen-store-grid.podium .screen-rank {
  width: 24px;
  height: 24px;
  font-size: 0.76rem;
}

.screen-medal {
  padding: 2px 8px;
  font-size: 0.66rem;
}

.screen-store-grid.podium .screen-store-name {
  font-size: 0.85rem;
}

.screen-store-grid.podium .screen-store-main {
  padding: 4px 0 0;
}

.screen-store-grid.podium .screen-store-main b {
  font-size: 1.5rem;
}

.screen-store-grid.podium .screen-store-main b.is-amount {
  font-size: 1.15rem;
}

.screen-store-grid.podium .screen-store-main span {
  font-size: 0.72rem;
}

.screen-store-grid.podium .screen-store-sub {
  gap: 4px 10px;
  padding-top: 6px;
}

.screen-store-grid.podium .screen-store-sub span {
  font-size: 0.66rem;
}

.screen-store-grid.podium .screen-store-sub b {
  font-size: 0.85rem;
}

.screen-store-grid.podium .screen-store-progress {
  height: 5px;
  margin: 8px 0 0;
}

.screen-store-grid.podium .screen-store-card > small {
  font-size: 0.64rem;
}

/* 冠军：皇冠 + 金色渐变卡片 */
.screen-store-grid.podium .screen-crown {
  display: block;
  margin: -2px 0 1px;
  font-size: 1.45rem;
  line-height: 1;
  filter: drop-shadow(0 4px 10px rgba(180, 140, 30, 0.5));
  animation: screen-crown-float 2.4s ease-in-out infinite;
}

@keyframes screen-crown-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.screen-store-grid.podium > .screen-store-card.rank-1 {
  background: linear-gradient(160deg, #fffaf0 0%, #f6e7bb 55%, #ecd79b 100%);
  border-color: rgba(198, 167, 127, 0.95);
  box-shadow: 0 24px 60px rgba(198, 167, 127, 0.34), 0 0 0 2px rgba(212, 181, 75, 0.4);
}

.screen-store-grid.podium > .screen-store-card.rank-1 .screen-store-name,
.screen-store-grid.podium > .screen-store-card.rank-1 .screen-store-main b,
.screen-store-grid.podium > .screen-store-card.rank-1 .screen-store-sub b {
  color: #6b4f06;
}

.screen-store-grid.podium > .screen-store-card.rank-1 .screen-store-sub {
  border-top-color: rgba(138, 106, 20, 0.22);
}

/* 亚军 / 季军：轻微银铜色点缀 */
.screen-store-grid.podium > .screen-store-card.rank-2 {
  border-color: rgba(160, 172, 182, 0.7);
}

.screen-store-grid.podium > .screen-store-card.rank-3 {
  border-color: rgba(196, 138, 88, 0.7);
}

/* ---- 数据大屏：店铺排行（前3领奖台 + 其余紧凑列表） ---- */
.screen-podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 12px;
}

.screen-podium-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 12px 12px;
  border: 1px solid rgba(191, 210, 157, 0.2);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(245, 240, 228, 0.96), rgba(225, 234, 214, 0.9));
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
  text-align: center;
}

/* 用 order 把前三排成：亚军 | 冠军 | 季军 */
.screen-podium-card.rank-2 { order: 1; border-color: rgba(160, 172, 182, 0.75); }
.screen-podium-card.rank-1 { order: 2; }
.screen-podium-card.rank-3 { order: 3; border-color: rgba(196, 138, 88, 0.75); }

.screen-podium-card.rank-1 {
  background: linear-gradient(160deg, #fffaf0 0%, #f6e7bb 55%, #ecd79b 100%);
  border-color: rgba(198, 167, 127, 0.95);
  box-shadow: 0 16px 40px rgba(198, 167, 127, 0.34), 0 0 0 2px rgba(212, 181, 75, 0.4);
}

.screen-podium-card.is-empty { opacity: 0.6; }

.screen-podium-card .screen-crown {
  display: block;
  margin: -2px 0 0;
  font-size: 1.3rem;
  line-height: 1;
  filter: drop-shadow(0 4px 10px rgba(180, 140, 30, 0.5));
  animation: screen-crown-float 2.4s ease-in-out infinite;
}

.screen-podium-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.screen-podium-card .screen-rank {
  position: static;
  top: auto;
  left: auto;
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(23, 59, 44, 0.1);
  color: #4a6353;
  font-size: 0.72rem;
  font-weight: 800;
}

.screen-podium-card.rank-1 .screen-rank { background: linear-gradient(145deg, #f7df9a, #c9a45c); color: #4f3907; }
.screen-podium-card.rank-2 .screen-rank { background: linear-gradient(145deg, #f2f4f5, #b9c1c7); color: #3b4650; }
.screen-podium-card.rank-3 .screen-rank { background: linear-gradient(145deg, #efc99d, #b77a45); color: #4d2e13; }

.screen-podium-card.rank-1 .screen-medal { background: rgba(212, 181, 75, 0.35); color: #6b4f06; }
.screen-podium-card.rank-2 .screen-medal { background: rgba(160, 172, 182, 0.35); color: #3b4650; }
.screen-podium-card.rank-3 .screen-medal { background: rgba(196, 138, 88, 0.35); color: #5b3c1c; }

.screen-podium-name {
  color: #123023;
  font-size: 0.82rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.screen-podium-card.rank-1 .screen-podium-name { color: #6b4f06; }

.screen-podium-main {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 3px;
}

.screen-podium-main b {
  color: #173b2c;
  font-size: 1.4rem;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.screen-podium-card.rank-1 .screen-podium-main b { color: #6b4f06; }
.screen-podium-main b.is-amount { font-size: 1.02rem; color: #8a6538; overflow-wrap: anywhere; }
.screen-podium-main span { color: var(--muted); font-size: 0.68rem; }

.screen-podium-sub {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px 10px;
  color: var(--muted);
  font-size: 0.68rem;
}

.screen-podium-sub b { color: #173b2c; font-size: 0.76rem; font-variant-numeric: tabular-nums; }
.screen-podium-card.rank-1 .screen-podium-sub b { color: #6b4f06; }
.screen-podium-sub .is-cancel b { color: var(--danger); }

.screen-podium-bar {
  position: relative;
  width: 100%;
  height: 3px;
  margin-top: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(23, 59, 44, 0.12);
}

.screen-podium-bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--forest-700), var(--moss-500));
}

/* 第 4 名起：紧凑单行列表 */
.screen-rank-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 12px;
  margin-top: 12px;
}

.screen-rank-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border: 1px solid rgba(191, 210, 157, 0.18);
  border-radius: 10px;
  background: rgba(245, 240, 228, 0.82);
  font-size: 0.78rem;
}

.screen-rank-row.is-empty { opacity: 0.6; }

.screen-rank-no {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(23, 59, 44, 0.1);
  color: #4a6353;
  font-size: 0.68rem;
  font-weight: 800;
}

.screen-rank-store {
  flex: 1 1 auto;
  min-width: 0;
  color: #123023;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.screen-rank-vals {
  flex: 0 0 auto;
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--muted);
  font-size: 0.72rem;
}

.screen-rank-vals > b {
  color: #173b2c;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

.screen-rank-vals b {
  color: #173b2c;
  font-variant-numeric: tabular-nums;
}

.screen-rank-vals b.is-amount { color: #8a6538; font-size: 0.82rem; }
.screen-rank-vals .is-cancel b { color: var(--danger); }
.screen-rank-vals .screen-unit { color: var(--muted); font-size: 0.68rem; }

@media (max-width: 900px) {
  .screen-rank-list { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .screen-podium { grid-template-columns: 1fr; gap: 8px; }
  .screen-podium-card.rank-1,
  .screen-podium-card.rank-2,
  .screen-podium-card.rank-3 { order: 0; }
}

/* ---- 数据大屏：店铺排行（一排 4 个等宽卡片，冠军带皇冠） ---- */
.screen-store-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.screen-store-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 12px 14px;
  text-align: center;
}

.screen-store-rank-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.screen-store-grid .screen-rank {
  position: static;
  top: auto;
  left: auto;
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(23, 59, 44, 0.1);
  color: #4a6353;
  font-size: 0.72rem;
  font-weight: 800;
}

.screen-store-card.rank-1 .screen-rank { background: linear-gradient(145deg, #f7df9a, #c9a45c); color: #4f3907; }
.screen-store-card.rank-2 .screen-rank { background: linear-gradient(145deg, #f2f4f5, #b9c1c7); color: #3b4650; }
.screen-store-card.rank-3 .screen-rank { background: linear-gradient(145deg, #efc99d, #b77a45); color: #4d2e13; }

.screen-store-card.rank-1 .screen-medal { background: rgba(212, 181, 75, 0.35); color: #6b4f06; }
.screen-store-card.rank-2 .screen-medal { background: rgba(160, 172, 182, 0.35); color: #3b4650; }
.screen-store-card.rank-3 .screen-medal { background: rgba(196, 138, 88, 0.35); color: #5b3c1c; }

.screen-store-card .screen-crown {
  display: block;
  margin: -2px 0 0;
  font-size: 1.25rem;
  line-height: 1;
  filter: drop-shadow(0 4px 10px rgba(180, 140, 30, 0.5));
  animation: screen-crown-float 2.4s ease-in-out infinite;
}

.screen-store-name {
  color: #123023;
  font-size: 0.82rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.screen-store-card.rank-1 .screen-store-name { color: #6b4f06; }

.screen-store-main {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 3px;
}

.screen-store-main b {
  color: #173b2c;
  font-size: 1.35rem;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.screen-store-card.rank-1 .screen-store-main b { color: #6b4f06; }
.screen-store-main b.is-amount { font-size: 1rem; color: #8a6538; overflow-wrap: anywhere; }
.screen-store-main span { color: var(--muted); font-size: 0.66rem; }

.screen-store-sub {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px 10px;
  color: var(--muted);
  font-size: 0.66rem;
}

.screen-store-sub b { color: #173b2c; font-size: 0.76rem; font-variant-numeric: tabular-nums; }
.screen-store-card.rank-1 .screen-store-sub b { color: #6b4f06; }
.screen-store-sub .is-cancel b { color: var(--danger); }

/* 冠军整卡金色 */
.screen-store-card.rank-1 {
  background: linear-gradient(160deg, #fffaf0 0%, #f6e7bb 55%, #ecd79b 100%);
  border-color: rgba(198, 167, 127, 0.95);
  box-shadow: 0 16px 40px rgba(198, 167, 127, 0.34), 0 0 0 2px rgba(212, 181, 75, 0.4);
}

.screen-store-card .screen-store-progress {
  width: 100%;
  height: 4px;
  margin: 8px 0 0;
}

@media (max-width: 1200px) {
  .screen-store-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

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

@media (max-width: 600px) {
  .screen-store-grid { grid-template-columns: 1fr; }
}

/* ---- 数据大屏：冠亚季军皇冠 + 金银铜边框 ---- */
.screen-store-card .screen-crown {
  display: block;
  margin: -2px 0 1px;
  line-height: 0;
}

.screen-store-card .screen-crown svg {
  width: 26px;
  height: 24px;
  fill: currentColor;
}

.screen-store-card .screen-crown.crown-1 {
  color: #d9a521;
  filter: drop-shadow(0 3px 9px rgba(200, 155, 20, 0.6));
  animation: screen-crown-float 2.4s ease-in-out infinite;
}

.screen-store-card .screen-crown.crown-2 {
  color: #aeb8c1;
  filter: drop-shadow(0 3px 8px rgba(148, 163, 176, 0.55));
}

.screen-store-card .screen-crown.crown-3 {
  color: #c07a3e;
  filter: drop-shadow(0 3px 8px rgba(170, 110, 55, 0.55));
}

/* 冠军：金边 */
.screen-store-card.rank-1 {
  background: linear-gradient(160deg, #fffaf0 0%, #f6e7bb 55%, #ecd79b 100%);
  border-color: #d4b54b;
  box-shadow: 0 16px 40px rgba(198, 167, 127, 0.34), 0 0 0 2px rgba(212, 181, 75, 0.5);
}

/* 亚军：银白卡片 + 银边 */
.screen-store-card.rank-2 {
  background: linear-gradient(160deg, #ffffff 0%, #f2f5f7 55%, #dde4e9 100%);
  border-color: rgba(150, 162, 172, 0.9);
  box-shadow: 0 14px 34px rgba(140, 155, 168, 0.3), 0 0 0 2px rgba(196, 206, 214, 0.6);
}

/* 季军：铜色卡片 + 铜边 */
.screen-store-card.rank-3 {
  background: linear-gradient(160deg, #fff8f1 0%, #f6e4d3 55%, #e9cdb0 100%);
  border-color: rgba(176, 118, 70, 0.9);
  box-shadow: 0 14px 34px rgba(176, 118, 70, 0.28), 0 0 0 2px rgba(200, 140, 90, 0.5);
}

/* 前三名文字配色跟着奖牌走 */
.screen-store-card.rank-2 .screen-store-name,
.screen-store-card.rank-2 .screen-store-main b,
.screen-store-card.rank-2 .screen-store-sub b {
  color: #3b4650;
}

.screen-store-card.rank-3 .screen-store-name,
.screen-store-card.rank-3 .screen-store-main b,
.screen-store-card.rank-3 .screen-store-sub b {
  color: #5b3c1c;
}

/* ---- 冠军：带宝石的金冠 ---- */
.screen-store-card .screen-crown.crown-1 svg {
  width: 30px;
  height: 25px;
}

.screen-crown.crown-1 .crown-body,
.screen-crown.crown-1 .crown-base {
  fill: #e0b32a;
  stroke: #a97f10;
  stroke-width: 0.6;
}

.screen-crown.crown-1 .crown-pearl { fill: #f8e9ac; }
.screen-crown.crown-1 .gem-ruby { fill: #d5342f; }
.screen-crown.crown-1 .gem-sapphire { fill: #2f6ec4; }
.screen-crown.crown-1 .gem-emerald { fill: #2f9a5e; }

/* 冠军皇冠换回 emoji 版（自带宝石） */
.screen-store-card .screen-crown.crown-1 {
  font-size: 1.55rem;
  line-height: 1;
  margin: -1px 0 1px;
  filter: drop-shadow(0 3px 9px rgba(200, 155, 20, 0.6));
  animation: screen-crown-float 2.4s ease-in-out infinite;
}

/* ---- 登录页：Ozon / 快手 两个板块 ---- */
.auth-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(23, 59, 44, 0.05);
}

.auth-tab {
  flex: 1 1 0;
  padding: 9px 12px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
}

.auth-tab:hover { color: var(--forest-800); }

.auth-tab.is-active {
  background: var(--forest-800);
  color: var(--cream-100);
}

.auth-panel[hidden] { display: none; }

.auth-soon {
  padding: 18px 16px;
  border: 1px dashed rgba(23, 59, 44, 0.25);
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.7);
}

.auth-soon strong {
  display: block;
  color: var(--forest-900);
  font-size: 1rem;
}

.auth-soon p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.7;
}

.auth-soon ul {
  margin: 12px 0 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.9;
}

/* ---- 快手工具 ---- */
.ks-nav-link {
  position: relative;
}

.ks-nav-link::after {
  content: "新";
  margin-left: 5px;
  padding: 1px 5px;
  border-radius: 999px;
  background: #d4b54b;
  color: #3c2c05;
  font-size: 0.62rem;
  font-weight: 800;
  vertical-align: middle;
}

.ks-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.ks-feature-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 22px;
}

.ks-feature-card.is-primary {
  border-color: rgba(47, 143, 98, 0.5);
  background: linear-gradient(150deg, rgba(111, 155, 104, 0.14), rgba(255, 253, 248, 0.7));
}

.ks-feature-card.is-soon {
  opacity: 0.82;
}

.ks-feature-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ks-feature-head h2 {
  margin: 0;
  color: var(--forest-900);
  font-size: 1.05rem;
}

.ks-feature-card p {
  flex: 1;
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.7;
}

.ks-feature-card .button { align-self: flex-start; }

.ks-soon-hint {
  align-self: flex-start;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.ks-stores-panel { padding: 22px; }

.ks-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.ks-panel-head h2 {
  margin: 0;
  color: var(--forest-900);
  font-size: 1.05rem;
}

.ks-panel-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.ks-store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.ks-store-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.85);
}

.ks-store-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.ks-store-top strong { color: var(--forest-900); }

.ks-store-card small { color: var(--muted); font-size: 0.76rem; }

.ks-store-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.ks-store-actions form { margin: 0; }

.ks-add-store-form {
  margin-top: 6px;
  padding-top: 16px;
  border-top: 1px dashed rgba(23, 59, 44, 0.16);
}

.ks-store-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.ks-store-switch a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.8);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.ks-store-switch a.active {
  border-color: var(--forest-800);
  background: var(--forest-800);
  color: var(--cream-100);
}

.ks-on {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #46b47a;
}

.ks-on.is-paused {
  background: #a7ada7;
  opacity: 0.7;
}

.ks-cs-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.8fr);
  align-items: start;
  gap: 18px;
}

.ks-cs-side {
  display: grid;
  gap: 18px;
}

.ks-switch-row {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(23, 59, 44, 0.04);
}

.ks-rules-panel { padding: 22px; margin-top: 18px; }

.ks-rule-list {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.ks-rule {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 253, 248, 0.85);
}

.ks-rule-main {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.ks-rule-keyword {
  flex: 0 0 auto;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(47, 143, 98, 0.16);
  color: #1f5c3e;
  font-size: 0.78rem;
  font-weight: 700;
}

.ks-rule-reply {
  color: var(--ink);
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.ks-rule-form {
  padding-top: 14px;
  border-top: 1px dashed rgba(23, 59, 44, 0.16);
}

.ks-test-panel h2,
.ks-cs-side .panel h2 {
  margin: 0 0 6px;
  color: var(--forest-900);
  font-size: 1rem;
}

.ks-test-panel p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.8rem;
}

.ks-test-result {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(47, 143, 98, 0.35);
  border-radius: 12px;
  background: rgba(47, 143, 98, 0.08);
}

.ks-test-source {
  display: inline-block;
  margin-bottom: 6px;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(23, 59, 44, 0.1);
  color: #3d5647;
  font-size: 0.72rem;
  font-weight: 700;
}

.ks-test-source.is-rule { background: rgba(47, 143, 98, 0.2); color: #1f5c3e; }
.ks-test-source.is-ai { background: rgba(74, 122, 208, 0.18); color: #2b4f8f; }
.ks-test-source.is-fallback { background: rgba(163, 105, 39, 0.16); color: #7a4f13; }
.ks-test-source.is-error { background: rgba(157, 63, 53, 0.16); color: #8f342b; }

.ks-test-result p {
  margin: 0;
  color: var(--ink);
  font-size: 0.86rem;
  line-height: 1.7;
  white-space: pre-wrap;
}

.ks-conversation-list { display: grid; gap: 8px; }

.ks-conversation {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 253, 248, 0.85);
}

.ks-conversation strong { color: var(--forest-900); font-size: 0.86rem; }
.ks-conversation small { color: var(--muted); font-size: 0.74rem; }

.ks-login-form {
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px dashed rgba(23, 59, 44, 0.16);
}

@media (max-width: 1050px) {
  .ks-feature-grid { grid-template-columns: 1fr; }
  .ks-cs-layout { grid-template-columns: 1fr; }
}

/* ---- 管理后台：AI 接入 ---- */
.ai-status-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
  padding: 16px 20px;
}

.ai-status-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.ai-test-box {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ai-test-result {
  font-size: 0.8rem;
  color: var(--muted);
  max-width: 420px;
  overflow-wrap: anywhere;
}

.ai-test-result.is-progress { color: #8a6a16; }
.ai-test-result.is-success { color: var(--success, #397555); font-weight: 700; }
.ai-test-result.is-error { color: var(--danger, #9d3f35); }

.ai-clear-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
  padding: 16px 20px;
}

.ai-clear-panel strong { display: block; color: var(--forest-900); }
.ai-clear-panel p { margin: 4px 0 0; color: var(--muted); font-size: 0.8rem; }

.ai-help-panel { margin-top: 18px; padding: 20px 22px; }
.ai-help-panel h2 { margin: 0 0 12px; color: var(--forest-900); font-size: 1rem; }
.ai-help-scroll { overflow-x: auto; }

.ai-help-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.ai-help-table th,
.ai-help-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.ai-help-table th { color: var(--muted); font-size: 0.72rem; }

/* ---- 快手区：导航与 Ozon 区区分开（黄色高亮保留） ---- */
.site-header.is-kuaishou {
  background: rgba(255, 246, 240, 0.9);
}

.site-header.is-kuaishou .brand-mark {
  background: linear-gradient(145deg, #ff7a2f, #ef3d1f);
  color: #ffffff;
}

.nav-switch-link {
  border: 1px dashed rgba(23, 59, 44, 0.3);
  border-radius: 8px;
}

.site-header.is-kuaishou .nav-switch-link {
  color: #a8391b;
  border-color: rgba(200, 70, 30, 0.4);
}

/* ---- 会员页：快手会员区 ---- */
.plan-section-head {
  margin-bottom: 16px;
}

.plan-section-head h2 {
  margin: 4px 0 6px;
  color: var(--forest-900);
  font-size: 1.3rem;
}

.plan-section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.7;
}

.plan-section-head-ks h2 { color: #b8471f; }

.plan-subhead {
  margin: 22px 0 10px;
  color: var(--forest-900);
  font-size: 1.05rem;
}

.plan-card-ks {
  border-color: rgba(232, 106, 44, 0.35);
}

.plan-card-ks.featured {
  border-color: rgba(232, 106, 44, 0.7);
  box-shadow: 0 24px 60px rgba(232, 106, 44, 0.18);
}

.plan-badge-ks { background: linear-gradient(145deg, #ff8a3d, #e2500f); color: #fff; }

.button-ks {
  background: linear-gradient(145deg, #ff8a3d, #e2500f);
  border-color: transparent;
  color: #fff;
}

/* ---- 后台套餐：快手标签 ---- */
.plan-admin-ks {
  border-color: rgba(232, 106, 44, 0.45);
  background: linear-gradient(150deg, rgba(255, 138, 61, 0.1), rgba(255, 253, 248, 0.7));
}

/* ---- 后台账号库：隐藏功能勾选 ---- */
.feature-flags-cell {
  display: grid;
  gap: 3px;
  min-width: 150px;
}

.feature-flags-cell .check-field {
  font-size: 0.76rem;
  gap: 6px;
}

.feature-flags-cell .button {
  margin-top: 4px;
}

/* ---- 选品监控（占位） ---- */
.insight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.insight-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 22px;
}

.insight-card.is-primary {
  border-color: rgba(47, 143, 98, 0.45);
  background: linear-gradient(150deg, rgba(111, 155, 104, 0.14), rgba(255, 253, 248, 0.7));
}

.insight-card.is-soon { opacity: 0.85; }

.insight-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.insight-card-head h2 {
  margin: 0;
  color: var(--forest-900);
  font-size: 1.05rem;
}

.insight-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.75;
}

.insight-notice { margin-top: 18px; padding: 20px 22px; }
.insight-notice h2 { margin: 0 0 8px; color: var(--forest-900); font-size: 1rem; }
.insight-notice p { margin: 0; color: var(--muted); font-size: 0.84rem; line-height: 1.8; }

@media (max-width: 1050px) {
  .insight-grid { grid-template-columns: 1fr; }
}

.ks-test-source.is-handoff { background: rgba(208, 52, 44, 0.16); color: #8f342b; }
.ks-test-source.is-blocked { background: rgba(163, 105, 39, 0.18); color: #7a4f13; }

/* 交流中心：公告 / 建议 / 聊天 */
.community-section { position: relative; }
.community-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:18px; }
.community-panel-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; }
.community-panel-head div { display:grid; gap:2px; }
.community-panel-head small, .community-item-meta small, .community-author { color:var(--muted); font-size:12px; }
.community-list { display:grid; gap:10px; }
.community-item { padding:12px 13px; border:1px solid rgba(23,59,44,.1); border-radius:12px; background:rgba(255,255,255,.55); }
.community-item h3 { margin:6px 0 4px; font-size:15px; }
.community-item p { margin:0; color:#3f4c42; font-size:13px; line-height:1.55; }
.community-item-meta { display:flex; flex-wrap:wrap; align-items:center; gap:6px; }
.community-pin, .community-category, .community-status { display:inline-flex; align-items:center; border-radius:999px; padding:2px 7px; font-size:11px; font-weight:700; }
.community-pin { background:#f6d77a; color:#5d4200; }
.community-category { background:#e8f1e8; color:#24563e; }
.community-status.status-approved { background:#dff3e5; color:#1d6b3d; }
.community-status.status-pending { background:#fff1c8; color:#8b5a00; }
.community-status.status-rejected { background:#fbe2df; color:#9d3f35; }
.community-empty { padding:16px; border-radius:10px; color:var(--muted); background:rgba(23,59,44,.04); text-align:center; font-size:13px; }
.community-suggestion-form { margin-bottom:14px; padding:12px; border:1px dashed rgba(23,59,44,.2); border-radius:12px; background:rgba(255,255,255,.45); }
.community-chat { margin-top:18px; }
.community-chat-layout { display:grid; grid-template-columns:minmax(220px, .8fr) minmax(0, 1.8fr); gap:14px; min-height:360px; }
.community-chat-side { display:flex; flex-direction:column; gap:8px; min-width:0; }
.community-search input { width:100%; }
.community-thread-list, .community-contact-list { display:grid; gap:6px; max-height:420px; overflow:auto; }
.community-thread { display:grid; gap:2px; width:100%; padding:9px 10px; border:1px solid rgba(23,59,44,.1); border-radius:10px; background:#fff; color:inherit; text-align:left; cursor:pointer; }
.community-thread small { overflow:hidden; color:var(--muted); text-overflow:ellipsis; white-space:nowrap; }
.community-chat-main { display:flex; min-width:0; flex-direction:column; border:1px solid rgba(23,59,44,.12); border-radius:12px; overflow:hidden; background:#fff; }
.community-chat-head { display:flex; justify-content:space-between; gap:10px; padding:10px 12px; border-bottom:1px solid rgba(23,59,44,.1); }
.community-message-list { display:flex; flex:1; flex-direction:column; gap:10px; padding:12px; overflow:auto; background:#f8faf7; }
.community-message { max-width:78%; padding:8px 10px; border-radius:12px; font-size:13px; }
.community-message.is-other { align-self:flex-start; background:#eef3ed; }
.community-message.is-mine { align-self:flex-end; background:#dcecff; }
.community-message small { display:block; margin-bottom:4px; color:var(--muted); font-size:10px; }
.community-message p { margin:4px 0 0; white-space:pre-wrap; }
.community-message img { display:block; max-width:260px; max-height:220px; margin-top:4px; border-radius:10px; }
.community-message-form { display:grid; gap:8px; padding:10px 12px; border-top:1px solid rgba(23,59,44,.1); }
.community-message-form textarea { width:100%; resize:vertical; }
.community-message-actions { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.community-file-button { display:inline-flex; align-items:center; gap:6px; padding:7px 10px; border-radius:9px; background:rgba(23,59,44,.08); color:var(--forest); font-size:12px; cursor:pointer; }
.community-file-button input { display:none; }
.community-suggestion-detail { display:grid; gap:18px; }
.community-suggestion-body p { white-space:pre-wrap; }
.community-replies { display:grid; gap:12px; }
.community-reply { padding:11px 12px; border-radius:11px; background:rgba(255,255,255,.58); }
.community-reply-head { display:flex; align-items:center; gap:10px; }
.community-reply-head form { margin-left:auto; }
.community-reply p { margin:7px 0 0; white-space:pre-wrap; }
.community-reply-form { display:grid; gap:10px; }
.admin-community-list { display:grid; gap:14px; }
.admin-community-item { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:12px; padding:12px; border:1px solid rgba(23,59,44,.1); border-radius:12px; }
.admin-community-suggestion { grid-column:1 / -1; }
@media (max-width: 900px) {
  .community-grid, .community-chat-layout, .admin-community-item { grid-template-columns:1fr; }
  .admin-community-suggestion { grid-column:auto; }
}
/* ---- 功能中心：主页面工具 / 快速采买子类目 ---- */
.function-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
  margin-bottom: 12px;
}

.function-subnav a {
  padding: 10px 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.86);
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.function-subnav a:hover {
  border-color: var(--moss-500);
  color: var(--forest-800);
}

.function-subnav a.active {
  border-color: var(--forest-800);
  background: var(--forest-800);
  color: var(--cream-100);
}

.function-browser-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  border-color: rgba(163, 105, 39, 0.3);
  background: linear-gradient(135deg, rgba(255, 249, 232, 0.96), rgba(255, 255, 255, 0.98));
}

.function-browser-panel h2 {
  margin: 0 0 8px;
}

.function-browser-panel p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
}

.function-browser-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.function-browser-steps span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(163, 105, 39, 0.1);
  color: #80501d;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.function-section-head {
  margin-top: 24px;
}

.function-section-head p:not(.eyebrow) {
  margin: 4px 0 0;
  color: var(--muted);
}

.function-store-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.function-store-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  border-top: 4px solid #b8b8b8;
  scroll-margin-top: 100px;
}

.function-store-card.is-online {
  border-top-color: #0a8a52;
}

.function-store-card.is-selected {
  box-shadow: 0 0 0 3px rgba(0, 91, 255, 0.13), var(--shadow);
}

.function-store-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.function-store-head h2 {
  margin: 0 0 7px;
  font-size: 1.18rem;
}

.function-store-head p {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.function-offline-tip {
  padding: 10px 12px;
  border: 1px dashed rgba(229, 57, 53, 0.35);
  border-radius: 10px;
  background: rgba(229, 57, 53, 0.05);
  color: #8a2f2c;
  font-size: 0.8rem;
}

.function-tool-list {
  display: grid;
  gap: 8px;
}

.function-tool-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.7);
}

.function-tool-row > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.function-tool-row strong {
  color: var(--ink);
  font-size: 0.9rem;
}

.function-tool-row span {
  color: var(--muted);
  font-size: 0.75rem;
}

.function-store-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 11px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 0.72rem;
}

.function-recent-panel {
  margin-top: 24px;
}

.function-task-table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
}

.function-task-table th,
.function-task-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.function-task-table th {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.fn-progress {
  min-width: 145px;
}

.fn-progress-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.7rem;
}

.fn-progress-track {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9e9e9;
}

.fn-progress-track span {
  display: block;
  height: 100%;
  transition: width 0.4s ease;
}

.function-task-result summary {
  cursor: pointer;
  color: var(--forest-800);
  font-size: 0.78rem;
  font-weight: 700;
}

.function-task-result.is-error summary {
  color: #b3241b;
}

.function-task-result pre {
  max-width: 460px;
  max-height: 260px;
  overflow: auto;
  margin: 8px 0 0;
  padding: 10px;
  border-radius: 8px;
  background: #f4f2ed;
  color: var(--ink);
  font: 12px/1.55 ui-monospace, SFMono-Regular, Consolas, monospace;
  white-space: pre-wrap;
}

@media (max-width: 900px) {
  .function-store-grid {
    grid-template-columns: 1fr;
  }

  .function-browser-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .function-browser-steps {
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  .function-tool-row,
  .function-store-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .function-tool-row .button {
    width: 100%;
  }
}

/* ---- 功能中心：一键报活动批处理 ---- */
.function-batch-panel {
  margin-top: 18px;
  border-color: rgba(0, 91, 255, 0.22);
  background: linear-gradient(135deg, rgba(240, 247, 255, 0.94), rgba(255, 255, 255, 0.98));
}

.function-batch-head,
.function-batch-actions,
.function-batch-progress-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

.function-batch-head h2,
.function-batch-progress-head h2 {
  margin: 4px 0 7px;
}

.function-batch-head p:not(.eyebrow),
.function-batch-progress-head p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.function-batch-online {
  flex: none;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(10, 138, 82, 0.1);
  color: #087044;
  font-size: 0.78rem;
  font-weight: 800;
}

.function-batch-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.function-batch-option {
  display: grid;
  align-items: stretch;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.75);
  cursor: pointer;
}

.function-batch-option:has(input:checked) {
  border-color: var(--forest-700);
  box-shadow: 0 0 0 2px rgba(111, 155, 104, 0.14);
  background: rgba(238, 248, 239, 0.9);
}

.function-batch-option.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.function-batch-option input {
  width: 18px;
  height: 18px;
  flex: none;
  accent-color: var(--forest-700);
}

.function-batch-option span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.function-batch-option strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 0.84rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.function-batch-option small {
  color: var(--muted);
  font-size: 0.72rem;
}

.function-batch-actions {
  align-items: center;
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px dashed var(--line);
}

.function-batch-actions > span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.function-batch-progress {
  margin-top: 16px;
  border-color: rgba(0, 91, 255, 0.28);
  scroll-margin-top: 90px;
}

.function-batch-progress.is-finished {
  border-color: rgba(10, 138, 82, 0.3);
}

.function-batch-progress-head > strong {
  color: var(--forest-800);
  font-size: 2rem;
  line-height: 1;
}

.function-batch-bar {
  height: 10px;
  margin: 13px 0;
  overflow: hidden;
  border-radius: 999px;
  background: #e6e8ec;
}

.function-batch-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #005bff, #0a8a52);
  transition: width 0.4s ease;
}

.function-batch-waiting,
.function-batch-current {
  margin: 10px 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 700;
}

.function-batch-waiting {
  border: 1px solid rgba(217, 125, 0, 0.3);
  background: rgba(255, 181, 56, 0.12);
  color: #8b5500;
}

.function-batch-current {
  background: rgba(0, 91, 255, 0.07);
  color: #174c9b;
}

.function-batch-task-table {
  min-width: 720px;
}

@media (max-width: 620px) {
  .function-batch-head,
  .function-batch-actions,
  .function-batch-progress-head {
    align-items: stretch;
    flex-direction: column;
  }

  .function-batch-actions .button,
  .function-batch-submit {
    width: 100%;
  }
}

.function-batch-store-check {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.function-batch-client {
  display: grid;
  gap: 4px;
}

.function-batch-client select {
  width: 100%;
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 0.76rem;
}

.function-batch-single {
  display: block;
  overflow: hidden;
  padding-top: 6px;
  border-top: 1px dashed var(--line);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.function-batch-single b {
  color: var(--forest-800);
}

.function-tool-client {
  max-width: 210px;
  min-height: 34px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 0.76rem;
}
@media (max-width: 620px) {
  .function-tool-client,
  .function-batch-client {
    width: 100%;
    max-width: none;
  }
}

/* ---- 功能中心：文字与控件不溢出容器 ---- */
.functions-page :where(h1, h2, h3, p, span, strong, small, label, summary, td) {
  overflow-wrap: anywhere;
}

.function-browser-panel,
.function-batch-panel,
.function-store-card,
.function-batch-progress,
.function-recent-panel {
  padding: clamp(16px, 2vw, 22px);
  min-width: 0;
  overflow: hidden;
}

.function-browser-panel > div,
.function-batch-head > div,
.function-batch-progress-head > div,
.function-store-head > div,
.function-tool-row > div {
  min-width: 0;
}

.function-browser-steps span,
.functions-page .status-pill {
  white-space: normal;
  line-height: 1.35;
  text-align: center;
}

.function-store-head,
.function-tool-row,
.function-batch-head,
.function-batch-actions,
.function-batch-progress-head {
  flex-wrap: wrap;
}

.function-store-head > div {
  flex: 1 1 220px;
}

.function-store-head h2,
.function-tool-row strong,
.function-batch-option strong {
  word-break: break-word;
}

.function-tool-row > div {
  flex: 1 1 220px;
}

.function-tool-row span,
.function-store-foot span,
.function-batch-option small,
.function-batch-single {
  line-height: 1.45;
}

.function-tool-row .button {
  flex: 0 0 auto;
  white-space: normal;
  line-height: 1.25;
}

.functions-page .button {
  max-width: 100%;
  height: auto;
  min-height: 38px;
  white-space: normal;
  line-height: 1.3;
}

.function-tool-client {
  flex: 1 1 190px;
  width: auto;
  max-width: 260px;
  min-height: 38px;
  line-height: 1.3;
  text-overflow: ellipsis;
}

.function-batch-option {
  min-width: 0;
  overflow: hidden;
}

.function-batch-option strong {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.function-batch-single {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.function-batch-client select {
  min-height: 38px;
  line-height: 1.35;
  text-overflow: ellipsis;
}

.function-recent-panel .scroll-table,
.function-batch-progress .scroll-table {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
}

.function-task-table th,
.function-task-table td {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.function-task-table th {
  white-space: nowrap;
}

.function-task-table td:first-child,
.function-task-table td:nth-child(4) {
  white-space: nowrap;
}

.function-task-result pre {
  width: min(460px, 60vw);
  max-width: 100%;
}

.fn-progress {
  min-width: 130px;
  max-width: 220px;
}

.fn-progress-label {
  gap: 8px;
}

.fn-progress-label span {
  min-width: 0;
}

@media (max-width: 760px) {
  .function-browser-panel,
  .function-batch-panel,
  .function-store-card,
  .function-batch-progress,
  .function-recent-panel {
    padding: 14px;
  }

  .function-tool-client,
  .function-batch-client,
  .function-tool-row .button,
  .function-batch-actions .button {
    width: 100%;
    max-width: none;
    flex-basis: 100%;
  }

  .function-task-result pre {
    width: 100%;
    max-width: 100%;
  }
}

.functions-page .page-hero-row,
.functions-page .store-data-actions,
.functions-page .section-title-row {
  flex-wrap: wrap;
}

.functions-page .store-data-actions,
.functions-page .store-data-actions .button {
  max-width: 100%;
}

/* ---- 功能中心：按权限显示的更多功能 ---- */
.function-extra-head {
  margin-top: 24px;
}

.function-extra-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.function-extra-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 18px;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.function-extra-card:hover {
  transform: translateY(-2px);
  border-color: var(--forest-700);
  box-shadow: 0 16px 28px -22px rgba(8, 21, 15, .75);
}

.function-extra-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 13px;
  background: var(--forest-800);
  color: var(--cream-100);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .05em;
}

.function-extra-card > span:nth-child(2) {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.function-extra-card strong {
  color: var(--forest-900);
  font-size: .98rem;
}

.function-extra-card small {
  color: var(--muted);
  font-size: .8rem;
  line-height: 1.5;
}

.function-extra-card b {
  color: var(--forest-700);
  font-size: .82rem;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .function-extra-grid {
    grid-template-columns: 1fr;
  }

  .function-extra-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .function-extra-card b {
    grid-column: 2;
  }
}

/* ---- 功能中心：进度置顶 / 防节流下移 / 进度外观优化 ---- */
.functions-main-stack {
  display: flex;
  flex-direction: column;
}

.functions-main-stack .function-batch-progress {
  order: -3;
}

.functions-main-stack .function-batch-panel {
  order: -2;
}

.functions-main-stack .function-browser-panel {
  order: 100;
  margin-top: 18px;
}

.function-batch-progress {
  position: relative;
  padding: clamp(20px, 2.4vw, 28px);
  overflow: hidden;
  border: 1px solid rgba(0, 91, 255, .24);
  background:
    radial-gradient(circle at 100% 0%, rgba(0, 91, 255, .12), transparent 38%),
    linear-gradient(145deg, rgba(248, 251, 255, .98), rgba(238, 247, 241, .96));
  box-shadow: 0 22px 45px -34px rgba(10, 52, 104, .62);
}

.function-batch-progress::before {
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  content: "";
  background: linear-gradient(90deg, #0a8a52, #1a73ff, #8ab4ff);
}

.function-batch-progress.is-waiting {
  border-color: rgba(217, 125, 0, .42);
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 181, 56, .17), transparent 40%),
    linear-gradient(145deg, #fffdf8, #fff7e9);
}

.function-batch-progress.is-waiting::before {
  background: linear-gradient(90deg, #f59e0b, #ffcc66, #f59e0b);
}

.function-batch-progress.is-finished {
  border-color: rgba(10, 138, 82, .34);
}

.function-batch-progress-head {
  align-items: center;
}

.function-batch-progress-head h2 {
  font-size: clamp(1.35rem, 2.4vw, 2rem);
}

.function-batch-progress-head > strong {
  display: grid;
  flex: none;
  width: 72px;
  height: 72px;
  place-items: center;
  border: 1px solid rgba(0, 91, 255, .18);
  border-radius: 22px;
  background: rgba(255, 255, 255, .78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 12px 22px -18px rgba(0, 70, 180, .6);
  color: #1458c7;
  font-size: 1.45rem;
  font-weight: 900;
  letter-spacing: -.04em;
}

.function-batch-progress.is-waiting .function-batch-progress-head > strong {
  border-color: rgba(217, 125, 0, .24);
  color: #a35d00;
}

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

.function-batch-stats > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding: 11px 13px;
  border: 1px solid rgba(23, 59, 44, .1);
  border-radius: 13px;
  background: rgba(255, 255, 255, .68);
}

.function-batch-stats small {
  color: var(--muted);
  font-size: .74rem;
  font-weight: 700;
}

.function-batch-stats b {
  color: var(--forest-900);
  font-size: 1.15rem;
  font-weight: 900;
}

.function-batch-stats > span:nth-child(2) b {
  color: var(--success);
}

.function-batch-stats > span:nth-child(3) b {
  color: var(--danger);
}

.function-batch-bar {
  position: relative;
  height: 15px;
  margin: 8px 0 16px;
  padding: 3px;
  overflow: hidden;
  border: 1px solid rgba(23, 59, 44, .08);
  border-radius: 999px;
  background: rgba(218, 226, 220, .72);
  box-shadow: inset 0 2px 5px rgba(21, 45, 34, .1);
}

.function-batch-bar > span {
  position: relative;
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: inherit;
  background: linear-gradient(90deg, #0a8a52, #1687f8 58%, #57a5ff);
  box-shadow: 0 2px 8px rgba(22, 135, 248, .35);
  transition: width .55s cubic-bezier(.22, .78, .25, 1);
}

.function-batch-bar > span::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, .55) 48%, transparent 75%);
  transform: translateX(-100%);
  animation: function-progress-shine 2.2s linear infinite;
}

.function-batch-progress.is-waiting .function-batch-bar > span {
  background: linear-gradient(90deg, #f59e0b, #ffbd4a, #f59e0b);
  box-shadow: 0 2px 8px rgba(245, 158, 11, .32);
}

@keyframes function-progress-shine {
  to { transform: translateX(100%); }
}

.function-batch-waiting,
.function-batch-current {
  padding: 12px 14px;
  border-radius: 13px;
  line-height: 1.55;
}

@media (max-width: 760px) {
  .function-batch-progress-head > strong {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    font-size: 1.25rem;
  }

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

/* ---- 功能中心：单店进度与历史记录 ---- */
.function-batch-active-store {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 16px 0 10px;
  padding: 15px 16px;
  border: 1px solid rgba(0, 91, 255, .14);
  border-radius: 15px;
  background: rgba(255, 255, 255, .74);
}

.function-batch-active-store > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.function-batch-active-store small {
  color: var(--muted);
  font-size: .7rem;
  font-weight: 700;
}

.function-batch-active-store strong {
  color: var(--forest-900);
  font-size: 1.05rem;
}

.function-batch-active-store span:not(.status-pill) {
  color: var(--muted);
  font-size: .78rem;
}

.function-batch-queue-hint,
.function-single-progress-note {
  margin: 8px 0 12px;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(0, 91, 255, .06);
  color: #34506f;
  font-size: .78rem;
}

.function-batch-history,
.function-task-history {
  margin-top: 15px;
  padding-top: 13px;
  border-top: 1px dashed rgba(23, 59, 44, .15);
}

.function-batch-history > summary,
.function-task-history > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--forest-800);
  font-size: .84rem;
  font-weight: 800;
  list-style: none;
}

.function-batch-history > summary::-webkit-details-marker,
.function-task-history > summary::-webkit-details-marker {
  display: none;
}

.function-batch-history > summary::before,
.function-task-history > summary::before {
  content: "▸";
  color: var(--moss-500);
  transition: transform .18s ease;
}

.function-batch-history[open] > summary::before,
.function-task-history[open] > summary::before {
  transform: rotate(90deg);
}

.function-batch-history > summary b,
.function-task-history > summary b {
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(111, 155, 104, .13);
  font-size: .72rem;
}

.function-batch-history-empty,
.function-history-empty {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: .78rem;
}

.function-current-task-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(0, 91, 255, .16);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(248, 251, 255, .94), rgba(244, 250, 247, .9));
}

.function-current-task-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
}

.function-current-task-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 14px;
  background: #0b63d8;
  color: #fff;
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .05em;
}

.function-current-task-main > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.function-current-task-main strong {
  color: var(--forest-900);
  font-size: 1rem;
}

.function-current-task-main > div > span,
.function-current-task-main small {
  color: var(--muted);
  font-size: .76rem;
}

.function-current-progress {
  max-width: none;
}

.function-current-queue {
  margin: 0;
  color: var(--muted);
  font-size: .76rem;
}

.function-current-empty {
  margin: 0;
  padding: 20px;
}

.function-history-table {
  min-width: 850px;
}

@media (max-width: 620px) {
  .function-batch-active-store {
    align-items: flex-start;
    flex-direction: column;
  }

  .function-current-task-main {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .function-current-task-main > .status-pill {
    grid-column: 2;
    justify-self: start;
  }
}

/* 当前任务有进度时也置顶，确保任何模式下进度条都在最上面 */
.functions-main-stack .function-batch-progress {
  order: -5;
}

.functions-main-stack .function-recent-panel.has-active-task {
  order: -4;
  margin-top: 0;
  margin-bottom: 16px;
}

.functions-main-stack .function-batch-panel {
  order: -3;
}

/* ---- 异常失败状态与推荐进度风格 ---- */
.status-abnormal {
  color: #a34f00;
  background: rgba(245, 158, 11, .16);
  border: 1px solid rgba(245, 158, 11, .2);
}

.function-abnormal-form {
  margin-left: auto;
  flex: none;
}

.function-abnormal-form .button {
  color: #9a4b00;
  border-color: rgba(217, 125, 0, .3);
  background: rgba(255, 181, 56, .1);
}

.function-abnormal-form .button:hover {
  border-color: rgba(217, 125, 0, .55);
  background: rgba(255, 181, 56, .18);
}

.function-batch-stats {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.function-batch-stats > span:nth-child(4) b {
  color: #b35b00;
}

.function-batch-bar {
  background-color: rgba(218, 226, 220, .72);
  background-image: repeating-linear-gradient(
    90deg,
    transparent 0,
    transparent calc(10% - 2px),
    rgba(255, 255, 255, .8) calc(10% - 2px),
    rgba(255, 255, 255, .8) 10%
  );
}

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

  .function-abnormal-form,
  .function-abnormal-form .button {
    width: 100%;
  }
}
