/* ============================================================
   同心支付联盟 · 黑金主题
   最后加载，覆盖 styles.css 的浅色基调
   ============================================================ */

:root {
  --primary: #d9b45c;
  --primary-dark: #c9a227;
  --green: #34d399;
  --ink: #f3f0e9;
  --muted: #a29b8d;
  --line: #2a2a33;
  --soft: #101014;
  --surface: #131318;
  --surface-2: #1a1a21;
  --bg: #08080b;
  --gold: #d9b45c;
  --gold-2: #f2d98c;
  --gold-deep: #a8842f;
  color-scheme: dark;
}

html { background: var(--bg); }

body {
  background: var(--bg) !important;
  color: var(--ink) !important;
}

/* ---------- 顶栏 ---------- */
.site-header {
  background: rgba(8, 8, 11, .92) !important;
  border-bottom-color: var(--line) !important;
  box-shadow: 0 2px 16px rgba(0, 0, 0, .55) !important;
  backdrop-filter: saturate(140%) blur(12px);
}
.brand strong { color: #f7f3ea !important; }
.brand small { color: #8b8477 !important; }
.primary-nav a { color: #b0a898 !important; }
.primary-nav a:hover { color: #fff !important; }
.primary-nav a.active,
.primary-nav a[aria-current] { color: var(--gold-2) !important; }
.primary-nav a.active::after,
.primary-nav a[aria-current]::after { background: var(--gold) !important; }
.language-link { color: #b0a898 !important; border-color: var(--line) !important; }
.language-link:hover { color: var(--gold-2) !important; border-color: var(--gold) !important; }
.header-login { color: #e8e2d6 !important; border-color: var(--line) !important; }
.header-login:hover { border-color: var(--gold) !important; color: #fff !important; }
.menu-button { color: #d6cec0 !important; border-color: var(--line) !important; }

/* ---------- 页脚 ---------- */
.site-footer {
  background: #0a0a0d !important;
  border-top-color: var(--line) !important;
}
.site-footer h3 { color: #d6cec0 !important; }
.site-footer a { color: #a29b8d !important; }
.site-footer a:hover { color: var(--gold-2) !important; }
.site-footer p,
.site-footer .muted { color: #857e71 !important; }
.site-footer .footer-bottom,
.site-footer small { color: #6f6a60 !important; }

/* ---------- 按钮 ---------- */
.btn {
  background: var(--surface-2) !important;
  border-color: var(--line) !important;
  color: #e8e2d6 !important;
}
.btn:hover {
  background: #23232b !important;
  border-color: var(--gold) !important;
  color: #fff !important;
}
.btn-primary,
.home-page a.bg-primary {
  background: linear-gradient(135deg, #e8c877, #b8912f) !important;
  border-color: transparent !important;
  color: #1d1508 !important;
  box-shadow: 0 6px 20px rgba(201, 162, 39, .26) !important;
}
.btn-primary:hover,
.home-page a.bg-primary:hover {
  filter: brightness(1.07);
  box-shadow: 0 8px 26px rgba(201, 162, 39, .36) !important;
}
.btn-primary .material-symbols-outlined,
.btn-primary .svg-icon { color: #1d1508 !important; }
.btn[disabled], .btn:disabled { opacity: .45 !important; }

/* ---------- 表单 ---------- */
.input,
input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  background: #0e0e12 !important;
  border-color: var(--line) !important;
  color: var(--ink) !important;
}
.input::placeholder,
input::placeholder,
textarea::placeholder { color: #6b665c !important; }
.input:focus,
input:focus,
select:focus,
textarea:focus {
  border-color: var(--gold) !important;
  box-shadow: 0 0 0 3px rgba(217, 180, 92, .16) !important;
}
label, .form-label { color: #c2baa9 !important; }
select option { background: #0e0e12; color: var(--ink); }

/* ---------- 容器 / 卡片 ---------- */
.panel,
.chart-card,
.dashboard-task-card,
.page-banner-card,
.card,
.settings-grid > *,
.table-wrap,
.sparkline-box {
  background: var(--surface) !important;
  border-color: var(--line) !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .55) !important;
}
.panel:hover,
.chart-card:hover,
.dashboard-task-card:hover,
.page-banner-card:hover {
  box-shadow: 0 8px 28px rgba(0, 0, 0, .6) !important;
  border-color: #3a3630 !important;
}
.panel h2, .panel h3, .chart-title, .dashboard-task-body h3 { color: #f7f3ea !important; }
.panel-subtitle, .chart-subtitle, .dashboard-task-body p { color: var(--muted) !important; }

/* ---------- 表格 ---------- */
table { color: #e3ded3 !important; }
thead th, th {
  background: #16161c !important;
  color: #ada596 !important;
  border-color: var(--line) !important;
}
td { border-color: #23232b !important; }
tbody tr:hover td { background: #191920 !important; }
.table-wrap { border-color: var(--line) !important; }

/* ---------- 徽标 / 状态 ---------- */
.badge { background: #22222a !important; color: #cfc8ba !important; }
.badge.active, .badge.approved, .badge.handled, .badge.succeeded {
  background: rgba(16, 185, 129, .14) !important; color: #6ee7b7 !important;
}
.badge.maintenance, .badge.new, .badge.pending {
  background: rgba(217, 180, 92, .16) !important; color: var(--gold-2) !important;
}
.badge.rejected, .badge.failed, .badge.suspended, .badge.disabled {
  background: rgba(244, 63, 94, .14) !important; color: #fda4af !important;
}
.status-dot { background: var(--gold) !important; box-shadow: 0 0 0 4px rgba(217, 180, 92, .16) !important; }

/* ---------- 筛选 / 标签 / 分页 ---------- */
.country-chip,
.region-tab-btn,
.quick-template-btn,
.preset-btn {
  background: var(--surface-2) !important;
  border-color: var(--line) !important;
  color: #c2baa9 !important;
}
.country-chip:hover,
.region-tab-btn:hover,
.quick-template-btn:hover,
.preset-btn:hover { border-color: var(--gold) !important; color: #fff !important; }
.country-chip.active,
.region-tab-btn.active,
.preset-btn.active {
  background: rgba(217, 180, 92, .16) !important;
  border-color: var(--gold) !important;
  color: var(--gold-2) !important;
}
.list-toolbar, .pagination { color: var(--muted) !important; }
.date-filter { color: #918a7d !important; }
.country-selector-panel, .country-tags-box {
  background: var(--surface) !important;
  border-color: var(--line) !important;
}

/* ---------- 弹窗 / 提示 ---------- */
dialog {
  background: var(--surface) !important;
  border-color: var(--line) !important;
  color: var(--ink) !important;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .75) !important;
}
dialog::backdrop { background: rgba(3, 3, 5, .74) !important; }
.toast { background: #1c1c24 !important; color: var(--ink) !important; border: 1px solid var(--line); }
.toast.error { background: #7f1d3a !important; }

/* ---------- 登录 / 注册 ---------- */
.auth-layout { color: var(--ink) !important; }
.auth-intro h1 { color: #f7f3ea !important; }
.auth-intro p { color: #ada596 !important; }
.auth-panel, .auth-card { background: var(--surface) !important; border-color: var(--line) !important; }
.auth-layout .feature-line { color: #c2baa9 !important; }
.auth-box {
  background: var(--surface) !important;
  border-color: var(--line) !important;
}
.feature-line { color: #c2baa9 !important; }

/* ---------- 首页横幅 ---------- */
.page-banner-card { background: linear-gradient(135deg, #14141a, #0b0b0f) !important; }
.page-banner-title { color: #f9f6ef !important; }
.page-banner-desc { color: #ada596 !important; }
.page-banner-tag {
  background: rgba(217, 180, 92, .1) !important;
  border-color: rgba(217, 180, 92, .28) !important;
  color: var(--gold-2) !important;
}
.page-banner-overlay {
  background:
    linear-gradient(90deg, #0b0b0f 2%, rgba(11, 11, 15, .55) 42%, rgba(11, 11, 15, .62) 100%),
    radial-gradient(120% 90% at 85% 20%, rgba(217, 180, 92, .1), transparent 60%) !important;
}
.page-banner-img {
  filter: brightness(.72) saturate(1.05) contrast(1.02) !important;
}
.breadcrumbs, .breadcrumbs a { color: #8f887b !important; }
.page-heading h1, .page-heading p { color: #f7f3ea !important; }

/* ---------- 杂项块 ---------- */
.reference-notice { background: #0f0f14 !important; color: #9a9385 !important; border-color: var(--line) !important; }
.demo-strip { background: #14120c !important; color: var(--gold-2) !important; }
hr { border-color: var(--line) !important; }
.muted { color: var(--muted) !important; }
.loading-state { color: #9a9385 !important; }
.skip-link { background: var(--gold) !important; color: #1d1508 !important; }

/* ---------- 覆盖工具类 ---------- */
.bg-white { background-color: var(--surface) !important; }
.bg-slate-50 { background-color: #0f0f14 !important; }
.bg-slate-100 { background-color: #1a1a21 !important; }
.bg-slate-900 { background-color: #050507 !important; }
.bg-\[\#f8fafc\] { background-color: #0b0b0f !important; }
.from-white { --tw-gradient-from: #131318 !important; }
.to-\[\#f8fafc\] { --tw-gradient-to: #0b0b0f !important; }

.text-slate-900, .text-slate-800 { color: #f7f3ea !important; }
.text-slate-700 { color: #ded7c9 !important; }
.text-slate-600 { color: #b8b0a1 !important; }
.text-slate-500 { color: #9a9385 !important; }
.text-slate-400 { color: #7d776c !important; }
.text-ink { color: var(--ink) !important; }
.text-on-surface { color: #f7f3ea !important; }
.text-on-surface-variant { color: #ada596 !important; }
.text-secondary { color: #9a9385 !important; }
.text-primary { color: var(--gold-2) !important; }

.border-outline-variant { border-color: var(--line) !important; }
.border-outline-variant\/60 { border-color: rgba(42, 42, 51, .8) !important; }
.border-slate-100 { border-color: #23232b !important; }
.border-slate-200 { border-color: var(--line) !important; }
.divide-outline-variant > :not([hidden]) ~ :not([hidden]) { border-color: var(--line) !important; }

.bg-primary-container\/40 { background-color: rgba(217, 180, 92, .1) !important; }
.bg-primary-container\/50 { background-color: rgba(217, 180, 92, .14) !important; }
.bg-secondary-container\/40 { background-color: rgba(52, 211, 153, .1) !important; }
.bg-secondary-container\/50 { background-color: rgba(52, 211, 153, .14) !important; }
.bg-outline-variant { background-color: var(--line) !important; }
.bg-indigo-600 { background-color: #a8842f !important; }
.bg-indigo-50 { background-color: rgba(217, 180, 92, .12) !important; }
.text-indigo-600, .text-indigo-700 { color: var(--gold-2) !important; }
.text-emerald-600 { color: #6ee7b7 !important; }
.text-amber-600 { color: var(--gold-2) !important; }
.text-rose-600 { color: #fda4af !important; }
.border-rose-200 { border-color: rgba(244, 63, 94, .35) !important; }
.bg-primary { background-color: var(--gold) !important; color: #1d1508 !important; }
.text-white { color: #fff !important; }

/* 卡片阴影在深色下收一点 */
.shadow-xs, .shadow-sm { box-shadow: 0 1px 2px rgba(0, 0, 0, .55) !important; }
.shadow-\[0_4px_20px_rgba\(0\,0\,0\,0\.03\)\] { box-shadow: 0 4px 20px rgba(0, 0, 0, .55) !important; }
.shadow-\[0_8px_30px_rgba\(0\,0\,0\,0\.04\)\] { box-shadow: 0 8px 30px rgba(0, 0, 0, .6) !important; }

/* ---------- 导航 / 资源卡 ---------- */
.primary-nav a:hover,
.primary-nav a[aria-current],
.primary-nav a.active {
  background: rgba(217, 180, 92, .14) !important;
  color: var(--gold-2) !important;
}
.primary-nav { background: transparent !important; border-color: var(--line) !important; }
@media (max-width: 900px) {
  .primary-nav { background: #0b0b0f !important; border-bottom-color: var(--line) !important; }
}

.resource-card {
  background: var(--surface) !important;
  border-color: var(--line) !important;
}
.resource-card:hover { border-color: var(--gold) !important; }
.resource-card p { color: #ada596 !important; }
.resource-card h2, .resource-card h3 { color: #f7f3ea !important; }
.resource-icon {
  background: rgba(217, 180, 92, .14) !important;
  color: var(--gold-2) !important;
}
.resource-link { color: var(--gold-2) !important; }
.tag { background: #1a1a21 !important; color: #b8b0a1 !important; }

.section-heading h2 { color: #f7f3ea !important; }
.section-heading p { color: var(--muted) !important; }

.home-page section .bg-slate-900,
.home-page .bg-slate-900 { background: #050507 !important; }

/* 列表页筛选 / 提示条 */
.filter {
  background: transparent !important;
  color: #9a9385 !important;
  border-color: transparent !important;
}
.filter:hover { background: #1a1a21 !important; color: #f0eadd !important; }
.filter.active {
  background: rgba(217, 180, 92, .16) !important;
  color: var(--gold-2) !important;
}
.notice {
  background: rgba(217, 180, 92, .07) !important;
  border-color: rgba(217, 180, 92, .22) !important;
  color: #cfc0a0 !important;
}
.results-caption { color: var(--muted) !important; }
.search .material-symbols-outlined { color: #7d776c !important; }
.details-list dt { color: var(--muted) !important; }
.details-list dd { color: #e3ded3 !important; }

/* ---------- 控制台 ---------- */
.console-layout,
.console-main,
.console-workspace,
.console-content-container {
  background: var(--bg) !important;
}
.console-topbar {
  background: rgba(10, 10, 13, .92) !important;
  border-color: var(--line) !important;
}
.console-sidebar { background: #0a0a0d !important; border-color: var(--line) !important; }
.console-sidebar-header, .console-sidebar-footer { border-color: var(--line) !important; }
.console-nav-item { color: #ada596 !important; }
.console-nav-item:hover { background: #1a1a21 !important; color: #f0eadd !important; }
.console-nav-item.active { background: rgba(217, 180, 92, .14) !important; color: var(--gold-2) !important; }
.console-nav-group-title { color: #6f6a60 !important; }
.console-breadcrumb, .console-breadcrumb span.sep { color: #7d776c !important; }
.console-breadcrumb strong { color: #e3ded3 !important; }
.console-topbar-btn { color: #c2baa9 !important; border-color: var(--line) !important; background: #131318 !important; }
.console-topbar-btn:hover { background: #1c1c24 !important; color: #fff !important; }
.console-status-pill { background: rgba(16, 185, 129, .12) !important; color: #6ee7b7 !important; }
.console-user-pill, .console-topbar-user { color: #c2baa9 !important; }
.console-user-avatar { background: #1a1a21 !important; color: var(--gold-2) !important; }
.stat, .stat-grid > * { background: var(--surface) !important; border-color: var(--line) !important; }
.stat p { color: var(--muted) !important; }
.stat strong { color: #f7f3ea !important; }
.empty-state { color: var(--muted) !important; }

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #0b0b0f; }
::-webkit-scrollbar-thumb { background: #2a2a33; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #3d3a32; }

/* ---------- 修：这些容器原本是浅色渐变，会露出白边 ---------- */
.page-heading,
.page-banner-section,
.home-hero-banner {
  background: linear-gradient(180deg, #0b0b0f 0%, #08080b 100%) !important;
}
.quick-template-card {
  background: linear-gradient(135deg, #1a1710, #131318) !important;
  border-color: var(--line) !important;
}
.dashboard-task-card.highlight-warning {
  background: linear-gradient(180deg, rgba(217, 180, 92, .12), var(--surface)) !important;
}
.dashboard-task-card.highlight-info {
  background: linear-gradient(180deg, rgba(217, 180, 92, .07), var(--surface)) !important;
}
.dashboard-task-card.highlight-danger {
  background: linear-gradient(180deg, rgba(244, 63, 94, .1), var(--surface)) !important;
}

/* 页头标志放大，整图才看得清 */
.site-header .brand-mark,
.footer-grid .brand-mark { width: 46px !important; height: 46px !important; }
@media (max-width: 900px) {
  .site-header .brand-mark { width: 40px !important; height: 40px !important; }
}
