:root {
  --bg: #0a0e17;
  --bg2: rgba(18, 23, 34, .88);
  --bg3: #1b2334;
  --border: #26304a;
  --fg: #e6edf3;
  --dim: #8b949e;
  --green: #3fb950;
  --red: #f85149;
  --yellow: #d29922;
  --blue: #58a6ff;
  --purple: #bc8cff;
  --accent: #4f8cff;
  --alert-bg: rgba(248, 81, 73, 0.12);
  --warn-bg: rgba(210, 153, 34, 0.10);
}

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

body {
  background:
    radial-gradient(1100px 600px at 85% -10%, rgba(79, 140, 255, .07), transparent 60%),
    radial-gradient(900px 500px at -5% 110%, rgba(188, 140, 255, .05), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--fg);
  font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
  font-size: 15px;
}

/* 深色滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg3); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--border); }

header {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 20px;
  height: 52px;
  background: linear-gradient(180deg, #131a28, #0f1420);
  border-bottom: 1px solid rgba(79, 140, 255, .22);
  box-shadow: 0 1px 12px rgba(0, 0, 0, .35);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  display: flex; align-items: center; gap: 8px;
  font-size: 17px;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: .5px;
}
.brand span {
  background: linear-gradient(90deg, #6fb0ff, #46e6d0);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand-logo {
  width: 20px; height: 20px; flex: none;
  filter: drop-shadow(0 0 6px rgba(79,140,255,.5));
}

nav { display: flex; gap: 4px; flex: 1; }

.tab {
  position: relative;
  background: none;
  border: none;
  color: var(--dim);
  font-size: 14px;
  padding: 8px 16px;
  cursor: pointer;
  border-radius: 6px;
}
.tab:hover { color: var(--fg); background: var(--bg3); }
.tab.active { color: var(--fg); background: var(--bg3); font-weight: 600; }
.tab.active::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

#symbol-search {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--fg);
  padding: 6px 12px;
  width: 160px;
  font-size: 13px;
}
#symbol-search:focus { outline: none; border-color: var(--blue); }

.conn { font-size: 12px; color: var(--dim); white-space: nowrap; }
.conn.ok { color: var(--green); }
.conn.bad { color: var(--red); }

main { padding: 22px 44px; max-width: 1760px; margin: 0 auto; }

.view { display: none; }
.view.active { display: block; }

h2 {
  font-size: 16px; color: var(--dim); margin: 22px 0 10px; font-weight: 600;
  display: flex; align-items: center; gap: 12px;
}
h2::before {
  content: "";
  width: 3px;
  height: 14px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--accent), rgba(79, 140, 255, .2));
  flex: none;
}
h2:first-child { margin-top: 0; }

.filters select {
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--fg);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 12.5px;
  margin-left: 6px;
}

/* ── 数据源卡片 ── */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.card {
  background: linear-gradient(180deg, rgba(27, 35, 52, .5), rgba(18, 23, 34, .85));
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  transition: border-color .15s;
}
.card:hover { border-color: rgba(79, 140, 255, .35); }
.card .name { font-weight: 600; margin-bottom: 6px; }
.card .meta { font-size: 12px; color: var(--dim); display: flex; justify-content: space-between; }
.card .err { font-size: 11.5px; color: var(--red); margin-top: 6px; word-break: break-all; }
.card .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.dot.ok { background: var(--green); }
.dot.stale { background: var(--yellow); }
.dot.dead { background: var(--red); }

/* ── 事件流 ── */
.events { display: flex; flex-direction: column; gap: 6px; }
.event {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--dim);
  border-radius: 6px;
  padding: 8px 10px;
  cursor: pointer;
  font-size: 13.5px;
  transition: border-color .15s;
}
.event:hover { border-color: rgba(79, 140, 255, .4); }
.event.sev-high { border-left-color: var(--red); }
.event.sev-medium { border-left-color: var(--yellow); }
.event.sev-info { border-left-color: var(--blue); }
.event.sev-ops { border-left-color: var(--purple); }
.event .head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.event .title { font-weight: 600; flex: 1; min-width: 200px; }
.badge {
  font-size: 10.5px; padding: 1px 7px; border-radius: 10px;
  background: var(--bg3); color: var(--dim); white-space: nowrap;
}
.badge.sym { color: var(--blue); cursor: pointer; }
.badge.sym:hover { text-decoration: underline; }
.event .time { font-size: 12px; color: var(--dim); white-space: nowrap; }
.event .detail {
  display: none;
  margin-top: 10px;
  border-top: 1px dashed var(--border);
  padding-top: 10px;
}
.event.open .detail { display: block; }
.metric-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.chip {
  background: var(--bg3);
  border-radius: 6px;
  font-size: 12px;
  padding: 3px 10px;
  color: var(--dim);
}
.chip b { color: var(--fg); font-weight: 600; margin-left: 4px; }
.chip b.pos { color: var(--green); }
.chip b.neg { color: var(--red); }
.empty { color: var(--dim); padding: 16px; text-align: center; }

/* ── 表格 ── */
table { width: 100%; border-collapse: collapse; background: var(--bg2); border-radius: 8px; overflow: hidden; }
thead th {
  text-align: right;
  padding: 10px 12px;
  font-size: 12.5px;
  color: var(--dim);
  background: var(--bg3);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
thead th:first-child { text-align: left; }
thead th.sorted { color: var(--blue); }
tbody td { text-align: right; padding: 9px 12px; border-top: 1px solid var(--border); white-space: nowrap; font-variant-numeric: tabular-nums; }
tbody td.left { text-align: left; font-weight: 400; }
tbody td:first-child { text-align: left; font-weight: 600; }
tbody td:first-child { cursor: pointer; }
tbody tr:nth-child(even) { background: rgba(132, 142, 156, .035); }
tbody tr:hover { background: var(--bg3); }
tbody tr.warn { background: var(--warn-bg); }
tbody tr.hot { background: var(--alert-bg); }
tbody tr.selected { outline: 1px solid var(--blue); outline-offset: -1px; }

.pos { color: var(--green); }
.neg { color: var(--red); }
.dim { color: var(--dim); }

/* 涨跌幅胶囊（coinglass 风格） */
.pill {
  display: inline-block;
  min-width: 62px;
  padding: 2px 8px;
  border-radius: 6px;
  text-align: center;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.pill.pos { background: rgba(63, 185, 80, .13); }
.pill.neg { background: rgba(248, 81, 73, .13); }
.pill.dim { background: rgba(132, 142, 156, .10); }
.pill.role-admin { min-width: 0; color: var(--accent);
  background: rgba(79, 140, 255, .14); border: 1px solid rgba(79, 140, 255, .4); }
.pill.role-view { min-width: 0; color: var(--dim);
  background: rgba(132, 142, 156, .10); border: 1px solid var(--border); }

/* 排行类表格：序号列弱化 */
.rank-table td:first-child { color: var(--dim); font-weight: 400; width: 44px; cursor: default; }

/* 回撤进度条 */
.dd-cell { text-align: left; width: 42%; }
.dd-bar {
  position: relative;
  height: 18px;
  min-width: 220px;
  background: rgba(132, 142, 156, .10);
  border-radius: 5px;
  overflow: hidden;
}
.dd-fill { height: 100%; border-radius: 5px; transition: width .4s ease; }
.dd-fill.ok   { background: linear-gradient(90deg, rgba(63, 185, 80, .55), rgba(63, 185, 80, .85)); }
.dd-fill.mid  { background: linear-gradient(90deg, rgba(210, 153, 34, .55), rgba(210, 153, 34, .9)); }
.dd-fill.deep { background: linear-gradient(90deg, rgba(248, 81, 73, .55), rgba(248, 81, 73, .9)); }
.dd-val {
  position: absolute;
  right: 7px;
  top: 0;
  line-height: 18px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--fg);
}
.dd-tick {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(230, 237, 243, .22);
  pointer-events: none;
}

/* 告警档位徽标 */
.dd-badge {
  display: inline-block;
  min-width: 100px;
  padding: 2px 9px;
  border-radius: 10px;
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  background: rgba(132, 142, 156, .10);
  color: var(--dim);
  white-space: nowrap;
}
.dd-badge.near { background: rgba(210, 153, 34, .16); color: var(--yellow); font-weight: 600; }
.dd-badge.hit  { background: rgba(248, 81, 73, .16); color: var(--red); font-weight: 600; }
.dd-badge.deep { background: rgba(248, 81, 73, .08); color: var(--dim); }
/* 30 日内曾出现的最深回撤附注（比当前更深时才显示） */
.dd-badge.histmax {
  min-width: 0;
  margin-left: 5px;
  background: rgba(188, 140, 255, .10);
  color: var(--purple);
}
.dd-badges { white-space: nowrap; }

/* 逼近下一档（差 ≤2%）行高亮；贴线区（-30~-35%）行淡红 */
tr.dd-near td { background: rgba(210, 153, 34, .05); }
tr.dd-hit td  { background: rgba(248, 81, 73, .05); }
tr.dd-deepzone td { opacity: .75; }

/* 深水区折叠行 */
.dd-fold-row td {
  cursor: pointer;
  text-align: left !important;
  color: var(--dim);
  padding: 10px 12px;
  user-select: none;
  border-top: 1px dashed var(--border);
}
.dd-fold-row:hover td { color: var(--fg); background: rgba(132, 142, 156, .06); }

/* ── 子标签 ── */
.subtabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.subtab {
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--dim);
  padding: 6px 14px;
  border-radius: 16px;
  cursor: pointer;
  font-size: 13px;
}
.subtab:hover { color: var(--fg); }
.subtab.active {
  color: var(--fg);
  background: var(--bg3);
  border-color: var(--accent);
  box-shadow: 0 0 8px rgba(79, 140, 255, .25);
}
.subtab .cnt { font-size: 11px; color: var(--blue); margin-left: 4px; }
/* 页签热度徽章：🔥N=池内触发阈值的币数，指数页签用于 B 组计数 */
.subtab .fire {
  font-size: 11px;
  color: #ff9d4d;
  font-weight: 700;
  margin-left: 4px;
}
/* ── 宏观周期：MVRV Z-Score 仪表 ── */
.mvrv-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 20px;
  align-items: center;
  background: linear-gradient(160deg, rgba(27, 35, 52, .45), rgba(18, 23, 34, .85));
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 14px;
}
.mvrv-now { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.mvrv-z { font-size: 38px; font-weight: 800; font-variant-numeric: tabular-nums; }
.mvrv-z.pos { color: var(--green, #3fb950); }
.mvrv-z.neg { color: var(--red, #f85149); }
.mvrv-z.dim { color: var(--fg); }
.mvrv-zone { font-size: 13px; }
.mvrv-bar {
  position: relative;
  height: 12px;
  border-radius: 6px;
  background: rgba(132, 142, 156, .18);
  overflow: hidden;
}
.mvrv-band { position: absolute; top: 0; bottom: 0; }
.mvrv-band.bot { left: 0; background: rgba(63, 185, 80, .32); }
.mvrv-band.top { right: 0; background: rgba(248, 81, 73, .32); }
.mvrv-cursor {
  position: absolute;
  top: -3px;
  width: 3px;
  height: 18px;
  margin-left: -1px;
  background: #fff;
  border-radius: 2px;
  box-shadow: 0 0 6px rgba(255, 255, 255, .8);
}
.mvrv-scale { display: flex; justify-content: space-between; font-size: 11px; margin-top: 6px; }
.mvrv-desc { font-size: 12.5px; line-height: 1.7; }
.mvrv-desc .pos { color: var(--green, #3fb950); }
.mvrv-desc .neg { color: var(--red, #f85149); }
@media (max-width: 900px) { .mvrv-head { grid-template-columns: 1fr; } }
/* MVRV 历史图上的红区/绿区背景带（浅色覆盖层，贴合固定 0~10 轴） */
#mvrv-chart { position: relative; }
.mvrv-bands { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.mvrv-bands span { position: absolute; left: 0; right: 0; display: block; }
.mvrv-bands .mz-red { background: rgba(248, 81, 73, .10); }
.mvrv-bands .mz-green { background: rgba(63, 185, 80, .10); }

/* ── 成交统计：币安全市场成交量 4 图 ── */
.bvol-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 1100px) { .bvol-grid { grid-template-columns: 1fr; } }
.bvol-panel {
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,.015), rgba(255,255,255,0));
  overflow: hidden;
}
/* 每张图左上角一道同色渐隐光带，区别于参考站的纯色标题，更有科技感 */
.bvol-panel::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--bvc, #4f8cff), transparent 60%);
  opacity: .8;
}
.bvol-panel .ptitle {
  font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 8px;
  letter-spacing: .3px;
}
.bvol-panel .bvol-dot {
  width: 10px; height: 10px; border-radius: 3px; display: inline-block;
  box-shadow: 0 0 8px currentColor;
}
.bvol-chart { position: relative; width: 100%; height: 300px; min-height: 300px; }
/* 指针悬浮详情框 */
.bvol-tip {
  position: absolute; z-index: 5; pointer-events: none;
  background: rgba(18, 22, 30, .92); border: 1px solid var(--border);
  border-radius: 6px; padding: 7px 9px; font-size: 12px; line-height: 1.7;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .4); white-space: nowrap;
}
.bvol-tip .bt-d { color: var(--dim); font-size: 11px; margin-bottom: 2px; }
.bvol-tip .bt-r { display: flex; align-items: center; gap: 6px; }
.bvol-tip .bt-r i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.bvol-tip .bt-r b { margin-left: 4px; font-weight: 700; }

/* 图外图例：置于图表容器上方，标签移出绘图区，避免遮挡 K 线/曲线 */
.chart-legend {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 6px 16px; padding: 6px 2px 8px; font-size: 12px; line-height: 1.4;
}
.chart-legend .cl-item { display: inline-flex; align-items: center; gap: 6px; color: var(--dim); }
.chart-legend .cl-item i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.chart-legend .cl-item b {
  color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; margin-left: 2px;
}

/* 「持仓池聚合」页签上的 展开/缩放 高亮小标 */
.subtab .fold-hint {
  display: inline-block;
  font-size: 11px;
  line-height: 1;
  margin-left: 6px;
  padding: 3px 8px;
  border-radius: 8px;
  background: rgba(79, 140, 255, .18);
  border: 1px solid rgba(79, 140, 255, .45);
  color: var(--accent);
  font-weight: 700;
}
.subtab:hover .fold-hint { background: rgba(79, 140, 255, .3); }
/* 持仓池家族 与 指数成分 之间的分隔线 */
.subtab-divider {
  display: inline-block;
  width: 1px;
  height: 20px;
  background: var(--border);
  margin: 0 6px;
  vertical-align: middle;
  align-self: center;
}
/* 指数成分页签：风险橙描边，与普通持仓池区分 */
.subtab.idx-tab { border-color: rgba(227, 131, 65, .55); }
.subtab.idx-tab.active {
  border-color: #e38341;
  box-shadow: 0 0 8px rgba(227, 131, 65, .3);
}
.subtab .reddot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  margin-left: 5px;
  vertical-align: 1px;
  animation: reddot-pulse 1.6s ease-in-out infinite;
}
@keyframes reddot-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}
/* 聚合"全部"表的所属池徽章 */
.pool-badge {
  display: inline-block;
  font-size: 11px;
  line-height: 1;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--pb, #8b95a7);
  color: var(--pb, #8b95a7);
  white-space: nowrap;
}

.updated { font-size: 12px; color: var(--dim); margin: 8px 2px; }


/* ── 内容 + 告警侧栏双列布局 ── */
.split.no-side { grid-template-columns: minmax(0, 1fr); }
.split.no-side .side-col { display: none; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(300px, 22vw, 360px);
  gap: 20px;
  align-items: start;
}
.side-col {
  position: sticky;
  top: 64px;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  padding-right: 2px;
}
.side-col h2 { margin-top: 0; }
.side-col .event .title { min-width: 120px; }

/* ── 内联编辑控件（自选币种 / 筛选参数） ── */
.inline-form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 8px 0 12px;
  font-size: 13px;
  color: var(--dim);
}
.inline-form input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--fg);
  padding: 5px 10px;
  font-size: 13px;
  width: 150px;
}
.inline-form input.num { width: 90px; text-align: right; }
.inline-form input:focus { outline: none; border-color: var(--blue); }
.inline-form button {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--fg);
  border-radius: 6px;
  padding: 5px 14px;
  cursor: pointer;
  font-size: 13px;
}
.inline-form button:hover { border-color: var(--blue); }
.inline-form .hint { font-size: 12px; color: var(--yellow); }

.sym-del {
  color: var(--dim);
  cursor: pointer;
  margin-left: 8px;
  font-size: 12px;
  padding: 0 4px;
}
.sym-del:hover { color: var(--red); }

/* ── K 线图容器 ── */
.tvchart { width: 100%; min-height: 260px; position: relative; }

.iv-btns { display: inline-flex; gap: 4px; margin-left: 12px; vertical-align: middle; }
.iv-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--dim);
  border-radius: 5px;
  padding: 2px 9px;
  font-size: 12px;
  cursor: pointer;
}
.iv-btn:hover { color: var(--fg); }
.iv-btn.active {
  color: #f0b90b;
  border-color: #f0b90b;
  background: rgba(240,185,11,.08);
}

/* ── 黑名单 ── */
.inline-form input.wide { width: 110px; text-align: right; }

/* Arkham 分方向门槛编辑 */
.ak-th-form label.ak-th { display: inline-flex; align-items: center; gap: 6px; color: var(--fg); }
.ak-th-form input { width: 72px; text-align: right; }

/* ── 价差与异动 / 资金流 ── */
.card .big {
  font-size: 25px;
  font-weight: 700;
  margin: 6px 0;
  font-variant-numeric: tabular-nums;
}

/* Coinbase 溢价卡片 */
.premium-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}
.premium-card {
  background: linear-gradient(160deg, rgba(27, 35, 52, .65), rgba(18, 23, 34, .9));
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  transition: border-color .15s, transform .15s;
}
.premium-card:hover { border-color: rgba(79, 140, 255, .40); transform: translateY(-1px); }
.pc-head { display: flex; align-items: center; gap: 8px; }
.pc-head .coin-ico { width: 22px; height: 22px; border-radius: 50%; }
/* 实时价指示灯：收到 WS tick 时点亮，断流 6 秒熄灭（固定尺寸，不引起重排） */
.pc-head .live-dot {
  width: 7px; height: 7px; border-radius: 50%; flex: none;
  background: var(--dim); opacity: .3;
  transition: background .3s, opacity .3s, box-shadow .3s;
}
.premium-card.live .live-dot {
  background: var(--green); opacity: 1;
  box-shadow: 0 0 6px rgba(63, 185, 80, .8);
}
.pc-coin { font-size: 15px; font-weight: 700; }
.pc-sub { font-size: 11.5px; color: var(--dim); margin-left: auto; }
.pc-val {
  font-size: 30px;
  font-weight: 700;
  margin: 10px 0 12px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .5px;
}
.pc-val .pc-unit { font-size: 15px; font-weight: 600; margin-left: 5px; opacity: .75; }
.pc-rows { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pc-rows.cols4 { grid-template-columns: repeat(4, 1fr); }
.pc-rows > div {
  background: rgba(132, 142, 156, .07);
  border-radius: 8px;
  padding: 7px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.pc-rows.cols2 { grid-template-columns: repeat(2, 1fr); }
.pc-rows span { font-size: 11px; color: var(--dim); }
.pc-rows b { font-size: 13px; font-variant-numeric: tabular-nums; font-weight: 600; }

/* Arkham 一个交易所一块（一行一个，品牌色徽标 + 事件流） */
#ak-groups {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 6px;
}
.ak-block {
  background: linear-gradient(160deg, rgba(27, 35, 52, .55), rgba(18, 23, 34, .9));
  border: 1px solid var(--border);
  border-top: 2px solid var(--exc, var(--border));
  border-radius: 12px;
  padding: 12px 16px 8px;
  transition: border-color .15s;
}
.ak-block:hover { border-color: var(--exc, var(--blue)); border-top-color: var(--exc); }
.ak-head {
  display: flex; align-items: center; gap: 9px;
  padding-bottom: 9px; border-bottom: 1px solid var(--border);
}
.ak-badge {
  width: 26px; height: 26px; border-radius: 8px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px; color: #10141d;
  background: var(--exc, var(--bg3));
}
.ak-name { font-weight: 700; font-size: 15px; letter-spacing: .2px; }
.tw-name { cursor: text; }
body.readonly .tw-name { cursor: default; }
.tw-name-edit {
  background: var(--bg3);
  border: 1px solid var(--blue);
  color: var(--fg);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 14px;
  width: 220px;
  max-width: 60vw;
  outline: none;
}
.ak-sub { font-size: 12px; }
.ak-cnt {
  margin-left: auto; font-size: 12px; font-weight: 600;
  color: var(--exc, var(--dim));
  background: rgba(132, 142, 156, .10);
  border-radius: 20px; padding: 2px 10px;
}
.ak-empty { padding: 18px 2px 14px; font-size: 12.5px; }
.ak-list { display: flex; flex-direction: column; }
.ak-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 2px; cursor: pointer;
  border-bottom: 1px solid rgba(48, 58, 80, .45);
}
.ak-item:last-child { border-bottom: none; }
.ak-item:hover { background: rgba(88, 166, 255, .05); }
.ak-item .coin-avatar,
.ak-item .coin-avatar img { width: 26px; height: 26px; flex: none; }
.ak-mid { min-width: 0; flex: 1; }
.ak-l1 { display: flex; align-items: center; gap: 7px; }
.ak-l1 b { font-size: 13.5px; }
.ak-l1 .pill { min-width: 0; font-size: 11.5px; padding: 1px 8px; }
.ak-chain {
  font-size: 11px; color: var(--dim);
  background: rgba(132, 142, 156, .12);
  border-radius: 5px; padding: 1px 7px;
}
/* 跳转 Arkham 提示箭头：悬浮该笔转账时出现 */
.ak-link { color: var(--blue); font-size: 12px; opacity: 0; transition: opacity .12s; }
.ak-item:hover .ak-link { opacity: 1; }
/* 单交易所换页（每页 10 条） */
.ak-pager {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 8px 0 4px;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}
.ak-pg {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--fg);
  padding: 3px 12px;
  font-size: 12.5px;
  cursor: pointer;
}
.ak-pg:hover:not([disabled]) { border-color: var(--blue); color: var(--blue); }
.ak-pg[disabled] { opacity: .35; cursor: default; }
.ak-l2 {
  font-size: 11.5px; margin-top: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ak-arrow { color: var(--blue); margin: 0 2px; }
.ak-right { text-align: right; flex: none; }
.ak-usd { font-size: 14.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ak-time { font-size: 11px; margin-top: 2px; }

/* ── 指数成分池：A/B 分组 + 成分权重堆叠条 ── */
.idx-group {
  background: linear-gradient(160deg, rgba(27, 35, 52, .45), rgba(18, 23, 34, .85));
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px 14px;
  margin-bottom: 16px;
}
.idx-group.idx-b { border-top: 2px solid var(--red); }
.idx-group.idx-a { border-top: 2px solid var(--blue); }
.idx-gtitle {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; font-weight: 700;
  padding-bottom: 9px; margin-bottom: 4px;
  border-bottom: 1px solid var(--border);
}
.idx-gtitle .ak-cnt { margin-left: auto; }
.idx-table td { vertical-align: middle; }
.idx-const-td { min-width: 260px; max-width: 420px; }
.idx-bar {
  display: flex;
  height: 12px;
  border-radius: 4px;
  overflow: hidden;
  background: rgba(132, 142, 156, .12);
}
.ib-seg { display: block; height: 100%; min-width: 2px; }
.idx-lbls {
  display: flex; flex-wrap: wrap; gap: 4px 10px;
  margin-top: 4px;
  font-size: 11px; color: var(--dim);
}
.ib-lbl { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.ib-lbl i {
  width: 7px; height: 7px; border-radius: 2px; display: inline-block;
}
/* 24h 内的成分变化标注：新增白描边、权重变化黄描边、移除红色划线 */
.ib-seg.ib-new { box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .9); }
.ib-seg.ib-mod { box-shadow: inset 0 0 0 1.5px rgba(227, 179, 65, .95); }
.ib-lbl.ib-lnew { color: var(--green, #3fb950); font-weight: 700; }
.ib-lbl.ib-lmod { color: #e3b341; font-weight: 700; }
.ib-lbl.ib-lrm { color: var(--red, #f85149); }
.ib-lbl.ib-lrm i { background: var(--red, #f85149); opacity: .5; }
.ib-lbl.ib-lrm s { opacity: .8; }
.ib-when {
  margin-left: 6px;
  color: #e3b341;
  font-size: 11px;
}
.idx-reason { font-size: 12px; color: var(--yellow, #e3b341); white-space: nowrap; }

/* 爆仓时间轴（coinank 风格）：交易所徽标 + 合约代码，整行按方向着色，深浅随金额 */
.liq-table td:first-child {
  color: var(--fg);
  font-weight: 400;
  width: auto;
  cursor: pointer;
}
.liq-row { --la: .08; }
.liq-row.liq-l {
  background: linear-gradient(90deg, rgba(248, 81, 73, var(--la)), rgba(248, 81, 73, .02));
}
.liq-row.liq-s {
  background: linear-gradient(90deg, rgba(63, 185, 80, var(--la)), rgba(63, 185, 80, .02));
}
.liq-row:hover td { filter: brightness(1.2); }
.liq-ex { font-size: 11px; margin-left: 6px; }
.liq-usd { font-weight: 700; font-variant-numeric: tabular-nums; }
.liq-time { font-variant-numeric: tabular-nums; }

/* 爆仓：紧凑统计条 + 阈值编辑 */
.liq-stats { display: inline-flex; gap: 10px; flex-wrap: wrap; }
.liq-stat {
  display: inline-flex; align-items: baseline; gap: 7px;
  background: rgba(132, 142, 156, .08);
  border: 1px solid var(--border);
  border-radius: 8px; padding: 5px 12px; font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}
.liq-stat .ls-label { color: var(--dim); font-size: 12px; }
.liq-stat b { font-weight: 700; }
.inline-form select {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--fg);
  padding: 5px 8px;
  font-size: 13px;
}
.inline-form select:focus { outline: none; border-color: var(--blue); }

/* 跟单员持仓卡 */
.ct-wrap { display: flex; flex-direction: column; gap: 14px; }
.ct-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px 16px;
}
.ct-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.ct-avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: none; object-fit: cover;
  background: var(--bg3); display: inline-flex; align-items: center;
  justify-content: center; font-weight: 700; color: var(--dim);
}
.ct-meta { min-width: 0; }
.ct-name { font-size: 16px; font-weight: 700; }
.ct-sub { font-size: 12px; }
.ct-posat { margin-left: auto; font-size: 11.5px; white-space: nowrap; }
.ct-del {
  color: var(--dim); cursor: pointer; flex: none;
  padding: 2px 6px; border-radius: 6px; font-size: 13px;
}
.ct-del:hover { color: var(--red); background: rgba(248, 81, 73, .12); }
.ct-body { display: grid; grid-template-columns: 1.6fr 1fr; gap: 14px; }
@media (max-width: 1100px) { .ct-body { grid-template-columns: 1fr; } }
.ct-trades .ptitle { font-weight: 600; margin-bottom: 6px; }
.ct-trade {
  display: flex; align-items: baseline; gap: 7px; padding: 5px 0;
  border-bottom: 1px solid var(--border); font-size: 12.5px;
}
.ct-trade:last-child { border-bottom: none; }
.ct-time { flex: none; font-size: 11px; }
.ct-txt { color: var(--fg); overflow: hidden; text-overflow: ellipsis; }

/* 溢价双曲线（同一面板内 BTC / ETH 各一张基线图，周期按钮在面板右上角） */
.premium-panel .ptitle { display: flex; align-items: center; }
.premium-panel .iv-btns { margin-left: auto; }
/* BTC 在上、ETH 在下，各占整行 */
.premium-charts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
.chart-sub {
  font-size: 12px;
  font-weight: 700;
  color: var(--dim);
  margin-bottom: 4px;
  letter-spacing: .5px;
}
.tvchart.sm { min-height: 230px; }

/* ── 币种小图标（币安 logo，404 时显示首字母圆形头像） ── */
.coin-avatar {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  flex: none;
  background: rgba(132, 142, 156, .20);
  color: var(--dim);
  font-size: 9px;
  font-weight: 700;
  vertical-align: -3px;
  margin-right: 6px;
  overflow: hidden;
}
.coin-avatar::before { content: attr(data-l); }
.coin-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
}
.sym-td { white-space: nowrap; }

/* ── Upbit CMC 风格排行榜 ── */
.upbit-table td:first-child { color: var(--dim); font-weight: 400; width: 44px; }
.coin-cell { display: flex; align-items: center; gap: 9px; cursor: pointer; }
.coin-cell:hover .coin-name { color: var(--blue); }
.coin-ico {
  width: 22px; height: 22px;
  border-radius: 50%;
  flex: none;
  background: var(--bg3);
}
.coin-ico.ph { display: inline-block; }
.coin-name { font-weight: 600; }
.coin-sym { font-size: 12px; }
.card .metric-chips { margin-top: 8px; }

/* ── HL 聪明钱地址卡片 ── */
.inline-form input.hyper-addr-input {
  width: 360px;
  text-align: left;
  font-family: Consolas, monospace;
  font-size: 12px;
}
.inline-form input.hyper-tag-input { width: 110px; text-align: left; }
.hl-card { margin-bottom: 14px; }
.hl-card > .ptitle { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hl-card .ptitle .sym-del { margin-left: 0; }
.hl-table tbody tr { cursor: pointer; }
.hl-table .sub { font-size: 11px; margin-top: 2px; }

/* lightweight-charts 左下角 TradingView 水印（兜底，配合 layout.attributionLogo:false） */
a#tv-attr-logo { display: none !important; }

.hl-detail-btn {
  margin-left: auto;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--dim);
  border-radius: 6px;
  padding: 3px 10px;
  cursor: pointer;
  font-size: 12px;
}
.hl-detail-btn:hover { border-color: var(--blue); color: var(--fg); }

.hl-detail {
  margin-top: 12px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}
.hl-pnl-block { margin: 4px 0 12px; }
.hl-tag { cursor: text; }
.hl-tag-edit {
  background: var(--bg3);
  border: 1px solid var(--blue);
  color: var(--fg);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 13px;
  width: 120px;
  outline: none;
}
.hl-detail-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 13px;
}
.hl-pnl-title { font-weight: 600; }
.hl-pnl-sum { font-size: 13px; }
.hl-detail-head .iv-btns { margin-left: auto; }
.tvchart.pnl { height: 200px; }
.hl-subtabs { margin: 10px 0 8px; }
.hl-tab-body table { font-size: 12.5px; }
.bl-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2px 8px 2px 10px;
  font-size: 12px;
}
.bl-del { cursor: pointer; color: var(--dim); padding: 0 2px; }
.bl-del:hover { color: var(--red); }
.bl-add {
  cursor: pointer;
  color: var(--dim);
  font-size: 12px;
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 7px;
  white-space: nowrap;
}
.bl-add:hover { color: var(--red); border-color: var(--red); }

/* ── 下拉栏（黑名单管理 / 告警类型设置） ── */
details.dropdown {
  display: inline-block;
  position: relative;
  font-size: 13px;
}
details.dropdown summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--fg);
  padding: 5px 14px;
  white-space: nowrap;
}
details.dropdown summary::-webkit-details-marker { display: none; }
details.dropdown summary::after { content: " ▾"; color: var(--dim); }
details.dropdown[open] summary { border-color: var(--blue); }
details.dropdown .dd-body {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  min-width: 220px;
  max-width: 420px;
  max-height: 320px;
  overflow-y: auto;
  background: var(--bg2, #161b22);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.45);
}
details.dropdown .dd-body.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
/* 鲸鱼告警设置在侧栏内展开（侧栏是滚动容器，悬浮面板会被裁剪） */
#whale-alert-dd { display: block; margin-bottom: 12px; }
#whale-alert-dd summary { display: block; text-align: center; }
#whale-alert-dd .dd-body {
  position: static;
  min-width: 0;
  max-width: none;
  max-height: none;
  margin-top: 6px;
  box-shadow: none;
}
.toggle-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  cursor: pointer;
  color: var(--fg);
}
.toggle-row:hover { color: #f0b90b; }
.toggle-row input { accent-color: #f0b90b; cursor: pointer; }
.dd-reset {
  display: block;
  width: 100%;
  margin-top: 8px;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--fg);
  border-radius: 6px;
  padding: 5px 0;
  font-size: 12.5px;
  cursor: pointer;
}
.dd-reset:hover { border-color: #f0b90b; color: #f0b90b; }

/* ── 右键菜单 ── */
.ctx-menu {
  position: fixed;
  z-index: 100;
  min-width: 140px;
  background: var(--bg2, #161b22);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px;
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
}
.ctx-menu button {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  color: var(--fg);
  border-radius: 5px;
  padding: 7px 12px;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.ctx-menu button:hover { background: var(--bg3); }
.ctx-menu button.danger:hover { color: var(--red); }

@media (max-width: 1100px) {
  .split { grid-template-columns: 1fr; }
  .side-col { position: static; max-height: none; }
}

/* ── 鲸鱼面板 ── */
.whale-group { margin-bottom: 26px; }
.whale-group > .gtitle { font-size: 15px; font-weight: 700; margin-bottom: 10px; }
.whale-group > .gtitle .updated { display: inline; margin-left: 10px; font-weight: 400; }

.whale-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}
.panel {
  background: linear-gradient(180deg, rgba(27, 35, 52, .45), rgba(18, 23, 34, .85));
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
}
.panel .ptitle { font-weight: 700; margin-bottom: 10px; }
.panel .ptitle.long { color: var(--green); }
.panel .ptitle.short { color: var(--red); }
.panel .kv { display: flex; justify-content: space-between; padding: 3px 0; font-size: 13.5px; }
.panel .kv .k { color: var(--dim); }
.bar { height: 8px; background: var(--bg3); border-radius: 4px; margin-top: 8px; overflow: hidden; }
.bar > div { height: 100%; border-radius: 4px; }
.bar.long > div { background: var(--green); }
.bar.short > div { background: var(--red); }

.signals { grid-column: 1 / -1; }
.signals table { margin-top: 4px; }

.chartbox { grid-column: 1 / -1; }
.chartbox canvas { width: 100%; height: 180px; display: block; }
.chart-legend { font-size: 12px; color: var(--dim); margin-bottom: 6px; }

/* ── 币种弹层 ── */
.modal-mask[hidden] { display: none; }
.modal-mask {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 100;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 40px 16px;
  overflow-y: auto;
}
.modal {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  width: 100%;
  max-width: 900px;
  max-height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
}
.modal-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 16px; font-weight: 700;
}
.modal-head button {
  background: none; border: none; color: var(--dim);
  font-size: 16px; cursor: pointer; padding: 4px 8px;
}
.modal-head button:hover { color: var(--fg); }
.modal-body { padding: 16px 18px; overflow-y: auto; }
.modal-body h3 { font-size: 13.5px; color: var(--dim); margin: 16px 0 8px; }
.modal-body h3:first-child { margin-top: 0; }
.modal-body canvas { width: 100%; height: 150px; display: block; }

@media (max-width: 800px) {
  .whale-detail { grid-template-columns: 1fr; }
  main { padding: 12px; }
  tbody td, thead th { padding: 7px 8px; }
  #symbol-search { width: 110px; }
}

/* ── ETF 资金流 ── */
#etf-tabs .subtab {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 15px 6px 10px;
}
#etf-tabs .subtab .coin-avatar,
#etf-tabs .subtab .coin-avatar img { width: 20px; height: 20px; }
#etf-tabs .subtab span { font-weight: 600; letter-spacing: .3px; }

.etf-cards {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 14px; margin-bottom: 16px;
}
@media (max-width: 900px) { .etf-cards { grid-template-columns: repeat(2, 1fr); } }
.etf-card {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, var(--bg2), var(--bg3));
  border: 1px solid var(--border);
  border-radius: 14px; padding: 16px 18px;
}
.etf-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--accent);
}
.etf-ct { color: var(--dim); font-size: 12.5px; margin-bottom: 8px; }
.etf-cv { font-size: 24px; font-weight: 700; letter-spacing: .3px; }
.etf-cv.pos { color: var(--green); }
.etf-cv.neg { color: var(--red); }

.etf-panel { margin-bottom: 16px; }
.etf-panel::before {
  content: ""; display: block; height: 2px; margin: -1px -1px 12px;
  background: linear-gradient(90deg, var(--accent), transparent 70%);
  border-radius: 2px;
}
.etf-panel #etf-chart { height: 360px; position: relative; }
.etf-panel .ptitle { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.etf-legend {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; color: var(--dim); font-weight: 400;
}
.etf-legend .lg-bar { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.etf-legend .lg-bar.pos { background: #16c784; }
.etf-legend .lg-bar.neg { background: #ea3943; margin-left: 8px; }
.etf-legend .lg-line {
  width: 14px; height: 3px; border-radius: 2px; display: inline-block; margin-left: 8px;
}
.etf-panel .iv-btns { margin-left: auto; }

/* 下方两表并排：左=分发行商，右=历史总览 */
.etf-lower {
  display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 14px; margin-bottom: 16px;
}
@media (max-width: 1000px) { .etf-lower { grid-template-columns: 1fr; } }
.etf-scroll { max-height: 430px; overflow-y: auto; }
.etf-scroll::-webkit-scrollbar { width: 8px; }
.etf-scroll::-webkit-scrollbar-thumb {
  background: rgba(132, 142, 156, .3); border-radius: 4px;
}
.etf-hist thead th, .etf-issuers thead th {
  position: sticky; top: 0; background: var(--bg2); z-index: 1;
}

.etf-tblwrap { padding-bottom: 4px; }
.etf-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.etf-table th, .etf-table td {
  padding: 9px 12px; border-bottom: 1px solid var(--border); text-align: left;
}
.etf-table th { color: var(--dim); font-weight: 500; font-size: 12px; }
.etf-table td.num, .etf-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.etf-table tbody tr:hover { background: rgba(132, 142, 156, .06); }
.etf-tk { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.etf-tk .coin-avatar, .etf-tk .coin-avatar img { width: 22px; height: 22px; }
.etf-tkn { font-weight: 700; }
.etf-inst { font-size: 12px; }
.etf-open { white-space: nowrap; color: var(--dim); font-size: 12.5px; }
.etf-open .dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px;
}
.etf-open .dot.on { background: var(--green); box-shadow: 0 0 6px var(--green); }
.etf-open .dot.off { background: var(--dim); }

/* ── 账号区（header 右侧） ── */
.acct { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.acct-name { color: var(--dim); font-size: 13px; }
/* 账号有效期徽标：默认淡色，临期橙、危急红 */
.acct-expiry {
  font-size: 12px; padding: 2px 8px; border-radius: 999px;
  color: var(--dim); background: var(--bg3); border: 1px solid var(--border);
}
.acct-expiry.warn {
  color: #e3b341; background: rgba(227, 179, 65, .12);
  border-color: rgba(227, 179, 65, .4);
}
.acct-expiry.danger {
  color: var(--red); background: rgba(248, 81, 73, .12);
  border-color: rgba(248, 81, 73, .4);
}
.acct-btn {
  background: var(--bg3); color: var(--fg); border: 1px solid var(--border);
  border-radius: 6px; padding: 4px 10px; font-size: 12.5px; cursor: pointer;
}
.acct-btn:hover { border-color: var(--accent); color: #fff; }

/* ── 管理面板 ── */
.admin-sect { margin-bottom: 22px; }
.admin-sect h3 { font-size: 14px; margin-bottom: 10px; color: var(--blue); }
.admin-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 12px; }
.admin-form input, .admin-form select {
  background: var(--bg); color: var(--fg); border: 1px solid var(--border);
  border-radius: 6px; padding: 6px 9px; font-size: 13px;
}
.admin-form input[type=number] { width: 110px; }
.af-field { display: flex; flex-direction: column; gap: 4px; }
.af-field label { font-size: 11px; color: var(--dim); letter-spacing: .3px; }
.af-field input, .af-field select { min-width: 150px; }
.af-field input[type=number] { min-width: 0; }
/* 用户搜索框：带放大镜图标的圆角胶囊，聚焦高亮 */
.admin-search {
  display: flex; align-items: center; gap: 8px; width: 320px; max-width: 100%;
  margin: 0 0 14px; padding: 0 12px;
  background: rgba(0,0,0,.28); border: 1px solid var(--border); border-radius: 999px;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.admin-search:focus-within {
  border-color: var(--accent); background: rgba(0,0,0,.35);
  box-shadow: 0 0 0 3px rgba(79,140,255,.15);
}
.admin-search svg { width: 15px; height: 15px; color: var(--dim); flex: none; transition: color .2s; }
.admin-search:focus-within svg { color: var(--accent); }
.admin-search input {
  flex: 1; min-width: 0; background: transparent; color: var(--fg);
  border: none; outline: none; padding: 9px 0; font-size: 13.5px;
}
.admin-search input::placeholder { color: #5b6577; }

/* ── 服务器仪表盘 ── */
.sys-gauges {
  display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 18px;
}
.sys-gauge {
  flex: 1 1 160px; min-width: 150px; display: flex; flex-direction: column;
  align-items: center; gap: 8px; padding: 16px 12px;
  background: var(--panel, rgba(255,255,255,.02));
  border: 1px solid var(--border); border-radius: 12px;
}
.sys-gauge-ring {
  width: 108px; height: 108px; border-radius: 50%;
  background: conic-gradient(rgba(255,255,255,.08) 0deg, rgba(255,255,255,.08) 360deg);
  display: flex; align-items: center; justify-content: center;
  transition: background .5s ease;
}
.sys-gauge-hole {
  width: 82px; height: 82px; border-radius: 50%; background: var(--bg);
  display: flex; align-items: center; justify-content: center;
}
.sys-gauge-hole b { font-size: 21px; font-weight: 700; }
.sys-gauge-label { font-size: 14px; font-weight: 600; color: var(--fg); }
.sys-gauge-sub { font-size: 12px; }

.sys-kv {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px; margin-bottom: 18px;
}
.sys-kv-item {
  background: rgba(0,0,0,.2); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 14px;
  display: flex; flex-direction: column; gap: 4px;
}
.sys-kv-item em { font-size: 11.5px; color: var(--dim); font-style: normal; }
.sys-kv-item b { font-size: 15px; font-weight: 600; color: var(--fg);
  font-variant-numeric: tabular-nums; }

.sys-svc-title { font-size: 12px; margin-bottom: 8px; }
.sys-svc { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.sys-svc-pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px; border-radius: 999px; font-size: 12.5px;
  border: 1px solid var(--border); background: rgba(0,0,0,.2);
}
.sys-svc-pill .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.sys-svc-pill.ok .dot { background: #3fb950; box-shadow: 0 0 6px #3fb95088; }
.sys-svc-pill.bad { border-color: #ff6b6b55; }
.sys-svc-pill.bad .dot { background: #ff6b6b; box-shadow: 0 0 6px #ff6b6b88; }
.sys-updated { font-size: 11.5px; }

/* ── 钉钉告警配置 ── */
.dt-token {
  background: var(--bg); color: var(--fg); border: 1px solid var(--border);
  border-radius: 6px; padding: 6px 9px; font-size: 13px;
  -webkit-text-security: disc;   /* 掩码显示，且非 password 类型：不触发浏览器自动填充白底/串号 */
}
.dt-token:focus { outline: none; border-color: var(--accent); }
.dt-enable { font-size: 12.5px; color: var(--dim); display: inline-flex;
  align-items: center; gap: 5px; }

.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th, .admin-table td {
  text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--border);
}
.admin-table th { color: var(--dim); font-weight: 500; }
.admin-table code { color: var(--green); font-size: 12.5px; }

/* ── 登录 / 激活页 ── */
.login-body {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 24px; position: relative; overflow: hidden;
}
/* 修复：.login-form 的 display:flex 会覆盖 HTML 的 hidden 属性 */
.login-body [hidden] { display: none !important; }

/* 背景：光晕 + 网格 */
.login-bg {
  position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  background:
    radial-gradient(1100px 620px at 50% -12%, rgba(79,140,255,.12), transparent 60%),
    radial-gradient(820px 520px at 100% 108%, rgba(56,208,255,.07), transparent 60%);
}
.login-bg .grid {
  position: absolute; inset: -2px;
  background-image:
    linear-gradient(rgba(120,160,255,.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120,160,255,.055) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(circle at 50% 38%, #000, transparent 72%);
  mask-image: radial-gradient(circle at 50% 38%, #000, transparent 72%);
}
.login-bg .orb {
  position: absolute; border-radius: 50%; filter: blur(72px); opacity: .55;
  animation: orbFloat 15s ease-in-out infinite;
}
.login-bg .orb-1 {
  width: 360px; height: 360px; left: 8%; top: 10%;
  background: radial-gradient(circle, rgba(79,140,255,.55), transparent 70%);
}
.login-bg .orb-2 {
  width: 440px; height: 440px; right: 5%; bottom: 4%; animation-delay: -7s;
  background: radial-gradient(circle, rgba(56,208,255,.42), transparent 70%);
}
@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(22px, -26px) scale(1.08); }
}

.login-card {
  position: relative; z-index: 1; width: 100%; max-width: 400px;
  background: linear-gradient(180deg, rgba(22,27,38,.86), rgba(15,19,28,.9));
  border: 1px solid rgba(120,160,255,.14); border-radius: 18px;
  padding: 38px 32px 26px;
  box-shadow: 0 24px 70px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.05);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  animation: cardIn .5s cubic-bezier(.2,.7,.2,1);
}
.login-card::before {
  content: ""; position: absolute; inset: 0; border-radius: 18px; padding: 1px;
  background: linear-gradient(130deg, rgba(79,140,255,.6), transparent 42%,
                              transparent 58%, rgba(56,208,255,.5));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.login-logo {
  position: relative; width: 62px; height: 62px; margin: 0 auto 15px;
  display: grid; place-items: center; border-radius: 17px;
  background: linear-gradient(145deg, rgba(79,140,255,.22), rgba(55,224,207,.10));
  border: 1px solid rgba(120,180,255,.3);
  box-shadow: 0 10px 28px rgba(18,38,88,.5),
              inset 0 1px 0 rgba(255,255,255,.09),
              0 0 22px rgba(79,140,255,.18);
}
.login-logo svg {
  width: 36px; height: 36px;
  filter: drop-shadow(0 2px 5px rgba(79,140,255,.4));
}
.login-brand {
  font-size: 26px; font-weight: 800; letter-spacing: 4px; text-align: center;
  background: linear-gradient(90deg, #6fb0ff, #46e6d0);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.login-poem {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  margin-top: 11px; font-size: 11.5px; letter-spacing: 5px; text-indent: 5px;
  color: #6f83a6; font-weight: 500;
}
.login-poem::before, .login-poem::after {
  content: ""; width: 20px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(90,190,220,.5));
}
.login-poem::after { transform: scaleX(-1); }

.login-tabs {
  display: flex; gap: 4px; margin: 24px 0 18px; padding: 4px;
  background: rgba(0,0,0,.25); border: 1px solid var(--border); border-radius: 12px;
}
.login-tab {
  flex: 1; background: transparent; color: var(--dim); border: none;
  border-radius: 9px; padding: 9px; cursor: pointer; font-size: 13.5px; font-weight: 600;
  transition: color .2s, background .2s;
}
.login-tab.active {
  color: #fff;
  background: linear-gradient(180deg, rgba(79,140,255,.28), rgba(79,140,255,.15));
  box-shadow: 0 2px 10px rgba(79,140,255,.25), inset 0 1px 0 rgba(255,255,255,.08);
}
.login-tab:not(.active):hover { color: #cdd6e4; }

.login-form { display: flex; flex-direction: column; gap: 13px; }
.login-form .field {
  display: flex; align-items: center; gap: 9px;
  background: rgba(0,0,0,.28); border: 1px solid var(--border);
  border-radius: 10px; padding: 0 13px;
  transition: border-color .2s, box-shadow .2s;
}
.login-form .field:focus-within {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79,140,255,.15);
}
.login-form .field svg { width: 16px; height: 16px; color: var(--dim); flex: none; }
.login-form .field input {
  flex: 1; min-width: 0; background: transparent; color: var(--fg);
  border: none; padding: 12px 0; font-size: 14px;
}
.login-form .field input:focus { outline: none; }
.login-form .field input::placeholder { color: #5b6577; }
/* 浏览器记住密码自动填充时，用超大 inset 阴影盖住浏览器强制的白底，
   并用 -webkit-text-fill-color 恢复浅色文字，保持暗色科技风 */
.login-form .field input:-webkit-autofill,
.login-form .field input:-webkit-autofill:hover,
.login-form .field input:-webkit-autofill:focus,
.login-form .field input:-webkit-autofill:active {
  -webkit-text-fill-color: var(--fg);
  caret-color: var(--fg);
  -webkit-box-shadow: 0 0 0 1000px #0e1119 inset;
  box-shadow: 0 0 0 1000px #0e1119 inset;
  transition: background-color 9999s ease-in-out 0s;
}
.login-form button[type=submit] {
  margin-top: 6px; letter-spacing: 2px;
  background: linear-gradient(90deg, #4f8cff, #38b6ff); color: #fff; border: none;
  border-radius: 10px; padding: 12px; font-size: 14.5px; font-weight: 700; cursor: pointer;
  box-shadow: 0 6px 20px rgba(79,140,255,.35);
  transition: filter .15s, transform .05s, box-shadow .2s;
}
.login-form button[type=submit]:hover {
  filter: brightness(1.08); box-shadow: 0 8px 26px rgba(79,140,255,.5);
}
.login-form button[type=submit]:active { transform: translateY(1px); }

.login-msg { margin-top: 15px; text-align: center; font-size: 13px; min-height: 18px; }
.login-msg.err { color: var(--red); }
.login-msg.ok { color: var(--green); }
.login-foot {
  text-align: center; margin-top: 18px; font-size: 11.5px;
  color: #5c6a82; letter-spacing: 2px;
}

/* ── 只读端（user 节点 / viewer）：隐藏一切写入 UI ──
   .inline-form 统一承载所有 添加/参数/阈值/黑名单管理 表单；
   .sym-del/.ct-del/.bl-add/.bl-del 是行内 增删/拉黑 操作；
   #whale-alert-dd 是鲸鱼告警类型设置；#admin-btn 是管理面板入口。
   真正的写拦截在服务器，这里只是把无效按钮从只读端隐去。 */
body.readonly .inline-form,
body.readonly .sym-del,
body.readonly .ct-del,
body.readonly .bl-add,
body.readonly .bl-del,
body.readonly #whale-alert-dd,
body.readonly #admin-btn { display: none !important; }
/* 只读端：备注名不可编辑，去掉“可点”光标暗示 */
body.readonly .hl-tag { cursor: default; }

/* ── 只读端总览：市场速览 KPI 卡 ── */
/* 卡片数量少：用 auto-fit 让它们均分铺满整行，不留空列 */
.cards.kpi-board { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.kpi-card {
  display: flex; flex-direction: column; gap: 6px;
  padding: 15px 17px; min-height: 122px;
}
.kpi-card .kpi-head { display: flex; align-items: center; gap: 7px; color: var(--dim); }
.kpi-card .kpi-ic { width: 15px; height: 15px; flex: none; opacity: .85; }
.kpi-card .kpi-label { font-size: 12.5px; letter-spacing: .3px; }
.kpi-card .kpi-val {
  font-size: 25px; font-weight: 700; line-height: 1.05;
  font-variant-numeric: tabular-nums; color: var(--fg);
}
.kpi-card .kpi-val.pos { color: var(--green); }
.kpi-card .kpi-val.neg { color: var(--red); }
.kpi-card .kpi-val.dim { color: var(--dim); }
.kpi-card .kpi-sub { font-size: 11.5px; color: var(--dim); }
.kpi-card .kpi-extra { margin-top: auto; padding-top: 4px; }

/* MVRV 位置刻度：底部绿 → 中性灰 → 顶部红 */
.kpi-gauge {
  position: relative; height: 6px; border-radius: 3px;
  background: linear-gradient(90deg, #2ea043 0%, #6b7280 50%, #f85149 100%);
}
.kpi-gauge .kpi-gauge-mark {
  position: absolute; top: -3px; width: 3px; height: 12px; border-radius: 2px;
  background: #fff; box-shadow: 0 0 6px rgba(255,255,255,.75);
  transform: translateX(-50%);
}
/* ETF 四币资金柱 */
.kpi-bars { display: flex; align-items: flex-end; gap: 8px; height: 34px; }
.kpi-bars .kpi-bcol {
  flex: 1; height: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: flex-end; gap: 3px;
}
.kpi-bars .kpi-bar { width: 100%; max-width: 16px; min-height: 3px; border-radius: 3px 3px 0 0; }
.kpi-bars .kpi-bar.pos { background: linear-gradient(180deg, #3fb950, #2ea043); }
.kpi-bars .kpi-bar.neg { background: linear-gradient(180deg, #f85149, #da3633); }
.kpi-bars em { font-style: normal; font-size: 9.5px; color: var(--dim); }
/* 爆仓多空占比条 */
.kpi-split { display: flex; height: 6px; border-radius: 3px; overflow: hidden; background: var(--bg3); }
.kpi-split .s-long { background: #f85149; }
.kpi-split .s-short { background: #3fb950; }
.kpi-split-lg { display: flex; justify-content: space-between; font-size: 11px; margin-top: 5px; }
.kpi-split-lg .pos { color: var(--green); }
.kpi-split-lg .neg { color: var(--red); }
/* 通用小胶囊 */
.kpi-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.kpi-chip {
  font-size: 11px; padding: 2px 9px; border-radius: 10px;
  background: var(--bg3); color: var(--dim); border: 1px solid var(--border);
}
.kpi-chip.hot { color: #ff8a5b; border-color: rgba(255,120,80,.32); }
.kpi-chip.warn { color: var(--yellow); border-color: rgba(210,180,60,.32); }
.kpi-chip em { font-style: normal; color: var(--dim); margin-right: 5px; }
.kpi-chip b { font-variant-numeric: tabular-nums; color: var(--fg); }
.kpi-chip b.pos { color: var(--green); }
.kpi-chip b.neg { color: var(--red); }

/* Coinbase 溢价：BTC / ETH 双币同框展示 */
.kpi-card[data-kpi="premium"] .kpi-val { display: none; }
.kpi-prem { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; }
.kp-cell {
  display: flex; flex-direction: column; gap: 3px;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 9px; padding: 8px 11px;
}
.kp-cell em { font-style: normal; font-size: 11px; color: var(--dim); letter-spacing: .3px; }
.kp-cell b { font-size: 18px; font-variant-numeric: tabular-nums; color: var(--fg); }
.kp-cell b.pos { color: var(--green); }
.kp-cell b.neg { color: var(--red); }

/* ══ 总览：左右两栏各占一半，右侧时间线为独立滚动框，底部对齐左栏「按分类」==*/
.ov-split {
  display: flex; gap: 18px; align-items: flex-start;
}
.ov-left, .ov-right { flex: 1 1 0; min-width: 0; }
.ov-left > h2, .ov-right > h2 { margin-top: 0; }
@media (max-width: 980px) {
  .ov-split { flex-direction: column; }
  #overview-events { max-height: 60vh !important; }
}

/* 左栏概览小部件 */
#overview-summary {
  display: flex; flex-direction: column; gap: 12px;
}
.ov-widget {
  background: linear-gradient(180deg, rgba(27, 35, 52, .5), rgba(18, 23, 34, .85));
  border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px;
}
.ov-wt { font-size: 12px; color: var(--dim); margin-bottom: 10px; letter-spacing: .5px; }

/* 级别 pills */
.sev-pills { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.sev-pill {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: var(--bg3); border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 4px; cursor: pointer; color: var(--dim); transition: border-color .15s;
}
.sev-pill:hover { border-color: rgba(120, 160, 255, .4); }
.sev-pill.on { border-color: var(--accent); background: rgba(79, 140, 255, .12); }
.sev-pill em { font-style: normal; font-size: 11px; }
.sev-pill b { font-size: 18px; color: var(--fg); font-variant-numeric: tabular-nums; }
.sev-dot { width: 8px; height: 8px; border-radius: 50%; }
.sev-dot.high { background: var(--red); }
.sev-dot.medium { background: var(--yellow); }
.sev-dot.info { background: var(--blue); }
.sev-dot.ops { background: var(--purple); }

/* 分类 / 高频币种 列表行 */
.cat-list, .sym-list { display: flex; flex-direction: column; gap: 4px; }
.cat-row, .sym-row {
  display: flex; align-items: center; gap: 9px; width: 100%;
  background: transparent; border: 1px solid transparent; border-radius: 8px;
  padding: 5px 8px; cursor: pointer; color: var(--fg); text-align: left;
}
.cat-row:hover, .sym-row:hover { background: var(--bg3); }
.cat-row.on { border-color: var(--accent); background: rgba(79, 140, 255, .1); }
.cat-ic { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; flex: none; }
.cat-ic svg { width: 15px; height: 15px; }
.cat-name, .sym-name {
  flex: none; width: 76px; font-size: 12.5px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mini-bar { flex: 1; height: 6px; border-radius: 3px; background: var(--bg3); overflow: hidden; }
.mini-bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.cat-row b, .sym-row b {
  font-size: 12.5px; color: var(--dim); min-width: 22px; text-align: right;
  font-variant-numeric: tabular-nums;
}
.sym-row .coin-avatar { width: 18px; height: 18px; flex: none; }

/* 右栏时间线：图标化单行，独立滚动框（高度由 JS 对齐左栏底部）*/
#overview-events {
  display: flex; flex-direction: column; gap: 6px;
  overflow-y: auto; padding-right: 5px;
}
#overview-events::-webkit-scrollbar { width: 8px; }
#overview-events::-webkit-scrollbar-thumb { background: var(--bg3); border-radius: 4px; }
#overview-events::-webkit-scrollbar-track { background: transparent; }
.event.ev-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; }
.ev-ico { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex: none; }
.ev-ico svg { width: 16px; height: 16px; }
.ev-main { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 8px; overflow: hidden; }
.ev-main .title {
  flex: 0 1 auto; min-width: 60px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ev-row .inline-metrics { flex: 1 1 auto; min-width: 0; display: flex; gap: 6px; overflow: hidden; }
.ev-row .inline-metrics .chip {
  background: rgba(120, 160, 255, .07); border: 1px solid rgba(120, 160, 255, .1);
  font-size: 11px; padding: 2px 8px; white-space: nowrap;
}
.ev-tail { display: flex; align-items: center; gap: 8px; flex: none; }
.ev-tail .ev-sym { display: inline-flex; align-items: center; gap: 5px; color: var(--blue); }
.ev-tail .time { font-size: 11.5px; }

/* 运维卡的“更新于 HH:MM:SS”等宽，避免逐位跳动引起宽度抖动 */
#source-cards .card .upd { font-variant-numeric: tabular-nums; }

/* ── 管理面板：概览统计条 + 多标签 + 用户/会话/审计表 ── */
.admin-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px; margin-bottom: 18px;
}
.astat {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  background: linear-gradient(180deg, rgba(27, 35, 52, .55), rgba(18, 23, 34, .9));
  border: 1px solid var(--border); border-radius: 12px; padding: 13px 16px;
  cursor: pointer; text-align: left; transition: border-color .15s, transform .1s;
}
.astat:hover { border-color: rgba(120, 160, 255, .5); transform: translateY(-1px); }
.astat em { font-style: normal; font-size: 12px; color: var(--dim); letter-spacing: .3px; }
.astat b { font-size: 26px; font-variant-numeric: tabular-nums; color: var(--fg); line-height: 1.1; }
.astat i { font-style: normal; font-size: 11.5px; color: var(--dim); }
.astat i.bad { color: var(--red); }

/* 系统管理里的数据源健康卡（沿用总览运维卡风格） */
.src-cards { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

.admin-tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.admin-actions { white-space: nowrap; }
/* 切换子标签加载期：保留旧内容、轻微降透明度，避免闪白/跳动 */
#admin-tab-body.admin-loading { opacity: .55; transition: opacity .12s ease; }
.admin-actions .acct-btn { margin-right: 4px; }
.acct-btn.danger { color: var(--red); border-color: rgba(248, 81, 73, .4); }
.acct-btn.danger:hover { background: rgba(248, 81, 73, .12); }
.admin-subhead { display: flex; align-items: center; gap: 8px; margin: 4px 0 8px;
  font-size: 13px; font-weight: 600; color: var(--fg); }
/* 批量操作栏 */
.u-batchbar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 0 0 10px; padding: 8px 12px; border-radius: 8px;
  background: var(--bg3); border: 1px solid var(--accent);
  font-size: 13px; color: var(--fg);
}
.u-batchbar b { color: var(--accent); }
.u-batch-exp { display: inline-flex; align-items: center; gap: 6px; color: var(--dim); }
.u-inline {
  background: var(--bg2); color: var(--fg); border: 1px solid var(--accent);
  border-radius: 6px; padding: 3px 8px; font-size: 12.5px; margin-right: 4px;
}
/* 危险操作行内二次确认：变红闪一下提示“再点一次” */
.acct-btn.armed {
  background: rgba(248, 81, 73, .18); color: var(--red);
  border-color: var(--red); font-weight: 600;
}
/* 右下角轻量提示 */
.toast {
  position: fixed; right: 20px; bottom: 20px; z-index: 9999;
  max-width: 360px; padding: 10px 16px; border-radius: 8px;
  font-size: 13px; color: #fff; background: var(--bg3);
  border: 1px solid var(--border); box-shadow: 0 6px 24px rgba(0,0,0,.35);
  opacity: 0; transform: translateY(8px); pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.ok { border-color: rgba(63,185,80,.5); }
.toast.err { border-color: rgba(248,81,73,.6); }
.admin-table .admin-ts, .admin-table .admin-ua { font-size: 12px; color: var(--dim); }
.admin-table code { font-size: 12px; }

/* ══════════ 市场情绪 · 币安广场散户情绪 ══════════ */
.pill.warn { background: rgba(227, 131, 65, .15); color: var(--accent); }

.sent-head {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-bottom: 14px;
}
.sent-head .sent-meta { color: var(--dim); font-size: 12.5px; }
.sent-head .sent-meta .pill { margin: 0 2px; }
.sent-head-right { margin-left: auto; }

/* 左=卡片（全指标，占满整行）；右=散户帖明细，固定定位的滑出抽屉，不挤压左侧 */
.sent-layout { display: block; }
.sent-left {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  align-content: start;
}
.sent-right {
  position: fixed; right: 0; top: 56px; width: 400px;
  height: calc(100vh - 56px);
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--bg2); border-left: 1px solid var(--border);
  box-shadow: -12px 0 32px rgba(0, 0, 0, .42);
  z-index: 60; opacity: 0; visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease;
}
/* 抽屉滑入：只在容器内裁剪，绝不越出视口（避免出现横向滚动条） */
.sent-right .sd-panel-head,
.sent-right .sent-detail-posts {
  transform: translateX(18px);
  transition: transform .22s ease;
}
.sent-layout.has-detail .sent-right { opacity: 1; visibility: visible; }
.sent-layout.has-detail .sent-right .sd-panel-head,
.sent-layout.has-detail .sent-right .sent-detail-posts { transform: none; }

.sd-panel-head {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px; border-bottom: 1px solid var(--border);
  background: var(--bg3);
}
.sd-ph-left { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.sd-ph-left .sc-ico .coin-avatar,
.sd-ph-left .sc-ico .coin-avatar img { width: 22px; height: 22px; }
.sd-ph-win { font-size: 12px; color: var(--dim); }
.sd-close {
  border: 1px solid var(--border); background: var(--bg2); color: var(--dim);
  border-radius: 6px; width: 26px; height: 26px; cursor: pointer; flex: none;
}
.sd-close:hover { color: var(--fg); border-color: var(--blue); }
.sent-detail-posts { flex: 1; overflow-y: auto; padding: 12px 13px; }
.sd-sum {
  color: var(--dim); font-size: 12.5px; margin-bottom: 10px;
  padding-bottom: 9px; border-bottom: 1px solid var(--border);
}
.sd-sum b { color: var(--fg); font-weight: 700; }

/* 卡片内的指标（老版全指标样式，紧凑 + 强制不换行） */
.sc-net { font-size: 12px; font-weight: 400; color: var(--dim);
  margin: 1px 0 7px; display: flex; align-items: baseline; gap: 6px; }
.sc-net > b { font-size: 17px; font-weight: 700; }
.sc-net > b.bull { color: #3fb950; }
.sc-net > b.bear { color: #f85149; }
.sc-net > b.neu { color: var(--fg); }
.sc-trend { margin-left: auto; font-size: 11px; font-weight: 400; color: var(--dim); }
.sc-trend .pill { padding: 0 5px; font-size: 10.5px; }
.sc-m { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.sc-m-row { display: flex; gap: 12px; font-size: 11.5px; color: var(--dim);
  white-space: nowrap; overflow: hidden; }
.sc-m-row span { white-space: nowrap; }
.sc-m-row b { color: var(--fg); font-weight: 700; margin-left: 2px; }
.sc-m-row b.bull { color: #3fb950; }
.sc-m-row b.bear { color: #f85149; }

.sent-card.selected {
  border-color: var(--blue);
  box-shadow: 0 0 0 1px var(--blue) inset, 0 6px 18px rgba(0, 0, 0, .25);
}

/* 窄屏：抽屉占满宽度 */
@media (max-width: 1000px) {
  .sent-right { width: 100%; box-shadow: none; }
}

.sent-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.sent-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 12px; cursor: pointer;
  transition: border-color .15s ease, transform .12s ease, box-shadow .15s ease;
  border-left: 3px solid var(--border);
}
.sent-card:hover, .sent-card:focus {
  transform: translateY(-1px); outline: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .25); border-color: var(--blue);
}
.sent-card.bull { border-left-color: var(--green, #3fb950); }
.sent-card.bear { border-left-color: var(--red, #f85149); }
.sent-card.neu  { border-left-color: var(--dim); }

.sc-head { display: flex; align-items: center; gap: 7px; margin-bottom: 6px; }
.sc-ico .coin-avatar, .sc-ico .coin-avatar img { width: 20px; height: 20px; }
.sc-sym { font-weight: 700; font-size: 13.5px; letter-spacing: .3px; }
.sc-tags { display: inline-flex; gap: 4px; }
.sent-tag {
  font-size: 10px; padding: 0 6px; border-radius: 999px;
  background: var(--bg3); color: var(--dim);
}
.sent-tag.pin { color: var(--blue); background: rgba(79, 140, 255, .12); }
.sent-tag.hot { color: var(--accent); background: rgba(227, 131, 65, .12); }
.sc-label {
  margin-left: auto; font-size: 11px; font-weight: 700;
  padding: 1px 8px; border-radius: 999px;
}
.sc-label.bull { color: var(--green, #3fb950); background: rgba(63, 185, 80, .13); }
.sc-label.bear { color: var(--red, #f85149); background: rgba(248, 81, 73, .13); }
.sc-label.neu  { color: var(--dim); background: rgba(132, 142, 156, .12); }

.sent-bar {
  display: flex; height: 7px; border-radius: 4px; overflow: hidden;
  background: var(--bg3); margin-bottom: 4px;
}
.sent-bar.empty {
  align-items: center; justify-content: center; height: auto;
  padding: 5px 0; font-size: 11.5px; color: var(--dim); background: transparent;
}
.sent-bar .sb-bull { background: #3fb950; }
.sent-bar .sb-neu  { background: #6b7280; }
.sent-bar .sb-bear { background: #f85149; }

.sc-stats {
  display: flex; flex-wrap: wrap; gap: 4px 12px;
  font-size: 12px; color: var(--dim);
}
.sc-stats b { color: var(--fg); font-weight: 700; margin-left: 2px; }
.sc-stats .pill { padding: 0 6px; font-size: 11px; }

.sent-foot { margin-top: 14px; color: var(--dim); font-size: 12px; }

/* 设置下拉 */
.sent-set-panel {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 30;
  width: 300px; background: var(--bg2); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
}
.sent-settings { position: relative; }
.sent-set-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--dim); margin-bottom: 10px;
}
.sent-set-row input[type=number], .sent-set-row input[type=text],
.sent-set-row input:not([type]) {
  flex: 1; min-width: 90px; background: var(--bg3);
  border: 1px solid var(--border); color: var(--fg);
  border-radius: 6px; padding: 5px 8px; font-size: 13px; outline: none;
}
.sent-set-row input:focus { border-color: var(--blue); }
.sent-chips { display: flex; flex-wrap: wrap; gap: 5px; width: 100%; }
.sent-chip {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--bg3); border-radius: 999px; padding: 2px 8px;
  font-size: 12px; color: var(--fg);
}
.sent-chip .chip-x { cursor: pointer; color: var(--dim); font-style: normal; }
.sent-chip .chip-x:hover { color: var(--red, #f85149); }
.sent-set-actions { display: flex; justify-content: flex-end; }
.btn-sm {
  background: var(--bg3); border: 1px solid var(--border); color: var(--fg);
  border-radius: 6px; padding: 5px 12px; font-size: 12.5px; cursor: pointer;
}
.btn-sm:hover { border-color: var(--blue); }
.btn-sm.primary { background: var(--blue); border-color: var(--blue); color: #fff; }

/* 帖子列表（右侧明细面板内） */
.sent-posts { display: flex; flex-direction: column; gap: 10px; }
.sent-post {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 9px; padding: 10px 12px;
}
.sent-post.is-bot { opacity: .72; }
.sp-head {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  font-size: 12px; color: var(--dim); margin-bottom: 6px;
}
.sp-author { color: var(--fg); font-weight: 600; }
.sp-age, .sp-eng { color: var(--dim); }
.sp-eng { margin-left: auto; }
.sp-text { font-size: 13.5px; line-height: 1.6; color: var(--fg); white-space: pre-wrap; word-break: break-word; }
.sp-text mark.hl-bull { background: rgba(63, 185, 80, .22); color: #7ee59a; border-radius: 3px; padding: 0 1px; }
.sp-text mark.hl-bear { background: rgba(248, 81, 73, .22); color: #ff9d96; border-radius: 3px; padding: 0 1px; }
.sp-text mark.hl-neg { text-decoration: line-through; opacity: .8; }
.sp-reason { margin-top: 6px; font-size: 12px; color: var(--dim); font-style: italic; }
