/* =========================================================
   天枢 · 黑金曜石量化终端  —  Obsidian & Gold Glass UI
   A股惯例：红涨绿跌
   ========================================================= */
:root {
  --bg0: #04060a;
  --bg1: #0a0d14;
  --bg2: #10141d;
  --glass: rgba(18, 22, 31, .62);
  --glass-hi: rgba(28, 33, 45, .72);
  --hair: rgba(255, 255, 255, .07);
  --hair-2: rgba(255, 255, 255, .12);
  --gold: #e9c46a;
  --gold-hi: #f8e3a3;
  --gold-deep: #b8862b;
  --gold-glow: rgba(233, 196, 106, .35);
  --ink: #f3efe6;
  --ink-2: #cfd3da;
  --muted: #8b93a1;
  --up: #ff3d4a;
  --up-soft: rgba(255, 61, 74, .14);
  --down: #18c784;
  --down-soft: rgba(24, 199, 132, .13);
  --warn: #ffb547;
  --radius: 20px;
  --radius-sm: 14px;
  --tap: 48px;
  --side: 248px;
  --font: "SF Pro Display", "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Noto Sans SC", "Microsoft YaHei", Roboto, system-ui, sans-serif;
  --mono: "SF Mono", "JetBrains Mono", "Roboto Mono", "DIN Alternate", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; background: var(--bg0); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body { overscroll-behavior-y: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
a { color: var(--gold-hi); }
.num, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.muted { color: var(--muted); }
.up { color: var(--up) !important; }
.down { color: var(--down) !important; }
.flat { color: var(--ink-2); }
::selection { background: rgba(233, 196, 106, .35); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 8px; }

/* ---------- 背景：曜石 + 鎏金微光 ---------- */
.backdrop { position: fixed; inset: 0; z-index: -1; overflow: hidden; background:
  radial-gradient(1200px 600px at 85% -10%, rgba(233,196,106,.10), transparent 60%),
  radial-gradient(900px 500px at -10% 110%, rgba(120,90,30,.12), transparent 60%),
  linear-gradient(180deg, var(--bg1), var(--bg0)); }
.orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .55; animation: drift 22s ease-in-out infinite alternate; }
.o1 { width: 520px; height: 520px; top: -160px; right: -120px; background: radial-gradient(circle, rgba(233,196,106,.22), transparent 70%); }
.o2 { width: 600px; height: 600px; bottom: -260px; left: -200px; background: radial-gradient(circle, rgba(255,61,74,.08), transparent 70%); animation-duration: 28s; }
.gridlines { position: absolute; inset: 0; background-image:
  linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
  linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 56px 56px; mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 75%); }
@keyframes drift { to { transform: translate3d(-60px, 40px, 0) scale(1.08); } }

/* ---------- 玻璃拟态 + 鎏金发丝边 ---------- */
.glass { position: relative; background: var(--glass); border-radius: var(--radius); backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 20px 50px -20px rgba(0,0,0,.7); }
.glass::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(140deg, rgba(248,227,163,.45), rgba(255,255,255,.05) 35%, rgba(255,255,255,.03) 65%, rgba(233,196,106,.22));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }

/* ---------- Logo ---------- */
.logo { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: linear-gradient(145deg, #171b25, #07090e); box-shadow: 0 0 0 1px rgba(233,196,106,.35), 0 8px 30px -6px var(--gold-glow); }
.logo svg { width: 64%; height: 64%; }
.logo.sm { width: 38px; height: 38px; border-radius: 11px; }

/* ---------- 按钮 ---------- */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--tap); padding: 0 20px; border: 0; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 16px; white-space: nowrap; transition: transform .15s var(--ease), box-shadow .25s var(--ease), background .25s, opacity .2s; user-select: none; }
.btn:active { transform: scale(.97); }
.btn svg { width: 18px; height: 18px; }
.btn-gold { color: #2a1c03; background: linear-gradient(180deg, #fbe7a8 0%, #eac36a 45%, #c8932f 100%);
  box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 -2px 0 rgba(0,0,0,.18) inset, 0 10px 28px -10px rgba(233,196,106,.75); }
.btn-gold:hover { box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 -2px 0 rgba(0,0,0,.18) inset, 0 14px 36px -8px rgba(233,196,106,.9); }
.btn-ghost { color: var(--ink); background: rgba(255,255,255,.05); box-shadow: 0 0 0 1px var(--hair-2) inset; }
.btn-ghost:hover { background: rgba(255,255,255,.08); }
.btn-danger { color: #ffd6d9; background: rgba(255,61,74,.12); box-shadow: 0 0 0 1px rgba(255,61,74,.35) inset; }
.btn-xl { width: 100%; min-height: 56px; font-size: 18px; letter-spacing: .2em; border-radius: 16px; }
.btn-sm { min-height: 44px; padding: 0 14px; font-size: 15px; }
.btn.is-busy { pointer-events: none; opacity: .85; }
.btn.is-busy .btn-label { opacity: .0; }
.btn.is-busy::after { content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-btn { display: grid; place-items: center; width: var(--tap); height: var(--tap); border: 0; border-radius: 14px; background: rgba(255,255,255,.05); color: var(--ink-2); }
.icon-btn svg { width: 20px; height: 20px; }

/* ---------- 表单 ---------- */
.field { display: block; margin: 16px 0; }
.field > span { display: block; margin-bottom: 8px; color: var(--ink-2); font-size: 14px; letter-spacing: .04em; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap > i { position: absolute; left: 16px; width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.input-wrap > i svg { width: 18px; height: 18px; }
input, select, textarea { width: 100%; min-height: 52px; padding: 0 16px; border-radius: var(--radius-sm); border: 1px solid var(--hair-2); background: rgba(5,7,11,.65); color: var(--ink); font-size: 16px; outline: none; transition: border-color .2s, box-shadow .2s; }
.input-wrap input { padding-left: 46px; padding-right: 52px; }
input:focus, select:focus, textarea:focus { border-color: rgba(233,196,106,.7); box-shadow: 0 0 0 4px rgba(233,196,106,.14); }
input::placeholder { color: #5d6573; }
textarea { min-height: 340px; padding: 14px 16px; font-family: var(--mono); font-size: 14px; line-height: 1.6; resize: vertical; tab-size: 4; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
.eye { position: absolute; right: 4px; width: 46px; height: 46px; display: grid; place-items: center; border: 0; background: transparent; color: var(--muted); }
.eye svg { width: 20px; height: 20px; }
.remember { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--ink-2); font-size: 15px; }
.remember input { width: 20px; min-height: 20px; height: 20px; accent-color: var(--gold); }
.error { min-height: 1.4em; margin: 10px 0 0; color: #ff8a93; font-size: 15px; text-align: center; }

/* ---------- 登录页 ---------- */
.gate { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 28px 18px calc(28px + env(safe-area-inset-bottom)); }
.gate-card { width: min(440px, 100%); padding: 36px 30px 24px; animation: rise .7s var(--ease) both; }
.brand-xl { display: flex; align-items: center; gap: 16px; }
.brand-name { font-size: 40px; font-weight: 700; letter-spacing: .32em; line-height: 1.1; background: linear-gradient(180deg, #fff6d6, #e9c46a 55%, #a8761f); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 4px 18px rgba(233,196,106,.25)); }
.brand-en { margin-top: 6px; font-size: 11px; letter-spacing: .32em; color: var(--muted); }
.gate-lead { margin: 22px 0 6px; font-size: 17px; color: var(--ink-2); }
.gate-clock { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 14px; color: var(--gold-hi); }
.gate-foot { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--hair); color: var(--muted); font-size: 12.5px; text-align: center; }
.gate-foot i svg { width: 14px; height: 14px; display: block; }
.dot-live { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 0 var(--gold-glow); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(233,196,106,.55); } 70% { box-shadow: 0 0 0 10px rgba(233,196,106,0); } 100% { box-shadow: 0 0 0 0 rgba(233,196,106,0); } }
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: none; } }

/* ---------- 主框架 ---------- */
.desk { min-height: 100vh; min-height: 100dvh; padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
.side { display: none; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top));
  background: rgba(6,8,12,.72); backdrop-filter: blur(20px) saturate(150%); -webkit-backdrop-filter: blur(20px) saturate(150%); border-bottom: 1px solid var(--hair); }
.top-brand { display: flex; align-items: center; gap: 10px; font-size: 18px; letter-spacing: .2em; color: var(--gold-hi); }
.top-status { display: flex; align-items: center; gap: 10px; margin-left: auto; min-width: 0; }
.top-right { display: flex; align-items: center; gap: 10px; }
.clock { font-size: 15px; color: var(--ink-2); }
.pill { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 999px; font-size: 13.5px; font-weight: 600; white-space: nowrap; background: rgba(255,255,255,.06); color: var(--ink-2); box-shadow: 0 0 0 1px var(--hair-2) inset; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.hot { color: var(--gold-hi); background: rgba(233,196,106,.12); box-shadow: 0 0 0 1px rgba(233,196,106,.4) inset; }
.pill.hot::before { animation: pulse 1.6s infinite; }
.pill.open { color: #ff8d95; background: var(--up-soft); box-shadow: 0 0 0 1px rgba(255,61,74,.35) inset; }
.live em { font-style: normal; }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.live i { width: 8px; height: 8px; border-radius: 50%; background: #5d6573; }
.live.on { color: var(--gold-hi); }
.live.on i { background: var(--gold); animation: pulse 2s infinite; }
.me-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px 0 4px; border: 0; border-radius: 999px; background: rgba(255,255,255,.05); box-shadow: 0 0 0 1px var(--hair-2) inset; }
.avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; font-weight: 700; color: #2a1c03; background: linear-gradient(145deg, #fbe7a8, #c8932f); }
.me-name { font-size: 14px; color: var(--ink-2); max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.banner { margin: 12px 16px 0; padding: 14px 16px; border-radius: var(--radius-sm); display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: linear-gradient(90deg, rgba(255,61,74,.16), rgba(255,61,74,.05)); box-shadow: 0 0 0 1px rgba(255,61,74,.35) inset; color: #ffd0d4; font-size: 15px; }
.banner b { color: #fff; }
.banner .btn { margin-left: auto; }

.view { padding: 16px; max-width: 1480px; animation: fade .35s var(--ease); }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* 底部导航（手机 / 竖屏平板） */
.tabbar { position: fixed; z-index: 25; left: 0; right: 0; bottom: 0; display: flex; padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  background: rgba(8,10,15,.86); backdrop-filter: blur(22px) saturate(150%); -webkit-backdrop-filter: blur(22px) saturate(150%); border-top: 1px solid var(--hair); }
.tabbar .tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 60px; border: 0; border-radius: 14px; background: transparent; color: var(--muted); font-size: 12.5px; }
.tabbar .tab svg { width: 24px; height: 24px; }
.tabbar .tab.on { color: var(--gold-hi); background: linear-gradient(180deg, rgba(233,196,106,.16), rgba(233,196,106,.04)); }
.tabbar .tab.on svg { filter: drop-shadow(0 0 8px rgba(233,196,106,.6)); }

/* 侧边导航（横屏平板 / 电脑） */
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav .nav-sep { margin: 18px 12px 6px; font-size: 11.5px; letter-spacing: .24em; color: #5d6573; }
.nav .tab { display: flex; align-items: center; gap: 14px; min-height: 52px; padding: 0 16px; border: 0; border-radius: 14px; background: transparent; color: var(--ink-2); font-size: 16px; text-align: left; transition: background .2s, color .2s; }
.nav .tab svg { width: 22px; height: 22px; color: var(--muted); }
.nav .tab:hover { background: rgba(255,255,255,.04); }
.nav .tab.on { color: var(--gold-hi); background: linear-gradient(90deg, rgba(233,196,106,.18), rgba(233,196,106,.02)); box-shadow: inset 3px 0 0 var(--gold); }
.nav .tab.on svg { color: var(--gold); filter: drop-shadow(0 0 6px rgba(233,196,106,.6)); }

/* ---------- 通用组件 ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 4px 0 16px; }
.eyebrow { font-size: 12px; letter-spacing: .28em; color: var(--gold); text-transform: uppercase; }
.page-title { margin: 4px 0 0; font-size: 28px; font-weight: 700; letter-spacing: .02em; }
.page-sub { margin-top: 4px; color: var(--muted); font-size: 14.5px; }
.head-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.section-title { display: flex; align-items: center; gap: 10px; margin: 26px 0 12px; font-size: 18px; font-weight: 650; }
.section-title::before { content: ""; width: 4px; height: 18px; border-radius: 4px; background: linear-gradient(180deg, var(--gold-hi), var(--gold-deep)); box-shadow: 0 0 10px var(--gold-glow); }
.card { padding: 18px; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 44px; padding: 0 16px; border: 0; border-radius: 999px; background: rgba(255,255,255,.05); box-shadow: 0 0 0 1px var(--hair-2) inset; color: var(--ink-2); font-size: 15px; font-family: var(--mono); font-variant-numeric: tabular-nums; transition: all .2s; }
.chip.on { color: #2a1c03; font-weight: 700; background: linear-gradient(180deg, #fbe7a8, #d9a646); box-shadow: 0 6px 20px -8px rgba(233,196,106,.8); }

.seg { display: inline-flex; padding: 4px; border-radius: 16px; background: rgba(5,7,11,.7); box-shadow: 0 0 0 1px var(--hair-2) inset; }
.seg button { min-height: 44px; min-width: 88px; padding: 0 16px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); font-size: 15.5px; font-weight: 600; transition: all .2s var(--ease); }
.seg button.on { color: #2a1c03; background: linear-gradient(180deg, #fbe7a8, #d9a646); box-shadow: 0 6px 18px -8px rgba(233,196,106,.9); }
.seg button .cnt { margin-left: 6px; font-family: var(--mono); font-size: 13px; opacity: .8; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 18px 0 14px; }

/* KPI 卡 */
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.kpi { padding: 16px 18px; overflow: hidden; }
.kpi .k { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--muted); }
.kpi .v { margin-top: 6px; font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 32px; font-weight: 700; line-height: 1.1; letter-spacing: -.02em; }
.kpi .v small { font-size: 15px; font-weight: 500; margin-left: 2px; color: var(--muted); }
.kpi .s { margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.kpi.gold .v { background: linear-gradient(180deg, #fff3cc, #e9c46a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.kpi::after { content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: radial-gradient(circle, rgba(233,196,106,.12), transparent 70%); pointer-events: none; }

/* ---------- 选股卡片 ---------- */
.stock-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.stock { display: block; width: 100%; padding: 18px 18px 16px; border: 0; text-align: left; color: inherit; transition: transform .2s var(--ease), box-shadow .3s; animation: rise .5s var(--ease) both; }
.stock:active { transform: scale(.985); }
.stock:hover { box-shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 24px 60px -24px rgba(233,196,106,.35); }
.stock.limit { background: linear-gradient(160deg, rgba(255,61,74,.12), rgba(18,22,31,.62) 45%); }
.s-top { display: flex; align-items: flex-start; gap: 12px; }
.rank { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; font-family: var(--mono); font-weight: 700; font-size: 16px; color: var(--gold-hi); background: rgba(233,196,106,.1); box-shadow: 0 0 0 1px rgba(233,196,106,.3) inset; }
.s-name { flex: 1; min-width: 0; }
.s-name b { display: block; font-size: 21px; font-weight: 700; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-name .code { font-family: var(--mono); font-size: 14px; color: var(--muted); letter-spacing: .04em; }
.s-quote { text-align: right; }
.s-quote .px { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 24px; font-weight: 700; line-height: 1.1; }
.s-quote .chg { display: inline-block; margin-top: 4px; padding: 2px 8px; border-radius: 8px; font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 14.5px; font-weight: 700; }
.s-quote .chg.up { background: var(--up-soft); }
.s-quote .chg.down { background: var(--down-soft); }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.badge { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 9px; font-size: 13.5px; font-weight: 650; white-space: nowrap; }
.badge svg { width: 14px; height: 14px; }
.b-limit { color: #fff7dc; background: linear-gradient(135deg, #ff4b55, #b3121c); box-shadow: 0 0 0 1px rgba(255,214,120,.65) inset, 0 6px 18px -6px rgba(255,61,74,.8); text-shadow: 0 1px 0 rgba(0,0,0,.25); }
.b-limit::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #ffe08a; box-shadow: 0 0 8px #ffe08a; }
.b-ok { color: #2a1c03; background: linear-gradient(180deg, #fbe7a8, #d9a646); box-shadow: 0 6px 16px -8px rgba(233,196,106,.9); }
.b-fire { color: #fff3d6; background: linear-gradient(135deg, #ff7a2f, #d4202c); box-shadow: 0 0 0 1px rgba(255,214,120,.55) inset, 0 6px 18px -6px rgba(255,90,40,.85); }
.b-wait { color: var(--warn); background: rgba(255,181,71,.1); box-shadow: 0 0 0 1px rgba(255,181,71,.35) inset; }
.b-no { color: var(--muted); background: rgba(255,255,255,.05); box-shadow: 0 0 0 1px var(--hair-2) inset; }
.b-pool { color: var(--ink-2); background: rgba(255,255,255,.05); box-shadow: 0 0 0 1px var(--hair-2) inset; }
.metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.metric { padding: 10px 12px; border-radius: 12px; background: rgba(5,7,11,.55); box-shadow: 0 0 0 1px var(--hair) inset; min-width: 0; }
.metric .mk { font-size: 12px; line-height: 1.35; color: var(--muted); min-height: 2.7em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.metric .mv { margin-top: 2px; font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 18px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.metric .mv.hl { color: var(--gold-hi); }
.reason { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--hair-2); font-size: 14.5px; color: var(--ink-2); line-height: 1.6; }
.reason b { color: var(--gold); font-weight: 600; margin-right: 6px; }
.s-more { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-top: 10px; font-size: 13px; color: var(--gold); }
.s-more svg { width: 14px; height: 14px; }

/* 列表视图（宽表：内部横向滚动，首列冻结，不会挤成一团） */
.table-wrap { overflow: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); }
table.grid { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 15px; }
table.grid th, table.grid td { padding: 0 16px; height: 56px; white-space: nowrap; text-align: right; border-bottom: 1px solid var(--hair); }
table.grid th { position: sticky; top: 0; z-index: 2; height: 48px; font-size: 13px; font-weight: 600; color: var(--muted); background: rgba(12,15,22,.96); letter-spacing: .03em; }
table.grid td { font-family: var(--mono); font-variant-numeric: tabular-nums; }
table.grid th:first-child, table.grid td:first-child { position: sticky; left: 0; z-index: 1; text-align: left; background: rgba(12,15,22,.96); font-family: var(--font); box-shadow: 1px 0 0 var(--hair); }
table.grid th:first-child { z-index: 3; }
table.grid tbody tr { cursor: pointer; transition: background .15s; }
table.grid tbody tr:hover td { background: rgba(233,196,106,.05); }
table.grid td.left { text-align: left; font-family: var(--font); }
.t-name b { font-size: 16px; }
.t-name small { margin-left: 8px; color: var(--muted); font-family: var(--mono); }

/* ---------- 空状态：雷达扫描 ---------- */
.empty-hero { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 40px 20px 34px; }
.radar { position: relative; width: 132px; height: 132px; border-radius: 50%; margin-bottom: 10px;
  background: radial-gradient(circle, transparent 30%, rgba(233,196,106,.06) 31%, transparent 32%, transparent 55%, rgba(233,196,106,.08) 56%, transparent 57%), radial-gradient(circle, rgba(233,196,106,.08), transparent 70%);
  box-shadow: 0 0 0 1px rgba(233,196,106,.28) inset, 0 0 60px -10px rgba(233,196,106,.35); overflow: hidden; }
.radar::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, rgba(233,196,106,.55), rgba(233,196,106,0) 25%); animation: spin 3.2s linear infinite; }
.radar::after { content: ""; position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px; border-radius: 50%; background: var(--gold-hi); box-shadow: 0 0 14px var(--gold); }
.empty-hero h3 { margin: 0; font-size: 21px; }
.empty-hero p { margin: 0; max-width: 520px; color: var(--muted); font-size: 15px; line-height: 1.7; }
.countdown { margin-top: 6px; font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 40px; font-weight: 700; letter-spacing: .04em; background: linear-gradient(180deg, #fff3cc, #e9c46a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cd-label { font-size: 13px; letter-spacing: .2em; color: var(--muted); }
.empty-mini { padding: 26px 18px; text-align: center; color: var(--muted); font-size: 15px; line-height: 1.7; }

/* ---------- 图表 ---------- */
.chart { width: 100%; height: 380px; }
.chart.tall { height: 460px; }
.chart.gauge { height: 240px; }
.chart-card { padding: 14px 10px 6px; }
.chart-cap { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 0 8px 4px; }
.chart-cap b { font-size: 16px; }
.legend-note { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.legend-note i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.gauges { display: grid; grid-template-columns: 1fr; gap: 12px; }

/* ---------- 复盘正文 ---------- */
.article { padding: 22px 22px 18px; font-size: 16px; line-height: 1.85; color: var(--ink-2); }
.article h1, .article h2, .article h3 { color: var(--ink); line-height: 1.4; margin: 6px 0 12px; }
.article h1 { font-size: 22px; }
.article h2 { font-size: 19px; }
.article ul { margin: 6px 0; padding-left: 0; list-style: none; }
.article li { position: relative; padding: 8px 0 8px 22px; border-bottom: 1px solid var(--hair); }
.article li:last-child { border-bottom: 0; }
.article li::before { content: ""; position: absolute; left: 4px; top: 19px; width: 6px; height: 6px; border-radius: 2px; transform: rotate(45deg); background: var(--gold); box-shadow: 0 0 8px var(--gold-glow); }
.article .pct { font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 700; color: var(--gold-hi); }
.article .pct.up { color: var(--up); }
.article .pct.down { color: var(--down); }

/* ---------- 会员 / 管理 ---------- */
.form-grid { display: grid; grid-template-columns: 1fr; gap: 0 14px; align-items: end; }
.form-grid .field { margin: 10px 0; }
.users { display: grid; gap: 10px; }
.user-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; flex-wrap: wrap; }
.user-row .avatar { width: 44px; height: 44px; font-size: 18px; }
.user-row .u-main { flex: 1; min-width: 140px; }
.user-row .u-main b { font-size: 17px; }
.user-row .u-main div { font-size: 13px; color: var(--muted); }
.user-row .u-act { display: flex; gap: 8px; flex-wrap: wrap; }
.role { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 7px; font-size: 12px; font-weight: 700; vertical-align: 2px; }
.role.admin { color: #2a1c03; background: linear-gradient(180deg, #fbe7a8, #d9a646); }
.role.vip { color: var(--ink-2); background: rgba(255,255,255,.08); }

.files { display: grid; gap: 6px; max-height: 420px; overflow: auto; }
.file { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 48px; padding: 0 14px; border: 0; border-radius: 12px; background: rgba(5,7,11,.5); box-shadow: 0 0 0 1px var(--hair) inset; color: var(--ink-2); text-align: left; font-size: 15px; }
.file:hover { background: rgba(233,196,106,.06); }
.file.dir { color: var(--gold-hi); }
.file small { color: var(--muted); font-family: var(--mono); }
.path { font-family: var(--mono); font-size: 13px; color: var(--muted); word-break: break-all; }

.svc { display: grid; gap: 8px; }
.svc-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 14px; background: rgba(5,7,11,.5); box-shadow: 0 0 0 1px var(--hair) inset; flex-wrap: wrap; }
.svc-row b { flex: 1; min-width: 160px; font-weight: 600; }
.svc-dot { width: 10px; height: 10px; border-radius: 50%; }
.svc-dot.ok { background: var(--gold); box-shadow: 0 0 10px var(--gold); }
.svc-dot.bad { background: var(--up); box-shadow: 0 0 10px var(--up); }
.link-row { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; background: rgba(5,7,11,.5); box-shadow: 0 0 0 1px var(--hair) inset; flex-wrap: wrap; }
.link-row .lr-main { flex: 1; min-width: 200px; }
.link-row .lr-main div { font-size: 13px; color: var(--muted); }
.link-row .lr-main a { font-family: var(--mono); font-size: 14px; word-break: break-all; }
pre.log { max-height: 420px; overflow: auto; margin: 0; padding: 16px; font-family: var(--mono); font-size: 12.5px; line-height: 1.6; color: var(--ink-2); white-space: pre-wrap; word-break: break-all; }
iframe.embed { width: 100%; height: 70vh; border: 0; border-radius: var(--radius); background: #000; }

/* ---------- Toast ---------- */
.toasts { position: fixed; z-index: 60; left: 50%; top: calc(14px + env(safe-area-inset-top)); transform: translateX(-50%); display: grid; gap: 10px; width: min(440px, calc(100% - 28px)); pointer-events: none; }
.toast { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; font-size: 15.5px; color: var(--ink); pointer-events: auto;
  background: rgba(16,19,27,.92); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 0 0 1px var(--hair-2) inset, 0 18px 40px -12px rgba(0,0,0,.8); animation: toastIn .35s var(--ease) both; }
.toast.out { animation: toastOut .3s var(--ease) both; }
.toast i { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; }
.toast i svg { width: 16px; height: 16px; }
.toast.ok i { color: #2a1c03; background: linear-gradient(180deg, #fbe7a8, #d9a646); }
.toast.err i { color: #fff; background: var(--up); }
.toast.info i { color: var(--gold-hi); background: rgba(233,196,106,.15); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-14px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-10px) scale(.97); } }

/* ---------- 弹层 / 抽屉 ---------- */
.sheet, .drawer { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: fadeIn .2s both; }
@keyframes fadeIn { from { opacity: 0; } }
.sheet { display: grid; align-items: end; justify-items: center; }
.sheet-card { width: min(560px, 100%); max-height: 88vh; overflow: auto; padding: 18px 20px calc(20px + env(safe-area-inset-bottom)); border-radius: 24px 24px 0 0; background: rgba(14,17,24,.96); animation: sheetUp .32s var(--ease) both; }
@keyframes sheetUp { from { transform: translateY(40px); opacity: .4; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sheet-head h3 { margin: 0; font-size: 19px; }
.sheet-body { margin: 12px 0 4px; color: var(--ink-2); font-size: 15.5px; line-height: 1.7; }
.sheet-body pre { max-height: 50vh; overflow: auto; margin: 0; padding: 14px; border-radius: 12px; background: rgba(5,7,11,.7); font-family: var(--mono); font-size: 13px; white-space: pre-wrap; word-break: break-all; }
.sheet-actions { display: flex; gap: 10px; margin-top: 14px; }
.sheet-actions .btn { flex: 1; }
.menu-list { display: grid; gap: 8px; }
.menu-list .btn { justify-content: flex-start; min-height: 56px; font-size: 16.5px; }
.drawer-card { position: absolute; right: 0; top: 0; bottom: 0; width: min(760px, 100%); overflow: auto; border-radius: 0; background: rgba(10,13,19,.97); animation: slideIn .35s var(--ease) both; padding-bottom: env(safe-area-inset-bottom); }
@keyframes slideIn { from { transform: translateX(40px); opacity: .3; } }
.drawer-head { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 12px; padding: 12px 16px; padding-top: calc(12px + env(safe-area-inset-top)); background: rgba(10,13,19,.92); backdrop-filter: blur(16px); border-bottom: 1px solid var(--hair); }
.drawer-title { font-size: 18px; font-weight: 700; }
.drawer-body { padding: 18px 16px 30px; }

/* ---------- 骨架屏 ---------- */
.skeleton { height: 160px; border-radius: var(--radius); background: linear-gradient(90deg, rgba(255,255,255,.03) 25%, rgba(255,255,255,.07) 37%, rgba(255,255,255,.03) 63%); background-size: 400% 100%; animation: shimmer 1.3s infinite; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ============ 响应式 ============ */
@media (min-width: 640px) {
  .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stock-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .gauges { grid-template-columns: repeat(3, 1fr); }
  .form-grid { grid-template-columns: 1.2fr 1.2fr 1fr auto; }
  .sheet { align-items: center; }
  .sheet-card { border-radius: 24px; padding-bottom: 20px; }
}
@media (max-width: 639px) {
  .me-name, .clock, .live em { display: none; }
  .top-brand b { display: none; }
  .page-title { font-size: 24px; }
  .kpi .v { font-size: 28px; }
  .countdown { font-size: 34px; }
  .seg { width: 100%; }
  .seg button { flex: 1; min-width: 0; padding: 0 8px; }
  .seg-note { display: none; }
}
/* 横屏平板 / 电脑：侧边栏 */
@media (min-width: 1000px) {
  .desk { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); grid-template-rows: auto auto 1fr; padding-bottom: 0; }
  .side { display: flex; flex-direction: column; grid-row: 1 / -1; position: sticky; top: 0; height: 100vh; height: 100dvh; padding: 18px 14px; border-right: 1px solid var(--hair); background: rgba(6,8,12,.6); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
  .side-brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 22px; }
  .side-brand b { display: block; font-size: 20px; letter-spacing: .3em; color: var(--gold-hi); }
  .side-brand small { display: block; font-size: 10px; letter-spacing: .26em; color: var(--muted); }
  .side-foot { margin-top: auto; padding: 14px 10px 4px; font-size: 12px; color: #5d6573; line-height: 1.7; border-top: 1px solid var(--hair); }
  .topbar { grid-column: 2; }
  .top-brand { display: none; }
  .top-status { margin-left: 0; }
  .top-right { margin-left: auto; }
  .banner { grid-column: 2; margin: 14px 28px 0; }
  .view { grid-column: 2; padding: 24px 28px 48px; }
  .tabbar { display: none; }
  .page-title { font-size: 30px; }
}
@media (min-width: 1400px) {
  .stock-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .chart.tall { height: 540px; }
}
/* 4K 大屏 */
@media (min-width: 2200px) {
  html { font-size: 18px; }
  .view { max-width: 2000px; }
  .stock-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* 第八单：不改原版骨架，只叠加心跳灯、复制和口径 */
.pill.hb-green { color: #18c784; background: var(--down-soft); box-shadow: 0 0 0 1px rgba(24,199,132,.4) inset; }
.pill.hb-yellow { color: var(--warn); background: rgba(255,181,71,.12); box-shadow: 0 0 0 1px rgba(255,181,71,.4) inset; }
.pill.hb-red { color: #ff8d95; background: var(--up-soft); box-shadow: 0 0 0 1px rgba(255,61,74,.45) inset; }
.pill.hb-red::before { animation: pulse 1s infinite; }
.copy-code { margin-left: 8px; padding: 1px 8px; border-radius: 999px; font-size: 12px; line-height: 1.6; color: var(--gold-hi); background: rgba(233,196,106,.12); }
.page-note { margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.steps { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.steps b { display: block; width: 100%; font-weight: 500; color: #8b93a1; font-size: 11px; }
.steps i { width: 8px; height: 8px; border-radius: 50%; background: #5d6573; }
.steps i.ok { background: #18c784; box-shadow: 0 0 8px rgba(24,199,132,.7); }
.steps i.bad { background: #ff3d4a; box-shadow: 0 0 8px rgba(255,61,74,.7); }
@media (max-width: 639px) {
  #hb { max-width: 42vw; overflow: hidden; font-size: 11px; padding: 0 8px; }
}
