@font-face {
  font-family: Inter;
  src: url("/assets/assets/fonts/inter-latin-var.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}
.bt-v2 {
  font-family: Inter, "Noto Sans SC", sans-serif;
  color: #e4e4e7;
  background: #09090b;
  font-size: 12px;
  line-height: 1.5;
  font-synthesis: none;
  color-scheme: dark;
  --border: #27272a;
  --muted: #888891;
  --amber: #f4b942;
  --panel: #101014;
}
.bt-v2 * {
  box-sizing: border-box;
}
body.backtest-page {
  margin: 0;
  min-width: 320px;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
.bt-v2 button,
.bt-v2 input,
.bt-v2 select {
  font: inherit;
  color: inherit;
}
.bt-v2 button {
  cursor: pointer;
}
.bt-v2 button:disabled {
  cursor: default;
  opacity: 0.4;
}
.bt-v2 button,
.bt-v2 a,
.bt-v2 input,
.bt-v2 select,
.bt-v2 tr[tabindex] {
  outline: none;
}
.bt-v2 button:focus-visible,
.bt-v2 input:focus-visible,
.bt-v2 select:focus-visible,
.bt-v2 tr:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: -2px;
}
.bt-v2 button {
  border: 0;
}
.bt-v2 h1,
.bt-v2 h2,
.bt-v2 h3,
.bt-v2 p {
  margin: 0;
}
.bt-v2 h2 {
  font-size: 13px;
  font-weight: 600;
}
.bt-v2 h3 {
  font-size: 12px;
  font-weight: 600;
  margin: 20px 0 12px;
}
.bt-v2 svg.lucide {
  flex-shrink: 0;
  stroke-width: 1.7;
}
.bt-v2 button svg.lucide {
  vertical-align: middle;
}
.bt-v2 input[type="checkbox"] {
  accent-color: var(--amber);
  width: 13px;
  height: 13px;
  margin: 0;
}
.bt-v2 label {
  cursor: pointer;
}
.bt-v2.bt-app {
  height: 100dvh;
  display: flex;
  flex-direction: column;
}
.bt-v2 .app-header {
  height: 50px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 16px;
  background: #09090b;
}
.bt-v2 .brand {
  display: flex;
  gap: 7px;
  align-items: center;
  background: none;
  padding: 0;
  color: #fafafa;
  font-size: 14px;
}
.bt-v2 .brand img {
  width: 25px;
  height: 25px;
}
.bt-v2 .app-header nav {
  display: flex;
  gap: 4px;
  height: 100%;
  align-items: center;
}
.bt-v2 .app-header nav button {
  height: 33px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 550;
}
.bt-v2 .app-header nav button:hover {
  background: #18181c;
}
.bt-v2 .app-header nav .current {
  background: #1a1a1d;
  border-color: #29292e;
  color: #fafafa;
}
.bt-v2 .header-end {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.bt-v2 .snapshot-button {
  height: 32px;
  background: #101014;
  border: 1px solid var(--border);
  padding: 0 10px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
}
.bt-v2 .status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #85b992;
  box-shadow: 0 0 0 3px #85b9920b;
}
.bt-v2 .badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid #323238;
  border-radius: 4px;
  font-size: 10px;
  line-height: 16px;
  padding: 0 5px;
  white-space: nowrap;
  color: #aaaab4;
  font-weight: 400;
}
.bt-v2 .prototype-tag {
  height: 24px;
  padding: 0 8px;
}
.bt-v2 .workspace-toolbar {
  height: 64px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.bt-v2 .toolbar-left,
.bt-v2 .toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.bt-v2 .workspace-title {
  min-width: 0;
}
.bt-v2 .workspace-title > div {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.bt-v2 .workspace-title strong {
  font-size: 14px;
  color: #fafafa;
}
.bt-v2 .workspace-title small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  max-width: 52vw;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 3px;
}
.bt-v2 .title-divider {
  color: #44444c;
}
.bt-v2 .workspace-title > div > span:not(.badge) {
  color: #a1a1aa;
}
.bt-v2 .new-mobile {
  display: none !important;
}
.bt-v2 .workspace {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) 300px;
  gap: 12px;
  padding: 12px;
  flex: 1;
  min-height: 0;
  min-width: 0;
}
.bt-v2 .workspace.hide-rail {
  grid-template-columns: minmax(0, 1fr) 300px;
}
.bt-v2 .workspace.hide-rail .desktop-rail {
  display: none;
}
.bt-v2 .workspace.hide-inspector {
  grid-template-columns: 240px minmax(0, 1fr);
}
.bt-v2 .workspace.hide-inspector .desktop-inspector {
  display: none;
}
.bt-v2 .workspace.hide-rail.hide-inspector {
  grid-template-columns: minmax(0, 1fr);
}
.bt-v2 .panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}
.bt-v2 .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  padding: 0 10px;
  border: 1px solid transparent;
  flex-shrink: 0;
}
.bt-v2 .outline {
  background: #141418;
  border-color: #303036;
}
.bt-v2 .outline:hover {
  background: #202026;
}
.bt-v2 .primary {
  background: var(--amber);
  border-color: #d8a33b;
  color: #17130a;
}
.bt-v2 .primary:hover {
  background: #fac85f;
}
.bt-v2 .ghost {
  background: transparent;
  color: #9999a4;
}
.bt-v2 .ghost:hover {
  background: #24242a;
  color: #fafafa;
}
.bt-v2 .icon-button {
  height: 30px;
  width: 30px;
  padding: 6px;
  flex-shrink: 0;
}
.bt-v2 .button:disabled {
  pointer-events: none;
}
.bt-v2 .full {
  width: 100%;
}
.bt-v2 .select {
  height: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 7px;
  background: #121216;
  border: 1px solid #303036;
  border-radius: 6px;
  min-width: 0;
  max-width: 100%;
  padding: 0 9px;
  overflow: hidden;
  font-size: 11px;
}
.bt-v2 .select > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.bt-v2 .select-content {
  z-index: 100;
  background: #17171c;
  border: 1px solid #34343c;
  border-radius: 6px;
  max-width: min(560px, calc(100vw - 24px));
  min-width: var(--radix-select-trigger-width);
  max-height: var(--radix-select-content-available-height);
  box-shadow: 0 10px 40px #0007;
  overflow: auto;
}
.bt-v2 .select-item {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  min-height: 32px;
  padding: 7px 10px;
  font-size: 11px;
  outline: 0;
  max-width: 100%;
  word-break: break-all;
}
.bt-v2 .select-item[data-highlighted] {
  background: #29272a;
  color: var(--amber);
}
.bt-v2 .search {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  border: 1px solid #303036;
  border-radius: 6px;
  padding: 0 8px;
  background: #0b0b0e;
  color: #8d8d96;
}
.bt-v2 .search input {
  background: none;
  border: 0;
  min-width: 0;
  flex: 1;
  font-size: 11px;
  outline: none;
}
.bt-v2 .search:focus-within {
  border-color: #b78c35;
}
.bt-v2 .search .icon-button {
  width: 22px;
  height: 24px;
  padding: 3px;
}
.bt-v2 .search input::-webkit-search-cancel-button {
  display: none;
}
.bt-v2 .search input::placeholder {
  color: #80808a;
}
.bt-v2 .run-library {
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.bt-v2 .rail-heading {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 12px 8px;
}
.bt-v2 .rail-heading > .icon-button {
  margin-left: auto;
}
.bt-v2 .rail-controls {
  padding: 0 12px 6px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bt-v2 .filter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.bt-v2 .rail-toggles {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #a1a1aa;
  font-size: 10px;
}
.bt-v2 .rail-toggles label {
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.bt-v2 .rail-toggles > .icon-button {
  margin-left: auto;
  width: 22px;
  height: 25px;
}
.bt-v2 .text-button {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  padding: 0;
  color: #8c8c97;
  font-size: 10px;
  white-space: nowrap;
}
.bt-v2 .amber {
  color: var(--amber) !important;
}
.bt-v2 .run-list {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 3px 7px;
}
.bt-v2 .run-row {
  display: block;
  width: 100%;
  text-align: left;
  min-height: 88px;
  margin: 0 0 6px;
  padding: 11px 9px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  overflow: hidden;
}
.bt-v2 .run-row:hover {
  background: #18181d;
}
.bt-v2 .run-row.selected,
.bt-v2 .version-row.selected,
.bt-v2 .symbol-chip.selected,
.bt-v2 .history-row.selected {
  background: #f4b94210;
  border-color: #ad873c;
}
.bt-v2 .run-row > div {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.bt-v2 .run-row strong {
  display: flex;
  gap: 5px;
  align-items: center;
  font-weight: 600;
  font-size: 12px;
  min-width: 0;
  white-space: nowrap;
}
.bt-v2 .run-state {
  margin-left: auto;
  white-space: nowrap;
  font-size: 10px;
  color: #878791;
}
.bt-v2 .run-state.completed {
  color: #8cbb9b;
}
.bt-v2 .run-state.failed {
  color: #dd8d8f;
}
.bt-v2 .run-row p {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 11px;
  color: #b9b9c2;
  margin: 7px 0;
}
.bt-v2 .run-row.selected strong {
  color: #e5c87d;
}
.bt-v2 .run-meta {
  font-size: 10px;
  color: #81818d;
  justify-content: space-between;
  gap: 4px;
}
.bt-v2 .run-meta span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bt-v2 .run-meta b {
  font-size: 11px;
  font-weight: 500;
  color: #d1d1d8;
}
.bt-v2 .positive {
  color: #95c8a8 !important;
}
.bt-v2 .group-label {
  font-size: 10px;
  color: #82828b;
  padding: 7px 9px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bt-v2 .pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3px;
  border-top: 1px solid var(--border);
  padding: 7px 10px;
  font-size: 10px;
  color: #90909b;
  flex-shrink: 0;
}
.bt-v2 .pager > div {
  display: flex;
  align-items: center;
  gap: 5px;
}
.bt-v2 .pager > div > span {
  white-space: nowrap;
}
.bt-v2 .analysis {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  min-width: 0;
}
.bt-v2 .metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  flex-shrink: 0;
}
.bt-v2 .stat {
  padding: 11px 12px 9px;
  background: #14130f;
  border: 1px solid #373123;
  border-radius: 6px;
  min-width: 0;
  height: 98px;
}
.bt-v2 .stat > div {
  display: flex;
  justify-content: space-between;
  gap: 4px;
  color: #a4a2a0;
  font-size: 10px;
}
.bt-v2 .stat > div svg {
  color: #7c7460;
}
.bt-v2 .stat strong {
  display: block;
  font-size: 25px;
  line-height: 33px;
  font-weight: 650;
  text-align: right;
  letter-spacing: -0.8px;
  color: #fafafa;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.bt-v2 .stat small {
  display: block;
  color: #85817b;
  font-size: 9px;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bt-v2 .analysis-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.bt-v2 .analysis-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  height: 48px;
  padding: 0 10px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.bt-v2 .analysis-controls > .tabs,
.bt-v2 .analysis-controls > div:has(> .tabs) {
  display: none;
}
.bt-v2 .chart-heading {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  font-size: 11px;
}
.bt-v2 .chart-heading > svg {
  color: #7c7c86;
}
.bt-v2 .chart-heading span {
  color: #868692;
  font-size: 10px;
  white-space: nowrap;
}
.bt-v2 .chart-filters {
  display: flex;
  align-items: center;
  gap: 4px;
}
.bt-v2 .chart-filters .select {
  height: 28px;
  min-width: 55px;
}
.bt-v2 .chart-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 180px;
  overflow: hidden;
}
.bt-v2 .detail-section {
  height: 235px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex-shrink: 0;
  border-top: 1px solid var(--border);
}
.bt-v2 .detail-section.collapsed {
  display: none;
}
.bt-v2 .detail-toolbar {
  height: 43px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.bt-v2 .tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
}
.bt-v2 .tab {
  font-size: 11px;
  padding: 7px 10px;
  white-space: nowrap;
  line-height: 17px;
  color: #93939e;
  background: none;
  border-bottom: 2px solid transparent;
}
.bt-v2 .tab[data-state="active"] {
  color: #e7c471;
  border-bottom-color: var(--amber);
  background: #f4b94207;
}
.bt-v2 .tab:hover {
  color: #ddd;
}
.bt-v2 .table-hint {
  font-size: 9px;
  color: #6f6f7b;
  white-space: nowrap;
}
.bt-v2 .table-scroll {
  overflow: auto;
  min-height: 0;
  flex: 1;
  position: relative;
}
.bt-v2 .table-scroll table {
  border-collapse: collapse;
  width: 100%;
  white-space: nowrap;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}
.bt-v2 .table-scroll thead {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #15151a;
}
.bt-v2 .table-scroll th {
  text-align: left;
  font-weight: 450;
  color: #8f8f9a;
  height: 30px;
  padding: 0 11px;
  border-bottom: 1px solid var(--border);
}
.bt-v2 .table-scroll td {
  height: 35px;
  padding: 4px 11px;
  border-bottom: 1px solid #202025;
  color: #b8b8c3;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bt-v2 .table-scroll tr[tabindex] {
  cursor: pointer;
}
.bt-v2 .table-scroll tr[tabindex]:hover,
.bt-v2 .table-scroll tr.active {
  background: #f4b9420b;
}
.bt-v2 .table-scroll tr.active td:first-child {
  color: #e7c471;
}
.bt-v2 .event-kind {
  font-size: 10px;
}
.bt-v2 .event-kind.enter,
.bt-v2 .event-kind.add {
  color: #99c6a8;
}
.bt-v2 .event-kind.exit,
.bt-v2 .event-kind.reduce,
.bt-v2 .event-kind.risk {
  color: #e29295;
}
.bt-v2 .event-kind.trigger {
  color: #b8a0e1;
}
.bt-v2 .analysis-footer {
  height: 27px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 10px;
  color: #6f6f7b;
  border-top: 1px solid var(--border);
  font-size: 9px;
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
}
.bt-v2 .analysis-footer span {
  display: flex;
  align-items: center;
  gap: 4px;
}
.bt-v2 .analysis-footer button {
  display: flex;
  gap: 4px;
  align-items: center;
  background: none;
  color: #9999a3;
  padding: 0;
  font-size: 9px;
}
.bt-v2 .execution-note {
  margin-left: auto;
}
.bt-v2 .inspector {
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.bt-v2 .inspector-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 44px;
  padding: 0 12px;
  flex-shrink: 0;
}
.bt-v2 .inspector > .radix,
.bt-v2 .inspector > .tabs,
.bt-v2 .inspector > div:has(> .tabs) {
  border-bottom: 1px solid var(--border);
  padding: 0 8px;
}
.bt-v2 .inspector .tab {
  padding: 9px 12px;
}
.bt-v2 .inspector-scroll {
  flex: 1;
  overflow: auto;
  padding: 14px;
  min-width: 0;
  min-height: 0;
}
.bt-v2 .inspector-scroll h3:first-child {
  margin-top: 0;
}
.bt-v2 .section-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #91bda0;
  font-size: 10px;
  flex-wrap: wrap;
}
.bt-v2 .section-label .badge {
  margin-left: auto;
}
.bt-v2 .readouts {
  margin: 0;
}
.bt-v2 .readout {
  margin: 0 0 11px;
  min-width: 0;
}
.bt-v2 .readout dt {
  font-size: 10px;
  color: #767683;
  margin-bottom: 3px;
}
.bt-v2 .readout dd {
  margin: 0;
  font-size: 11px;
  color: #c4c4cf;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.bt-v2 .readout dd:hover {
  white-space: normal;
  overflow-wrap: anywhere;
}
.bt-v2 .metric-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 12px;
}
.bt-v2 .metric-details .readout {
  padding: 9px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #0c0c10;
}
.bt-v2 .metric-details .readout dd {
  font-size: 14px;
  color: #e9e9ed;
  font-weight: 550;
}
.bt-v2 .info-note {
  display: flex;
  gap: 7px;
  font-size: 10px;
  line-height: 1.8;
  padding: 9px;
  border: 1px solid #443921;
  border-radius: 5px;
  background: #f4b94208;
  color: #bda773;
  margin: 12px 0;
}
.bt-v2 .muted {
  color: #858591;
  font-size: 10px;
  line-height: 1.8;
  margin: 8px 0 12px;
}
.bt-v2 .history-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #111115;
  margin: 12px 0;
  padding: 11px;
  color: #888894;
  font-size: 10px;
}
.bt-v2 .history-row > div {
  display: flex;
  align-items: center;
  gap: 7px;
}
.bt-v2 .history-row b {
  color: #d4d4dd;
  font-weight: 500;
}
.bt-v2 .history-row .badge {
  margin-left: auto;
}
.bt-v2 details {
  margin: 12px 0;
  color: #92929e;
  font-size: 10px;
}
.bt-v2 summary {
  cursor: pointer;
  padding: 5px 0;
}
.bt-v2 pre {
  overflow: auto;
  font-family: ui-monospace, monospace;
  font-size: 10px;
  max-height: 320px;
  background: #0b0b0e;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 5px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #a7a7b4;
}
.bt-v2 .empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  gap: 10px;
  padding: 24px;
  color: #666674;
  min-height: 120px;
}
.bt-v2 .empty strong {
  font-size: 12px;
  color: #aaaab4;
  font-weight: 500;
}
.bt-v2 .empty p {
  max-width: 320px;
  font-size: 11px;
  line-height: 1.8;
  color: #767683;
}
.bt-v2 .empty .button {
  margin-top: 5px;
}
.bt-v2 .empty:has(.lucide-loader-circle) > svg {
  animation: spin 1.4s linear infinite;
}
.bt-v2 .audit-toolbar {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 9px;
  color: #8e8e9a;
  padding: 6px 10px;
  border-bottom: 1px solid var(--border);
}
.bt-v2 .audit-toolbar select {
  font-size: 10px;
  border: 1px solid var(--border);
  background: #0e0e12;
  border-radius: 4px;
  max-width: 65%;
  padding: 3px 5px;
}
.bt-v2 .load-more {
  display: flex;
  margin: 10px auto;
  font-size: 10px;
  height: 28px;
}
.bt-v2 .overlay {
  position: fixed;
  inset: 0;
  background: #0009;
  z-index: 50;
  backdrop-filter: blur(3px);
  animation: fade 0.15s;
}
.bt-v2 .dialog {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(620px, calc(100vw - 24px));
  max-height: calc(100dvh - 32px);
  display: flex;
  flex-direction: column;
  background: #111115;
  border: 1px solid #34343b;
  border-radius: 9px;
  box-shadow: 0 24px 80px #000b;
  z-index: 51;
  overflow: hidden;
}
.bt-v2 .dialog-head {
  padding: 18px 20px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
}
.bt-v2 .dialog-head h2 {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 5px;
}
.bt-v2 .dialog-head p {
  font-size: 10px;
  line-height: 1.8;
  color: #858592;
  margin: 0;
  max-width: 480px;
}
.bt-v2 .create-body,
.bt-v2 .source-body,
.bt-v2 .job-body {
  overflow: auto;
  padding: 18px 20px;
  min-height: 0;
}
.bt-v2 .form-section {
  margin-bottom: 18px;
}
.bt-v2 .field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
  font-weight: 500;
}
.bt-v2 .field-label span {
  font-size: 10px;
  color: #777783;
  font-weight: 400;
}
.bt-v2 .version-list {
  max-height: 170px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-top: 8px;
  background: #0d0d11;
}
.bt-v2 .version-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: none;
  border: 1px solid transparent;
  text-align: left;
  padding: 9px 10px;
}
.bt-v2 .version-row strong {
  display: block;
  font-size: 11px;
  font-weight: 500;
  word-break: break-all;
}
.bt-v2 .version-row small {
  display: block;
  font-size: 10px;
  color: #81818d;
  margin-top: 3px;
}
.bt-v2 .version-row.selected svg {
  color: var(--amber);
}
.bt-v2 .form-section > .select {
  width: 100%;
}
.bt-v2 .route-summary {
  display: flex;
  gap: 18px;
  margin-top: 9px;
  color: #777783;
  font-size: 10px;
}
.bt-v2 .route-summary b {
  font-weight: 400;
  color: #babac4;
  margin-left: 8px;
}
.bt-v2 .symbol-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 145px;
  overflow: auto;
  padding: 1px;
}
.bt-v2 .symbol-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  border: 1px solid #303036;
  border-radius: 5px;
  background: #0d0d11;
  font-size: 10px;
}
.bt-v2 .symbol-chip strong {
  font-weight: 550;
}
.bt-v2 .symbol-chip small {
  font-size: 9px;
  color: #888894;
}
.bt-v2 .symbol-chip:disabled {
  opacity: 1;
}
.bt-v2 .check-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin: -2px 0 7px;
}
.bt-v2 .check-actions button {
  background: none;
  color: #bca469;
  font-size: 10px;
  padding: 0;
}
.bt-v2 .dialog-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid var(--border);
  padding: 14px 20px;
  flex-shrink: 0;
}
.bt-v2 .dialog-actions > span {
  margin-right: auto;
  color: #8f8f9c;
  font-size: 10px;
}
.bt-v2 .simulation-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 10px;
  color: #93939f;
}
.bt-v2 .simulation-options label {
  display: flex;
  gap: 7px;
  align-items: center;
}
.bt-v2 .source-body p {
  font-size: 11px;
  color: #9b9ba6;
  line-height: 1.9;
  margin: 16px 0;
}
.bt-v2 .warning {
  color: #dcb874 !important;
  font-size: 11px;
}
.bt-v2 .job-state {
  text-align: center;
  padding: 18px 16px 22px;
  color: #dfbf70;
}
.bt-v2 .job-state h2 {
  font-size: 17px;
  margin: 12px 0 7px;
  color: #e8e8ef;
}
.bt-v2 .job-state p {
  color: #92929e;
  line-height: 1.9;
  font-size: 11px;
}
.bt-v2 .job-state.failed {
  color: #e29598;
}
.bt-v2 .job-body .dialog-actions {
  margin: 16px -20px -18px;
}
.bt-v2 .job-body .readouts {
  border-top: 1px solid var(--border);
  padding-top: 16px;
}
.bt-v2 .toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 120;
  max-width: calc(100vw - 24px);
  display: flex;
  align-items: center;
  gap: 10px;
  background: #222229;
  border: 1px solid #44444d;
  border-radius: 7px;
  padding: 8px 12px;
  box-shadow: 0 12px 40px #0008;
  font-size: 11px;
}
.bt-v2 .sheet {
  top: 0;
  bottom: 0;
  left: auto;
  right: 0;
  transform: none;
  width: 340px;
  max-width: calc(100vw - 32px);
  max-height: 100dvh;
  border-radius: 0;
}
.bt-v2 .sheet.left {
  left: 0;
  right: auto;
}
.bt-v2 .sheet-body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.bt-v2 .sheet-body .rail-heading,
.bt-v2 .sheet-body .inspector-heading {
  display: none;
}
.bt-v2 .sheet-body .rail-controls {
  padding-top: 12px;
}
.bt-v2 .sheet {
  display: none;
}
.bt-v2 .overlay:has(+ .sheet) {
  display: none;
}
.bt-v2 .spin {
  animation: spin 1.4s linear infinite;
}
.bt-v2 ::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
.bt-v2 ::-webkit-scrollbar-thumb {
  background: #36363e;
  border-radius: 4px;
}
.bt-v2 ::-webkit-scrollbar-track {
  background: transparent;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@media (min-width: 1100px) {
  .bt-v2 .workspace-toolbar .toolbar-left > .icon-button {
    display: flex;
  }
  .bt-v2 .workspace-toolbar .toolbar-actions > .icon-button {
    display: flex;
  }
}
@media (max-width: 1099px) {
  .bt-v2 .workspace,
  .bt-v2 .workspace.hide-rail,
  .bt-v2 .workspace.hide-inspector,
  .bt-v2 .workspace.hide-rail.hide-inspector {
    grid-template-columns: minmax(0, 1fr);
  }
  .bt-v2 .desktop-rail,
  .bt-v2 .desktop-inspector {
    display: none !important;
  }
  .bt-v2 .sheet {
    display: flex;
  }
  .bt-v2 .overlay:has(+ .sheet) {
    display: block;
  }
  .bt-v2 .workspace-toolbar {
    padding: 0 12px;
  }
  .bt-v2 .app-header {
    padding: 0 12px;
    gap: 10px;
  }
  .bt-v2 .app-header nav button {
    padding: 0 8px;
    font-size: 11px;
    gap: 5px;
  }
  .bt-v2 .header-end {
    gap: 4px;
  }
  .bt-v2 .prototype-tag {
    display: none;
  }
  .bt-v2 .chart-section {
    min-height: 220px;
  }
  .bt-v2 .detail-section {
    height: 270px;
  }
  .bt-v2 .metrics {
    gap: 8px;
  }
  .bt-v2 .stat {
    height: 100px;
  }
  .bt-v2 .stat strong {
    font-size: 28px;
  }
}
@media (max-width: 599px) {
  .bt-v2 .app-header {
    padding: 0 10px;
    gap: 10px;
  }
  .bt-v2 .brand b {
    display: none;
  }
  .bt-v2 .brand img {
    width: 23px;
    height: 23px;
  }
  .bt-v2 .app-header nav {
    gap: 3px;
    justify-content: space-between;
    flex: 1;
  }
  .bt-v2 .app-header nav button {
    width: 33px;
    height: 33px;
    padding: 8px;
    justify-content: center;
  }
  .bt-v2 .app-header nav button span {
    display: none;
  }
  .bt-v2 .header-end {
    margin-left: 0;
  }
  .bt-v2 .header-end > .icon-button {
    display: none;
  }
  .bt-v2 .snapshot-button {
    width: 29px;
    height: 29px;
    padding: 0;
    justify-content: center;
  }
  .bt-v2 .snapshot-button > span:last-child {
    display: none;
  }
  .bt-v2 .workspace-toolbar {
    height: 87px;
    flex-wrap: wrap;
    align-content: center;
    gap: 7px;
    padding: 8px 10px;
  }
  .bt-v2 .toolbar-left {
    width: 100%;
    gap: 6px;
  }
  .bt-v2 .workspace-title {
    flex: 1;
  }
  .bt-v2 .workspace-title > div {
    gap: 7px;
  }
  .bt-v2 .workspace-title strong {
    font-size: 12px;
  }
  .bt-v2 .workspace-title small {
    max-width: calc(100vw - 66px);
    font-size: 9px;
    margin-top: 2px;
  }
  .bt-v2 .toolbar-left > .icon-button {
    width: 25px;
    height: 27px;
  }
  .bt-v2 .workspace-title > div > .badge {
    margin-left: auto;
    font-size: 9px;
  }
  .bt-v2 .toolbar-actions {
    width: 100%;
    justify-content: flex-end;
    gap: 7px;
    height: 27px;
  }
  .bt-v2 .toolbar-actions .button {
    height: 27px;
    font-size: 10px;
  }
  .bt-v2 .toolbar-actions > .icon-button {
    width: 27px;
  }
  .bt-v2 .new-desktop {
    display: none !important;
  }
  .bt-v2 .new-mobile {
    display: flex !important;
  }
  .bt-v2 .workspace {
    padding: 8px;
    gap: 8px;
  }
  .bt-v2 .analysis {
    gap: 8px;
  }
  .bt-v2 .metrics {
    gap: 5px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .bt-v2 .stat {
    height: 77px;
    padding: 8px 7px;
  }
  .bt-v2 .stat > div {
    font-size: 8px;
    gap: 2px;
  }
  .bt-v2 .stat > div > svg {
    display: none;
  }
  .bt-v2 .stat strong {
    font-size: 18px;
    line-height: 29px;
    letter-spacing: -0.6px;
  }
  .bt-v2 .stat small {
    font-size: 7px;
    text-align: left;
  }
  .bt-v2 .analysis-controls {
    height: 41px;
    padding: 0 6px;
    gap: 3px;
  }
  .bt-v2 .analysis-controls > div:has(> .tabs) {
    display: block;
  }
  .bt-v2 .analysis-controls .tab {
    font-size: 10px;
    padding: 6px 7px;
  }
  .bt-v2 .chart-heading {
    display: none;
  }
  .bt-v2 .chart-filters {
    gap: 0;
  }
  .bt-v2 .chart-filters .select {
    height: 26px;
    min-width: 43px;
    max-width: 75px;
    font-size: 10px;
    padding: 0 6px;
  }
  .bt-v2 .chart-filters > .icon-button {
    width: 25px;
    padding: 5px;
  }
  .bt-v2 .chart-filters > .icon-button:last-child {
    display: none;
  }
  .bt-v2 .chart-section {
    min-height: 0;
  }
  .bt-v2 .detail-section {
    height: auto;
    flex: 1;
    border-top: 0;
  }
  .bt-v2 .detail-section.collapsed {
    display: flex;
  }
  .bt-v2 .mobile-hidden {
    display: none !important;
  }
  .bt-v2 .detail-toolbar {
    padding: 0 4px;
    height: 42px;
  }
  .bt-v2 .detail-toolbar .tab {
    padding: 7px 9px;
    font-size: 10px;
  }
  .bt-v2 .table-hint {
    display: none;
  }
  .bt-v2 .table-scroll table {
    font-size: 10px;
  }
  .bt-v2 .table-scroll td,
  .bt-v2 .table-scroll th {
    padding-left: 10px;
    padding-right: 10px;
  }
  .bt-v2 .table-scroll td {
    height: 43px;
  }
  .bt-v2 .analysis-footer {
    font-size: 8px;
    height: 25px;
    gap: 6px;
    padding: 0 7px;
    justify-content: space-between;
  }
  .bt-v2 .analysis-footer button {
    font-size: 8px;
  }
  .bt-v2 .execution-note {
    display: none !important;
  }
  .bt-v2 .dialog {
    max-height: calc(100dvh - 16px);
    width: calc(100vw - 16px);
    border-radius: 8px;
  }
  .bt-v2 .dialog-head {
    padding: 14px;
  }
  .bt-v2 .create-body,
  .bt-v2 .source-body,
  .bt-v2 .job-body {
    padding: 14px;
  }
  .bt-v2 .dialog-actions {
    padding: 12px 14px;
    flex-wrap: wrap;
  }
  .bt-v2 .dialog-actions > span {
    width: 100%;
    margin: 0 0 3px;
  }
  .bt-v2 .sheet {
    width: 330px;
    max-height: 100dvh;
    border-radius: 0;
  }
  .bt-v2 .sheet .dialog-head {
    padding: 16px;
  }
  .bt-v2 .job-body .dialog-actions {
    margin: 16px -14px -14px;
  }
  .bt-v2 .simulation-options {
    flex-wrap: wrap;
  }
  .bt-v2 .analysis-main {
    overflow: hidden;
  }
  .bt-v2 .chart-section > .empty {
    padding: 16px;
  }
}

body.backtest-page,
body.backtest-page #root {
  height: 100dvh;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  background: #09090b;
  font-family: Inter, system-ui, sans-serif;
}
body.backtest-page .bt-shell.page-shell {
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: 50px minmax(0, 1fr);
}
body.backtest-page .bt-shell.embedded-page-shell {
  grid-template-rows: minmax(0, 1fr);
}
.bt-v2.bt-app {
  height: 100%;
  min-height: 0;
}
.bt-v2.bt-portal {
  background: transparent;
  position: fixed;
  inset: 0;
  height: auto;
  pointer-events: none;
  z-index: 50;
}
.bt-v2.bt-select-portal {
  z-index: 100;
}
.bt-v2.bt-portal .dialog,
.bt-v2.bt-portal .overlay,
.bt-v2.bt-portal .select-content {
  pointer-events: auto;
}
.bt-v2 .searchable-options {
  width: min(420px, calc(100vw - 24px));
  max-height: min(450px, 80dvh);
  padding: 8px;
}
.bt-v2 .searchable-options [role="listbox"] {
  max-height: 330px;
  overflow: auto;
}
.bt-v2 .searchable-options .select-item {
  background: transparent;
  color: inherit;
  width: 100%;
  text-align: left;
  border-radius: 4px;
  word-break: normal;
}
.bt-v2 .searchable-options .select-item:hover {
  background: #2a2821;
  color: #f4b942;
}
.bt-v2 .searchable-options small {
  font-size: 10px;
  color: #888891;
}
.bt-v2 .library-scope {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  padding: 5px 10px;
  color: #858591;
  font-size: 9px;
  border-top: 1px solid #27272a;
}
.bt-v2 .library-scope button {
  background: none;
  color: #d3b36e;
  font-size: 9px;
  padding: 0;
}
.bt-v2 .form-error {
  border: 1px solid #783c44;
  background: #f067700a;
  border-radius: 6px;
  padding: 10px;
  margin: 10px 0;
  color: #e7a4aa;
  font-size: 11px;
}
.bt-v2 .form-error p {
  margin: 6px 0;
  overflow-wrap: anywhere;
}
.bt-v2 .dialog-actions > span {
  display: flex;
  align-items: center;
  gap: 5px;
}
.bt-v2 .simulation-options > div {
  font-size: 10px;
  color: #a3a3ad;
}
.bt-v2 a.button {
  text-decoration: none;
}
@media (max-width: 599px) {
  .bt-v2 .toolbar-left {
    width: 100%;
  }
  .bt-v2 .workspace-toolbar {
    height: 87px;
  }
  .bt-v2 .toolbar-actions .button {
    height: 27px;
    font-size: 10px;
  }
  .bt-v2 .workspace-title small {
    font-size: 9px;
  }
  .bt-v2 .audit-toolbar {
    flex-wrap: wrap;
  }
  .bt-v2 .simulation-options {
    align-items: flex-start;
    flex-direction: column;
  }
}
