/* ==========================================================================
   SPX / SPY 0 DTE QUANT DESK - MINIMALIST TERMINAL STYLESHEET
   Clean, high-density, distraction-free aesthetic.
   ========================================================================== */

:root {
  --bg-core: #07090e;
  --bg-panel: #0d1118;
  --bg-subtle: #131822;
  --bg-hover: #1a2232;
  
  --border-dim: #1a202c;
  --border-mid: #252e3e;
  --border-bright: #3b475d;

  --text-main: #e2e8f0;
  --text-muted: #8492a6;
  --text-dim: #505c6e;

  /* Trading Colors */
  --c-call: #10b981;        /* muted emerald */
  --c-call-dim: rgba(16, 185, 129, 0.15);
  --c-put: #f43f5e;         /* muted rose */
  --c-put-dim: rgba(244, 63, 94, 0.15);
  --c-spot: #f59e0b;        /* gold / amber */
  --c-flip: #06b6d4;        /* cyan */
  --c-cwall: #3b82f6;       /* blue */
  --c-pwall: #ec4899;       /* pink / magenta */
  --c-be: #a855f7;          /* purple breakeven */
  
  --font-mono: "JetBrains Mono", "SF Mono", "Roboto Mono", Consolas, Menlo, monospace;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-core);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ==========================================================================
   TOP NAV / CONTROL STRIP
   ========================================================================== */
.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  background-color: var(--bg-panel);
  border-bottom: 1px solid var(--border-dim);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-title {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-main);
}

.brand-sub {
  color: var(--text-dim);
  font-weight: 400;
}

.control-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.control-group label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

select {
  background-color: var(--bg-subtle);
  color: var(--text-main);
  border: 1px solid var(--border-mid);
  padding: 4px 10px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 12px;
  outline: none;
  cursor: pointer;
}

select:focus {
  border-color: var(--border-bright);
}

.btn-subtle {
  background-color: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-dim);
  padding: 4px 8px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-subtle:hover {
  background-color: var(--bg-subtle);
  color: var(--text-main);
  border-color: var(--border-mid);
}

.regime-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: 2px;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-mid);
  color: var(--text-muted);
}

.regime-tag.expansion {
  color: var(--c-call);
  border-color: rgba(16, 185, 129, 0.4);
  background-color: var(--c-call-dim);
}

.regime-tag.compression {
  color: var(--c-put);
  border-color: rgba(244, 63, 94, 0.4);
  background-color: var(--c-put-dim);
}

.status-indicator {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
}

.status-indicator.live {
  color: var(--c-call);
}

/* ==========================================================================
   METRICS STRIP
   ========================================================================== */
.metrics-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1px;
  background-color: var(--border-dim);
  border-bottom: 1px solid var(--border-dim);
}

.metric-card {
  background-color: var(--bg-panel);
  padding: 8px 14px;
  display: flex;
  flex-direction: column;
}

.metric-card.highlight {
  background-color: #0f1522;
}

.metric-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  margin-bottom: 2px;
}

.metric-val {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
}

.metric-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.metric-val.green, .metric-sub.green { color: var(--c-call); }
.metric-val.red, .metric-sub.red { color: var(--c-put); }
.metric-val.gold { color: var(--c-spot); }

/* ==========================================================================
   MAIN WORKSPACE & PANELS
   ========================================================================== */
.main-workspace {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.panel-box {
  background-color: var(--bg-panel);
  border: 1px solid var(--border-dim);
  border-radius: 4px;
  padding: 10px 14px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  min-height: 28px;
  box-sizing: border-box;
  flex-wrap: nowrap;
  gap: 12px;
}

.panel-title-group {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  white-space: nowrap;
}

.panel-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.panel-subtitle {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
}

.legend-items {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  white-space: nowrap;
  flex-shrink: 0;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.spot-dot { background-color: var(--c-spot); }
.dot-rv { background-color: #10b981; }
.dot-iv { background-color: #fb923c; }
.dot-disp { background-color: #f59e0b; }
.dot-be { background-color: #a855f7; }

.line-be {
  width: 10px;
  height: 2px;
  background-color: var(--c-be);
  display: inline-block;
}

.line-call-curve {
  width: 10px;
  height: 2px;
  background-color: #10b981;
  display: inline-block;
}

.line-put-curve {
  width: 10px;
  height: 2px;
  background-color: #f43f5e;
  display: inline-block;
}


.line-cwall {
  width: 10px;
  height: 2px;
  border-top: 1px dashed var(--c-cwall);
  display: inline-block;
}

.line-pwall {
  width: 10px;
  height: 2px;
  border-top: 1px dashed var(--c-pwall);
  display: inline-block;
}

.line-current-smile {
  width: 10px;
  height: 2px;
  background-color: var(--c-flip); /* bright teal / cyan */
  display: inline-block;
}

.line-open-smile {
  width: 10px;
  height: 2px;
  border-top: 1px dashed rgba(255, 255, 255, 0.4);
  display: inline-block;
}

/* Dedicated Timeline Controls & Legend Toolbar */
.timeline-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 4px 0 6px 0;
  margin-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.timeline-controls-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.control-subgroup {
  display: flex;
  align-items: center;
  gap: 6px;
}

.toolbar-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-dim);
}

.scale-mode-toggle,
.cone-mode-toggle,
.curve-mode-toggle,
.segmented-control {
  display: flex;
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.scale-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 3px 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.scale-btn:hover {
  color: var(--text-main);
  background-color: rgba(255, 255, 255, 0.08);
}

.scale-btn.active {
  background-color: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  font-weight: 600;
}

#btn-time-theta.active {
  background-color: rgba(168, 85, 247, 0.22);
  color: #c084fc;
  font-weight: 600;
}

#btn-time-runway.active {
  background-color: rgba(6, 182, 212, 0.22);
  color: #22d3ee;
  font-weight: 600;
}

#vol-excl-close-btn.active {
  background-color: rgba(245, 158, 11, 0.22);
  color: #fbbf24;
  font-weight: 600;
}

#btn-model-theo.active {
  background-color: rgba(59, 130, 246, 0.22);
  color: #60a5fa;
  font-weight: 600;
}

#btn-model-emp.active {
  background-color: rgba(245, 158, 11, 0.22);
  color: #fbbf24;
  font-weight: 600;
}

#time-model-subgroup.disabled {
  opacity: 0.35;
  pointer-events: none;
  filter: grayscale(0.6);
}

.cone-btn.morning-cone.active {
  background-color: rgba(168, 85, 247, 0.22);
  color: #c084fc;
  font-weight: 600;
}

.cone-btn.dynamic-cone.active {
  background-color: rgba(6, 182, 212, 0.22);
  color: #22d3ee;
  font-weight: 600;
}

.cone-btn.call-curve-btn.active {
  background-color: rgba(16, 185, 129, 0.22);
  color: #34d399;
  font-weight: 600;
}

.cone-btn.put-curve-btn.active {
  background-color: rgba(244, 63, 94, 0.22);
  color: #fb7185;
  font-weight: 600;
}

.cone-btn.bracket-exit-btn.active {
  background-color: rgba(16, 185, 129, 0.22);
  color: #34d399;
  font-weight: 600;
}

.segmented-control .offset-btn.active {
  background-color: rgba(59, 130, 246, 0.25);
  color: #93c5fd;
  font-weight: 600;
}

.cone-legend-morning {
  display: inline-block;
  width: 14px;
  height: 7px;
  background-color: rgba(168, 85, 247, 0.3);
  border: 1px dashed #c084fc;
  border-radius: 1px;
  margin-right: 4px;
  vertical-align: middle;
}

.cone-legend-dynamic {
  display: inline-block;
  width: 14px;
  height: 7px;
  background-color: rgba(6, 182, 212, 0.3);
  border: 1px dashed #22d3ee;
  border-radius: 1px;
  margin-right: 4px;
  vertical-align: middle;
}

.scrubber-readout {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 3px 10px;
  border-radius: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 1;
  min-width: 0;
}

/* ==========================================================================
   CHARTS & CANVASES
   ========================================================================== */
.chart-container {
  position: relative;
  width: 100%;
}

#timeline-chart-container {
  height: 280px;
}

canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.chart-tooltip {
  position: absolute;
  display: none;
  background-color: rgba(9, 13, 20, 0.95);
  border: 1px solid var(--border-bright);
  padding: 6px 10px;
  font-size: 11px;
  border-radius: 3px;
  pointer-events: none;
  z-index: 100;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.timeline-controls {
  padding: 8px 0 6px 0;
  display: flex;
  align-items: center;
  width: 100%;
}

input[type="range"] {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: var(--border-mid);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--c-spot);
  cursor: pointer;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
}

/* Timeline Scrubber - Exactly matched to timeline canvas chart coordinates (padLeft 60px, padRight 60px) */
#timeline-scrubber {
  margin-left: 54px;
  margin-right: 54px;
  width: calc(100% - 108px);
}

#timeline-scrubber::-webkit-slider-thumb:hover,
#timeline-scrubber::-webkit-slider-thumb:active {
  transform: scale(1.25);
  box-shadow: 0 0 8px var(--c-spot);
}

#timeline-scrubber::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--c-spot);
  cursor: pointer;
  border: none;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

#timeline-scrubber::-moz-range-thumb:hover,
#timeline-scrubber::-moz-range-thumb:active {
  transform: scale(1.25);
  box-shadow: 0 0 8px var(--c-spot);
}

#timeline-scrubber::-moz-range-track {
  height: 4px;
  background: var(--border-mid);
  border-radius: 2px;
}

/* Sub-chart Ribbon */
.subchart-ribbon {
  margin-top: 8px;
  border-top: 1px solid var(--border-dim);
  padding-top: 6px;
}

.ribbon-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 26px;
  box-sizing: border-box;
  flex-wrap: nowrap;
  gap: 10px;
  margin-bottom: 4px;
}

.ribbon-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.ribbon-tab, .strike-tab, .smile-tab {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 2px;
  cursor: pointer;
}

.ribbon-tab.active, .strike-tab.active, .smile-tab.active {
  background-color: var(--bg-subtle);
  border-color: var(--border-mid);
  color: var(--text-main);
}

.subchart-canvas-box {
  height: 105px;
  width: 100%;
}

/* Bottom Split Layout */
.bottom-split-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 900px) {
  .bottom-split-row {
    grid-template-columns: 1fr;
  }
}

.strike-chart-box, .smile-chart-box {
  height: 220px;
}

.strike-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 6px;
}

.smile-controls-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}

.smile-tabs {
  display: flex;
  gap: 4px;
}

.smile-scale-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.scale-label {
  font-size: 10px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
}

.scale-stepper-toggle {
  display: flex;
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.scale-step-btn {
  padding: 3px 8px;
  font-weight: 700;
  line-height: 1;
}

.metric-pills {
  display: flex;
  gap: 6px;
}

.pill {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  background: var(--bg-subtle);
  padding: 1px 6px;
  border-radius: 2px;
  border: 1px solid var(--border-dim);
}

.smile-footer {
  font-size: 10px;
  color: var(--text-dim);
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  margin-top: 4px;
}

/* ==========================================================================
   MULTI-DAY TABLE
   ========================================================================== */
.table-responsive {
  overflow-x: auto;
  max-height: 260px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.data-table th {
  text-align: right;
  padding: 6px 10px;
  background-color: var(--bg-subtle);
  color: var(--text-dim);
  font-weight: 500;
  border-bottom: 1px solid var(--border-mid);
  position: sticky;
  top: 0;
  z-index: 10;
}

.data-table th:first-child,
.data-table th:nth-last-child(2),
.data-table th:last-child {
  text-align: left;
}

.data-table td {
  padding: 5px 10px;
  text-align: right;
  border-bottom: 1px solid var(--border-dim);
  color: var(--text-muted);
}

.data-table td:first-child,
.data-table td:nth-last-child(2),
.data-table td:last-child {
  text-align: left;
}

.data-table tbody tr {
  cursor: pointer;
  transition: background-color 0.1s ease;
}

.data-table tbody tr:hover {
  background-color: var(--bg-hover);
  color: var(--text-main);
}

.data-table tbody tr.active-session {
  background-color: rgba(59, 130, 246, 0.12);
  color: var(--text-main);
}

.data-table tbody tr.active-session td {
  color: var(--text-main);
  border-bottom-color: rgba(59, 130, 246, 0.3);
}

.tag-win {
  color: var(--c-call);
  font-weight: 600;
}

.tag-loss {
  color: var(--c-put);
}

.btn-table {
  background: var(--bg-subtle);
  border: 1px solid var(--border-mid);
  color: var(--text-main);
  padding: 1px 6px;
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 10px;
  cursor: pointer;
}

.btn-table:hover {
  background: var(--border-bright);
}

.loading-cell {
  text-align: center !important;
  padding: 20px !important;
  color: var(--text-dim);
}

/* ==========================================================================
   BOTTOM FOOTER
   ========================================================================== */
.bottom-footer {
  display: flex;
  justify-content: space-between;
  padding: 6px 16px;
  background-color: var(--bg-panel);
  border-top: 1px solid var(--border-dim);
  font-size: 10px;
  color: var(--text-dim);
}

/* ==========================================================================
   CROSS-SESSION AGGREGATE VIEW STYLES
   ========================================================================== */
.view-mode-toggle {
  display: flex;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-mid);
  border-radius: 4px;
  overflow: hidden;
}

.view-mode-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 5px 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.view-mode-btn:hover {
  color: var(--text-main);
  background-color: rgba(255, 255, 255, 0.08);
}

.view-mode-btn.active {
  background-color: rgba(59, 130, 246, 0.25);
  color: #60a5fa;
  border-bottom: 2px solid #3b82f6;
}

.range-btn,
.scatter-btn,
.scatter-unit-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 4px 9px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.range-btn:hover,
.scatter-btn:hover,
.scatter-unit-btn:hover {
  color: var(--text-main);
  background-color: rgba(255, 255, 255, 0.08);
}

.range-btn.active,
.scatter-btn.active,
.scatter-unit-btn.active {
  background-color: rgba(59, 130, 246, 0.22);
  color: #60a5fa;
  font-weight: 600;
}

.scatter-chart-box,
.iv-hist-chart-box {
  width: 100%;
  height: 420px;
  position: relative;
}

/* Bracket Strategy Engine */
.bracket-strategy-panel {
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%);
  border: 1px solid rgba(56, 189, 248, 0.18);
}

.preset-pill {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.preset-pill:hover {
  color: var(--text-main);
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(56, 189, 248, 0.1);
}

.preset-pill.active {
  background: rgba(16, 185, 129, 0.18);
  border-color: #10b981;
  color: #10b981;
  font-weight: 600;
}

.strategy-range-slider {
  cursor: pointer;
}

.tp-slider::-webkit-slider-thumb {
  background: #10b981 !important;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.5);
}

.sl-slider::-webkit-slider-thumb {
  background: #f43f5e !important;
  box-shadow: 0 0 6px rgba(244, 63, 94, 0.5);
}

.bracket-mode-btn,
.cutoff-btn,
.scatter-color-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 4px 9px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.bracket-mode-btn:hover,
.cutoff-btn:hover,
.scatter-color-btn:hover {
  color: var(--text-main);
  background-color: rgba(255, 255, 255, 0.08);
}

.bracket-mode-btn.active,
.cutoff-btn.active,
.scatter-color-btn.active {
  background-color: rgba(59, 130, 246, 0.22);
  color: #60a5fa;
  font-weight: 600;
}

.friction-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 3px 7px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.friction-btn:hover {
  color: var(--text-main);
  background-color: rgba(255, 255, 255, 0.08);
}

.friction-btn.active {
  background-color: rgba(6, 182, 212, 0.22);
  color: #38bdf8;
  font-weight: 600;
}

.friction-slider::-webkit-slider-thumb {
  background: #38bdf8 !important;
  box-shadow: 0 0 6px rgba(56, 189, 248, 0.5);
}

/* Strategy Backtest Workspace & Controls */
.strategy-control-panel {
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%);
  border: 1px solid rgba(56, 189, 248, 0.18);
}

.strat-range-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 4px 9px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.strat-range-btn:hover {
  color: var(--text-main);
  background-color: rgba(255, 255, 255, 0.08);
}

.strat-range-btn.active {
  background-color: rgba(59, 130, 246, 0.22);
  color: #60a5fa;
  font-weight: 600;
}

/* Cumulative Equity Curve Chart */
.equity-panel {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.95) 0%, rgba(11, 15, 25, 0.98) 100%);
  border: 1px solid rgba(16, 185, 129, 0.18);
}

#equity-tooltip {
  pointer-events: none;
  position: absolute;
  display: none;
  z-index: 20;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 11px;
  color: var(--text-main);
  line-height: 1.5;
  white-space: nowrap;
}

/* Strategy Trade Log Table */
.strategy-trades-panel {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.95) 0%, rgba(11, 15, 25, 0.98) 100%);
  border: 1px solid rgba(148, 163, 184, 0.15);
}

.badge-outcome-win {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  font-size: 10px;
  font-weight: 700;
  border-radius: 4px;
  background: rgba(16, 185, 129, 0.14);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.32);
}

.badge-outcome-loss {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  font-size: 10px;
  font-weight: 700;
  border-radius: 4px;
  background: rgba(244, 63, 94, 0.14);
  color: #f43f5e;
  border: 1px solid rgba(244, 63, 94, 0.32);
}

.badge-outcome-eod {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  font-size: 10px;
  font-weight: 600;
  border-radius: 4px;
  background: rgba(148, 163, 184, 0.12);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.pnl-pos {
  color: #10b981;
  font-weight: 700;
}

.pnl-neg {
  color: #f43f5e;
  font-weight: 700;
}

.pnl-zero {
  color: #94a3b8;
  font-weight: 600;
}

/* ==========================================================================
   OPERATIONAL TIME PHASE SPACE MANIFOLD STYLES
   ========================================================================== */
.phase-space-panel {
  background: linear-gradient(180deg, rgba(13, 17, 24, 0.95) 0%, rgba(10, 14, 22, 0.98) 100%);
  border: 1px solid rgba(56, 189, 248, 0.2);
}

.phase-space-chart-box {
  width: 100%;
  height: 440px;
  position: relative;
  background-color: rgba(5, 8, 14, 0.65);
  border: 1px solid var(--border-dim);
  border-radius: 4px;
  overflow: hidden;
  cursor: crosshair;
}

#phase-space-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

#phase-space-tooltip {
  position: absolute;
  display: none;
  background-color: rgba(9, 13, 20, 0.96);
  border: 1px solid #38bdf8;
  padding: 8px 12px;
  font-size: 11px;
  border-radius: 4px;
  pointer-events: none;
  z-index: 100;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.7), 0 0 10px rgba(56, 189, 248, 0.2);
  line-height: 1.45;
}




