/* 分时买卖点判断工具（个股页 KDJ 图下方） */

.intraday-card {
  margin-top: 14px; background: var(--panel); border: 1px solid var(--border);
  border-radius: 12px; padding: 13px 15px;
  /* 用户要求：整列高度和右边侧栏对齐 —— 多出来的高度由这张卡吸收（K 线图仍固定 720px） */
  display: flex; flex-direction: column;
  flex: 1 1 auto; min-height: 0;
}
.intraday-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.intraday-title { font-size: 14px; font-weight: 700; }
.intraday-status { font-size: 12px; color: var(--muted); flex: 1; min-width: 0; }

.intraday-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 8px; margin: 10px 0 8px;
}
.id-stat { background: #111721; border: 1px solid #1e2733; border-radius: 8px; padding: 7px 10px; }
.id-stat .k { font-size: 10.5px; color: var(--muted); }
.id-stat .v { font-size: 15px; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; }
.id-stat .s { font-size: 10px; color: #5f6a79; margin-top: 1px; }

.intraday-chart { width: 100%; height: 300px; }

.intraday-signals {
  margin-top: 8px; min-height: 120px; max-height: 230px; overflow-y: auto;
  /* 高度有富余时由这块吃掉，信号多的时候内部滚动，不会在卡片底部留一大片空白 */
  flex: 1 1 auto;
}
.id-sig {
  display: flex; gap: 9px; align-items: flex-start; padding: 8px 2px;
  border-bottom: 1px dashed #1e2733; font-size: 12.5px;
}
.id-sig:last-child { border-bottom: none; }
.id-sig .id-time { flex: 0 0 42px; color: var(--muted); font-variant-numeric: tabular-nums; }
.id-sig .id-badge {
  flex: 0 0 40px; text-align: center; font-size: 11px; font-weight: 800;
  padding: 1px 0; border-radius: 5px;
}
.id-sig .id-badge.buy { background: rgba(240,69,58,.16); color: #ff8b80; }
.id-sig .id-badge.sell { background: rgba(18,196,107,.15); color: #42d98c; }
.id-sig .id-main { min-width: 0; }
.id-sig .id-type { color: #e2e8f0; font-weight: 600; }
.id-sig .id-price { color: #8fb6ff; font-size: 11.5px; margin-left: 6px; }
.id-sig .id-reason { color: #93a1b3; font-size: 12px; line-height: 1.7; margin-top: 2px; }
.id-sig .id-star { color: #e8c46a; font-size: 11px; margin-left: 4px; }
/* 每条信号后面挂上它自己的历史成绩（来自分时回测） */
.id-sig .id-hist {
  margin-top: 3px; font-size: 10.5px; color: #6b7686;
}
.id-sig .id-hist b { color: #93a1b3; font-weight: 600; }
.id-sig .id-hist .g { color: #42d98c; }
.id-sig .id-hist .r { color: #ff8b80; }

/* --------------------- 分时信号回测 · 每日自进化 --------------------- */
.intraday-bt {
  margin-top: 10px; padding-top: 9px; border-top: 1px dashed #1e2733;
}
.ibt-head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.ibt-title { font-size: 13px; font-weight: 700; }
.ibt-sub { font-size: 11.5px; color: var(--muted); flex: 1; min-width: 0; }
.ibt-sum {
  margin-top: 8px; font-size: 11.5px; line-height: 1.8; color: #93a1b3;
}
.ibt-sum b { color: #e2e8f0; }
.ibt-table { width: 100%; border-collapse: collapse; font-size: 11.5px; margin-top: 7px; }
.ibt-table th {
  text-align: left; color: var(--muted); font-weight: 600; font-size: 11px;
  padding: 4px 8px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.ibt-table td { padding: 4px 8px; border-bottom: 1px dashed #1a2230; vertical-align: middle; }
.ibt-table td.num { text-align: left; font-variant-numeric: tabular-nums; }
.ibt-table .v-ok { color: #42d98c; }
.ibt-table .v-mid { color: #e8c46a; }
.ibt-table .v-bad { color: #ff8b80; }
.ibt-table .v-na { color: #5f6a79; }
.ibt-table .side-buy { color: #ff8b80; font-weight: 600; }
.ibt-table .side-sell { color: #42d98c; font-weight: 600; }
.ibt-off {
  margin-top: 8px; padding: 7px 10px; border-radius: 8px; font-size: 11px; line-height: 1.8;
  background: rgba(240,69,58,.06); border: 1px solid rgba(240,69,58,.22); color: #c98b85;
}
.ibt-log {
  margin-top: 8px; font-size: 10.5px; color: #5f6a79; line-height: 1.9;
  max-height: 96px; overflow-y: auto; white-space: pre-wrap;
}

.intraday-foot {
  margin-top: 10px; padding-top: 9px; border-top: 1px dashed #1e2733;
  font-size: 11.5px; color: #66748a; line-height: 1.8;
}
.intraday-foot b { color: #e8c46a; }

@media (max-width: 768px) {
  .intraday-card { padding: 11px 12px; }
  .intraday-title { flex: 1 1 100%; }
  .intraday-status {
    flex: 1 0 100%; order: 5; width: 100%; white-space: normal; overflow-wrap: anywhere;
  }
  .intraday-chart { height: 240px; }
  .intraday-stats { grid-template-columns: repeat(2, 1fr); }
}
