/* M3.3 单日深度复盘页布局基线 */

/* ---- 顶部容器 ---- */
.btmp-detail-container {
  max-width: var(--btmp-shell-max, 1400px);
  margin: 0 auto;
  padding: 16px var(--btmp-shell-pad-x, 24px) 40px;
}

/* ---- 面包屑 ---- */
.btmp-detail-breadcrumb {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 8px 14px;
  background: #fff;
  border: 1px solid #d5dce8;
  border-radius: 6px;
  margin-bottom: 12px;
  font-size: 13px;
}
.btmp-detail-breadcrumb a { color: #1a4fcc; text-decoration: none; }
.btmp-detail-breadcrumb a:hover { text-decoration: underline; color: #1540a8; }
.btmp-detail-date-nav { display: inline-flex; gap: 8px; align-items: center; }
.btmp-detail-date-nav a {
  padding: 4px 10px;
  border-radius: 5px;
  background: #f5f5f7;
  color: #1d1d1f;
  font-weight: 500;
}
.btmp-detail-date-nav a.is-disabled {
  pointer-events: none;
  color: #aaa;
  background: #fafafa;
}
.btmp-detail-date-current {
  font-weight: 600;
  color: #1d1d1f;
  margin: 0 4px;
}

/* ---- [A] 市场摘要条 ---- */
.btmp-detail-market-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  padding: 12px 16px;
  background: #f0f5ff;
  border: 1px solid #cdd9f5;
  border-radius: 6px;
  margin-bottom: 14px;
  font-size: 13px;
}
.btmp-detail-market-bar .slot {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}
.btmp-detail-market-bar .slot-label { color: #595959; }
.btmp-detail-market-bar .slot-value {
  font-weight: 600;
  font-size: 16px;
  color: #1d1d1f;
}
.btmp-detail-market-bar .slot-value.empty { color: #aaa; font-weight: 400; font-size: 13px; }
.btmp-detail-market-bar .anchor-link {
  margin-left: auto;
  color: #0071e3;
  text-decoration: none;
  font-weight: 500;
}
.btmp-detail-market-bar .anchor-link:hover { text-decoration: underline; }

/* ---- [B][C] 同行双列 ---- */
.btmp-detail-row {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  align-items: stretch;
}
.btmp-detail-row > .col-b {
  flex: 0 0 60%;
  min-width: 0;
}
.btmp-detail-row > .col-c {
  flex: 1 1 auto;
  min-width: 0;
}

/* 通用 panel 容器 */
.btmp-panel {
  background: #fff;
  border: 1px solid #d5dce8;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.btmp-panel-head {
  padding: 9px 14px;
  border-bottom: 1px solid #d5dce8;
  background: #f4f7fb;
  border-radius: 8px 8px 0 0;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12.5px;
}
.btmp-panel-head h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  color: #1d1d1f;
}
.btmp-panel-body {
  padding: 8px 0;
  overflow: auto;
}

/* ---- [B] 题材×连板矩阵 ---- */
.btmp-detail-matrix-wrap {
  overflow-x: auto;
  max-height: 560px;
  overflow-y: auto;
}
.btmp-detail-matrix {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  font-size: 13px;
}
.btmp-detail-matrix th,
.btmp-detail-matrix td {
  padding: 6px 10px;
  border-bottom: 1px solid #f5f5f7;
  vertical-align: top;
  background: #fff;
}
.btmp-detail-matrix thead th {
  position: sticky;
  top: 0;
  background: #fafafa;
  z-index: 3;
  font-weight: 500;
  color: #595959;
  text-align: left;
}
.btmp-detail-matrix th.theme-col,
.btmp-detail-matrix td.theme-col {
  position: sticky;
  left: 0;
  background: #fff;
  z-index: 2;
  box-shadow: 2px 0 4px rgba(0,0,0,0.04);
  font-weight: 500;
  color: #1d1d1f;
  white-space: nowrap;
  min-width: 110px;
}
.btmp-detail-matrix thead th.theme-col {
  z-index: 4;
  background: #fafafa;
}
.btmp-detail-matrix .theme-count {
  color: #aaa;
  font-size: 11px;
  margin-left: 4px;
}

/* matrix cell 内的 stock-item */
.btmp-detail-matrix .cell-stocks { display: flex; flex-wrap: wrap; gap: 4px; }
.btmp-detail-matrix .stock-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: 4px;
  background: #f5f5f7;
  color: #1d1d1f;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.12s;
  text-decoration: none;
}
.btmp-detail-matrix .stock-chip:hover { background: #e6f0ff; }
.btmp-detail-matrix .stock-chip.is-20cm { border-left: 3px solid #ff9800; }

/* 次日着色 */
.stock-chip.next-day-limit { background: #ffd6d6; color: #cf1322; }
.stock-chip.next-day-touch { background: #fff1b8; color: #d48806; }
.stock-chip.next-day-drop  { background: #d9f7be; color: #389e0d; }

/* 龙虎角标 */
.lhb-tag {
  display: inline-block;
  padding: 0 4px;
  font-size: 10px;
  border-radius: 3px;
  margin-left: 4px;
  vertical-align: middle;
  font-weight: 500;
}
.lhb-tag.buy  { background: #fff1f0; color: #cf1322; }
.lhb-tag.sell { background: #f0f5ff; color: #1d39c4; }
.lhb-tag.net  { background: #f6ffed; color: #389e0d; }

/* ---- [C] 异动 + 龙虎重点 ---- */
.btmp-detail-action-panel { height: 100%; }
.btmp-detail-action-tabs { display: inline-flex; gap: 4px; }
.btmp-detail-action-tabs .tab {
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  background: #f5f5f7;
  color: #595959;
}
.btmp-detail-action-tabs .tab.is-active {
  background: #0071e3;
  color: #fff;
}
.btmp-detail-events-list { padding: 4px 14px; }
.btmp-detail-event-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px dashed #f5f5f7;
  font-size: 12px;
  cursor: pointer;
}
.btmp-detail-event-row:hover { background: #fafafa; }
.btmp-detail-event-row .ev-time {
  font-family: ui-monospace, monospace;
  color: #86868b;
  flex: 0 0 64px;
}
.btmp-detail-event-row .ev-name { font-weight: 500; flex: 0 0 80px; color: #1d1d1f; }
.btmp-detail-event-row .ev-type { color: #595959; flex: 1 1 auto; }
.btmp-detail-event-row[data-type="break_limit"] .ev-type { color: #d4380d; }
.btmp-detail-event-row[data-type="limit_down"] .ev-type { color: #389e0d; }
.btmp-detail-event-row[data-type="first_limit_up"] .ev-type { color: #cf1322; }
.btmp-detail-event-row[data-type="fast_up"] .ev-type { color: #d48806; }

.btmp-detail-events-empty,
.btmp-detail-lhb-empty {
  padding: 16px;
  text-align: center;
  color: #aaa;
  font-style: italic;
}

.btmp-detail-action-divider {
  border-top: 1px solid #f0f0f0;
  margin: 10px 0;
}
.btmp-detail-lhb-focus {
  padding: 4px 14px 8px;
}
.btmp-detail-lhb-focus h4 {
  font-size: 12px;
  font-weight: 500;
  color: #595959;
  margin: 4px 0 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.btmp-detail-lhb-focus h4 a { color: #0071e3; font-size: 11px; text-decoration: none; }
.btmp-detail-lhb-focus h4 a:hover { text-decoration: underline; }
.btmp-lhb-focus-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  background: #fafafa;
  border-radius: 5px;
  margin-bottom: 4px;
  font-size: 12px;
  cursor: pointer;
}
.btmp-lhb-focus-card:hover { background: #f0f5ff; }
.btmp-lhb-focus-card .name { font-weight: 500; flex: 0 0 70px; }
.btmp-lhb-focus-card .net { color: #cf1322; font-weight: 600; flex: 0 0 70px; }
.btmp-lhb-focus-card .net.neg { color: #389e0d; }
.btmp-lhb-focus-card .seats { color: #86868b; flex: 1 1 auto; font-size: 11px; }

/* ---- [D] 龙虎榜独立区 ---- */
.btmp-detail-lhb-block { margin-bottom: 24px; scroll-margin-top: 80px; }
.btmp-detail-lhb-tabs {
  display: inline-flex;
  gap: 4px;
}
.btmp-detail-lhb-tabs .tab {
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  background: #f5f5f7;
  color: #595959;
}
.btmp-detail-lhb-tabs .tab.is-active {
  background: #0071e3;
  color: #fff;
}
.btmp-detail-lhb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.btmp-detail-lhb-table th,
.btmp-detail-lhb-table td {
  padding: 6px 10px;
  border-bottom: 1px solid #f5f5f7;
  text-align: left;
  vertical-align: middle;
}
.btmp-detail-lhb-table th {
  background: #fafafa;
  font-weight: 500;
  color: #595959;
}
.btmp-detail-lhb-table tr[data-code] { cursor: pointer; }
.btmp-detail-lhb-table tr[data-code]:hover { background: #f0f5ff; }
.btmp-detail-lhb-table .net.pos { color: #cf1322; font-weight: 600; }
.btmp-detail-lhb-table .net.neg { color: #389e0d; font-weight: 600; }
.btmp-detail-lhb-hit-star {
  color: #faad14;
  cursor: help;
  font-size: 13px;
}

.btmp-detail-lhb-net-rank {
  display: flex;
  gap: 16px;
}
.btmp-detail-lhb-net-rank > div { flex: 1 1 0; }

/* ---- [E] 次日表现条 ---- */
.btmp-detail-next-day-bar {
  background: #fff;
  border: 1px solid #d5dce8;
  border-radius: 6px;
  padding: 12px 16px;
  font-size: 13px;
}
.btmp-detail-next-day-row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  padding: 4px 0;
}
.btmp-detail-next-day-row + .btmp-detail-next-day-row {
  border-top: 1px dashed #f0f0f0;
  margin-top: 4px;
  padding-top: 8px;
}
.btmp-detail-next-day-row .row-label {
  color: #595959;
  font-weight: 500;
  flex: 0 0 100px;
}
.btmp-detail-next-day-row .slot {
  display: inline-flex;
  gap: 4px;
  align-items: baseline;
}
.btmp-detail-next-day-row .slot-label { color: #86868b; font-size: 12px; }
.btmp-detail-next-day-row .slot-value { color: #1d1d1f; font-weight: 500; }
.btmp-detail-next-day-row .slot-value.empty { color: #aaa; font-weight: 400; }
.btmp-detail-next-day-row .strongest {
  color: #cf1322;
  font-weight: 500;
}

/* 工具栏 chip 样式 */
.btmp-detail-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
}
.btmp-detail-toolbar .chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 4px;
  background: #f5f5f7;
  cursor: pointer;
}
.btmp-detail-toolbar .chip.active { background: #0071e3; color: #fff; }
.btmp-detail-toolbar input[type="text"],
.btmp-detail-toolbar select {
  padding: 3px 6px;
  border: 1px solid #d2d2d7;
  border-radius: 4px;
  font-size: 12px;
}

/* 响应式 */
@media (max-width: 1100px) {
  .btmp-detail-row { flex-direction: column; }
  .btmp-detail-row > .col-b,
  .btmp-detail-row > .col-c { flex: 1 1 auto; width: 100%; }
}
