*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --background: #ffffff;
  --foreground: #111111;
  --muted: #6b7280;
  --muted-fg: #6b7280;
  --border: rgba(15, 23, 42, 0.07);
  --border-strong: rgba(15, 23, 42, 0.11);
  --accent: #f3f4f6;
  --accent-fg: #111827;
  --primary: #0f172a;
  --primary-fg: #f8fafc;
  --page-bg: #ffffff;
  --page-bg-accent: transparent;
  --surface: #ffffff;
  --surface-elevated: #ffffff;
  --surface-sunken: #fafafa;
  --destructive: #ef4444;
  --destructive-bg: #fef2f2;
  --success: #059669;
  --success-bg: #ecfdf5;
  --warning: #d97706;
  --warning-bg: #fffbeb;
  --radius: 0.5rem;       /* 8px · 控件 */
  --radius-md: 0.625rem;  /* 10px · 快捷入口 / rounded-lg */
  --radius-lg: 0.875rem;  /* 14px · 统计卡 / rounded-xl */
  --radius-xl: 0.875rem;
  --radius-full: 9999px;
  --sidebar-w: 224px;     /* 对齐 blackdata w-56 */
  --sidebar-collapsed-w: 56px;
  --page-pad: 16px;
  --page-pad-md: 24px;    /* 对齐 blackdata md:p-6 */
  --sidebar-bg: #ffffff;
  --header-h: 56px;
  --bottom-nav-h: 64px;
  --bottom-nav-offset: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px));
  --space-section: 16px;
  --space-card: 12px;
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.05), 0 1px 2px rgba(15, 23, 42, 0.03);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.07), 0 2px 6px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 20px 48px rgba(15, 23, 42, 0.1), 0 6px 16px rgba(15, 23, 42, 0.05);
  --shadow-brand: 0 4px 20px rgba(13, 148, 136, 0.18);
  --ring: 0 0 0 3px rgba(13, 148, 136, 0.14);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-display: 'Inter', var(--font);
  --text-display: clamp(1.5rem, 2.5vw, 1.875rem);
  --text-title: 1.25rem;
  --text-body: 0.875rem;
  --text-caption: 0.6875rem;
  --brand: #0d9488;
  --brand-dark: #0f766e;
  --brand-light: rgba(13, 148, 136, 0.1);
  --brand-muted: rgba(13, 148, 136, 0.06);
  --gradient-brand: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand) 100%);
  --gradient-page: none;
  --page-bottom-mobile: calc(var(--bottom-nav-offset) + 40px);
  --color-scheme: light;
  color-scheme: var(--color-scheme);
}

html[data-theme="dark"] {
  --color-scheme: dark;
  --background: #0a0e17;
  --foreground: #e8edf5;
  --muted: #94a3b8;
  --muted-fg: #94a3b8;
  --border: rgba(148, 163, 184, 0.16);
  --border-strong: rgba(148, 163, 184, 0.28);
  --accent: #1a2336;
  --accent-fg: #e2e8f0;
  --primary: #e2e8f0;
  --primary-fg: #0a0e17;
  --page-bg: #0a0e17;
  --page-bg-accent: rgba(45, 212, 191, 0.1);
  --surface: #121a2b;
  --surface-elevated: #161e2e;
  --surface-sunken: #070b12;
  --sidebar-bg: #0c1220;
  --destructive: #f87171;
  --destructive-bg: rgba(248, 113, 113, 0.14);
  --success: #34d399;
  --success-bg: rgba(52, 211, 153, 0.14);
  --warning: #fbbf24;
  --warning-bg: rgba(251, 191, 36, 0.14);
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 10px 28px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 22px 52px rgba(0, 0, 0, 0.55);
  --shadow-brand: 0 4px 24px rgba(45, 212, 191, 0.22);
  --ring: 0 0 0 3px rgba(45, 212, 191, 0.22);
  --brand: #2dd4bf;
  --brand-dark: #14b8a6;
  --brand-light: rgba(45, 212, 191, 0.16);
  --brand-muted: rgba(45, 212, 191, 0.1);
  --gradient-page:
    radial-gradient(1100px 520px at 8% -8%, rgba(45, 212, 191, 0.14), transparent 55%),
    radial-gradient(900px 480px at 100% 0%, rgba(56, 189, 248, 0.08), transparent 50%),
    radial-gradient(700px 400px at 50% 110%, rgba(99, 102, 241, 0.06), transparent 45%),
    #0a0e17;
}

html {
  height: 100%;
}
body {
  font-family: var(--font);
  background: var(--background);
  color: var(--foreground);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 14px;
  min-height: 100%;
}

::selection {
  background: rgba(13, 148, 136, 0.14);
  color: var(--foreground);
}

:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

.hidden { display: none !important; }

/* 全站链接/按钮：禁止下划线 */
a,
a:link,
a:visited,
a:hover,
a:active,
a:focus,
button,
.btn,
.btn:hover,
.btn:focus,
.btn:active {
  text-decoration: none !important;
}

/* ── Auth (对齐 blackdata /auth/login) ── */
.auth-body {
  background: var(--page-bg);
  color: var(--foreground);
}

.auth-shell {
  position: relative;
  display: flex;
  min-height: 100dvh;
}

.auth-shell-tools {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--foreground);
  cursor: pointer;
  transition: background 0.15s;
}
.auth-tool-btn:hover { background: var(--accent); }

.auth-quote-panel {
  display: none;
  width: 50%;
  flex-direction: column;
  justify-content: center;
  padding: 40px;
  background: oklch(0.15 0 0);
  color: oklch(0.95 0 0);
  border-right: 1px solid oklch(0.3 0 0);
}

.auth-quote {
  max-width: 32rem;
  margin: 0 auto;
}

.auth-slogan-main {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.auth-slogan-sub {
  font-size: clamp(1rem, 1.6vw, 1.125rem);
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: -0.01em;
  color: oklch(0.55 0 0);
}

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

.auth-form-wrap {
  width: 100%;
  max-width: 24rem;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 28px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--background);
  box-shadow: var(--shadow-md);
}

.auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  padding-bottom: 4px;
}
.auth-brand .brand-copy {
  align-items: flex-start;
}

.auth-form-head {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-form-title {
  font-size: 1.875rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.auth-form-sub {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-field label {
  font-size: 14px;
  font-weight: 500;
}

.auth-field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.auth-field-row label { margin: 0; }

.auth-link-muted {
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  underline-offset: 4px;
}
.auth-link-muted:hover { color: var(--foreground); text-decoration: none; }

.auth-input-wrap { position: relative; }

.auth-input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  font-size: 14px;
  font-family: var(--font);
  background: var(--background);
  color: var(--foreground);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.auth-input-toggle { padding-right: 40px; }
.auth-input:focus {
  border-color: rgba(0,0,0,0.28);
  box-shadow: var(--ring);
}
.auth-input::placeholder { color: #a3a3a3; }

.auth-toggle-pw {
  position: absolute;
  inset: 0 0 0 auto;
  width: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.auth-toggle-pw:hover { color: var(--foreground); }

.auth-pw-rules {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.auth-pw-rules li {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}
.auth-pw-rules li.ok { color: #10b981; }
.auth-pw-rules li svg { flex-shrink: 0; }

.auth-field-hint {
  font-size: 12px;
  color: var(--muted);
}
.auth-field-hint-error { color: var(--destructive); }

/* Turnstile 外层美化（不改写 iframe；色系与输入框一致） */
.auth-turnstile-shell {
  width: 100%;
  box-sizing: border-box;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: var(--background);
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}
.auth-turnstile-shell:hover {
  border-color: rgba(15, 23, 42, 0.22);
}
.auth-turnstile-shell.is-ok {
  border-color: rgba(15, 23, 42, 0.28);
  box-shadow: var(--ring);
  background: var(--background);
}
.auth-turnstile-shell.is-error {
  border-color: rgba(239, 68, 68, 0.4);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}
.auth-turnstile-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.01em;
}
.auth-turnstile-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  color: var(--foreground);
  background: var(--accent);
  flex-shrink: 0;
}
.auth-turnstile-shell.is-ok .auth-turnstile-meta {
  color: var(--foreground);
}
.auth-turnstile-shell.is-ok .auth-turnstile-meta span:last-child::after {
  content: ' · 已通过';
}
.auth-turnstile {
  width: 100%;
  min-width: 0;
  min-height: 65px;
  display: flex;
  justify-content: center;
  align-items: center;
  line-height: 0;
  overflow: visible;
}
/* 绝不写 .auth-turnstile iframe 的宽高/transform，一点击就会验证失败 */
#login-turnstile-field,
#reg-turnstile-field {
  width: 100%;
  overflow: visible;
}
#login-turnstile-field.auth-field,
#reg-turnstile-field.auth-field {
  gap: 8px;
}
.auth-turnstile-shell {
  overflow: visible;
}

html[data-theme="dark"] .auth-turnstile-shell {
  background: var(--background);
  border-color: rgba(148, 163, 184, 0.22);
  box-shadow: none;
}
html[data-theme="dark"] .auth-turnstile-shell.is-ok {
  border-color: rgba(226, 232, 240, 0.35);
  box-shadow: var(--ring);
}

.auth-code-row {
  display: flex;
  gap: 10px;
}

.auth-code-row .auth-input { flex: 1; min-width: 0; }

.auth-btn-code {
  flex-shrink: 0;
  height: 44px;
  padding: 0 16px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.auth-btn-code:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
}

.auth-btn-code:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-btn-primary {
  width: 100%;
  height: 44px;
  border: none;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: var(--primary-fg);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: opacity 0.15s, transform 0.15s var(--ease), box-shadow 0.15s;
  box-shadow: var(--shadow-sm);
}
.auth-btn-primary:hover:not(:disabled) {
  opacity: 0.92;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.auth-btn-primary:disabled { opacity: 0.45; cursor: not-allowed; }

.auth-alert {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
}
.auth-alert-error { background: var(--destructive-bg); color: var(--destructive); }
.auth-alert-success { background: var(--success-bg); color: var(--success); }

.auth-switch {
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}
.auth-switch a {
  color: var(--foreground);
  font-weight: 600;
  text-decoration: none;
  underline-offset: 4px;
  margin-left: 4px;
}
.auth-switch a:hover { text-decoration: none; }

.auth-agreement {
  text-align: center;
  font-size: 12px;
  color: rgba(115,115,115,0.6);
  line-height: 1.5;
}
.auth-agreement a {
  color: rgba(115,115,115,0.7);
  text-decoration: none;
  underline-offset: 4px;
}
.auth-agreement a:hover { text-decoration: none; }

@media (min-width: 1024px) {
  .auth-quote-panel { display: flex; }
  .auth-form-panel { padding: 48px; }
}

@media (max-width: 767px) {
  .auth-form-wrap {
    padding: 24px 20px;
    border: none;
    box-shadow: none;
    background: transparent;
  }
  .auth-form-title { font-size: 1.625rem; }
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border: none;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.15s var(--ease);
  white-space: nowrap;
  text-decoration: none;
  color: inherit;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-full { width: 100%; }
.btn-lg { height: 44px; font-size: 15px; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: var(--radius); }

.btn-primary {
  background: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand) 100%);
  color: #fff;
  box-shadow: 0 2px 10px rgba(13, 148, 136, 0.22);
}
.btn-primary:hover:not(:disabled) {
  opacity: 1;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.28);
}
.btn-primary:active:not(:disabled) { transform: translateY(0); }

.btn-outline {
  background: var(--background);
  color: var(--foreground);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-xs);
}
.btn-outline:hover:not(:disabled) {
  background: var(--accent);
  border-color: rgba(0,0,0,0.16);
}

.icon-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border: none; background: transparent;
  border-radius: var(--radius);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
}
.icon-btn:hover { background: var(--accent); color: var(--foreground); }

/* ── Shell Layout (对齐 blackdata flex h-screen) ── */
.shell {
  display: flex;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--background);
}

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  background: var(--sidebar-bg);
  display: none;
  flex-direction: column;
  height: 100%;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  padding: 14px 14px 12px 16px;
  flex-shrink: 0;
  background: transparent;
}

.sidebar-brand-link {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  min-width: 0;
  flex: 1;
}
.sidebar-brand-link:hover .brand-mark {
  border-color: rgba(0,0,0,0.12);
  box-shadow: var(--shadow-sm);
}

.brand-mark {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: #ffffff;
  color: #171717;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.brand-mark-svg {
  display: block;
  width: 18px;
  height: 18px;
}
.brand-mark-sm {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}
.brand-mark-sm .brand-mark-svg {
  width: 15px;
  height: 15px;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.brand-name {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--foreground);
  transition: color 0.15s var(--ease);
}

.brand-desc {
  font-size: 10px;
  font-weight: 500;
  color: rgba(115,115,115,0.85);
  letter-spacing: 0.04em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-brand {
  display: none;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--foreground);
  text-decoration: none;
  white-space: nowrap;
  min-width: 0;
}
.topbar-brand .brand-name {
  font-size: 14px;
}
.topbar-brand:hover { opacity: 0.85; }

.sidebar-collapse-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  background: var(--background);
  color: var(--muted);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s var(--ease);
}
.sidebar-collapse-btn svg {
  transition: transform 0.2s var(--ease);
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 4px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,0.1) transparent;
}
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.1);
  border-radius: 999px;
}

.nav-group {
  margin-top: 14px;
  padding: 0;
  border: none;
  background: transparent;
}

.nav-group-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(115,115,115,0.75);
  padding: 0 10px 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-group-label svg {
  opacity: 0.45;
  width: 11px;
  height: 11px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px 9px 12px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: #525252;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.15s var(--ease);
  text-align: left;
  text-decoration: none;
  position: relative;
}
.sidebar-link svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  padding: 0;
  box-sizing: border-box;
  border-radius: 0;
  background: transparent;
  color: #737373;
  transition: color 0.15s var(--ease);
}
.sidebar-link span {
  flex: 1;
  min-width: 0;
}
.sidebar-link:hover {
  background: rgba(255,255,255,0.55);
  color: var(--foreground);
  border-color: rgba(0,0,0,0.04);
}
.sidebar-link:hover svg {
  color: var(--foreground);
}
.sidebar-link.active {
  background: #ffffff;
  color: var(--foreground);
  font-weight: 600;
  border-color: var(--border);
  box-shadow: var(--shadow-xs);
}
.sidebar-link.active svg {
  background: transparent;
  color: #0d9488;
}
.sidebar-link.active::before {
  display: block;
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 18px;
  border-radius: var(--radius-full);
  background: linear-gradient(180deg, #0d9488 0%, #0284c7 100%);
}

.nav-group .sidebar-link {
  padding: 8px 10px 8px 12px;
}
.nav-group .sidebar-link.active svg {
  color: #0284c7;
}

.sidebar-footer {
  flex-shrink: 0;
  margin: 0 12px 14px;
  padding: 6px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-footer-link,
.sidebar-footer-logout {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: none;
  background: transparent;
  color: #525252;
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.15s var(--ease);
}
.sidebar-footer-link svg,
.sidebar-footer-logout svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #737373;
  box-sizing: border-box;
}
.sidebar-footer-link:hover,
.sidebar-footer-logout:hover {
  color: var(--foreground);
  background: rgba(0,0,0,0.04);
}
.sidebar-footer-link:hover svg {
  color: var(--foreground);
}
.sidebar-footer-logout { color: #ef4444; width: 100%; text-align: left; }
.sidebar-footer-logout svg {
  color: #ef4444;
}
.sidebar-footer-logout:hover {
  color: #dc2626;
  background: var(--destructive-bg);
}
.sidebar-footer-logout:hover svg {
  color: #dc2626;
}

.main-area {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--background);
}

.topbar {
  height: var(--header-h);
  display: flex;
  align-items: center;
  padding: 0 16px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  background: #ffffff;
  flex-shrink: 0;
  gap: 8px;
  z-index: 30;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 2px;
}

.mobile-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  border-radius: var(--radius);
  color: var(--muted);
  cursor: pointer;
}
.mobile-menu-btn:hover { background: var(--accent); color: var(--foreground); }

.topbar-spacer { flex: 1; }

.topbar-user-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--border);
  background: var(--background);
  border-radius: 8px;
  color: var(--foreground);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  max-width: 160px;
  box-shadow: none;
  transition: all 0.15s var(--ease);
}
.topbar-user-btn span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topbar-user-btn:hover {
  background: var(--accent);
  border-color: var(--border-strong);
}

.topbar-user-wrap {
  position: relative;
}

.topbar-user-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 80;
  min-width: 200px;
  padding: 6px;
  border: 1px solid var(--border, rgba(0, 0, 0, 0.1));
  border-radius: 14px;
  background: var(--surface-elevated, #fff);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  color: var(--foreground);
}
html[data-theme="dark"] .topbar-user-menu {
  background: #161e2e !important;
  border-color: rgba(148, 163, 184, 0.18) !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55) !important;
  color: #e8edf5 !important;
}
html[data-theme="dark"] .topbar-user-menu-balance-label { color: #94a3b8 !important; }
html[data-theme="dark"] .topbar-user-menu-balance-value { color: #f1f5f9 !important; }
html[data-theme="dark"] .topbar-user-menu-divider {
  background: rgba(148, 163, 184, 0.16) !important;
}
html[data-theme="dark"] .topbar-user-menu-item {
  color: #e2e8f0 !important;
}
html[data-theme="dark"] .topbar-user-menu-item:hover {
  background: rgba(148, 163, 184, 0.1) !important;
}
html[data-theme="dark"] .topbar-user-menu-logout { color: #f87171 !important; }
html[data-theme="dark"] .topbar-user-menu-logout:hover {
  background: rgba(248, 113, 113, 0.12) !important;
}

.topbar-user-menu-balance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
}

.topbar-user-menu-balance-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.topbar-user-menu-balance-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--foreground);
}

.topbar-user-menu-divider {
  height: 1px;
  margin: 4px 0;
  background: rgba(0, 0, 0, 0.06);
}

.topbar-user-menu-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--foreground);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.12s var(--ease);
}

.topbar-user-menu-item:hover {
  background: rgba(0, 0, 0, 0.04);
}

.topbar-user-menu-logout {
  color: #dc2626;
}

.topbar-user-menu-logout:hover {
  background: rgba(220, 38, 38, 0.06);
}

.page-content {
  flex: 1 1 0%;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0;
  min-height: 0;
  background: var(--page-bg);
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,0.15) transparent;
}
.page-content::-webkit-scrollbar { width: 6px; height: 6px; }
.page-content::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.12);
  border-radius: 999px;
}
.page-content::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.2); }

.page-inner {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: var(--space-section) var(--space-section) 80px;
  animation: pageEnter 0.4s var(--ease);
}

@media (min-width: 768px) {
  .sidebar {
    display: flex;
    transition: width 0.2s var(--ease);
  }
  .mobile-menu-btn { display: none; }
  .topbar-brand { display: flex; }
  .page-inner { padding: 24px; }
  .shell.sidebar-collapsed .mobile-menu-btn {
    display: none;
  }
}

/* 收缩：保留 56px 图标栏（桌面 / 移动端通用） */
.shell.sidebar-collapsed .sidebar {
  width: var(--sidebar-collapsed-w);
  min-width: var(--sidebar-collapsed-w);
  overflow: visible;
  opacity: 1;
  pointer-events: auto;
}

.shell.sidebar-collapsed .sidebar-brand {
  justify-content: center;
  padding: 12px 0;
  gap: 0;
}

.shell.sidebar-collapsed .sidebar-brand-link {
  display: none;
}

.shell.sidebar-collapsed .sidebar-collapse-btn {
  display: flex;
}

.shell.sidebar-collapsed .sidebar-collapse-btn svg {
  transform: rotate(180deg);
}

.shell.sidebar-collapsed .sidebar-nav {
  padding: 4px 0 12px;
  align-items: center;
  gap: 2px;
  overflow-x: visible;
}

.shell.sidebar-collapsed .nav-group {
  margin-top: 8px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0;
  background: transparent;
  border: none;
}

.shell.sidebar-collapsed .nav-group-label {
  display: none;
}

.shell.sidebar-collapsed .sidebar-link {
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  margin: 0;
  justify-content: center;
  gap: 0;
  border-radius: 10px;
  position: relative;
}

.shell.sidebar-collapsed .sidebar-link.active::before {
  display: none;
}

.shell.sidebar-collapsed .sidebar-link span,
.shell.sidebar-collapsed .sidebar-footer-link span,
.shell.sidebar-collapsed .sidebar-footer-logout span {
  display: none;
}

.shell.sidebar-collapsed .sidebar-link[data-tip],
.shell.sidebar-collapsed .sidebar-footer-link[data-tip],
.shell.sidebar-collapsed .sidebar-footer-logout[data-tip] {
  overflow: visible;
}

.shell.sidebar-collapsed .sidebar-link[data-tip]::after,
.shell.sidebar-collapsed .sidebar-footer-link[data-tip]::after,
.shell.sidebar-collapsed .sidebar-footer-logout[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  padding: 5px 9px;
  border-radius: 6px;
  background: #111827;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  opacity: 0;
  pointer-events: none;
  z-index: 80;
  transition: opacity 0.12s var(--ease);
}

.shell.sidebar-collapsed .sidebar-link[data-tip]:hover::after,
.shell.sidebar-collapsed .sidebar-footer-link[data-tip]:hover::after,
.shell.sidebar-collapsed .sidebar-footer-logout[data-tip]:hover::after,
.shell.sidebar-collapsed .sidebar-link[data-tip]:active::after,
.shell.sidebar-collapsed .sidebar-footer-link[data-tip]:active::after,
.shell.sidebar-collapsed .sidebar-footer-logout[data-tip]:active::after {
  opacity: 1;
}

.shell.sidebar-collapsed .sidebar-link svg,
.shell.sidebar-collapsed .sidebar-footer-link svg,
.shell.sidebar-collapsed .sidebar-footer-logout svg {
  margin: 0;
}

.shell.sidebar-collapsed .nav-unread-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 8px;
  height: 8px;
  padding: 0;
  font-size: 0;
  border-radius: 999px;
}

.shell.sidebar-collapsed .sidebar-footer {
  margin: 0 6px 12px;
  padding: 4px;
  align-items: center;
  gap: 4px;
}

.shell.sidebar-collapsed .sidebar-footer-link,
.shell.sidebar-collapsed .sidebar-footer-logout {
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  justify-content: center;
  gap: 0;
  border-radius: 10px;
  position: relative;
  overflow: visible;
}

.shell.sidebar-collapsed .sidebar-footer-logout {
  width: 36px;
}

.panel { display: none; }
.panel.active { display: block; }
.panel.active.dash-home {
  display: flex;
  flex-direction: column;
}

.panel:not(.dash-home) > .page-header {
  margin-bottom: 20px;
}

.page-header { margin-bottom: 20px; }
.page-header h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.4px;
  line-height: 1.25;
}
.page-header p {
  color: var(--muted);
  font-size: 14px;
  margin-top: 6px;
  line-height: 1.5;
}
.page-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

/* ── Query Card ── */
.query-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  background: var(--background);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.query-input-wrap {
  position: relative;
  margin-bottom: 16px;
}
.query-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.query-input {
  width: 100%;
  height: 48px;
  padding: 0 16px 0 44px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  font-size: 15px;
  font-family: var(--font);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.query-input:focus {
  border-color: var(--foreground);
  box-shadow: 0 0 0 3px rgba(0,0,0,0.06);
}
.query-hint {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  margin-top: 12px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-card);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.field > span,
.field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--foreground);
  line-height: 1.3;
}
.field input,
.field textarea,
.field select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--background);
  font-size: 14px;
  font-family: var(--font);
  color: var(--foreground);
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.field input,
.field select {
  height: 44px;
  padding: 0 14px;
}
.field select {
  padding-right: 36px;
}
.field textarea {
  min-height: 120px;
  padding: 12px 14px;
  line-height: 1.55;
  resize: vertical;
}
.field input::placeholder,
.field textarea::placeholder {
  color: rgba(115, 115, 115, 0.55);
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: rgba(0, 0, 0, 0.28);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}
.field input:disabled,
.field textarea:disabled,
.field select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: var(--accent);
}

@media (max-width: 767px) {
  .form-grid { gap: 10px; }
  .query-card { padding: 16px; }
}

.json-result {
  margin-top: 20px;
  padding: 16px;
  background: var(--accent);
  border-radius: var(--radius);
  font-family: 'Consolas', monospace;
  font-size: 12px;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid var(--border);
}

/* ── History ── */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--background);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--background);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.12s var(--ease), padding-left 0.12s var(--ease);
  gap: 12px;
}
.history-item:last-child { border-bottom: none; }
.history-item:hover {
  background: rgba(0,0,0,0.02);
  padding-left: 24px;
}

.history-item-left { flex: 1; min-width: 0; }
.history-item-content {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.history-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
}
.badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.badge-completed { background: var(--success-bg); color: var(--success); }
.badge-processing { background: var(--warning-bg); color: var(--warning); }
.badge-queued { background: var(--accent); color: var(--muted); }
.badge-no_result { background: var(--destructive-bg); color: var(--destructive); }

.history-item-arrow { color: #d4d4d4; flex-shrink: 0; }

.empty-state {
  text-align: center;
  padding: 56px 24px;
  color: var(--muted);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--background);
  box-shadow: var(--shadow-xs);
}
.empty-icon {
  margin: 0 auto 16px;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent);
  color: #d4d4d4;
}
.empty-state p { font-size: 15px; font-weight: 500; color: var(--foreground); }
.empty-state span { font-size: 13px; display: block; margin-top: 4px; }

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}
.pager-info { font-size: 13px; color: var(--muted); }

/* ── Bottom Nav (mobile) ── */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  min-height: var(--bottom-nav-h);
  height: auto;
  flex: 0 0 auto;
  width: 100%;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  z-index: 50;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.04);
  /* 避免 fixed 底栏仍占 flex 高度，把 main 压扁导致滚不动 */
  margin: 0;
  pointer-events: auto;
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  padding: 8px 0 6px;
  transition: color 0.15s;
  position: relative;
  text-decoration: none;
}
.bottom-nav-item.active {
  color: var(--foreground);
  font-weight: 600;
}
.bottom-nav-item.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-dark) 0%, var(--brand) 100%);
  border-radius: 0 0 3px 3px;
}
.bottom-nav-item.active svg {
  color: var(--brand);
}

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: calc(var(--bottom-nav-h) + 16px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: var(--primary-fg);
  padding: 12px 22px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  animation: toastIn 0.3s var(--ease);
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(12px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.toast.error { background: var(--destructive); }
.toast.success { background: var(--success); }
.toast.info { background: var(--primary); }

/* ── Result Page ── */
.result-page { background: var(--page-bg); min-height: 100vh; }

.result-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  padding: 0 16px 0 12px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 50;
}
html[data-theme="dark"] .result-topbar {
  background: rgba(15, 23, 42, 0.92);
  border-bottom-color: var(--hairline, rgba(148, 163, 184, 0.16));
  box-shadow: none;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: var(--radius-full);
  background: var(--accent);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--foreground);
}

.back-link {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  color: var(--foreground);
  text-decoration: none;
  border-radius: var(--radius);
  transition: background 0.12s;
}
.back-link:hover { background: var(--accent); }

.result-main {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 16px 80px;
}

.result-loading {
  text-align: center;
  padding: 100px 20px;
}

.spinner {
  width: 32px; height: 32px;
  border: 2.5px solid var(--border);
  border-top-color: var(--foreground);
  border-radius: 50%;
  margin: 0 auto 20px;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.progress-bar {
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin: 20px auto;
  max-width: 200px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--foreground);
  border-radius: 2px;
  transition: width 0.4s;
  width: 0%;
}
.progress-text { color: var(--muted); font-size: 13px; }
#loading-text { font-size: 15px; font-weight: 500; }

.result-hero {
  padding: 24px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--background);
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}

.result-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.6px;
  word-break: break-all;
  margin-bottom: 10px;
}

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

.meta-tag {
  font-size: 12px;
  color: var(--muted);
  text-transform: capitalize;
}
.meta-time { font-size: 12px; color: var(--muted); }

.result-actions-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}
.result-actions-bar .btn { flex: 1; }

.download-warning {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--warning);
  background: var(--warning-bg);
  padding: 10px 14px;
  border-radius: var(--radius);
  margin-bottom: 20px;
}

.cards-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.result-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--background);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s var(--ease), transform 0.15s var(--ease);
}
.result-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.card-index {
  padding: 10px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: var(--accent);
  border-bottom: 1px solid var(--border);
}

.card-fields { padding: 4px 0; }

.field-row {
  display: flex;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  gap: 16px;
  align-items: flex-start;
}
.field-row:last-child { border-bottom: none; }

.field-key {
  flex-shrink: 0;
  width: 88px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

.field-val {
  flex: 1;
  font-size: 13px;
  word-break: break-all;
  color: var(--foreground);
  line-height: 1.5;
}
.field-val-empty {
  color: var(--muted);
}

.result-pagination {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* ── Responsive ── */
@media (max-width: 767px) {
  /*
   * 移动端：改为文档原生滚动。
   * 嵌套 .page-content { overflow-y:auto } 在 iOS / 微信 / 安卓 WebView 上经常“拖不动”。
   */
  html, body {
    height: auto;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  body.sidebar-drawer-open,
  body.news-lightbox-open {
    overflow: hidden;
    overscroll-behavior: none;
  }
  .shell {
    display: block;
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }
  .main-area {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    overflow: visible;
  }
  .topbar {
    position: sticky;
    top: 0;
  }
  .page-content {
    flex: none;
    overflow: visible;
    overscroll-behavior-y: auto;
    touch-action: manipulation;
    min-height: 0;
  }

  .sidebar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    height: auto;
    max-height: 100dvh;
    z-index: 60;
    box-shadow: none;
    width: min(var(--sidebar-w), 86vw);
    /* 侧栏底部「账户信息 / 退出」完整露出，不被底栏压住 */
    padding-bottom: calc(var(--bottom-nav-offset) + 20px);
  }
  .sidebar.open,
  .shell.sidebar-collapsed .sidebar {
    display: flex;
    box-shadow: var(--shadow-lg);
    z-index: 60;
  }
  /* 移动端完整抽屉里也显示收缩小按钮 */
  .sidebar.open .sidebar-collapse-btn {
    display: flex;
  }
  /* 收缩成图标栏时不铺满、不压底栏 */
  .shell.sidebar-collapsed .sidebar {
    width: var(--sidebar-collapsed-w) !important;
    min-width: var(--sidebar-collapsed-w);
    box-shadow: var(--shadow-sm);
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  }
  .sidebar-footer {
    margin: 0 12px calc(10px + env(safe-area-inset-bottom, 0px));
  }
  .bottom-nav { display: flex; }
  /* 完整抽屉打开时底栏让位；图标栏模式保留底栏 */
  body.sidebar-drawer-open .bottom-nav {
    display: none !important;
  }
  body.sidebar-drawer-open .sidebar {
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  }
  body.sidebar-drawer-open .sidebar-backdrop {
    z-index: 55;
  }
  body.sidebar-rail-open .main-area {
    padding-left: var(--sidebar-collapsed-w);
  }
  .page-inner,
  .query-page-wrap,
  .sub-page-wrap,
  .finance-page-wrap,
  .account-page-wrap,
  .news-page,
  .bd-page-wrap {
    padding-bottom: var(--page-bottom-mobile);
  }
  .toast { bottom: calc(var(--bottom-nav-offset) + 12px); }
  .form-grid { grid-template-columns: 1fr; }
  .result-title { font-size: 24px; }
  .dash-bottom { grid-template-columns: 1fr !important; }
  .announce-section,
  .quick-section { grid-column: auto !important; }
  .quick-section .section-label-spaced { display: none; }
  .topbar { padding: 0 12px; gap: 6px; }
  .topbar-brand { display: flex; margin-right: auto; min-width: 0; }
  .topbar-spacer { display: none; }
  .topbar-actions {
    display: flex;
    align-items: center;
    flex-shrink: 0;
  }
  .topbar-actions .icon-btn {
    width: 34px;
    height: 34px;
  }
  .topbar-user-btn {
    max-width: 96px;
    padding: 0 8px;
    font-size: 12px;
    height: 32px;
  }
  .topbar-user-btn span {
    max-width: 4.5em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* ── Dashboard Home（对齐参考：紧凑竖向堆叠 / gap-3 统计 / 8·4 底栏） ── */
.dash-home {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.dash-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.dash-welcome {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 0 0 14px;
  border: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  position: relative;
  overflow: visible;
}
.dash-welcome::after { display: none; }
.dash-welcome-text { flex: 1; min-width: 0; padding-top: 0; }
.dash-welcome h1 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.4px;
  line-height: 1.2;
  color: var(--foreground);
  margin: 0;
}
.dash-welcome h1 span {
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
  color: inherit;
}
.dash-welcome p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
  line-height: 1.35;
}

@media (min-width: 640px) {
  .dash-welcome {
    align-items: flex-start;
    padding: 0 0 14px;
  }
  .dash-welcome h1 { font-size: 26px; }
  .dash-welcome p { font-size: 13px; margin-top: 2px; }
}

.dash-promos {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.btn-checkin {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  align-self: flex-start;
  height: 32px;
  padding: 0 10px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #0d9488, #0f766e);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease);
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(13,148,136,0.28);
  margin-top: 0;
}
.btn-checkin:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(13,148,136,0.32);
}

.promo-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  min-height: 54px;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease), background 0.15s, border-color 0.15s;
  border: 1px solid rgba(0,0,0,0.08);
  background: var(--background);
  text-decoration: none;
  color: inherit;
  box-shadow: none;
  font: inherit;
  width: 100%;
  text-align: left;
}
button.promo-card {
  appearance: none;
  -webkit-appearance: none;
}
.promo-card:hover {
  background: rgba(0,0,0,0.02);
  transform: none;
  box-shadow: none;
}

.promo-search {
  background: rgba(20,184,166,0.06);
  border-color: rgba(20,184,166,0.25);
}
.promo-search:hover { background: rgba(20,184,166,0.09); }
.promo-vip {
  background: linear-gradient(135deg, rgba(234,179,8,0.06) 0%, rgba(245,158,11,0.04) 100%);
  border-color: rgba(234,179,8,0.22);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.vip-page {
  max-width: 560px;
}
.vip-panel {
  margin-bottom: 14px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface, #fff);
}
.vip-panel-head {
  margin-bottom: 14px;
}
.vip-panel-head h2 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
}
.vip-panel-head p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}
.vip-hero-card {
  position: relative;
  overflow: hidden;
  margin-bottom: 14px;
  padding: 20px 18px 18px;
  border: 1px solid rgba(13, 148, 136, 0.22);
  border-radius: calc(var(--radius-lg) + 4px);
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(245, 158, 11, 0.16), transparent 55%),
    linear-gradient(155deg, rgba(13, 148, 136, 0.12) 0%, rgba(15, 118, 110, 0.04) 42%, var(--background) 100%);
}
.vip-hero-glow {
  position: absolute;
  inset: auto -20% -40% auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(13, 148, 136, 0.18), transparent 70%);
  pointer-events: none;
}
.vip-hero-card.is-active {
  border-color: rgba(16, 185, 129, 0.35);
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(16, 185, 129, 0.18), transparent 55%),
    linear-gradient(155deg, rgba(16, 185, 129, 0.14) 0%, rgba(20, 184, 166, 0.05) 42%, var(--background) 100%);
}
.vip-hero-top {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.vip-hero-badge {
  display: inline-block;
  margin-bottom: 0;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #b45309;
  background: rgba(234, 179, 8, 0.16);
}
.vip-hero-card.is-active .vip-hero-badge {
  color: #047857;
  background: rgba(16, 185, 129, 0.16);
}
.vip-hero-balance-mini {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}
.vip-hero-balance-mini strong {
  font-size: 15px;
  font-weight: 700;
  color: var(--foreground);
}
.vip-hero-title {
  position: relative;
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
}
.vip-perk-row {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 16px;
  padding: 0;
  list-style: none;
}
.vip-perk-row li {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #0f766e;
  background: rgba(13, 148, 136, 0.1);
}
.vip-hero-price-row {
  position: relative;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}
.vip-price-label {
  font-size: 12px;
  color: var(--muted);
}
.vip-hero-price-row strong,
.vip-hero-price strong {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f766e;
}
.vip-hero-card.is-active .vip-hero-price-row strong,
.vip-hero-card.is-active .vip-hero-price strong {
  color: #047857;
}
.vip-redeem-jump {
  text-decoration: none !important;
}
.vip-benefits {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}
.vip-hint {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.vip-hint.is-warn {
  color: #b45309;
}
.vip-hint.is-ok {
  color: #047857;
}
.vip-hero-note {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}
.vip-plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.vip-plan-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 12px 14px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease), transform 0.15s var(--ease);
}
.vip-plan-card:hover {
  border-color: rgba(13, 148, 136, 0.35);
  transform: translateY(-1px);
}
.vip-plan-card.is-active {
  border-color: #0d9488;
  background: rgba(13, 148, 136, 0.07);
  box-shadow: inset 0 0 0 1px rgba(13, 148, 136, 0.12);
}
.vip-plan-card strong {
  font-size: 13px;
}
.vip-plan-price {
  font-size: 18px;
  font-weight: 700;
  color: #0f766e;
}
.vip-plan-desc {
  font-size: 11px;
  color: #64748b;
}
.vip-buy-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}
.vip-buy-actions.is-single {
  grid-template-columns: 1fr;
}
.vip-buy-actions .btn {
  width: 100%;
  justify-content: center;
  text-align: center;
  text-decoration: none !important;
}
.vip-fold {
  padding: 0;
  overflow: hidden;
}
.vip-fold.vip-panel {
  padding: 0;
}
.vip-fold > summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 700;
  color: var(--foreground);
  user-select: none;
}
.vip-fold > summary::-webkit-details-marker { display: none; }
.vip-fold > summary::after {
  content: '';
  float: right;
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.15s var(--ease);
}
.vip-fold[open] > summary::after {
  margin-top: 10px;
  transform: rotate(-135deg);
}
.vip-fold[open] > summary {
  border-bottom: 1px solid var(--border);
}
.vip-fold .vip-compare,
.vip-fold .vip-compare-table,
.vip-fold .vip-notice-list {
  margin: 0;
  padding: 12px 16px 16px;
}
.vip-notice-list {
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

/* VIP 权限对比 — 功能标题 + 等分双栏，避免挤边 */
.vip-compare-panel {
  overflow: hidden;
}
.vip-compare-panel .vip-panel-head {
  padding: 0 4px 4px;
}
.vip-compare {
  display: grid;
  gap: 8px;
  padding: 0;
}
.vip-compare-item {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border, rgba(15, 23, 42, 0.08));
  border-radius: 12px;
  background: linear-gradient(180deg, var(--surface-sunken, #fbfcfd) 0%, var(--surface-elevated, #fff) 55%);
  box-sizing: border-box;
}
.vip-compare-feature {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--foreground);
}
.vip-compare-feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 8px;
  color: #0f766e;
  background: rgba(13, 148, 136, 0.1);
}
.vip-compare-feature-icon svg {
  width: 14px;
  height: 14px;
}
.vip-compare-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  min-width: 0;
}
.vip-compare-cell {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.35;
  font-weight: 500;
  box-sizing: border-box;
}
.vip-compare-col-label {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.04em;
  opacity: 0.7;
}
.vip-compare-col-body {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1;
}
.vip-compare-col-body > span:last-child {
  flex: 1;
  min-width: 0;
}
.vip-compare-cell.is-normal {
  color: #475569;
  background: rgba(148, 163, 184, 0.12);
}
.vip-compare-cell.is-vip {
  color: #0f766e;
  background: rgba(13, 148, 136, 0.1);
  box-shadow: inset 0 0 0 1px rgba(13, 148, 136, 0.14);
  font-weight: 600;
}
.vip-cmp-mark {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  margin-top: 0;
  border-radius: 50%;
  position: relative;
}
.vip-cmp-mark.is-yes {
  background: #0d9488;
}
.vip-cmp-mark.is-yes::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 2px;
  width: 3px;
  height: 6px;
  border: solid #fff;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}
.vip-cmp-mark.is-no {
  background: rgba(100, 116, 139, 0.4);
}
.vip-cmp-mark.is-no::before,
.vip-cmp-mark.is-no::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 3px;
  width: 1.5px;
  height: 7px;
  background: #fff;
  border-radius: 1px;
}
.vip-cmp-mark.is-no::before { transform: rotate(45deg); }
.vip-cmp-mark.is-no::after { transform: rotate(-45deg); }

@media (max-width: 720px) {
  .vip-page .account-page-wrap {
    padding-bottom: 8px;
  }
  .vip-hero-price strong {
    font-size: 24px;
  }
  .vip-compare {
    gap: 6px;
  }
  .vip-compare-item {
    padding: 8px 10px;
    gap: 6px;
    border-radius: 10px;
  }
  .vip-compare-cols {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  .vip-compare-cell {
    flex-direction: column;
    align-items: flex-start;
    padding: 7px 8px;
    font-size: 12px;
    gap: 4px;
  }
  .vip-compare-col-body {
    gap: 5px;
  }
  .vip-compare-col-body > span:last-child {
    word-break: break-word;
  }
}
.promo-vip:hover {
  background: linear-gradient(135deg, rgba(234,179,8,0.09) 0%, rgba(245,158,11,0.06) 100%);
  transform: none;
}
.promo-vip-status {
  font-size: 14px;
  font-weight: 700;
  color: #b45309;
  flex-shrink: 0;
}
.promo-vip.is-active .promo-vip-status {
  color: #047857;
}
.promo-vip.is-active {
  background: linear-gradient(135deg, rgba(16,185,129,0.08) 0%, rgba(20,184,166,0.04) 100%);
  border-color: rgba(16,185,129,0.28);
}
.promo-body-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  line-height: 1.4;
}
.promo-vip-desc {
  font-size: 13px;
  color: var(--muted);
}
.stat-card-link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.stat-card-link:hover {
  transform: none;
  box-shadow: none;
  filter: brightness(0.98);
}
.promo-complement {
  background: rgba(124,58,237,0.06);
  border-color: rgba(124,58,237,0.2);
}
.promo-complement:hover { background: rgba(124,58,237,0.09); }

.promo-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  padding: 6px;
}
.promo-icon-vip {
  background: rgba(234,179,8,0.14);
  color: #b45309;
  padding: 6px;
  width: 28px;
  height: 28px;
}
.promo-icon-teal { background: rgba(20,184,166,0.15); color: #0d9488; }
.promo-icon-purple { background: rgba(124,58,237,0.12); color: #7c3aed; }

.promo-body { flex: 1; min-width: 0; }
.promo-title { font-size: 14px; font-weight: 600; letter-spacing: -0.2px; line-height: 1.3; }
.promo-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(0,0,0,0.06);
  color: var(--muted);
  margin-right: 4px;
}
.promo-desc { font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.35; }
.promo-arrow { color: #a3a3a3; flex-shrink: 0; opacity: 0.4; }

.stat-grid {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.stat-grid-home {
  gap: 12px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-lg);
  min-height: 52px;
  transition: background 0.12s var(--ease), border-color 0.12s var(--ease);
  border: 1px solid transparent;
  box-shadow: none;
}
.stat-card:hover {
  transform: none;
  box-shadow: none;
  filter: brightness(0.985);
}
.stat-body { min-width: 0; flex: 1; }
.stat-icon {
  width: 26px; height: 26px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  padding: 4px;
}
.stat-label { font-size: 11px; color: var(--muted); font-weight: 500; line-height: 1.2; }
.stat-sub { margin-top: 2px; font-size: 10px; color: var(--muted); line-height: 1.2; }
.stat-grid-home .stat-sub:not([id]) { display: none; }
.stat-sub code { font-family: ui-monospace, monospace; color: var(--text); }
.stat-value { font-size: 14px; font-weight: 600; letter-spacing: -0.3px; line-height: 1.25; margin-top: 1px; }

@media (min-width: 640px) {
  .stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat-grid-home { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat-card { padding: 8px 12px; min-height: 52px; gap: 10px; }
  .stat-icon { width: 26px; height: 26px; }
  .stat-label { font-size: 12px; }
  .stat-value { font-size: 15px; }
}

.stat-blue { background: rgba(14,165,233,0.06); border-color: rgba(14,165,233,0.12); }
.stat-blue .stat-value { color: #0284c7; }
.stat-blue .stat-icon { background: rgba(14,165,233,0.1); color: #0284c7; }
.stat-teal { background: rgba(20,184,166,0.06); border-color: rgba(20,184,166,0.12); }
.stat-teal .stat-value { color: #0d9488; }
.stat-teal .stat-icon { background: rgba(20,184,166,0.1); color: #0d9488; }
.stat-purple { background: rgba(124,58,237,0.06); border-color: rgba(124,58,237,0.12); }
.stat-purple .stat-value { color: #7c3aed; }
.stat-purple .stat-icon { background: rgba(124,58,237,0.1); color: #7c3aed; }
.stat-green { background: rgba(34,197,94,0.06); border-color: rgba(34,197,94,0.12); }
.stat-green .stat-value { color: #16a34a; }
.stat-green .stat-icon { background: rgba(34,197,94,0.1); color: #16a34a; }
.stat-orange { background: rgba(249,115,22,0.06); border-color: rgba(249,115,22,0.12); }
.stat-orange .stat-value { color: #ea580c; }
.stat-orange .stat-icon { background: rgba(249,115,22,0.1); color: #ea580c; }
.stat-gray { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.06); }
.stat-gray .stat-value { color: #374151; }
.stat-gray .stat-icon { background: rgba(0,0,0,0.06); color: #6b7280; }
.stat-sky { background: rgba(2,132,199,0.06); border-color: rgba(2,132,199,0.12); }
.stat-sky .stat-value { color: #0369a1; }
.stat-sky .stat-icon { background: rgba(2,132,199,0.1); color: #0284c7; }
.stat-rose { background: rgba(244,63,94,0.06); border-color: rgba(244,63,94,0.12); }
.stat-rose .stat-value { color: #e11d48; }
.stat-rose .stat-icon { background: rgba(244,63,94,0.1); color: #e11d48; }

.dash-bottom {
  display: grid;
  width: 100%;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
  padding-top: 0;
}

.announce-section {
  min-width: 0;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  box-shadow: none;
}

.quick-section {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  box-shadow: none;
}

.announce-list {
  display: flex;
  flex-direction: column;
}

.announce-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.announce-head-icon {
  margin-top: 2px;
  padding: 6px;
  border-radius: 6px;
  background: rgba(245,158,11,0.1);
  color: #d97706;
  display: flex;
}
.announce-head h2 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: none;
  color: var(--foreground);
}
.announce-head p {
  font-size: 12px;
  color: rgba(115,115,115,0.7);
  margin-top: 2px;
}

.announce-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 0;
  margin: 0;
  border: none;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  border-radius: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-family: var(--font);
  transition: background 0.12s;
}
.announce-item:last-child { border-bottom: none; }
.announce-item:hover { background: rgba(245,158,11,0.06); }
.announce-item-main { flex: 1; min-width: 0; }
.announce-item-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.announce-item-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.tag {
  display: inline-block;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(245,158,11,0.2);
  background: rgba(245,158,11,0.05);
  color: #b45309;
}
.tag-query-type {
  border-color: rgba(14,165,233,0.2);
  background: rgba(14,165,233,0.06);
  color: #0284c7;
}
.recent-section {
  border-top: 1px solid rgba(0,0,0,0.06);
  padding-top: 16px;
  margin-top: 16px;
}
.recent-section-card {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border-top: none;
  margin-top: 0;
  padding-top: 20px;
}
.recent-section.hidden {
  display: none !important;
}
.recent-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.recent-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 0;
  letter-spacing: -0.2px;
}
.recent-section-more {
  font-size: 12px;
  font-weight: 500;
  color: #0284c7;
  text-decoration: none;
  flex-shrink: 0;
}
.recent-section-more:hover { text-decoration: none; }
.recent-item:hover { background: rgba(14,165,233,0.04); }
.recent-item:hover svg { color: rgba(14,165,233,0.5); }
.announce-item:hover svg { color: rgba(245,158,11,0.6); }

.announce-list.recent-list {
  border-top: none;
  margin-top: 0;
}

/* ── 公告 / 欢迎弹窗（主样式写在 style.css，不依赖注入） ── */
.announce-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(20px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom));
}
.announce-modal.hidden { display: none; }
.announce-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.announce-modal-panel {
  position: relative;
  width: 100%;
  max-width: 380px;
  max-height: min(78vh, 560px);
  background: #fff;
  border-radius: 22px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.22);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: announce-in 0.34s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.announce-modal-panel:has(.announce-map) {
  max-width: min(720px, 94vw);
  max-height: min(85vh, 760px);
}
@keyframes announce-in {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.announce-modal-accent { display: none; }
.announce-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 22px 0;
  flex-shrink: 0;
}
.announce-modal-header-text {
  flex: 1;
  min-width: 0;
}
.announce-modal-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.announce-modal-brand .brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  flex-shrink: 0;
}
.announce-modal-brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.announce-modal-brand-name {
  font-size: 15px;
  font-weight: 750;
  letter-spacing: -0.03em;
  color: #0f172a;
  line-height: 1.15;
}
.announce-modal-brand-desc {
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.2;
}
.announce-modal-kicker,
.announce-modal-tag,
#announce-modal-tag.tag { display: none !important; }
.announce-modal-header h2,
#announce-modal-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 750;
  letter-spacing: -0.04em;
  line-height: 1.2;
  color: #0f172a;
}
.announce-modal-close {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  margin-top: 2px;
  border: none;
  background: rgba(15, 23, 42, 0.05);
  border-radius: 999px;
  color: #64748b;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.announce-modal-close:hover {
  background: rgba(15, 23, 42, 0.1);
  color: #0f172a;
}
.announce-modal-body {
  padding: 14px 22px 8px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  font-size: 14px;
  line-height: 1.65;
  color: #475569;
}
.announce-modal-body > p:first-of-type {
  margin: 0 0 16px;
  color: #334155;
  font-size: 14.5px;
}
.announce-modal-body p {
  margin: 0 0 12px;
  color: #64748b;
}
.announce-modal-body h3 {
  margin: 18px 0 8px;
  padding: 0;
  border: none;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
  line-height: 1.3;
}
.announce-modal-body h3:first-child { margin-top: 4px; }
.announce-modal-body ul,
.announce-modal-body ol {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  display: grid;
  gap: 8px;
}
.announce-modal-body li {
  position: relative;
  margin: 0;
  padding: 0 0 0 16px;
  color: #334155;
  font-size: 14px;
  line-height: 1.5;
}
.announce-modal-body ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #0f172a;
}
.announce-modal-body ol { counter-reset: announce-step; gap: 10px; }
.announce-modal-body ol li {
  counter-increment: announce-step;
  padding-left: 28px;
}
.announce-modal-body ol li::before {
  content: counter(announce-step);
  position: absolute;
  left: 0;
  top: 0.05em;
  font-size: 13px;
  font-weight: 750;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}
.announce-modal-body strong { color: #0f172a; font-weight: 650; }
.announce-modal-body a {
  color: #0f172a;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.announce-modal-body .announce-slogan,
.announce-modal-body > p:last-child:has(strong:only-child) { display: none; }
.announce-modal-body .announce-map {
  margin: 0 0 14px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.08);
}
.announce-modal-body .announce-map img {
  display: block;
  width: 100%;
  height: auto;
  border: none;
  background: #fff;
}
.announce-modal-foot {
  flex-shrink: 0;
  display: flex;
  padding: 12px 22px 22px;
}
.announce-modal-foot.hidden { display: none; }
.announce-modal-ok {
  width: 100%;
  min-height: 46px;
  border: none;
  border-radius: 999px;
  background: #0f172a;
  color: #f8fafc;
  font-size: 15px;
  font-weight: 650;
  font-family: var(--font);
  letter-spacing: -0.01em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s, background 0.15s;
}
.announce-modal-ok:hover {
  background: #1e293b;
  transform: translateY(-1px);
}
.announce-modal-ok:active { transform: none; }

html[data-theme="dark"] .announce-modal-panel {
  background: #121a2b;
  border-color: rgba(148, 163, 184, 0.16);
}
html[data-theme="dark"] .announce-modal-brand-name,
html[data-theme="dark"] #announce-modal-title { color: #e8edf5; }
html[data-theme="dark"] .announce-modal-brand-desc { color: #64748b; }
html[data-theme="dark"] .announce-modal-body { color: #94a3b8; }
html[data-theme="dark"] .announce-modal-body > p:first-of-type,
html[data-theme="dark"] .announce-modal-body li { color: #cbd5e1; }
html[data-theme="dark"] .announce-modal-body h3 { color: #64748b; }
html[data-theme="dark"] .announce-modal-body ul li::before { background: #e2e8f0; }
html[data-theme="dark"] .announce-modal-body ol li::before { color: #e2e8f0; }
html[data-theme="dark"] .announce-modal-body strong { color: #f1f5f9; }
html[data-theme="dark"] .announce-modal-ok {
  background: #e2e8f0;
  color: #0a0e17;
}
html[data-theme="dark"] .announce-modal-close {
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
}

.section-label {
  font-size: 14px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: -0.01em;
  color: var(--foreground);
  margin-bottom: 8px;
}
.section-label-spaced { margin-top: 24px; }

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

.quick-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 0.625rem;
  border: 1px solid rgba(0,0,0,0.06);
  text-decoration: none;
  color: var(--foreground);
  font-size: 12px;
  font-weight: 600;
  transition: background 0.12s, border-color 0.12s;
  min-height: 42px;
}
.quick-icon { display: flex; padding: 5px; border-radius: 6px; flex-shrink: 0; }
.quick-sky { background: rgba(14,165,233,0.05); border-color: rgba(14,165,233,0.12); }
.quick-sky:hover { background: rgba(14,165,233,0.09); }
.quick-sky .quick-icon { background: rgba(14,165,233,0.12); color: #0284c7; }
.quick-amber { background: rgba(245,158,11,0.05); border-color: rgba(245,158,11,0.12); }
.quick-amber:hover { background: rgba(245,158,11,0.09); }
.quick-amber .quick-icon { background: rgba(245,158,11,0.12); color: #d97706; }
.quick-rose { background: rgba(244,63,94,0.05); border-color: rgba(244,63,94,0.12); }
.quick-rose:hover { background: rgba(244,63,94,0.09); }
.quick-rose .quick-icon { background: rgba(244,63,94,0.12); color: #e11d48; }
.quick-teal { background: rgba(20,184,166,0.05); border-color: rgba(20,184,166,0.12); }
.quick-teal:hover { background: rgba(20,184,166,0.09); }
.quick-teal .quick-icon { background: rgba(20,184,166,0.12); color: #0d9488; }
.quick-yellow { background: rgba(234,179,8,0.05); border-color: rgba(234,179,8,0.12); }
.quick-yellow:hover { background: rgba(234,179,8,0.09); }
.quick-yellow .quick-icon { background: rgba(234,179,8,0.12); color: #ca8a04; }
.quick-slate { background: rgba(100,116,139,0.05); border-color: rgba(100,116,139,0.12); }
.quick-slate:hover { background: rgba(100,116,139,0.09); }
.quick-slate .quick-icon { background: rgba(100,116,139,0.12); color: #64748b; }
.quick-purple { background: rgba(124,58,237,0.05); border-color: rgba(124,58,237,0.12); }
.quick-purple:hover { background: rgba(124,58,237,0.09); }
.quick-purple .quick-icon { background: rgba(124,58,237,0.12); color: #7c3aed; }

.quick-recent { display: flex; flex-direction: column; gap: 6px; }
.quick-recent-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 0.5rem;
  background: rgba(0,0,0,0.02);
  cursor: pointer;
  font-size: 12px;
  transition: background 0.12s;
}
.quick-recent-item:hover { background: var(--accent); }
.quick-recent-item span:first-child {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.recent-empty {
  font-size: 12px;
  color: var(--muted);
  padding: 8px 0;
}

.stat-grid + .stat-grid {
  margin-top: 0;
}

@media (min-width: 768px) {
  .stat-grid-account { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stat-grid-home { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stat-grid-account { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stat-grid-home { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dash-bottom {
    grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
    gap: 24px;
  }
}

@media (min-width: 1280px) {
  .stat-grid-home { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

@media (min-width: 768px) {
  .sidebar-collapse-btn { display: flex; align-items: center; justify-content: center; }
  .bottom-nav { display: none !important; }
  .nav-group {
    margin-top: 10px;
    padding: 5px;
    border-radius: 14px;
    background: transparent;
    border: none;
  }
  .sidebar-nav > .sidebar-link + .nav-group {
    margin-top: 12px;
  }
}

a.sidebar-link,
a.sidebar-brand-link,
a.topbar-brand,
a.quick-item,
a.promo-card {
  text-decoration: none;
}

.query-card-highlight {
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 8px 24px rgba(0,0,0,0.04);
  border-color: rgba(0,0,0,0.06);
}

/* ── 独立查询页 /query ── */
.query-page-wrap {
  width: 100%;
  max-width: 1152px;
  margin: 0 auto;
  padding: var(--space-section) var(--space-section) 80px;
  animation: pageEnter 0.4s var(--ease);
}
@media (min-width: 768px) {
  .query-page-wrap { padding: var(--space-section); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.query-page-top {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 20px;
}
.query-history-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.12s;
}
.query-history-link:hover { color: var(--foreground); }
.query-page-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: min(52vh, 520px);
  gap: 32px;
}
.query-page-inner {
  width: 100%;
  max-width: 672px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.query-hero {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.query-hero-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  border: 1px solid rgba(20,184,166,0.18);
  background: rgba(20,184,166,0.06);
  color: #0d9488;
  box-shadow: var(--shadow-xs);
}
.query-hero-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(115,115,115,0.7);
}
.query-hero h1 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.4px;
  line-height: 1.2;
}
@media (min-width: 768px) {
  .query-hero h1 { font-size: 30px; }
}
.query-hero-desc {
  max-width: 28rem;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}
.query-form {
  width: 100%;
}
.query-form-field {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
}
.query-form-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
  z-index: 1;
}
.query-form-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  width: 100%;
  height: auto;
  min-height: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.query-form-input {
  display: block;
  flex: 0 0 auto;
  min-width: 0;
  width: 100%;
  height: 48px;
  min-height: 48px;
  max-height: none;
  padding: 0 14px 0 42px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 12px;
  background: var(--surface-sunken);
  color: var(--foreground);
  font-size: 15px;
  line-height: 1.25;
  font-family: var(--font);
  outline: none;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.12s, box-shadow 0.12s, background 0.12s;
}
.query-form-input:focus {
  border-color: rgba(13, 148, 136, 0.35);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
}
.query-form-submit {
  flex: 0 0 auto;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 48px;
  min-height: 48px;
  padding: 0 16px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand) 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: opacity 0.12s, transform 0.12s var(--ease), box-shadow 0.12s;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.22);
  box-sizing: border-box;
}
.query-form-submit:hover {
  opacity: 0.95;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(13, 148, 136, 0.28);
}
.query-form-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

@media (max-width: 767px) {
  .query-page-wrap {
    padding: 16px 16px var(--page-bottom-mobile);
  }
  .query-page-inner {
    width: 100%;
    max-width: 100%;
    gap: 24px;
    padding: 0;
  }
  .query-page-center {
    min-height: auto;
    justify-content: flex-start;
    padding-top: 4px;
    width: 100%;
  }
  .query-hero h1 {
    font-size: 26px;
  }
  .query-form-row {
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
  }
  .query-form-field {
    flex: 0 0 auto;
    width: 100%;
  }
  .query-form-icon {
    left: 16px;
    width: 18px;
    height: 18px;
    color: #0d9488;
    opacity: 0.85;
  }
  .query-form-input {
    height: 52px;
    min-height: 52px;
    padding: 0 16px 0 48px;
    font-size: 16px;
    border-radius: 14px;
    border-color: rgba(0, 0, 0, 0.08);
  }
  .query-form-submit {
    width: 100%;
    height: 52px;
    min-height: 52px;
    border-radius: 14px;
    font-size: 16px;
  }
  .query-form-submit:hover {
    transform: none;
  }
}

@media (min-width: 768px) {
  .query-form-row {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
  }
  .query-form-field {
    flex: 1 1 auto;
  }
  .query-form-submit {
    width: auto;
    min-width: 108px;
    padding: 0 20px;
  }
}

.sub-page-wrap {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: var(--space-section) var(--space-section) var(--page-bottom-mobile);
  animation: pageEnter 0.4s var(--ease);
}
@media (min-width: 768px) {
  .sub-page-wrap { padding-bottom: var(--space-section); }
}
@keyframes pageEnter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.sub-page-narrow {
  max-width: 720px;
}
.complement-submit {
  margin-top: 4px;
  height: 48px;
  border-radius: 14px;
  font-weight: 600;
}
.complement-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--background);
  box-shadow: var(--shadow-sm);
}
.complement-hero-icon {
  color: #0f766e;
  background: rgba(13,148,136,0.08);
  border-color: rgba(13,148,136,0.14);
  box-shadow: var(--shadow-xs);
}
.complement-form-grid {
  gap: 14px 16px;
}
.complement-page-wrap .query-hint {
  margin-top: 0;
  padding-top: 4px;
}
@media (min-width: 768px) {
  .sub-page-wrap { padding: var(--space-section); padding-bottom: var(--space-section); }
}
@media (max-width: 767px) {
  .sub-page-wrap {
    padding: 16px 16px var(--page-bottom-mobile);
  }
  .page-header-row {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .page-header-row .btn {
    align-self: flex-start;
  }
  .field input,
  .field textarea {
    font-size: 16px;
  }
  .field input {
    min-height: 48px;
    height: 48px;
  }
  .field textarea {
    min-height: 120px;
  }
  .complement-submit {
    margin-top: 8px;
    height: 52px;
  }
  .complement-form {
    border: none;
    padding: 0;
    background: transparent;
    box-shadow: none;
  }
  .complement-form-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

.comp-result {
  margin-top: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--background);
}
.comp-row {
  display: flex;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  gap: 16px;
}
.comp-row:last-child { border-bottom: none; }
.comp-key {
  flex-shrink: 0;
  width: 72px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}
.comp-val {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  word-break: break-all;
}

/* ── Global UI polish v2 ── */
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 35;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  animation: fadeIn 0.2s var(--ease);
}

.sub-page-wrap > .page-header {
  padding: 20px 22px;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.sub-page-wrap > .page-header-row {
  align-items: center;
  margin-bottom: 16px;
}
.sub-page-wrap > .page-header:not(.page-header-row) {
  margin-bottom: 16px;
}

.query-history-link {
  padding: 6px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--background);
  box-shadow: var(--shadow-xs);
  font-size: 12px;
  transition: all 0.15s var(--ease);
}
.query-history-link:hover {
  color: var(--foreground);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.stat-grid .stat-card {
  animation: pageEnter 0.45s var(--ease) both;
}
.stat-grid .stat-card:nth-child(1) { animation-delay: 0.04s; }
.stat-grid .stat-card:nth-child(2) { animation-delay: 0.08s; }
.stat-grid .stat-card:nth-child(3) { animation-delay: 0.12s; }
.stat-grid .stat-card:nth-child(4) { animation-delay: 0.16s; }

.quick-section .recent-section-title {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
}
.quick-section .recent-item {
  margin: 0 -6px;
  border-radius: 10px;
}
.quick-section .recent-item:hover {
  background: rgba(14,165,233,0.05);
}

.announce-item {
  border-radius: 10px;
  transition: background 0.15s var(--ease), transform 0.15s var(--ease);
}
.announce-item:active {
  transform: scale(0.995);
}

.history-item {
  transition: background 0.15s var(--ease), padding-left 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.history-item:active {
  background: rgba(0,0,0,0.03);
}

.quick-item {
  border-radius: var(--radius-lg);
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease), background 0.15s, border-color 0.15s;
}
.quick-item:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-xs);
}

.result-loading {
  margin-top: 24px;
  padding: 48px 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--background);
  box-shadow: var(--shadow-sm);
}

.result-main {
  animation: pageEnter 0.4s var(--ease);
}

.field-row {
  transition: background 0.12s var(--ease);
}
.field-row:hover {
  background: rgba(0,0,0,0.015);
}

.download-warning {
  border: 1px solid rgba(217,119,6,0.18);
  border-radius: var(--radius-lg);
}

.auth-form-panel {
  background:
    radial-gradient(circle at 20% 20%, rgba(13,148,136,0.04) 0%, transparent 45%),
    radial-gradient(circle at 80% 80%, rgba(124,58,237,0.04) 0%, transparent 45%),
    var(--background);
}
.auth-quote-panel {
  background:
    radial-gradient(ellipse at 30% 20%, rgba(255,255,255,0.04) 0%, transparent 50%),
    oklch(0.15 0 0);
}

.mobile-menu-btn {
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}

.badge {
  letter-spacing: 0.01em;
}
.badge::before {
  width: 5px;
  height: 5px;
  opacity: 0.85;
}

.pager .btn-outline {
  min-width: 88px;
}

@media (prefers-reduced-motion: reduce) {
  .stat-grid .stat-card,
  .page-inner,
  .sub-page-wrap,
  .query-page-wrap,
  .result-main,
  .toast {
    animation: none !important;
  }
  .btn-primary:hover,
  .btn-checkin:hover,
  .quick-item:hover,
  .stat-card:hover,
  .result-card:hover,
  .promo-card:hover {
    transform: none;
  }
}

/* News page */
.news-main-area {
  min-height: 0;
}

.news-page {
  display: flex;
  flex: 1;
  min-height: 0;
  height: calc(100vh - var(--header-h));
  background: var(--page-bg);
}

.news-list-panel {
  width: min(100%, 420px);
  border-right: 1px solid var(--border);
  background: var(--background);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.news-list-toolbar {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  display: grid;
  gap: 12px;
}

.news-filter-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.04);
}

.news-filter-tab {
  border: none;
  background: transparent;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}

.news-filter-tab.active {
  background: var(--background);
  color: var(--foreground);
  box-shadow: var(--shadow-xs);
}

.news-search-wrap {
  position: relative;
}

.news-search-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
}

.news-search-wrap input {
  width: 100%;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 12px 0 36px;
  background: var(--background);
  font-size: 13px;
}

.news-tag-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.news-tag-chip {
  border: 1px solid var(--border);
  background: var(--background);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  cursor: pointer;
}

.news-tag-chip.active {
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.08);
  color: #b45309;
}

.news-list {
  flex: 1;
  overflow: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-content: flex-start;
}

.news-item {
  display: flex;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  align-items: flex-start;
  flex-shrink: 0;
}

.news-item:hover {
  background: rgba(0, 0, 0, 0.03);
  border-color: var(--border);
}

.news-item.active {
  background: rgba(245, 158, 11, 0.06);
  border-color: rgba(245, 158, 11, 0.35);
}

.news-item-cover {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.05);
}

.news-item-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-item-crown {
  position: absolute;
  top: 0;
  left: 0;
  font-size: 10px;
  background: #f59e0b;
  color: #fff;
  padding: 2px 4px;
  border-bottom-right-radius: 8px;
}

.news-item-body {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0;
}

.news-item-body h4 {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
}

.news-item-body p {
  margin: 4px 0 0;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.news-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 8px;
}

.news-item-date,
.news-item-cat {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}

.news-item-cat {
  color: var(--muted);
  background: transparent;
  padding: 0;
  border-radius: 0;
  font-weight: 500;
}

.news-item-tag {
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.05);
}

.news-list-empty {
  padding: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.news-detail-panel {
  flex: 1;
  min-width: 0;
  overflow: auto;
  background: var(--background);
}

.news-detail-empty,
.news-detail {
  max-width: 820px;
  margin: 0 auto;
  padding: 24px 20px 48px;
}

.news-detail-empty h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.news-detail-empty p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.news-back-btn {
  display: none;
  align-items: center;
  gap: 6px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 16px;
  cursor: pointer;
}

.news-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.news-badge,
.news-top-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.05);
}

.news-top-badge {
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
}

.news-detail h1 {
  font-size: clamp(24px, 4vw, 32px);
  line-height: 1.2;
  margin: 0 0 12px;
}

.news-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.news-detail-body {
  font-size: 14px;
  line-height: 1.7;
  color: var(--foreground);
}

.news-detail-body > *:first-child {
  margin-top: 0;
}

.news-detail-body p {
  margin: 0 0 12px;
  color: #334155;
  word-break: break-word;
}

.news-detail-body h2,
.news-detail-body h3,
.news-detail-body h4 {
  margin: 22px 0 10px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--foreground);
  line-height: 1.35;
}

.news-detail-body h2 { font-size: 1.25rem; }
.news-detail-body h3 { font-size: 1.05rem; }
.news-detail-body h4 { font-size: 0.95rem; }

.news-detail-body ul,
.news-detail-body ol {
  margin: 0 0 14px;
  padding-left: 1.25rem;
  color: #334155;
}

.news-detail-body li {
  margin: 0 0 6px;
}

.news-detail-body li.news-li-nested {
  margin-left: 1rem;
  list-style-type: circle;
}

.news-detail-body li::marker {
  color: #94a3b8;
}

.news-detail-body strong {
  color: var(--foreground);
  font-weight: 700;
}

.news-detail-body a {
  color: #0d9488;
  text-decoration: none;
  text-underline-offset: 2px;
}

.news-detail-body hr {
  border: none;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  margin: 20px 0;
}

.news-detail-body img {
  display: block;
  max-width: min(100%, 420px);
  height: auto;
  margin: 16px auto;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.news-detail-body img.news-zoomable {
  cursor: zoom-in;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.news-detail-body img.news-zoomable:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.news-detail-body video {
  display: block;
  max-width: min(100%, 420px);
  width: 100%;
  height: auto;
  margin: 16px auto;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #000;
}

.news-image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0, 0, 0, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.news-image-lightbox.hidden {
  display: none;
}

.news-image-lightbox img {
  max-width: min(96vw, 1200px);
  max-height: 92vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.news-image-lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.news-image-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

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

.news-detail-body blockquote {
  margin: 16px 0;
  padding: 12px 16px;
  border-left: 3px solid rgba(245, 158, 11, 0.5);
  background: rgba(245, 158, 11, 0.06);
  border-radius: 0 10px 10px 0;
}

a.announce-item {
  text-decoration: none;
  color: inherit;
}

@media (max-width: 960px) {
  .news-page {
    position: relative;
    height: auto;
    min-height: calc(100vh - var(--header-h));
    padding-bottom: var(--page-bottom-mobile);
  }

  .news-list-panel,
  .news-detail-panel {
    width: 100%;
    border-right: none;
  }

  .news-list-panel.mobile-hidden {
    display: none;
  }

  .news-detail-panel.mobile-visible .news-detail-empty {
    display: none;
  }

  .news-back-btn {
    display: inline-flex;
  }
}

/* Tickets page */
.tickets-page-wrap .query-page-inner {
  max-width: 680px;
}

.ticket-hero-icon {
  color: #e11d48;
  background: rgba(225, 29, 72, 0.08);
  border-color: rgba(225, 29, 72, 0.18);
}

.tickets-page-inner .complement-form {
  margin-bottom: 28px;
}

.tickets-page-inner .complement-form textarea {
  min-height: 120px;
  resize: vertical;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  background: var(--background);
}

.ticket-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 48px;
  border-radius: 14px;
  font-weight: 600;
  margin-top: 4px;
}

.ticket-history-section {
  margin-top: 8px;
}

.ticket-history-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.ticket-history-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.ticket-count-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(225, 29, 72, 0.1);
  color: #e11d48;
}

.ticket-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ticket-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--background);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s, border-color 0.15s;
}

.ticket-card:hover {
  border-color: rgba(225, 29, 72, 0.2);
  box-shadow: var(--shadow-md);
}

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

.ticket-card-head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
}

.ticket-card-time {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 12px;
}

.ticket-card-body {
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  color: var(--foreground);
}

.ticket-reply-box {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.06), rgba(59, 130, 246, 0.02));
  border: 1px solid rgba(59, 130, 246, 0.18);
}

.ticket-reply-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #2563eb;
  margin-bottom: 8px;
}

.ticket-reply-text {
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.ticket-waiting {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.ticket-waiting::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f59e0b;
  animation: ticketPulse 1.5s ease infinite;
}

@keyframes ticketPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.ticket-empty {
  text-align: center;
  padding: 48px 24px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-xl);
  background: rgba(0, 0, 0, 0.015);
}

.ticket-empty-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 16px;
  background: rgba(225, 29, 72, 0.08);
  color: #e11d48;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ticket-empty p {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
  color: var(--foreground);
}

.ticket-empty span {
  font-size: 13px;
  color: var(--muted);
}

.ticket-form {
  margin-bottom: 24px;
}

.field-hint {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.ticket-image-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: -4px;
}

.ticket-image-count {
  font-size: 12px;
  color: var(--muted);
}

.ticket-image-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
}

.ticket-image-item {
  position: relative;
  width: 88px;
  height: 88px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #f8fafc;
}

.ticket-image-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ticket-image-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.ticket-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.ticket-attachment {
  display: block;
  width: 96px;
  height: 96px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform 0.15s, box-shadow 0.15s;
}

.ticket-attachment:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-md);
}

.ticket-attachment img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ticket-no-text {
  color: var(--muted);
  font-size: 13px;
}

.ticket-card-unread {
  border-color: rgba(13, 148, 136, 0.35);
  box-shadow: 0 0 0 1px rgba(13, 148, 136, 0.14);
}

.ticket-new-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  margin-left: 6px;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  vertical-align: middle;
}

.ticket-reply-unread {
  border-color: rgba(13, 148, 136, 0.35);
  background: rgba(13, 148, 136, 0.1);
}

.ticket-reply-alert {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  margin-bottom: 0;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(13, 148, 136, 0.25);
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.1), rgba(13, 148, 136, 0.03));
}

.ticket-reply-alert.hidden { display: none !important; }

.ticket-reply-alert-withdraw {
  border-color: rgba(217, 119, 6, 0.2);
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.07) 0%, var(--surface) 100%);
}

.ticket-reply-alert-withdraw .ticket-reply-alert-icon {
  color: #d97706;
  background: rgba(217, 119, 6, 0.1);
}

.ticket-reply-alert-recharge {
  border-color: rgba(16, 185, 129, 0.28);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, var(--surface) 100%);
}

.ticket-reply-alert-recharge .ticket-reply-alert-icon {
  color: #059669;
  background: rgba(16, 185, 129, 0.12);
}

.ticket-reply-alert-order {
  border-color: rgba(13, 148, 136, 0.28);
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.1), rgba(13, 148, 136, 0.03));
}

.ticket-reply-alert-order .ticket-reply-alert-icon {
  background: rgba(13, 148, 136, 0.12);
  color: #0f766e;
}

.ticket-reply-alert-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(13, 148, 136, 0.14);
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ticket-reply-alert-body {
  flex: 1;
  min-width: 0;
}

.ticket-reply-alert-body strong {
  display: block;
  font-size: 14px;
  margin-bottom: 2px;
}

.ticket-reply-alert-body p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.stat-sub {
  margin-top: 2px;
  font-size: 10px;
  font-weight: 600;
  color: #2563eb;
}
.stat-grid-home .stat-sub:not([id]) {
  display: none;
}

.nav-unread-badge {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

.bottom-nav-item .nav-unread-badge {
  position: absolute;
  top: 2px;
  right: calc(50% - 22px);
  margin-left: 0;
}

.bottom-nav-item {
  position: relative;
}

.nav-unread-badge.hidden {
  display: none;
}

.sidebar-link-admin:not(.hidden) {
  background: rgba(245, 158, 11, 0.1);
  color: #b45309 !important;
  font-weight: 600;
}
.sidebar-link-admin:not(.hidden):hover {
  background: rgba(245, 158, 11, 0.16);
}

.topbar-admin-btn {
  display: none !important;
}

.topbar-admin-btn:hover {
  filter: brightness(1.05);
}

/* ── BlackData 风格：工单 / 报单 ── */
.bd-page-wrap {
  padding: var(--space-section) var(--space-section) var(--page-bottom-mobile);
  animation: pageEnter 0.4s var(--ease);
}

.bd-page-inner,
.bd-page-inner-wide {
  max-width: none;
  width: 100%;
  margin: 0;
}

.bd-page-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  margin-bottom: 8px;
}

.bd-page-title {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.bd-page-title span {
  color: var(--foreground);
}

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

.bd-icon-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--background);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.bd-icon-btn:hover:not(:disabled) {
  background: rgba(0, 0, 0, 0.04);
  color: var(--foreground);
}

.bd-icon-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.bd-create-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
}

.bd-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 72px 24px;
  color: var(--muted);
}

.bd-empty-icon {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(0, 0, 0, 0.25);
  margin-bottom: 16px;
}

.bd-empty-title {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--foreground);
}

.bd-empty-desc {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.bd-ticket-list,
.bd-order-history-list {
  display: flex;
  flex-direction: column;
}

.bd-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 12px 0;
  border: none;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.12s;
}

.bd-list-row:hover {
  background: rgba(0, 0, 0, 0.02);
}

.bd-list-row-unread {
  background: rgba(13, 148, 136, 0.05);
}

.bd-list-row-main {
  min-width: 0;
  flex: 1;
}

.bd-list-row-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.bd-list-row-head strong {
  font-size: 14px;
  font-weight: 700;
}

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

.bd-list-row-meta {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  color: var(--muted);
}

.bd-list-row-arrow {
  flex-shrink: 0;
  color: var(--muted);
  opacity: 0.5;
}

/* 禁止用 transform 居中：会把弹窗内原生 select 下拉错位/拉宽 */
.bd-modal {
  position: fixed;
  inset: 0;
  margin: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0;
  background: var(--background);
  color: var(--foreground);
  max-width: 440px;
  width: calc(100% - 32px);
  max-height: calc(100vh - 32px);
  height: fit-content;
  overflow: auto;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.15);
}

.bd-modal-wide {
  max-width: 560px;
}

.bd-modal::backdrop {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
}

.bd-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 20px 0;
}

.bd-modal-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.bd-modal-head p {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.bd-modal-sub {
  font-size: 12px;
  color: var(--muted);
}

.bd-modal-close {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.bd-modal-body {
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.bd-modal-body .field > span {
  font-size: 13px;
  font-weight: 600;
  color: var(--foreground);
}

.bd-modal-body .field input,
.bd-modal-body .field textarea,
.bd-modal-body .field select {
  border-color: var(--border);
  border-radius: 10px;
}

.bd-modal-body .field textarea {
  min-height: 108px;
}

.bd-modal-body .field-hint {
  margin: -4px 0 0;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
}

.bd-modal-body .field-required {
  color: var(--destructive);
  margin-left: 2px;
}

.bd-modal-body-scroll {
  max-height: 60vh;
  overflow-y: auto;
}

.bd-modal-foot {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  padding: 16px 24px 24px;
  border-top: 1px solid var(--border);
}

.ticket-thread {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ticket-thread-item {
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.ticket-thread-user { background: rgba(13, 148, 136, 0.05); }
.ticket-thread-admin { background: rgba(16, 185, 129, 0.06); border-color: rgba(16, 185, 129, 0.18); }

.ticket-thread-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 8px;
}

.ticket-thread-body {
  font-size: 14px;
  line-height: 1.6;
}

.ticket-reply-form .field { margin-bottom: 12px; }

.ticket-reopen-hint {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.bd-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: start;
}

.bd-form-row > .field {
  min-width: 0;
  width: 100%;
}

.bd-select,
.field select,
.bd-modal select {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 36px 0 12px;
  font-size: 13px;
  font-family: inherit;
  color: var(--foreground);
  background-color: var(--background);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23737373' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  box-sizing: border-box;
}

.bd-detail-block {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.02);
  margin-bottom: 12px;
}

.bd-detail-reply {
  background: rgba(13, 148, 136, 0.05);
  border-color: rgba(13, 148, 136, 0.18);
}

.bd-detail-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.bd-detail-content {
  font-size: 14px;
  line-height: 1.6;
}

.bd-detail-waiting {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  padding: 16px;
}

.bd-order-toolbar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  margin-bottom: 4px;
}

@media (min-width: 768px) {
  .bd-order-toolbar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.bd-order-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.bd-order-tab {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.12s, color 0.12s;
}

.bd-order-tab:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--foreground);
}

.bd-order-tab.active {
  background: var(--foreground);
  color: var(--background);
}

.bd-order-search {
  position: relative;
  width: 100%;
}

@media (min-width: 768px) {
  .bd-order-search {
    width: 280px;
  }
}

.bd-order-search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  opacity: 0.5;
}

.bd-order-search input {
  width: 100%;
  height: 40px;
  padding: 0 12px 0 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 12px;
  font-family: inherit;
  background: var(--background);
}

.bd-order-list {
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.bd-order-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  transition: background 0.12s;
}

@media (min-width: 640px) {
  .bd-order-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.bd-order-row:hover {
  background: rgba(0, 0, 0, 0.02);
}

.bd-order-row-main {
  min-width: 0;
  flex: 1;
}

.bd-order-row-main strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}

.bd-order-row-main p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.bd-order-row-side {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .bd-order-row-side {
    justify-content: flex-end;
  }
}

.bd-order-price {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.bd-order-coin {
  color: var(--muted);
  opacity: 0.85;
  flex-shrink: 0;
}

.bd-order-dynamic-fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.bd-order-submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 10px;
  font-weight: 600;
}

.bd-order-submit-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.bd-order-quick-btn {
  border-radius: 8px;
  font-weight: 600;
}

.bd-order-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
}

.bd-order-page-info {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.bd-order-pager-btns {
  display: flex;
  gap: 4px;
}

.bd-order-modal-price {
  font-size: 13px;
  color: var(--muted);
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid var(--border);
}

.bd-order-modal-price strong {
  color: var(--foreground);
  font-size: 15px;
}

.bd-order-history-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 4px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.bd-order-history-row-btn {
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  border-radius: 0;
  padding: 14px 16px;
  transition: background 0.15s;
}

.bd-order-history-row-btn:hover,
.bd-order-history-row-btn:active {
  background: rgba(15, 23, 42, 0.04);
}

.bd-order-history-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.bd-order-history-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.bd-order-history-head strong {
  font-size: 14px;
}

.bd-order-history-desc {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.bd-order-history-meta {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  color: var(--muted);
}

.bd-order-history-side {
  flex-shrink: 0;
  padding-top: 2px;
}

@media (max-width: 520px) {
  .bd-form-row {
    grid-template-columns: 1fr;
  }

  .bd-page-wrap {
    padding: 12px 16px 88px;
  }
}

/* ── 账户信息页 /account ── */
.account-page-wrap {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: var(--space-section) var(--space-section) var(--page-bottom-mobile);
  animation: pageEnter 0.4s var(--ease);
}

.account-profile-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 0 28px;
}

.account-avatar {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.06);
  color: var(--foreground);
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.02em;
}

.account-profile-meta {
  min-width: 0;
}

.account-profile-name {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.account-profile-name h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
}

.account-edit-nick-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--background);
  color: var(--muted);
  cursor: pointer;
}
.account-edit-nick-btn:hover {
  color: #0f766e;
  border-color: rgba(13, 148, 136, 0.35);
  background: rgba(13, 148, 136, 0.06);
}
.account-field-plain {
  font-size: 14px;
  font-weight: 600;
  color: var(--foreground);
  word-break: break-all;
}

.account-vip-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-full);
  background: rgba(245, 158, 11, 0.08);
  color: #b45309;
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
}
.account-vip-badge.is-active {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.1);
  color: #047857;
}

.account-email-sub {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.account-balance-card {
  padding: 20px;
  margin-bottom: 28px;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.06), rgba(59, 130, 246, 0.02));
}

.account-balance-label {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}

.account-balance-value {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--foreground);
}

.account-section {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.account-section-head h2 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 700;
}

.account-section-head p {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--muted);
}

.account-transfer-form {
  display: grid;
  gap: 12px;
}

.account-transfer-form .field > span {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}

.account-transfer-form input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 14px;
}

.account-transfer-btn {
  justify-self: start;
  margin-top: 4px;
}

.account-ledger-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.account-ledger-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--background);
}

.account-ledger-item:last-child {
  border-bottom: none;
}

.account-ledger-type {
  font-size: 14px;
  font-weight: 600;
}

.account-ledger-note {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
  word-break: break-all;
}

.account-ledger-side {
  text-align: right;
  flex-shrink: 0;
}

.account-ledger-amount {
  font-size: 15px;
  font-weight: 700;
}

.ledger-amount-plus { color: #16a34a; }
.ledger-amount-minus { color: #dc2626; }

.account-ledger-balance,
.account-ledger-time {
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
}

.account-ledger-empty {
  padding: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

.account-ledger-more {
  display: block;
  margin: 16px auto 0;
}

.account-fields {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.account-field {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.account-field-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.04);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

.account-field-body {
  flex: 1;
  min-width: 0;
}

.account-field-label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}

.account-field-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.account-field-row-end {
  justify-content: space-between;
}

.account-field-value {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.02);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  word-break: break-all;
}

.account-field-plain {
  font-size: 15px;
  font-weight: 600;
  color: var(--foreground);
}

.account-password-mask {
  font-size: 18px;
  letter-spacing: 2px;
  color: var(--muted);
}

.account-copy-btn {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--background);
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s var(--ease);
}

.account-copy-btn:hover {
  color: var(--foreground);
  background: var(--accent);
}

.sidebar-footer-link.active {
  color: var(--foreground);
  background: var(--accent);
}

@media (min-width: 768px) {
  .account-page-wrap {
    padding: var(--space-section);
    padding-bottom: 40px;
  }
}

.account-quick-links {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
}

.account-quick-link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--background);
  color: var(--foreground);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease), color 0.15s var(--ease), transform 0.15s var(--ease);
}

.account-quick-link:hover {
  background: var(--brand-muted);
  border-color: rgba(13, 148, 136, 0.28);
  color: var(--brand-dark);
}

.account-quick-link:active {
  transform: scale(0.985);
}

.account-ledger-card {
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.account-ledger-head h2 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 700;
}

.account-ledger-head p {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--muted);
}

.account-ledger-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.account-ledger-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 16px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--background);
}

.account-ledger-row-main {
  min-width: 0;
}

.account-ledger-type {
  font-size: 14px;
  font-weight: 600;
  color: var(--foreground);
}

.account-ledger-note {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
  word-break: break-word;
}

.account-ledger-time {
  font-size: 12px;
  color: var(--muted);
}

.account-ledger-amount {
  font-size: 15px;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}

.account-ledger-amount.plus { color: #16a34a; }
.account-ledger-amount.minus { color: #dc2626; }

.account-ledger-balance {
  grid-column: 1 / -1;
  font-size: 12px;
  color: var(--muted);
}

.account-logins-card { margin-top: 0; }
.account-logins-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.account-login-row {
  padding: 12px 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}
.account-login-row:last-child { border-bottom: none; }
.account-login-time {
  font-size: 14px;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 4px;
}
.account-login-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  font-size: 13px;
}
.account-login-ip {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--accent);
  color: var(--foreground);
}
.account-login-region {
  color: var(--muted);
}

html[data-theme="dark"] .account-login-row {
  border-bottom-color: rgba(148, 163, 184, 0.12);
}

/* ── 充值页布局 v2 ── */
.recharge-page {
  --rc-teal: #0f766e;
  --rc-teal-soft: rgba(13, 148, 136, 0.1);
  --rc-teal-line: rgba(13, 148, 136, 0.28);
  font-family: "DM Sans", "Segoe UI", sans-serif;
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 16px 16px var(--page-bottom-mobile);
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-sizing: border-box;
}
@media (min-width: 768px) {
  .recharge-page { padding: 28px 28px 48px; gap: 22px; }
}

/* Hero */
.recharge-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px 24px;
  align-items: stretch;
  padding: 20px 22px;
  border-radius: 16px;
  border: 1px solid rgba(13, 148, 136, 0.28);
  background:
    radial-gradient(120% 160% at 0% 0%, rgba(45, 212, 191, 0.22), transparent 52%),
    linear-gradient(135deg, #0f766e 0%, #115e59 48%, #134e4a 100%);
  color: #ecfdf5;
  box-shadow: 0 14px 36px rgba(15, 118, 110, 0.18);
}
.recharge-hero-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.recharge-hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.recharge-chip {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}
.recharge-chip-muted {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(236, 253, 245, 0.88);
}
.recharge-hero h1 {
  margin: 0;
  font-size: clamp(1.45rem, 2.6vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.15;
  color: #fff;
}
.recharge-hero-main > p {
  margin: 0;
  max-width: 36em;
  font-size: 13.5px;
  line-height: 1.5;
  color: rgba(204, 251, 241, 0.9);
}
.recharge-hero-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin-top: 4px;
}
.recharge-text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  color: rgba(236, 253, 245, 0.92);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.recharge-text-link:hover {
  color: #fff;
  border-bottom-color: rgba(255, 255, 255, 0.45);
}
.recharge-link-sep {
  width: 1px;
  height: 12px;
  background: rgba(255, 255, 255, 0.28);
}
.recharge-hero-balance {
  align-self: center;
  min-width: 148px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  text-align: right;
  backdrop-filter: blur(6px);
}
.recharge-hero-balance span {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(204, 251, 241, 0.78);
}
.recharge-hero-balance strong {
  display: block;
  font-size: clamp(1.45rem, 2.4vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #fff;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

/* Workspace */
.recharge-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 16px;
  align-items: start;
}
.recharge-panel {
  border: 1px solid var(--border, rgba(15, 23, 42, 0.08));
  border-radius: 16px;
  background: var(--surface, #fff);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 28px rgba(15, 23, 42, 0.04);
}
.recharge-select {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.recharge-pay-side {
  position: sticky;
  top: 12px;
  min-width: 0;
}
.recharge-side-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.recharge-section-head,
.recharge-side-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
}
.recharge-section-head h2,
.recharge-side-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--foreground, #0f172a);
}
.recharge-rate-hint {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--rc-teal);
  line-height: 1.4;
}
.recharge-ttl {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: var(--rc-teal);
  background: var(--rc-teal-soft);
  border: 1px solid rgba(13, 148, 136, 0.16);
}

/* Amount grid */
.recharge-amount-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.recharge-amount-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 72px;
  padding: 12px 8px;
  border: 1px solid var(--border, rgba(15, 23, 42, 0.1));
  border-radius: 12px;
  background: var(--surface-sunken, #f8fafc);
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.recharge-amount-card strong {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--foreground, #0f172a);
}
.recharge-amount-card > span:not(.recharge-custom-card-label) {
  font-size: 11px;
  color: var(--muted, #64748b);
  font-weight: 600;
}
.recharge-amount-card:hover {
  border-color: rgba(13, 148, 136, 0.4);
  background: rgba(13, 148, 136, 0.06);
  transform: translateY(-1px);
}
.recharge-amount-card.is-active {
  border-color: rgba(13, 148, 136, 0.55);
  background: rgba(13, 148, 136, 0.12);
  box-shadow: inset 0 0 0 1px rgba(13, 148, 136, 0.12);
}
.recharge-amount-card.is-active strong { color: var(--rc-teal); }
.recharge-amount-custom {
  cursor: text;
  gap: 6px;
  padding: 10px;
  align-items: stretch;
}
.recharge-amount-custom .recharge-custom-card-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted, #64748b);
  line-height: 1;
  text-align: center;
}
.recharge-amount-custom.is-active .recharge-custom-card-label { color: var(--rc-teal); }
.recharge-custom-inline {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 4px;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  background: var(--surface, #fff);
  border: 1px solid var(--border, rgba(15, 23, 42, 0.1));
  box-shadow: none;
}
.recharge-amount-custom.is-active .recharge-custom-inline {
  border-color: rgba(13, 148, 136, 0.45);
  background: var(--surface, #fff);
}
.recharge-custom-yen {
  font-size: 14px !important;
  font-weight: 700 !important;
  color: var(--rc-teal) !important;
  flex-shrink: 0;
  line-height: 1;
}
.recharge-custom-input,
.page-content .recharge-custom-input,
html[data-theme="dark"] .recharge-custom-input,
html[data-theme="dark"] .page-content .recharge-custom-input {
  flex: 1;
  min-width: 0;
  width: 100% !important;
  height: 32px !important;
  margin: 0 !important;
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  font: inherit;
  font-size: 16px !important;
  font-weight: 700 !important;
  color: var(--foreground, #0f172a) !important;
  background: transparent !important;
  text-align: left;
  appearance: textfield;
  -moz-appearance: textfield;
}
.recharge-custom-input::-webkit-outer-spin-button,
.recharge-custom-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.recharge-custom-input:focus,
.page-content .recharge-custom-input:focus,
html[data-theme="dark"] .recharge-custom-input:focus {
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
}
.recharge-custom-input::placeholder {
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
}

/* Pay summary */
.recharge-pay-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.recharge-pay-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border, rgba(15, 23, 42, 0.06));
  background: var(--surface-sunken, #f8fafc);
}
.recharge-pay-row span {
  font-size: 12px;
  color: var(--muted, #64748b);
  font-weight: 600;
}
.recharge-pay-row strong {
  font-size: 17px;
  font-weight: 700;
  color: var(--foreground, #0f172a);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.recharge-pay-row:first-child strong { color: var(--rc-teal); }

.recharge-order-status {
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border, rgba(15, 23, 42, 0.08));
  background: rgba(148, 163, 184, 0.1);
  color: var(--muted, #475569);
  font-size: 13px;
  line-height: 1.5;
}
.recharge-order-status.is-pending {
  border-color: var(--rc-teal-line);
  background: var(--rc-teal-soft);
  color: var(--rc-teal);
  font-weight: 600;
}
.recharge-order-status.is-paid {
  border-color: rgba(22, 163, 74, 0.28);
  background: rgba(22, 163, 74, 0.08);
  color: #15803d;
  font-weight: 700;
}
.recharge-order-status.is-expired {
  border-color: rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.08);
  color: #b45309;
}

.recharge-disabled {
  padding: 4px 0 0;
  display: grid;
  gap: 12px;
  justify-items: start;
}
.recharge-disabled p {
  margin: 0;
  color: var(--muted, #64748b);
  font-size: 14px;
  line-height: 1.55;
}

/* QR / address */
.recharge-qr-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 4px 0 2px;
}
.recharge-qr-frame {
  position: relative;
  width: 212px;
  height: 212px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(145deg, rgba(45, 212, 191, 0.95), rgba(15, 118, 110, 0.75)) border-box;
  border: 2px solid transparent;
  box-shadow: 0 12px 30px rgba(15, 118, 110, 0.14);
}
.recharge-qr-glow {
  position: absolute;
  inset: 16px;
  border-radius: 14px;
  background: radial-gradient(circle at 30% 20%, rgba(45, 212, 191, 0.12), transparent 55%);
  pointer-events: none;
}
.recharge-qr-image {
  position: relative;
  z-index: 1;
  width: 176px;
  height: 176px;
  border-radius: 10px;
  background: #fff;
  display: block;
  transition: opacity 0.2s ease;
}
.recharge-qr-image.is-loading { opacity: 0; }
.recharge-qr-loading {
  position: absolute;
  inset: 16px;
  z-index: 2;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--rc-teal);
  font-size: 12px;
  font-weight: 600;
}
.recharge-qr-frame.is-loading .recharge-qr-loading { display: flex; }
.recharge-qr-spinner {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2.5px solid rgba(13, 148, 136, 0.18);
  border-top-color: var(--rc-teal);
  animation: recharge-qr-spin 0.75s linear infinite;
}
@keyframes recharge-qr-spin {
  to { transform: rotate(360deg); }
}
.recharge-qr-payline {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.recharge-qr-payline span {
  font-size: 12px;
  color: var(--muted, #64748b);
  font-weight: 600;
}
.recharge-qr-payline strong {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--rc-teal);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.recharge-address-box { display: grid; gap: 8px; }
.recharge-address-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted, #64748b);
}
.recharge-address-value {
  display: block;
  padding: 12px;
  border-radius: 12px;
  background: #0f172a;
  border: 1px solid rgba(15, 23, 42, 0.08);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.55;
  word-break: break-all;
  font-family: "JetBrains Mono", ui-monospace, "Cascadia Code", "SF Mono", monospace;
  color: #99f6e4;
}
.recharge-address-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.recharge-address-actions .btn {
  min-height: 40px;
  font-weight: 600;
}

/* Compact checklist inside pay card */
.recharge-checklist {
  padding: 14px 14px 12px;
  border-radius: 12px;
  border: 1px solid rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.08);
}
.recharge-checklist-title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  color: #b45309;
  letter-spacing: 0.01em;
}
.recharge-checklist ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}
.recharge-checklist li {
  font-size: 12px;
  line-height: 1.55;
  color: #78716c;
}
.recharge-checklist strong {
  display: inline;
  color: #92400e;
  font-weight: 700;
  margin-right: 2px;
}
.recharge-checklist em {
  font-style: normal;
  font-weight: 700;
  color: #b45309;
}

/* Dark */
html[data-theme="dark"] .recharge-panel {
  background: var(--surface-elevated, #161e2e) !important;
  border-color: var(--hairline, rgba(148, 163, 184, 0.14)) !important;
  box-shadow: none;
}
html[data-theme="dark"] .recharge-amount-card,
html[data-theme="dark"] .recharge-pay-row {
  background: var(--surface-sunken, #070b12) !important;
  border-color: var(--hairline) !important;
}
html[data-theme="dark"] .recharge-amount-card.is-active {
  background: rgba(45, 212, 191, 0.12) !important;
  border-color: rgba(45, 212, 191, 0.4) !important;
}
html[data-theme="dark"] .recharge-amount-card.is-active strong,
html[data-theme="dark"] .recharge-pay-row:first-child strong,
html[data-theme="dark"] .recharge-qr-payline strong,
html[data-theme="dark"] .recharge-rate-hint,
html[data-theme="dark"] .recharge-checklist strong {
  color: #5eead4 !important;
}
html[data-theme="dark"] .recharge-ttl {
  color: #5eead4;
  background: rgba(45, 212, 191, 0.12);
  border-color: rgba(45, 212, 191, 0.22);
}
html[data-theme="dark"] .recharge-custom-inline {
  background: var(--surface-sunken) !important;
  border-color: var(--hairline) !important;
}
html[data-theme="dark"] .recharge-custom-yen { color: #5eead4 !important; }
html[data-theme="dark"] .recharge-checklist {
  border-color: rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.1);
}
html[data-theme="dark"] .recharge-checklist-title { color: #fbbf24; }
html[data-theme="dark"] .recharge-checklist li { color: #d6d3d1; }
html[data-theme="dark"] .recharge-checklist strong { color: #fcd34d !important; }

@media (max-width: 900px) {
  .recharge-workspace {
    grid-template-columns: 1fr;
  }
  .recharge-pay-side {
    position: static;
  }
}
@media (max-width: 640px) {
  .recharge-hero {
    grid-template-columns: 1fr;
    padding: 18px;
  }
  .recharge-hero-balance {
    text-align: left;
    min-width: 0;
  }
  .recharge-amount-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .recharge-pay-meta {
    grid-template-columns: 1fr;
  }
  .recharge-qr-frame {
    width: 196px;
    height: 196px;
  }
  .recharge-qr-image {
    width: 164px;
    height: 164px;
  }
}

.aff-transfer-amount-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.aff-transfer-amount-row input {
  flex: 1;
  min-width: 0;
}

a.account-vip-badge {
  text-decoration: none;
  cursor: pointer;
}

.finance-page-wrap {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: var(--space-section) var(--space-section) var(--page-bottom-mobile);
  animation: pageEnter 0.4s var(--ease);
}

.finance-page-wrap:has(#panel-affiliate:not(.hidden)) {
  max-width: 960px;
}

.finance-page-head { margin-bottom: 24px; }
.finance-page-head h1 { margin: 0 0 6px; font-size: 24px; font-weight: 700; }
.finance-page-head p { margin: 0; color: var(--muted); font-size: 14px; }

.finance-stat-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.finance-stat-row-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

@media (max-width: 767px) {
  .finance-stat-row-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .finance-stat-row-3 .finance-stat-action {
    grid-column: span 2;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    padding: 0;
    min-height: 0;
    background: transparent;
    border: none;
  }
  .finance-stat-row-3 .finance-stat-action-stack {
    flex-direction: row;
    gap: 8px;
  }
  .finance-stat-row-3 .finance-stat-action .btn {
    width: 100%;
    max-width: none;
    flex: 1;
    min-height: 40px;
  }
  .finance-stat-card {
    padding: 14px 14px;
  }
}

.finance-stat-card {
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--surface-sunken) 0%, var(--background) 100%);
}

.finance-stat-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
  margin-bottom: 8px;
}

.finance-stat-value {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--foreground);
  line-height: 1.15;
}

.finance-stat-action {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-muted);
  border-color: rgba(13, 148, 136, 0.14);
}

.finance-stat-action-stack {
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
  padding: 14px;
}

.finance-stat-action-stack .btn {
  width: 100%;
}

.finance-form-card,
.finance-table-card {
  padding: 20px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--background);
  box-shadow: var(--shadow-xs);
}

.finance-form-card .field > span {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}

.finance-form-card input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 14px;
}

.finance-form-card .btn { margin-top: 8px; }

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

/* 卡密兑换 */
.redeem-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
  padding: 18px 20px;
  margin-bottom: 16px;
  border: 1px solid rgba(13, 148, 136, 0.14);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.07) 0%, var(--surface) 65%);
  box-shadow: var(--shadow-xs);
}

.redeem-hero-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--brand-light);
  color: var(--brand);
  flex-shrink: 0;
}

.redeem-hero-text {
  flex: 1;
  min-width: 180px;
}

.redeem-hero-text h2 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.redeem-hero-text p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

.redeem-hero-balance,
.redeem-hero-stats {
  margin-left: auto;
  text-align: right;
}

.redeem-hero-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px 22px;
}

.redeem-hero-stat {
  min-width: 0;
}

.redeem-hero-balance-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2px;
}

.redeem-hero-balance-value,
.redeem-hero-vip-value {
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--brand-dark);
}

.redeem-hero-vip-value {
  font-size: 1.05rem;
  color: #b45309;
}

.redeem-hero-vip-value.is-active {
  color: #047857;
}

.redeem-form-card #redeem-code {
  font-family: ui-monospace, 'Cascadia Code', 'Segoe UI Mono', monospace;
  font-size: 15px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.redeem-tips {
  margin: 0 0 16px;
  padding-left: 18px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

.redeem-tips li + li {
  margin-top: 4px;
}

@media (max-width: 767px) {
  .redeem-hero-balance,
  .redeem-hero-stats {
    width: 100%;
    margin-left: 0;
    text-align: left;
    justify-content: flex-start;
    padding-top: 4px;
    border-top: 1px solid rgba(15, 23, 42, 0.06);
  }
}

.finance-field-block + .finance-field-block { margin-top: 16px; }

.finance-field-label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}

.finance-copy-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.finance-copy-row code {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.02);
  font-size: 13px;
  word-break: break-all;
}

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

.finance-table-head {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
}

.finance-table-list { display: flex; flex-direction: column; }

.finance-table-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.finance-table-row:last-child { border-bottom: none; }

.finance-table-primary { font-size: 14px; font-weight: 600; }
.finance-table-muted { font-size: 12px; color: var(--muted); }

.finance-ledger-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: none;
  border-radius: 0;
  overflow: visible;
}

.finance-ledger-list .account-ledger-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 16px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--background);
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}

.finance-ledger-list .account-ledger-item:hover {
  border-color: rgba(13, 148, 136, 0.22);
  background: var(--brand-muted);
}

.finance-empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface-sunken);
}

.finance-load-more {
  display: block;
  margin: 16px auto 0;
}

@media (min-width: 768px) {
  .finance-page-wrap { padding-bottom: 40px; }
}

.finance-channel-create {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.finance-channel-create input {
  flex: 1;
  min-width: 180px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 14px;
}

.finance-channel-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.finance-channel-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.02);
}

.finance-channel-name {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
}

.finance-channel-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}

.finance-channel-meta code {
  font-weight: 600;
  color: var(--foreground);
}

.finance-channel-link {
  display: block;
  font-size: 11px;
  word-break: break-all;
  color: var(--muted);
}

.finance-channel-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

.finance-table-head-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.finance-table-head-row .finance-table-head {
  margin-bottom: 0;
}

.bd-select-wrap {
  position: relative;
  display: inline-flex;
  min-width: 148px;
  max-width: 100%;
  box-sizing: border-box;
}

/* 表单内自定义下拉：与输入框同宽，菜单不超出控件 */
.field .bd-select-wrap,
.bd-form-row .bd-select-wrap,
.bd-modal-body .bd-select-wrap {
  display: block;
  width: 100%;
  min-width: 0;
}

.field .bd-select-trigger,
.bd-form-row .bd-select-trigger,
.bd-modal-body .bd-select-trigger {
  width: 100%;
  min-width: 0;
  height: 40px;
  border-radius: 10px;
}

.field .bd-select-menu,
.bd-form-row .bd-select-menu,
.bd-modal-body .bd-select-menu {
  left: 0;
  right: 0;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.bd-select-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-width: 148px;
  height: 34px;
  padding: 0 12px 0 14px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 9999px;
  background: var(--surface-elevated, #fff);
  color: var(--foreground);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.15s var(--ease);
}

.bd-select-trigger:hover {
  border-color: rgba(0, 0, 0, 0.2);
}

.bd-select-trigger:focus,
.bd-select-wrap.open .bd-select-trigger {
  outline: none;
  border-color: rgba(0, 0, 0, 0.2);
}

.bd-select-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bd-select-chevron {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  color: rgba(0, 0, 0, 0.45);
  transition: transform 0.15s var(--ease);
}

.bd-select-wrap.open .bd-select-chevron {
  transform: rotate(180deg);
}

.bd-select-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  left: 0;
  z-index: 60;
  min-width: 100%;
  padding: 0;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  background: var(--surface-elevated, #fff);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.bd-select-option {
  display: block;
  width: 100%;
  padding: 10px 14px;
  border: none;
  border-radius: 0;
  background: var(--surface-elevated, #fff);
  color: var(--foreground);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s var(--ease), color 0.12s var(--ease);
}

.bd-select-option:hover {
  background: rgba(0, 0, 0, 0.04);
}

.bd-select-option.active {
  background: #2563eb;
  color: #fff;
}

.bd-select-option.active:hover {
  background: #2563eb;
  color: #fff;
}

.finance-channel-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: var(--radius-full);
  background: rgba(59, 130, 246, 0.1);
  color: #2563eb;
  font-size: 11px;
  font-weight: 600;
}

@media (max-width: 640px) {
  .finance-channel-item {
    flex-direction: column;
  }
  .finance-channel-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

/* ── 推广联盟（blackdata /aff） ── */
.aff-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.aff-stat-card {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  background: #fff;
}

.aff-stat-card-wide {
  grid-column: span 2;
}

.aff-stat-card-wide .aff-stat-body {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 8px;
  row-gap: 2px;
}

.aff-stat-card-wide .aff-stat-label {
  width: 100%;
  margin-bottom: 0;
}

.aff-stat-card-wide .aff-stat-value {
  flex: 1;
  min-width: 0;
}

.aff-stat-card-wide .aff-transfer-btn {
  margin-top: 0;
  flex-shrink: 0;
  height: 26px;
  padding: 0 8px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.02);
  font-size: 11px;
}

.aff-stat-card-wide .aff-transfer-btn:hover {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.12);
}

.aff-stat-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.04);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.aff-stat-body {
  min-width: 0;
  flex: 1;
}

.aff-stat-label {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 2px;
}

.aff-stat-value {
  display: block;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
}

.aff-transfer-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}

.aff-transfer-btn:hover {
  color: var(--foreground);
}

.aff-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 4px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.03);
}

.aff-tab {
  height: 36px;
  border: none;
  border-radius: 9999px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s var(--ease);
}

.aff-tab.active {
  background: #111;
  color: #fff;
}

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

.aff-toolbar-count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.aff-toolbar-count strong {
  color: var(--foreground);
  font-size: 14px;
}

.aff-generate-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #0f766e 0%, #0d9488 100%);
  color: #fff;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.22);
}

.aff-generate-btn:hover {
  filter: brightness(1.05);
}

.aff-generate-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.aff-code-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.aff-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.aff-page-btn {
  min-width: 72px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 9999px;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}

.aff-page-btn:hover:not(:disabled) {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.14);
}

.aff-page-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.aff-page-info {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.aff-code-card {
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 10px;
  background: #fff;
  padding: 8px 10px;
}

.aff-code-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 32px;
}

.aff-code-primary {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1;
}

.aff-code-end {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.aff-code-value {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-family: ui-monospace, 'Cascadia Code', 'SF Mono', monospace;
}

.aff-code-name {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
  padding-left: 6px;
  border-left: 1px solid rgba(0, 0, 0, 0.08);
}

.aff-code-date {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

.aff-code-tools {
  display: inline-flex;
  align-items: center;
  gap: 0;
  margin-left: 2px;
  padding-left: 4px;
  border-left: 1px solid rgba(0, 0, 0, 0.06);
}

.aff-status-badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 7px;
  border: none;
  border-radius: 9999px;
  background: #111;
  color: #fff;
  font-family: var(--font);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.aff-status-badge.disabled {
  background: rgba(0, 0, 0, 0.08);
  color: var(--muted);
}

.aff-icon-btn {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.aff-icon-btn.aff-icon-btn-sm {
  width: 26px;
  height: 26px;
  border-radius: 7px;
}

.aff-icon-btn:hover:not(:disabled) {
  background: rgba(0, 0, 0, 0.06);
  color: var(--foreground);
}

.aff-icon-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.aff-icon-btn-danger:hover:not(:disabled) {
  color: #dc2626;
  background: rgba(220, 38, 38, 0.08);
}

.aff-generate-modal {
  width: min(420px, calc(100vw - 32px));
  padding: 0;
}

.aff-generate-modal .bd-modal-head p {
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.aff-generate-field {
  margin-bottom: 0;
}

.aff-generate-foot {
  flex-direction: row;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding-top: 8px;
  border-top: none;
  padding-left: 0;
  padding-right: 0;
  padding-bottom: 0;
}

.aff-generate-submit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 16px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #0f766e 0%, #0d9488 100%);
  color: #fff;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.22);
}

.aff-generate-submit:hover {
  filter: brightness(1.05);
}

.aff-generate-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.aff-generate-foot .btn-ghost {
  height: 36px;
  padding: 0 16px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 10px;
}

.aff-empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.aff-subordinates {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.aff-subordinates-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.aff-subordinates-title {
  font-size: 15px;
  font-weight: 700;
}

.aff-invite-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.aff-invite-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}

.aff-invite-name {
  font-size: 14px;
  font-weight: 600;
}

.aff-invite-meta {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.aff-invite-time {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--muted);
}

.aff-withdraw-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
}

.aff-withdraw-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

@media (min-width: 768px) {
  .aff-withdraw-options {
    grid-template-columns: 1fr 1fr;
  }
}

.aff-withdraw-card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.aff-withdraw-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.04);
  color: var(--foreground);
  flex-shrink: 0;
}

.aff-withdraw-card-head strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}

.aff-withdraw-card-head p {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

.aff-withdraw-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.aff-withdraw-amount-label {
  font-size: 12px;
  color: var(--muted);
}

.aff-withdraw-amount-label strong {
  color: var(--foreground);
  font-size: 15px;
}

.aff-withdraw-requests {
  display: flex;
  flex-direction: column;
}

.aff-withdraw-request-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.aff-withdraw-request-row:last-child {
  border-bottom: none;
}

.aff-withdraw-request-side {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.aff-withdraw-del-btn {
  appearance: none;
  border: 1px solid rgba(220, 38, 38, 0.28);
  background: #fff;
  color: #dc2626;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}

.aff-withdraw-del-btn:hover {
  background: rgba(220, 38, 38, 0.06);
  border-color: rgba(220, 38, 38, 0.45);
}

.aff-withdraw-request-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.aff-withdraw-request-top strong {
  font-size: 16px;
  font-weight: 700;
}

.aff-withdraw-request-meta {
  font-size: 12px;
  color: var(--muted);
}

.aff-withdraw-status {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
}

.aff-withdraw-status-pending {
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
}

.aff-withdraw-status-approved {
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
}

.aff-withdraw-status-rejected {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
}

.aff-withdraw-reject-reason {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.06);
  color: #b91c1c;
  font-size: 12px;
  line-height: 1.5;
}

.aff-withdraw-qr-thumb {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.aff-withdraw-qr-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.aff-qr-upload {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.aff-qr-upload-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: fit-content;
  height: 36px;
  padding: 0 14px;
  border: 1px dashed rgba(0, 0, 0, 0.18);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.02);
  font-family: var(--font);
  font-size: 13px;
  cursor: pointer;
}

.aff-qr-upload-btn:hover {
  background: rgba(0, 0, 0, 0.04);
}

.aff-qr-upload-preview {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.aff-qr-upload-preview img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.aff-qr-upload-remove {
  height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  background: #fff;
  font-size: 12px;
  cursor: pointer;
}

.aff-cash-withdraw-modal {
  max-width: 420px;
}

.aff-withdraw-balance span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}

.aff-withdraw-balance strong {
  font-size: 24px;
  font-weight: 700;
}

.aff-withdraw-list-wrap {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

.aff-withdraw-list-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  font-weight: 700;
}

.aff-qr-modal {
  width: min(280px, calc(100vw - 32px));
  max-width: 280px;
  padding: 20px 20px 24px;
  overflow: visible;
}

.aff-qr-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  margin-bottom: 16px;
}

.aff-qr-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
}

.aff-qr-close {
  position: absolute;
  top: 0;
  right: 0;
}

.aff-qr-body {
  display: flex;
  justify-content: center;
  align-items: center;
}

.aff-qr-body img {
  display: block;
  width: 200px;
  height: 200px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

@media (min-width: 768px) {
  .aff-stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .aff-stat-card-wide {
    grid-column: span 1;
  }
}

/* ── 响应式 · 推广联盟 & 全局 polish ── */
@media (max-width: 767px) {
  .finance-page-wrap:has(#panel-affiliate:not(.hidden)) {
    padding-left: 12px;
    padding-right: 12px;
  }
  .aff-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
  }
  .aff-stat-card {
    padding: 10px;
    gap: 8px;
    border-radius: 10px;
    align-items: center;
    min-width: 0;
  }
  .aff-stat-card-wide {
    grid-column: 1 / -1;
    padding: 10px 12px;
  }
  .aff-stat-card-wide .aff-stat-body {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "label action"
      "value action";
    column-gap: 10px;
    row-gap: 2px;
    align-items: center;
  }
  .aff-stat-card-wide .aff-stat-label {
    grid-area: label;
    width: auto;
  }
  .aff-stat-card-wide .aff-stat-value {
    grid-area: value;
  }
  .aff-stat-card-wide .aff-transfer-btn {
    grid-area: action;
    align-self: center;
    height: 30px;
    padding: 0 10px;
    white-space: nowrap;
  }
  .aff-stat-icon {
    width: 26px;
    height: 26px;
    border-radius: 7px;
  }
  .aff-stat-icon svg {
    width: 14px;
    height: 14px;
  }
  .aff-stat-label {
    font-size: 11px;
    margin-bottom: 1px;
  }
  .aff-stat-value {
    font-size: 16px;
  }
  .aff-tabs {
    margin-bottom: 12px;
  }
  .aff-toolbar {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 8px;
    margin-bottom: 10px;
  }
  .aff-toolbar-count {
    min-width: 0;
    flex: 1;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .aff-generate-btn {
    width: auto;
    flex-shrink: 0;
    margin-left: 0;
    height: 34px;
    padding: 0 12px;
    font-size: 12px;
    white-space: nowrap;
  }
  .aff-code-row {
    flex-wrap: nowrap;
    gap: 8px;
  }
  .aff-code-primary {
    width: auto;
    min-width: 0;
    flex: 1;
  }
  .aff-code-name {
    max-width: 96px;
    flex: 0 1 auto;
  }
  .aff-code-end {
    width: auto;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 4px;
    flex-shrink: 0;
  }
  .aff-code-date {
    display: none;
  }
  .aff-code-tools {
    margin-left: 0;
    border-left: none;
    padding-left: 0;
  }
  .aff-subordinates-head {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }
  .aff-subordinates-head .bd-select-wrap {
    flex: 0 1 148px;
    min-width: 0;
  }
  .aff-empty {
    padding: 20px 12px;
    font-size: 13px;
    text-align: center;
  }
  .aff-withdraw-card-head {
    gap: 10px;
  }
  .aff-withdraw-card-foot {
    flex-wrap: wrap;
    gap: 8px;
  }
  .aff-withdraw-card-foot .btn {
    width: 100%;
    justify-content: center;
  }
  .aff-invite-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .aff-invite-time {
    align-self: flex-start;
  }
  .aff-withdraw-request-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .aff-withdraw-request-side {
    width: 100%;
    justify-content: space-between;
  }
  .aff-withdraw-del-btn {
    height: 36px;
    padding: 0 14px;
  }
  .aff-withdraw-card-foot {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .aff-withdraw-card-foot .btn {
    width: 100%;
  }
  .aff-pagination {
    flex-wrap: nowrap;
    gap: 8px;
    padding-top: 12px;
  }
  .aff-page-btn {
    flex: 0 0 auto;
    min-width: 64px;
    height: 32px;
    font-size: 12px;
  }
  .aff-page-info {
    flex: 1;
    min-width: 0;
    text-align: center;
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .finance-page-head h1 {
    font-size: 22px;
  }
  .finance-form-card,
  .finance-table-card {
    padding: 16px;
    border-radius: var(--radius-lg);
  }
  .announce-section,
  .quick-section {
    padding: 14px 16px;
  }
  .announce-head {
    padding-bottom: 8px;
    margin-bottom: 4px;
  }
  .finance-stat-value {
    font-size: 18px;
  }
}

@media (max-width: 520px) {
  .aff-tabs {
    border-radius: 14px;
  }
  .aff-tab {
    font-size: 12px;
    height: 34px;
  }
  .aff-code-card {
    padding: 8px 10px;
  }
  .aff-code-value {
    font-size: 12px;
    word-break: break-all;
  }
  .aff-code-name {
    font-size: 11px;
  }
}

@media (min-width: 768px) {
  .aff-stat-icon {
    background: var(--brand-light);
    color: var(--brand);
  }
  .finance-page-head {
    padding-bottom: 4px;
    border-bottom: 1px solid var(--border);
  }
  .finance-stat-card {
    background: var(--surface-elevated, #fff);
    box-shadow: var(--shadow-xs);
    transition: box-shadow 0.15s var(--ease), border-color 0.15s var(--ease);
  }
  .finance-stat-card:hover {
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: var(--shadow-sm);
  }
  .aff-code-card {
    transition: box-shadow 0.15s var(--ease), border-color 0.15s var(--ease);
  }
  .aff-code-card:hover {
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: var(--shadow-sm);
  }
}

/* ── Global UI v3 · 全站布局与视觉统一 ── */

/* 统一页面标题 */
.finance-page-head,
.recharge-page-head,
.sub-page-wrap > .page-header,
.sub-page-wrap > .page-header-row {
  margin-bottom: 20px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--surface-elevated, #ffffff) 0%, var(--surface-sunken, #fafafa) 100%);
  box-shadow: var(--shadow-xs);
  position: relative;
  overflow: hidden;
}
.finance-page-head::before,
.recharge-page-head::before,
.sub-page-wrap > .page-header::before,
.sub-page-wrap > .page-header-row::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-dark), var(--brand), #0284c7);
  opacity: 0.8;
}
.finance-page-head h1,
.recharge-page-head h1,
.sub-page-wrap > .page-header h1,
.sub-page-wrap > .page-header-row h1 {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.finance-page-head p,
.recharge-page-head p,
.sub-page-wrap > .page-header p,
.sub-page-wrap > .page-header-row p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}
.sub-page-wrap > .page-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* 覆盖 v2 重复 padding */
.sub-page-wrap > .page-header,
.sub-page-wrap > .page-header-row {
  padding: 18px 20px;
}
@media (min-width: 768px) {
  .finance-page-head,
  .recharge-page-head { border-bottom: none; padding-bottom: 18px; }
}

/* 账户页 */
.account-profile-card {
  padding: 18px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--background);
  box-shadow: var(--shadow-xs);
}
.account-balance-card {
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.08) 0%, rgba(2, 132, 199, 0.04) 100%);
  border-color: rgba(13, 148, 136, 0.15);
  box-shadow: var(--shadow-xs);
}
.account-fields {
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--background);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}
.account-field {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.account-field:last-child { border-bottom: none; }
.account-field-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--brand-light);
  color: var(--brand);
}
.account-section {
  margin-top: 28px;
  padding-top: 0;
  border-top: none;
}
.account-ledger-list {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}

/* 充值页 */
.recharge-info-card {
  box-shadow: var(--shadow-xs);
  transition: box-shadow 0.15s var(--ease);
}
.recharge-info-card:hover {
  box-shadow: var(--shadow-sm);
}

/* 查询 / 补全 */
.query-page-wrap,
.complement-page-wrap {
  animation: pageEnter 0.4s var(--ease);
}

/* 历史列表 */
.history-list {
  box-shadow: var(--shadow-sm);
}
.history-item {
  padding: 14px 18px;
}
@media (max-width: 767px) {
  .history-item {
    padding: 12px 14px;
  }
  .history-item-content { font-size: 15px; }
  .history-item:hover { padding-left: 14px; }
}

/* 结果详情页 */
.result-topbar {
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}
.result-hero {
  position: relative;
  overflow: hidden;
}
.result-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-dark), var(--brand));
}
.result-main {
  padding-bottom: var(--page-bottom-mobile);
}
@media (min-width: 768px) {
  .result-main { padding-bottom: 40px; }
}

/* 工单 / 报单 */
.bd-page-toolbar {
  padding: 12px 0 14px;
  margin-bottom: 12px;
  border: none;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.bd-page-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--foreground);
}
.bd-ticket-list,
.bd-order-history-list,
.bd-order-list {
  border: none;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 0;
  background: transparent;
  overflow: visible;
  box-shadow: none;
}
.bd-list-row,
.bd-order-row {
  padding: 12px 0;
}
.bd-list-row:last-child,
.bd-order-row:last-child {
  border-bottom: none;
}
.bd-order-toolbar {
  padding: 0 0 14px;
  margin-bottom: 12px;
  border: none;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.bd-order-search input:focus {
  border-color: rgba(13, 148, 136, 0.35);
  box-shadow: 0 0 0 3px var(--brand-light);
  outline: none;
}
.bd-order-tab.active {
  background: linear-gradient(135deg, var(--brand-dark), var(--brand));
  color: #fff;
}
.bd-empty-action {
  margin-top: 16px;
}
.bd-create-btn {
  background: linear-gradient(135deg, var(--brand-dark), var(--brand));
  color: #fff;
  border: none;
}

/* 新闻页 */
.news-list-panel {
  box-shadow: inset -1px 0 0 var(--border);
}
.news-list-toolbar {
  background: linear-gradient(180deg, var(--surface-elevated, #fff) 0%, var(--surface-sunken, #fafafa) 100%);
}
.news-filter-tabs button.active,
.news-filter-tab.active {
  background: var(--brand-light);
  color: var(--brand-dark);
}

/* 首页仪表盘 */
.recent-section-title {
  letter-spacing: 0.02em;
}

/* 登录页 */
.auth-form-wrap {
  border-color: rgba(0, 0, 0, 0.06);
  box-shadow: var(--shadow-lg);
}
.auth-form-wrap::before {
  content: '';
  display: block;
  height: 3px;
  margin: -28px -24px 20px;
  background: linear-gradient(90deg, var(--brand-dark), var(--brand), #0284c7);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}
@media (min-width: 768px) {
  .auth-quote-panel { display: flex; }
}

/* 财务表单卡片 */
.finance-form-card,
.finance-table-card {
  box-shadow: var(--shadow-xs);
  background: var(--background);
}
.finance-stat-card {
  background: var(--background);
}

/* 全局输入焦点 */
.page-content input:focus,
.page-content textarea:focus,
.page-content select:focus,
.auth-form input:focus,
.auth-form textarea:focus,
.bd-modal input:focus,
.bd-modal textarea:focus {
  border-color: rgba(13, 148, 136, 0.35);
  box-shadow: 0 0 0 3px var(--brand-light);
  outline: none;
}

/* 移动端全站紧凑 */
@media (max-width: 767px) {
  .page-inner,
  .query-page-wrap,
  .sub-page-wrap,
  .finance-page-wrap,
  .account-page-wrap,
  .bd-page-wrap,
  .news-page {
    padding-left: 16px;
    padding-right: 16px;
    padding-top: 16px;
    /* 必须显式保留底栏避让，避免被上面的 padding-* 规则“挤没”观感 */
    padding-bottom: var(--page-bottom-mobile);
  }
  .finance-page-head h1,
  .recharge-page-head h1,
  .sub-page-wrap > .page-header h1,
  .sub-page-wrap > .page-header-row h1 {
    font-size: 20px;
  }
  .finance-page-head,
  .recharge-page-head,
  .sub-page-wrap > .page-header,
  .sub-page-wrap > .page-header-row {
    padding: 14px 16px;
    margin-bottom: 14px;
  }
  .sub-page-wrap > .page-header-row {
    flex-direction: column;
    align-items: stretch;
  }
  .sub-page-wrap > .page-header-row .btn {
    width: 100%;
    justify-content: center;
  }
  .account-balance-value { font-size: 28px; }
  .account-profile-name h1 { font-size: 20px; }
  .dash-welcome {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 0 0 14px;
  }
  .dash-welcome h1 { font-size: 22px; }
  .btn-checkin {
    align-self: flex-start;
    flex-shrink: 0;
    justify-content: center;
  }
  .bd-page-toolbar,
  .bd-order-toolbar {
    padding: 12px 0;
  }
  .bd-modal {
    width: calc(100vw - 24px);
    max-height: calc(100dvh - 32px);
  }
}
@media (min-width: 768px) {
  .account-page-wrap { padding-bottom: 40px; }
  .bd-page-wrap { padding-bottom: 40px; }
}

/* ── 佣金明细汇总条 ── */
.commission-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--surface-elevated, #ffffff) 0%, var(--surface-sunken, #f8fffe) 100%);
  box-shadow: var(--shadow-xs);
}

.commission-bar-stats {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 0;
}

.commission-bar-item {
  min-width: 0;
  flex: 1;
}

.commission-bar-label {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 2px;
  white-space: nowrap;
}

.commission-bar-value {
  display: block;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.field-hint {
  margin-left: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

/* ── 划转到余额弹窗 ── */
.aff-transfer-modal {
  width: min(400px, calc(100vw - 28px));
  border: none;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.22);
  background: var(--surface);
}

.aff-transfer-modal::backdrop {
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(6px);
}

.aff-xfer-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 20px 20px 0;
}

.aff-xfer-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--gradient-brand);
  color: #fff;
  box-shadow: 0 8px 18px rgba(13, 148, 136, 0.28);
}

.aff-xfer-titles {
  flex: 1;
  min-width: 0;
  padding-top: 2px;
}

.aff-xfer-titles h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--foreground);
}

.aff-xfer-titles p {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}

.aff-xfer-close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 999px;
  background: var(--surface-sunken);
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.aff-xfer-close:hover {
  color: var(--foreground);
  background: #eef1f5;
}

.aff-xfer-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 20px 20px;
}

.aff-xfer-avail {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.08) 0%, rgba(13, 148, 136, 0.03) 100%);
  border: 1px solid rgba(13, 148, 136, 0.14);
}

.aff-xfer-avail-label {
  font-size: 12px;
  color: var(--muted);
}

.aff-xfer-avail-value {
  flex: 1;
  font-size: 16px;
  font-weight: 750;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--brand-dark);
}

.aff-xfer-all {
  appearance: none;
  border: none;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: #fff;
  color: var(--brand-dark);
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.aff-xfer-all:hover {
  background: var(--brand);
  color: #fff;
}

.aff-xfer-amount-field {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 64px;
  padding: 0 16px;
  border-radius: 16px;
  border: 1.5px solid rgba(15, 23, 42, 0.08);
  background: var(--surface-sunken);
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.aff-xfer-amount-field:focus-within {
  background: #fff;
  border-color: rgba(13, 148, 136, 0.55);
  box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.12);
}

.aff-xfer-currency {
  font-size: 24px;
  font-weight: 700;
  color: var(--muted);
  line-height: 1;
}

.aff-xfer-amount-field input {
  flex: 1;
  min-width: 0;
  width: 100%;
  border: none !important;
  outline: none;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  height: 64px;
  font-size: 32px;
  font-weight: 750;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--foreground);
  -moz-appearance: textfield;
}

.aff-xfer-amount-field input::-webkit-outer-spin-button,
.aff-xfer-amount-field input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.aff-xfer-amount-field input::placeholder {
  color: #c4c9d2;
  font-weight: 600;
}

.aff-xfer-foot {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 10px;
  margin-top: 4px;
}

.aff-xfer-cancel,
.aff-xfer-confirm {
  appearance: none;
  border: none;
  height: 46px;
  border-radius: 12px;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
}

.aff-xfer-cancel {
  background: var(--surface-sunken);
  color: var(--foreground);
}

.aff-xfer-cancel:hover {
  background: #e8ebf0;
}

.aff-xfer-confirm {
  background: var(--gradient-brand);
  color: #fff;
  box-shadow: 0 10px 22px rgba(13, 148, 136, 0.28);
}

.aff-xfer-confirm:hover {
  filter: brightness(1.03);
}

.aff-xfer-confirm:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

@media (max-width: 767px) {
  .aff-transfer-modal {
    width: calc(100vw - 24px);
    border-radius: 18px;
  }
  .aff-xfer-amount-field input {
    font-size: 28px;
  }
}

.commission-bar-divider {
  width: 1px;
  height: 36px;
  background: var(--border);
  flex-shrink: 0;
}

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

.commission-bar-btn {
  flex-shrink: 0;
  white-space: nowrap;
  min-width: 108px;
}

.commission-withdraw-hint {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--brand-muted);
  border: 1px solid rgba(13, 148, 136, 0.14);
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
}

.commission-withdraw-hint strong {
  color: var(--foreground);
  font-weight: 650;
}

.finance-table-card + .finance-table-card {
  margin-top: 0;
}

@media (max-width: 767px) {
  .commission-bar {
    flex-direction: column;
    align-items: stretch;
    padding: 12px 14px;
    gap: 12px;
  }
  .commission-bar-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    align-items: start;
  }
  .commission-bar-item {
    padding: 0;
    min-width: 0;
  }
  .commission-bar-divider {
    display: none;
  }
  .commission-bar-value {
    font-size: 18px;
  }
  .commission-bar-actions {
    flex-direction: column;
    width: 100%;
  }
  .commission-bar-btn {
    width: 100%;
    min-width: 0;
    height: 40px;
  }
}

/* ══════════════════════════════════════════════════════════
   Global UI v4 · 精致层次 · 品牌统一 · 减少视觉疲劳
   ══════════════════════════════════════════════════════════ */

/* ── 页面背景与内容区 ── */
.page-content {
  background-color: var(--page-bg, var(--background));
  background-image: none;
}

/* 对齐参考站：p-4 / md:p-6，内容贴侧栏左对齐，不居中留白 */
.page-inner {
  max-width: none;
  margin: 0;
  padding: 16px 16px 72px;
}
@media (min-width: 768px) {
  .page-inner {
    padding: 24px 24px 40px;
  }
}

/* ── 侧栏 ── */
.sidebar {
  border-right-color: rgba(15, 23, 42, 0.08);
  background: var(--sidebar-bg);
}

.sidebar-brand {
  padding-bottom: 10px;
}

.brand-mark {
  background: var(--surface);
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: var(--shadow-xs);
}

.nav-group-label {
  font-size: var(--text-caption);
  letter-spacing: 0.1em;
  color: rgba(71, 85, 105, 0.72);
  padding-bottom: 6px;
}

.sidebar-link {
  border-radius: 10px;
  color: #475569;
  font-size: 13px;
  padding: 8px 10px 8px 11px;
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.45);
  border-color: transparent;
  color: var(--foreground);
}

.sidebar-link.active {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(15, 23, 42, 0.06);
  box-shadow: var(--shadow-xs);
}

.sidebar-link.active::before {
  width: 3px;
  height: 20px;
  left: -1px;
  background: var(--gradient-brand);
  border-radius: 0 4px 4px 0;
}

.sidebar-link.active svg,
.nav-group .sidebar-link.active svg {
  color: var(--brand);
}

.sidebar-footer {
  background: rgba(255, 255, 255, 0.55);
  border-color: rgba(15, 23, 42, 0.07);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* ── 顶栏 ── */
.topbar {
  min-height: var(--header-h);
  border-bottom-color: rgba(15, 23, 42, 0.06);
  background: #ffffff;
}

.topbar-user-btn {
  background: var(--surface);
  border-color: rgba(15, 23, 42, 0.08);
}

/* ── 按钮 ── */
.btn-primary {
  background: var(--gradient-brand);
  box-shadow: var(--shadow-brand);
}
.btn-primary:hover:not(:disabled) {
  box-shadow: 0 6px 24px rgba(13, 148, 136, 0.24);
}

.btn-outline {
  border-color: rgba(15, 23, 42, 0.1);
  background: var(--surface);
}

/* ── 首页欢迎区（紧凑：底部分割线，无大卡片） ── */
.dash-welcome {
  padding: 0 0 20px !important;
  border: none !important;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.dash-welcome::after,
.dash-welcome::before {
  display: none !important;
}

.dash-welcome h1 {
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.dash-welcome h1 span {
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
  color: inherit;
}

.dash-welcome p {
  font-size: 14px;
  color: var(--muted);
  max-width: 36rem;
}

.btn-checkin {
  background: var(--gradient-brand);
  box-shadow: var(--shadow-brand);
  height: 32px;
  padding: 0 10px;
  font-size: 12px;
  border-radius: 8px;
}

/* ── 统计卡片：紧凑 12px 间隙 + 淡色底（对齐参考） ── */
.stat-card {
  box-shadow: none;
  padding: 10px 14px;
  min-height: 55px;
  gap: 10px;
  border-radius: 14px;
}

.stat-card:hover {
  transform: none;
  box-shadow: none;
}

.stat-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  padding: 5px;
}

.stat-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
}

.stat-value {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  margin-top: 1px;
}

.stat-blue .stat-icon { background: rgba(14, 165, 233, 0.12); color: #0284c7; }
.stat-teal .stat-icon { background: var(--brand-light); color: var(--brand); }
.stat-purple .stat-icon { background: rgba(124, 58, 237, 0.1); color: #7c3aed; }
.stat-green .stat-icon { background: rgba(5, 150, 105, 0.1); color: #059669; }
.stat-orange .stat-icon { background: rgba(234, 88, 12, 0.1); color: #ea580c; }
.stat-gray .stat-icon { background: rgba(100, 116, 139, 0.1); color: #64748b; }

@media (min-width: 640px) {
  .stat-value { font-size: 15px; }
}

/* ── 推广横幅：全宽条带 ── */
.promo-card {
  box-shadow: none;
  padding: 12px 16px;
  min-height: 54px;
  border-radius: 14px;
}

.promo-card:hover {
  box-shadow: none;
  transform: none;
}

.promo-card.promo-vip {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.06) 0%, rgba(245, 158, 11, 0.04) 100%);
  border-color: rgba(217, 119, 6, 0.22);
}
.promo-card.promo-search {
  background: rgba(20, 184, 166, 0.06);
  border-color: rgba(20, 184, 166, 0.25);
}

/* ── 公告 & 快捷：无外层卡片（对齐参考 8/4 裸分栏） ── */
.dash-home .announce-section,
.dash-home .quick-section,
.dash-home .recent-section-home {
  border: none;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.dash-home .recent-section-home {
  min-width: 0;
}

.dash-home .recent-section-home:not(.hidden) {
  display: block;
}

.announce-section,
.recent-section-card,
.quick-section {
  border-color: rgba(15, 23, 42, 0.07);
  background: var(--surface);
  box-shadow: none;
  padding: 16px 18px;
}

.announce-head {
  border-bottom-color: rgba(15, 23, 42, 0.06);
  padding-bottom: 14px;
  margin-bottom: 4px;
}

.announce-head h2 {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.announce-item {
  padding: 13px 4px;
  border-radius: 8px;
  border-bottom: none;
  margin-bottom: 2px;
}

.announce-item:hover {
  background: var(--brand-muted);
}

.announce-item-title {
  font-size: 13px;
  font-weight: 600;
}

.tag {
  border-color: rgba(13, 148, 136, 0.18);
  background: var(--brand-muted);
  color: var(--brand-dark);
  font-weight: 600;
}

.recent-section-card {
  border-top: none;
  margin-top: 0;
  padding-top: 22px;
}

/* ── 页面标题（去彩虹顶条） ── */
.finance-page-head,
.recharge-page-head,
.sub-page-wrap > .page-header,
.sub-page-wrap > .page-header-row {
  background: var(--surface);
  border-color: rgba(15, 23, 42, 0.07);
  box-shadow: var(--shadow-sm);
  padding: 20px 22px;
  margin-bottom: 22px;
}

.finance-page-head::before,
.recharge-page-head::before,
.sub-page-wrap > .page-header::before,
.sub-page-wrap > .page-header-row::before,
.dash-welcome::after,
.result-hero::before {
  display: none;
}

.finance-page-head h1,
.recharge-page-head h1,
.sub-page-wrap > .page-header h1,
.sub-page-wrap > .page-header-row h1 {
  font-size: var(--text-title);
  font-weight: 800;
  letter-spacing: -0.03em;
}

/* ── 财务 / 账户卡片 ── */
.finance-form-card,
.finance-table-card,
.finance-stat-card,
.account-profile-card,
.account-fields,
.account-ledger-list,
.commission-bar,
.aff-stat-card {
  border-color: rgba(15, 23, 42, 0.07);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.bd-ticket-list,
.bd-order-history-list,
.bd-order-list {
  border: none;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}

.finance-stat-card {
  background: var(--surface-sunken);
}

.finance-stat-value,
.commission-bar-value,
.account-balance-value,
.aff-stat-value {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

.account-balance-card {
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.07) 0%, var(--surface) 72%);
  border-color: rgba(13, 148, 136, 0.14);
}

.commission-bar {
  background: var(--surface);
  padding: 16px 18px;
}

.commission-bar-value {
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--foreground);
}

/* ── 推广联盟 ── */
.aff-stat-card {
  border-radius: var(--radius-lg);
  transition: box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
}

.aff-stat-card:hover {
  box-shadow: var(--shadow-sm);
}

.aff-tab.active {
  background: var(--gradient-brand);
}

.aff-code-card {
  border-color: rgba(15, 23, 42, 0.07);
}

/* ── 底部导航 ── */
.bottom-nav {
  background: rgba(255, 255, 255, 0.9);
  border-top-color: rgba(15, 23, 42, 0.06);
  box-shadow: 0 -8px 32px rgba(15, 23, 42, 0.06);
}

.bottom-nav-item.active::before {
  width: 24px;
  height: 2px;
  background: var(--brand);
  border-radius: 2px;
}

/* ── 表单输入 ── */
.finance-form-card input,
.query-card input,
.query-card textarea,
.field input,
.field textarea,
.field select {
  border-color: rgba(15, 23, 42, 0.1);
  background: var(--surface-sunken);
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease), background 0.15s var(--ease);
}

.finance-form-card input:focus,
.query-card input:focus,
.query-card textarea:focus,
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: rgba(13, 148, 136, 0.4);
  background: var(--surface);
  box-shadow: var(--ring);
  outline: none;
}

/* ── 工单提醒 ── */
.ticket-reply-alert {
  border-color: rgba(13, 148, 136, 0.18);
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.06) 0%, var(--surface) 100%);
  box-shadow: var(--shadow-sm);
}

/* ── 入场动画更柔和 ── */
.page-inner,
.query-page-wrap,
.complement-page-wrap {
  animation: pageEnterV4 0.55s var(--ease);
}

@keyframes pageEnterV4 {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── 移动端微调 ── */
@media (max-width: 767px) {
  .page-inner {
    padding-left: 16px;
    padding-right: 16px;
    padding-top: 18px;
  }

  .dash-welcome {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 0 0 16px;
  }

  .dash-welcome h1 {
    font-size: 1.375rem;
  }

  .btn-checkin {
    align-self: flex-start;
    flex-shrink: 0;
  }

  .stat-grid,
  .stat-grid-home {
    gap: 10px;
  }

  .stat-card {
    padding: 8px 10px;
    min-height: 48px;
  }

  .announce-section,
  .quick-section,
  .recent-section-card {
    padding: 14px;
  }

  .finance-page-head,
  .sub-page-wrap > .page-header {
    padding: 16px 18px;
    margin-bottom: 16px;
  }
}
/* ══════════════════════════════════════════════════════════
   Global UI v5 · 对齐 blackdata.top 布局密度与圆角层级
   - 主体贴侧栏：内容容器左对齐，仅内侧 16/24px 留白
   - 横幅直角；统计卡 14px；快捷入口 10px；避免满屏胶囊圆角
   ══════════════════════════════════════════════════════════ */

.page-content,
.main-area {
  background: var(--page-bg, var(--background));
}

.page-inner,
.query-page-wrap,
.sub-page-wrap,
.finance-page-wrap,
.account-page-wrap,
.bd-page-wrap,
.complement-page-wrap,
.news-page {
  max-width: none !important;
  width: 100%;
  margin: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding: var(--page-pad) var(--page-pad) var(--page-bottom-mobile);
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .page-inner,
  .query-page-wrap,
  .sub-page-wrap,
  .finance-page-wrap,
  .account-page-wrap,
  .bd-page-wrap,
  .complement-page-wrap,
  .news-page {
    padding: var(--page-pad-md) var(--page-pad-md) 40px;
  }
}

/* 查询表单可读宽度：左对齐；业务列表页（报单/工单）必须全宽 */
.query-page-inner,
.sub-page-narrow,
.tickets-page-wrap .query-page-inner {
  max-width: 42rem;
  width: 100%;
  margin: 0 !important;
}

.bd-page-inner,
.bd-page-inner-wide {
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
}

.finance-page-wrap:has(#panel-affiliate:not(.hidden)) {
  max-width: none !important;
}

/* ── 首页：间距对齐 space-y-6 / gap-3 ── */
.dash-home {
  gap: 24px;
}

.dash-promos {
  gap: 12px;
}

.dash-welcome {
  border-radius: 0;
  padding: 0 0 16px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  background: transparent;
  box-shadow: none;
}

.dash-welcome h1 {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.025em;
}

@media (min-width: 768px) {
  .dash-welcome h1 {
    font-size: 1.875rem;
  }
}

/* ── 推广横幅：直角条带（参考站 radius: 0）── */
.promo-card,
.promo-card.promo-vip,
.promo-card.promo-search,
a.promo-card,
button.promo-card {
  border-radius: 0 !important;
  min-height: 54px;
  padding: 12px 16px;
  box-shadow: none;
}

.promo-card:hover {
  transform: none;
  box-shadow: none;
}

.promo-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  flex-shrink: 0;
}

.promo-arrow {
  opacity: 0.45;
}

/* ── 统计卡：rounded-xl 14px ── */
.stat-card,
.stat-grid-home .stat-card,
a.stat-card {
  border-radius: 14px !important;
  padding: 10px 14px;
  min-height: 55px;
  box-shadow: none;
}

.stat-icon {
  border-radius: 8px;
}

/* ── 快捷操作：rounded-lg 10px ── */
.quick-item {
  border-radius: 10px !important;
  padding: 12px 16px;
  min-height: 50px;
  font-size: 13px;
}

.quick-grid {
  gap: 10px;
}

/* 桌面右侧栏：快捷入口单列（对齐参考 8/4）；移动端仍两列 */
@media (min-width: 1024px) {
  .dash-bottom .quick-grid {
    grid-template-columns: 1fr;
  }
}

/* ── 首页底栏分区：去外层大圆角卡片 ── */
.dash-home .announce-section,
.dash-home .quick-section,
.dash-home .recent-section-home,
.dash-home .recent-section-card {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
}

.announce-item,
a.announce-item,
button.announce-item {
  border-radius: 0 !important;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  padding: 12px 0;
  margin: 0;
}

.announce-item:last-child {
  border-bottom: none;
}

.announce-item:hover {
  background: transparent;
  color: inherit;
}

.announce-item:hover .announce-item-title {
  color: var(--brand-dark);
}

/* ── 侧栏：贴边、链接 10px 圆角 ── */
.sidebar {
  width: var(--sidebar-w);
}

.sidebar-link {
  border-radius: 10px !important;
}

.sidebar-link.active {
  border-radius: 10px !important;
}

.btn-checkin {
  border-radius: 8px !important;
}

/* ── 子页标题：轻量、略方，去掉彩虹顶条感 ── */
.finance-page-head,
.recharge-page-head,
.sub-page-wrap > .page-header,
.sub-page-wrap > .page-header-row {
  border-radius: 8px !important;
  box-shadow: none !important;
  background: var(--surface) !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  padding: 16px 18px !important;
}

.finance-page-head::before,
.recharge-page-head::before,
.sub-page-wrap > .page-header::before,
.sub-page-wrap > .page-header-row::before {
  display: none !important;
}

/* 账户 / 充值 / VIP 卡片：中等圆角，不全用大圆角 */
.account-balance-card,
.recharge-info-card,
.vip-hero-card,
.account-profile-card,
.account-ledger-card,
.finance-form-card,
.finance-table-card,
.query-card,
.complement-form {
  border-radius: 10px !important;
}

.vip-hero-badge,
.account-vip-badge {
  border-radius: 6px !important;
}

/* 顶栏与内容水平节奏一致 */
.topbar {
  padding-left: var(--page-pad);
  padding-right: var(--page-pad);
}

@media (min-width: 768px) {
  .topbar {
    padding-left: var(--page-pad-md);
    padding-right: var(--page-pad-md);
  }
}

/* 提醒条：直角条带，与 VIP 横幅同语汇 */
.ticket-reply-alert {
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* 按钮：常规 8px，避免全站 pill */
.page-content .btn:not(.btn-sm):not(.icon-btn),
.account-page-wrap .btn:not(.btn-sm),
.finance-page-wrap .btn:not(.btn-sm),
.query-page-wrap .btn:not(.btn-sm) {
  border-radius: 8px;
}

.page-content .btn-sm,
.account-page-wrap .btn-sm {
  border-radius: 6px;
}
/* ══════════════════════════════════════════════════════════
   Global UI v6 · 全站精致化（用户端）
   ══════════════════════════════════════════════════════════ */

:root {
  --surface-elevated: #ffffff;
  --hairline: rgba(15, 23, 42, 0.08);
  --hairline-strong: rgba(15, 23, 42, 0.12);
}

html[data-theme="dark"] {
  --hairline: rgba(148, 163, 184, 0.14);
  --hairline-strong: rgba(148, 163, 184, 0.22);
  --surface-elevated: #111827;
}

body,
.auth-body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* 登录页 */
.auth-form-wrap {
  border-radius: 12px;
  border-color: var(--hairline);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 12px 32px rgba(15, 23, 42, 0.06);
  padding: 32px 28px;
}

.auth-quote-panel {
  background: #111111;
  border-right-color: rgba(255, 255, 255, 0.06);
}

.auth-input {
  border-radius: 10px;
  border-color: var(--hairline);
}

.auth-submit,
.auth-form-wrap .btn-primary {
  border-radius: 10px !important;
  height: 44px;
  font-weight: 600;
}

/* 侧栏 */
.sidebar {
  background: var(--sidebar-bg, var(--surface-elevated, #ffffff));
  border-right: 1px solid var(--hairline);
}

.sidebar-nav {
  padding: 6px 10px 16px;
}

.nav-group-label {
  font-size: 11px;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: #94a3b8;
  padding: 14px 12px 6px;
}

.sidebar-link {
  min-height: 36px;
  font-weight: 500;
}

.sidebar-link.active {
  background: rgba(13, 148, 136, 0.08);
  color: #0f766e;
  font-weight: 600;
  box-shadow: none;
  border: 1px solid rgba(13, 148, 136, 0.12);
}

.sidebar-link.active svg {
  color: #0d9488;
}

html[data-theme="dark"] .sidebar {
  background: #0f172a;
}

html[data-theme="dark"] .sidebar-link.active {
  background: rgba(45, 212, 191, 0.1);
  border-color: rgba(45, 212, 191, 0.18);
  color: #5eead4;
}

/* 顶栏 */
.topbar {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}

html[data-theme="dark"] .topbar {
  background: rgba(15, 23, 42, 0.92);
}

.topbar-user-btn {
  border-radius: 8px;
  height: 34px;
  border-color: var(--hairline);
}

.dash-welcome h1 {
  font-weight: 600;
  letter-spacing: -0.03em;
}

.dash-welcome p {
  color: #64748b;
  font-size: 13px;
}

.promo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
}

.promo-vip-status,
.promo-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.promo-vip-desc {
  font-size: 12.5px;
  color: #64748b;
}

.stat-value {
  font-feature-settings: "tnum";
  letter-spacing: -0.02em;
}

.stat-label {
  color: #64748b;
}

.query-card,
.result-card,
.history-list,
.complement-form,
.ticket-card,
.order-card {
  border: 1px solid var(--hairline) !important;
  box-shadow: none !important;
  border-radius: 10px !important;
  background: var(--surface-elevated);
}

.bottom-nav {
  background: rgba(255, 255, 255, 0.94) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--hairline) !important;
  box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.04);
}

.bottom-nav-item.active {
  color: #0d9488 !important;
}

html[data-theme="dark"] .bottom-nav {
  background: rgba(15, 23, 42, 0.94) !important;
}

.toast {
  border-radius: 10px !important;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.14) !important;
  border: 1px solid var(--hairline);
}

.news-card,
.bd-card {
  border-radius: 10px !important;
  border-color: var(--hairline) !important;
  box-shadow: none !important;
}

.page-content input,
.page-content textarea,
.page-content select,
.query-page-wrap input,
.query-page-wrap textarea,
.account-page-wrap input,
.finance-page-wrap input,
.finance-page-wrap textarea,
.finance-page-wrap select {
  border-radius: 8px;
  border-color: var(--hairline);
}

.page-content input:focus,
.page-content textarea:focus,
.page-content select:focus {
  border-color: rgba(13, 148, 136, 0.45);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
}

.vip-compare-table,
.vip-compare {
  border-radius: 10px;
}
.vip-compare-item {
  border-color: var(--hairline, rgba(15, 23, 42, 0.08));
}

.vip-hero-card {
  border-radius: 0 !important;
}

.page-content::-webkit-scrollbar { width: 5px; }
.sidebar-nav::-webkit-scrollbar { width: 3px; }


/* ── BD pages hotfix：全宽 + 去大气球圆角 ── */
.bd-page-wrap {
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 16px 16px var(--page-bottom-mobile) !important;
}
@media (min-width: 768px) {
  .bd-page-wrap {
    padding: 24px 24px 40px !important;
  }
}
.bd-page-inner,
.bd-page-inner-wide {
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
}
.bd-page-toolbar,
.bd-order-toolbar {
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  border: none !important;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08) !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}
.bd-ticket-list,
.bd-order-history-list,
.bd-order-list {
  border: none !important;
  border-top: 1px solid rgba(15, 23, 42, 0.08) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.bd-list-row,
.bd-order-row,
.bd-order-history-row-btn {
  padding-left: 0 !important;
  padding-right: 0 !important;
}
.bd-create-btn,
a.bd-create-btn,
.btn.bd-create-btn {
  border-radius: 8px !important;
}
.bd-order-tab {
  border-radius: 6px !important;
}
.bd-order-search input,
.bd-icon-btn {
  border-radius: 8px !important;
}
.bd-order-quick-btn,
.bd-order-submit-btn {
  border-radius: 8px !important;
}
.bd-order-history-row,
.bd-order-history-row-btn,
.bd-list-row {
  border-radius: 0 !important;
}
.bd-order-pager,
.bd-order-pager-btns {
  border-radius: 8px !important;
}

/* ══════════════════════════════════════════════════════════
   Pages UI v7 · 账户 / 财务 / 充值 / VIP / 查询子页精致化
   ══════════════════════════════════════════════════════════ */

.account-page-wrap,
.finance-page-wrap,
.query-page-wrap,
.sub-page-wrap,
.complement-page-wrap {
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 16px 16px var(--page-bottom-mobile) !important;
}
@media (min-width: 768px) {
  .account-page-wrap,
  .finance-page-wrap,
  .query-page-wrap,
  .sub-page-wrap,
  .complement-page-wrap {
    padding: 24px 24px 40px !important;
  }
}

/* ── 个人中心：紧凑设置行 + 变量色（支持夜间） ── */
.account-page-wrap {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 16px 16px var(--page-bottom-mobile);
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-sizing: border-box;
}
@media (min-width: 768px) {
  .account-page-wrap { padding: 24px 24px 48px; gap: 16px; }
}

.account-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: start;
}
.account-split-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: var(--surface-sunken, #fafafa);
  border: 1px solid var(--border, rgba(15, 23, 42, 0.08));
}
.account-split-tab {
  height: 36px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}
.account-split-tab.is-active {
  background: var(--surface-elevated, #fff);
  color: var(--foreground);
  box-shadow: var(--shadow-xs);
}
.account-split > [data-account-pane] { display: none; min-width: 0; }
.account-split > [data-account-pane].is-active { display: flex; flex-direction: column; }
.account-split .account-logins-list,
.account-split .account-ledger-list {
  max-height: min(52vh, 420px);
  overflow-y: auto;
}
@media (min-width: 860px) {
  .account-split {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }
  .account-split-tabs { display: none; }
  .account-split > [data-account-pane] {
    display: flex !important;
    flex-direction: column;
    height: 100%;
  }
}

.account-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--border-strong, rgba(15, 23, 42, 0.08));
  border-radius: 14px;
  background: var(--surface, var(--background));
}
@media (min-width: 640px) {
  .account-hero {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    padding: 18px 20px;
  }
}

.account-hero-user {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.account-avatar {
  flex-shrink: 0;
  width: 52px !important;
  height: 52px !important;
  border-radius: 12px !important;
  background: var(--accent) !important;
  color: var(--foreground) !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.account-profile-meta { min-width: 0; }
.account-profile-name {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.account-profile-name h1 {
  margin: 0 !important;
  font-size: 1.25rem !important;
  font-weight: 750 !important;
  letter-spacing: -0.03em;
  color: var(--foreground) !important;
}
.account-email-sub {
  margin: 4px 0 0 !important;
  font-size: 13px !important;
  color: var(--muted) !important;
  word-break: break-all;
}

.account-vip-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: var(--accent);
  color: var(--foreground);
  font-size: 11px !important;
  font-weight: 650;
  text-decoration: none;
}
.account-vip-badge.is-active {
  border-color: rgba(15, 23, 42, 0.18);
  background: #0f172a;
  color: #f8fafc;
}
html[data-theme="dark"] .account-vip-badge.is-active {
  background: #e2e8f0;
  color: #0a0e17;
  border-color: transparent;
}

.account-hero-balance {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 160px;
  padding: 12px 14px;
  border: 1px solid var(--border-strong, rgba(15, 23, 42, 0.08));
  border-radius: 12px;
  background: var(--surface-sunken, #fafafa);
}
@media (min-width: 640px) {
  .account-hero-balance { align-items: flex-end; text-align: right; }
}
.account-balance-label {
  font-size: 12px !important;
  color: var(--muted) !important;
  margin: 0 !important;
}
.account-balance-value {
  font-size: 1.5rem !important;
  font-weight: 750 !important;
  letter-spacing: -0.03em;
  font-feature-settings: "tnum";
  color: var(--foreground) !important;
}
.account-hero-recharge {
  margin-top: 6px;
  border-radius: 999px !important;
}

.account-panel {
  border: 1px solid var(--border-strong, rgba(15, 23, 42, 0.08));
  border-radius: 14px;
  background: var(--surface, var(--background));
  padding: 14px 14px 12px;
  box-sizing: border-box;
}
.account-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.account-panel-head h2,
.account-ledger-head h2 {
  margin: 0 !important;
  font-size: 14px !important;
  font-weight: 750 !important;
  color: var(--foreground) !important;
}
.account-panel-head p,
.account-ledger-head p {
  margin: 0 !important;
  font-size: 12px !important;
  color: var(--muted) !important;
}

.account-settings {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border, rgba(15, 23, 42, 0.06));
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-sunken, #fafafa);
}
.account-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border, rgba(15, 23, 42, 0.06));
  min-height: 56px;
  box-sizing: border-box;
}
.account-setting-row:last-child { border-bottom: none; }
.account-setting-text {
  min-width: 0;
  flex: 1;
}
.account-setting-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 3px;
}
.account-setting-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--foreground);
  word-break: break-all;
  line-height: 1.35;
}
code.account-setting-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  font-weight: 550;
}
.account-setting-muted {
  font-weight: 500 !important;
  color: var(--muted) !important;
}
.account-setting-action {
  flex-shrink: 0;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border-strong, rgba(15, 23, 42, 0.12));
  background: var(--surface, var(--background));
  color: var(--foreground);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}
.account-setting-action:hover {
  border-color: rgba(15, 23, 42, 0.28);
  background: var(--accent);
}

.account-quick-links {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
}

.account-quick-link {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 40px !important;
  padding: 0 12px !important;
  border-radius: 10px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  color: var(--foreground) !important;
  background: var(--surface-sunken, #fafafa) !important;
  border: 1px solid var(--border, rgba(15, 23, 42, 0.08)) !important;
}
.account-quick-link:hover {
  border-color: rgba(15, 23, 42, 0.22) !important;
  background: var(--accent) !important;
  color: var(--foreground) !important;
}

.account-ledger-card,
.account-logins-card,
.account-panel#account-ledger {
  /* panel already styled */
}

.account-ledger-list,
.account-logins-list {
  border: 1px solid var(--border, rgba(15, 23, 42, 0.08)) !important;
  border-radius: 12px !important;
  overflow: hidden;
  background: var(--surface-sunken, #fafafa) !important;
  box-shadow: none !important;
}
.account-ledger-row,
.account-ledger-item,
.account-login-row {
  border: none !important;
  border-bottom: 1px solid var(--border, rgba(15, 23, 42, 0.06)) !important;
  border-radius: 0 !important;
  padding: 12px 14px !important;
  background: transparent !important;
}
.account-ledger-row:last-child,
.account-ledger-item:last-child,
.account-login-row:last-child { border-bottom: none !important; }

.account-login-time {
  font-size: 13px;
  font-weight: 650;
  color: var(--foreground);
  margin-bottom: 4px;
}
.account-login-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: baseline;
}
.account-login-ip {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--accent);
  color: var(--foreground);
}
.account-login-region { color: var(--muted); font-size: 12.5px; }

.account-ledger-type { color: var(--foreground); }
.account-ledger-note,
.account-ledger-time,
.account-ledger-balance { color: var(--muted); }

/* 兼容旧类名（避免残留白底） */
.account-fields,
.account-actions,
.account-action-primary { display: none !important; }

html[data-theme="dark"] .account-hero,
html[data-theme="dark"] .account-panel {
  background: var(--surface-elevated, #121a2b) !important;
  border-color: rgba(148, 163, 184, 0.16) !important;
}
html[data-theme="dark"] .account-hero-balance,
html[data-theme="dark"] .account-settings,
html[data-theme="dark"] .account-ledger-list,
html[data-theme="dark"] .account-logins-list,
html[data-theme="dark"] .account-quick-link {
  background: rgba(255, 255, 255, 0.03) !important;
  border-color: rgba(148, 163, 184, 0.14) !important;
}
html[data-theme="dark"] .account-setting-row,
html[data-theme="dark"] .account-login-row,
html[data-theme="dark"] .account-ledger-row,
html[data-theme="dark"] .account-ledger-item {
  border-bottom-color: rgba(148, 163, 184, 0.12) !important;
}
html[data-theme="dark"] .account-setting-action {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(148, 163, 184, 0.28) !important;
  color: #e2e8f0 !important;
}
html[data-theme="dark"] .account-split-tabs {
  background: rgba(255, 255, 255, 0.04) !important;
  border-color: rgba(148, 163, 184, 0.14) !important;
}
html[data-theme="dark"] .account-split-tab { color: #94a3b8 !important; }
html[data-theme="dark"] .account-split-tab.is-active {
  background: #161e2e !important;
  color: #5eead4 !important;
  box-shadow: none !important;
}
html[data-theme="dark"] .account-avatar {
  background: rgba(226, 232, 240, 0.1) !important;
  color: #e2e8f0 !important;
}

.finance-ledger-list.account-ledger-list,
.finance-table-card .finance-ledger-list {
  border: none !important;
  background: transparent !important;
  gap: 8px !important;
  overflow: visible !important;
}

.finance-table-card .finance-ledger-list .account-ledger-item {
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  border-radius: 10px !important;
  padding: 13px 14px !important;
  background: var(--surface-elevated, #fff) !important;
}

.finance-table-card .finance-ledger-list .account-ledger-item:hover {
  border-color: rgba(13, 148, 136, 0.28) !important;
  background: rgba(13, 148, 136, 0.04) !important;
}

.finance-page-head,
.recharge-page-head,
.sub-page-wrap > .page-header,
.sub-page-wrap > .page-header-row {
  border: none !important;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  padding: 0 0 14px !important;
  margin-bottom: 16px !important;
}

.finance-page-head h1,
.recharge-page-head h1,
.sub-page-wrap > .page-header h1 {
  font-size: 1.25rem !important;
  font-weight: 700 !important;
}

.finance-form-card,
.finance-table-card,
.finance-stat-card,
.recharge-info-card,
.vip-hero-card,
.query-card,
.complement-form,
.history-list,
.result-card {
  border-radius: 12px !important;
  box-shadow: none !important;
  border-color: rgba(15, 23, 42, 0.08) !important;
}

.finance-stat-row {
  gap: 10px !important;
}

.finance-stat-action {
  background: rgba(13, 148, 136, 0.05) !important;
  border-color: rgba(13, 148, 136, 0.16) !important;
}

.vip-hero-card {
  border-radius: 12px !important;
  border: 1px solid rgba(13, 148, 136, 0.18) !important;
  background: linear-gradient(160deg, rgba(13, 148, 136, 0.08) 0%, #fff 70%) !important;
  padding: 18px 20px !important;
}

.vip-hero-badge {
  border-radius: 6px !important;
}

.recharge-balance-card {
  border-radius: 8px !important;
  box-shadow: none !important;
  background: rgba(13, 148, 136, 0.04) !important;
  border: 1px solid rgba(13, 148, 136, 0.16) !important;
  padding: 14px 16px !important;
  margin-bottom: 14px !important;
  display: block !important;
}

.history-item {
  padding: 12px 14px !important;
}
.query-card {
  padding: 16px !important;
}

.account-ledger-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding-top: 4px;
}
.account-ledger-page-info {
  font-size: 12px;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}
.account-ledger-pager-btns {
  display: flex;
  gap: 8px;
}
.account-ledger-pager .btn {
  border-radius: 8px;
  min-width: 72px;
}

/* ── Mobile polish ── */
@media (max-width: 767px) {
  input.input,
  select.select,
  textarea.textarea,
  .input,
  .select,
  .textarea,
  .bd-input,
  .bd-select {
    font-size: 16px;
  }

  .account-ledger-pager {
    flex-wrap: wrap;
    gap: 10px;
  }

  .account-ledger-pager-btns {
    width: 100%;
  }

  .account-ledger-pager .btn {
    flex: 1;
    min-height: 40px;
  }

  .account-actions-primary {
    grid-template-columns: 1fr;
  }

  .account-action-primary {
    min-height: 42px;
  }

  .account-hero-balance-row,
  .account-balance-row {
    flex-wrap: wrap;
    gap: 10px;
  }

  .bd-toolbar,
  .page-toolbar,
  .finance-toolbar {
    flex-wrap: wrap;
    gap: 8px;
  }

  .bd-toolbar .input,
  .bd-toolbar .select,
  .page-toolbar .input,
  .page-toolbar .select {
    flex: 1 1 100%;
    min-width: 0;
    max-width: none;
  }

  .bottom-nav {
    overflow: hidden;
  }

  .bottom-nav-item.active::before {
    width: 28px;
    height: 3px;
    background: var(--brand, #0d9488);
  }
}

/* ══════════════════════════════════════════════════════════
   Dark Mode v2 · 全站精致黑夜模式
   ══════════════════════════════════════════════════════════ */

html.theme-animating,
html.theme-animating *:not(iframe),
html.theme-animating *::before,
html.theme-animating *::after {
  transition:
    background-color 0.28s var(--ease),
    color 0.22s var(--ease),
    border-color 0.22s var(--ease),
    box-shadow 0.28s var(--ease),
    fill 0.22s var(--ease) !important;
}
html.theme-animating iframe,
html.theme-animating .auth-turnstile,
html.theme-animating .auth-turnstile * {
  transition: none !important;
}

html[data-theme="dark"] {
  --surface-elevated: #161e2e;
  --hairline: rgba(148, 163, 184, 0.14);
  --hairline-strong: rgba(148, 163, 184, 0.24);
}

html[data-theme="dark"] body,
html[data-theme="dark"] .auth-body {
  background: var(--gradient-page);
  color: var(--foreground);
}

html[data-theme="dark"] ::selection {
  background: rgba(45, 212, 191, 0.28);
  color: #f0fdfa;
}

html[data-theme="dark"] .shell {
  background: var(--gradient-page) !important;
  color: var(--foreground);
}
html[data-theme="dark"] .main,
html[data-theme="dark"] .main-area,
html[data-theme="dark"] .main-content,
html[data-theme="dark"] .page-content,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .content-area,
html[data-theme="dark"] .page-inner {
  background: transparent !important;
  color: var(--foreground);
}
html[data-theme="dark"] .main-area {
  background:
    radial-gradient(900px 420px at 100% 0%, rgba(45, 212, 191, 0.06), transparent 55%),
    #0a0e17 !important;
}
html[data-theme="dark"] .page-content {
  scrollbar-color: rgba(148, 163, 184, 0.35) transparent;
}

html[data-theme="dark"] .brand-mark {
  background: #161e2e !important;
  color: #5eead4 !important;
  border-color: rgba(45, 212, 191, 0.28) !important;
  box-shadow: 0 0 0 1px rgba(45, 212, 191, 0.08);
}

html[data-theme="dark"] .brand-copy,
html[data-theme="dark"] .brand-name,
html[data-theme="dark"] .sidebar-brand {
  color: var(--foreground) !important;
}

/* 主题按钮 */
html[data-theme="dark"] [data-theme-toggle],
html[data-theme="dark"] .auth-tool-btn {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.28);
  background: rgba(251, 191, 36, 0.08);
}
html[data-theme="dark"] [data-theme-toggle]:hover,
html[data-theme="dark"] .auth-tool-btn:hover {
  background: rgba(251, 191, 36, 0.16);
  color: #fcd34d;
}

/* 侧栏 / 顶栏 / 底栏 */
html[data-theme="dark"] .sidebar {
  background: linear-gradient(180deg, #0e1524 0%, #0a101c 100%);
  border-right-color: var(--hairline);
  box-shadow: inset -1px 0 0 rgba(45, 212, 191, 0.04);
}
html[data-theme="dark"] .sidebar-footer {
  background: rgba(148, 163, 184, 0.08) !important;
  border-color: var(--hairline) !important;
  box-shadow: none !important;
  backdrop-filter: none;
}
html[data-theme="dark"] .sidebar-footer-link {
  color: #cbd5e1 !important;
}
html[data-theme="dark"] .sidebar-footer-link svg {
  color: #94a3b8 !important;
}
html[data-theme="dark"] .sidebar-footer-link:hover,
html[data-theme="dark"] .sidebar-footer-logout:hover {
  background: rgba(148, 163, 184, 0.1) !important;
}
html[data-theme="dark"] .sidebar-footer-link:hover {
  color: #f1f5f9 !important;
}
html[data-theme="dark"] .nav-group-label { color: #64748b; }
html[data-theme="dark"] .sidebar-link { color: #cbd5e1; }
html[data-theme="dark"] .sidebar-link:hover {
  background: rgba(148, 163, 184, 0.08);
  color: #f1f5f9;
}
html[data-theme="dark"] .sidebar-link.active {
  background: rgba(45, 212, 191, 0.12);
  border-color: rgba(45, 212, 191, 0.22);
  color: #5eead4;
}
html[data-theme="dark"] .sidebar-link.active svg { color: #2dd4bf; }

html[data-theme="dark"] .topbar {
  background: rgba(10, 14, 23, 0.82);
  border-bottom-color: var(--hairline);
  box-shadow: 0 1px 0 rgba(45, 212, 191, 0.04);
}
html[data-theme="dark"] .topbar-user-btn,
html[data-theme="dark"] .icon-btn {
  background: rgba(148, 163, 184, 0.08);
  border-color: var(--hairline);
  color: var(--foreground);
}
html[data-theme="dark"] .icon-btn:hover,
html[data-theme="dark"] .topbar-user-btn:hover {
  background: rgba(148, 163, 184, 0.14);
}

html[data-theme="dark"] .bottom-nav {
  background: rgba(10, 14, 23, 0.92) !important;
  border-top-color: var(--hairline) !important;
  box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.35);
}
html[data-theme="dark"] .bottom-nav-item { color: #94a3b8; }
html[data-theme="dark"] .bottom-nav-item.active {
  color: #2dd4bf !important;
}
html[data-theme="dark"] .bottom-nav-item.active::before {
  background: #2dd4bf;
}

/* 通用卡片 / 面板硬编码白底 */
html[data-theme="dark"] .card,
html[data-theme="dark"] .bd-card,
html[data-theme="dark"] .news-card,
html[data-theme="dark"] .ticket-card,
html[data-theme="dark"] .order-card,
html[data-theme="dark"] .query-card,
html[data-theme="dark"] .result-card,
html[data-theme="dark"] .history-list,
html[data-theme="dark"] .complement-form,
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .promo-card,
html[data-theme="dark"] .dash-card,
html[data-theme="dark"] .modal,
html[data-theme="dark"] .modal-content,
html[data-theme="dark"] .drawer,
html[data-theme="dark"] .drawer-panel,
html[data-theme="dark"] .dropdown-menu,
html[data-theme="dark"] .user-menu,
html[data-theme="dark"] .popover,
html[data-theme="dark"] .toast,
html[data-theme="dark"] .empty-state,
html[data-theme="dark"] .bd-empty,
html[data-theme="dark"] .table-wrap,
html[data-theme="dark"] .vip-compare,
html[data-theme="dark"] .vip-compare-table,
html[data-theme="dark"] .vip-plan-card,
html[data-theme="dark"] .recharge-panel,
html[data-theme="dark"] .recharge-card,
html[data-theme="dark"] .bd-recharge-card,
html[data-theme="dark"] .finance-card,
html[data-theme="dark"] .channel-card,
html[data-theme="dark"] .account-hero,
html[data-theme="dark"] .account-fields,
html[data-theme="dark"] .account-ledger,
html[data-theme="dark"] .account-actions,
html[data-theme="dark"] .auth-form-wrap {
  background: var(--surface-elevated) !important;
  border-color: var(--hairline) !important;
  color: var(--foreground);
  box-shadow: var(--shadow-sm) !important;
}

html[data-theme="dark"] .auth-form-wrap {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 16px 40px rgba(0, 0, 0, 0.45) !important;
  border: 1px solid rgba(45, 212, 191, 0.12);
}

html[data-theme="dark"] .auth-quote-panel {
  background:
    radial-gradient(600px 400px at 20% 20%, rgba(45, 212, 191, 0.16), transparent 60%),
    #070b12;
  border-right-color: rgba(148, 163, 184, 0.1);
}

html[data-theme="dark"] .auth-input,
html[data-theme="dark"] .auth-btn-code {
  background: var(--surface-sunken) !important;
  border-color: var(--hairline) !important;
  color: var(--foreground) !important;
}
html[data-theme="dark"] .auth-input:focus {
  border-color: rgba(45, 212, 191, 0.55) !important;
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.18) !important;
}
html[data-theme="dark"] .auth-input::placeholder { color: #64748b; }

/* 文本硬编码灰色 / 近黑 */
html[data-theme="dark"] .dash-welcome p,
html[data-theme="dark"] .promo-vip-desc,
html[data-theme="dark"] .stat-label,
html[data-theme="dark"] .muted,
html[data-theme="dark"] .text-muted,
html[data-theme="dark"] .bd-muted,
html[data-theme="dark"] .account-balance-label,
html[data-theme="dark"] .account-email-sub,
html[data-theme="dark"] .account-field-label {
  color: var(--muted) !important;
}

html[data-theme="dark"] .account-balance-value,
html[data-theme="dark"] .stat-value,
html[data-theme="dark"] .dash-welcome h1,
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] .promo-title,
html[data-theme="dark"] .promo-vip-status {
  color: var(--foreground) !important;
}

html[data-theme="dark"] .account-avatar {
  background: rgba(45, 212, 191, 0.14) !important;
  color: #5eead4 !important;
}

html[data-theme="dark"] .account-hero-balance {
  border-color: rgba(45, 212, 191, 0.22);
  background: rgba(45, 212, 191, 0.08);
}

html[data-theme="dark"] .account-field,
html[data-theme="dark"] .bd-list-row,
html[data-theme="dark"] .bd-order-row,
html[data-theme="dark"] .bd-order-history-row,
html[data-theme="dark"] .bd-order-history-row-btn,
html[data-theme="dark"] .bd-page-toolbar,
html[data-theme="dark"] .bd-order-toolbar,
html[data-theme="dark"] .bd-ticket-list,
html[data-theme="dark"] .bd-order-list,
html[data-theme="dark"] .bd-order-history-list {
  border-color: var(--hairline) !important;
}

html[data-theme="dark"] .bd-list-row:hover,
html[data-theme="dark"] .bd-order-row:hover,
html[data-theme="dark"] .bd-order-history-row-btn:hover,
html[data-theme="dark"] tr:hover td {
  background: rgba(148, 163, 184, 0.06) !important;
}

/* 输入控件 */
html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select,
html[data-theme="dark"] .input,
html[data-theme="dark"] .select,
html[data-theme="dark"] .textarea,
html[data-theme="dark"] .bd-input,
html[data-theme="dark"] .bd-select {
  background: var(--surface-sunken) !important;
  border-color: var(--hairline) !important;
  color: var(--foreground) !important;
}
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
  color: #64748b !important;
}
html[data-theme="dark"] input:focus,
html[data-theme="dark"] textarea:focus,
html[data-theme="dark"] select:focus {
  border-color: rgba(45, 212, 191, 0.5) !important;
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.16) !important;
}

/* 按钮体系 */
html[data-theme="dark"] .btn-ghost,
html[data-theme="dark"] .btn-secondary,
html[data-theme="dark"] .bd-icon-btn {
  background: rgba(148, 163, 184, 0.08);
  border-color: var(--hairline);
  color: var(--foreground);
}
html[data-theme="dark"] .btn-ghost:hover,
html[data-theme="dark"] .btn-secondary:hover {
  background: rgba(148, 163, 184, 0.14);
}
html[data-theme="dark"] .btn-primary,
html[data-theme="dark"] .auth-btn-primary,
html[data-theme="dark"] .auth-submit {
  box-shadow: 0 4px 18px rgba(45, 212, 191, 0.22);
}

/* 首页统计 / 快捷入口 */
html[data-theme="dark"] .quick-card,
html[data-theme="dark"] .shortcut-card,
html[data-theme="dark"] .home-card,
html[data-theme="dark"] .dash-stat,
html[data-theme="dark"] .stat-item {
  background: var(--surface) !important;
  border-color: var(--hairline) !important;
}
html[data-theme="dark"] .quick-card:hover,
html[data-theme="dark"] .shortcut-card:hover {
  border-color: rgba(45, 212, 191, 0.35) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(45, 212, 191, 0.12);
}

/* 充值 / VIP 专用浅色渐变覆盖 */
html[data-theme="dark"] .bd-recharge-hero,
html[data-theme="dark"] .recharge-hero,
html[data-theme="dark"] .vip-hero,
html[data-theme="dark"] .vip-hero-card,
html[data-theme="dark"] .finance-hero {
  background:
    linear-gradient(160deg, rgba(45, 212, 191, 0.14) 0%, rgba(15, 23, 42, 0.2) 40%, var(--surface) 100%) !important;
  border-color: rgba(45, 212, 191, 0.18) !important;
  color: var(--foreground) !important;
}

html[data-theme="dark"] .recharge-amount-btn,
html[data-theme="dark"] .bd-recharge-tier,
html[data-theme="dark"] .vip-plan,
html[data-theme="dark"] .vip-compare-item,
html[data-theme="dark"] .finance-tab,
html[data-theme="dark"] .bd-order-tab {
  background: var(--surface-sunken) !important;
  border-color: var(--hairline) !important;
  color: var(--foreground) !important;
}
html[data-theme="dark"] .recharge-amount-btn.active,
html[data-theme="dark"] .bd-recharge-tier.active,
html[data-theme="dark"] .vip-plan.active,
html[data-theme="dark"] .finance-tab.active,
html[data-theme="dark"] .bd-order-tab.active {
  background: rgba(45, 212, 191, 0.14) !important;
  border-color: rgba(45, 212, 191, 0.4) !important;
  color: #5eead4 !important;
}

html[data-theme="dark"] .bd-order-price,
html[data-theme="dark"] .price,
html[data-theme="dark"] .money {
  color: #5eead4 !important;
}

/* 表格 */
html[data-theme="dark"] table,
html[data-theme="dark"] .table,
html[data-theme="dark"] .adm-table {
  color: var(--foreground);
}
html[data-theme="dark"] thead th,
html[data-theme="dark"] .table th {
  background: rgba(148, 163, 184, 0.06) !important;
  color: #94a3b8 !important;
  border-color: var(--hairline) !important;
}
html[data-theme="dark"] td {
  border-color: var(--hairline) !important;
}

/* 弹层遮罩 */
html[data-theme="dark"] .modal-backdrop,
html[data-theme="dark"] .overlay,
html[data-theme="dark"] .drawer-backdrop {
  background: rgba(2, 6, 14, 0.72) !important;
  backdrop-filter: blur(6px);
}

/* Toast */
html[data-theme="dark"] .toast {
  background: #1a2336 !important;
  border-color: rgba(45, 212, 191, 0.18) !important;
  color: var(--foreground) !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5) !important;
}

/* 资讯 / 结果 */
html[data-theme="dark"] .news-article,
html[data-theme="dark"] .news-content,
html[data-theme="dark"] .result-body,
html[data-theme="dark"] .result-table-wrap,
html[data-theme="dark"] pre,
html[data-theme="dark"] code {
  background: var(--surface) !important;
  color: var(--foreground) !important;
  border-color: var(--hairline);
}

/* 滚动条 */
html[data-theme="dark"] ::-webkit-scrollbar { width: 6px; height: 6px; }
html[data-theme="dark"] ::-webkit-scrollbar-track { background: transparent; }
html[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.28);
  border-radius: 999px;
}
html[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
  background: rgba(45, 212, 191, 0.4);
}

/* 分割线 / 工具栏 */
html[data-theme="dark"] hr,
html[data-theme="dark"] .divider {
  border-color: var(--hairline) !important;
}

/* 徽章 */
html[data-theme="dark"] .badge,
html[data-theme="dark"] .tag,
html[data-theme="dark"] .chip,
html[data-theme="dark"] .account-vip-badge {
  border-color: rgba(45, 212, 191, 0.25);
}

/* 首页欢迎区氛围 */
html[data-theme="dark"] .dash-home,
html[data-theme="dark"] .panel.active.dash-home {
  background: transparent;
}

html[data-theme="dark"] .promo-card,
html[data-theme="dark"] .promo-vip {
  background:
    linear-gradient(135deg, rgba(45, 212, 191, 0.12) 0%, rgba(15, 23, 42, 0.55) 55%, var(--surface) 100%) !important;
  border: 1px solid rgba(45, 212, 191, 0.18) !important;
}

/* QR 码本体保持白底便于扫码；勿整块刷白 pay 卡片 */
html[data-theme="dark"] .recharge-qr-wrap,
html[data-theme="dark"] .bd-recharge-qr,
html[data-theme="dark"] .qr-box {
  background: #fff !important;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 0 0 1px rgba(45, 212, 191, 0.2);
}
html[data-theme="dark"] .recharge-qr-frame {
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(145deg, rgba(45, 212, 191, 0.95), rgba(15, 118, 110, 0.75)) border-box !important;
}
html[data-theme="dark"] .recharge-qr-payline span { color: var(--muted) !important; }

html[data-theme="dark"] .recharge-steps li {
  background: rgba(22, 30, 46, 0.9) !important;
  border-color: var(--hairline) !important;
  color: #e2e8f0 !important;
}
html[data-theme="dark"] .recharge-panel,
html[data-theme="dark"] .recharge-pay-box,
html[data-theme="dark"] .recharge-info-card,
html[data-theme="dark"] .recharge-balance-card {
  background: linear-gradient(180deg, rgba(45, 212, 191, 0.08) 0%, var(--surface-elevated) 42%) !important;
  border-color: rgba(45, 212, 191, 0.16) !important;
  box-shadow: var(--shadow-md) !important;
}
html[data-theme="dark"] .recharge-panel-head h2,
html[data-theme="dark"] .recharge-amount-card strong {
  color: var(--foreground) !important;
}
html[data-theme="dark"] .recharge-amount-card {
  background: var(--surface-sunken) !important;
  border-color: var(--hairline) !important;
  color: var(--foreground) !important;
}
html[data-theme="dark"] .recharge-amount-card span { color: var(--muted) !important; }
html[data-theme="dark"] .recharge-amount-card.is-active {
  background: rgba(45, 212, 191, 0.12) !important;
  border-color: rgba(45, 212, 191, 0.45) !important;
}
html[data-theme="dark"] .recharge-amount-card.is-active strong { color: #5eead4 !important; }
html[data-theme="dark"] .recharge-network-tag,
html[data-theme="dark"] .recharge-rate-hint {
  color: #5eead4 !important;
}
html[data-theme="dark"] .recharge-custom-inline {
  background: var(--surface-sunken) !important;
  border-color: var(--hairline) !important;
}
html[data-theme="dark"] .recharge-custom-input {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: var(--foreground) !important;
}

/* VIP / 财务补充 */
html[data-theme="dark"] .vip-compare-item,
html[data-theme="dark"] .vip-plan-card,
html[data-theme="dark"] .finance-section,
html[data-theme="dark"] .finance-panel,
html[data-theme="dark"] .channel-item,
html[data-theme="dark"] .invite-card {
  background: var(--surface-elevated) !important;
  border-color: var(--hairline) !important;
  color: var(--foreground) !important;
}

html[data-theme="dark"] .ticket-status,
html[data-theme="dark"] .order-status,
html[data-theme="dark"] .status-badge {
  border-color: rgba(148, 163, 184, 0.2);
}

/* 新闻工具栏 / 页头 / 下拉 — 消灭残留白块 */
html[data-theme="dark"] .news-list-toolbar {
  background: linear-gradient(180deg, #161e2e 0%, #121a2b 100%) !important;
  border-bottom-color: var(--hairline) !important;
}
html[data-theme="dark"] .news-filter-tabs {
  background: rgba(255, 255, 255, 0.04) !important;
}
html[data-theme="dark"] .news-filter-tab {
  color: #94a3b8 !important;
}
html[data-theme="dark"] .news-filter-tab.active,
html[data-theme="dark"] .news-filter-tabs button.active {
  background: rgba(45, 212, 191, 0.14) !important;
  color: #5eead4 !important;
  box-shadow: none !important;
}
html[data-theme="dark"] .news-list-panel,
html[data-theme="dark"] .news-detail-panel {
  background: transparent !important;
  border-color: var(--hairline) !important;
}
html[data-theme="dark"] .news-detail-empty {
  background: transparent !important;
  color: var(--muted) !important;
}
html[data-theme="dark"] .finance-page-head,
html[data-theme="dark"] .recharge-page-head,
html[data-theme="dark"] .sub-page-wrap > .page-header,
html[data-theme="dark"] .sub-page-wrap > .page-header-row,
html[data-theme="dark"] .commission-bar {
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.08) 0%, var(--surface-elevated) 55%) !important;
  border-color: var(--hairline) !important;
}
html[data-theme="dark"] .finance-form-card,
html[data-theme="dark"] .finance-table-card,
html[data-theme="dark"] .finance-stat-card,
html[data-theme="dark"] .aff-stat-card,
html[data-theme="dark"] .aff-generate-card,
html[data-theme="dark"] .aff-withdraw-card,
html[data-theme="dark"] .aff-code-card {
  background: var(--surface-elevated) !important;
  border-color: var(--hairline) !important;
}
html[data-theme="dark"] .finance-table-card .finance-ledger-list .account-ledger-item {
  background: rgba(255, 255, 255, 0.03) !important;
  border-color: var(--hairline) !important;
}
html[data-theme="dark"] .bd-select-trigger,
html[data-theme="dark"] .bd-select-menu,
html[data-theme="dark"] .bd-select-option,
html[data-theme="dark"] .ts-select-trigger,
html[data-theme="dark"] .ts-select-menu {
  background: var(--surface-elevated) !important;
  border-color: var(--hairline) !important;
  color: var(--foreground) !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}
html[data-theme="dark"] .bd-select-option:hover,
html[data-theme="dark"] .ts-select-option:hover {
  background: rgba(45, 212, 191, 0.1) !important;
}
html[data-theme="dark"] .auth-btn-code,
html[data-theme="dark"] .sidebar-footer,
html[data-theme="dark"] .sidebar-link.active {
  background: var(--surface-elevated) !important;
}
html[data-theme="dark"] .sidebar-link:hover {
  background: rgba(148, 163, 184, 0.08) !important;
}


/* ── Ad banners (home top / in-post) ── */
.ad-banner-slot {
  width: 100%;
  margin: 0 0 14px;
}
.ad-banner-slot.hidden { display: none !important; }
.ad-banner-slot-inline { margin: 14px 0 18px; }
.ad-banner-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.ad-banner-card {
  position: relative;
  min-height: 88px;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(135deg, #0f766e 0%, #14b8a6 55%, #2dd4bf 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.22);
  background-size: cover;
  background-position: center;
}
.ad-banner-card::before,
.ad-banner-card::after {
  content: '';
  position: absolute;
  left: 10px;
  right: 10px;
  height: 1px;
  background: rgba(255,255,255,0.55);
  pointer-events: none;
  z-index: 1;
}
.ad-banner-card::before { top: 10px; }
.ad-banner-card::after { bottom: 10px; }
.ad-banner-card.has-image {
  background-color: #0f172a;
}
.ad-banner-card.has-image::before,
.ad-banner-card.has-image::after { opacity: 0.35; }
.ad-banner-hit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 88px;
  padding: 18px 16px;
  text-decoration: none;
  color: #fff;
  box-sizing: border-box;
}
.ad-banner-copy { text-align: center; z-index: 1; }
.ad-banner-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.15;
  text-shadow: 0 1px 2px rgba(0,0,0,0.25);
}
.ad-banner-sub {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 500;
  opacity: 0.9;
}
.ad-banner-close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.55);
  color: #fff;
  cursor: pointer;
}
.ad-banner-close:hover { background: rgba(15, 23, 42, 0.8); }
@media (max-width: 900px) {
  .ad-banner-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .ad-banner-row {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }
  .ad-banner-card {
    flex: 0 0 78%;
    scroll-snap-align: start;
    min-height: 76px;
  }
  .ad-banner-title { font-size: 18px; }
  .ad-banner-hit { min-height: 76px; padding: 16px 14px; }
}
html[data-theme="dark"] .ad-banner-card:not(.has-image) {
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18);
}

