/* ============================================================
   策衡 · 视觉美化 V3.4
   专业投研终端风格：墨蓝黑底色 + 橙色强调 + 玻璃卡片 + 微动效
   保持所有 class 名不变，仅增强视觉
   ============================================================ */

:root {
  --bg: #070a0f;
  --bg-2: #0d1117;
  --card: #131920;
  --card-2: #1a222c;
  --border: #242c38;
  --border-soft: rgba(255,255,255,.06);
  --text: #e8eef5;
  --text-dim: #8b98a8;
  --accent: #ff8a3d;
  --accent-2: #ffb26b;
  --accent-glow: rgba(255,138,61,.35);
  --up: #ff5c5c;        /* 红 = 涨 */
  --down: #34c77b;      /* 绿 = 跌 */
  --up-bg: rgba(255,92,92,.12);
  --down-bg: rgba(52,199,123,.12);
  --mono: "JetBrains Mono", "SF Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

/* ---------- 背景氛围层：多层光晕 + 网格纹理 ---------- */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(1100px 520px at 15% -8%, rgba(255,138,61,.14), transparent 55%),
    radial-gradient(900px 480px at 90% 0%, rgba(64,120,255,.10), transparent 55%),
    radial-gradient(700px 700px at 50% 110%, rgba(52,199,123,.06), transparent 60%),
    var(--bg);
}
body::after {
  content: '';
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.022) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 30%, transparent 75%);
}

.app, .container {
  max-width: 560px; margin: 0 auto; padding: 18px 16px 48px;
  position: relative;
}

/* ---------- Header ---------- */
/* V6.5.5 全站导航宽度统一：.header 与 .app/.container 同宽居中
   （deep/trade 页 header 为 body 直接子元素，无 .app 包裹） */
.header { max-width: 560px; margin: 0 auto; }
@media (min-width: 600px) {
  .header { max-width: 660px; }
}
@media (min-width: 600px) and (max-width: 1023px) {
  .header { max-width: 740px; }
}
@media (min-width: 1024px) {
  .header { max-width: 1320px; }
}
/* V6.5.5 deep/trade 页（header 为 body 直接子元素）：左右内边距与 .app 对齐 */
.deep-page .header, .trade-page .header { padding: 10px 12px 20px; }
@media (min-width: 600px) and (max-width: 1023px) {
  .deep-page .header, .trade-page .header { padding: 10px 16px 20px; }
}
@media (min-width: 1024px) {
  .deep-page .header, .trade-page .header { padding: 10px 28px 20px; }
}


.header { padding: 10px 2px 20px; position: relative; }
.header-inner { display: flex; align-items: center; justify-content: space-between; }
.logo {
  font-size: 23px; font-weight: 800; letter-spacing: .5px;
  background: linear-gradient(90deg, #ff8a3d, #ffb26b, #ff8a3d);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: logoShine 6s ease-in-out infinite;
  position: relative;
}
@keyframes logoShine {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.logo::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-glow), transparent);
  border-radius: 2px;
}
.badge {
  font-size: 12px; color: var(--text-dim);
  padding: 0; border: none; background: none;
  font-weight: 700; letter-spacing: 0; margin-top: 1px;
  width: 100%;
  text-align: justify;
  text-align-last: justify;
  text-shadow: none;
}

/* ---------- Panels ---------- */
.panel {
  position: relative;
  background: linear-gradient(180deg, rgba(26,34,44,.72), rgba(19,25,32,.82));
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 20px 18px; margin-bottom: 16px;
  box-shadow: 0 8px 28px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.04);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  overflow: hidden;
  animation: panelIn .5s cubic-bezier(.22,.8,.36,1) both;
}
.panel::before {
  content: ''; position: absolute; top: 0; left: 18px; right: 18px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,138,61,.5), transparent);
}
@keyframes panelIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.panel:nth-of-type(1) { animation-delay: .05s; }
.panel:nth-of-type(2) { animation-delay: .12s; }
.panel:nth-of-type(3) { animation-delay: .19s; }

.panel-title {
  font-size: 15px; font-weight: 700; margin-bottom: 16px; color: var(--text);
  display: flex; align-items: center; gap: 8px; letter-spacing: .3px;
}
.panel-title::before {
  content: ''; width: 4px; height: 14px; border-radius: 3px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 10px var(--accent-glow);
}
.sub-title { font-size: 13px; font-weight: 600; color: var(--text-dim); margin-bottom: 12px; letter-spacing: .3px; }

/* ---------- Form ---------- */
.form { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; gap: 12px; }
.row .field { flex: 1; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: 12px; color: var(--text-dim); font-weight: 500; }
.field input {
  height: 46px; padding: 0 13px; font-size: 15px;
  background: rgba(13,17,23,.8);
  border: 1px solid var(--border); border-radius: 11px;
  color: var(--text); outline: none; width: 100%;
  font-variant-numeric: tabular-nums;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.field input:hover { border-color: #33405a; }
.field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255,138,61,.14);
  background: rgba(13,17,23,.95);
}
.field input::placeholder { color: #4b5663; }

/* ---------- Stock picker ---------- */
.stock-picker { position: relative; }
.suggest {
  position: absolute; top: 52px; left: 0; right: 0; z-index: 20;
  background: #0d1117; border: 1px solid var(--border); border-radius: 11px;
  max-height: 220px; overflow-y: auto; display: none;
  box-shadow: 0 12px 32px rgba(0,0,0,.5);
  backdrop-filter: blur(8px);
}
.suggest-item { padding: 11px 13px; cursor: pointer; font-size: 13px; transition: background .15s; }
.suggest-item:hover, .suggest-item.active { background: rgba(255,138,61,.08); }
.suggest-item .nm { color: var(--text); }
.suggest-item .cd { color: var(--text-dim); margin-left: 8px; font-size: 11px; font-family: var(--mono); }

/* ---------- Button ---------- */
.btn-run {
  padding: 12px 20px; border: none; border-radius: 10px; font-size: 15px; font-weight: 700;
  color: #fff; cursor: pointer;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  box-shadow: 0 6px 18px rgba(255,138,61,.28);
  position: relative; overflow: hidden;
  transition: transform .12s, box-shadow .2s, filter .2s;
  letter-spacing: 1px;
  display: inline-flex; align-items: center; justify-content: center;
}
.btn-run::after {
  content: ''; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent);
  transform: skewX(-20deg); transition: left .5s ease;
}
.btn-run:hover { filter: brightness(1.06); box-shadow: 0 8px 24px rgba(255,138,61,.4); }
.btn-run:hover::after { left: 120%; }
.btn-run:active { transform: scale(.98); box-shadow: 0 3px 10px rgba(255,138,61,.3); }
.btn-run:disabled { opacity: .6; cursor: not-allowed; filter: grayscale(.3); }

.error { color: var(--up); font-size: 13px; min-height: 18px; }

/* ---------- Stat grid ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px; }
.stat-card {
  position: relative;
  background: linear-gradient(160deg, rgba(20,27,37,.9), rgba(13,17,23,.9));
  border: 1px solid var(--border); border-radius: 12px;
  padding: 13px 10px; text-align: center; overflow: hidden;
  transition: transform .15s, border-color .2s, box-shadow .2s;
}
.stat-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255,138,61,.6), transparent);
  opacity: .4; transition: opacity .2s;
}
.stat-card:hover { transform: translateY(-2px); border-color: #33405a; }
.stat-card:hover::before { opacity: 1; }
.stat-card .lbl { font-size: 11px; color: var(--text-dim); margin-bottom: 7px; letter-spacing: .3px; }
.stat-card .val {
  font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums;
  font-family: var(--mono); letter-spacing: -.3px;
}
.stat-card.wide { grid-column: span 3; }
.val.up { color: var(--up); }
.val.down { color: var(--down); }

/* ---------- Chart ---------- */
.chart-wrap { margin-bottom: 20px; }
#klineChart, #equityChart, #heatmapChart {
  width: 100%; background: rgba(13,17,23,.7); border-radius: 12px;
  border: 1px solid var(--border);
}

/* ---------- Trades table ---------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.trades-table, .data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.trades-table th, .trades-table td,
.data-table th, .data-table td {
  padding: 9px 10px; text-align: right; border-bottom: 1px solid var(--border-soft);
  font-variant-numeric: tabular-nums;
}
.trades-table th:first-child, .trades-table td:first-child,
.data-table th:first-child, .data-table td:first-child { text-align: left; }
.trades-table th, .data-table th {
  color: var(--text-dim); font-weight: 600; font-size: 12px; letter-spacing: .3px;
  background: rgba(255,255,255,.02);
}
.trades-table tbody tr, .data-table tbody tr { transition: background .15s; }
.trades-table tbody tr:hover, .data-table tbody tr:hover { background: rgba(255,255,255,.03); }
.trades-table td.up, .data-table td.up { color: var(--up); }
.trades-table td.down, .data-table td.down { color: var(--down); }

/* ---------- Options ---------- */
.options { display: flex; flex-wrap: wrap; gap: 12px 18px; padding: 8px 0 4px; }
.opt { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-dim); cursor: pointer; transition: color .2s; }
.opt:hover { color: var(--text); }
.opt input { accent-color: var(--accent); width: 15px; height: 15px; }

/* ---------- Scan ---------- */
.scan-tip { font-size: 12px; color: var(--text-dim); margin: 0 0 10px; line-height: 1.7; }

/* ---------- Cost config & strategy ---------- */
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-save {
  flex: 0 0 auto; padding: 12px 20px; border: none; border-radius: 10px;
  background: transparent; color: var(--accent); border: 1px solid rgba(255,138,61,.5);
  font-size: 15px; font-weight: 600; cursor: pointer;
  transition: background .2s, color .2s, box-shadow .2s;
}
.btn-save:hover { background: rgba(255,138,61,.1); box-shadow: 0 0 14px rgba(255,138,61,.15); }
.btn-save:active { opacity: .8; }
.cost-config {
  margin: 8px 0; border: 1px dashed #2c3648; border-radius: 10px; padding: 9px 13px;
  background: rgba(13,17,23,.35);
  transition: border-color .2s, background .2s;
}
.cost-config:hover { border-color: #3a465c; }
.cost-config summary { cursor: pointer; font-size: 13px; color: var(--text-dim); margin-bottom: 6px; transition: color .2s; }
.cost-config summary:hover { color: var(--text); }
.cost-config[open] { border-style: solid; border-color: rgba(255,138,61,.3); background: rgba(255,138,61,.03); }
.save-tip { font-size: 11px; color: var(--text-dim); font-weight: 400; margin-left: 6px; }
.strategy-list { display: flex; flex-direction: column; gap: 8px; max-height: 320px; overflow-y: auto; }
.strategy-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 12px; background: rgba(13,17,23,.6); border: 1px solid var(--border); border-radius: 10px; cursor: pointer;
  transition: border-color .2s, transform .15s, background .2s;
}
.strategy-item:hover { border-color: rgba(255,138,61,.5); transform: translateX(2px); background: rgba(13,17,23,.9); }
.strategy-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.strategy-name { font-size: 14px; font-weight: 600; color: var(--text); }
.strategy-desc { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.strategy-del { background: none; border: none; color: var(--text-dim); font-size: 16px; cursor: pointer; padding: 2px 6px; transition: color .2s; }
.strategy-del:hover { color: #ff5c5c; }
.strategy-empty { color: var(--text-dim); font-size: 13px; text-align: center; padding: 16px 0; }

/* ---------- Heatmap ---------- */
.heatmap-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 4px; }

/* ---------- Help tooltip ---------- */
.help-wrap { position: relative; display: inline-flex; align-items: center; }
.help {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; border-radius: 50%;
  background: #2a3340; color: var(--text-dim); font-size: 11px; font-weight: 700;
  cursor: pointer; user-select: none; margin-left: 5px; line-height: 1;
  transition: background .2s, color .2s, transform .15s;
}
.help:hover { transform: scale(1.1); }
.help.active { background: var(--accent); color: #fff; box-shadow: 0 0 10px var(--accent-glow); }
.tip {
  display: none; position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  min-width: 200px; max-width: 260px; width: max-content;
  background: #0f151d; border: 1px solid var(--border); border-radius: 9px;
  padding: 9px 12px; font-size: 12px; line-height: 1.65; color: var(--text);
  box-shadow: 0 10px 30px rgba(0,0,0,.5); z-index: 40; text-align: left;
}
.tip.show { display: block; }
.tip::before {
  content: ''; position: absolute; top: -5px; left: 50%; transform: translateX(-50%) rotate(45deg);
  width: 10px; height: 10px; background: #0f151d; border-left: 1px solid var(--border); border-top: 1px solid var(--border);
}
.tip.opt-tip { top: calc(100% + 8px); left: 0; transform: none; }
.tip.opt-tip::before { left: 12px; transform: rotate(45deg); }

/* ---------- Footer ---------- */
.footer {
  text-align: center; color: #4b5663; font-size: 12px; padding: 14px 0 4px;
  letter-spacing: .3px; cursor: pointer; user-select: none;
}
.footer .ver-cursor { text-decoration: underline dotted; }

/* ---------- Loading ---------- */
.loading-mask {
  position: fixed; inset: 0; background: rgba(7,10,15,.82);
  display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 50;
  backdrop-filter: blur(4px);
}
.spinner {
  width: 46px; height: 46px; border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: var(--accent);
  border-right-color: var(--accent-2);
  animation: spin .7s linear infinite;
  position: relative;
}
.spinner::after {
  content: ''; position: absolute; inset: 7px;
  border-radius: 50%; border: 2px solid transparent;
  border-bottom-color: rgba(255,138,61,.4);
  animation: spin 1s linear infinite reverse;
}
.loading-mask p { margin-top: 16px; color: var(--text-dim); font-size: 14px; letter-spacing: .5px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Version modal ---------- */
.modal-mask {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.65); z-index: 999;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  backdrop-filter: blur(3px);
}
.modal {
  background: linear-gradient(180deg, #141b24, #0d1117);
  border: 1px solid var(--border); border-radius: 14px;
  max-width: 480px; width: 100%; max-height: 80vh;
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 16px 48px rgba(0,0,0,.6);
  animation: modalIn .3s cubic-bezier(.22,.8,.36,1) both;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--border);
}
.modal-title { font-size: 15px; font-weight: 700; color: var(--text); }
.modal-close {
  background: none; border: none; color: var(--text-dim);
  font-size: 22px; line-height: 1; cursor: pointer; padding: 0 4px; transition: color .2s, transform .15s;
}
.modal-close:hover { color: var(--accent); transform: rotate(90deg); }
.modal-body { padding: 14px 18px; overflow-y: auto; }
.ver-item { margin-bottom: 18px; position: relative; padding-left: 14px; }
.ver-item::before {
  content: ''; position: absolute; left: 0; top: 4px; bottom: 4px; width: 2px;
  background: linear-gradient(180deg, rgba(255,138,61,.5), transparent);
  border-radius: 2px;
}
.ver-item:last-child { margin-bottom: 4px; }
.ver-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.ver-tag {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #1a1005; font-size: 12px; font-weight: 800;
  padding: 2px 12px; border-radius: 20px;
  box-shadow: 0 2px 8px rgba(255,138,61,.3);
}
.ver-date { font-size: 11px; color: var(--text-dim); font-family: var(--mono); }
.ver-list { margin: 0; padding-left: 18px; }
.ver-list li { font-size: 13px; line-height: 1.75; color: var(--text); }

/* ---------- Export PDF button ---------- */
.btn-export {
  margin-left: 12px; padding: 5px 16px; font-size: 13px;
  border: 1px solid rgba(255,138,61,.6); background: transparent;
  color: var(--accent); border-radius: 8px; cursor: pointer;
  vertical-align: middle; transition: all .2s; font-weight: 600;
}
.btn-export:hover { background: rgba(255,138,61,.12); box-shadow: 0 0 14px rgba(255,138,61,.2); color: var(--accent-2); }
.btn-export:disabled { opacity: .5; cursor: default; }

/* ---------- Strategy save / load ---------- */
.strat-actions { display: flex; align-items: flex-end; }
.strat-list { margin-top: 8px; display: flex; flex-direction: column; gap: 8px; max-height: 260px; overflow-y: auto; }
.strat-item { display: flex; align-items: center; justify-content: space-between; padding: 9px 12px; border: 1px solid var(--border); border-radius: 9px; background: rgba(13,17,23,.6); transition: border-color .2s; }
.strat-item:hover { border-color: rgba(255,138,61,.45); }
.strat-info { display: flex; flex-direction: column; gap: 2px; }
.strat-name { font-size: 13px; font-weight: 600; color: var(--text); }
.strat-meta { font-size: 11px; color: var(--text-dim); font-family: var(--mono); }
.strat-btns { display: flex; gap: 6px; }
.strat-load, .strat-del { padding: 4px 12px; font-size: 12px; border-radius: 7px; cursor: pointer; border: 1px solid var(--border); background: transparent; transition: all .2s; }
.strat-load { color: var(--accent); border-color: rgba(255,138,61,.5); }
.strat-load:hover { background: rgba(255,138,61,.12); color: var(--accent-2); }
.strat-del { color: var(--up); border-color: rgba(255,92,92,.4); }
.strat-del:hover { background: rgba(255,92,92,.12); color: #ff7a7a; }

/* ---------- Nav links ---------- */
.back-link, .nav-link {
  color: var(--accent); font-size: 13px; text-decoration: none; white-space: nowrap;
  margin-left: 12px; font-weight: 500; transition: color .2s;
}
.back-link:hover, .nav-link:hover { color: var(--accent-2); text-decoration: underline; }

/* ---------- Responsive ---------- */
@media (min-width: 600px) {
  .app { max-width: 660px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---------- 补充：提示文字 / 下拉框 / 通用按钮（视觉统一） ---------- */
.cost-hint {
  font-size: 12px; color: var(--text-dim); line-height: 1.7;
  margin-top: 8px; padding: 8px 10px;
  background: rgba(52,199,123,.06); border-left: 2px solid rgba(52,199,123,.5);
  border-radius: 0 8px 8px 0;
}
.fq-select {
  height: 34px; padding: 0 10px; font-size: 13px;
  background: rgba(13,17,23,.8); border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); outline: none; cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.fq-select:focus { border-color: var(--accent); }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font: inherit; cursor: pointer;
}
.result-panel .panel-title { flex-wrap: wrap; }
.trades-wrap { margin-top: 4px; }

/* ============================================================
   高质感增强 V3.5
   动态极光背景 + 真玻璃卡片 + 数字光晕 + 精致微交互
   本层为增量增强，保留 V3.4 全部规则；如需回退删除本区块即可
   ============================================================ */

:root {
  --gold: #ffd07a;
  --cyan: #58c8ff;
  --violet: #9d7bff;
}

/* ---------- 动态极光光斑背景 ---------- */
body::before {
  background:
    radial-gradient(1100px 520px at 15% -8%, rgba(255,138,61,.16), transparent 55%),
    radial-gradient(900px 480px at 90% 0%, rgba(88,200,255,.12), transparent 55%),
    radial-gradient(700px 700px at 50% 110%, rgba(52,199,123,.08), transparent 60%),
    var(--bg);
}
/* 极光浮动光斑（动画） */
body::before {
  background:
    radial-gradient(900px 420px at 12% -6%, rgba(255,138,61,.18), transparent 55%),
    radial-gradient(760px 400px at 88% -4%, rgba(88,200,255,.14), transparent 55%),
    radial-gradient(700px 700px at 45% 108%, rgba(157,123,255,.10), transparent 60%),
    radial-gradient(500px 360px at 78% 55%, rgba(255,138,61,.05), transparent 60%),
    var(--bg);
  animation: auroraDrift 26s ease-in-out infinite alternate;
}
@keyframes auroraDrift {
  0%   { filter: hue-rotate(0deg) saturate(1); transform: translateY(0); }
  50%  { filter: hue-rotate(12deg) saturate(1.08); transform: translateY(-14px); }
  100% { filter: hue-rotate(0deg) saturate(1); transform: translateY(0); }
}

/* ---------- 噪点颗粒（质感） ---------- */
.app::before {
  content: '';
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='0.03'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Header 精致化 ---------- */
.header { position: relative; }
.header::after {
  content: ''; position: absolute; left: 2px; right: 2px; bottom: 8px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,138,61,.35), rgba(88,200,255,.25), transparent);
  opacity: .5;
}
.logo { font-size: 25px; filter: drop-shadow(0 0 18px rgba(255,138,61,.25)); }
.badge {
  background: linear-gradient(120deg, rgba(255,138,61,.14), rgba(255,208,122,.10));
  border-color: rgba(255,208,122,.4);
  box-shadow: 0 0 20px rgba(255,138,61,.15), inset 0 1px 0 rgba(255,255,255,.08);
  backdrop-filter: blur(4px);
}

/* ---------- 真玻璃卡片：外描边光晕 + 内高光 + 双层阴影 ---------- */
.panel {
  background:
    linear-gradient(180deg, rgba(255,255,255,.035), transparent 12%),
    linear-gradient(180deg, rgba(26,34,44,.82), rgba(16,21,29,.92));
  border: 1px solid rgba(255,255,255,.09);
  box-shadow:
    0 20px 50px rgba(0,0,0,.45),
    0 2px 8px rgba(0,0,0,.3),
    inset 0 1px 0 rgba(255,255,255,.08),
    inset 0 -1px 0 rgba(0,0,0,.4);
  border-radius: 18px;
}
.panel::after {
  content: ''; position: absolute; inset: 0; border-radius: 18px; pointer-events: none;
  background: radial-gradient(120% 60% at 50% 0%, rgba(255,255,255,.05), transparent 45%);
}
.panel:hover {
  border-color: rgba(255,138,61,.25);
  box-shadow:
    0 22px 56px rgba(0,0,0,.5),
    0 0 24px rgba(255,138,61,.06),
    inset 0 1px 0 rgba(255,255,255,.09);
}
.panel::before {
  background: linear-gradient(90deg, transparent, rgba(255,208,122,.55), transparent);
}

/* ---------- 面板标题 + 装饰图标 ---------- */
.panel-title { font-size: 16px; gap: 10px; }
.panel-title::before {
  content: ''; width: 4px; height: 15px; border-radius: 3px;
  background: linear-gradient(180deg, var(--gold), var(--accent));
  box-shadow: 0 0 12px var(--accent-glow);
}
.sub-title { letter-spacing: .5px; }

/* ---------- 输入框精致聚焦 ---------- */
.field input {
  border-radius: 12px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,.4);
}
.field input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(255,208,122,.12), inset 0 1px 3px rgba(0,0,0,.3);
}

/* ---------- 主按钮：金色渐变 + 双重流光 ---------- */
.btn-run {
  background: linear-gradient(120deg, #ff9d45, #ffb26b 45%, #ff9d45);
  background-size: 180% 100%;
  animation: btnSheen 5s ease-in-out infinite;
  border-radius: 14px;
  box-shadow:
    0 10px 28px rgba(255,138,61,.32),
    0 2px 6px rgba(0,0,0,.3),
    inset 0 1px 0 rgba(255,255,255,.5),
    inset 0 -2px 4px rgba(200,90,0,.25);
  border: 1px solid rgba(255,190,110,.5);
}
@keyframes btnSheen {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.btn-run:hover {
  box-shadow:
    0 12px 36px rgba(255,138,61,.45),
    0 0 30px rgba(255,138,61,.2),
    inset 0 1px 0 rgba(255,255,255,.55);
}

/* ---------- 统计卡：数字光晕 + 迷你信息条 ---------- */
.stat-card {
  border-radius: 14px;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(255,255,255,.05), transparent 50%),
    linear-gradient(160deg, rgba(22,30,42,.95), rgba(12,16,24,.95));
  box-shadow: 0 8px 22px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.06);
}
.stat-card::after {
  content: ''; position: absolute; right: 8px; top: 8px; width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 8px var(--accent-glow); opacity: .7;
}
.stat-card .val {
  background: linear-gradient(180deg, #fff, #c9d6e8);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.5));
}
.stat-card .val.up { background: linear-gradient(180deg, #ff9a9a, #ff5c5c); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat-card .val.down { background: linear-gradient(180deg, #7be7b2, #34c77b); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat-card .lbl { letter-spacing: .6px; }

/* ---------- 表格：隔行 + 细腻分隔 ---------- */
.trades-table tbody tr:nth-child(even), .data-table tbody tr:nth-child(even) { background: rgba(255,255,255,.015); }
.trades-table tbody tr:hover, .data-table tbody tr:hover { background: rgba(255,138,61,.05); }
.trades-table th, .data-table th {
  letter-spacing: .5px; font-size: 11px; text-transform: uppercase;
  background: linear-gradient(180deg, rgba(255,255,255,.04), transparent);
}

/* ---------- 图表容器：顶部高光线 ---------- */
#klineChart, #equityChart, #heatmapChart {
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 6px 18px rgba(0,0,0,.3);
  border: 1px solid rgba(255,255,255,.07);
}

/* ---------- 提示气泡精致化 ---------- */
.tip { border-radius: 11px; box-shadow: 0 14px 40px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.05); }

/* ---------- 帮助图标 ---------- */
.help { width: 17px; height: 17px; font-size: 11px; box-shadow: inset 0 1px 0 rgba(255,255,255,.1); }
.help.active { background: linear-gradient(120deg, var(--accent), var(--gold)); color: #1a1005; }

/* ---------- 复权下拉框 ---------- */
.fq-select { border-radius: 10px; box-shadow: inset 0 1px 3px rgba(0,0,0,.3); }

/* ---------- 复选框 ---------- */
.opt input { accent-color: var(--accent); filter: drop-shadow(0 0 4px rgba(255,138,61,.4)); }

/* ---------- 版本弹窗 ---------- */
.modal {
  border: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 24px 70px rgba(0,0,0,.7), inset 0 1px 0 rgba(255,255,255,.06);
  border-radius: 18px;
}
.ver-tag {
  background: linear-gradient(120deg, var(--gold), var(--accent));
  box-shadow: 0 3px 12px rgba(255,138,61,.35);
}
.ver-list li::marker { color: var(--accent); }

/* ---------- 策略项 ---------- */
.strategy-item { border-radius: 12px; }
.strategy-item:hover { border-color: rgba(255,208,122,.6); box-shadow: 0 4px 16px rgba(0,0,0,.3); }
.strategy-name { letter-spacing: .3px; }

/* ---------- 页脚 ---------- */
.footer { letter-spacing: .6px; }

/* ---------- 减淡动画偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  body::before { animation: none !important; }
  .btn-run { animation: none !important; }
}

/* ---------- V4.0 账号体系 ---------- */
.header-right { display: flex; align-items: center; gap: 14px; }
.btn-login {
  background: linear-gradient(120deg, rgba(255,138,61,.16), rgba(255,138,61,.06));
  border: 1px solid rgba(255,138,61,.45); color: var(--accent);
  font-size: 13px; font-weight: 600; padding: 7px 16px; border-radius: 20px;
  cursor: pointer; transition: all .2s; letter-spacing: .3px;
}
.btn-login:hover { background: linear-gradient(120deg, var(--accent), #ffb26b); color: #fff; box-shadow: 0 4px 16px rgba(255,138,61,.4); }
.user-area { display: flex; align-items: center; gap: 8px; }
.user-name {
  font-size: 12px; color: var(--text); padding: 6px 12px; border-radius: 20px;
  background: rgba(70,130,255,.12); border: 1px solid rgba(70,130,255,.35); font-weight: 600;
}
.btn-logout {
  background: none; border: 1px solid var(--border); color: var(--text-dim);
  font-size: 12px; padding: 6px 12px; border-radius: 20px; cursor: pointer; transition: all .2s;
}
.btn-logout:hover { border-color: var(--down); color: var(--down); }
.auth-modal { max-width: 400px; }
.auth-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.auth-tab {
  flex: 1; padding: 9px 0; border-radius: 10px; cursor: pointer;
  background: rgba(255,255,255,.04); border: 1px solid var(--border);
  color: var(--text-dim); font-size: 13px; font-weight: 600; transition: all .2s;
}
.auth-tab.active {
  background: linear-gradient(120deg, var(--accent), #ffb26b); border-color: transparent;
  color: #fff; box-shadow: 0 4px 14px rgba(255,138,61,.35);
}
.auth-form .field { margin-bottom: 14px; }
.auth-form input {
  width: 100%; box-sizing: border-box;
  background: rgba(255,255,255,.05); border: 1px solid var(--border);
  color: var(--text); border-radius: 10px; padding: 10px 12px; font-size: 14px;
  outline: none; transition: border-color .2s, box-shadow .2s;
}
.auth-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,138,61,.15); }
.auth-tip { margin: 14px 0 4px; text-align: center; }

/* ---------- V4.1 账号体系增强 ---------- */
.auth-pwd-wrap { position: relative; }
.auth-pwd-wrap input { padding-right: 44px; }
.auth-eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; font-size: 15px;
  opacity: .65; padding: 4px 6px; line-height: 1; transition: opacity .2s;
}
.auth-eye:hover { opacity: 1; }
.auth-hint { min-height: 16px; margin-top: 5px; font-size: 12px; line-height: 1.4; }
.auth-hint.ok { color: var(--up, #4caf7d); }
.auth-hint.warn { color: var(--down, #ff5b6a); }
.auth-strength { margin-top: 8px; }
.auth-strength-bar {
  height: 4px; border-radius: 3px; background: rgba(255,255,255,.1); overflow: hidden;
}
.auth-strength-bar i {
  display: block; height: 100%; width: 0; border-radius: 3px; transition: width .3s;
}
.auth-strength-bar i.weak { background: #ff5b6a; }
.auth-strength-bar i.mid { background: #ffb26b; }
.auth-strength-bar i.strong { background: #4caf7d; }
.auth-strength-text { display: block; margin-top: 5px; font-size: 12px; color: var(--text-dim); }
.auth-remember { margin-bottom: 12px; }
.auth-remember .opt { font-size: 13px; color: var(--text-dim); cursor: pointer; }
.auth-remember input { width: auto; margin-right: 6px; accent-color: var(--accent); }

/* Toast 提示 */
.bt-toast {
  position: fixed; top: 76px; left: 50%; transform: translateX(-50%) translateY(-12px);
  background: rgba(30,32,38,.95); border: 1px solid rgba(255,138,61,.4);
  color: #fff; padding: 10px 22px; border-radius: 24px; font-size: 14px;
  box-shadow: 0 8px 30px rgba(0,0,0,.45); z-index: 99999;
  opacity: 0; transition: all .3s; pointer-events: none; max-width: 80vw; text-align: center;
}
.bt-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.bt-toast.ok { border-color: rgba(76,175,125,.55); }

/* ---------- V4.2 后台管理 ---------- */
.admin-link {
  font-size: 13px; font-weight: 600; color: var(--accent); text-decoration: none;
  padding: 7px 14px; border-radius: 20px; border: 1px solid rgba(255,138,61,.35);
  background: rgba(255,138,61,.08); transition: all .2s;
}
.admin-link:hover { background: rgba(255,138,61,.18); border-color: var(--accent); }
.admin-tabs {
  display: flex; gap: 10px; margin: 20px 0; flex-wrap: wrap;
}
.admin-tab {
  padding: 9px 22px; border-radius: 22px; cursor: pointer; font-size: 14px; font-weight: 600;
  background: rgba(255,255,255,.04); border: 1px solid var(--border); color: var(--text-dim);
  transition: all .2s;
}
.admin-tab:hover { border-color: var(--accent); color: var(--text); }
.admin-tab.active {
  background: linear-gradient(120deg, var(--accent), #ffb26b); border-color: transparent;
  color: #fff; box-shadow: 0 4px 14px rgba(255,138,61,.35);
}
.admin-panel { animation: fadeIn .3s; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; }
.stat-card {
  background: rgba(255,255,255,.04); border: 1px solid var(--border); border-radius: 14px;
  padding: 20px 18px; text-align: center; transition: transform .2s, border-color .2s;
}
.stat-card:hover { transform: translateY(-3px); border-color: rgba(255,138,61,.4); }
.stat-value { font-size: 34px; font-weight: 700; color: var(--accent); line-height: 1.1; }
.stat-label { margin-top: 8px; font-size: 14px; color: var(--text); font-weight: 600; }
.stat-sub { margin-top: 4px; font-size: 12px; color: var(--text-dim); }
.admin-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; gap: 10px; flex-wrap: wrap; }
.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th, .admin-table td {
  padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.admin-table th { color: var(--text-dim); font-weight: 600; background: rgba(255,255,255,.03); }
.admin-table tbody tr:hover { background: rgba(255,138,61,.05); }
.admin-table .act-cell { display: flex; gap: 6px; flex-wrap: wrap; }
.td-empty { text-align: center; color: var(--text-dim); padding: 30px 0 !important; }
.tag { font-size: 11px; padding: 2px 9px; border-radius: 10px; background: rgba(255,255,255,.06); color: var(--text-dim); }
.tag-admin { background: rgba(255,138,61,.15); color: var(--accent); }
.tag-ok { background: rgba(76,175,125,.14); color: #4caf7d; }
.tag-lock { background: rgba(255,91,106,.15); color: #ff5b6a; }
.btn-mini {
  font-size: 12px; padding: 5px 10px; border-radius: 8px; cursor: pointer;
  background: rgba(255,255,255,.05); border: 1px solid var(--border); color: var(--text);
  transition: all .2s;
}
.btn-mini:hover { border-color: var(--accent); color: var(--accent); }
.btn-mini.btn-danger { color: #ff5b6a; border-color: rgba(255,91,106,.4); }
.btn-mini.btn-danger:hover { background: rgba(255,91,106,.12); border-color: #ff5b6a; }
.admin-card {
  background: rgba(255,255,255,.04); border: 1px solid var(--border); border-radius: 14px;
  padding: 22px; margin-bottom: 18px; max-width: 460px;
}
.admin-card h3 { margin: 0 0 14px; font-size: 16px; color: var(--text); }
.admin-card .field { margin-bottom: 12px; }
.admin-card input {
  width: 100%; box-sizing: border-box;
  background: rgba(255,255,255,.05); border: 1px solid var(--border); color: var(--text);
  border-radius: 10px; padding: 10px 12px; font-size: 14px; outline: none;
}
.admin-card input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,138,61,.15); }
.confirm-btns { display: flex; justify-content: center; margin-top: 18px; }
.admin-card select {
  width: 100%; box-sizing: border-box;
  background: rgba(13,17,23,.8); border: 1px solid var(--border); color: var(--text);
  border-radius: 10px; padding: 10px 12px; font-size: 14px; outline: none; cursor: pointer;
}
.admin-card select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,138,61,.15); }
/* V5.1 到价提醒状态徽章 */
.al-badge {
  display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 20px;
  font-size: 12px; font-weight: 600; line-height: 1.5;
}
.al-badge.pending { color: #ffb74d; background: rgba(255,183,77,.12); border: 1px solid rgba(255,183,77,.35); }
.al-badge.fired { color: #34c77b; background: rgba(52,199,123,.12); border: 1px solid rgba(52,199,123,.35); }
.al-badge.inactive { color: var(--text-dim); background: rgba(255,255,255,.05); border: 1px solid var(--border); }
.al-type { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; }
.al-type.below { color: #ff5c5c; }
.al-type.above { color: #34c77b; }
.al-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.al-dot.below { background: #ff5c5c; }
.al-dot.above { background: #34c77b; }
#alTable td { vertical-align: middle; }
.new-pwd {
  font-size: 22px; font-weight: 700; color: var(--accent); letter-spacing: 2px;
  background: rgba(255,138,61,.1); border: 1px dashed rgba(255,138,61,.5);
  border-radius: 10px; padding: 10px 14px; margin: 12px 0; text-align: center;
}

/* ---------- V4.3 响应式自适应（手机 / 平板 / 电脑） ---------- */
.app, .container { max-width: 100%; padding: 14px 12px 48px; }

/* 手机端（<600px）：满宽紧凑 */
@media (max-width: 599px) {
  .header-inner { flex-wrap: wrap; gap: 8px; }
  .header-right { flex-wrap: wrap; gap: 8px; width: 100%; justify-content: space-between; }
  .badge { display: none; }
  .logo { font-size: 17px; }
  .row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-card.wide { grid-column: span 2; }
  .modal-mask { align-items: flex-end; }
  .modal { max-width: 100%; width: 100%; border-radius: 18px 18px 0 0; max-height: 92vh; }
  .btn-export { font-size: 12px; padding: 6px 10px; }
  .panel { padding: 16px 14px; }
  .header-right .nav-link, .header-right .admin-link { font-size: 12px; padding: 6px 10px; }
  .admin-table th, .admin-table td { padding: 8px 8px; font-size: 12px; }
  .cost-hint { font-size: 11px; }
  .chart-wrap { overflow-x: auto; }
  /* V4.4 个人中心卡片手机端适配 */
  .pf-name { font-size: 14px; }
  .pf-tag { font-size: 11px; padding: 2px 8px; }
  .pf-card { padding: 12px 12px 10px 16px; }
  .pf-actions { width: 100%; }
  .pf-btn { flex: 1; text-align: center; padding: 7px 10px; }
  /* V4.4 顶部菜单栏手机端 */
  .nav-bar { gap: 10px; }
  .nav-menu { order: 3; width: 100%; gap: 6px; }
  .nav-item { padding: 6px 12px; font-size: 12.5px; }
  .page { max-width: 100%; padding: 14px 12px 48px; }
  /* V4.4 个人中心手机端：栏目横向 Tab 卡片化 */
  .profile-sidebar {
    position: static;
    padding: 8px;
    overflow-x: auto;
    background: linear-gradient(180deg, rgba(26,34,44,.85), rgba(15,21,28,.92));
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 6px 20px rgba(0,0,0,.25);
  }
  .profile-menu { flex-direction: row; gap: 8px; }
  .profile-menu-item {
    justify-content: center; text-align: center;
    padding: 9px 16px; font-size: 13px; white-space: nowrap;
    border-radius: 10px;
  }
  .profile-menu-item:hover { color: var(--accent); background: rgba(255,138,61,.08); }
  .profile-menu-item.active {
    color: #fff;
    background: linear-gradient(120deg, var(--accent), var(--accent-2));
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(255,138,61,.32);
  }
  .profile-menu-item.active:hover { color: #fff; filter: brightness(1.06); }
}

/* 平板端（600-1024px） */
@media (min-width: 600px) and (max-width: 1023px) {
  .app, .container { max-width: 740px; padding: 18px 16px 48px; }
  .page { max-width: 740px; padding: 18px 16px 48px; }
  .profile-layout { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 14px; }
  /* V4.4 个人中心平板端：左侧栏目精致化 */
  .profile-sidebar { box-shadow: 0 6px 20px rgba(0,0,0,.25); }
  .profile-menu-item { padding: 12px 14px; font-size: 13px; }
  .profile-menu-item::before {
    content: ''; width: 6px; height: 6px; border-radius: 50%;
    background: var(--text-dim); opacity: .5; flex-shrink: 0;
    transition: all .2s;
  }
  .profile-menu-item:hover::before { background: var(--accent); opacity: 1; }
  .profile-menu-item.active {
    color: #fff;
    background: linear-gradient(120deg, var(--accent), var(--accent-2));
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(255,138,61,.32);
  }
  .profile-menu-item.active::before { background: #fff; opacity: 1; box-shadow: 0 0 8px rgba(255,255,255,.6); }
  .profile-menu-item.active:hover { color: #fff; filter: brightness(1.06); }
}

/* 电脑端（>=1024px）：表单窄列居中，结果区充分展宽（V4.4 加宽至 1320px） */
@media (min-width: 1024px) {
  .app, .container { max-width: 1320px; padding: 24px 28px 60px; }
  .panel { max-width: 920px; }
  .panel.result-panel, .panel#strategyPanel { max-width: none; }
  .modal { max-width: 460px; }
  .header-right { gap: 14px; }
  .stat-grid { gap: 14px; }
  /* V4.4：我的策略 → 电脑端右侧竖向侧栏（sticky 跟随滚动，可竖向扩展） */
  .app {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    grid-template-rows: auto;
    gap: 20px;
    align-items: start;
  }
  /* V6.5.3：导航栏跨满两列，与其他页面导航宽度一致 */
  .app > .header { grid-column: 1 / -1; }
  .app > section.panel { grid-column: 1; }
  .app > footer { grid-column: 1; }
  #strategyPanel {
    grid-column: 2;
    grid-row: 2 / span 5;
    position: sticky;
    top: 16px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
  }
  /* V4.4 个人中心 左右结构：左栏目列表 + 右内容区 */
  .profile-page .app { display: block; }
  /* V6.5.7 全站内容区统一：非首页页面禁用 grid，内容居中定宽 */
  .center-page .app { display: block; }
  .center-page .panel { margin: 0 auto; }
  .center-page .pf-hero, .center-page .pf-grid-2,
  .center-page .pf-result, .center-page .pf-table-card { max-width: 920px; margin: 0 auto 16px; }
  .center-page .pf-grid-2 { margin-bottom: 16px; }
  /* V6.5.7 深度报告/实盘记录：容器含左右 padding 28px，max-width 设 976px
     使内容区（976-56=920px）与其他页面面板同宽 */
  .deep-page .container, .trade-page .container { max-width: 976px; }
  .profile-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
  }
  .profile-sidebar {
    position: sticky;
    top: 16px;
    background: linear-gradient(180deg, rgba(26,34,44,.85), rgba(15,21,28,.92));
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 10px;
  }
  .profile-menu { display: flex; flex-direction: column; gap: 6px; }
  .profile-menu-item {
    display: flex; align-items: center; gap: 10px;
    width: 100%; text-align: left;
    padding: 11px 14px; border-radius: 10px; cursor: pointer;
    background: transparent; border: 1px solid transparent;
    color: var(--text-dim); font-size: 14px; font-weight: 600;
    transition: all .2s;
  }
  .profile-menu-item:hover {
    color: var(--accent); background: rgba(255,138,61,.08);
    border-color: rgba(255,138,61,.2);
  }
  .profile-menu-item.active {
    color: #fff;
    background: linear-gradient(120deg, var(--accent), var(--accent-2));
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(255,138,61,.32);
  }
  .profile-panel { display: none; }
  .profile-panel.active { display: block; }
  #strategyPanel .strategy-list { max-height: none; overflow: visible; }
}

/* ---------- V4.3 个人中心 + 策略分享 ---------- */
.user-name-link { color: inherit; text-decoration: none; }
.user-name-link:hover { color: var(--accent); }
.strat-actions { display: flex; gap: 6px; align-items: center; }
.strat-actions .btn-mini { font-size: 11px; padding: 4px 9px; }
.profile-info { display: flex; align-items: center; gap: 18px; }
.profile-avatar {
  width: 64px; height: 64px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), #ffb26b); color: #fff;
  font-size: 28px; font-weight: 700; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(255,138,61,.35);
}
.profile-name { font-size: 22px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.profile-sub { font-size: 13px; color: var(--text-dim); margin-top: 3px; }
.share-preview {
  background: rgba(255,255,255,.05); border: 1px dashed var(--border);
  border-radius: 12px; padding: 14px 16px; font-size: 13px; line-height: 1.7;
  color: var(--text); white-space: pre-wrap; margin-bottom: 14px;
}
.share-card-img {
  display: block; width: 100%; max-width: 420px; margin: 0 auto 14px;
  border-radius: 12px; border: 1px solid var(--border);
}
.share-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.share-btns .btn-run { flex: 1; max-width: 180px; }
.share-btns .btn-mini { flex: 1; max-width: 130px; padding: 9px 0; text-align: center; }

/* ---------- V4.4 个人中心策略卡片美化（投研终端风） ---------- */
.pf-list { max-height: none; gap: 12px; }
.pf-card {
  position: relative;
  background: linear-gradient(180deg, rgba(26,34,44,.85), rgba(15,21,28,.92));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px 12px 20px;
  overflow: hidden;
  transition: border-color .22s, transform .22s, box-shadow .22s;
}
.pf-card::before {
  content: ''; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 12px var(--accent-glow);
}
.pf-card:hover {
  border-color: rgba(255,138,61,.55);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0,0,0,.5), 0 0 0 1px rgba(255,138,61,.15);
}
.pf-card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px;
}
.pf-card-title { display: flex; align-items: center; gap: 10px; min-width: 0; flex-wrap: wrap; }
.pf-chip {
  font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: .5px;
  color: var(--accent); background: rgba(255,138,61,.12);
  border: 1px solid rgba(255,138,61,.35);
  padding: 2px 9px; border-radius: 8px; white-space: nowrap;
}
.pf-name { font-size: 16px; font-weight: 700; color: var(--text); }
.pf-src { font-size: 11px; font-weight: 600; padding: 2px 10px; border-radius: 20px; flex-shrink: 0; }
.pf-src.cloud { color: var(--accent); background: rgba(255,138,61,.12); border: 1px solid rgba(255,138,61,.4); }
.pf-src.local { color: var(--text-dim); background: rgba(255,255,255,.06); border: 1px solid var(--border); }
.pf-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.pf-tag {
  font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 8px;
  border: 1px solid transparent; line-height: 1.5;
}
.pf-tag.t-buy { color: #ff7a7a; background: rgba(255,92,92,.1); border-color: rgba(255,92,92,.28); }
.pf-tag.t-sell { color: #4fd0a0; background: rgba(52,199,123,.1); border-color: rgba(52,199,123,.28); }
.pf-tag.t-hold { color: #6f9bff; background: rgba(64,120,255,.12); border-color: rgba(64,120,255,.3); }
.pf-tag.t-stop { color: #ffb26b; background: rgba(255,138,61,.1); border-color: rgba(255,138,61,.26); }
.pf-tag.t-date { color: var(--text-dim); background: rgba(255,255,255,.05); border-color: var(--border); font-weight: 400; }
.pf-card-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding-top: 10px; border-top: 1px dashed rgba(255,255,255,.08); flex-wrap: wrap;
}
.pf-time { font-size: 11px; color: var(--text-dim); font-family: var(--mono); }
.pf-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pf-btn {
  font-size: 12px; font-weight: 600; padding: 6px 14px; border-radius: 9px; cursor: pointer;
  background: rgba(255,255,255,.05); border: 1px solid var(--border); color: var(--text);
  transition: all .2s;
}
.pf-btn:hover { border-color: var(--accent); color: var(--accent); background: rgba(255,138,61,.08); }
.pf-btn.primary {
  background: linear-gradient(135deg, var(--accent), #ff9e52); border-color: transparent; color: #fff;
  box-shadow: 0 4px 14px rgba(255,138,61,.28);
}
.pf-btn.primary:hover { filter: brightness(1.08); transform: translateY(-1px); color: #fff; }
.pf-btn.danger { color: #ff6b7a; border-color: rgba(255,91,106,.4); }
.pf-btn.danger:hover { background: rgba(255,91,106,.12); border-color: #ff5b6a; color: #ff6b7a; }

/* ---------- V4.4 顶部菜单栏（可扩展导航，新功能在此追加菜单项） ---------- */
.nav-bar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.nav-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
.nav-menu { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.nav-menu li { margin: 0; padding: 0; }
.nav-item {
  display: inline-block; padding: 7px 15px; border-radius: 10px;
  font-size: 13.5px; font-weight: 600; color: var(--text-dim);
  text-decoration: none; white-space: nowrap;
  border: 1px solid transparent; transition: all .2s;
}
.nav-item:hover { color: var(--accent); background: rgba(255,138,61,.08); }
/* V6.5.1 导航分组：标签与组内项绑定为一个整体（换行不分离）
   桌面端横向排列，移动端标签作为分组标题纵向展开 */
.nav-group { display: flex; align-items: center; gap: 2px; }
.nav-group-label {
  margin: 0 6px 0 10px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  opacity: .55;
  letter-spacing: 1px;
  white-space: nowrap;
  user-select: none;
}
.nav-group-label::before {
  content: '';
  display: inline-block;
  width: 1px; height: 12px;
  background: var(--border);
  margin-right: 10px;
  vertical-align: middle;
}
.nav-group:first-child .nav-group-label::before { display: none; }
.nav-group-items { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nav-item.active {
  color: var(--accent); background: rgba(255,138,61,.12);
  border-color: rgba(255,138,61,.28);
  box-shadow: 0 0 12px rgba(255,138,61,.12) inset;
}
.nav-user { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
/* V6.5.2 两行式导航（600px+ 通用）：第一行品牌+用户区，第二行导航全宽平铺，组间竖线分隔
   599px 以下移动端由汉堡菜单+分组折叠规则覆盖 */
@media (min-width: 600px) {
  .nav-bar { flex-wrap: wrap; gap: 10px 16px; }
  .nav-brand { order: 1; }
  .nav-user { order: 2; margin-left: auto; }
  .nav-menu {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    gap: 0;
    border-top: 1px solid var(--border-soft);
    padding-top: 8px;
    margin-top: 2px;
  }
  /* 隐藏分组小标签，组间用竖线+间距区分 */
  .nav-group-label { display: none; }
  .nav-group { gap: 0; }
  .nav-group + .nav-group {
    margin-left: 6px;
    padding-left: 6px;
    border-left: 1px solid var(--border-soft);
  }
  .nav-group-items { gap: 2px; }
  .nav-item { padding: 6px 12px; font-size: 13px; }
}

/* admin 页容器（与 .app 一致的居中布局） */
.page { max-width: 1320px; margin: 0 auto; padding: 18px 16px 48px; position: relative; }

/* ============================================================
   V4.4 UI 风格统一层
   统一全站按钮/菜单设计语言：圆角体系 · hover 反馈 · 焦点环
   本层为增量覆盖层，保留原规则；如需回退删除本区块即可
   ============================================================ */
:root {
  --btn-r: 10px;        /* 标准按钮圆角 */
  --btn-r-sm: 8px;      /* 紧凑按钮圆角 */
  --btn-r-lg: 12px;     /* 主 CTA 按钮圆角 */
}

/* 1. 全局键盘焦点环（无障碍 + 视觉统一） */
button:focus-visible, a:focus-visible,
input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 2px solid rgba(255,138,61,.65);
  outline-offset: 2px;
}

/* 2. 圆角体系收敛（胶囊身份类 btn-login/logout/user-name 除外） */
.btn-save, .btn-export, .btn-mini, .pf-btn,
.strat-load, .strat-del, .auth-tab, .admin-tab {
  border-radius: var(--btn-r);
}

/* 3. 描边/次级按钮 hover 统一反馈：橙描边 + 橙字 + 浅橙底 + 光晕 */
.btn-save:hover, .btn-export:hover, .btn-mini:hover, .pf-btn:hover,
.strat-load:hover, .auth-tab:hover, .admin-tab:hover {
  background: rgba(255,138,61,.1);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 12px rgba(255,138,61,.18);
}

/* 4. 统一按压反馈 */
.btn-save:active, .btn-export:active, .btn-mini:active, .pf-btn:active,
.strat-load:active, .strat-del:active, .auth-tab:active, .admin-tab:active {
  transform: scale(.97);
}

/* 5. 危险按钮 hover 统一（红系反馈） */
.btn-mini.btn-danger:hover, .pf-btn.danger:hover, .strat-del:hover {
  background: rgba(255,91,106,.12);
  border-color: #ff5b6a;
  color: #ff6b7a;
  box-shadow: 0 0 12px rgba(255,91,106,.18);
}

/* 6. 统一禁用态 */
.btn-save:disabled, .btn-mini:disabled, .pf-btn:disabled,
.btn-export:disabled, .btn-run:disabled {
  opacity: .5;
  cursor: not-allowed;
  filter: grayscale(.3);
}

/* 7. 顶部菜单栏美化：active 渐变胶囊 + hover 光晕 */
.nav-item:hover {
  color: var(--accent);
  background: rgba(255,138,61,.08);
  border-color: rgba(255,138,61,.2);
  box-shadow: 0 0 12px rgba(255,138,61,.12);
}
.nav-item.active {
  color: #fff;
  background: linear-gradient(120deg, var(--accent), #ffb26b);
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(255,138,61,.32);
}
.nav-item.active:hover {
  color: #fff;
  filter: brightness(1.06);
}

/* 8. 身份胶囊元素字距统一 */
.user-name, .btn-login, .btn-logout { letter-spacing: .3px; }

/* ============================================================
   V6.0 移动端产品化增强层
   1) 汉堡菜单（<600px）：导航折叠为抽屉，避免 7 项堆叠
   2) 表格小屏横滑：数据表最小宽度 + 统一滚动容器
   3) 表单/按钮触控优化：加大热区、输入字号防 iOS 缩放
   4) 结果卡片手机友好：统计网格单列、字体自适应
   5) 安全区适配（刘海屏 / 底部手势条）
   说明：本层为增量覆盖层，仅在小屏生效，桌面端零影响
   ============================================================ */

/* ---------- 汉堡菜单按钮（默认隐藏，<600px 显示） ---------- */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  padding: 8px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
  transition: all .25s cubic-bezier(.22,.8,.36,1);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 599px) {
  .nav-toggle { display: flex; }
  .nav-bar { flex-wrap: nowrap; gap: 10px; position: relative; }
  .nav-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: linear-gradient(180deg, rgba(22,30,40,.98), rgba(13,17,23,.98));
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 10px;
    box-shadow: 0 16px 40px rgba(0,0,0,.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 999;
  }
  .nav-menu.open { display: flex; }
  .nav-menu li { width: 100%; }
  /* V6.5.1 移动端分组：标签作为分组标题，组内项纵向展开 */
  .nav-group { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav-group-items {
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: 100%;
  }
  .nav-item {
    display: block;
    width: 100%;
    padding: 12px 14px;
    font-size: 14px;
    text-align: center;
  }
  .nav-group-label {
    display: block;
    width: 100%;
    margin: 6px 0 2px;
    padding: 4px 8px;
    font-size: 12px;
    opacity: .7;
  }
  .nav-group-label::before { display: none; }
  .nav-group:not(:first-child) .nav-group-label {
    border-top: 1px solid var(--border);
    padding-top: 8px;
    margin-top: 10px;
  }
  .nav-user { margin-left: auto; }
  .nav-brand { min-width: 0; flex: 1; }
}

/* ---------- 表格小屏横滑：卡片化 + 内部滚动 ---------- */
@media (max-width: 599px) {
  .table-scroll,
  .admin-table-wrap,
  .chart-wrap,
  [class*="table-wrap"] {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 10px;
    border: 1px solid var(--border-soft);
    background: rgba(13,17,23,.6);
  }
  .data-table, .admin-table, .trades-table {
    min-width: 560px;   /* 保列宽，容器横滑 */
  }
  .trades-table td, .trades-table th,
  .data-table td, .data-table th,
  .admin-table td, .admin-table th {
    padding: 8px 10px;
    white-space: nowrap;
  }
}

/* ---------- 表单触控优化 ---------- */
@media (max-width: 599px) {
  .form .field { gap: 6px; }
  .form input[type="text"],
  .form input[type="number"],
  .form input[type="date"],
  .form select {
    font-size: 16px;          /* ≥16px 防 iOS 聚焦自动缩放 */
    min-height: 44px;
    padding: 10px 12px;
  }
  .form label { font-size: 13px; }
  .btn-run, .btn-save, .btn-export, .btn-mini, .pf-btn,
  .btn-login, .btn-logout {
    min-height: 44px;         /* 触控热区 ≥44px */
    font-size: 14px;
  }
  .btn-login, .btn-logout { padding: 8px 16px; }
}

/* ---------- 统计卡片手机友好 ---------- */
@media (max-width: 599px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat-card { padding: 12px 10px; }
  .stat-card .stat-value { font-size: 16px; }
  .stat-card .stat-label { font-size: 11px; }
  .panel-title { font-size: 14px; }
  .row { gap: 8px; }
}

/* ---------- 安全区与 iOS 细节 ---------- */
@supports (padding: env(safe-area-inset-bottom)) {
  .app, .page {
    padding-bottom: calc(48px + env(safe-area-inset-bottom));
  }
  .modal-mask { padding-bottom: env(safe-area-inset-bottom); }
}
@media (max-width: 599px) {
  body { overscroll-behavior-y: none; }
  input, select, textarea { border-radius: 10px; }
  .chart-wrap canvas, .chart-wrap svg { max-width: 100%; }
}
