/* ==========================================================================
   小豆交易助手 · 设计系统
   风格：暖白底 + 赤陶橙 + 衬线大标题（参考 Claude）
   语义：涨 = 红(--up) / 跌 = 绿(--down)，符合 A 股习惯
   ========================================================================== */

:root {
  --bg: #faf9f5;
  --bg-warm: #f4f2ec;
  --panel: #ffffff;
  --panel2: #f7f6f1;
  --panel3: #f1efe8;
  --border: rgba(20, 20, 19, .10);
  --border-strong: rgba(20, 20, 19, .16);
  --text: #1a1a19;
  --muted: #78776f;
  --muted2: #9a988f;
  --accent: #d97757;
  --accent-strong: #c96442;
  --accent-soft: rgba(217, 119, 87, .10);
  --accent-line: rgba(217, 119, 87, .28);
  --ink: #191919;
  --ok: #3f8f5f;
  --warn: #c98a2b;
  --bad: #c0392b;
  --up: #d9432f;
  --down: #2f9e44;
  --radius: 16px;
  --radius-sm: 12px;
  --radius-lg: 22px;
  --shadow: 0 1px 2px rgba(20, 20, 19, .04), 0 10px 30px rgba(20, 20, 19, .05);
  --shadow-lg: 0 2px 6px rgba(20, 20, 19, .05), 0 24px 60px rgba(20, 20, 19, .09);
  --ease: cubic-bezier(.22, .61, .36, 1);
  --font-display: "Iowan Old Style", "Palatino Linotype", "Songti SC", "Noto Serif SC", Georgia, "Times New Roman", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { background: var(--bg); scroll-behavior: smooth; }

body {
  background: transparent;
  color: var(--text);
  font: 14px/1.6 var(--font-body);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* 背景装饰层：细网格 + 呼吸光斑 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(20, 20, 19, .028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 20, 19, .028) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 120% 80% at 50% 0%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 120% 80% at 50% 0%, #000 20%, transparent 78%);
}
body::after {
  content: "";
  position: fixed;
  top: -30vh;
  left: -10vw;
  width: 120vw;
  height: 90vh;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(46vw 46vw at 22% 34%, rgba(217, 119, 87, .13), transparent 68%),
    radial-gradient(38vw 38vw at 76% 18%, rgba(63, 143, 95, .09), transparent 66%);
  filter: blur(6px);
  animation: auraBreath 16s ease-in-out infinite;
}

main { position: relative; z-index: 1; max-width: 1200px; margin: 26px auto 60px; padding: 0 18px; }

/* ============================ 动效关键帧 ============================ */
@keyframes auraBreath {
  0%, 100% { opacity: .85; transform: translate3d(0, 0, 0) scale(1); }
  50% { opacity: 1; transform: translate3d(2vw, 2vh, 0) scale(1.06); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes drawLine {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}
@keyframes areaIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes artFillIn {
  from { opacity: 0; }
  to { opacity: .2; }
}
@keyframes pulseBar {
  0%, 100% { transform: scaleY(.42); }
  50% { transform: scaleY(1); }
}
@keyframes sweep {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}
@keyframes shimmer {
  0% { background-position: -420px 0; }
  100% { background-position: 420px 0; }
}
@keyframes numFlash {
  0% { background-color: var(--accent-soft); }
  100% { background-color: transparent; }
}
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes drawPath {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}
@keyframes routeRun {
  0% { opacity: 1; width: 0; }
  55% { opacity: 1; width: 78%; }
  100% { opacity: 0; width: 100%; }
}
@keyframes dotPulse {
  0%, 100% { opacity: .25; transform: scale(.85); }
  50% { opacity: 1; transform: scale(1.15); }
}

/* ============================ 顶部进度条 ============================ */
#route-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0;
  z-index: 999;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
  box-shadow: 0 0 12px var(--accent-line);
  opacity: 0;
  pointer-events: none;
}
#route-progress.run { animation: routeRun .75s var(--ease) forwards; }

/* ============================ 顶栏 ============================ */
header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 22px;
  flex-wrap: wrap;
  background: rgba(250, 249, 245, .82);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -.2px;
  color: var(--text);
}
.brand-mark {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  color: var(--accent);
}
.brand-mark svg { display: block; width: 100%; height: 100%; }
.brand-mark .bm-line {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: drawPath 1.8s var(--ease) .2s forwards;
}

nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
nav button {
  position: relative;
  background: transparent;
  color: var(--muted);
  border: 0;
  padding: 7px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  transition: color .2s var(--ease), background .2s var(--ease), transform .2s var(--ease);
}
nav button:hover { color: var(--text); background: rgba(20, 20, 19, .05); }
nav button.active { color: var(--text); background: var(--accent-soft); font-weight: 600; }
nav button.active::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 3px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  animation: fadeUp .3s var(--ease) backwards;
}
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 4px; }

/* ============================ 页签与入场动效 ============================ */
.tab { display: none; }
.tab.active { display: block; }
.tab.active > * { animation: fadeUp .5s var(--ease) backwards; }
.tab.active > *:nth-child(1) { animation-delay: .00s; }
.tab.active > *:nth-child(2) { animation-delay: .05s; }
.tab.active > *:nth-child(3) { animation-delay: .10s; }
.tab.active > *:nth-child(4) { animation-delay: .15s; }
.tab.active > *:nth-child(5) { animation-delay: .20s; }
.tab.active > *:nth-child(6) { animation-delay: .25s; }
.tab.active > *:nth-child(7) { animation-delay: .30s; }
.tab.active > *:nth-child(8) { animation-delay: .35s; }
.tab.active .grid > * { animation: fadeUp .5s var(--ease) backwards; }
.tab.active .grid > *:nth-child(1) { animation-delay: .04s; }
.tab.active .grid > *:nth-child(2) { animation-delay: .10s; }
.tab.active .grid > *:nth-child(3) { animation-delay: .16s; }
.tab.active .grid > *:nth-child(4) { animation-delay: .22s; }
.tab.active .grid > *:nth-child(5) { animation-delay: .28s; }
.tab.active .grid > *:nth-child(6) { animation-delay: .34s; }

/* ============================ 卡片 ============================ */
.grid { display: grid; gap: 14px; }
.cards { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

.card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.grid .card { margin-bottom: 0; }
.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 18px;
  right: 18px;
  height: 2px;
  border-radius: 0 0 2px 2px;
  background: linear-gradient(90deg, transparent, var(--accent-line), transparent);
  opacity: 0;
  transition: opacity .35s var(--ease);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--border-strong); }
.card:hover::before { opacity: 1; }

.card h3 {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
  font-weight: 600;
  letter-spacing: .3px;
}
.big {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  margin: 4px 0;
  letter-spacing: -.8px;
  line-height: 1.15;
}
.sub { color: var(--muted); font-size: 12px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.num-flash { animation: numFlash 1.1s var(--ease); border-radius: 6px; }

/* 骨架屏 */
.skeleton {
  display: block;
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--panel2) 25%, var(--panel3) 37%, var(--panel2) 63%);
  background-size: 420px 100%;
  animation: shimmer 1.4s linear infinite;
}

/* ============================ 大盘脉搏（像素带） ============================ */
.pulse-strip {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 46px;
  margin-bottom: 14px;
  padding: 8px 14px 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.pulse-strip::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 22%;
  background: linear-gradient(90deg, transparent, rgba(217, 119, 87, .16), transparent);
  animation: sweep 4.6s var(--ease) infinite;
  pointer-events: none;
}
.pulse-strip .pb {
  flex: 1;
  min-width: 2px;
  height: 100%;
  border-radius: 2px;
  transform-origin: bottom;
  background: var(--accent);
  opacity: .55;
  transition: height .9s var(--ease), background .6s var(--ease), opacity .6s var(--ease);
  animation: pulseBar 3.4s ease-in-out infinite;
}
.pulse-strip .pb.up { background: var(--up); }
.pulse-strip .pb.down { background: var(--down); }
.pulse-strip .pb.flat { background: var(--muted2); }
.pulse-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  margin: -8px 0 14px 2px;
}
.pulse-meta .live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--up);
  animation: dotPulse 1.6s ease-in-out infinite;
}

/* ============================ 按钮 ============================ */
button {
  font-family: inherit;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border-strong);
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: transform .18s var(--ease), background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease);
}
button:hover { border-color: var(--accent-line); color: var(--accent-strong); }
button:active { transform: scale(.975); }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 2px 10px var(--accent-line); }
button.primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: #fff; }
button.ghost { background: transparent; border-color: transparent; color: var(--accent-strong); }
button.ghost:hover { background: var(--accent-soft); }
button.small { padding: 4px 9px; font-size: 12px; }
button.block { width: 100%; margin-bottom: 8px; }
button:disabled { opacity: .5; cursor: not-allowed; }
button:focus-visible { outline: 2px solid var(--accent-line); outline-offset: 2px; }

/* ============================ 表单 ============================ */
input, select {
  font-family: inherit;
  background: var(--panel);
  border: 1px solid var(--border-strong);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 14px;
  outline: none;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input::placeholder { color: var(--muted2); }
input[type="password"] { letter-spacing: 2px; }
label { display: block; color: var(--muted); font-size: 12px; margin: 10px 0 4px; }
label.chk { display: flex; align-items: center; gap: 6px; margin: 8px 0; }
.form-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.form-row input, .form-row select { min-width: 110px; }
.form-col { display: flex; flex-direction: column; }
.form-col input { width: 100%; }
.hidden { display: none !important; }

/* ============================ 表格 ============================ */
.table-wrap { overflow-x: auto; border-radius: var(--radius-sm); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { color: var(--muted); font-weight: 600; background: var(--panel2); position: sticky; top: 0; z-index: 1; }
tbody tr { transition: background .18s var(--ease); }
tbody tr:hover td { background: var(--accent-soft); }
tbody tr:last-child td { border-bottom: 0; }

/* ============================ 徽章 / 标签 ============================ */
.badge { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge.low { background: rgba(63, 143, 95, .12); color: #2f7a4c; }
.badge.mid { background: rgba(201, 138, 43, .13); color: #a8721f; }
.badge.high { background: rgba(192, 57, 43, .11); color: #a83025; }
.badge.act { background: var(--accent-soft); color: var(--accent-strong); }

.chip { display: inline-block; padding: 4px 10px; border-radius: 8px; font-size: 12px; line-height: 1.5; }
.chip-etf { background: var(--accent-soft); color: var(--accent-strong); border: 1px solid var(--accent-line); }
.chip-fund { background: rgba(63, 143, 95, .1); color: #2f7a4c; border: 1px solid rgba(63, 143, 95, .22); }
.chip-reason { background: var(--accent-soft); color: var(--accent-strong); border: 1px solid var(--accent-line); }
.prod-row { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 10px 10px; }

.ok { color: var(--ok); }
.warn { color: var(--warn); }
.bad { color: var(--bad); }
.up { color: var(--up); }
.down { color: var(--down); }
.flat { color: var(--muted); }
.act.buy { color: var(--up); }
.act.sell { color: var(--down); }
.act.cut { color: var(--warn); }

/* ============================ 列表 / 小项 ============================ */
.mini-list { display: flex; flex-direction: column; gap: 6px; }
.mini-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  background: var(--panel2);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  transition: background .22s var(--ease), border-color .22s var(--ease), transform .22s var(--ease);
}
.mini-item:hover { background: var(--panel); border-color: var(--border); transform: translateX(2px); }

.row { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: 13px; border-bottom: 1px dashed var(--border); }
.row:last-child { border-bottom: 0; }
.row .k { color: var(--muted); flex-shrink: 0; }

.bar-wrap { height: 6px; background: rgba(20, 20, 19, .07); border-radius: 3px; overflow: hidden; flex: 1; margin: 0 10px; }
.bar { height: 100%; border-radius: 3px; }

.gauge { height: 10px; background: rgba(20, 20, 19, .07); border-radius: 5px; overflow: hidden; margin: 8px 0; }
.gauge-fill { height: 100%; width: 0; border-radius: 5px; transition: width .8s var(--ease); background: linear-gradient(90deg, var(--ok), var(--warn), var(--bad)); }

.vbar { width: 100%; height: 8px; background: rgba(20, 20, 19, .07); border-radius: 4px; position: relative; margin: 6px 0 2px; }
.vbar .mark { position: absolute; height: 100%; border-left: 2px solid var(--text); }
.vbar .fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--ok), var(--warn), var(--bad)); transition: width .8s var(--ease); }

/* ============================ 搜索 ============================ */
.search-results {
  display: none;
  position: absolute;
  z-index: 20;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  max-height: 260px;
  overflow-y: auto;
  min-width: 300px;
  animation: fadeUp .25s var(--ease) backwards;
}
.search-results.open { display: block; }
.search-results .item { padding: 8px 12px; cursor: pointer; display: flex; justify-content: space-between; gap: 12px; }
.search-results .item:hover { background: var(--panel2); }

/* ============================ Markdown 输出 ============================ */
.markdown { line-height: 1.75; }
.markdown h2 {
  font-family: var(--font-display);
  font-size: 17px;
  margin: 16px 0 6px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  padding-bottom: 5px;
  letter-spacing: -.2px;
}
.markdown h3 { font-size: 14px; margin: 12px 0 4px; }
.markdown p { margin: 6px 0; }
.markdown ul, .markdown ol { margin: 6px 0 6px 20px; }
.markdown li { margin: 3px 0; }
.markdown code { background: var(--panel2); padding: 1px 5px; border-radius: 4px; font-size: 12px; font-family: var(--font-mono); }
.markdown pre { background: var(--panel2); border-radius: var(--radius-sm); padding: 14px; white-space: pre-wrap; font-family: var(--font-mono); font-size: 13px; line-height: 1.6; max-height: 500px; overflow: auto; }
.markdown hr { border: 0; border-top: 1px solid var(--border); margin: 12px 0; }
.markdown blockquote { border-left: 3px solid var(--accent); padding-left: 10px; color: var(--muted); margin: 8px 0; }
code { background: var(--panel2); padding: 1px 6px; border-radius: 4px; font-size: 12px; font-family: var(--font-mono); }

.history-item { padding: 9px 12px; background: var(--panel2); border-radius: var(--radius-sm); margin-bottom: 8px; display: flex; gap: 10px; align-items: flex-start; }
.history-item .meta { color: var(--muted); font-size: 12px; min-width: 130px; }
.history-item pre { white-space: pre-wrap; font-family: inherit; font-size: 12px; color: var(--text); max-height: 120px; overflow: auto; flex: 1; }

/* ============================ 登录页 ============================ */
.auth-wrap {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}
.auth-shell {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 44px;
  align-items: center;
  width: 100%;
  max-width: 1000px;
}
.auth-hero { animation: fadeUp .7s var(--ease) backwards; }
.hero-kicker {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 2.4px;
  font-weight: 700;
  color: var(--accent-strong);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.auth-hero h1 {
  font-family: var(--font-display);
  font-size: 44px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -1.2px;
  color: var(--text);
  margin-bottom: 14px;
}
.hero-sub { color: var(--muted); font-size: 14px; line-height: 1.85; max-width: 400px; }
.auth-art { margin-top: 26px; height: 128px; }
.auth-art svg { width: 100%; height: 100%; display: block; overflow: visible; }
.auth-art .art-grid { stroke: rgba(20, 20, 19, .08); }
.auth-art .art-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: drawPath 2.4s var(--ease) .3s forwards;
}
.auth-art .art-fill { fill: var(--accent); opacity: 0; animation: artFillIn 1.2s var(--ease) 1.6s forwards; }
.auth-art .art-node { fill: #fff; stroke: var(--accent); stroke-width: 2; opacity: 0; animation: areaIn .5s var(--ease) forwards; }
.auth-art .art-node.n1 { animation-delay: 1.1s; }
.auth-art .art-node.n2 { animation-delay: 1.5s; }
.auth-art .art-node.n3 { animation-delay: 1.9s; }
.auth-art .art-float { animation: floatY 5s ease-in-out infinite; }

.auth-card {
  animation: fadeUp .7s var(--ease) .12s backwards;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px 30px 26px;
  width: 100%;
  box-shadow: var(--shadow-lg);
}
.auth-card h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: -.5px;
}
.auth-card > .muted { margin-bottom: 18px; font-size: 12.5px; }
.auth-tabs { display: flex; gap: 6px; margin-bottom: 6px; background: rgba(20, 20, 19, .05); padding: 4px; border-radius: var(--radius-sm); }
.auth-tabs button { flex: 1; background: transparent; border-color: transparent; }
.auth-tabs button.active { background: var(--panel); color: var(--text); border-color: transparent; box-shadow: 0 1px 4px rgba(20, 20, 19, .08); font-weight: 600; }
.auth-msg { min-height: 18px; margin-top: 10px; font-size: 12px; }

/* ============================ 预警 ============================ */
.alert-item {
  border: 1px solid var(--border);
  border-left-width: 3px;
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  margin-bottom: 10px;
  background: var(--panel2);
  animation: fadeUp .45s var(--ease) backwards;
}
.alert-item.danger { border-left-color: var(--bad); }
.alert-item.warn { border-left-color: var(--warn); }
.alert-item.info { border-left-color: var(--accent); }
.alert-title { font-weight: 700; margin-bottom: 3px; }
.alert-desc { color: var(--muted); font-size: 12px; }
.alert-item.danger .alert-title { color: var(--bad); }
.alert-item.warn .alert-title { color: var(--warn); }

/* ============================ OCR ============================ */
.ocr-img-wrap { margin: 10px 0; }
.ocr-img-wrap img { max-width: 100%; max-height: 320px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.ocr-table { width: 100%; font-size: 12px; margin: 8px 0; }
.ocr-table th { background: var(--panel); }

/* ============================ 买卖时点 / 持仓穿透 ============================ */
.timing {
  margin-top: 8px;
  padding: 9px 11px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text);
}
.timing b { color: var(--accent-strong); display: block; margin-bottom: 4px; }
.timing div { padding: 1px 0; }

.holdings {
  margin-top: 8px;
  padding: 9px 11px;
  background: rgba(63, 143, 95, .06);
  border: 1px solid rgba(63, 143, 95, .2);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text);
}
.holdings b { color: #2f7a4c; display: block; margin-bottom: 4px; }
.holdings div { display: flex; justify-content: space-between; padding: 1px 0; }

/* ============================ 新闻 ============================ */
.news-title { color: var(--text); text-decoration: none; font-size: 13px; }
.news-title:hover { color: var(--accent-strong); text-decoration: underline; }

/* ============================ 用户 / 管理 ============================ */
.user-chip { margin-right: 6px; font-size: 13px; color: var(--text); }
.user-chip b { color: var(--accent-strong); }
.admin-section { margin-top: 14px; }
.admin-section h4 { font-size: 13px; margin: 12px 0 8px; }
.usage-row { font-size: 12px; }
#admin-panel .cards { grid-template-columns: 1fr; }
#admin-panel .table-wrap { margin-top: 8px; border-radius: var(--radius-sm); border: 1px solid var(--border); }

/* ============================ 机会雷达 ============================ */
.radar-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 6px 8px;
  background: var(--panel);
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.radar-card:hover { border-color: var(--accent-line); box-shadow: var(--shadow); }
.radar-card .mini-item { background: transparent; }
.radar-reason { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 4px 10px 0; }
.radar-reason .f { font-size: 11px; color: var(--muted); }
.radar-dims { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 10px 2px; }
.dim { font-size: 11px; padding: 3px 8px; border-radius: 8px; background: var(--panel2); color: var(--muted); border: 1px solid var(--border); }
.dim-hi { background: var(--accent-soft); color: var(--accent-strong); border-color: var(--accent-line); }
.radar-factors { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; font-size: 12px; color: var(--muted); }
.radar-factors .f { padding: 3px 8px; border-radius: 8px; background: var(--panel2); }

.verdict { font-weight: 700; font-size: 12px; padding: 3px 10px; border-radius: 20px; }
.verdict.priority { background: rgba(63, 143, 95, .14); color: #2f7a4c; }
.verdict.ok { background: var(--accent-soft); color: var(--accent-strong); }
.verdict.warn { background: rgba(201, 138, 43, .15); color: #a8721f; }
.verdict.avoid { background: rgba(192, 57, 43, .12); color: #a83025; }

.stale-banner {
  background: rgba(201, 138, 43, .1);
  color: #96681a;
  border: 1px solid rgba(201, 138, 43, .28);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 12px;
  font-size: 13px;
}

/* ============================ 编辑行 ============================ */
.edit-grid { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; padding: 6px 0; }
.edit-grid label { font-size: 12px; color: var(--muted); }
.edit-grid input { width: 110px; margin-left: 4px; padding: 4px 6px; border: 1px solid var(--border); border-radius: 6px; }
tr.editing td { background: var(--panel2); }

/* ============================ 自选 ============================ */
.wl-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.wl-head h3 { margin-bottom: 0; }
.wl-actions { display: flex; gap: 8px; flex-shrink: 0; }
.demo-banner {
  margin-bottom: 10px;
  padding: 9px 12px;
  border: 1px dashed var(--accent-line);
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--text);
  font-size: 13px;
  animation: fadeUp .4s var(--ease) backwards;
}
.demo-banner b { color: var(--accent-strong); }

/* ============================ 趋势曲线 ============================ */
.chart-wrap { margin: 8px 0 2px; background: var(--panel2); border-radius: var(--radius-sm); padding: 6px; }
.chart-wrap svg { display: block; width: 100%; height: 60px; }
.chart-wrap .spark-line,
.chart-wrap .spark-ma {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: drawLine 1.5s var(--ease) forwards;
}
.chart-wrap .spark-ma { animation-delay: .3s; }
.chart-wrap .spark-area { opacity: 0; animation: areaIn 1s var(--ease) .5s forwards; }
.chart-wrap .spark-dot { opacity: 0; animation: areaIn .5s var(--ease) 1.35s forwards; }
.chart-legend { display: flex; gap: 12px; font-size: 11px; color: var(--muted); padding: 2px 4px 0; }
.chart-legend .l1::before, .chart-legend .l2::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 3px;
  border-radius: 2px;
  margin-right: 5px;
  vertical-align: middle;
}
.chart-legend .l1::before { background: var(--accent); }
.chart-legend .l2::before { background: var(--warn); }

/* ============================ 买卖建议 ============================ */
.advice-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--panel2);
  border-radius: var(--radius-sm);
  animation: fadeUp .45s var(--ease) backwards;
  transition: background .22s var(--ease), transform .22s var(--ease);
}
.advice-item:hover { background: var(--panel3); transform: translateX(2px); }
.advice-item .a-name { font-weight: 600; min-width: 110px; }
.advice-item .a-meta { color: var(--muted); font-size: 12px; flex: 1; }
.advice-amt { font-weight: 700; font-size: 15px; }
.advice-totals { display: flex; gap: 14px; margin-top: 10px; font-size: 13px; }

/* ============================ 权限勾选 ============================ */
.perm-grid { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.perm-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
  cursor: pointer;
  background: var(--panel);
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.perm-item:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.perm-item input { accent-color: var(--accent); }

/* ============================ 弹窗 ============================ */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 19, .38);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: areaIn .2s var(--ease);
}
.modal-card {
  background: var(--panel);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 640px;
  max-height: 86vh;
  overflow: auto;
  padding: 22px 24px;
  animation: fadeUp .32s var(--ease) backwards;
}
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.modal-head h3 { color: var(--text); font-size: 16px; font-family: var(--font-display); font-weight: 600; }

/* ============================ 回测 / 情绪 ============================ */
.backtest-box {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  margin: 4px 10px 8px;
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(20, 20, 19, .03);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
}
.backtest-box .bt-title { font-weight: 600; color: var(--text); }
.backtest-box.muted { color: var(--muted); }
.bt-up { color: var(--up); font-weight: 600; }
.bt-down { color: var(--down); font-weight: 600; }
.sentiment-bar { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; }
.sentiment-bar .sent-label { font-weight: 600; color: var(--text); }

/* ============================ 收益日历 ============================ */
.earnings-card { grid-column: 1 / -1; margin-bottom: 14px; }
.earn-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.earn-title h3 {
  margin-bottom: 2px;
  font-size: 19px;
  color: var(--text);
  font-weight: 600;
  letter-spacing: -.4px;
  font-family: var(--font-display);
}
.earn-summary { font-size: 13px; color: var(--muted); margin-top: 2px; }
.earn-summary b { font-size: 15px; }
.earn-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.seg { display: flex; background: rgba(20, 20, 19, .05); border-radius: 999px; padding: 3px; }
.seg button {
  border: 0;
  background: transparent;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
  cursor: pointer;
  transition: background .25s var(--ease), color .25s var(--ease), box-shadow .25s var(--ease);
}
.seg button.active { background: var(--panel); color: var(--text); box-shadow: 0 1px 4px rgba(20, 20, 19, .08); }
.earn-nav { display: flex; align-items: center; gap: 4px; }
.earn-nav button { width: 32px; height: 32px; padding: 0; border-radius: 999px; font-size: 18px; background: var(--panel); border: 1px solid var(--border); color: var(--text); }
.earn-nav button:hover { border-color: var(--accent-line); color: var(--accent-strong); }
.earn-month { font-weight: 700; min-width: 92px; text-align: center; font-size: 14px; }
.earn-legend { display: flex; gap: 14px; margin: 10px 0 8px; font-size: 12px; color: var(--muted); align-items: center; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 5px; }
.dot.up { background: var(--up); }
.dot.down { background: var(--down); }
.earn-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.earn-dow { text-align: center; font-size: 12px; color: var(--muted); padding: 4px 0 6px; }
.earn-day {
  min-height: 64px;
  border-radius: 16px;
  background: var(--panel2);
  border: 1px solid transparent;
  padding: 8px 6px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: background .25s var(--ease), box-shadow .25s var(--ease), transform .25s var(--ease), border-color .25s var(--ease);
}
.earn-day:hover { background: var(--panel); box-shadow: var(--shadow); transform: translateY(-2px); }
.earn-day .d { font-size: 13px; color: var(--text); }
.earn-day .v { font-size: 11px; font-weight: 700; min-height: 14px; }
.earn-day.weekend .d { color: var(--muted2); }
.earn-day.today { background: var(--accent-soft); border-color: var(--accent-line); }
.earn-day.today .d { color: var(--accent-strong); font-weight: 800; }
.earn-day.empty { background: transparent; border: 0; box-shadow: none; min-height: 0; padding: 0; }
.earn-day .v.up { color: var(--up); }
.earn-day .v.down { color: var(--down); }
.earn-day .v.flat { color: var(--muted); }

/* ============================ 提示条 ============================ */
#toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: #f7f6f1;
  border-radius: 999px;
  padding: 10px 20px;
  z-index: 300;
  box-shadow: 0 10px 34px rgba(20, 20, 19, .28);
  font-size: 13px;
  animation: fadeUp .3s var(--ease) backwards;
}

/* ============================ 滚动条 ============================ */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(20, 20, 19, .16); border-radius: 999px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: rgba(20, 20, 19, .28); }

::selection { background: var(--accent-soft); color: var(--accent-strong); }

/* ============================ 响应式 ============================ */
@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; gap: 26px; max-width: 460px; }
  .auth-hero h1 { font-size: 32px; }
  .auth-art { height: 88px; margin-top: 18px; }
}
@media (max-width: 560px) {
  header { padding: 10px 14px; gap: 10px; }
  main { margin: 16px auto 48px; }
  .big { font-size: 26px; }
  .earn-cal { gap: 4px; }
  .earn-day { min-height: 54px; padding: 6px 2px; border-radius: 12px; }
  .pulse-strip { height: 38px; gap: 2px; padding: 6px 10px 5px; }
}

/* ============================ 无障碍：减弱动效 ============================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    transition-delay: 0ms !important;
  }
  body::after { animation: none; }
  .chart-wrap .spark-line,
  .chart-wrap .spark-ma,
  .auth-art .art-line,
  .brand-mark .bm-line { stroke-dashoffset: 0; }
  .chart-wrap .spark-area,
  .chart-wrap .spark-dot,
  .auth-art .art-node { opacity: 1; }
  .auth-art .art-fill { opacity: .2; }
  .auth-bg .ab-line { stroke-dashoffset: 0; }
  .auth-bg .ab-sun,
  .auth-bg .ab-node { opacity: 1; }
}

/* ==========================================================================
   全站动效增强：让每个页面的数据都“动”起来
   ========================================================================== */

/* ---- 顶栏底边流动光 ---- */
header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-line), transparent);
  animation: headerFlow 7s var(--ease) infinite;
  pointer-events: none;
}
@keyframes headerFlow {
  0% { transform: translateX(-45%); opacity: 0; }
  40% { opacity: 1; }
  100% { transform: translateX(45%); opacity: 0; }
}

/* ---- 温度计：充能流光 ---- */
.gauge { position: relative; }
.gauge-fill { position: relative; overflow: hidden; }
.gauge-fill::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 40%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .64), transparent);
  animation: barSweep 2.8s var(--ease) infinite;
  pointer-events: none;
}
@keyframes barSweep {
  0% { transform: translateX(-130%); opacity: 0; }
  20% { opacity: 1; }
  70%, 100% { transform: translateX(320%); opacity: 0; }
}

/* ---- 估值分位条：充能 + 指针浮现 ---- */
.vbar .fill { position: relative; overflow: hidden; }
.vbar .fill::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 45%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent);
  animation: barSweep 3.1s var(--ease) .35s infinite;
  pointer-events: none;
}
.vbar .mark { animation: markPop .55s var(--ease) .55s backwards; }
@keyframes markPop {
  from { opacity: 0; transform: translateX(-10px) scaleY(.5); }
  to { opacity: 1; transform: translateX(0) scaleY(1); }
}

/* ---- 页签下划线滑入 ---- */
nav button.active::after { animation: navUnderline .34s var(--ease) backwards; }
@keyframes navUnderline {
  from { opacity: 0; transform: scaleX(.15); }
  to { opacity: 1; transform: scaleX(1); }
}

/* ---- 列表项依次入场 ---- */
.mini-list > * { animation: fadeUp .42s var(--ease) backwards; }
.mini-list > *:nth-child(1) { animation-delay: .03s; }
.mini-list > *:nth-child(2) { animation-delay: .08s; }
.mini-list > *:nth-child(3) { animation-delay: .13s; }
.mini-list > *:nth-child(4) { animation-delay: .18s; }
.mini-list > *:nth-child(5) { animation-delay: .23s; }
.mini-list > *:nth-child(6) { animation-delay: .28s; }
.mini-list > *:nth-child(7) { animation-delay: .33s; }
.mini-list > *:nth-child(8) { animation-delay: .38s; }
.mini-list > *:nth-child(9) { animation-delay: .43s; }
.mini-list > *:nth-child(n+10) { animation-delay: .48s; }

/* ---- 预警 / 买卖建议依次入场 ---- */
#alert-list > .alert-item { animation: fadeUp .45s var(--ease) backwards; }
#alert-list > .alert-item:nth-child(1) { animation-delay: .08s; }
#alert-list > .alert-item:nth-child(2) { animation-delay: .16s; }
#alert-list > .alert-item:nth-child(3) { animation-delay: .24s; }
#alert-list > .alert-item:nth-child(n+4) { animation-delay: .3s; }
#advice-list > .advice-item:nth-child(1) { animation-delay: .06s; }
#advice-list > .advice-item:nth-child(2) { animation-delay: .12s; }
#advice-list > .advice-item:nth-child(3) { animation-delay: .18s; }
#advice-list > .advice-item:nth-child(n+4) { animation-delay: .24s; }

/* ---- 表格行依次入场（持仓 / 自选 / 用户管理） ---- */
tbody tr { animation: rowIn .4s var(--ease) backwards; }
tbody tr:nth-child(1) { animation-delay: .02s; }
tbody tr:nth-child(2) { animation-delay: .06s; }
tbody tr:nth-child(3) { animation-delay: .10s; }
tbody tr:nth-child(4) { animation-delay: .14s; }
tbody tr:nth-child(5) { animation-delay: .18s; }
tbody tr:nth-child(6) { animation-delay: .22s; }
tbody tr:nth-child(7) { animation-delay: .26s; }
tbody tr:nth-child(n+8) { animation-delay: .30s; }
@keyframes rowIn {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: none; }
}

/* ---- 收益日历逐格弹出 ---- */
.earn-day { animation: popIn .42s var(--ease) backwards; }
@keyframes popIn {
  from { opacity: 0; transform: translateY(9px) scale(.94); }
  to { opacity: 1; transform: none; }
}

/* ---- 雷达维度 / 产品标签依次出现 ---- */
.radar-dims .dim,
.radar-reason .f,
.radar-factors .f,
.prod-row .chip { animation: fadeUp .4s var(--ease) backwards; }
.radar-dims .dim:nth-child(1), .radar-factors .f:nth-child(1), .prod-row .chip:nth-child(1) { animation-delay: .14s; }
.radar-dims .dim:nth-child(2), .radar-factors .f:nth-child(2), .prod-row .chip:nth-child(2) { animation-delay: .20s; }
.radar-dims .dim:nth-child(3), .radar-factors .f:nth-child(3), .prod-row .chip:nth-child(3) { animation-delay: .26s; }
.radar-dims .dim:nth-child(n+4), .radar-factors .f:nth-child(n+4), .prod-row .chip:nth-child(n+4) { animation-delay: .32s; }
.backtest-box { animation: fadeUp .45s var(--ease) .2s backwards; }

/* ---- AI 分析：加载脉冲 + 结果逐段淡入 ---- */
#ai-loading { display: inline-flex; align-items: center; gap: 7px; }
#ai-loading::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: dotPulse 1.1s ease-in-out infinite;
}
.markdown > * { animation: fadeUp .4s var(--ease) backwards; }
.markdown > *:nth-child(2) { animation-delay: .05s; }
.markdown > *:nth-child(3) { animation-delay: .10s; }
.markdown > *:nth-child(4) { animation-delay: .15s; }
.markdown > *:nth-child(n+5) { animation-delay: .20s; }

/* ---- AI 历史 / 算力明细逐条淡入 ---- */
#ai-history > .history-item { animation: fadeUp .4s var(--ease) backwards; }
#ai-history > .history-item:nth-child(1) { animation-delay: .04s; }
#ai-history > .history-item:nth-child(2) { animation-delay: .10s; }
#ai-history > .history-item:nth-child(3) { animation-delay: .16s; }
#ai-history > .history-item:nth-child(n+4) { animation-delay: .22s; }

/* ================= 统一描边图标 + 品牌标识重设计 ================= */

/* ---- 描边图标：随字号缩放，颜色跟随当前文本 ---- */
.ic {
  width: 1.26em;
  height: 1.26em;
  flex: 0 0 auto;
  display: inline-block;
  vertical-align: -.19em;
  color: currentColor;
}

/* 卡片标题：图标 + 文字一行，右侧按钮自动靠右 */
.card h3 {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--text);
  font-weight: 600;
  letter-spacing: .2px;
  margin-bottom: 10px;
}
.card h3 > .ic { color: var(--accent); opacity: .78; }
.card h3 > button,
.card h3 > .act,
.card h3 > .badge { margin-left: auto; }
.wl-head h3 { margin-bottom: 0; }
.earn-title h3 { font-size: 19px; }
.earn-title h3 > .ic { width: 1em; height: 1em; }

/* 内联小图标（按钮/标签里） */
.ic-slot { display: inline-flex; align-items: center; }
.ic-slot .ic { margin-right: 5px; }
button .ic-slot .ic,
label .ic-slot .ic { color: currentColor; opacity: .82; }
.stale-banner .ic { margin-right: 6px; }

/* ---- 品牌标识 ---- */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
}
.brand-mark {
  position: relative;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: grid;
  place-items: center;
  color: var(--accent-strong);
  border-radius: 11px;
  background: linear-gradient(155deg, rgba(217, 119, 87, .20), rgba(217, 119, 87, .045));
  box-shadow: inset 0 0 0 1px rgba(217, 119, 87, .22);
  overflow: hidden;
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 22% 12%, rgba(255, 255, 255, .55), transparent 62%);
  pointer-events: none;
}
.brand-mark svg { position: relative; display: block; width: 100%; height: 100%; }
.brand-mark .bm-line {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: drawPath 1.8s var(--ease) .2s forwards;
}
.brand-mark .bm-dot { animation: markPop .5s var(--ease) 1.1s backwards; }
.brand-mark .bm-base { animation: fadeUp .5s var(--ease) .05s backwards; }
.brand-text { display: flex; align-items: baseline; line-height: 1; white-space: nowrap; }
.brand-text .bt-a {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -.3px;
  color: var(--text);
}
.brand-text .bt-b {
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: .6px;
  color: var(--muted);
  margin-left: 4px;
}
.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.auth-brand .brand-text .bt-a { font-size: 21px; }
.auth-brand .brand-text .bt-b { font-size: 14px; }

@media (max-width: 560px) {
  .brand-text .bt-b { display: none; }
}

/* ================= 登录页（整屏画布 + 悬浮登录卡） ================= */
.auth-wrap {
  position: relative;
  z-index: 1;
  display: block;
  min-height: 100vh;
  padding: 0;
  overflow: hidden;
}

/* 左侧渐隐的行情网格底纹 */
.auth-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(20, 20, 19, .052) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 20, 19, .032) 1px, transparent 1px);
  background-size: 100% 92px, 92px 100%;
  -webkit-mask-image: linear-gradient(102deg, #000 0%, rgba(0, 0, 0, .55) 44%, transparent 74%);
  mask-image: linear-gradient(102deg, #000 0%, rgba(0, 0, 0, .55) 44%, transparent 74%);
}

/* 中部手绘插画 */
.auth-bg {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  left: 31%;
  right: 32%;
  top: clamp(34px, 7vh, 92px);
  bottom: clamp(34px, 7vh, 92px);
}
.auth-bg::before {
  content: "";
  position: absolute;
  inset: -12% -8%;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(217, 119, 87, .13), transparent 74%);
}
.auth-bg svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  animation: floatY 13s ease-in-out infinite;
}
.auth-bg .ab-sun {
  fill: var(--accent);
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: sunIn 1s var(--ease) .4s forwards;
}
.auth-bg .ab-line {
  fill: none;
  stroke: var(--ink);
  stroke-width: 7;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .8;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: drawPath 2.8s var(--ease) .2s forwards;
}
.auth-bg .ab-node {
  fill: var(--bg);
  stroke: var(--ink);
  stroke-width: 5;
  opacity: 0;
  animation: areaIn .5s var(--ease) forwards;
}
.auth-bg .ab-node.n1 { animation-delay: 1.15s; }
.auth-bg .ab-node.n2 { animation-delay: 1.55s; }
.auth-bg .ab-node.n3 { animation-delay: 1.95s; }
@keyframes sunIn {
  from { opacity: 0; transform: scale(.8); }
  to { opacity: 1; transform: scale(1); }
}

/* 两栏画布 */
.auth-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 404px);
  align-items: center;
  gap: clamp(36px, 5vw, 96px);
  width: 100%;
  max-width: none;
  min-height: 100vh;
  padding: clamp(26px, 4vw, 56px) clamp(26px, 5vw, 84px);
}

/* ---- 左：品牌 / 主张 / 卖点 ---- */
.auth-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-self: stretch;
  gap: 26px;
  padding: clamp(2px, 1vh, 16px) 0;
  animation: fadeUp .8s var(--ease) backwards;
}
.auth-topbar { display: flex; align-items: center; gap: 12px; }
.brand-mark-lg { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 15px; }
.brand-text-lg .bt-a { font-size: 25px; font-weight: 700; letter-spacing: -.4px; }
.brand-text-lg .bt-b { font-size: 16px; letter-spacing: .8px; margin-left: 6px; }

.hero-body { max-width: 620px; }
.auth-hero .hero-kicker {
  font-size: 12px;
  letter-spacing: 3px;
  padding: 7px 16px;
  margin-bottom: 24px;
}
.auth-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(34px, 3.6vw, 58px);
  line-height: 1.18;
  font-weight: 600;
  letter-spacing: -2px;
  color: var(--text);
  margin-bottom: 20px;
}
.auth-hero .hero-sub {
  color: var(--muted);
  font-size: clamp(14px, 1.05vw, 16.5px);
  line-height: 1.9;
  max-width: 480px;
}
.hero-points {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 28px;
  margin: 30px 0 0;
  padding: 0;
  max-width: 620px;
}
.hero-points li { display: flex; align-items: center; gap: 11px; font-size: 15px; color: var(--text); }
.hero-points .hp-ic { display: inline-flex; flex: 0 0 auto; color: var(--accent); }
.hero-points .hp-ic .ic { width: 19px; height: 19px; opacity: .9; }
.auth-foot { font-size: 12px; color: var(--muted2); letter-spacing: .2px; }

/* ---- 右：悬浮登录卡 ---- */
.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  animation: fadeUp .8s var(--ease) .12s backwards;
}
.auth-card {
  width: 100%;
  max-width: 404px;
  padding: clamp(26px, 2.6vw, 38px) clamp(24px, 2.4vw, 34px) clamp(22px, 2.2vw, 30px);
  background: var(--panel);
  border: 1px solid rgba(20, 20, 19, .07);
  border-radius: 24px;
  box-shadow: 0 28px 72px rgba(20, 20, 19, .10), 0 2px 10px rgba(20, 20, 19, .04);
  animation: none;
}
.auth-card .auth-title {
  font-family: var(--font-display);
  font-size: clamp(25px, 1.9vw, 32px);
  font-weight: 600;
  letter-spacing: -1px;
  margin-bottom: 8px;
}
.auth-card > .auth-subtitle { font-size: 13.5px; margin-bottom: 26px; }
.auth-card .auth-tabs { margin-bottom: 20px; padding: 5px; }
.auth-card .auth-tabs button { padding: 10px 12px; font-size: 14px; }
.auth-card .form-col { gap: 8px; }
.auth-card .form-col label { font-size: 12.5px; color: var(--muted); }
.auth-card .form-col input { padding: 12px 14px; font-size: 14px; }
.auth-card #auth-submit { padding: 13px 18px; font-size: 15px; margin-top: 6px; }
.auth-tip {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted2);
  text-align: center;
}

@media (max-width: 1180px) {
  .auth-bg { left: 24%; right: 42%; }
  .auth-hero h1 { letter-spacing: -1.4px; }
}
@media (max-width: 1024px) {
  .auth-bg { display: none; }
  .hero-points { grid-template-columns: 1fr; gap: 10px; }
  .auth-shell { grid-template-columns: minmax(0, 1fr) minmax(330px, 380px); gap: 36px; }
}
@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; gap: 0; min-height: auto; padding: 0; }
  .auth-hero { padding: 30px 22px 8px; gap: 20px; }
  .auth-foot { display: none; }
  .auth-panel { padding: 20px 22px 46px; }
  .auth-card { max-width: 460px; margin: 0 auto; }
}
@media (max-width: 560px) {
  .auth-hero { padding: 22px 18px 6px; }
  .auth-hero h1 { font-size: 29px; letter-spacing: -.9px; }
  .auth-hero .hero-sub { font-size: 13.5px; }
  .hero-points { margin-top: 20px; }
  .hero-points li { font-size: 13.5px; }
  .brand-mark-lg { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 13px; }
  .brand-text-lg .bt-a { font-size: 21px; }
  .brand-text-lg .bt-b { font-size: 14px; display: inline; }
  .auth-panel { padding: 16px 18px 38px; }
  .auth-card { padding: 22px 18px 24px; border-radius: 20px; }
}

/* ================= 品牌图形（新 LOGO：小狗 + 上扬箭头） ================= */
.brand-logo {
  height: 30px;
  width: auto;
  display: block;
  flex: 0 0 auto;
  animation: fadeUp .6s var(--ease) backwards;
}
.brand-logo-lg { height: 40px; }
@media (max-width: 560px) {
  .brand-logo { height: 26px; }
  .brand-logo-lg { height: 34px; }
}

/* ================= 执行记录：把建议一键转成持仓 ================= */
.advice-item { flex-wrap: wrap; }
.advice-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.exec-btn {
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 600;
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s var(--ease), border-color .2s var(--ease), transform .15s var(--ease);
}
.exec-btn:hover { background: #fff; border-color: var(--accent); transform: translateY(-1px); }
.exec-btn:active { transform: translateY(0); }
.exec-btn.buy { border-color: rgba(192, 57, 43, .3); background: rgba(192, 57, 43, .08); color: var(--up); }
.exec-btn.buy:hover { background: rgba(192, 57, 43, .14); }
.exec-btn.sell { border-color: rgba(46, 125, 84, .3); background: rgba(46, 125, 84, .08); color: var(--down); }
.exec-btn.sell:hover { background: rgba(46, 125, 84, .14); }
.exec-btn[disabled] { opacity: .5; cursor: default; transform: none; }

/* 执行确认弹窗 */
.exec-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.exec-head b { font-size: 16px; }
.exec-sub { color: var(--muted); font-size: 12.5px; margin-bottom: 14px; }
.exec-qty { display: flex; gap: 8px; margin: 6px 0 12px; }
.exec-qty button {
  flex: 1;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--muted);
  border-radius: 10px;
  padding: 8px 0;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s var(--ease);
}
.exec-qty button.active { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-strong); }
.exec-grid { display: flex; flex-wrap: wrap; gap: 12px 16px; }
.exec-grid label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--muted); flex: 1 1 150px; }
.exec-grid input, .exec-grid select { padding: 10px 12px; font-size: 14px; }
.exec-note { margin-top: 12px; font-size: 12px; color: var(--muted2); line-height: 1.7; }
.exec-actions { display: flex; gap: 10px; margin-top: 18px; }
.exec-actions button { flex: 1; }

/* ---- 执行按钮在各种容器里的排布 ---- */
.mini-item { flex-wrap: wrap; }
.mini-item > .exec-btn { flex: 0 0 auto; margin-left: auto; }
.exec-inline { margin-top: 6px; }
.exec-btn.compact { padding: 3px 10px; font-size: 11px; }
.chip .exec-btn { margin-left: 6px; vertical-align: middle; }
.wl-ops { display: flex; gap: 8px; align-items: center; white-space: nowrap; }
.wl-ops .exec-btn { margin: 0; }
.prod-row .exec-btn { vertical-align: middle; }


/* ============ 套餐 / 支付 / 注册验证 新增样式 ============ */
.reg-only { display: block; }
.reg-only.hidden { display: none; }
.captcha-row { display: flex; gap: 10px; align-items: stretch; }
.captcha-row input { flex: 1; }
.captcha-box {
  width: 132px; height: 44px; padding: 0; border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); background: #faf9f5; cursor: pointer; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: var(--muted);
}
.captcha-box svg { display: block; }
.captcha-box:hover { border-color: var(--accent-line); }

.plan-current { margin: 2px 0 14px; }
.plan-badge {
  display: inline-block; padding: 6px 12px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-strong);
  font-size: 13px; font-weight: 600; border: 1px solid var(--accent-line);
}
.plan-badge.free { background: var(--panel2); color: var(--muted); border-color: var(--border); }
.plan-tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.tier-card {
  border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 16px 14px;
  background: var(--panel); transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.tier-card.active { border-color: var(--accent-line); box-shadow: var(--shadow); }
.tier-top { display: flex; align-items: center; gap: 8px; }
.tier-name { font-family: var(--font-display); font-size: 19px; font-weight: 600; }
.tier-tag { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--accent); color: #fff; }
.tier-desc { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.tier-price { font-size: 30px; font-weight: 600; letter-spacing: -.5px; margin: 10px 0 4px; color: var(--ink); }
.tier-price span { font-size: 13px; color: var(--muted); font-weight: 400; margin-left: 2px; }
.tier-feats { list-style: none; margin: 10px 0 14px; display: flex; flex-direction: column; gap: 6px; }
.tier-feats li { font-size: 13px; color: var(--text); padding-left: 16px; position: relative; }
.tier-feats li::before { content: ""; position: absolute; left: 2px; top: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); opacity: .7; }
.tier-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.tier-actions button { flex: 1 1 auto; min-width: 76px; }

.amount-chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 12px; }
.chip {
  padding: 7px 16px; border-radius: 999px; border: 1px solid var(--border-strong);
  background: var(--panel2); cursor: pointer; font-size: 13px; color: var(--text);
  transition: all .18s var(--ease);
}
.chip:hover { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent-strong); }

.pay-card { max-width: 420px; }
.pay-qr { display: flex; justify-content: center; padding: 14px; background: #fff; border-radius: var(--radius-sm); border: 1px solid var(--border); margin: 6px 0 12px; }
.pay-qr svg { width: 220px; height: 220px; }
.pay-tip { font-size: 13px; text-align: center; margin-bottom: 8px; }
.pay-link { font-family: var(--font-mono); font-size: 11.5px; word-break: break-all; color: var(--accent-strong); margin-bottom: 10px; }
#pay-state { text-align: center; font-size: 13px; color: var(--accent-strong); min-height: 20px; margin-bottom: 10px; }

.order-stats { display: flex; gap: 18px; flex-wrap: wrap; margin: 4px 0 14px; }
.order-stats .stat { display: flex; flex-direction: column; gap: 2px; }
.order-stats .stat .k { font-size: 12px; color: var(--muted); }
.order-stats .stat b { font-size: 20px; font-weight: 600; color: var(--ink); }
.order-row { border-top: 1px solid var(--border); padding: 10px 0; }
.order-main { display: flex; align-items: center; gap: 8px; font-size: 13.5px; flex-wrap: wrap; }
.order-sub { font-size: 12px; color: var(--muted); margin-top: 3px; font-family: var(--font-mono); }
.order-status { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--panel3); color: var(--muted); }
.order-status.paid { background: rgba(217,119,87,.12); color: var(--accent-strong); }
.order-status.paid_error, .order-status.amount_mismatch, .order-status.failed { background: rgba(192,57,43,.12); color: var(--bad); }


#plan-card { grid-column: span 2; }
@media (max-width: 900px) { #plan-card { grid-column: auto; } }
.tier-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tier-actions button { width: 100%; padding: 9px 4px; font-size: 12.5px; white-space: nowrap; }

/* ---------------- 免费体验版引导卡 ---------------- */
.fg-list { display: flex; flex-direction: column; gap: 10px; }
.fg-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--panel2); border: 1px solid var(--border); animation: fadeUp .42s var(--ease) backwards; }
.fg-row:nth-child(1) { animation-delay: .02s; }
.fg-row:nth-child(2) { animation-delay: .06s; }
.fg-row:nth-child(3) { animation-delay: .10s; }
.fg-row:nth-child(4) { animation-delay: .14s; }
.fg-row:nth-child(5) { animation-delay: .18s; }
.fg-ic { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: rgba(63, 143, 95, .12); color: #2f7a4c; margin-top: 1px; }
.fg-ic .ic { width: 13px; height: 13px; }
.fg-row.fg-lock { background: var(--accent-soft); border-color: var(--accent-line); }
.fg-row.fg-lock .fg-ic { background: rgba(217, 119, 87, .18); color: var(--accent-strong); }
.fg-tx { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fg-tx b { font-size: 13.5px; }
.fg-tx span { font-size: 12.5px; color: var(--muted); line-height: 1.55; }
.fg-tx ul { margin: 2px 0 0; padding-left: 16px; }
.fg-tx li { font-size: 12.5px; color: var(--muted); line-height: 1.65; }
