.chart-controls {
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 9px;
}

.select-control {
  display: grid;
  gap: 5px;
  color: #68758a;
  font-size: 8px;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.chart-controls select {
  width: auto;
  min-width: 132px;
  padding: 9px 30px 9px 11px;
  color: #e4eaf4;
  background-color: #090d14;
  color-scheme: dark;
}

.chart-controls select.interval-select {
  min-width: 88px;
}

.chart-controls option {
  color: #e4eaf4;
  background: #111722;
}

.btn:disabled {
  cursor: wait;
  opacity: .6;
  transform: none;
}

.credential-statuses {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.credential-actions a.btn {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.logout-top {
  color: #ff8b98;
  border-color: #ff5b6e55;
}

.balance-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 20px;
}

.balance-summary > div {
  display: grid;
  gap: 6px;
  padding: 14px;
  background: #0b1018;
  border: 1px solid #232c3a;
  border-radius: 14px;
}

.balance-summary span {
  color: #68758a;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.balance-summary strong {
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.excluded-note {
  margin: 14px 0 0;
  font-size: 10px;
  line-height: 1.5;
}

.performance-panel .quality-ring strong {
  font-size: 20px;
}

.strategy-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.strategy-status-grid > div {
  display: grid;
  gap: 6px;
  padding: 18px;
  background: #0b1018;
  border: 1px solid #232c3a;
  border-radius: 15px;
}

.strategy-status-grid span,
.strategy-status-grid small {
  color: #657187;
  font-size: 9px;
}

.strategy-status-grid strong {
  font-size: 15px;
}

.strategy-note {
  margin: 16px 2px 0;
  font-size: 10px;
  line-height: 1.6;
}

.sentiment-head {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #202938;
}

.sentiment-grid strong.risk-low,
.sentiment-grid strong.risk-high,
.sentiment-grid strong.risk-mid {
  font-size: 15px;
}

.risk-slider-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.risk-slider-card {
  display: grid;
  gap: 13px;
  padding: 18px;
  background: #0b1018;
  border: 1px solid #263041;
  border-radius: 15px;
}

.risk-slider-card > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.risk-slider-card span,
.risk-slider-card small {
  color: #7d899c;
  font-size: 9px;
}

.risk-slider-card input[type="range"] {
  width: 100%;
  accent-color: #ffbd59;
}

.risk-slider-card .slider-labels span:nth-child(2) {
  text-align: center;
}

.risk-slider-card .slider-labels span:last-child {
  text-align: right;
}

.partial-profit-note {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 14px;
  margin: 16px 0;
  padding: 14px 16px;
  color: #8b98aa;
  background: #112019;
  border: 1px solid #24583f;
  border-radius: 13px;
  font-size: 10px;
  line-height: 1.5;
}

.partial-profit-note strong { color: #40e09a; }

@media (max-width: 720px) {
  .risk-slider-grid { grid-template-columns: 1fr; }
  .partial-profit-note { grid-template-columns: 1fr; }
}

.indicator-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 6px;
}

.indicator-toggles label {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  color: #91a0b5;
  background: #0b1018;
  border: 1px solid #263041;
  border-radius: 9px;
  cursor: pointer;
}

.indicator-toggles input {
  width: auto;
  accent-color: #38d8ff;
}

.price-chart-wrap {
  position: relative;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 7px 8px 0;
  font-size: 8px;
  letter-spacing: .08em;
}

.chart-legend .vwap { color: #ffbd59; }
.chart-legend .ema { color: #38d8ff; }
.chart-legend .entry { color: #aab4c5; }
.chart-legend .target { color: #40e09a; }
.chart-legend .stop { color: #ff5b6e; }

.indicator-panel {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #222b39;
}

.indicator-panel > div {
  display: flex;
  justify-content: space-between;
  color: #7d899c;
  font-size: 9px;
}

.indicator-panel canvas,
.full-chart .indicator-panel canvas {
  width: 100%;
  height: 135px;
}

#atr-panel canvas,
.full-chart #atr-panel canvas {
  height: 95px;
}

.technical-marker-panel {
  margin-top: 18px;
}

.marker-notice {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  margin: 14px 0 18px;
  padding: 13px 15px;
  background: #0b151b;
  border: 1px solid #1d3d49;
  border-radius: 13px;
  color: #8d9caf;
  font-size: 10px;
}

.marker-notice strong { color: #38d8ff; }
.marker-notice small { color: #59677b; white-space: nowrap; }

.marker-timeframes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.marker-frame {
  min-width: 0;
  padding: 16px;
  background: #0a0f17;
  border: 1px solid #222c3a;
  border-radius: 16px;
  transition: border-color .2s, box-shadow .2s;
}

.marker-frame.selected-marker-frame {
  border-color: #38d8ff55;
  box-shadow: inset 0 0 0 1px #38d8ff18;
}

.marker-frame-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.marker-frame-head > div { display: grid; gap: 4px; }
.marker-frame-head > div > span { color: #58677b; font-size: 8px; letter-spacing: .12em; }
.marker-frame-head strong { color: #dbe2ed; font-size: 13px; }
.tag.marker-aligned { color: #66e8ae; border-color: #2c7152; background: #10251c; }
.tag.stale { color: #ffbd59; border-color: #7a5a1e; background: #241a0b; }
.universe-freshness { margin: 0 0 16px; }
.regime-validation-banner {
  margin: 14px 0; padding: 12px 14px; border-radius: 12px;
  background: #2a0f13; border: 1px solid #6e2530; font-size: 12px; line-height: 1.5;
}
.regime-validation-banner strong { display: block; margin-bottom: 3px; letter-spacing: .03em; }
.council-panel table td.council-missing { color: var(--red); }
.council-panel table td.council-ok { color: var(--green); }
.credit-usage-panel .excluded-note { margin-top: 10px; }

.marker-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  margin: 14px 0 10px;
}

.marker-count {
  display: grid;
  gap: 2px;
  padding: 8px;
  background: #101722;
  border: 1px solid #242f3e;
  border-radius: 10px;
  color: #6f7c90;
  font-size: 8px;
  text-align: center;
}

.marker-count strong { color: #cbd4e2; font-size: 15px; }
.marker-count.marker-bullish strong { color: #40e09a; }
.marker-count.marker-bearish strong { color: #ff7080; }
.marker-count.marker-danger strong { color: #ffbd59; }
.marker-meta { min-height: 16px; margin: 0 0 12px; color: #68768a; font-size: 9px; }

.marker-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.marker-card {
  min-width: 0;
  padding: 11px;
  background: #101620;
  border: 1px solid #242e3c;
  border-left-width: 3px;
  border-radius: 11px;
}

.marker-card > div { display: flex; justify-content: space-between; gap: 8px; align-items: start; }
.marker-card strong { color: #bfc9d8; font-size: 10px; }
.marker-card b { display: block; margin: 7px 0 4px; color: #e4e9f1; font-size: 13px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.marker-card small { display: block; color: #667489; font-size: 8px; line-height: 1.45; }
.marker-state { font-size: 7px; letter-spacing: .08em; white-space: nowrap; }
.marker-card-bullish { border-left-color: #40e09a; }
.marker-card-bullish .marker-state { color: #40e09a; }
.marker-card-bearish { border-left-color: #ff5b6e; }
.marker-card-bearish .marker-state { color: #ff7080; }
.marker-card-danger { border-left-color: #ffbd59; background: #19150f; }
.marker-card-danger .marker-state { color: #ffbd59; }
.marker-card-neutral { border-left-color: #627086; }
.marker-card-neutral .marker-state { color: #8290a4; }

.composition-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
}

.composition-layout.vertical {
  grid-template-columns: 1fr;
  gap: 4px;
}

.composition-donut,
.composition-donut canvas {
  width: 190px;
  height: 190px;
}

.composition-donut .donut-center strong { font-size: 16px; }

.composition-legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(125px, 1fr));
  gap: 9px;
}

.composition-legend > div {
  display: grid;
  grid-template-columns: 9px 1fr auto;
  align-items: center;
  gap: 7px;
  color: #8993a6;
  font-size: 10px;
}

.composition-legend i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.composition-legend > div:nth-child(15n+1) i { background: #38d8ff; }
.composition-legend > div:nth-child(15n+2) i { background: #9d7bff; }
.composition-legend > div:nth-child(15n+3) i { background: #40e09a; }
.composition-legend > div:nth-child(15n+4) i { background: #ffbd59; }
.composition-legend > div:nth-child(15n+5) i { background: #ff5b6e; }
.composition-legend > div:nth-child(15n+6) i { background: #57a6ff; }
.composition-legend > div:nth-child(15n+7) i { background: #e879f9; }
.composition-legend > div:nth-child(15n+8) i { background: #2dd4bf; }
.composition-legend > div:nth-child(15n+9) i { background: #fb923c; }
.composition-legend > div:nth-child(15n+10) i { background: #a3e635; }
.composition-legend > div:nth-child(15n+11) i { background: #f472b6; }
.composition-legend > div:nth-child(15n+12) i { background: #818cf8; }
.composition-legend > div:nth-child(15n+13) i { background: #22c55e; }
.composition-legend > div:nth-child(15n+14) i { background: #facc15; }
.composition-legend > div:nth-child(15n+15) i { background: #f87171; }

.composition-legend strong {
  color: #dfe5ef;
  font-variant-numeric: tabular-nums;
}

.forced-pairs-panel { margin-bottom: 16px; }
.forced-pair-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; min-height: 34px; }
.forced-pair-chip { display: inline-flex; align-items: center; gap: 8px; border: 1px solid #273246; background: #141b27; border-radius: 999px; padding: 8px 12px; color: #dfe5ef; font-size: 12px; }
.forced-pair-chip input { accent-color: #38d8ff; }
.forced-pair-controls { display: grid; grid-template-columns: minmax(220px, 1fr) auto; gap: 10px; margin-bottom: 10px; }
.forced-pair-controls input { border: 1px solid #273246; background: #0e141e; color: #eef3fb; border-radius: 9px; padding: 11px 13px; }

@media (max-width: 620px) { .forced-pair-controls { grid-template-columns: 1fr; } }

@media (max-width: 1100px) {
  .strategy-status-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .marker-timeframes { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .strategy-status-grid {
    grid-template-columns: 1fr;
  }

  .balance-summary {
    grid-template-columns: 1fr;
  }

  .panel-head {
    flex-wrap: wrap;
  }

  .chart-controls {
    width: 100%;
  }

  .select-control {
    flex: 1;
  }

  .chart-controls select,
  .chart-controls select.interval-select {
    width: 100%;
    min-width: 0;
  }

  .composition-layout { grid-template-columns: 1fr; }
  .marker-notice { grid-template-columns: 1fr; }
  .marker-notice small { white-space: normal; }
  .marker-list { grid-template-columns: 1fr; }
  .marker-summary { grid-template-columns: repeat(2, 1fr); }
}

.span-3 {
  grid-column: 1 / -1;
}

.futures-positions-panel table {
  min-width: 980px;
}
