/* ==========================================================================
   TickerAI Web — AgentFlow 模板移植设计系统（零外部依赖，include_str! 编译进二进制）
   设计令牌移植自 reference/agentflow/src/index.css（HSL 变量，亮色/暗色）
   ========================================================================== */

/* ---------- 设计令牌 ---------- */
:root {
  --background: 210 20% 98%;
  --foreground: 220 40% 8%;
  --card: 0 0% 100%;
  --card-foreground: 220 40% 8%;
  --popover: 0 0% 100%;
  --popover-foreground: 220 40% 8%;
  --primary: 347 77% 50%;
  --primary-foreground: 0 0% 100%;
  --secondary: 210 20% 95%;
  --secondary-foreground: 220 40% 8%;
  --muted: 210 20% 95%;
  --muted-foreground: 215 16% 47%;
  --accent: 356 100% 97%;
  --accent-foreground: 347 77% 40%;
  --destructive: 347 77% 50%;
  --destructive-foreground: 0 0% 100%;
  --border: 214 25% 91%;
  --input: 214 25% 91%;
  --ring: 347 77% 50%;
  --radius: 1rem;

  --success: 160 84% 39%;
  --success-foreground: 0 0% 100%;
  --warning: 32 95% 44%;
  --warning-foreground: 0 0% 100%;
  --info: 217 91% 48%;
  --info-foreground: 0 0% 100%;

  --chart-1: 347 77% 50%;
  --chart-2: 210 20% 70%;
  --chart-3: 160 84% 39%;
  --chart-4: 32 95% 44%;
  --chart-5: 280 50% 50%;

  --sidebar-background: 0 0% 100%;
  --sidebar-foreground: 220 40% 8%;
  --sidebar-primary: 347 77% 50%;
  --sidebar-primary-foreground: 0 0% 100%;
  --sidebar-accent: 356 100% 97%;
  --sidebar-accent-foreground: 347 77% 40%;
  --sidebar-border: 214 25% 91%;
  --sidebar-ring: 347 77% 50%;
}

.dark {
  --background: 220 25% 6%;
  --foreground: 210 20% 95%;
  --card: 220 25% 9%;
  --card-foreground: 210 20% 95%;
  --popover: 220 25% 9%;
  --popover-foreground: 210 20% 95%;
  --primary: 347 77% 55%;
  --primary-foreground: 0 0% 100%;
  --secondary: 220 20% 14%;
  --secondary-foreground: 210 20% 95%;
  --muted: 220 20% 14%;
  --muted-foreground: 215 16% 57%;
  --accent: 347 40% 12%;
  --accent-foreground: 347 77% 70%;
  --destructive: 347 77% 45%;
  --destructive-foreground: 0 0% 100%;
  --border: 220 20% 16%;
  --input: 220 20% 16%;
  --ring: 347 77% 55%;

  --success: 160 84% 42%;
  --success-foreground: 0 0% 100%;
  --warning: 32 95% 50%;
  --warning-foreground: 0 0% 100%;
  --info: 217 91% 62%;
  --info-foreground: 0 0% 100%;

  --chart-1: 347 77% 55%;
  --chart-2: 210 20% 50%;
  --chart-3: 160 84% 45%;
  --chart-4: 32 95% 50%;
  --chart-5: 280 50% 55%;

  --sidebar-background: 220 25% 8%;
  --sidebar-foreground: 210 20% 90%;
  --sidebar-primary: 347 77% 55%;
  --sidebar-primary-foreground: 0 0% 100%;
  --sidebar-accent: 347 40% 12%;
  --sidebar-accent-foreground: 347 77% 70%;
  --sidebar-border: 220 20% 16%;
  --sidebar-ring: 347 77% 55%;
}

/* ---------- 基础 ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 700;
  color: hsl(var(--foreground));
  letter-spacing: -0.025em;
  line-height: 1.2;
}

a { color: inherit; text-decoration: none; }
img, svg { vertical-align: middle; }
button { font-family: inherit; cursor: pointer; }

/* ---------- 工具类：布局 ---------- */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.flex-col { flex-direction: column; }
.flex-1 { flex: 1 1 0%; }
.flex-wrap { flex-wrap: wrap; }
.shrink-0 { flex-shrink: 0; }
.min-w-0 { min-width: 0; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: 0.25rem; } .gap-1\.5 { gap: 0.375rem; }
.gap-2 { gap: 0.5rem; } .gap-2\.5 { gap: 0.625rem; }
.gap-3 { gap: 0.75rem; } .gap-4 { gap: 1rem; }
.gap-5 { gap: 1.25rem; } .gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; } .gap-10 { gap: 2.5rem; }

.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }

.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-5 > * + * { margin-top: 1.25rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.space-y-8 > * + * { margin-top: 2rem; }

.w-full { width: 100%; }
.h-full { height: 100%; }
.min-h-screen { min-height: 100vh; }
.max-w-md { max-width: 28rem; }
.max-w-lg { max-width: 32rem; }
.max-w-xl { max-width: 36rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-5xl { max-width: 64rem; }
.max-w-6xl { max-width: 72rem; }
.max-w-7xl { max-width: 80rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mt-1 { margin-top: 0.25rem; } .mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; } .mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; } .mt-8 { margin-top: 2rem; }
.mt-10 { margin-top: 2.5rem; } .mt-12 { margin-top: 3rem; }
.mt-16 { margin-top: 4rem; }
.mb-2 { margin-bottom: 0.5rem; } .mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; } .mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; } .mb-10 { margin-bottom: 2.5rem; }
.mb-12 { margin-bottom: 3rem; }
.mr-1 { margin-right: 0.25rem; } .mr-2 { margin-right: 0.5rem; }
.ml-2 { margin-left: 0.5rem; } .ml-auto { margin-left: auto; }
.p-0 { padding: 0; } .p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; } .p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; } .p-8 { padding: 2rem; }
.p-10 { padding: 2.5rem; } .p-12 { padding: 3rem; }
.px-0 { padding-left: 0; padding-right: 0; }
.px-1 { padding-left: 0.25rem; padding-right: 0.25rem; }
.px-1\.5 { padding-left: 0.375rem; padding-right: 0.375rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-2\.5 { padding-left: 0.625rem; padding-right: 0.625rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.px-12 { padding-left: 3rem; padding-right: 3rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-1\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-10 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }
.pt-0 { padding-top: 0; } .pt-2 { padding-top: 0.5rem; }
.pt-4 { padding-top: 1rem; } .pt-6 { padding-top: 1.5rem; }
.pt-8 { padding-top: 2rem; } .pt-12 { padding-top: 3rem; }
.pb-2 { padding-bottom: 0.5rem; } .pb-4 { padding-bottom: 1rem; }
.pb-6 { padding-bottom: 1.5rem; } .pb-8 { padding-bottom: 2rem; }
.pb-12 { padding-bottom: 3rem; } .pb-16 { padding-bottom: 4rem; }
.pb-20 { padding-bottom: 5rem; } .pb-24 { padding-bottom: 6rem; }
.pl-4 { padding-left: 1rem; } .pl-10 { padding-left: 2.5rem; }
.pr-4 { padding-right: 1rem; } .pr-10 { padding-right: 2.5rem; }

/* ---------- 工具类：文本 ---------- */
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.text-5xl { font-size: 3rem; line-height: 1; }
.text-6xl { font-size: 3.75rem; line-height: 1; }
.text-7xl { font-size: 4.5rem; line-height: 1; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.tracking-tight { letter-spacing: -0.025em; }
.text-balance { text-wrap: balance; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.leading-tight { line-height: 1.25; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.whitespace-nowrap { white-space: nowrap; }

/* ---------- 工具类：颜色 ---------- */
.text-foreground { color: hsl(var(--foreground)); }
.text-muted-foreground { color: hsl(var(--muted-foreground)); }
.text-primary { color: hsl(var(--primary)); }
.text-accent-foreground { color: hsl(var(--accent-foreground)); }
.text-success { color: hsl(var(--success)); }
.text-warning { color: hsl(var(--warning)); }
.text-destructive { color: hsl(var(--destructive)); }
.text-card-foreground { color: hsl(var(--card-foreground)); }
.text-white { color: #fff; }

/* spec/0127：活跃页列表「名称」列——已订阅产品名称为跳转订阅页的链接 */
.active-name-link { color: hsl(var(--primary)); font-weight: 500; }
.active-name-link:hover { text-decoration: underline; }
.text-white\/50 { color: rgba(255, 255, 255, 0.5); }
.text-white\/70 { color: rgba(255, 255, 255, 0.7); }
.text-white\/40 { color: rgba(255, 255, 255, 0.4); }

.bg-background { background: hsl(var(--background)); }
.bg-card { background: hsl(var(--card)); }
.bg-popover { background: hsl(var(--popover)); }
.bg-primary { background: hsl(var(--primary)); }
.bg-secondary { background: hsl(var(--secondary)); }
.bg-muted { background: hsl(var(--muted)); }
.bg-accent { background: hsl(var(--accent)); }
.bg-success { background: hsl(var(--success)); }
.bg-warning { background: hsl(var(--warning)); }
.bg-destructive { background: hsl(var(--destructive)); }
.bg-border { background: hsl(var(--border)); }
.bg-sidebar { background: hsl(var(--sidebar-background)); }
.bg-white\/10 { background: rgba(255, 255, 255, 0.1); }
.bg-white\/5 { background: rgba(255, 255, 255, 0.05); }
.bg-primary\/5 { background: hsl(var(--primary) / 0.05); }
.bg-primary\/10 { background: hsl(var(--primary) / 0.1); }
.bg-primary\/20 { background: hsl(var(--primary) / 0.2); }

/* ---------- 工具类：边框/圆角/阴影 ---------- */
.border { border: 1px solid hsl(var(--border)); }
.border-b { border-bottom: 1px solid hsl(var(--border)); }
.border-t { border-top: 1px solid hsl(var(--border)); }
.border-r { border-right: 1px solid hsl(var(--border)); }
.border-border { border-color: hsl(var(--border)); }
.border-input { border-color: hsl(var(--input)); }
.border-primary { border-color: hsl(var(--primary)); }
.border-white\/5 { border-color: rgba(255, 255, 255, 0.05); }
.border-white\/10 { border-color: rgba(255, 255, 255, 0.1); }
.rounded-sm { border-radius: calc(var(--radius) - 4px); }
.rounded-md { border-radius: calc(var(--radius) - 2px); }
.rounded-lg { border-radius: var(--radius); }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }
.rounded { border-radius: 0.375rem; }
.shadow-sm { box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); }
.shadow-md { box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); }
.shadow-xl { box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1); }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25); }
.shadow-primary\/25 { box-shadow: 0 10px 15px -3px hsl(var(--primary) / 0.25); }

/* ---------- 工具类：定位/显示 ---------- */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }
.top-0 { top: 0; }
.top-1 { top: 0.25rem; }
.top-20 { top: 5rem; }
.right-0 { right: 0; }
.right-1 { right: 0.25rem; }
.right-6 { right: 1.5rem; }
.bottom-6 { bottom: 1.5rem; }
.left-0 { left: 0; }
.left-1\/4 { left: 25%; }
.left-10 { left: 2.5rem; }
.left-1\/2 { left: 50%; }
.right-1\/4 { right: 25%; }
.right-10 { right: 2.5rem; }
.bottom-32 { bottom: 8rem; }
.-z-10 { z-index: -10; }
.z-10 { z-index: 10; }
.z-30 { z-index: 30; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }
.hidden { display: none; }
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }
.overflow-auto { overflow: auto; }
.object-cover { object-fit: cover; }

/* ---------- 响应式辅助（最小实现） ---------- */
@media (max-width: 1023px) { .lg-only { display: none !important; } }
@media (min-width: 1024px) { .lg-flex { display: flex; } .lg-block { display: block; } .lg-hidden { display: none; } }
@media (max-width: 767px) { .md-only { display: none !important; } }
@media (min-width: 768px) { .md-flex { display: flex; } .md-block { display: block; } .md-hidden { display: none; } }
@media (min-width: 640px) { .sm-flex { display: flex; } .sm-hidden { display: none; } }
@media (max-width: 639px) { .sm-only { display: none !important; } }
@media (min-width: 768px) { .md-grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .md-grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .md-grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .lg-grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .lg-grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .lg-grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 767px) { .grid-cols-3, .grid-cols-4, .grid-cols-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 479px) { .grid-cols-2, .grid-cols-3, .grid-cols-4, .grid-cols-5 { grid-template-columns: 1fr; } }

/* ---------- 组件：按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
  border-radius: calc(var(--radius) - 2px);
  font-size: 0.875rem;
  font-weight: 500;
  height: 2.5rem;
  padding: 0 1rem;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
}
.btn:disabled { opacity: 0.5; pointer-events: none; }
.btn svg { width: 1rem; height: 1rem; flex-shrink: 0; }

.btn-primary { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }
.btn-primary:hover { background: hsl(var(--primary) / 0.9); }
.btn-outline { background: hsl(var(--background)); border-color: hsl(var(--input)); color: hsl(var(--foreground)); }
.btn-outline:hover { background: hsl(var(--accent)); color: hsl(var(--accent-foreground)); }
.btn-ghost { background: transparent; color: hsl(var(--foreground)); }
.btn-ghost:hover { background: hsl(var(--accent)); color: hsl(var(--accent-foreground)); }
.btn-secondary { background: hsl(var(--secondary)); color: hsl(var(--secondary-foreground)); }
.btn-secondary:hover { background: hsl(var(--secondary) / 0.8); }
.btn-hero { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); font-weight: 600; box-shadow: 0 10px 15px -3px hsl(var(--primary) / 0.2); }
.btn-hero:hover { background: hsl(var(--primary) / 0.9); }
.btn-hero-outline { background: hsl(var(--card)); border: 2px solid hsl(var(--border)); color: hsl(var(--foreground)); font-weight: 600; }
.btn-hero-outline:hover { background: hsl(var(--secondary)); }
.btn-success { background: hsl(var(--success)); color: hsl(var(--success-foreground)); }
.btn-success:hover { background: hsl(var(--success) / 0.9); }

.btn-sm { height: 2.25rem; padding: 0 0.75rem; border-radius: calc(var(--radius) - 2px); }
.btn-lg { height: 2.75rem; padding: 0 2rem; border-radius: calc(var(--radius) - 2px); }
.btn-icon { height: 2.5rem; width: 2.5rem; padding: 0; }
.btn-block { width: 100%; }
.btn-h-11 { height: 2.75rem; }
.btn-h-12 { height: 3rem; padding: 0 2rem; font-size: 1rem; }
.btn-h-8 { height: 2rem; }
.btn-text-xs { font-size: 0.75rem; }
.btn-gap-1\.5 { gap: 0.375rem; }

/* ---------- 组件：卡片 ---------- */
.card {
  border-radius: var(--radius);
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
  color: hsl(var(--card-foreground));
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}
.card-header { display: flex; flex-direction: column; gap: 0.375rem; padding: 1.5rem; padding-bottom: 0; }
.card-title { font-size: 1.5rem; font-weight: 600; line-height: 1.2; }
.card-desc { font-size: 0.875rem; color: hsl(var(--muted-foreground)); }
.card-content { padding: 1.5rem; }
.card-content-pt-0 { padding-top: 0; }
.card-footer { display: flex; align-items: center; padding: 1.5rem; padding-top: 0; }
.card-hover:hover { box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.08); }

/* ---------- 组件：徽章 ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  border: 1px solid transparent;
  padding: 0.125rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}
.badge-primary { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }
.badge-secondary { background: hsl(var(--secondary)); color: hsl(var(--secondary-foreground)); }
.badge-outline { border-color: hsl(var(--border)); color: hsl(var(--foreground)); }
.badge-success { background: hsl(var(--success)); color: hsl(var(--success-foreground)); }
.badge-warning { background: hsl(var(--warning)); color: hsl(var(--warning-foreground)); }
.badge-destructive { background: hsl(var(--destructive)); color: hsl(var(--destructive-foreground)); }
.badge-soft-success { background: hsl(var(--success) / 0.12); color: hsl(var(--success)); }
.badge-soft-warning { background: hsl(var(--warning) / 0.12); color: hsl(var(--warning)); }
.badge-soft-error { background: hsl(var(--destructive) / 0.12); color: hsl(var(--destructive)); }
.badge-soft-muted { background: hsl(var(--muted)); color: hsl(var(--muted-foreground)); }

/* up/down 方向徽标统一等宽（以 4 字母 down 宽度为准，文字居中） */
.dir-badge { min-width: 3.5rem; justify-content: center; }

/* ---------- 组件：表单 ---------- */
.label { display: block; font-size: 0.875rem; font-weight: 500; color: hsl(var(--foreground)); margin-bottom: 0.375rem; }
.input {
  display: flex;
  width: 100%;
  height: 2.5rem;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid hsl(var(--input));
  background: hsl(var(--background));
  padding: 0 0.75rem;
  font-size: 0.875rem;
  color: hsl(var(--foreground));
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input::placeholder { color: hsl(var(--muted-foreground)); }
.input:focus { outline: none; box-shadow: 0 0 0 2px hsl(var(--background)), 0 0 0 4px hsl(var(--ring)); }
.input-h-11 { height: 2.75rem; }
.input-pl-10 { padding-left: 2.5rem; }
.input-pl-9 { padding-left: 2.25rem; }
.input-pr-10 { padding-right: 2.5rem; }
.input-wrap { position: relative; }
.input-icon {
  position: absolute;
  left: 0.75rem; top: 50%;
  transform: translateY(-50%);
  display: flex; align-items: center; justify-content: center;
  width: 1rem; height: 1rem;
  line-height: 0;
  color: hsl(var(--muted-foreground));
  pointer-events: none;
}
.input-icon svg { display: block; }
.input-icon-right {
  position: absolute;
  right: 0.875rem; top: 50%;
  transform: translateY(-50%);
  display: flex; align-items: center; justify-content: center;
  width: 1rem; height: 1rem;
  line-height: 0;
  color: hsl(var(--muted-foreground));
}
.input-icon-right svg { display: block; }
.form-row { display: flex; align-items: center; gap: 0.5rem; }
.checkbox {
  width: 1rem; height: 1rem;
  border-radius: 0.25rem;
  border: 1px solid hsl(var(--input));
  background: hsl(var(--background));
  accent-color: hsl(var(--primary));
  cursor: pointer;
}
.divider { height: 1px; background: hsl(var(--border)); }

/* ---------- 组件：导航 ---------- */
.navbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.5rem;
  height: 4rem;
  padding: 0 1rem;
  border-bottom: 1px solid hsl(var(--border));
  background: hsl(var(--card) / 0.8);
  backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 50;
}
@media (min-width: 1024px) { .navbar { padding: 0 3rem; } }
.nav-link { font-size: 0.875rem; color: hsl(var(--muted-foreground)); transition: color 0.15s ease; }
.nav-link:hover { color: hsl(var(--foreground)); }
/* 导航栏登录用户身份入口（spec/0173 追加：已登录时替代「注册 / 登录」按钮，避免误以为没登录） */
.nav-user {
  display: inline-flex; align-items: center; gap: 0.5rem;
  max-width: 12rem; min-width: 0; overflow: hidden;
  padding: 0.25rem 0.625rem 0.25rem 0.25rem;
  border: 1px solid hsl(var(--border));
  border-radius: 9999px;
  background: hsl(var(--card));
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
/* 窄屏下导航栏右侧允许收缩：否则按钮会被挤出视口，表现为「头像露出来、昵称被裁掉」 */
.navbar > div:last-child { min-width: 0; flex-shrink: 1; }
/* 窄屏：把宽度让给「头像 + 昵称」——
   ① 品牌只留 logo 图标；② 收紧导航栏内边距与间距；③ 胶囊与昵称给一个最小宽度，
   避免昵称被挤成 1~2px（表现为「只看到头像、看不到昵称」）。 */
@media (max-width: 560px) {
  .navbar { padding: 0 0.75rem; gap: 0.5rem; }
  .brand-name { display: none; }
  .nav-user { max-width: 9.5rem; }
  .nav-user-name { min-width: 4.5rem; }
}
.nav-user:hover { border-color: hsl(var(--primary) / 0.45); background: hsl(var(--primary) / 0.06); }
.nav-user-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.5rem; height: 1.5rem; flex-shrink: 0;
  border-radius: 9999px;
  font-size: 0.75rem; font-weight: 700;
  color: hsl(var(--primary-foreground));
  background: hsl(var(--primary));
}
img.nav-user-avatar { object-fit: cover; background: hsl(var(--muted)); }
.nav-user-name { font-size: 0.8125rem; font-weight: 600; color: hsl(var(--foreground)); }
/* 身份胶囊的下拉菜单（「用户信息」/「安全退出」）：贴右对齐、窄屏也放得下 */
.nav-user-dd > .nav-user { cursor: pointer; }
.nav-user-dd .nav-user > svg { width: 0.875rem; height: 0.875rem; color: hsl(var(--muted-foreground)); flex-shrink: 0; }
.nav-user-menu { min-width: 9.5rem; }

/* 「我的信息」弹框（spec/0173 追加：点头像弹出，不跳转工作台） */
.user-card-overlay {
  position: fixed; inset: 0; z-index: 60;
  display: none; align-items: center; justify-content: center;
  padding: 1rem;
  background: hsl(var(--foreground) / 0.45);
  backdrop-filter: blur(2px);
}
.user-card-overlay.is-open { display: flex; }
.user-card {
  width: min(22rem, 100%);
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  background: hsl(var(--card));
  box-shadow: 0 24px 60px -24px hsl(var(--foreground) / 0.45);
  overflow: hidden;
}
.user-card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid hsl(var(--border));
}
.user-card-title { font-size: 0.875rem; font-weight: 700; color: hsl(var(--foreground)); }
.user-card-body { padding: 1rem; }
.user-card-avatar-wrap { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.user-card-avatar {
  display: flex; align-items: center; justify-content: center;
  width: 3rem; height: 3rem; flex-shrink: 0;
  border-radius: 9999px;
  font-size: 1.125rem; font-weight: 700;
  color: hsl(var(--primary-foreground));
  background: hsl(var(--primary));
}
img.user-card-avatar { object-fit: cover; background: hsl(var(--muted)); }
.user-card-name { font-size: 0.9375rem; font-weight: 700; color: hsl(var(--foreground)); }
.user-card-email { font-size: 0.75rem; color: hsl(var(--muted-foreground)); }
.user-card-rows { margin-top: 1rem; display: flex; flex-direction: column; gap: 0.5rem; }
.user-card-row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.user-card-row dt { font-size: 0.75rem; color: hsl(var(--muted-foreground)); }
.user-card-row dd { font-size: 0.8125rem; color: hsl(var(--foreground)); font-variant-numeric: tabular-nums; }
.user-card-badge {
  font-size: 0.6875rem; font-weight: 700;
  padding: 0.0625rem 0.375rem; border-radius: 0.375rem;
  color: hsl(var(--primary)); background: hsl(var(--primary) / 0.1);
  border: 1px solid hsl(var(--primary) / 0.18);
}
.user-card-foot {
  display: flex; align-items: center; justify-content: flex-end; gap: 0.5rem;
  margin-top: 1.125rem; padding-top: 0.875rem;
  border-top: 1px solid hsl(var(--border));
}
.brand { display: flex; align-items: center; gap: 0.625rem; min-width: 0; }
.brand-mark {
  display: flex; align-items: center; justify-content: center;
  width: 2rem; height: 2rem; border-radius: 0.5rem;
  background: hsl(var(--primary)); color: hsl(var(--primary-foreground));
  flex-shrink: 0;
  overflow: hidden; /* spec/0181：新 logo 是整块方形，圆角由外层裁切，尺寸保持 2rem 不变 */
}
/* spec/0181：新 logo（内联 SVG）铺满 .brand-mark，显示尺寸与替换前一致 */
.brand-mark > .brand-mark-svg { display: block; width: 100%; height: 100%; }
.brand-mark-lg { width: 2.5rem; height: 2.5rem; border-radius: 0.75rem; }
.brand-name { font-weight: 700; font-size: 1.125rem; }
.brand-name-white { color: #fff; }
/* 认证页（登录 / 注册）品牌面板 Logo：spec/0181 追加 —— logo 已改为站点主色（红），
   在同样是红色的品牌面板上辨识度低，故**只在认证页**给 logo 加一圈白色边框。
   全局是 border-box，所以外框尺寸不变（40px），只是内层图形缩到 36px。 */
.brand-mark-on-primary { border: 2px solid #fff; }

/* OTP 验证码输入（spec/8，参考 TwoFactor.tsx） */
.otp-group { display: flex; justify-content: center; gap: 0.5rem; }
.otp-slot {
  width: 3rem;
  height: 3rem;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid hsl(var(--input));
  background: hsl(var(--background));
  text-align: center;
  font-size: 1.125rem;
  font-weight: 600;
  color: hsl(var(--foreground));
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.otp-slot:focus { outline: none; border-color: hsl(var(--ring)); box-shadow: 0 0 0 2px hsl(var(--ring) / 0.25); }
.otp-shield {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  border-radius: 1rem;
  background: hsl(var(--primary) / 0.1);
  color: hsl(var(--primary));
  margin: 0 auto 1.5rem;
}
.otp-shield svg { width: 2rem; height: 2rem; }

/* ---------- 组件：Hero ---------- */
.hero-section { position: relative; padding: 3rem 1rem 4rem; overflow: hidden; }
@media (min-width: 640px) { .hero-section { padding: 5rem 1.5rem 6rem; } }
@media (min-width: 1024px) { .hero-section { padding: 5rem 3rem 6rem; } }
.hero-glow { position: absolute; border-radius: 9999px; filter: blur(48px); pointer-events: none; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.375rem 1rem;
  border-radius: 9999px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
  color: hsl(var(--muted-foreground));
  font-size: 0.875rem;
  margin-bottom: 2rem;
}
.hero-title { font-size: 2.25rem; margin-bottom: 1.5rem; }
.hero-title-line { display: block; }
@media (min-width: 768px) { .hero-title { font-size: 3.75rem; } }
@media (min-width: 1024px) { .hero-title { font-size: 4.5rem; } }
.hero-sub { font-size: 1.125rem; color: hsl(var(--muted-foreground)); max-width: 42rem; margin: 0 auto 2.5rem; }
@media (min-width: 768px) { .hero-sub { font-size: 1.25rem; } }

/* Dashboard 数据面板 mock */
.mock-panel { border-radius: 0.75rem; border: 1px solid hsl(var(--border)); background: hsl(var(--card)); box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25); overflow: hidden; }
.mock-row { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 1rem; border-bottom: 1px solid hsl(var(--border)); }
.mock-cell { display: flex; align-items: center; gap: 0.5rem; font-size: 0.8125rem; }
.ticker-up { color: hsl(var(--success)); font-weight: 600; }
.ticker-down { color: hsl(var(--destructive)); font-weight: 600; }

/* 迷你K线/折线占位 */
.spark-svg { display: block; width: 100%; height: 100%; }

/* 统计条 */
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; text-align: center; max-width: 48rem; margin: 4rem auto 0; }
.stats-value { font-size: 1.875rem; font-weight: 700; }
.stats-label { font-size: 0.875rem; color: hsl(var(--muted-foreground)); margin-top: 0.25rem; }

/* ---------- 组件：区块 ---------- */
.section { padding: 4rem 1rem; }
@media (min-width: 1024px) { .section { padding: 4rem 3rem; } }
.section-tight { padding: 2.5rem 1rem; }
@media (min-width: 1024px) { .section-tight { padding: 2.5rem 3rem; } }
.section-card-bg { background: hsl(var(--card)); }
.section-title { font-size: 1.875rem; text-align: center; margin-bottom: 0.75rem; }
@media (min-width: 768px) { .section-title { font-size: 2.25rem; } }
.section-sub { font-size: 1.125rem; color: hsl(var(--muted-foreground)); text-align: center; max-width: 36rem; margin: 0 auto 3rem; }
.container-inner { max-width: 80rem; margin: 0 auto; }

/* 特性卡片 */
.feature-card { padding: 1.5rem; border-radius: var(--radius); border: 1px solid hsl(var(--border)); background: hsl(var(--card)); transition: box-shadow 0.2s ease, transform 0.2s ease; }
.feature-card:hover { box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.08); transform: translateY(-2px); }
.feature-icon {
  display: flex; align-items: center; justify-content: center;
  width: 2.5rem; height: 2.5rem; border-radius: 0.75rem;
  background: hsl(var(--accent)); color: hsl(var(--accent-foreground));
  margin-bottom: 1rem;
}
.feature-icon svg { width: 1.25rem; height: 1.25rem; }
.feature-title { font-size: 1.0625rem; font-weight: 600; margin-bottom: 0.5rem; }
.feature-desc { font-size: 0.875rem; color: hsl(var(--muted-foreground)); }

/* 步骤（HowItWorks） */
.step-num {
  display: flex; align-items: center; justify-content: center;
  width: 2.5rem; height: 2.5rem; border-radius: 9999px;
  background: hsl(var(--primary)); color: hsl(var(--primary-foreground));
  font-weight: 700; margin: 0 auto 1rem;
}

/* ---------- 组件：定价 ---------- */
.pricing-card {
  position: relative;
  padding: 2rem;
  border-radius: var(--radius);
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
  display: flex; flex-direction: column;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.pricing-card:hover { transform: translateY(-2px); }
/* 点选高亮（spec/27 补充：红色边框） */
.pricing-selected {
  border-color: hsl(var(--primary));
  box-shadow: 0 0 0 2px hsl(var(--primary)), 0 20px 25px -5px hsl(var(--primary) / 0.18);
}
.pricing-card-featured { border-color: hsl(var(--primary)); box-shadow: 0 20px 25px -5px hsl(var(--primary) / 0.15); }
.pricing-name { font-size: 1.125rem; font-weight: 600; }
.pricing-desc { font-size: 0.875rem; color: hsl(var(--muted-foreground)); margin-top: 0.25rem; }
.pricing-price { font-size: 2.5rem; font-weight: 700; margin-top: 1.5rem; }
.pricing-period { font-size: 0.875rem; color: hsl(var(--muted-foreground)); }
.feature-list { list-style: none; margin: 1.5rem 0; display: flex; flex-direction: column; gap: 0.75rem; }
.feature-item { display: flex; align-items: flex-start; gap: 0.625rem; font-size: 0.875rem; color: hsl(var(--muted-foreground)); }
.feature-item svg { width: 1rem; height: 1rem; color: hsl(var(--success)); flex-shrink: 0; margin-top: 0.125rem; }
.pricing-cta { margin-top: auto; }

/* ---------- 产品库（spec/29、spec/38 对齐参考 Agents 页） ---------- */
/* 统计卡（参考 Agents.tsx Quick stats：渐变卡 + 光晕 + 右上角图标块） */
.qs-card {
  position: relative;
  padding: 1.25rem;
  border-radius: 1rem;
  border: 1px solid hsl(var(--border) / 0.6);
  background-image: linear-gradient(to bottom right, hsl(var(--card)), hsl(var(--card)), hsl(var(--card) / 0.8));
  overflow: hidden;
  transition: all 0.3s ease;
}
.qs-card:hover {
  border-color: hsl(var(--primary) / 0.3);
  box-shadow: 0 10px 15px -3px hsl(var(--primary) / 0.05);
}
.qs-card-glow {
  position: absolute;
  top: -3rem; right: -3rem;
  width: 6rem; height: 6rem;
  border-radius: 9999px;
  background: hsl(var(--primary) / 0.05);
  filter: blur(40px);
  transition: background-color 0.5s ease;
}
.qs-card:hover .qs-card-glow { background: hsl(var(--primary) / 0.1); }
.qs-card-icon {
  position: absolute;
  top: 1rem; right: 1rem;
  width: 2.25rem; height: 2.25rem;
  border-radius: 0.75rem;
  background: hsl(var(--primary) / 0.1);
  color: hsl(var(--primary));
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 1px hsl(var(--border) / 0.3);
  backdrop-filter: blur(4px);
}
.qs-card-icon-success { background: hsl(var(--success) / 0.1); color: hsl(var(--success)); }
.qs-card-icon-danger { background: hsl(var(--destructive) / 0.1); color: hsl(var(--destructive)); }
.qs-card-icon svg { width: 1rem; height: 1rem; }
.qs-card-value {
  font-size: 1.875rem; font-weight: 700;
  color: hsl(var(--foreground));
  letter-spacing: -0.025em; line-height: 1;
}
.qs-card-label {
  margin-top: 0.5rem;
  font-size: 0.75rem; font-weight: 500;
  color: hsl(var(--muted-foreground));
  text-transform: uppercase; letter-spacing: 0.05em;
}
/* spec/0222：活跃率半圆仪表盘（0% 在左、100% 在右；涨红跌绿；数字在表盘下方）
   spec/0223：加刻度、轴点、入场「扫弧 + 扫针」动画；数字改「大号数字 + 小号 %」 */
.gauge-wrap {
  position: relative;
  width: 100%; max-width: 12rem;
  margin: 0.25rem auto 0;
}
.gauge { display: block; width: 100%; height: auto; overflow: visible; }
/* 刻度：每 10% 一根，0 / 50 / 100 为主刻度 */
.gauge-tick { stroke: hsl(var(--muted-foreground) / 0.3); stroke-width: 1; stroke-linecap: round; }
.gauge-tick-major { stroke: hsl(var(--muted-foreground) / 0.6); stroke-width: 1.4; }
.gauge-track {
  fill: none;
  stroke: hsl(var(--muted));
  stroke-width: 7;
  stroke-linecap: round;
}
/* 数值弧：整段半圆 + dasharray/dashoffset 表示进度，入场时从句首扫出 */
.gauge-fill {
  fill: none;
  stroke-width: 7;
  stroke-linecap: round;
  animation: gauge-fill-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes gauge-fill-in {
  from { stroke-dashoffset: 144.51; }
}
.gauge-up {
  stroke: hsl(var(--destructive));
  filter: drop-shadow(0 0 2.5px hsl(var(--destructive) / 0.45));
}
.gauge-down {
  stroke: hsl(var(--success));
  filter: drop-shadow(0 0 2.5px hsl(var(--success) / 0.45));
}
/* 指针：本地朝右，靠 CSS rotate 摆到目标角度（0% = −180°、100% = 0°），入场时从最左扫过 */
.gauge-needle {
  stroke: hsl(var(--foreground));
  stroke-width: 2.2;
  stroke-linecap: round;
  transform-box: view-box;
  transform-origin: 50% 93.94%;
  transform: rotate(var(--gauge-deg, -180deg));
  animation: gauge-needle-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
  filter: drop-shadow(0 1px 1px rgb(0 0 0 / 0.22));
}
@keyframes gauge-needle-in {
  from { transform: rotate(-180deg); }
}
.gauge-hub { fill: hsl(var(--foreground)); }
.gauge-hub-dot { fill: hsl(var(--card)); }
.gauge-value {
  display: block; text-align: center;
  /* spec/0226：与表盘（轴点/指针根部）的间距在原先 2px 基础上再 +5px → 7px */
  margin-top: 7px;
  font-size: 1.6rem; font-weight: 700; line-height: 1;
  color: hsl(var(--foreground));
  letter-spacing: -0.025em; font-variant-numeric: tabular-nums;
}
.gauge-unit {
  margin-left: 1px;
  font-size: 0.875rem; font-weight: 600;
  color: hsl(var(--muted-foreground));
}
/* 仪表卡片的说明文字居中（不影响其它页面的 .qs-card-label） */
.gauge-label { text-align: center; }
/* spec/0224：表盘可点击（点击弹出该口径的活跃资产列表） */
.gauge-wrap[data-gauge-period] { cursor: pointer; }
.gauge-wrap[data-gauge-period]:hover .gauge-hub { fill: hsl(var(--primary)); }
.gauge-wrap[data-gauge-period]:hover .gauge-value { color: hsl(var(--primary)); }
.gauge-wrap[data-gauge-period]:focus-visible { outline: 2px solid hsl(var(--primary) / 0.5); outline-offset: 4px; border-radius: 0.5rem; }
/* 仪表盘资产列表弹窗（复用通用 confirm 遮罩/卡片） */
.gauge-pop { width: min(28rem, 92vw); }
.gauge-pop .gauge-pop-msg { margin-bottom: 0.75rem; }
.gauge-pop-list {
  max-height: 45vh; overflow-y: auto;
  border: 1px solid hsl(var(--border)); border-radius: 0.75rem;
  background: hsl(var(--muted) / 0.35);
}
.gauge-pop-list:empty { display: none; }
.gauge-pop-item {
  display: flex; align-items: center; gap: 0.75rem;
  width: 100%; padding: 0.5rem 0.75rem;
  border: 0; border-bottom: 1px solid hsl(var(--border) / 0.6);
  background: transparent; text-align: left; cursor: pointer;
  font-size: 0.8125rem; color: hsl(var(--foreground));
  transition: background-color 0.15s ease;
}
.gauge-pop-item:last-child { border-bottom: 0; }
.gauge-pop-item:hover { background: hsl(var(--primary) / 0.08); }
.gauge-pop-code { font-weight: 600; font-variant-numeric: tabular-nums; }
.gauge-pop-name {
  flex: 1; min-width: 0;
  color: hsl(var(--muted-foreground));
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.gauge-pop-count {
  flex: 0 0 auto;
  padding: 0.0625rem 0.375rem; border-radius: 9999px;
  background: hsl(var(--primary) / 0.1); color: hsl(var(--primary));
  font-size: 0.6875rem; font-weight: 600; font-variant-numeric: tabular-nums;
}
/* spec/0227：弹窗里的「次数」徽标按方向着色（涨红跌绿，与表盘数值弧一致） */
.gauge-pop-dir-up .gauge-pop-count {
  background: hsl(var(--destructive) / 0.1);
  color: hsl(var(--destructive));
}
.gauge-pop-dir-down .gauge-pop-count {
  background: hsl(var(--success) / 0.1);
  color: hsl(var(--success));
}
@media (prefers-reduced-motion: reduce) {
  .gauge-fill, .gauge-needle { animation: none; }
}
/* spec/0209（修订）：板块改为「按资产类型分组、每组四个指标卡」渲染，原先「块内拆分四行」的样式已不再使用 */
/* spec/0112：订阅页顶部行情——两块大卡（左 max/ticker/min，右 真实up/当前/真实down），并排自适应 */
.subs-qgroups {
  grid-template-columns: repeat(auto-fit, minmax(21rem, 1fr));
}
.subs-qgroup { padding: 1rem 1.25rem; }
/* 订阅页信息条（平/补仓预埋、交易评估等共用；原真实/波段突破预测已移除，见 spec/0266） */
.subs-predict { display: flex; align-items: center; gap: 0.875rem; flex-wrap: wrap; padding: 0.5rem 1.25rem; margin-bottom: 0.75rem; }
.subs-predict-kind { font-weight: 600; color: hsl(var(--foreground)); font-size: 0.8125rem; line-height: 1.3; }
.subs-predict-dir, .subs-predict-gap, .subs-predict-price, .subs-predict-at, .subs-predict-conf { font-size: 0.8125rem; line-height: 1.3; font-variant-numeric: tabular-nums; }
.subs-predict-dir.is-up, .subs-predict-gap.is-up { color: hsl(var(--destructive)); }
.subs-predict-dir.is-down, .subs-predict-gap.is-down { color: hsl(var(--success)); }
.subs-predict-price, .subs-predict-at, .subs-predict-conf { color: hsl(var(--muted-foreground)); }
.subs-predict-note { margin-left: auto; font-size: 0.6875rem; color: hsl(var(--muted-foreground)); white-space: nowrap; }
/* spec/0273：交易评估卡内左右/对冲累计收益与收益率 */
.subs-eva-lrpnl { display: grid; gap: 0.5rem; }
.subs-eva-lrpnl.is-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.subs-eva-lrpnl.is-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.subs-eva-unit { font-weight: 500; font-size: 0.75rem; color: hsl(var(--muted-foreground)); }
.subs-eva-ret { font-variant-numeric: tabular-nums; }
.subs-predict-empty { font-size: 0.8125rem; color: hsl(var(--muted-foreground)); }
/* spec/0219：订阅页「交易评估」行数值涨跌配色（正值红 / 负值绿，与站内涨红跌绿一致；0 不加类名即默认色） */
.subs-eva-val.is-up { color: hsl(var(--destructive)); }
.subs-eva-val.is-down { color: hsl(var(--success)); }
.subs-qgroup-title {
  margin-bottom: 0.75rem;
  font-size: 0.75rem; font-weight: 600;
  color: hsl(var(--muted-foreground));
  letter-spacing: 0.05em;
}
.subs-qgroup-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 1rem;
}
.subs-qitem { min-width: 0; }
.subs-qitem + .subs-qitem {
  border-left: 1px solid hsl(var(--border) / 0.6);
  padding-left: 1rem;
}
/* 语义色：仅 is-mid（当前/当前波段突破）数值保留主色；up/down 数值去彩色（默认文字色），圆点保留方向色 */
.subs-qitem.is-up { --qcol: hsl(var(--foreground)); --dotcol: hsl(var(--destructive)); }
.subs-qitem.is-down { --qcol: hsl(var(--foreground)); --dotcol: hsl(var(--success)); }
.subs-qitem.is-mid { --qcol: hsl(var(--primary)); --dotcol: hsl(var(--primary)); }
.subs-qitem-name {
  display: flex; align-items: center; gap: 0.375rem;
  font-size: 0.6875rem; font-weight: 600;
  color: hsl(var(--muted-foreground));
  letter-spacing: 0;
  white-space: nowrap;
}
.subs-qitem-name::before {
  content: ""; width: 0.4375rem; height: 0.4375rem;
  border-radius: 9999px; background: var(--dotcol, var(--qcol));
  flex-shrink: 0;
}
.subs-qitem-value {
  margin-top: 0.375rem;
  font-size: 1.25rem; font-weight: 500; line-height: 1.15;
  color: var(--qcol);
  letter-spacing: -0.02em;
}
.subs-qitem.is-mid .subs-qitem-value { font-weight: 700; } /* 仅「当前/当前波段突破」加粗 */
.subs-qitem-time {
  margin-top: 0.3125rem;
  font-size: 0.625rem;
  color: hsl(var(--muted-foreground) / 0.8);
  letter-spacing: 0;
  overflow-wrap: break-word;
}

/* 产品卡（参考 Agents.tsx Agent card：rounded-lg + hover 主色描边 + 轻阴影 + cursor） */
.product-card {
  padding: 1.25rem;
  border-radius: 0.5rem;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
  color: hsl(var(--card-foreground));
  cursor: pointer;
  transition: all 0.3s ease;
}
.product-card:hover {
  border-color: hsl(var(--primary) / 0.2);
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}
.product-icon {
  display: flex; align-items: center; justify-content: center;
  width: 2.25rem; height: 2.25rem; border-radius: 0.5rem;
  background: hsl(var(--accent)); color: hsl(var(--accent-foreground));
  flex-shrink: 0;
}
.product-icon svg { width: 1rem; height: 1rem; }
.product-trigger { display: inline-flex; align-items: center; }
.product-trigger svg { width: 0.75rem; height: 0.75rem; color: hsl(var(--muted-foreground)); }
.badge-xs { font-size: 0.625rem; padding: 0 0.375rem; height: 1.25rem; line-height: 1; }
.product-src-chip {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.25rem; height: 1.25rem; border-radius: 0.25rem;
  background: hsl(var(--secondary) / 0.5); color: hsl(var(--muted-foreground));
}
.product-src-chip svg { width: 0.75rem; height: 0.75rem; }
.product-desc {
  font-size: 0.75rem; color: hsl(var(--muted-foreground)); margin-bottom: 0.75rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.product-status {
  display: inline-flex; align-items: center; gap: 0.375rem;
  padding: 0.25rem 0.625rem; border-radius: 9999px;
  border: none; cursor: pointer; font-size: 0.75rem; font-weight: 500;
  background: hsl(var(--success) / 0.1); color: hsl(var(--success));
  transition: background-color 0.15s ease;
}
.product-status:hover { background: hsl(var(--success) / 0.2); }
.product-status-paused { background: hsl(var(--muted)); color: hsl(var(--muted-foreground)); }
.product-status-paused:hover { background: hsl(var(--muted) / 0.8); }
.product-status .dot { width: 0.375rem; height: 0.375rem; }
.product-run-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.75rem; height: 1.75rem; border-radius: 9999px;
  border: none; cursor: pointer;
  background: hsl(var(--secondary) / 0.5); color: hsl(var(--muted-foreground));
  transition: background-color 0.15s ease, color 0.15s ease;
}
.product-run-btn { position: relative; }
.product-run-btn:hover { background: hsl(var(--primary) / 0.1); color: hsl(var(--primary)); }
.product-run-btn svg { width: 0.75rem; height: 0.75rem; }
/* 已订阅点亮态（spec/43） */
.product-run-btn-active { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }
.product-run-btn-active:hover { background: hsl(var(--primary) / 0.9); color: hsl(var(--primary-foreground)); }
/* 新品订阅禁用态（spec/45：未发布不可订阅；不用 opacity，避免连带 tooltip 变透明） */
.product-run-btn-disabled,
.product-run-btn-disabled:hover {
  background: hsl(var(--muted));
  color: hsl(var(--muted-foreground));
  cursor: not-allowed;
}

/* 订阅按钮文字化（spec/47：图标 + 订阅/取消订阅；红色系，加宽可容纳三字） */
.product-subscribe-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  min-width: 5.25rem;
  padding: 0 0.875rem;
  height: 2.125rem;
  border-radius: 9999px;
  border: 1px solid hsl(var(--primary) / 0.4);
  background: hsl(var(--primary) / 0.08);
  color: hsl(var(--primary));
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
}
.product-subscribe-btn:hover {
  background: hsl(var(--primary) / 0.15);
  color: hsl(var(--primary));
  border-color: hsl(var(--primary) / 0.6);
}
.product-subscribe-btn svg { width: 0.9375rem; height: 0.9375rem; flex-shrink: 0; }
/* 已订阅：红底白字 */
.product-subscribe-btn.product-run-btn-active {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border-color: hsl(var(--primary));
}
.product-subscribe-btn.product-run-btn-active:hover {
  background: hsl(var(--primary) / 0.9);
  color: hsl(var(--primary-foreground));
}

/* 产品列表样式（spec/47：参考 Executions.tsx 表格） */
.product-list-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  color: hsl(var(--muted-foreground));
  background: hsl(var(--muted) / 0.5);
}
.product-list-table td { padding: 0.75rem 1rem; vertical-align: middle; }
.product-list-row { border-bottom: 1px solid hsl(var(--border)); transition: background-color 0.15s ease; }
.product-list-row:last-child { border-bottom: 0; }
.product-list-row:hover { background: hsl(var(--muted) / 0.3); }
.product-list-row .product-icon { width: 2rem; height: 2rem; border-radius: 0.5rem; }
.product-list-row .product-icon svg { width: 0.875rem; height: 0.875rem; }
.product-list-row .product-status {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  background: hsl(var(--success) / 0.1);
  color: hsl(var(--success));
  border: none;
}
.product-list-row .product-status-paused { background: hsl(var(--muted)); color: hsl(var(--muted-foreground)); }
/* 状态列仅圆点（spec/47）：绿=运行 / 红=暂停，收窄列宽 */
.product-list-table th:nth-child(5),
.product-list-table td:nth-child(5) { width: 3rem; }
.dot-destructive { background: hsl(var(--destructive)); }

/* spec/0135：账号取数状态灯（读引擎字段 eng_accounts.status / errorMsg，纯展示）
   1 → 绿灯；0 → 红灯（悬停显示 errorMsg，最长 200 字符 → 需换行）；字段缺失 → 灰灯。
   tooltip **贴右向左展开**：错误信息较长，居中会超出表格右边缘并在横向滚动容器里产生滚动溢出。 */
.status-dot {
  display: inline-block;
  width: 0.625rem; height: 0.625rem;
  border-radius: 9999px;
  position: relative;
  vertical-align: middle;
}
.status-dot-ok { background: hsl(var(--success)); }
.status-dot-err { background: hsl(var(--destructive)); }
.status-dot-none { background: hsl(var(--muted-foreground) / 0.45); }
.status-dot[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 0.5rem);
  right: 0;
  left: auto;
  z-index: 60;
  width: max-content;
  max-width: 12rem;
  padding: 0.375rem 0.625rem;
  border-radius: 0.375rem;
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
  box-shadow: 0 4px 12px -2px rgb(0 0 0 / 0.12);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.45;
  text-align: left;
  white-space: normal;
  word-break: break-word;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.status-dot[data-tip]:hover::after { opacity: 1; transform: translateY(0); }

/* 状态点 tooltip（纯 CSS，仅产品列表内，同订阅按钮风格） */
.product-list-row .dot { position: relative; }
.product-list-row .dot::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 0.5rem);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  z-index: 60;
  padding: 0.25rem 0.625rem;
  border-radius: 0.375rem;
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
  box-shadow: 0 4px 12px -2px rgb(0 0 0 / 0.12);
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.product-list-row .dot:hover::after { opacity: 1; transform: translateX(-50%) translateY(0); }
/* 列宽控制（spec/47；spec/0214 改为**按 class**指定，避免列序变动时位置选择器错位）：
   spec/0284 列序 = 名称 / 编码 / 类型 / 日UP|DOWN / 月UP|DOWN / 左侧月均 / 右侧月均 / 赞 / 踩 / 创建时间 / 操作 */
.table.product-list-table thead th { text-align: left; }
.product-list-table td { text-align: center; }
/* spec/0217：名称列收窄到「够显示名称」即可（长名称最多折 2 行）。
   用 min-width（不是 width）：表格列多时 auto 布局会把带 width 的列压到最小（实测被压到 82px、名称折 5 行）；
   同时把「操作」列 16rem 收到 12rem（两个按钮实际约 11.4rem）腾出宽度，保持不出现横向滚动 */
.product-list-table .prod-name-col { min-width: 8.5rem; text-align: left; }
.product-list-table .prod-code-col { width: 7rem; text-align: left; }
.product-list-table .prod-type-col { width: 5rem; }
.product-list-table .prod-day-col,
.product-list-table .prod-month-col { width: 6.5rem; white-space: nowrap; }
.product-list-table .prod-eva-col { width: 7rem; }
.product-list-table .prod-vote-col { width: 4.5rem; }
.product-list-table .prod-time-col { width: 10.5rem; white-space: nowrap; }
.product-list-table th:last-child,
.product-list-table td:last-child { width: 11.5rem; }
/* spec/0216（修订）：收益率的两条模式提示改挂在**列头**的 `.col-tip` 上（同「日UP|DOWN」），行内样式已移除 */
/* spec/0211：`.product-list-summary(-text)` 样式随「简介」列一并移除 */

/* 产品赞/踩按钮（spec/44） */
.product-vote-btn {
  position: relative;
  display: inline-flex; align-items: center; gap: 0.25rem;
  padding: 0 0.375rem;
  height: 1.75rem;
  border-radius: 9999px;
  border: none; cursor: pointer;
  background: hsl(var(--secondary) / 0.5);
  color: hsl(var(--muted-foreground));
  font-size: 0.75rem; font-weight: 500;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.product-vote-btn:hover { background: hsl(var(--primary) / 0.1); color: hsl(var(--primary)); }
.product-vote-btn svg { width: 0.75rem; height: 0.75rem; flex-shrink: 0; }
.product-vote-count { line-height: 1; }
/* 点亮态：赞绿 / 踩红 */
.product-vote-btn-up.product-vote-btn-active { background: hsl(var(--success) / 0.12); color: hsl(var(--success)); }
.product-vote-btn-up.product-vote-btn-active:hover { background: hsl(var(--success) / 0.2); color: hsl(var(--success)); }
.product-vote-btn-down.product-vote-btn-active { background: hsl(var(--destructive) / 0.12); color: hsl(var(--destructive)); }
.product-vote-btn-down.product-vote-btn-active:hover { background: hsl(var(--destructive) / 0.2); color: hsl(var(--destructive)); }
/* 赞/踩按钮 tooltip（纯 CSS，同订阅按钮） */
.product-vote-btn::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 0.5rem);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  z-index: 60;
  padding: 0.25rem 0.625rem;
  border-radius: 0.375rem;
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
  box-shadow: 0 4px 12px -2px rgb(0 0 0 / 0.12);
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.product-vote-btn:hover::after { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 「我已订阅」筛选 toggle（spec/43） */
.subscribed-toggle { gap: 0.375rem; color: hsl(var(--muted-foreground)); }
.subscribed-toggle svg { width: 0.875rem; height: 0.875rem; }
.subscribed-toggle-active { background: hsl(var(--primary)); border-color: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }
.subscribed-toggle-active:hover { background: hsl(var(--primary) / 0.9); border-color: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }
/* 订阅按钮 tooltip（纯 CSS，spec/41） */
.product-run-btn::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 0.5rem);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  z-index: 60;
  padding: 0.25rem 0.625rem;
  border-radius: 0.375rem;
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
  box-shadow: 0 4px 12px -2px rgb(0 0 0 / 0.12);
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.product-run-btn:hover::after { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 蓝色文字（spec/70：活跃页指数列数据） */
.text-blue { color: hsl(210 90% 55%); }
/* 列名问号提示图标（spec/70） */
.col-tip {
  display: inline-flex; align-items: center;
  margin-left: 0.25rem; vertical-align: -0.125em;
  color: hsl(var(--muted-foreground)); cursor: help;
}
.col-tip svg { width: 0.875rem; height: 0.875rem; }
.col-tip:hover { color: hsl(var(--primary)); }
/* body 级 tooltip 浮层（spec/70：表格容器 overflow 会裁剪，改用 fixed 定位浮层，JS 驱动） */
.col-tip-pop {
  position: fixed; z-index: 120;
  transform: translateX(-50%) translateY(4px);
  padding: 0.375rem 0.625rem;
  border-radius: 0.5rem;
  background: hsl(var(--card)); color: hsl(var(--foreground));
  border: 1px solid hsl(var(--border));
  box-shadow: 0 8px 24px -6px rgb(0 0 0 / 0.18);
  font-size: 0.75rem; line-height: 1.5; font-weight: 500;
  white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.col-tip-pop.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.product-more-btn { opacity: 1; }
.product-card:hover .product-more-btn { opacity: 1; }

/* 过滤/排序下拉当前项高亮（spec/41） */
.dropdown-item-active { background: hsl(var(--accent)); color: hsl(var(--accent-foreground)); font-weight: 600; }

/* 资产/产品详情半屏抽屉（spec/41 建立；spec/0229 重新装修：头部徽标 + 摘要/描述卡片 + 底部元信息行） */
.detail-drawer { position: fixed; inset: 0; z-index: 80; visibility: hidden; }
.detail-drawer-open { visibility: visible; }
.detail-overlay {
  position: absolute; inset: 0;
  background: rgb(0 0 0 / 0.5);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.detail-drawer-open .detail-overlay { opacity: 1; }
.detail-sheet {
  position: absolute; top: 0; right: 0;
  width: 100%; max-width: 28rem; height: 100%;
  background: hsl(var(--background));
  border-left: 1px solid hsl(var(--border));
  box-shadow: -16px 0 40px -12px rgb(0 0 0 / 0.2);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex; flex-direction: column;
  overflow-y: auto;
}
.detail-drawer-open .detail-sheet { transform: translateX(0); }
.detail-sheet-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 0.75rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid hsl(var(--border));
  background: hsl(var(--card));
  flex-shrink: 0;
}
.detail-sheet-icon {
  display: flex; align-items: center; justify-content: center;
  width: 2.5rem; height: 2.5rem; border-radius: 0.625rem;
  background: hsl(var(--primary) / 0.1); color: hsl(var(--primary));
  flex-shrink: 0;
}
.detail-sheet-icon svg { width: 1.25rem; height: 1.25rem; }
.detail-close-btn { flex-shrink: 0; }
/* spec/0229：头部类型 / 编码徽标 */
.detail-badges { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.375rem; flex-wrap: wrap; }
.detail-status {
  display: inline-flex; align-items: center;
  padding: 0.125rem 0.5rem; border-radius: 9999px;
  font-size: 0.6875rem; font-weight: 500;
  background: hsl(var(--success) / 0.1); color: hsl(var(--success));
}
.detail-status-paused { background: hsl(var(--muted)); color: hsl(var(--muted-foreground)); }
.detail-sheet-body { padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
/* spec/0230：数据概览（日/月 UP、DOWN + 左右评估收益率） */
.detail-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; }
.detail-stat {
  display: flex; flex-direction: column; gap: 0.25rem;
  padding: 0.625rem 0.75rem;
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) + 2px);
  background: hsl(var(--card));
}
.detail-stat-label { font-size: 0.6875rem; color: hsl(var(--muted-foreground)); white-space: nowrap; }
.detail-stat-value {
  font-size: 1rem; font-weight: 700; line-height: 1.2;
  color: hsl(var(--foreground));
  font-variant-numeric: tabular-nums;
}
.detail-stat-value.is-up { color: hsl(var(--destructive)); }
.detail-stat-value.is-down { color: hsl(var(--success)); }
/* spec/0230：操作提示（突破信号 + 模式建议 + 免责说明） */
.detail-advice {
  display: flex; flex-direction: column; gap: 0.5rem;
  padding: 0.875rem 1rem;
  border: 1px solid hsl(var(--primary) / 0.25);
  border-radius: calc(var(--radius) + 2px);
  background: hsl(var(--primary) / 0.05);
}
.detail-advice-title {
  display: flex; align-items: center; gap: 0.375rem;
  font-size: 0.75rem; font-weight: 600;
  color: hsl(var(--primary));
}
.detail-advice-title svg { width: 0.875rem; height: 0.875rem; }
.detail-advice-row { display: flex; align-items: flex-start; gap: 0.5rem; }
.detail-advice-tag {
  flex: 0 0 auto; padding: 0.0625rem 0.375rem; border-radius: 9999px;
  background: hsl(var(--card)); border: 1px solid hsl(var(--border));
  font-size: 0.6875rem; font-weight: 500; color: hsl(var(--muted-foreground));
  white-space: nowrap; margin-top: 0.0625rem;
}
.detail-advice-text { flex: 1; margin: 0; font-size: 0.8125rem; line-height: 1.65; color: hsl(var(--foreground)); }
.detail-advice-note { margin: 0; font-size: 0.6875rem; color: hsl(var(--muted-foreground)); }
/* spec/0231：详情抽屉里的机构评级 / 一致盈利预测块（数据源 eng_stock_rating） */
.rating-head { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
.rating-orgs { font-size: 0.8125rem; font-weight: 600; color: hsl(var(--foreground)); font-variant-numeric: tabular-nums; }
.rating-window { font-size: 0.6875rem; color: hsl(var(--muted-foreground)); }
.rating-table-wrap { overflow-x: auto; }
.rating-table { width: 100%; border-collapse: collapse; font-size: 0.75rem; font-variant-numeric: tabular-nums; }
.rating-table th {
  padding: 0.25rem 0.375rem; text-align: right;
  font-weight: 500; color: hsl(var(--muted-foreground)); white-space: nowrap;
}
.rating-table th:first-child, .rating-table td:first-child { text-align: left; }
.rating-table td {
  padding: 0.25rem 0.375rem; text-align: right;
  color: hsl(var(--foreground));
  border-top: 1px solid hsl(var(--border) / 0.7);
  white-space: nowrap;
}
.rating-table tr.is-main td {
  background: hsl(var(--primary) / 0.06);
  font-weight: 600;
}
.rating-star { margin-left: 0.25rem; color: hsl(var(--primary)); font-size: 0.625rem; }
.rating-forecast { display: flex; flex-direction: column; gap: 0.1875rem; margin: 0.5rem 0 0; }
.rating-forecast-label { font-size: 0.6875rem; color: hsl(var(--muted-foreground)); }
.rating-forecast-line {
  font-size: 0.75rem; color: hsl(var(--foreground));
  font-variant-numeric: tabular-nums; word-break: break-word;
}
.rating-year { margin-right: 0.125rem; color: hsl(var(--muted-foreground)); font-size: 0.625rem; }
.rating-mark {
  margin-left: 0.0625rem; padding: 0 0.125rem; border-radius: 0.25rem;
  background: hsl(var(--muted)); color: hsl(var(--muted-foreground));
  font-size: 0.5625rem; font-weight: 700; vertical-align: 0.0625rem;
}
.rating-orgs-detail { margin-top: 0.5rem; }
.rating-orgs-detail > summary {
  cursor: pointer; font-size: 0.75rem; color: hsl(var(--muted-foreground));
  list-style: none;
}
.rating-orgs-detail > summary::-webkit-details-marker { display: none; }
.rating-orgs-detail > summary::before { content: "▸ "; }
.rating-orgs-detail[open] > summary::before { content: "▾ "; }
.rating-orgs-detail[open] > summary { margin-bottom: 0.25rem; }
.rating-truncated { margin-left: 0.375rem; font-size: 0.6875rem; color: hsl(var(--muted-foreground)); }
.rating-table-orgs td, .rating-table-orgs th { font-size: 0.6875rem; }
.rating-table-orgs td:nth-child(4) { text-align: right; word-break: break-word; white-space: normal; }
/* spec/0229：摘要 / 描述改为带主色小竖线的卡片 */
.detail-block {
  display: flex; flex-direction: column; gap: 0.5rem;
  padding: 0.875rem 1rem;
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) + 2px);
  background: hsl(var(--card));
}
.detail-label {
  display: flex; align-items: center; gap: 0.375rem;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.02em;
  color: hsl(var(--muted-foreground));
}
.detail-label::before {
  content: ""; width: 3px; height: 0.75rem; border-radius: 9999px;
  background: hsl(var(--primary));
}
.detail-text {
  font-size: 0.875rem; line-height: 1.75; color: hsl(var(--foreground));
  white-space: pre-wrap; word-break: break-word;
}
/* spec/0229：底部一行元信息（如创建时间） */
.detail-meta {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 0.625rem 1rem;
  border-radius: calc(var(--radius) + 2px);
  background: hsl(var(--muted) / 0.45);
  font-size: 0.8125rem;
}
.detail-meta-label { color: hsl(var(--muted-foreground)); }
.detail-meta-value {
  color: hsl(var(--foreground)); font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.detail-info {
  padding: 0.75rem 1rem;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
}
.detail-value { font-size: 0.875rem; font-weight: 500; color: hsl(var(--foreground)); margin-top: 0.25rem; }

/* 确认弹窗（spec/43：订阅/取消订阅提示，遮罩 + 居中卡片） */
.confirm-overlay {
  position: fixed; inset: 0; z-index: 110;
  display: flex; align-items: center; justify-content: center;
  background: rgb(0 0 0 / 0.5);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.confirm-overlay.confirm-open { opacity: 1; }
.confirm-card {
  width: min(90vw, 22rem);
  padding: 1.25rem 1.5rem;
  border-radius: calc(var(--radius) - 2px);
  background: hsl(var(--card));
  color: hsl(var(--card-foreground));
  border: 1px solid hsl(var(--border));
  box-shadow: 0 20px 40px -12px rgb(0 0 0 / 0.25);
  transform: scale(0.95);
  transition: transform 0.2s ease;
}
.confirm-overlay.confirm-open .confirm-card { transform: scale(1); }
.confirm-title { font-size: 1rem; font-weight: 700; color: hsl(var(--foreground)); margin-bottom: 0.5rem; }
.confirm-msg { font-size: 0.875rem; line-height: 1.6; color: hsl(var(--muted-foreground)); margin-bottom: 1.25rem; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 0.5rem; }
/* spec/0150：关闭公开注册提示弹窗里的管理员微信二维码 */
.confirm-qr {
  display: block;
  width: 200px;
  max-width: 100%;
  height: auto;
  margin: 0 auto 1rem;
  border-radius: 0.75rem;
  background: #fff;
  border: 1px solid hsl(var(--border));
}
/* spec/0150：/signup 提示页的二维码 */
.signup-qr {
  display: block;
  width: 220px;
  max-width: 100%;
  height: auto;
  margin: 1.25rem auto 0;
  border-radius: 0.75rem;
  background: #fff;
  border: 1px solid hsl(var(--border));
}

/* ---------- 信息社区首页（spec/0165）：突破动态时间线，不展示实时价格 ---------- */
/* 两栏布局：时间线 + 右侧社区侧栏 */
.feed-layout { display: grid; grid-template-columns: minmax(0, 1fr) 18rem; gap: 1.5rem; align-items: start; }
@media (max-width: 1100px) { .feed-layout { grid-template-columns: minmax(0, 1fr); } }
/* 官网版式下内容区上下留白收一点，让时间线更聚焦 */
.feed-section { padding-top: 2.5rem; }

/* 头部概览条（红底白字；红 = 主题主色 hsl(var(--primary))，与右下角客服按钮 .fab 同一个红） */
.feed-hero {
  position: relative; overflow: hidden;
  padding: 1.5rem;
  border: 1px solid hsl(var(--primary) / 0.85);
  border-radius: calc(var(--radius) + 0.25rem);
  color: #fff;
  /* 底色与 .fab 完全相同；上面只叠一层“压暗”渐晕（不再用白色高光，避免整体发亮） */
  background-color: hsl(var(--primary));
  background-image:
    radial-gradient(120% 140% at 100% 0%, rgb(0 0 0 / 0.1) 0%, transparent 52%),
    radial-gradient(90% 130% at 0% 100%, rgb(0 0 0 / 0.16) 0%, transparent 56%);
  box-shadow: 0 10px 15px -3px hsl(var(--primary) / 0.25);
}
.feed-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.28;
  background-image:
    linear-gradient(rgb(255 255 255 / 0.2) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 0.2) 1px, transparent 1px);
  background-size: 2.25rem 2.25rem;
  -webkit-mask-image: radial-gradient(80% 90% at 40% 0%, #000 0%, transparent 78%);
  mask-image: radial-gradient(80% 90% at 40% 0%, #000 0%, transparent 78%);
}
.feed-hero-inner {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; flex-wrap: wrap;
}
.feed-hero-main { min-width: 0; flex: 1 1 auto; }
/* spec/0172 追加：hero 顶部徽章已去掉（徽章与脉冲动画的样式一并清理） */
.feed-hero-title {
  font-size: 1.75rem; line-height: 1.2; font-weight: 800;
  letter-spacing: -0.02em; color: #fff;
}
/* spec/0172 追加：标题里「提刻智能.数据社区」的那个点做上下居中（原来贴在基线上偏低） */
.feed-hero-dot {
  display: inline-block;
  transform: translateY(-0.16em);
  font-weight: 800;
}
.feed-hero-sub {
  margin-top: 0.375rem;
  font-size: 0.8125rem; line-height: 1.6; color: rgb(255 255 255 / 0.82);
  /* spec/0172：小字**不折行**（窄屏用省略号兜底，避免撑出横向滚动） */
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.feed-hero-stats { display: flex; gap: 0.5rem; flex-wrap: wrap; }
/* 头部右侧：活跃资产 + 今日资讯两个统计（spec/0169 起，进入动态按钮已在 spec/0172 移除） */
.feed-hero-actions { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.feed-hero-stat {
  display: flex; flex-direction: column; gap: 0.125rem;
  min-width: 6.5rem; padding: 0.625rem 0.875rem;
  border: 1px solid rgb(255 255 255 / 0.24);
  border-radius: calc(var(--radius) - 0.375rem);
  background: rgb(255 255 255 / 0.14);
  backdrop-filter: blur(6px);
}
.feed-hero-stat-value {
  font-size: 1.125rem; font-weight: 800;
  color: #fff; font-variant-numeric: tabular-nums;
}
.feed-hero-stat-label { font-size: 0.6875rem; color: rgb(255 255 255 / 0.78); }
/* 红底上 UP/DOWN 不再用红绿（不可读），统一白字，靠标签区分 */
.feed-hero-stat.is-up .feed-hero-stat-value,
.feed-hero-stat.is-down .feed-hero-stat-value { color: #fff; }
/* 今日资讯：底更实一点，视觉上作为"今天有多少新东西"的强调 */
.feed-hero-stat.is-news { background: rgb(255 255 255 / 0.22); border-color: rgb(255 255 255 / 0.34); }

/* 筛选工具条（吸顶） */
.feed-toolbar {
  position: sticky; top: 4.25rem; z-index: 6;
  display: flex; flex-direction: column; gap: 0.625rem;
  padding: 0.875rem 1rem;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  background: hsl(var(--card) / 0.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 24px -22px hsl(var(--foreground) / 0.6);
}
.feed-toolbar-row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; }
.feed-toolbar .notif-tab-active {
  border-color: transparent;
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--primary) / 0.78));
  color: hsl(var(--primary-foreground));
  box-shadow: 0 8px 16px -12px hsl(var(--primary) / 0.9);
}
.feed-count { font-size: 0.75rem; color: hsl(var(--muted-foreground)); font-variant-numeric: tabular-nums; }
/* 资讯搜索（spec/0172）：**独立区域**，放在筛选区上方；与页签 / 类型筛选叠加，不互斥 */
.feed-search-card {
  display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
  padding: 0.75rem 1rem;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  background: hsl(var(--card));
  box-shadow: 0 1px 2px hsl(var(--foreground) / 0.04);
}
.feed-search { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.feed-search-wrap { position: relative; flex: 1 1 16rem; min-width: 0; display: flex; align-items: center; }
.feed-search-icon {
  position: absolute; left: 0.625rem; display: inline-flex; color: hsl(var(--muted-foreground));
  pointer-events: none;
}
.feed-search-icon svg { width: 0.9375rem; height: 0.9375rem; }
.feed-search-input {
  width: 100%; height: 2.25rem;
  padding: 0 0.75rem 0 2rem;
  border: 1px solid hsl(var(--input));
  border-radius: calc(var(--radius) - 2px);
  background: hsl(var(--background)); color: hsl(var(--foreground));
  font-size: 0.8125rem; font-family: inherit; outline: none;
}
.feed-search-input::placeholder { color: hsl(var(--muted-foreground)); }
.feed-search-input:focus { border-color: hsl(var(--primary) / 0.6); box-shadow: 0 0 0 3px hsl(var(--primary) / 0.12); }
.feed-search-clear { font-size: 0.75rem; color: hsl(var(--muted-foreground)); }
.feed-search-clear:hover { color: hsl(var(--primary)); }

/* 动态卡片 */
.feed-post {
  position: relative; overflow: hidden;
  display: flex; gap: 0.875rem;
  padding: 1.125rem 1.25rem;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  background: hsl(var(--card));
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}
.feed-post::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 0.1875rem;
  background: hsl(var(--muted-foreground) / 0.25);
}
.feed-post.is-up::before { background: linear-gradient(180deg, hsl(var(--destructive)), hsl(var(--destructive) / 0.3)); }
.feed-post.is-down::before { background: linear-gradient(180deg, hsl(var(--success)), hsl(var(--success) / 0.3)); }
.feed-post:hover {
  transform: translateY(-2px);
  border-color: hsl(var(--primary) / 0.35);
  box-shadow: 0 18px 32px -26px hsl(var(--foreground) / 0.6), 0 2px 8px -6px hsl(var(--primary) / 0.35);
}
.feed-post-avatar {
  --tone: 347 77% 50%;
  display: flex; align-items: center; justify-content: center;
  width: 2.5rem; height: 2.5rem; flex-shrink: 0;
  border-radius: 0.875rem;
  color: hsl(var(--tone));
  background: linear-gradient(135deg, hsl(var(--tone) / 0.2), hsl(var(--tone) / 0.06));
  border: 1px solid hsl(var(--tone) / 0.2);
}
.feed-post-avatar[data-type="stock"] { --tone: 347 77% 50%; }
.feed-post-avatar[data-type="future"] { --tone: 32 95% 44%; }
.feed-post-avatar[data-type="coin"] { --tone: 268 62% 56%; }
.feed-post-avatar[data-type="gold"] { --tone: 43 92% 42%; }
.feed-post-avatar svg { width: 1.125rem; height: 1.125rem; }
.feed-post-head { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.feed-post-name { font-size: 0.9375rem; font-weight: 600; color: hsl(var(--foreground)); }
.feed-post-name:hover { color: hsl(var(--primary)); text-decoration: underline; }
.feed-type-tag {
  font-size: 0.6875rem; font-weight: 600;
  padding: 0.0625rem 0.375rem; border-radius: 0.375rem;
  color: hsl(var(--muted-foreground));
  background: hsl(var(--muted) / 0.6);
  border: 1px solid hsl(var(--border));
}
.feed-post-code { font-size: 0.75rem; color: hsl(var(--muted-foreground)); }
/* spec/0205：首页卡片「突破相对时间」小字的样式已按合规要求移除 */
/* 机构评级 / 目标价（原方向徽章位置；spec/0167） */
.feed-est {
  margin-left: auto; display: inline-flex; align-items: baseline; gap: 0.375rem;
  max-width: 100%; padding: 0.1875rem 0.5625rem;
  border-radius: 9999px; border: 1px solid hsl(var(--primary) / 0.25);
  background: hsl(var(--primary) / 0.08); color: hsl(var(--primary));
  font-size: 0.75rem; font-weight: 700; white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
a.feed-est:hover { background: hsl(var(--primary) / 0.14); border-color: hsl(var(--primary) / 0.45); }
.feed-est-main { overflow: hidden; text-overflow: ellipsis; }
.feed-est-sub { font-size: 0.6875rem; font-weight: 600; color: hsl(var(--primary) / 0.75); font-variant-numeric: tabular-nums; }
.feed-est.is-stale { opacity: 0.62; }
.feed-est.is-none {
  color: hsl(var(--muted-foreground)); background: hsl(var(--muted) / 0.5);
  border-color: hsl(var(--border)); font-weight: 500;
}

/* 个股事件消息（spec/0167）：首条 + 原生 details 收合历史 */
.feed-news { margin-top: 0.625rem; }
.feed-news-head { display: flex; align-items: center; gap: 0.375rem; flex-wrap: wrap; margin-bottom: 0.3125rem; }
.feed-news-cat {
  font-size: 0.6875rem; font-weight: 600; padding: 0.0625rem 0.375rem; border-radius: 0.375rem;
  color: hsl(var(--foreground)); background: hsl(var(--muted));
}
/* 消息类型：公告 / 快讯（spec/0168） */
.feed-news-kind {
  font-size: 0.6875rem; font-weight: 700; padding: 0.0625rem 0.375rem; border-radius: 0.375rem;
  color: hsl(var(--primary)); background: hsl(var(--primary) / 0.1);
  border: 1px solid hsl(var(--primary) / 0.18);
}
.feed-news-sent { font-size: 0.6875rem; font-weight: 600; padding: 0.0625rem 0.375rem; border-radius: 0.375rem; }
.feed-news-sent.is-good { color: hsl(var(--destructive)); background: hsl(var(--destructive) / 0.1); }
.feed-news-sent.is-bad { color: hsl(var(--success)); background: hsl(var(--success) / 0.12); }
.feed-news-sent.is-mid { color: hsl(var(--muted-foreground)); background: hsl(var(--muted) / 0.7); }
.feed-news-imp { font-size: 0.6875rem; color: hsl(var(--warning)); }
.feed-news-when { font-size: 0.6875rem; color: hsl(var(--muted-foreground)); font-variant-numeric: tabular-nums; }
.feed-news-title {
  display: block; font-size: 0.9375rem; font-weight: 600; line-height: 1.45;
  color: hsl(var(--foreground));
}
.feed-news-title:hover { color: hsl(var(--primary)); text-decoration: underline; }
.feed-news-summary { margin-top: 0.25rem; font-size: 0.8125rem; line-height: 1.6; color: hsl(var(--muted-foreground)); }
.feed-news-none { margin-top: 0.5rem; font-size: 0.8125rem; color: hsl(var(--muted-foreground) / 0.85); }
.feed-news-more { margin-top: 0.5rem; }
.feed-news-more-sum {
  display: inline-flex; align-items: center; gap: 0.25rem;
  font-size: 0.75rem; font-weight: 600; color: hsl(var(--primary));
  cursor: pointer; list-style: none; padding: 0.125rem 0.375rem; border-radius: 0.375rem;
}
.feed-news-more-sum::-webkit-details-marker { display: none; }
.feed-news-more-sum:hover { background: hsl(var(--primary) / 0.08); }
.feed-news-chevron { display: inline-flex; transition: transform 0.18s ease; }
.feed-news-chevron svg { width: 0.875rem; height: 0.875rem; }
.feed-news-more[open] .feed-news-chevron { transform: rotate(180deg); }
.feed-news-list {
  margin-top: 0.5rem; padding-left: 0.75rem;
  border-left: 2px solid hsl(var(--border));
  display: flex; flex-direction: column; gap: 0.4375rem;
  list-style: none;
}
.feed-news-row { display: flex; align-items: baseline; gap: 0.375rem; flex-wrap: wrap; font-size: 0.8125rem; }
.feed-news-link { color: hsl(var(--foreground)); }
.feed-news-link:hover { color: hsl(var(--primary)); text-decoration: underline; }
.feed-post-foot { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.75rem; }
.feed-chip {
  display: inline-flex; align-items: center; gap: 0.25rem;
  font-size: 0.6875rem; color: hsl(var(--muted-foreground));
  background: hsl(var(--muted) / 0.5);
  border: 1px solid hsl(var(--border));
  padding: 0.125rem 0.5rem; border-radius: 9999px;
  font-variant-numeric: tabular-nums;
}
.feed-chip svg { width: 0.8125rem; height: 0.8125rem; opacity: 0.75; }
/* spec/0240：卡片**右下角**的「年报 / 财报」标记（有数据才渲染）
   spec/0240 修订 3：「年报」是按钮（点击开弹层看引擎抽取的结构化摘要）；「财报」为纯标记
   两枚统一用主色（此前「财报」用中性灰，被误读成"没有数据/不可用"） */
.feed-post-badges { margin-left: auto; display: inline-flex; align-items: center; gap: 0.375rem; }
.feed-report-badge {
  display: inline-flex; align-items: center;
  padding: 0.125rem 0.5rem; border-radius: 9999px;
  border: 1px solid hsl(var(--primary) / 0.25);
  background: hsl(var(--primary) / 0.08);
  color: hsl(var(--primary));
  font-size: 0.6875rem; font-weight: 700; white-space: nowrap;
  text-decoration: none;
  font-family: inherit;
  cursor: pointer;
}
button.feed-report-badge { line-height: inherit; }
.feed-report-badge:hover { background: hsl(var(--primary) / 0.16); border-color: hsl(var(--primary) / 0.4); }
/* spec/0240 修订 5：免费版置灰（仍可点 → 弹套餐提示） */
.feed-report-badge.is-locked {
  border-color: hsl(var(--border));
  background: hsl(var(--muted) / 0.45);
  color: hsl(var(--muted-foreground));
  cursor: pointer;
}
.feed-report-badge.is-locked:hover { background: hsl(var(--muted) / 0.7); border-color: hsl(var(--border)); }

/* spec/0240 修订 3：年报弹层（结构化摘要） */
.report-card { width: min(38rem, 92vw); max-height: 84vh; display: flex; flex-direction: column; }
.report-head { display: flex; align-items: flex-start; gap: 0.5rem; }
.report-kind {
  flex-shrink: 0; margin-top: 0.125rem;
  padding: 0.0625rem 0.4375rem; border-radius: 9999px;
  border: 1px solid hsl(var(--primary) / 0.25); background: hsl(var(--primary) / 0.08);
  color: hsl(var(--primary)); font-size: 0.6875rem; font-weight: 700;
}
.report-title { font-size: 1rem; font-weight: 700; line-height: 1.45; color: hsl(var(--foreground)); }
.report-meta { margin-top: 0.375rem; font-size: 0.75rem; color: hsl(var(--muted-foreground)); }
.report-body { margin-top: 0.75rem; overflow-y: auto; }
.report-loading { font-size: 0.875rem; color: hsl(var(--muted-foreground)); padding: 0.75rem 0; }
.report-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.375rem 1rem;
  padding: 0.75rem 0.875rem;
  border: 1px solid hsl(var(--border)); border-radius: calc(var(--radius) - 2px);
  background: hsl(var(--muted) / 0.35);
}
.report-row { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; }
.report-label { font-size: 0.75rem; color: hsl(var(--muted-foreground)); white-space: nowrap; }
.report-value { font-size: 0.8125rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.report-value.is-up { color: hsl(var(--destructive)); }   /* 涨红 */
.report-value.is-down { color: hsl(var(--success)); }     /* 跌绿 */
.report-extra { margin-top: 0.625rem; font-size: 0.6875rem; line-height: 1.7; color: hsl(var(--muted-foreground)); }
/* spec/0240 修订 4：财报弹层的「近几期」小表 */
.report-periods { width: 100%; margin-top: 0.75rem; border-collapse: collapse; font-size: 0.75rem; font-variant-numeric: tabular-nums; }
.report-periods th {
  text-align: right; font-weight: 600; color: hsl(var(--muted-foreground));
  padding: 0.25rem 0.5rem; border-bottom: 1px solid hsl(var(--border));
}
.report-periods th:first-child, .report-periods th:nth-child(2) { text-align: left; }
.report-periods td { text-align: right; padding: 0.3125rem 0.5rem; border-bottom: 1px solid hsl(var(--border) / 0.6); }
.report-periods td:first-child, .report-periods td:nth-child(2) { text-align: left; color: hsl(var(--muted-foreground)); }
.report-card .confirm-actions { margin-top: 0.875rem; }
.feed-action {
  display: inline-flex; align-items: center; gap: 0.25rem;
  font-size: 0.75rem; color: hsl(var(--muted-foreground));
  padding: 0.1875rem 0.5rem; border-radius: 0.5rem; border: 1px solid transparent;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}
.feed-action:hover { color: hsl(var(--primary)); background: hsl(var(--primary) / 0.08); border-color: hsl(var(--primary) / 0.18); }
.feed-action svg { width: 0.875rem; height: 0.875rem; }
/* 资讯订阅按钮（spec/0175）：可点击态 / 已订阅态 / 无权限的禁用态 */
button.feed-action { background: none; border: 1px solid transparent; cursor: pointer; font-family: inherit; }
button.feed-action:disabled { opacity: 0.6; cursor: progress; }
.feed-action.feed-sub.is-on {
  color: hsl(var(--success)); background: hsl(var(--success) / 0.1);
  border-color: hsl(var(--success) / 0.22);
}
.feed-action.is-disabled {
  color: hsl(var(--muted-foreground) / 0.8);
  background: hsl(var(--muted) / 0.45);
  border-color: hsl(var(--border));
  cursor: not-allowed;
}

/* 空态 / 分页 */
.feed-empty {
  display: flex; flex-direction: column; align-items: center; gap: 0.375rem;
  padding: 3rem 1.5rem; text-align: center;
  border: 1px dashed hsl(var(--border));
  border-radius: var(--radius);
  background: hsl(var(--card) / 0.6);
}
.feed-empty-icon {
  display: flex; align-items: center; justify-content: center;
  width: 3rem; height: 3rem; margin-bottom: 0.25rem;
  border-radius: 9999px;
  color: hsl(var(--muted-foreground));
  background: hsl(var(--muted) / 0.6);
}
.feed-empty-icon svg { width: 1.375rem; height: 1.375rem; }
.feed-empty-title { font-size: 0.9375rem; font-weight: 600; color: hsl(var(--foreground)); }
.feed-empty-sub { font-size: 0.8125rem; color: hsl(var(--muted-foreground)); }
.feed-pager {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding-top: 0.25rem;
}
.feed-pager-info { font-size: 0.75rem; color: hsl(var(--muted-foreground)); font-variant-numeric: tabular-nums; }

/* 右侧栏 */
.feed-side { display: flex; flex-direction: column; gap: 1rem; position: sticky; top: 5rem; }
.feed-card {
  padding: 1.125rem;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  background: hsl(var(--card));
  box-shadow: 0 1px 2px hsl(var(--foreground) / 0.04);
}
.feed-card-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.875rem; }
.feed-card-title {
  display: inline-flex; align-items: center; gap: 0.4375rem;
  font-size: 0.8125rem; font-weight: 700; color: hsl(var(--foreground));
}
.feed-card-title::before {
  content: ""; width: 0.1875rem; height: 0.875rem; border-radius: 9999px;
  background: linear-gradient(180deg, hsl(var(--primary)), hsl(var(--primary) / 0.35));
}
.feed-card-tag {
  font-size: 0.625rem; font-weight: 700; letter-spacing: 0.06em;
  color: hsl(var(--primary)); background: hsl(var(--primary) / 0.1);
  padding: 0.125rem 0.375rem; border-radius: 9999px;
}
/* 会员套餐（spec/0169：替换原「今日概览」卡） */
.feed-card-plan { background: linear-gradient(180deg, hsl(var(--primary) / 0.06), hsl(var(--card)) 42%); }
.feed-plans { display: flex; flex-direction: column; gap: 0.5rem; }
.feed-plan {
  padding: 0.75rem 0.875rem;
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) - 0.375rem);
  background: hsl(var(--card));
}
.feed-plan-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; }
.feed-plan-name {
  display: inline-flex; align-items: center; gap: 0.375rem;
  font-size: 0.875rem; font-weight: 700; color: hsl(var(--foreground));
}
.feed-plan-price {
  font-size: 1.25rem; font-weight: 800; line-height: 1;
  color: hsl(var(--primary)); font-variant-numeric: tabular-nums;
}
/* 免费版：价格用弱化色，避免和收费档抢视线 */
.feed-plan-price.is-free { font-size: 1rem; color: hsl(var(--muted-foreground)); }
/* spec/0176：当前套餐高亮 + 「当前套餐」徽章 + 本月剩余天数进度条 */
.feed-plan.is-current {
  border-color: hsl(var(--primary) / 0.5);
  background: hsl(var(--primary) / 0.04);
  box-shadow: inset 0 0 0 1px hsl(var(--primary) / 0.12);
}
.feed-plan-badge {
  font-size: 0.625rem; font-weight: 700; line-height: 1.4;
  padding: 0.0625rem 0.3125rem;
  border-radius: 0.3125rem;
  color: hsl(var(--primary-foreground));
  background: hsl(var(--primary));
}
.feed-plan-progress { margin-top: 0.625rem; }
.feed-plan-progress-head {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  margin-bottom: 0.3125rem;
  font-size: 0.6875rem; color: hsl(var(--muted-foreground));
}
.feed-plan-progress-pct { font-weight: 700; color: hsl(var(--primary)); font-variant-numeric: tabular-nums; }
.feed-plan-progress-track {
  height: 0.3125rem;
  border-radius: 9999px;
  background: hsl(var(--muted));
  overflow: hidden;
}
.feed-plan-progress-fill {
  height: 100%;
  border-radius: 9999px;
  background: linear-gradient(90deg, hsl(var(--primary) / 0.65), hsl(var(--primary)));
  transition: width 0.3s ease;
}
/* spec/0176 追加：套餐支付弹窗（模拟）——支付方式选择 + 模拟二维码 */
.pay-methods { display: flex; align-items: center; justify-content: center; gap: 0.625rem; }
.pay-method {
  display: inline-flex; align-items: center; gap: 0.375rem;
  padding: 0.5rem 0.875rem;
  font-size: 0.8125rem; font-weight: 600;
  color: hsl(var(--muted-foreground));
  border: 1px solid hsl(var(--border));
  border-radius: 0.625rem;
  background: hsl(var(--card));
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}
.pay-method-dot { width: 0.5rem; height: 0.5rem; border-radius: 9999px; background: currentColor; opacity: 0.55; }
.pay-method:hover { border-color: hsl(var(--primary) / 0.4); }
.pay-method.is-wechat.is-active { color: #07c160; border-color: #07c160; background: rgb(7 193 96 / 0.08); }
.pay-method.is-alipay.is-active { color: #1677ff; border-color: #1677ff; background: rgb(22 119 255 / 0.08); }
.pay-qr.is-wechat { color: #07c160; }
.pay-qr.is-alipay { color: #1677ff; }
.feed-plan-unit { margin-left: 0.125rem; font-size: 0.6875rem; font-weight: 600; color: hsl(var(--muted-foreground)); }
.feed-plan-foot { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-top: 0.375rem; }
.feed-plan-desc { font-size: 0.75rem; line-height: 1.5; color: hsl(var(--muted-foreground)); }
/* 套餐标注（spec/0172：实惠之选 / 土豪必备 / 此生必驾）**跟在版本名后面**；无默认选中 */
.feed-plan-tag {
  flex-shrink: 0;
  font-size: 0.6875rem; font-weight: 700;
  padding: 0.0625rem 0.375rem; border-radius: 0.375rem;
  color: hsl(var(--primary)); background: hsl(var(--primary) / 0.1);
  border: 1px solid hsl(var(--primary) / 0.18);
}
/* 每个版本的「续费」按钮（spec/0172；当前指向充值/计费页 /billing） */
.feed-plan-btn {
  flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  height: 1.625rem; padding: 0 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem; font-weight: 600;
  color: hsl(var(--primary-foreground));
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--primary) / 0.82));
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.feed-plan-btn:hover { opacity: 0.9; transform: translateY(-1px); }
/* spec/0176 修正：登录后套餐按钮是 <button>，浏览器默认会给一圈粗边框（且字体不回继承），
   这里抹平默认样式，保证与未登录时的 <a> 外观完全一致 */
button.feed-plan-btn {
  border: 0;
  font-family: inherit;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.feed-note { font-size: 0.75rem; line-height: 1.7; color: hsl(var(--muted-foreground)); }

/* 信息社区类型筛选（spec/0165）：比页签小一号的浅色胶囊 */
.feed-type-tabs { gap: 0.375rem; }
.notif-tab-sm { height: 1.625rem; padding: 0 0.625rem; font-size: 0.75rem; }
.feed-toolbar .notif-tab-sm.notif-tab-active {
  background: hsl(var(--primary) / 0.12);
  border-color: hsl(var(--primary) / 0.45);
  color: hsl(var(--primary));
  box-shadow: none;
}

/* 窄屏：类型筛选与统计块自动换行 */
@media (max-width: 640px) {
  .feed-hero-title { font-size: 1.5rem; }
  .feed-hero-stats { width: 100%; }
  .feed-hero-stat { flex: 1 1 45%; min-width: 0; }
}


/* 分页（spec/41） */
.pagination { display: flex; align-items: center; justify-content: center; gap: 0.75rem; }
.pagination-btn {
  display: inline-flex; align-items: center;
  height: 2rem; padding: 0 0.875rem;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid hsl(var(--input));
  background: hsl(var(--card));
  color: hsl(var(--foreground));
  font-size: 0.875rem;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.pagination-btn:hover { background: hsl(var(--accent)); border-color: hsl(var(--border)); }
.pagination-btn-disabled { opacity: 0.45; pointer-events: none; }
.pagination-info { font-size: 0.8125rem; color: hsl(var(--muted-foreground)); }

/* ---------- 账户模块页面（spec/30） ---------- */
/* 账号信息 */
.account-avatar {
  display: flex; align-items: center; justify-content: center;
  width: 5rem; height: 5rem; border-radius: 9999px;
  background: hsl(var(--primary) / 0.1); color: hsl(var(--primary));
  font-size: 2rem; font-weight: 700; flex-shrink: 0; position: relative;
  box-shadow: 0 0 0 4px hsl(var(--border));
}
.account-avatar-edit {
  position: absolute; inset: 0; border-radius: 9999px;
  background: rgb(0 0 0 / 0.4); color: #fff;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.15s ease; cursor: pointer;
}
.account-avatar-edit:hover { opacity: 1; }
.account-avatar-edit svg { width: 1.25rem; height: 1.25rem; }
.icon-tile {
  display: flex; align-items: center; justify-content: center;
  width: 2.25rem; height: 2.25rem; border-radius: 0.5rem;
  background: hsl(var(--primary) / 0.1); color: hsl(var(--primary));
  flex-shrink: 0;
}
.icon-tile svg { width: 1rem; height: 1rem; }
.btn-destructive {
  background: hsl(var(--destructive)); color: hsl(var(--destructive-foreground));
}
.btn-destructive:hover { opacity: 0.9; }
/* 2FA 开关 */
.switch { position: relative; display: inline-block; width: 2.75rem; height: 1.5rem; flex-shrink: 0; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch-track {
  position: absolute; inset: 0; border-radius: 9999px;
  background: hsl(var(--muted)); transition: background-color 0.2s ease; pointer-events: none;
}
.switch-thumb {
  position: absolute; top: 0.25rem; left: 0.25rem;
  width: 1rem; height: 1rem; border-radius: 9999px;
  background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / 0.2);
  transition: transform 0.2s ease; pointer-events: none;
}
.switch input:checked ~ .switch-track { background: hsl(var(--primary)); }
.switch input:checked ~ .switch-thumb { transform: translateX(1.25rem); }
/* 小号开关（spec/0067：订阅列表邮件通知开关） */
.switch-sm { width: 2rem; height: 1.125rem; }
.switch-sm .switch-thumb { width: 0.75rem; height: 0.75rem; top: 0.1875rem; left: 0.1875rem; }
.switch-sm input:checked ~ .switch-thumb { transform: translateX(0.875rem); }

/* 账号设置 */
.textarea {
  width: 100%; height: auto; min-height: 6rem;
  padding: 0.75rem; border-radius: calc(var(--radius) - 2px);
  border: 1px solid hsl(var(--border));
  background: hsl(var(--background)); color: hsl(var(--foreground));
  font-size: 0.875rem; font-family: inherit; outline: none; resize: vertical;
}
.textarea::placeholder { color: hsl(var(--muted-foreground)); }
.textarea:focus { border-color: hsl(var(--primary)); box-shadow: 0 0 0 2px hsl(var(--primary) / 0.15); }

/* 通知 */
.notif-tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.notif-tab {
  display: inline-flex; align-items: center;
  height: 2rem; padding: 0 0.875rem; border-radius: 9999px;
  border: 1px solid hsl(var(--border)); background: hsl(var(--card));
  color: hsl(var(--muted-foreground)); font-size: 0.8125rem; cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.notif-tab:hover { background: hsl(var(--accent)); }
.notif-tab-active { background: hsl(var(--primary)); border-color: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }

/* 订阅页 Break 列表页签（spec/0060） */
.subs-break-tabs { display: flex; flex-direction: column; gap: 0.875rem; }
.subs-tab-panel { display: flex; flex-direction: column; gap: 0.5rem; min-width: 0; }
.subs-tab-panel.hidden { display: none; }
.notif-group-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.5rem 0.75rem; border-bottom: 1px solid hsl(var(--border));
  background: hsl(var(--muted) / 0.4);
}
.notif-group-title { font-weight: 600; font-size: 0.875rem; }
.notif-list { display: flex; flex-direction: column; }
.notif-list .notif-item + .notif-item { border-top: 1px solid hsl(var(--border)); }
.notif-item {
  display: flex; align-items: flex-start; gap: 0.75rem;
  width: 100%; padding: 0.875rem; border: none; background: transparent;
  text-align: left; cursor: pointer; font-family: inherit;
  transition: background-color 0.15s ease;
}
.notif-item:hover { background: hsl(var(--accent) / 0.5); }
.notif-item[data-unread="true"] { background: hsl(var(--accent) / 0.4); }
.notif-dot { width: 0.5rem; height: 0.5rem; border-radius: 9999px; background: hsl(var(--chart-2)); flex-shrink: 0; margin-top: 0.375rem; }
.notif-item[data-unread="true"] .notif-dot { background: hsl(var(--primary)); }
.notif-main { display: flex; flex-direction: column; flex: 1; min-width: 0; gap: 0.25rem; }
.notif-head { display: flex; align-items: center; gap: 0.5rem; min-width: 0; }
.notif-title { font-size: 0.875rem; font-weight: 500; color: hsl(var(--foreground)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif-time { font-size: 0.75rem; color: hsl(var(--muted-foreground)); white-space: nowrap; margin-left: auto; }
.notif-body { font-size: 0.8125rem; color: hsl(var(--foreground)); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* 团队 */
.badge-soft-primary { background: hsl(var(--primary) / 0.12); color: hsl(var(--primary)); }
.member-avatar-wrap { position: relative; flex-shrink: 0; }
.member-avatar {
  display: flex; align-items: center; justify-content: center;
  width: 2.5rem; height: 2.5rem; border-radius: 0.75rem;
  font-size: 0.75rem; font-weight: 600;
  background: hsl(var(--secondary)); color: hsl(var(--secondary-foreground));
}
.member-avatar-1 { background: hsl(var(--primary) / 0.15); color: hsl(var(--primary)); }
.member-avatar-2 { background: hsl(var(--success) / 0.15); color: hsl(var(--success)); }
.member-avatar-3 { background: hsl(var(--warning) / 0.15); color: hsl(var(--warning)); }
.member-avatar-4 { background: hsl(var(--accent)); color: hsl(var(--accent-foreground)); }
.member-avatar-img { object-fit: cover; border-radius: 0.75rem; }
.invite-avatar-img {
  width: 2.5rem; height: 2.5rem; border-radius: 0.75rem;
  object-fit: cover; flex-shrink: 0;
}
.member-status-dot {
  position: absolute; right: -0.125rem; bottom: -0.125rem;
  width: 0.75rem; height: 0.75rem; border-radius: 9999px;
  border: 2px solid hsl(var(--card));
}
.member-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem; transition: background-color 0.15s ease; }
.member-row:hover { background: hsl(var(--accent) / 0.4); }
.member-row + .member-row { border-top: 1px solid hsl(var(--border)); }
.invite-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem; }
.invite-row + .invite-row { border-top: 1px dashed hsl(var(--border)); }
.team-notice-row { align-items: flex-start; }
.dashed-border { border: 1px dashed hsl(var(--border)); }
.invite-icon {
  display: flex; align-items: center; justify-content: center;
  width: 2.5rem; height: 2.5rem; border-radius: 0.75rem;
  background: hsl(var(--muted)); color: hsl(var(--muted-foreground)); flex-shrink: 0;
}
.invite-icon svg { width: 1rem; height: 1rem; }

/* 团队聊天室（spec/75：右列，固定高度自带滚动条，底部输入发送；spec/75 样式增强：边框/背景层次） */
.team-chat-box {
  height: 32rem;
  border-color: hsl(var(--border));
  background: linear-gradient(180deg, hsl(var(--card)), hsl(var(--muted) / 0.25));
  box-shadow: 0 4px 16px -8px rgb(0 0 0 / 0.08);
}
.team-chat-list {
  flex: 1; overflow-y: auto; min-height: 0;
  padding: 1rem; display: flex; flex-direction: column; gap: 0.75rem;
  background: hsl(var(--muted) / 0.12);
}
.team-chat-msg { max-width: 92%; display: flex; gap: 0.625rem; }
.team-chat-msg.team-chat-msg-mine { align-self: flex-end; flex-direction: row-reverse; }
.team-chat-msg-avatar {
  width: 2rem; height: 2rem; border-radius: 9999px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: hsl(var(--primary) / 0.12); color: hsl(var(--primary));
  border: 1px solid hsl(var(--primary) / 0.2);
  font-size: 0.75rem; font-weight: 700;
}
.team-chat-msg-mine .team-chat-msg-avatar { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); border-color: hsl(var(--primary)); }
.team-chat-msg-avatar-img {
  width: 2rem; height: 2rem; border-radius: 9999px; flex-shrink: 0;
  object-fit: cover; border: 1px solid hsl(var(--border));
}
.team-chat-msg-body { min-width: 0; display: flex; flex-direction: column; gap: 0.125rem; }
.team-chat-msg-meta { font-size: 0.6875rem; color: hsl(var(--muted-foreground)); display: flex; align-items: baseline; gap: 0.375rem; }
.team-chat-msg-mine .team-chat-msg-meta { justify-content: flex-end; }
.team-chat-msg-name { font-weight: 600; color: hsl(var(--primary)); }
.team-chat-msg-bubble {
  padding: 0.5rem 0.75rem; border-radius: 0.875rem;
  background: hsl(var(--card)); color: hsl(var(--foreground));
  border: 1px solid hsl(var(--border));
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
  font-size: 0.8125rem; line-height: 1.6; word-break: break-word;
  border-top-left-radius: 0.25rem;
}
.team-chat-msg-mine .team-chat-msg-bubble {
  background: hsl(var(--primary) / 0.1); color: hsl(var(--foreground));
  border-color: hsl(var(--primary) / 0.35);
  border-top-left-radius: 0.875rem; border-top-right-radius: 0.25rem;
}
.team-chat-input {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem; border-top: 1px solid hsl(var(--border));
  background: hsl(var(--card));
}
.team-chat-input .input { flex: 1; min-width: 0; }
/* 通道指标趋势图（spec/0080/81：三线趋势图 + Y 轴刻度 + 图例 + 时间刻度） */
.band-chart-wrap { position: relative; width: 100%; height: 17rem; padding: 0.5rem 0.5rem 0; }
.band-chart-svg { display: block; width: 100%; height: 100%; }
.band-y-axis { position: absolute; left: 0.25rem; top: 0.625rem; bottom: 2.25rem; width: 3rem; pointer-events: none; }
.band-y-axis span { position: absolute; right: 0; transform: translateY(-50%); font-size: 0.625rem; color: hsl(var(--muted-foreground)); white-space: nowrap; }
.band-chart-dates { display: flex; justify-content: space-between; padding: 0.25rem 0.375rem 0; font-size: 0.6875rem; color: hsl(var(--muted-foreground)); }
/* 图例：X 轴（时间刻度）下方居中（spec/0080：不遮挡坐标文字；margin-top 25px） */
.band-legend {
  display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap;
  margin-top: 1.5625rem;
  padding: 0.5rem 0.75rem 0.625rem;
  font-size: 0.75rem; color: hsl(var(--muted-foreground));
}
.band-legend-item { display: inline-flex; align-items: center; gap: 0.375rem; }
.band-legend-item i { width: 0.75rem; height: 0.1875rem; border-radius: 9999px; display: inline-block; }

/* 通道指标：创新高/创新低整点小时占比（spec/0271） */
.subs-session-share-chart { width: 100%; padding: 0.5rem 0.75rem 0.25rem; overflow-x: auto; }
.subs-session-share-svg { display: block; width: 100%; height: auto; max-height: 28rem; }
.subs-session-share-svg-wide { width: auto; min-width: 64rem; max-height: none; height: 28rem; }
.subs-session-share-empty { padding: 2.5rem 1rem; text-align: center; }
.subs-session-share-title { font-size: 0.9375rem; font-weight: 600; color: hsl(var(--foreground)); margin-bottom: 0.5rem; }
.subs-ss-title { font-size: 18px; font-weight: 700; fill: hsl(var(--foreground)); }
.subs-ss-tick, .subs-ss-legend, .subs-ss-barlabel, .subs-ss-xlabel, .subs-ss-ylabel { font-size: 12px; fill: hsl(var(--foreground)); }
.subs-ss-tick { font-size: 11px; fill: hsl(var(--muted-foreground)); }
.subs-ss-barlabel { font-size: 11px; fill: hsl(var(--foreground)); }
.subs-ss-legend { fill: hsl(var(--muted-foreground)); }
.subs-ss-grid { stroke: hsl(var(--border)); stroke-width: 1; }
.subs-ss-axis { stroke: hsl(var(--muted-foreground)); stroke-width: 1.2; }
/* 订阅页波段折线图（spec/0278） */
.subs-wave-card { margin-bottom: 1rem; }
.subs-wave-head {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 0.5rem 0.75rem; border-bottom: 1px solid hsl(var(--border));
}
.subs-wave-title { font-size: 0.875rem; font-weight: 600; color: hsl(var(--foreground)); }
.subs-wave-actions { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.subs-wave-actions .btn { white-space: nowrap; }
.subs-wave-note-head { font-size: 0.75rem; color: hsl(var(--muted-foreground)); white-space: nowrap; }
.subs-wave-chart { width: 100%; min-height: 13.5rem; }
.subs-wave-svg { display: block; width: 100%; height: auto; }
/* body 级价格浮层：结构图卡片 overflow:hidden，不能画在卡内（spec/0280） */
.subs-wave-pt-tip {
  position: fixed; z-index: 120;
  transform: translate(-50%, calc(-100% - 8px));
  padding: 0.2rem 0.45rem;
  border-radius: 0.375rem;
  background: hsl(var(--card));
  color: hsl(var(--foreground));
  border: 1px solid hsl(var(--border));
  box-shadow: 0 8px 24px -6px rgb(0 0 0 / 0.18);
  font-size: 0.75rem; font-weight: 600; line-height: 1.3;
  white-space: nowrap;
  opacity: 0; pointer-events: none;
}
.subs-wave-pt-tip.show { opacity: 1; }
.subs-wave-empty { padding: 2.25rem 1rem; text-align: center; font-size: 0.875rem; color: hsl(var(--muted-foreground)); }
.subs-wave-grid { stroke: hsl(var(--border)); stroke-width: 1; }
.subs-wave-axis { stroke: hsl(var(--muted-foreground) / 0.45); stroke-width: 1; }
.subs-wave-tick { font-size: 10px; fill: hsl(var(--muted-foreground)); }
.subs-wave-seg { fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.5; }
.subs-wave-seg.is-up { stroke: hsl(var(--destructive)); }
.subs-wave-seg.is-down { stroke: hsl(var(--success)); }
.subs-wave-seg.is-current { stroke-width: 2.75; }
.subs-wave-pt { stroke: hsl(var(--card)); stroke-width: 1.5; }
/* 透明命中区不改变可见点外观，只方便悬停（spec/0280） */
.subs-wave-pt-hit { fill: #000; fill-opacity: 0; stroke: none; }
.subs-wave-pt.is-up { fill: hsl(var(--destructive)); }
.subs-wave-pt.is-down { fill: hsl(var(--success)); }
.subs-wave-pt.is-current { stroke-width: 2; }
.subs-wave-seq { font-size: 10px; fill: hsl(var(--muted-foreground)); font-weight: 500; pointer-events: none; }
.subs-wave-seq.is-current { fill: hsl(var(--foreground)); font-weight: 700; }
.subs-wave-p70 { fill: none; stroke: hsl(var(--info)); stroke-width: 1.5; stroke-dasharray: 5 3; }
.subs-wave-p70-tag { fill: hsl(var(--card)); stroke: hsl(var(--info) / 0.4); stroke-width: 0.75; }
.subs-wave-p70-label { font-size: 10px; font-weight: 600; fill: hsl(var(--info)); }
.subs-wave-p70-prev { fill: none; stroke: hsl(var(--muted-foreground)); stroke-width: 1.5; stroke-dasharray: 5 3; }
.subs-wave-p70-prev-tag { fill: hsl(var(--card)); stroke: hsl(var(--muted-foreground) / 0.4); stroke-width: 0.75; }
.subs-wave-p70-prev-label { font-size: 10px; font-weight: 600; fill: hsl(var(--muted-foreground)); }
/* 当前 Ticker 橘红虚线（spec/0281 加线，spec/0282 改为虚线）；不要用 P70 蓝/灰或涨跌色 */
.subs-wave-ticker { fill: none; stroke: hsl(var(--warning)); stroke-width: 1.5; stroke-dasharray: 5 3; }
.subs-wave-ticker-tag { fill: hsl(var(--card)); stroke: hsl(var(--warning) / 0.4); stroke-width: 0.75; }
.subs-wave-ticker-label { font-size: 10px; font-weight: 600; fill: hsl(var(--warning)); }
.subs-wave-note { font-size: 10px; fill: hsl(var(--muted-foreground)); }
.subs-wave-legend { font-size: 10px; fill: hsl(var(--muted-foreground)); }
.subs-wave-path-seg { fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.15; }
.subs-wave-path-seg.is-up { stroke: hsl(var(--destructive)); }
.subs-wave-path-seg.is-down { stroke: hsl(var(--success)); }
.subs-wave-path-pt { stroke: hsl(var(--card)); stroke-width: 1; }
.subs-wave-path-pt.is-up { fill: hsl(var(--destructive)); }
.subs-wave-path-pt.is-down { fill: hsl(var(--success)); }
@media (max-width: 640px) {
  .subs-wave-chart { min-height: 12rem; }
  .subs-wave-seq, .subs-wave-p70-label, .subs-wave-p70-prev-label, .subs-wave-ticker-label, .subs-wave-tick, .subs-wave-note, .subs-wave-legend { font-size: 9px; }
}

/* 所属团队列表（spec/76：左列顶部，点击切换聊天室） */

.team-tabs { display: flex; flex-direction: column; padding: 0.375rem; gap: 0.25rem; }
.team-tab {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 0.625rem; border-radius: 0.625rem;
  font-size: 0.8125rem; color: hsl(var(--foreground));
  cursor: pointer; transition: background-color 0.15s ease;
  border: 1px solid transparent;
}
.team-tab:hover { background: hsl(var(--accent) / 0.5); }
.team-tab-active { background: hsl(var(--primary) / 0.1); border-color: hsl(var(--primary) / 0.25); }
.team-tab-ico {
  display: flex; align-items: center; justify-content: center;
  width: 1.5rem; height: 1.5rem; border-radius: 9999px; flex-shrink: 0;
  background: hsl(var(--primary) / 0.12); color: hsl(var(--primary));
}
.team-tab-ico svg { width: 0.875rem; height: 0.875rem; }
.team-tab-name { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-tab-owner { font-size: 0.625rem; color: hsl(var(--warning)); flex-shrink: 0; }
/* 团队页左列卡片层次（spec/75：避免页面过白） */
.lg-col-span-2 .rounded-2xl { box-shadow: 0 2px 10px -6px rgb(0 0 0 / 0.08); }

/* ---------- 活动日志（spec/32） ---------- */
.activity-list > .activity-row + .activity-row { border-top: 1px solid hsl(var(--border)); }
.activity-row {
  display: flex; align-items: flex-start; gap: 0.75rem;
  padding: 1rem; transition: background-color 0.15s ease;
}
.activity-row:hover { background: hsl(var(--accent) / 0.5); }
@media (min-width: 640px) { .activity-row { gap: 1rem; padding: 1rem 1.5rem; } }
.activity-tile {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.25rem; height: 2.25rem; border-radius: 0.5rem;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--muted)); color: hsl(var(--muted-foreground));
  flex-shrink: 0;
}
.activity-tile svg { width: 1rem; height: 1rem; }
.activity-tile-warning {
  background: hsl(var(--warning) / 0.1); color: hsl(var(--warning));
  border-color: hsl(var(--warning) / 0.2);
}
.activity-tile-danger {
  background: hsl(var(--destructive) / 0.1); color: hsl(var(--destructive));
  border-color: hsl(var(--destructive) / 0.2);
}

/* ---------- 订阅计费（spec/32） ---------- */
@media (min-width: 1024px) { .lg-col-span-2 { grid-column: span 2 / span 2; } }
.billing-alert {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem; border-radius: var(--radius);
  background: hsl(var(--warning) / 0.1); border: 1px solid hsl(var(--warning) / 0.25);
}
.billing-label {
  font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.05em; color: hsl(var(--muted-foreground));
}

/* ---------- 更新日志（spec/34） ---------- */
.timeline-line { position: absolute; left: 7px; top: 0.5rem; bottom: 0.5rem; width: 1px; background: hsl(var(--border)); }
.timeline-stack { display: flex; flex-direction: column; gap: 2.5rem; }
.timeline-item { position: relative; padding-left: 2rem; }
.timeline-dot { position: absolute; left: 0; top: 0.375rem; width: 15px; height: 15px; border-radius: 9999px; border: 2px solid hsl(var(--primary)); background: hsl(var(--background)); }
.release-tag { font-size: 0.625rem; text-transform: uppercase; letter-spacing: 0.05em; }
.changelog-list { border-radius: var(--radius); overflow: hidden; }
.changelog-list > .changelog-item + .changelog-item { border-top: 1px solid hsl(var(--border)); }
.changelog-item { display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.75rem 1rem; }
.changelog-item-icon { display: inline-flex; flex-shrink: 0; margin-top: 0.25rem; }
.changelog-item-icon svg { width: 1rem; height: 1rem; }

/* FAQ */
.faq-item { border: 1px solid hsl(var(--border)); border-radius: calc(var(--radius) - 2px); background: hsl(var(--card)); padding: 1.25rem 1.5rem; }
.faq-q { font-weight: 600; font-size: 0.9375rem; background: transparent; border: none; cursor: pointer; padding: 0; gap: 0.5rem; color: hsl(var(--foreground)); }
.faq-q:hover { color: hsl(var(--primary)); }
.faq-a { font-size: 0.875rem; color: hsl(var(--muted-foreground)); margin-top: 0.5rem; }
.accordion-arrow { display: inline-flex; transition: transform 0.2s ease; flex-shrink: 0; }
.accordion-arrow.rotated { transform: rotate(180deg); }

/* ---------- 组件：页脚 ---------- */
.footer { padding: 3rem 1rem; border-top: 1px solid hsl(var(--border)); }
@media (min-width: 1024px) { .footer { padding: 3rem; } }
.footer-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; margin-bottom: 3rem; max-width: 72rem; margin-left: auto; margin-right: auto; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(5, 1fr); } }
.footer-col-title { font-size: 0.875rem; font-weight: 600; margin-bottom: 0.75rem; }
.footer-link { display: block; font-size: 0.75rem; color: hsl(var(--muted-foreground)); padding: 0.375rem 0; transition: color 0.15s ease; }
.footer-link:hover { color: hsl(var(--foreground)); }
.footer-bottom { border-top: 1px solid hsl(var(--border)); padding-top: 2rem; max-width: 72rem; margin: 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 1rem; }
@media (min-width: 640px) { .footer-bottom { flex-direction: row; } }
.footer-note { font-size: 0.75rem; color: hsl(var(--muted-foreground)); }
/* spec/0232：备案信息（页脚 / 登录注册页右下角） */
.beian { font-size: 0.75rem; color: hsl(var(--muted-foreground)); margin: 0; }
.beian a { color: inherit; text-decoration: none; }
.beian a:hover { color: hsl(var(--foreground)); text-decoration: underline; }
/* 登录 / 注册页：备案信息固定在**页面右下角**（浅色背景上，红底上白字看不清；spec/0232 修订） */
.auth-beian-corner { position: absolute; right: 1.5rem; bottom: 1.25rem; }
@media (max-width: 640px) {
  .auth-beian-corner { right: 1rem; bottom: 1rem; }
}
/* spec/0172 追加：页脚去掉四列链接后，品牌 + 说明独占整行 */
.footer-brand { max-width: 72rem; margin: 0 auto 3rem; }

/* 状态点 */
.dot { width: 0.5rem; height: 0.5rem; border-radius: 9999px; display: inline-block; }
.dot-success { background: hsl(var(--success)); }
.dot-warning { background: hsl(var(--warning)); }
.dot-muted { background: hsl(var(--chart-2)); }
.ping-wrap { position: relative; display: flex; width: 0.5rem; height: 0.5rem; }
.ping { position: absolute; display: inline-flex; width: 100%; height: 100%; border-radius: 9999px; background: hsl(var(--success)); opacity: 0.75; animation: ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite; }
@keyframes ping { 75%, 100% { transform: scale(2); opacity: 0; } }
.ping-static { position: relative; display: inline-flex; width: 100%; height: 100%; border-radius: 9999px; background: hsl(var(--success)); }

/* ---------- 组件：认证页（左品牌面板 + 右表单） ---------- */
.auth-shell { display: flex; min-height: 100vh; background: hsl(var(--background)); position: relative; }
.auth-panel {
  display: none;
  position: relative;
  width: 45%;
  background: hsl(var(--primary));
  color: #fff;
  overflow: hidden;
  flex-direction: column;
  justify-content: space-between;
  padding: 3rem;
}
@media (min-width: 1024px) { .auth-panel { display: flex; } }
.auth-panel-decor { position: absolute; inset: 0; pointer-events: none; }
.auth-panel-content { position: relative; z-index: 10; }
.auth-form-side { flex: 1; display: flex; align-items: center; justify-content: center; padding: 1.5rem; }
@media (min-width: 640px) { .auth-form-side { padding: 3rem; } }
.auth-form-wrap { width: 100%; max-width: 28rem; }

/* 状态徽章（MongoDB） */
.status-badge { display: inline-flex; align-items: center; gap: 0.375rem; font-size: 0.75rem; color: hsl(var(--muted-foreground)); }
.status-badge b { font-weight: 600; }

/* ---------- 组件：应用壳（Dashboard） ---------- */
.app-shell { display: flex; min-height: 100vh; width: 100%; background: hsl(var(--background)); }
.sidebar {
  display: none;
  width: 15rem;
  flex-shrink: 0;
  background: hsl(var(--sidebar-background));
  border-right: 1px solid hsl(var(--sidebar-border));
  position: sticky; top: 0; height: 100vh;
  flex-direction: column;
  overflow: visible; /* tooltip 需要溢出可视（spec/15） */
  padding: 0;
  transition: width 0.3s ease;
}
@media (min-width: 1024px) { .sidebar { display: flex; } }
.sidebar-brand-row { display: flex; align-items: center; height: 3.5rem; padding: 0 1rem; flex-shrink: 0; }
.sidebar-brand-row .brand-name { color: hsl(var(--sidebar-foreground)); }
.sidebar-group { margin-bottom: 1.25rem; }
.sidebar-label {
  font-size: 0.6875rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: hsl(var(--muted-foreground) / 0.6);
  padding: 0 0.75rem; margin-bottom: 0.5rem;
}
.sidebar-group-sep {
  display: none;
  margin: 0 auto 0.5rem;
  width: 1.25rem;
  border-top: 1px solid hsl(var(--sidebar-border) / 0.6);
}
.sidebar-item {
  position: relative;
  display: flex; align-items: center; gap: 0.625rem;
  padding: 0.5rem 0.75rem;
  border-radius: calc(var(--radius) - 2px);
  font-size: 0.8125rem;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  transition: background-color 0.15s ease, color 0.15s ease;
  margin-bottom: 0.125rem;
}
.sidebar-item svg { width: 1.125rem; height: 1.125rem; color: hsl(var(--muted-foreground)); flex-shrink: 0; transition: color 0.15s ease; }
.sidebar-item:hover { background: hsl(var(--sidebar-accent) / 0.5); color: hsl(var(--sidebar-foreground)); }
.sidebar-item:hover svg { color: hsl(var(--sidebar-foreground)); }
.sidebar-item-active { background: hsl(var(--sidebar-accent)); color: hsl(var(--sidebar-accent-foreground)); box-shadow: 0 1px 2px rgb(0 0 0 / 0.08); }
.sidebar-item-active svg { color: hsl(var(--sidebar-primary)); }
.sidebar-item-bar {
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 1rem; border-radius: 0 9999px 9999px 0;
  background: hsl(var(--sidebar-primary));
}
.sidebar-item:not(.sidebar-item-active) .sidebar-item-bar { display: none; }
/* 团队未读红点（spec/0092：新聊天/待处理申请时显示，进入团队页消失） */
.sidebar-item-badge {
  margin-left: auto;
  min-width: 1rem; height: 1rem;
  padding: 0 0.25rem;
  border-radius: 9999px;
  background: hsl(var(--destructive));
  color: hsl(var(--destructive-foreground));
  font-size: 0.625rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.sidebar-collapsed .sidebar .sidebar-item-badge { display: none; }

/* spec/0161：`min-width: 0` —— `.app-main` 是 flex 项（`flex: 1`，默认 `min-width: auto`），
   若不显式归零，内部「最小内容宽度」较大的块（如跑马灯轨道 `width: max-content`）会把整列撑宽，
   在笔记本屏幕上导致**整页横向滚动条**；归零后由 `.content-area` 的 `overflow-x: hidden` 正常裁切。 */
.app-main { flex: 1; display: flex; flex-direction: column; min-height: 100vh; min-width: 0; }
/* 顶栏固定（对齐参考模板 TopNav fixed top-0，搜索/通知不随页面滚动） */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  position: fixed; top: 0; right: 0; left: 15rem;
  z-index: 30;
  height: 4rem;
  border-bottom: 1px solid hsl(var(--border));
  background: hsl(var(--card));
  padding: 0 1rem;
  flex-shrink: 0;
}
@media (min-width: 640px) { .topbar { padding: 0 1.5rem; } }
.sidebar-collapsed .topbar { left: 4.25rem; }
.search-box {
  display: flex; align-items: center; gap: 0.5rem;
  width: 2.25rem; height: 2.25rem;
  justify-content: center;
  border-radius: 9999px;
  border: none;
  background: hsl(var(--secondary));
  color: hsl(var(--muted-foreground));
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.search-box:hover { background: hsl(var(--secondary) / 0.8); }
@media (min-width: 1024px) {
  .search-box { width: 100%; max-width: 28rem; height: auto; justify-content: flex-start; border-radius: 0.5rem; padding: 0.5rem 0.75rem; font-size: 0.875rem; }
}
.search-box svg { width: 1rem; height: 1rem; flex-shrink: 0; }
.kbd {
  display: inline-flex; align-items: center; gap: 0.25rem;
  height: 1.25rem; padding: 0 0.375rem;
  border: 1px solid hsl(var(--border));
  border-radius: 0.25rem;
  background: hsl(var(--muted));
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.625rem;
  color: hsl(var(--muted-foreground));
  margin-left: auto;
}
.icon-btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 2rem; height: 2rem;
  border-radius: calc(var(--radius) - 2px);
  color: hsl(var(--foreground));
  background: transparent;
  border: none;
  transition: background-color 0.15s ease;
}
.icon-btn:hover { background: hsl(var(--accent)); }
.icon-btn svg { width: 1rem; height: 1rem; }

/* spec/0140：交易设置「止盈/止损比例」拉条（0~100 整数；轨道 + 圆形把手，主题色，各浏览器观感一致）
   spec/0141：宽度收短到 5rem */
input[type="range"].range {
  -webkit-appearance: none;
  appearance: none;
  /* spec/0144：拉条略放宽（4rem → 5rem）；与「保存」按钮同排仍在单行内 */
  width: 5rem;
  height: 1.25rem;
  background: transparent;
  cursor: pointer;
}
input[type="range"].range::-webkit-slider-runnable-track {
  height: 0.375rem;
  border-radius: 9999px;
  background: hsl(var(--muted));
}
input[type="range"].range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  margin-top: -0.3125rem;
  width: 1rem; height: 1rem;
  border-radius: 9999px;
  background: hsl(var(--primary));
  border: 2px solid hsl(var(--background));
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.2);
}
input[type="range"].range::-moz-range-track {
  height: 0.375rem;
  border-radius: 9999px;
  background: hsl(var(--muted));
}
input[type="range"].range::-moz-range-thumb {
  width: 1rem; height: 1rem;
  border-radius: 9999px;
  background: hsl(var(--primary));
  border: 2px solid hsl(var(--background));
}
input[type="range"].range:focus-visible { outline: 2px solid hsl(var(--ring)); outline-offset: 2px; }

/* spec/0141：交易设置单行布局的窄控件——买卖数量输入只需 3 位数宽；交易模式下拉只需两个字宽 */
.subs-vol-input { width: 4rem !important; }
.subs-dir-select { width: 5rem !important; padding-right: 1.125rem; }
/* spec/0143：「保存」按钮缩小（文案两字 + 更小内边距/高度） */
.subs-save-btn { height: 1.75rem; padding: 0 0.625rem; font-size: 0.8125rem; }
/* spec/0146：配置组之间的灰色竖线分隔（用 ::before 画，不额外占 flex 子项、不加间隙） */
.subs-sep { position: relative; padding-left: 0.375rem; }
.subs-sep::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 1.25rem;
  background: hsl(var(--muted-foreground) / 0.35);
}
.badge-dot { position: absolute; top: 0.25rem; right: 0.25rem; width: 0.5rem; height: 0.5rem; border-radius: 9999px; background: hsl(var(--primary)); }

.content-area { flex: 1; padding: 1rem; margin-top: 4rem; overflow-x: hidden; }
@media (min-width: 640px) { .content-area { padding: 1.5rem; } }
.content-inner { max-width: 80rem; margin: 0 auto; width: 100%; }

/* 指标卡 */
.stat-card { padding: 1.25rem; border-radius: var(--radius); border: 1px solid hsl(var(--border)); background: hsl(var(--card)); }
.stat-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.75rem; }
.stat-card-label { font-size: 0.875rem; font-weight: 500; }
.stat-card-value { font-size: 1.875rem; font-weight: 700; display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.25rem; }

/* 列头点击排序（spec/0096：产品/活跃列表表头链接，当前列高亮 + 箭头） */
.th-sort {
  display: inline-flex; align-items: center; gap: 0.25rem;
  color: inherit; text-decoration: none;
  cursor: pointer;
}
.th-sort:hover { color: hsl(var(--primary)); }
.th-sort-active { color: hsl(var(--primary)); }
.th-sort-arrow { font-size: 0.625rem; line-height: 1; }

/* 订阅详情页（spec/46）：左窄列 + 右侧数据区 */
/* 通知排序开关（spec/0089）：铃铛按钮，点亮=主色 */
.subs-norder-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.75rem; height: 1.75rem;
  border-radius: calc(var(--radius) - 2px);
  color: hsl(var(--muted-foreground));
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.subs-norder-btn:hover { background: hsl(var(--accent)); }
.subs-norder-btn svg { width: 0.9375rem; height: 0.9375rem; }
.subs-norder-btn.subs-norder-active { color: hsl(var(--primary)); }
.subs-sidebar {
  width: 13rem;
  flex-shrink: 0;
  border-radius: var(--radius);
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
  overflow: hidden;
  position: sticky;
  top: 1rem;
  display: flex;
  flex-direction: column;
}
.subs-list { padding: 0 0.5rem 0.5rem; }
.subs-row {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.625rem;
  border-radius: calc(var(--radius) - 2px);
  color: hsl(var(--foreground));
  transition: background-color 0.15s ease;
}
.subs-row + .subs-row { border-top: 1px solid hsl(var(--border) / 0.6); }
.subs-row:hover { background: hsl(var(--accent) / 0.4); }
.subs-row-active { background: hsl(var(--primary) / 0.1); }
.subs-row-active:hover { background: hsl(var(--primary) / 0.15); }
/* spec/0238：置顶的订阅行 —— **只保留左侧主色竖条**（spec/0238 修订 3：去掉淡主色底，
   底色让给「hover / 选中」这两套既有样式，避免与选中态重复、打架） */
.subs-row-pinned { box-shadow: inset 2px 0 0 hsl(var(--primary)); }
/* 行右侧动作区：图钉 + 邮件通知开关（spec/0238） */
/* position: relative 供「点击行 loading 圈」绝对定位（不参与布局，spec/0238 修订 2） */
.subs-row-actions { position: relative; display: flex; align-items: center; gap: 0.375rem; margin-left: auto; flex-shrink: 0; }
.subs-top-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.375rem; height: 1.375rem; padding: 0;
  border: 0; border-radius: 0.375rem; background: transparent;
  color: hsl(var(--muted-foreground) / 0.7);
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.subs-top-btn svg { width: 0.875rem; height: 0.875rem; }
.subs-top-btn:hover { color: hsl(var(--foreground)); background: hsl(var(--accent) / 0.7); }
.subs-top-btn.is-on { color: hsl(var(--primary)); }
.subs-top-btn:disabled { opacity: 0.5; cursor: default; }
.subs-avatar {
  display: flex; align-items: center; justify-content: center;
  width: 2rem; height: 2rem; border-radius: 0.625rem;
  font-size: 0.75rem; font-weight: 600;
  flex-shrink: 0;
}
.subs-avatar-1 { background: hsl(var(--primary) / 0.15); color: hsl(var(--primary)); }
.subs-avatar-2 { background: hsl(var(--success) / 0.15); color: hsl(var(--success)); }
.subs-avatar-3 { background: hsl(var(--warning) / 0.15); color: hsl(var(--warning)); }
.subs-avatar:not(.subs-avatar-1):not(.subs-avatar-2):not(.subs-avatar-3) { background: hsl(var(--accent)); color: hsl(var(--accent-foreground)); }
.subs-row-name { font-size: 0.8125rem; font-weight: 600; line-height: 1.3; }
.subs-row-code { font-size: 0.6875rem; color: hsl(var(--muted-foreground)); }
.subs-row-active .subs-row-code { color: hsl(var(--primary) / 0.8); }
/* 已开启自动买/卖的订阅：名称旁小机器人图标（spec/0103） */
.subs-auto-ico { display: inline-flex; align-items: center; vertical-align: -0.125em; margin-left: 0.25rem; color: hsl(var(--primary)); }
.subs-auto-ico svg { width: 0.95em; height: 0.95em; }
/* 有持仓的订阅：名称旁钱袋图标（spec/0156；琥珀色与自动交易机器人区分） */
.subs-hold-ico { display: inline-flex; align-items: center; vertical-align: -0.125em; margin-left: 0.25rem; color: hsl(var(--warning)); }
.subs-hold-ico svg { width: 0.95em; height: 0.95em; }
/* 名称/编码复制气泡（spec/0095）：点击复制后元素上方显示「已复制」，2 秒淡出 */
.copy-tip {
  position: fixed;
  z-index: 100;
  padding: 0.25rem 0.625rem;
  border-radius: 0.375rem;
  background: hsl(var(--foreground));
  color: hsl(var(--background));
  font-size: 0.6875rem;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateY(3px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.copy-tip.copy-tip-show { opacity: 1; transform: translateY(0); }

/* 点击行 loading（spec/0093；spec/0238 修订 2：改为动作区左侧的伪元素，
   绝对定位 + top 用 calc（不用 transform，避免与旋转动画的 transform 打架）→ 不改变行高/宽度，点击不再抖动 */
.subs-row-loading .subs-row-actions::before {
  content: "";
  position: absolute;
  right: 100%;
  top: calc(50% - 0.375rem);
  margin-right: 0.375rem;
  width: 0.75rem; height: 0.75rem;
  border-radius: 9999px;
  border: 2px solid hsl(var(--primary) / 0.25);
  border-top-color: hsl(var(--primary));
  animation: subs-spin 0.7s linear infinite;
  pointer-events: none;
}
@keyframes subs-spin { to { transform: rotate(360deg); } }
.subs-row-loading .subs-row-name,
.subs-row-loading .subs-row-code { opacity: 0.55; }
/* 订阅行邮件通知开关（spec/0067：贴右，点击切换 eng_subs.notify） */
.subs-notify { margin-left: auto; cursor: pointer; }
/* input 不接收指针事件：点击全部落在 wrap 上，避免浏览器对 checkbox 的预切换
   干扰手动切换逻辑（Chrome 会在 click 捕获前就已切换 checked） */
.subs-notify input { pointer-events: none; }
/* 右上角自动刷新旋转图标（spec/49：Running 动效移至此处） */
.subs-refresh-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: hsl(var(--success));
}
.subs-refresh-icon svg {
  width: 0.9375rem;
  height: 0.9375rem;
  animation: subs-refresh-spin 1s linear infinite;
}
@keyframes subs-refresh-spin {
  to { transform: rotate(360deg); }
}
.subs-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem;
  border-top: 1px solid hsl(var(--border));
}
.subs-pager-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.5rem; height: 1.5rem;
  border-radius: 0.375rem;
  border: 1px solid hsl(var(--input));
  background: hsl(var(--card));
  color: hsl(var(--foreground));
  transition: background-color 0.15s ease;
}
.subs-pager-btn:hover { background: hsl(var(--accent)); }
.subs-pager-btn svg { width: 0.875rem; height: 0.875rem; }
.subs-pager-disabled { opacity: 0.4; pointer-events: none; }
.subs-pager-info { font-size: 0.75rem; color: hsl(var(--muted-foreground)); }

/* 订阅页自动刷新倒计时（spec/46、49） */
.subs-countdown {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: hsl(var(--success));
  min-width: 1.5rem;
  text-align: center;
}
.stat-trend { display: inline-flex; align-items: center; gap: 0.25rem; font-size: 0.75rem; color: hsl(var(--muted-foreground)); }
.stat-trend svg { width: 0.875rem; height: 0.875rem; }
.stat-spark { margin-top: 0.75rem; }
.stat-spark .spark-svg { height: 2.25rem; }
.spark-dates {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 0.25rem;
  font-size: 0.6875rem;
  color: hsl(var(--muted-foreground));
  font-variant-numeric: tabular-nums;
}

/* Dashboard 图表（spec/63/79）：SVG 自适应容器；spec/79 高度 14rem→19rem 保证 x 轴日期显示全 */
.dash-chart-wrap { width: 100%; height: 19rem; }
.dash-chart-svg { display: block; width: 100%; height: 100%; }
/* 大图日期刻度（spec/79：HTML 渲染避免 SVG 拉伸糊字；轻微倾斜 10°） */
.chart-dates {
  display: flex; justify-content: space-between;
  padding: 0.375rem 0.125rem 0;
  font-size: 0.6875rem; color: hsl(var(--muted-foreground));
  height: 1.25rem;
}
.chart-dates span { display: inline-block; transform: rotate(-10deg); white-space: nowrap; }

/* 静态柱状图 */
.bar-chart { display: flex; align-items: flex-end; gap: 0.5rem; height: 12rem; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 0.375rem; height: 100%; justify-content: flex-end; }
.bar { width: 100%; max-width: 2.5rem; border-radius: 0.375rem 0.375rem 0 0; background: hsl(var(--primary) / 0.85); }
.bar-alt { background: hsl(var(--chart-2) / 0.9); }
.bar-label { font-size: 0.6875rem; color: hsl(var(--muted-foreground)); }
.bar-value { font-size: 0.6875rem; color: hsl(var(--muted-foreground)); }

/* 表格 */
.table-wrap { border-radius: var(--radius); border: 1px solid hsl(var(--border)); background: hsl(var(--card)); overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.table thead th {
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: hsl(var(--muted-foreground));
  padding: 0.75rem 1rem;
  border-bottom: 1px solid hsl(var(--border));
  background: hsl(var(--muted) / 0.4);
  white-space: nowrap;
}
.table tbody td { padding: 0.875rem 1rem; border-bottom: 1px solid hsl(var(--border)); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: hsl(var(--accent) / 0.5); }

/* 持仓页账号行点击选中（spec/0102） */
.hold-acct-row { cursor: pointer; }
.hold-acct-row.is-active td { background: hsl(var(--primary) / 0.08); }

/* spec/0122：持仓页账号信息——「更新时间」「风险%」列收窄（内容长度有限：19 字符时间 / 整数百分比），
   缩小列宽与左右内边距，避免账号信息表出现横向滚动条 */
.table .hold-col-time { width: 10.5rem; padding-left: 0.75rem; padding-right: 0.75rem; }
.table .hold-col-risk { width: 5rem; padding-left: 0.75rem; padding-right: 0.75rem; text-align: center; }
/* spec/0128：账户行「浮盈」列（金额两位小数；收窄列宽与内边距，避免新增列后出现横向滚动条） */
.table .hold-col-profit { width: 6.5rem; padding-left: 0.75rem; padding-right: 0.75rem; }
/* spec/0135：账号「状态」列（引擎取数状态灯） */
.table .hold-col-status { width: 3.5rem; padding-left: 0.5rem; padding-right: 0.5rem; }
/* URL 列：最长显示 10rem，超出省略号（完整地址见 title），避免长地址把表格撑宽 */
.table .hold-url { display: block; max-width: 10rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* spec/0211：活跃页合并表头里的「|」分隔符（今日UP|DOWN、月UP|DOWN） */
.th-sort-sep { color: hsl(var(--muted-foreground) / 0.6); margin: 0 0.125rem; }
/* spec/0213：活跃页列表列宽微调 —— 编码列收窄到「足够显示完整编码」，时间列不折行 */
.table.active-list-table .active-code-col { width: 7rem; padding-left: 0.5rem; padding-right: 0.5rem; white-space: nowrap; }
.table.active-list-table th:last-child,
.table.active-list-table td:last-child { white-space: nowrap; }
.table.active-list-table .active-time-col { width: 10.5rem; white-space: nowrap; }
/* spec/0163：活跃页列表由 9 列变 11 列（今日UP/今日DOWN/月UP/月DOWN），
   收紧整表单元格内边距 + 4 个计数列窄内边距并居中，使 1366 笔记本宽度下表格不再横向滚动 */
.table.active-list-table th, .table.active-list-table td { padding-left: 0.625rem; padding-right: 0.625rem; }
.table .active-num-col { padding-left: 0.375rem; padding-right: 0.375rem; text-align: center; white-space: nowrap; }

/* spec/0123：端口页列表收窄「更新时间」「风险%」两列，避免窄屏下出现横向滚动条（口径与持仓页 spec/0122 一致） */
.table .port-col-time { width: 10.5rem; padding-left: 0.75rem; padding-right: 0.75rem; }
.table .port-col-risk { width: 5rem; padding-left: 0.75rem; padding-right: 0.75rem; text-align: center; }
/* spec/0135：端口页「状态」列（引擎取数状态灯） */
.table .port-col-status { width: 3.5rem; padding-left: 0.5rem; padding-right: 0.5rem; }
/* spec/0128：端口页「浮盈」列（口径同持仓页） */
.table .port-col-profit { width: 6.5rem; padding-left: 0.75rem; padding-right: 0.75rem; }
/* spec/0136：端口页列多（12 列），表格左右内边距统一收紧到 0.75rem（与持仓页列宽规则一致），
   把最小内容宽度压到内容区上限（约 1278px）以内，避免出现横向滚动条 */
.table.ports-table th,
.table.ports-table td { padding-left: 0.75rem; padding-right: 0.75rem; }
/* spec/0136：端口页「客户」「URL」列固定宽度 + 省略号——长邮箱/长地址的最小内容宽度会撑宽表格（自动布局下
   `max-width` 拦不住最小内容宽度，必须给显式宽度） */
.table .port-client-name,
.table .port-client-email,
.table .port-url {
  display: block;
  width: 8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.table .port-url { width: 7rem; }
/* spec/0207：端口页上方行可点（点击后下方显示该端口持仓），选中行高亮 —— 与持仓页 `.hold-acct-row` 同一视觉 */
.table.ports-table tbody tr[data-port-pick] { cursor: pointer; }
.table.ports-table tbody tr.is-active td { background: hsl(var(--primary) / 0.08); }

/* 头像 */
.avatar { display: flex; align-items: center; justify-content: center; border-radius: 9999px; background: hsl(var(--secondary)); color: hsl(var(--secondary-foreground)); font-weight: 600; flex-shrink: 0; }
.avatar-sm { width: 2rem; height: 2rem; font-size: 0.75rem; }
.avatar-md { width: 2.5rem; height: 2.5rem; font-size: 0.875rem; }

/* 悬浮按钮 */
.fab {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 50;
  display: flex; align-items: center; gap: 0.5rem;
  border-radius: 9999px;
  border: none;
  background: hsl(var(--primary)); color: hsl(var(--primary-foreground));
  padding: 0.75rem 1.25rem;
  box-shadow: 0 10px 15px -3px hsl(var(--primary) / 0.25);
  font-size: 0.875rem; font-weight: 500;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.fab:hover { transform: scale(1.05); box-shadow: 0 20px 25px -5px hsl(var(--primary) / 0.3); }
.fab svg { width: 1rem; height: 1rem; }

/* 客服浮窗（spec/16，静态演示，不接后台） */
.chat-widget {
  position: fixed;
  bottom: 5.5rem; right: 1.5rem;
  z-index: 55;
  width: 22rem;
  max-width: calc(100vw - 2rem);
  display: none;
  flex-direction: column;
  border-radius: var(--radius);
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
  color: hsl(var(--card-foreground));
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  overflow: hidden;
}
.chat-widget.show { display: flex; animation: chat-in 0.25s ease-out; }
@keyframes chat-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.chat-head {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: hsl(var(--primary)); color: hsl(var(--primary-foreground));
}
.chat-head-avatar {
  display: flex; align-items: center; justify-content: center;
  width: 2rem; height: 2rem; border-radius: 9999px;
  background: hsl(var(--primary-foreground) / 0.15);
  flex-shrink: 0;
}
.chat-head-avatar svg { width: 1rem; height: 1rem; }
.chat-head-title { font-size: 0.875rem; font-weight: 600; }
.chat-head-status { font-size: 0.6875rem; color: hsl(var(--primary-foreground) / 0.75); display: flex; align-items: center; }
.chat-head-close { color: hsl(var(--primary-foreground)); }
.chat-head-close:hover { background: hsl(var(--primary-foreground) / 0.15); }
.chat-head-close svg { width: 1rem; height: 1rem; }
.chat-body {
  display: flex; flex-direction: column; gap: 0.75rem;
  padding: 1rem;
  height: 18rem;
  overflow-y: auto;
}
.chat-msg { display: flex; gap: 0.5rem; align-items: flex-end; max-width: 85%; }
.chat-msg-agent { align-self: flex-start; }
.chat-msg-user { align-self: flex-end; flex-direction: row-reverse; }
.chat-msg-avatar {
  display: flex; align-items: center; justify-content: center;
  width: 1.75rem; height: 1.75rem; border-radius: 9999px;
  background: hsl(var(--secondary)); color: hsl(var(--muted-foreground));
  flex-shrink: 0;
}
.chat-msg-avatar svg { width: 0.875rem; height: 0.875rem; }
.chat-bubble {
  padding: 0.5rem 0.75rem;
  border-radius: 0.75rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  word-break: break-word;
}
.chat-msg-agent .chat-bubble { background: hsl(var(--muted)); color: hsl(var(--muted-foreground)); border-top-left-radius: 0.25rem; }
.chat-msg-user .chat-bubble { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); border-top-right-radius: 0.25rem; }
.chat-foot {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem;
  border-top: 1px solid hsl(var(--border));
}
.chat-input {
  flex: 1; min-width: 0;
  height: 2.25rem;
  padding: 0 0.75rem;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid hsl(var(--border));
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-size: 0.875rem;
  outline: none;
}
.chat-input::placeholder { color: hsl(var(--muted-foreground)); }
.chat-input:focus { border-color: hsl(var(--primary)); box-shadow: 0 0 0 2px hsl(var(--primary) / 0.15); }
.chat-send {
  display: flex; align-items: center; justify-content: center;
  width: 2.25rem; height: 2.25rem;
  border: none; border-radius: calc(var(--radius) - 2px);
  background: hsl(var(--primary)); color: hsl(var(--primary-foreground));
  cursor: pointer; flex-shrink: 0;
  transition: opacity 0.15s ease;
}
.chat-send:hover { opacity: 0.9; }
.chat-send svg { width: 1rem; height: 1rem; }
@media (max-width: 480px) {
  .chat-widget { right: 1rem; left: 1rem; width: auto; max-width: none; bottom: 5rem; }
  .chat-body { height: 14rem; }
}

/* 404 页面（spec/0178 追加：品牌化卡片 + 权限说明） */
.notfound-code { font-size: 3.5rem; font-weight: 700; color: hsl(var(--primary)); line-height: 1; }
@media (min-width: 768px) { .notfound-code { font-size: 4.5rem; } }
.notfound-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 2rem 1rem;
  background:
    radial-gradient(60% 50% at 50% 0%, hsl(var(--primary) / 0.07) 0%, transparent 70%),
    hsl(var(--background));
}
.notfound-card {
  width: 100%; max-width: 30rem;
  padding: 2.25rem 2rem;
  text-align: center;
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) + 0.25rem);
  background: hsl(var(--card));
  box-shadow: 0 18px 50px -28px hsl(var(--foreground) / 0.35);
}
.notfound-brand { display: inline-flex; align-items: center; gap: 0.5rem; margin-bottom: 1.25rem; }
.notfound-title { margin: 0.75rem 0 0; font-size: 1.25rem; font-weight: 700; color: hsl(var(--foreground)); }
.notfound-desc { margin: 0.625rem 0 0; font-size: 0.875rem; line-height: 1.7; color: hsl(var(--muted-foreground)); }
.notfound-hint {
  margin: 0.875rem 0 0;
  padding: 0.625rem 0.75rem;
  font-size: 0.75rem; line-height: 1.6;
  color: hsl(var(--muted-foreground));
  background: hsl(var(--muted) / 0.5);
  border-radius: calc(var(--radius) - 0.375rem);
}
.notfound-actions {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.625rem;
  margin-top: 1.5rem;
}

/* 自定义滚动条 */
.custom-scrollbar::-webkit-scrollbar { width: 6px; height: 6px; }
.custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: hsl(var(--muted-foreground) / 0.3); border-radius: 9999px; }
.custom-scrollbar::-webkit-scrollbar-thumb:hover { background: hsl(var(--muted-foreground) / 0.5); }
.custom-scrollbar { scrollbar-width: thin; scrollbar-color: hsl(var(--muted-foreground) / 0.3) transparent; }

/* ---------- 补充工具类（spec 3 页面使用） ---------- */
.inset-0 { inset: 0; }
.w-72 { width: 18rem; } .h-72 { height: 18rem; }
.w-96 { width: 24rem; } .h-96 { height: 24rem; }
.h-4 { height: 1rem; } .h-5 { height: 1.25rem; }
.h-40 { height: 10rem; } .h-48 { height: 12rem; }
.w-px { width: 1px; }
.bottom-20 { bottom: 5rem; }
.col-span-2 { grid-column: span 2 / span 2; }
.cursor-pointer { cursor: pointer; }
.mb-0 { margin-bottom: 0; }
.mb-16 { margin-bottom: 4rem; }
.mt-auto { margin-top: auto; }
.my-6 { margin-top: 1.5rem; margin-bottom: 1.5rem; }
.pt-2 { padding-top: 0.5rem; }
.max-w-xs { max-width: 20rem; }

/* ---------- 补充工具类（spec/38 产品页对齐参考 UI） ---------- */
.max-w-sm { max-width: 24rem; }
.min-w-200px { min-width: 200px; }
.w-130px { width: 130px; }
.gap-0\.5 { gap: 0.125rem; }
.py-0 { padding-top: 0; padding-bottom: 0; }
.pl-9 { padding-left: 2.25rem; }
.h-1\.5 { height: 0.375rem; } .w-1\.5 { width: 0.375rem; }
.h-7 { height: 1.75rem; } .w-7 { width: 1.75rem; }
.h-8 { height: 2rem; } .w-8 { width: 2rem; }
.h-9 { height: 2.25rem; } .w-9 { width: 2.25rem; }
.h-24 { height: 6rem; } .w-24 { width: 6rem; }
.opacity-0 { opacity: 0; }
.leading-none { line-height: 1; }
.uppercase { text-transform: uppercase; }
.tracking-wider { letter-spacing: 0.05em; }
.transition-all { transition: all 0.3s ease; }
.transition-colors { transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease; }
.transition-opacity { transition: opacity 0.3s ease; }
.duration-300 { transition-duration: 0.3s; }
.duration-500 { transition-duration: 0.5s; }
.blur-2xl { filter: blur(40px); }
.backdrop-blur-sm { backdrop-filter: blur(4px); }
.ring-1 { box-shadow: 0 0 0 1px hsl(var(--border) / 0.3); }
.ring-border\/30 { box-shadow: 0 0 0 1px hsl(var(--border) / 0.3); }
.bg-gradient-to-br { background-image: linear-gradient(to bottom right, hsl(var(--card)), hsl(var(--card)), hsl(var(--card) / 0.8)); }
.from-card { background-image: linear-gradient(to bottom right, hsl(var(--card)), hsl(var(--card)), hsl(var(--card) / 0.8)); }
.via-card { background-image: linear-gradient(to bottom right, hsl(var(--card)), hsl(var(--card)), hsl(var(--card) / 0.8)); }
.to-card\/80 { background-image: linear-gradient(to bottom right, hsl(var(--card)), hsl(var(--card)), hsl(var(--card) / 0.8)); }
.-top-12 { top: -3rem; }
.-right-12 { right: -3rem; }
.top-4 { top: 1rem; }
.right-4 { right: 1rem; }
.text-10px { font-size: 0.625rem; }

/* 认证面板装饰 */
.glow-white { position: absolute; border-radius: 9999px; filter: blur(64px); background: rgba(255, 255, 255, 0.08); }
.ring-center { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); border-radius: 9999px; border: 1px solid; }
.circle-600 { width: 600px; height: 600px; }
.circle-400 { width: 400px; height: 400px; }
.center-abs { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }

/* 第三方登录图标 */
.sso-icon { width: 1rem; height: 1rem; margin-right: 0.5rem; }

/* 进度条 */
.progress { height: 8px; border-radius: 9999px; background: hsl(var(--secondary)); overflow: hidden; }
.progress-fill { height: 100%; border-radius: 9999px; background: hsl(var(--primary)); }

/* 响应式补充 */
@media (min-width: 640px) {
  .sm-block { display: block; }
  .sm-inline { display: inline; }
  .sm-inline-flex { display: inline-flex; }
  .sm-flex-row { flex-direction: row; }
  .sm-items-center { align-items: center; }
  .sm-justify-between { justify-content: space-between; }
}
@media (min-width: 768px) {
  .md-block { display: block; }
  .md-inline { display: inline; }
  .md-col-span-1 { grid-column: span 1 / span 1; }
}
@media (min-width: 1024px) {
  .lg-inline { display: inline; }
}
@media (max-width: 1023px) {
  .kbd { display: none; }
}

/* ==========================================================================
   交互组件（spec 4）
   ========================================================================== */

/* 主题切换图标默认态（浅色显示太阳，暗色显示月亮；JS 会再同步 inline 样式） */
.icon-btn [data-icon="moon"] { display: none; }
.dark .icon-btn [data-icon="moon"] { display: inline-block; }
.dark .icon-btn [data-icon="sun"] { display: none; }
/* 密码显隐：默认显示「眼睛」，切换后显示「闭眼」 */
.input-icon-right [data-icon="eye-off"] { display: none; }

/* 下拉菜单 */
.dropdown { position: relative; }
.dropdown-panel {
  display: none;
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 12rem;
  padding: 0.375rem;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid hsl(var(--border));
  background: hsl(var(--popover));
  color: hsl(var(--popover-foreground));
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.12);
  z-index: 40;
}
.dropdown-panel-wide { min-width: 20rem; }
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: none;
  background: transparent;
  border-radius: calc(var(--radius) - 2px);
  font-size: 0.875rem;
  color: hsl(var(--foreground));
  cursor: pointer;
  text-align: left;
  transition: background-color 0.15s ease;
}
.dropdown-item:hover { background: hsl(var(--accent)); color: hsl(var(--accent-foreground)); }
.dropdown-item svg { width: 1rem; height: 1rem; color: hsl(var(--muted-foreground)); flex-shrink: 0; }
.dropdown-item:hover svg { color: hsl(var(--accent-foreground)); }
.dropdown-label { font-size: 0.75rem; color: hsl(var(--muted-foreground)); padding: 0.375rem 0.75rem; }

/* Toast */
#toast-region {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}
.toast {
  min-width: 14rem;
  max-width: 22rem;
  padding: 0.75rem 1rem;
  border-radius: calc(var(--radius) - 2px);
  background: hsl(var(--card));
  color: hsl(var(--card-foreground));
  border: 1px solid hsl(var(--border));
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.12);
  font-size: 0.875rem;
  animation: toast-in 0.25s ease-out;
}
.toast-success { border-left: 3px solid hsl(var(--success)); }
.toast-error { border-left: 3px solid hsl(var(--destructive)); }
.toast-info { border-left: 3px solid hsl(var(--primary)); }
.toast-out { opacity: 0; transform: translateY(-8px); transition: opacity 0.3s ease, transform 0.3s ease; }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 页面右下角加载指示器（spec/40：数据加载中转圈提示，右下角不挡操作；主色调红色醒目，全页统一） */
#page-loading {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  background: hsl(var(--primary));
  border: 1px solid hsl(var(--primary));
  box-shadow: 0 8px 20px -4px hsl(var(--primary) / 0.5);
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.3s ease;
}
#page-loading.page-loading-hidden { opacity: 0; }
.page-loading-spinner {
  width: 1rem;
  height: 1rem;
  border-radius: 9999px;
  border: 2.5px solid hsl(var(--primary-foreground) / 0.35);
  border-top-color: hsl(var(--primary-foreground));
  animation: page-loading-spin 0.8s linear infinite;
  flex-shrink: 0;
}
@keyframes page-loading-spin {
  to { transform: rotate(360deg); }
}
.page-loading-text { font-size: 0.75rem; font-weight: 600; color: hsl(var(--primary-foreground)); white-space: nowrap; }

/* 移动端抽屉 */
body.no-scroll { overflow: hidden; }
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgb(0 0 0 / 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 55;
}
.drawer-overlay.show { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 16rem;
  background: hsl(var(--sidebar-background));
  border-right: 1px solid hsl(var(--sidebar-border));
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  z-index: 60;
  display: flex;
  flex-direction: column;
  padding: 1rem 0.75rem;
  overflow-y: auto;
}
.drawer.open { transform: none; }
.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.25rem 1rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid hsl(var(--sidebar-border));
}
.drawer .sidebar-nav { display: flex; flex-direction: column; flex: 1; padding-left: 0; padding-right: 0; }

/* 侧边栏折叠（spec/15：边缘圆形按钮 + 68px 图标栏 + tooltip + 激活条 + 分隔线） */
.sidebar-nav { display: flex; flex-direction: column; flex: 1; min-height: 0; padding: 0.75rem 0.625rem; overflow-y: auto; }
/* 折叠态内容短，无需滚动；恢复 tooltip 溢出可见（spec/15） */
.sidebar-collapsed .sidebar-nav { overflow-y: visible; }
@media (max-height: 640px) {
  .sidebar-nav { overflow-y: auto; }
}
.sidebar-edge-toggle {
  position: absolute; right: -0.75rem; top: 5rem; z-index: 20;
  display: flex; align-items: center; justify-content: center;
  width: 1.5rem; height: 1.5rem;
  border-radius: 9999px;
  border: 1px solid hsl(var(--sidebar-border));
  background: hsl(var(--sidebar-background));
  color: hsl(var(--sidebar-foreground));
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.15);
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.sidebar-edge-toggle:hover { background: hsl(var(--sidebar-accent)); }
.sidebar-edge-ico { display: inline-flex; }
.sidebar-edge-ico svg { width: 0.875rem; height: 0.875rem; }
.sidebar-edge-right { display: none; }
.sidebar-collapsed .sidebar .sidebar-edge-left { display: none; }
.sidebar-collapsed .sidebar .sidebar-edge-right { display: inline-flex; }

/* 顶栏金币余额（spec/53：铃铛左侧，点击跳转充值；余额在左、金币图标在右，闪亮 pill 样式） */
.topbar-coin {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.375rem;
  width: 8rem; height: 2rem; padding: 0 0.625rem;
  border-radius: 9999px;
  border: 1px solid hsl(var(--border));
  background: linear-gradient(to bottom right, hsl(var(--secondary)), hsl(var(--secondary) / 0.6));
  color: hsl(var(--foreground));
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  flex-shrink: 0;
}
.topbar-coin:hover {
  background: linear-gradient(to bottom right, hsl(var(--accent)), hsl(var(--accent) / 0.7));
  border-color: hsl(var(--primary) / 0.4);
  box-shadow: 0 0 0 2px hsl(var(--primary) / 0.12), 0 4px 14px -4px hsl(var(--primary) / 0.35);
}
.topbar-coin-stats { display: inline-flex; align-items: center; gap: 0.375rem; }
.topbar-coin-stat { font-size: 0.75rem; color: hsl(var(--muted-foreground)); white-space: nowrap; }
.topbar-coin-stat b { color: hsl(var(--foreground)); font-weight: 600; }
.topbar-balance-num { display: inline-block; min-width: 6ch; font-variant-numeric: tabular-nums; text-align: right; }
/* 金币图标：金色 + 闪闪发光动画（缩放闪烁 + 光晕） */
.topbar-coin-icon {
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.topbar-coin-icon svg {
  width: 1rem; height: 1rem;
  color: hsl(45 95% 50%);
  filter: drop-shadow(0 0 2px hsl(45 95% 55% / 0.9)) drop-shadow(0 0 6px hsl(45 95% 50% / 0.5));
  animation: coin-sparkle 2.4s ease-in-out infinite;
}
@keyframes coin-sparkle {
  0%, 100% { transform: scale(1); opacity: 1; filter: drop-shadow(0 0 2px hsl(45 95% 55% / 0.9)) drop-shadow(0 0 6px hsl(45 95% 50% / 0.5)); }
  12% { transform: scale(1.25) rotate(-8deg); opacity: 0.85; filter: drop-shadow(0 0 6px hsl(45 100% 60% / 1)) drop-shadow(0 0 14px hsl(45 95% 50% / 0.9)); }
  22% { transform: scale(1); opacity: 1; filter: drop-shadow(0 0 2px hsl(45 95% 55% / 0.9)) drop-shadow(0 0 6px hsl(45 95% 50% / 0.5)); }
  50% { transform: scale(1.12) rotate(8deg); opacity: 0.92; filter: drop-shadow(0 0 5px hsl(45 100% 60% / 1)) drop-shadow(0 0 12px hsl(45 95% 50% / 0.8)); }
  62% { transform: scale(1); opacity: 1; filter: drop-shadow(0 0 2px hsl(45 95% 55% / 0.9)) drop-shadow(0 0 6px hsl(45 95% 50% / 0.5)); }
}
.topbar-coin-sep { width: 1px; height: 0.875rem; background: hsl(var(--border)); }
/* 扣减金币时的绿色边框闪烁（spec/42 特效随展示位置迁移至顶栏） */
.topbar-coin-flash { animation: coin-flash 1.2s ease-out; }
@keyframes coin-flash {
  0% { box-shadow: 0 0 0 0 hsl(160 84% 39% / 0); }
  15% { box-shadow: 0 0 0 2px hsl(160 84% 39% / 0.9), 0 0 12px hsl(160 84% 39% / 0.6); }
  30% { box-shadow: 0 0 0 0 hsl(160 84% 39% / 0); }
  45% { box-shadow: 0 0 0 2px hsl(160 84% 39% / 0.9), 0 0 12px hsl(160 84% 39% / 0.6); }
  60% { box-shadow: 0 0 0 0 hsl(160 84% 39% / 0); }
  75% { box-shadow: 0 0 0 2px hsl(160 84% 39% / 0.9), 0 0 12px hsl(160 84% 39% / 0.6); }
  100% { box-shadow: 0 0 0 0 hsl(160 84% 39% / 0); }
}


/* 顶栏钻石余额（spec/65：金币右侧；天蓝色闪闪发光） */
.topbar-diamond {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.375rem;
  width: 8rem; height: 2rem; padding: 0 0.625rem;
  border-radius: 9999px;
  border: 1px solid hsl(var(--border));
  background: linear-gradient(to bottom right, hsl(var(--secondary)), hsl(var(--secondary) / 0.6));
  color: hsl(var(--foreground));
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  flex-shrink: 0;
}
.topbar-diamond:hover {
  background: linear-gradient(to bottom right, hsl(var(--accent)), hsl(var(--accent) / 0.7));
  border-color: hsl(187 85% 55% / 0.5);
  box-shadow: 0 0 0 2px hsl(187 85% 55% / 0.15), 0 4px 14px -4px hsl(187 85% 55% / 0.4);
}
.topbar-diamond-stats { display: inline-flex; align-items: center; gap: 0.375rem; }
.topbar-diamond-stat { font-size: 0.75rem; color: hsl(var(--muted-foreground)); white-space: nowrap; }
.topbar-diamond-stat b { color: hsl(var(--foreground)); font-weight: 600; }
/* 钻石图标：天蓝色 + 闪闪发光动画 */
.topbar-diamond-icon { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.topbar-diamond-icon svg {
  width: 1rem; height: 1rem;
  color: hsl(187 90% 52%);
  filter: drop-shadow(0 0 2px hsl(187 90% 58% / 0.9)) drop-shadow(0 0 6px hsl(187 90% 55% / 0.5));
  animation: diamond-sparkle 2.4s ease-in-out infinite;
}
@keyframes diamond-sparkle {
  0%, 100% { transform: scale(1); opacity: 1; filter: drop-shadow(0 0 2px hsl(187 90% 58% / 0.9)) drop-shadow(0 0 6px hsl(187 90% 55% / 0.5)); }
  12% { transform: scale(1.25) rotate(-8deg); opacity: 0.85; filter: drop-shadow(0 0 6px hsl(187 95% 65% / 1)) drop-shadow(0 0 14px hsl(187 90% 55% / 0.9)); }
  22% { transform: scale(1); opacity: 1; filter: drop-shadow(0 0 2px hsl(187 90% 58% / 0.9)) drop-shadow(0 0 6px hsl(187 90% 55% / 0.5)); }
  50% { transform: scale(1.12) rotate(8deg); opacity: 0.92; filter: drop-shadow(0 0 5px hsl(187 95% 65% / 1)) drop-shadow(0 0 12px hsl(187 90% 55% / 0.8)); }
  62% { transform: scale(1); opacity: 1; filter: drop-shadow(0 0 2px hsl(187 90% 58% / 0.9)) drop-shadow(0 0 6px hsl(187 90% 55% / 0.5)); }
}

/* 顶栏使用帮助入口（spec/66：铃铛右侧） */
.topbar-guide {
  display: inline-flex; align-items: center; gap: 0.375rem;
  height: 2rem; padding: 0 0.625rem;
  border-radius: 9999px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--secondary));
  color: hsl(var(--muted-foreground));
  text-decoration: none;
  font-size: 0.75rem;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  flex-shrink: 0;
}
.topbar-guide:hover { background: hsl(var(--accent)); border-color: hsl(var(--primary) / 0.4); color: hsl(var(--foreground)); }
.topbar-guide svg { width: 0.875rem; height: 0.875rem; }


/* 使用帮助页（spec/66：精美卡通风格） */
.guide-page { min-height: 100vh; display: flex; flex-direction: column; background: hsl(var(--background)); }
.guide-header { position: sticky; top: 0; z-index: 40; border-bottom: 1px solid hsl(var(--border)); background: hsl(var(--card) / 0.9); backdrop-filter: blur(8px); }
.guide-header-inner { max-width: 72rem; margin: 0 auto; padding: 0.75rem 1.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.guide-brand { display: inline-flex; align-items: center; gap: 0.5rem; text-decoration: none; color: hsl(var(--foreground)); }
.guide-brand-tag { font-size: 0.6875rem; color: hsl(var(--primary)); background: hsl(var(--primary) / 0.1); padding: 0.125rem 0.5rem; border-radius: 9999px; font-weight: 600; }
.guide-nav { display: flex; align-items: center; gap: 0.75rem; }
.guide-nav-link { font-size: 0.875rem; color: hsl(var(--muted-foreground)); text-decoration: none; }
.guide-nav-link:hover { color: hsl(var(--foreground)); }

.guide-main { flex: 1; max-width: 72rem; width: 100%; margin: 0 auto; padding: 3rem 1.5rem 4rem; }

/* Hero：渐变背景 + 卡通漂浮装饰 */
.guide-hero { position: relative; text-align: center; padding: 4rem 1.5rem 3.5rem; border-radius: 2rem; overflow: hidden; margin-bottom: 3.5rem; border: 1px solid hsl(var(--border) / 0.6); background: linear-gradient(135deg, hsl(var(--primary) / 0.12), hsl(var(--accent)), hsl(var(--card))); }
.guide-hero-bg { position: absolute; inset: 0; pointer-events: none; }
.guide-float { position: absolute; display: inline-flex; align-items: center; justify-content: center; }
.guide-float svg { width: 1.75rem; height: 1.75rem; }
.guide-float-1 { top: 12%; left: 10%; color: hsl(187 90% 55%); animation: guide-float 5s ease-in-out infinite; }
.guide-float-2 { top: 18%; right: 12%; color: hsl(45 95% 50%); animation: guide-float 6s ease-in-out 0.6s infinite; }
.guide-float-3 { bottom: 20%; left: 16%; font-size: 2rem; animation: guide-float 6.5s ease-in-out 1.2s infinite; }
.guide-float-4 { bottom: 26%; right: 18%; font-size: 1.75rem; animation: guide-float 5.5s ease-in-out 0.3s infinite; }
.guide-float-5 { top: 45%; right: 6%; font-size: 1.5rem; animation: guide-float 7s ease-in-out 0.9s infinite; }
@keyframes guide-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(6deg); }
}
.guide-hero-badge { position: relative; display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.375rem 1rem; border-radius: 9999px; background: hsl(var(--card)); border: 1px solid hsl(var(--border)); color: hsl(var(--muted-foreground)); font-size: 0.75rem; font-weight: 600; box-shadow: 0 4px 12px -4px rgb(0 0 0 / 0.08); }
.guide-hero-badge svg { width: 0.875rem; height: 0.875rem; color: hsl(var(--primary)); }
.guide-title { position: relative; font-size: 2.5rem; font-weight: 800; color: hsl(var(--foreground)); letter-spacing: -0.02em; line-height: 1.15; margin-top: 1.25rem; }
.guide-sub { position: relative; color: hsl(var(--muted-foreground)); font-size: 1rem; margin: 1rem auto 0; max-width: 38rem; line-height: 1.7; }
.guide-hero-cta { position: relative; margin-top: 1.75rem; }

/* 流程区 */
.guide-section { margin-bottom: 3.5rem; }
.guide-section-head { text-align: center; margin-bottom: 2rem; }
.guide-section-title { font-size: 1.5rem; font-weight: 700; color: hsl(var(--foreground)); }
.guide-section-title::after { content: ''; display: block; width: 3rem; height: 0.25rem; border-radius: 9999px; background: linear-gradient(90deg, hsl(var(--primary)), hsl(187 90% 55%)); margin: 0.5rem auto 0; }
.guide-section-desc { color: hsl(var(--muted-foreground)); font-size: 0.875rem; margin-top: 0.75rem; }
/* 使用流程（spec/70 调整：横向 3 列网格，避免页面过长） */
.guide-steps { display: grid; grid-template-columns: repeat(1, minmax(0, 1fr)); gap: 1rem; }
@media (min-width: 768px) { .guide-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.guide-step { display: flex; flex-direction: column; }
.guide-step-badge { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.08em; color: hsl(var(--primary)); margin-bottom: 0.375rem; text-align: center; }
.guide-step-card {
  display: flex; align-items: center; gap: 1.125rem; width: 100%; height: 100%;
  padding: 1.25rem 1.375rem; border-radius: 1.25rem;
  background: hsl(var(--card)); border: 1px solid hsl(var(--border));
  box-shadow: 0 4px 16px -8px rgb(0 0 0 / 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.guide-step-card:hover { transform: translateY(-3px); box-shadow: 0 14px 28px -10px hsl(var(--primary) / 0.2); border-color: hsl(var(--primary) / 0.4); }
.guide-step-icon {
  width: 3.25rem; height: 3.25rem; border-radius: 1rem; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, hsl(var(--primary) / 0.15), hsl(var(--primary) / 0.05));
  color: hsl(var(--primary));
}
.guide-step-icon svg { width: 1.5rem; height: 1.5rem; }
.guide-step-body { min-width: 0; text-align: left; }
.guide-step-title { font-size: 1rem; font-weight: 700; color: hsl(var(--foreground)); }
.guide-step-desc { font-size: 0.8125rem; color: hsl(var(--muted-foreground)); margin-top: 0.25rem; line-height: 1.6; }
/* 步骤箭头（横向布局：卡片内部右侧，指向下一步；最后一张无） */
.guide-step-arrow { margin-left: auto; padding-left: 0.5rem; flex-shrink: 0; color: hsl(var(--primary) / 0.5); }
.guide-step-arrow svg { width: 1.25rem; height: 1.25rem; }

/* 平台功能点缀 */
.guide-features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
@media (min-width: 640px) { .guide-features { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.guide-feature {
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem; text-align: center;
  padding: 1.5rem 1rem; border-radius: 1.25rem;
  background: hsl(var(--card)); border: 1px solid hsl(var(--border));
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.guide-feature:hover { transform: translateY(-3px); border-color: hsl(var(--primary) / 0.4); box-shadow: 0 10px 22px -10px hsl(var(--primary) / 0.18); }
.guide-feature-icon {
  width: 3rem; height: 3rem; border-radius: 9999px; display: flex; align-items: center; justify-content: center;
  background: hsl(var(--primary) / 0.1); color: hsl(var(--primary));
}
.guide-feature-icon svg { width: 1.25rem; height: 1.25rem; }
.guide-feature-title { font-size: 0.875rem; font-weight: 700; color: hsl(var(--foreground)); }
.guide-feature-desc { font-size: 0.75rem; color: hsl(var(--muted-foreground)); line-height: 1.5; }

/* 小贴士 */
.guide-tip {
  display: flex; align-items: flex-start; gap: 0.75rem; max-width: 36rem; margin: 0 auto;
  padding: 1.25rem 1.375rem; border-radius: 1.25rem;
  background: linear-gradient(135deg, hsl(var(--success) / 0.1), hsl(var(--success) / 0.04));
  border: 1px dashed hsl(var(--success) / 0.45);
}
.guide-tip-icon { width: 2.25rem; height: 2.25rem; border-radius: 9999px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: hsl(var(--success) / 0.15); color: hsl(var(--success)); }
.guide-tip-icon svg { width: 1.125rem; height: 1.125rem; }
.guide-tip-body { min-width: 0; }
.guide-tip-title { font-size: 0.875rem; font-weight: 700; color: hsl(var(--foreground)); margin-bottom: 0.25rem; }
.guide-tip-body p:last-child { font-size: 0.8125rem; color: hsl(var(--muted-foreground)); line-height: 1.7; }
.guide-footer { border-top: 1px solid hsl(var(--border)); background: hsl(var(--card)); text-align: center; padding: 1.5rem; font-size: 0.75rem; color: hsl(var(--muted-foreground)); }
/* 侧栏日常优惠活动卡片（spec/53：占位效果，文案后续可调） */
.sidebar-promo {
  margin: 0 0.75rem 0.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: 0.75rem;
  background: linear-gradient(to bottom right, hsl(var(--sidebar-primary) / 0.1), hsl(var(--sidebar-accent)));
  border: 1px dashed hsl(var(--sidebar-primary) / 0.35);
  flex-shrink: 0;
  min-width: 0;
}
/* 优惠活动暂时隐藏（spec/53：保留代码，后续放开时删除此规则即可） */
.sidebar-promo.hidden { display: none !important; }
.sidebar-promo-head { display: flex; align-items: center; gap: 0.375rem; margin-bottom: 0.375rem; }
.sidebar-promo-head svg { width: 0.875rem; height: 0.875rem; color: hsl(var(--sidebar-primary)); flex-shrink: 0; }
.sidebar-promo-head span { font-size: 0.75rem; font-weight: 600; color: hsl(var(--sidebar-foreground)); }
/* 轮播视口与轨道（spec/53 增强） */
.sidebar-promo-viewport { overflow: hidden; border-radius: 0.375rem; }
.sidebar-promo-track { display: flex; transition: transform 0.45s ease; }
.sidebar-promo-slide { flex: 0 0 100%; min-width: 100%; }
.sidebar-promo-title { font-size: 0.8125rem; font-weight: 600; color: hsl(var(--sidebar-foreground)); }
.sidebar-promo-desc { font-size: 0.6875rem; line-height: 1.4; color: hsl(var(--muted-foreground)); margin: 0.25rem 0 0; }
/* 轮播指示点（可点击手动切换） */
.sidebar-promo-dots { display: flex; align-items: center; gap: 0.375rem; margin: 0.5rem 0; }
.sidebar-promo-dot {
  width: 0.5rem; height: 0.5rem;
  padding: 0; border: none;
  border-radius: 9999px;
  background: hsl(var(--sidebar-primary) / 0.3);
  cursor: pointer;
  transition: background-color 0.15s ease, width 0.15s ease;
}
.sidebar-promo-dot:hover { background: hsl(var(--sidebar-primary) / 0.6); }
.sidebar-promo-dot.is-active { background: hsl(var(--sidebar-primary)); width: 1rem; }
.sidebar-promo-btn {
  display: flex; align-items: center; justify-content: center;
  width: 100%; padding: 0.375rem 0;
  border-radius: 0.375rem;
  background: hsl(var(--primary)); color: hsl(var(--primary-foreground));
  font-size: 0.75rem; font-weight: 600; text-align: center;
  text-decoration: none;
  transition: opacity 0.15s ease;
}
.sidebar-promo-btn:hover { opacity: 0.9; }

/* 左下角用户区（上拉菜单，spec/15） */
.sidebar-user { padding: 0.625rem; border-top: 1px solid hsl(var(--sidebar-border)); flex-shrink: 0; }
.sidebar-user-btn {
  display: flex; align-items: center; gap: 0.625rem;
  width: 100%; padding: 0.5rem;
  border: none; background: transparent;
  border-radius: 0.5rem; text-align: left;
  color: hsl(var(--sidebar-foreground));
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.sidebar-user-btn:hover { background: hsl(var(--sidebar-accent) / 0.5); }
.sidebar-user-avatar {
  display: flex; align-items: center; justify-content: center;
  width: 2rem; height: 2rem; border-radius: 9999px;
  background: hsl(var(--primary)); color: hsl(var(--primary-foreground));
  font-size: 0.75rem; font-weight: 600; flex-shrink: 0;
  box-shadow: 0 0 0 2px hsl(var(--sidebar-border));
  object-fit: cover; overflow: hidden;
}
.sidebar-user-text { flex: 1; min-width: 0; }
.sidebar-user-name-row { display: flex; align-items: center; gap: 0.375rem; min-width: 0; }
.sidebar-user-name { font-size: 0.8125rem; font-weight: 500; color: hsl(var(--sidebar-foreground)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-email { display: block; font-size: 0.6875rem; color: hsl(var(--muted-foreground)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-caret { display: inline-flex; color: hsl(var(--muted-foreground)); flex-shrink: 0; }
.sidebar-user-caret svg { width: 0.875rem; height: 0.875rem; }
.plan-badge {
  display: inline-block; padding: 0.0625rem 0.375rem;
  border-radius: 9999px; font-size: 0.625rem; font-weight: 600; line-height: 1.125rem;
  background: hsl(var(--sidebar-accent)); color: hsl(var(--sidebar-accent-foreground));
  white-space: nowrap; flex-shrink: 0;
}
/* 金色 VIP 标签（spec/55：有金币即 VIP，金光闪闪代表尊贵） */
.plan-badge-vip {
  position: relative;
  background: linear-gradient(110deg, #b8860b 0%, #ffd700 28%, #fff8c2 50%, #ffd700 72%, #b8860b 100%);
  background-size: 200% 100%;
  animation: vip-shine 3s linear infinite;
  color: #4a2f00;
  text-shadow: 0 0 4px rgba(255, 240, 160, 0.75);
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.45), inset 0 0 4px rgba(255, 255, 220, 0.55);
}
@keyframes vip-shine {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.sidebar-user-head { display: flex; align-items: center; gap: 0.625rem; padding: 0.5rem 0.625rem; }
.sidebar-user-head-text { min-width: 0; }
.sidebar-user-head-text .sidebar-user-name { display: block; }
.sidebar-user-head .sidebar-user-avatar { box-shadow: 0 0 0 2px hsl(var(--border)); }

/* 折叠态：68px 图标栏 */
.sidebar-collapsed .sidebar { width: 4.25rem; }
.sidebar-collapsed .sidebar .sidebar-brand-row { justify-content: center; padding: 0; }
.sidebar-collapsed .sidebar .brand-name,
.sidebar-collapsed .sidebar .sidebar-label,
.sidebar-collapsed .sidebar .sidebar-item-text,
.sidebar-collapsed .sidebar .sidebar-promo,
.sidebar-collapsed .sidebar .sidebar-user-text,
.sidebar-collapsed .sidebar .sidebar-user-caret { display: none; }
.sidebar-collapsed .sidebar .sidebar-group-sep { display: block; }
.sidebar-collapsed .sidebar .sidebar-group-sep.is-first { display: none; }
.sidebar-collapsed .sidebar .sidebar-item { justify-content: center; padding: 0; width: 2.5rem; height: 2.5rem; margin-left: auto; margin-right: auto; }
.sidebar-collapsed .sidebar .sidebar-user-btn { justify-content: center; padding: 0.25rem; }
.sidebar-collapsed .sidebar .sidebar-nav { padding-left: 0.25rem; padding-right: 0.25rem; }

/* 收起态 hover tooltip（纯 CSS，spec/15） */
.sidebar-collapsed .sidebar .sidebar-item:hover::after {
  content: attr(data-title);
  position: absolute;
  left: calc(100% + 0.75rem);
  top: 50%;
  transform: translateY(-50%);
  z-index: 60;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  background: hsl(var(--popover));
  color: hsl(var(--popover-foreground));
  border: 1px solid hsl(var(--border));
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: 0 4px 8px rgb(0 0 0 / 0.15);
  pointer-events: none;
}

/* 用户下拉上拉 + 子菜单 */
.dropdown-sep { height: 1px; margin: 0.375rem 0.25rem; background: hsl(var(--border)); }
.dropdown-panel-up { top: auto; bottom: calc(100% + 0.5rem); }
.sidebar-user-panel { left: 0; right: auto; width: 14rem; }
.dropdown-item-danger { color: hsl(var(--destructive)); }
.dropdown-item-danger svg { color: hsl(var(--destructive)); }
.dropdown-item-danger:hover { background: hsl(var(--destructive) / 0.1); color: hsl(var(--destructive)); }
.dropdown-item-danger:hover svg { color: hsl(var(--destructive)); }
.dropdown-sub { position: relative; }
.dropdown-sub-trigger {
  display: flex; align-items: center; gap: 0.625rem;
  width: 100%; padding: 0.5rem 0.75rem;
  border: none; background: transparent;
  border-radius: calc(var(--radius) - 2px);
  font-size: 0.875rem; color: hsl(var(--foreground));
  cursor: pointer; text-align: left;
  transition: background-color 0.15s ease;
}
.dropdown-sub-trigger:hover { background: hsl(var(--accent)); color: hsl(var(--accent-foreground)); }
.dropdown-sub-trigger svg { width: 1rem; height: 1rem; color: hsl(var(--muted-foreground)); flex-shrink: 0; }
.dropdown-sub-trigger:hover svg { color: hsl(var(--accent-foreground)); }
.dropdown-sub-caret { margin-left: auto; display: inline-flex; }
.dropdown-sub-panel {
  display: none;
  position: absolute;
  left: calc(100% + 0.25rem);
  top: 0;
  min-width: 9rem;
  padding: 0.375rem;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid hsl(var(--border));
  background: hsl(var(--popover));
  color: hsl(var(--popover-foreground));
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.12);
  z-index: 45;
}

/* 命令面板 */
.cmd-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgb(0 0 0 / 0.8);
  z-index: 70;
}
.cmd-modal.show { display: flex; }
.cmd-panel {
  width: 100%;
  max-width: 32rem;
  border-radius: 0.5rem;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--popover));
  color: hsl(var(--popover-foreground));
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.3);
  overflow: hidden;
}
.cmd-search {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0 0.875rem;
  border-bottom: 1px solid hsl(var(--border));
}
.cmd-search-icon { display: inline-flex; color: hsl(var(--muted-foreground)); }
.cmd-search-icon svg { width: 1.125rem; height: 1.125rem; }
.cmd-input {
  flex: 1;
  height: 2.75rem;
  border: none;
  outline: none;
  background: transparent;
  font-size: 0.9375rem;
  color: hsl(var(--foreground));
}
.cmd-input::placeholder { color: hsl(var(--muted-foreground)); }
.cmd-list { max-height: 18rem; overflow-y: auto; padding: 0.375rem; }
.cmd-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.375rem 0.625rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  color: hsl(var(--foreground));
  transition: background-color 0.15s ease;
}
.cmd-item:hover { background: hsl(var(--accent)); color: hsl(var(--accent-foreground)); }
.cmd-item svg { width: 1rem; height: 1rem; color: hsl(var(--muted-foreground)); flex-shrink: 0; }
.cmd-item:hover svg { color: hsl(var(--accent-foreground)); }
.cmd-hint { padding: 0.625rem 1rem; border-top: 1px solid hsl(var(--border)); font-size: 0.6875rem; color: hsl(var(--muted-foreground)); }
.cmd-empty { padding: 1.5rem; text-align: center; font-size: 0.875rem; color: hsl(var(--muted-foreground)); }

/* 客服后台（spec/54）：左会话列表 + 右对话回复 */
.support-console {
  display: flex;
  align-items: stretch;
  gap: 1rem;
  min-height: 30rem;
}
.support-sidebar {
  width: 17rem;
  flex-shrink: 0;
  border-radius: var(--radius);
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.support-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: hsl(var(--foreground));
  border-bottom: 1px solid hsl(var(--border));
}
.support-conv-count {
  font-size: 0.6875rem;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  background: hsl(var(--secondary));
  border-radius: 9999px;
  padding: 0.125rem 0.5rem;
}
.support-conv-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.375rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.support-conv-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.5rem 0.625rem;
  border: none;
  background: transparent;
  border-radius: calc(var(--radius) - 2px);
  color: hsl(var(--foreground));
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.support-conv-item:hover { background: hsl(var(--accent) / 0.4); }
.support-conv-item.is-active { background: hsl(var(--primary) / 0.1); }
.support-conv-item.is-active:hover { background: hsl(var(--primary) / 0.15); }
.support-conv-row { display: flex; align-items: center; gap: 0.375rem; }
.support-conv-email {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.8125rem;
  font-weight: 600;
}
.support-conv-unread {
  flex-shrink: 0;
  min-width: 1.125rem;
  height: 1.125rem;
  border-radius: 9999px;
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  font-size: 0.625rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.25rem;
}
.support-conv-preview {
  font-size: 0.6875rem;
  color: hsl(var(--muted-foreground));
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 0.125rem;
}
.support-conv-time { font-size: 0.625rem; color: hsl(var(--muted-foreground) / 0.8); margin-top: 0.125rem; }
.support-main {
  flex: 1;
  min-width: 0;
  border-radius: var(--radius);
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.support-chat {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  background: hsl(var(--muted) / 0.35);
}
.support-reply {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  border-top: 1px solid hsl(var(--border));
  background: hsl(var(--card));
}
.support-reply .input:disabled { opacity: 0.6; cursor: not-allowed; }
.support-empty {
  text-align: center;
  color: hsl(var(--muted-foreground));
  font-size: 0.8125rem;
  padding: 2rem 1rem;
}

/* 账号页（spec/55）：编辑资料弹窗 + 头像选择 */
.account-avatar-wrap { flex-shrink: 0; }
.account-avatar-img {
  width: 4rem; height: 4rem;
  border-radius: 9999px;
  object-fit: cover;
  border: 2px solid hsl(var(--border));
}

/* 计费页（spec/62）：支付宝收款码弹窗 */
.billing-qr-box { display: flex; flex-direction: column; align-items: center; padding: 0.75rem; }
.billing-qr-mock {
  display: flex; align-items: center; justify-content: center;
  width: 10rem; height: 10rem;
  border-radius: 0.75rem;
  border: 1px solid hsl(var(--border));
  background: #fff;
  color: #111;
}
.billing-qr-mock svg { width: 6.5rem; height: 6.5rem; }
.qs-card-unit { font-size: 0.875rem; font-weight: 500; color: hsl(var(--muted-foreground)); letter-spacing: 0; }
.billing-custom-box {
  margin-top: 1.5rem; padding: 1.25rem;
  border: 1px dashed hsl(var(--border));
  border-radius: 1rem;
  background: hsl(var(--secondary) / 0.35);
}
/* 到账金币数字区：5 位内固定宽 + 等宽数字；超过 5 位随内容增长（不溢出） */
.billing-custom-tip-num {
  display: inline-block;
  min-width: 5ch;
  font-variant-numeric: tabular-nums;
  text-align: left;
}
/* 计费页充值套餐：紧凑尺寸铺满整行，点击才高亮红框（默认不选中） */
.billing-plans-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  width: 100%;
}
@media (max-width: 768px) {
  .billing-plans-grid { grid-template-columns: 1fr; }
}
.billing-plan-card { padding: 1rem 1rem 1.25rem; cursor: pointer; text-align: center; }
.billing-plan-card .pricing-name { font-size: 0.9375rem; display: flex; align-items: center; justify-content: center; }
.billing-plan-card .pricing-desc { font-size: 0.8125rem; margin-top: 0.125rem; }
.billing-plan-card .pricing-price { font-size: 1.5rem; margin-top: 0.625rem; }
.billing-plan-card .feature-list { margin: 0.75rem auto 0; gap: 0.375rem; align-items: center; width: fit-content; }
.billing-plan-card .feature-item { font-size: 0.8125rem; }
.billing-plan-card .pricing-cta { margin-top: 0.875rem; }
.billing-plan-card .pricing-cta .btn { height: 2rem; font-size: 0.8125rem; }
.edit-modal {
  position: fixed; inset: 0;
  z-index: 60;
  display: flex; align-items: center; justify-content: center;
  visibility: hidden; opacity: 0;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
.edit-modal.show { visibility: visible; opacity: 1; }
.edit-overlay { position: absolute; inset: 0; background: rgb(0 0 0 / 0.5); }
.edit-panel {
  position: relative;
  width: min(28rem, calc(100vw - 2rem));
  max-height: 85vh;
  overflow: hidden;
  border-radius: calc(var(--radius) + 2px);
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
  box-shadow: 0 20px 50px rgb(0 0 0 / 0.2);
  display: flex;
  flex-direction: column;
}
.edit-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid hsl(var(--border));
  flex-shrink: 0;
}
/* 昵称/简介固定，仅头像选择区滚动，底部按钮固定可见 */
.edit-body {
  padding: 1.25rem;
  display: flex; flex-direction: column; gap: 1rem;
}
.edit-foot {
  display: flex; align-items: center; justify-content: flex-end; gap: 0.5rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid hsl(var(--border));
  flex-shrink: 0;
}
.edit-avatar-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
  max-height: 12rem;
  overflow-y: auto;
  padding-right: 0.25rem;
}
.edit-avatar-option {
  width: 100%; aspect-ratio: 1;
  padding: 0.1875rem;
  border-radius: 9999px;
  border: 2px solid hsl(var(--border));
  background: transparent;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.edit-avatar-option img { width: 100%; height: 100%; border-radius: 9999px; object-fit: cover; display: block; }
.edit-avatar-option:hover { border-color: hsl(var(--primary) / 0.5); }
.edit-avatar-option.is-selected {
  border-color: hsl(var(--primary));
  box-shadow: 0 0 0 2px hsl(var(--primary) / 0.3);
}

/* 通知（spec/56）：顶栏铃铛未读徽章 + 抖动 + 下拉列表；通知页多选/新建 */
.bell-btn { position: relative; }
.bell-badge {
  position: absolute; top: -0.25rem; right: -0.25rem;
  min-width: 1rem; height: 1rem;
  padding: 0 0.25rem;
  border-radius: 9999px;
  background: hsl(var(--destructive));
  color: hsl(var(--destructive-foreground));
  font-size: 0.625rem; font-weight: 700;
  align-items: center; justify-content: center;
  pointer-events: none;
}
.bell-btn.bell-shake { animation: bell-shake 0.6s ease-in-out; }
@keyframes bell-shake {
  0%, 100% { transform: rotate(0deg); }
  20% { transform: rotate(-14deg); }
  40% { transform: rotate(12deg); }
  60% { transform: rotate(-8deg); }
  80% { transform: rotate(6deg); }
}
.bell-list { max-height: 18rem; overflow-y: auto; }
.bell-item { position: relative; }
.bell-item .bell-dot {
  position: absolute; left: 0.5rem; top: 0.75rem;
  width: 0.5rem; height: 0.5rem;
  border-radius: 9999px;
  background: hsl(var(--primary));
  flex-shrink: 0;
}
.bell-item.is-unread { padding-left: 1.375rem; } /* 红点与文字留间距 */
.bell-item.is-unread .bell-item-body { font-weight: 600; }
.bell-item-text { display: flex; flex-direction: column; gap: 0.125rem; min-width: 0; flex: 1; }
.bell-item-body { font-size: 0.8125rem; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.bell-item-time { font-size: 0.625rem; color: hsl(var(--muted-foreground)); }

/* 通知页多选 */
.notif-item { display: flex; align-items: flex-start; gap: 0.5rem; width: 100%; }
.notif-check { flex-shrink: 0; padding-top: 0.25rem; cursor: pointer; }
.notif-check input { width: 0.9375rem; height: 0.9375rem; accent-color: hsl(var(--primary)); cursor: pointer; }
.notif-item.is-read { opacity: 0.75; }
.notif-item .notif-dot { margin-top: 0.625rem; flex-shrink: 0; }
.notif-main { flex: 1; min-width: 0; }
.notif-pagination {
  display: flex; justify-content: flex-end;
  padding: 0.75rem 1rem;
  border-top: 1px solid hsl(var(--border));
}
/* 通知详情抽屉：内容标题行右侧类别/时间高亮 */
.notif-detail-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.notif-detail-meta { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }
.notif-detail-time {
  font-size: 0.75rem; font-weight: 700;
  color: hsl(var(--primary));
}

/* 登录验证码倒计时：固定宽度 + 数字等宽，避免数字变化导致布局抖动 */
.auth-countdown {
  display: inline-block;
  min-width: 2.5em;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* 邀请落地页（spec/58） */
.invite-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
  background: hsl(var(--muted) / 0.4);
}
.invite-card {
  width: min(26rem, 100%);
  padding: 2.5rem 2rem;
  border-radius: calc(var(--radius) + 2px);
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
  box-shadow: 0 20px 50px rgb(0 0 0 / 0.08);
  display: flex; flex-direction: column; align-items: center; gap: 1.5rem;
}
.invite-brand { display: flex; align-items: center; gap: 0.5rem; }
.invite-avatar {
  width: 4.5rem; height: 4.5rem;
  border-radius: 9999px;
  object-fit: cover;
  border: 2px solid hsl(var(--border));
}
.invite-avatar-fallback {
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; font-weight: 700;
  background: hsl(var(--primary) / 0.12);
  color: hsl(var(--primary));
}

/* ---------- 首页跑马灯（spec/0151：大盘指数 + 点赞最多的产品 top50） ---------- */
.marquee-stack { display: flex; flex-direction: column; gap: 0.5rem; }
/* spec/0285：持仓页首屏先占位，避免跑马灯后填把账号表顶下去（约等于一条 .marquee 的高度） */
.marquee-stack-pending { min-height: 2.5rem; }
.marquee {
  position: relative;
  overflow: hidden;
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) - 2px);
  background: hsl(var(--card));
}
.marquee-track {
  display: flex;
  align-items: center;
  width: max-content;
  padding: 0.5rem 0;
  animation: marquee-left 40s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee-left {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0 0.875rem;
  font-size: 0.8125rem;
  line-height: 1.4;
  white-space: nowrap;
  border-right: 1px solid hsl(var(--border));
}
.marquee-item:last-child { border-right: none; }
.marquee-name { color: hsl(var(--muted-foreground)); }
.marquee-value { color: hsl(var(--foreground)); font-weight: 600; font-variant-numeric: tabular-nums; }
.marquee-change { font-variant-numeric: tabular-nums; }
/* spec/0154：产品名称是链接（点击跳订阅页定位 / 市场页搜索） */
.marquee-link { color: inherit; text-decoration: none; }
.marquee-link:hover { color: hsl(var(--primary)); text-decoration: underline; }
.marquee-item svg { width: 0.875rem; height: 0.875rem; color: hsl(var(--success)); }
/* 涨红跌绿（与站内 up/down 口径一致） */
.mq-up { color: hsl(var(--destructive)); }
.mq-down { color: hsl(var(--success)); }
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
}

/* ---------- 计费页（spec/0180 改版：续费高级版 + 钻石提现申请） ---------- */

.vip-renew-box {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap;
  padding: 1.25rem;
  border: 1px solid hsl(var(--primary) / 0.35);
  border-radius: calc(var(--radius) - 0.25rem);
  background: linear-gradient(135deg, hsl(var(--primary) / 0.07), transparent);
}
.vip-renew-price { display: flex; align-items: baseline; gap: 0.25rem; }
.vip-renew-amount { font-size: 2rem; font-weight: 800; color: hsl(var(--primary)); }
.vip-renew-unit { font-size: 0.875rem; color: hsl(var(--muted-foreground)); }
.vip-renew-features { margin: 0; }
.vip-renew-months { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.month-picks { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.month-pick {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem; font-weight: 600; font-family: inherit;
  color: hsl(var(--muted-foreground));
  border: 1px solid hsl(var(--border));
  border-radius: 0.5rem;
  background: hsl(var(--card));
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}
.month-pick:hover { border-color: hsl(var(--primary) / 0.45); }
.month-pick.is-active {
  color: hsl(var(--primary-foreground));
  background: hsl(var(--primary));
  border-color: hsl(var(--primary));
}
.month-custom { display: flex; align-items: center; gap: 0.5rem; }
.vip-renew-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding-top: 1rem;
  border-top: 1px solid hsl(var(--border));
}
.vip-renew-total { display: flex; align-items: baseline; gap: 0.5rem; }
.vip-renew-total-num { font-size: 1.5rem; font-weight: 800; color: hsl(var(--foreground)); }
.withdraw-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 768px) { .withdraw-grid { grid-template-columns: repeat(2, 1fr); } }
.withdraw-methods { justify-content: flex-start; }

/* ---------- 订阅页「交易设置」单行布局（spec/0187；控件尺寸 spec/0189） ----------
   目标：所有交易设置（自动买/数量/自动卖/数量/模式/止盈/止损/保存）**同一行、不折行**，
   在普通笔记本（1280 / 1366 宽）上也能放下；窗口过窄时**横向滚动**而不是换行。

   宽度预算（1280 宽笔记本实测）：视口 1280 − 侧栏 240 − 内容内边距 48 − 订阅列表 208 − 列间距 20 − 卡片内边距 24
   = **730px** 可用；实测各组自然宽度合计约 677px，余量留给控件加宽（spec/0189：数量 4 位、百分比 3 位、模式完整两字）。

   高度：项目里 `.input` 默认 `height: 2.5rem`（40px），对单行配置栏偏高 → 行内统一压到 **1.75rem（28px）**。 */
.subs-settings-row {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.375rem;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}
.subs-settings-row > * { flex: 0 0 auto; }
/* 交易设置卡片：内边距统一 12px（腾出宽度给控件） */
.subs-settings-card { padding: 0.75rem; }
/* 组内间距（spec/0191：由 3px 放宽到 5px，观感不再过挤） */
.subs-settings-row > div { gap: 0.3125rem; }
/* 标签/说明文字 11px（spec/0190：恢复「买入量/卖出量」与模式说明「敢跌敢买/追涨杀跌」后要腾出宽度） */
.subs-settings-row label { font-size: 0.6875rem; }
.subs-settings-row .subs-dir-hint { font-size: 0.6875rem; }
/* 行内所有输入控件：统一紧凑高度 28px + 11px 字号（先写通用规则，后面各控件再各自覆盖内边距/宽度） */
.subs-settings-row .input { height: 1.75rem; font-size: 0.6875rem; padding: 0 0.3125rem; }
/* 数量输入：足够显示 4 位以上数字（含数字微调箭头占位） */
.subs-settings-row .subs-vol-input { width: 4rem !important; text-align: center; }
/* 「模式」下拉：宽度**按内容自适应**（保证「左侧 / 右侧」两字 + 箭头都显示完整） */
.subs-settings-row .subs-dir-select { width: auto !important; min-width: 4.25rem; padding: 0 0.8125rem 0 0.375rem; }
/* spec/0269：左右拨杆（左=左侧交易，右=右侧交易，默认在左） */
.subs-settings-row .subs-side-toggle { gap: 0.25rem; }
.subs-settings-row .subs-side-label {
  font-size: 0.6875rem;
  color: hsl(var(--muted-foreground));
  white-space: nowrap;
}
.subs-settings-row .subs-side-toggle:not(.is-right) .subs-side-label-left,
.subs-settings-row .subs-side-toggle.is-right .subs-side-label-right {
  color: hsl(var(--foreground));
  font-weight: 600;
}
/* 止盈 / 止损：数字输入框 + 「%」后缀（spec/0188：原拉条改为数字框，默认仅整数 0–100） */
.subs-pct { display: inline-flex; align-items: center; gap: 0.125rem; }
.subs-pct-input { width: 3rem !important; text-align: center; }
.subs-pct-unit { font-size: 0.6875rem; color: hsl(var(--muted-foreground)); }
.subs-settings-row .subs-save-btn {
  margin-left: auto;
  height: 1.75rem;
  padding: 0 0.5rem;
  font-size: 0.6875rem;
}
/* 竖向分隔线与文字之间的留白（spec/0193：模式、止盈前的竖线由 1px 加到 3px；自动卖前的竖线已去掉） */
.subs-settings-row .subs-sep { padding-left: 0.1875rem; }
@media (max-width: 1320px) {
  /* 1280 宽笔记本：间距由 2px 放宽到 4px（+2px），控件宽度不变；
     卡片横向内边距收到 3px 以留出缓冲，避免刚好顶到边界出现横向滚动 */
  .subs-settings-row { gap: 0.25rem; }
  .subs-settings-row > div { gap: 0.25rem; }
  .subs-settings-card { padding: 0.75rem 0.1875rem; }
}
/* spec/0196：下拉项禁用态（新品页「未采集数据 → 发布」置灰不可点） */
.dropdown-item:disabled,
.dropdown-item[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}
.dropdown-item:disabled:hover,
.dropdown-item[disabled]:hover {
  background: transparent;
  color: hsl(var(--muted-foreground));
}
.dropdown-item:disabled svg,
.dropdown-item[disabled] svg { color: hsl(var(--muted-foreground)); }

/* spec/0241：支付宝回跳后的「支付结果」提示卡（社区侧栏） */
.feed-pay-result { border-left: 3px solid hsl(var(--warning)); }
.feed-pay-result.is-ok { border-left-color: hsl(var(--success)); }
.feed-pay-result.is-warn { border-left-color: hsl(var(--warning)); }
.feed-pay-result-msg { font-size: 0.8125rem; line-height: 1.6; color: hsl(var(--foreground)); margin-top: 0.25rem; }
.feed-pay-result-no { margin-top: 0.375rem; font-size: 0.6875rem; color: hsl(var(--muted-foreground)); word-break: break-all; }
/* spec/0241：弹窗内真实支付二维码（服务端生成 SVG data URI，直接作为 img 源） */
.pay-qr img,
.pay-qr svg { width: 10rem; height: 10rem; display: block; }
.pay-qr.is-real { color: inherit; }
.pay-qr-spinner {
  width: 1.5rem; height: 1.5rem; border-radius: 9999px;
  border: 2px solid hsl(var(--border));
  border-top-color: hsl(var(--primary));
  animation: pay-qr-spin 0.9s linear infinite;
  display: inline-block;
}
@keyframes pay-qr-spin { to { transform: rotate(360deg); } }
.pay-qr-error { font-size: 0.8125rem; font-weight: 600; color: hsl(var(--destructive)); text-align: center; padding: 0 0.5rem; }
.pay-qr-ok { font-size: 0.9375rem; font-weight: 700; color: hsl(var(--success)); }

/* spec/0242：支付方式选中态 —— 小圆点变绿（未选中为灰） */
.pay-method.is-active .pay-method-dot { background: hsl(var(--success)); opacity: 1; }
.pay-method:not(.is-active) .pay-method-dot { background: hsl(var(--muted-foreground)); opacity: 0.45; }