body.page-quant {
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.page-quant .quant-shell {
  width: min(1480px, calc(100% - 36px));
  height: calc(100vh - 66px);
  height: calc(100dvh - 66px);
  margin: 0 auto;
  padding: 0;
  overflow: hidden;
}

#quant-event-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(480px, 0.82fr);
  align-items: start;
  gap: 10px;
  height: 100%;
  min-height: 0;
  padding-top: 0;
}

#quant-event-content[hidden] {
  display: none;
}

.quant-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 28px;
}

.quant-kicker,
.panel-eyebrow {
  color: var(--ct-cyan);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.quant-header h1 {
  margin: 10px 0 8px;
  font-size: clamp(32px, 4vw, 50px);
  font-weight: 600;
  letter-spacing: -0.04em;
}

.quant-header p {
  margin: 0;
  color: var(--ct-muted);
  font-size: 14px;
}

.quant-live {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border: 1px solid var(--ct-border);
  border-radius: 999px;
  color: var(--ct-muted);
  background: rgba(255, 255, 255, 0.025);
  font-size: 11px;
}

.quant-live span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ct-green);
  box-shadow: 0 0 12px var(--ct-green);
}

.quant-chart-panel,
.quant-predict-panel {
  min-width: 0;
  height: 100%;
  padding: 12px;
  border: 1px solid var(--ct-border);
  border-radius: var(--ct-radius-lg);
  background: var(--ct-panel);
  box-shadow: var(--ct-shadow);
}

.quant-chart-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.quant-predict-panel {
  display: flex;
  flex-direction: column;
  margin-top: 0;
  overflow: hidden;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.panel-heading.predict-heading {
  min-height: 38px;
  margin-top: -9px;
  margin-bottom: 0;
  flex: 0 0 auto;
  transform: none;
}

.panel-heading.predict-heading h2 {
  margin: 0;
}

.panel-heading h2 {
  margin: 5px 0 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.panel-meta {
  color: var(--ct-muted);
  font-size: 11px;
}

.quant-symbol-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 0 4px 10px;
  transform: translateY(-4px);
}

.quant-symbol-toolbar label {
  display: inline-flex;
  height: 28px;
  margin: 0;
  align-items: center;
  color: var(--ct-muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.quant-symbol-toolbar select {
  display: block;
  width: 150px;
  height: 28px;
  margin: 0;
  padding: 0 28px 0 10px;
  border: 1px solid var(--ct-border);
  border-radius: 7px;
  color: var(--ct-text);
  background: #0b1423;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.quant-symbol-toolbar .symbol-hint {
  color: var(--ct-muted);
  font-size: 10px;
  line-height: 1.4;
  white-space: nowrap;
}

.tradingview-chart {
  position: relative;
  height: auto;
  min-height: 0;
  margin-top: -8px;
  flex: 1 1 auto;
  overflow: hidden;
  border: 1px solid var(--ct-border);
  border-radius: 14px;
  background: #050914;
}

.chart-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--ct-muted);
  font-size: 12px;
}

.predict-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.predict-actions label {
  color: var(--ct-muted);
  font-size: 11px;
}

.predict-actions select {
  width: 150px;
  min-width: 150px;
  height: 28px;
  padding: 0 28px 0 10px;
  border: 1px solid var(--ct-border);
  border-radius: 7px;
  color: var(--ct-text);
  background: #0b1423;
  font-size: 12px;
  font-weight: 650;
}

.strategy-tooltip {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.strategy-tooltip-icon {
  display: inline-grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 1px solid var(--ct-border);
  border-radius: 50%;
  color: var(--ct-muted);
  font-size: 11px;
  line-height: 1;
  cursor: help;
}

.strategy-tooltip-content {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  z-index: 30;
  width: 286px;
  padding: 12px 14px;
  visibility: hidden;
  border: 1px solid var(--ct-border);
  border-radius: 10px;
  color: var(--ct-muted);
  opacity: 0;
  background: #0b1423;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.36);
  font-size: 11px;
  line-height: 1.75;
  transform: translateY(-4px);
  transition: opacity 150ms ease, transform 150ms ease, visibility 150ms;
}

.strategy-tooltip:hover .strategy-tooltip-content,
.strategy-tooltip:focus-within .strategy-tooltip-content {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

.strategy-tooltip-content a {
  color: var(--ct-cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.predict-summary {
  display: flex;
  flex-wrap: nowrap;
  min-height: 56px;
  margin-top: 1px;
  flex: 0 0 auto;
  gap: 10px;
  margin-bottom: 16px;
  overflow-x: auto;
}

.summary-card {
  min-width: 120px;
  padding: 9px 12px;
  flex: 1 0 120px;
  border: 1px solid var(--ct-border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.summary-card span {
  display: block;
  margin-bottom: 4px;
  color: var(--ct-muted);
  font-size: 9px;
}

.summary-card strong {
  color: var(--ct-text);
  font-size: 15px;
  font-weight: 600;
}

.data-placeholder {
  grid-column: 1 / -1;
  padding: 18px;
  color: var(--ct-muted);
  text-align: center;
}

.predict-table-wrap {
  min-height: 0;
  margin-top: -4px;
  flex: 1 1 auto;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid var(--ct-border);
  border-radius: 14px;
}

.predict-table-wrap table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

@media (max-width: 1180px) {
  body.page-quant {
    height: auto;
    overflow-y: auto;
  }

  .page-quant .quant-shell {
    height: auto;
    overflow: visible;
  }

  #quant-event-content {
    grid-template-columns: 1fr;
    height: auto;
  }

  .quant-chart-panel,
  .quant-predict-panel {
    height: auto;
    margin-top: 0;
  }

  .tradingview-chart {
    height: 544px;
    min-height: 544px;
    flex: none;
  }
}

.predict-table-wrap th,
.predict-table-wrap td {
  padding: 8px 2px;
  border-width: 0 0 1px;
  font-size: 11px;
  line-height: 1.4;
  text-align: center;
  white-space: nowrap;
}

.predict-table-wrap th:nth-child(1),
.predict-table-wrap td:nth-child(1) {
  width: 10%;
}

.predict-table-wrap th:nth-child(2),
.predict-table-wrap td:nth-child(2) {
  width: 8%;
}

.predict-table-wrap th:nth-child(3),
.predict-table-wrap td:nth-child(3),
.predict-table-wrap th:nth-child(6),
.predict-table-wrap td:nth-child(6) {
  width: 19%;
}

.predict-table-wrap th:nth-child(4),
.predict-table-wrap td:nth-child(4),
.predict-table-wrap th:nth-child(7),
.predict-table-wrap td:nth-child(7) {
  width: 12%;
}

.predict-table-wrap th:nth-child(5),
.predict-table-wrap td:nth-child(5),
.predict-table-wrap th:nth-child(8),
.predict-table-wrap td:nth-child(8) {
  width: 10%;
}

.direction-up {
  color: var(--ct-green) !important;
}

.direction-down {
  color: var(--ct-red) !important;
}

.table-empty {
  padding: 30px !important;
  color: var(--ct-muted) !important;
  text-align: center !important;
}

.quant-empty-state {
  display: grid;
  min-height: 520px;
  padding: 64px 28px;
  place-items: center;
  align-content: center;
  border: 1px solid var(--ct-border);
  border-radius: 22px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 20%, rgba(77, 215, 255, 0.08), transparent 18rem),
    rgba(8, 15, 27, 0.74);
  box-shadow: var(--ct-shadow);
}

.quant-empty-state[hidden] {
  display: none;
}

.empty-state-mark {
  width: 48px;
  height: 48px;
  margin-bottom: 20px;
  border: 1px solid rgba(77, 215, 255, 0.28);
  border-radius: 15px;
  background:
    linear-gradient(135deg, rgba(77, 215, 255, 0.18), rgba(109, 124, 255, 0.06));
  box-shadow: 0 0 32px rgba(77, 215, 255, 0.1);
}

.quant-empty-state h1 {
  margin: 12px 0 10px;
  color: var(--ct-text);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 600;
  letter-spacing: -0.035em;
}

.quant-empty-state p {
  max-width: 620px;
  margin: 0;
  color: var(--ct-muted);
  font-size: 14px;
  line-height: 1.8;
}

.quant-empty-state a {
  margin-top: 24px;
  padding: 10px 15px;
  border: 1px solid var(--ct-border);
  border-radius: 10px;
  color: var(--ct-text);
  background: rgba(255, 255, 255, 0.04);
  font-size: 12px;
  text-decoration: none;
}

.page-quant .nav-dropdown-menu a.active {
  color: var(--ct-text);
  background: rgba(77, 215, 255, 0.09);
}

@media (max-width: 760px) {
  .page-quant .quant-shell {
    width: calc(100% - 24px);
    padding-top: 0;
  }

  .quant-header,
  .panel-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .quant-live {
    align-self: flex-start;
  }

  .tradingview-chart {
    height: 416px;
    min-height: 416px;
  }

  .predict-actions {
    width: 100%;
  }

  .predict-actions select {
    flex: 1;
    min-width: 0;
  }
}
