/* 崇序智观 · 品牌样式覆盖（经前置代理注入） */

/* ============ 登录 / 注册页：品牌渐变背景 + 卡片化 ============ */
body.cx-login div.grid.h-svh {
  background:
    radial-gradient(1100px 560px at 18% -6%, rgba(79,124,255,.10) 0%, transparent 58%),
    radial-gradient(900px 520px at 92% 108%, rgba(155,92,255,.10) 0%, transparent 55%),
    #f7f8fb;
}
body.cx-login div.grid.h-svh > .container > div {
  border-radius: 20px;
  background: rgba(255,255,255,.9);
  box-shadow: 0 18px 60px rgba(63,81,181,.12);
  border: 1px solid rgba(79,124,255,.12);
  backdrop-filter: blur(8px);
}
html.dark body.cx-login div.grid.h-svh {
  background:
    radial-gradient(1100px 560px at 18% -6%, rgba(79,124,255,.14) 0%, transparent 58%),
    radial-gradient(900px 520px at 92% 108%, rgba(155,92,255,.14) 0%, transparent 55%),
    #0d1017;
}
html.dark body.cx-login div.grid.h-svh > .container > div {
  background: rgba(20,24,33,.9);
  box-shadow: 0 18px 60px rgba(0,0,0,.45);
  border: 1px solid rgba(120,140,255,.15);
}

/* 控制台侧栏底部的小字品牌区保持干净 */
div.grid.flex-1.text-start > span.truncate.text-xs { display: none !important; }

/* ============ 落地页（body.cx-home）：白底强对比设计 ============ */

/* 整页干净白底，光晕只作点缀 */
body.cx-home { background: #fff !important; }
body.cx-home section.relative.z-10.overflow-hidden {
  background:
    radial-gradient(900px 480px at 12% -10%, rgba(47,107,255,.10) 0%, transparent 52%),
    radial-gradient(760px 420px at 90% -4%, rgba(139,61,255,.08) 0%, transparent 48%),
    radial-gradient(620px 320px at 50% 115%, rgba(56,189,248,.06) 0%, transparent 60%);
}
html.dark body.cx-home section.relative.z-10.overflow-hidden {
  background:
    radial-gradient(900px 480px at 12% -10%, rgba(79,124,255,.16) 0%, transparent 52%),
    radial-gradient(760px 420px at 90% -4%, rgba(155,92,255,.13) 0%, transparent 50%),
    radial-gradient(620px 320px at 50% 115%, rgba(56,189,248,.08) 0%, transparent 60%);
}

/* 大标题：近黑 + 重点词高饱和渐变 */
body.cx-home h1 { color: #10131a !important; letter-spacing: -.015em; }
body.cx-home h1 span[class*="from-blue-400"],
body.cx-home h1 span[class*="bg-gradient"] {
  background-image: linear-gradient(115deg, #2f6bff 5%, #7b3bff 60%, #b13bff 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
}
body.cx-home h2 { color: #10131a !important; font-weight: 800 !important; letter-spacing: -.01em; }
body.cx-home section span[class*="from-blue-400"] {
  background-image: linear-gradient(115deg, #2f6bff 5%, #7b3bff 60%, #b13bff 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
}

/* 顶部导航：字色加深 + 白底毛玻璃 */
body.cx-home nav a { color: #3a3f47 !important; font-weight: 500; }
body.cx-home nav a:hover { color: #14171d !important; }
body.cx-home header, body.cx-home header > div {
  background: rgba(255,255,255,.86) !important;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(20,30,60,.06);
}
html.dark body.cx-home header, html.dark body.cx-home header > div {
  background: rgba(16,19,26,.82) !important;
  border-bottom: 1px solid rgba(120,140,255,.10);
}

/* 徽章：实底胶囊 */
body.cx-home div.landing-animate-fade-up.mb-5.inline-flex {
  background: rgba(47,107,255,.10) !important;
  border: 1.5px solid rgba(47,107,255,.30) !important;
  color: #2a55d4 !important;
  border-radius: 999px !important;
  padding: 7px 18px !important;
  font-weight: 600 !important;
  font-size: 12.5px !important;
}
html.dark body.cx-home div.landing-animate-fade-up.mb-5.inline-flex {
  background: rgba(79,124,255,.16) !important;
  color: #9db4ff !important;
}

/* 统计条：实白卡 + 强边框 + 数字高饱和渐变 */
body.cx-home div.grid.grid-cols-2.gap-8 {
  max-width: 72rem;
  margin: 0 auto;
  background: #fff !important;
  border: 1.5px solid #e6eaf2 !important;
  border-radius: 22px !important;
  box-shadow: 0 18px 50px rgba(30,50,110,.10) !important;
  padding: 2.4rem 2.5rem !important;
  backdrop-filter: none !important;
}
html.dark body.cx-home div.grid.grid-cols-2.gap-8 {
  background: rgba(21,25,34,.92) !important;
  border-color: rgba(120,140,255,.18) !important;
  box-shadow: 0 18px 50px rgba(0,0,0,.45) !important;
}
body.cx-home span.tabular-nums {
  background: linear-gradient(120deg, #2456e8 5%, #8b3dff 95%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  font-size: 2.1rem !important;
  font-weight: 800 !important;
}

/* 特性卡区：白卡 + 清晰边框 + hover 抬升 */
body.cx-home div[class*="md:grid-cols-3"].grid.gap-px {
  border-radius: 18px !important;
  box-shadow: 0 18px 50px rgba(30,50,110,.10) !important;
  border: 1.5px solid #e6eaf2 !important;
  overflow: hidden;
  background: #fff;
}
html.dark body.cx-home div[class*="md:grid-cols-3"].grid.gap-px {
  box-shadow: 0 18px 50px rgba(0,0,0,.45) !important;
  border-color: rgba(120,140,255,.16) !important;
  background: rgba(21,25,34,.92);
}
body.cx-home div[class*="md:grid-cols-3"].grid.gap-px > div[class*="bg-background"] {
  background: #fff !important;
  transition: transform .25s ease, box-shadow .25s ease;
}
html.dark body.cx-home div[class*="md:grid-cols-3"].grid.gap-px > div[class*="bg-background"] {
  background: rgba(21,25,34,.92) !important;
}
body.cx-home div[class*="md:grid-cols-3"].grid.gap-px > div[class*="bg-background"]:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(47,107,255,.14);
}

/* 卡片编号：渐变白字徽章 */
body.cx-home div[class*="md:grid-cols-3"] span[class*="rounded"] {
  background: linear-gradient(120deg, #2f6bff, #8b3dff) !important;
  color: #fff !important;
  font-weight: 700 !important;
}

/* hero 右侧代码演示卡：加强层次 */
body.cx-home section.relative.z-10.overflow-hidden .overflow-hidden.rounded-xl,
body.cx-home section.relative.z-10.overflow-hidden .rounded-lg.border {
  box-shadow: 0 24px 64px rgba(30,50,110,.16) !important;
  border: 1.5px solid #e6eaf2 !important;
}

/* 页脚版权条 */
body.cx-home footer .bg-muted\/20 {
  background: rgba(255,255,255,.85) !important;
  border: 1.5px solid #e6eaf2 !important;
}
html.dark body.cx-home footer .bg-muted\/20 {
  background: rgba(21,25,34,.85) !important;
  border-color: rgba(120,140,255,.14) !important;
}

/* ============ 管理后台换肤层（shadcn token 全局统一为品牌色系） ============ */

/* 浅色 token */
html:root {
  --primary: #2f5bff;
  --primary-foreground: #ffffff;
  --ring: #2f5bff;
  --sidebar-primary: #2f5bff;
  --sidebar-ring: #2f5bff;
  --accent: color-mix(in srgb, #2f5bff 10%, white);
  --sidebar-accent: color-mix(in srgb, #2f5bff 10%, white);
  --border: #e6eaf2;
  --chart-1: #2f6bff;
  --chart-2: #7b3bff;
  --chart-3: #0ea5e9;
  --chart-4: #b13bff;
  --chart-5: #14b8a6;
}
/* 深色 token */
html.dark {
  --primary: #6b8dff;
  --primary-foreground: #0d1117;
  --ring: #6b8dff;
  --sidebar-primary: #6b8dff;
  --sidebar-ring: #6b8dff;
  --accent: color-mix(in srgb, #6b8dff 20%, #161a22);
  --sidebar-accent: color-mix(in srgb, #6b8dff 20%, #161a22);
  --border: #262c3a;
  --chart-1: #6b8dff;
  --chart-2: #a37bff;
  --chart-3: #38bdf8;
  --chart-4: #d18bff;
  --chart-5: #2dd4bf;
}

/* 顶栏：毛玻璃 + 发丝分隔线 */
header.sticky {
  background: color-mix(in srgb, var(--background, #fff) 78%, transparent) !important;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--border, #e6eaf2) 70%, transparent);
}

/* 侧栏：激活项品牌渐变胶囊，其余项柔和 hover */
[data-slot="sidebar-menu-button"][data-active] {
  background: linear-gradient(115deg, #2f6bff 0%, #7b3bff 100%) !important;
  color: #fff !important;
  box-shadow: 0 6px 16px rgba(47,91,255,.30);
  font-weight: 600;
}
[data-slot="sidebar-menu-button"]:hover {
  background: color-mix(in srgb, #2f5bff 8%, transparent);
}
html.dark [data-slot="sidebar-menu-button"]:not([data-active]):hover {
  background: color-mix(in srgb, #6b8dff 14%, transparent);
}

/* 余额面板：品牌渐变卡 + 白字（概览页右侧余额栏） */
.bg-card .grid > div:has(a[href="/wallet"]) {
  background: linear-gradient(135deg, #2f6bff 0%, #7b3bff 78%, #b13bff 100%) !important;
  border: none !important;
  border-radius: 14px !important;
  color: #fff !important;
  box-shadow: 0 12px 30px rgba(47,91,255,.28);
}
.bg-card .grid > div:has(a[href="/wallet"]) p,
.bg-card .grid > div:has(a[href="/wallet"]) span,
.bg-card .grid > div:has(a[href="/wallet"]) .text-muted-foreground {
  color: rgba(255,255,255,.82) !important;
}
.bg-card .grid > div:has(a[href="/wallet"]) [class*="text-3xl"],
.bg-card .grid > div:has(a[href="/wallet"]) .font-semibold {
  color: #fff !important;
}

/* 钱包按钮：半透明白底浮在渐变卡上 */
a[data-slot="button"][href="/wallet"] {
  background: rgba(255,255,255,.18) !important;
  color: #fff !important;
  border: 1px solid rgba(255,255,255,.34) !important;
  backdrop-filter: blur(4px);
}
a[data-slot="button"][href="/wallet"]:hover {
  background: rgba(255,255,255,.28) !important;
}

/* 主卡片：层次更清晰 + hover 微抬升 */
.bg-card.rounded-2xl,
.rounded-2xl.border.bg-card {
  transition: box-shadow .25s var(--ease-standard, ease), transform .25s var(--ease-standard, ease);
}
.bg-card.rounded-2xl:hover,
.rounded-2xl.border.bg-card:hover {
  box-shadow: 0 10px 32px rgba(30, 50, 110, .10);
}
html.dark .bg-card.rounded-2xl:hover,
html.dark .rounded-2xl.border.bg-card:hover {
  box-shadow: 0 10px 32px rgba(0, 0, 0, .40);
}

/* 数字排版：等宽 + 紧字距（金额、统计） */
.bg-card .tabular-nums { letter-spacing: -.01em; }

/* 滚动条统一成品牌细条 */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--primary, #2f5bff) 26%, transparent);
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover {
  background: color-mix(in srgb, var(--primary, #2f5bff) 45%, transparent);
  background-clip: content-box;
}
