/* C1 ownership: Workspace geometry, sizing and scrolling. State-specific layout rules stay here. */
html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
}

*, *::before, *::after { box-sizing: border-box; }

body { margin: 0; }

/* Backward-compatible baseline layout */
.wrap {
  display: flex;
  height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.left {
  width: 360px;
  border-right: 1px solid #ddd;
  padding: 12px;
  overflow: auto;
  box-sizing: border-box;
}
.right {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.wrap.app-shell {
  position: fixed;
  inset: 0;
  display: grid;
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
  grid-template-rows: 52px minmax(0, 1fr) 52px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #ffffff;
}

.top-toolbar {
  position: relative;
  display: grid;
  height: 52px;
  min-height: 52px;
  box-sizing: border-box;
  grid-template-columns: auto auto 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 6px 10px;
}
/* C5: old chrome defaults only for unmarked legacy shells. */
:where(html:not([data-ca-style-v5="2"])) .top-toolbar {
  border-bottom: 2px solid #d9e0ea;
  background: #ffffff;
}
.toolbar-group {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.toolbar-left-zone .nav-row { margin: 0; gap: 6px; }
.toolbar-left-zone #navPos { min-width: 70px; text-align: center; }
.toolbar-timeframe-zone { justify-content: flex-start; gap: 4px; }
:where(html:not([data-ca-style-v5="2"])) .toolbar-drawing-zone { position: absolute; left: calc(50% - 52px); top: 50%; transform: translate(-50%, -50%); justify-content: center; gap: 6px; z-index: 2; }
.toolbar-drawing-zone .btn { white-space: nowrap; }
.toolbar-save-zone { justify-content: flex-end; gap: 6px; margin-left: auto; }

.main-shell {
  min-height: 0;
  height: 100%;
  overflow: hidden;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 320px 44px !important;
}
.left-panel {
  border-right: 1px solid #ddd;
  padding: 10px;
  overflow: auto;
  box-sizing: border-box;
  background: #fafafa;
}
.left-panel-hidden { display: none !important; }
.left-utility-shell {
  grid-column: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 8px 6px;
  box-sizing: border-box;
  overflow: hidden;
}
.left-utility-rail {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  width: 100%;
  min-height: 100%;
}

.center-panel {
  grid-column: 2;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #ffffff;
}

.right-shell {
  grid-column: 3 / 5 !important;
  min-height: 0;
  height: 100%;
  width: 44px;
  padding: 8px 8px 8px 6px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  position: relative;
  overflow: visible;
}
:where(html:not([data-ca-style-v5="2"])) .right-shell {
  border-left: 2px solid #d9e0ea;
  background: #fbfcfe;
}
.right-shell.rail-open {
  width: auto;
  min-height: 0;
  height: 100%;
  padding: 8px 8px 8px 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 10px;
}
.right-shell .right-panels { display: none; }
.right-shell.rail-open .right-panels {
  grid-column: 1;
}
.right-shell .utility-rail { margin-left: 0; margin-right: 0; }
.right-shell.rail-open .utility-rail { grid-column: 2; }

.right-panels {
  gap: 0;
}
.right-panels > [hidden] { display: none !important; }
.right-panels > .right-panel-card { margin: 0; border-radius: 0; }


.utility-rail {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  justify-content: flex-start;
  width: 42px;
  padding-top: 2px;
}
.rail-btn {
  width: 28px;
  height: 28px;
  border: 1px solid #bbb;
  border-radius: 6px;
  background: #ffffff;
  color: inherit;
  cursor: pointer;
  font-size: 13px;
}
.rail-btn.active {
  font-weight: 700;
}

#chartWrap {
  flex: 1;
  height: 100%;
  display: grid;
  grid-template-rows: 164px minmax(0, 1fr);
  position: relative;
  min-height: 0;
  border-bottom: 1px solid #dfe5ee;
}

.chart-transition-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(255,255,255,0.18);
  pointer-events: all;
  z-index: 30;
}
.chart-transition-overlay[hidden] {
  display: none !important;
}
.chart-transition-card {
  min-width: 240px;
  max-width: 420px;
  padding: 12px 16px;
  border: 1px solid #d9e0ea;
  border-radius: 10px;
  background: rgba(255,255,255,0.96);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  text-align: center;
}
.chart-transition-title {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
}
.chart-transition-text {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.45;
  color: #4b5563;
}
#chartRsi {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid #dfe5ee;
}
.chart-pane-surface,
.chart-pane-overlay {
  position: absolute;
  inset: 0;
}
.chart-pane-surface {
  z-index: 1;
}
.chart-pane-overlay {
  z-index: 2;
  pointer-events: none;
}
#chartMain {
  position: relative;
  min-height: 0;
}
#chartMain::after,
#chartRsi::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 1px;
  background: #e7edf5;
  pointer-events: none;
  z-index: 1;
}

.bottom-dock {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 320px 44px;
  height: 52px;
  min-height: 52px;
  box-sizing: border-box;
  border-top: 1px solid #dfe5ee;
  background: #ffffff;
}
.bottom-dock-chart {
  grid-column: 2;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
}
.bottom-dock-gutter-left {
  grid-column: 1;
}
.bottom-dock-gutter-right {
  grid-column: 3 / 5;
}
.bottom-dock-group {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.bottom-dock-spacer { flex: 1; }
.bottom-dock-hidden,
#bottomDockShell.bottom-dock-hidden { display: none !important; }
.latest-group { margin-left: auto; }

.panel-card,
.right-panel-card {
  border: 1px solid #e1e3e8;
  border-radius: 10px;
  background: #ffffff;
  padding: 10px;
}
.panel-card { margin-bottom: 10px; }
.panel-card-title {
  font-size: 12px;
  font-weight: 700;
  color: #333;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.right-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 36px;
  padding: 10px 10px 8px 10px;
  margin: 0;
  font-size: 12px;
  font-weight: 700;
}
.right-panel-header .btn,
.right-panel-header button {
  height: 26px;
  padding: 0 8px;
  border-radius: 7px;
  font-size: 11px;
}
.right-panel-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.right-panel-title-icon {
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.right-panel-body {
  min-height: 42px;
  padding: 0 10px 8px 10px;
}

.drawings-shell .right-panel-body { min-height: 180px; }

#watchlistPanelShell {
  height: 100%;
}

#watchlistPanelShell .right-panel-header {
  flex: 0 0 auto;
}

#watchlistPanelShell .right-panel-body {
  display: flex;
  flex-direction: column;
}

#watchlistsContainer {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}

.watchlist-card .right-panel-body,
#watchlistPanelShell .right-panel-body {
  padding: 0 8px 8px 8px;
}
.watchlist-card .right-panel-body > div,
#watchlistPanelShell .right-panel-body > div,
.watchlist-card .right-panel-body li,
#watchlistPanelShell .right-panel-body li {
  padding: 6px 6px;
  margin: 0;
}
.watchlist-card .row,
#watchlistPanelShell .row {
  margin: 4px 0;
  min-height: 28px;
}

/* Go-To marker */
.gotoVLine { display: none !important; }
.gotoDatePill {
  position: absolute;
  padding: 4px 8px;
  background: #111;
  color: #fff;
  font-size: 12px;
  border-radius: 6px;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 21;
  white-space: nowrap;
}
.gotoDatePill::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 100%;
  width: 0;
  height: 0;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid #111;
}
.goto-group,
.goto-group-overlay {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
}
.goto-group-overlay #gotoStatus {
  min-width: 132px;
  max-width: 230px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 2px 6px;
  margin-left: 2px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #edf2f7;
  border-radius: 6px;
}
#gotoStatus {
  min-width: 180px;
  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.goto-pop {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
  min-width: 280px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid #ddd;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
  z-index: 40;
}
.goto-pop[hidden] { display: none !important; }
.goto-pop-head { font-weight: 600; font-size: 14px; }
.goto-pop-actions { display: flex; justify-content: flex-end; gap: 8px; }
.goto-pop input[type="date"] { width: 100%; }

/* In-chart controls */
.chart-pane-controls {
  position: absolute;
  bottom: 8px;
  z-index: 7;
  display: flex;
  align-items: center;
}
.chart-pane-left {
  left: 6px;
  max-width: 55%;
}
.chart-pane-right { right: 6px; }
#zoomControlsHoverZone {
  position: absolute;
  left: 50%;
  bottom: 10px;
  width: 240px;
  height: 96px;
  transform: translateX(-50%);
  z-index: 5;
}
#zoomControls {
  position: absolute;
  left: 50%;
  bottom: 44px;
  transform: translateX(-50%) translateY(8px);
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: nowrap;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 140ms ease, transform 140ms ease, visibility 140ms ease;
}
.zoom-controls-cluster {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}
.zoom-controls-cluster-primary {
  gap: 6px;
}
.zoom-controls-cluster-secondary {
  gap: 0;
}
#zoomControlsHoverZone:hover #zoomControls,
#zoomControlsHoverZone:focus-within #zoomControls {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
#zoomControls button {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid #ddd;
  background: #ffffff;
  color: inherit;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  font-size: 15px;
  cursor: pointer;
}
.zoom-control-icon-btn {
  width: 30px !important;
  min-width: 30px !important;
  height: 30px !important;
  padding: 0 !important;
}

/* Shared chart overlays */
#sharedVLine {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(15, 23, 42, 0.18);
  pointer-events: none;
  display: none;
  z-index: 4;
}
.legend {
  position: absolute;
  top: 10px;
  left: 12px;
  font-size: 13px;
  font-weight: 400;
  color: #111;
  background: rgba(255, 255, 255, 0);
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  pointer-events: none;
  z-index: 6;
  white-space: nowrap;
}
.legend .muted { color: rgba(0, 0, 0, 0.55); font-weight: 400; }
.legend b { font-weight: 700; }
.legend-rsi { top: 10px; z-index: 2; }

#chartRsi a[href*="tradingview"],
#chartRsi img[src*="tradingview"],
#chartRsi img[alt*="TradingView"],
#chartRsi svg[aria-label*="TradingView"],
#chartRsi [title*="TradingView"] {
  display: none !important;
}

.nav-shell-hidden { display: none !important; }
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  border: 0;
}
.tf-button-row {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-wrap: nowrap;
}
.tf-button-row .btn {
  padding: 4px 7px;
  border-radius: 6px;
  font-size: 11px;
}

.muted { color: #666; font-size: 12px; }
.row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 6px 0;
  min-height: 26px;
}
.btn {
  padding: 6px 10px;
  border: 1px solid #bbb;
  border-radius: 8px;
  background: #ffffff;
  color: inherit;
  cursor: pointer;
  font-size: 12px;
}
.btn:disabled { opacity: 0.55; cursor: default; }
.btn-sm { padding: 4px 8px; font-size: 11px; }
.btn.active { font-weight: 600; }
.btn.state-approved { border-color: #2e7d32; font-weight: 700; }
.val,
select,
.bottom-dock input[type="date"],
.bottom-dock select {
  height: 30px;
  box-sizing: border-box;
}
.val {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 12px;
}
select {
  padding: 6px 8px;
  border: 1px solid #bbb;
  border-radius: 8px;
  background: #ffffff;
  font-size: 12px;
}

table { width: 100%; border-collapse: collapse; font-size: 12px; }
th, td { padding: 6px; border-bottom: 1px solid #eee; vertical-align: top; }
tr:hover { background: #fafafa; }
.pill {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid #ddd;
  border-radius: 999px;
  font-size: 11px;
  color: #333;
}
.pill.status-approved { border-color: #2e7d32; color: #2e7d32; font-weight: 700; }
.pill.status-saved { border-color: #1565c0; color: #1565c0; font-weight: 700; }
.pill.status-none { border-color: #999; color: #444; font-weight: 600; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 3px 8px;
  border: 1px solid #ddd;
  border-radius: 999px;
  font-size: 11px;
  background: #ffffff;
}
.chip .x {
  cursor: pointer;
  font-weight: 700;
  padding: 0 4px;
  border-radius: 6px;
  border: 1px solid #eee;
}
.chip.r { border-color: rgba(255, 0, 0, 0.35); }
.chip.g { border-color: rgba(0, 170, 0, 0.35); }
.chip.b { border-color: rgba(0, 0, 255, 0.35); }

.kv {
  font-size: 12px;
  padding: 8px 10px;
  border: 1px solid #eee;
  border-radius: 10px;
  background: #fafafa;
}
.kv b { font-weight: 700; }

.indicators-shell .right-panel-body {
  min-height: 180px;
}


#watchlistPanelShell {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: calc(100vh - 32px);
}
#watchlistPanelShell .right-panel-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
.watchlists-shell {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}
.watchlists-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  height: 100%;
}
.watchlists-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.watchlists-selector {
  width: 100%;
  text-align: left;
}
.watchlists-meta {
  font-size: 11px;
}
.watchlist-rows {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding-right: 2px;
}


/* Step 2.2 compact watchlist rows */
.watchlists-stack {
  gap: 8px;
}

.watchlist-grid-header,
.watchlist-row {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(52px, 0.55fr) minmax(64px, 0.65fr);
  align-items: center;
  gap: 8px;
}

.watchlist-grid-header {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 0 10px 4px 10px;
  background: #ffffff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #6b7280;
}

.watchlist-row {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  text-decoration: none;
  color: inherit;
  background: transparent;
}

.watchlist-row:hover {
  background: rgba(17,24,39,0.04);
}

.watchlist-row.is-selected {
  border-color: rgba(17,24,39,0.22);
  background: rgba(17,24,39,0.08);
}

.watchlist-col-symbol,
.watchlist-col-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.watchlist-col-symbol {
  font-size: 12px;
  font-weight: 600;
}

.watchlist-col-value {
  font-size: 11px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.watchlist-change--up {
  color: #0f8a35;
}

.watchlist-change--down {
  color: #c62828;
}

.watchlist-change--flat {
  color: #6b7280;
}

.gann-shell {
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.gann-shell .right-panel-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}
.gann-panel-shell {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}
.gann-panel-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.gann-panel-summary-line {
  border: 1px solid #e4e7ec;
  border-radius: 10px;
  padding: 8px 10px;
  background: #fafbfc;
}
.gann-summary-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  color: #6b7280;
  margin-bottom: 4px;
}
.gann-summary-value {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: #1f2937;
}
.gann-panel-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.gann-candidate-row {
  border: 1px solid #e5e7eb;
  padding: 8px;
  background: #fff;
}
.gann-candidate-row.is-selected {
  border-color: #2563eb;
  box-shadow: inset 0 0 0 1px rgba(37,99,235,0.12);
}
.gann-candidate-row.is-hidden {
  opacity: 0.62;
}
.gann-candidate-top,
.gann-candidate-actions,
.gann-candidate-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.gann-candidate-top { margin-bottom: 6px; }
.gann-candidate-meta {
  font-size: 11px;
  color: #4b5563;
  margin-bottom: 6px;
}
.gann-candidate-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  color: inherit;
}
.gann-rank {
  font-weight: 700;
  color: #111827;
}
.gann-direction {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.gann-direction.bearish { color: #b91c1c; }
.gann-direction.bullish { color: #15803d; }
.gann-row-flags {
  display: flex;
  gap: 6px;
}
.gann-mini-pill {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  background: #eef2f7;
  font-size: 10px;
  font-weight: 700;
  color: #475467;
}
.gann-empty {
  padding: 8px 0;
}

.gann-panel-toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.gann-panel-meta {
  margin-bottom: 10px;
}

.gann-panel-empty {
  margin-bottom: 10px;
}

.gann-candidate-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gann-candidate-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
}

.gann-candidate-head,
.gann-candidate-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.gann-candidate-submeta {
  font-size: 12px;
  line-height: 1.35;
}

.gann-candidate-title {
  font-size: 12px;
  font-weight: 600;
}

.gann-candidate-badge {
  font-size: 11px;
}


#drawingsPanelShell {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: calc(100vh - 32px);
}

#drawingsPanelShell .right-panel-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

#pivotPanelBody {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}

.pivot-panel-shell {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  flex: 1 1 auto;
}

.pivot-panel-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  height: 100%;
}

.pivot-panel-meta {
  margin-bottom: 0;
  flex: 0 0 auto;
}

.pivot-list-shell {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.pivot-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding-right: 2px;
}

.pivot-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border: 1px solid #d9deea;
  border-radius: 10px;
  background: #fbfcff;
}

.pivot-row.is-hidden {
  background: #f6f7fa;
  border-color: #e2e5ec;
  opacity: 0.88;
}

.pivot-row-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.pivot-row-price {
  font-size: 13px;
  font-weight: 700;
  color: #1f2937;
}

.pivot-row-time {
  font-size: 11px;
  color: #6b7280;
  line-height: 1.35;
  word-break: break-word;
}

.pivot-row-state {
  flex: 0 0 auto;
  align-self: flex-start;
}

.pivot-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pivot-row-actions .btn {
  height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 11px;
}

.pivot-row.is-editing {
  border-color: #b7c7e6;
  background: #ffffff;
}

.pivot-row-edit {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  border: 1px solid #e1e6f0;
  border-radius: 8px;
  background: #ffffff;
}

.pivot-row-edit-label {
  font-size: 11px;
  font-weight: 600;
  color: #4b5563;
}

.pivot-row-edit-input {
  height: 30px;
  padding: 0 8px;
  border: 1px solid #cfd6e4;
  border-radius: 8px;
  font-size: 12px;
  color: #111827;
  outline: none;
}

.pivot-row-edit-input:focus {
  border-color: #8ea7d6;
  box-shadow: 0 0 0 2px rgba(99, 125, 180, 0.12);
}

.pivot-row-edit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pivot-row-edit-actions .btn {
  height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 11px;
}

.pivot-row-empty {
  padding: 12px 0;
}


/* Extreme sidebar height-contract fix */
.right-shell {
  align-items: stretch;
  overflow: hidden;
}

.right-shell.rail-open {
  align-items: stretch;
}

.right-shell.rail-open .right-panels {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  align-self: stretch;
  overflow: hidden;
}

.right-panels {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.right-panels > .right-panel-card:not([hidden]) {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.right-panels > .right-panel-card > .right-panel-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#watchlistPanelShell,
#drawingsPanelShell {
  flex: 1 1 auto;
  min-height: 0;
  height: 100% !important;
  overflow: hidden;
}

#watchlistsContainer,
.watchlists-shell,
.watchlists-stack,
#pivotPanelBody,
.pivot-panel-shell,
.pivot-panel-stack,
.pivot-list-shell {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  overflow: hidden;
}


#gannPanelBody,
.gann-shell .right-panel-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.gann-list-shell {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.gann-panel-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding-right: 2px;
  padding-bottom: 120px;
  scroll-padding-bottom: 120px;
}

.gann-panel-list::after {
  content: '';
  display: block;
  height: 120px;
  flex: 0 0 120px;
}


.watchlist-rows,
.pivot-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 120px;
  scroll-padding-bottom: 120px;
}

.watchlist-rows::after,
.pivot-list::after {
  content: '';
  display: block;
  height: 120px;
  flex: 0 0 120px;
}


.pivot-arming-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.pivot-arm-btn {
  min-width: 88px;
}

.pivot-arm-btn.active[data-pivot-arm-mode="bear-pivot"],
.pivot-arm-btn.active[data-pivot-arm-mode="bear-pep"] {
  border-color: #c62828;
  color: #c62828;
  background: #fff5f5;
  font-weight: 700;
}

.pivot-arm-btn.active[data-pivot-arm-mode="bull-pivot"],
.pivot-arm-btn.active[data-pivot-arm-mode="bull-pep"] {
  border-color: #2e7d32;
  color: #2e7d32;
  background: #f3fff5;
  font-weight: 700;
}

.pivot-arm-btn.active[data-pivot-arm-mode="bear-pep"],
.pivot-arm-btn.active[data-pivot-arm-mode="bull-pep"] {
  box-shadow: inset 0 0 0 1px rgba(17,24,39,0.18);
}

.pivot-arming-panel-row .pivot-arm-btn {
  flex: 0 0 auto;
}


.pivot-panel-tabs {
  display: flex;
  gap: 6px;
  flex: 0 0 auto;
}

.pivot-panel-tab {
  min-width: 68px;
}

.pivot-panel-tab.active[data-pivot-tab="bear"] {
  border-color: #c62828;
  color: #c62828;
  background: #fff5f5;
  font-weight: 700;
}

.pivot-panel-tab.active[data-pivot-tab="bull"] {
  border-color: #2e7d32;
  color: #2e7d32;
  background: #f3fff5;
  font-weight: 700;
}

.pivot-panel-section {
  display: none;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  flex: 1 1 auto;
}

.pivot-panel-section.active {
  display: flex;
}

.pivot-panel-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 0 0 auto;
}

.pivot-row-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pivot-type-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid #d6dbe7;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.pivot-type-badge.type-bear-pivot {
  border-color: #c62828;
  background: #fff5f5;
  color: #c62828;
}

.pivot-type-badge.type-bull-pivot {
  border-color: #2e7d32;
  background: #f3fff5;
  color: #2e7d32;
}

.pivot-type-badge.type-bear-pep,
.pivot-type-badge.type-bull-pep {
  border-color: #111827;
  background: #f3f4f6;
  color: #111827;
}



.scan-center-shell-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 100%;
}

.scan-center-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.scan-center-date-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.scan-date-btn {
  width: 100%;
  justify-content: flex-start;
}

.scan-center-actions {
  justify-content: flex-start;
  gap: 8px;
  flex-wrap: wrap;
}

.scan-date-pop {
  position: static;
  transform: none;
  left: auto;
  top: auto;
  min-width: 0;
  width: 100%;
  z-index: 1;
  box-shadow: none;
  border-radius: 10px;
}

.scan-center-date-mode {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.scan-center-date-mode-hint {
  line-height: 1.35;
}

.scan-center-date-mode-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.scan-date-summary-btn[data-active="1"] {
  border-color: #94a3b8;
  box-shadow: inset 0 0 0 1px #cbd5e1;
  background: #f8fafc;
}

.scan-center-shell-inner[data-scan-date-mode="1"] .scan-center-controls,
.scan-center-shell-inner[data-scan-date-mode="1"] .scan-center-date-truth {
  flex-shrink: 0;
}

.scan-center-status {
  min-height: 18px;
}

.scan-review-notes {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 0 0 auto;
}

.scan-review-notes-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.scan-review-notes-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.scan-review-notes-meta,
.scan-review-notes-save {
  font-size: 11px;
  line-height: 1.2;
}

.scan-review-notes-input {
  width: 100%;
  min-height: 74px;
  resize: vertical;
  padding: 8px 9px;
  font: inherit;
  font-size: 12px;
  line-height: 1.35;
}

.scan-review-notes-compose {
  position: relative;
  display: block;
}

.scan-review-notes-compose .scan-review-notes-input {
  display: block;
  width: 100%;
  min-width: 0;
  padding-right: 46px;
}

.scan-review-voice-btn {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 9px;
  font: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.scan-review-voice-icon {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.scan-review-voice-state {
  font-size: 11px;
  line-height: 1.25;
  min-height: 0;
}

.scan-review-voice-state:not([data-state]) { display: none; }

.scan-center-results {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.scan-day-bucket {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.scan-day-header {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.scan-day-count {
  margin-left: 6px;
}

.scan-rows {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.scan-row {
  width: 100%;
  min-height: 38px;
  text-align: left;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
}

.scan-row-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
}

.scan-row-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1 1 auto;
}

.scan-row-primary {
  width: 100%;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  text-align: left;
}

.scan-row-secondary {
  display: block;
  font-size: 11px;
  line-height: 1.2;
}

.scan-row-approved-badge,
.scan-row-warning-badge {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: #15803d;
}

.scan-row-glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  line-height: 1;
}

.scan-row-glyph--delete {
  color: #b42318;
}

.scan-row-glyph-host {
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.scan-row-glyph-host svg {
  width: 100%;
  height: 100%;
  display: block;
}

.scan-row-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  opacity: 0;
  pointer-events: none;
}

.scan-row:hover .scan-row-actions,
.scan-row:focus-within .scan-row-actions {
  opacity: 1;
  pointer-events: auto;
}

.scan-row-action-btn {
  width: 24px;
  height: 24px;
  min-width: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.scan-row-inline-confirm {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.scan-inline-confirm-text {
  font-size: 11px;
}

.scan-inline-confirm-btn {
  min-height: 24px;
  padding: 0 8px;
}

.scan-row.drop-before {
  transform: translateY(-1px);
}

.scan-row.drop-after {
  transform: translateY(1px);
}


/* Scan Center review ledger + inline note editor (1.3.0) */
.scan-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0;
  padding: 0;
  overflow: hidden;
}
.scan-row-summary {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 9px;
}
.scan-row-actions { opacity: 1; pointer-events: auto; }
.scan-row-action-btn { width: 25px; height: 25px; min-width: 25px; }
.scan-row-approved-badge,
.scan-row-rejected-badge,
.scan-row-pending-badge,
.scan-row-warning-badge {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.scan-row-pending-badge::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 999px;
}
.scan-review-notes {
  width: auto;
  margin: 0 7px 7px;
  padding: 9px;
}
.scan-review-notes-input { min-height: 112px; max-height: 260px; }
.scan-review-notes-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}
.scan-review-notes-footer .btn {
  min-height: 28px;
  padding: 0 10px;
  font-size: 11px;
}
.scan-review-notes-save-btn { font-weight: 650; }
.scan-review-notes, .scan-review-notes * { user-select: text; }
.scan-review-notes button { user-select: none; }

/* Scan notes editor must remain fully collapsed until a row's notes button opens it.
   The author-level flex rule otherwise overrides the browser's default [hidden] rule. */
.scan-review-notes[hidden] {
  display: none !important;
}

/* Scan Center model registry / scoring controls */
.scan-model-controls {
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--panel-border, #d9dee7);
  border-radius: 8px;
  background: var(--panel-soft-bg, rgba(247, 249, 252, 0.9));
}
.scan-model-controls-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.scan-model-controls-title { font-size: 11px; font-weight: 750; color: #475569; }
.scan-model-toggle-btn { width: 26px; height: 24px; min-width: 26px; padding: 0; font-size: 16px; line-height: 1; }
.scan-model-controls-body { display: grid; gap: 6px; }
.scan-model-controls-body[hidden] { display: none !important; }
.scan-model-controls .watchlists-selector { width: 100%; }
.scan-model-version { font-size: 11px; line-height: 1.35; }
.scan-score-btn { width: 100%; font-weight: 700; }
.scan-family-bucket { margin-bottom: 10px; }
.scan-family-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 8px;
  font-size: 12px;
  font-weight: 800;
  background: var(--panel-bg, #fff);
  border-bottom: 1px solid var(--panel-border, #d9dee7);
}
.scan-row-model-score {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 1px 5px;
  border-radius: 999px;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  background: rgba(37, 99, 235, 0.10);
  color: #1d4ed8;
}

.scan-center-sort-row { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px; }
.scan-center-sort-row .watchlists-label { margin: 0; }
.scan-center-sort-row .watchlists-selector { width: 100%; min-width: 0; }
.scan-decision-bucket + .scan-decision-bucket { margin-top: 8px; }

/* Study Center — Phase 1 */
.study-center-inner{display:flex;flex-direction:column;gap:10px;padding-bottom:16px}.study-center-intro{font-size:12px;line-height:1.45;color:#5f6b7a}.study-center-input{width:100%;text-align:left;background:#fff}.study-center-date-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.study-center-date-grid label{display:flex;flex-direction:column;gap:5px;font-size:11px;color:#667085}.study-center-date-grid input{width:100%;background:#fff}.study-scan-chips{display:flex;gap:6px;flex-wrap:wrap}.study-scan-chips span{padding:5px 8px;border-radius:999px;background:#eef4ff;color:#315c9b;font-size:10px;font-weight:700;border:1px solid #d8e5fb}.study-methodology-card{display:flex;flex-direction:column;gap:3px;padding:10px;border:1px solid #dce2e8;border-radius:9px;background:#f8fafc;font-size:11px}.study-methodology-card span{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:9px;color:#475467;overflow-wrap:anywhere}.study-methodology-card small{color:#667085}.study-primary-btn{width:100%;background:#1f6feb;color:#fff;border-color:#1f6feb;font-weight:700}.study-progress{height:7px;background:#edf0f3;border-radius:999px;overflow:hidden}.study-progress>div{height:100%;width:0;background:#1f6feb;transition:width .25s ease}.study-stage-row{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;font-size:11px;text-transform:capitalize}.study-stage-row #studyCenterStatus[data-kind="error"]{color:#b42318}.study-stage-row #studyCenterStatus[data-kind="ok"]{color:#067647}.study-downloads{display:grid;gap:6px}.study-download{display:block;text-decoration:none;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.study-section-title{margin-top:4px;font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.06em;color:#475467}.study-center-library{display:flex;flex-direction:column;gap:8px}.study-library-row{padding:9px;border:1px solid #e1e6eb;border-radius:9px;background:#fff}.study-library-title{font-size:11px;font-weight:700;color:#263244}.study-library-meta{font-size:9px;margin:3px 0 7px}.study-library-row .study-download{display:inline-flex;margin:2px 4px 0 0;font-size:9px}

/* Trade Center — Patch 1 shell only. No broker execution is enabled here. */
.trade-center-inner{display:flex;flex-direction:column;gap:10px;padding-bottom:16px}
.trade-center-intro{font-size:12px;line-height:1.45;color:#5f6b7a}
.trade-center-badge{font-size:9px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:#475467;background:#f2f4f7;border:1px solid #d0d5dd;border-radius:999px;padding:3px 7px}
.trade-center-status-card{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.trade-center-status-card>div{display:flex;flex-direction:column;gap:4px;padding:10px;border:1px solid #e1e6eb;border-radius:9px;background:#fff}
.trade-center-status-card strong{font-size:11px;color:#b42318}
.trade-center-label{font-size:9px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:#667085}
.trade-center-section-title{margin-top:4px;font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.06em;color:#475467}
.trade-center-strategy-card{padding:11px;border:1px solid #d8e5fb;border-radius:9px;background:#f5f8ff}
.trade-center-strategy-name{font-size:12px;font-weight:800;color:#263244}
.trade-center-strategy-meta{font-size:10px;line-height:1.4;color:#5f6b7a;margin-top:3px}
.trade-center-strategy-state{display:inline-flex;margin-top:8px;padding:4px 7px;border-radius:999px;background:#fff4e5;border:1px solid #fedf89;color:#93370d;font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.04em}
.trade-center-empty-state{display:flex;flex-direction:column;gap:5px;padding:12px;border:1px dashed #cfd6de;border-radius:9px;background:#f8fafc;color:#667085;font-size:11px;line-height:1.45}
.trade-center-empty-state strong{color:#344054}
.trade-center-primary-btn{width:100%;font-weight:700}


/* Trade Center - Patch 1 completion: responsive, accessible tab shell. */
.trade-center-tabs{display:flex;gap:6px;overflow-x:auto;padding:2px 0 4px;scrollbar-width:thin}
.trade-center-tab{flex:0 0 auto;border:1px solid #d0d5dd;border-radius:8px;background:#fff;color:#475467;font:inherit;font-size:10px;font-weight:700;padding:7px 9px;cursor:pointer;white-space:nowrap}
.trade-center-tab:hover{background:#f8fafc;color:#344054}
.trade-center-tab:focus-visible{outline:2px solid #2563eb;outline-offset:2px}
.trade-center-tab.active{background:#eef4ff;border-color:#b7cdf7;color:#1d4ed8}
.trade-center-tab-panels{min-height:150px}
.trade-center-tab-panel{display:flex;flex-direction:column;gap:10px}
.trade-center-tab-panel[hidden]{display:none!important}
@media (max-width:900px){.trade-center-tabs{padding-bottom:7px}.trade-center-tab{font-size:9px;padding:6px 8px}}


/* TRADE CENTER PATCH 4 LIVE READ UI */
.trade-center-header-actions{display:flex;align-items:center;gap:6px}.trade-center-header-actions small{font-size:9px;color:#667085;font-weight:600}.trade-center-header-actions .btn{padding:4px 7px;font-size:9px}.trade-center-status-grid{grid-template-columns:1fr 1fr}.trade-center-counts{font-size:9px!important;line-height:1.35;color:#344054!important}.tc-negative{color:#b42318!important}.tc-positive{color:#067647!important}.trade-center-error{padding:9px 10px;border:1px solid #fda29b;border-radius:8px;background:#fef3f2;color:#b42318;font-size:10px;line-height:1.4}.trade-center-live-list{display:flex;flex-direction:column;gap:8px}.trade-center-strategy-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}.trade-center-version{flex:0 0 auto;padding:3px 6px;border-radius:999px;background:#eaf0fb;color:#344054;font-size:9px;font-weight:800}.trade-center-strategy-flags{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.trade-center-lock-state{display:inline-flex;margin-top:8px;padding:4px 7px;border-radius:999px;background:#f2f4f7;border:1px solid #d0d5dd;color:#475467;font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.04em}.trade-center-list-row{display:flex;flex-direction:column;gap:3px;padding:9px 10px;border:1px solid #e4e7ec;border-radius:8px;background:#fff;font-size:10px}.trade-center-list-row strong{color:#344054}.trade-center-list-row span{color:#667085;line-height:1.4}.trade-center-metric-row{display:flex;gap:6px;flex-wrap:wrap}.trade-center-metric-row span{padding:5px 7px;border-radius:999px;background:#f2f4f7;color:#475467;font-size:9px}

/* Trade Center Patch 9
   The right-rail Trade Center is the canonical trading workspace.
   Legacy bottom trading UI remains in source for rollback only. */
#tradingPanelShell,
#tradingPanelToggleBtn {
  display: none !important;
}


/* study-center-patch2:start */
#studyCenterLegacyView[hidden],#studyCenterV2Launcher[hidden],#studyCenterV2Workspace[hidden]{display:none!important}
.study-v2-header-actions{display:flex;align-items:center;gap:6px}.study-track-badge{display:inline-flex;align-items:center;min-height:24px;padding:3px 8px;border:1px solid #cfd8e3;border-radius:999px;background:#f8fafc;color:#344054;font-size:10px;font-weight:800;letter-spacing:.04em;text-transform:uppercase}.study-v2-launcher{display:flex;flex-direction:column;gap:12px;padding-bottom:16px}.study-v2-launcher-card{display:flex;flex-direction:column;gap:8px;padding:12px;border:1px solid #d9e2ec;border-radius:10px;background:linear-gradient(145deg,#f8fbff,#eef5ff)}.study-v2-launcher-card strong{font-size:14px;color:#173b66}.study-v2-launcher-card span{font-size:11px;line-height:1.5;color:#5f6b7a}.study-v2-workspace{position:fixed;inset:0;z-index:1200;padding:28px;background:rgba(10,19,33,.58);backdrop-filter:blur(3px);display:flex;align-items:stretch;justify-content:center}.study-v2-workspace[hidden]{display:none}.study-v2-workspace-card{width:min(1180px,100%);height:100%;display:flex;flex-direction:column;overflow:hidden;border:1px solid #d9e2ec;border-radius:16px;background:#f7f9fc;box-shadow:0 24px 70px rgba(3,12,28,.34)}.study-v2-workspace-header{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;padding:20px 24px 16px;border-bottom:1px solid #dfe5ec;background:#fff}.study-v2-workspace-header h2{margin:2px 0 4px;font-size:24px;color:#173b66}.study-v2-workspace-header p{margin:0;color:#667085;font-size:12px}.study-v2-kicker{font-size:10px;font-weight:800;letter-spacing:.1em;text-transform:uppercase;color:#247b89}.study-v2-workspace-actions{display:flex;align-items:center;gap:8px}.study-v2-tabs{display:flex;gap:4px;padding:8px 24px 0;border-bottom:1px solid #dfe5ec;background:#fff}.study-v2-tab{border:0;border-bottom:3px solid transparent;background:transparent;padding:10px 14px;color:#667085;font-weight:700;cursor:pointer}.study-v2-tab.active{border-bottom-color:#247b89;color:#173b66}.study-v2-content{flex:1;overflow:auto;padding:22px 24px 30px}.study-v2-view{display:none}.study-v2-view.active{display:block}.study-v2-section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:16px}.study-v2-section-head h3{margin:0 0 4px;color:#173b66;font-size:18px}.study-v2-section-head p{margin:0;color:#667085;font-size:12px}.study-v2-study-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(265px,1fr));gap:12px}.study-v2-study-card{display:flex;flex-direction:column;gap:8px;min-height:150px;padding:14px;border:1px solid #dce3ea;border-radius:12px;background:#fff;box-shadow:0 2px 8px rgba(25,42,70,.04)}.study-v2-study-card h4{margin:0;color:#263244;font-size:14px}.study-v2-study-meta{display:flex;flex-wrap:wrap;gap:6px}.study-v2-study-card p{margin:0;color:#667085;font-size:11px;line-height:1.45}.study-v2-study-card-actions{margin-top:auto;display:flex;justify-content:flex-end}.study-v2-empty,.study-v2-placeholder{display:flex;min-height:210px;flex-direction:column;align-items:center;justify-content:center;gap:8px;border:1px dashed #cfd8e3;border-radius:12px;background:#fff;color:#667085;text-align:center;padding:24px}.study-v2-placeholder strong{font-size:16px;color:#344054}.study-v2-placeholder span{max-width:560px;font-size:12px;line-height:1.5}.study-v2-error{margin-bottom:12px;padding:10px;border:1px solid #f5b7b1;border-radius:8px;background:#fff3f2;color:#b42318;font-size:12px}.study-v2-form{display:grid;gap:14px;max-width:900px}.study-v2-form fieldset{display:grid;gap:12px;margin:0;padding:16px;border:1px solid #dce3ea;border-radius:12px;background:#fff}.study-v2-form legend{padding:0 6px;color:#344054;font-weight:800}.study-v2-form label{display:flex;flex-direction:column;gap:6px;color:#475467;font-size:11px;font-weight:700}.study-v2-form input[type=text],.study-v2-form textarea{width:100%;box-sizing:border-box;border:1px solid #cfd8e3;border-radius:8px;background:#fff;padding:10px;color:#263244;font:inherit}.study-v2-choice-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.study-v2-choice{position:relative;display:grid!important;grid-template-columns:auto 1fr;column-gap:9px;row-gap:2px;padding:14px;border:2px solid #dce3ea;border-radius:10px;cursor:pointer}.study-v2-choice.selected{border-color:#247b89;background:#f1f8fa}.study-v2-choice input{grid-row:1/3;margin-top:2px}.study-v2-choice strong{color:#263244}.study-v2-choice span{font-weight:400;color:#667085;line-height:1.4}.study-v2-source-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.study-v2-source-grid label{flex-direction:row;align-items:center;padding:10px;border:1px solid #dce3ea;border-radius:8px;background:#f9fafb;cursor:pointer}.study-v2-form-actions{display:flex;align-items:center;justify-content:flex-end;gap:12px}.study-v2-form-actions .muted{margin-right:auto}.study-v2-mini-card{cursor:pointer}.study-v2-mini-card:hover{border-color:#8cb5c0}.study-v2-mini-card .study-track-badge{font-size:8px;min-height:19px}.study-v2-workspace-open{overflow:hidden}.study-primary-btn:disabled{opacity:.55;cursor:not-allowed}@media(max-width:760px){.study-v2-workspace{padding:0}.study-v2-workspace-card{border-radius:0}.study-v2-workspace-header{padding:14px}.study-v2-workspace-header h2{font-size:19px}.study-v2-tabs{padding-left:8px;overflow:auto}.study-v2-tab{padding:9px 10px}.study-v2-content{padding:14px}.study-v2-choice-grid,.study-v2-source-grid{grid-template-columns:1fr}.study-v2-section-head{flex-direction:column}.study-v2-workspace-actions .study-track-badge{display:none}}
/* study-center-patch2:end */

/* study-center-patch2b:start */
#studyCenterLegacyView[hidden]{display:none!important}
#studyCenterV2Launcher[hidden]{display:none!important}
.study-center-shell .right-panel-header .study-track-badge{margin-left:auto}
/* study-center-patch2b:end */
.study-v2-module-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:12px;margin-bottom:26px}.study-v2-module-card{display:flex;flex-direction:column;gap:8px;padding:14px;border:1px solid #dce3ea;border-radius:12px;background:#fff}.study-v2-module-card h4{margin:0;color:#263244;font-size:14px}.study-v2-module-card p{margin:0;color:#667085;font-size:11px;line-height:1.5}.study-v2-module-errors{padding:8px;border-radius:7px;background:#fff3f2;color:#b42318;font-size:10px}.study-module-status-ready{border-color:#a6d7be;background:#ecfdf3;color:#067647}.study-module-status-disabled{background:#f2f4f7}.study-module-status-invalid{border-color:#f5b7b1;background:#fff3f2;color:#b42318}.study-v2-saved-head{margin-top:4px}.study-v2-form select{width:100%;box-sizing:border-box;border:1px solid #cfd8e3;border-radius:8px;background:#fff;padding:10px;color:#263244;font:inherit}.study-v2-module-summary{padding:10px;border:1px solid #dce3ea;border-radius:8px;background:#f8fafc;line-height:1.5}.study-v2-parameter-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.study-v2-parameter-grid label{padding:10px;border:1px solid #e1e7ef;border-radius:8px;background:#fbfcfe}.study-v2-parameter-grid input,.study-v2-parameter-grid select{width:100%;box-sizing:border-box;border:1px solid #cfd8e3;border-radius:7px;background:#fff;padding:9px}.study-v2-validation{min-height:18px}.study-v2-validation:not(:empty){padding:8px;border-radius:7px;background:#f1f8fa;color:#175b67}@media(max-width:760px){.study-v2-parameter-grid{grid-template-columns:1fr}}

.study-v2-run-panel,.study-v2-run-card{border:1px solid var(--border-color,#374151);border-radius:12px;padding:14px;background:rgba(15,23,42,.35);margin-bottom:12px}.study-v2-run-summary{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:10px;margin-top:12px}.study-v2-run-metric{padding:10px;border:1px solid rgba(148,163,184,.25);border-radius:8px}.study-v2-run-metric strong{display:block;font-size:1.05rem}.study-v2-performance-heading{margin-top:14px;font-weight:700;font-size:1rem}.study-v2-performance-period{margin-top:3px;font-size:.82rem;opacity:.82}.study-v2-run-metric-label{display:block;font-size:.78rem;font-weight:650;line-height:1.2;color:inherit;opacity:.9;margin-bottom:3px}.study-v2-progress{height:8px;background:rgba(148,163,184,.2);border-radius:99px;overflow:hidden;margin:8px 0}.study-v2-progress>span{display:block;height:100%;background:currentColor}.study-v2-two-col{display:grid;grid-template-columns:1fr 1fr;gap:12px}@media(max-width:700px){.study-v2-two-col{grid-template-columns:1fr}}

/* Study Center Patch 5: trade-level results */
.study-v2-run-details{margin:14px 0 18px}.study-v2-detail-toolbar,.study-v2-history-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:10px 0}.study-v2-table-wrap{overflow:auto;max-height:430px;border:1px solid rgba(148,163,184,.28);border-radius:10px;background:rgba(15,23,42,.16)}.study-v2-results-table{width:100%;border-collapse:collapse;min-width:1380px;font-size:12px}.study-v2-results-table th,.study-v2-results-table td{padding:8px 9px;border-bottom:1px solid rgba(148,163,184,.18);text-align:right;white-space:nowrap}.study-v2-results-table th{position:sticky;top:0;background:var(--panel-bg,#fff);z-index:1;font-size:11px;text-transform:uppercase;letter-spacing:.04em}.study-v2-results-table th:first-child,.study-v2-results-table td:first-child,.study-v2-results-table th:nth-child(2),.study-v2-results-table td:nth-child(2),.study-v2-results-table th:nth-child(3),.study-v2-results-table td:nth-child(3),.study-v2-results-table th:nth-child(4),.study-v2-results-table td:nth-child(4),.study-v2-results-table th:last-child,.study-v2-results-table td:last-child{text-align:left}.study-v2-results-table a{font-weight:700;text-decoration:none}.study-v2-rejections{border:1px solid rgba(148,163,184,.28);border-radius:10px;padding:10px 12px;margin-bottom:10px}.study-v2-rejections summary{cursor:pointer;font-weight:700}.study-v2-reason-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:8px;margin-top:10px}.study-v2-reason-grid>div{display:flex;align-items:center;gap:8px;padding:8px;border:1px solid rgba(148,163,184,.2);border-radius:8px}.study-v2-reason-grid strong{font-size:16px}.study-v2-empty.compact{min-height:auto;padding:16px}.study-v2-history-head{border-top:1px solid rgba(148,163,184,.25);padding-top:14px}@media(max-width:700px){.study-v2-detail-toolbar,.study-v2-history-head{align-items:flex-start;flex-direction:column}}

/* Patch C1E: broker P&L header and managed exit-all */
.tc-account-bar{display:flex;align-items:center;gap:8px;min-width:260px;justify-content:flex-end}
.tc-account-pnl{display:flex;flex-direction:column;align-items:flex-end;line-height:1.05;padding:4px 8px;border:1px solid #d9e0ea;border-radius:8px;background:#fff;cursor:pointer}
.tc-account-pnl strong{font-size:14px}.tc-account-pnl small{font-size:9px;color:#667085}.tc-account-pnl.is-positive strong{color:#067647}.tc-account-pnl.is-negative strong{color:#b42318}.tc-account-pnl.is-stale{border-color:#f0b429;background:#fffaeb}
.tc-exit-all-btn{border:1px solid #d92d20!important;background:#fff3f2!important;color:#b42318!important;font-weight:800!important;padding:6px 9px!important}
.tc-exit-all-btn:hover{background:#fee4e2!important}
@media(max-width:980px){.tc-account-bar{min-width:0}.tc-account-pnl small{display:none}.tc-account-pnl{padding:4px 6px}}

/* Patch C1F: shift live P&L left of Save and distinguish app-only exit. */
.tc-account-bar{margin-right:14px}
.tc-exit-all-btn{white-space:nowrap}
@media(max-width:980px){.tc-account-bar{margin-right:6px}}

/* Study Center v1.3 Patch 1: source/setup concept clarity */
.study-v2-setup-fieldset{overflow:visible!important;position:relative}.study-v2-setup-select{min-height:46px;line-height:1.35}.study-v2-setup-actions{display:flex;justify-content:flex-end;margin-top:-4px}.study-v2-source-summary{padding:10px;border:1px solid #cfe0e5;border-radius:8px;background:#f1f8fa;color:#175b67;line-height:1.45}.study-v2-module-card{cursor:default}.study-v2-module-card:focus{outline:2px solid #247b89;outline-offset:2px}.study-v2-detail-overlay{position:absolute;inset:0;z-index:30;display:flex;align-items:center;justify-content:center;padding:24px;background:rgba(10,19,33,.5)}.study-v2-detail-overlay[hidden]{display:none}.study-v2-detail-dialog{width:min(820px,100%);max-height:min(720px,90%);display:flex;flex-direction:column;overflow:hidden;border:1px solid #d9e2ec;border-radius:14px;background:#fff;box-shadow:0 24px 60px rgba(3,12,28,.3)}.study-v2-detail-dialog>header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:18px 20px;border-bottom:1px solid #e1e7ef}.study-v2-detail-dialog h3{margin:3px 0 0;color:#173b66}.study-v2-detail-body{overflow:auto;padding:20px}.study-v2-detail-body h4{margin:20px 0 10px;color:#344054}.study-v2-detail-summary p{margin-top:0;color:#475467;line-height:1.55}.study-v2-detail-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.study-v2-detail-facts span{display:flex;flex-direction:column;gap:3px;padding:10px;border:1px solid #e1e7ef;border-radius:8px;background:#f8fafc;color:#475467}.study-v2-detail-facts strong{color:#263244}@media(max-width:760px){.study-v2-detail-overlay{padding:8px}.study-v2-detail-facts{grid-template-columns:1fr}}

/* Study Center v1.3 patch 3: output-centered cards */
.study-v2-output-card{position:relative;padding-right:2.5rem}
.study-v2-output-select{position:absolute;right:.85rem;top:.85rem}
.study-v2-output-card p{margin:.35rem 0}
.study-v2-output-card .study-v2-run-summary{margin-top:.75rem}


/* Study Center v1.3 final UX polish: reliable scrolling and sticky navigation */
.study-v2-workspace-card{min-height:0}
.study-v2-workspace-header,.study-v2-tabs{flex:0 0 auto}
.study-v2-tabs{position:sticky;top:0;z-index:12}
.study-v2-content{min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
.study-v2-view.active{min-height:100%}
.study-v2-form{padding-bottom:24px}
.study-v2-readonly-note{padding:9px 11px;margin-bottom:12px;border:1px solid #cfd8e3;border-radius:8px;background:#f8fafc;color:#475467;font-size:11px}
.study-v2-output-run-time{font-size:10px!important;color:#475467!important}
@media(max-height:760px){.study-v2-workspace{padding:12px}.study-v2-workspace-header{padding:12px 18px 10px}.study-v2-content{padding-top:14px}}
/* Trade Center Batch 4 simplified operator UI */
#tradeCenterPanelShell:not([hidden]){flex-direction:column;max-height:calc(100vh - 116px);overflow:hidden}
#tradeCenterPanelShell .trade-center-inner{overflow:hidden}
#tradeCenterPanelShell .trade-center-tab-panels{min-height:0;overflow:hidden}
#tradeCenterPanelShell [data-trade-center-view]{max-height:calc(100vh - 280px);overflow:auto;padding-right:5px;padding-bottom:48px}
.tc-command-bar{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:9px;border:1px solid #d0d5dd;border-radius:10px;background:#fff}
.tc-command-state{display:grid;grid-template-columns:auto 1fr;column-gap:7px;align-items:center}.tc-command-state small{grid-column:2;color:#667085;font-size:9px}.tc-state-dot{width:9px;height:9px;border-radius:50%;background:#98a2b3}.tc-state-dot.is-live{background:#12b76a}.tc-state-dot.is-danger{background:#f04438}.tc-command-actions{display:flex;gap:4px;flex-wrap:wrap;justify-content:flex-end}.tc-danger{border-color:#fda29b!important;color:#b42318!important}
.tc-summary-strip{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:10px}.tc-summary-strip span{font-size:9px;background:#f2f4f7;border-radius:999px;padding:5px 7px}.tc-section-label{font-size:10px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:#475467;margin:12px 0 6px}
.tc-simple-card,.tc-strategy-row{display:flex;flex-direction:column;gap:4px;padding:9px;border:1px solid #e4e7ec;border-radius:9px;background:#fff;margin-bottom:7px;font-size:10px}.tc-simple-card span,.tc-simple-card small,.tc-strategy-row small{color:#667085}.tc-simple-card.tc-live{border-color:#86efac;background:#f0fdf4}
.tc-strategy-row>div:first-child{display:flex;justify-content:space-between;gap:8px}.tc-toggle{display:flex;justify-content:space-between;align-items:center;padding:5px 0;font-weight:700}.tc-rule-grid{display:grid;grid-template-columns:38% 62%;gap:5px;padding-top:7px;font-size:10px}.tc-rule-grid span{color:#667085}
.tc-settings-form{display:flex;flex-direction:column;gap:7px}.tc-settings-form label{display:flex;flex-direction:column;gap:3px;font-size:10px;font-weight:700}.tc-settings-form input[type=number],.tc-settings-form input[type=time],.tc-settings-form input[type=text],.tc-settings-form label>input:not([type=checkbox]){width:100%;box-sizing:border-box;padding:7px;border:1px solid #d0d5dd;border-radius:7px}.tc-settings-form .tc-check{flex-direction:row;align-items:center;font-weight:500}.tc-settings-form small{color:#667085}

/* Batch 4 corrective fix: preserve the right utility panel and its independent icon rail. */
.main-shell {
  grid-template-columns: 48px minmax(0, 1fr) minmax(300px, 320px) 44px !important;
}
.right-shell,
.right-shell.rail-open {
  grid-column: 3 / 5 !important;
  width: auto !important;
  min-width: 0;
}
.right-shell.rail-open {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 42px !important;
  align-items: stretch !important;
  overflow: hidden !important;
}
.right-shell.rail-open .right-panels {
  grid-column: 1 !important;
  display: flex !important;
  min-width: 0;
}
.right-shell.rail-open .utility-rail {
  grid-column: 2 !important;
  display: flex !important;
  position: static !important;
  width: 42px !important;
  z-index: 1;
}
.utility-rail .rail-btn {
  flex: 0 0 28px;
}
.study-v2-modeling-panel{margin-top:16px;padding-top:14px;border-top:1px solid rgba(148,163,184,.25)}
.study-v2-modeling-artifact{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-top:10px;padding:12px;border:1px solid rgba(148,163,184,.25);border-radius:10px;background:rgba(15,23,42,.2)}
.study-v2-modeling-artifact .study-v2-study-card-actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end}
@media(max-width:800px){.study-v2-modeling-artifact{align-items:flex-start;flex-direction:column}.study-v2-modeling-artifact .study-v2-study-card-actions{justify-content:flex-start}}

/* WebSocket Patch 4: compact daily automation status */
.tc-readiness-card{display:flex;flex-direction:column;gap:8px;padding:10px;border:1px solid #d0d5dd;border-radius:9px;background:#f8fafc}
.tc-readiness-main{display:flex;align-items:flex-start;gap:8px}.tc-readiness-main>div{display:flex;flex-direction:column;gap:2px;min-width:0}
.tc-readiness-main strong{font-size:11px;letter-spacing:.04em}.tc-readiness-main small{font-size:9px;line-height:1.35;color:#667085}
.tc-readiness-dot{width:9px;height:9px;border-radius:50%;margin-top:2px;background:#98a2b3;box-shadow:0 0 0 3px rgba(152,162,179,.15)}
.tc-readiness-meta{display:flex;gap:5px;flex-wrap:wrap}.tc-readiness-meta span{font-size:8.5px;padding:4px 6px;border-radius:999px;background:#fff;border:1px solid #e4e7ec;color:#475467}
.tc-readiness-card.is-ready{background:#ecfdf3;border-color:#abefc6}.tc-readiness-card.is-ready .tc-readiness-dot{background:#17b26a;box-shadow:0 0 0 3px rgba(23,178,106,.15)}.tc-readiness-card.is-ready strong{color:#067647}
.tc-readiness-card.is-login-required{background:#fffaeb;border-color:#fedf89}.tc-readiness-card.is-login-required .tc-readiness-dot{background:#f79009}.tc-readiness-card.is-login-required strong{color:#93370d}
.tc-readiness-card.is-starting{background:#eff8ff;border-color:#b2ddff}.tc-readiness-card.is-starting .tc-readiness-dot{background:#2e90fa}.tc-readiness-card.is-starting strong{color:#175cd3}
.tc-readiness-card.is-fault{background:#fef3f2;border-color:#fda29b}.tc-readiness-card.is-fault .tc-readiness-dot{background:#f04438}.tc-readiness-card.is-fault strong{color:#b42318}
.tc-readiness-card.is-off{background:#f2f4f7;border-color:#d0d5dd}.tc-readiness-card.is-off strong{color:#475467}

/* Scan Center v1.1 generic optional score slot. */
.scan-row-tail {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  min-width: 0;
}
.scan-row-score {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 28px;
  font-size: 10px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  color: #667085;
  white-space: nowrap;
}






/* DT watchlist only: curated watchlists keep their original presentation. */
.dt-toolbar { display:flex; gap:4px; flex-wrap:wrap; margin:6px 0; }
.dt-toolbar[hidden] { display:none; }
.dt-toolbar .btn { font-size:11px; padding:4px 6px; }
.dt-group-heading { padding:7px 9px 4px; font-size:10px; font-weight:700; letter-spacing:.08em; opacity:.7; border-bottom:1px solid rgba(128,128,128,.25); }
.dt-row-wrap { position:relative; }
.dt-row-wrap .watchlist-row { padding-right:27px; }
.dt-row-trash { position:absolute; right:2px; top:50%; transform:translateY(-50%); display:none; border:0; background:transparent; cursor:pointer; font-size:12px; }
.dt-row-wrap:hover .dt-row-trash, .dt-row-trash:focus-visible { display:block; }
.dt-row-wrap .watchlist-row.dt-bulk-selected { outline:2px solid #548fd4; outline-offset:-2px; background:rgba(84,143,212,.17); }

/* DT review metadata and persistent up/down positioning. */
.dt-row-details {display:block;font-size:10px;opacity:.75;font-weight:400;white-space:normal;}
.dt-row-wrap .watchlist-row {padding-right:74px;}
.dt-row-move {position:relative;float:right;z-index:2;border:0;background:transparent;cursor:pointer;padding:3px;font-size:13px;}

/* Scan Center + DT compact card presentation; scoped to DT only. */
.scan-center-actions {display:flex;flex-wrap:nowrap;gap:4px;}
.scan-center-actions .btn {padding-left:8px;padding-right:8px;white-space:nowrap;min-width:0;}
#scanCenterSameDayFilterBtn.is-active {border-color:#4b8cca;background:rgba(74,137,207,.15);font-weight:700;}
.dt-date-heading {font-size:10px;font-weight:700;letter-spacing:.04em;margin:10px 4px 5px;color:var(--muted-text,#6d7480);text-transform:uppercase;}
.dt-scan-card {display:flex;align-items:center;min-height:43px;gap:6px;border:1px solid #e2e5e9;border-radius:8px;margin:4px 2px;padding:4px 7px;cursor:grab;background:var(--panel-bg,#fff);}
.dt-scan-card.is-selected {background:rgba(105,119,137,.12);border-color:#b8bec8;}
.dt-scan-card.is-approved {border-left:3px solid #67c6a7;}
.dt-scan-card.is-rejected {border-left:3px solid #e5a19f;}
.dt-scan-card.is-watch {border-left:3px solid #f0b35b;}
.dt-scan-card.is-dragging {opacity:.45;}
.dt-card-state {flex:0 0 16px;text-align:center;font-size:13px;color:#8598a8;}
.dt-scan-card.is-approved .dt-card-state {color:#2aa77b;}
.dt-scan-card.is-rejected .dt-card-state {color:#d64c4b;}
.dt-card-link.watchlist-row {padding:0;display:flex;flex:1;min-width:0;background:transparent;border:0;box-shadow:none;align-items:center;text-decoration:none;}
.dt-card-text {display:flex;flex-direction:column;min-width:0;line-height:1.28;}
.dt-card-text strong {font-size:12px;color:inherit;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.dt-card-text small {font-size:10px;opacity:.73;}
.dt-card-actions {flex:0 0 auto;display:flex;align-items:center;}
.dt-card-remove {border:1px solid #e4e6ea;border-radius:5px;background:transparent;color:#cf4141;cursor:pointer;font-size:15px;line-height:19px;width:23px;height:23px;}

/* Optional TradingView-style rail-only layout; right icon rail stays interactive. */
body.open1h-rail-collapsed .main-shell{grid-template-columns:48px minmax(0,1fr) 44px 0px!important;}
body.open1h-rail-collapsed .right-shell:not(.rail-open){grid-column:3/5!important;width:44px!important;min-width:44px!important;display:flex!important;padding:8px 4px!important;justify-content:center!important;overflow:visible!important;}
body.open1h-rail-collapsed .right-shell .right-panels{display:none!important;}
#open1hRailCollapseBtn{position:fixed;z-index:10030;width:18px;height:28px;padding:0;display:flex;align-items:center;justify-content:center;background:#fff;color:#334155;border:1px solid #94a3b8;border-radius:5px 0 0 5px;cursor:pointer;font-size:18px;line-height:1;box-shadow:0 1px 4px #0002;}
body.open1h-rail-collapsed #open1hRailCollapseBtn{display:flex;}


/* SIP GANN SCROLL FIX 20261030 */
#tradeCenterPanelShell .trade-center-inner {
    flex: 1 1 auto;
    min-height: 0;
    padding-right: 6px;
    padding-bottom: 40px;
}

/* TRADE CENTER SINGLE-SCROLLER FIX */
#tradeCenterPanelShell:not([hidden]) {
    display: flex !important;
    flex-direction: column !important;
    max-height: calc(100vh - 116px) !important;
    overflow: hidden !important;
}

#tradeCenterPanelShell .trade-center-inner {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    padding-right: 6px !important;
    padding-bottom: 80px !important;
}

#tradeCenterPanelShell .trade-center-tab-panels {
    min-height: 0 !important;
    overflow: visible !important;
}

#tradeCenterPanelShell [data-trade-center-view] {
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
    padding-bottom: 24px !important;
}
