/* ============ 小蓝 · 交易面板主题 ============ */
:root {
  --bg: #f3f5f9;
  --bg2: #e9edf5;
  --card: rgba(255,255,255,.9);
  --card2: #ffffff;
  --border: rgba(17,34,68,.12);
  --text: #1b2230;
  --muted: #6b7488;
  --blue: #2563eb;
  --cyan: #0891b2;
  --green: #16a34a;
  --red: #e11d48;
  --yellow: #d97706;
  --grad: linear-gradient(135deg, #2563eb, #06b6d4);
  --shadow: 0 8px 24px rgba(17,34,68,.12);
  --radius: 16px;
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scrollbar-color: #c4cddb #f3f5f9; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(59,130,246,.12), transparent),
    radial-gradient(900px 400px at -10% 30%, rgba(34,211,238,.07), transparent),
    var(--bg);
  color: var(--text); min-height: 100vh;
}

/* ---- 顶栏 ---- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 18px;
  background: rgba(255,255,255,.85); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 11px; }
.logo {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  font-size: 20px; background: var(--grad); box-shadow: 0 4px 14px rgba(59,130,246,.4);
}
.brand h1 { font-size: 16px; font-weight: 700; letter-spacing: .3px; }
.brand-txt { display: flex; flex-direction: column; gap: 3px; }
.top-right { display: flex; align-items: center; gap: 12px; }
.conn { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.conn .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 8px var(--yellow); }
.conn.online .dot { background: var(--green); box-shadow: 0 0 8px var(--green); }
.conn.offline .dot { background: var(--red); box-shadow: 0 0 8px var(--red); }
.icon-btn {
  background: var(--card2); border: 1px solid var(--border); color: var(--text);
  width: 34px; height: 34px; border-radius: 10px; cursor: pointer; font-size: 15px;
  transition: .2s;
}
.icon-btn:hover { background: #e6ebf3; transform: rotate(180deg); }

/* ---- 布局 ---- */
.layout { display: flex; max-width: 1400px; margin: 0 auto; gap: 20px; padding: 20px 18px 90px; }
.sidebar {
  width: 210px; flex-shrink: 0; position: sticky; top: 76px; height: fit-content;
  display: flex; flex-direction: column; gap: 18px;
}
.menu { display: flex; flex-direction: column; gap: 6px; }
.menu-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border-radius: 12px; color: var(--muted); cursor: pointer; font-size: 14px; font-weight: 500;
  border: 1px solid transparent; transition: .2s; text-decoration: none;
}
.menu-item .mi { font-size: 17px; }
.menu-item:hover { color: var(--text); background: rgba(59,130,246,.08); }
.menu-item.active {
  color: #fff; background: var(--grad); box-shadow: 0 4px 16px rgba(59,130,246,.35);
}
.side-status { padding: 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--card); font-size: 12px; color: var(--muted); display: flex; flex-direction: column; gap: 8px; }
.side-hint { word-break: break-all; line-height: 1.5; }

.content { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.page { display: none; flex-direction: column; gap: 18px; animation: fade .25s ease; }
.page.active { display: flex; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; } }
.page-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.page-head h2 { font-size: 22px; font-weight: 700; }
.page-sub { font-size: 12px; color: var(--muted); }

/* ---- 卡片 ---- */
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow); backdrop-filter: blur(8px);
}
.card h3 { font-size: 15px; color: var(--muted); font-weight: 600; margin-bottom: 12px; }
.sec-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sec-head h3 { margin-bottom: 0; }

/* ---- 账户网格 ---- */
.acc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.acc-main { grid-column: span 2; background: linear-gradient(135deg, rgba(59,130,246,.18), rgba(34,211,238,.08)); }
.label { display: block; font-size: 11px; color: var(--muted); margin-bottom: 6px; letter-spacing: .3px; }
.value { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.value.hero { font-size: 38px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sub { font-size: 12px; color: var(--muted); }
.up { color: var(--green); } .down { color: var(--red); }

/* ---- 统计网格 ---- */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; }
.metric .value { font-size: 20px; }

/* ---- 图表 ---- */
.chart-card .chart-box { position: relative; height: 320px; }
.chart-toggle { display: flex; gap: 6px; }
.tg {
  padding: 5px 12px; font-size: 12px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--card2); color: var(--muted); cursor: pointer; transition: .2s;
}
.tg.active { background: var(--grad); color: #fff; border-color: transparent; }

/* ---- 列表（持仓/信号）---- */
.list { display: flex; flex-direction: column; gap: 10px; }
.empty { color: var(--muted); font-size: 13px; text-align: center; padding: 18px 0; }
.row {
  background: var(--card2); border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
.row .left { min-width: 0; }
.row .sym { font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 7px; }
.row .meta { font-size: 11px; color: var(--muted); margin-top: 4px; line-height: 1.5; }
.row .right { text-align: right; white-space: nowrap; }
.row .amt { font-size: 12px; color: var(--muted); }
.row .pnl { font-weight: 700; font-size: 14px; }
.badge { font-size: 11px; padding: 3px 9px; border-radius: 20px; background: var(--card2); color: var(--muted); border: 1px solid var(--border); white-space: nowrap; }
.badge-running { background: rgba(34,197,94,.15); color: var(--green); border-color: rgba(34,197,94,.4); }
.badge-live { background: rgba(244,63,94,.15); color: var(--red); border-color: rgba(244,63,94,.4); }
.badge-paper { background: rgba(59,130,246,.15); color: var(--cyan); border-color: rgba(59,130,246,.4); }
.badge-stopped { background: rgba(148,163,184,.12); color: var(--muted); }
.badge-long { background: rgba(34,197,94,.12); color: var(--green); }
.badge-short { background: rgba(244,63,94,.12); color: var(--red); }

/* ---- 表格 ---- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 640px; }
.tbl th {
  text-align: left; padding: 10px 12px; color: var(--muted); font-weight: 500; font-size: 12px;
  border-bottom: 1px solid var(--border); background: rgba(233,237,245,.9); white-space: nowrap;
}
.tbl td { padding: 10px 12px; border-bottom: 1px solid rgba(17,34,68,.08); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tbl tr:hover td { background: rgba(59,130,246,.05); }

/* ---- 策略页 ---- */
.desc { font-size: 14px; line-height: 1.8; color: var(--text); }
.desc b { color: var(--cyan); }
.scope { margin-top: 8px; font-size: 12px; color: var(--muted, #8a94a6); padding: 6px 10px; background: rgba(17,34,68,.05); border-radius: 8px; display: inline-block; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.cond-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.cond-list li {
  padding: 10px 13px; border-radius: 10px; background: var(--card2);
  border-left: 3px solid var(--blue); font-size: 13px; line-height: 1.6;
}
.cond-list li b { color: var(--cyan); }
.param-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.param {
  padding: 10px 12px; border-radius: 10px; background: var(--card2); border: 1px solid var(--border);
}
.param .k { font-size: 11px; color: var(--muted); }
.param .v { font-size: 15px; font-weight: 700; color: var(--cyan); margin-top: 3px; font-variant-numeric: tabular-nums; }

/* ---- 底部导航（手机） ---- */
.bottom-nav {
  display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  background: rgba(10,14,26,.92); backdrop-filter: blur(14px);
  border-top: 1px solid var(--border); padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
}
.nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 0; color: var(--muted); font-size: 11px; cursor: pointer; text-decoration: none;
  border-radius: 10px; transition: .2s;
}
.nav-item span { font-size: 19px; }
.nav-item.active { color: var(--cyan); background: rgba(34,211,238,.1); }

/* ============ 响应式 ============ */
@media (max-width: 899px) {
  .sidebar { display: none; }
  .bottom-nav { display: flex; }
  .layout { padding: 14px 12px 100px; }
  .acc-main { grid-column: span 1; }
  .value.hero { font-size: 30px; }
  .two-col { grid-template-columns: 1fr; }
  .chart-card .chart-box { height: 240px; }
  .brand h1 { font-size: 14px; }
}
@media (min-width: 900px) {
  .bottom-nav { display: none; }
}/* ---- 每日盈亏日历 ---- */
.cal-nav { display: flex; align-items: center; gap: 8px; }
.cal-nav .tg { padding: 3px 10px; font-size: 14px; }
.cal-nav span { font-size: 13px; color: var(--text); font-weight: 600; }
.cal-head {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px;
  margin-bottom: 6px;
}
.cal-head span { text-align: center; font-size: 11px; color: var(--muted); padding: 6px 0; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-cell {
  background: var(--card2); border: 1px solid var(--border); border-radius: 10px;
  padding: 6px 4px; min-height: 52px; display: flex; flex-direction: column;
  align-items: center; justify-content: space-between; gap: 4px; transition: .15s;
}
.cal-cell:hover { border-color: var(--blue); }
.cal-blank { background: transparent; border-color: transparent; }
.cal-today { border-color: var(--cyan); box-shadow: 0 0 0 1px var(--cyan); background: rgba(34,211,238,.08); }
.cal-day { font-size: 11px; color: var(--muted); font-weight: 600; }
.cal-today .cal-day { color: var(--cyan); }
.cal-pnl { font-size: 10px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cal-none { font-size: 10px; color: rgba(139,155,184,.4); }
.cal-hint { font-size: 11px; color: var(--muted); margin-top: 10px; text-align: center; }
@media (max-width: 480px) {
  .cal-cell { min-height: 44px; padding: 4px 2px; }
  .cal-pnl { font-size: 9px; }
}

/* ---- 统计分类 Tab ---- */
.stat-tabs { display: flex; gap: 10px; }
.stat-tab {
  padding: 10px 18px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--card2); color: var(--muted); cursor: pointer; font-size: 14px; font-weight: 600;
  transition: .2s;
}
.stat-tab.active { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 4px 14px rgba(59,130,246,.3); }
.hidden { display: none !important; }

/* ---- 策略中心 分级 ---- */
.strat-layout { display: grid; grid-template-columns: 260px 1fr; gap: 18px; align-items: start; }
.strat-side { position: sticky; top: 76px; }
.strat-side .card { display: flex; flex-direction: column; gap: 10px; }
.cat-title { font-size: 12px; color: var(--muted); font-weight: 600; margin: 8px 0 4px; letter-spacing: .5px; }
.strat-item {
  cursor: pointer;
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}
.strat-item:hover { border-color: var(--blue); transform: translateY(-1px); }
.strat-item:not(.active) { opacity: .78; }
.strat-item:not(.active):hover { opacity: 1; }
.badge-default { background: rgba(100,116,139,.15); color: var(--text-dim, #64748b); }
.strat-item {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  border-radius: 10px; background: var(--card2); border: 1px solid var(--border);
}
.strat-item.active { border-color: var(--blue); background: rgba(59,130,246,.1); }
.strat-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 6px var(--green); }
.strat-it-name { flex: 1; font-size: 13px; font-weight: 600; }
.strat-empty { font-size: 12px; color: rgba(139,155,184,.5); padding: 8px 12px; border: 1px dashed var(--border); border-radius: 10px; }
.btn-add {
  margin-top: 8px; padding: 10px; border-radius: 10px; border: 1px dashed var(--blue);
  background: transparent; color: var(--cyan); cursor: pointer; font-size: 13px; transition: .2s;
}
.btn-add:disabled { opacity: .4; cursor: not-allowed; }
@media (max-width: 899px) {
  .strat-layout { grid-template-columns: 1fr; }
  .strat-side { position: static; }
}

.chart-range { font-size: 11px; color: var(--muted, #8a94a6); margin: 4px 0 0; }

/* 顶部做空信号 + 大户监控 */
.short-list .short-row { padding: 8px 10px; border-left: 3px solid #f59e0b; margin-bottom: 6px; }
.badge-short { background: rgba(244,63,94,.15); color: #fb7185; border: 1px solid rgba(244,63,94,.35); }
.badge-short.confirm { background: rgba(239,68,68,.25); color: #fca5a5; }
.table-wrap { overflow-x: auto; }
.mini-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.mini-table th, .mini-table td { padding: 6px 8px; text-align: right; border-bottom: 1px solid rgba(90,120,180,.12); white-space: nowrap; }
.mini-table th { color: var(--muted, #8a94a6); font-weight: 600; }
.mini-table td:first-child { text-align: left; }
.mini-table .empty { text-align: center; color: var(--muted, #8a94a6); padding: 12px; }

/* 候选池 */
.pool-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pool-col h4 { font-size: 12px; color: var(--muted, #8a94a6); margin: 0 0 8px; }
.pool-list { display: flex; flex-wrap: wrap; gap: 6px; min-height: 30px; }
.pool-chip { font-size: 11px; padding: 3px 8px; border-radius: 6px; background: rgba(34,211,238,.1); border: 1px solid rgba(34,211,238,.25); color: var(--text, #e8eef9); }
.pool-chip.chip-watch { background: rgba(245,158,11,.12); border-color: rgba(245,158,11,.35); color: #fcd34d; }
@media (max-width: 700px) { .pool-grid { grid-template-columns: 1fr; } }

/* 币种详情弹窗 */
.pool-chip { cursor: pointer; transition: transform .1s; }
.pool-chip:hover { transform: scale(1.08); }
.badge-watch { background: rgba(245,158,11,.15); color: #fcd34d; border: 1px solid rgba(245,158,11,.35); }
.modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 999; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-box { background: #101a2e; border: 1px solid #2a3a5e; border-radius: 14px; width: 100%; max-width: 420px; max-height: 86vh; overflow-y: auto; padding: 16px; box-shadow: 0 8px 30px rgba(0,0,0,.5); }
.modal-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.modal-head h3 { margin: 0; font-size: 18px; flex: 1; }
.modal-close { background: none; border: none; color: var(--muted, #8a94a6); font-size: 16px; cursor: pointer; }
.modal-price { font-size: 20px; font-weight: 700; color: var(--cyan, #22d3ee); margin-bottom: 10px; }
.modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.cm-item { background: rgba(0,0,0,.2); border-radius: 8px; padding: 8px 10px; }
.cm-k { font-size: 11px; color: var(--muted, #8a94a6); }
.cm-v { font-size: 14px; font-weight: 600; margin-top: 2px; }
.cm-v.up { color: #34d399; } .cm-v.down { color: #fb7185; }
.cm-sig { font-size: 12px; padding: 8px 10px; border-radius: 8px; background: rgba(244,63,94,.08); margin-bottom: 6px; }
.cm-sig.up { background: rgba(52,211,153,.08); }
.cm-sig.muted { background: rgba(0,0,0,.2); color: var(--muted, #8a94a6); }

/* ============ 苹果风精修 ============ */
body { letter-spacing: .01em; }
.card { border-radius: 18px; border: 1px solid rgba(17,34,68,.08); background: rgba(255,255,255,.82); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: 0 2px 12px rgba(0,0,0,.2); }
.sec-head h3 { font-weight: 600; letter-spacing: .01em; }

/* 候选池清单（苹果风列表） */
.pool-card { padding: 6px 0 10px; overflow: hidden; }
.pool-table { display: flex; flex-direction: column; }
.pool-row {
  display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr .8fr;
  align-items: center; gap: 6px;
  padding: 11px 16px; cursor: pointer;
  border-bottom: 1px solid rgba(17,34,68,.06);
  transition: background .15s ease, transform .1s ease;
}
.pool-row:last-child { border-bottom: none; }
.pool-row:active { background: rgba(17,34,68,.05); transform: scale(.99); }
.pool-row:hover { background: rgba(17,34,68,.035); }
.pool-head {
  font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em;
  padding: 8px 16px 6px; cursor: default; border-bottom: 1px solid rgba(17,34,68,.1);
}
.pool-head:hover { background: transparent; }
.pc-sym { display: flex; align-items: center; gap: 6px; font-size: 14px; min-width: 0; }
.pc-sym b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.watch-tag {
  font-style: normal; font-size: 9px; padding: 1px 6px; border-radius: 6px;
  background: rgba(217,119,6,.12); color: #b45309; border: 1px solid rgba(245,158,11,.3);
  white-space: nowrap;
}
.pc-price { font-size: 13px; color: var(--text); font-variant-numeric: tabular-nums; text-align: right; }
.pc-chg, .pc-chg30 { font-size: 12.5px; font-variant-numeric: tabular-nums; text-align: right; font-weight: 500; }
.pc-chg30 { color: var(--muted); }
.pc-chg.up, .pc-chg30.up { color: #34d399; }
.pc-chg.down, .pc-chg30.down { color: #fb7185; }
.pc-dir {
  text-align: center; font-size: 11px; font-weight: 600; padding: 3px 0; border-radius: 8px;
}
.dir-long { color: #34d399; background: rgba(52,211,153,.12); }
.dir-short { color: #fb7185; background: rgba(251,113,133,.12); }
.dir-flat { color: var(--muted); background: rgba(139,155,184,.1); }
.row-watch { background: rgba(217,119,6,.05); }

/* ============ ⭐ 自选雷达 ============ */
.watch-card { margin-top: 16px; }
.watch-search { position: relative; padding: 2px 16px 12px; }
.watch-search input {
  width: 100%; box-sizing: border-box;
  padding: 10px 14px; border-radius: 12px;
  border: 1px solid rgba(17,34,68,.12);
  background: rgba(17,34,68,.05); color: var(--text);
  font-size: 14px; outline: none;
  transition: border .15s, box-shadow .15s, background .15s;
}
.watch-search input::placeholder { color: var(--muted); opacity: .7; }
.watch-search input:focus {
  border-color: var(--blue, #2563eb); background: #fff;
  box-shadow: 0 0 0 3px rgba(37,99,235,.14);
}
.watch-results {
  position: absolute; left: 16px; right: 16px; top: calc(100% - 4px);
  background: rgba(255,255,255,.98); border: 1px solid rgba(17,34,68,.1);
  border-radius: 14px; box-shadow: 0 14px 36px rgba(0,0,0,.18);
  z-index: 60; max-height: 320px; overflow-y: auto;
  display: none; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.watch-results.show { display: block; }
.wr-item {
  display: grid; grid-template-columns: 1fr auto auto auto;
  align-items: center; gap: 10px;
  padding: 9px 12px; cursor: pointer;
  border-bottom: 1px solid rgba(17,34,68,.05);
}
.wr-item:last-child { border-bottom: none; }
.wr-item:hover { background: rgba(17,34,68,.04); }
.wr-item.muted { cursor: default; color: var(--muted); font-size: 12.5px; display: block; text-align: center; padding: 14px; }
.wr-sym { font-weight: 600; font-size: 14px; }
.wr-price { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.wr-chg { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.wr-chg.up { color: #34d399; } .wr-chg.down { color: #fb7185; }
.wr-add {
  font-size: 12px; padding: 4px 10px; border-radius: 8px; border: none;
  background: linear-gradient(135deg, #2563eb, #3b82f6); color: #fff;
  cursor: pointer; font-weight: 600; white-space: nowrap;
  transition: all .15s;
}
.wr-add:hover { filter: brightness(1.08); }
.wr-add.added, .wr-add:disabled {
  background: rgba(52,211,153,.14); color: #059669; cursor: default;
}
.watch-row { grid-template-columns: 1.3fr 1fr 1fr 1fr .8fr .6fr; }
.watch-head { grid-template-columns: 1.3fr 1fr 1fr 1fr .8fr .6fr; }
.pc-del {
  width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 11px; color: var(--muted);
  background: rgba(17,34,68,.06); cursor: pointer;
  transition: all .15s; justify-self: end;
}
.pc-del:hover { background: rgba(251,113,133,.15); color: #fb7185; }
.watch-row.row-fresh { background: rgba(37,99,235,.04); }

/* iOS 风格弹窗 */
.modal-mask { background: rgba(30,40,60,.35); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.modal-box {
  background: rgba(255,255,255,.97); border: 1px solid rgba(17,34,68,.1);
  border-radius: 24px; box-shadow: 0 24px 60px rgba(0,0,0,.5);
  animation: sheetIn .28s cubic-bezier(.2,.8,.2,1);
}
@keyframes sheetIn { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-head h3 { font-weight: 700; font-size: 20px; letter-spacing: .01em; }
.modal-price { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.modal-close { width: 30px; height: 30px; border-radius: 50%; background: rgba(17,34,68,.08); display: grid; place-items: center; transition: background .15s; }
.modal-close:hover { background: rgba(17,34,68,.16); }
.cm-item { background: rgba(17,34,68,.05); border-radius: 12px; padding: 10px 12px; }
.cm-k { font-size: 11px; color: var(--muted); font-weight: 500; }
.cm-v { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cm-sig { border-radius: 12px; padding: 10px 12px; }

/* 移动端适配 */
@media (max-width: 700px) {
  .pool-row { grid-template-columns: 1.2fr .9fr .9fr .9fr .7fr; padding: 11px 12px; gap: 4px; }
  .pc-price { font-size: 12px; }
  .pc-chg, .pc-chg30 { font-size: 11.5px; }
  .pc-dir { font-size: 10px; }
}

/* K线图（亮色） */
.kline-card { padding: 14px 16px; }
.sec-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tf-group { display: flex; gap: 4px; margin-left: auto; }
.tf-btn {
  font-size: 12px; padding: 4px 12px; border-radius: 8px; cursor: pointer;
  background: rgba(17,34,68,.05); color: var(--muted); border: 1px solid transparent;
  transition: all .15s;
}
.tf-btn:hover { background: rgba(17,34,68,.09); }
.tf-btn.active { background: var(--grad); color: #fff; box-shadow: 0 2px 8px rgba(37,99,235,.3); }
.tf-custom {
  width: 62px; font-size: 12px; padding: 4px 8px; border-radius: 8px;
  border: 1px solid rgba(17,34,68,.12); background: rgba(17,34,68,.05);
  color: var(--text); outline: none; text-align: center;
  transition: all .15s; font-variant-numeric: tabular-nums;
}
.tf-custom::placeholder { color: var(--muted); opacity: .6; }
.tf-custom:focus { border-color: var(--blue, #2563eb); background: #fff; box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.tf-custom.tf-custom-active {
  border-color: var(--blue, #2563eb); background: rgba(37,99,235,.08);
  color: var(--blue, #2563eb); font-weight: 600;
}
.tf-custom.tf-invalid { border-color: #fb7185; background: rgba(251,113,133,.08); }
@media (max-width: 700px) {
  .tf-group { flex-wrap: wrap; }
  .tf-custom { width: 58px; }
}
.kline-box { height: 360px; border-radius: 12px; background: rgba(255,255,255,.55); border: 1px solid rgba(17,34,68,.08); margin-top: 10px; overflow: hidden; }
.kline-sym { color: var(--blue); font-weight: 600; }
.kline-info { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; align-items: center; }
.ki-item { background: rgba(17,34,68,.05); border-radius: 10px; padding: 6px 10px; display: flex; flex-direction: column; }
.ki-k { font-size: 10px; color: var(--muted); }
.ki-v { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ki-more { margin-left: auto; font-size: 12px; padding: 6px 12px; border-radius: 10px; background: var(--grad); color: #fff; border: none; cursor: pointer; }
@media (max-width: 700px) { .kline-box { height: 280px; } .ki-more { margin-left: 0; } }

/* 指标切换 + 副图 */
.ind-group { display: flex; align-items: center; gap: 4px; margin-top: 8px; }
.ind-label { font-size: 11px; color: var(--muted); margin-right: 4px; }
.ind-btn { font-size: 11px; padding: 3px 10px; border-radius: 7px; cursor: pointer; background: rgba(17,34,68,.05); color: var(--muted); border: 1px solid transparent; transition: all .15s; }
.ind-btn:hover { background: rgba(17,34,68,.09); }
.ind-btn.active { background: var(--grad); color: #fff; box-shadow: 0 2px 6px rgba(37,99,235,.25); }
.ind-box { height: 120px; border-radius: 12px; background: rgba(255,255,255,.55); border: 1px solid rgba(17,34,68,.08); margin-top: 6px; overflow: hidden; }

/* K线全屏 */
.fs-btn { font-size: 15px; padding: 4px 10px; border-radius: 8px; cursor: pointer; background: rgba(17,34,68,.05); color: var(--muted); border: 1px solid transparent; transition: all .15s; margin-left: auto; }
.fs-btn:hover { background: rgba(17,34,68,.09); color: var(--blue); }
.kline-card.kline-fs {
  position: fixed; inset: 0; z-index: 300;
  background: var(--bg); border-radius: 0; border: none;
  padding: 18px 22px; overflow: auto; backdrop-filter: none;
}
.kline-card.kline-fs .kline-box { height: auto; min-height: 280px; flex: 1 1 auto; margin-top: 12px; }
.kline-card.kline-fs { display: flex; flex-direction: column; }
.kline-card.kline-fs .kline-info { margin-top: 12px; }
@media (max-width: 700px) { .kline-card.kline-fs { padding: 12px 12px; } }

/* 划线工具覆盖层 */
.kline-box { position: relative; }
#draw-canvas { position: absolute; top: 0; left: 0; z-index: 8; pointer-events: none; }
#draw-canvas.drawing { pointer-events: auto; cursor: crosshair; }

/* ============ 信号提醒（铃铛 + 通知中心） ============ */
.bell-btn { position: relative; }
.bell-btn:hover { transform: none; }
.notify-badge {
  position: absolute; top: -5px; right: -5px;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 9px; background: var(--red); color: #fff;
  font-size: 10px; line-height: 16px; font-weight: 700; text-align: center;
  box-shadow: 0 2px 6px rgba(225,29,72,.45);
}
.notify-panel {
  position: fixed; top: 60px; right: 16px; z-index: 120;
  width: 440px; max-width: calc(100vw - 24px);
  max-height: min(72vh, 640px); display: flex; flex-direction: column;
  background: rgba(255,255,255,.97); border: 1px solid var(--border);
  border-radius: 18px; box-shadow: var(--shadow); overflow: hidden;
  backdrop-filter: blur(16px);
}
.notify-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(37,99,235,.06), rgba(6,182,212,.06));
}
.notify-head h3 { font-size: 15px; }
.notify-actions { display: flex; gap: 6px; }
.notify-list { overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.notify-foot { font-size: 11px; color: var(--muted); text-align: center; padding: 8px; border-top: 1px solid var(--border); }
.notify-card {
  border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px;
  background: var(--card2); display: flex; flex-direction: column; gap: 8px;
  transition: .2s; position: relative;
}
.notify-card.n-long { border-left: 3px solid var(--green); }
.notify-card.n-short { border-left: 3px solid var(--red); }
.notify-card.n-watch { border-left: 3px solid #f59e0b; }
.notify-card.n-new { background: linear-gradient(135deg, rgba(37,99,235,.05), rgba(6,182,212,.04)); }
.n-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.n-dir { font-size: 14px; font-weight: 700; }
.n-head b { font-size: 14px; }
.n-time { margin-left: auto; font-size: 11px; color: var(--muted); }
.n-stats { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--muted); }
.n-stats b { color: var(--text); font-variant-numeric: tabular-nums; }
.n-stats.sub { font-size: 11px; }
.n-sec { font-size: 12px; color: var(--text); background: rgba(17,34,68,.04); border-radius: 10px; padding: 8px 10px; }
.n-sec ul { list-style: none; display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.n-sec li { padding-left: 14px; position: relative; line-height: 1.55; }
.n-sec li::before { content: "•"; position: absolute; left: 0; color: var(--blue); font-weight: 700; }
.n-sec.risk { background: rgba(225,29,72,.05); border: 1px solid rgba(225,29,72,.15); }
.n-sec.risk li::before { color: var(--red); }
.n-full pre {
  white-space: pre-wrap; word-break: break-word; font-size: 11px; line-height: 1.6;
  background: #f6f8fb; border: 1px solid var(--border); border-radius: 10px; padding: 10px;
  color: var(--muted); font-family: inherit; max-height: 260px; overflow-y: auto;
}
.n-more { align-self: flex-start; font-size: 11px; padding: 4px 10px; }
@media (max-width: 700px) {
  .notify-panel { top: 54px; right: 8px; left: 8px; width: auto; max-height: 78vh; }
}

/* 实盘信号命中率 */
.hits-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.hit-cell { background: var(--bg, #f6f8fb); border: 1px solid var(--line, #e5e9f0); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.hit-cell span { font-size: 11px; color: var(--muted, #7a8499); }
.hit-cell b { font-size: 15px; }
.hit-paths { display: flex; flex-direction: column; gap: 6px; }
.hit-row { display: flex; align-items: center; justify-content: space-between; background: var(--bg, #f6f8fb); border-radius: 8px; padding: 6px 10px; font-size: 12px; }
.hit-row .hit-tag { font-weight: 600; }
.hint { font-size: 11px; color: var(--muted, #8a94a8); margin-top: 8px; }

/* TradingView 风格画线工具栏 */
.draw-sep { width: 1px; height: 18px; background: var(--line, #e5e9f0); margin: 0 4px; display: inline-block; vertical-align: middle; }
.draw-colors { display: inline-flex; gap: 4px; align-items: center; margin: 0 4px; }
.draw-colors .dc { width: 16px; height: 16px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; }
.draw-colors .dc.active { border-color: #111; transform: scale(1.15); }
.ind-btn.active { background: #2563eb; color: #fff; }

/* 持仓建议卡片（当前交易页） */
.pos-row { flex-wrap: wrap; }
.pos-advice { flex-basis: 100%; margin-top: 6px; padding: 8px 10px; border-radius: 10px; font-size: 12px; border: 1px solid; box-sizing: border-box; }
.pos-advice .adv-head { font-weight: 600; display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.pos-advice .adv-score { font-weight: 400; font-size: 11px; opacity: .75; }
.pos-advice .adv-reasons { margin-top: 5px; line-height: 1.55; opacity: .9; }
.tone-ok { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.tone-warn { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.tone-danger { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.tone-neutral { background: #f8fafc; border-color: #e2e8f0; color: #334155; }

/* 菜单/底栏 未读角标 */
.menu-item, .nav-item { position: relative; }
.menu-badge { position: absolute; top: 4px; right: 8px; min-width: 16px; height: 16px; line-height: 16px; padding: 0 4px;
  border-radius: 9px; background: #ef4444; color: #fff; font-size: 10px; text-align: center; }
.nav-item .menu-badge { top: 2px; right: 2px; }

/* 信号提醒页大卡片 */
.alerts-list .notify-card.alert-card { border-left: 5px solid; padding: 14px 16px; border-radius: 14px; margin-bottom: 10px; }
.alerts-list .notify-card.alert-card.n-long { border-left-color: #16a34a; }
.alerts-list .notify-card.alert-card.n-short { border-left-color: #dc2626; }
.alerts-list .notify-card.alert-card .n-head { font-size: 16px; }
.alerts-list .notify-card.alert-card .n-head b { font-size: 17px; }
.alerts-list .notify-card.alert-card .n-stats { font-size: 13px; }
.alerts-list .notify-card.alert-card .n-full pre { white-space: pre-wrap; font-family: inherit; font-size: 12.5px; background: rgba(17,34,68,.04); border-radius: 8px; padding: 10px; margin-top: 8px; }

/* 新信号顶部弹窗横幅 */
.signal-toast { position: fixed; top: 12px; left: 50%; transform: translateX(-50%) translateY(-140%); z-index: 9999;
  width: min(420px, calc(100vw - 24px)); padding: 12px 14px; border-radius: 14px; cursor: pointer;
  box-shadow: 0 8px 30px rgba(0,0,0,.18); transition: transform .35s cubic-bezier(.2,.8,.3,1.1); }
.signal-toast.show { transform: translateX(-50%) translateY(0); }
.signal-toast.toast-long { background: #f0fdf4; border: 1px solid #86efac; }
.signal-toast.toast-short { background: #fef2f2; border: 1px solid #fca5a5; }
.signal-toast.toast-short { background: #fef2f2; border: 1px solid #fca5a5; }
.n-dir.mid { color: #b45309; }
.signal-toast.toast-watch { background: #fffbeb; border: 1px solid #fcd34d; }
.signal-toast .toast-title { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.signal-toast .toast-meta { margin-top: 4px; font-size: 12.5px; color: #475569; }
.signal-toast .toast-hint { margin-top: 4px; font-size: 11px; opacity: .7; }

/* 做单建议搜索 */
.advice-search { display: flex; gap: 8px; margin-bottom: 10px; }
.advice-search input { flex: 1; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line, #e5e9f0); font-size: 14px; background: var(--bg, #f8fafc); }
.advice-search .btn-add { padding: 10px 18px; border-radius: 10px; }
.advice-result .adv-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; border-radius: 12px; border: 1px solid; }
.advice-result .adv-head .adv-sym { font-size: 16px; font-weight: 700; }
.advice-result .adv-head .adv-conf { margin-left: auto; font-size: 12px; opacity: .8; }
.advice-result .tone-ok { background: #ecfdf5; border-color: #a7f3d0; }
.advice-result .tone-warn { background: #fffbeb; border-color: #fde68a; }
.advice-result .tone-danger { background: #fef2f2; border-color: #fecaca; }
.advice-result .tone-neutral { background: #f8fafc; border-color: #e2e8f0; }
.adv-confbar { height: 6px; border-radius: 3px; background: #e2e8f0; margin: 8px 0; overflow: hidden; }
.adv-confbar i { display: block; height: 100%; background: linear-gradient(90deg,#3b82f6,#2563eb); border-radius: 3px; }
.adv-metrics { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin-bottom: 10px; }
.adv-metrics .am { background: var(--bg, #f8fafc); border: 1px solid var(--line, #eef1f6); border-radius: 10px; padding: 7px 9px; display: flex; flex-direction: column; gap: 2px; }
.adv-metrics .am span { font-size: 11px; color: var(--muted, #7a8499); }
.adv-metrics .am b { font-size: 13px; font-weight: 600; }
.adv-summary { margin: 8px 0; padding: 9px 11px; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 10px; font-size: 13px; color: #1e40af; line-height: 1.55; }
.adv-plan { margin-bottom: 10px; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.plan-grid .pc { background: var(--bg, #f6f8fb); border: 1px solid var(--line, #e5e9f0); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.plan-grid .pc span { font-size: 11px; color: var(--muted, #7a8499); }
.plan-grid .pc b { font-size: 12.5px; font-weight: 600; line-height: 1.5; }
.plan-watch { display: flex; flex-direction: column; gap: 6px; }
.plan-watch .pw { padding: 8px 10px; background: var(--bg, #f8fafc); border: 1px solid var(--line, #eef1f6); border-radius: 10px; font-size: 12.5px; }
.adv-sec { margin: 8px 0; }
.adv-sec > b { font-size: 12.5px; display: block; margin-bottom: 4px; }
.adv-sec.risk > b { color: #b45309; }
.adv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 8px; }
.adv-cell { background: var(--bg, #f6f8fb); border: 1px solid var(--line, #e5e9f0); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.adv-cell span { font-size: 11px; color: var(--muted, #7a8499); }
.adv-cell b { font-size: 13px; }
.adv-reasons { list-style: none; padding: 0; margin: 0; font-size: 12.5px; line-height: 1.7; color: #334155; }
.adv-reasons li { padding: 3px 0; border-bottom: 1px dashed var(--line, #eef1f6); }
.adv-reasons li:last-child { border-bottom: none; }

/* 详细分析区 */
.tf-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.tf-chip { padding: 4px 9px; border-radius: 999px; background: var(--bg, #f1f5f9); border: 1px solid var(--line, #e2e8f0); font-size: 11.5px; font-weight: 600; }
.an-row { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; padding: 6px 0; border-bottom: 1px dashed var(--line, #eef1f6); align-items: baseline; }
.an-row:last-child { border-bottom: none; }
.an-row .ma-vals { font-size: 11.5px; color: var(--muted, #64748b); }
.scen-wrap { display: flex; flex-direction: column; gap: 6px; }
.scenario { padding: 8px 10px; border-radius: 10px; font-size: 12.5px; border: 1px solid; line-height: 1.55; }
.scenario.sc-long { background: #f0fdf4; border-color: #bbf7d0; color: #14532d; }
.scenario.sc-short { background: #fef2f2; border-color: #fecaca; color: #7f1d1d; }
.adv-reasons em { font-style: normal; opacity: .75; font-size: 11.5px; }

/* ---------- 趋势反转强提示（交易页持仓） ---------- */
@keyframes rev-blink { 0%,100% { opacity: 1; } 50% { opacity: 0.45; } }
.rev-confirmed { border: 2px solid #dc2626 !important; background: #fff5f5 !important; animation: rev-blink 1.2s infinite; }
.rev-warn { border: 1.5px solid #f59e0b !important; background: #fffbeb !important; }
.rev-banner { padding: 8px 12px; border-radius: 8px; font-weight: 600; margin-bottom: 8px; font-size: 13px; }
.rev-banner-danger { background: #dc2626; color: #fff; animation: rev-blink 1.2s infinite; }
.rev-banner-warn { background: #f59e0b; color: #fff; }
.trade-alert { display: none; padding: 12px 16px; border-radius: 10px; margin-bottom: 12px; font-size: 14px; font-weight: 600; }
.trade-alert.alert-danger { background: #dc2626; color: #fff; animation: rev-blink 1.1s infinite; box-shadow: 0 2px 12px rgba(220,38,38,.35); }
.trade-alert.alert-warn { background: #f59e0b; color: #fff; }
.trade-alert .alert-icon { font-size: 18px; margin-right: 6px; }
.trade-alert .alert-hint { opacity: .9; font-weight: 400; font-size: 12px; margin-left: 6px; }

/* 测试警报按钮 + 模拟卡 */
.btn-test-alert {
  margin-left: auto; padding: 6px 14px; font-size: 13px; font-weight: 600;
  border: none; border-radius: 999px; cursor: pointer;
  color: #fff; background: linear-gradient(135deg, #f59e0b, #ef4444);
  box-shadow: 0 3px 10px rgba(239,68,68,.3); transition: transform .15s;
}
.btn-test-alert:active { transform: scale(.95); }
.test-sim-wrap { margin-bottom: 10px; }

