/* 回测校准页面样式 */

.bt-config { padding: 14px 22px 0; }
.bt-fields {
  display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: flex-end;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px 16px;
}
.bt-fields label { display: flex; flex-direction: column; gap: 5px; font-size: 11.5px; color: var(--muted); }
.bt-fields select, .bt-fields input[type="number"] {
  padding: 7px 10px; border-radius: 8px; border: 1px solid var(--border);
  background: #0d121a; color: var(--text); outline: none; font-size: 13px; min-width: 96px;
}
.bt-fields select:focus, .bt-fields input:focus { border-color: var(--accent); }
.bt-check { flex-direction: row !important; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text); }
.bt-tip { margin-top: 10px; font-size: 12px; color: #6d7a8b; line-height: 1.7; }
.bt-tip b { color: #8fa0b5; }
.bt-help {
  margin-top: 10px; padding-top: 8px; border-top: 1px dashed #1e2733;
  font-size: 12px; color: #93a1b3;
}
.bt-help > summary { cursor: pointer; color: #8fb6ff; }
.bt-help > summary:hover { color: #b8d2ff; }
.bt-help[open] > summary { margin-bottom: 8px; }
.bt-help .bt-tip, .bt-help .bt-auto-note, .bt-help .bt-legend, .bt-help .sf-note, .bt-help .sf-foot { margin-top: 0; }

.bt-progress { padding: 14px 22px 0; }
.bt-bar { height: 8px; border-radius: 5px; background: #1a2230; overflow: hidden; }
.bt-bar > div {
  height: 100%; width: 0; border-radius: 5px;
  background: linear-gradient(90deg, #4a8cff, #7ea6f0); transition: width .3s;
}
.bt-phase { margin-top: 7px; font-size: 12.5px; color: var(--muted); }

.bt-result { padding: 14px 22px 0; }
.bt-empty { color: var(--muted); font-size: 13px; padding: 26px 4px; }
.bt-empty b { color: #8fa0b5; }

.bt-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 12px; }
.bt-stat { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 11px 13px; }
.bt-stat .k { font-size: 11px; color: var(--muted); }
.bt-stat .v { font-size: 19px; font-weight: 700; margin-top: 3px; font-variant-numeric: tabular-nums; }
.bt-stat .s { font-size: 10.5px; color: #5f6a79; margin-top: 2px; }

.bt-alert {
  border-radius: 10px; padding: 12px 15px; margin-bottom: 12px; font-size: 12.5px; line-height: 1.8;
}
.bt-alert.warn { background: rgba(240,69,58,.1); border: 1px solid rgba(240,69,58,.32); color: #ff9a90; }
.bt-alert.ok { background: rgba(18,196,107,.1); border: 1px solid rgba(18,196,107,.3); color: #6fdca6; }
.bt-alert b { color: #fff; }

.bt-actions { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.bt-btn {
  padding: 8px 16px; border-radius: 9px; border: 1px solid var(--border);
  background: #1a2230; color: var(--text); font-size: 13px; cursor: pointer;
}
.bt-btn:hover { border-color: #34445c; }
.bt-btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.bt-btn.primary:hover { background: #3c7ae8; }
.bt-btn:disabled { opacity: .45; cursor: not-allowed; }
.bt-msg { font-size: 12.5px; color: var(--muted); }

.bt-table-wrap { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; overflow: auto; }
.bt-table { width: 100%; border-collapse: collapse; font-size: 12.5px; white-space: nowrap; }
.bt-table th {
  background: #171f2b;
  text-align: left; font-size: 11.5px; color: #66748a; font-weight: 600;
  padding: 9px 10px; border-bottom: 1px solid var(--border);
}
.bt-table td { padding: 9px 10px; border-bottom: 1px dashed #1e2733; }
.bt-table tr:last-child td { border-bottom: none; }
.bt-table tr:hover td { background: #121924; }
.bt-table .num { font-variant-numeric: tabular-nums; text-align: left; }
.bt-table .sig { font-weight: 600; }
.bt-table .side { font-size: 11px; padding: 1px 6px; border-radius: 4px; }
.bt-table .side.buy { background: rgba(240,69,58,.15); color: #ff8b80; }
.bt-table .side.sell { background: rgba(18,196,107,.15); color: #5fd39a; }
.pos { color: #f0453a; }
.neg { color: #12c46b; }
.muted { color: #55606f; }
.bt-w { font-weight: 700; font-variant-numeric: tabular-nums; }
.bt-w.up { color: #ff8b80; }
.bt-w.down { color: #12c46b; }
.bt-pass { font-weight: 700; }
.bt-pass.y { color: #12c46b; }
.bt-pass.n { color: #55606f; }
.bt-arrow { color: #55606f; margin: 0 4px; }

.bt-legend { font-size: 11.5px; color: #5f6a79; line-height: 1.8; margin-top: 10px; }

@media (max-width: 768px) {
  .bt-config, .bt-progress, .bt-result { padding-left: 12px; padding-right: 12px; }
  .bt-fields { padding: 12px; gap: 10px 12px; }
  .bt-summary { grid-template-columns: 1fr 1fr; }
}
/* ---------------- 每日自动优化 ---------------- */
.bt-auto { margin: 14px 22px 0; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.bt-auto-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bt-auto-title { font-size: 14px; font-weight: 700; }
.bt-auto-info { flex: 1; min-width: 0; font-size: 12px; color: var(--muted); }
.bt-auto-note {
  margin-top: 9px; padding: 9px 12px; font-size: 12px; line-height: 1.85;
  background: rgba(74,140,255,.06); border: 1px solid rgba(74,140,255,.2);
  border-radius: 8px; color: #93a1b3;
}
.bt-auto-note b { color: #8fb6ff; }
.bt-auto-note code { background: #0d121a; padding: 1px 6px; border-radius: 5px; font-size: 11.5px; color: #c3cddb; }

/* 自建因子验收表（2026-10-12）：只读展示，标注样本内/样本外，通过的打标签 */
.sf-note { margin-top: 9px; font-size: 11.5px; line-height: 1.8; color: #93a1b3; }
.sf-note b { color: #e2e8f0; }
.sf-table { width: 100%; border-collapse: collapse; font-size: 11.5px; margin-top: 8px; }
.sf-table th { color: #7f8b9c; font-weight: 600; text-align: left; padding: 5px 8px; border-bottom: 1px solid #242c39; }
.sf-table td { padding: 5px 8px; border-bottom: 1px solid #1a212a; vertical-align: middle; text-align: left; }
.sf-table .num { text-align: left; }
.sf-table .g { color: #42d98c; }
.sf-table .r { color: #ff8b80; }
.sf-pass { color: #42d98c; font-size: 10.5px; }
.sf-sub-title { margin-top: 14px; font-size: 12.5px; font-weight: 600; color: #c3cddb; }
.sf-foot { margin-top: 10px; font-size: 11.5px; line-height: 1.8; color: #93a1b3; }
.bt-auto-body { margin-top: 12px; display: grid; gap: 8px; }
.bt-auto-step {
  display: grid; grid-template-columns: 190px minmax(0, 1fr) 62px; gap: 12px; align-items: baseline;
  padding: 8px 10px; background: #111721; border: 1px solid #1e2733; border-radius: 8px; font-size: 12.5px;
}
.bt-auto-step .s-name { font-weight: 600; color: #e2e8f0; }
.bt-auto-step .s-detail { color: #93a1b3; line-height: 1.7; min-width: 0; word-break: break-word; }
.bt-auto-step .s-ok { text-align: right; font-size: 11.5px; }
.bt-auto-step .s-ok.yes { color: #42d98c; }
.bt-auto-step .s-ok.no { color: #ff8b80; }
.bt-auto-hist { margin-top: 6px; border-top: 1px dashed #1e2733; padding-top: 10px; }
.bt-auto-hist h4 { margin: 0 0 7px; font-size: 12px; color: #66748a; font-weight: 600; }
.bt-auto-hist table { width: 100%; border-collapse: collapse; font-size: 12px; }
.bt-auto-hist th { text-align: left; color: #66748a; font-size: 11px; font-weight: 600; padding: 5px 6px; border-bottom: 1px solid var(--border); }
.bt-auto-hist td { padding: 6px; border-bottom: 1px dashed #1e2733; color: #93a1b3; }
.bt-auto-hist td:last-child { color: #aab6c6; }
.bt-auto-logwrap { margin-top: 12px; }
.bt-auto-logwrap summary { cursor: pointer; font-size: 12px; color: #8fb6ff; }
.bt-auto-log {
  margin: 8px 0 0; padding: 10px 12px; max-height: 260px; overflow: auto;
  background: #0b0f16; border: 1px solid #1e2733; border-radius: 8px;
  font-size: 11.5px; line-height: 1.75; color: #93a1b3; white-space: pre-wrap; word-break: break-word;
}

@media (max-width: 900px) {
  .bt-auto { margin-left: 12px; margin-right: 12px; }
  .bt-auto-step { grid-template-columns: 1fr; gap: 4px; }
  .bt-auto-step .s-ok { text-align: left; }
}
