/* AI 板块页 */
.tab-link { color: var(--text-dim); text-decoration: none; margin-right: 12px; font-size: 13px; }
.tab-link:hover { color: var(--text); }

.ai-index { margin: 14px 0; padding: 14px; border: 1px solid var(--border); border-radius: 10px; }
.idx-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.idx-now { display: flex; align-items: baseline; gap: 12px; }
.idx-val { font-size: 32px; font-weight: 800; }
.idx-chg { font-size: 15px; font-weight: 700; }
.idx-chg.up, .num.up, td.up { color: #dc3a3a; }   /* 红涨绿跌(东财习惯) */
.idx-chg.down, .num.down, td.down { color: #239e4f; }
.idx-ctrl .variant-btn { padding: 5px 12px; margin-left: 6px; background: transparent; border: 1px solid var(--border); color: var(--text-dim); border-radius: 6px; cursor: pointer; font-size: 12px; }
.idx-ctrl .variant-btn.active { border-color: #3fb950; color: #3fb950; }
.chart-wrap { position: relative; margin-top: 10px; }
#idx-chart { width: 100%; height: 240px; display: block; cursor: crosshair; }
.chart-tip { position: absolute; display: none; pointer-events: none; z-index: 5; background: rgba(20,22,28,.95);
  border: 1px solid var(--border); border-radius: 6px; padding: 4px 8px; font-size: 12px; white-space: nowrap; }
.chart-tip b { font-size: 15px; display: block; color: var(--text); }
.chart-tip span { color: var(--text-dim); font-size: 11px; }

.ai-treemap h4, .ai-weights h4, .ai-sectors h4 { margin: 18px 0 8px; }
.sec-sub { font-size: 12px; color: var(--text-dim); font-weight: 400; }

/* 板块占比条 */
.sec-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.sec-ctrl .sec-btn { padding: 4px 11px; margin-left: 6px; background: transparent; border: 1px solid var(--border); color: var(--text-dim); border-radius: 6px; cursor: pointer; font-size: 12px; }
.sec-ctrl .sec-btn.active { border-color: var(--text); color: var(--text); }
.sector-bar { display: flex; width: 100%; height: 34px; border-radius: 7px; overflow: hidden; }
.sec-seg { display: flex; align-items: center; justify-content: center; min-width: 2px; transition: width .3s; }
.sec-seg span { font-size: 12px; font-weight: 700; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.5); white-space: nowrap; }
.sector-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; font-size: 12px; color: var(--text-dim); }
.lg-item i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: middle; }
.lg-item b { color: var(--text); }
.lg-item em { opacity: .65; font-style: normal; }
.lg-note { color: #d29922; }

/* Eastmoney 风格嵌套热力图 */
.treemap { position: relative; width: 100%; height: 460px; background: #0d1117; border-radius: 6px; overflow: hidden; }
.tm-tile { position: absolute; display: flex; flex-direction: column; justify-content: center; align-items: center;
  box-sizing: border-box; cursor: pointer; overflow: hidden; padding: 1px; }
.tm-tile:hover { outline: 2px solid #fff; z-index: 3; }
.tm-name { font-size: 13px; font-weight: 700; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.8); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tm-name.sm { font-size: 10px; }
.tm-chg { font-size: 11px; color: #f0f0f0; text-shadow: 0 1px 2px rgba(0,0,0,.8); }
.tm-secbox { position: absolute; box-sizing: border-box; border: 2px solid; border-radius: 3px; pointer-events: none; z-index: 2; opacity: .85; }
.tm-slabel { position: absolute; z-index: 4; font-size: 11px; font-weight: 700; color: #fff; padding: 1px 6px; border-radius: 0 0 5px 0; pointer-events: none; opacity: .95; }

.ai-weights table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ai-weights th, .ai-weights td { padding: 5px 10px; border-bottom: 1px solid var(--border); text-align: left; }
.ai-weights th.num, .ai-weights td.num { text-align: right; }
.priv { font-size: 10px; color: #d29922; border: 1px solid #d29922; border-radius: 3px; padding: 0 3px; }

/* watchlist 行跳转高亮 */
tr.row-hl { animation: hl 2s ease-out; }
@keyframes hl { 0% { background: rgba(210,153,34,.35); } 100% { background: transparent; } }
