:root {
  --bg: #121522;
  --panel: rgba(10, 13, 24, 0.72);
  --card: rgba(255, 255, 255, 0.035);
  --border: #2a3147;
  --text: #eef2ff;
  --muted: #b7bfd8;
  --green: #7dd3b0;
  --red: #f2a7b5;
  --yellow: #f6df9a;
  --blue: #83a5ff;
  --btn: #2c3247;
  --btn2: #3b4260;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --sim-left-split: 38%;
  --sim-top-split: 44%;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(1200px 600px at 48% 8%, #2d3352 0%, var(--bg) 58%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
}

.app-tabs {
  height: 52px;
  display: flex;
  align-items: end;
  gap: 8px;
  padding: 10px 16px 0;
}

.app-tab-btn {
  appearance: none;
  border: 1px solid var(--border);
  border-bottom-color: rgba(255, 255, 255, 0.08);
  border-radius: 8px 8px 0 0;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  cursor: pointer;
  font-weight: 850;
  padding: 10px 16px;
}

.app-tab-btn.active {
  background: rgba(131, 165, 255, 0.14);
  color: var(--text);
  border-color: rgba(131, 165, 255, 0.42);
}

.app-tab-panel {
  display: none;
}

.app-tab-panel.active {
  display: grid;
}

.admin-developer {
  min-height: calc(100vh - 52px);
  padding: 14px;
  overflow: auto;
}

.admin-dev-wrap,
.account-wrap {
  display: grid;
  gap: 12px;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}

.account-shell {
  min-height: calc(100vh - 52px);
  padding: 16px;
  overflow: auto;
}

.account-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.account-card {
  display: grid;
  align-content: start;
  gap: 12px;
}

.account-card h3 {
  margin: 0;
  font-size: 15px;
  letter-spacing: 0;
}

.account-stat-list {
  display: grid;
  gap: 8px;
}

.account-stat-list span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 7px;
}

.account-stat-list b {
  color: var(--text);
  text-align: right;
}

.account-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cloud-sync-card {
  display: grid;
  gap: 10px;
}

.cloud-sync-card-header {
  align-items: start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.cloud-sync-card-header h3 {
  margin: 0 0 4px;
  font-size: 15px;
  letter-spacing: 0;
}

.cloud-sync-card-header p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.cloud-sync-map {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.cloud-sync-map span {
  display: grid;
  gap: 2px;
  padding: 7px 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.04);
}

.cloud-sync-map b {
  color: var(--text);
  font-size: 12px;
}

.cloud-sync-map small {
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.25;
}

.account-placeholder-action:disabled,
.account-danger-placeholder:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.account-danger-placeholder {
  border-color: rgba(242, 167, 181, 0.35);
  color: var(--red);
}

.admin-dev-section > summary {
  font-weight: 850;
}

.admin-dev-section .debug-details,
.admin-dev-section .data-collection-status {
  margin-top: 10px;
}

.sim-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 16px;
  height: calc(100vh - 52px);
  padding: 16px;
}

.training-hub {
  height: calc(100vh - 52px);
  overflow: auto;
  padding: 16px;
  position: relative;
}

.training-hub-inner {
  display: grid;
  gap: 12px;
  max-width: 1180px;
  width: min(1180px, 100%);
  margin: 0 auto;
}

.training-hub-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.16);
  padding: 14px;
}

.training-hub-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: end;
}

.training-hub-header h1 {
  margin: 2px 0 0;
  font-size: 22px;
  letter-spacing: 0;
}

.training-hub-header small,
.latest-session-report-panel summary small {
  color: var(--muted);
}

.app-tab-panel:not(.active) {
  display: none !important;
}

.chart-pane,
.trade-card {
  min-height: 0;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  box-shadow: var(--shadow);
}

.chart-pane {
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px, var(--sim-left-split)) minmax(0, 1fr);
  grid-template-rows: minmax(260px, var(--sim-top-split)) minmax(220px, 1fr);
  grid-template-areas:
    "settings chart1m"
    "chart15m chart5m";
  gap: 10px;
  padding: 14px;
  overflow: hidden;
}

.chart-pane.focus-mode {
  grid-template-columns: minmax(320px, 34%) minmax(0, 1fr);
  grid-template-rows: minmax(520px, 1fr);
  grid-template-areas: "settings chart1m";
}

.chart-pane.focus-mode .chart-panel-1m {
  grid-area: chart1m;
}

.chart-pane.focus-mode .chart-panel-5m,
.chart-pane.focus-mode .chart-panel-15m,
.chart-pane.focus-mode .quadrant-resizer {
  display: none;
}

.hidden { display: none !important; }

.simulator-settings-pane {
  grid-area: settings;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.16);
}

.multi-chart-grid {
  min-height: 0;
  display: contents;
}

.multi-chart-panel {
  min-width: 0;
  min-height: 0;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.chart-panel-1m { grid-area: chart1m; }
.chart-panel-15m { grid-area: chart15m; }
.chart-panel-5m { grid-area: chart5m; }

.quadrant-resizer {
  position: absolute;
  z-index: 20;
  border-radius: 999px;
  background: rgba(131, 165, 255, 0.30);
  border: 1px solid rgba(131, 165, 255, 0.46);
  pointer-events: auto;
  touch-action: none;
}

.quadrant-resizer.vertical {
  top: 14px;
  bottom: 14px;
  left: calc(14px + var(--sim-left-split));
  width: 14px;
  transform: translateX(-7px);
  cursor: col-resize;
}

.quadrant-resizer.horizontal {
  left: 14px;
  right: 14px;
  top: calc(14px + var(--sim-top-split));
  height: 14px;
  transform: translateY(-7px);
  cursor: row-resize;
}

.quadrant-resizer:hover,
.quadrant-resizer.dragging {
  background: rgba(131, 165, 255, 0.52);
  border-color: rgba(131, 165, 255, 0.76);
}

.multi-chart-title {
  position: absolute;
  top: 8px;
  left: 10px;
  z-index: 7;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(10, 13, 24, 0.76);
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.chart-header-timeframe-label {
  display: block;
}

.chart-header-timeframe-select {
  min-height: 28px;
  padding: 4px 26px 4px 8px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(10, 13, 24, 0.9);
  color: var(--text);
  font-size: 12px;
  font-weight: 850;
}

.replay-action-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0;
}

.replay-action-btn {
  min-height: 46px;
  justify-content: center;
  font-size: 15px;
  font-weight: 900;
}

.random-action-btn {
  border-color: rgba(131, 165, 255, 0.34);
  background: linear-gradient(180deg, rgba(131, 165, 255, 0.18), rgba(131, 165, 255, 0.08));
}

.chart-slot {
  position: absolute;
  inset: 0;
  min-height: 160px;
}

.compact-time {
  width: 88px;
}

.countdown-overlay {
  position: absolute;
  inset: 126px 14px auto 14px;
  z-index: 8;
  pointer-events: none;
  display: flex;
  justify-content: center;
}

.countdown-overlay.hidden {
  display: none;
}

.countdown-card {
  min-width: 240px;
  padding: 12px 16px;
  border: 1px solid rgba(246, 223, 154, 0.42);
  border-radius: 8px;
  background: rgba(10, 13, 24, 0.88);
  box-shadow: var(--shadow);
  text-align: center;
}

.countdown-card strong {
  display: block;
  font-size: 20px;
  margin-bottom: 4px;
}

.countdown-card span {
  color: var(--muted);
  font-size: 12px;
}

.countdown-bell {
  display: none;
  margin-bottom: 6px;
  font-size: 34px;
  line-height: 1;
  transform-origin: 50% 0%;
}

.countdown-live .countdown-bell {
  display: block;
}

.bell-ringing {
  animation: bell-shake 0.72s cubic-bezier(.36, .07, .19, .97) both;
}

@keyframes bell-shake {
  0%, 100% { transform: rotate(0deg) scale(1); }
  10% { transform: rotate(-18deg) scale(1.04); }
  20% { transform: rotate(16deg) scale(1.06); }
  30% { transform: rotate(-14deg) scale(1.08); }
  40% { transform: rotate(12deg) scale(1.08); }
  50% { transform: rotate(-9deg) scale(1.06); }
  60% { transform: rotate(7deg) scale(1.04); }
  75% { transform: rotate(-4deg) scale(1.02); }
}

.gap-label {
  position: absolute;
  z-index: 6;
  pointer-events: none;
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid rgba(183, 191, 216, 0.24);
  background: rgba(10, 13, 24, 0.72);
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.gap-label.hidden {
  display: none;
}

.context-level-label,
.event-marker-label {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid rgba(183, 191, 216, 0.22);
  background: rgba(10, 13, 24, 0.70);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.event-marker-line {
  position: absolute;
  z-index: 4;
  top: 0;
  bottom: 0;
  width: 1px;
  pointer-events: none;
  background: rgba(246, 223, 154, 0.45);
}

.regime-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid rgba(183, 191, 216, 0.22);
  background: rgba(0, 0, 0, 0.22);
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.regime-badge.low { color: var(--green); border-color: rgba(125, 211, 176, 0.35); }
.regime-badge.med { color: var(--yellow); border-color: rgba(246, 223, 154, 0.35); }
.regime-badge.high { color: var(--red); border-color: rgba(242, 167, 181, 0.35); }
.regime-badge.muted { color: var(--muted); }

.chart-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 10px;
}

.compact-title {
  margin-bottom: 6px;
}

.eyebrow,
.chart-stat span,
.selected-box span,
label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

h1 {
  margin: 0;
  font-size: 24px;
  letter-spacing: 0;
}

h2 {
  margin: 0 0 8px 0;
  font-size: 15px;
}

.chart-stat {
  min-width: 140px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.24);
}

.chart-stat strong {
  display: block;
  margin-top: 2px;
  font-size: 15px;
}

.chart-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.chart-toolbar:empty {
  display: none;
}

.chart-mode-controls {
  display: inline-flex;
  align-items: end;
  gap: 8px;
  flex-wrap: wrap;
}

.chart-mode-controls label {
  min-width: 108px;
}

.chart-mode-controls select {
  width: 100%;
  min-height: 30px;
  padding: 5px 8px;
  border-radius: 8px;
}

.chart-mode-resource-note {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.2;
  max-width: 360px;
}

.chart-mode-resource-note.warning {
  color: #fbbf24;
}

.chart-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-left: auto;
}

.segmented {
  display: inline-flex;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.24);
}

.segmented button {
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0;
  min-width: 48px;
  background: transparent;
}

.segmented button:last-child { border-right: 0; }
.segmented button.active { background: rgba(131, 165, 255, 0.24); color: var(--text); }

.overlay-dropdown {
  position: relative;
  z-index: 20;
}

.chart-overlay-control {
  position: absolute;
  top: 8px;
  right: 10px;
  z-index: 8;
}

.overlay-dropdown summary {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(8, 13, 24, 0.92);
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
  list-style: none;
}

.overlay-dropdown summary::-webkit-details-marker {
  display: none;
}

.overlay-dropdown summary::after {
  content: "▾";
  color: var(--muted);
  font-size: 10px;
}

.overlay-dropdown[open] summary::after {
  content: "▴";
}

.overlay-dropdown summary b {
  color: var(--muted);
  font-weight: 600;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overlay-grid {
  min-width: 230px;
  max-width: 300px;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(8, 13, 24, 0.98);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.38);
}

.overlay-dropdown:not([open]) .overlay-grid {
  display: none;
}

.overlay-grid label,
.chip-check {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 7px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
}

.overlay-grid input[type="checkbox"] {
  accent-color: var(--muted);
}

.warnings {
  min-height: 28px;
  color: var(--yellow);
  font-size: 12px;
}

.warnings div {
  display: inline-block;
  margin: 0 6px 6px 0;
  padding: 6px 9px;
  border-radius: 10px;
  border: 1px solid rgba(246, 223, 154, 0.35);
  background: rgba(246, 223, 154, 0.08);
}

.chart-diagnostics {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  min-height: 24px;
  margin-top: 8px;
  color: rgba(213, 219, 246, 0.64);
  font-size: 12px;
}

.chart-diagnostics b {
  color: rgba(231, 241, 255, 0.9);
}

.loading-status {
  color: rgba(246, 223, 154, 0.88);
  font-size: 12px;
  min-width: 92px;
}

.loading-overlay {
  position: absolute;
  inset: 128px 16px 92px 16px;
  z-index: 5;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(11, 15, 28, 0.72);
  backdrop-filter: blur(4px);
  pointer-events: none;
}

.loading-overlay.hidden {
  display: none;
}

.loading-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(24, 29, 47, 0.95);
  color: rgba(231, 241, 255, 0.92);
  box-shadow: var(--shadow);
}

.loading-card span {
  color: rgba(213, 219, 246, 0.58);
  font-size: 12px;
}

.spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--blue);
  animation: spin .8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.performance-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  min-height: 24px;
  margin-top: 5px;
  color: rgba(213, 219, 246, 0.58);
  font-size: 12px;
}

.performance-panel b {
  color: rgba(246, 223, 154, 0.95);
}

.load-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  min-height: 24px;
  margin-top: 5px;
  color: rgba(213, 219, 246, 0.58);
  font-size: 12px;
}

.load-stats b {
  color: rgba(231, 241, 255, 0.88);
}

.muted-note {
  color: rgba(213, 219, 246, 0.48);
}

#chart1m {
  position: relative;
  min-height: 0;
  height: 100%;
  border-radius: 14px;
  overflow: hidden;
}

.current-price-label {
  position: absolute;
  right: 3px;
  z-index: 8;
  min-width: 58px;
  padding: 3px 5px 4px;
  border-radius: 4px;
  color: #07110d;
  background: var(--green);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.26);
  pointer-events: none;
  text-align: center;
  line-height: 1.05;
  transform: translateY(-50%);
}

.current-price-label.down {
  color: #18090d;
  background: var(--red);
}

.current-price-label.hidden {
  display: none;
}

.current-price-label span,
.current-price-label small {
  display: block;
  font-variant-numeric: tabular-nums;
}

.current-price-label span {
  font-size: 12px;
  font-weight: 850;
}

.current-price-label small {
  margin-top: 2px;
  font-size: 11px;
  font-weight: 750;
}

.chart-debug-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding-top: 8px;
}

.trade-card {
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 4px;
}

.scanner-wrap {
  position: relative;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.22);
  padding: 3px 6px;
  margin-bottom: 2px;
}

.scanner-title {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 14.5px;
  letter-spacing: 0;
  color: rgba(231, 241, 255, 0.72);
}

.pill {
  position: absolute;
  top: 4px;
  right: 6px;
  padding: 2px 5px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 10.5px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.25);
}

.pill.ok { color: var(--green); border-color: rgba(38, 208, 124, 0.45); }
.pill.bad { color: var(--red); border-color: rgba(255, 75, 92, 0.45); }
.pill.paused { color: var(--yellow); border-color: rgba(246, 223, 154, 0.45); }

.replay-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.chart-replay-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 5px 6px;
  margin: 0 0 5px;
}

.chart-replay-controls .symbol-select-label {
  min-width: 112px;
}

.chart-replay-controls #dateSelect {
  width: 214px;
  min-width: 214px;
  max-width: 214px;
}

.chart-replay-controls label {
  min-width: 72px;
}

.chart-replay-controls .date-select-control {
  width: 214px;
  min-width: 214px;
  max-width: 214px;
}

.chart-replay-controls .date-select-control select {
  width: 214px;
}

.chart-replay-controls .chip-check {
  min-width: auto;
  min-height: 28px;
  justify-content: center;
  white-space: nowrap;
}

.chart-replay-controls select,
.chart-replay-controls .input {
  min-height: 28px;
  padding: 5px 7px;
  border-radius: 8px;
}

.chart-replay-controls .btn {
  min-height: 28px;
  padding: 5px 8px;
}

.replay-time-inline {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(0, 0, 0, 0.24);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.replay-time-inline b {
  color: var(--text);
  font-size: 12.5px;
  margin-left: 4px;
  font-variant-numeric: tabular-nums;
}

.replay-status-box {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px 8px;
  margin: 2px 0 6px;
  padding: 5px 7px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(0, 0, 0, 0.28);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}

.replay-status-box b,
.replay-status-box .loading-status {
  color: var(--text);
}

.data-coverage-badge {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 11px;
  line-height: 1.2;
}

.data-coverage-complete {
  color: #9bf0b4;
  border-color: rgba(91, 214, 129, 0.35);
  background: rgba(91, 214, 129, 0.1);
}

.data-coverage-incomplete {
  color: var(--yellow);
  border-color: rgba(246, 223, 154, 0.35);
  background: rgba(246, 223, 154, 0.08);
}

.data-coverage-unavailable {
  color: #ffb4b4;
  border-color: rgba(255, 122, 122, 0.35);
  background: rgba(255, 122, 122, 0.08);
}

.replay-controls:not(.chart-replay-controls) .chip-check {
  grid-column: 1 / -1;
  justify-content: center;
}

.training-date-filters-panel {
  margin: 2px 0 5px;
  padding: 5px 6px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
}

.training-date-filters-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  color: var(--text);
  font-size: 12px;
  font-weight: 850;
}

.training-date-filters-panel summary small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.training-filter-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 5px;
  margin-top: 6px;
}

.training-filter-grid label {
  display: grid;
  gap: 2px;
  min-width: 0;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.05;
}

.training-filter-grid select,
.training-filter-grid .input {
  width: auto;
  min-width: 8ch;
  max-width: 19ch;
  min-height: 25px;
  padding: 3px 6px;
  border-radius: 7px;
  font-size: 11px;
}

.training-filter-grid input[type="date"] {
  width: 124px;
  min-width: 124px;
}

.training-filter-grid .chip-check {
  justify-content: flex-start;
  min-height: 25px;
  padding: 3px 6px;
  font-size: 10.5px;
  white-space: nowrap;
}

.training-reset-btn {
  align-self: end;
  width: auto;
  min-height: 25px;
  padding: 3px 7px;
  white-space: nowrap;
}

.training-filter-message {
  flex: 1 0 100%;
  min-height: 18px;
  padding: 2px 0 0;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 750;
}

.spy-dev-paper-panel {
  margin: 2px 0 6px;
  padding: 6px 7px;
  border: 1px dashed rgba(125, 211, 176, 0.35);
  border-radius: 8px;
  background: rgba(6, 24, 18, 0.28);
}

.spy-dev-paper-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  color: var(--text);
  font-size: 12px;
  font-weight: 850;
}

.spy-dev-paper-panel summary small {
  color: #7dd3b0;
  font-size: 11px;
  font-weight: 800;
}

.spy-dev-paper-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
}

.spy-dev-paper-grid label {
  min-width: 0;
}

.spy-dev-paper-grid .input,
.spy-dev-paper-grid .btn {
  width: 100%;
  min-height: 28px;
}

.spy-dev-asset-mode {
  align-self: end;
  min-height: 28px;
  padding: 7px 8px;
  border-radius: 8px;
  background: rgba(125, 211, 176, 0.08);
  color: #7dd3b0;
  font-size: 11px;
  font-weight: 850;
}

.spy-dev-paper-output {
  grid-column: 1 / -1;
  min-height: 84px;
  max-height: 180px;
  overflow: auto;
  padding: 7px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(0, 0, 0, 0.24);
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 11px;
  line-height: 1.35;
  white-space: pre-wrap;
}

.exec-actions,
.replay-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 3px;
  margin: 2px 0;
}

.exec-actions {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: stretch;
  width: 100%;
  box-sizing: border-box;
}

#buyCall { grid-column: 1 / 4; }
#buyPut { grid-column: 4 / 7; }
#sell25 { grid-column: 1 / 3; }
#sell50 { grid-column: 3 / 5; }
#sell100 { grid-column: 5 / 7; }

.platform-hotkey-hint {
  grid-column: 1 / 7;
  margin-top: 1px;
  color: rgba(213, 219, 246, 0.70);
  font-size: 11.5px;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  white-space: nowrap;
}

.exec-compact-bar {
  display: grid;
  gap: 1px;
  margin: 2px 0;
  min-width: 0;
  max-width: 100%;
}

.exec-grid-row {
  display: grid;
  gap: 1px;
  align-items: stretch;
  min-width: 0;
}

.stat-row {
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
}

.control-row {
  grid-template-columns: repeat(auto-fit, minmax(142px, 1fr));
}

.log-row {
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

.exec-chip {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 3px;
  min-height: 24px;
  padding: 1px 4px;
  box-sizing: border-box;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
  line-height: 1.1;
  white-space: normal;
  min-width: 0;
  overflow: visible;
}

.chip-val {
  color: var(--text);
  font-weight: 900;
  min-width: 0;
}

.stat-chip {
  justify-content: space-between;
  min-width: 0;
  width: 100%;
}

.pnl-stat {
  width: 100%;
  min-width: 0;
}

.trades-stat {
  min-width: 0;
}

.stat-val {
  display: inline-block;
  min-width: 52px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  overflow: visible;
  font-size: 15px;
}

.pnl-val {
  flex: 0 0 auto;
  min-width: 88px;
  font-size: 19px;
  letter-spacing: 0;
}

.hide-pnl-inline {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.hide-pnl-chip {
  justify-content: center;
  gap: 5px;
}

.hide-pnl-chip input,
.trade-log-toggle input {
  width: 12px;
  height: 12px;
  margin: 0;
}

.control-chip {
  width: 100%;
  min-width: 0;
}

.stop-chip {
  gap: 4px;
}

.hide-pnl-inline input {
  width: 12px;
  height: 12px;
  margin: 0;
}

.input,
select,
button {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text);
  border-radius: 12px;
  padding: 8px 10px;
  font-weight: 800;
  outline: none;
}

select option { color: #111827; }

.exec-chip .input,
.exec-chip select.input {
  width: auto;
  min-width: 0;
  height: 21px;
  padding: 1px 4px;
  border-radius: 6px;
  font-size: 12.75px;
  font-weight: 800;
  box-sizing: border-box;
  flex: 0 1 auto;
}

#moneyness { width: 112px; min-width: 112px; max-width: 112px; }
#right { width: 66px; }
#qtyInput { width: 38px; min-width: 38px; text-align: right; font-variant-numeric: tabular-nums; }
#setupTagSelect {
  width: 124px;
  min-width: 124px;
  max-width: 124px;
}

.setup-quality-hint {
  flex: 1 1 100%;
  margin-top: -3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.25;
}

.setup-quality-hint[data-tone="nudge"] {
  color: #f6df9a;
}

.pricing-chip select.input {
  width: 84px;
  min-width: 84px;
  max-width: 84px;
}
.stop-loss-input {
  width: 4ch !important;
  min-width: 4ch !important;
  max-width: 4ch;
  box-sizing: content-box;
  padding-left: 4px !important;
  padding-right: 4px !important;
  text-align: right;
  font-variant-numeric: tabular-nums;
  appearance: textfield;
  -moz-appearance: textfield;
}

.stop-loss-input::-webkit-outer-spin-button,
.stop-loss-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.stop-loss-status-chip { min-width: 104px; justify-content: center; }
.trade-log-copy {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 24px;
  padding: 2px 5px;
  font-size: 12.5px;
  border-radius: 6px;
  white-space: normal;
}

.trade-log-toggle {
  min-height: 24px;
  justify-content: center;
  box-sizing: border-box;
  font-size: 12.5px;
  font-weight: 800;
  min-width: 0;
  overflow: visible;
  white-space: normal;
}

.trade-log-fallback {
  width: 100%;
  min-height: 110px;
  margin: 4px 0 6px;
  padding: 8px;
  resize: vertical;
  font-size: 11px;
  line-height: 1.35;
}

.trade-log-fallback.hidden {
  display: none;
}
#dateSelect { width: 100%; }

.btn {
  min-width: 72px;
  min-height: 28px;
  padding: 5px 8px;
  border-radius: 8px;
  font-size: 12.5px;
  cursor: pointer;
  background: linear-gradient(180deg, var(--btn2), var(--btn));
}

.btn.compact {
  min-width: 50px;
  padding: 4px 7px;
  border-radius: 7px;
  font-size: 11.5px;
}

.btn.buy-call { background: linear-gradient(180deg, rgba(131, 165, 255, 0.92), rgba(131, 165, 255, 0.52)); }
.btn.buy-put { background: linear-gradient(180deg, rgba(255, 75, 92, 0.95), rgba(255, 75, 92, 0.55)); }
.btn:hover { filter: brightness(1.1); }

.selected-box,
.box {
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(0, 0, 0, 0.28);
  padding: 3px 4px;
  margin-top: 2px;
}

.selected-box strong,
.selected-box small {
  display: block;
  margin-top: 3px;
}

.selected-box strong {
  font-size: 16px;
  line-height: 1.25;
}

.selected-contracts-box {
  padding: 3px 4px;
}

.selected-contracts-title {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 2px;
}

.selected-atm-inline {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.selected-contract-hidden {
  display: none;
}

.selected-contract-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
}

.selected-side {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 2px 4px;
  background: rgba(255, 255, 255, 0.025);
  min-width: 0;
}

.selected-side-heading {
  display: flex;
  justify-content: space-between;
  gap: 4px;
  align-items: baseline;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.1;
}

.selected-side-heading strong {
  color: var(--text);
  font-size: 18px;
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.selected-quote-line {
  margin-top: 2px;
  font-size: 15px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  white-space: normal;
  line-height: 1.15;
}

.quote-freshness {
  display: none;
}

.quote-freshness.fresh {
  color: #8dd7a5;
}

.quote-freshness.stale {
  color: #f1ad73;
}

.quote-bid-ask {
  display: block;
}

.quote-mid-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 1px;
  min-width: 0;
}

.spread-meter {
  position: relative;
  flex: 1 1 42px;
  max-width: 70px;
  min-width: 38px;
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.10);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.spread-meter > span {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  transition: width 120ms ease, background 120ms ease;
}

.spread-meter.tight > span {
  background: linear-gradient(90deg, rgba(116, 232, 182, 0.72), rgba(116, 232, 182, 0.96));
}

.spread-meter.medium > span {
  background: linear-gradient(90deg, rgba(255, 214, 126, 0.78), rgba(255, 178, 94, 0.98));
}

.spread-meter.wide > span {
  background: linear-gradient(90deg, rgba(255, 140, 116, 0.82), rgba(255, 75, 92, 0.98));
}

.spread-meter-empty {
  opacity: 0.45;
}

.selected-side-reason {
  margin-top: 1px;
  color: var(--muted);
  line-height: 1.15;
}

.selected-box small {
  font-size: 12.5px;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.38;
  white-space: pre-wrap;
  word-break: break-word;
  color: #d5dbf6;
}

#positionsBox {
  height: 72px;
  min-height: 72px;
  max-height: 240px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 3px;
  font-size: 14.5px;
  line-height: 1.05;
  white-space: normal;
  word-break: normal;
  resize: vertical;
}

#positionsBox.positions-stale {
  box-shadow: none;
}

.positions-quote-age {
  display: none;
}

.positions-panel {
  padding: 2px 4px;
}

.positions-panel h2 {
  margin: 0;
  font-size: 15px;
  line-height: 1;
}

.session-journal-panel {
  margin-top: 8px;
}

.session-journal-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  font-weight: 850;
}

.session-journal-panel summary small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.journal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.journal-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 750;
}

.journal-field-wide {
  grid-column: 1 / -1;
}

.journal-mode-note {
  justify-content: center;
  padding: 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.14);
}

.journal-mode-note b {
  color: var(--text);
  font-size: 13px;
}

.journal-notes,
.journal-summary {
  width: 100%;
  resize: vertical;
  line-height: 1.35;
}

.journal-emotions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 8px;
  margin: 0;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}

.journal-emotions legend {
  padding: 0 4px;
  color: var(--muted);
}

.journal-emotions label {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text);
  font-size: 11px;
  font-weight: 650;
}

.journal-auto-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px 8px;
  padding: 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.16);
  color: var(--muted);
  font-size: 11px;
}

.journal-auto-stats span {
  min-width: 0;
}

.journal-auto-stats b {
  color: var(--text);
}

.performance-tracking-panel {
  margin-top: 8px;
}

.training-hub-section {
  margin-top: 8px;
}

.training-hub-section summary,
.latest-session-report-panel summary,
.telemetry-panel summary {
  cursor: pointer;
  font-weight: 850;
}

.current-session-quality {
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

.tester-persistence-notice {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 7px;
  border: 1px solid rgba(246, 223, 154, 0.34);
  background: rgba(246, 223, 154, 0.08);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.tester-persistence-notice strong {
  color: var(--text);
  font-size: 12px;
}

.session-state-strip {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 8px;
}

.session-state-strip span {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  padding: 4px 7px;
}

.session-state-strip b {
  color: var(--text);
}

.performance-tracking-panel summary {
  cursor: pointer;
  font-weight: 850;
}

.performance-tracking-panel summary small {
  color: var(--muted);
  float: right;
  font-size: 11px;
}

.performance-grid {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.performance-stats {
  grid-template-columns: repeat(auto-fit, minmax(126px, 1fr));
}

.dashboard-filter-row {
  align-items: end;
  background: rgba(0, 0, 0, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px;
}

.dashboard-filter-row label {
  color: var(--muted);
  display: grid;
  font-size: 11px;
  font-weight: 800;
  gap: 3px;
}

.dashboard-filter-row .input {
  min-width: 132px;
}

.dashboard-filter-row #dashFilterSessionMode {
  min-width: 112px;
}

.dashboard-filter-row #dashFilterSymbol {
  min-width: 92px;
}

.dashboard-filter-row .btn {
  align-self: end;
}

.performance-backup-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.performance-export-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tester-onboarding-panel {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 8px;
}

.tester-onboarding-panel summary {
  cursor: pointer;
  color: var(--text);
  font-size: 12px;
  font-weight: 850;
}

.tester-onboarding-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-top: 8px;
}

.tester-onboarding-grid strong {
  color: var(--text);
  font-size: 12px;
}

.tester-onboarding-grid ol,
.tester-onboarding-grid ul {
  margin: 6px 0 0;
  padding-left: 18px;
}

.tester-onboarding-grid li,
.tester-onboarding-grid p {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.recent-sessions-panel summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.recent-sessions-panel summary small {
  float: right;
  font-size: 11px;
}

.recent-sessions-list {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  font-size: 11px;
}

.recent-session-row {
  display: grid;
  grid-template-columns: 48px 74px 98px minmax(130px, 1.25fr) minmax(100px, 1fr) 48px 72px 58px 76px 82px;
  gap: 6px;
  align-items: center;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.14);
  color: var(--muted);
}

.recent-session-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-session-row.recent-session-sandbox {
  background: rgba(246, 223, 154, 0.06);
  box-shadow: inset 3px 0 0 rgba(246, 223, 154, 0.5);
}

.recent-session-header {
  color: var(--text);
  font-weight: 850;
  background: rgba(255, 255, 255, 0.06);
}

.recent-session-id {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
}

.recent-session-empty {
  color: var(--muted);
  padding: 8px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.14);
}

.data-collection-status summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.data-health-status {
  margin-top: 8px;
}

.data-health-status summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.data-health-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.data-health-section {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.14);
}

.data-health-section h3 {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0;
}

.data-health-score {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.data-health-score b {
  color: var(--text);
  font-size: 26px;
  line-height: 1;
}

.data-health-score span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.data-health-details {
  min-height: 94px;
  font-size: 11px;
}

@media (max-width: 920px) {
  .data-health-grid {
    grid-template-columns: 1fr;
  }
}

.telemetry-panel summary {
  cursor: pointer;
}

.trade-card h2 {
  margin: 0 0 2px 0;
  font-size: 15px;
  line-height: 1.05;
}

.position-row {
  display: flex;
  align-items: baseline;
  gap: 2px;
  flex-wrap: wrap;
  white-space: normal;
  line-height: 1.05;
  min-height: 0;
  padding: 0;
  margin: 0;
}

.position-main {
  display: inline;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
  font-size: 14.5px;
  font-weight: 850;
}

.position-badge {
  display: inline-block;
  margin-right: 4px;
  padding: 1px 4px;
  border: 1px solid rgba(91, 141, 239, 0.38);
  border-radius: 4px;
  color: #8ab4ff;
  background: rgba(91, 141, 239, 0.12);
  font-size: 10px;
  font-weight: 850;
  line-height: 1.1;
  text-transform: uppercase;
}

.position-pnl {
  display: inline;
  margin-left: 0;
  font-weight: 900;
  white-space: nowrap;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.action-hotkey-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  line-height: 1.05;
  min-width: 0;
  min-height: 50px;
  padding: 5px 5px;
  font-size: 16px;
  font-weight: 900;
}

.action-hotkey-btn > span {
  display: block;
  white-space: nowrap;
  line-height: 1;
  letter-spacing: 0;
}

.action-hotkey-btn > small {
  color: rgba(213, 219, 246, 0.72);
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.exec-actions .btn {
  width: 100%;
  min-width: 0;
}

.exec-actions .btn.compact {
  min-width: 0;
}

.buy-action-btn {
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.buy-action-btn .trade-action-content {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  justify-content: center;
  column-gap: 8px;
  width: max-content;
  max-width: 100%;
  min-width: 0;
  margin: 0 auto;
}

.trade-action-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 23px;
  font-weight: 950;
  line-height: 1;
  min-width: 24px;
}

.trade-action-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 5px;
  min-width: 0;
}

.trade-action-label,
.trade-action-hotkey {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
}

.trade-action-label {
  line-height: 1;
}

.trade-action-hotkey {
  color: rgba(213, 219, 246, 0.72);
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1;
}

#sell25.action-hotkey-btn,
#sell50.action-hotkey-btn,
#sell100.action-hotkey-btn {
  gap: 4px;
  padding: 5px 4px;
}

#sell25.action-hotkey-btn > span,
#sell50.action-hotkey-btn > span,
#sell100.action-hotkey-btn > span {
  font-size: 17px;
  font-weight: 950;
}

#sell25.action-hotkey-btn > small,
#sell50.action-hotkey-btn > small,
#sell100.action-hotkey-btn > small {
  color: rgba(213, 219, 246, 0.62);
  font-size: 10px;
  font-weight: 750;
}

@media (max-width: 1180px) {
  .exec-actions {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

.position-pnl.positive { color: var(--green); }
.position-pnl.negative { color: var(--red); }
.position-pnl.flat { color: var(--muted); }
.position-pnl.pnl-hidden { color: var(--muted); }

.hide-pnl-toggle {
  padding: 2px 5px;
  border-radius: 7px;
  font-size: 12px;
}

.market-context-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.left-market-context-box {
  margin: 0 0 10px;
}

.left-market-context-box h2 {
  margin: 0 0 4px;
  font-size: 13px;
  line-height: 1.1;
}

.left-market-context-box .market-context-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.market-read-summary {
  grid-column: 1 / -1;
  display: grid;
  gap: 2px;
  padding: 6px 8px;
  border: 1px solid rgba(131, 165, 255, 0.24);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(131, 165, 255, 0.16), rgba(125, 211, 176, 0.08));
}

.market-read-summary span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.market-read-summary strong {
  color: var(--text);
  font-size: 12.75px;
  font-weight: 900;
  line-height: 1.15;
}

.context-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px 7px;
  align-items: start;
  min-width: 0;
  padding: 6px 7px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 3px 0 0 rgba(183, 191, 216, 0.18);
}

.context-row span {
  color: var(--muted);
  font-size: 10.25px;
  font-weight: 850;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.context-row strong {
  justify-self: end;
  color: var(--text);
  max-width: 100%;
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.075);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.context-row small {
  grid-column: 1 / -1;
  color: #aab3d8;
  min-height: 13px;
  font-size: 10.25px;
  line-height: 1.2;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.context-row.bullish {
  border-color: rgba(125, 211, 176, 0.26);
  box-shadow: inset 3px 0 0 rgba(125, 211, 176, 0.72);
}

.context-row.bearish {
  border-color: rgba(242, 167, 181, 0.30);
  box-shadow: inset 3px 0 0 rgba(242, 167, 181, 0.78);
}

.context-row.neutral {
  border-color: rgba(246, 223, 154, 0.24);
  box-shadow: inset 3px 0 0 rgba(246, 223, 154, 0.70);
}

.context-row.bullish strong {
  color: var(--green);
  background: rgba(125, 211, 176, 0.11);
}

.context-row.bearish strong {
  color: var(--red);
  background: rgba(242, 167, 181, 0.12);
}

.context-row.neutral strong {
  color: #f6df9a;
  background: rgba(246, 223, 154, 0.10);
}

.context-row.muted strong,
.context-row.muted small { color: var(--muted); }

.debug-details {
  margin-top: 4px;
}

.debug-details summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 800;
}

@media (max-width: 980px) {
  .sim-shell {
    height: auto;
    grid-template-columns: 1fr;
  }
  .chart-pane {
    height: auto;
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(360px, 70vh) minmax(320px, 55vh) minmax(320px, 55vh);
    grid-template-areas:
      "settings"
      "chart1m"
      "chart15m"
      "chart5m";
  }
  .chart-pane.focus-mode {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(420px, 70vh);
    grid-template-areas:
      "settings"
      "chart1m";
  }
.multi-chart-title {
  left: 10px;
  right: auto;
}
.chart-overlay-control {
  left: 10px;
  right: auto;
  top: 48px;
}
.overlay-grid {
  left: 0;
  right: auto;
}
.quadrant-resizer { display: none; }
}

.training-persistence-warning {
  border: 1px solid rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.08);
  color: #fecaca;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 800;
}

.training-persistence-warning:not(.is-active) {
  display: none !important;
}

.data-persistence-status {
  grid-column: 1 / -1;
}
