/**
 * 用户中心主题：浅闲鱼黄（避免深黄视觉疲劳）
 * 后台仍用 admin.css 深绿
 */
body.theme-user {
  --bg: #f8f8f6;
  --card: #ffffff;
  --ink: #1f1f1f;
  --muted: #6e6a60;
  --line: #ebeae4;
  --accent: #d4b84a;
  --accent-dark: #a89030;
  --accent-soft: #fff9e8;
  --accent-ink: #1f1f1f;
  --danger: #d92d20;
  --danger-soft: #fef3f2;
  --ok: #8a8040;
  --ok-soft: #fff9e8;
  --sidebar: #3a3a36;
  --sidebar-2: #32322e;
  --sidebar-hover: rgba(255, 255, 255, 0.1);
  --blue-mid: #d4b84a;
  --shadow: 0 1px 2px rgba(20, 20, 18, 0.04), 0 8px 24px rgba(20, 20, 18, 0.05);
  --xy-yellow: #ffe566;
  --xy-yellow-soft: #fff9e8;
  --xy-yellow-deep: #d4b84a;
}

body.theme-user .sidebar {
  background: #3a3a36;
  border-right: 1px solid rgba(255, 255, 255, 0.09);
}
body.theme-user .sidebar-brand {
  border-bottom-color: rgba(255, 255, 255, 0.1);
  align-items: center;
  gap: 0.55rem;
}
body.theme-user .brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--xy-yellow-soft);
  border: 2px solid rgba(255, 229, 102, 0.55);
  flex-shrink: 0;
}
body.theme-user .brand-logo-full {
  display: block;
  width: min(220px, 72vw);
  height: auto;
  margin: 0 auto 0.85rem;
}
body.theme-user .brand-kicker {
  color: rgba(255, 229, 102, 0.55);
}
body.theme-user .sidebar nav a:hover {
  background: var(--sidebar-hover);
  color: #fff;
}
body.theme-user .sidebar nav a.active {
  background: var(--xy-yellow-soft);
  color: #1f1f1f;
  font-weight: 650;
}
body.theme-user .sidebar nav a.active .nav-ico {
  color: #1f1f1f;
}
body.theme-user .btn.primary {
  background: var(--xy-yellow);
  border-color: #f0d96a;
  color: #1f1f1f;
  font-weight: 650;
}
body.theme-user .btn.primary:hover {
  filter: none;
  background: #ffef99;
  border-color: #e8d060;
}
body.theme-user .page-tab.active,
body.theme-user .login-tab.active,
body.theme-user .tag.on {
  background: var(--xy-yellow-soft);
  border-color: #f0e4b0;
  color: #1f1f1f;
}
body.theme-user .filter-select:focus,
body.theme-user .form input:focus,
body.theme-user .form select:focus,
body.theme-user .form textarea:focus {
  outline: 2px solid rgba(212, 184, 74, 0.22);
  border-color: #e0cc6a;
}
body.theme-user .topbar-avatar {
  background: var(--xy-yellow-soft);
  color: #1f1f1f;
  border: 1px solid #f0e4b0;
}

/* 余额卡片：纯色，无渐变 */
body.theme-user .wallet-hero {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
body.theme-user .wallet-hero .muted {
  color: var(--muted);
}
body.theme-user .wallet-hero .bal {
  color: var(--ink);
}
body.theme-user .wallet-hero .btn {
  background: var(--xy-yellow);
  color: #1f1f1f;
  border-color: #f0d96a;
}
body.theme-user .wallet-hero .btn:hover {
  background: #ffef99;
  filter: none;
}

body.theme-user .stat-card .value {
  color: var(--ink);
}
body.theme-user .flash.ok {
  background: var(--ok-soft);
  color: #6e6430;
}
body.theme-user .notice.warn {
  background: #fffbf0;
  border-color: #f0e6c0;
  color: #6e6430;
}
body.theme-user .notice.info {
  background: #fafaf8;
  border-color: #ebeae4;
  color: #5c584e;
}
body.theme-user .notice a {
  color: #8a7a30;
}
body.theme-user a {
  color: #8a7a30;
}
body.theme-user .toast.ok {
  background: #fffbf0;
  border-color: #f0e6c0;
  color: #6e6430;
}
body.theme-user .toast.ok .toast-icon {
  background: var(--xy-yellow);
  color: #1f1f1f;
}
body.theme-user .drawer-panel .btn.primary,
body.theme-user #drawer-root .btn.primary {
  background: var(--xy-yellow);
  color: #1f1f1f;
  border-color: #f0d96a;
}
body.theme-user.login-body {
  background: #3a3a36;
}
body.theme-user .login-card {
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
body.theme-user .modal-panel .btn.primary {
  background: var(--xy-yellow);
  border-color: #f0d96a;
  color: #1f1f1f;
}

body.theme-user .slider-captcha {
  background: #fffbf5;
  border-color: #f0e6c0;
}
body.theme-user .slider-captcha-track {
  background: #f5f2e8;
}
body.theme-user .slider-captcha-fill {
  background: rgba(255, 229, 102, 0.28);
}
body.theme-user .slider-captcha.ok .slider-captcha-fill {
  background: rgba(255, 229, 102, 0.45);
}
body.theme-user .slider-captcha-knob {
  background: var(--xy-yellow);
  color: #1f1f1f;
  border-color: #f0d96a;
}

body.theme-user .layout.sidebar-collapsed .brand-logo {
  width: 36px;
  height: 36px;
}
body.theme-user .layout.sidebar-collapsed .sidebar-brand .brand-text {
  display: none;
}

/* 库存管理：商品一览 / 卡密列表 */
body.theme-user .stock-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.35rem;
  align-items: baseline;
  margin: 0 0 1rem;
  padding: 0.85rem 1.05rem;
  background: var(--xy-yellow-soft);
  border: 1px solid #f0e6c0;
  border-radius: 14px;
  font-size: 0.88rem;
  color: var(--muted);
  box-shadow: var(--shadow);
}
body.theme-user .stock-summary strong {
  font-weight: 700;
  color: var(--ink);
  margin-left: 0.2rem;
}
body.theme-user .stock-overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}
body.theme-user .stock-num-unused {
  color: #2f7a3e;
  font-size: 1.05rem;
}
body.theme-user .stock-crumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 0.9rem;
  padding: 0.55rem 0.85rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 0.88rem;
}
body.theme-user .stock-crumb a {
  color: var(--accent-dark);
  text-decoration: none;
  font-weight: 600;
}
body.theme-user .stock-crumb a:hover {
  text-decoration: underline;
}
body.theme-user .stock-filter {
  margin-bottom: 1rem;
}
body.theme-user .stock-filter-input {
  min-width: 140px;
  width: 160px;
}
body.theme-user .stock-toolbar {
  margin-bottom: 0.9rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--line);
}
body.theme-user .stock-check {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
}
body.theme-user .stock-check input {
  width: auto;
  margin: 0;
}
body.theme-user .stock-sku-batch {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  font-size: 0.84rem;
  color: var(--muted);
  white-space: nowrap;
}
body.theme-user .stock-sku-input {
  width: 150px;
  max-width: 40vw;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8f8f6;
  font-size: 0.86rem;
  color: var(--ink);
}
body.theme-user .stock-sku-input:focus {
  outline: 2px solid rgba(212, 184, 74, 0.22);
  border-color: #e0cc6a;
}
body.theme-user .stock-time {
  white-space: nowrap;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}
body.theme-user [data-page-pane="stock"] table.data code {
  font-size: 0.8rem;
  word-break: break-all;
}
body.theme-user [data-page-pane="stock"] td.actions {
  white-space: nowrap;
}

/* 发货配置表单提示 */
body.theme-user .form-hint {
  margin: -0.35rem 0 0.85rem;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.45;
}
body.theme-user .form-hint a {
  color: #8a6d12;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
body.theme-user .form-hint code {
  font-size: 0.78rem;
}

/* 公开对接文档页 */
body.docs-page {
  min-height: 100vh;
  background:
    radial-gradient(900px 420px at 12% -10%, rgba(232, 210, 110, 0.28), transparent 60%),
    radial-gradient(700px 380px at 90% 0%, rgba(120, 170, 210, 0.12), transparent 55%),
    #f6f5f1;
}
body.docs-page .docs-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}
body.docs-page .docs-head {
  margin-bottom: 1.25rem;
}
body.docs-page .docs-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: inherit;
  text-decoration: none;
  font-weight: 650;
  margin-bottom: 1rem;
}
body.docs-page .docs-brand .brand-logo {
  width: 36px;
  height: 36px;
}
body.docs-page .docs-head h1 {
  margin: 0.2rem 0 0.45rem;
  font-size: 1.65rem;
  letter-spacing: -0.02em;
}
body.docs-page .docs-body {
  padding: 1.35rem 1.4rem 1.6rem;
}
body.docs-page .docs-body h2 {
  margin: 1.4rem 0 0.55rem;
  font-size: 1.15rem;
}
body.docs-page .docs-body h2:first-child {
  margin-top: 0;
}
body.docs-page .docs-body h3 {
  margin: 1rem 0 0.4rem;
  font-size: 0.98rem;
}
body.docs-page .docs-body p,
body.docs-page .docs-body li {
  color: #3d3a34;
  line-height: 1.65;
}
body.docs-page .docs-body ul {
  padding-left: 1.2rem;
}
body.docs-page .docs-code {
  display: block;
  margin: 0.65rem 0 1rem;
  padding: 0.9rem 1rem;
  overflow-x: auto;
  border-radius: 12px;
  background: #1e1c18;
  color: #f2ead8;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  line-height: 1.55;
  white-space: pre;
}
body.docs-page .docs-foot {
  margin-top: 1.25rem;
  font-size: 0.86rem;
}
body.docs-page .docs-foot a {
  color: #8a6d12;
}
